feat: implement TASK-WP0-09 packaging
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 42s

This commit is contained in:
suyx
2026-07-28 00:55:18 +08:00
parent 361bda2f22
commit 2c5c1a5005
13 changed files with 600 additions and 8 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ export interface CreateAppOptions {
publicAssets?: PublicAssetResolver;
}
const supportGateDirectory = resolve("apps/web/support-gate");
const supportGateDirectory = resolve(process.env.DADA_SUPPORT_GATE_ROOT ?? "apps/web/support-gate");
const supportGateHtml = readFileSync(resolve(supportGateDirectory, "index.html"), "utf8");
const supportGateCss = readFileSync(resolve(supportGateDirectory, "support-gate.css"), "utf8");
const supportGateJavaScript = readFileSync(resolve(supportGateDirectory, "support-gate.js"), "utf8");
+2 -1
View File
@@ -192,7 +192,8 @@ export function resolvePathWithinRoot(root: string, objectKey: string) {
}
function openInstanceDatabase(databasePath: string) {
const database = new Database(databasePath);
const nativeBinding = process.env.DADA_SQLITE_NATIVE_BINDING;
const database = new Database(databasePath, nativeBinding ? { nativeBinding } : undefined);
database.pragma("journal_mode = WAL");
database.exec(`
CREATE TABLE instance_metadata (
+2 -1
View File
@@ -146,7 +146,8 @@ export class ManagedStorage {
throw new Error("database_outside_data_root");
}
mkdirSync(dirname(this.databasePath), { recursive: true });
this.database = new Database(this.databasePath);
const nativeBinding = process.env.DADA_SQLITE_NATIVE_BINDING;
this.database = new Database(this.databasePath, nativeBinding ? { nativeBinding } : undefined);
this.database.pragma("journal_mode = WAL");
this.database.pragma("foreign_keys = ON");
this.database.pragma("busy_timeout = 5000");