@camstack/system 1.2.88 → 1.2.90
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/addon-runner.js +52 -6
- package/dist/addon-runner.mjs +52 -6
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- package/dist/builtins/storage-orchestrator/index.mjs +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +47 -3
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +46 -3
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-B4WyhfjH.js → dist-CYqL8oZq.js} +2121 -37
- package/dist/{dist-DlDY9mQO.mjs → dist-DMhxx5Kr.mjs} +2121 -37
- package/dist/index.js +2 -46
- package/dist/index.mjs +2 -46
- package/dist/kernel/moleculer/init-watchdog.d.ts +60 -0
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Lt as parseJsonObject, _t as BaseAddon, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as storageCapability, st as settingsStoreCapability, ut as storageMigrationCapability } from "../../dist-
|
|
1
|
+
import { Lt as parseJsonObject, _t as BaseAddon, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as storageCapability, st as settingsStoreCapability, ut as storageMigrationCapability } from "../../dist-DMhxx5Kr.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import { buildStorageLocationRegistry } from "@camstack/system";
|
|
6
5
|
//#region src/builtins/storage-orchestrator/location-store.ts
|
|
7
6
|
var STORAGE_LOCATIONS = "storage_locations";
|
|
8
7
|
/**
|
|
@@ -570,6 +569,50 @@ function isTerminal(job) {
|
|
|
570
569
|
return job.phase === "done" || job.phase === "failed" || job.phase === "cancelled";
|
|
571
570
|
}
|
|
572
571
|
//#endregion
|
|
572
|
+
//#region src/kernel/storage-location-registry.ts
|
|
573
|
+
/**
|
|
574
|
+
* Aggregates per-addon {@link StorageLocationDeclaration} arrays into a single
|
|
575
|
+
* {@link StorageLocationRegistry}.
|
|
576
|
+
*
|
|
577
|
+
* Merge rules:
|
|
578
|
+
* - Declarations are keyed by `id`; iteration order follows first occurrence.
|
|
579
|
+
* - **First declarer wins** for metadata (`displayName`, `description`,
|
|
580
|
+
* `defaultsTo`): if a later addon declares the same `id`, its metadata is
|
|
581
|
+
* silently ignored.
|
|
582
|
+
* - **Cardinality conflict throws**: if two addons declare the same `id` with
|
|
583
|
+
* different `cardinality` values an `Error` is thrown immediately (message
|
|
584
|
+
* contains the words "cardinality" and the conflicting `id`).
|
|
585
|
+
*
|
|
586
|
+
* @param perAddon - One entry per addon; each entry is that addon's
|
|
587
|
+
* `storageLocations` declaration array.
|
|
588
|
+
*/
|
|
589
|
+
function buildStorageLocationRegistry(perAddon) {
|
|
590
|
+
const map = /* @__PURE__ */ new Map();
|
|
591
|
+
for (const addonDeclarations of perAddon) for (const declaration of addonDeclarations) {
|
|
592
|
+
const existing = map.get(declaration.id);
|
|
593
|
+
if (existing !== void 0) {
|
|
594
|
+
if (existing.cardinality !== declaration.cardinality) throw new Error(`Storage location cardinality conflict for id "${declaration.id}": "${existing.cardinality}" (first declarer) vs "${declaration.cardinality}" (later declarer). All addons declaring the same storage location id must agree on cardinality.`);
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
map.set(declaration.id, declaration);
|
|
598
|
+
}
|
|
599
|
+
const frozen = Object.freeze([...map.values()]);
|
|
600
|
+
return {
|
|
601
|
+
get(id) {
|
|
602
|
+
return map.get(id);
|
|
603
|
+
},
|
|
604
|
+
has(id) {
|
|
605
|
+
return map.has(id);
|
|
606
|
+
},
|
|
607
|
+
cardinalityOf(id) {
|
|
608
|
+
return map.get(id)?.cardinality ?? null;
|
|
609
|
+
},
|
|
610
|
+
list() {
|
|
611
|
+
return frozen;
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
//#endregion
|
|
573
616
|
//#region src/builtins/storage-orchestrator/data-store-dispatch.ts
|
|
574
617
|
/**
|
|
575
618
|
* Pick the engine to serve a call.
|
|
@@ -1951,4 +1994,4 @@ var StorageOrchestratorAddon = class extends BaseAddon {
|
|
|
1951
1994
|
}
|
|
1952
1995
|
};
|
|
1953
1996
|
//#endregion
|
|
1954
|
-
export { StorageOrchestratorAddon, StorageOrchestratorAddon as default,
|
|
1997
|
+
export { StorageOrchestratorAddon, StorageOrchestratorAddon as default, SqliteLocationStore as i, buildStorageLocationRegistry as n, StorageMigrationCoordinator as r, StorageOrchestratorService as t };
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CYqL8oZq.js");
|
|
7
7
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
8
8
|
/**
|
|
9
9
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as hydrateSchema, _t as BaseAddon, gt as errMsg } from "../../dist-
|
|
1
|
+
import { Pt as hydrateSchema, _t as BaseAddon, gt as errMsg } from "../../dist-DMhxx5Kr.mjs";
|
|
2
2
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CYqL8oZq.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as logDestinationCapability, _t as BaseAddon } from "../../dist-
|
|
1
|
+
import { J as logDestinationCapability, _t as BaseAddon } from "../../dist-DMhxx5Kr.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|