feat: implement TASK-WP0-09 packaging
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 42s
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 42s
This commit is contained in:
+1
-1
@@ -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");
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -9,7 +9,8 @@ export class WorkerStorageStatus {
|
||||
private readonly database: BetterSqlite3.Database;
|
||||
|
||||
constructor(databasePath: string) {
|
||||
this.database = new Database(databasePath);
|
||||
const nativeBinding = process.env.DADA_SQLITE_NATIVE_BINDING;
|
||||
this.database = new Database(databasePath, nativeBinding ? { nativeBinding } : undefined);
|
||||
this.database.pragma("busy_timeout = 5000");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user