Spaces:
Sleeping
Sleeping
FINAL FORCE SYNC: Robust backup, secure protocols, and verified build
Browse files- client/config.ts +0 -1
- cmd/hf_backup.mjs +1 -1
- 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 \"
|
| 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",
|