iobroker.eos-admin 9.0.21 → 9.0.25
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/NEXOWATT_EOS_BUILD_INFO.json +17 -11
- package/README.md +37 -9
- package/START_HIER_9.0.21.md +53 -0
- package/START_HIER_9.0.22.md +48 -0
- package/START_HIER_9.0.23.md +47 -0
- package/START_HIER_9.0.24.md +70 -0
- package/START_HIER_9.0.25.md +60 -0
- package/adminWww/.vite/manifest.json +55 -55
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
- package/adminWww/assets/{AdapterUpdateDialog-Dxl_b7Op.js → AdapterUpdateDialog-CLDpmxDx.js} +1 -1
- package/adminWww/assets/{Adapters-CVKKhXmI.js → Adapters-BCGeX2v7.js} +1 -1
- package/adminWww/assets/{ConfigManager-Bf6nTAkL.js → ConfigManager-B_sJf5_w.js} +1 -1
- package/adminWww/assets/{Enums-CJHVJY7t.js → Enums-D3n1pOtc.js} +1 -1
- package/adminWww/assets/{Fields-DWHbZKvm.js → Fields-Bdx5gPoT.js} +1 -1
- package/adminWww/assets/{Files-a6owMTXA.js → Files-BPK84lYU.js} +1 -1
- package/adminWww/assets/{Hosts-LtEMeXpV.js → Hosts--Jr6oLf2.js} +1 -1
- package/adminWww/assets/{Instances-DhChziA1.js → Instances-DxTOzFus.js} +1 -1
- package/adminWww/assets/{Intro-Cyq9gVDC.js → Intro-CYBGeZtu.js} +1 -1
- package/adminWww/assets/{Logs-wcramXsg.js → Logs-CVNC-4S8.js} +1 -1
- package/adminWww/assets/{Objects-DINVHd_e.js → Objects-Cqm9Rvym.js} +1 -1
- package/adminWww/assets/{Overview-DK4R41zR.js → Overview-JgjcHwlz.js} +1 -1
- package/adminWww/assets/{State-DcEACXzL.js → State-BV14HSwZ.js} +1 -1
- package/adminWww/assets/{UsedResources-C1LcM0Rb.js → UsedResources-Dz48WzEF.js} +1 -1
- package/adminWww/assets/{Users-DvDdSyDY.js → Users-D19YlRCD.js} +1 -1
- package/adminWww/assets/{bootstrap-Dbj_GbnP.js → bootstrap-a7POLSDr.js} +4 -4
- package/adminWww/assets/{hostInit-BNFIx0-f.js → hostInit-keGjwsZR.js} +1 -1
- package/adminWww/assets/{icons-material-DVbdXNgr.js → icons-material-Omb_HCfb.js} +1 -1
- package/adminWww/assets/{index-CoKP1NSA.js → index-DqPrQK7T.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CMvku1F1.js → installSVGRenderer-iWfLFoQU.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-ac330bce.js → mf-entry-bootstrap-0-2a856bb6.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.25.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosHistoryBackupScope.js +73 -0
- package/build/lib/eosHistoryBackupScope.js.map +1 -0
- package/build/lib/eosKiosk.js +348 -0
- package/build/lib/eosKiosk.js.map +1 -0
- package/build/lib/eosLegacyMigration.js +24 -3
- package/build/lib/eosLegacyMigration.js.map +1 -1
- package/build/lib/eosLicenseService.js +1 -1
- package/build/lib/eosLicenseService.js.map +1 -1
- package/build/lib/eosModuleConfigStore.js +2 -2
- package/build/lib/eosModuleConfigStore.js.map +1 -1
- package/build/lib/eosModuleHost.js +289 -25
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +71 -8
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleProcess.js +317 -0
- package/build/lib/eosModuleProcess.js.map +1 -0
- package/build/lib/eosModuleProcessProtocol.js +213 -0
- package/build/lib/eosModuleProcessProtocol.js.map +1 -0
- package/build/lib/eosModuleProcessWorker.js +279 -0
- package/build/lib/eosModuleProcessWorker.js.map +1 -0
- package/build/lib/eosPostgresProvisioning.js +189 -0
- package/build/lib/eosPostgresProvisioning.js.map +1 -0
- package/build/lib/eosRuntimeControl.js +224 -0
- package/build/lib/eosRuntimeControl.js.map +1 -0
- package/build/lib/eosRuntimeHealth.js +170 -0
- package/build/lib/eosRuntimeHealth.js.map +1 -0
- package/build/lib/eosUiProcess.js +728 -0
- package/build/lib/eosUiProcess.js.map +1 -0
- package/build/lib/eosUiProcessRpc.js +292 -0
- package/build/lib/eosUiProcessRpc.js.map +1 -0
- package/build/lib/eosUiProcessWorker.js +443 -0
- package/build/lib/eosUiProcessWorker.js.map +1 -0
- package/build/lib/eosUiSecretCodec.js +64 -0
- package/build/lib/eosUiSecretCodec.js.map +1 -0
- package/build/lib/eosUnifiedBoundary.js +28 -4
- package/build/lib/eosUnifiedBoundary.js.map +1 -1
- package/build/lib/eosUpdateSnapshot.js +32 -1
- package/build/lib/eosUpdateSnapshot.js.map +1 -1
- package/build/lib/web.js +175 -18
- package/build/lib/web.js.map +1 -1
- package/build/main.js +6 -2
- package/build/main.js.map +1 -1
- package/docs/reports/unified-9.0.21/CRA_NACHWEISSTAND.md +159 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_BACKEND_REVIEW.md +30 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_UI_REVIEW.md +44 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_WORKER_REVIEW.md +147 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_WORKER_ZWEITPRUEFUNG.md +108 -0
- package/docs/reports/unified-9.0.21/DEVICE_STABILITY_REVIEW.md +50 -0
- package/docs/reports/unified-9.0.21/EMS_STABILITAET.md +41 -0
- package/docs/reports/unified-9.0.21/HISTORY_TARIFF_STABILITY_REVIEW.md +48 -0
- package/docs/reports/unified-9.0.21/MQTT_ZWEITPRUEFUNG_EMS.md +47 -0
- package/docs/reports/unified-9.0.21/PERSISTENZ_STABILITAET.md +76 -0
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +64 -0
- package/docs/reports/unified-9.0.21/SECURITY_STABILITY_REVIEW.md +118 -0
- package/docs/reports/unified-9.0.21/UI_SECURITY_GATE_REVIEW.md +62 -0
- package/docs/reports/unified-9.0.21/UPDATE_HTTP_SNAPSHOT_PRUEFUNG.md +46 -0
- package/docs/reports/unified-9.0.21/raw/INDEX.json +1307 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/cra/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-glue/root-glue-focused-node24.tap +34 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/real920-archive-inspection.json +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node22.log +110 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node24.log +24 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-verification.json +54 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/independent-worker-probes.cjs +109 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node22.tap +44 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node24.tap +13 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/receipt.json +89 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/receipt.json +42 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-catch-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node22.log +1968 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node24.log +337 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node22.log +1895 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node24.log +317 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node24.log +327 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node22.log +15 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node22.log +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node24.log +14 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node22.log +74 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node24.log +46 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-drain-test-update.json +206 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-runtime-review.json +150 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-final.json +275 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands.json +134 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node22.log +3 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node24.log +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-command-replay-repro.cjs +38 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-shutdown-repro.cjs +31 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node22.log +322 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node24.log +55 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-evidence.py +23 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-final-evidence.py +20 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-920.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-921.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/source-hashes.json +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/ems/baseline-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/changed-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/engine.patch +38 -0
- package/docs/reports/unified-9.0.21/raw/ems/eslint-delta.json +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/evidence.json +171 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-baseline-node24.log +124 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node22.log +56 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node24.log +15 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-owned-methods.patch +133 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node22.log +460 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node24.log +82 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node22.log +153 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node24.log +39 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-queue-inheritance-before.log +28 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-baseline-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-initial-timing.log +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node22.log +44 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.cjs +23 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.log +119 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node24.log +121 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node22.log +68 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node24.log +17 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-code-delta-inventory.json +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-farm-fingerprint-moves.json +74 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-policy-tests.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node22.log +5 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node24.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-initial.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-main-full-delta.patch +135 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-changes.json +93 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-findings-before.json +3185 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node22.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node24.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-inventory-before.json +28991 -0
- package/docs/reports/unified-9.0.21/raw/ems/update-ui-reviewed-findings.cjs +59 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-influx-sequence-node24.log +12 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-outage-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node22.log +38 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node24.log +36 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-baseline-comparison.json +83 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-scope.cjs +29 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node22.log +438 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node24.log +75 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node22.json +37 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node24.json +66 -0
- package/docs/reports/unified-9.0.21/raw/history/run-checks.py +18 -0
- package/docs/reports/unified-9.0.21/raw/history/source-evidence.json +83 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.log +16 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.log +13274 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.log +2223 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-http-draft-revision-node24.log +50 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-late-commit-overwrite-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-save-lifecycle-node24.log +59 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-backend-types.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-editor-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-eebus-editor-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-final-format-review.json +24 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-http-before.log +177 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-snapshot-before.log +80 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.log +1019 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.log +174 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-eslint-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.log +137 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-typecheck-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-after.log +3 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-before-observation.json +25 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-repro.cjs +7 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.pre-final-format.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/obsolete-assets-920-added.json +94 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.log +49 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/backend-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node22.tap +495 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node24.tap +88 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node22.tap +179 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node24.tap +36 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/results.json +118 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node22.tap +63 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node24.tap +47 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node22.tap +148 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node24.tap +30 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/baseline-ui.log +280 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/browser-preview.test.cjs +170 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/draft-regression.log +214 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/eos-updates-before.ts +171 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/results.json +90 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/source-evidence.json +30 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node22.log +98 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node24.log +22 -0
- package/docs/reports/unified-9.0.22/BACKUP_POSTGRES_FOLLOWUP.md +44 -0
- package/docs/reports/unified-9.0.22/ENERGIEFLUSS_BROWSERPRUEFUNG.md +40 -0
- package/docs/reports/unified-9.0.22/ENERGY_FLOW_BACKEND.md +44 -0
- package/docs/reports/unified-9.0.22/FLOW_TARIFF_INDEPENDENT_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.22/OCPP_STOP_WRITER_REVIEW.md +27 -0
- package/docs/reports/unified-9.0.22/POSTGRESQL_SYSTEM_SETUP.md +34 -0
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +85 -0
- package/docs/reports/unified-9.0.22/flow/PRUEFVERMERK.md +42 -0
- package/docs/reports/unified-9.0.22/flow/frontend-cadence-tests.log +37 -0
- package/docs/reports/unified-9.0.22/flow/frontend-source-hashes.json +13 -0
- package/docs/reports/unified-9.0.22/flow/frontend-tests.log +31 -0
- package/docs/reports/unified-9.0.22/postgres-history-review.md +43 -0
- package/docs/reports/unified-9.0.22/postgres-real-review.tap +21 -0
- package/docs/reports/unified-9.0.22/postgres-review-lint.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-unit-api.tap +25 -0
- package/docs/reports/unified-9.0.22/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/eslint-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-after.tap +13 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-before.tap +54 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-test-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/influx-real-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/scope-hashes.json +51 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-before.tap +96 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-flow.tap +12 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/tests-node24.tap +116 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup-scope.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-postgres-setup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/current/admin-build.log +152 -0
- package/docs/reports/unified-9.0.22/raw/current/availability-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/backend-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-repairs.log +60 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-unified.log +1675 -0
- package/docs/reports/unified-9.0.22/raw/current/combined-fixes.log +65 -0
- package/docs/reports/unified-9.0.22/raw/current/control-final.log +25 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.json +244 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.json +63 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/lint-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/lint.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/markdown-build.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/modules-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/pre-ocpp-full.log +2337 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.json +22 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build-final.log +8 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build.log +32 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/safety-envelope-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom-lock-graph.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom.log +6120 -0
- package/docs/reports/unified-9.0.22/raw/current/station-permission-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/storage-feedforward-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck.log +5 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/eslint.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-tests.tap +124 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-tests.tap +26 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/typecheck.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node22.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/environment.json +7 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node22.tap +164 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node24.tap +33 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-runtime.json +11 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.json +49 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/build.log +18 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/environment.json +38 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node22.tap +144 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node24.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/node22-tests-final.log +14086 -0
- package/docs/reports/unified-9.0.22/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/node24-tests-final.log +2356 -0
- package/docs/reports/unified-9.0.22/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node22.tap +72 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node24.tap +70 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/status-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/MODULE_PROCESS_IMPLEMENTATION.md +43 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_ERGEBNIS.json +24 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_PRUEFBERICHT.md +50 -0
- package/docs/reports/unified-9.0.23/OCPP_AUTOMATISCHE_ZUORDNUNG.md +49 -0
- package/docs/reports/unified-9.0.23/OCPP_CM_INTEGRATION.md +31 -0
- package/docs/reports/unified-9.0.23/PROZESSDIAGNOSE.md +35 -0
- package/docs/reports/unified-9.0.23/PRUEFBERICHT.md +75 -0
- package/docs/reports/unified-9.0.23/UI_EMS_PROZESSGRENZE.md +36 -0
- package/docs/reports/unified-9.0.23/UI_PROCESS_INDEPENDENT_FOLLOWUP.md +33 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node22.tap +86 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node24.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.md +39 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-final.tap +27 -0
- package/docs/reports/unified-9.0.23/module-process-static.json +57 -0
- package/docs/reports/unified-9.0.23/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.23/raw/build-backend-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/build-frontend.log +152 -0
- package/docs/reports/unified-9.0.23/raw/build-installer.log +26 -0
- package/docs/reports/unified-9.0.23/raw/build-ui-final.log +7 -0
- package/docs/reports/unified-9.0.23/raw/current/evcs-stop-writer-ocpp043.txt +20 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-tests.txt +28 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-tests.txt +27 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-types.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/eos-production-audit.json +22 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node22.log +75 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node24.log +22 -0
- package/docs/reports/unified-9.0.23/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/node22-tests-final.log +14612 -0
- package/docs/reports/unified-9.0.23/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/node24-tests-final.log +2443 -0
- package/docs/reports/unified-9.0.23/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-auto-discovery.log +21 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-browser.json +55 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-lifecycle-regression.log +48 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-production-audit.json +69 -0
- package/docs/reports/unified-9.0.23/raw/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/discovery-review.tap +21 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node22.tap +118 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node24.tap +112 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/root-typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-build-node24.tap +196 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-node22.tap +200 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node22.tap +92 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node24.tap +90 -0
- package/docs/reports/unified-9.0.23/ui-process-contract-review.md +30 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node22.tap +50 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node24.tap +14 -0
- package/docs/reports/unified-9.0.23/ui-process-followup-hashes.json +13 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node22.tap +30 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node24.tap +11 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node22.tap +48 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node24.tap +46 -0
- package/docs/reports/unified-9.0.24/BACKUP_INTEROP_PRUEFBERICHT.md +48 -0
- package/docs/reports/unified-9.0.24/KIOSK_FRONTEND_BROWSERPRUEFUNG.md +49 -0
- package/docs/reports/unified-9.0.24/KIOSK_UNABHAENGIGER_REVIEW.md +21 -0
- package/docs/reports/unified-9.0.24/OCPP_HOST_MIGRATION.md +41 -0
- package/docs/reports/unified-9.0.24/OCPP_NAMESPACE_REGELPFAD.md +55 -0
- package/docs/reports/unified-9.0.24/OCPP_UNABHAENGIGER_REVIEW.md +37 -0
- package/docs/reports/unified-9.0.24/OCPP_VERWALTUNG.md +33 -0
- package/docs/reports/unified-9.0.24/PRUEFBERICHT.md +54 -0
- package/docs/reports/unified-9.0.24/PUBLISH_OVERLAY_9_0_21.md +23 -0
- package/docs/reports/unified-9.0.24/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ems-independence-node24.tap +9 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node22.tap +175 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node24.tap +35 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node22.tap +132 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node24.tap +27 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-review-node24.tap +13 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-update-snapshot-node24.tap +22 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-source.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-tests.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ocpp-backup-node24.tap +10 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/own-source-hashes.json +12 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/update-snapshot-node24.tap +20 -0
- package/docs/reports/unified-9.0.24/raw/build.log +200 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.stderr.txt +3 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.stderr.txt +2 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node22.txt +253 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node24.txt +52 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-lint.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-lease-registration-before.txt +28 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node22.txt +302 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node24.txt +55 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-native-generic-before.txt +25 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/eos-production-audit.json +77 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node22.log +16 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node24.log +14 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node22.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node24.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node22.log +215 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node24.log +42 -0
- package/docs/reports/unified-9.0.24/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.24/raw/node22-tests-final.log +15517 -0
- package/docs/reports/unified-9.0.24/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/node24-tests-final.log +2595 -0
- package/docs/reports/unified-9.0.24/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node22.tap +105 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node24.tap +24 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node22.tap +818 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node24.tap +140 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-hosted-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-legacy-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-namespace-control.log +49 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node22.tap +278 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node24.tap +52 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance-922-923.json +32 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance.json +19 -0
- package/docs/reports/unified-9.0.24/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.25/MIGRATION_INDEPENDENT_REVIEW.md +74 -0
- package/docs/reports/unified-9.0.25/OCPP_STARTSPERRE_9.0.24.md +60 -0
- package/docs/reports/unified-9.0.25/PRUEFBERICHT.md +78 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROLS_BROWSERPRUEFUNG.md +81 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_BACKEND.md +58 -0
- package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_INDEPENDENT_REVIEW.md +66 -0
- package/docs/reports/unified-9.0.25/RUNTIME_LOGIN_RECOVERY.md +32 -0
- package/docs/reports/unified-9.0.25/TARIFF_UPDATE_PERSISTENCE.md +50 -0
- package/docs/reports/unified-9.0.25/UI_CONFIG_COMMIT_ACK.md +51 -0
- package/docs/reports/unified-9.0.25/raw/BUILD_CHECKS.json +49 -0
- package/docs/reports/unified-9.0.25/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.25/raw/SBOM_GENERATION.json +42 -0
- package/docs/reports/unified-9.0.25/raw/build-backend.log +5 -0
- package/docs/reports/unified-9.0.25/raw/build-frontend.log +152 -0
- package/docs/reports/unified-9.0.25/raw/build-installer.log +26 -0
- package/docs/reports/unified-9.0.25/raw/build-modules.log +5 -0
- package/docs/reports/unified-9.0.25/raw/build-ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.25/raw/eos-production-audit.json +77 -0
- package/docs/reports/unified-9.0.25/raw/eos-production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/frontend-sbom.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/installer-sbom.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.25/raw/node22-tests-final.log +15879 -0
- package/docs/reports/unified-9.0.25/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.25/raw/node24-tests-final.log +2653 -0
- package/docs/reports/unified-9.0.25/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node22-final.tap +236 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node24-final.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/runtime-control-backend/source-sha256.json +19 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node22.json +70 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node24.json +70 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node22.json +49 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node24.json +49 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node22.log +15 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node24.log +15 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node22.json +32 -0
- package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node24.json +32 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node22.log +28 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node24.log +10 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/route-regression-node24.log +28 -0
- package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/source-sha256.json +6 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/README.md +41 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node24.tap +13 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node22.tap +232 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node24.tap +43 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node22.tap +68 -0
- package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node24.tap +17 -0
- package/docs/reports/unified-9.0.25/raw/sbom-lock.log +1 -0
- package/docs/reports/unified-9.0.25/raw/sbom-lock.stderr +1 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node24.tap +40 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node22.tap +44 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node24.tap +13 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/commit-ack-sha256.txt +4 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/config-ack-result.json +19 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/generate-921-fixture.cjs +36 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/node22.tap +68 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/node24.tap +64 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/reproduce-config-ack.cjs +55 -0
- package/docs/reports/unified-9.0.25/raw/tariff-update/reviewed-sha256.txt +4 -0
- package/docs/reports/unified-9.0.25/raw/typecheck.log +5 -0
- package/docs/unified/EMS_BEDIEN_DATENPUNKTE_9_0_22.md +51 -0
- package/docs/unified/HISTORY_UI_9_0_22.md +75 -0
- package/docs/unified/POSTGRESQL_9_0_22.md +89 -0
- package/io-package.json +20 -22
- package/modules/backup/README.md +10 -0
- package/modules/backup/RECOVERY-9.0.22.md +59 -0
- package/modules/backup/admin/index.html +2 -1
- package/modules/backup/admin/index.js +17 -1
- package/modules/backup/build/config.js +2 -0
- package/modules/backup/build/coverage.js +64 -0
- package/modules/backup/build/creators.js +22 -17
- package/modules/backup/build/databaseTargets.js +42 -0
- package/modules/backup/build/index.js +47 -4
- package/modules/backup/build/influxIntegrity.js +159 -0
- package/modules/backup/build/postgresHistory.js +91 -0
- package/modules/backup/build/preflight.js +3 -8
- package/modules/backup/build/publicTrust.js +46 -0
- package/modules/backup/build/restore-cli.js +72 -1
- package/modules/backup/build/storageRetention.js +26 -0
- package/modules/backup/build/worker.js +18 -1
- package/modules/backup/src/config.ts +2 -0
- package/modules/backup/src/coverage.ts +50 -0
- package/modules/backup/src/creators.ts +20 -17
- package/modules/backup/src/databaseTargets.ts +45 -0
- package/modules/backup/src/index.ts +37 -4
- package/modules/backup/src/influxIntegrity.ts +125 -0
- package/modules/backup/src/postgresHistory.ts +66 -0
- package/modules/backup/src/preflight.ts +3 -10
- package/modules/backup/src/publicTrust.ts +34 -0
- package/modules/backup/src/restore-cli.ts +55 -4
- package/modules/backup/src/storageRetention.ts +20 -0
- package/modules/backup/src/types.ts +5 -0
- package/modules/backup/src/worker.ts +18 -2
- package/modules/backup/test/completeness.test.cjs +193 -0
- package/modules/backup/test/hosted.test.cjs +43 -3
- package/modules/backup/test/influx-real.test.cjs +75 -0
- package/modules/backup/test/lifecycle.test.cjs +7 -5
- package/modules/backup/test/ocpp-coverage.test.cjs +152 -0
- package/modules/devices/admin/index.html +1 -1
- package/modules/eebus/admin/index.html +1 -1
- package/modules/ocpp/LICENSE +21 -0
- package/modules/ocpp/README.md +61 -0
- package/modules/ocpp/admin/config-fields.json +353 -0
- package/modules/ocpp/admin/index.html +52 -0
- package/modules/ocpp/admin/index.js +228 -0
- package/modules/ocpp/admin/style.css +27 -0
- package/modules/ocpp/build/index.js +401 -0
- package/modules/ocpp/build/operationGuard.js +26 -0
- package/modules/ocpp/build/server.js +155 -0
- package/modules/ocpp/eslint.config.mjs +13 -0
- package/modules/ocpp/index.js +3 -0
- package/modules/ocpp/native-defaults.json +44 -0
- package/modules/ocpp/ocpp/common.js +646 -0
- package/modules/ocpp/ocpp/compact.js +332 -0
- package/modules/ocpp/ocpp/configuration.js +364 -0
- package/modules/ocpp/ocpp/eos-contract.js +149 -0
- package/modules/ocpp/ocpp/freshness.d.ts +10 -0
- package/modules/ocpp/ocpp/freshness.js +272 -0
- package/modules/ocpp/ocpp/schemas/NOTICE.md +17 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_0_1_official.json +1 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_1_official.json +1 -0
- package/modules/ocpp/ocpp/server.js +3 -0
- package/modules/ocpp/ocpp/v16.js +213 -0
- package/modules/ocpp/ocpp/v201.js +4 -0
- package/modules/ocpp/ocpp/v21.js +4 -0
- package/modules/ocpp/ocpp/v2base.js +255 -0
- package/modules/ocpp/package.json +11 -0
- package/modules/ocpp/provenance.json +33 -0
- package/modules/ocpp/runtime.d.ts +16 -0
- package/modules/ocpp/runtime.js +3391 -0
- package/modules/ocpp/src/index.ts +463 -0
- package/modules/ocpp/src/operationGuard.ts +29 -0
- package/modules/ocpp/src/server.ts +193 -0
- package/modules/ocpp/test/configuration-runtime.test.js +786 -0
- package/modules/ocpp/test/core.test.js +772 -0
- package/modules/ocpp/test/eos-contract.test.js +67 -0
- package/modules/ocpp/test/hosted.test.cjs +165 -0
- package/modules/ocpp/tsconfig.json +7 -0
- package/modules/ocpp/validation/manifest.json +36 -0
- package/modules/ocpp/validation/node22-tests.log +525 -0
- package/modules/ocpp/validation/node24-tests.log +92 -0
- package/package.json +29 -11
- package/public/eos-migration/index.html +1 -1
- package/public/eos-migration/index.js +2 -2
- package/public/eos-runtime/index.html +36 -0
- package/public/eos-runtime/index.js +249 -0
- package/public/eos-runtime/style.css +27 -0
- package/release-manifests/unified/build-environment.cdx.json +767 -131
- package/release-manifests/unified/files.json +700 -214
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +292 -6
- package/release-manifests/unified/runtime.cdx.json +871 -143
- package/release-manifests/unified/validation.json +15 -15
- package/reports/unified/ocpp-pure-pv-9.0.22/PRUEFVERMERK.md +35 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/auto-pv-phases.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/control-tests.log +11 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/ocpp-stability.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/rc60.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/PRUEFVERMERK.md +44 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/focused-tests.log +37 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/grid-charge-policy.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/status-truth.log +1 -0
- package/tools/eos-release-check.cjs +5 -0
- package/tools/eos-release-manifest.cjs +3 -3
- package/tools/eos-sbom-vendored.cjs +2 -1
- package/tools/system/eos-postgresql-setup.cjs +409 -0
- package/tsconfig.eos-history-backup-scope.json +9 -0
- package/tsconfig.eos-postgres-system.json +15 -0
- package/ui/admin/react/assets/index-wHWXfD_g.js +13 -0
- package/ui/admin/react/index.html +1 -1
- package/ui/ems/consumers/evcs.js +11 -7
- package/ui/ems/datapoints.js +14 -5
- package/ui/ems/engine.js +4 -1
- package/ui/ems/modules/charging-management.js +193 -63
- package/ui/ems/modules/core-limits.js +15 -20
- package/ui/ems/modules/storage-control.js +8 -6
- package/ui/ems/modules/tarif-vis.js +7 -2
- package/ui/ems/modules/tariff-status.js +19 -1
- package/ui/eslint.postgres-history.config.mjs +9 -0
- package/ui/io-package.json +5 -1
- package/ui/lib/ems-control-values.js +64 -0
- package/ui/lib/flow-measurement.js +72 -0
- package/ui/lib/hosted-adapter.js +12 -1
- package/ui/lib/influx-history-runtime.js +66 -24
- package/ui/lib/installer-lifecycle.js +4 -2
- package/ui/lib/ocpp-auto-discovery.js +397 -0
- package/ui/lib/ocpp-limit-feedback.js +166 -0
- package/ui/lib/partner-runtime.js +35 -2
- package/ui/lib/partner-websocket.js +4 -1
- package/ui/lib/postgres-history-config.js +57 -0
- package/ui/lib/postgres-history.js +344 -0
- package/ui/lib/runtime-proxy-html.js +34 -1
- package/ui/lib/smarthome-device-controls.js +4 -1
- package/ui/lib/ui-access-policy.js +39 -6
- package/ui/main.js +392 -222
- package/ui/package.json +1 -1
- package/ui/tsconfig.postgres-history.json +4 -0
- package/ui/www/app.js +106 -152
- package/ui/www/auth.js +36 -10
- package/ui/www/charging-diagnostics-appcenter.js +1 -0
- package/ui/www/customer-tariff.js +1 -0
- package/ui/www/dashboard-lp-status.js +1 -0
- package/ui/www/dc-station-display.js +1 -0
- package/ui/www/ems-apps.js +48 -8
- package/ui/www/energy-origin-appcenter.js +1 -0
- package/ui/www/energy-origin-ledger-view.js +1 -0
- package/ui/www/eos-kiosk-settings.js +174 -0
- package/ui/www/eos-session-idle.js +40 -6
- package/ui/www/eos-updates.js +1 -0
- package/ui/www/index.html +2 -1
- package/ui/www/license.js +1 -0
- package/ui/www/licenses/smarthome-markdown-components.json +157 -157
- package/ui/www/live-display.js +4 -2
- package/ui/www/login.js +25 -9
- package/ui/www/manifest.webmanifest +3 -3
- package/ui/www/netoperator-appcenter.js +1 -0
- package/ui/www/netoperator.js +1 -0
- package/ui/www/operating-strategies-appcenter.js +1 -0
- package/ui/www/operating-strategies-rule-builder.js +1 -0
- package/ui/www/power-measurements.js +27 -2
- package/ui/www/pwa.js +1 -0
- package/ui/www/runtime-base.js +1 -0
- package/ui/www/settings.html +13 -1
- package/ui/www/smarthome-activation.js +1 -0
- package/ui/www/smarthome-alias-config.js +1 -0
- package/ui/www/smarthome-custom-config.js +1 -0
- package/ui/www/smarthome-custom-views.js +1 -0
- package/ui/www/smarthome-device-categories.js +1 -0
- package/ui/www/smarthome-device-config.js +1 -0
- package/ui/www/smarthome-device-controls.js +1 -0
- package/ui/www/smarthome-feedback.js +1 -0
- package/ui/www/smarthome-layout-editor.js +1 -0
- package/ui/www/smarthome-presentation.js +1 -0
- package/ui/www/smarthome-setup.js +1 -0
- package/ui/www/smarthome-touch.js +1 -0
- package/ui/www/storagefarm-dispatch.js +1 -0
- package/ui/www/storagefarm-summary.js +1 -0
- package/ui/www/tariff-display.js +62 -2
- package/adminWww/remoteEntry-eos-9.0.21.js +0 -12
- package/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-check
|
|
3
|
+
'use strict';
|
|
4
|
+
/**
|
|
5
|
+
* Explicit, bounded administrator bootstrap for a NEW EOS site.
|
|
6
|
+
* Never called by npm lifecycle hooks or the unprivileged adapter. No shell,
|
|
7
|
+
* arbitrary paths, network downloads, sudoers changes or existing-cluster edits.
|
|
8
|
+
*/
|
|
9
|
+
const fs = require('node:fs/promises');
|
|
10
|
+
const constants = require('node:fs').constants;
|
|
11
|
+
const path = require('node:path');
|
|
12
|
+
const crypto = require('node:crypto');
|
|
13
|
+
const net = require('node:net');
|
|
14
|
+
const { spawn } = require('node:child_process');
|
|
15
|
+
|
|
16
|
+
const CLIENT_ROOT = '/etc/nexowatt-eos/postgresql';
|
|
17
|
+
const SERVER_ROOT = '/etc/nexowatt-postgresql';
|
|
18
|
+
const DATA_ROOT = '/var/lib/nexowatt-postgresql';
|
|
19
|
+
const SOCKET_ROOT = '/run/nexowatt-postgresql';
|
|
20
|
+
const SERVICE_FILE = '/etc/systemd/system/nexowatt-postgresql.service';
|
|
21
|
+
const SERVICE = 'nexowatt-postgresql.service';
|
|
22
|
+
const SERVICE_USER = 'nexowatt-pg';
|
|
23
|
+
const PG_BIN = '/usr/lib/postgresql/17/bin';
|
|
24
|
+
const PORT = 55432;
|
|
25
|
+
const PACKAGE_OVERRIDE = '# Temporary EOS bootstrap override; removed after package transaction.\ncreate_main_cluster = false\n';
|
|
26
|
+
const PROGRAMS = new Set([
|
|
27
|
+
'/usr/bin/getent', '/usr/sbin/useradd', '/usr/sbin/runuser', '/usr/bin/systemctl',
|
|
28
|
+
'/usr/bin/openssl', '/usr/bin/apt-get', `${PG_BIN}/initdb`, `${PG_BIN}/psql`, `${PG_BIN}/postgres`,
|
|
29
|
+
]);
|
|
30
|
+
const fail = (/** @type {string} */ code) => new Error(`EOS_POSTGRES_SETUP_${code}`);
|
|
31
|
+
|
|
32
|
+
/** @param {unknown} namespace @returns {number} */
|
|
33
|
+
function instanceNumber(namespace) {
|
|
34
|
+
if (typeof namespace !== 'string' || !/^eos-admin\.(0|[1-9]\d{0,3})$/.test(namespace)) throw fail('NAMESPACE');
|
|
35
|
+
return Number(namespace.split('.')[1]);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @param {string} namespace */
|
|
39
|
+
function names(namespace) {
|
|
40
|
+
const id = instanceNumber(namespace);
|
|
41
|
+
return { database: `eos_history_${id}`, owner: `eos_history_${id}_owner`, runtime: `eos_history_${id}_runtime`, backup: `eos_history_${id}_backup` };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** @param {string} namespace @param {'runtime'|'backup'} purpose @param {string} password */
|
|
45
|
+
function profile(namespace, purpose, password) {
|
|
46
|
+
const n = names(namespace);
|
|
47
|
+
if (!/^[a-f0-9]{64}$/.test(password)) throw fail('PASSWORD_FORMAT');
|
|
48
|
+
return { schemaVersion: 1, provider: 'postgresql', provisioned: true, newInstallation: true,
|
|
49
|
+
host: '127.0.0.1', port: PORT, database: n.database, user: n[purpose], password,
|
|
50
|
+
caFile: `${CLIENT_ROOT}/ca.crt`, servername: 'localhost', schema: 'eos_history' };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Pure render functions are also used by the isolated PostgreSQL acceptance tests. */
|
|
54
|
+
function postgresConfig() {
|
|
55
|
+
return `# Managed EOS PostgreSQL 17; explicit administrator bootstrap only.\nlisten_addresses = '127.0.0.1'\nport = ${PORT}\ndata_directory = '${DATA_ROOT}/data'\nhba_file = '${SERVER_ROOT}/pg_hba.conf'\nident_file = '${SERVER_ROOT}/pg_ident.conf'\nunix_socket_directories = '${SOCKET_ROOT}'\nunix_socket_permissions = 0700\nssl = on\nssl_cert_file = '${SERVER_ROOT}/server.crt'\nssl_key_file = '${SERVER_ROOT}/server.key'\nssl_min_protocol_version = 'TLSv1.3'\npassword_encryption = 'scram-sha-256'\nmax_connections = 24\nshared_buffers = '64MB'\nwork_mem = '4MB'\nstatement_timeout = '5s'\nlock_timeout = '2s'\nidle_in_transaction_session_timeout = '10s'\nlog_statement = 'none'\nlog_min_error_statement = 'panic'\nlog_parameter_max_length = 0\nlog_parameter_max_length_on_error = 0\nlogging_collector = off\n`;
|
|
56
|
+
}
|
|
57
|
+
function hbaConfig() {
|
|
58
|
+
// Peer is limited to the dedicated OS/database maintenance identity. Runtime
|
|
59
|
+
// and backup roles can never fall back to the private maintenance socket.
|
|
60
|
+
return `# Explicit local TLS policy, no trust authentication.\nlocal all ${SERVICE_USER} peer\nlocal all all reject\nhostnossl all all 0.0.0.0/0 reject\nhostnossl all all ::/0 reject\nhostssl all all 127.0.0.1/32 scram-sha-256\nhost all all 0.0.0.0/0 reject\nhost all all ::/0 reject\n`;
|
|
61
|
+
}
|
|
62
|
+
function serviceConfig() {
|
|
63
|
+
return `[Unit]\nDescription=NexoWatt local PostgreSQL history\nAfter=local-fs.target\n[Service]\nType=simple\nUser=${SERVICE_USER}\nGroup=${SERVICE_USER}\nExecStart=${PG_BIN}/postgres -D ${DATA_ROOT}/data -c config_file=${SERVER_ROOT}/postgresql.conf\nExecReload=/bin/kill -HUP $MAINPID\nKillSignal=SIGINT\nTimeoutStopSec=120\nRestart=on-failure\nRestartSec=5\nUMask=0077\nRuntimeDirectory=nexowatt-postgresql\nRuntimeDirectoryMode=0700\nNoNewPrivileges=true\nPrivateTmp=true\nPrivateDevices=true\nProtectSystem=strict\nProtectHome=true\nProtectKernelTunables=true\nProtectKernelModules=true\nProtectControlGroups=true\nRestrictSUIDSGID=true\nLockPersonality=true\nRestrictRealtime=true\nCapabilityBoundingSet=\nAmbientCapabilities=\nRestrictAddressFamilies=AF_UNIX AF_INET\nIPAddressDeny=any\nIPAddressAllow=127.0.0.1/32\nReadWritePaths=${DATA_ROOT} ${SOCKET_ROOT}\nMemoryMax=768M\nTasksMax=96\nLimitNOFILE=4096\n[Install]\nWantedBy=multi-user.target\n`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @param {string} namespace @param {string} runtimePassword @param {string} backupPassword */
|
|
67
|
+
function rolesSql(namespace, runtimePassword, backupPassword) {
|
|
68
|
+
const n = names(namespace);
|
|
69
|
+
profile(namespace, 'runtime', runtimePassword); profile(namespace, 'backup', backupPassword);
|
|
70
|
+
return `SET password_encryption = 'scram-sha-256';\nDO $$ BEGIN
|
|
71
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname='${n.owner}') THEN CREATE ROLE ${n.owner} NOLOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION; END IF;
|
|
72
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname='${n.runtime}') THEN CREATE ROLE ${n.runtime} LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION; END IF;
|
|
73
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname='${n.backup}') THEN CREATE ROLE ${n.backup} LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION; END IF;
|
|
74
|
+
END $$;
|
|
75
|
+
REVOKE ALL ON DATABASE postgres, template0, template1 FROM PUBLIC;
|
|
76
|
+
ALTER ROLE ${n.runtime} PASSWORD '${runtimePassword}' CONNECTION LIMIT 8;
|
|
77
|
+
ALTER ROLE ${n.backup} PASSWORD '${backupPassword}' CONNECTION LIMIT 2;
|
|
78
|
+
SELECT 'CREATE DATABASE ${n.database} OWNER ${n.owner}' WHERE NOT EXISTS (SELECT 1 FROM pg_database WHERE datname='${n.database}')\n\\gexec
|
|
79
|
+
REVOKE ALL ON DATABASE ${n.database} FROM PUBLIC;
|
|
80
|
+
GRANT CONNECT ON DATABASE ${n.database} TO ${n.runtime}, ${n.backup};
|
|
81
|
+
ALTER ROLE ${n.runtime} IN DATABASE ${n.database} SET search_path = eos_history, pg_catalog;
|
|
82
|
+
ALTER ROLE ${n.backup} IN DATABASE ${n.database} SET search_path = eos_history, pg_catalog;
|
|
83
|
+
ALTER ROLE ${n.backup} IN DATABASE ${n.database} SET statement_timeout = '0';
|
|
84
|
+
ALTER ROLE ${n.backup} IN DATABASE ${n.database} SET default_transaction_read_only = on;
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @param {string} namespace */
|
|
89
|
+
function schemaSql(namespace) {
|
|
90
|
+
const n = names(namespace);
|
|
91
|
+
return `BEGIN;
|
|
92
|
+
REVOKE ALL ON SCHEMA public FROM PUBLIC;
|
|
93
|
+
CREATE SCHEMA IF NOT EXISTS eos_history AUTHORIZATION ${n.owner};
|
|
94
|
+
SET LOCAL ROLE ${n.owner};
|
|
95
|
+
CREATE TABLE IF NOT EXISTS eos_history.samples (
|
|
96
|
+
id text NOT NULL CHECK (length(id) BETWEEN 1 AND 512),
|
|
97
|
+
ts bigint NOT NULL CHECK (ts >= 0),
|
|
98
|
+
value_type smallint NOT NULL CHECK (value_type IN (0,1,2)),
|
|
99
|
+
value_number double precision,
|
|
100
|
+
value_boolean boolean,
|
|
101
|
+
value_text text CHECK (length(value_text) <= 16384),
|
|
102
|
+
PRIMARY KEY (id, ts),
|
|
103
|
+
CHECK ((value_type=0 AND value_number IS NOT NULL AND value_boolean IS NULL AND value_text IS NULL)
|
|
104
|
+
OR (value_type=1 AND value_number IS NULL AND value_boolean IS NOT NULL AND value_text IS NULL)
|
|
105
|
+
OR (value_type=2 AND value_number IS NULL AND value_boolean IS NULL AND value_text IS NOT NULL)),
|
|
106
|
+
CHECK (value_number IS NULL OR (value_number > '-Infinity'::float8 AND value_number < 'Infinity'::float8))
|
|
107
|
+
);
|
|
108
|
+
REVOKE ALL ON SCHEMA eos_history FROM PUBLIC;
|
|
109
|
+
REVOKE ALL ON ALL TABLES IN SCHEMA eos_history FROM PUBLIC;
|
|
110
|
+
GRANT USAGE ON SCHEMA eos_history TO ${n.runtime}, ${n.backup};
|
|
111
|
+
GRANT SELECT, INSERT, UPDATE ON eos_history.samples TO ${n.runtime};
|
|
112
|
+
GRANT SELECT ON eos_history.samples TO ${n.backup};
|
|
113
|
+
COMMIT;
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @param {string} file @param {boolean} [directory] */
|
|
118
|
+
async function trustedRootPath(file, directory = false) {
|
|
119
|
+
const stat = await fs.lstat(file);
|
|
120
|
+
if (stat.isSymbolicLink() || stat.uid !== 0 || (stat.mode & 0o022) !== 0 || (directory ? !stat.isDirectory() : !stat.isFile())) throw fail('UNTRUSTED_PATH');
|
|
121
|
+
if (await fs.realpath(file) !== file) throw fail('UNTRUSTED_PATH');
|
|
122
|
+
let parent = path.dirname(file);
|
|
123
|
+
while (parent !== '/') {
|
|
124
|
+
const ancestor = await fs.lstat(parent);
|
|
125
|
+
if (!ancestor.isDirectory() || ancestor.isSymbolicLink() || ancestor.uid !== 0 || (ancestor.mode & 0o022) !== 0) throw fail('UNTRUSTED_PATH');
|
|
126
|
+
parent = path.dirname(parent);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @param {string} file */
|
|
131
|
+
async function trustedExecutable(file) {
|
|
132
|
+
if (!PROGRAMS.has(file)) throw fail('PROGRAM_DENIED');
|
|
133
|
+
const resolved = await fs.realpath(file);
|
|
134
|
+
await trustedRootPath(resolved);
|
|
135
|
+
const stat = await fs.stat(resolved);
|
|
136
|
+
if (!(stat.mode & 0o111)) throw fail('PROGRAM_NOT_EXECUTABLE');
|
|
137
|
+
return resolved;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** @param {string} file @param {string[]} args @param {{input?:string,env?:Record<string,string>,uid?:number,gid?:number,allowFailure?:boolean,timeoutMs?:number,captureOutput?:boolean}} [options] */
|
|
141
|
+
async function run(file, args, options = {}) {
|
|
142
|
+
const executable = await trustedExecutable(file);
|
|
143
|
+
return await new Promise((resolve, reject) => {
|
|
144
|
+
const child = spawn(executable, args, { shell: false, cwd: '/', detached: true,
|
|
145
|
+
env: { PATH: '/usr/sbin:/usr/bin:/sbin:/bin', LANG: 'C', HOME: '/', ...options.env },
|
|
146
|
+
stdio: ['pipe','pipe','pipe'], ...(options.uid !== undefined ? { uid: options.uid } : {}), ...(options.gid !== undefined ? { gid: options.gid } : {}) });
|
|
147
|
+
let output = ''; let settled = false;
|
|
148
|
+
function terminateGroup() {
|
|
149
|
+
if (!child.pid) return;
|
|
150
|
+
try { process.kill(-child.pid, 'SIGKILL'); }
|
|
151
|
+
catch(error) { if (!(error && typeof error === 'object' && 'code' in error && error.code === 'ESRCH')) child.kill('SIGKILL'); }
|
|
152
|
+
}
|
|
153
|
+
const timer = setTimeout(() => { terminateGroup(); finish(fail('COMMAND_TIMEOUT')); }, options.timeoutMs || 120000);
|
|
154
|
+
/** @param {Error|null} error @param {number|null} [code] */
|
|
155
|
+
function finish(error, code = null) {
|
|
156
|
+
if (settled) return; settled = true; clearTimeout(timer);
|
|
157
|
+
if (error) reject(error); else if (code !== 0 && !options.allowFailure) reject(fail('COMMAND_FAILED')); else resolve({ output, code });
|
|
158
|
+
}
|
|
159
|
+
child.stdout.on('data', chunk => { if (options.captureOutput === false) return; output += chunk.toString(); if (output.length > 256*1024) { terminateGroup(); finish(fail('COMMAND_OUTPUT_LIMIT')); } });
|
|
160
|
+
// Do not log command stderr: SQL failures can echo generated passwords.
|
|
161
|
+
child.stderr.resume();
|
|
162
|
+
child.on('error', () => finish(fail('COMMAND_FAILED')));
|
|
163
|
+
child.on('close', code => finish(null, code));
|
|
164
|
+
child.stdin.on('error', () => { terminateGroup(); finish(fail('COMMAND_INPUT_FAILED')); });
|
|
165
|
+
child.stdin.end(options.input || '');
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** @param {string} file @param {string} data @param {number} mode @param {number} gid @param {boolean} [replace] */
|
|
170
|
+
async function writeProtected(file, data, mode, gid, replace = false) {
|
|
171
|
+
await trustedRootPath(path.dirname(file), true);
|
|
172
|
+
if (replace) {
|
|
173
|
+
try { await trustedRootPath(file); } catch (e) { if (!(e && typeof e === 'object' && 'code' in e && e.code === 'ENOENT')) throw e; }
|
|
174
|
+
}
|
|
175
|
+
const temporary = `${file}.${crypto.randomBytes(12).toString('hex')}.tmp`;
|
|
176
|
+
const handle = await fs.open(temporary, constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW, mode);
|
|
177
|
+
try { await handle.writeFile(data); await handle.chown(0,gid); await handle.chmod(mode); await handle.sync(); }
|
|
178
|
+
finally { await handle.close(); }
|
|
179
|
+
try {
|
|
180
|
+
if (replace) await fs.rename(temporary,file);
|
|
181
|
+
else { await fs.link(temporary,file); await fs.unlink(temporary); }
|
|
182
|
+
const directory=await fs.open(path.dirname(file),constants.O_RDONLY|constants.O_DIRECTORY|constants.O_NOFOLLOW);
|
|
183
|
+
try { await directory.sync(); } finally { await directory.close(); }
|
|
184
|
+
// Preserve the original publication failure; temporary names contain no
|
|
185
|
+
// credentials, remain protected, and can be inspected during maintenance.
|
|
186
|
+
} catch (error) { await fs.unlink(temporary).catch(() => {}); throw error; }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** @param {string} directory @param {number} uid @param {number} gid @param {number} mode */
|
|
190
|
+
async function privateDirectory(directory, uid, gid, mode) {
|
|
191
|
+
try { await fs.mkdir(directory, { mode }); await fs.chown(directory,uid,gid); }
|
|
192
|
+
catch (error) { if (!(error && typeof error === 'object' && 'code' in error && error.code === 'EEXIST')) throw error; }
|
|
193
|
+
const stat=await fs.lstat(directory);
|
|
194
|
+
if (!stat.isDirectory() || stat.isSymbolicLink() || await fs.realpath(directory)!==directory || stat.uid!==uid || stat.gid!==gid || (stat.mode&0o777)!==mode) throw fail('DIRECTORY_POLICY');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @param {string} name @param {'passwd'|'group'} database */
|
|
198
|
+
async function identity(name, database) {
|
|
199
|
+
const result=await run('/usr/bin/getent',[database,name],{allowFailure:true});
|
|
200
|
+
if (result.code!==0) return null;
|
|
201
|
+
const fields=result.output.trim().split(':');
|
|
202
|
+
const id=Number(fields[2]); if(!Number.isSafeInteger(id)||id<=0) throw fail('ACCOUNT_POLICY');
|
|
203
|
+
return { id, fields };
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async function portFree() {
|
|
207
|
+
await new Promise((resolve,reject)=>{
|
|
208
|
+
const server=net.createServer();
|
|
209
|
+
server.once('error',()=>reject(fail('PORT_IN_USE')));
|
|
210
|
+
server.listen(PORT,'127.0.0.1',()=>server.close(error=>error?reject(fail('PORT_CHECK')):resolve(undefined)));
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** @param {string} os */
|
|
215
|
+
function packageSystemSupported(os) { return /^ID=debian$/m.test(os)&&/^VERSION_ID="?13"?$/m.test(os); }
|
|
216
|
+
/** @param {string} defaults */
|
|
217
|
+
function packageDefaultsSupported(defaults) { return /^\s*include_dir\s+'\/etc\/postgresql-common\/createcluster\.d'\s*$/m.test(defaults); }
|
|
218
|
+
/** @param {{dev:number,ino:number}} original @param {{dev:number,ino:number}} current @param {string} content */
|
|
219
|
+
function packagePolicyOwned(original,current,content) { return original.dev===current.dev&&original.ino===current.ino&&content===PACKAGE_OVERRIDE; }
|
|
220
|
+
|
|
221
|
+
/** Fixed distro package action, only reachable from the explicit root CLI flag. */
|
|
222
|
+
async function installPackages() {
|
|
223
|
+
const os=await fs.readFile('/etc/os-release','utf8');
|
|
224
|
+
if(!packageSystemSupported(os))throw fail('PACKAGE_OS_UNSUPPORTED');
|
|
225
|
+
const security=['-o','Acquire::AllowInsecureRepositories=false','-o','APT::Get::AllowUnauthenticated=false','-o','Dpkg::Use-Pty=0','-o','Dpkg::Options::=--force-confold'];
|
|
226
|
+
const options={env:{DEBIAN_FRONTEND:'noninteractive',UCF_FORCE_CONFFOLD:'1'},timeoutMs:600000,captureOutput:false};
|
|
227
|
+
await run('/usr/bin/apt-get',[...security,'update'],options);
|
|
228
|
+
const install=[...security,'--yes','--no-install-recommends','--no-upgrade','install'];
|
|
229
|
+
await run('/usr/bin/apt-get',[...install,'postgresql-common'],options);
|
|
230
|
+
const defaults='/etc/postgresql-common/createcluster.conf';
|
|
231
|
+
const include='/etc/postgresql-common/createcluster.d';
|
|
232
|
+
const override=`${include}/zz-nexowatt-bootstrap.conf`;
|
|
233
|
+
await trustedRootPath(defaults);
|
|
234
|
+
const defaultText=await fs.readFile(defaults,'utf8');
|
|
235
|
+
if(!packageDefaultsSupported(defaultText))throw fail('PACKAGE_CLUSTER_POLICY_UNKNOWN');
|
|
236
|
+
await trustedRootPath('/etc/postgresql-common',true);
|
|
237
|
+
await privateDirectory(include,0,0,0o755);
|
|
238
|
+
await writeProtected(override,PACKAGE_OVERRIDE,0o600,0);
|
|
239
|
+
const original=await fs.lstat(override);
|
|
240
|
+
/** @type {unknown} */
|
|
241
|
+
let installationError;
|
|
242
|
+
try { await run('/usr/bin/apt-get',[...install,'postgresql-17','postgresql-client-17','openssl'],options); }
|
|
243
|
+
catch(error) { installationError=error; }
|
|
244
|
+
await trustedRootPath(override);
|
|
245
|
+
if(!packagePolicyOwned(original,await fs.lstat(override),await fs.readFile(override,'utf8')))throw fail('PACKAGE_POLICY_CHANGED');
|
|
246
|
+
await fs.unlink(override);
|
|
247
|
+
if(installationError!==undefined)throw installationError;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** @param {string} namespace @param {{installPackages?:boolean}} [options] */
|
|
251
|
+
async function provisionUnlocked(namespace, options={}) {
|
|
252
|
+
instanceNumber(namespace);
|
|
253
|
+
if (process.platform!=='linux' || process.getuid?.()!==0) throw fail('ADMIN_BOOTSTRAP_REQUIRED');
|
|
254
|
+
await trustedRootPath(await fs.realpath(__filename));
|
|
255
|
+
for (const dir of ['/etc','/etc/systemd','/etc/systemd/system','/var','/var/lib']) await trustedRootPath(dir,true);
|
|
256
|
+
await fs.access('/run/systemd/system');
|
|
257
|
+
const eosGroup=await identity('iobroker','group'); if(!eosGroup) throw fail('IOBROKER_GROUP_MISSING');
|
|
258
|
+
let existing=false;
|
|
259
|
+
try { await fs.lstat(SERVER_ROOT); existing=true; } catch(e) { if(!(e&&typeof e==='object'&&'code'in e&&e.code==='ENOENT'))throw e; }
|
|
260
|
+
if(existing) {
|
|
261
|
+
await trustedRootPath(SERVER_ROOT,true);
|
|
262
|
+
await trustedRootPath(`${SERVER_ROOT}/managed.json`);
|
|
263
|
+
const marker=JSON.parse(await fs.readFile(`${SERVER_ROOT}/managed.json`,'utf8'));
|
|
264
|
+
if(marker.schemaVersion!==1||marker.major!==17||marker.port!==PORT||marker.service!==SERVICE)throw fail('UNMANAGED_CLUSTER');
|
|
265
|
+
for (const required of [`${DATA_ROOT}/data/PG_VERSION`, `${SERVER_ROOT}/postgresql.conf`, `${SERVER_ROOT}/pg_hba.conf`, `${SERVER_ROOT}/server.key`, `${SERVER_ROOT}/server.crt`, `${CLIENT_ROOT}/ca.crt`, SERVICE_FILE]) {
|
|
266
|
+
try { await fs.lstat(required); }
|
|
267
|
+
catch(error) { if(error && typeof error==='object' && 'code' in error && error.code==='ENOENT')throw fail('INCOMPLETE_BOOTSTRAP'); throw error; }
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
for(const target of [DATA_ROOT,SERVICE_FILE]) {
|
|
271
|
+
try { await fs.lstat(target); throw fail('UNMANAGED_CLUSTER'); } catch(e) { if(!(e&&typeof e==='object'&&'code'in e&&e.code==='ENOENT'))throw e; }
|
|
272
|
+
}
|
|
273
|
+
await portFree();
|
|
274
|
+
const unit=await run('/usr/bin/systemctl',['show','--property=FragmentPath','--value',SERVICE],{allowFailure:true});
|
|
275
|
+
if(unit.output.trim())throw fail('UNMANAGED_SERVICE');
|
|
276
|
+
}
|
|
277
|
+
const dropIns=await run('/usr/bin/systemctl',['show','--property=DropInPaths','--value',SERVICE],{allowFailure:true});
|
|
278
|
+
if(dropIns.output.trim())throw fail('MANAGED_CONFIGURATION_CHANGED');
|
|
279
|
+
let account=await identity(SERVICE_USER,'passwd');
|
|
280
|
+
if(account&&!existing)throw fail('UNMANAGED_ACCOUNT');
|
|
281
|
+
if(options.installPackages)await installPackages();
|
|
282
|
+
for(const exe of [`${PG_BIN}/initdb`,`${PG_BIN}/postgres`,`${PG_BIN}/psql`,'/usr/bin/openssl']) await trustedExecutable(exe);
|
|
283
|
+
const serverVersion=await run(`${PG_BIN}/postgres`,['--version']);
|
|
284
|
+
if(!/PostgreSQL\) 17\./.test(serverVersion.output)) throw fail('VERSION_UNSUPPORTED');
|
|
285
|
+
if(!account) {
|
|
286
|
+
await run('/usr/sbin/useradd',['--system','--user-group','--home-dir',DATA_ROOT,'--no-create-home','--shell','/usr/sbin/nologin',SERVICE_USER]);
|
|
287
|
+
account=await identity(SERVICE_USER,'passwd');
|
|
288
|
+
}
|
|
289
|
+
if(!account||account.fields[5]!==DATA_ROOT||account.fields[6]!=='/usr/sbin/nologin')throw fail('ACCOUNT_POLICY');
|
|
290
|
+
const pgGroup=await identity(SERVICE_USER,'group'); if(!pgGroup)throw fail('ACCOUNT_POLICY');
|
|
291
|
+
const uid=account.id, gid=pgGroup.id;
|
|
292
|
+
await privateDirectory(SERVER_ROOT,0,gid,0o750);
|
|
293
|
+
if(!existing) await writeProtected(`${SERVER_ROOT}/managed.json`,JSON.stringify({schemaVersion:1,major:17,port:PORT,service:SERVICE})+'\n',0o640,gid);
|
|
294
|
+
await privateDirectory(DATA_ROOT,uid,gid,0o700);
|
|
295
|
+
// Existing EOS parent is allowed with tighter modes; never widen it.
|
|
296
|
+
try { await fs.mkdir('/etc/nexowatt-eos',{mode:0o750}); await fs.chown('/etc/nexowatt-eos',0,eosGroup.id); }
|
|
297
|
+
catch(e) { if(!(e&&typeof e==='object'&&'code'in e&&e.code==='EEXIST'))throw e; }
|
|
298
|
+
await trustedRootPath('/etc/nexowatt-eos',true);
|
|
299
|
+
const parent=await fs.stat('/etc/nexowatt-eos');
|
|
300
|
+
if (!(parent.mode&0o001) && !(parent.gid===eosGroup.id&&(parent.mode&0o010)))throw fail('EOS_DIRECTORY_NOT_TRAVERSABLE');
|
|
301
|
+
await privateDirectory(CLIENT_ROOT,0,eosGroup.id,0o750);
|
|
302
|
+
const pending=`${CLIENT_ROOT}/pending-${namespace}.json`;
|
|
303
|
+
const runtimeFile=`${CLIENT_ROOT}/client-${namespace}.json`, backupFile=`${CLIENT_ROOT}/backup-${namespace}.json`;
|
|
304
|
+
const readyFile=`${CLIENT_ROOT}/ready-${namespace}.json`;
|
|
305
|
+
// A failed repeated bootstrap must not leave an old readiness certificate.
|
|
306
|
+
try { await trustedRootPath(readyFile); await fs.unlink(readyFile); }
|
|
307
|
+
catch(e) { if(!(e&&typeof e==='object'&&'code'in e&&e.code==='ENOENT'))throw e; }
|
|
308
|
+
/** @type {{runtime:string,backup:string}} */
|
|
309
|
+
let passwords;
|
|
310
|
+
try {
|
|
311
|
+
await trustedRootPath(pending);
|
|
312
|
+
passwords=JSON.parse(await fs.readFile(pending,'utf8'));
|
|
313
|
+
profile(namespace,'runtime',passwords.runtime); profile(namespace,'backup',passwords.backup);
|
|
314
|
+
} catch(e) {
|
|
315
|
+
if(!(e&&typeof e==='object'&&'code'in e&&e.code==='ENOENT'))throw e;
|
|
316
|
+
const present=await Promise.all([runtimeFile,backupFile].map(async file=>{
|
|
317
|
+
try { await trustedRootPath(file); return true; }
|
|
318
|
+
catch(error) { if(error&&typeof error==='object'&&'code'in error&&error.code==='ENOENT')return false; throw error; }
|
|
319
|
+
}));
|
|
320
|
+
if(present[0]!==present[1])throw fail('PROFILE_PARTIAL');
|
|
321
|
+
try {
|
|
322
|
+
await trustedRootPath(runtimeFile); await trustedRootPath(backupFile);
|
|
323
|
+
const r=JSON.parse(await fs.readFile(runtimeFile,'utf8')),b=JSON.parse(await fs.readFile(backupFile,'utf8'));
|
|
324
|
+
passwords={runtime:r.password,backup:b.password};
|
|
325
|
+
if(JSON.stringify(profile(namespace,'runtime',r.password))!==JSON.stringify(r)||JSON.stringify(profile(namespace,'backup',b.password))!==JSON.stringify(b))throw fail('PROFILE_CONFLICT');
|
|
326
|
+
} catch(err) {
|
|
327
|
+
if(!(err&&typeof err==='object'&&'code'in err&&err.code==='ENOENT'))throw err;
|
|
328
|
+
passwords={runtime:crypto.randomBytes(32).toString('hex'),backup:crypto.randomBytes(32).toString('hex')};
|
|
329
|
+
await writeProtected(pending,JSON.stringify(passwords)+'\n',0o600,0);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if(!existing) {
|
|
333
|
+
await run(`${PG_BIN}/initdb`,['-D',`${DATA_ROOT}/data`,'--auth-local=peer','--auth-host=scram-sha-256','--encoding=UTF8','--locale=C.UTF-8'],{uid,gid});
|
|
334
|
+
await run('/usr/bin/openssl',['req','-x509','-newkey','ec','-pkeyopt','ec_paramgen_curve:P-256','-nodes','-keyout',`${SERVER_ROOT}/ca.key`,'-out',`${CLIENT_ROOT}/ca.crt`,'-days','3650','-subj','/CN=NexoWatt local PostgreSQL CA','-addext','basicConstraints=critical,CA:TRUE','-addext','keyUsage=critical,keyCertSign,cRLSign']);
|
|
335
|
+
await fs.chown(`${SERVER_ROOT}/ca.key`,0,0); await fs.chmod(`${SERVER_ROOT}/ca.key`,0o600);
|
|
336
|
+
await fs.chown(`${CLIENT_ROOT}/ca.crt`,0,eosGroup.id); await fs.chmod(`${CLIENT_ROOT}/ca.crt`,0o640);
|
|
337
|
+
await run('/usr/bin/openssl',['req','-new','-newkey','ec','-pkeyopt','ec_paramgen_curve:P-256','-nodes','-keyout',`${SERVER_ROOT}/server.key`,'-out',`${SERVER_ROOT}/server.csr`,'-subj','/CN=localhost']);
|
|
338
|
+
await writeProtected(`${SERVER_ROOT}/server.ext`,'basicConstraints=critical,CA:FALSE\nkeyUsage=critical,digitalSignature\nextendedKeyUsage=serverAuth\nsubjectAltName=DNS:localhost,IP:127.0.0.1\n',0o640,gid);
|
|
339
|
+
await run('/usr/bin/openssl',['x509','-req','-in',`${SERVER_ROOT}/server.csr`,'-CA',`${CLIENT_ROOT}/ca.crt`,'-CAkey',`${SERVER_ROOT}/ca.key`,'-set_serial',`0x${crypto.randomBytes(16).toString('hex')}`,'-out',`${SERVER_ROOT}/server.crt`,'-days','825','-sha256','-extfile',`${SERVER_ROOT}/server.ext`]);
|
|
340
|
+
for(const f of ['server.key','server.crt']) { await fs.chown(`${SERVER_ROOT}/${f}`,0,gid);await fs.chmod(`${SERVER_ROOT}/${f}`,0o640); }
|
|
341
|
+
await writeProtected(`${SERVER_ROOT}/postgresql.conf`,postgresConfig(),0o640,gid);
|
|
342
|
+
await writeProtected(`${SERVER_ROOT}/pg_hba.conf`,hbaConfig(),0o640,gid);
|
|
343
|
+
await writeProtected(`${SERVER_ROOT}/pg_ident.conf`,'# No additional user mappings.\n',0o640,gid);
|
|
344
|
+
await writeProtected(SERVICE_FILE,serviceConfig(),0o644,0);
|
|
345
|
+
await run('/usr/bin/systemctl',['daemon-reload']);
|
|
346
|
+
await run('/usr/bin/systemctl',['enable','--now',SERVICE]);
|
|
347
|
+
} else {
|
|
348
|
+
for(const [f,want] of /** @type {const} */ ([[`${SERVER_ROOT}/postgresql.conf`,postgresConfig()],[`${SERVER_ROOT}/pg_hba.conf`,hbaConfig()],[SERVICE_FILE,serviceConfig()]])) {
|
|
349
|
+
await trustedRootPath(f); if(await fs.readFile(f,'utf8')!==want)throw fail('MANAGED_CONFIGURATION_CHANGED');
|
|
350
|
+
}
|
|
351
|
+
await run('/usr/bin/systemctl',['start',SERVICE]);
|
|
352
|
+
}
|
|
353
|
+
// Wait is bounded and used only during explicitly invoked system setup.
|
|
354
|
+
const psql=['--no-psqlrc','--no-password','--set','ON_ERROR_STOP=1','--host',SOCKET_ROOT,'--port',String(PORT),'--username',SERVICE_USER];
|
|
355
|
+
let online=false;
|
|
356
|
+
for(let i=0;i<20;i++) {
|
|
357
|
+
const r=await run(`${PG_BIN}/psql`,[...psql,'--dbname','postgres','--tuples-only','--command','SELECT 1'],{uid,gid,allowFailure:true});
|
|
358
|
+
if(r.code===0){online=true;break;}
|
|
359
|
+
await new Promise(resolve=>setTimeout(resolve,250));
|
|
360
|
+
}
|
|
361
|
+
if(!online)throw fail('SERVER_NOT_READY');
|
|
362
|
+
const serverPolicy=await run(`${PG_BIN}/psql`,[...psql,'--dbname','postgres','--tuples-only','--no-align','--command',"SELECT current_setting('listen_addresses')='127.0.0.1' AND current_setting('port')='55432' AND current_setting('ssl')='on' AND current_setting('ssl_min_protocol_version')='TLSv1.3' AND current_setting('password_encryption')='scram-sha-256'"],{uid,gid});
|
|
363
|
+
if(serverPolicy.output.trim()!=='t')throw fail('SERVER_POLICY_CHANGED');
|
|
364
|
+
await run(`${PG_BIN}/psql`,[...psql,'--dbname','postgres'],{uid,gid,input:rolesSql(namespace,passwords.runtime,passwords.backup)});
|
|
365
|
+
await run(`${PG_BIN}/psql`,[...psql,'--dbname',names(namespace).database],{uid,gid,input:schemaSql(namespace)});
|
|
366
|
+
for(const purpose of /** @type {const} */ (['runtime','backup'])) {
|
|
367
|
+
const cfg=profile(namespace,purpose,passwords[purpose]);
|
|
368
|
+
const test=await run(`${PG_BIN}/psql`,['--no-psqlrc','--no-password','--host',cfg.host,'--port',String(PORT),'--username',cfg.user,'--dbname',cfg.database,'--tuples-only','--no-align','--command',`SELECT ssl AND NOT (SELECT rolsuper OR rolcreatedb OR rolcreaterole FROM pg_roles WHERE rolname=current_user) AND NOT has_schema_privilege(current_user,'eos_history','CREATE') FROM pg_stat_ssl WHERE pid=pg_backend_pid()`],{env:{PGPASSWORD:cfg.password,PGSSLMODE:'verify-full',PGSSLROOTCERT:cfg.caFile,PGCONNECT_TIMEOUT:'5'}});
|
|
369
|
+
if(test.output.trim()!=='t')throw fail('TLS_OR_PRIVILEGE_CHECK');
|
|
370
|
+
}
|
|
371
|
+
await writeProtected(runtimeFile,JSON.stringify(profile(namespace,'runtime',passwords.runtime))+'\n',0o640,eosGroup.id,true);
|
|
372
|
+
await writeProtected(backupFile,JSON.stringify(profile(namespace,'backup',passwords.backup))+'\n',0o640,eosGroup.id,true);
|
|
373
|
+
await writeProtected(readyFile,JSON.stringify({schemaVersion:1,namespace,provider:'postgresql',newInstallation:true,provisioned:true,major:17,port:PORT,schemaRevision:1,verifiedAt:Date.now(),serverVersion:serverVersion.output.trim()})+'\n',0o640,eosGroup.id,true);
|
|
374
|
+
await fs.unlink(pending).catch(e=>{if(!e||e.code!=='ENOENT')throw e;});
|
|
375
|
+
return { status:'ready', namespace, host:'127.0.0.1', port:PORT, database:names(namespace).database, credentialsExposed:false };
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** @param {string} namespace @param {{installPackages?:boolean}} [options] */
|
|
379
|
+
async function provision(namespace,options={}) {
|
|
380
|
+
instanceNumber(namespace);
|
|
381
|
+
if(process.platform!=='linux'||process.getuid?.()!==0)throw fail('ADMIN_BOOTSTRAP_REQUIRED');
|
|
382
|
+
await trustedRootPath('/run',true);
|
|
383
|
+
const lock='/run/nexowatt-postgresql-setup.lock';
|
|
384
|
+
let handle;
|
|
385
|
+
try { handle=await fs.open(lock,constants.O_CREAT|constants.O_EXCL|constants.O_WRONLY|constants.O_NOFOLLOW,0o600); }
|
|
386
|
+
catch(error) { if(error&&typeof error==='object'&&'code' in error&&error.code==='EEXIST')throw fail('BUSY_OR_INTERRUPTED'); throw error; }
|
|
387
|
+
const original=await handle.stat();
|
|
388
|
+
try { await handle.writeFile(String(process.pid)+'\n'); return await provisionUnlocked(namespace,options); }
|
|
389
|
+
finally {
|
|
390
|
+
await handle.close();
|
|
391
|
+
const current=await fs.lstat(lock);
|
|
392
|
+
if(current.uid===0&¤t.dev===original.dev&¤t.ino===original.ino&&!current.isSymbolicLink())await fs.unlink(lock);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
async function main() {
|
|
397
|
+
const [action,namespace,...rest]=process.argv.slice(2);
|
|
398
|
+
if(rest.length>1 || (rest.length===1&&rest[0]!=='--install-packages') || !namespace || (action!=='--plan' && action!=='--new-site'))throw fail('USAGE');
|
|
399
|
+
instanceNumber(namespace);
|
|
400
|
+
if(action==='--plan') {
|
|
401
|
+
console.log(JSON.stringify({schemaVersion:1,namespace,requiresAdministratorBootstrap:true,packagePrerequisites:['postgresql-17','postgresql-client-17','openssl'],installsPackages:rest.length===1,service:SERVICE,serviceUser:SERVICE_USER,host:'127.0.0.1',port:PORT,...names(namespace),clientProfile:`${CLIENT_ROOT}/client-${namespace}.json`,existingInfluxChanged:false},null,2));
|
|
402
|
+
} else {
|
|
403
|
+
process.umask(0o077);
|
|
404
|
+
console.log(JSON.stringify(await provision(namespace,{installPackages:rest.length===1})));
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
module.exports={instanceNumber,names,profile,postgresConfig,hbaConfig,serviceConfig,rolesSql,schemaSql,provision,packageSystemSupported,packageDefaultsSupported,packagePolicyOwned};
|
|
409
|
+
if(require.main===module)main().catch(error=>{const code=error instanceof Error&&/^EOS_POSTGRES_SETUP_[A-Z_]+$/.test(error.message)?error.message:'EOS_POSTGRES_SETUP_FAILED';console.error(code);process.exitCode=1;});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022", "module": "Node16", "moduleResolution": "Node16",
|
|
4
|
+
"allowJs": true, "checkJs": true, "noEmit": true, "strict": true,
|
|
5
|
+
"noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true,
|
|
6
|
+
"noImplicitReturns": true, "skipLibCheck": true
|
|
7
|
+
},
|
|
8
|
+
"include": ["src/lib/eosHistoryBackupScope.js"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"checkJs": true,
|
|
6
|
+
"noEmit": true,
|
|
7
|
+
"rootDir": ".",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noUncheckedIndexedAccess": true,
|
|
10
|
+
"exactOptionalPropertyTypes": true,
|
|
11
|
+
"noImplicitReturns": true,
|
|
12
|
+
"noFallthroughCasesInSwitch": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/lib/eosPostgresProvisioning.ts", "tools/system/eos-postgresql-setup.cjs"]
|
|
15
|
+
}
|