@camstack/server 1.2.928 → 1.2.930
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/CHANGELOG.md +12 -0
- package/package.json +10 -10
- package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
- package/system/dist/addon-id-Di0lNJ89.js +50 -0
- package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
- package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
- package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
- package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
- package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
- package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
- package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
- package/system/dist/base-device-2sL1DMm1.js +1103 -0
- package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
- package/system/dist/builtins/alerts/alerts.addon.js +113 -56
- package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
- package/system/dist/builtins/autotrack/index.js +21 -17
- package/system/dist/builtins/autotrack/index.mjs +5 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
- package/system/dist/builtins/calendars/calendars.addon.js +8 -6
- package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
- package/system/dist/builtins/camera-grid/index.js +615 -58
- package/system/dist/builtins/camera-grid/index.mjs +558 -1
- package/system/dist/builtins/composer/composer.addon.js +788 -209
- package/system/dist/builtins/composer/composer.addon.mjs +583 -4
- package/system/dist/builtins/console-logging/index.js +4 -3
- package/system/dist/builtins/console-logging/index.mjs +2 -1
- package/system/dist/builtins/core-blocks/actions-service.d.ts +18 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +8670 -386
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +8294 -11
- package/system/dist/builtins/core-blocks/tcp-connect.d.ts +3 -0
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +250 -21
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +230 -1
- package/system/dist/builtins/device-history/device-history.addon.js +110 -31
- package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
- package/system/dist/builtins/hub-forwarder/index.js +4 -3
- package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
- package/system/dist/builtins/keychain/index.js +31 -28
- package/system/dist/builtins/keychain/index.mjs +7 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
- package/system/dist/builtins/local-network/local-network.addon.js +43 -39
- package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
- package/system/dist/builtins/loki-logging/index.js +23 -17
- package/system/dist/builtins/loki-logging/index.mjs +7 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
- package/system/dist/builtins/platform-probe/index.js +25 -23
- package/system/dist/builtins/platform-probe/index.mjs +12 -10
- package/system/dist/builtins/record-entries/index.js +9 -7
- package/system/dist/builtins/record-entries/index.mjs +3 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +97 -44
- package/system/dist/builtins/snapshot/index.mjs +54 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
- package/system/dist/builtins/system-config/system-config.addon.js +17 -14
- package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
- package/system/dist/builtins/winston-logging/index.js +7 -5
- package/system/dist/builtins/winston-logging/index.mjs +3 -1
- package/system/dist/calendars.cap-CaFlShS9.js +155 -0
- package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
- package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
- package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
- package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
- package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
- package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
- package/system/dist/capability-definition-HCmTem8c.js +242 -0
- package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
- package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
- package/system/dist/command-origin-claim-Cief660O.js +35 -0
- package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
- package/system/dist/composition-sources-BEUWn2s_.mjs +391 -0
- package/system/dist/composition-sources-acfR4hDq.js +408 -0
- package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
- package/system/dist/constants-C860Y6U4.js +26 -0
- package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
- package/system/dist/constants-DCLpoF4L.mjs +21 -0
- package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
- package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
- package/system/dist/core-blocks.cap-BMeMCBrx.js +18733 -0
- package/system/dist/core-blocks.cap-BRPsLAij.mjs +18008 -0
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
- package/system/dist/custom-actions-D92NRi2c.js +36 -0
- package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
- package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
- package/system/dist/declared-device-BWphj9WE.js +303 -0
- package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
- package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
- package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
- package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
- package/system/dist/device-certificate-CguVACQO.js +162 -0
- package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
- package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
- package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
- package/system/dist/device-kind-CsSiv_YF.js +101 -0
- package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
- package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
- package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
- package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
- package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
- package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
- package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
- package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
- package/system/dist/device-type-CbQsnFdC.js +477 -0
- package/system/dist/device-type-DgEvK3ch.mjs +454 -0
- package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
- package/system/dist/entry-kind-cq90c--V.js +55 -0
- package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
- package/system/dist/error.cap-DBhgPeWK.js +3848 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/history-catalog-BKRarIL_.js +831 -0
- package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
- package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
- package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
- package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
- package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
- package/system/dist/index.js +763 -151
- package/system/dist/index.mjs +832 -220
- package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
- package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
- package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
- package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
- package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
- package/system/dist/l10n-CGMvp7NF.js +15 -0
- package/system/dist/labels-DX5S8deC.js +81 -0
- package/system/dist/labels-DsBcU7md.mjs +64 -0
- package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
- package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
- package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
- package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
- package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
- package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
- package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
- package/system/dist/mask-shape-CmPA2fst.js +92 -0
- package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
- package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
- package/system/dist/migration-BMjgkyG2.js +380 -0
- package/system/dist/migration-DRJAtdy7.mjs +321 -0
- package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
- package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
- package/system/dist/notification-rules.cap-BDh0LDhV.js +3428 -0
- package/system/dist/notification-rules.cap-DUmiMBQB.mjs +3357 -0
- package/system/dist/notification-targets-CRH-9Dy5.js +509 -0
- package/system/dist/notification-targets-DaNE-pIt.mjs +486 -0
- package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
- package/system/dist/ops-log-pxt9176Z.js +81 -0
- package/system/dist/pinned-binary-BOhOSNff.js +28 -0
- package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
- package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
- package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
- package/system/dist/prefix-walk-BkMxoXpL.js +843 -0
- package/system/dist/prefix-walk-ifwg_ukx.mjs +790 -0
- package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
- package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
- package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
- package/system/dist/quantity-lY1KiTSZ.js +143 -0
- package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
- package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
- package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
- package/system/dist/record-entries.cap-ti1C046R.js +80 -0
- package/system/dist/record-kind-DoBfYHCs.js +203 -0
- package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
- package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
- package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
- package/system/dist/records.cap-ClcWV64i.js +329 -0
- package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
- package/system/dist/relocate-CdVQAk-w.js +804 -0
- package/system/dist/relocate-CoZZTui1.mjs +661 -0
- package/system/dist/rename-composition-block-BJsL58Ih.js +34798 -0
- package/system/dist/rename-composition-block-OAtErZgq.mjs +33631 -0
- package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
- package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
- package/system/dist/scoped-settings-CylSSq_8.js +955 -0
- package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
- package/system/dist/server-name-BIhLuHvX.mjs +35 -0
- package/system/dist/server-name-OALNvpqC.js +52 -0
- package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
- package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
- package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
- package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
- package/system/dist/source-info-DGB7SdB_.mjs +190 -0
- package/system/dist/source-info-DtWf4k2j.js +225 -0
- package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
- package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
- package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
- package/system/dist/storage-location-CTweDMZf.js +198 -0
- package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
- package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
- package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
- package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
- package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
- package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
- package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
- package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
- package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
- package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
- package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
- package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
- package/system/dist/system-reasons-Be_k1W8g.js +25 -0
- package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
- package/system/dist/tag-BxLazvVb.js +2138 -0
- package/system/dist/tag-uZBAq6ox.mjs +2073 -0
- package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
- package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
- package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
- package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
- package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
- package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
- package/system/dist/zod-secret-DS7mj1bk.js +78 -0
- package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
- package/system/package.json +1 -1
- package/system/dist/composition-sources-BI614LJx.mjs +0 -141
- package/system/dist/composition-sources-v_kkb8A9.js +0 -152
- package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
- package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
- package/system/dist/dist-BCHMSqzc.mjs +0 -143467
- package/system/dist/dist-BZfvhfS1.js +0 -146970
- package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
- package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
- package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
- package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const
|
|
3
|
+
const require_base_addon = require("../../base-addon-DD5dIfcZ.js");
|
|
4
|
+
const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
|
|
5
|
+
const require_migration = require("../../migration-BMjgkyG2.js");
|
|
6
|
+
const require_network_access_cap = require("../../network-access.cap-B5TWLDCC.js");
|
|
7
|
+
const require_server_name = require("../../server-name-OALNvpqC.js");
|
|
4
8
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_identity = require("../../hub-identity-
|
|
6
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-BMdR3Mw9.js");
|
|
10
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao--0v1TKME.js");
|
|
7
11
|
let zod = require("zod");
|
|
8
12
|
let node_net = require("node:net");
|
|
9
13
|
let node_fs = require("node:fs");
|
|
@@ -42,7 +46,7 @@ async function planHubNodeFields(addonId, keys, ports) {
|
|
|
42
46
|
value: stored[key],
|
|
43
47
|
nodeId: "hub"
|
|
44
48
|
}])),
|
|
45
|
-
precondition:
|
|
49
|
+
precondition: require_migration.preconditionOf(Object.fromEntries(pending.map((key) => [rowId(key), null])))
|
|
46
50
|
}] };
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
@@ -154,7 +158,7 @@ function normalizeAddressBook(stored, detectedUrls) {
|
|
|
154
158
|
const custom = [...parseCustomAddresses(stored.customAddresses)];
|
|
155
159
|
for (const role of SINGLE_ROLES) {
|
|
156
160
|
const url = flags[role];
|
|
157
|
-
if (url === null ||
|
|
161
|
+
if (url === null || require_network_access_cap.isAppLinkBase(url) || detectedUrls.has(url)) continue;
|
|
158
162
|
if (custom.some((c) => c.baseUrl === url)) continue;
|
|
159
163
|
custom.push({
|
|
160
164
|
baseUrl: url,
|
|
@@ -232,7 +236,7 @@ function withRoleFlag(state, role, baseUrl, enabled, autoApp) {
|
|
|
232
236
|
}
|
|
233
237
|
};
|
|
234
238
|
}
|
|
235
|
-
if (role === "notificationTaps" &&
|
|
239
|
+
if (role === "notificationTaps" && require_network_access_cap.isAppLinkBase(baseUrl)) return withRoleAutomatic(state, role);
|
|
236
240
|
if (enabled) return {
|
|
237
241
|
...state,
|
|
238
242
|
flags: {
|
|
@@ -319,7 +323,7 @@ function httpsTwinOf(endpoint, httpsPort) {
|
|
|
319
323
|
}
|
|
320
324
|
/** Every role's answer — the resolvers from `@camstack/types`, nothing else. */
|
|
321
325
|
function resolveRoles(state, appPalette, httpsPalette) {
|
|
322
|
-
return
|
|
326
|
+
return require_network_access_cap.resolveHubAddressRoles(withAppConnectionCustomEndpoints(appPalette, state), httpsPalette, state.flags);
|
|
323
327
|
}
|
|
324
328
|
function flagsOn(state, baseUrl) {
|
|
325
329
|
const out = [];
|
|
@@ -411,16 +415,16 @@ function buildHubAnnouncement(inputs) {
|
|
|
411
415
|
if (!Number.isInteger(port) || port < 1 || port > 65535) return null;
|
|
412
416
|
const host = url.hostname.replace(/^\[|\]$/g, "");
|
|
413
417
|
const txt = {
|
|
414
|
-
[
|
|
415
|
-
[
|
|
416
|
-
[
|
|
418
|
+
[require_network_access_cap.HUB_MDNS_TXT_KEYS.nodeId]: inputs.nodeId,
|
|
419
|
+
[require_network_access_cap.HUB_MDNS_TXT_KEYS.role]: "hub",
|
|
420
|
+
[require_network_access_cap.HUB_MDNS_TXT_KEYS.url]: url.origin
|
|
417
421
|
};
|
|
418
|
-
if (inputs.version !== null) txt[
|
|
422
|
+
if (inputs.version !== null) txt[require_network_access_cap.HUB_MDNS_TXT_KEYS.version] = inputs.version;
|
|
419
423
|
const hubId = require_hub_identity.isAnnouncedHubId(inputs.hubId) ? inputs.hubId : null;
|
|
420
|
-
if (hubId !== null) txt[
|
|
424
|
+
if (hubId !== null) txt[require_network_access_cap.HUB_MDNS_TXT_KEYS.hubId] = hubId;
|
|
421
425
|
return {
|
|
422
426
|
name: `camstack-${hubId ?? inputs.nodeId}`,
|
|
423
|
-
type:
|
|
427
|
+
type: require_network_access_cap.HUB_MDNS_SERVICE_TYPE,
|
|
424
428
|
port,
|
|
425
429
|
address: (0, node_net.isIP)(host) !== 0 ? host : null,
|
|
426
430
|
txt
|
|
@@ -488,9 +492,9 @@ var HubMdnsAdvertiser = class {
|
|
|
488
492
|
handle
|
|
489
493
|
};
|
|
490
494
|
logger.info("hub mDNS: advertising _camstack._tcp", { meta: {
|
|
491
|
-
url: next.txt[
|
|
495
|
+
url: next.txt[require_network_access_cap.HUB_MDNS_TXT_KEYS.url],
|
|
492
496
|
port: next.port,
|
|
493
|
-
hubId: next.txt[
|
|
497
|
+
hubId: next.txt[require_network_access_cap.HUB_MDNS_TXT_KEYS.hubId] ?? null
|
|
494
498
|
} });
|
|
495
499
|
} catch (err) {
|
|
496
500
|
logger.warn("hub mDNS: could not advertise the hub (logins still work with --server)", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
@@ -905,7 +909,7 @@ async function exchangeOnLink(deps, link, groupQuery, fallbackQuery, timing = {
|
|
|
905
909
|
deps.logger.warn("local-network: mdns group listen skipped on link, using unicast-response query", { meta: {
|
|
906
910
|
link: link.address,
|
|
907
911
|
interface: link.name,
|
|
908
|
-
error:
|
|
912
|
+
error: require_scoped_settings.errMsg(err)
|
|
909
913
|
} });
|
|
910
914
|
return deps.io.udpExchange({
|
|
911
915
|
...request,
|
|
@@ -1385,7 +1389,7 @@ var DiscoveryWatcher = class {
|
|
|
1385
1389
|
this.flushTimer.unref?.();
|
|
1386
1390
|
this.listener = await this.deps.io.open((packet) => this.onPacket(packet), (protocol, error) => this.deps.logger.warn("passive discovery: listener unavailable", { meta: {
|
|
1387
1391
|
protocol,
|
|
1388
|
-
error:
|
|
1392
|
+
error: require_scoped_settings.errMsg(error)
|
|
1389
1393
|
} }));
|
|
1390
1394
|
}
|
|
1391
1395
|
async stop() {
|
|
@@ -1434,7 +1438,7 @@ var DiscoveryWatcher = class {
|
|
|
1434
1438
|
} catch (err) {
|
|
1435
1439
|
this.deps.logger.warn("passive discovery: could not report sightings", { meta: {
|
|
1436
1440
|
count: batch.length,
|
|
1437
|
-
error:
|
|
1441
|
+
error: require_scoped_settings.errMsg(err)
|
|
1438
1442
|
} });
|
|
1439
1443
|
}
|
|
1440
1444
|
}
|
|
@@ -1444,7 +1448,7 @@ var DiscoveryWatcher = class {
|
|
|
1444
1448
|
try {
|
|
1445
1449
|
await this.deps.sink.sweep();
|
|
1446
1450
|
} catch (err) {
|
|
1447
|
-
this.deps.logger.warn("discovery sweep failed", { meta: { error:
|
|
1451
|
+
this.deps.logger.warn("discovery sweep failed", { meta: { error: require_scoped_settings.errMsg(err) } });
|
|
1448
1452
|
} finally {
|
|
1449
1453
|
this.sweeping = false;
|
|
1450
1454
|
}
|
|
@@ -1646,7 +1650,7 @@ var ALLOWLIST_RECONCILE_INTERVAL_MS = 3600 * 1e3;
|
|
|
1646
1650
|
* config section, the env, nor the caller says anything.
|
|
1647
1651
|
*/
|
|
1648
1652
|
var DEFAULT_HUB_PORT = 4443;
|
|
1649
|
-
var LocalNetworkAddon = class extends
|
|
1653
|
+
var LocalNetworkAddon = class extends require_base_addon.BaseAddon {
|
|
1650
1654
|
pollTimer = null;
|
|
1651
1655
|
allowlistTimer = null;
|
|
1652
1656
|
allowlistReconcilePending = false;
|
|
@@ -1720,7 +1724,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1720
1724
|
rowsPalette: scheme === "http" ? httpWithTwins : httpsWithTwins,
|
|
1721
1725
|
httpsPalette: https,
|
|
1722
1726
|
appLink: appLinkEndpoint(),
|
|
1723
|
-
appLinkHub:
|
|
1727
|
+
appLinkHub: require_network_access_cap.pickAppLinkHub(https),
|
|
1724
1728
|
listenerOrigins: this.listenerOriginsNow(state, http, httpsPort)
|
|
1725
1729
|
});
|
|
1726
1730
|
}
|
|
@@ -1752,7 +1756,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1752
1756
|
const detectedUrls = new Set(detected.map((e) => e.baseUrl));
|
|
1753
1757
|
const changed = change(this.addressState(detected), {
|
|
1754
1758
|
detectedUrls,
|
|
1755
|
-
autoApp: [...new Set(detected.filter(
|
|
1759
|
+
autoApp: [...new Set(detected.filter(require_network_access_cap.isDefaultAppConnectionEndpoint).map((e) => e.baseUrl))]
|
|
1756
1760
|
});
|
|
1757
1761
|
const after = normalizeAddressBook({
|
|
1758
1762
|
...addressBookPatch(changed),
|
|
@@ -1787,12 +1791,12 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1787
1791
|
}
|
|
1788
1792
|
let target = baseUrl.trim();
|
|
1789
1793
|
if (enabled) {
|
|
1790
|
-
const check =
|
|
1794
|
+
const check = require_network_access_cap.checkRoleAddress(role, target, { acceptInsecureHttp });
|
|
1791
1795
|
if (!check.ok) throw new Error(check.reason);
|
|
1792
1796
|
target = check.baseUrl;
|
|
1793
1797
|
}
|
|
1794
1798
|
await this.changeAddressBook((state, ctx) => {
|
|
1795
|
-
const known =
|
|
1799
|
+
const known = require_network_access_cap.isAppLinkBase(target) || ctx.detectedUrls.has(target) || state.custom.some((c) => c.baseUrl === target);
|
|
1796
1800
|
if (enabled && !known && role !== "notificationTaps") throw new Error(`${target} is not in the address list — add it as a custom address first.`);
|
|
1797
1801
|
return withRoleFlag(state, role, target, enabled, ctx.autoApp);
|
|
1798
1802
|
});
|
|
@@ -1803,16 +1807,16 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1803
1807
|
} });
|
|
1804
1808
|
}
|
|
1805
1809
|
async notificationEndpointSnapshot() {
|
|
1806
|
-
const resolution =
|
|
1810
|
+
const resolution = require_network_access_cap.resolveNotificationTapAddress(this.storedFlags());
|
|
1807
1811
|
const port = (await this.resolveAdvertisedListenPort(null)).port;
|
|
1808
1812
|
return {
|
|
1809
1813
|
baseUrl: resolution.flagged,
|
|
1810
1814
|
resolved: resolution.resolved,
|
|
1811
|
-
appLinkHub:
|
|
1815
|
+
appLinkHub: require_network_access_cap.pickAppLinkHub(await this.buildAdvertisedEndpoints(false, false, "https", port))
|
|
1812
1816
|
};
|
|
1813
1817
|
}
|
|
1814
1818
|
async snapshotViewerEndpoints() {
|
|
1815
|
-
const resolution =
|
|
1819
|
+
const resolution = require_network_access_cap.resolveAppConnections(await this.buildAdvertisedEndpoints(false, false, "http", (await this.resolveAdvertisedListenPort(null)).port), this.storedFlags());
|
|
1816
1820
|
return {
|
|
1817
1821
|
baseUrls: resolution.flagged,
|
|
1818
1822
|
resolved: resolution.resolved
|
|
@@ -1863,7 +1867,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1863
1867
|
* config so this boot binds the node values.
|
|
1864
1868
|
*/
|
|
1865
1869
|
async migrateNodeFields() {
|
|
1866
|
-
if ((await this.runMigrations(
|
|
1870
|
+
if ((await this.runMigrations(require_base_addon.defineAddonMigrations(ADDON_MIGRATIONS, { readStored: (keys) => readRawKeys((key) => this.readStoredGlobalKey(key), "local-network", keys) }))).applied.length > 0) await this.resolveConfig();
|
|
1867
1871
|
}
|
|
1868
1872
|
async onInitialize() {
|
|
1869
1873
|
await this.migrateNodeFields();
|
|
@@ -1920,7 +1924,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
1920
1924
|
},
|
|
1921
1925
|
getAddresses: async (input) => this.addressBook(input?.scheme ?? "https"),
|
|
1922
1926
|
addCustomAddress: async ({ baseUrl, label }) => {
|
|
1923
|
-
const check =
|
|
1927
|
+
const check = require_network_access_cap.validateCustomAddress(baseUrl);
|
|
1924
1928
|
if (!check.ok) throw new Error(check.reason);
|
|
1925
1929
|
const entry = {
|
|
1926
1930
|
baseUrl: check.baseUrl,
|
|
@@ -2023,12 +2027,12 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
2023
2027
|
this.persistReconciledAllowlist();
|
|
2024
2028
|
}, ALLOWLIST_RECONCILE_INTERVAL_MS);
|
|
2025
2029
|
this.allowlistTimer.unref?.();
|
|
2026
|
-
this.ctx.eventBus?.subscribe({ category:
|
|
2027
|
-
const parsed =
|
|
2030
|
+
this.ctx.eventBus?.subscribe({ category: require_base_addon.EventCategory.NetworkTunnelStarted }, (event) => {
|
|
2031
|
+
const parsed = require_network_access_cap.NetworkTunnelStartedDataSchema.safeParse(event.data ?? {});
|
|
2028
2032
|
if (parsed.success) this.adoptTunnelUrl(parsed.data.url, parsed.data.stable);
|
|
2029
2033
|
});
|
|
2030
|
-
this.ctx.eventBus?.subscribe({ category:
|
|
2031
|
-
this.ctx.eventBus?.subscribe({ category:
|
|
2034
|
+
this.ctx.eventBus?.subscribe({ category: require_base_addon.EventCategory.NetworkTunnelStopped }, () => this.setPublicHostname(""));
|
|
2035
|
+
this.ctx.eventBus?.subscribe({ category: require_base_addon.EventCategory.MeshNetworkChanged }, (event) => {
|
|
2032
2036
|
const data = event.data ?? {};
|
|
2033
2037
|
const host = typeof data.host === "string" ? data.host : "";
|
|
2034
2038
|
const port = typeof data.port === "number" ? data.port : 0;
|
|
@@ -2048,7 +2052,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
2048
2052
|
this.ctx.logger.warn("local-network: discovery watcher not started", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
2049
2053
|
});
|
|
2050
2054
|
return [{
|
|
2051
|
-
capability:
|
|
2055
|
+
capability: require_network_access_cap.localNetworkCapability,
|
|
2052
2056
|
provider
|
|
2053
2057
|
}];
|
|
2054
2058
|
}
|
|
@@ -2331,8 +2335,8 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
2331
2335
|
try {
|
|
2332
2336
|
return { hubName: (await this.ctx.api.system.info.query()).serverName.name };
|
|
2333
2337
|
} catch (err) {
|
|
2334
|
-
this.ctx.logger.warn("local-network: server name unreadable - naming the CA after the hostname", { meta: { error:
|
|
2335
|
-
return { hubName:
|
|
2338
|
+
this.ctx.logger.warn("local-network: server name unreadable - naming the CA after the hostname", { meta: { error: require_scoped_settings.errMsg(err) } });
|
|
2339
|
+
return { hubName: require_server_name.shortHostname(node_os.hostname()) };
|
|
2336
2340
|
}
|
|
2337
2341
|
}
|
|
2338
2342
|
snapshotTls() {
|
|
@@ -2386,7 +2390,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
2386
2390
|
if (require_hub_mdns_ciao.readTlsMode(this.tlsDataDir()) === "generated") {
|
|
2387
2391
|
if ((await require_hub_mdns_ciao.ensureTlsCert(this.tlsDataDir(), {
|
|
2388
2392
|
extraSans: [hostname],
|
|
2389
|
-
hubName:
|
|
2393
|
+
hubName: require_server_name.shortHostname(node_os.hostname())
|
|
2390
2394
|
})).generated) this.putCertificateOnListener("hostname");
|
|
2391
2395
|
}
|
|
2392
2396
|
} else require_hub_mdns_ciao.writeExtraSans(this.tlsDataDir(), []);
|
|
@@ -2464,7 +2468,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
|
|
|
2464
2468
|
type: "core",
|
|
2465
2469
|
id: "local-network"
|
|
2466
2470
|
},
|
|
2467
|
-
category:
|
|
2471
|
+
category: require_base_addon.EventCategory.LocalNetworkChanged,
|
|
2468
2472
|
data: { count: interfaces.length }
|
|
2469
2473
|
});
|
|
2470
2474
|
}
|
|
@@ -2600,7 +2604,7 @@ function pickPreferred(interfaces) {
|
|
|
2600
2604
|
function appLinkEndpoint() {
|
|
2601
2605
|
return {
|
|
2602
2606
|
label: "CamStack app link",
|
|
2603
|
-
baseUrl:
|
|
2607
|
+
baseUrl: require_network_access_cap.CAMSTACK_APP_LINK_ORIGIN,
|
|
2604
2608
|
kind: "app-link",
|
|
2605
2609
|
interfaceKind: "public",
|
|
2606
2610
|
plausible: true,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as EventCategory, f as defineAddonMigrations, t as BaseAddon } from "../../base-addon-Md14i7pe.mjs";
|
|
2
|
+
import { Z as errMsg } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
3
|
+
import { u as preconditionOf } from "../../migration-DRJAtdy7.mjs";
|
|
4
|
+
import { c as checkRoleAddress, d as resolveHubAddressRoles, f as resolveNotificationTapAddress, g as pickAppLinkHub, h as isAppLinkBase, l as isDefaultAppConnectionEndpoint, m as CAMSTACK_APP_LINK_ORIGIN, o as HUB_MDNS_SERVICE_TYPE, p as validateCustomAddress, r as localNetworkCapability, s as HUB_MDNS_TXT_KEYS, t as NetworkTunnelStartedDataSchema, u as resolveAppConnections } from "../../network-access.cap-BJnGbE6n.mjs";
|
|
5
|
+
import { r as shortHostname } from "../../server-name-BIhLuHvX.mjs";
|
|
2
6
|
import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
3
|
-
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-
|
|
4
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
7
|
+
import { i as loadOrCreateHubId, r as isAnnouncedHubId } from "../../hub-identity-DjMN9Ac2.mjs";
|
|
8
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-DBrtHOcc.mjs";
|
|
5
9
|
import { z } from "zod";
|
|
6
10
|
import { isIP } from "node:net";
|
|
7
11
|
import { readFileSync } from "node:fs";
|
|
@@ -3,7 +3,13 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const
|
|
6
|
+
const require_base_addon = require("../../base-addon-DD5dIfcZ.js");
|
|
7
|
+
const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
|
|
8
|
+
const require_entry_kind = require("../../entry-kind-cq90c--V.js");
|
|
9
|
+
const require_migration = require("../../migration-BMjgkyG2.js");
|
|
10
|
+
const require_integration_instances_cap = require("../../integration-instances.cap-dJIxg2_s.js");
|
|
11
|
+
const require_log_destination_cap = require("../../log-destination.cap-DELPJkZ0.js");
|
|
12
|
+
const require_addon_id = require("../../addon-id-Di0lNJ89.js");
|
|
7
13
|
const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
|
|
8
14
|
let zod = require("zod");
|
|
9
15
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -756,7 +762,7 @@ var LokiDestinationBodySchema = zod.z.object({
|
|
|
756
762
|
timeoutMs: zod.z.number().int().min(LOKI_BOUNDS.timeoutMs.min).max(LOKI_BOUNDS.timeoutMs.max),
|
|
757
763
|
enabled: zod.z.boolean().optional()
|
|
758
764
|
});
|
|
759
|
-
var lokiDestinationsKind =
|
|
765
|
+
var lokiDestinationsKind = require_entry_kind.defineEntryKind("destinations", {
|
|
760
766
|
title: "Loki destinations",
|
|
761
767
|
nameField: "name",
|
|
762
768
|
schema: LokiDestinationBodySchema
|
|
@@ -878,7 +884,7 @@ async function planDropMovedSettings(ports) {
|
|
|
878
884
|
op: "deleteKeys",
|
|
879
885
|
scope: ADDON_SETTINGS_TABLE,
|
|
880
886
|
keys: present.map(rowId),
|
|
881
|
-
precondition:
|
|
887
|
+
precondition: require_migration.preconditionOf(Object.fromEntries(present.map((key) => [rowId(key), {
|
|
882
888
|
addonId: LOKI_ADDON_ID,
|
|
883
889
|
key,
|
|
884
890
|
value: stored[key]
|
|
@@ -931,7 +937,7 @@ async function planDropRetiredEnabledFlag(ports) {
|
|
|
931
937
|
op: "deleteKeys",
|
|
932
938
|
scope: ADDON_SETTINGS_TABLE,
|
|
933
939
|
keys: present.map(rowId),
|
|
934
|
-
precondition:
|
|
940
|
+
precondition: require_migration.preconditionOf(Object.fromEntries(present.map((key) => [rowId(key), {
|
|
935
941
|
addonId: LOKI_ADDON_ID,
|
|
936
942
|
key,
|
|
937
943
|
value: stored[key]
|
|
@@ -1062,7 +1068,7 @@ function stripUserinfo(message, typedUrl) {
|
|
|
1062
1068
|
}
|
|
1063
1069
|
/** Where the connection probe asks: Loki answers `ready` once its ring is up. */
|
|
1064
1070
|
var READY_PATH = "/ready";
|
|
1065
|
-
var LokiLoggingAddon = class extends
|
|
1071
|
+
var LokiLoggingAddon = class extends require_base_addon.BaseAddon {
|
|
1066
1072
|
destination = null;
|
|
1067
1073
|
instances = null;
|
|
1068
1074
|
refreshTimer = null;
|
|
@@ -1080,7 +1086,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1080
1086
|
this.destination = new LokiDestinationSet();
|
|
1081
1087
|
this.shuttingDown = false;
|
|
1082
1088
|
const registrations = [{
|
|
1083
|
-
capability:
|
|
1089
|
+
capability: require_log_destination_cap.logDestinationCapability,
|
|
1084
1090
|
provider: this.destination
|
|
1085
1091
|
}];
|
|
1086
1092
|
const records = this.ctx.records;
|
|
@@ -1088,7 +1094,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1088
1094
|
const hub = this.isHub();
|
|
1089
1095
|
if (hub) await this.ensureDeclared();
|
|
1090
1096
|
else await this.ensureDeclaredQuietly();
|
|
1091
|
-
this.instances = new
|
|
1097
|
+
this.instances = new require_base_addon.RecordIntegrationInstances(records, lokiDestinationsKind, {
|
|
1092
1098
|
description: {
|
|
1093
1099
|
role: "services",
|
|
1094
1100
|
instanceMode: "multiple",
|
|
@@ -1113,9 +1119,9 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1113
1119
|
test: (input) => this.probe(input.id, input.values)
|
|
1114
1120
|
});
|
|
1115
1121
|
if (hub) {
|
|
1116
|
-
await this.runMigrations(
|
|
1122
|
+
await this.runMigrations(require_base_addon.defineAddonMigrations(await this.initializeCatalogue(), this.migrationPorts()));
|
|
1117
1123
|
registrations.push({
|
|
1118
|
-
capability:
|
|
1124
|
+
capability: require_integration_instances_cap.integrationInstancesCapability,
|
|
1119
1125
|
provider: this.instances.toProvider()
|
|
1120
1126
|
});
|
|
1121
1127
|
} else {
|
|
@@ -1206,7 +1212,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1206
1212
|
readStored: async () => {
|
|
1207
1213
|
const stored = await this.resolveGlobalStore();
|
|
1208
1214
|
const password = stored["password"];
|
|
1209
|
-
if (
|
|
1215
|
+
if (require_scoped_settings.isSecretMarker(password)) throw new Error("the old Loki password could not be resolved");
|
|
1210
1216
|
return stored;
|
|
1211
1217
|
},
|
|
1212
1218
|
readRawStored: async () => this.resolveGlobalStore(),
|
|
@@ -1242,13 +1248,13 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1242
1248
|
data: body
|
|
1243
1249
|
}, { ifRev: 0 });
|
|
1244
1250
|
} catch (err) {
|
|
1245
|
-
if (err instanceof
|
|
1251
|
+
if (err instanceof require_scoped_settings.RevConflictError) return "exists";
|
|
1246
1252
|
throw err;
|
|
1247
1253
|
}
|
|
1248
1254
|
return "created";
|
|
1249
1255
|
},
|
|
1250
1256
|
readRegistryState: async () => {
|
|
1251
|
-
const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName:
|
|
1257
|
+
const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName: require_log_destination_cap.logDestinationCapability.name })).find((p) => require_addon_id.isSameAddonId(p.addonId, this.ctx.id));
|
|
1252
1258
|
if (own === void 0) return "unregistered";
|
|
1253
1259
|
return own.isActive ? "active" : "inactive";
|
|
1254
1260
|
},
|
|
@@ -1264,8 +1270,8 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1264
1270
|
},
|
|
1265
1271
|
enableRegistry: async () => {
|
|
1266
1272
|
await this.ctx.api.addons.setCapabilityProviderEnabled.mutate({
|
|
1267
|
-
capName:
|
|
1268
|
-
addonId:
|
|
1273
|
+
capName: require_log_destination_cap.logDestinationCapability.name,
|
|
1274
|
+
addonId: require_addon_id.bareAddonId(this.ctx.id),
|
|
1269
1275
|
enabled: true
|
|
1270
1276
|
});
|
|
1271
1277
|
},
|
|
@@ -1288,7 +1294,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1288
1294
|
error: "No Loki URL set"
|
|
1289
1295
|
};
|
|
1290
1296
|
const password = values["password"];
|
|
1291
|
-
const fresh = typeof password === "string" && password.length > 0 && password !== "__camstack_redacted__" && !
|
|
1297
|
+
const fresh = typeof password === "string" && password.length > 0 && password !== "__camstack_redacted__" && !require_scoped_settings.isSecretFieldView(password);
|
|
1292
1298
|
const headers = probeHeaders({
|
|
1293
1299
|
username: typed("username"),
|
|
1294
1300
|
tenantId: typed("tenantId"),
|
|
@@ -1330,7 +1336,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1330
1336
|
}
|
|
1331
1337
|
async runRegistryToggleMigration() {
|
|
1332
1338
|
try {
|
|
1333
|
-
if ((await this.runMigrations(
|
|
1339
|
+
if ((await this.runMigrations(require_base_addon.defineAddonMigrations(ADDON_MIGRATIONS, this.migrationPorts()))).failed.includes("loki-logging/2026-11-02-registry-toggle-to-record")) {
|
|
1334
1340
|
this.ctx.logger.warn("Loki logging: the registry-toggle migration is kept for next boot");
|
|
1335
1341
|
return;
|
|
1336
1342
|
}
|
|
@@ -1369,7 +1375,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
|
|
|
1369
1375
|
*/
|
|
1370
1376
|
destinationConfig(id, body) {
|
|
1371
1377
|
return {
|
|
1372
|
-
enabled:
|
|
1378
|
+
enabled: require_base_addon.isInstanceOn(id),
|
|
1373
1379
|
url: body.url,
|
|
1374
1380
|
job: body.job,
|
|
1375
1381
|
node: this.ctx.kernel.localNodeId ?? "hub",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as defineAddonMigrations, l as RecordIntegrationInstances, t as BaseAddon, v as isInstanceOn } from "../../base-addon-Md14i7pe.mjs";
|
|
2
|
+
import { I as RevConflictError, U as isSecretFieldView, W as isSecretMarker } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
3
|
+
import { t as defineEntryKind } from "../../entry-kind-D9MuVJCK.mjs";
|
|
4
|
+
import { u as preconditionOf } from "../../migration-DRJAtdy7.mjs";
|
|
5
|
+
import { t as integrationInstancesCapability } from "../../integration-instances.cap-Cl9O-k4h.mjs";
|
|
6
|
+
import { t as logDestinationCapability } from "../../log-destination.cap-CxZzAVaR.mjs";
|
|
7
|
+
import { n as isSameAddonId, t as bareAddonId } from "../../addon-id-CVg1_r5E.mjs";
|
|
2
8
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
9
|
import { z } from "zod";
|
|
4
10
|
//#region src/builtins/loki-logging/loki-payload.ts
|