camstack 1.2.62 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ async function runServe(args) {
|
|
|
38
38
|
...typeof values.data === "string" ? { data: values.data } : {}
|
|
39
39
|
};
|
|
40
40
|
Object.assign(process.env, buildServeEnv(opts));
|
|
41
|
-
await import("./launcher-
|
|
41
|
+
await import("./launcher-RA6HGFNQ.js");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/commands/agent.ts
|
|
@@ -83,7 +83,7 @@ async function runAgent(args) {
|
|
|
83
83
|
...typeof values.port === "string" ? { port: values.port } : {}
|
|
84
84
|
};
|
|
85
85
|
Object.assign(process.env, buildAgentEnv(opts));
|
|
86
|
-
await import("./launcher-
|
|
86
|
+
await import("./launcher-RA6HGFNQ.js");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/commands/setup.ts
|
|
@@ -82635,8 +82635,8 @@ var require_storage_orchestrator_addon = __commonJS({
|
|
|
82635
82635
|
finishedAt: null,
|
|
82636
82636
|
error: null
|
|
82637
82637
|
};
|
|
82638
|
-
this.active = job;
|
|
82639
82638
|
await this.persist(job);
|
|
82639
|
+
this.active = job;
|
|
82640
82640
|
this.runPromise = this.run(job);
|
|
82641
82641
|
this.runPromise;
|
|
82642
82642
|
return job.jobId;
|
|
@@ -135428,20 +135428,63 @@ var require_dist3 = __commonJS({
|
|
|
135428
135428
|
if (this.settingsStore === null) return;
|
|
135429
135429
|
this.settingsStore.clearDeviceRuntimeState(deviceId);
|
|
135430
135430
|
}
|
|
135431
|
+
/**
|
|
135432
|
+
* The addon's `ctx.settings`.
|
|
135433
|
+
*
|
|
135434
|
+
* The backend is chosen on EVERY call, never frozen when the view is built.
|
|
135435
|
+
* That is not a nicety: `settings-store` is owned by `storage-orchestrator`,
|
|
135436
|
+
* so the door is wired by `registerProvider` STRICTLY AFTER that addon's
|
|
135437
|
+
* context — and therefore its settings view — already exists. A view bound at
|
|
135438
|
+
* construction handed the door's own owner the sync-store backend, whose
|
|
135439
|
+
* writes throw for the whole life of the process once `sqlite-settings` runs
|
|
135440
|
+
* isolated (D181: no sync `ISettingsStore` reaches hub-main, only the async
|
|
135441
|
+
* door). Reads were worse than the writes: they answered `{}` in silence.
|
|
135442
|
+
* That is what made `storageMigration.start` fail on its first durable write
|
|
135443
|
+
* while every other addon's persistence worked. See D294.
|
|
135444
|
+
*/
|
|
135431
135445
|
createSettingsView(addonId) {
|
|
135432
|
-
|
|
135446
|
+
const storeBacked = this.createStoreSettingsView(addonId);
|
|
135447
|
+
let doorBacked = null;
|
|
135448
|
+
let doorBackedSource = null;
|
|
135449
|
+
const active = () => {
|
|
135450
|
+
if (this.settingsStore !== null) return storeBacked;
|
|
135433
135451
|
const door = this.settingsDoor;
|
|
135434
|
-
|
|
135435
|
-
|
|
135436
|
-
|
|
135437
|
-
|
|
135438
|
-
|
|
135439
|
-
|
|
135440
|
-
|
|
135441
|
-
|
|
135442
|
-
|
|
135443
|
-
|
|
135444
|
-
|
|
135452
|
+
if (door === null) return storeBacked;
|
|
135453
|
+
if (doorBacked === null || doorBackedSource !== door) {
|
|
135454
|
+
doorBackedSource = door;
|
|
135455
|
+
doorBacked = this.createDoorBackedSettingsView(addonId, door);
|
|
135456
|
+
}
|
|
135457
|
+
return doorBacked;
|
|
135458
|
+
};
|
|
135459
|
+
return {
|
|
135460
|
+
readAddonStore: () => active().readAddonStore(),
|
|
135461
|
+
writeAddonStore: (patch) => active().writeAddonStore(patch),
|
|
135462
|
+
readDeviceStore: (deviceId) => active().readDeviceStore(deviceId),
|
|
135463
|
+
readDeviceStoreBatch: (deviceIds) => active().readDeviceStoreBatch(deviceIds),
|
|
135464
|
+
writeDeviceStore: (deviceId, patch) => active().writeDeviceStore(deviceId, patch),
|
|
135465
|
+
clearDeviceStore: (deviceId) => active().clearDeviceStore(deviceId),
|
|
135466
|
+
getSection: (section) => active().getSection(section),
|
|
135467
|
+
setSection: (section, patch) => active().setSection(section, patch),
|
|
135468
|
+
readDeviceRuntimeState: (deviceId) => active().readDeviceRuntimeState(deviceId),
|
|
135469
|
+
writeDeviceRuntimeState: (deviceId, data) => active().writeDeviceRuntimeState(deviceId, data),
|
|
135470
|
+
clearDeviceRuntimeState: (deviceId) => active().clearDeviceRuntimeState(deviceId)
|
|
135471
|
+
};
|
|
135472
|
+
}
|
|
135473
|
+
/** The async-door backend of {@link createSettingsView}. */
|
|
135474
|
+
createDoorBackedSettingsView(addonId, door) {
|
|
135475
|
+
return createDoorSettingsView(addonId, door, {
|
|
135476
|
+
getSection: (section) => this.getSection(section),
|
|
135477
|
+
setSection: async (section, patch) => {
|
|
135478
|
+
for (const [key, value] of Object.entries(patch)) await door.set({
|
|
135479
|
+
collection: "system-settings",
|
|
135480
|
+
key: `${section}.${key}`,
|
|
135481
|
+
value
|
|
135482
|
+
});
|
|
135483
|
+
}
|
|
135484
|
+
});
|
|
135485
|
+
}
|
|
135486
|
+
/** The sync-`ISettingsStore` backend of {@link createSettingsView}. */
|
|
135487
|
+
createStoreSettingsView(addonId) {
|
|
135445
135488
|
const cm = this;
|
|
135446
135489
|
return {
|
|
135447
135490
|
async readAddonStore() {
|
|
@@ -135457,6 +135500,15 @@ var require_dist3 = __commonJS({
|
|
|
135457
135500
|
async readDeviceStore(deviceId) {
|
|
135458
135501
|
return cm.getAddonDevice(addonId, String(deviceId));
|
|
135459
135502
|
},
|
|
135503
|
+
async readDeviceStoreBatch(deviceIds) {
|
|
135504
|
+
const out = /* @__PURE__ */ new Map();
|
|
135505
|
+
for (const deviceId of deviceIds) try {
|
|
135506
|
+
out.set(deviceId, cm.getAddonDevice(addonId, String(deviceId)));
|
|
135507
|
+
} catch {
|
|
135508
|
+
out.set(deviceId, {});
|
|
135509
|
+
}
|
|
135510
|
+
return out;
|
|
135511
|
+
},
|
|
135460
135512
|
async writeDeviceStore(deviceId, patch) {
|
|
135461
135513
|
const key = String(deviceId);
|
|
135462
135514
|
const existing = cm.getAddonDevice(addonId, key);
|