Replace project with current server release and Windows setup
Import the 2026-10-09 source release, Fastify/SQLite backend, restored source assets, and analytics-enabled server build. Replace files from the previous release while retaining the existing repository history. Make builds portable across Windows and Linux, configure local startup, normalize Windows static asset paths, and fix test fixture cleanup and file URL handling. Exclude local environment settings, databases, dependencies, validation output, and TypeScript build cache from version control. Validation: npm ci, static and server builds, 106 arrival tests, and actual local HTTP checks passed. The full suite passed 467 of 470 tests; three tests still require QA fixtures omitted from the supplied release, documented in README-서버실행.md.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { pathToFileURL } from 'node:url';
|
||||
import { openReadOnlyStore } from './db.mjs';
|
||||
|
||||
export async function createBackup(args, env = process.env) {
|
||||
if (args.length !== 2 || args[0] !== '--output') throw new Error('Invalid arguments');
|
||||
const store = openReadOnlyStore(env.DB_PATH);
|
||||
try { await store.backup(args[1]); }
|
||||
finally { store.close(); }
|
||||
}
|
||||
|
||||
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
||||
createBackup(process.argv.slice(2)).then(() => { process.stdout.write('{"ok":true}\n'); }).catch(() => {
|
||||
process.stderr.write('Backup failed; check existing DB_PATH and a new absolute private --output path\n');
|
||||
process.exitCode = 1;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user