@camstack/system 1.2.425 → 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-orchestrator.addon.d.ts +6 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +22 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +22 -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/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/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 +3 -3
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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-197keifF.js → composition-sources-60tuHQ9N.js} +1 -1
- package/dist/{composition-sources-DmzTSy26.mjs → composition-sources-gxVpghXh.mjs} +1 -1
- package/dist/{constants-CkNLi-XW.mjs → constants-B6YTf0v2.mjs} +1 -1
- package/dist/{constants-B5Jd8Zch.js → constants-CO5zpJQY.js} +1 -1
- package/dist/{dist-DMWeqeTF.mjs → dist-CGz9u2HD.mjs} +37 -1
- package/dist/{dist-DnALrQF-.js → dist-K3WFop9Q.js} +37 -1
- 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-DeqG7LD9.js → jwt-signing-key-BdDy9ZJN.js} +1 -1
- package/dist/{jwt-signing-key-CCHXAtrs.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-C4UhQOsg.js → restore-archive-BJp4Llea.js} +1 -1
- package/dist/{restore-archive-GevpOHw8.mjs → restore-archive-CZyUM8Qf.mjs} +1 -1
- package/dist/{retired-settings-keys-0FOsnzIE.js → retired-settings-keys-Dr2AyhsD.js} +1 -1
- package/dist/{retired-settings-keys-CdVFl7m2.mjs → retired-settings-keys-Dut6QWh6.mjs} +1 -1
- package/dist/{wal-maintenance-BtfyfuT5.mjs → wal-maintenance-BZhzoxqA.mjs} +0 -0
- package/dist/{wal-maintenance-DJV1rde2.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
|
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_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as addonPagesCapability, cr as errMsg, lr as BaseAddon, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { G as addonPagesCapability, cr as errMsg, lr as BaseAddon, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cr as errMsg, lr as BaseAddon, q as addonWidgetsCapability, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { cr as errMsg, lr as BaseAddon, q as addonWidgetsCapability, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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/alerts/device-label.ts
|
|
8
8
|
/**
|
|
9
9
|
* Operator-facing device label for alert messages.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as alertsCapability, Tr as createEvent, cr as errMsg, lr as BaseAddon, n as AlertSchema, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { J as alertsCapability, Tr as createEvent, cr as errMsg, lr as BaseAddon, n as AlertSchema, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
//#region src/builtins/alerts/device-label.ts
|
|
3
3
|
/**
|
|
4
4
|
* Operator-facing device label for alert messages.
|
|
@@ -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/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as FIRST_LEVEL_MACRO_CLASSES, Pr as isEvent, Z as bareAddonId, cr as errMsg, hn as ptzAutotrackCapability, lr as BaseAddon, ti as EventCategory } from "../../dist-
|
|
1
|
+
import { C as FIRST_LEVEL_MACRO_CLASSES, Pr as isEvent, Z as bareAddonId, cr as errMsg, hn as ptzAutotrackCapability, lr as BaseAddon, ti as EventCategory } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -271,6 +271,12 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
|
|
|
271
271
|
* - the stamp could not be written → logged, named, not swallowed.
|
|
272
272
|
*/
|
|
273
273
|
private runScheduledBackup;
|
|
274
|
+
/**
|
|
275
|
+
* The database files the owner has open right now, for the selection UI. An
|
|
276
|
+
* owner that cannot answer is `answered: false` — never an empty list, which
|
|
277
|
+
* the UI would read as "none exists yet".
|
|
278
|
+
*/
|
|
279
|
+
private listAvailableDatabases;
|
|
274
280
|
private listSchedules;
|
|
275
281
|
private upsertSchedule;
|
|
276
282
|
private deleteSchedule;
|
|
@@ -3,8 +3,8 @@ 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_restore_archive = require("../../restore-archive-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
|
+
const require_restore_archive = require("../../restore-archive-BJp4Llea.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
10
10
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -2272,6 +2272,7 @@ var BackupOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
|
2272
2272
|
upsertDestinationPolicy: (input) => this.upsertDestinationPolicy(input),
|
|
2273
2273
|
previewSchedule: (input) => this.previewSchedule(input),
|
|
2274
2274
|
listSchedules: () => this.listSchedules(),
|
|
2275
|
+
listAvailableDatabases: () => this.listAvailableDatabases(),
|
|
2275
2276
|
upsertSchedule: (input) => this.upsertSchedule(input),
|
|
2276
2277
|
deleteSchedule: (input) => this.deleteSchedule(input)
|
|
2277
2278
|
};
|
|
@@ -3317,6 +3318,25 @@ var BackupOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
|
3317
3318
|
} });
|
|
3318
3319
|
}
|
|
3319
3320
|
}
|
|
3321
|
+
/**
|
|
3322
|
+
* The database files the owner has open right now, for the selection UI. An
|
|
3323
|
+
* owner that cannot answer is `answered: false` — never an empty list, which
|
|
3324
|
+
* the UI would read as "none exists yet".
|
|
3325
|
+
*/
|
|
3326
|
+
async listAvailableDatabases() {
|
|
3327
|
+
try {
|
|
3328
|
+
return {
|
|
3329
|
+
answered: true,
|
|
3330
|
+
databases: (await this.databaseOwner().listDatabases()).map((d) => d.databaseId)
|
|
3331
|
+
};
|
|
3332
|
+
} catch (err) {
|
|
3333
|
+
this.ctx.logger.warn("Backup database list: the database owner did not answer", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
3334
|
+
return {
|
|
3335
|
+
answered: false,
|
|
3336
|
+
databases: []
|
|
3337
|
+
};
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3320
3340
|
async listSchedules() {
|
|
3321
3341
|
if (!this.schedules) return [];
|
|
3322
3342
|
return (await this.schedules.list()).map((s) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Br as nodePin, Fn as storageOccupancyCapability, Qr as toNodeId, X as backupCapability, lr as BaseAddon, ti as EventCategory, tn as mayWriteToLocation } from "../../dist-
|
|
2
|
-
import { a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-
|
|
1
|
+
import { Br as nodePin, Fn as storageOccupancyCapability, Qr as toNodeId, X as backupCapability, lr as BaseAddon, ti as EventCategory, tn as mayWriteToLocation } from "../../dist-CGz9u2HD.mjs";
|
|
2
|
+
import { a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-CZyUM8Qf.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -2264,6 +2264,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2264
2264
|
upsertDestinationPolicy: (input) => this.upsertDestinationPolicy(input),
|
|
2265
2265
|
previewSchedule: (input) => this.previewSchedule(input),
|
|
2266
2266
|
listSchedules: () => this.listSchedules(),
|
|
2267
|
+
listAvailableDatabases: () => this.listAvailableDatabases(),
|
|
2267
2268
|
upsertSchedule: (input) => this.upsertSchedule(input),
|
|
2268
2269
|
deleteSchedule: (input) => this.deleteSchedule(input)
|
|
2269
2270
|
};
|
|
@@ -3309,6 +3310,25 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
3309
3310
|
} });
|
|
3310
3311
|
}
|
|
3311
3312
|
}
|
|
3313
|
+
/**
|
|
3314
|
+
* The database files the owner has open right now, for the selection UI. An
|
|
3315
|
+
* owner that cannot answer is `answered: false` — never an empty list, which
|
|
3316
|
+
* the UI would read as "none exists yet".
|
|
3317
|
+
*/
|
|
3318
|
+
async listAvailableDatabases() {
|
|
3319
|
+
try {
|
|
3320
|
+
return {
|
|
3321
|
+
answered: true,
|
|
3322
|
+
databases: (await this.databaseOwner().listDatabases()).map((d) => d.databaseId)
|
|
3323
|
+
};
|
|
3324
|
+
} catch (err) {
|
|
3325
|
+
this.ctx.logger.warn("Backup database list: the database owner did not answer", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
3326
|
+
return {
|
|
3327
|
+
answered: false,
|
|
3328
|
+
databases: []
|
|
3329
|
+
};
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3312
3332
|
async listSchedules() {
|
|
3313
3333
|
if (!this.schedules) return [];
|
|
3314
3334
|
return (await this.schedules.list()).map((s) => {
|
|
@@ -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_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lr as BaseAddon, p as CalendarPreferencesSchema, tt as calendarsCapability } from "../../dist-
|
|
1
|
+
import { lr as BaseAddon, p as CalendarPreferencesSchema, tt as calendarsCapability } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jn as buildFfmpegArgs, Ln as streamCatalogCapability, Mn as snapshotCapability, Mr as hydrateSchema, P as MOTION_CLOSE_AFTER_MS, Tr as createEvent, an as motionCapability, ar as DeviceFeature, b as DERIVED_CAMERA_SILENCED_CAP_NAMES, cr as errMsg, ht as declarationOwnerNodeId, i as BaseDevice, lr as BaseAddon, nn as memoizePinnedFfmpeg, nt as cameraGridLayoutCapability, sr as DeviceType, ti as EventCategory, x as DeclaredDevices } from "../../dist-
|
|
1
|
+
import { Jn as buildFfmpegArgs, Ln as streamCatalogCapability, Mn as snapshotCapability, Mr as hydrateSchema, P as MOTION_CLOSE_AFTER_MS, Tr as createEvent, an as motionCapability, ar as DeviceFeature, b as DERIVED_CAMERA_SILENCED_CAP_NAMES, cr as errMsg, ht as declarationOwnerNodeId, i as BaseDevice, lr as BaseAddon, nn as memoizePinnedFfmpeg, nt as cameraGridLayoutCapability, sr as DeviceType, ti as EventCategory, x as DeclaredDevices } from "../../dist-CGz9u2HD.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
+
const require_dist = require("../../dist-K3WFop9Q.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-60tuHQ9N.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as buildCapabilityLookup, $n as compositionItemFieldPath, At as expressionContainsBuiltinCall, Dt as evaluateCompositionField, Qn as compositionFeatureEnabled, Tr as createEvent, Xn as composedDeviceRef, Yn as cloneStatefulExpressionMemory, Zn as composedDeviceStableId, at as compositionFieldKey, cr as errMsg, er as compositionSliceKey, fn as planComposition, i as BaseDevice, ir as toExpressionValue, it as composerCapability, l as COMPOSED_ITEM_FIXED_FIELDS, lr as BaseAddon, nr as createStatefulExpressionMemory, qn as COMPOSER_ADDON_ID, rr as disarmRoseMemory, sr as DeviceType, t as ALL_CAPABILITY_DEFINITIONS, ti as EventCategory, tr as compositionSourceKey, x as DeclaredDevices } from "../../dist-
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { $ as buildCapabilityLookup, $n as compositionItemFieldPath, At as expressionContainsBuiltinCall, Dt as evaluateCompositionField, Qn as compositionFeatureEnabled, Tr as createEvent, Xn as composedDeviceRef, Yn as cloneStatefulExpressionMemory, Zn as composedDeviceStableId, at as compositionFieldKey, cr as errMsg, er as compositionSliceKey, fn as planComposition, i as BaseDevice, ir as toExpressionValue, it as composerCapability, l as COMPOSED_ITEM_FIXED_FIELDS, lr as BaseAddon, nr as createStatefulExpressionMemory, qn as COMPOSER_ADDON_ID, rr as disarmRoseMemory, sr as DeviceType, t as ALL_CAPABILITY_DEFINITIONS, ti as EventCategory, tr as compositionSourceKey, x as DeclaredDevices } from "../../dist-CGz9u2HD.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-gxVpghXh.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-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) {
|