@camstack/system 1.2.29 → 1.2.31
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/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 +135 -92
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +135 -92
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts +12 -14
- package/dist/builtins/backup-orchestrator/schedule-store.d.ts +6 -6
- 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/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/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/filter-compiler.d.ts +61 -0
- package/dist/builtins/sqlite-storage/integration-registry.d.ts +3 -3
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +49 -8
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +117 -85
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +117 -85
- package/dist/builtins/storage-orchestrator/location-store.d.ts +17 -24
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +0 -6
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +132 -121
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +132 -121
- 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-CPmFYLqq.js → dist-CDv5YTHQ.js} +93 -1
- package/dist/{dist-B7hOpr5i.mjs → dist-CNmXITJ-.mjs} +93 -1
- package/dist/index.js +406 -224
- package/dist/index.mjs +406 -224
- package/dist/kernel/addon-installer.d.ts +38 -0
- package/package.json +1 -1
|
@@ -22,6 +22,25 @@ import { AddonManifest } from './addon-manifest.js';
|
|
|
22
22
|
* `addonsDir/<pkg>` → `packages/<pkg>`.
|
|
23
23
|
*/
|
|
24
24
|
export type InstallSource = 'npm' | 'local' | 'symlink';
|
|
25
|
+
/** The one bootstrap package the server closure carries itself. */
|
|
26
|
+
export declare const CLOSURE_PROVIDED_PACKAGE = "@camstack/system";
|
|
27
|
+
/**
|
|
28
|
+
* Should the bootstrap SKIP seeding `packageName` into /data/addons?
|
|
29
|
+
*
|
|
30
|
+
* True only for the package the closure provides, and only when it actually
|
|
31
|
+
* resolves. Both halves are load-bearing:
|
|
32
|
+
*
|
|
33
|
+
* - seeding a copy the closure already provides creates one that WINS over
|
|
34
|
+
* the closure and is never refreshed (bootstrap is seed-only, and
|
|
35
|
+
* `camstack deploy` of a framework package is rejected on an image hub), so
|
|
36
|
+
* the node runs first-boot builtins forever while reporting the new
|
|
37
|
+
* version;
|
|
38
|
+
* - skipping it when it does NOT resolve is how a fresh deployment was once
|
|
39
|
+
* made unbootable ("No addon provides required infrastructure capability
|
|
40
|
+
* storage-provider"). That is why the guard is resolvability rather than a
|
|
41
|
+
* blanket removal from the bootstrap list.
|
|
42
|
+
*/
|
|
43
|
+
export declare function shouldSkipClosureProvidedSeed(packageName: string, isResolvable: boolean): boolean;
|
|
25
44
|
export interface AddonInstallerConfig {
|
|
26
45
|
/** Directory where addons are stored (e.g., {dataDir}/addons) */
|
|
27
46
|
readonly addonsDir: string;
|
|
@@ -31,6 +50,13 @@ export interface AddonInstallerConfig {
|
|
|
31
50
|
readonly workspacePackagesDir?: string;
|
|
32
51
|
/** Install source mode. Default: auto-detect */
|
|
33
52
|
readonly installSource?: InstallSource;
|
|
53
|
+
/**
|
|
54
|
+
* Override for "does the running closure already provide this package?".
|
|
55
|
+
* Production leaves it unset (real `require.resolve`); a spec sets it to
|
|
56
|
+
* reach the branch that still seeds `@camstack/system`, which is otherwise
|
|
57
|
+
* unreachable in a process where that package always resolves.
|
|
58
|
+
*/
|
|
59
|
+
readonly isPackageResolvable?: (packageName: string) => boolean;
|
|
34
60
|
}
|
|
35
61
|
export type { InstalledPackage };
|
|
36
62
|
/** Outcome of {@link AddonInstaller.sweepBackups}. Absolute paths. */
|
|
@@ -46,6 +72,7 @@ export declare class AddonInstaller {
|
|
|
46
72
|
readonly workspaceDir: string | undefined;
|
|
47
73
|
readonly installSource: InstallSource;
|
|
48
74
|
private readonly logger;
|
|
75
|
+
private readonly isPackageResolvable?;
|
|
49
76
|
/**
|
|
50
77
|
* Central manifest of installed addons. Tracks version + source +
|
|
51
78
|
* timestamps + last-backup pointer per package, written atomically
|
|
@@ -71,6 +98,17 @@ export declare class AddonInstaller {
|
|
|
71
98
|
* hardcoded lists — see design spec
|
|
72
99
|
* docs/superpowers/specs/2026-05-20-docker-install-from-npm-design.md.
|
|
73
100
|
*/
|
|
101
|
+
/**
|
|
102
|
+
* Is `packageName` reachable through normal resolution — i.e. does the
|
|
103
|
+
* running closure already provide it?
|
|
104
|
+
*
|
|
105
|
+
* Overridable via `AddonInstallerConfig.isPackageResolvable` so a spec can
|
|
106
|
+
* exercise BOTH sides. That matters more than it looks: the branch that
|
|
107
|
+
* still seeds is the one protecting a fresh deployment from an unbootable
|
|
108
|
+
* node, and it is unreachable in a test process where `@camstack/system`
|
|
109
|
+
* always resolves.
|
|
110
|
+
*/
|
|
111
|
+
private isResolvableFromClosure;
|
|
74
112
|
private static deriveBootstrapList;
|
|
75
113
|
/**
|
|
76
114
|
* Bootstrap packages installed on first boot — derived from the
|