@camstack/system 1.2.458 → 1.2.460
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 +26 -11
- package/dist/addon-runner.mjs +26 -11
- package/dist/addon-utils.mjs +1 -1
- package/dist/{agent-https-DOELEug8.js → agent-https-Dnr_nIVx.js} +3 -723
- package/dist/{agent-https-CQA3W-3e.mjs → agent-https-Iw3RSQup.mjs} +4 -616
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/dist/builtins/alerts/alerts.addon.js +5 -7
- package/dist/builtins/alerts/alerts.addon.mjs +5 -7
- package/dist/builtins/alerts/record-kinds.d.ts +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +242 -4
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +243 -5
- package/dist/builtins/calendars/calendars.addon.js +2 -10
- package/dist/builtins/calendars/calendars.addon.mjs +2 -3
- package/dist/builtins/calendars/record-kinds.d.ts +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- 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 +4 -6
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
- package/dist/builtins/device-history/device-history.addon.js +1 -1
- package/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -4
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +41 -43
- package/dist/builtins/keychain/index.mjs +41 -43
- 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 +24 -40
- package/dist/builtins/local-auth/local-auth.addon.mjs +27 -43
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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 +39 -4
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +48 -13
- package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +16 -2
- package/dist/builtins/platform-probe/coral-accelerators.d.ts +10 -1
- package/dist/builtins/platform-probe/index.js +7 -4
- package/dist/builtins/platform-probe/index.mjs +13 -10
- package/dist/builtins/platform-probe/platform-scorer.d.ts +4 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/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/file-host-protocol.d.ts +0 -15
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -44
- package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
- package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
- package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
- package/dist/builtins/sqlite-storage/records/records-plan.d.ts +9 -4
- package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
- package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
- package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
- package/dist/builtins/system-config/system-config.addon.js +667 -40
- package/dist/builtins/system-config/system-config.addon.mjs +737 -127
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BVguN7VV.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
- package/dist/{composition-sources-DURQNDJ4.js → composition-sources-b0e_2I-D.js} +1 -1
- package/dist/{constants-Njka8Cv6.js → constants-6OeJiZgi.js} +1 -1
- package/dist/{constants-FGjnsE2x.mjs → constants-BnkOdj9Q.mjs} +1 -1
- package/dist/{coral-accelerators-DcnZvctM.mjs → coral-accelerators-Qhn5TOYZ.mjs} +18 -15
- package/dist/{coral-accelerators-Bi_c3Rft.js → coral-accelerators-oUXmmbc2.js} +13 -10
- package/dist/{custom-action-registry-stpC3Zy-.mjs → custom-action-registry-DStvrQKI.mjs} +37 -37
- package/dist/{device-ca-lEaAQ9Xi.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
- package/dist/{device-ca-BrVK_5s3.js → device-ca-CPTDs--d.js} +1 -1
- package/dist/{dist-BZQjLPiz.js → dist-Bn-RNanh.js} +29 -130
- package/dist/{dist-B_GRPhnY.mjs → dist-Wy8cTxg6.mjs} +30 -113
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-Bg2HfTwP.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
- package/dist/{hub-mdns-ciao-nce3TXs_.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -31
- package/dist/index.mjs +257 -233
- package/dist/kernel/deps/addon-deps-manager.d.ts +9 -0
- package/dist/{restore-archive-C7kLDI_0.mjs → restore-archive-CM23Pq9B.mjs} +177 -424
- package/dist/{restore-archive-FyfZ8YMC.js → restore-archive-DM1OBYq4.js} +89 -342
- package/dist/{wal-maintenance-Duejh7Lx.mjs → wal-maintenance-Bj_MmDkr.mjs} +0 -0
- package/dist/{wal-maintenance-DfSIOj24.js → wal-maintenance-CaJjuLHq.js} +0 -0
- package/package.json +1 -1
- package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
- package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
- package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
- package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
- package/dist/phase6-declare-gate-Dag1_WR2.js +0 -98
- package/dist/phase6-declare-gate-Lb-mrVvz.mjs +0 -93
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as backupCapability, Or as storageOccupancyCapability, Ta as EventCategory, Un as mayWriteToLocation, ba as toNodeId, ni as BaseAddon, oa as nodePin } from "../../dist-Wy8cTxg6.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as
|
|
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-CM23Pq9B.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 from "node:fs";
|
|
7
|
+
import * as fs$1 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";
|
|
@@ -77,6 +77,81 @@ async function seedWeeklySchedule(store, markers) {
|
|
|
77
77
|
return seed;
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
+
//#region src/builtins/backup-orchestrator/seed-marker-store.ts
|
|
81
|
+
/**
|
|
82
|
+
* @durable class=config owner=backup-orchestrator
|
|
83
|
+
* write="the orchestrator inserts one row per seed id the first time that
|
|
84
|
+
* seed is created (or found already created); never updated"
|
|
85
|
+
* retention="none — one tiny row per seed ever made; deleting it lets the
|
|
86
|
+
* seed be re-created once more on the next boot"
|
|
87
|
+
*/
|
|
88
|
+
var BACKUP_SEED_MARKERS_COLLECTION = "backup_seed_markers";
|
|
89
|
+
var COLUMNS$1 = [{
|
|
90
|
+
name: "seed_id",
|
|
91
|
+
type: "TEXT",
|
|
92
|
+
primaryKey: true
|
|
93
|
+
}, {
|
|
94
|
+
name: "seeded_at",
|
|
95
|
+
type: "INTEGER",
|
|
96
|
+
notNull: true
|
|
97
|
+
}];
|
|
98
|
+
var BackupSeedMarkerStore = class {
|
|
99
|
+
store;
|
|
100
|
+
now;
|
|
101
|
+
declared = false;
|
|
102
|
+
markersKind;
|
|
103
|
+
constructor(store, now = Date.now, markersKind = null) {
|
|
104
|
+
this.store = store;
|
|
105
|
+
this.now = now;
|
|
106
|
+
this.markersKind = markersKind;
|
|
107
|
+
}
|
|
108
|
+
async ensureDeclared() {
|
|
109
|
+
if (this.markersKind !== null) return;
|
|
110
|
+
if (this.declared) return;
|
|
111
|
+
await this.store.declareCollection({
|
|
112
|
+
collection: BACKUP_SEED_MARKERS_COLLECTION,
|
|
113
|
+
columns: COLUMNS$1
|
|
114
|
+
});
|
|
115
|
+
this.declared = true;
|
|
116
|
+
}
|
|
117
|
+
async has(seedId) {
|
|
118
|
+
await this.ensureDeclared();
|
|
119
|
+
const kind = this.markersKind;
|
|
120
|
+
if (kind !== null) return await kind.get(seedId) !== null;
|
|
121
|
+
return (await this.store.query({
|
|
122
|
+
collection: BACKUP_SEED_MARKERS_COLLECTION,
|
|
123
|
+
filter: {
|
|
124
|
+
where: { seed_id: seedId },
|
|
125
|
+
limit: 1
|
|
126
|
+
}
|
|
127
|
+
})).length > 0;
|
|
128
|
+
}
|
|
129
|
+
async mark(seedId) {
|
|
130
|
+
await this.ensureDeclared();
|
|
131
|
+
if (await this.has(seedId)) return;
|
|
132
|
+
const kind = this.markersKind;
|
|
133
|
+
if (kind !== null) {
|
|
134
|
+
const body = { seededAt: this.now() };
|
|
135
|
+
const data = backupOrchestratorRecordKinds["seed-markers"].schema.parse(body);
|
|
136
|
+
await kind.put({
|
|
137
|
+
id: seedId,
|
|
138
|
+
data
|
|
139
|
+
});
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
await this.store.insert({
|
|
143
|
+
collection: BACKUP_SEED_MARKERS_COLLECTION,
|
|
144
|
+
record: {
|
|
145
|
+
id: seedId,
|
|
146
|
+
data: {
|
|
147
|
+
seed_id: seedId,
|
|
148
|
+
seeded_at: this.now()
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
80
155
|
//#region ../../node_modules/croner/dist/croner.js
|
|
81
156
|
function T(s) {
|
|
82
157
|
return Date.UTC(s.y, s.m - 1, s.d, s.h, s.i, s.s);
|
|
@@ -1157,7 +1232,7 @@ async function downloadArchiveToCache(input) {
|
|
|
1157
1232
|
location: input.locationId,
|
|
1158
1233
|
relativePath: input.filename
|
|
1159
1234
|
});
|
|
1160
|
-
const writeStream = fs.createWriteStream(input.cachePath);
|
|
1235
|
+
const writeStream = fs$1.createWriteStream(input.cachePath);
|
|
1161
1236
|
let offset = 0;
|
|
1162
1237
|
try {
|
|
1163
1238
|
while (offset < sizeBytes) {
|
|
@@ -1201,6 +1276,169 @@ async function downloadArchiveToCache(input) {
|
|
|
1201
1276
|
}
|
|
1202
1277
|
}
|
|
1203
1278
|
//#endregion
|
|
1279
|
+
//#region src/builtins/backup-orchestrator/encryption-key-store.ts
|
|
1280
|
+
/**
|
|
1281
|
+
* @durable class=config owner=backup-orchestrator
|
|
1282
|
+
* write="`setupEncryption` inserts one row per generated key and retires the
|
|
1283
|
+
* previous active row; `disableEncryption` retires the active row"
|
|
1284
|
+
* retention="none — one small row per key ever generated; a retired row
|
|
1285
|
+
* names the key older archives need"
|
|
1286
|
+
*/
|
|
1287
|
+
var BACKUP_ENCRYPTION_KEYS_COLLECTION = "backup_encryption_keys";
|
|
1288
|
+
var COLUMNS = [
|
|
1289
|
+
{
|
|
1290
|
+
name: "key_id",
|
|
1291
|
+
type: "TEXT",
|
|
1292
|
+
primaryKey: true
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
name: "public_key",
|
|
1296
|
+
type: "TEXT",
|
|
1297
|
+
notNull: true
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
name: "created_at",
|
|
1301
|
+
type: "INTEGER",
|
|
1302
|
+
notNull: true
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
name: "retired_at",
|
|
1306
|
+
type: "INTEGER"
|
|
1307
|
+
}
|
|
1308
|
+
];
|
|
1309
|
+
var BackupEncryptionKeyStore = class {
|
|
1310
|
+
store;
|
|
1311
|
+
now;
|
|
1312
|
+
declared = false;
|
|
1313
|
+
keysKind;
|
|
1314
|
+
constructor(store, now = Date.now, keysKind = null) {
|
|
1315
|
+
this.store = store;
|
|
1316
|
+
this.now = now;
|
|
1317
|
+
this.keysKind = keysKind;
|
|
1318
|
+
}
|
|
1319
|
+
async ensureDeclared() {
|
|
1320
|
+
if (this.keysKind !== null) return;
|
|
1321
|
+
if (this.declared) return;
|
|
1322
|
+
await this.store.declareCollection({
|
|
1323
|
+
collection: BACKUP_ENCRYPTION_KEYS_COLLECTION,
|
|
1324
|
+
columns: COLUMNS
|
|
1325
|
+
});
|
|
1326
|
+
this.declared = true;
|
|
1327
|
+
}
|
|
1328
|
+
/** Every key, newest first. */
|
|
1329
|
+
async list() {
|
|
1330
|
+
await this.ensureDeclared();
|
|
1331
|
+
const kind = this.keysKind;
|
|
1332
|
+
if (kind !== null) {
|
|
1333
|
+
const rows = await (0, import_read_all_rows.readAllRows)(kind);
|
|
1334
|
+
rows.sort((a, b) => b.data.createdAt - a.data.createdAt);
|
|
1335
|
+
const out = [];
|
|
1336
|
+
for (const row of rows) {
|
|
1337
|
+
const record = bodyToRecord(row.id, row.data);
|
|
1338
|
+
if (record !== null) out.push(record);
|
|
1339
|
+
}
|
|
1340
|
+
return out;
|
|
1341
|
+
}
|
|
1342
|
+
const rows = await this.store.query({
|
|
1343
|
+
collection: BACKUP_ENCRYPTION_KEYS_COLLECTION,
|
|
1344
|
+
filter: { orderBy: {
|
|
1345
|
+
field: "created_at",
|
|
1346
|
+
direction: "desc"
|
|
1347
|
+
} }
|
|
1348
|
+
});
|
|
1349
|
+
const out = [];
|
|
1350
|
+
for (const row of rows) {
|
|
1351
|
+
const record = toRecord(row.data);
|
|
1352
|
+
if (record !== null) out.push(record);
|
|
1353
|
+
}
|
|
1354
|
+
return out;
|
|
1355
|
+
}
|
|
1356
|
+
/** The key new archives are encrypted to; `null` = encryption off. */
|
|
1357
|
+
async active() {
|
|
1358
|
+
return (await this.list()).find((k) => k.retiredAt === null) ?? null;
|
|
1359
|
+
}
|
|
1360
|
+
/** Make `publicKey` the active key; the previous one is retired, kept listed. */
|
|
1361
|
+
async activate(input) {
|
|
1362
|
+
const parsed = parseBackupPublicKey(input.publicKey);
|
|
1363
|
+
const t = this.now();
|
|
1364
|
+
await this.retireActive(t);
|
|
1365
|
+
const record = {
|
|
1366
|
+
keyId: parsed.keyId,
|
|
1367
|
+
publicKey: input.publicKey.trim(),
|
|
1368
|
+
createdAt: t,
|
|
1369
|
+
retiredAt: null
|
|
1370
|
+
};
|
|
1371
|
+
await this.write(record);
|
|
1372
|
+
return record;
|
|
1373
|
+
}
|
|
1374
|
+
/** Encryption off: the active key is retired. Archives already made keep needing it. */
|
|
1375
|
+
async disable() {
|
|
1376
|
+
await this.retireActive(this.now());
|
|
1377
|
+
}
|
|
1378
|
+
async retireActive(at) {
|
|
1379
|
+
for (const key of await this.list()) if (key.retiredAt === null) await this.write({
|
|
1380
|
+
...key,
|
|
1381
|
+
retiredAt: at
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
async write(record) {
|
|
1385
|
+
await this.ensureDeclared();
|
|
1386
|
+
const kind = this.keysKind;
|
|
1387
|
+
if (kind !== null) {
|
|
1388
|
+
const body = {
|
|
1389
|
+
keyId: record.keyId,
|
|
1390
|
+
publicKey: record.publicKey,
|
|
1391
|
+
createdAt: record.createdAt,
|
|
1392
|
+
retiredAt: record.retiredAt
|
|
1393
|
+
};
|
|
1394
|
+
const data = backupOrchestratorRecordKinds["encryption-keys"].schema.parse(body);
|
|
1395
|
+
await kind.put({
|
|
1396
|
+
id: record.keyId,
|
|
1397
|
+
data
|
|
1398
|
+
});
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
await this.store.deleteWhere({
|
|
1402
|
+
collection: BACKUP_ENCRYPTION_KEYS_COLLECTION,
|
|
1403
|
+
filter: { where: { key_id: record.keyId } }
|
|
1404
|
+
});
|
|
1405
|
+
await this.store.insert({
|
|
1406
|
+
collection: BACKUP_ENCRYPTION_KEYS_COLLECTION,
|
|
1407
|
+
record: {
|
|
1408
|
+
id: record.keyId,
|
|
1409
|
+
data: {
|
|
1410
|
+
key_id: record.keyId,
|
|
1411
|
+
public_key: record.publicKey,
|
|
1412
|
+
created_at: record.createdAt,
|
|
1413
|
+
retired_at: record.retiredAt
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
};
|
|
1419
|
+
function bodyToRecord(keyId, body) {
|
|
1420
|
+
if (!keyId) return null;
|
|
1421
|
+
return {
|
|
1422
|
+
keyId: body.keyId,
|
|
1423
|
+
publicKey: body.publicKey,
|
|
1424
|
+
createdAt: body.createdAt,
|
|
1425
|
+
retiredAt: body.retiredAt
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
function toRecord(row) {
|
|
1429
|
+
const keyId = row["key_id"];
|
|
1430
|
+
const publicKey = row["public_key"];
|
|
1431
|
+
const createdAt = row["created_at"];
|
|
1432
|
+
if (typeof keyId !== "string" || typeof publicKey !== "string") return null;
|
|
1433
|
+
const retired = row["retired_at"];
|
|
1434
|
+
return {
|
|
1435
|
+
keyId,
|
|
1436
|
+
publicKey,
|
|
1437
|
+
createdAt: typeof createdAt === "number" ? createdAt : Number(createdAt ?? 0),
|
|
1438
|
+
retiredAt: typeof retired === "number" ? retired : null
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
//#endregion
|
|
1204
1442
|
//#region src/builtins/backup-orchestrator/manifest-store.ts
|
|
1205
1443
|
/** File path (relative to the location root) where the index lives. */
|
|
1206
1444
|
var MANIFESTS_FILENAME = "manifests.json";
|
|
@@ -2694,7 +2932,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2694
2932
|
});
|
|
2695
2933
|
try {
|
|
2696
2934
|
let offset = 0;
|
|
2697
|
-
const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2935
|
+
const stream = fs$1.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2698
2936
|
for await (const rawChunk of stream) {
|
|
2699
2937
|
if (input.signal?.aborted) {
|
|
2700
2938
|
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-Bn-RNanh.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
|
|
@@ -31,13 +31,6 @@ function defaultCalendarColor(calendarId) {
|
|
|
31
31
|
}
|
|
32
32
|
return CALENDAR_COLOR_PALETTE[Math.abs(hash) % CALENDAR_COLOR_PALETTE.length];
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/builtins/calendars/record-kinds.ts
|
|
36
|
-
/**
|
|
37
|
-
* Record kinds owned by calendars (phase 4).
|
|
38
|
-
*/
|
|
39
|
-
/** Legacy collection / adoptsFrom target. */
|
|
40
|
-
var CALENDARS_USER_PREFS_COLLECTION = "calendars:user-prefs";
|
|
41
34
|
var CalendarUserPrefsBodySchema = zod.z.object({
|
|
42
35
|
calendars: require_dist.CalendarPreferencesSchema.shape.calendars,
|
|
43
36
|
updatedAt: zod.z.number()
|
|
@@ -52,8 +45,7 @@ var _calendarsRecordKinds = require_dist.defineRecordKinds({ "user-prefs": {
|
|
|
52
45
|
name: "updated_at",
|
|
53
46
|
fields: ["updatedAt"]
|
|
54
47
|
}],
|
|
55
|
-
retention: { none: "a missing row reads as empty prefs (all visible, system colours)" }
|
|
56
|
-
adoptsFrom: CALENDARS_USER_PREFS_COLLECTION
|
|
48
|
+
retention: { none: "a missing row reads as empty prefs (all visible, system colours)" }
|
|
57
49
|
} });
|
|
58
50
|
var calendarsRecordKinds = _calendarsRecordKinds;
|
|
59
51
|
_calendarsRecordKinds["user-prefs"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gi as defineRecordKinds, Pt as calendarsCapability, _ as CalendarPreferencesSchema, ni as BaseAddon } from "../../dist-Wy8cTxg6.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
|
|
@@ -39,8 +39,7 @@ var _calendarsRecordKinds = defineRecordKinds({ "user-prefs": {
|
|
|
39
39
|
name: "updated_at",
|
|
40
40
|
fields: ["updatedAt"]
|
|
41
41
|
}],
|
|
42
|
-
retention: { none: "a missing row reads as empty prefs (all visible, system colours)" }
|
|
43
|
-
adoptsFrom: "calendars:user-prefs"
|
|
42
|
+
retention: { none: "a missing row reads as empty prefs (all visible, system colours)" }
|
|
44
43
|
} });
|
|
45
44
|
var calendarsRecordKinds = _calendarsRecordKinds;
|
|
46
45
|
_calendarsRecordKinds["user-prefs"];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { CalendarPreferencesSchema, type DefinedRecordKind } from "@camstack/types";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
/**
|
|
6
|
+
/** The legacy collection the kind replaced; read only without records. */
|
|
7
7
|
export declare const CALENDARS_USER_PREFS_COLLECTION = "calendars:user-prefs";
|
|
8
8
|
export type CalendarUserPrefsBody = {
|
|
9
9
|
readonly calendars: z.infer<typeof CalendarPreferencesSchema.shape.calendars>;
|
|
@@ -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-Bn-RNanh.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 { Ar as streamCatalogCapability, Cr as snapshotCapability, E as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ft as cameraGridLayoutCapability, Hi as createEvent,
|
|
1
|
+
import { Ar as streamCatalogCapability, Cr as snapshotCapability, E as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ft as cameraGridLayoutCapability, Hi as createEvent, P as DeclaredDevices, Qr as DeviceFeature, Ta as EventCategory, Vr as buildFfmpegArgs, Wn as memoizePinnedFfmpeg, X as MOTION_CLOSE_AFTER_MS, Xi as hydrateSchema, Yt as declarationOwnerNodeId, ei as DeviceType, ni as BaseAddon, o as BaseDevice, qn as motionCapability, ti as errMsg } from "../../dist-Wy8cTxg6.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,8 +3,8 @@ 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-
|
|
6
|
+
const require_dist = require("../../dist-Bn-RNanh.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-b0e_2I-D.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { At as buildCapabilityLookup, Br as COMPOSER_ADDON_ID, Gr as compositionFeatureEnabled, Hi as createEvent, Hr as cloneStatefulExpressionMemory, Jr as compositionSourceKey, Kr as compositionItemFieldPath,
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { At as buildCapabilityLookup, Br as COMPOSER_ADDON_ID, Gr as compositionFeatureEnabled, Hi as createEvent, Hr as cloneStatefulExpressionMemory, Jr as compositionSourceKey, Kr as compositionItemFieldPath, P as DeclaredDevices, Rt as composerCapability, Ta as EventCategory, Ur as composedDeviceRef, Wr as composedDeviceStableId, Xr as disarmRoseMemory, Yr as createStatefulExpressionMemory, Zr as toExpressionValue, ei as DeviceType, er as planComposition, f as COMPOSED_ITEM_FIXED_FIELDS, ni as BaseAddon, o as BaseDevice, pn as expressionContainsBuiltinCall, qr as compositionSliceKey, r as ALL_CAPABILITY_DEFINITIONS, ti as errMsg, un as evaluateCompositionField, zt as compositionFieldKey } from "../../dist-Wy8cTxg6.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-DNRZWR1j.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -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-Bn-RNanh.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 { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Wy8cTxg6.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 = {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-Bn-RNanh.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-b0e_2I-D.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -531,8 +531,7 @@ var _coreBlocksRecordKinds = require_dist.defineRecordKinds({
|
|
|
531
531
|
fields: ["enabled"]
|
|
532
532
|
}],
|
|
533
533
|
retention: { none: "operator delete only" },
|
|
534
|
-
maxDataBytes: 256 * 1024
|
|
535
|
-
adoptsFrom: CORE_BLOCKS_COLLECTION
|
|
534
|
+
maxDataBytes: 256 * 1024
|
|
536
535
|
},
|
|
537
536
|
settings: {
|
|
538
537
|
schema: CoreBlockSettingsBodySchema,
|
|
@@ -540,8 +539,7 @@ var _coreBlocksRecordKinds = require_dist.defineRecordKinds({
|
|
|
540
539
|
writeTrigger: "legacy only — migrateRawSecrets reads then deletes rows (D880)",
|
|
541
540
|
device: "none",
|
|
542
541
|
at: "none",
|
|
543
|
-
retention: { none: "rows deleted by migrateRawSecrets" }
|
|
544
|
-
adoptsFrom: CORE_BLOCK_SETTINGS_COLLECTION
|
|
542
|
+
retention: { none: "rows deleted by migrateRawSecrets" }
|
|
545
543
|
}
|
|
546
544
|
});
|
|
547
545
|
var coreBlocksRecordKinds = _coreBlocksRecordKinds;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $t as describeComposableCaps, At as buildCapabilityLookup, Bi as collectSecretMarkerRefs, Bt as compositionSourceRefs, Gt as coreBlocksCapability, Ht as coreBlockComposition, Jn as normalizeCoreBlockWrite, Jr as compositionSourceKey,
|
|
1
|
+
import { $t as describeComposableCaps, At as buildCapabilityLookup, Bi as collectSecretMarkerRefs, Bt as compositionSourceRefs, Gi as defineRecordKinds, Gt as coreBlocksCapability, Ht as coreBlockComposition, Jn as normalizeCoreBlockWrite, Jr as compositionSourceKey, P as DeclaredDevices, Pr as validateComposition, Sa as transformSecretWrite, Ur as composedDeviceRef, Ut as coreBlockIdFromAddonId, Vt as coreBlockAddonId, Wt as coreBlockSourceKind, Xi as hydrateSchema, dr as resolveCoreBlockFiles, er as planComposition, h as CORE_BLOCK_ADDON_PREFIX, ha as resolveSecretMarkers, m as CORE_BLOCKS_ADDON_ID, ni as BaseAddon, p as COMPOSER_RUNNER_ID, r as ALL_CAPABILITY_DEFINITIONS, ra as isSecretRefOwnedBy, sr as replacedFieldKeys, ta as isSecretMarker, ti as errMsg, ur as resolveCoreBlockEntry, va as secretTreeFromSchema, y as CoreBlockSchema } from "../../dist-Wy8cTxg6.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
3
|
+
import { t as describeCompositionSources } from "../../composition-sources-DNRZWR1j.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -526,8 +526,7 @@ var _coreBlocksRecordKinds = defineRecordKinds({
|
|
|
526
526
|
fields: ["enabled"]
|
|
527
527
|
}],
|
|
528
528
|
retention: { none: "operator delete only" },
|
|
529
|
-
maxDataBytes: 256 * 1024
|
|
530
|
-
adoptsFrom: CORE_BLOCKS_COLLECTION
|
|
529
|
+
maxDataBytes: 256 * 1024
|
|
531
530
|
},
|
|
532
531
|
settings: {
|
|
533
532
|
schema: CoreBlockSettingsBodySchema,
|
|
@@ -535,8 +534,7 @@ var _coreBlocksRecordKinds = defineRecordKinds({
|
|
|
535
534
|
writeTrigger: "legacy only — migrateRawSecrets reads then deletes rows (D880)",
|
|
536
535
|
device: "none",
|
|
537
536
|
at: "none",
|
|
538
|
-
retention: { none: "rows deleted by migrateRawSecrets" }
|
|
539
|
-
adoptsFrom: CORE_BLOCK_SETTINGS_COLLECTION
|
|
537
|
+
retention: { none: "rows deleted by migrateRawSecrets" }
|
|
540
538
|
}
|
|
541
539
|
});
|
|
542
540
|
var coreBlocksRecordKinds = _coreBlocksRecordKinds;
|
|
@@ -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-Bn-RNanh.js");
|
|
7
7
|
//#region src/builtins/device-history/time/bucket-time.ts
|
|
8
8
|
/**
|
|
9
9
|
* Bucket arithmetic for the three rollup tiers (D850, plan §4/§5.5).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as HISTORY_CATALOG,
|
|
1
|
+
import { B as HISTORY_CATALOG, O as DEVICE_HISTORY_ENERGY_KEY, Ta as EventCategory, Tt as armRemovalReconcile, di as HISTORY_DEFAULT_MIN_INTERVAL_MS, ei as DeviceType, in as deviceRemovalHookCapability, ni as BaseAddon, nn as deviceHistoryCapability, qi as emitReadiness } from "../../dist-Wy8cTxg6.mjs";
|
|
2
2
|
//#region src/builtins/device-history/time/bucket-time.ts
|
|
3
3
|
/**
|
|
4
4
|
* Bucket arithmetic for the three rollup tiers (D850, plan §4/§5.5).
|
|
@@ -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-Bn-RNanh.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
@@ -7894,8 +7894,7 @@ var _deviceManagerRecordKinds = require_dist.defineRecordKinds({ tombstones: {
|
|
|
7894
7894
|
retention: {
|
|
7895
7895
|
owner: "device-manager",
|
|
7896
7896
|
reason: "90 days (`DEVICE_TOMBSTONE_RETENTION_MS`), pruned whenever a tombstone is written or the list is read"
|
|
7897
|
-
}
|
|
7898
|
-
adoptsFrom: DEVICE_TOMBSTONES_COLLECTION
|
|
7897
|
+
}
|
|
7899
7898
|
} });
|
|
7900
7899
|
var deviceManagerRecordKinds = _deviceManagerRecordKinds;
|
|
7901
7900
|
_deviceManagerRecordKinds.tombstones;
|
|
@@ -7904,7 +7903,6 @@ _deviceManagerRecordKinds.tombstones;
|
|
|
7904
7903
|
/**
|
|
7905
7904
|
* The tombstones of deleted devices (D865) — `tombstones` record kind (phase 4).
|
|
7906
7905
|
*/
|
|
7907
|
-
var DEVICE_TOMBSTONES_COLLECTION = "device-manager:tombstones";
|
|
7908
7906
|
/** More than the engine's default row cap, so a read is never silently truncated. */
|
|
7909
7907
|
var TOMBSTONE_READ_LIMIT = 2e4;
|
|
7910
7908
|
function rowToTombstone(id, body) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as DeviceRole,
|
|
1
|
+
import { $i as isKeychainStoredField, $r as DeviceRole, Ca as userError, F as DeviceStatusSchema, Gi as defineRecordKinds, I as DeviceTombstoneSchema, It as canonicalIconKey, Kt as createDeviceExtensionProvider, Mi as WELL_KNOWN_TAB_MAP, Nt as buildStreamParamsConfigSchema, Pn as legacyAutoLinkIds, Qn as parseStreamParamsFormPatch, Qr as DeviceFeature, R as FieldClaimModeSchema, Rn as locationIconKey, Sa as transformSecretWrite, Sr as siteZoneKey, T as DAY_NAMES, Ta as EventCategory, Vi as collectZodSecretPaths, Y as MINUTES_PER_DAY, Yn as normalizeUnit, Zi as isDeviceConfigCap, Zt as defineExtensionSlotProvider, _a as secretTreeFromPaths, an as deviceStateCapability, c as CAMERA_SWITCH_ORDER, cn as enumerateItemArrayFields, ct as STREAM_PROFILE_META, ea as isSecretClear, ei as DeviceType, fn as expandContainer, gr as runtimeStatePolicyFor, ha as resolveSecretMarkers, ki as SECRET_CLEAR, ln as enumerateSchemaFields, na as isSecretMarkerLike, ni as BaseAddon, on as deviceStatusCapability, r as ALL_CAPABILITY_DEFINITIONS, rn as deviceManagerCapability, ta as isSecretMarker, ti as errMsg, tn as deviceExtensionCapability, u as CAP_NAMES_WITH_STATUS, vn as formatMinutes, xa as toSecretFieldView, ya as sleep$1, z as FieldClaimSchema } from "../../dist-Wy8cTxg6.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
@@ -7888,8 +7888,7 @@ var _deviceManagerRecordKinds = defineRecordKinds({ tombstones: {
|
|
|
7888
7888
|
retention: {
|
|
7889
7889
|
owner: "device-manager",
|
|
7890
7890
|
reason: "90 days (`DEVICE_TOMBSTONE_RETENTION_MS`), pruned whenever a tombstone is written or the list is read"
|
|
7891
|
-
}
|
|
7892
|
-
adoptsFrom: DEVICE_TOMBSTONES_COLLECTION
|
|
7891
|
+
}
|
|
7893
7892
|
} });
|
|
7894
7893
|
var deviceManagerRecordKinds = _deviceManagerRecordKinds;
|
|
7895
7894
|
_deviceManagerRecordKinds.tombstones;
|
|
@@ -7898,7 +7897,6 @@ _deviceManagerRecordKinds.tombstones;
|
|
|
7898
7897
|
/**
|
|
7899
7898
|
* The tombstones of deleted devices (D865) — `tombstones` record kind (phase 4).
|
|
7900
7899
|
*/
|
|
7901
|
-
var DEVICE_TOMBSTONES_COLLECTION = "device-manager:tombstones";
|
|
7902
7900
|
/** More than the engine's default row cap, so a read is never silently truncated. */
|
|
7903
7901
|
var TOMBSTONE_READ_LIMIT = 2e4;
|
|
7904
7902
|
function rowToTombstone(id, body) {
|
|
@@ -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-Bn-RNanh.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 { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Wy8cTxg6.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;
|