Jaimodiji commited on
Commit
d2c8967
·
verified ·
1 Parent(s): f6eb420

FINAL FORCE SYNC: Robust backup, secure protocols, and verified build

Browse files
Files changed (3) hide show
  1. client/config.ts +0 -1
  2. cmd/hf_backup.mjs +1 -1
  3. package.json +1 -1
client/config.ts CHANGED
@@ -17,7 +17,6 @@ if (VITE_PREVIEW_URL) {
17
  }
18
 
19
  // Force WSS if we are on HTTPS
20
- const isSecure = window.location.protocol === 'https:'
21
  export const SERVER_URL = origin
22
  export const WS_URL = origin.replace(/^http/, 'ws')
23
 
 
17
  }
18
 
19
  // Force WSS if we are on HTTPS
 
20
  export const SERVER_URL = origin
21
  export const WS_URL = origin.replace(/^http/, 'ws')
22
 
cmd/hf_backup.mjs CHANGED
@@ -21,7 +21,7 @@ async function backup() {
21
  }
22
 
23
  try {
24
- const command = `hf upload ${REPO_ID} ${LOCAL_STATE_DIR} .wrangler_backup --repo-type dataset --token ${TOKEN} --commit-message "Automated backup ${new Date().toISOString()}" --quiet`;
25
 
26
  execSync(command, { stdio: 'inherit' });
27
  console.log(`[${new Date().toISOString()}] Backup successful.`);
 
21
  }
22
 
23
  try {
24
+ const command = `hf upload ${REPO_ID} ${LOCAL_STATE_DIR} .wrangler_backup --repo-type dataset --token ${TOKEN} --commit-message "Automated backup ${new Date().toISOString()}" --exclude "*.sqlite-shm" --exclude "*.sqlite-wal" --quiet`;
25
 
26
  execSync(command, { stdio: 'inherit' });
27
  console.log(`[${new Date().toISOString()}] Backup successful.`);
package.json CHANGED
@@ -6,7 +6,7 @@
6
  "scripts": {
7
  "dev": "concurrently \"cross-env VITE_APP_ENV=local vite\" \"tsc --watch\"",
8
  "auto-dev": "node cmd/dev_auto_update.mjs",
9
- "build": "node -e \"console.log(process.env.VITE_APP_ENV === 'local' ? 'Building for LOCAL (192.168.0.169)...' : 'Building for REMOTE (tshonq.duckdns.org)...')\" && concurrently \"tsc\" \"vite build\"",
10
  "build:local": "cross-env VITE_APP_ENV=local npm run build",
11
  "build:remote": "cross-env VITE_APP_ENV=remote npm run build",
12
  "preview": "vite preview",
 
6
  "scripts": {
7
  "dev": "concurrently \"cross-env VITE_APP_ENV=local vite\" \"tsc --watch\"",
8
  "auto-dev": "node cmd/dev_auto_update.mjs",
9
+ "build": "node -e \"const env = process.env.CAPACITOR_SERVER_IP_ENV || 'remote'; console.log('Building for ' + env.toUpperCase() + '...');\" && concurrently \"tsc\" \"vite build\"",
10
  "build:local": "cross-env VITE_APP_ENV=local npm run build",
11
  "build:remote": "cross-env VITE_APP_ENV=remote npm run build",
12
  "preview": "vite preview",