@camstack/system 1.1.36 → 1.1.37
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 +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +8 -4
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +22 -10
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +23 -11
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +4 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +23 -9
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +24 -10
- 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/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.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/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/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/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- 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-C7oOY4iL.mjs → dist-CU3lb_Ys.mjs} +322 -8
- package/dist/{dist-COIhbSao.js → dist-fRVWwrkF.js} +322 -8
- package/dist/index.js +26 -7
- package/dist/index.mjs +26 -7
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/moleculer/node-registry.d.ts +22 -1
- package/dist/kernel/moleculer/register-node-client.d.ts +8 -5
- package/dist/{manifest-python-deps-BYIV8-rc.mjs → manifest-python-deps-4QvOLiBn.mjs} +1 -1
- package/dist/{manifest-python-deps-CZFqI4wp.js → manifest-python-deps-B6ahe90k.js} +1 -1
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
2
|
+
const require_manifest_python_deps = require("./manifest-python-deps-B6ahe90k.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as createUdsLoggerWithControl, I as LocalChildClient, i as createUdsAddonContext, it as setWorkerNativeCapsChangeListener, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestPythonDeps, tt as getWorkerNativeCapProvider, vt as installManifestNativeDeps, yt as resolveAddonClass } from "./manifest-python-deps-
|
|
1
|
+
import { F as createUdsLoggerWithControl, I as LocalChildClient, i as createUdsAddonContext, it as setWorkerNativeCapsChangeListener, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestPythonDeps, tt as getWorkerNativeCapProvider, vt as installManifestNativeDeps, yt as resolveAddonClass } from "./manifest-python-deps-4QvOLiBn.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -2,6 +2,8 @@ import { BaseAddon, ProviderRegistration } from '@camstack/types';
|
|
|
2
2
|
export declare class AddonPagesAggregatorAddon extends BaseAddon {
|
|
3
3
|
readonly id = "addon-pages-aggregator";
|
|
4
4
|
private resolvedPaths;
|
|
5
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
6
|
+
private readonly bundleHashCache;
|
|
5
7
|
/**
|
|
6
8
|
* Last successful `listPages()` snapshot per source. Used as the
|
|
7
9
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -27,10 +29,12 @@ export declare class AddonPagesAggregatorAddon extends BaseAddon {
|
|
|
27
29
|
private scheduleRetry;
|
|
28
30
|
private retrySource;
|
|
29
31
|
/**
|
|
30
|
-
* Build `/api/addon-pages/<addonId>/<bundle>?v=<
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* Build `/api/addon-pages/<addonId>/<bundle>?v=<contentHash>`. A CONTENT
|
|
33
|
+
* hash, NOT mtime: reproducible builds stamp a FIXED mtime (observed
|
|
34
|
+
* 1985-10-26) so an mtime `?v=` never changes across redeploys and a
|
|
35
|
+
* caching proxy (Cloudflare tunnel) serves a STALE bundle. Hashing the
|
|
36
|
+
* (small) MF entry file busts the cache exactly when the bundle changes.
|
|
37
|
+
* Memoised per (path,size,mtime); `Date.now()` when the file is absent.
|
|
34
38
|
*/
|
|
35
39
|
private makeBundleUrl;
|
|
36
40
|
/**
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -88,6 +88,8 @@ var PER_SOURCE_TIMEOUT_MS = 2500;
|
|
|
88
88
|
var AddonPagesAggregatorAddon = class extends require_dist.BaseAddon {
|
|
89
89
|
id = "addon-pages-aggregator";
|
|
90
90
|
resolvedPaths = null;
|
|
91
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
92
|
+
bundleHashCache = /* @__PURE__ */ new Map();
|
|
91
93
|
/**
|
|
92
94
|
* Last successful `listPages()` snapshot per source. Used as the
|
|
93
95
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -205,18 +207,28 @@ var AddonPagesAggregatorAddon = class extends require_dist.BaseAddon {
|
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
209
|
/**
|
|
208
|
-
* Build `/api/addon-pages/<addonId>/<bundle>?v=<
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
210
|
+
* Build `/api/addon-pages/<addonId>/<bundle>?v=<contentHash>`. A CONTENT
|
|
211
|
+
* hash, NOT mtime: reproducible builds stamp a FIXED mtime (observed
|
|
212
|
+
* 1985-10-26) so an mtime `?v=` never changes across redeploys and a
|
|
213
|
+
* caching proxy (Cloudflare tunnel) serves a STALE bundle. Hashing the
|
|
214
|
+
* (small) MF entry file busts the cache exactly when the bundle changes.
|
|
215
|
+
* Memoised per (path,size,mtime); `Date.now()` when the file is absent.
|
|
212
216
|
*/
|
|
213
217
|
makeBundleUrl(addonId, bundle) {
|
|
214
218
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
220
|
+
try {
|
|
221
|
+
const stat = node_fs.statSync(bundlePath);
|
|
222
|
+
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
223
|
+
let v = this.bundleHashCache.get(cacheKey);
|
|
224
|
+
if (v === void 0) {
|
|
225
|
+
v = (0, node_crypto.createHash)("sha1").update(node_fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
226
|
+
this.bundleHashCache.set(cacheKey, v);
|
|
227
|
+
}
|
|
228
|
+
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
229
|
+
} catch {
|
|
230
|
+
return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
231
|
+
}
|
|
220
232
|
}
|
|
221
233
|
/**
|
|
222
234
|
* Resolve the local filesystem path for an addon's bundle. Mirrors
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as errMsg, et as BaseAddon, f as addonPagesCapability, st as EventCategory } from "../../dist-
|
|
1
|
+
import { $ as errMsg, et as BaseAddon, f as addonPagesCapability, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
//#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
|
|
7
7
|
/** Stable identity for an addon page, independent of which node reported it. */
|
|
8
8
|
function pageKey(info) {
|
|
@@ -81,6 +81,8 @@ var PER_SOURCE_TIMEOUT_MS = 2500;
|
|
|
81
81
|
var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
82
82
|
id = "addon-pages-aggregator";
|
|
83
83
|
resolvedPaths = null;
|
|
84
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
85
|
+
bundleHashCache = /* @__PURE__ */ new Map();
|
|
84
86
|
/**
|
|
85
87
|
* Last successful `listPages()` snapshot per source. Used as the
|
|
86
88
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -198,18 +200,28 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
/**
|
|
201
|
-
* Build `/api/addon-pages/<addonId>/<bundle>?v=<
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
203
|
+
* Build `/api/addon-pages/<addonId>/<bundle>?v=<contentHash>`. A CONTENT
|
|
204
|
+
* hash, NOT mtime: reproducible builds stamp a FIXED mtime (observed
|
|
205
|
+
* 1985-10-26) so an mtime `?v=` never changes across redeploys and a
|
|
206
|
+
* caching proxy (Cloudflare tunnel) serves a STALE bundle. Hashing the
|
|
207
|
+
* (small) MF entry file busts the cache exactly when the bundle changes.
|
|
208
|
+
* Memoised per (path,size,mtime); `Date.now()` when the file is absent.
|
|
205
209
|
*/
|
|
206
210
|
makeBundleUrl(addonId, bundle) {
|
|
207
211
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
213
|
+
try {
|
|
214
|
+
const stat = fs.statSync(bundlePath);
|
|
215
|
+
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
216
|
+
let v = this.bundleHashCache.get(cacheKey);
|
|
217
|
+
if (v === void 0) {
|
|
218
|
+
v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
219
|
+
this.bundleHashCache.set(cacheKey, v);
|
|
220
|
+
}
|
|
221
|
+
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
222
|
+
} catch {
|
|
223
|
+
return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
224
|
+
}
|
|
213
225
|
}
|
|
214
226
|
/**
|
|
215
227
|
* Resolve the local filesystem path for an addon's bundle. Mirrors
|
|
@@ -2,6 +2,8 @@ import { BaseAddon, ProviderRegistration } from '@camstack/types';
|
|
|
2
2
|
export declare class AddonWidgetsAggregatorAddon extends BaseAddon {
|
|
3
3
|
readonly id = "addon-widgets-aggregator";
|
|
4
4
|
private resolvedPaths;
|
|
5
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
6
|
+
private readonly bundleHashCache;
|
|
5
7
|
/**
|
|
6
8
|
* Last successful `listWidgets()` snapshot per source. Used as the
|
|
7
9
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -41,6 +43,8 @@ export declare class AddonWidgetsAggregatorAddon extends BaseAddon {
|
|
|
41
43
|
* just gets a fresh URL on each call instead of cache-friendly mtime.
|
|
42
44
|
*/
|
|
43
45
|
private makeBundleUrl;
|
|
46
|
+
/** sha1(content) 12-hex of a bundle entry file, memoised; `Date.now()` when absent. */
|
|
47
|
+
private bundleVersionTag;
|
|
44
48
|
private resolveBundlePath;
|
|
45
49
|
private resolvePaths;
|
|
46
50
|
}
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -18,9 +18,10 @@ let node_crypto = require("node:crypto");
|
|
|
18
18
|
* Mirrors `addon-pages-aggregator` exactly: walks every registered
|
|
19
19
|
* `addon-widgets-source` (collection) provider and emits an enriched
|
|
20
20
|
* widget metadata list with versioned `bundleUrl`s pointing at
|
|
21
|
-
* `/api/addon-widgets/<addonId>/<bundle>?v=<
|
|
22
|
-
*
|
|
23
|
-
* manual reload
|
|
21
|
+
* `/api/addon-widgets/<addonId>/<bundle>?v=<contentHash>`. The
|
|
22
|
+
* content-hash cache-buster lets the browser (and any caching proxy)
|
|
23
|
+
* pick up addon rebuilds without manual reload — see `makeBundleUrl`
|
|
24
|
+
* for why mtime is unusable (reproducible builds fix it).
|
|
24
25
|
*
|
|
25
26
|
* The static file endpoint (`/api/addon-widgets/:addonId/*`) is served
|
|
26
27
|
* by `AddonWidgetsService.resolveBundle()` on the server side; this
|
|
@@ -57,6 +58,8 @@ var PER_SOURCE_TIMEOUT_MS = 2500;
|
|
|
57
58
|
var AddonWidgetsAggregatorAddon = class extends require_dist.BaseAddon {
|
|
58
59
|
id = "addon-widgets-aggregator";
|
|
59
60
|
resolvedPaths = null;
|
|
61
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
62
|
+
bundleHashCache = /* @__PURE__ */ new Map();
|
|
60
63
|
/**
|
|
61
64
|
* Last successful `listWidgets()` snapshot per source. Used as the
|
|
62
65
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -195,11 +198,22 @@ var AddonWidgetsAggregatorAddon = class extends require_dist.BaseAddon {
|
|
|
195
198
|
*/
|
|
196
199
|
makeBundleUrl(addonId, bundle) {
|
|
197
200
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return
|
|
201
|
+
return `/api/addon-widgets/${addonId}/${bundle}?v=${this.bundleVersionTag(bundlePath)}`;
|
|
202
|
+
}
|
|
203
|
+
/** sha1(content) 12-hex of a bundle entry file, memoised; `Date.now()` when absent. */
|
|
204
|
+
bundleVersionTag(bundlePath) {
|
|
205
|
+
if (bundlePath === null) return String(Math.floor(Date.now()));
|
|
206
|
+
try {
|
|
207
|
+
const stat = node_fs.statSync(bundlePath);
|
|
208
|
+
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
209
|
+
const cached = this.bundleHashCache.get(cacheKey);
|
|
210
|
+
if (cached !== void 0) return cached;
|
|
211
|
+
const hash = (0, node_crypto.createHash)("sha1").update(node_fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
212
|
+
this.bundleHashCache.set(cacheKey, hash);
|
|
213
|
+
return hash;
|
|
214
|
+
} catch {
|
|
215
|
+
return String(Math.floor(Date.now()));
|
|
216
|
+
}
|
|
203
217
|
}
|
|
204
218
|
resolveBundlePath(addonId, bundle) {
|
|
205
219
|
const paths = this.resolvedPaths;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as errMsg, et as BaseAddon, m as addonWidgetsCapability, st as EventCategory } from "../../dist-
|
|
1
|
+
import { $ as errMsg, et as BaseAddon, m as addonWidgetsCapability, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
//#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
|
|
7
7
|
/**
|
|
8
8
|
* Addon Widgets Aggregator — hub-local builtin that owns the singleton
|
|
@@ -11,9 +11,10 @@ import { randomUUID } from "node:crypto";
|
|
|
11
11
|
* Mirrors `addon-pages-aggregator` exactly: walks every registered
|
|
12
12
|
* `addon-widgets-source` (collection) provider and emits an enriched
|
|
13
13
|
* widget metadata list with versioned `bundleUrl`s pointing at
|
|
14
|
-
* `/api/addon-widgets/<addonId>/<bundle>?v=<
|
|
15
|
-
*
|
|
16
|
-
* manual reload
|
|
14
|
+
* `/api/addon-widgets/<addonId>/<bundle>?v=<contentHash>`. The
|
|
15
|
+
* content-hash cache-buster lets the browser (and any caching proxy)
|
|
16
|
+
* pick up addon rebuilds without manual reload — see `makeBundleUrl`
|
|
17
|
+
* for why mtime is unusable (reproducible builds fix it).
|
|
17
18
|
*
|
|
18
19
|
* The static file endpoint (`/api/addon-widgets/:addonId/*`) is served
|
|
19
20
|
* by `AddonWidgetsService.resolveBundle()` on the server side; this
|
|
@@ -50,6 +51,8 @@ var PER_SOURCE_TIMEOUT_MS = 2500;
|
|
|
50
51
|
var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
51
52
|
id = "addon-widgets-aggregator";
|
|
52
53
|
resolvedPaths = null;
|
|
54
|
+
/** Content-hash cache-buster memo, keyed `path:size:mtime`. */
|
|
55
|
+
bundleHashCache = /* @__PURE__ */ new Map();
|
|
53
56
|
/**
|
|
54
57
|
* Last successful `listWidgets()` snapshot per source. Used as the
|
|
55
58
|
* "stale-but-valid" fallback when a source transiently fails — drops
|
|
@@ -188,11 +191,22 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
188
191
|
*/
|
|
189
192
|
makeBundleUrl(addonId, bundle) {
|
|
190
193
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return
|
|
194
|
+
return `/api/addon-widgets/${addonId}/${bundle}?v=${this.bundleVersionTag(bundlePath)}`;
|
|
195
|
+
}
|
|
196
|
+
/** sha1(content) 12-hex of a bundle entry file, memoised; `Date.now()` when absent. */
|
|
197
|
+
bundleVersionTag(bundlePath) {
|
|
198
|
+
if (bundlePath === null) return String(Math.floor(Date.now()));
|
|
199
|
+
try {
|
|
200
|
+
const stat = fs.statSync(bundlePath);
|
|
201
|
+
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
202
|
+
const cached = this.bundleHashCache.get(cacheKey);
|
|
203
|
+
if (cached !== void 0) return cached;
|
|
204
|
+
const hash = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
205
|
+
this.bundleHashCache.set(cacheKey, hash);
|
|
206
|
+
return hash;
|
|
207
|
+
} catch {
|
|
208
|
+
return String(Math.floor(Date.now()));
|
|
209
|
+
}
|
|
196
210
|
}
|
|
197
211
|
resolveBundlePath(addonId, bundle) {
|
|
198
212
|
const paths = this.resolvedPaths;
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
//#region src/builtins/alerts/alerts.addon.ts
|
|
8
8
|
var CATEGORY_MAPPINGS = {
|
|
9
9
|
"addon.crashed": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg, et as BaseAddon, h as alertsCapability, mt as createEvent, n as AlertSchema, st as EventCategory } from "../../dist-
|
|
1
|
+
import { $ as errMsg, et as BaseAddon, h as alertsCapability, mt as createEvent, n as AlertSchema, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
//#region src/builtins/alerts/alerts.addon.ts
|
|
3
3
|
var CATEGORY_MAPPINGS = {
|
|
4
4
|
"addon.crashed": {
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_fs$1 = require_chunk.__toESM(node_fs, 1);
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { et as BaseAddon, st as EventCategory, v as backupCapability } from "../../dist-
|
|
1
|
+
import { et as BaseAddon, st as EventCategory, v as backupCapability } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import Kt from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as logDestinationCapability, et as BaseAddon } from "../../dist-
|
|
1
|
+
import { P as logDestinationCapability, et as BaseAddon } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let _camstack_types_node = require("@camstack/types/node");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg, C as enumerateItemArrayFields, D as getByPath, Q as validateExpressionSource, R as normalizeUnit, S as deviceStatusCapability, T as evaluateLinkExpression, Tt as sleep, W as setByPath, X as toExpressionValue, a as DeviceStatusSchema, at as DeviceRole, b as deviceManagerCapability, c as STREAM_PROFILE_META, et as BaseAddon, g as applyTransform, i as CAP_NAMES_WITH_STATUS, it as DeviceFeature, ot as DeviceType, st as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, ut as WELL_KNOWN_TAB_MAP, w as enumerateSchemaFields, x as deviceStateCapability, y as buildStreamParamsConfigSchema, yt as isDeviceConfigCap, z as parseStreamParamsFormPatch } from "../../dist-
|
|
1
|
+
import { $ as errMsg, C as enumerateItemArrayFields, D as getByPath, Q as validateExpressionSource, R as normalizeUnit, S as deviceStatusCapability, T as evaluateLinkExpression, Tt as sleep, W as setByPath, X as toExpressionValue, a as DeviceStatusSchema, at as DeviceRole, b as deviceManagerCapability, c as STREAM_PROFILE_META, et as BaseAddon, g as applyTransform, i as CAP_NAMES_WITH_STATUS, it as DeviceFeature, ot as DeviceType, st as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, ut as WELL_KNOWN_TAB_MAP, w as enumerateSchemaFields, x as deviceStateCapability, y as buildStreamParamsConfigSchema, yt as isDeviceConfigCap, z as parseStreamParamsFormPatch } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as logDestinationCapability, et as BaseAddon } from "../../dist-
|
|
1
|
+
import { P as logDestinationCapability, et as BaseAddon } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
9
9
|
let crypto$1 = require("crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as userManagementCapability, _ as authProviderCapability, d as UserRecordSchema, et as BaseAddon, l as ScopedTokenSchema, r as ApiKeyRecordSchema } from "../../dist-
|
|
1
|
+
import { Z as userManagementCapability, _ as authProviderCapability, d as UserRecordSchema, et as BaseAddon, l as ScopedTokenSchema, r as ApiKeyRecordSchema } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as crypto$1 from "node:crypto";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-fRVWwrkF.js");
|
|
4
4
|
let node_os = require("node:os");
|
|
5
5
|
node_os = require_chunk.__toESM(node_os);
|
|
6
6
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as localNetworkCapability, et as BaseAddon, st as EventCategory } from "../../dist-
|
|
1
|
+
import { N as localNetworkCapability, et as BaseAddon, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
4
4
|
/**
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_child_process = require("node:child_process");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as metricsProviderCapability, et as BaseAddon, mt as createEvent, st as EventCategory } from "../../dist-
|
|
1
|
+
import { I as metricsProviderCapability, et as BaseAddon, mt as createEvent, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import { execFile, execFileSync } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_child_process = require("node:child_process");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg, B as platformProbeCapability, U as scoreRuntimes, et as BaseAddon, gt as emitReadiness, st as EventCategory } from "../../dist-
|
|
1
|
+
import { $ as errMsg, B as platformProbeCapability, U as scoreRuntimes, et as BaseAddon, gt as emitReadiness, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { et as BaseAddon, st as EventCategory } from "../../dist-
|
|
1
|
+
import { et as BaseAddon, st as EventCategory } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/builtins/snapshot/snapshot.addon.ts
|
|
9
9
|
/** Default cache window for non-battery cams (seconds). 10s feels live. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg, K as snapshotCapability, L as nodePin, Y as streamQualityLabel, et as BaseAddon, it as DeviceFeature, ot as DeviceType } from "../../dist-
|
|
1
|
+
import { $ as errMsg, K as snapshotCapability, L as nodePin, Y as streamQualityLabel, et as BaseAddon, it as DeviceFeature, ot as DeviceType } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
//#region src/builtins/snapshot/snapshot.addon.ts
|
|
4
4
|
/** Default cache window for non-battery cams (seconds). 10s feels live. */
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as filesystemBrowseCapability, J as storageProviderCapability, et as BaseAddon } from "../../dist-
|
|
1
|
+
import { E as filesystemBrowseCapability, J as storageProviderCapability, et as BaseAddon } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let better_sqlite3 = require("better-sqlite3");
|
|
9
9
|
better_sqlite3 = require_chunk.__toESM(better_sqlite3);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg, G as settingsStoreCapability, dt as asJsonObject, et as BaseAddon, s as RUNTIME_DEFAULTS, xt as parseJsonUnknown } from "../../dist-
|
|
1
|
+
import { $ as errMsg, G as settingsStoreCapability, dt as asJsonObject, et as BaseAddon, s as RUNTIME_DEFAULTS, xt as parseJsonUnknown } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import Database from "better-sqlite3";
|
|
4
4
|
//#region src/builtins/sqlite-storage/sqlite-settings-backend.ts
|
|
@@ -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-fRVWwrkF.js");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_chunk.__toESM(node_path);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-
|
|
1
|
+
import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-CU3lb_Ys.mjs";
|
|
2
2
|
import * as path$1 from "node:path";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import { buildStorageLocationRegistry } from "@camstack/system";
|
|
@@ -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-fRVWwrkF.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 { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-
|
|
1
|
+
import { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-CU3lb_Ys.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-fRVWwrkF.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 { P as logDestinationCapability, et as BaseAddon } from "../../dist-
|
|
1
|
+
import { P as logDestinationCapability, et as BaseAddon } from "../../dist-CU3lb_Ys.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";
|