@camstack/system 1.2.15 → 1.2.17
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 +2 -10
- package/dist/addon-runner.mjs +3 -11
- 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 +73 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +73 -2
- 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 +3 -38
- 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 +2 -2
- package/dist/builtins/platform-probe/index.js +2 -2
- package/dist/builtins/platform-probe/index.mjs +3 -2
- 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-backup/system-backup.service.d.ts +14 -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/chunk-CNf5ZN-e.mjs +37 -0
- package/dist/{dist-eOaraBhT.mjs → dist-DmQ6thmF.mjs} +10418 -10231
- package/dist/{dist-yttC1aUI.js → dist-OQ1yU92D.js} +10477 -10296
- package/dist/framework-resolver-hook.mjs +2 -0
- package/dist/index.js +224 -32
- package/dist/index.mjs +227 -34
- package/dist/kernel/addon-installer.d.ts +86 -7
- package/dist/kernel/fs-utils.d.ts +18 -5
- package/dist/lib-5THG9eKz.mjs +15545 -0
- package/dist/lib-CZ3g2WTS.js +15549 -0
- package/dist/{manifest-python-deps-bn3qrsxR.mjs → manifest-python-deps-B30qVAuW.mjs} +1 -2
- package/dist/{manifest-python-deps-DSrmih6E.js → manifest-python-deps-CnRW2Utv.js} +2 -3
- package/dist/{resource-monitor-Le3l0qS2.mjs → resource-monitor-BkP504Vq.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const
|
|
3
|
-
const require_manifest_python_deps = require("./manifest-python-deps-DSrmih6E.js");
|
|
2
|
+
const require_manifest_python_deps = require("./manifest-python-deps-CnRW2Utv.js");
|
|
4
3
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
5
4
|
let node_fs = require("node:fs");
|
|
6
5
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -473,13 +472,6 @@ async function main() {
|
|
|
473
472
|
*/
|
|
474
473
|
const allSingletonProviders = /* @__PURE__ */ new Map();
|
|
475
474
|
/**
|
|
476
|
-
* Cap-definition lookup for the dispatcher's collection-list-method guard.
|
|
477
|
-
* Lets `child-cap-dispatch` reproduce the hub-side `concatCollection` skip:
|
|
478
|
-
* a provider that doesn't implement a COLLECTION cap's array-returning method
|
|
479
|
-
* contributes `[]` instead of throwing "method not found".
|
|
480
|
-
*/
|
|
481
|
-
const capDefsByName = new Map(require_dist.ALL_CAPABILITY_DEFINITIONS.map((def) => [def.name, def]));
|
|
482
|
-
/**
|
|
483
475
|
* Resolve a singleton provider for the dispatcher: exact (capName, addonId)
|
|
484
476
|
* match when the hint names a hosted provider, else the cap's first
|
|
485
477
|
* registered provider (an unmatched `addonId` is method DATA — e.g.
|
|
@@ -536,7 +528,7 @@ async function main() {
|
|
|
536
528
|
dispatch: createChildCapDispatch({
|
|
537
529
|
getSingletonProvider: (capName, addonId) => resolveSingletonProvider(capName, addonId),
|
|
538
530
|
getDeviceProvider: (capName, deviceId) => require_manifest_python_deps.getWorkerNativeCapProvider(capName, deviceId) ?? null,
|
|
539
|
-
isCollectionListMethod: (capName, method) =>
|
|
531
|
+
isCollectionListMethod: (capName, method) => (0, _camstack_types_addon.isCollectionArrayMethodName)(capName, method)
|
|
540
532
|
})
|
|
541
533
|
});
|
|
542
534
|
udsChildClient.onAddonCall(createChildAddonCallDispatch({
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Ct as resolveAddonClass, I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps } from "./manifest-python-deps-bn3qrsxR.mjs";
|
|
1
|
+
import { Ct as resolveAddonClass, I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps } from "./manifest-python-deps-B30qVAuW.mjs";
|
|
3
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
4
3
|
import { register } from "node:module";
|
|
5
4
|
import * as fs from "node:fs";
|
|
6
5
|
import * as path$1 from "node:path";
|
|
7
|
-
import { ReadinessRegistry, ReadinessTimeoutError, errMsg, normalizeAddonInitResult } from "@camstack/types/addon";
|
|
6
|
+
import { ReadinessRegistry, ReadinessTimeoutError, errMsg, isCollectionArrayMethodName, normalizeAddonInitResult } from "@camstack/types/addon";
|
|
8
7
|
import { pathToFileURL } from "node:url";
|
|
9
8
|
import * as v8 from "node:v8";
|
|
10
9
|
//#region src/kernel/moleculer/worker-device-restore.ts
|
|
@@ -469,13 +468,6 @@ async function main() {
|
|
|
469
468
|
*/
|
|
470
469
|
const allSingletonProviders = /* @__PURE__ */ new Map();
|
|
471
470
|
/**
|
|
472
|
-
* Cap-definition lookup for the dispatcher's collection-list-method guard.
|
|
473
|
-
* Lets `child-cap-dispatch` reproduce the hub-side `concatCollection` skip:
|
|
474
|
-
* a provider that doesn't implement a COLLECTION cap's array-returning method
|
|
475
|
-
* contributes `[]` instead of throwing "method not found".
|
|
476
|
-
*/
|
|
477
|
-
const capDefsByName = new Map(ALL_CAPABILITY_DEFINITIONS.map((def) => [def.name, def]));
|
|
478
|
-
/**
|
|
479
471
|
* Resolve a singleton provider for the dispatcher: exact (capName, addonId)
|
|
480
472
|
* match when the hint names a hosted provider, else the cap's first
|
|
481
473
|
* registered provider (an unmatched `addonId` is method DATA — e.g.
|
|
@@ -532,7 +524,7 @@ async function main() {
|
|
|
532
524
|
dispatch: createChildCapDispatch({
|
|
533
525
|
getSingletonProvider: (capName, addonId) => resolveSingletonProvider(capName, addonId),
|
|
534
526
|
getDeviceProvider: (capName, deviceId) => getWorkerNativeCapProvider(capName, deviceId) ?? null,
|
|
535
|
-
isCollectionListMethod: (capName, method) =>
|
|
527
|
+
isCollectionListMethod: (capName, method) => isCollectionArrayMethodName(capName, method)
|
|
536
528
|
})
|
|
537
529
|
});
|
|
538
530
|
udsChildClient.onAddonCall(createChildAddonCallDispatch({
|
|
@@ -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-OQ1yU92D.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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as BaseAddon, it as errMsg, jt as EventCategory, p as addonPagesCapability } from "../../dist-DmQ6thmF.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";
|
|
@@ -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-OQ1yU92D.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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as BaseAddon, h as addonWidgetsCapability, it as errMsg, jt as EventCategory } from "../../dist-DmQ6thmF.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";
|
|
@@ -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-OQ1yU92D.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 {
|
|
1
|
+
import { at as BaseAddon, g as alertsCapability, it as errMsg, jt as EventCategory, n as AlertSchema, vt as createEvent } from "../../dist-DmQ6thmF.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-OQ1yU92D.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);
|
|
@@ -3102,6 +3102,7 @@ var SystemBackupService = class {
|
|
|
3102
3102
|
}
|
|
3103
3103
|
if (present.length === 0) throw new Error(`createArchive: no locations from {${requested.join(", ")}} exist under ${this.dataDir}`);
|
|
3104
3104
|
node_fs.mkdirSync(node_path.dirname(opts.archivePath), { recursive: true });
|
|
3105
|
+
await this.checkpointDatabasesUnder(present);
|
|
3105
3106
|
const entries = [];
|
|
3106
3107
|
for (const loc of present) {
|
|
3107
3108
|
const abs = node_path.join(this.dataDir, loc);
|
|
@@ -3156,7 +3157,48 @@ var SystemBackupService = class {
|
|
|
3156
3157
|
};
|
|
3157
3158
|
}
|
|
3158
3159
|
/**
|
|
3159
|
-
*
|
|
3160
|
+
* Best-effort `wal_checkpoint(TRUNCATE)` on every live SQLite database
|
|
3161
|
+
* under the locations about to be archived. Discovers a DB by its
|
|
3162
|
+
* `-wal` sidecar (only WAL-mode DBs have one, and only those need
|
|
3163
|
+
* folding), opens a short-lived second connection — SQLite permits
|
|
3164
|
+
* concurrent connections, and a checkpoint is a supported concurrent
|
|
3165
|
+
* operation against the hub's live writer — checkpoints, and closes.
|
|
3166
|
+
*
|
|
3167
|
+
* Every failure is swallowed: a `SQLITE_BUSY`, a locked file, a
|
|
3168
|
+
* missing native binding, or a non-DB `.db` file must not fail the
|
|
3169
|
+
* backup. A residual WAL still restores correctly; the checkpoint is a
|
|
3170
|
+
* consistency *improvement*, not a precondition.
|
|
3171
|
+
*/
|
|
3172
|
+
async checkpointDatabasesUnder(locations) {
|
|
3173
|
+
const dbPaths = /* @__PURE__ */ new Set();
|
|
3174
|
+
for (const loc of locations) await collectWalDatabases(node_path.isAbsolute(loc) ? loc : node_path.join(this.dataDir, loc), dbPaths);
|
|
3175
|
+
if (dbPaths.size === 0) return;
|
|
3176
|
+
let Database;
|
|
3177
|
+
try {
|
|
3178
|
+
Database = (await import("better-sqlite3")).default;
|
|
3179
|
+
} catch (err) {
|
|
3180
|
+
this.logger.warn("createArchive: better-sqlite3 unavailable — skipping WAL checkpoint", { meta: {
|
|
3181
|
+
error: err instanceof Error ? err.message : String(err),
|
|
3182
|
+
dbCount: dbPaths.size
|
|
3183
|
+
} });
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
for (const dbPath of dbPaths) try {
|
|
3187
|
+
const db = new Database(dbPath);
|
|
3188
|
+
try {
|
|
3189
|
+
db.pragma("wal_checkpoint(TRUNCATE)");
|
|
3190
|
+
} finally {
|
|
3191
|
+
db.close();
|
|
3192
|
+
}
|
|
3193
|
+
this.logger.debug("createArchive: checkpointed DB", { meta: { dbPath } });
|
|
3194
|
+
} catch (err) {
|
|
3195
|
+
this.logger.warn("createArchive: WAL checkpoint failed — archiving DB as-is", { meta: {
|
|
3196
|
+
dbPath,
|
|
3197
|
+
error: err instanceof Error ? err.message : String(err)
|
|
3198
|
+
} });
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
/**
|
|
3160
3202
|
* without extracting payload files. Streams the tar.gz, parses the
|
|
3161
3203
|
* one entry we care about, then aborts.
|
|
3162
3204
|
*/
|
|
@@ -3276,6 +3318,35 @@ var SystemBackupService = class {
|
|
|
3276
3318
|
}
|
|
3277
3319
|
};
|
|
3278
3320
|
/**
|
|
3321
|
+
* Recursively collect every SQLite database under `abs` that is in WAL
|
|
3322
|
+
* mode, identified by the presence of a `<db>-wal` sidecar. Only those
|
|
3323
|
+
* need a checkpoint; a rollback-journal DB has nothing to fold. Errors
|
|
3324
|
+
* (unreadable dir, broken symlink) are skipped silently — this feeds a
|
|
3325
|
+
* best-effort step.
|
|
3326
|
+
*/
|
|
3327
|
+
async function collectWalDatabases(abs, out) {
|
|
3328
|
+
let stat;
|
|
3329
|
+
try {
|
|
3330
|
+
stat = await node_fs_promises.stat(abs);
|
|
3331
|
+
} catch {
|
|
3332
|
+
return;
|
|
3333
|
+
}
|
|
3334
|
+
if (stat.isDirectory()) {
|
|
3335
|
+
let children;
|
|
3336
|
+
try {
|
|
3337
|
+
children = await node_fs_promises.readdir(abs);
|
|
3338
|
+
} catch {
|
|
3339
|
+
return;
|
|
3340
|
+
}
|
|
3341
|
+
for (const child of children) await collectWalDatabases(node_path.join(abs, child), out);
|
|
3342
|
+
return;
|
|
3343
|
+
}
|
|
3344
|
+
if (abs.endsWith("-wal")) {
|
|
3345
|
+
const dbPath = abs.slice(0, -4);
|
|
3346
|
+
if (node_fs.existsSync(dbPath)) out.add(dbPath);
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3279
3350
|
* Recursively walk a directory and produce one `ArchiveEntry` per
|
|
3280
3351
|
* filesystem node. `dataDir` is used to compute the archive-relative
|
|
3281
3352
|
* path. Symlinks are dereferenced (matches the `follow: true` flag we
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as BaseAddon, jt as EventCategory, y as backupCapability } from "../../dist-DmQ6thmF.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";
|
|
@@ -3087,6 +3087,7 @@ var SystemBackupService = class {
|
|
|
3087
3087
|
}
|
|
3088
3088
|
if (present.length === 0) throw new Error(`createArchive: no locations from {${requested.join(", ")}} exist under ${this.dataDir}`);
|
|
3089
3089
|
fs.mkdirSync(path$1.dirname(opts.archivePath), { recursive: true });
|
|
3090
|
+
await this.checkpointDatabasesUnder(present);
|
|
3090
3091
|
const entries = [];
|
|
3091
3092
|
for (const loc of present) {
|
|
3092
3093
|
const abs = path$1.join(this.dataDir, loc);
|
|
@@ -3141,7 +3142,48 @@ var SystemBackupService = class {
|
|
|
3141
3142
|
};
|
|
3142
3143
|
}
|
|
3143
3144
|
/**
|
|
3144
|
-
*
|
|
3145
|
+
* Best-effort `wal_checkpoint(TRUNCATE)` on every live SQLite database
|
|
3146
|
+
* under the locations about to be archived. Discovers a DB by its
|
|
3147
|
+
* `-wal` sidecar (only WAL-mode DBs have one, and only those need
|
|
3148
|
+
* folding), opens a short-lived second connection — SQLite permits
|
|
3149
|
+
* concurrent connections, and a checkpoint is a supported concurrent
|
|
3150
|
+
* operation against the hub's live writer — checkpoints, and closes.
|
|
3151
|
+
*
|
|
3152
|
+
* Every failure is swallowed: a `SQLITE_BUSY`, a locked file, a
|
|
3153
|
+
* missing native binding, or a non-DB `.db` file must not fail the
|
|
3154
|
+
* backup. A residual WAL still restores correctly; the checkpoint is a
|
|
3155
|
+
* consistency *improvement*, not a precondition.
|
|
3156
|
+
*/
|
|
3157
|
+
async checkpointDatabasesUnder(locations) {
|
|
3158
|
+
const dbPaths = /* @__PURE__ */ new Set();
|
|
3159
|
+
for (const loc of locations) await collectWalDatabases(path$1.isAbsolute(loc) ? loc : path$1.join(this.dataDir, loc), dbPaths);
|
|
3160
|
+
if (dbPaths.size === 0) return;
|
|
3161
|
+
let Database;
|
|
3162
|
+
try {
|
|
3163
|
+
Database = (await import("better-sqlite3")).default;
|
|
3164
|
+
} catch (err) {
|
|
3165
|
+
this.logger.warn("createArchive: better-sqlite3 unavailable — skipping WAL checkpoint", { meta: {
|
|
3166
|
+
error: err instanceof Error ? err.message : String(err),
|
|
3167
|
+
dbCount: dbPaths.size
|
|
3168
|
+
} });
|
|
3169
|
+
return;
|
|
3170
|
+
}
|
|
3171
|
+
for (const dbPath of dbPaths) try {
|
|
3172
|
+
const db = new Database(dbPath);
|
|
3173
|
+
try {
|
|
3174
|
+
db.pragma("wal_checkpoint(TRUNCATE)");
|
|
3175
|
+
} finally {
|
|
3176
|
+
db.close();
|
|
3177
|
+
}
|
|
3178
|
+
this.logger.debug("createArchive: checkpointed DB", { meta: { dbPath } });
|
|
3179
|
+
} catch (err) {
|
|
3180
|
+
this.logger.warn("createArchive: WAL checkpoint failed — archiving DB as-is", { meta: {
|
|
3181
|
+
dbPath,
|
|
3182
|
+
error: err instanceof Error ? err.message : String(err)
|
|
3183
|
+
} });
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3145
3187
|
* without extracting payload files. Streams the tar.gz, parses the
|
|
3146
3188
|
* one entry we care about, then aborts.
|
|
3147
3189
|
*/
|
|
@@ -3261,6 +3303,35 @@ var SystemBackupService = class {
|
|
|
3261
3303
|
}
|
|
3262
3304
|
};
|
|
3263
3305
|
/**
|
|
3306
|
+
* Recursively collect every SQLite database under `abs` that is in WAL
|
|
3307
|
+
* mode, identified by the presence of a `<db>-wal` sidecar. Only those
|
|
3308
|
+
* need a checkpoint; a rollback-journal DB has nothing to fold. Errors
|
|
3309
|
+
* (unreadable dir, broken symlink) are skipped silently — this feeds a
|
|
3310
|
+
* best-effort step.
|
|
3311
|
+
*/
|
|
3312
|
+
async function collectWalDatabases(abs, out) {
|
|
3313
|
+
let stat;
|
|
3314
|
+
try {
|
|
3315
|
+
stat = await fsp.stat(abs);
|
|
3316
|
+
} catch {
|
|
3317
|
+
return;
|
|
3318
|
+
}
|
|
3319
|
+
if (stat.isDirectory()) {
|
|
3320
|
+
let children;
|
|
3321
|
+
try {
|
|
3322
|
+
children = await fsp.readdir(abs);
|
|
3323
|
+
} catch {
|
|
3324
|
+
return;
|
|
3325
|
+
}
|
|
3326
|
+
for (const child of children) await collectWalDatabases(path$1.join(abs, child), out);
|
|
3327
|
+
return;
|
|
3328
|
+
}
|
|
3329
|
+
if (abs.endsWith("-wal")) {
|
|
3330
|
+
const dbPath = abs.slice(0, -4);
|
|
3331
|
+
if (fs.existsSync(dbPath)) out.add(dbPath);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
/**
|
|
3264
3335
|
* Recursively walk a directory and produce one `ArchiveEntry` per
|
|
3265
3336
|
* filesystem node. `dataDir` is used to compute the archive-relative
|
|
3266
3337
|
* path. Symlinks are dereferenced (matches the `follow: true` flag we
|
|
@@ -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-OQ1yU92D.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 {
|
|
1
|
+
import { at as BaseAddon, z as logDestinationCapability } from "../../dist-DmQ6thmF.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-OQ1yU92D.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 { C as deviceStatusCapability, D as enumerateSchemaFields, E as enumerateItemArrayFields,
|
|
1
|
+
import { At as sleep, C as deviceStatusCapability, Ct as isDeviceConfigCap, D as enumerateSchemaFields, E as enumerateItemArrayFields, G as parseStreamParamsFormPatch, O as evaluateLinkExpression, S as deviceStateCapability, U as normalizeUnit, Y as setByPath, _ as applyTransform, a as CAP_NAMES_WITH_STATUS, at as BaseAddon, b as buildStreamParamsConfigSchema, dt as DeviceType, it as errMsg, j as getByPath, jt as EventCategory, l as STREAM_PROFILE_META, lt as DeviceFeature, mt as WELL_KNOWN_TAB_MAP, o as DeviceStatusSchema, rt as validateExpressionSource, t as ALL_CAPABILITY_DEFINITIONS, tt as toExpressionValue, ut as DeviceRole, x as deviceManagerCapability } from "../../dist-DmQ6thmF.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-OQ1yU92D.js");
|
|
7
7
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
8
8
|
/**
|
|
9
9
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as BaseAddon, dt as DeviceType, it as errMsg, jt as EventCategory, vt as createEvent, w as doorbellCapability } from "../../dist-DmQ6thmF.mjs";
|
|
2
2
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
3
3
|
/**
|
|
4
4
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -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-OQ1yU92D.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 {
|
|
1
|
+
import { at as BaseAddon, z as logDestinationCapability } from "../../dist-DmQ6thmF.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-OQ1yU92D.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,43 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
+
import { at as BaseAddon, f as UserRecordSchema, nt as userManagementCapability, r as ApiKeyRecordSchema, u as ScopedTokenSchema, v as authProviderCapability } from "../../dist-DmQ6thmF.mjs";
|
|
3
3
|
import * as crypto$1 from "node:crypto";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import nodeCrypto from "crypto";
|
|
6
|
-
//#region \0rolldown/runtime.js
|
|
7
|
-
var __create = Object.create;
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
-
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
14
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
15
|
-
var __exportAll = (all, no_symbols) => {
|
|
16
|
-
let target = {};
|
|
17
|
-
for (var name in all) __defProp(target, name, {
|
|
18
|
-
get: all[name],
|
|
19
|
-
enumerable: true
|
|
20
|
-
});
|
|
21
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
var __copyProps = (to, from, except, desc) => {
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
26
|
-
key = keys[i];
|
|
27
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
28
|
-
get: ((k) => from[k]).bind(null, key),
|
|
29
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return to;
|
|
33
|
-
};
|
|
34
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
35
|
-
value: mod,
|
|
36
|
-
enumerable: true
|
|
37
|
-
}) : target, mod));
|
|
38
|
-
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
40
|
-
//#endregion
|
|
41
6
|
//#region ../../node_modules/safe-buffer/index.js
|
|
42
7
|
var require_safe_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43
8
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
@@ -9575,4 +9540,4 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
9575
9540
|
}
|
|
9576
9541
|
};
|
|
9577
9542
|
//#endregion
|
|
9578
|
-
export { LocalAuthAddon, LocalAuthAddon as default, require_ms as a,
|
|
9543
|
+
export { LocalAuthAddon, LocalAuthAddon as default, require_ms as a, AuthManager as i, ApiKeyManager as n, require_safe_buffer as o, UserManager as r, ScopedTokenManager as t };
|
|
@@ -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-OQ1yU92D.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 {
|
|
1
|
+
import { R as localNetworkCapability, at as BaseAddon, jt as EventCategory } from "../../dist-DmQ6thmF.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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-OQ1yU92D.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as BaseAddon, z as logDestinationCapability } from "../../dist-DmQ6thmF.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -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-OQ1yU92D.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 { H as metricsProviderCapability,
|
|
1
|
+
import { H as metricsProviderCapability, at as BaseAddon, jt as EventCategory, vt as createEvent } from "../../dist-DmQ6thmF.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";
|
|
@@ -116,7 +116,7 @@ var NativeMetricsProvider = class {
|
|
|
116
116
|
return getCpuTemperatureInternal();
|
|
117
117
|
}
|
|
118
118
|
async getProcessStats(input) {
|
|
119
|
-
const { getPidStats } = await import("../../resource-monitor-
|
|
119
|
+
const { getPidStats } = await import("../../resource-monitor-BkP504Vq.mjs").then((n) => n.r);
|
|
120
120
|
const raw = await getPidStats(input.pids);
|
|
121
121
|
const result = [];
|
|
122
122
|
for (const [pid, s] of raw) result.push({
|
|
@@ -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-OQ1yU92D.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");
|
|
@@ -88,7 +88,7 @@ var noopLogger = {
|
|
|
88
88
|
*/
|
|
89
89
|
async function getAvailableRAM_MB() {
|
|
90
90
|
try {
|
|
91
|
-
const mem = await (await
|
|
91
|
+
const mem = await (await Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("../../lib-CZ3g2WTS.js").default))).mem();
|
|
92
92
|
return Math.round(mem.available / 1024 / 1024);
|
|
93
93
|
} catch (err) {
|
|
94
94
|
console.debug(`systeminformation not available, using platform-specific RAM probe: ${require_dist.errMsg(err)}`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
+
import { J as scoreRuntimes, K as platformProbeCapability, T as enumerateInferenceDevices, at as BaseAddon, bt as emitReadiness, it as errMsg, jt as EventCategory } from "../../dist-DmQ6thmF.mjs";
|
|
2
3
|
import * as fs from "node:fs";
|
|
3
4
|
import { execFile } from "node:child_process";
|
|
4
5
|
import { promisify } from "node:util";
|
|
@@ -81,7 +82,7 @@ var noopLogger = {
|
|
|
81
82
|
*/
|
|
82
83
|
async function getAvailableRAM_MB() {
|
|
83
84
|
try {
|
|
84
|
-
const mem = await (await import("
|
|
85
|
+
const mem = await (await import("../../lib-5THG9eKz.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).mem();
|
|
85
86
|
return Math.round(mem.available / 1024 / 1024);
|
|
86
87
|
} catch (err) {
|
|
87
88
|
console.debug(`systeminformation not available, using platform-specific RAM probe: ${errMsg(err)}`);
|
|
@@ -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-OQ1yU92D.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 {
|
|
1
|
+
import { at as BaseAddon, jt as EventCategory } from "../../dist-DmQ6thmF.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-OQ1yU92D.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/builtins/snapshot/snapshot-coalescing.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as snapshotCapability, at as BaseAddon, dt as DeviceType, et as streamQualityLabel, i as BatteryStatusSchema, it as errMsg, lt as DeviceFeature, wt as nodePin } from "../../dist-DmQ6thmF.mjs";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
//#region src/builtins/snapshot/snapshot-coalescing.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-OQ1yU92D.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 {
|
|
1
|
+
import { $ as storageProviderCapability, A as filesystemBrowseCapability, at as BaseAddon } from "../../dist-DmQ6thmF.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-OQ1yU92D.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 {
|
|
1
|
+
import { Et as parseJsonUnknown, X as settingsStoreCapability, at as BaseAddon, c as RUNTIME_DEFAULTS, ht as asJsonObject, it as errMsg } from "../../dist-DmQ6thmF.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
|