@camstack/server 1.2.730 → 1.2.731
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/CHANGELOG.md +8 -0
- package/dist/api/core/server-management.provider.js +10 -3
- package/dist/api/trpc/generated-cap-mounts.js +2 -1
- package/dist/api/trpc/generated-cap-routers.js +1801 -1777
- package/dist/boot/boot-config.js +2 -46
- package/dist/launch-args.js +72 -34
- package/dist/main.js +2 -1
- package/package.json +17 -17
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-DZq8uf8L.mjs → agent-https-AJPmB73W.mjs} +1 -1
- package/system/dist/{agent-https-C8Gz2jjS.js → agent-https-CLJhq0GZ.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-hokiaS3J.js → composition-sources-BNBlJAgu.js} +1 -1
- package/system/dist/{composition-sources-4M_NnTnV.mjs → composition-sources-D-S2hhdw.mjs} +1 -1
- package/system/dist/{constants-B0L3suFC.js → constants-CKwdQTnw.js} +1 -1
- package/system/dist/{constants-DTVU00LZ.mjs → constants-DmithOex.mjs} +1 -1
- package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
- package/system/dist/{custom-action-registry-oHl1xltx.mjs → custom-action-registry-BIJZBObd.mjs} +37 -37
- package/system/dist/{device-ca-C_y2GrU5.mjs → device-ca-D-Cvxobt.mjs} +1 -1
- package/system/dist/{device-ca-DaTT1Y9v.js → device-ca-TbdQfW4d.js} +1 -1
- package/system/dist/{dist-B3S0ruBa.js → dist-dQKZfa3-.js} +174 -15
- package/system/dist/{dist-9lvgpcnm.mjs → dist-yrk6fm65.mjs} +174 -15
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-xgLfZIVx.mjs → hub-mdns-ciao-Cae5VWUc.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dkw38L-g.js → hub-mdns-ciao-DP3_GNZw.js} +2 -2
- package/system/dist/index.d.ts +1 -1
- package/system/dist/index.js +19 -9
- package/system/dist/index.mjs +230 -221
- package/system/dist/kernel/heap-watch.d.ts +7 -2
- package/system/dist/{restore-archive-cxnuWxQM.mjs → restore-archive-BJ5gxMvf.mjs} +94 -94
- package/system/dist/{restore-archive-orP6eHBd.js → restore-archive-X9c_wEBY.js} +1 -1
- package/system/dist/{retention-Me4u6zMp.mjs → retention-DBrdAv12.mjs} +1 -1
- package/system/dist/{retention-CB2cyW9k.js → retention-DRT2wUyB.js} +1 -1
- package/system/dist/{wal-maintenance-De7Ifvph.mjs → wal-maintenance-Bi4yImEY.mjs} +0 -0
- package/system/dist/{wal-maintenance-_PXj626-.js → wal-maintenance-hsgNGrjh.js} +0 -0
- package/system/package.json +4 -1
package/dist/boot/boot-config.js
CHANGED
|
@@ -38,10 +38,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
};
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.retiredCorsSources = retiredCorsSources;
|
|
42
41
|
exports.retiredTlsEnabledSources = retiredTlsEnabledSources;
|
|
43
42
|
exports.ignoredTlsCertSources = ignoredTlsCertSources;
|
|
44
|
-
exports.retiredSecretSources = retiredSecretSources;
|
|
45
43
|
exports.loadBootstrapConfig = loadBootstrapConfig;
|
|
46
44
|
exports.setupInfra = setupInfra;
|
|
47
45
|
const os = __importStar(require("node:os"));
|
|
@@ -52,27 +50,6 @@ const storage_location_manager_1 = require("../core/storage/storage-location-man
|
|
|
52
50
|
// ---------------------------------------------------------------------------
|
|
53
51
|
// Constants
|
|
54
52
|
// ---------------------------------------------------------------------------
|
|
55
|
-
/**
|
|
56
|
-
* Env variables that once carried a secret into the hub. Ignored since D797
|
|
57
|
-
* (`CAMSTACK_CLUSTER_SECRET`: the secret itself was removed by D857) —
|
|
58
|
-
* still named so a container template that sets them is told, not silently
|
|
59
|
-
* obeyed or silently dropped. Only their PRESENCE is read, never the value.
|
|
60
|
-
*/
|
|
61
|
-
const RETIRED_SECRET_ENV = [
|
|
62
|
-
'CAMSTACK_JWT_SECRET',
|
|
63
|
-
'CAMSTACK_ADMIN_USER',
|
|
64
|
-
'CAMSTACK_ADMIN_PASS',
|
|
65
|
-
'CAMSTACK_CLUSTER_SECRET',
|
|
66
|
-
'CAMSTACK_SECRET_KEY',
|
|
67
|
-
'HF_TOKEN',
|
|
68
|
-
'HUGGING_FACE_HUB_TOKEN',
|
|
69
|
-
];
|
|
70
|
-
/**
|
|
71
|
-
* The extra browser origins moved to the `auth.corsOrigins` setting (D707):
|
|
72
|
-
* edited in Identity → Authentication, read live. The former env source is
|
|
73
|
-
* ignored, and named at boot so a stale value is told, never silently honoured.
|
|
74
|
-
*/
|
|
75
|
-
const RETIRED_CORS_ENV = 'CAMSTACK_CORS_ORIGINS';
|
|
76
53
|
/**
|
|
77
54
|
* HTTPS on or off is the `tlsEnabled` setting in Network → Local access, read
|
|
78
55
|
* at boot from the `tls/enabled` marker the setting writes. The old variable
|
|
@@ -95,10 +72,6 @@ function setEnvNames(env, names) {
|
|
|
95
72
|
return value !== undefined && value !== '';
|
|
96
73
|
});
|
|
97
74
|
}
|
|
98
|
-
/** The retired CORS variable, when set (name only, never the value). */
|
|
99
|
-
function retiredCorsSources(env) {
|
|
100
|
-
return setEnvNames(env, [RETIRED_CORS_ENV]);
|
|
101
|
-
}
|
|
102
75
|
/** The retired HTTPS toggle variable, when set (name only). */
|
|
103
76
|
function retiredTlsEnabledSources(env) {
|
|
104
77
|
return setEnvNames(env, [RETIRED_TLS_ENABLED_ENV]);
|
|
@@ -107,34 +80,17 @@ function retiredTlsEnabledSources(env) {
|
|
|
107
80
|
function ignoredTlsCertSources(env) {
|
|
108
81
|
return setEnvNames(env, IGNORED_TLS_CERT_ENV);
|
|
109
82
|
}
|
|
110
|
-
/** Every retired secret variable set. Names only — a value is never read into a log. */
|
|
111
|
-
function retiredSecretSources(env) {
|
|
112
|
-
return setEnvNames(env, RETIRED_SECRET_ENV);
|
|
113
|
-
}
|
|
114
83
|
// ---------------------------------------------------------------------------
|
|
115
84
|
// loadBootstrapConfig
|
|
116
85
|
// ---------------------------------------------------------------------------
|
|
117
86
|
/**
|
|
118
87
|
* The kernel's bootstrap loader (config.yaml + `CAMSTACK_PORT` / `HOST` /
|
|
119
|
-
* `DATA`) — the ONE loader — plus a boot warning for
|
|
120
|
-
*
|
|
88
|
+
* `DATA`) — the ONE loader — plus a boot warning for the retired HTTPS
|
|
89
|
+
* variables still set, so a container template that carries one is told.
|
|
121
90
|
*/
|
|
122
91
|
function loadBootstrapConfig(configPath) {
|
|
123
92
|
const config = (0, system_1.loadBootstrapConfig)(configPath, { warnRetiredKeys: true });
|
|
124
93
|
const env = process.env;
|
|
125
|
-
const retired = retiredSecretSources(env);
|
|
126
|
-
if (retired.length > 0) {
|
|
127
|
-
console.warn(`[Phase1] WARN ${retired.join(', ')} ignored — no secret is read from the environment or ` +
|
|
128
|
-
'config.yaml any more (D797). The session signing key lives in the ' +
|
|
129
|
-
'keychain; a fresh hub seeds admin / changeme. ' +
|
|
130
|
-
'Remove these entries — after importing their values with scripts/ops/keychain-migrate-hub.mjs.');
|
|
131
|
-
}
|
|
132
|
-
const retiredCors = retiredCorsSources(env);
|
|
133
|
-
if (retiredCors.length > 0) {
|
|
134
|
-
console.warn(`[Phase1] WARN ${retiredCors.join(', ')} ignored — the allowed browser origins are set ` +
|
|
135
|
-
'only in the admin UI (Identity → Authentication → Allowed browser origins, D707). ' +
|
|
136
|
-
'Re-enter them there and remove the entry.');
|
|
137
|
-
}
|
|
138
94
|
const retiredTls = retiredTlsEnabledSources(env);
|
|
139
95
|
if (retiredTls.length > 0) {
|
|
140
96
|
console.warn(`[Phase1] WARN ${retiredTls.join(', ')} ignored — HTTPS on or off is the "Serve HTTPS" ` +
|
package/dist/launch-args.js
CHANGED
|
@@ -33,12 +33,16 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ALLOCATOR_ENV_DEFAULTS = exports.OVERRIDE_MAX_MB = exports.OVERRIDE_MIN_MB = exports.AGENT_HEAP_CAP_MB = exports.AGENT_HEAP_FLOOR_MB = exports.HEAP_CEILING_SOURCE_ENV = exports.LAUNCH_OVERRIDES_FILE = void 0;
|
|
36
|
+
exports.ALLOCATOR_ENV_DEFAULTS = exports.OVERRIDE_MAX_MB = exports.OVERRIDE_MIN_MB = exports.AGENT_HEAP_CAP_MB = exports.AGENT_HEAP_FLOOR_MB = exports.RETIRED_HEAP_ENV = exports.HEAP_CEILING_SOURCE_ENV = exports.LAUNCH_OVERRIDES_FILE = void 0;
|
|
37
37
|
exports.computedAgentHeapMb = computedAgentHeapMb;
|
|
38
38
|
exports.planLaunch = planLaunch;
|
|
39
39
|
exports.renderLaunchPlan = renderLaunchPlan;
|
|
40
|
+
exports.launchDataDir = launchDataDir;
|
|
40
41
|
exports.overridesPath = overridesPath;
|
|
42
|
+
exports.readLaunchOverrides = readLaunchOverrides;
|
|
41
43
|
exports.readHeapOverrideMb = readHeapOverrideMb;
|
|
44
|
+
exports.readRssBudgetOverrideMb = readRssBudgetOverrideMb;
|
|
45
|
+
exports.writeLaunchOverrides = writeLaunchOverrides;
|
|
42
46
|
exports.writeHeapOverrideMb = writeHeapOverrideMb;
|
|
43
47
|
exports.readCgroupLimitBytes = readCgroupLimitBytes;
|
|
44
48
|
exports.runLaunchCli = runLaunchCli;
|
|
@@ -58,7 +62,7 @@ exports.runLaunchCli = runLaunchCli;
|
|
|
58
62
|
*
|
|
59
63
|
* arg --max-old-space-size=2048 an extra node argv entry (flags only)
|
|
60
64
|
* env NAME=value an environment variable to export
|
|
61
|
-
* source override|
|
|
65
|
+
* source override|computed|v8-default
|
|
62
66
|
* warn <free text> something the launcher should log
|
|
63
67
|
*
|
|
64
68
|
* Nothing else is printed. A launcher treats any line it does not recognise as
|
|
@@ -68,8 +72,10 @@ exports.runLaunchCli = runLaunchCli;
|
|
|
68
72
|
*
|
|
69
73
|
* - `override` — `<dataDir>/launch-overrides.json` `{ "heapMb": N }`, set from
|
|
70
74
|
* the hub (`serverManagement.setLaunchOverrides`) and persisted on the node.
|
|
71
|
-
*
|
|
72
|
-
* (
|
|
75
|
+
* The same file carries `rssBudgetMb`, hub-main's RSS budget, read by the
|
|
76
|
+
* running hub (not by this launcher) and winning over its env variable.
|
|
77
|
+
* - `CAMSTACK_HUB_HEAP_MB` / `CAMSTACK_AGENT_HEAP_MB` are RETIRED: never
|
|
78
|
+
* read for a value, named in a `warn` line when set.
|
|
73
79
|
* - `computed` — AGENT only: clamp(min(RAM, cgroup limit) / 4, 1536, 4096) MB.
|
|
74
80
|
* V8's own quarter-of-RAM rule with a floor above every measured agent RSS
|
|
75
81
|
* (0.8-1.4 GB), so it bounds a runaway and never a healthy root.
|
|
@@ -85,6 +91,8 @@ const path = __importStar(require("node:path"));
|
|
|
85
91
|
exports.LAUNCH_OVERRIDES_FILE = 'launch-overrides.json';
|
|
86
92
|
/** Env var carrying {@link CeilingSource} to the node so its heartbeat can say who chose. */
|
|
87
93
|
exports.HEAP_CEILING_SOURCE_ENV = 'CAMSTACK_HEAP_CEILING_SOURCE';
|
|
94
|
+
/** The retired heap variables: ignored, and named at launch when set. */
|
|
95
|
+
exports.RETIRED_HEAP_ENV = ['CAMSTACK_HUB_HEAP_MB', 'CAMSTACK_AGENT_HEAP_MB'];
|
|
88
96
|
exports.AGENT_HEAP_FLOOR_MB = 1536;
|
|
89
97
|
exports.AGENT_HEAP_CAP_MB = 4096;
|
|
90
98
|
/** An override outside this range is ignored with a warning, never applied. */
|
|
@@ -119,16 +127,9 @@ function planLaunch(input) {
|
|
|
119
127
|
const warnings = [];
|
|
120
128
|
let source = input.role === 'agent' ? 'computed' : 'v8-default';
|
|
121
129
|
let heapMb = input.role === 'agent' ? computedAgentHeapMb(input.host) : null;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (validMb(mb)) {
|
|
126
|
-
source = 'legacy-env';
|
|
127
|
-
heapMb = mb;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
warnings.push(`ignoring the legacy heap env "${legacy}": not an integer in ${exports.OVERRIDE_MIN_MB}-${exports.OVERRIDE_MAX_MB} MB`);
|
|
131
|
-
}
|
|
130
|
+
if (input.legacyEnvNames.length > 0) {
|
|
131
|
+
warnings.push(`${input.legacyEnvNames.join(', ')} ignored — the heap ceiling is set per node in ` +
|
|
132
|
+
'Cluster → node → Launch settings (applies after a restart). Remove the entry.');
|
|
132
133
|
}
|
|
133
134
|
if (input.overrideMb !== null) {
|
|
134
135
|
if (validMb(input.overrideMb)) {
|
|
@@ -168,44 +169,79 @@ const realFs = {
|
|
|
168
169
|
}
|
|
169
170
|
},
|
|
170
171
|
};
|
|
172
|
+
/** The data dir the launcher (and the hub's own boot) read the overrides from. */
|
|
173
|
+
function launchDataDir(env) {
|
|
174
|
+
return path.resolve(env['CAMSTACK_DATA'] ?? 'camstack-data');
|
|
175
|
+
}
|
|
171
176
|
function overridesPath(dataDir) {
|
|
172
177
|
return path.join(dataDir, exports.LAUNCH_OVERRIDES_FILE);
|
|
173
178
|
}
|
|
174
|
-
|
|
175
|
-
|
|
179
|
+
function numberField(parsed, key) {
|
|
180
|
+
if (!(key in parsed))
|
|
181
|
+
return null;
|
|
182
|
+
const value = Object.getOwnPropertyDescriptor(parsed, key)?.value;
|
|
183
|
+
return typeof value === 'number' ? value : null;
|
|
184
|
+
}
|
|
185
|
+
/** Both persisted overrides; a field is `null` when absent, unreadable or not a number. */
|
|
186
|
+
function readLaunchOverrides(dataDir, io = realFs) {
|
|
187
|
+
const none = { heapMb: null, rssBudgetMb: null };
|
|
176
188
|
const raw = io.readFile(overridesPath(dataDir));
|
|
177
189
|
if (raw === null)
|
|
178
|
-
return
|
|
190
|
+
return none;
|
|
179
191
|
try {
|
|
180
192
|
const parsed = JSON.parse(raw);
|
|
181
|
-
if (typeof parsed !== 'object' || parsed === null
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
194
|
+
return none;
|
|
195
|
+
return {
|
|
196
|
+
heapMb: numberField(parsed, 'heapMb'),
|
|
197
|
+
rssBudgetMb: numberField(parsed, 'rssBudgetMb'),
|
|
198
|
+
};
|
|
185
199
|
}
|
|
186
200
|
catch {
|
|
187
|
-
return
|
|
201
|
+
return none;
|
|
188
202
|
}
|
|
189
203
|
}
|
|
204
|
+
/** The persisted heap override in MB; `null` when absent, unreadable or not a number. */
|
|
205
|
+
function readHeapOverrideMb(dataDir, io = realFs) {
|
|
206
|
+
return readLaunchOverrides(dataDir, io).heapMb;
|
|
207
|
+
}
|
|
208
|
+
/** The persisted hub-main RSS budget override in MB; `null` when none. */
|
|
209
|
+
function readRssBudgetOverrideMb(dataDir, io = realFs) {
|
|
210
|
+
return readLaunchOverrides(dataDir, io).rssBudgetMb;
|
|
211
|
+
}
|
|
190
212
|
/**
|
|
191
|
-
* Persist (
|
|
192
|
-
* range the
|
|
193
|
-
* here instead of silently doing nothing.
|
|
213
|
+
* Persist the overrides (a `null` field clears it; both `null` removes the file).
|
|
214
|
+
* Each value is validated against the range the readers enforce, so a value the
|
|
215
|
+
* next launch would ignore is refused here instead of silently doing nothing.
|
|
216
|
+
* Written atomically (temp + rename).
|
|
194
217
|
*/
|
|
195
|
-
function
|
|
218
|
+
function writeLaunchOverrides(dataDir, next) {
|
|
196
219
|
const file = overridesPath(dataDir);
|
|
197
|
-
|
|
220
|
+
for (const [name, value] of [
|
|
221
|
+
['heap override', next.heapMb],
|
|
222
|
+
['RSS budget override', next.rssBudgetMb],
|
|
223
|
+
]) {
|
|
224
|
+
if (value !== null && !validMb(value)) {
|
|
225
|
+
throw new Error(`${name} must be an integer in ${exports.OVERRIDE_MIN_MB}-${exports.OVERRIDE_MAX_MB} MB, got ${value}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (next.heapMb === null && next.rssBudgetMb === null) {
|
|
198
229
|
fs.rmSync(file, { force: true });
|
|
199
230
|
return;
|
|
200
231
|
}
|
|
201
|
-
if (!validMb(heapMb)) {
|
|
202
|
-
throw new Error(`heap override must be an integer in ${exports.OVERRIDE_MIN_MB}-${exports.OVERRIDE_MAX_MB} MB, got ${heapMb}`);
|
|
203
|
-
}
|
|
204
232
|
fs.mkdirSync(dataDir, { recursive: true });
|
|
233
|
+
const body = {
|
|
234
|
+
...(next.heapMb === null ? {} : { heapMb: next.heapMb }),
|
|
235
|
+
...(next.rssBudgetMb === null ? {} : { rssBudgetMb: next.rssBudgetMb }),
|
|
236
|
+
};
|
|
205
237
|
const tmp = `${file}.${process.pid}.tmp`;
|
|
206
|
-
fs.writeFileSync(tmp, `${JSON.stringify(
|
|
238
|
+
fs.writeFileSync(tmp, `${JSON.stringify(body)}\n`, { mode: 0o600 });
|
|
207
239
|
fs.renameSync(tmp, file);
|
|
208
240
|
}
|
|
241
|
+
/** Persist (or, with `null`, clear) the heap override, keeping the RSS budget. */
|
|
242
|
+
function writeHeapOverrideMb(dataDir, heapMb) {
|
|
243
|
+
writeLaunchOverrides(dataDir, { heapMb, rssBudgetMb: readRssBudgetOverrideMb(dataDir) });
|
|
244
|
+
}
|
|
209
245
|
function readCgroupLimitBytes(io = realFs, files) {
|
|
210
246
|
for (const file of files ?? [
|
|
211
247
|
'/sys/fs/cgroup/memory.max',
|
|
@@ -230,8 +266,7 @@ function runLaunchCli(argv, deps) {
|
|
|
230
266
|
const role = parseRole(argv);
|
|
231
267
|
if (role === null)
|
|
232
268
|
return { stdout: '', code: 2 };
|
|
233
|
-
const dataDir =
|
|
234
|
-
const legacyName = role === 'hub' ? 'CAMSTACK_HUB_HEAP_MB' : 'CAMSTACK_AGENT_HEAP_MB';
|
|
269
|
+
const dataDir = launchDataDir(deps.env);
|
|
235
270
|
const plan = planLaunch({
|
|
236
271
|
role,
|
|
237
272
|
host: {
|
|
@@ -239,7 +274,10 @@ function runLaunchCli(argv, deps) {
|
|
|
239
274
|
cgroupLimitBytes: readCgroupLimitBytes(deps.io, deps.cgroupFiles),
|
|
240
275
|
},
|
|
241
276
|
overrideMb: readHeapOverrideMb(dataDir, deps.io),
|
|
242
|
-
|
|
277
|
+
legacyEnvNames: exports.RETIRED_HEAP_ENV.filter((name) => {
|
|
278
|
+
const value = deps.env[name];
|
|
279
|
+
return value !== undefined && value !== '';
|
|
280
|
+
}),
|
|
243
281
|
allocatorEnv: argv.includes('--allocator-env'),
|
|
244
282
|
});
|
|
245
283
|
return { stdout: renderLaunchPlan(plan), code: 0 };
|
package/dist/main.js
CHANGED
|
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const launch_args_js_1 = require("./launch-args.js");
|
|
40
41
|
const lazy_ui_serving_js_1 = require("./ui-serving/lazy-ui-serving.js");
|
|
41
42
|
const node_child_process_1 = require("node:child_process");
|
|
42
43
|
const fs = __importStar(require("node:fs"));
|
|
@@ -330,7 +331,7 @@ async function bootstrap() {
|
|
|
330
331
|
// the reader reports `undefined` and the line carries no fan-out fields at all
|
|
331
332
|
// — a plane that does not exist yet must not be reported as a silent one.
|
|
332
333
|
let moleculerForEventPlane = null;
|
|
333
|
-
(0, system_1.startHeapWatch)(system_1.HUB_MAIN_HEAP_WATCH_LABEL, heapWatchSink.sink, undefined, heapReclaim, undefined, undefined, true, (0, system_1.hubMainRssBudget)(), {
|
|
334
|
+
(0, system_1.startHeapWatch)(system_1.HUB_MAIN_HEAP_WATCH_LABEL, heapWatchSink.sink, undefined, heapReclaim, undefined, undefined, true, (0, system_1.hubMainRssBudget)(process.env, (0, launch_args_js_1.readRssBudgetOverrideMb)((0, launch_args_js_1.launchDataDir)(process.env))), {
|
|
334
335
|
eventPlane: (0, system_1.createEventPlaneReader)({
|
|
335
336
|
registry: () => moleculerForEventPlane?.childRegistry ?? null,
|
|
336
337
|
crossNodeStats: () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.731",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
71
|
-
"@camstack/addon-
|
|
72
|
-
"@camstack/addon-
|
|
73
|
-
"@camstack/addon-export-
|
|
74
|
-
"@camstack/addon-import-alexa": ">=0.2.
|
|
75
|
-
"@camstack/addon-model-studio": ">=1.1.
|
|
76
|
-
"@camstack/addon-osd-manager": ">=0.1.
|
|
77
|
-
"@camstack/addon-provider-homeassistant": ">=1.2.
|
|
78
|
-
"@camstack/addon-provider-homematic": ">=1.2.
|
|
79
|
-
"@camstack/addon-training": ">=0.1.
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.551",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.312",
|
|
71
|
+
"@camstack/addon-ai": ">=0.4.176",
|
|
72
|
+
"@camstack/addon-benchmark": ">=1.2.310",
|
|
73
|
+
"@camstack/addon-export-google": ">=0.1.121",
|
|
74
|
+
"@camstack/addon-import-alexa": ">=0.2.178",
|
|
75
|
+
"@camstack/addon-model-studio": ">=1.1.341",
|
|
76
|
+
"@camstack/addon-osd-manager": ">=0.1.314",
|
|
77
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.647",
|
|
78
|
+
"@camstack/addon-provider-homematic": ">=1.2.180",
|
|
79
|
+
"@camstack/addon-training": ">=0.1.127"
|
|
80
80
|
},
|
|
81
81
|
"wrapper": {
|
|
82
82
|
"desktop": ">=0.0.1",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
89
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
88
|
+
"@camstack/addon-admin-ui": "1.2.551",
|
|
89
|
+
"@camstack/addon-agent-ui": "1.2.312",
|
|
90
90
|
"@camstack/addon-auth": "1.2.175",
|
|
91
|
-
"@camstack/addon-benchmark": "1.2.
|
|
91
|
+
"@camstack/addon-benchmark": "1.2.310",
|
|
92
92
|
"@camstack/addon-decoder-nodeav": "1.2.145",
|
|
93
93
|
"@camstack/addon-notifiers": "1.2.626",
|
|
94
94
|
"@camstack/addon-pipeline": "1.2.637",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@camstack/addon-post-analysis": "1.2.662",
|
|
97
97
|
"@camstack/develop": "0.1.44",
|
|
98
98
|
"@camstack/sdk": "1.2.155",
|
|
99
|
-
"@camstack/types": "1.2.
|
|
100
|
-
"@camstack/ui-library": "1.2.
|
|
99
|
+
"@camstack/types": "1.2.471",
|
|
100
|
+
"@camstack/ui-library": "1.2.370",
|
|
101
101
|
"@fastify/compress": "^9.0.0",
|
|
102
102
|
"@fastify/cookie": "^11.0.2",
|
|
103
103
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
1
|
+
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-BIJZBObd.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { rs as defineRecordKinds } from "./dist-
|
|
1
|
+
import { rs as defineRecordKinds } from "./dist-yrk6fm65.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-dQKZfa3-.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Us as errMsg, Ws as EventCategory, rn as addonPagesCapability, uo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Us as errMsg, Ws as EventCategory, rn as addonPagesCapability, uo as BaseAddon } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import * as fs
|
|
5
|
+
import * as fs from "node:fs";
|
|
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) {
|
|
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
|
211
211
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
212
212
|
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
213
213
|
try {
|
|
214
|
-
const stat = fs
|
|
214
|
+
const stat = fs.statSync(bundlePath);
|
|
215
215
|
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
216
216
|
let v = this.bundleHashCache.get(cacheKey);
|
|
217
217
|
if (v === void 0) {
|
|
218
|
-
v = createHash("sha1").update(fs
|
|
218
|
+
v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
219
219
|
this.bundleHashCache.set(cacheKey, v);
|
|
220
220
|
}
|
|
221
221
|
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Us as errMsg, Ws as EventCategory, an as addonWidgetsCapability, uo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Us as errMsg, Ws as EventCategory, an as addonWidgetsCapability, uo as BaseAddon } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import * as fs
|
|
5
|
+
import * as fs from "node:fs";
|
|
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
|
|
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
204
204
|
if (entryPath === null) return String(Math.floor(Date.now()));
|
|
205
205
|
try {
|
|
206
206
|
const dir = path$1.dirname(entryPath);
|
|
207
|
-
const files = fs
|
|
207
|
+
const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
208
208
|
const cacheKey = `${dir}#${files.map((f) => {
|
|
209
|
-
const s = fs
|
|
209
|
+
const s = fs.statSync(path$1.join(dir, f));
|
|
210
210
|
return `${f}:${s.size}:${s.mtimeMs}`;
|
|
211
211
|
}).join("|")}`;
|
|
212
212
|
const cached = this.bundleHashCache.get(cacheKey);
|
|
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
214
214
|
const hash = createHash("sha1");
|
|
215
215
|
for (const f of files) {
|
|
216
216
|
hash.update(f);
|
|
217
|
-
hash.update(fs
|
|
217
|
+
hash.update(fs.readFileSync(path$1.join(dir, f)));
|
|
218
218
|
}
|
|
219
219
|
const digest = hash.digest("hex").slice(0, 12);
|
|
220
220
|
this.bundleHashCache.set(cacheKey, digest);
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dr as isAlertEpisodeOpen, Or as isAlertEpisodeSeverity, Us as errMsg, Ws as EventCategory, cn as alertsCapability, d as AlertSchema, es as createEvent, on as alertEpisodeId, rs as defineRecordKinds, sn as alertEpisodePayload, uo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Dr as isAlertEpisodeOpen, Or as isAlertEpisodeSeverity, Us as errMsg, Ws as EventCategory, cn as alertsCapability, d as AlertSchema, es as createEvent, on as alertEpisodeId, rs as defineRecordKinds, sn as alertEpisodePayload, uo as BaseAddon } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
4
4
|
/**
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Oi as ptzAutotrackCapability, Us as errMsg, Ws as EventCategory, et as FIRST_LEVEL_MACRO_CLASSES, fs as isEvent, pn as bareAddonId, uo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Oi as ptzAutotrackCapability, Us as errMsg, Ws as EventCategory, et as FIRST_LEVEL_MACRO_CLASSES, fs as isEvent, pn as bareAddonId, uo as BaseAddon } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,9 +3,9 @@ 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-dQKZfa3-.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_restore_archive = require("../../restore-archive-
|
|
8
|
+
const require_restore_archive = require("../../restore-archive-X9c_wEBY.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $r as mayWriteToLocation, Fs as toNodeId, Ws as EventCategory, da as storageOccupancyCapability, fn as backupCapability, uo as BaseAddon, xs as nodePin } from "../../dist-
|
|
1
|
+
import { $r as mayWriteToLocation, Fs as toNodeId, Ws as EventCategory, da as storageOccupancyCapability, fn as backupCapability, uo as BaseAddon, xs as nodePin } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-
|
|
3
|
+
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-BJ5gxMvf.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
|
-
import * as fs
|
|
7
|
+
import * as fs from "node:fs";
|
|
8
8
|
//#region src/builtins/backup-orchestrator/backup-databases.ts
|
|
9
9
|
/** Stable id of the seeded weekly schedule. */
|
|
10
10
|
var WEEKLY_SCHEDULE_ID = "weekly-events-history";
|
|
@@ -1018,7 +1018,7 @@ async function downloadArchiveToCache(input) {
|
|
|
1018
1018
|
location: input.locationId,
|
|
1019
1019
|
relativePath: input.filename
|
|
1020
1020
|
});
|
|
1021
|
-
const writeStream = fs
|
|
1021
|
+
const writeStream = fs.createWriteStream(input.cachePath);
|
|
1022
1022
|
let offset = 0;
|
|
1023
1023
|
try {
|
|
1024
1024
|
while (offset < sizeBytes) {
|
|
@@ -2502,7 +2502,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2502
2502
|
});
|
|
2503
2503
|
try {
|
|
2504
2504
|
let offset = 0;
|
|
2505
|
-
const stream = fs
|
|
2505
|
+
const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2506
2506
|
for await (const rawChunk of stream) {
|
|
2507
2507
|
if (input.signal?.aborted) {
|
|
2508
2508
|
stream.destroy();
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as CalendarPreferencesSchema, rs as defineRecordKinds, uo as BaseAddon, xn as calendarsCapability } from "../../dist-
|
|
1
|
+
import { T as CalendarPreferencesSchema, rs as defineRecordKinds, uo as BaseAddon, xn as calendarsCapability } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ba as buildFfmpegArgs, Bs as DeviceFeature, Gn as declarationOwnerNodeId, Hs as DeviceType, K as DeclaredDevices, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, Sn as cameraGridLayoutCapability, Us as errMsg, Ws as EventCategory, es as createEvent, m as BaseDevice, oa as snapshotCapability, oi as motionCapability, pa as streamCatalogCapability, ti as memoizePinnedFfmpeg, uo as BaseAddon, us as hydrateSchema, xt as MOTION_CLOSE_AFTER_MS } from "../../dist-
|
|
1
|
+
import { Ba as buildFfmpegArgs, Bs as DeviceFeature, Gn as declarationOwnerNodeId, Hs as DeviceType, K as DeclaredDevices, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, Sn as cameraGridLayoutCapability, Us as errMsg, Ws as EventCategory, es as createEvent, m as BaseDevice, oa as snapshotCapability, oi as motionCapability, pa as streamCatalogCapability, ti as memoizePinnedFfmpeg, uo as BaseAddon, us as hydrateSchema, xt as MOTION_CLOSE_AFTER_MS } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_retention = require("../../retention-
|
|
6
|
+
const require_dist = require("../../dist-dQKZfa3-.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-BNBlJAgu.js");
|
|
8
|
+
const require_retention = require("../../retention-DRT2wUyB.js");
|
|
9
9
|
let zod = require("zod");
|
|
10
10
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
11
11
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $a as integrateReading, An as colorCapability, Cr as groupCommandsCapability, Fa as DEFAULT_HISTORY_RETENTION, Ga as compositionItemFieldPath, Ha as composedDeviceRef, Hs as DeviceType, Ia as HISTORY_FAST_MS, Ja as createStatefulExpressionMemory, K as DeclaredDevices, Ka as compositionSliceKey, Ki as runFanOut, Kn as declaredSeriesKind, La as HISTORY_SLOW_MS, Mn as compositionFieldKey, Na as COMPOSER_ADDON_ID, On as climateControlCapability, Pa as DAY_MS, Ra as HOUR_MS, Rr as kebabToCamel, Ta as valveCapability, Ua as composedDeviceStableId, Ui as resolveMutate, Us as errMsg, Va as cloneStatefulExpressionMemory, Wa as compositionFeatureEnabled, Ws as EventCategory, Xa as evaluateDerivative, Ya as disarmRoseMemory, Za as evaluateStatistic, _n as buildCapabilityLookup, _r as featureForwards, ao as planResetTier, b as COMPOSED_ITEM_FIXED_FIELDS, co as toExpressionValue, cr as evaluateCompositionField, dt as HvacModeSchema, ea as sharedActuatorFeatures, ei as mediaPlayerCapability, eo as isForwardInputRef, es as createEvent, fr as expressionContainsBuiltinCall, ga as switchCapability, hn as brightnessCapability, hr as fanOutTargets, io as openStatistic, jn as composerCapability, m as BaseDevice, mr as fanControlCapability, ms as isReadingQuantity, n as ACTUATOR_METHODS, na as sharedColorModes, ni as methodRefusal, no as nextLocalMidnight, nt as FanDirectionSchema, o as ALL_CAPABILITY_DEFINITIONS, oi as motionCapability, oo as planStatisticTier, ot as GroupCommandResultSchema, qa as compositionSourceKey, qr as lockControlCapability, r as ACTUATOR_TEMPLATE_IDS, ro as openReset, so as statisticCadenceMs, ta as sharedActuatorMethods, to as isHistoryHelper, uo as BaseAddon, vi as parseColorInput, wr as groupTemplate, xi as planComposition, za as MINUTE_MS, zn as coverCapability } from "../../dist-
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-
|
|
1
|
+
import { $a as integrateReading, An as colorCapability, Cr as groupCommandsCapability, Fa as DEFAULT_HISTORY_RETENTION, Ga as compositionItemFieldPath, Ha as composedDeviceRef, Hs as DeviceType, Ia as HISTORY_FAST_MS, Ja as createStatefulExpressionMemory, K as DeclaredDevices, Ka as compositionSliceKey, Ki as runFanOut, Kn as declaredSeriesKind, La as HISTORY_SLOW_MS, Mn as compositionFieldKey, Na as COMPOSER_ADDON_ID, On as climateControlCapability, Pa as DAY_MS, Ra as HOUR_MS, Rr as kebabToCamel, Ta as valveCapability, Ua as composedDeviceStableId, Ui as resolveMutate, Us as errMsg, Va as cloneStatefulExpressionMemory, Wa as compositionFeatureEnabled, Ws as EventCategory, Xa as evaluateDerivative, Ya as disarmRoseMemory, Za as evaluateStatistic, _n as buildCapabilityLookup, _r as featureForwards, ao as planResetTier, b as COMPOSED_ITEM_FIXED_FIELDS, co as toExpressionValue, cr as evaluateCompositionField, dt as HvacModeSchema, ea as sharedActuatorFeatures, ei as mediaPlayerCapability, eo as isForwardInputRef, es as createEvent, fr as expressionContainsBuiltinCall, ga as switchCapability, hn as brightnessCapability, hr as fanOutTargets, io as openStatistic, jn as composerCapability, m as BaseDevice, mr as fanControlCapability, ms as isReadingQuantity, n as ACTUATOR_METHODS, na as sharedColorModes, ni as methodRefusal, no as nextLocalMidnight, nt as FanDirectionSchema, o as ALL_CAPABILITY_DEFINITIONS, oi as motionCapability, oo as planStatisticTier, ot as GroupCommandResultSchema, qa as compositionSourceKey, qr as lockControlCapability, r as ACTUATOR_TEMPLATE_IDS, ro as openReset, so as statisticCadenceMs, ta as sharedActuatorMethods, to as isHistoryHelper, uo as BaseAddon, vi as parseColorInput, wr as groupTemplate, xi as planComposition, za as MINUTE_MS, zn as coverCapability } from "../../dist-yrk6fm65.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-D-S2hhdw.mjs";
|
|
3
|
+
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-DBrdAv12.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
6
6
|
/**
|
|
@@ -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-dQKZfa3-.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Yr as logDestinationCapability, uo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Yr as logDestinationCapability, uo as BaseAddon } from "../../dist-yrk6fm65.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|