fix(backup): include goals and tasks in exports

This commit is contained in:
Codex committed 2026-09-27 13:19:25 +00:00
1 parent 5fd997be3c
commit 80ad1932e1
9 files changed
+38 -22

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ const meta = new URL("../dist/.openai/", import.meta.url);
await rm(dist, { recursive: true, force: true });
await Promise.all([mkdir(server, { recursive: true }), mkdir(meta, { recursive: true })]);
const [rawIndexHtml, addonsJs, bootGuardJs, i18nJs, tasksJs, calendarJs, i18nRenderersJs, manifest, serviceWorker, icon] = await Promise.all([text("index.html"), text("addons.js"), text("boot-guard.js"), text("i18n.js"), text("tasks.js"), text("calendar.js"), text("i18n-renderers.js"), text("manifest.webmanifest"), text("service-worker.js"), text("life-os-icon.svg")]);
const release = "1.4.0";
const release = "1.4.2";
// The original single-file prototype carried an obsolete English-to-Chinese
// DOM replacement block. Runtime localisation now lives in i18n.js and
// i18n-renderers.js, so exclude that dead block from the deployed document.
+7 -4
View File
@@ -1,8 +1,11 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
const worker = await import(new URL("../dist/server/index.js", import.meta.url));
assert.equal(typeof worker.default?.fetch, "function");
const html = await readFile(new URL("../dist/server/assets.js", import.meta.url), "utf8");
assert.match(html, /indexHtml/);
const assets = await import(new URL("../dist/server/assets.js", import.meta.url));
assert.match(assets.indexHtml, /!\[1,2\]\.includes\(d\.schemaVersion\)/);
assert.match(assets.addonsJs, /window\.exportData = exportData/);
assert.match(assets.addonsJs, /schemaVersion: 2/);
assert.match(assets.addonsJs, /settings: settings\(\), system: sys\(\)/);
assert.match(assets.addonsJs, /if \(mergedLocalBoard\) await uploadCloudState\(\)/);
assert.match(assets.i18nRenderersJs, /dialog\.goals/);
console.log("Life OS Worker artifact is valid");