@camstack/system 1.2.424 → 1.2.426
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-databases.d.ts +51 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +19 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +268 -17
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +268 -17
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts +23 -3
- package/dist/builtins/backup-orchestrator/run-queue.d.ts +3 -0
- package/dist/builtins/backup-orchestrator/schedule-store.d.ts +7 -1
- package/dist/builtins/backup-orchestrator/seed-marker-store.d.ts +34 -0
- 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/address-book.d.ts +21 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +6 -0
- package/dist/builtins/local-network/local-network.addon.js +48 -7
- package/dist/builtins/local-network/local-network.addon.mjs +48 -7
- 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/database-snapshot-provider.d.ts +18 -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 +49 -7
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +49 -7
- 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 +48 -15
- 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-BWNs-ZeH.js → composition-sources-60tuHQ9N.js} +1 -1
- package/dist/{composition-sources-tRG7nKWK.mjs → composition-sources-gxVpghXh.mjs} +1 -1
- package/dist/{constants-DHhhVjkt.mjs → constants-B6YTf0v2.mjs} +1 -1
- package/dist/{constants-BBWZlnpQ.js → constants-CO5zpJQY.js} +1 -1
- package/dist/{dist-B-NmfvVC.mjs → dist-CGz9u2HD.mjs} +869 -800
- package/dist/{dist-CiUKtVkX.js → dist-K3WFop9Q.js} +869 -800
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/index.js +272 -198
- package/dist/index.mjs +272 -198
- package/dist/{jwt-signing-key-nwRpRgf_.js → jwt-signing-key-BdDy9ZJN.js} +1 -1
- package/dist/{jwt-signing-key-CUpweD22.mjs → jwt-signing-key-C_w5ielw.mjs} +1 -1
- package/dist/kernel/moleculer/process-service.d.ts +1 -110
- package/dist/kernel/moleculer/runner-heap-flags.d.ts +228 -0
- package/dist/{restore-archive-DA-aJtg7.js → restore-archive-BJp4Llea.js} +156 -65
- package/dist/{restore-archive-CFmPVlWQ.mjs → restore-archive-CZyUM8Qf.mjs} +151 -66
- package/dist/{retired-settings-keys-D62kN_hT.js → retired-settings-keys-Dr2AyhsD.js} +1 -1
- package/dist/{retired-settings-keys-DCGEI4Vi.mjs → retired-settings-keys-Dut6QWh6.mjs} +1 -1
- package/dist/{wal-maintenance-BlqNqaQ3.mjs → wal-maintenance-BZhzoxqA.mjs} +0 -0
- package/dist/{wal-maintenance-BzdCQGjH.js → wal-maintenance-Bzm3O2Nj.js} +0 -0
- package/package.json +1 -1
|
@@ -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-K3WFop9Q.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 { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-
|
|
1
|
+
import { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-CGz9u2HD.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,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
4
|
-
const require_composition_sources = require("../../composition-sources-
|
|
3
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
4
|
+
const require_composition_sources = require("../../composition-sources-60tuHQ9N.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as buildCapabilityLookup, Mr as hydrateSchema, Vn as validateComposition, Xn as composedDeviceRef, _n as replacedFieldKeys, bn as resolveCoreBlockEntry, cr as errMsg, ct as coreBlockComposition, d as CORE_BLOCKS_ADDON_ID, dt as coreBlocksCapability, f as CORE_BLOCK_ADDON_PREFIX, fn as planComposition, lr as BaseAddon, lt as coreBlockIdFromAddonId, m as CoreBlockSchema, on as normalizeCoreBlockWrite, ot as compositionSourceRefs, st as coreBlockAddonId, t as ALL_CAPABILITY_DEFINITIONS, tr as compositionSourceKey, u as COMPOSER_RUNNER_ID, ut as coreBlockSourceKind, x as DeclaredDevices, xn as resolveCoreBlockFiles, yt as describeComposableCaps } from "../../dist-
|
|
2
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
1
|
+
import { $ as buildCapabilityLookup, Mr as hydrateSchema, Vn as validateComposition, Xn as composedDeviceRef, _n as replacedFieldKeys, bn as resolveCoreBlockEntry, cr as errMsg, ct as coreBlockComposition, d as CORE_BLOCKS_ADDON_ID, dt as coreBlocksCapability, f as CORE_BLOCK_ADDON_PREFIX, fn as planComposition, lr as BaseAddon, lt as coreBlockIdFromAddonId, m as CoreBlockSchema, on as normalizeCoreBlockWrite, ot as compositionSourceRefs, st as coreBlockAddonId, t as ALL_CAPABILITY_DEFINITIONS, tr as compositionSourceKey, u as COMPOSER_RUNNER_ID, ut as coreBlockSourceKind, x as DeclaredDevices, xn as resolveCoreBlockFiles, yt as describeComposableCaps } from "../../dist-CGz9u2HD.mjs";
|
|
2
|
+
import { t as describeCompositionSources } from "../../composition-sources-gxVpghXh.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { customizationBlockName } from "@camstack/types/node";
|
|
@@ -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_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-Dr2AyhsD.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as toSecretFieldView, Ct as deviceStatusCapability, En as runtimeStatePolicyFor, Et as enumerateSchemaFields, Fr as isKeychainStoredField, Ir as isSecretClear, Kt as legacyAutoLinkIds, Lr as isSecretMarker, N as MINUTES_PER_DAY, Nr as isDeviceConfigCap, Pt as formatMinutes, R as STREAM_PROFILE_META, Rr as isSecretMarkerLike, S as DeviceStatusSchema, St as deviceStateCapability, T as FieldClaimSchema, Tt as enumerateItemArrayFields, Xt as locationIconKey, Yr as secretTreeFromPaths, Zr as sleep$1, _r as SECRET_CLEAR, _t as defineExtensionSlotProvider, ar as DeviceFeature, bt as deviceExtensionCapability, c as CAP_NAMES_WITH_STATUS, cr as errMsg, ei as transformSecretWrite, et as buildStreamParamsConfigSchema, ft as createDeviceExtensionProvider, j as LocationIconIdSchema, jn as siteZoneKey, kt as expandContainer, lr as BaseAddon, o as CAMERA_SWITCH_ORDER, or as DeviceRole, qr as resolveSecretMarkers, sn as normalizeUnit, sr as DeviceType, t as ALL_CAPABILITY_DEFINITIONS, ti as EventCategory, un as parseStreamParamsFormPatch, vr as WELL_KNOWN_TAB_MAP, w as FieldClaimModeSchema, wr as collectZodSecretPaths, xt as deviceManagerCapability, y as DAY_NAMES } from "../../dist-
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { $r as toSecretFieldView, Ct as deviceStatusCapability, En as runtimeStatePolicyFor, Et as enumerateSchemaFields, Fr as isKeychainStoredField, Ir as isSecretClear, Kt as legacyAutoLinkIds, Lr as isSecretMarker, N as MINUTES_PER_DAY, Nr as isDeviceConfigCap, Pt as formatMinutes, R as STREAM_PROFILE_META, Rr as isSecretMarkerLike, S as DeviceStatusSchema, St as deviceStateCapability, T as FieldClaimSchema, Tt as enumerateItemArrayFields, Xt as locationIconKey, Yr as secretTreeFromPaths, Zr as sleep$1, _r as SECRET_CLEAR, _t as defineExtensionSlotProvider, ar as DeviceFeature, bt as deviceExtensionCapability, c as CAP_NAMES_WITH_STATUS, cr as errMsg, ei as transformSecretWrite, et as buildStreamParamsConfigSchema, ft as createDeviceExtensionProvider, j as LocationIconIdSchema, jn as siteZoneKey, kt as expandContainer, lr as BaseAddon, o as CAMERA_SWITCH_ORDER, or as DeviceRole, qr as resolveSecretMarkers, sn as normalizeUnit, sr as DeviceType, t as ALL_CAPABILITY_DEFINITIONS, ti as EventCategory, un as parseStreamParamsFormPatch, vr as WELL_KNOWN_TAB_MAP, w as FieldClaimModeSchema, wr as collectZodSecretPaths, xt as deviceManagerCapability, y as DAY_NAMES } from "../../dist-CGz9u2HD.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-Dut6QWh6.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
@@ -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-K3WFop9Q.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 { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-
|
|
1
|
+
import { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-CGz9u2HD.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,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-
|
|
7
|
-
const require_jwt_signing_key = require("../../jwt-signing-key-
|
|
8
|
-
const require_constants = require("../../constants-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
|
+
const require_jwt_signing_key = require("../../jwt-signing-key-BdDy9ZJN.js");
|
|
8
|
+
const require_constants = require("../../constants-CO5zpJQY.js");
|
|
9
9
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
10
10
|
let node_crypto = require("node:crypto");
|
|
11
11
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Gt as keychainCapability, O as KEYCHAIN_RESET_TRIGGER_ACTOR, Vr as normalizeSecretOwner, Wr as parseSecretRef, Wt as keychainAdminCapability, jr as formatSecretScope, lr as BaseAddon, ti as EventCategory } from "../../dist-
|
|
2
|
-
import { r as SYSTEM_SECRET_OWNER, t as JWT_SIGNING_KEY_REF } from "../../jwt-signing-key-
|
|
3
|
-
import { a as MESH_CA_KEY_REF, p as CLUSTER_SECRET_SETTINGS_KEY } from "../../constants-
|
|
1
|
+
import { Gt as keychainCapability, O as KEYCHAIN_RESET_TRIGGER_ACTOR, Vr as normalizeSecretOwner, Wr as parseSecretRef, Wt as keychainAdminCapability, jr as formatSecretScope, lr as BaseAddon, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
|
+
import { r as SYSTEM_SECRET_OWNER, t as JWT_SIGNING_KEY_REF } from "../../jwt-signing-key-C_w5ielw.mjs";
|
|
3
|
+
import { a as MESH_CA_KEY_REF, p as CLUSTER_SECRET_SETTINGS_KEY } from "../../constants-B6YTf0v2.mjs";
|
|
4
4
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
5
5
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
6
6
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as RECORDING_SOURCE_CAMSTACK_ADDON, I as RecordingStatusSchema, Tr as createEvent, cr as errMsg, lr as BaseAddon, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { F as RECORDING_SOURCE_CAMSTACK_ADDON, I as RecordingStatusSchema, Tr as createEvent, cr as errMsg, lr as BaseAddon, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -3,10 +3,10 @@ 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-K3WFop9Q.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
9
|
-
const require_jwt_signing_key = require("../../jwt-signing-key-
|
|
9
|
+
const require_jwt_signing_key = require("../../jwt-signing-key-BdDy9ZJN.js");
|
|
10
10
|
let node_crypto = require("node:crypto");
|
|
11
11
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
12
12
|
let crypto$1 = require("crypto");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bn as userManagementCapability, W as UserRecordSchema, Y as authProviderCapability, lr as BaseAddon, r as ApiKeyRecordSchema, z as ScopedTokenSchema } from "../../dist-
|
|
2
|
+
import { Bn as userManagementCapability, W as UserRecordSchema, Y as authProviderCapability, lr as BaseAddon, r as ApiKeyRecordSchema, z as ScopedTokenSchema } from "../../dist-CGz9u2HD.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { a as loadJwtSigningKey, i as getProcessJwtSigningKeyState, o as processJwtSigningKey, s as setProcessJwtSigningKey, t as JWT_SIGNING_KEY_REF } from "../../jwt-signing-key-
|
|
5
|
+
import { a as loadJwtSigningKey, i as getProcessJwtSigningKeyState, o as processJwtSigningKey, s as setProcessJwtSigningKey, t as JWT_SIGNING_KEY_REF } from "../../jwt-signing-key-C_w5ielw.mjs";
|
|
6
6
|
import * as crypto$1 from "node:crypto";
|
|
7
7
|
import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import nodeCrypto from "crypto";
|
|
@@ -87,8 +87,29 @@ export interface AddressBookInputs {
|
|
|
87
87
|
readonly httpsPalette: readonly ConnectionEndpoint[];
|
|
88
88
|
readonly appLink: ConnectionEndpoint;
|
|
89
89
|
readonly appLinkHub: string | null;
|
|
90
|
+
/** Where the hub's listeners answer (see {@link buildListenerOrigins}). */
|
|
91
|
+
readonly listenerOrigins: readonly string[];
|
|
90
92
|
}
|
|
91
93
|
/** Every role's answer — the resolvers from `@camstack/types`, nothing else. */
|
|
92
94
|
export declare function resolveRoles(state: AddressBookState, appPalette: readonly ConnectionEndpoint[], httpsPalette: readonly ConnectionEndpoint[]): HubAddressBook["roles"];
|
|
93
95
|
/** The Addresses table: app link, detected rows, then custom-only rows. */
|
|
94
96
|
export declare function buildAddressBook(state: AddressBookState, inputs: AddressBookInputs): HubAddressBook;
|
|
97
|
+
export interface ListenerOriginInputs {
|
|
98
|
+
/** The palette as the HTTPS listener serves it (`https://<ip>:<httpsPort>`). */
|
|
99
|
+
readonly overHttps: readonly ConnectionEndpoint[];
|
|
100
|
+
/** The palette with the LAN HTTP listener on; empty while it is off. */
|
|
101
|
+
readonly overHttp: readonly ConnectionEndpoint[];
|
|
102
|
+
readonly custom: readonly CustomAddress[];
|
|
103
|
+
/** The local name when the hub serves it, over each listener. */
|
|
104
|
+
readonly localNameOrigins: readonly string[];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Every origin a browser can really reach this hub at: the HTTPS listener's
|
|
108
|
+
* `https://<lan>:<httpsPort>` AND, while the LAN HTTP listener is on,
|
|
109
|
+
* `http://<lan>:<httpPort>`; plus the public and custom addresses. The rows
|
|
110
|
+
* show `http://` only while LAN HTTP is on (native clients skip the private
|
|
111
|
+
* certificate), so the https origin the admin UI is opened at is in no row —
|
|
112
|
+
* a sign-in return (D794) matches against this list instead of falling back
|
|
113
|
+
* to the public endpoint. Never loopback, never the app link.
|
|
114
|
+
*/
|
|
115
|
+
export declare function buildListenerOrigins(inputs: ListenerOriginInputs): readonly string[];
|
|
@@ -119,6 +119,12 @@ export declare class LocalNetworkAddon extends BaseAddon<LocalNetworkConfig> {
|
|
|
119
119
|
* list because ICE/WebRTC gathers it regardless.
|
|
120
120
|
*/
|
|
121
121
|
private buildAdvertisedEndpoints;
|
|
122
|
+
/**
|
|
123
|
+
* Where the listeners answer, whatever the rows advertise: the HTTPS
|
|
124
|
+
* listener's origin per allowlisted LAN address, the HTTP one while it is
|
|
125
|
+
* on (`http` is the palette that already carries those rows).
|
|
126
|
+
*/
|
|
127
|
+
private listenerOriginsNow;
|
|
122
128
|
/** The DETECTED palette from the cached interface/tunnel/mesh state. */
|
|
123
129
|
private endpointsNow;
|
|
124
130
|
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
@@ -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-K3WFop9Q.js");
|
|
4
4
|
const require_tls = require("../../tls-BgImdxCO.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_net = require("node:net");
|
|
@@ -228,9 +228,31 @@ function buildAddressBook(state, inputs) {
|
|
|
228
228
|
...state.custom.filter((c) => !detectedUrls.has(c.baseUrl)).map((c) => row(customEndpoint(c), false))
|
|
229
229
|
],
|
|
230
230
|
roles,
|
|
231
|
-
appLinkHub: inputs.appLinkHub
|
|
231
|
+
appLinkHub: inputs.appLinkHub,
|
|
232
|
+
listenerOrigins: inputs.listenerOrigins
|
|
232
233
|
};
|
|
233
234
|
}
|
|
235
|
+
var ORIGIN_KINDS = new Set([
|
|
236
|
+
"lan-ipv4",
|
|
237
|
+
"lan-ipv6",
|
|
238
|
+
"public"
|
|
239
|
+
]);
|
|
240
|
+
/**
|
|
241
|
+
* Every origin a browser can really reach this hub at: the HTTPS listener's
|
|
242
|
+
* `https://<lan>:<httpsPort>` AND, while the LAN HTTP listener is on,
|
|
243
|
+
* `http://<lan>:<httpPort>`; plus the public and custom addresses. The rows
|
|
244
|
+
* show `http://` only while LAN HTTP is on (native clients skip the private
|
|
245
|
+
* certificate), so the https origin the admin UI is opened at is in no row —
|
|
246
|
+
* a sign-in return (D794) matches against this list instead of falling back
|
|
247
|
+
* to the public endpoint. Never loopback, never the app link.
|
|
248
|
+
*/
|
|
249
|
+
function buildListenerOrigins(inputs) {
|
|
250
|
+
const out = /* @__PURE__ */ new Set();
|
|
251
|
+
for (const e of [...inputs.overHttps, ...inputs.overHttp]) if (ORIGIN_KINDS.has(e.kind)) out.add(e.baseUrl);
|
|
252
|
+
for (const c of inputs.custom) out.add(c.baseUrl);
|
|
253
|
+
for (const o of inputs.localNameOrigins) out.add(o);
|
|
254
|
+
return [...out];
|
|
255
|
+
}
|
|
234
256
|
//#endregion
|
|
235
257
|
//#region src/builtins/local-network/ipv6-lan.ts
|
|
236
258
|
/**
|
|
@@ -616,11 +638,14 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
616
638
|
/** `getAddresses`: the Addresses table and every role's answer. */
|
|
617
639
|
async addressBook(scheme) {
|
|
618
640
|
const { http, https } = await this.palettes();
|
|
619
|
-
|
|
641
|
+
const state = this.addressState([...http, ...https]);
|
|
642
|
+
const httpsPort = (await this.resolveAdvertisedListenPort(null)).port;
|
|
643
|
+
return buildAddressBook(state, {
|
|
620
644
|
rowsPalette: scheme === "http" ? http : https,
|
|
621
645
|
httpsPalette: https,
|
|
622
646
|
appLink: appLinkEndpoint(),
|
|
623
|
-
appLinkHub: require_dist.pickAppLinkHub(https)
|
|
647
|
+
appLinkHub: require_dist.pickAppLinkHub(https),
|
|
648
|
+
listenerOrigins: this.listenerOriginsNow(state, http, httpsPort)
|
|
624
649
|
});
|
|
625
650
|
}
|
|
626
651
|
/**
|
|
@@ -711,17 +736,33 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
711
736
|
const detected = this.endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort);
|
|
712
737
|
return withAppConnectionCustomEndpoints(detected, this.addressState(detected));
|
|
713
738
|
}
|
|
739
|
+
/**
|
|
740
|
+
* Where the listeners answer, whatever the rows advertise: the HTTPS
|
|
741
|
+
* listener's origin per allowlisted LAN address, the HTTP one while it is
|
|
742
|
+
* on (`http` is the palette that already carries those rows).
|
|
743
|
+
*/
|
|
744
|
+
listenerOriginsNow(state, http, httpsPort) {
|
|
745
|
+
const httpListening = this.config.httpEnabled !== false && require_tls.readLanHttpState().listening;
|
|
746
|
+
const hostname = this.config.localHostname || null;
|
|
747
|
+
const localNameOrigins = hostname === null ? [] : [`https://${hostname}:${httpsPort}`, ...httpListening ? [`http://${hostname}:${this.resolvedHttpPort()}`] : []];
|
|
748
|
+
return buildListenerOrigins({
|
|
749
|
+
overHttps: this.endpointsNow(false, false, "https", httpsPort, false),
|
|
750
|
+
overHttp: httpListening ? http : [],
|
|
751
|
+
custom: state.custom,
|
|
752
|
+
localNameOrigins
|
|
753
|
+
});
|
|
754
|
+
}
|
|
714
755
|
/** The DETECTED palette from the cached interface/tunnel/mesh state. */
|
|
715
|
-
endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort) {
|
|
756
|
+
endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort, advertiseLanHttp = true) {
|
|
716
757
|
const interfaces = applyAllowlist(this.enumerate(), this.config.allowedAddresses);
|
|
717
758
|
const httpState = require_tls.readLanHttpState();
|
|
718
|
-
return buildEndpoints(interfaces, httpsPort, includeLoopback, ipv4Only, this.publicHostname, scheme, this.meshEndpoint, {
|
|
759
|
+
return buildEndpoints(interfaces, httpsPort, includeLoopback, ipv4Only, this.publicHostname, scheme, this.meshEndpoint, advertiseLanHttp ? {
|
|
719
760
|
enabled: this.config.httpEnabled !== false,
|
|
720
761
|
listening: httpState.listening,
|
|
721
762
|
httpPort: this.resolvedHttpPort(),
|
|
722
763
|
httpsPort,
|
|
723
764
|
localHostname: this.config.localHostname || null
|
|
724
|
-
});
|
|
765
|
+
} : null);
|
|
725
766
|
}
|
|
726
767
|
async onInitialize() {
|
|
727
768
|
if (!this.config.bootSeeded) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { D as HUB_MDNS_TXT_KEYS, E as HUB_MDNS_SERVICE_TYPE, Hn as validateCustomAddress, It as isAppLinkBase, Sn as resolveHubAddressRoles, Tn as resolveNotificationTapAddress, Yt as localNetworkCapability, dn as pickAppLinkHub, lr as BaseAddon, rt as checkRoleAddress, s as CAMSTACK_APP_LINK_ORIGIN, ti as EventCategory, vn as resolveAppConnections, zt as isDefaultAppConnectionEndpoint } from "../../dist-
|
|
2
|
+
import { D as HUB_MDNS_TXT_KEYS, E as HUB_MDNS_SERVICE_TYPE, Hn as validateCustomAddress, It as isAppLinkBase, Sn as resolveHubAddressRoles, Tn as resolveNotificationTapAddress, Yt as localNetworkCapability, dn as pickAppLinkHub, lr as BaseAddon, rt as checkRoleAddress, s as CAMSTACK_APP_LINK_ORIGIN, ti as EventCategory, vn as resolveAppConnections, zt as isDefaultAppConnectionEndpoint } from "../../dist-CGz9u2HD.mjs";
|
|
3
3
|
import { P as readLanHttpState, _ as writeExtraSans, h as readTlsMode, i as storeUploadedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readTlsAccessStatus, n as regenerateCertificate, p as readExtraSans, r as revertToGeneratedCertificate, t as applyCertificateToListener, u as servedHttpsLeafFingerprint, y as ensureTlsCert } from "../../tls-CaOLZ09W.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isIP } from "node:net";
|
|
@@ -226,9 +226,31 @@ function buildAddressBook(state, inputs) {
|
|
|
226
226
|
...state.custom.filter((c) => !detectedUrls.has(c.baseUrl)).map((c) => row(customEndpoint(c), false))
|
|
227
227
|
],
|
|
228
228
|
roles,
|
|
229
|
-
appLinkHub: inputs.appLinkHub
|
|
229
|
+
appLinkHub: inputs.appLinkHub,
|
|
230
|
+
listenerOrigins: inputs.listenerOrigins
|
|
230
231
|
};
|
|
231
232
|
}
|
|
233
|
+
var ORIGIN_KINDS = new Set([
|
|
234
|
+
"lan-ipv4",
|
|
235
|
+
"lan-ipv6",
|
|
236
|
+
"public"
|
|
237
|
+
]);
|
|
238
|
+
/**
|
|
239
|
+
* Every origin a browser can really reach this hub at: the HTTPS listener's
|
|
240
|
+
* `https://<lan>:<httpsPort>` AND, while the LAN HTTP listener is on,
|
|
241
|
+
* `http://<lan>:<httpPort>`; plus the public and custom addresses. The rows
|
|
242
|
+
* show `http://` only while LAN HTTP is on (native clients skip the private
|
|
243
|
+
* certificate), so the https origin the admin UI is opened at is in no row —
|
|
244
|
+
* a sign-in return (D794) matches against this list instead of falling back
|
|
245
|
+
* to the public endpoint. Never loopback, never the app link.
|
|
246
|
+
*/
|
|
247
|
+
function buildListenerOrigins(inputs) {
|
|
248
|
+
const out = /* @__PURE__ */ new Set();
|
|
249
|
+
for (const e of [...inputs.overHttps, ...inputs.overHttp]) if (ORIGIN_KINDS.has(e.kind)) out.add(e.baseUrl);
|
|
250
|
+
for (const c of inputs.custom) out.add(c.baseUrl);
|
|
251
|
+
for (const o of inputs.localNameOrigins) out.add(o);
|
|
252
|
+
return [...out];
|
|
253
|
+
}
|
|
232
254
|
//#endregion
|
|
233
255
|
//#region src/builtins/local-network/ipv6-lan.ts
|
|
234
256
|
/**
|
|
@@ -614,11 +636,14 @@ var LocalNetworkAddon = class extends BaseAddon {
|
|
|
614
636
|
/** `getAddresses`: the Addresses table and every role's answer. */
|
|
615
637
|
async addressBook(scheme) {
|
|
616
638
|
const { http, https } = await this.palettes();
|
|
617
|
-
|
|
639
|
+
const state = this.addressState([...http, ...https]);
|
|
640
|
+
const httpsPort = (await this.resolveAdvertisedListenPort(null)).port;
|
|
641
|
+
return buildAddressBook(state, {
|
|
618
642
|
rowsPalette: scheme === "http" ? http : https,
|
|
619
643
|
httpsPalette: https,
|
|
620
644
|
appLink: appLinkEndpoint(),
|
|
621
|
-
appLinkHub: pickAppLinkHub(https)
|
|
645
|
+
appLinkHub: pickAppLinkHub(https),
|
|
646
|
+
listenerOrigins: this.listenerOriginsNow(state, http, httpsPort)
|
|
622
647
|
});
|
|
623
648
|
}
|
|
624
649
|
/**
|
|
@@ -709,17 +734,33 @@ var LocalNetworkAddon = class extends BaseAddon {
|
|
|
709
734
|
const detected = this.endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort);
|
|
710
735
|
return withAppConnectionCustomEndpoints(detected, this.addressState(detected));
|
|
711
736
|
}
|
|
737
|
+
/**
|
|
738
|
+
* Where the listeners answer, whatever the rows advertise: the HTTPS
|
|
739
|
+
* listener's origin per allowlisted LAN address, the HTTP one while it is
|
|
740
|
+
* on (`http` is the palette that already carries those rows).
|
|
741
|
+
*/
|
|
742
|
+
listenerOriginsNow(state, http, httpsPort) {
|
|
743
|
+
const httpListening = this.config.httpEnabled !== false && readLanHttpState().listening;
|
|
744
|
+
const hostname = this.config.localHostname || null;
|
|
745
|
+
const localNameOrigins = hostname === null ? [] : [`https://${hostname}:${httpsPort}`, ...httpListening ? [`http://${hostname}:${this.resolvedHttpPort()}`] : []];
|
|
746
|
+
return buildListenerOrigins({
|
|
747
|
+
overHttps: this.endpointsNow(false, false, "https", httpsPort, false),
|
|
748
|
+
overHttp: httpListening ? http : [],
|
|
749
|
+
custom: state.custom,
|
|
750
|
+
localNameOrigins
|
|
751
|
+
});
|
|
752
|
+
}
|
|
712
753
|
/** The DETECTED palette from the cached interface/tunnel/mesh state. */
|
|
713
|
-
endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort) {
|
|
754
|
+
endpointsNow(includeLoopback, ipv4Only, scheme, httpsPort, advertiseLanHttp = true) {
|
|
714
755
|
const interfaces = applyAllowlist(this.enumerate(), this.config.allowedAddresses);
|
|
715
756
|
const httpState = readLanHttpState();
|
|
716
|
-
return buildEndpoints(interfaces, httpsPort, includeLoopback, ipv4Only, this.publicHostname, scheme, this.meshEndpoint, {
|
|
757
|
+
return buildEndpoints(interfaces, httpsPort, includeLoopback, ipv4Only, this.publicHostname, scheme, this.meshEndpoint, advertiseLanHttp ? {
|
|
717
758
|
enabled: this.config.httpEnabled !== false,
|
|
718
759
|
listening: httpState.listening,
|
|
719
760
|
httpPort: this.resolvedHttpPort(),
|
|
720
761
|
httpsPort,
|
|
721
762
|
localHostname: this.config.localHostname || null
|
|
722
|
-
});
|
|
763
|
+
} : null);
|
|
723
764
|
}
|
|
724
765
|
async onInitialize() {
|
|
725
766
|
if (!this.config.bootSeeded) {
|
|
@@ -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-K3WFop9Q.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 { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-
|
|
1
|
+
import { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-CGz9u2HD.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-K3WFop9Q.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
9
|
node_os = require_chunk.__toESM(node_os);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as foldSnapshotByFunction, Tr as createEvent, cr as errMsg, gn as reducePoints, lr as BaseAddon, rn as metricsProviderCapability, ti as EventCategory, yn as resolveBucketMs } from "../../dist-
|
|
1
|
+
import { Nt as foldSnapshotByFunction, Tr as createEvent, cr as errMsg, gn as reducePoints, lr as BaseAddon, rn as metricsProviderCapability, ti as EventCategory, yn as resolveBucketMs } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import { platform } from "node:os";
|
|
@@ -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-K3WFop9Q.js");
|
|
7
7
|
let node_os = require("node:os");
|
|
8
8
|
node_os = require_chunk.__toESM(node_os);
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { cr as errMsg, kn as scoreRuntimes, kr as emitReadiness, lr as BaseAddon, pn as platformProbeCapability, ti as EventCategory, wt as enumerateInferenceDevices } from "../../dist-
|
|
2
|
+
import { cr as errMsg, kn as scoreRuntimes, kr as emitReadiness, lr as BaseAddon, pn as platformProbeCapability, ti as EventCategory, wt as enumerateInferenceDevices } from "../../dist-CGz9u2HD.mjs";
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
@@ -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-K3WFop9Q.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 { lr as BaseAddon, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { lr as BaseAddon, ti as EventCategory } from "../../dist-CGz9u2HD.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
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Br as nodePin, Mn as snapshotCapability, Q as batteryCapability, Rn as streamQualityLabel, Z as bareAddonId, a as BatteryStatusSchema, ar as DeviceFeature, cr as errMsg, lr as BaseAddon, nn as memoizePinnedFfmpeg, sr as DeviceType, ti as EventCategory, vt as deriveBatteryPresence } from "../../dist-
|
|
1
|
+
import { Br as nodePin, Mn as snapshotCapability, Q as batteryCapability, Rn as streamQualityLabel, Z as bareAddonId, a as BatteryStatusSchema, ar as DeviceFeature, cr as errMsg, lr as BaseAddon, nn as memoizePinnedFfmpeg, sr as DeviceType, ti as EventCategory, vt as deriveBatteryPresence } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DatabaseSnapshotRequest, DatabaseSnapshotTargets, DatabaseSnapshotWritten, IDatabaseSnapshotProvider } from "@camstack/types";
|
|
2
|
+
import type { OwnedSqliteFile } from "./owned-sqlite-file.js";
|
|
3
|
+
/** What the provider needs from an owned file. */
|
|
4
|
+
export type SnapshotableFile = Pick<OwnedSqliteFile, "databaseId" | "livePath" | "snapshot">;
|
|
5
|
+
/** What the provider needs from the placement router. */
|
|
6
|
+
export interface OpenFileSource {
|
|
7
|
+
openFiles(): readonly SnapshotableFile[];
|
|
8
|
+
}
|
|
9
|
+
export declare class DatabaseSnapshotProvider implements IDatabaseSnapshotProvider {
|
|
10
|
+
private readonly source;
|
|
11
|
+
/** Same database asked twice: the second call joins the first. */
|
|
12
|
+
private readonly inFlight;
|
|
13
|
+
/** Different databases run one after the other: the disk reserve check is per copy. */
|
|
14
|
+
private tail;
|
|
15
|
+
constructor(source: OpenFileSource);
|
|
16
|
+
listDatabases(): Promise<DatabaseSnapshotTargets>;
|
|
17
|
+
writeSnapshot(input: DatabaseSnapshotRequest): Promise<DatabaseSnapshotWritten>;
|
|
18
|
+
}
|
|
@@ -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-K3WFop9Q.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { In as storageProviderCapability, Mt as filesystemBrowseCapability, lr as BaseAddon } from "../../dist-
|
|
1
|
+
import { In as storageProviderCapability, Mt as filesystemBrowseCapability, lr as BaseAddon } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-Bzm3O2Nj.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { A as SQLITE_PAGE_CACHE_CEILING_KIB, B as sqliteEngineStorm, D as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, F as SQLITE_PROFILE_REPORT_FLOOR_MS, I as SQLITE_PROFILE_REPORT_INTERVAL_MS, L as SQLITE_PROFILE_TOP_N, M as sqliteMmapSizeFor, N as sqlitePageCacheKibFor, O as SQLITE_MMAP_CEILING_BYTES, P as SQLITE_ENGINE_STORM_WALL_SHARE, R as SQLITE_SLOW_CALL_MS, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_FLOOR_KIB, k as SQLITE_MMAP_FLOOR_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SqliteOpProfiler } from "../../wal-maintenance-
|
|
2
|
+
import { A as SQLITE_PAGE_CACHE_CEILING_KIB, B as sqliteEngineStorm, D as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, F as SQLITE_PROFILE_REPORT_FLOOR_MS, I as SQLITE_PROFILE_REPORT_INTERVAL_MS, L as SQLITE_PROFILE_TOP_N, M as sqliteMmapSizeFor, N as sqlitePageCacheKibFor, O as SQLITE_MMAP_CEILING_BYTES, P as SQLITE_ENGINE_STORM_WALL_SHARE, R as SQLITE_SLOW_CALL_MS, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_FLOOR_KIB, k as SQLITE_MMAP_FLOOR_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SqliteOpProfiler } from "../../wal-maintenance-BZhzoxqA.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -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-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-Dr2AyhsD.js");
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-Bzm3O2Nj.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
11
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -969,6 +969,51 @@ async function openOwnedSqliteFile(spec, deps) {
|
|
|
969
969
|
return file;
|
|
970
970
|
}
|
|
971
971
|
//#endregion
|
|
972
|
+
//#region src/builtins/sqlite-storage/database-snapshot-provider.ts
|
|
973
|
+
/**
|
|
974
|
+
* The `database-snapshot` provider of the SQLite engine: every owned database
|
|
975
|
+
* file it has open is listed, and each is snapshotted through its OWN
|
|
976
|
+
* connection (D679, D693) — never by copying files.
|
|
977
|
+
*
|
|
978
|
+
* The list is read from the router at CALL time, not at boot: a file created at
|
|
979
|
+
* runtime (the first declaration that names `events` or `history`) is listed
|
|
980
|
+
* from the moment it opens, so no backup can leave it out.
|
|
981
|
+
*/
|
|
982
|
+
var DatabaseSnapshotProvider = class {
|
|
983
|
+
source;
|
|
984
|
+
/** Same database asked twice: the second call joins the first. */
|
|
985
|
+
inFlight = /* @__PURE__ */ new Map();
|
|
986
|
+
/** Different databases run one after the other: the disk reserve check is per copy. */
|
|
987
|
+
tail = Promise.resolve();
|
|
988
|
+
constructor(source) {
|
|
989
|
+
this.source = source;
|
|
990
|
+
}
|
|
991
|
+
async listDatabases() {
|
|
992
|
+
return { databases: this.source.openFiles().map((file) => ({
|
|
993
|
+
databaseId: file.databaseId,
|
|
994
|
+
livePath: node_path.default.resolve(file.livePath)
|
|
995
|
+
})) };
|
|
996
|
+
}
|
|
997
|
+
writeSnapshot(input) {
|
|
998
|
+
const running = this.inFlight.get(input.databaseId);
|
|
999
|
+
if (running !== void 0) return running;
|
|
1000
|
+
const file = this.source.openFiles().find((f) => f.databaseId === input.databaseId);
|
|
1001
|
+
if (file === void 0) return Promise.reject(/* @__PURE__ */ new Error(`database snapshot refused: database "${input.databaseId}" is not open`));
|
|
1002
|
+
const run = this.tail.catch(() => void 0).then(async () => {
|
|
1003
|
+
return {
|
|
1004
|
+
...await file.snapshot(),
|
|
1005
|
+
databaseId: file.databaseId
|
|
1006
|
+
};
|
|
1007
|
+
});
|
|
1008
|
+
this.tail = run;
|
|
1009
|
+
const tracked = run.finally(() => {
|
|
1010
|
+
this.inFlight.delete(input.databaseId);
|
|
1011
|
+
});
|
|
1012
|
+
this.inFlight.set(input.databaseId, tracked);
|
|
1013
|
+
return tracked;
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
//#endregion
|
|
972
1017
|
//#region src/builtins/sqlite-storage/placement-router.ts
|
|
973
1018
|
function scopedName(namespace, collection) {
|
|
974
1019
|
return namespace ? `${namespace}:${collection}` : collection;
|
|
@@ -1344,10 +1389,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
1344
1389
|
},
|
|
1345
1390
|
{
|
|
1346
1391
|
capability: require_dist.databaseSnapshotCapability,
|
|
1347
|
-
provider:
|
|
1348
|
-
listDatabases: async () => ({ databases: [{ livePath: node_path.default.resolve(settings.livePath) }] }),
|
|
1349
|
-
writeSnapshot: async () => settings.snapshot()
|
|
1350
|
-
}
|
|
1392
|
+
provider: new DatabaseSnapshotProvider(router)
|
|
1351
1393
|
}
|
|
1352
1394
|
];
|
|
1353
1395
|
}
|