@dominevo/server 0.1.0 → 0.1.1
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/.env.example +4 -4
- package/CHANGELOG.md +7 -0
- package/THIRD_PARTY_MODELS.md +13 -13
- package/dist/addon-root-inventory.js +5 -5
- package/dist/agent/agent-config.js +8 -8
- package/dist/agent/agent-group-runner.js +2 -2
- package/dist/agent/agent-http.js +4 -4
- package/dist/agent/agent-infra-capabilities.js +2 -2
- package/dist/agent/agent-self-update.js +3 -3
- package/dist/agent/agent-service.js +3 -3
- package/dist/agent/agent-update-service.js +10 -10
- package/dist/agent/derive-hub-url.js +3 -3
- package/dist/agent/main.js +20 -20
- package/dist/agent/stale-addon-gate.js +7 -7
- package/dist/api/addon-upload.js +12 -12
- package/dist/api/core/auth.router.js +7 -7
- package/dist/api/core/cap-providers.js +1 -1
- package/dist/api/core/logging-settings.js +1 -1
- package/dist/api/core/request-census-settings.js +1 -1
- package/dist/api/cors/cors-policy.js +5 -5
- package/dist/api/dev-uploads-bundle.js +1 -1
- package/dist/api/logs-export-route.js +1 -1
- package/dist/api/model-distributor.js +1 -1
- package/dist/api/server-upload-propagate.js +1 -1
- package/dist/api/server-upload.js +2 -2
- package/dist/api/static/spa-mount.js +3 -3
- package/dist/api/static/spa-static.js +1 -1
- package/dist/api/tarball-manifest.js +4 -4
- package/dist/api/trpc/http-request-census.js +1 -1
- package/dist/api/trpc/trpc.router.js +7 -7
- package/dist/auth/addon-route-share-gate.js +2 -2
- package/dist/auth/app-confirm-page.js +1 -1
- package/dist/auth/app-confirmations.js +2 -2
- package/dist/auth/app-passkey-page.js +1 -1
- package/dist/auth/native-return.js +1 -1
- package/dist/auth/session-cookie.js +2 -2
- package/dist/auth/sso-routes.js +1 -1
- package/dist/boot/boot-config.js +3 -3
- package/dist/boot/post-boot.service.js +2 -2
- package/dist/boot/retired-public-url-env.js +3 -3
- package/dist/bootstrap-packages.js +3 -3
- package/dist/closure-patches/patch-reach.json +7 -7
- package/dist/closure-patches/werift+0.22.9.patch +34 -34
- package/dist/core/addon/addon-package.service.js +32 -32
- package/dist/core/addon/addon-registry.service.js +34 -34
- package/dist/core/addon/addon-requirements.js +8 -8
- package/dist/core/addon/addon-search.service.js +2 -2
- package/dist/core/addon/hub-addon-support.js +2 -2
- package/dist/core/addon/read-packed-file.js +1 -1
- package/dist/core/addon-bridge/addon-bridge.service.js +6 -6
- package/dist/core/addon-pages/addon-pages.service.js +1 -1
- package/dist/core/agent/agent-registry.service.js +1 -1
- package/dist/core/agent/delivery-requirements.js +1 -1
- package/dist/core/app-links/well-known-app-links.js +7 -9
- package/dist/core/auth/handoff-code.service.js +1 -1
- package/dist/core/moleculer/moleculer.service.js +6 -6
- package/dist/core/release-identity.js +2 -2
- package/dist/core/server-update/server-update.service.js +9 -9
- package/dist/core/updates/node-update-announcement.js +1 -1
- package/dist/core/updates/wrapper-update-checker.js +1 -1
- package/dist/framework-nodepath.js +1 -1
- package/dist/i18n/request-lang.js +1 -1
- package/dist/launch-args.js +4 -4
- package/dist/launcher.js +14 -14
- package/dist/main.js +9 -9
- package/dist/manual-boot.js +5 -5
- package/dist/node-role.js +2 -2
- package/dist/package-inventory.js +1 -1
- package/dist/pending-restore.js +1 -1
- package/dist/server-root/index.js +11 -11
- package/dist/single-copy-cleanup-runner.js +2 -2
- package/dist/single-copy-cleanup.js +2 -2
- package/dist/starter.js +9 -9
- package/package.json +71 -71
- package/system/dist/addon-runner.js +59 -59
- package/system/dist/addon-runner.mjs +59 -59
- package/system/dist/{addon-settings.cap-Cxgig-la.mjs → addon-settings.cap-CyWCCPvU.mjs} +1 -1
- package/system/dist/{addon-settings.cap-B3KYrDyh.js → addon-settings.cap-DT34AC0I.js} +1 -1
- package/system/dist/addon-utils.d.ts +1 -1
- package/system/dist/addon-utils.js +1 -1
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/auth/device-ca.d.ts +3 -3
- package/system/dist/auth/origin.d.ts +1 -1
- package/system/dist/{base-addon--EzLZ64f.js → base-addon-CwtR9jMm.js} +8 -28
- package/system/dist/{base-addon-D6i6fCDD.mjs → base-addon-DCfRA4Sq.mjs} +8 -28
- package/system/dist/{base-device-Aptq2PHd.js → base-device-B3OJaaod.js} +3 -3
- package/system/dist/{base-device-CuQ3xFwc.mjs → base-device-QXPOGWz3.mjs} +3 -3
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +5 -5
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +8 -8
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +8 -8
- package/system/dist/builtins/alerts/alerts.addon.js +7 -7
- package/system/dist/builtins/alerts/alerts.addon.mjs +9 -9
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.js +1 -1
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +2 -2
- package/system/dist/builtins/autotrack/index.mjs +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +5 -5
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -8
- package/system/dist/builtins/backup-orchestrator/manifest-store.d.ts +1 -1
- package/system/dist/builtins/calendars/calendars.addon.js +2 -2
- package/system/dist/builtins/calendars/calendars.addon.mjs +2 -2
- package/system/dist/builtins/camera-grid/index.js +5 -5
- package/system/dist/builtins/camera-grid/index.mjs +5 -5
- package/system/dist/builtins/composer/composer.addon.js +10 -10
- package/system/dist/builtins/composer/composer.addon.mjs +10 -10
- 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/core-blocks.addon.js +22 -22
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +20 -20
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +3 -3
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +6 -6
- package/system/dist/builtins/device-history/device-history.addon.mjs +6 -6
- package/system/dist/builtins/device-history/store/history-schema.d.ts +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.js +29 -29
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +16 -16
- package/system/dist/builtins/device-manager/device-row-store.d.ts +1 -1
- package/system/dist/builtins/device-manager/fleet-read-census.d.ts +1 -1
- package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +1 -1
- 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 +15 -15
- package/system/dist/builtins/keychain/index.mjs +15 -15
- package/system/dist/builtins/keychain/key-sources.d.ts +2 -2
- package/system/dist/builtins/keychain/keychain-store.d.ts +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +5 -5
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +5 -5
- package/system/dist/builtins/local-auth/auth-schema.d.ts +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +24 -24
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +17 -17
- package/system/dist/builtins/local-network/agent-mdns.d.ts +1 -1
- package/system/dist/builtins/local-network/hub-mdns.d.ts +1 -1
- package/system/dist/builtins/local-network/local-network.addon.d.ts +3 -3
- package/system/dist/builtins/local-network/local-network.addon.js +15 -15
- package/system/dist/builtins/local-network/local-network.addon.mjs +15 -15
- package/system/dist/builtins/loki-logging/index.js +7 -7
- package/system/dist/builtins/loki-logging/index.mjs +7 -7
- package/system/dist/builtins/loki-logging/loki-payload.d.ts +1 -1
- package/system/dist/builtins/native-metrics/cgroup-memory.d.ts +3 -3
- package/system/dist/builtins/native-metrics/native-metrics.addon.d.ts +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +14 -14
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +23 -23
- package/system/dist/builtins/native-metrics/process-classification.d.ts +8 -8
- package/system/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +1 -1
- package/system/dist/builtins/platform-probe/coral-accelerators.d.ts +2 -2
- package/system/dist/builtins/platform-probe/index.js +3 -3
- package/system/dist/builtins/platform-probe/index.mjs +12 -12
- package/system/dist/builtins/record-entries/index.js +3 -3
- package/system/dist/builtins/record-entries/index.mjs +3 -3
- 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 +4 -4
- package/system/dist/builtins/snapshot/index.mjs +4 -4
- package/system/dist/builtins/sqlite-storage/file-host-handlers.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +22 -22
- 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/migrations/migration-pass.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/query-profiler.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +19 -19
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +19 -19
- package/system/dist/builtins/storage-orchestrator/access-guards.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/location-secrets.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +18 -18
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +18 -18
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +3 -3
- package/system/dist/builtins/system-backup/backup-encryption.d.ts +1 -1
- package/system/dist/builtins/system-backup/system-backup.service.d.ts +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +31 -31
- package/system/dist/builtins/system-config/system-config.addon.mjs +143 -143
- package/system/dist/builtins/winston-logging/index.js +5 -5
- package/system/dist/builtins/winston-logging/index.mjs +5 -5
- package/system/dist/builtins/winston-logging/log-file-cursor.d.ts +1 -1
- package/system/dist/{cap-call-context-DnLdYSyR.js → cap-call-context-3-L-JQ3d.js} +2 -2
- package/system/dist/{cap-call-context-D-su61hv.mjs → cap-call-context-C_59UKvE.mjs} +2 -2
- package/system/dist/{command-catalog-Cgz3MwLW.mjs → command-catalog-88WjnitG.mjs} +1 -1
- package/system/dist/{command-catalog-0Q83jcdv.js → command-catalog-Bt0rkK6T.js} +1 -1
- package/system/dist/{composition-sources-GNsOlYlG.js → composition-sources-BD_14SLn.js} +2 -2
- package/system/dist/{composition-sources-Dzx55O4S.mjs → composition-sources-BxNM5HHY.mjs} +2 -2
- package/system/dist/{constants-DVHYGlyi.js → constants-B8umFEGY.js} +2 -2
- package/system/dist/{constants-bg2DX4I6.mjs → constants-C86EPRS1.mjs} +2 -2
- package/system/dist/{coral-accelerators-DXDOGcym.mjs → coral-accelerators-CSu5Ahx5.mjs} +6 -6
- package/system/dist/{custom-action-registry-Bd52pRgO.mjs → custom-action-registry-BklzKCJe.mjs} +162 -162
- package/system/dist/{custom-action-registry-DHOCDRef.js → custom-action-registry-C_yB2qlc.js} +125 -125
- package/system/dist/{database-snapshot.cap-BymU4Xk9.js → database-snapshot.cap--dYj7W3i.js} +1 -1
- package/system/dist/{database-snapshot.cap-DAVS29qN.mjs → database-snapshot.cap-DfMxWoak.mjs} +1 -1
- package/system/dist/{declared-device-BSxSa0O8.js → declared-device-BFexdYcl.js} +1 -1
- package/system/dist/{declared-device-C4zPkK6G.mjs → declared-device-D-fwNbiU.mjs} +1 -1
- package/system/dist/{device-ca-BgYUqBEB.js → device-ca-CXDTXX4c.js} +8 -8
- package/system/dist/{device-ca-AvfcD1AT.mjs → device-ca-Du6rfexI.mjs} +8 -8
- package/system/dist/{device-certificate-IVBnrTHH.js → device-certificate-6irX-VEC.js} +4 -4
- package/system/dist/{device-certificate-Kh05tlrX.mjs → device-certificate-B5LojTd8.mjs} +4 -4
- package/system/dist/{device-manager.cap-zbFHbXlg.mjs → device-manager.cap-3gMy5WyI.mjs} +1 -1
- package/system/dist/{device-manager.cap-B-zweScL.js → device-manager.cap-CVm8e--n.js} +1 -1
- package/system/dist/{device-removal-reconcile-DSYwdCX-.mjs → device-removal-reconcile-Bca9Xmxa.mjs} +2 -2
- package/system/dist/{device-removal-reconcile-hF3PFXaD.js → device-removal-reconcile-BtBOAfIX.js} +2 -2
- package/system/dist/{camstack-error-DJ-TUAi1.js → dominevo-error-CTBRQM6p.js} +4 -4
- package/system/dist/{camstack-error-viZYfcj9.mjs → dominevo-error-EgrighSX.mjs} +4 -4
- package/system/dist/download/hosted-model-revisions.d.ts +1 -1
- package/system/dist/{entry-kind-BOBbd1lw.mjs → entry-kind-DJSOxSX2.mjs} +2 -2
- package/system/dist/{entry-kind-BVqSwPqz.js → entry-kind-DzaK6R6L.js} +2 -2
- package/system/dist/file-host-worker.js +3 -3
- package/system/dist/file-host-worker.mjs +3 -3
- package/system/dist/framework-resolver-hook.mjs +1 -1
- package/system/dist/{hub-identity-Ctf-OLhe.mjs → hub-identity-C1lUxisZ.mjs} +19 -19
- package/system/dist/{hub-identity-C5oay5SY.js → hub-identity-DihZeMUF.js} +10 -10
- package/system/dist/{hub-mdns-ciao-BjVwHmsr.js → hub-mdns-ciao-D2Rcz1Kb.js} +42 -42
- package/system/dist/{hub-mdns-ciao-C9adAMGN.mjs → hub-mdns-ciao-D5Udd2A_.mjs} +39 -39
- package/system/dist/index.js +152 -152
- package/system/dist/index.mjs +355 -355
- package/system/dist/{jobs.cap-DHu0iJ1C.js → jobs.cap-Blrf2noc.js} +4 -4
- package/system/dist/{jobs.cap-BPFm9yU4.mjs → jobs.cap-DdrDabtW.mjs} +4 -4
- package/system/dist/kernel/addon-class-resolver.d.ts +2 -2
- package/system/dist/kernel/addon-engine-manager.d.ts +2 -2
- package/system/dist/kernel/addon-installer.d.ts +12 -12
- package/system/dist/kernel/addon-loader.d.ts +6 -6
- package/system/dist/kernel/addon-version-policy.d.ts +1 -1
- package/system/dist/kernel/config-schema.d.ts +2 -2
- package/system/dist/kernel/deps/addon-deps-manager.d.ts +1 -1
- package/system/dist/kernel/deps/closure-dedupe.d.ts +3 -3
- package/system/dist/kernel/deps/ensure-addon-natives.d.ts +1 -1
- package/system/dist/kernel/deps/manifest-native-deps.d.ts +2 -2
- package/system/dist/kernel/deps/manifest-python-deps.d.ts +1 -1
- package/system/dist/kernel/deps/system-package-broker.d.ts +1 -1
- package/system/dist/kernel/deps/system-package-client.d.ts +1 -1
- package/system/dist/kernel/event-plane-report.d.ts +2 -2
- package/system/dist/kernel/fs-utils.d.ts +4 -4
- package/system/dist/kernel/heap-watch.d.ts +8 -8
- package/system/dist/kernel/index.d.ts +1 -1
- package/system/dist/kernel/moleculer/addon-context-factory.d.ts +3 -3
- package/system/dist/kernel/moleculer/addon-service-factory.d.ts +3 -3
- package/system/dist/kernel/moleculer/agent-event-scope.d.ts +2 -2
- package/system/dist/kernel/moleculer/agent-ui-unlock.d.ts +1 -1
- package/system/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +2 -2
- package/system/dist/kernel/moleculer/event-bus-core.d.ts +1 -1
- package/system/dist/kernel/moleculer/event-bus.d.ts +5 -5
- package/system/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-membership.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +3 -3
- package/system/dist/kernel/moleculer/runner-heap-flags.d.ts +1 -1
- package/system/dist/kernel/moleculer/runner-native-allocator.d.ts +2 -2
- package/system/dist/kernel/moleculer/stream-probe-service.d.ts +1 -1
- package/system/dist/kernel/moleculer/worker-device-restore.d.ts +2 -2
- package/system/dist/kernel/requires-registry.d.ts +2 -2
- package/system/dist/kernel/transport/create-local-transport.d.ts +1 -1
- package/system/dist/kernel/transport/local-child-registry.d.ts +1 -1
- package/system/dist/kernel/transport/uds-event-bridge.d.ts +1 -1
- package/system/dist/kernel/unsupported-addon-tracker.d.ts +1 -1
- package/system/dist/{keychain-admin.cap-DOvL8TMG.mjs → keychain-admin.cap-C3eanzBT.mjs} +2 -2
- package/system/dist/{keychain-admin.cap-DcRCRWtu.js → keychain-admin.cap-yMG0j8XP.js} +2 -2
- package/system/dist/{legacy-integration-rows-door-CUpCwPm5.js → legacy-integration-rows-door-1c-XBxRt.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-bidgp6kI.mjs → legacy-integration-rows-door-CYFvlkdt.mjs} +1 -1
- package/system/dist/{log-file-read-protocol-hTaAsYlX.mjs → log-file-read-protocol-B3Tq2F50.mjs} +2 -2
- package/system/dist/{log-file-read-protocol-DSV_vQRb.js → log-file-read-protocol-BRHlsNCj.js} +2 -2
- package/system/dist/log-file-read-worker.js +1 -1
- package/system/dist/log-file-read-worker.mjs +1 -1
- package/system/dist/logging/formatter.d.ts +1 -1
- package/system/dist/{metrics-provider.cap-01SwpLu5.mjs → metrics-provider.cap-BKzH22yb.mjs} +2 -2
- package/system/dist/{metrics-provider.cap-BMKD5FH3.js → metrics-provider.cap-H0RjdYQj.js} +2 -2
- package/system/dist/{migration-CHPdAdNh.js → migration-CvC7YRxn.js} +1 -1
- package/system/dist/{migration-BvbfW9g-.mjs → migration-DDDUJnTU.mjs} +1 -1
- package/system/dist/migrations/hub/index.d.ts +1 -1
- package/system/dist/{named-entity-store-EQovvtag.js → named-entity-store-B7MMnZq_.js} +1 -1
- package/system/dist/{named-entity-store-C2JkesQG.mjs → named-entity-store-CLIUOHkl.mjs} +1 -1
- package/system/dist/{network-access.cap-CxqbyUYK.js → network-access.cap-C97_DUK9.js} +10 -10
- package/system/dist/{network-access.cap-B918UjWD.mjs → network-access.cap-DcLn1v6p.mjs} +9 -9
- package/system/dist/{notification-targets-Cj6I9DzV.js → notification-targets-BH-Kq5zA.js} +2 -2
- package/system/dist/{notification-targets-cJTv1p6y.mjs → notification-targets-gTLSExN5.mjs} +2 -2
- package/system/dist/{platform-key-source-Di7HrlGR.js → platform-key-source-DERonx7U.js} +1 -1
- package/system/dist/{platform-key-source-BWlq0jjn.mjs → platform-key-source-vw43KkgD.mjs} +1 -1
- package/system/dist/{record-entries.cap-jKkDRzZG.mjs → record-entries.cap-DqaspI30.mjs} +2 -2
- package/system/dist/{record-entries.cap-RXnOab_5.js → record-entries.cap-u4EjNUWg.js} +2 -2
- package/system/dist/{record-kind-Cm1DO1qJ.js → record-kind-BYbL_LNZ.js} +1 -1
- package/system/dist/{record-kind-DXFsj6uF.mjs → record-kind-DpcGjBK1.mjs} +1 -1
- package/system/dist/{record-kinds-CLYE4x8E.js → record-kinds-CF3IIGeU.js} +6 -6
- package/system/dist/{record-kinds-Xm95PUr5.mjs → record-kinds-HynLKMsB.mjs} +6 -6
- package/system/dist/{recording-archive.cap-BFiEztoo.js → recording-archive.cap-DPyT1msn.js} +5 -5
- package/system/dist/{recording-archive.cap-DljrTthl.mjs → recording-archive.cap-DoeNelun.mjs} +4 -4
- package/system/dist/{records.cap-BDUsx56H.mjs → records.cap-A6ZnC18-.mjs} +2 -2
- package/system/dist/{records.cap-DKDON4zv.js → records.cap-CrdoSJ1h.js} +2 -2
- package/system/dist/{rename-composition-block-BdhK2udh.mjs → rename-composition-block-CMfftDfW.mjs} +43 -43
- package/system/dist/{rename-composition-block-CJ-XbDsk.js → rename-composition-block-CeKeUquQ.js} +43 -43
- package/system/dist/{restore-archive-BQhYL8c4.mjs → restore-archive-DngNk5Yg.mjs} +104 -104
- package/system/dist/{restore-archive-DWIM3J3f.js → restore-archive-LKIQ4CNL.js} +11 -11
- package/system/dist/{retention-source.cap-BvNRqbz3.js → retention-source.cap-CuI320Je.js} +1 -1
- package/system/dist/{retention-source.cap-DUPeqB5h.mjs → retention-source.cap-DLKW-DAE.mjs} +1 -1
- package/system/dist/{retired-settings-keys-BFLkouoC.mjs → retired-settings-keys-Dakm_ir-.mjs} +1 -1
- package/system/dist/{retired-settings-keys-DNi9qA3K.js → retired-settings-keys-DdoaQDUr.js} +1 -1
- package/system/dist/{scoped-settings-DbyAaIot.js → scoped-settings-8uzhJVsE.js} +3 -3
- package/system/dist/{scoped-settings-d2_FTMty.mjs → scoped-settings-DnkTDuvk.mjs} +3 -3
- package/system/dist/{settings-store.cap-BhOIBtO4.js → settings-store.cap-DqFgT2Xo.js} +1 -1
- package/system/dist/{settings-store.cap-CaDSOqgK.mjs → settings-store.cap-DxsDTQxb.mjs} +1 -1
- package/system/dist/{state-refresh-scheduler-GlExK5Pt.js → state-refresh-scheduler-8_rBg2-4.js} +1 -1
- package/system/dist/{state-refresh-scheduler-CJuGzqZh.mjs → state-refresh-scheduler-B3pfIHRS.mjs} +1 -1
- package/system/dist/{storage-admin.cap-DPH4dWEl.js → storage-admin.cap-BndyGERv.js} +5 -5
- package/system/dist/{storage-admin.cap-CP_CtM0h.mjs → storage-admin.cap-DOZ5tsKA.mjs} +5 -5
- package/system/dist/{storage-migration.cap-DT_sdxio.js → storage-migration.cap-C52LxDX2.js} +4 -4
- package/system/dist/{storage-migration.cap-BonKGHaA.mjs → storage-migration.cap-DRl4rt-0.mjs} +4 -4
- package/system/dist/{storage-occupancy.cap-avoVkjfF.js → storage-occupancy.cap-CiGDOgpG.js} +3 -3
- package/system/dist/{storage-occupancy.cap-B_YU_aX3.mjs → storage-occupancy.cap-_VVBswn4.mjs} +3 -3
- package/system/dist/{stream-catalog.cap-Blw9nJ-a.js → stream-catalog.cap-Bl0BSYye.js} +4 -4
- package/system/dist/{stream-catalog.cap-D08FM3ow.mjs → stream-catalog.cap-C7vlYIih.mjs} +4 -4
- package/system/dist/tls/cert-evaluation.d.ts +3 -3
- package/system/dist/tls/cert-issue.d.ts +2 -2
- package/system/dist/tls/cert-manager.d.ts +7 -7
- package/system/dist/tls/tls-actions.d.ts +1 -1
- package/system/dist/tls/tls-status.d.ts +1 -1
- package/system/dist/{user-management.cap-BIOAtxeX.js → user-management.cap-D9EcsR2c.js} +2 -2
- package/system/dist/{user-management.cap-D8lVSHRA.mjs → user-management.cap-mDnBlJay.mjs} +2 -2
- package/system/dist/{wal-maintenance-8cxZxWU2.js → wal-maintenance-BPDo9Jao.js} +9 -9
- package/system/dist/{wal-maintenance-BGa2lDZp.mjs → wal-maintenance-SArcuHLu.mjs} +9 -9
- package/system/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_scoped_settings = require("./scoped-settings-
|
|
2
|
-
const require_record_kind = require("./record-kind-
|
|
1
|
+
const require_scoped_settings = require("./scoped-settings-8uzhJVsE.js");
|
|
2
|
+
const require_record_kind = require("./record-kind-BYbL_LNZ.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region ../types/dist/esm/records/entry-kind.mjs
|
|
5
5
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-BPDo9Jao.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
6
6
|
* The thread that serves ONE database file of the engine (D851): its own
|
|
7
7
|
* `better-sqlite3` connection hosting the same {@link SqliteSettingsBackend}
|
|
8
|
-
* class `
|
|
8
|
+
* class `dominevo.db` runs on the main thread, plus — for `events` — the
|
|
9
9
|
* sqlite-vec index over that connection.
|
|
10
10
|
*
|
|
11
11
|
* A worker entry is a separate bundle (`dist/file-host-worker.js`, wired in
|
|
@@ -14,7 +14,7 @@ let node_worker_threads = require("node:worker_threads");
|
|
|
14
14
|
*
|
|
15
15
|
* What it does NOT own: the WAL checkpoint, the `-shm` canary and the snapshot
|
|
16
16
|
* of this file run in their own threads, started by the main thread's
|
|
17
|
-
* `OwnedSqliteFile` exactly as for `
|
|
17
|
+
* `OwnedSqliteFile` exactly as for `dominevo.db`. What it DOES own and the main
|
|
18
18
|
* thread cannot reach: the connection itself — so the statement profiler and
|
|
19
19
|
* the idle-gated `wal_checkpoint(TRUNCATE)` / `incremental_vacuum` live here.
|
|
20
20
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
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-SArcuHLu.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
5
5
|
* The thread that serves ONE database file of the engine (D851): its own
|
|
6
6
|
* `better-sqlite3` connection hosting the same {@link SqliteSettingsBackend}
|
|
7
|
-
* class `
|
|
7
|
+
* class `dominevo.db` runs on the main thread, plus — for `events` — the
|
|
8
8
|
* sqlite-vec index over that connection.
|
|
9
9
|
*
|
|
10
10
|
* A worker entry is a separate bundle (`dist/file-host-worker.js`, wired in
|
|
@@ -13,7 +13,7 @@ import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
|
13
13
|
*
|
|
14
14
|
* What it does NOT own: the WAL checkpoint, the `-shm` canary and the snapshot
|
|
15
15
|
* of this file run in their own threads, started by the main thread's
|
|
16
|
-
* `OwnedSqliteFile` exactly as for `
|
|
16
|
+
* `OwnedSqliteFile` exactly as for `dominevo.db`. What it DOES own and the main
|
|
17
17
|
* thread cannot reach: the connection itself — so the statement profiler and
|
|
18
18
|
* the idle-gated `wal_checkpoint(TRUNCATE)` / `incremental_vacuum` live here.
|
|
19
19
|
*
|
|
@@ -37,7 +37,7 @@ let anchorParentURL = null
|
|
|
37
37
|
export function initialize(data) {
|
|
38
38
|
const frameworkDir = data && typeof data.frameworkDir === 'string' ? data.frameworkDir : null
|
|
39
39
|
anchorParentURL = frameworkDir
|
|
40
|
-
? pathToFileURL(path.join(frameworkDir, 'node_modules', '
|
|
40
|
+
? pathToFileURL(path.join(frameworkDir, 'node_modules', '__dominevo_resolver_anchor__.js')).href
|
|
41
41
|
: null
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as defineRecordKinds } from "./record-kind-
|
|
1
|
+
import { s as defineRecordKinds } from "./record-kind-DpcGjBK1.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
|
-
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
5
4
|
import { writeOwnerOnlyFileSync } from "@dominevo/types/node";
|
|
5
|
+
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
|
-
import * as fs
|
|
7
|
+
import * as fs from "node:fs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
10
10
|
import { join } from "node:path";
|
|
@@ -163,7 +163,7 @@ var AgentHttpsNames = class {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
|
-
var SLOT = Symbol.for("
|
|
166
|
+
var SLOT = Symbol.for("dominevo.agent-https.names");
|
|
167
167
|
function setProcessAgentHttpsNames(names) {
|
|
168
168
|
if (names === null) Reflect.deleteProperty(globalThis, SLOT);
|
|
169
169
|
else Reflect.set(globalThis, SLOT, names);
|
|
@@ -589,7 +589,7 @@ function collectCertIdentity(options) {
|
|
|
589
589
|
*/
|
|
590
590
|
cryptoProvider.set(webcrypto);
|
|
591
591
|
/** Subject of the local root. Distinct from the leaf's CN by construction. */
|
|
592
|
-
var CA_COMMON_NAME = "
|
|
592
|
+
var CA_COMMON_NAME = "Dominevo Local CA";
|
|
593
593
|
/** Between {@link CA_COMMON_NAME} and the hub's name in a new root's subject. */
|
|
594
594
|
var CA_HUB_NAME_SEPARATOR = " — ";
|
|
595
595
|
/** X.520 `ub-common-name`: the most characters a CN may carry. */
|
|
@@ -599,7 +599,7 @@ function isControlCodePoint(code) {
|
|
|
599
599
|
return code <= 31 || code >= 127 && code <= 159;
|
|
600
600
|
}
|
|
601
601
|
/**
|
|
602
|
-
* The subject CN of a NEW local root: `
|
|
602
|
+
* The subject CN of a NEW local root: `Dominevo Local CA — <hub name>`, so two hubs'
|
|
603
603
|
* roots installed on one phone can be told apart in its settings. The name is
|
|
604
604
|
* sanitised for a CN (controls removed, whitespace collapsed) and cut so the whole
|
|
605
605
|
* CN stays within 64 characters. An absent or unusable name, or one that is just
|
|
@@ -612,7 +612,7 @@ function localCaCommonName(hubName) {
|
|
|
612
612
|
if (hubName === void 0) return CA_COMMON_NAME;
|
|
613
613
|
const cleaned = [...hubName].map((char) => isControlCodePoint(char.codePointAt(0) ?? 0) ? " " : char).join("").replace(/\s+/gu, " ").trim();
|
|
614
614
|
const lowered = cleaned.toLowerCase();
|
|
615
|
-
if (cleaned === "" || lowered === "dominevo"
|
|
615
|
+
if (cleaned === "" || lowered === "dominevo") return CA_COMMON_NAME;
|
|
616
616
|
const room = X509_COMMON_NAME_MAX_LENGTH - 17 - 3;
|
|
617
617
|
return `${CA_COMMON_NAME}${CA_HUB_NAME_SEPARATOR}${[...cleaned].slice(0, room).join("").trimEnd()}`;
|
|
618
618
|
}
|
|
@@ -1009,10 +1009,10 @@ function certificateNames(certPem) {
|
|
|
1009
1009
|
* there is no local CA to sign with or no name survives the policy.
|
|
1010
1010
|
*/
|
|
1011
1011
|
async function issueAgentHttpsLeaf(input) {
|
|
1012
|
-
const caCertPath = join(input.hubDataDir, "tls", "
|
|
1013
|
-
const caKeyPath = join(input.hubDataDir, "tls", "
|
|
1014
|
-
const hubLeafPath = join(input.hubDataDir, "tls", "
|
|
1015
|
-
if (!existsSync(caCertPath) || !existsSync(caKeyPath)) throw new Error("the hub has no local CA to sign with (no tls/
|
|
1012
|
+
const caCertPath = join(input.hubDataDir, "tls", "dominevo-ca.crt");
|
|
1013
|
+
const caKeyPath = join(input.hubDataDir, "tls", "dominevo-ca.key");
|
|
1014
|
+
const hubLeafPath = join(input.hubDataDir, "tls", "dominevo.crt");
|
|
1015
|
+
if (!existsSync(caCertPath) || !existsSync(caKeyPath)) throw new Error("the hub has no local CA to sign with (no tls/dominevo-ca.crt + key)");
|
|
1016
1016
|
const excluded = new Set(input.takenByOthers ?? []);
|
|
1017
1017
|
if (existsSync(hubLeafPath)) for (const name of certificateNames(readFileSync(hubLeafPath, "utf8"))) excluded.add(name);
|
|
1018
1018
|
const ca = await loadCa(readFileSync(caCertPath, "utf8"), readFileSync(caKeyPath, "utf8"));
|
|
@@ -1068,7 +1068,7 @@ var HUB_IDENTITY_RELATIVE = `tls/${HUB_IDENTITY_FILE}`;
|
|
|
1068
1068
|
function readHubIdFile(file) {
|
|
1069
1069
|
let parsed;
|
|
1070
1070
|
try {
|
|
1071
|
-
parsed = JSON.parse(fs
|
|
1071
|
+
parsed = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
1072
1072
|
} catch (err) {
|
|
1073
1073
|
return {
|
|
1074
1074
|
hubId: null,
|
|
@@ -1095,18 +1095,18 @@ function identityPath(dataDir) {
|
|
|
1095
1095
|
function writeHubIdFile(file, hubId) {
|
|
1096
1096
|
const tmp = `${file}.${process.pid}.tmp`;
|
|
1097
1097
|
try {
|
|
1098
|
-
fs
|
|
1099
|
-
fs
|
|
1100
|
-
fs
|
|
1098
|
+
fs.mkdirSync(path$1.dirname(file), { recursive: true });
|
|
1099
|
+
fs.writeFileSync(tmp, `${JSON.stringify({ hubId }, null, 2)}\n`);
|
|
1100
|
+
fs.linkSync(tmp, file);
|
|
1101
1101
|
} catch (err) {
|
|
1102
|
-
if (fs
|
|
1102
|
+
if (fs.existsSync(file)) return readHubIdFile(file);
|
|
1103
1103
|
return {
|
|
1104
1104
|
hubId: null,
|
|
1105
1105
|
created: false,
|
|
1106
1106
|
problem: `could not write ${file}: ${err instanceof Error ? err.message : String(err)}`
|
|
1107
1107
|
};
|
|
1108
1108
|
} finally {
|
|
1109
|
-
fs
|
|
1109
|
+
fs.rmSync(tmp, { force: true });
|
|
1110
1110
|
}
|
|
1111
1111
|
return {
|
|
1112
1112
|
hubId,
|
|
@@ -1120,9 +1120,9 @@ function writeHubIdFile(file, hubId) {
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
function loadOrCreateHubId(dataDir) {
|
|
1122
1122
|
const file = identityPath(dataDir);
|
|
1123
|
-
if (fs
|
|
1123
|
+
if (fs.existsSync(file)) return readHubIdFile(file);
|
|
1124
1124
|
const legacy = path$1.join(dataDir, HUB_IDENTITY_FILE);
|
|
1125
|
-
if (fs
|
|
1125
|
+
if (fs.existsSync(legacy)) {
|
|
1126
1126
|
const read = readHubIdFile(legacy);
|
|
1127
1127
|
if (read.hubId === null) return read;
|
|
1128
1128
|
if (writeHubIdFile(file, read.hubId).hubId === null) return read;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_record_kind = require("./record-kind-
|
|
2
|
+
const require_record_kind = require("./record-kind-BYbL_LNZ.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
|
-
let node_crypto = require("node:crypto");
|
|
6
5
|
let _dominevo_types_node = require("@dominevo/types/node");
|
|
6
|
+
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_net = require("node:net");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -165,7 +165,7 @@ var AgentHttpsNames = class {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
var SLOT = Symbol.for("
|
|
168
|
+
var SLOT = Symbol.for("dominevo.agent-https.names");
|
|
169
169
|
function setProcessAgentHttpsNames(names) {
|
|
170
170
|
if (names === null) Reflect.deleteProperty(globalThis, SLOT);
|
|
171
171
|
else Reflect.set(globalThis, SLOT, names);
|
|
@@ -591,7 +591,7 @@ function collectCertIdentity(options) {
|
|
|
591
591
|
*/
|
|
592
592
|
require_x509_es.cryptoProvider.set(node_crypto.webcrypto);
|
|
593
593
|
/** Subject of the local root. Distinct from the leaf's CN by construction. */
|
|
594
|
-
var CA_COMMON_NAME = "
|
|
594
|
+
var CA_COMMON_NAME = "Dominevo Local CA";
|
|
595
595
|
/** Between {@link CA_COMMON_NAME} and the hub's name in a new root's subject. */
|
|
596
596
|
var CA_HUB_NAME_SEPARATOR = " — ";
|
|
597
597
|
/** X.520 `ub-common-name`: the most characters a CN may carry. */
|
|
@@ -601,7 +601,7 @@ function isControlCodePoint(code) {
|
|
|
601
601
|
return code <= 31 || code >= 127 && code <= 159;
|
|
602
602
|
}
|
|
603
603
|
/**
|
|
604
|
-
* The subject CN of a NEW local root: `
|
|
604
|
+
* The subject CN of a NEW local root: `Dominevo Local CA — <hub name>`, so two hubs'
|
|
605
605
|
* roots installed on one phone can be told apart in its settings. The name is
|
|
606
606
|
* sanitised for a CN (controls removed, whitespace collapsed) and cut so the whole
|
|
607
607
|
* CN stays within 64 characters. An absent or unusable name, or one that is just
|
|
@@ -614,7 +614,7 @@ function localCaCommonName(hubName) {
|
|
|
614
614
|
if (hubName === void 0) return CA_COMMON_NAME;
|
|
615
615
|
const cleaned = [...hubName].map((char) => isControlCodePoint(char.codePointAt(0) ?? 0) ? " " : char).join("").replace(/\s+/gu, " ").trim();
|
|
616
616
|
const lowered = cleaned.toLowerCase();
|
|
617
|
-
if (cleaned === "" || lowered === "dominevo"
|
|
617
|
+
if (cleaned === "" || lowered === "dominevo") return CA_COMMON_NAME;
|
|
618
618
|
const room = X509_COMMON_NAME_MAX_LENGTH - 17 - 3;
|
|
619
619
|
return `${CA_COMMON_NAME}${CA_HUB_NAME_SEPARATOR}${[...cleaned].slice(0, room).join("").trimEnd()}`;
|
|
620
620
|
}
|
|
@@ -1011,10 +1011,10 @@ function certificateNames(certPem) {
|
|
|
1011
1011
|
* there is no local CA to sign with or no name survives the policy.
|
|
1012
1012
|
*/
|
|
1013
1013
|
async function issueAgentHttpsLeaf(input) {
|
|
1014
|
-
const caCertPath = (0, node_path.join)(input.hubDataDir, "tls", "
|
|
1015
|
-
const caKeyPath = (0, node_path.join)(input.hubDataDir, "tls", "
|
|
1016
|
-
const hubLeafPath = (0, node_path.join)(input.hubDataDir, "tls", "
|
|
1017
|
-
if (!(0, node_fs.existsSync)(caCertPath) || !(0, node_fs.existsSync)(caKeyPath)) throw new Error("the hub has no local CA to sign with (no tls/
|
|
1014
|
+
const caCertPath = (0, node_path.join)(input.hubDataDir, "tls", "dominevo-ca.crt");
|
|
1015
|
+
const caKeyPath = (0, node_path.join)(input.hubDataDir, "tls", "dominevo-ca.key");
|
|
1016
|
+
const hubLeafPath = (0, node_path.join)(input.hubDataDir, "tls", "dominevo.crt");
|
|
1017
|
+
if (!(0, node_fs.existsSync)(caCertPath) || !(0, node_fs.existsSync)(caKeyPath)) throw new Error("the hub has no local CA to sign with (no tls/dominevo-ca.crt + key)");
|
|
1018
1018
|
const excluded = new Set(input.takenByOthers ?? []);
|
|
1019
1019
|
if ((0, node_fs.existsSync)(hubLeafPath)) for (const name of certificateNames((0, node_fs.readFileSync)(hubLeafPath, "utf8"))) excluded.add(name);
|
|
1020
1020
|
const ca = await loadCa((0, node_fs.readFileSync)(caCertPath, "utf8"), (0, node_fs.readFileSync)(caKeyPath, "utf8"));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const
|
|
2
|
+
const require_dominevo_error = require("./dominevo-error-CTBRQM6p.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_hub_identity = require("./hub-identity-
|
|
5
|
-
let node_crypto = require("node:crypto");
|
|
4
|
+
const require_hub_identity = require("./hub-identity-DihZeMUF.js");
|
|
6
5
|
let _dominevo_types_node = require("@dominevo/types/node");
|
|
6
|
+
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -143,11 +143,11 @@ function listenOn(port, bind, next) {
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/tls/cert-manager.ts
|
|
146
|
-
var DEFAULT_COMMON_NAME = "
|
|
146
|
+
var DEFAULT_COMMON_NAME = "dominevo.local";
|
|
147
147
|
/**
|
|
148
148
|
* Ensure the hub has a usable TLS identity under `<dataDir>/tls`, made of
|
|
149
|
-
* a long-lived local **root** (`
|
|
150
|
-
* chained to it (`
|
|
149
|
+
* a long-lived local **root** (`dominevo-ca.crt`) and a short **leaf**
|
|
150
|
+
* chained to it (`dominevo.crt` = leaf + root, `dominevo.key`).
|
|
151
151
|
*
|
|
152
152
|
* ## The regeneration rule (D227)
|
|
153
153
|
*
|
|
@@ -178,16 +178,16 @@ var DEFAULT_COMMON_NAME = "camstack.local";
|
|
|
178
178
|
* bugs this rule fixes.
|
|
179
179
|
*
|
|
180
180
|
* **The root is rotated only for root-level reasons.** SAN drift rotates
|
|
181
|
-
* the leaf alone, so trust granted to `
|
|
181
|
+
* the leaf alone, so trust granted to `dominevo-ca.crt` survives every
|
|
182
182
|
* address change the hub will ever see.
|
|
183
183
|
*/
|
|
184
184
|
async function ensureTlsCert(dataDir, options) {
|
|
185
185
|
const tlsDir = (0, node_path.join)(dataDir, "tls");
|
|
186
186
|
const paths = {
|
|
187
|
-
certPath: (0, node_path.join)(tlsDir, "
|
|
188
|
-
keyPath: (0, node_path.join)(tlsDir, "
|
|
189
|
-
caCertPath: (0, node_path.join)(tlsDir, "
|
|
190
|
-
caKeyPath: (0, node_path.join)(tlsDir, "
|
|
187
|
+
certPath: (0, node_path.join)(tlsDir, "dominevo.crt"),
|
|
188
|
+
keyPath: (0, node_path.join)(tlsDir, "dominevo.key"),
|
|
189
|
+
caCertPath: (0, node_path.join)(tlsDir, "dominevo-ca.crt"),
|
|
190
|
+
caKeyPath: (0, node_path.join)(tlsDir, "dominevo-ca.key")
|
|
191
191
|
};
|
|
192
192
|
const commonName = options?.commonName ?? DEFAULT_COMMON_NAME;
|
|
193
193
|
const validDays = Math.min(options?.validDays ?? 397, 397);
|
|
@@ -220,15 +220,15 @@ async function ensureTlsCert(dataDir, options) {
|
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
222
|
* Operator "Regenerate": issue a new leaf under the existing local CA.
|
|
223
|
-
* Never rotates the root — trust granted to `
|
|
223
|
+
* Never rotates the root — trust granted to `dominevo-ca.crt` survives.
|
|
224
224
|
*/
|
|
225
225
|
async function reissueTlsLeaf(dataDir, options) {
|
|
226
226
|
const tlsDir = (0, node_path.join)(dataDir, "tls");
|
|
227
227
|
const paths = {
|
|
228
|
-
certPath: (0, node_path.join)(tlsDir, "
|
|
229
|
-
keyPath: (0, node_path.join)(tlsDir, "
|
|
230
|
-
caCertPath: (0, node_path.join)(tlsDir, "
|
|
231
|
-
caKeyPath: (0, node_path.join)(tlsDir, "
|
|
228
|
+
certPath: (0, node_path.join)(tlsDir, "dominevo.crt"),
|
|
229
|
+
keyPath: (0, node_path.join)(tlsDir, "dominevo.key"),
|
|
230
|
+
caCertPath: (0, node_path.join)(tlsDir, "dominevo-ca.crt"),
|
|
231
|
+
caKeyPath: (0, node_path.join)(tlsDir, "dominevo-ca.key")
|
|
232
232
|
};
|
|
233
233
|
if (!(0, node_fs.existsSync)(paths.caCertPath) || !(0, node_fs.existsSync)(paths.caKeyPath)) return ensureTlsCert(dataDir, options);
|
|
234
234
|
const commonName = options?.commonName ?? DEFAULT_COMMON_NAME;
|
|
@@ -256,10 +256,10 @@ async function reissueTlsLeaf(dataDir, options) {
|
|
|
256
256
|
async function replaceUnconstrainedLocalCa(dataDir, options) {
|
|
257
257
|
const tlsDir = (0, node_path.join)(dataDir, "tls");
|
|
258
258
|
const paths = {
|
|
259
|
-
certPath: (0, node_path.join)(tlsDir, "
|
|
260
|
-
keyPath: (0, node_path.join)(tlsDir, "
|
|
261
|
-
caCertPath: (0, node_path.join)(tlsDir, "
|
|
262
|
-
caKeyPath: (0, node_path.join)(tlsDir, "
|
|
259
|
+
certPath: (0, node_path.join)(tlsDir, "dominevo.crt"),
|
|
260
|
+
keyPath: (0, node_path.join)(tlsDir, "dominevo.key"),
|
|
261
|
+
caCertPath: (0, node_path.join)(tlsDir, "dominevo-ca.crt"),
|
|
262
|
+
caKeyPath: (0, node_path.join)(tlsDir, "dominevo-ca.key")
|
|
263
263
|
};
|
|
264
264
|
if (!(0, node_fs.existsSync)(paths.caCertPath) || !(0, node_fs.existsSync)(paths.caKeyPath)) return false;
|
|
265
265
|
try {
|
|
@@ -375,7 +375,7 @@ function caReplacementMarkerFile(dataDir) {
|
|
|
375
375
|
* unconstrained CA, key first. Idempotent; returns whether anything was removed.
|
|
376
376
|
*/
|
|
377
377
|
function retirePreviousLocalCa(dataDir) {
|
|
378
|
-
const base = (0, node_path.join)(dataDir, "tls", "
|
|
378
|
+
const base = (0, node_path.join)(dataDir, "tls", "dominevo-ca");
|
|
379
379
|
const present = [`${base}.key.previous`, `${base}.crt.previous`].filter((file) => (0, node_fs.existsSync)(file));
|
|
380
380
|
for (const file of present) (0, node_fs.rmSync)(file, { force: true });
|
|
381
381
|
return present.length > 0;
|
|
@@ -555,7 +555,7 @@ function readTlsMode(dataDir) {
|
|
|
555
555
|
if (raw === "uploaded") return "uploaded";
|
|
556
556
|
if (raw === "disabled") return "disabled";
|
|
557
557
|
}
|
|
558
|
-
return (0, node_fs.existsSync)((0, node_path.join)(tlsDir(dataDir), "
|
|
558
|
+
return (0, node_fs.existsSync)((0, node_path.join)(tlsDir(dataDir), "dominevo.crt")) ? "generated" : "disabled";
|
|
559
559
|
}
|
|
560
560
|
function writeTlsMode(dataDir, mode) {
|
|
561
561
|
(0, node_fs.mkdirSync)(tlsDir(dataDir), { recursive: true });
|
|
@@ -610,7 +610,7 @@ function readStoredUpload(dir) {
|
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
function readLocalCaConstrained(dir) {
|
|
613
|
-
const caPath = (0, node_path.join)(dir, "
|
|
613
|
+
const caPath = (0, node_path.join)(dir, "dominevo-ca.crt");
|
|
614
614
|
if (!(0, node_fs.existsSync)(caPath)) return null;
|
|
615
615
|
try {
|
|
616
616
|
return require_hub_identity.isConstrainedCa(new require_x509_es.X509Certificate((0, node_fs.readFileSync)(caPath, "utf-8")));
|
|
@@ -629,7 +629,7 @@ function readCaReplacedAt(dir) {
|
|
|
629
629
|
return null;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
/** Where an upload's own CA is kept — never over the local CA's `
|
|
632
|
+
/** Where an upload's own CA is kept — never over the local CA's `dominevo-ca.crt`. */
|
|
633
633
|
var UPLOADED_CA_FILE = "uploaded-ca.crt";
|
|
634
634
|
/** Every certificate in a PEM bundle, in order. */
|
|
635
635
|
function splitPemCertificates(pem) {
|
|
@@ -656,7 +656,7 @@ function uploadedIssuer(dir, leaf, chainPem) {
|
|
|
656
656
|
return null;
|
|
657
657
|
}
|
|
658
658
|
function generatedIssuer(dir) {
|
|
659
|
-
const caPath = (0, node_path.join)(dir, "
|
|
659
|
+
const caPath = (0, node_path.join)(dir, "dominevo-ca.crt");
|
|
660
660
|
if (!(0, node_fs.existsSync)(caPath)) return null;
|
|
661
661
|
const pem = (0, node_fs.readFileSync)(caPath, "utf-8");
|
|
662
662
|
return {
|
|
@@ -673,7 +673,7 @@ function generatedIssuer(dir) {
|
|
|
673
673
|
*/
|
|
674
674
|
function readTlsAccessStatus(dataDir, servedLeafFingerprint) {
|
|
675
675
|
const dir = tlsDir(dataDir);
|
|
676
|
-
const certPath = (0, node_path.join)(dir, "
|
|
676
|
+
const certPath = (0, node_path.join)(dir, "dominevo.crt");
|
|
677
677
|
const mode = readTlsMode(dataDir);
|
|
678
678
|
if (!(0, node_fs.existsSync)(certPath)) return {
|
|
679
679
|
mode: "disabled",
|
|
@@ -736,8 +736,8 @@ function readTlsAccessStatus(dataDir, servedLeafFingerprint) {
|
|
|
736
736
|
* leaf the local root did not issue is one of that rule's reissue triggers.
|
|
737
737
|
*/
|
|
738
738
|
async function prepareBootTls(dataDir, options) {
|
|
739
|
-
const certPath = (0, node_path.join)(dataDir, "tls", "
|
|
740
|
-
const keyPath = (0, node_path.join)(dataDir, "tls", "
|
|
739
|
+
const certPath = (0, node_path.join)(dataDir, "tls", "dominevo.crt");
|
|
740
|
+
const keyPath = (0, node_path.join)(dataDir, "tls", "dominevo.key");
|
|
741
741
|
const marked = readTlsMode(dataDir);
|
|
742
742
|
if (marked === "uploaded" && (0, node_fs.existsSync)(certPath) && (0, node_fs.existsSync)(keyPath)) return {
|
|
743
743
|
mode: "uploaded",
|
|
@@ -759,7 +759,7 @@ async function prepareBootTls(dataDir, options) {
|
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region src/tls/https-listener.ts
|
|
762
|
-
var SLOT_KEY = Symbol.for("
|
|
762
|
+
var SLOT_KEY = Symbol.for("dominevo.tls.https-listener");
|
|
763
763
|
var EMPTY_SLOT = {
|
|
764
764
|
reload: null,
|
|
765
765
|
servedLeafFingerprint: null
|
|
@@ -845,14 +845,14 @@ function withNewline(pem) {
|
|
|
845
845
|
* The leaf (or chain) and key are written twice: as the served pair, and as a kept copy
|
|
846
846
|
* (`uploaded.crt` / `uploaded.key`, with the issuing CA in `uploaded-ca.crt`) that
|
|
847
847
|
* "Revert to generated" leaves in place so the upload can be selected again. The local
|
|
848
|
-
* CA (`
|
|
848
|
+
* CA (`dominevo-ca.crt` + key) is never touched - it did not sign the upload, and it is
|
|
849
849
|
* what every device that trusts it still needs.
|
|
850
850
|
*/
|
|
851
851
|
async function storeUploadedCertificate(dataDir, input, options) {
|
|
852
852
|
const valid = validateUploadedTls(input.certPem, input.keyPem);
|
|
853
|
-
if (!valid.ok) throw
|
|
853
|
+
if (!valid.ok) throw require_dominevo_error.userError(valid.code, {}, valid.error);
|
|
854
854
|
const ca = checkUploadedCa(input.certPem, input.caPem, options);
|
|
855
|
-
if (!ca.ok) throw
|
|
855
|
+
if (!ca.ok) throw require_dominevo_error.userError(ca.code, {}, ca.error);
|
|
856
856
|
const dir = (0, node_path.join)(dataDir, "tls");
|
|
857
857
|
await (0, node_fs_promises.mkdir)(dir, { recursive: true });
|
|
858
858
|
const certText = withNewline(input.certPem);
|
|
@@ -862,8 +862,8 @@ async function storeUploadedCertificate(dataDir, input, options) {
|
|
|
862
862
|
const caPath = (0, node_path.join)(dir, UPLOADED_CA_FILE);
|
|
863
863
|
if (ca.issuerPem !== null) await (0, node_fs_promises.writeFile)(caPath, ca.issuerPem);
|
|
864
864
|
else (0, node_fs.rmSync)(caPath, { force: true });
|
|
865
|
-
await (0, node_fs_promises.writeFile)((0, node_path.join)(dir, "
|
|
866
|
-
(0, _dominevo_types_node.writeOwnerOnlyFileSync)((0, node_path.join)(dir, "
|
|
865
|
+
await (0, node_fs_promises.writeFile)((0, node_path.join)(dir, "dominevo.crt"), certText);
|
|
866
|
+
(0, _dominevo_types_node.writeOwnerOnlyFileSync)((0, node_path.join)(dir, "dominevo.key"), keyText);
|
|
867
867
|
writeTlsMode(dataDir, "uploaded");
|
|
868
868
|
}
|
|
869
869
|
/**
|
|
@@ -874,9 +874,9 @@ async function useStoredUploadedCertificate(dataDir) {
|
|
|
874
874
|
const dir = (0, node_path.join)(dataDir, "tls");
|
|
875
875
|
const certPath = (0, node_path.join)(dir, STORED_UPLOAD_CERT_FILE);
|
|
876
876
|
const keyPath = (0, node_path.join)(dir, STORED_UPLOAD_KEY_FILE);
|
|
877
|
-
if (!(0, node_fs.existsSync)(certPath) || !(0, node_fs.existsSync)(keyPath)) throw
|
|
878
|
-
(0, node_fs.copyFileSync)(certPath, (0, node_path.join)(dir, "
|
|
879
|
-
(0, node_fs.copyFileSync)(keyPath, (0, node_path.join)(dir, "
|
|
877
|
+
if (!(0, node_fs.existsSync)(certPath) || !(0, node_fs.existsSync)(keyPath)) throw require_dominevo_error.userError("tls.no-stored-upload", {}, "No uploaded certificate is kept on this node.");
|
|
878
|
+
(0, node_fs.copyFileSync)(certPath, (0, node_path.join)(dir, "dominevo.crt"));
|
|
879
|
+
(0, node_fs.copyFileSync)(keyPath, (0, node_path.join)(dir, "dominevo.key"));
|
|
880
880
|
writeTlsMode(dataDir, "uploaded");
|
|
881
881
|
}
|
|
882
882
|
/** Issue a new generated leaf under the local CA. Refused while an upload is served. */
|
|
@@ -893,9 +893,9 @@ async function revertToGeneratedCertificate(dataDir, options) {
|
|
|
893
893
|
const dir = (0, node_path.join)(dataDir, "tls");
|
|
894
894
|
const keptCert = (0, node_path.join)(dir, STORED_UPLOAD_CERT_FILE);
|
|
895
895
|
const keptKey = (0, node_path.join)(dir, STORED_UPLOAD_KEY_FILE);
|
|
896
|
-
if (readTlsMode(dataDir) === "uploaded" && !(0, node_fs.existsSync)(keptCert) && (0, node_fs.existsSync)((0, node_path.join)(dir, "
|
|
897
|
-
(0, node_fs.copyFileSync)((0, node_path.join)(dir, "
|
|
898
|
-
(0, node_fs.copyFileSync)((0, node_path.join)(dir, "
|
|
896
|
+
if (readTlsMode(dataDir) === "uploaded" && !(0, node_fs.existsSync)(keptCert) && (0, node_fs.existsSync)((0, node_path.join)(dir, "dominevo.crt")) && (0, node_fs.existsSync)((0, node_path.join)(dir, "dominevo.key"))) {
|
|
897
|
+
(0, node_fs.copyFileSync)((0, node_path.join)(dir, "dominevo.crt"), keptCert);
|
|
898
|
+
(0, node_fs.copyFileSync)((0, node_path.join)(dir, "dominevo.key"), keptKey);
|
|
899
899
|
}
|
|
900
900
|
writeTlsMode(dataDir, "generated");
|
|
901
901
|
await ensureTlsCert(dataDir, options);
|
|
@@ -905,8 +905,8 @@ async function revertToGeneratedCertificate(dataDir, options) {
|
|
|
905
905
|
* "the certificate changed" and "clients see it" are the same moment.
|
|
906
906
|
*/
|
|
907
907
|
function applyCertificateToListener(dataDir) {
|
|
908
|
-
const certPath = (0, node_path.join)(dataDir, "tls", "
|
|
909
|
-
const keyPath = (0, node_path.join)(dataDir, "tls", "
|
|
908
|
+
const certPath = (0, node_path.join)(dataDir, "tls", "dominevo.crt");
|
|
909
|
+
const keyPath = (0, node_path.join)(dataDir, "tls", "dominevo.key");
|
|
910
910
|
if (!(0, node_fs.existsSync)(certPath) || !(0, node_fs.existsSync)(keyPath)) return {
|
|
911
911
|
kind: "failed",
|
|
912
912
|
error: `No certificate pair under ${(0, node_path.join)(dataDir, "tls")}`
|