@camstack/server 1.2.877 → 1.2.878
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 +6 -0
- package/dist/api/trpc/generated-cap-mounts.js +2 -1
- package/dist/api/trpc/generated-cap-routers.js +308 -256
- package/package.json +10 -9
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/actions-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/core-block-store.d.ts +6 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +3 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +410 -9
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +410 -9
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +11 -1
- package/system/dist/builtins/core-blocks/scheduler/scheduler-store.d.ts +6 -0
- package/system/dist/builtins/core-blocks/tags-service.d.ts +50 -0
- package/system/dist/builtins/core-blocks/tags-wiring.d.ts +16 -0
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +59 -5
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +59 -5
- package/system/dist/builtins/device-manager/device-meta-actions.d.ts +6 -0
- package/system/dist/builtins/device-manager/device-meta-types.d.ts +2 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +1 -0
- package/system/dist/builtins/device-manager/device-template/template-grammar.d.ts +15 -1
- package/system/dist/builtins/device-manager/device-template/template-protocol.d.ts +8 -0
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- 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 +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-2V8c4s3c.js → capture-engine-DAGmlBmJ.js} +1 -1
- package/system/dist/{capture-engine-DQTpQ2x7.mjs → capture-engine-vlouhBCY.mjs} +1 -1
- package/system/dist/{composition-sources-De2-fnz1.js → composition-sources-Rm8xDXjA.js} +1 -1
- package/system/dist/{composition-sources-DjQfZJXB.mjs → composition-sources-TeHa4THk.mjs} +1 -1
- package/system/dist/{constants-CXQ72oX8.mjs → constants-Bq1Xl_Ku.mjs} +1 -1
- package/system/dist/{constants-BpNC8zLo.js → constants-DnUpXvIY.js} +1 -1
- package/system/dist/{device-ca-pvid0fx9.js → device-ca-DMudhY-2.js} +1 -1
- package/system/dist/{device-ca-DnZEQKUX.mjs → device-ca-yHLgyutP.mjs} +1 -1
- package/system/dist/device-template-worker.js +26 -3
- package/system/dist/device-template-worker.mjs +26 -3
- package/system/dist/{dist-BghIT0F5.js → dist-Bh5JIimH.js} +1700 -1178
- package/system/dist/{dist-CcfanEqn.mjs → dist-DemZNuSJ.mjs} +1647 -1179
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-B5pg6urK.mjs → hub-identity-BxaJKDQk.mjs} +1 -1
- package/system/dist/{hub-identity-B74cag6Q.js → hub-identity-YfGdAaBm.js} +1 -1
- package/system/dist/{hub-mdns-ciao-8bwCOLeJ.js → hub-mdns-ciao-BkWOmG6H.js} +2 -2
- package/system/dist/{hub-mdns-ciao-Db9RuUVf.mjs → hub-mdns-ciao-aIsTpo0F.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-DlZ8ad2x.js → legacy-integration-rows-door-C9PZZiKH.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-XBECnCQb.mjs → legacy-integration-rows-door-DrfZZHWq.mjs} +1 -1
- package/system/dist/{rename-composition-block-BWGfsb6q.mjs → rename-composition-block-C2KFIOMP.mjs} +1 -1
- package/system/dist/{rename-composition-block-CQnWc7-b.js → rename-composition-block-Qp1dW4FP.js} +1 -1
- package/system/dist/{restore-archive-CI7Ejrq9.js → restore-archive-DGgj7aqA.js} +1 -1
- package/system/dist/{restore-archive-DsfZbucU.mjs → restore-archive-D_K6PqRk.mjs} +1 -1
- package/system/dist/{template-protocol-DRZ4cm95.js → template-protocol-D5ogm1rj.js} +8 -44
- package/system/dist/{template-protocol-D_6uVHKs.mjs → template-protocol-SgPDx3Hw.mjs} +8 -44
- package/system/dist/{wal-maintenance-Dl4QOdNz.mjs → wal-maintenance-BuiSFfF2.mjs} +0 -0
- package/system/dist/{wal-maintenance-WAuRngNc.js → wal-maintenance-DD8mfRDn.js} +0 -0
- package/system/package.json +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-DD8mfRDn.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-BuiSFfF2.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jc as defineRecordKinds } from "./dist-DemZNuSJ.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-Bh5JIimH.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-Bh5JIimH.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_hub_identity = require("./hub-identity-
|
|
4
|
+
const require_hub_identity = require("./hub-identity-YfGdAaBm.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Rl as userError } from "./dist-DemZNuSJ.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-
|
|
4
|
+
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-BxaJKDQk.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
package/system/dist/index.js
CHANGED
|
@@ -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_device_ca = require("./device-ca-
|
|
3
|
+
const require_dist = require("./dist-Bh5JIimH.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-DMudhY-2.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
|
|
7
7
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
@@ -28,22 +28,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
28
28
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
29
29
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
30
30
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
31
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
32
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
31
|
+
const require_wal_maintenance = require("./wal-maintenance-DD8mfRDn.js");
|
|
32
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-C9PZZiKH.js");
|
|
33
33
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
34
34
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
35
35
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
36
36
|
require("./builtins/storage-orchestrator/index.js");
|
|
37
|
-
const require_hub_identity = require("./hub-identity-
|
|
38
|
-
const require_constants = require("./constants-
|
|
37
|
+
const require_hub_identity = require("./hub-identity-YfGdAaBm.js");
|
|
38
|
+
const require_constants = require("./constants-DnUpXvIY.js");
|
|
39
39
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
40
40
|
require("./builtins/system-config/index.js");
|
|
41
41
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
42
42
|
const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
|
|
43
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
43
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-BkWOmG6H.js");
|
|
44
44
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
45
45
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
46
|
-
const require_restore_archive = require("./restore-archive-
|
|
46
|
+
const require_restore_archive = require("./restore-archive-DGgj7aqA.js");
|
|
47
47
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
48
48
|
let zod = require("zod");
|
|
49
49
|
let node_crypto = require("node:crypto");
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { A as CatalogFileSchema, Ac as
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { A as CatalogFileSchema, Ac as asJsonObject$1, Al as scopeKey, Ar as describeUnmet, At as LOG_LEVEL_RANK, C as CATALOG_LANGS, Ci as isArrayOutputSchema, Cl as parseJsonUnknown, Dl as resolveCapMount, Dn as addonSettingsCapability, Ht as PackageRequiresSchema, Jc as defineRecordKinds, Jl as EventCategory$1, Js as CALLER_STAMPED_CAPABILITIES$1, Ki as logLevelAtMost, Kl as errMsg$1, Ln as bareAddonId, Lo as supportedRuntimes, Mc as asString$1, Ni as isVoidInput, Oo as splitTranslationRef, Pi as kebabToCamel$1, Qc as expandCapMethods, Rl as userError, Sl as parseJsonObject, Ti as isCollectionArrayMethod, Tl as readinessKey, Uc as createEvent$1, Vl as withoutCallerStamp, Xr as extractNestedAddonId, Xs as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Yc as emitDownForOwnedCaps, Yo as unmetRequirements, Ys as DATAPLANE_SECRET_HEADER$1, Zs as DEVICE_STATUS_METHOD, a as AGENT_MDNS_SERVICE_TYPE, al as isDebugChannelName, da as objectInputDeclaresAddonId, el as getDebugInterest, fa as objectInputDeclaresRequiredDeviceId, hc as ReadinessTimeoutError, ho as scopesAllowDeviceCap, jc as asNumber, ji as isObjectInput, jt as METHOD_ACCESS_MAP, ka as procedureAuthKey, mc as ReadinessRegistry, mo as scopesAllowAddon, no as resolveMethodAuth, o as AGENT_MDNS_TXT_KEYS, or as compareVersions, pc as RUNTIME_DEFAULTS, qi as looseSchema, s as ALL_CAPABILITY_DEFINITIONS, vi as interpolate, yi as isAddonInstanceId, zc as collectSecretMarkerRefs, zi as lifecycleJobSchema } from "./dist-DemZNuSJ.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-yHLgyutP.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
|
|
6
6
|
import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
@@ -27,22 +27,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
27
27
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
28
28
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
29
29
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
30
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
31
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
30
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-BuiSFfF2.mjs";
|
|
31
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-DrfZZHWq.mjs";
|
|
32
32
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
33
33
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
34
34
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
35
35
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
36
|
-
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-
|
|
37
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
36
|
+
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-BxaJKDQk.mjs";
|
|
37
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-Bq1Xl_Ku.mjs";
|
|
38
38
|
import { $ as getProcessMeshCaState, A as emitProcessNodeRegistered, At as readCidrSetting, B as getProcessMeshTlsListenerState, C as verifyMembershipAnswer, Ct as isInsecureOrigin, D as ServiceBroker, Dt as createCidrMatcher, E as Errors, Et as readOriginSetting, F as onProcessNodeRegistered, G as MeshCertificateRegistry, H as setProcessMeshTlsListenerState, I as setProcessMeshHandshakeReporter, J as getProcessMeshCertificateRegistry, K as RENEWAL_ABANDONED, L as setProcessMeshPeerTransportLookup, M as getProcessNodeMeshTransport, N as getProcessPeerLeaf, O as setProcessMeshTlsEnabler, Ot as normalizeIp, P as isProcessVerifiedMeshPeer, Q as MeshCaKeeper, R as renewMeshCertificate, S as signMembershipProof, St as OPAQUE_ORIGIN, SystemConfigAddon, T as TlsTcpTransporter, Tt as parseOriginList, U as MESH_NODE_CERTIFICATES_COLLECTION, V as openMeshTlsWhenRevocationsLoaded, W as MESH_NODE_CERTIFICATES_COLUMNS, X as MeshCrl, Y as setProcessMeshCertificateRegistry, Z as processMeshCrl, _ as keyFingerprintShort, _t as isAllowedAgentDashboardReturnTo, a as dialableHubHost, at as generateMeshCa, b as MEMBERSHIP_PATHS, bt as verifyAgentUiUnlockTicket, c as PAIRING_MAX_CODE_ATTEMPTS, ct as issueMeshLeafForNode, d as PAIRING_PIN_DIGITS, dt as AGENT_DASHBOARD_ORIGINS_FIELD, et as requireProcessMeshCa, f as PAIRING_PROTOCOL, ft as AGENT_UI_UNLOCK_TTL_MS, g as describeCsr, gt as UnlockTicketJtiStore, h as computePairingSas, ht as AGENT_UI_UNLOCK_VERSION, i as AgentPairing, it as exportMeshPrivateKeyPem, j as getProcessMeshHandshakeReporter, k as dropProcessPeer, kt as parseCidrList, l as PAIRING_MAX_SESSIONS, lt as issueMeshLeafFromCsr, m as computePairingCommitment, mt as AGENT_UI_UNLOCK_USE, n as HubPairing, nt as caFingerprintCompact, o as hubHostFromMeshAddress, ot as generateMeshKeyPair, p as PAIRING_TTL_MS, pt as AGENT_UI_UNLOCK_TYP, q as describeMeshLeaf, r as PairingHttpError, rt as createMeshCsrPem, s as PAIRING_CODE_DIGITS, st as isValidAgentNodeId, tt as caFingerprint, u as PAIRING_PATHS, ut as loadMeshCa, v as signPairingProof, vt as mintAgentUiUnlockTicket, w as MESH_TLS_PORT_HELLO_FIELD, wt as normalizeOrigin, x as MembershipResponder, xt as InvalidCorsOriginError, y as verifyPairingProof, yt as parseAgentDashboardOrigins, z as revokeMeshCertificate } from "./builtins/system-config/system-config.addon.mjs";
|
|
39
39
|
import "./builtins/system-config/index.mjs";
|
|
40
40
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
41
41
|
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
|
|
42
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
42
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-aIsTpo0F.mjs";
|
|
43
43
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
44
44
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
45
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
45
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-D_K6PqRk.mjs";
|
|
46
46
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
47
47
|
import { z } from "zod";
|
|
48
48
|
import * as crypto$1 from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { zc as collectSecretMarkerRefs } from "./dist-DemZNuSJ.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
package/system/dist/{rename-composition-block-BWGfsb6q.mjs → rename-composition-block-C2KFIOMP.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hl as COMPOSED_DEVICE_STABLE_ID_PREFIX, Kl as errMsg } from "./dist-DemZNuSJ.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/rename-composition-block.ts
|
|
3
3
|
/**
|
|
4
4
|
* An operator rename of a composed device writes the composition block's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as DATABASE_SNAPSHOT_SUFFIX,
|
|
1
|
+
import { I as DATABASE_SNAPSHOT_SUFFIX, Jc as defineRecordKinds, et as DataStoreDatabaseSchema } from "./dist-DemZNuSJ.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
|
|
4
4
|
import { Buffer as Buffer$1 } from "buffer";
|
|
@@ -6731,44 +6731,6 @@ var ALLOWED_TESTS = new Set([
|
|
|
6731
6731
|
"iterable",
|
|
6732
6732
|
"mapping"
|
|
6733
6733
|
]);
|
|
6734
|
-
/** The one global a template may call. */
|
|
6735
|
-
var CALLABLE_GLOBAL = "range";
|
|
6736
|
-
/**
|
|
6737
|
-
* Most parameters a filter takes after its input. The attribute-taking forms
|
|
6738
|
-
* (`join(',', attr)`, `sort(false, false, attr)`, `sum(attr)`) sit past these
|
|
6739
|
-
* limits, and a keyword named `attribute` is refused wherever it appears.
|
|
6740
|
-
*/
|
|
6741
|
-
var FILTER_MAX_PARAMS = {
|
|
6742
|
-
unit: 2,
|
|
6743
|
-
round: 1,
|
|
6744
|
-
trunc: 1,
|
|
6745
|
-
onoff: 0,
|
|
6746
|
-
default: 2,
|
|
6747
|
-
d: 2,
|
|
6748
|
-
since: 0,
|
|
6749
|
-
ago: 0,
|
|
6750
|
-
format: 1,
|
|
6751
|
-
upper: 0,
|
|
6752
|
-
lower: 0,
|
|
6753
|
-
title: 0,
|
|
6754
|
-
capitalize: 0,
|
|
6755
|
-
trim: 0,
|
|
6756
|
-
abs: 0,
|
|
6757
|
-
int: 1,
|
|
6758
|
-
float: 1,
|
|
6759
|
-
length: 0,
|
|
6760
|
-
join: 1,
|
|
6761
|
-
replace: 3,
|
|
6762
|
-
first: 0,
|
|
6763
|
-
last: 0,
|
|
6764
|
-
sort: 2,
|
|
6765
|
-
reverse: 0,
|
|
6766
|
-
sum: 0,
|
|
6767
|
-
string: 0,
|
|
6768
|
-
list: 0,
|
|
6769
|
-
truncate: 3,
|
|
6770
|
-
time: 1
|
|
6771
|
-
};
|
|
6772
6734
|
var FORBIDDEN_KEYWORDS = new Set(["attribute", "attr"]);
|
|
6773
6735
|
/** Member names that reach a constructor, a prototype or a stack frame. Refused wherever they appear. */
|
|
6774
6736
|
var FORBIDDEN_MEMBERS = new Set([
|
|
@@ -6934,25 +6896,26 @@ function testName(symbol, node) {
|
|
|
6934
6896
|
const name = typeof symbol.value === "string" ? symbol.value : "";
|
|
6935
6897
|
if (!ALLOWED_TESTS.has(name)) refuse("forbidden-syntax", `the test "${name}" is not available in a device template (${at(node)})`);
|
|
6936
6898
|
}
|
|
6937
|
-
/** The only
|
|
6899
|
+
/** The only calls a template may make are the catalogue globals (`range`), within their argument cap. */
|
|
6938
6900
|
function walkCall(node, state) {
|
|
6939
6901
|
const name = node.field("name");
|
|
6940
6902
|
const callee = name !== void 0 && name.typename === "Symbol" && typeof name.value === "string" ? name.value : void 0;
|
|
6941
|
-
|
|
6903
|
+
const bounds = callee === void 0 ? void 0 : state.policy.callableBounds.find((item) => item.name === callee);
|
|
6904
|
+
if (bounds === void 0 || callee === void 0 || state.locals.has(callee)) refuse("forbidden-syntax", `calling ${callee ?? "an expression"} is not allowed in a device template (${at(node)})`);
|
|
6942
6905
|
const args = node.field("args")?.children ?? [];
|
|
6943
|
-
if (args.length <
|
|
6906
|
+
if (args.length < bounds.min || args.length > bounds.max || args.some((arg) => arg.typename === "KeywordArgs")) refuse("syntax", `${bounds.name}() takes ${bounds.min} to ${bounds.max} numbers (${at(node)})`);
|
|
6944
6907
|
for (const arg of args) walk(arg, state);
|
|
6945
6908
|
}
|
|
6946
6909
|
function walkFilter(node, state) {
|
|
6947
6910
|
const name = node.field("name");
|
|
6948
6911
|
const filterName = name !== void 0 && typeof name.value === "string" ? name.value : void 0;
|
|
6949
|
-
if (filterName === void 0 || !state.allowedFilters.has(filterName) ||
|
|
6912
|
+
if (filterName === void 0 || !state.allowedFilters.has(filterName) || state.policy.filterMaxParams[filterName] === void 0) refuse("unknown-filter", `filter "${filterName ?? "?"}" is not available in a device template (${at(node)})`);
|
|
6950
6913
|
const args = node.field("args");
|
|
6951
6914
|
markKeywordPairs(args);
|
|
6952
6915
|
const params = args?.children ?? [];
|
|
6953
6916
|
const positional = params.filter((param) => param.typename !== "KeywordArgs");
|
|
6954
6917
|
const keywords = params.filter((param) => param.typename === "KeywordArgs").flatMap((k) => k.children);
|
|
6955
|
-
const max =
|
|
6918
|
+
const max = state.policy.filterMaxParams[filterName] ?? 0;
|
|
6956
6919
|
if (positional.length - 1 + keywords.length > max) refuse("syntax", `filter "${filterName}" takes at most ${max} argument(s) (${at(node)})`);
|
|
6957
6920
|
if (filterName === "unit") {
|
|
6958
6921
|
if (positional.length < 2) refuse("syntax", `unit() needs the target unit, e.g. unit('°F') (${at(node)})`);
|
|
@@ -6971,7 +6934,7 @@ function walkFilter(node, state) {
|
|
|
6971
6934
|
for (const param of params) walk(param, state);
|
|
6972
6935
|
}
|
|
6973
6936
|
/** Parse and vet a template. A template that passes may be handed to the worker. */
|
|
6974
|
-
function analyzeTemplate(source, allowedFilters, maxLength) {
|
|
6937
|
+
function analyzeTemplate(source, allowedFilters, maxLength, policy) {
|
|
6975
6938
|
if (source.length > maxLength) return {
|
|
6976
6939
|
ok: false,
|
|
6977
6940
|
refusal: {
|
|
@@ -6991,6 +6954,7 @@ function analyzeTemplate(source, allowedFilters, maxLength) {
|
|
|
6991
6954
|
collectLocals(parsed.root, locals);
|
|
6992
6955
|
const state = {
|
|
6993
6956
|
allowedFilters: new Set(allowedFilters),
|
|
6957
|
+
policy,
|
|
6994
6958
|
locals,
|
|
6995
6959
|
refs: [],
|
|
6996
6960
|
unitSites: []
|
|
@@ -6728,44 +6728,6 @@ var ALLOWED_TESTS = new Set([
|
|
|
6728
6728
|
"iterable",
|
|
6729
6729
|
"mapping"
|
|
6730
6730
|
]);
|
|
6731
|
-
/** The one global a template may call. */
|
|
6732
|
-
var CALLABLE_GLOBAL = "range";
|
|
6733
|
-
/**
|
|
6734
|
-
* Most parameters a filter takes after its input. The attribute-taking forms
|
|
6735
|
-
* (`join(',', attr)`, `sort(false, false, attr)`, `sum(attr)`) sit past these
|
|
6736
|
-
* limits, and a keyword named `attribute` is refused wherever it appears.
|
|
6737
|
-
*/
|
|
6738
|
-
var FILTER_MAX_PARAMS = {
|
|
6739
|
-
unit: 2,
|
|
6740
|
-
round: 1,
|
|
6741
|
-
trunc: 1,
|
|
6742
|
-
onoff: 0,
|
|
6743
|
-
default: 2,
|
|
6744
|
-
d: 2,
|
|
6745
|
-
since: 0,
|
|
6746
|
-
ago: 0,
|
|
6747
|
-
format: 1,
|
|
6748
|
-
upper: 0,
|
|
6749
|
-
lower: 0,
|
|
6750
|
-
title: 0,
|
|
6751
|
-
capitalize: 0,
|
|
6752
|
-
trim: 0,
|
|
6753
|
-
abs: 0,
|
|
6754
|
-
int: 1,
|
|
6755
|
-
float: 1,
|
|
6756
|
-
length: 0,
|
|
6757
|
-
join: 1,
|
|
6758
|
-
replace: 3,
|
|
6759
|
-
first: 0,
|
|
6760
|
-
last: 0,
|
|
6761
|
-
sort: 2,
|
|
6762
|
-
reverse: 0,
|
|
6763
|
-
sum: 0,
|
|
6764
|
-
string: 0,
|
|
6765
|
-
list: 0,
|
|
6766
|
-
truncate: 3,
|
|
6767
|
-
time: 1
|
|
6768
|
-
};
|
|
6769
6731
|
var FORBIDDEN_KEYWORDS = new Set(["attribute", "attr"]);
|
|
6770
6732
|
/** Member names that reach a constructor, a prototype or a stack frame. Refused wherever they appear. */
|
|
6771
6733
|
var FORBIDDEN_MEMBERS = new Set([
|
|
@@ -6931,25 +6893,26 @@ function testName(symbol, node) {
|
|
|
6931
6893
|
const name = typeof symbol.value === "string" ? symbol.value : "";
|
|
6932
6894
|
if (!ALLOWED_TESTS.has(name)) refuse("forbidden-syntax", `the test "${name}" is not available in a device template (${at(node)})`);
|
|
6933
6895
|
}
|
|
6934
|
-
/** The only
|
|
6896
|
+
/** The only calls a template may make are the catalogue globals (`range`), within their argument cap. */
|
|
6935
6897
|
function walkCall(node, state) {
|
|
6936
6898
|
const name = node.field("name");
|
|
6937
6899
|
const callee = name !== void 0 && name.typename === "Symbol" && typeof name.value === "string" ? name.value : void 0;
|
|
6938
|
-
|
|
6900
|
+
const bounds = callee === void 0 ? void 0 : state.policy.callableBounds.find((item) => item.name === callee);
|
|
6901
|
+
if (bounds === void 0 || callee === void 0 || state.locals.has(callee)) refuse("forbidden-syntax", `calling ${callee ?? "an expression"} is not allowed in a device template (${at(node)})`);
|
|
6939
6902
|
const args = node.field("args")?.children ?? [];
|
|
6940
|
-
if (args.length <
|
|
6903
|
+
if (args.length < bounds.min || args.length > bounds.max || args.some((arg) => arg.typename === "KeywordArgs")) refuse("syntax", `${bounds.name}() takes ${bounds.min} to ${bounds.max} numbers (${at(node)})`);
|
|
6941
6904
|
for (const arg of args) walk(arg, state);
|
|
6942
6905
|
}
|
|
6943
6906
|
function walkFilter(node, state) {
|
|
6944
6907
|
const name = node.field("name");
|
|
6945
6908
|
const filterName = name !== void 0 && typeof name.value === "string" ? name.value : void 0;
|
|
6946
|
-
if (filterName === void 0 || !state.allowedFilters.has(filterName) ||
|
|
6909
|
+
if (filterName === void 0 || !state.allowedFilters.has(filterName) || state.policy.filterMaxParams[filterName] === void 0) refuse("unknown-filter", `filter "${filterName ?? "?"}" is not available in a device template (${at(node)})`);
|
|
6947
6910
|
const args = node.field("args");
|
|
6948
6911
|
markKeywordPairs(args);
|
|
6949
6912
|
const params = args?.children ?? [];
|
|
6950
6913
|
const positional = params.filter((param) => param.typename !== "KeywordArgs");
|
|
6951
6914
|
const keywords = params.filter((param) => param.typename === "KeywordArgs").flatMap((k) => k.children);
|
|
6952
|
-
const max =
|
|
6915
|
+
const max = state.policy.filterMaxParams[filterName] ?? 0;
|
|
6953
6916
|
if (positional.length - 1 + keywords.length > max) refuse("syntax", `filter "${filterName}" takes at most ${max} argument(s) (${at(node)})`);
|
|
6954
6917
|
if (filterName === "unit") {
|
|
6955
6918
|
if (positional.length < 2) refuse("syntax", `unit() needs the target unit, e.g. unit('°F') (${at(node)})`);
|
|
@@ -6968,7 +6931,7 @@ function walkFilter(node, state) {
|
|
|
6968
6931
|
for (const param of params) walk(param, state);
|
|
6969
6932
|
}
|
|
6970
6933
|
/** Parse and vet a template. A template that passes may be handed to the worker. */
|
|
6971
|
-
function analyzeTemplate(source, allowedFilters, maxLength) {
|
|
6934
|
+
function analyzeTemplate(source, allowedFilters, maxLength, policy) {
|
|
6972
6935
|
if (source.length > maxLength) return {
|
|
6973
6936
|
ok: false,
|
|
6974
6937
|
refusal: {
|
|
@@ -6988,6 +6951,7 @@ function analyzeTemplate(source, allowedFilters, maxLength) {
|
|
|
6988
6951
|
collectLocals(parsed.root, locals);
|
|
6989
6952
|
const state = {
|
|
6990
6953
|
allowedFilters: new Set(allowedFilters),
|
|
6954
|
+
policy,
|
|
6991
6955
|
locals,
|
|
6992
6956
|
refs: [],
|
|
6993
6957
|
unitSites: []
|
|
Binary file
|
|
Binary file
|
package/system/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.878",
|
|
4
4
|
"description": "CamStack builtins — shipped inside @camstack/server (generated, do not edit)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"camstack": {
|
|
@@ -469,6 +469,9 @@
|
|
|
469
469
|
{
|
|
470
470
|
"name": "template"
|
|
471
471
|
},
|
|
472
|
+
{
|
|
473
|
+
"name": "tags"
|
|
474
|
+
},
|
|
472
475
|
{
|
|
473
476
|
"name": "remote"
|
|
474
477
|
},
|