@camstack/system 1.2.429 → 1.2.430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +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 +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- 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 +2 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/file-host-client.d.ts +11 -0
- 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/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +34 -4
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +34 -4
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +2 -2
- package/dist/builtins/system-config/system-config.addon.mjs +2 -2
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-SYtYuAgh.mjs → composition-sources-Cw_TXEq9.mjs} +1 -1
- package/dist/{composition-sources-C2VNX6tF.js → composition-sources-o5MPSlk6.js} +1 -1
- package/dist/{constants-RI-hGP5S.js → constants-BcNaVkvI.js} +1 -1
- package/dist/{constants-CKuWoWvc.mjs → constants-CttE77VF.mjs} +1 -1
- package/dist/{device-ca-R7DKKZL6.mjs → device-ca-B-BTxeCj.mjs} +1 -1
- package/dist/{device-ca-BWfdDB3k.js → device-ca-CKiqh2Iu.js} +1 -1
- package/dist/{dist-CSSfTM18.mjs → dist-CXG6muCR.mjs} +545 -34
- package/dist/{dist-Bgy_AmwX.js → dist-DxJdci75.js} +545 -34
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/dist/{restore-archive-BYUEMsog.js → restore-archive-CQJNoqRK.js} +1 -1
- package/dist/{restore-archive-AIwMHO5_.mjs → restore-archive-D_wBL1OO.mjs} +1 -1
- package/dist/{retired-settings-keys-H0rYXT27.mjs → retired-settings-keys-EmDe11cP.mjs} +1 -1
- package/dist/{retired-settings-keys-BTPkRLTS.js → retired-settings-keys-g1oifXxR.js} +1 -1
- package/dist/{wal-maintenance-BSGsxKW7.js → wal-maintenance-BW1LIHi0.js} +0 -0
- package/dist/{wal-maintenance-DW0FfGV7.mjs → wal-maintenance-vhPZLYuA.mjs} +0 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $n as vectorStoreCapability, Sr as RUNTIME_DEFAULTS, _ as DATABASE_SNAPSHOT_TIMEOUT_MS, _r as BaseAddon, bt as databaseSnapshotCapability, et as bareAddonId, g as DATABASE_SNAPSHOT_SUFFIX, gr as errMsg, h as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, v as DATA_STORE_DATABASES, yt as dataStoreProviderCapability } from "../../dist-
|
|
2
|
-
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-
|
|
3
|
-
import { C as callControl, E as controlTargetOf, S as trustResult, T as callVector, _ as collectTransferables, a as WalMaintenance, c as SqliteSettingsBackend, d as CrossDatabaseTransactError, f as DatabaseBusyError, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callData } from "../../wal-maintenance-
|
|
1
|
+
import { $n as vectorStoreCapability, Sr as RUNTIME_DEFAULTS, _ as DATABASE_SNAPSHOT_TIMEOUT_MS, _r as BaseAddon, bt as databaseSnapshotCapability, et as bareAddonId, g as DATABASE_SNAPSHOT_SUFFIX, gr as errMsg, h as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, v as DATA_STORE_DATABASES, yt as dataStoreProviderCapability } from "../../dist-CXG6muCR.mjs";
|
|
2
|
+
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-EmDe11cP.mjs";
|
|
3
|
+
import { C as callControl, E as controlTargetOf, S as trustResult, T as callVector, _ as collectTransferables, a as WalMaintenance, c as SqliteSettingsBackend, d as CrossDatabaseTransactError, f as DatabaseBusyError, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callData } from "../../wal-maintenance-vhPZLYuA.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -21,6 +21,8 @@ function defaultFileHostWorkerPath() {
|
|
|
21
21
|
const packageRoot = path.dirname(require_.resolve("@camstack/system/package.json"));
|
|
22
22
|
return path.join(packageRoot, "dist", "file-host-worker.js");
|
|
23
23
|
}
|
|
24
|
+
/** How long a stopped thread has to end on its own before it is terminated. */
|
|
25
|
+
var FILE_HOST_EXIT_GRACE_MS = 5e3;
|
|
24
26
|
var FileHostClient = class {
|
|
25
27
|
spec;
|
|
26
28
|
logger;
|
|
@@ -32,6 +34,8 @@ var FileHostClient = class {
|
|
|
32
34
|
nextId = 1;
|
|
33
35
|
lastOp = "(none yet)";
|
|
34
36
|
stopping = false;
|
|
37
|
+
/** Settles when the thread's event loop has ended and its isolate is gone. */
|
|
38
|
+
exited;
|
|
35
39
|
dead = false;
|
|
36
40
|
lastBusyLogAt = -Infinity;
|
|
37
41
|
declared = /* @__PURE__ */ new Set();
|
|
@@ -56,8 +60,14 @@ var FileHostClient = class {
|
|
|
56
60
|
});
|
|
57
61
|
this.thread.on("message", (message) => this.onMessage(message));
|
|
58
62
|
this.thread.on("error", (err) => this.die(`worker error: ${errMsg(err)}`));
|
|
63
|
+
this.exited = new Promise((resolve) => {
|
|
64
|
+
this.thread.on("exit", () => resolve());
|
|
65
|
+
});
|
|
59
66
|
this.thread.on("exit", (code) => {
|
|
60
|
-
if (this.stopping)
|
|
67
|
+
if (this.stopping) {
|
|
68
|
+
for (const pending of this.pending.values()) if (pending.op === "stop") pending.resolve(void 0);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
61
71
|
this.die(`worker exited with code ${code}`);
|
|
62
72
|
});
|
|
63
73
|
}
|
|
@@ -116,6 +126,26 @@ var FileHostClient = class {
|
|
|
116
126
|
});
|
|
117
127
|
});
|
|
118
128
|
} finally {
|
|
129
|
+
await this.awaitExit();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Let the thread END ITSELF after it answered `stop`: it has closed every
|
|
134
|
+
* statement and the connection and closed its port, so its loop drains and
|
|
135
|
+
* the isolate is disposed from inside. `terminate()` straight after the
|
|
136
|
+
* answer races that disposal and, on macOS, took the whole process down with
|
|
137
|
+
* a SIGSEGV in the isolate's teardown GC. Terminate is only the fallback for
|
|
138
|
+
* a thread that does not leave in time.
|
|
139
|
+
*/
|
|
140
|
+
async awaitExit() {
|
|
141
|
+
let timer;
|
|
142
|
+
const timedOut = new Promise((resolve) => {
|
|
143
|
+
timer = setTimeout(() => resolve("timeout"), FILE_HOST_EXIT_GRACE_MS);
|
|
144
|
+
});
|
|
145
|
+
const outcome = await Promise.race([this.exited.then(() => "exited"), timedOut]);
|
|
146
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
147
|
+
if (outcome === "timeout") {
|
|
148
|
+
this.logger.warn("database worker did not leave after stop — terminating it", { tags: { database: this.spec.databaseId } });
|
|
119
149
|
await this.thread.terminate();
|
|
120
150
|
}
|
|
121
151
|
}
|
|
@@ -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-DxJdci75.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as evictionPolicyOfLocation, G as StorageLocationTypeSchema, Gr as isSecretMarker, Hn as storageMigrationCapability, Jt as isLocationEnabled, K as StorageMigrationJobSchema, P as LegacyStorageLocationDefaultSchema, Rn as settingsStoreCapability, U as StorageCleanupJobSchema, Ut as gbToBytes, Vn as storageCapability, W as StorageLocationModeSchema, Xr as parseJsonObject, _r as BaseAddon, ci as transformSecretWrite, cn as mayReadLocation, er as withLocationMode, fn as modeMayWrite, jn as resolveLocationMode, jr as collectSecretConfigKeys, li as EventCategory, ln as mayWriteToLocation, ri as secretTreeFromPaths, ti as resolveSecretMarkers, tn as legacyModeOf, xr as REDACTED_SECRET } from "../../dist-
|
|
1
|
+
import { Ft as evictionPolicyOfLocation, G as StorageLocationTypeSchema, Gr as isSecretMarker, Hn as storageMigrationCapability, Jt as isLocationEnabled, K as StorageMigrationJobSchema, P as LegacyStorageLocationDefaultSchema, Rn as settingsStoreCapability, U as StorageCleanupJobSchema, Ut as gbToBytes, Vn as storageCapability, W as StorageLocationModeSchema, Xr as parseJsonObject, _r as BaseAddon, ci as transformSecretWrite, cn as mayReadLocation, er as withLocationMode, fn as modeMayWrite, jn as resolveLocationMode, jr as collectSecretConfigKeys, li as EventCategory, ln as mayWriteToLocation, ri as secretTreeFromPaths, ti as resolveSecretMarkers, tn as legacyModeOf, xr as REDACTED_SECRET } from "../../dist-CXG6muCR.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { containsOrEquals, physicalRootOf } from "@camstack/types/node";
|
|
@@ -3,11 +3,11 @@ 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-DxJdci75.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-Dzl0BbmG.js");
|
|
9
9
|
const require_agent_https_names = require("../../agent-https-names-CpUSuP4w.js");
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
10
|
+
const require_constants$8 = require("../../constants-BcNaVkvI.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Br as hydrateSchema, Fr as defineCustomActions, Gr as isSecretMarker, Pr as customAction, Wr as isSecretClear, _r as BaseAddon, ci as transformSecretWrite, gr as errMsg, ii as secretTreeFromSchema, qr as makeSecretMarker } from "../../dist-
|
|
2
|
+
import { Br as hydrateSchema, Fr as defineCustomActions, Gr as isSecretMarker, Pr as customAction, Wr as isSecretClear, _r as BaseAddon, ci as transformSecretWrite, gr as errMsg, ii as secretTreeFromSchema, qr as makeSecretMarker } from "../../dist-CXG6muCR.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "../../x509.es-CAjSsrkk.mjs";
|
|
5
5
|
import { a as setProcessAgentHttpsNames, n as AGENT_HTTPS_NAMES_COLUMNS, r as AgentHttpsNames, t as AGENT_HTTPS_NAMES_COLLECTION } from "../../agent-https-names-uetr4OQl.mjs";
|
|
6
|
-
import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID, v as hashClusterSecret } from "../../constants-
|
|
6
|
+
import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID, v as hashClusterSecret } from "../../constants-CttE77VF.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createHmac, randomBytes, timingSafeEqual, webcrypto } from "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-DxJdci75.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _r as BaseAddon, an as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { _r as BaseAddon, an as logDestinationCapability } from "../../dist-CXG6muCR.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { gr as errMsg, lr as compositionSourceKey } from "./dist-
|
|
1
|
+
import { gr as errMsg, lr as compositionSourceKey } from "./dist-CXG6muCR.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/composition-sources.ts
|
|
3
3
|
/**
|
|
4
4
|
* Describe what a composition reads and writes for SAVE-time validation
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ar as buildSecretRef, C as DEVICE_SAN_CREDENTIAL_PREFIX, w as DEVICE_SAN_USER_PREFIX } from "./dist-
|
|
1
|
+
import { Ar as buildSecretRef, C as DEVICE_SAN_CREDENTIAL_PREFIX, w as DEVICE_SAN_USER_PREFIX } from "./dist-CXG6muCR.mjs";
|
|
2
2
|
import { a as KeyUsagesExtension, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, l as SubjectAlternativeNameExtension, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "./x509.es-CAjSsrkk.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|