iobroker.eos-admin 9.0.21 → 9.0.24
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 +32 -8
- 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/adminWww/.vite/manifest.json +55 -55
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
- package/adminWww/assets/{AdapterUpdateDialog-Dxl_b7Op.js → AdapterUpdateDialog-D7sI5VRm.js} +1 -1
- package/adminWww/assets/{Adapters-CVKKhXmI.js → Adapters-DS6ITaEH.js} +1 -1
- package/adminWww/assets/{ConfigManager-Bf6nTAkL.js → ConfigManager-_iFDSXuD.js} +1 -1
- package/adminWww/assets/{Enums-CJHVJY7t.js → Enums-Bdv7Tqmf.js} +1 -1
- package/adminWww/assets/{Fields-DWHbZKvm.js → Fields-CWUY1AnV.js} +1 -1
- package/adminWww/assets/{Files-a6owMTXA.js → Files-BveV1b_F.js} +1 -1
- package/adminWww/assets/{Hosts-LtEMeXpV.js → Hosts-B1HWZLGl.js} +1 -1
- package/adminWww/assets/{Instances-DhChziA1.js → Instances-DYvbOlj7.js} +1 -1
- package/adminWww/assets/{Intro-Cyq9gVDC.js → Intro-pYT2FzIK.js} +1 -1
- package/adminWww/assets/{Logs-wcramXsg.js → Logs-D2ZbCY3Z.js} +1 -1
- package/adminWww/assets/{Objects-DINVHd_e.js → Objects-CTUxbXJM.js} +1 -1
- package/adminWww/assets/{Overview-DK4R41zR.js → Overview-i6PsoN_F.js} +1 -1
- package/adminWww/assets/{State-DcEACXzL.js → State-BEQXNcI3.js} +1 -1
- package/adminWww/assets/{UsedResources-C1LcM0Rb.js → UsedResources-CLc1afk1.js} +1 -1
- package/adminWww/assets/{Users-DvDdSyDY.js → Users-DG6i7iqC.js} +1 -1
- package/adminWww/assets/{bootstrap-Dbj_GbnP.js → bootstrap-4KhX67tn.js} +4 -4
- package/adminWww/assets/{hostInit-BNFIx0-f.js → hostInit-B08JmaAP.js} +1 -1
- package/adminWww/assets/{icons-material-DVbdXNgr.js → icons-material-sOCHi6x9.js} +1 -1
- package/adminWww/assets/{index-CoKP1NSA.js → index-DHSNS0v8.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CMvku1F1.js → installSVGRenderer-CWaaO5tF.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-ac330bce.js → mf-entry-bootstrap-0-e7c54f7f.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.21.js → remoteEntry-eos-9.0.24.js} +1 -1
- 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 +14 -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 +1 -1
- package/build/lib/eosModuleConfigStore.js.map +1 -1
- package/build/lib/eosModuleHost.js +241 -21
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +40 -6
- 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/eosRuntimeHealth.js +155 -0
- package/build/lib/eosRuntimeHealth.js.map +1 -0
- package/build/lib/eosUiProcess.js +689 -0
- package/build/lib/eosUiProcess.js.map +1 -0
- package/build/lib/eosUiProcessRpc.js +279 -0
- package/build/lib/eosUiProcessRpc.js.map +1 -0
- package/build/lib/eosUiProcessWorker.js +399 -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 +104 -7
- package/build/lib/web.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/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 +16 -17
- 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 +27 -11
- package/public/eos-migration/index.html +1 -1
- package/public/eos-migration/index.js +2 -2
- package/public/eos-runtime/index.html +35 -0
- package/public/eos-runtime/index.js +111 -0
- package/public/eos-runtime/style.css +18 -0
- package/release-manifests/unified/build-environment.cdx.json +767 -131
- package/release-manifests/unified/files.json +612 -207
- package/release-manifests/unified/obsolete-admin-assets.json +210 -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 +19 -7
- 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/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* Retained upstream MIT rights and notices remain applicable; see ../upstream/LICENSE.
|
|
4
4
|
*/
|
|
5
5
|
import { constants } from 'node:fs';
|
|
6
|
-
import { mkdir, rm, open, rename } from 'node:fs/promises';
|
|
7
|
-
import { basename, join, resolve } from 'node:path';
|
|
6
|
+
import { mkdir, rm, open, rename, writeFile } from 'node:fs/promises';
|
|
7
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
8
8
|
import { createHash } from 'node:crypto';
|
|
9
|
-
import { decryptFile, ARCHIVE_NAME, privateDir } from './files';
|
|
9
|
+
import { decryptFile, ARCHIVE_NAME, privateDir, assertRegular, hashFile } from './files';
|
|
10
10
|
import { record, fail } from './types';
|
|
11
|
+
import { assertFreeSpace } from './preflight';
|
|
11
12
|
async function recoveryKey(path: string): Promise<Buffer> {
|
|
12
13
|
const fd = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
13
14
|
let value: unknown;
|
|
@@ -91,6 +92,54 @@ export async function prepareRestore(archive: string, keyPath: string, output: s
|
|
|
91
92
|
key.fill(0);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
95
|
+
/** Verify and prepare the entire matching set; never write controller, DB, role or trust state. */
|
|
96
|
+
export async function prepareRestoreSet(setArchive: string, keyPath: string, output: string): Promise<string> {
|
|
97
|
+
if (!ARCHIVE_NAME.test(basename(setArchive)) || !/-recovery-set-\d+\.nwb$/.test(setArchive)) throw fail('EOS_BACKUP_RECOVERY_SET_NAME');
|
|
98
|
+
const key = await recoveryKey(keyPath);
|
|
99
|
+
let created = false;
|
|
100
|
+
try {
|
|
101
|
+
await mkdir(output, { mode: 0o700 }); created = true;
|
|
102
|
+
await privateDir(output);
|
|
103
|
+
const manifestPath = join(output, 'recovery-set.json');
|
|
104
|
+
await decryptFile(setArchive, manifestPath, key, 1024 ** 2);
|
|
105
|
+
const fd = await open(manifestPath, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
106
|
+
let manifest: unknown;
|
|
107
|
+
try { manifest = JSON.parse(await fd.readFile('utf8')) as unknown; } finally { await fd.close(); }
|
|
108
|
+
if (!record(manifest) || manifest.format !== 'nexowatt-eos-recovery-set/v1' || typeof manifest.jobId !== 'string' ||
|
|
109
|
+
!/^[0-9a-f-]{36}$/.test(manifest.jobId) || !basename(setArchive).startsWith('eos-backup-' + manifest.jobId + '-') ||
|
|
110
|
+
!record(manifest.coverage) || manifest.coverage.complete !== true || !Array.isArray(manifest.coverage.required) ||
|
|
111
|
+
!Array.isArray(manifest.files) || manifest.files.length < 2 || manifest.files.length > 512) throw fail('EOS_BACKUP_RECOVERY_SET_INVALID');
|
|
112
|
+
const names = new Set<string>(), kinds = new Set<string>();
|
|
113
|
+
const components: { kind: string; file: string; sha256: string }[] = [];
|
|
114
|
+
for (const item of manifest.files) {
|
|
115
|
+
if (!record(item) || typeof item.name !== 'string' || !ARCHIVE_NAME.test(item.name) || names.has(item.name) ||
|
|
116
|
+
!item.name.startsWith('eos-backup-' + manifest.jobId + '-') || typeof item.kind !== 'string' || !/^[a-zA-Z0-9_-]{1,80}$/.test(item.kind) || item.kind === 'recovery-set' ||
|
|
117
|
+
!Number.isSafeInteger(item.size) || Number(item.size) < 36 || Number(item.size) > 100 * 1024 ** 3 + 64 || typeof item.sha256 !== 'string' || !/^[0-9a-f]{64}$/.test(item.sha256)) throw fail('EOS_BACKUP_RECOVERY_COMPONENT_INVALID');
|
|
118
|
+
const archive = join(dirname(setArchive), item.name);
|
|
119
|
+
if (await assertRegular(archive) !== item.size || await hashFile(archive) !== item.sha256) throw fail('EOS_BACKUP_RECOVERY_COMPONENT_INTEGRITY');
|
|
120
|
+
await assertFreeSpace(output, Number(item.size) + 64 * 1024 ** 2);
|
|
121
|
+
names.add(item.name); kinds.add(item.kind);
|
|
122
|
+
const destination = await prepareRestore(archive, keyPath, join(output, `component-${components.length}`));
|
|
123
|
+
components.push({ kind: item.kind, file: destination.slice(output.length + 1), sha256: await hashFile(destination) });
|
|
124
|
+
}
|
|
125
|
+
if (!kinds.has('iobroker') || !kinds.has('eos-profile') || manifest.coverage.required.some(kind => typeof kind !== 'string' || !kinds.has(kind))) throw fail('EOS_BACKUP_RECOVERY_COMPONENT_MISSING');
|
|
126
|
+
const plan = join(output, 'recovery-plan.json');
|
|
127
|
+
await writeFile(plan, JSON.stringify({ schema: 'nexowatt-eos-restore-plan/v1', jobId: manifest.jobId, verified: true,
|
|
128
|
+
files: components, automaticRestore: false, controllerMustBeStopped: true, isolatedTargetRequired: true,
|
|
129
|
+
steps: [
|
|
130
|
+
'Provision the supported operating system, matching controller and database tools using trusted installation media.',
|
|
131
|
+
'Keep EMS actuators disconnected; stop the controller. Restore the ioBroker archive through the controller CLI.',
|
|
132
|
+
'Restore the EOS private profile and preserved legacy data paths with private ownership. Restore the recovery key separately.',
|
|
133
|
+
'Review external integration grants and revoke obsolete identities before enabling access; an older backup can contain grants revoked after its snapshot.',
|
|
134
|
+
'Public license trust requires the existing authorized import or independent manufacturer provisioning; never trust this archive alone.',
|
|
135
|
+
'For InfluxDB restore into a new isolated service; preserve the separately held operator token if required by the server version.',
|
|
136
|
+
'For managed PostgreSQL provision roles, TLS and schema from trusted media first. Inspect the authenticated trusted-source dump before restoring into an empty isolated target with a non-superuser login limited to the required table rights; use --data-only --no-owner --no-privileges --schema=eos_history --table=samples. These filters do not sandbox a malicious archive. Never connect as superuser (including superuser plus --role), or import archived authority/schema.',
|
|
137
|
+
'Compare expected identities, settings and historical sample points; test new writes and restart before reconnecting actuators.'
|
|
138
|
+
] }, null, 2), { flag: 'wx', mode: 0o600 });
|
|
139
|
+
return plan;
|
|
140
|
+
} catch (error) { if (created) await rm(output, { recursive: true, force: true }); throw error; }
|
|
141
|
+
finally { key.fill(0); }
|
|
142
|
+
}
|
|
94
143
|
if (require.main === module) {
|
|
95
144
|
const args = process.argv.slice(2);
|
|
96
145
|
const get = (key: string): string => {
|
|
@@ -103,7 +152,9 @@ if (require.main === module) {
|
|
|
103
152
|
.then(() =>
|
|
104
153
|
args.includes('--install-key')
|
|
105
154
|
? installRecoveryKey(get('--key-file'), get('--data-dir'))
|
|
106
|
-
:
|
|
155
|
+
: args.includes('--set')
|
|
156
|
+
? prepareRestoreSet(get('--set'), get('--key-file'), get('--output'))
|
|
157
|
+
: prepareRestore(get('--archive'), get('--key-file'), get('--output')),
|
|
107
158
|
)
|
|
108
159
|
.then(
|
|
109
160
|
path => {
|
|
@@ -59,6 +59,26 @@ export function retentionCandidates(
|
|
|
59
59
|
);
|
|
60
60
|
const current = new Set(currentNames),
|
|
61
61
|
selected: RemoteEntry[] = [];
|
|
62
|
+
// A recovery set is indivisible: keeping its descriptor while pruning an older
|
|
63
|
+
// database component would turn a listed full backup into an unusable set.
|
|
64
|
+
if (types.has('recovery-set')) {
|
|
65
|
+
const count = retentionCount(config, provider, runKind, 'recovery-set', enabled);
|
|
66
|
+
if (!count) return [];
|
|
67
|
+
let keep = count;
|
|
68
|
+
if (provider === 'cifs' && str(config, 'connectType') === 'SDCard' && types.has('influxDB')) {
|
|
69
|
+
const databaseKeep = num(config, 'sdCardInfluxRetention', 3);
|
|
70
|
+
if (!Number.isSafeInteger(databaseKeep) || databaseKeep < 0 || databaseKeep > 3650) throw fail('EOS_BACKUP_CONFIG_RETENTION');
|
|
71
|
+
if (!databaseKeep) return [];
|
|
72
|
+
keep = Math.min(keep, databaseKeep);
|
|
73
|
+
}
|
|
74
|
+
if (currentNames.some(name => !entries.some(entry => entry.name === name))) throw fail('EOS_BACKUP_RETENTION_INCOMPLETE');
|
|
75
|
+
if (new Set(entries.map(entry => entry.name)).size !== entries.length) throw fail('EOS_BACKUP_RETENTION_METADATA');
|
|
76
|
+
const descriptors = entries.filter(entry => archiveKind(entry.name) === 'recovery-set');
|
|
77
|
+
if (descriptors.some(entry => !Number.isFinite(entry.mtime) || entry.mtime <= 0)) throw fail('EOS_BACKUP_RETENTION_METADATA');
|
|
78
|
+
descriptors.sort((a, b) => b.mtime - a.mtime || b.name.localeCompare(a.name));
|
|
79
|
+
const oldJobs = new Set(descriptors.slice(keep).filter(entry => !current.has(entry.name)).map(entry => entry.name.slice(0, 48)));
|
|
80
|
+
return entries.filter(entry => archiveKind(entry.name) !== null && oldJobs.has(entry.name.slice(0, 48)) && !current.has(entry.name));
|
|
81
|
+
}
|
|
62
82
|
for (const type of types) {
|
|
63
83
|
const count = retentionCount(config, provider, runKind, type, enabled);
|
|
64
84
|
if (!count) continue;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Retained upstream MIT rights and notices remain applicable; see ../upstream/LICENSE.
|
|
4
4
|
*/
|
|
5
5
|
import type { NotificationPlan } from './notifications';
|
|
6
|
+
import type { HistoryBackupRequirement, BackupCoverage } from './coverage';
|
|
6
7
|
import type { Readable } from 'node:stream';
|
|
7
8
|
export type Config = Record<string, unknown> & { enabled: boolean };
|
|
8
9
|
export interface Adapter {
|
|
@@ -30,6 +31,7 @@ export interface Options {
|
|
|
30
31
|
eosDataDir?: string;
|
|
31
32
|
preservedUiNamespace?: string;
|
|
32
33
|
workerPath?: string;
|
|
34
|
+
getHistoryBackupRequirement?: () => Promise<HistoryBackupRequirement> | HistoryBackupRequirement;
|
|
33
35
|
}
|
|
34
36
|
export interface JobContext {
|
|
35
37
|
config: Config;
|
|
@@ -41,6 +43,8 @@ export interface JobContext {
|
|
|
41
43
|
kind: 'iobroker' | 'ccu';
|
|
42
44
|
key: string;
|
|
43
45
|
retentionEnabled?: boolean;
|
|
46
|
+
historyRequirement?: HistoryBackupRequirement;
|
|
47
|
+
publicTrust?: Record<string, string> | null;
|
|
44
48
|
preservedUiNamespace?: string;
|
|
45
49
|
operation?: 'backup' | 'remoteList' | 'remoteFetch' | 'legacyList' | 'legacyImport';
|
|
46
50
|
provider?: string;
|
|
@@ -61,6 +65,7 @@ export interface JobResult {
|
|
|
61
65
|
files: ArchiveInfo[];
|
|
62
66
|
error?: string;
|
|
63
67
|
remote?: Record<string, unknown>;
|
|
68
|
+
coverage?: BackupCoverage;
|
|
64
69
|
operation?: string;
|
|
65
70
|
}
|
|
66
71
|
export interface Download {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2026 NexoWatt. Proprietary EOS integration.
|
|
3
3
|
* Retained upstream MIT rights and notices remain applicable; see ../upstream/LICENSE.
|
|
4
4
|
*/
|
|
5
|
-
import { rm } from 'node:fs/promises';
|
|
5
|
+
import { rm, writeFile } from 'node:fs/promises';
|
|
6
|
+
import { assertBackupCoverage, historyRequirement } from './coverage';
|
|
7
|
+
import { validatePublicTrust } from './publicTrust';
|
|
6
8
|
import { join } from 'node:path';
|
|
7
9
|
import { storageList, storageFetch } from './storageDownload';
|
|
8
10
|
import { wakeTarget } from './wake';
|
|
@@ -52,11 +54,12 @@ async function execute(ctx: JobContext): Promise<JobResult> {
|
|
|
52
54
|
result.state = 'succeeded';
|
|
53
55
|
return result;
|
|
54
56
|
}
|
|
57
|
+
if (ctx.kind === 'iobroker') result.coverage = assertBackupCoverage(ctx.config, historyRequirement(ctx.historyRequirement));
|
|
55
58
|
await assertFreeSpace(ctx.workDir, Math.max(64, num(ctx.config, 'fileSizeError', 512)) * 1024 ** 2);
|
|
56
59
|
await wakeTarget(ctx.config);
|
|
57
60
|
const raw = await createArchives(ctx),
|
|
58
61
|
key = Buffer.from(ctx.key, 'base64');
|
|
59
|
-
if (raw.length > 512) throw fail('EOS_BACKUP_ARCHIVE_COUNT');
|
|
62
|
+
if (raw.length > (ctx.kind === 'iobroker' ? 511 : 512)) throw fail('EOS_BACKUP_ARCHIVE_COUNT');
|
|
60
63
|
const max = num(ctx.config, 'maxArchiveGiB', 10) * 1024 ** 3;
|
|
61
64
|
for (let i = 0; i < raw.length; i++) {
|
|
62
65
|
const item = raw[i];
|
|
@@ -67,6 +70,17 @@ async function execute(ctx: JobContext): Promise<JobResult> {
|
|
|
67
70
|
await decryptFile(path, undefined, key, max);
|
|
68
71
|
result.files.push(await archiveInfo(path, item.kind));
|
|
69
72
|
}
|
|
73
|
+
if (ctx.kind === 'iobroker') {
|
|
74
|
+
const descriptor = join(ctx.workDir, 'recovery-set.json');
|
|
75
|
+
await writeFile(descriptor, JSON.stringify({ format: 'nexowatt-eos-recovery-set/v1', jobId: ctx.jobId,
|
|
76
|
+
startedAt, completedAt: new Date().toISOString(), coverage: result.coverage, files: result.files,
|
|
77
|
+
consistency: 'Controller and database snapshots are taken sequentially; this is not a globally atomic live-system snapshot.',
|
|
78
|
+
requiresControllerStopped: true, automaticTrustInstallation: false }, null, 2), { flag: 'wx', mode: 0o600 });
|
|
79
|
+
const path = join(outputs, `eos-backup-${ctx.jobId}-recovery-set-${raw.length}.nwb`);
|
|
80
|
+
await encryptFile(descriptor, path, key, 1024 ** 2);
|
|
81
|
+
await decryptFile(path, undefined, key, 1024 ** 2);
|
|
82
|
+
result.files.push(await archiveInfo(path, 'recovery-set'));
|
|
83
|
+
}
|
|
70
84
|
await uploadArchives(
|
|
71
85
|
ctx.config,
|
|
72
86
|
result.files.map(v => join(outputs, v.name)),
|
|
@@ -111,6 +125,8 @@ function parseContext(value: unknown): JobContext {
|
|
|
111
125
|
key: value.key,
|
|
112
126
|
kind: value.kind === 'ccu' ? 'ccu' : 'iobroker',
|
|
113
127
|
retentionEnabled: value.retentionEnabled === true,
|
|
128
|
+
historyRequirement: historyRequirement(value.historyRequirement),
|
|
129
|
+
publicTrust: value.publicTrust === null || value.publicTrust === undefined ? null : validatePublicTrust(value.publicTrust),
|
|
114
130
|
...(typeof value.preservedUiNamespace === 'string' && /^nexowatt-ui\.\d+$/.test(value.preservedUiNamespace)
|
|
115
131
|
? { preservedUiNamespace: value.preservedUiNamespace }
|
|
116
132
|
: {}),
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const test = require('node:test');
|
|
3
|
+
const assert = require('node:assert/strict');
|
|
4
|
+
const fs = require('node:fs/promises');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const os = require('node:os');
|
|
7
|
+
const { generateKeyPairSync, randomBytes, randomUUID } = require('node:crypto');
|
|
8
|
+
const { validateConfig } = require('../build/config');
|
|
9
|
+
const { influxTargets } = require('../build/databaseTargets');
|
|
10
|
+
const { backupCoverage, historyRequirement, assertBackupCoverage } = require('../build/coverage');
|
|
11
|
+
const { validateInfluxExport, inventoryInflux, exportInflux2 } = require('../build/influxIntegrity');
|
|
12
|
+
const { validatePublicTrust, archivePublicTrust, capturePublicTrust } = require('../build/publicTrust');
|
|
13
|
+
const { validatePostgresProfile } = require('../build/postgresHistory');
|
|
14
|
+
const { encryptFile, hashFile } = require('../build/files');
|
|
15
|
+
const { prepareRestoreSet } = require('../build/restore-cli');
|
|
16
|
+
const command = require('../build/command');
|
|
17
|
+
const temp = () => fs.mkdtemp(path.join(os.tmpdir(), 'eos-backup-completeness-'));
|
|
18
|
+
const required = { provider: 'influxdb2', url: 'http://127.0.0.1:8086', bucket: 'EOS', org: 'NexoWatt' };
|
|
19
|
+
const config = () => validateConfig({ enabled: true, influxDBEnabled: true, influxDBVersion: '2.x', influxDBPort: '8086', influxDBName: 'EOS', influxDBOrganization: 'NexoWatt' });
|
|
20
|
+
const identity = { id: '1234567890abcdef', orgId: 'abcdef1234567890', name: 'EOS' };
|
|
21
|
+
const bucket = () => ({ bucketID: identity.id, organizationID: identity.orgId, organizationName: 'NexoWatt', bucketName: 'EOS', retentionPolicies: [] });
|
|
22
|
+
async function manifest(dir, change = () => {}) {
|
|
23
|
+
const value = { manifestVersion: 2, kv: { fileName: 'snapshot.kv', size: 4, compression: 1 }, buckets: [bucket()] };
|
|
24
|
+
await fs.writeFile(path.join(dir, 'snapshot.kv'), 'data');
|
|
25
|
+
change(value);
|
|
26
|
+
await fs.writeFile(path.join(dir, 'snapshot.manifest'), JSON.stringify(value));
|
|
27
|
+
}
|
|
28
|
+
test('complete coverage follows the actual historian and refuses disabled/other/missing sources', () => {
|
|
29
|
+
assert.equal(backupCoverage(config(), required).complete, true);
|
|
30
|
+
for (const patch of [{ influxDBEnabled: false }, { influxDBHost: 'otherhost' }, { influxDBName: 'another' }, { influxDBOrganization: 'otherorg' }, { influxDBVersion: '1.x' }]) {
|
|
31
|
+
assert.throws(() => assertBackupCoverage({ ...config(), ...patch }, required), /ACTIVE_INFLUX_NOT_COVERED/);
|
|
32
|
+
}
|
|
33
|
+
assert.throws(() => assertBackupCoverage({ ...config(), eosProfileEnabled: false }, { provider: 'none' }), /EOS_PROFILE_REQUIRED/);
|
|
34
|
+
assert.throws(() => assertBackupCoverage(config(), historyRequirement(undefined)), /SCOPE_UNRESOLVED/);
|
|
35
|
+
assert.throws(() => assertBackupCoverage(config(), { provider: 'adapter', instance: 'sql.0' }), /SCOPE_UNRESOLVED/);
|
|
36
|
+
assert.equal(backupCoverage(config(), { provider: 'none' }).complete, true);
|
|
37
|
+
assert.deepEqual(backupCoverage(config(), { provider: 'postgresql', namespace: 'eos-admin.0' }).required, ['iobroker', 'eos-profile', 'postgresql-history']);
|
|
38
|
+
assert.equal(backupCoverage(config(), required).externalTargetConfigured, false);
|
|
39
|
+
assert.deepEqual(historyRequirement({ ...required, url: 'https://token@example.test' }), { provider: 'unknown' });
|
|
40
|
+
});
|
|
41
|
+
test('multi target normalization uses the same inherited v2 version and fails invalid modes before running', () => {
|
|
42
|
+
const input = { ...config(), influxDBMulti: true, influxDBEvents: [{ dbName: 'EOS', host: '127.0.0.1' }, { dbName: 'other', dbversion: '1.x', port: '8088' }] };
|
|
43
|
+
const before = JSON.stringify(input), targets = influxTargets(input);
|
|
44
|
+
assert.equal(targets[0].version, '2.x'); assert.equal(targets[0].url, 'http://127.0.0.1:8086');
|
|
45
|
+
assert.equal(targets[1].version, '1.x'); assert.equal(JSON.stringify(input), before);
|
|
46
|
+
assert.throws(() => validateConfig({ ...input, influxDBEvents: [{ dbversion: '3.x' }] }), /INFLUX_VERSION/);
|
|
47
|
+
assert.throws(() => influxTargets({ ...input, influxDBEvents: [] }), /EVENTS/);
|
|
48
|
+
assert.throws(() => influxTargets({ ...input, influxDBEvents: [{ host: 'host; echo x' }] }), /HOST/);
|
|
49
|
+
});
|
|
50
|
+
test('existing empty Influx bucket is a valid snapshot, with exact files and active organization proof', async () => {
|
|
51
|
+
const dir = await temp();
|
|
52
|
+
try {
|
|
53
|
+
await manifest(dir);
|
|
54
|
+
const proof = await validateInfluxExport(dir, [identity], required);
|
|
55
|
+
assert.deepEqual(proof.buckets, [identity]); assert.equal(proof.files[0].size, 4);
|
|
56
|
+
assert.match(proof.files[0].sha256, /^[a-f0-9]{64}$/);
|
|
57
|
+
assert.equal((await fs.stat(path.join(dir, 'eos-export-proof.json'))).mode & 0o777, 0o600);
|
|
58
|
+
} finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
59
|
+
});
|
|
60
|
+
test('Influx zero-exit metadata-only, wrong organization, damaged/missing shard and unreferenced files cannot prove completion', async t => {
|
|
61
|
+
const cases = [
|
|
62
|
+
['missing active bucket', v => { v.buckets = []; }, /BUCKET_CONTENT_MISSING/],
|
|
63
|
+
['wrong organization id', v => { v.buckets[0].organizationID = 'ffffffffffffffff'; }, /BUCKET_CONTENT_MISSING/],
|
|
64
|
+
['wrong organization name', v => { v.buckets[0].organizationName = 'Wrong'; }, /ACTIVE_INFLUX_CONTENT_MISSING/],
|
|
65
|
+
['changed bucket name', v => { v.buckets[0].bucketName = 'Wrong'; }, /BUCKET_CONTENT_MISSING/],
|
|
66
|
+
['wrong size', v => { v.kv.size = 5; }, /FILE_SIZE/],
|
|
67
|
+
['unsafe path', v => { v.kv.fileName = '../escape'; }, /FILE_ENTRY/],
|
|
68
|
+
['coercible compression', v => { v.kv.compression = null; }, /FILE_ENTRY/],
|
|
69
|
+
['missing shard', v => { v.buckets[0].retentionPolicies = [{ shardGroups: [{ shards: [{ fileName: 'missing.tar.gz', size: 9, compression: 1 }] }] }]; }, /ENOENT/],
|
|
70
|
+
];
|
|
71
|
+
for (const [name, mutate, error] of cases) await t.test(name, async () => {
|
|
72
|
+
const dir = await temp(); try { await manifest(dir, mutate); await assert.rejects(() => validateInfluxExport(dir, [identity], required), error); }
|
|
73
|
+
finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
74
|
+
});
|
|
75
|
+
const dir = await temp(); try {
|
|
76
|
+
await manifest(dir); await fs.writeFile(path.join(dir, 'unreferenced'), 'extra');
|
|
77
|
+
await assert.rejects(() => validateInfluxExport(dir, [identity], required), /UNREFERENCED_FILE/);
|
|
78
|
+
await fs.rm(path.join(dir, 'unreferenced')); await fs.symlink('snapshot.kv', path.join(dir, 'link'));
|
|
79
|
+
await assert.rejects(() => validateInfluxExport(dir, [identity], required), /INFLUX_FILES/);
|
|
80
|
+
} finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
81
|
+
});
|
|
82
|
+
test('Influx inventory and actual backup bind IDs, propagate token only via environment and verify the result', async () => {
|
|
83
|
+
const dir = await temp(), folder = path.join(dir, 'snapshot'); await fs.mkdir(folder);
|
|
84
|
+
const oldRun = command.run, oldExe = command.executable, calls = [];
|
|
85
|
+
const target = { ...influxTargets(config())[0], token: 'fixture-only-secret' };
|
|
86
|
+
command.executable = async name => { assert.equal(name, 'influx'); return '/fixed/influx'; };
|
|
87
|
+
command.run = async (exe, args, options) => {
|
|
88
|
+
calls.push(args); assert.equal(exe, '/fixed/influx'); assert.equal(options.environment.INFLUX_TOKEN, target.token); assert(!args.includes(target.token));
|
|
89
|
+
if (args[0] === 'bucket') await fs.writeFile(options.output, JSON.stringify([{ id: identity.id, orgID: identity.orgId, name: identity.name }]));
|
|
90
|
+
else { assert.deepEqual(args.slice(-3), ['--bucket-id', identity.id, folder]); await manifest(folder); }
|
|
91
|
+
};
|
|
92
|
+
try {
|
|
93
|
+
await exportInflux2(target, folder, dir, 0, required);
|
|
94
|
+
assert.equal(calls.length, 2); assert.equal((await fs.readdir(dir)).includes('influx-inventory-0.json'), false);
|
|
95
|
+
await fs.rm(folder, { recursive: true }); await fs.mkdir(folder);
|
|
96
|
+
command.run = async (exe, args, options) => fs.writeFile(options.output, '[]');
|
|
97
|
+
await assert.rejects(() => inventoryInflux(target, dir, 0), /BUCKET_MISSING_OR_AMBIGUOUS/);
|
|
98
|
+
command.run = async (exe, args, options) => fs.writeFile(options.output, JSON.stringify([
|
|
99
|
+
{ id: identity.id, orgID: identity.orgId, name: identity.name }, { id: 'aaaaaaaaaaaaaaaa', orgID: identity.orgId, name: identity.name }
|
|
100
|
+
]));
|
|
101
|
+
await assert.rejects(() => inventoryInflux(target, dir, 0), /AMBIGUOUS/);
|
|
102
|
+
} finally { command.run = oldRun; command.executable = oldExe; await fs.rm(dir, { recursive: true, force: true }); }
|
|
103
|
+
});
|
|
104
|
+
test('public trust is backed up as public evidence only and invalid/private material cannot become recovery authority', async () => {
|
|
105
|
+
const dir = await temp(), pair = generateKeyPairSync('ed25519');
|
|
106
|
+
const publicKey = pair.publicKey.export({ type: 'spki', format: 'pem' }).toString();
|
|
107
|
+
try {
|
|
108
|
+
assert.deepEqual(validatePublicTrust({ manufacturer: publicKey }), { manufacturer: publicKey });
|
|
109
|
+
await archivePublicTrust(dir, { manufacturer: publicKey });
|
|
110
|
+
const instructions = JSON.parse(await fs.readFile(path.join(dir, 'recovery-public-trust-instructions.json')));
|
|
111
|
+
assert.equal(instructions.automaticTrustInstallation, false);
|
|
112
|
+
assert.match(instructions.fingerprints.manufacturer, /^[a-f0-9]{64}$/);
|
|
113
|
+
assert.throws(() => validatePublicTrust({ manufacturer: pair.privateKey.export({ type: 'pkcs8', format: 'pem' }).toString() }), /PUBLIC_TRUST_INVALID/);
|
|
114
|
+
assert.throws(() => validatePublicTrust({}), /PUBLIC_TRUST_INVALID/);
|
|
115
|
+
const service = require('../../../build/lib/eosLicenseService'), old = service.readProductTrust;
|
|
116
|
+
try {
|
|
117
|
+
service.readProductTrust = async () => { throw Object.assign(new Error('missing'), { code: 'ENOENT' }); };
|
|
118
|
+
assert.equal(await capturePublicTrust(), null);
|
|
119
|
+
service.readProductTrust = async () => { throw Object.assign(new Error('permissions'), { code: 'TRUST_PERMISSIONS' }); };
|
|
120
|
+
await assert.rejects(capturePublicTrust, /PUBLIC_TRUST_UNAVAILABLE/);
|
|
121
|
+
} finally { service.readProductTrust = old; }
|
|
122
|
+
} finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
123
|
+
});
|
|
124
|
+
test('managed PostgreSQL backup accepts only provisioned local separate role and fixed TLS profile', () => {
|
|
125
|
+
const profile = { schemaVersion: 1, provider: 'postgresql', provisioned: true, newInstallation: true, host: '127.0.0.1', port: 55432, database: 'eos_history_0', user: 'eos_history_0_backup', password: 'x'.repeat(40), caFile: '/etc/nexowatt-eos/postgresql/ca.crt', servername: 'localhost', schema: 'eos_history' };
|
|
126
|
+
assert.equal(validatePostgresProfile(profile, 'eos-admin.0').user, 'eos_history_0_backup');
|
|
127
|
+
for (const patch of [{ host: 'remote.test' }, { port: 5432 }, { user: 'postgres' }, { newInstallation: false }, { caFile: '/tmp/ca' }, { password: 'weak' }]) assert.throws(() => validatePostgresProfile({ ...profile, ...patch }, 'eos-admin.0'), /POSTGRES_PROFILE/);
|
|
128
|
+
assert.throws(() => validatePostgresProfile(profile, '../escape'), /NAMESPACE/);
|
|
129
|
+
});
|
|
130
|
+
async function recoveryFixture(dir) {
|
|
131
|
+
const key = randomBytes(32), jobId = randomUUID(), keyfile = path.join(dir, 'key.json');
|
|
132
|
+
await fs.writeFile(keyfile, JSON.stringify({ format: 'nexowatt-eos-recovery-key/v1', key: key.toString('base64') }));
|
|
133
|
+
const files = [];
|
|
134
|
+
for (const kind of ['iobroker', 'eos-profile', 'influxDB']) {
|
|
135
|
+
const source = path.join(dir, kind); await fs.writeFile(source, 'restored ' + kind);
|
|
136
|
+
const name = `eos-backup-${jobId}-${kind}-${files.length}.nwb`;
|
|
137
|
+
await encryptFile(source, path.join(dir, name), key, 1024);
|
|
138
|
+
files.push({ kind, name, size: (await fs.stat(path.join(dir, name))).size, sha256: await hashFile(path.join(dir, name)) });
|
|
139
|
+
}
|
|
140
|
+
const value = { format: 'nexowatt-eos-recovery-set/v1', jobId, coverage: backupCoverage(config(), required), files };
|
|
141
|
+
const setPath = path.join(dir, `eos-backup-${jobId}-recovery-set-3.nwb`);
|
|
142
|
+
const seal = async () => { const source = path.join(dir, 'set.json'); await fs.writeFile(source, JSON.stringify(value)); await fs.rm(setPath, { force: true }); await encryptFile(source, setPath, key, 1024 ** 2); };
|
|
143
|
+
await seal(); return { keyfile, files, value, setPath, seal };
|
|
144
|
+
}
|
|
145
|
+
test('offline recovery prepares every verified member of one set without changing active data', async () => {
|
|
146
|
+
const dir = await temp(); try {
|
|
147
|
+
const fixture = await recoveryFixture(dir), output = path.join(dir, 'prepared');
|
|
148
|
+
const planPath = await prepareRestoreSet(fixture.setPath, fixture.keyfile, output);
|
|
149
|
+
const plan = JSON.parse(await fs.readFile(planPath));
|
|
150
|
+
assert.equal(plan.verified, true); assert.equal(plan.automaticRestore, false); assert.equal(plan.controllerMustBeStopped, true);
|
|
151
|
+
for (const file of plan.files) assert.equal(await fs.readFile(path.join(output, file.file), 'utf8'), 'restored ' + file.kind);
|
|
152
|
+
await assert.rejects(() => prepareRestoreSet(fixture.setPath, fixture.keyfile, output), /EEXIST/);
|
|
153
|
+
assert.equal(JSON.parse(await fs.readFile(planPath)).jobId, fixture.value.jobId);
|
|
154
|
+
} finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
155
|
+
});
|
|
156
|
+
test('offline recovery rejects incomplete, mixed-job and damaged sets and cleans only new staging', async t => {
|
|
157
|
+
for (const scenario of ['missing', 'tampered', 'mixed-job', 'required-missing', 'wrong-key']) await t.test(scenario, async () => {
|
|
158
|
+
const dir = await temp(); try {
|
|
159
|
+
const f = await recoveryFixture(dir), output = path.join(dir, 'failed');
|
|
160
|
+
if (scenario === 'missing') await fs.rm(path.join(dir, f.files[1].name));
|
|
161
|
+
if (scenario === 'tampered') await fs.appendFile(path.join(dir, f.files[1].name), 'damaged');
|
|
162
|
+
if (scenario === 'mixed-job') { f.value.files[0].name = f.value.files[0].name.replace(f.value.jobId, randomUUID()); await f.seal(); }
|
|
163
|
+
if (scenario === 'required-missing') { f.value.files.pop(); await f.seal(); }
|
|
164
|
+
if (scenario === 'wrong-key') await fs.writeFile(f.keyfile, JSON.stringify({ format: 'nexowatt-eos-recovery-key/v1', key: randomBytes(32).toString('base64') }));
|
|
165
|
+
await assert.rejects(() => prepareRestoreSet(f.setPath, f.keyfile, output));
|
|
166
|
+
await assert.rejects(() => fs.stat(output), /ENOENT/);
|
|
167
|
+
assert.equal((await fs.stat(f.setPath)).isFile(), true);
|
|
168
|
+
} finally { await fs.rm(dir, { recursive: true, force: true }); }
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
test('retention removes complete sets together even with shorter SD-card Influx retention', () => {
|
|
172
|
+
const { retentionCandidates } = require('../build/storageRetention');
|
|
173
|
+
const entries = [], groups = [];
|
|
174
|
+
for (let n = 0; n < 5; n++) {
|
|
175
|
+
const id = randomUUID(), names = ['iobroker', 'eos-profile', 'influxDB', 'postgresql-history', 'recovery-set'].map((kind, i) => `eos-backup-${id}-${kind}-${i}.nwb`);
|
|
176
|
+
groups.push(names); entries.push(...names.map(name => ({ name, id: name, size: 100, mtime: 1000 + n })));
|
|
177
|
+
}
|
|
178
|
+
const settings = { ...config(), cifsDeleteOldBackup: true, connectType: 'SDCard', minimalDeleteAfter: 30, sdCardInfluxRetention: 3 };
|
|
179
|
+
const selected = retentionCandidates(settings, 'cifs', 'iobroker', entries, groups[4]);
|
|
180
|
+
assert.deepEqual(new Set(selected.map(e => e.name)), new Set([...groups[0], ...groups[1]]));
|
|
181
|
+
assert.deepEqual(retentionCandidates({ ...settings, sdCardInfluxRetention: 0 }, 'cifs', 'iobroker', entries, groups[4]), []);
|
|
182
|
+
assert.throws(() => retentionCandidates(settings, 'cifs', 'iobroker', entries.slice(0, -1), groups[4]), /INCOMPLETE/);
|
|
183
|
+
});
|
|
184
|
+
test('offline recovery refuses insufficient free space before writing component data', async () => {
|
|
185
|
+
const dir = await temp(), preflight = require('../build/preflight'), original = preflight.assertFreeSpace;
|
|
186
|
+
try {
|
|
187
|
+
const f = await recoveryFixture(dir), output = path.join(dir, 'no-space');
|
|
188
|
+
preflight.assertFreeSpace = async () => { throw new Error('EOS_BACKUP_DISK_SPACE'); };
|
|
189
|
+
await assert.rejects(() => prepareRestoreSet(f.setPath, f.keyfile, output), /DISK_SPACE/);
|
|
190
|
+
await assert.rejects(() => fs.stat(output), /ENOENT/);
|
|
191
|
+
assert.equal((await fs.stat(f.setPath)).isFile(), true);
|
|
192
|
+
} finally { preflight.assertFreeSpace = original; await fs.rm(dir, { recursive: true, force: true }); }
|
|
193
|
+
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
// These isolated controller fixtures contain no manufacturer-provisioned trust.
|
|
3
|
+
require('../build/publicTrust').capturePublicTrust=async()=>null;
|
|
2
4
|
const test=require('node:test');const assert=require('node:assert/strict');const fs=require('node:fs/promises');const os=require('node:os');const path=require('node:path');const zlib=require('node:zlib');
|
|
3
5
|
const {createHostedModule,validateConfig,preflightLegacyConfig}=require('../build');
|
|
4
|
-
async function fixture(config={}){const root=await fs.mkdtemp(path.join(os.tmpdir(),'eos-backup-hosted-'));const installationDir=path.join(root,'iobroker'),eosDataDir=path.join(installationDir,'iobroker-data/eos-admin.0'),dataDir=path.join(eosDataDir,'modules/backup');await fs.mkdir(path.join(installationDir,'node_modules/iobroker.js-controller'),{recursive:true});await fs.mkdir(path.join(eosDataDir,'tls'),{recursive:true});await fs.writeFile(path.join(eosDataDir,'tls/device-key.pem'),'ephemeral fixture identity');await fs.writeFile(path.join(installationDir,'node_modules/iobroker.js-controller/iobroker.js'),"require('node:fs').writeFileSync(process.argv[3],require('node:zlib').gzipSync('fixturecontrollerdata'));",{mode:0o600});let allowed=true;const state=new Map();const adapter={namespace:'eos-admin.0.backup',log:{warn(){},info(){},error(){},debug(){}},async getBackupDataFolders(){return [];},async setObjectNotExistsAsync(){},async setStateAsync(id,value){state.set(id,value);}};const module=createHostedModule({adapter,canOperate:()=>allowed,dataDir,eosDataDir,installationDir,config:{enabled:true,minimalEnabled:false,...config}});return {root,dataDir,module,state,revoke(){allowed=false;},async cleanup(){await module.stop();await fs.rm(root,{recursive:true,force:true});}};}
|
|
6
|
+
async function fixture(config={}){const root=await fs.mkdtemp(path.join(os.tmpdir(),'eos-backup-hosted-'));const installationDir=path.join(root,'iobroker'),eosDataDir=path.join(installationDir,'iobroker-data/eos-admin.0'),dataDir=path.join(eosDataDir,'modules/backup');await fs.mkdir(path.join(installationDir,'node_modules/iobroker.js-controller'),{recursive:true});await fs.mkdir(path.join(eosDataDir,'tls'),{recursive:true});await fs.writeFile(path.join(eosDataDir,'tls/device-key.pem'),'ephemeral fixture identity');await fs.writeFile(path.join(installationDir,'node_modules/iobroker.js-controller/iobroker.js'),"require('node:fs').writeFileSync(process.argv[3],require('node:zlib').gzipSync('fixturecontrollerdata'));",{mode:0o600});let allowed=true;const state=new Map();const adapter={namespace:'eos-admin.0.backup',log:{warn(){},info(){},error(){},debug(){}},async getBackupDataFolders(){return [];},async setObjectNotExistsAsync(){},async setStateAsync(id,value){state.set(id,value);}};const module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter,canOperate:()=>allowed,dataDir,eosDataDir,installationDir,config:{enabled:true,minimalEnabled:false,...config}});return {root,dataDir,module,state,revoke(){allowed=false;},async cleanup(){await module.stop();await fs.rm(root,{recursive:true,force:true});}};}
|
|
5
7
|
async function finished(module){const end=Date.now()+20000;while(Date.now()<end){const status=module.getStatus();if(!status.current&&status.history.length)return status.history[0];await new Promise(r=>setTimeout(r,30));}throw new Error('job timeout');}
|
|
6
|
-
test('real child worker creates encrypted controller and private EOS profile, API status has no recovery key',async()=>{const f=await fixture();try{await f.module.start();const result=await f.module.command('start',{});assert.equal(result.accepted,true);await assert.rejects(()=>f.module.command('start',{}),/BUSY/);const job=await finished(f.module);assert.equal(job.state,'succeeded',job.error);assert.equal(job.files.length,
|
|
8
|
+
test('real child worker creates encrypted controller and private EOS profile, API status has no recovery key',async()=>{const f=await fixture();try{await f.module.start();const result=await f.module.command('start',{});assert.equal(result.accepted,true);await assert.rejects(()=>f.module.command('start',{}),/BUSY/);const job=await finished(f.module);assert.equal(job.state,'succeeded',job.error);assert.equal(job.files.length,3);assert.equal(f.state.get('info.status').val,'SUCCEEDED');assert(!JSON.stringify(f.module.getStatus()).includes('key'));const key=await f.module.command('exportRecoveryKey',{confirm:true});assert.equal(JSON.parse(key.content).format,'nexowatt-eos-recovery-key/v1');for(const file of job.files){const d=await f.module.getDownload(file.name);let bytes=0;for await(const chunk of d.stream)bytes+=chunk.length;assert.equal(bytes,d.size);}const names=await fs.readdir(path.join(f.dataDir,'jobs'));assert.deepEqual(names,[]);}finally{await f.cleanup();}});
|
|
7
9
|
test('download rejects traversal and symlinks; export requires explicit command confirmation',async()=>{const f=await fixture();try{await f.module.start();await assert.rejects(()=>f.module.getDownload('../recovery.key'),/ARCHIVE_NAME/);await assert.rejects(()=>f.module.command('exportRecoveryKey',{}),/CONFIRM/);const n='eos-backup-00000000-0000-0000-0000-000000000000-system.nwb';await fs.symlink(path.join(f.dataDir,'recovery.key'),path.join(f.dataDir,'archives',n));await assert.rejects(()=>f.module.getDownload(n));f.revoke();await assert.rejects(()=>f.module.command('start',{}),/INACTIVE/);}finally{await f.cleanup();}});
|
|
8
10
|
test('configuration refuses unsafe executable, insecure FTPS and automatic mount before migration',async()=>{assert.throws(()=>validateConfig({enabled:true,ftpEnabled:true,ftpSecure:false}),/FTPS_REQUIRED/);assert.throws(()=>validateConfig({enabled:true,mySqlEnabled:true,mySqlDumpExe:'/tmp/evil'}),/EXECUTABLE_REVIEW/);await assert.rejects(()=>preflightLegacyConfig({cifsEnabled:true,connectType:'Expert'}),/MOUNT_REVIEW/);await assert.rejects(()=>preflightLegacyConfig({cifsEnabled:true,connectType:'CIFS'}),/SOURCE_PATH|PREMOUNT/);});
|
|
9
11
|
test('legacy config keeps custom fields and decrypts documented XOR event passwords only',async()=>{const secret='fixture-only-system-secret';const plain='db password with $ special';let encrypted='';for(let i=0;i<plain.length;i++)encrypted+=String.fromCharCode(plain.charCodeAt(i)^secret.charCodeAt(i%secret.length));const source={customCustomerSetting:{x:17},mySqlMulti:true,mySqlEvents:[{host:'localhost',dbName:'iobroker',pass:encrypted}],mySqlEnabled:true};const {config}=await preflightLegacyConfig(source,{owner:{async getForeignObjectAsync(id){assert.equal(id,'system.config');return {native:{secret}};}}});assert.equal(config.mySqlEvents[0].pass,plain);assert.deepEqual(config.customCustomerSetting,{x:17});assert.equal(source.mySqlEvents[0].pass,encrypted);});
|
|
@@ -15,4 +17,42 @@ test('migration leaves inactive unsupported settings intact and refuses active m
|
|
|
15
17
|
test('custom controller dataFolder overlap is blocked before spawning a backup worker',async()=>{const f=await fixture();try{f.module.options.adapter.getBackupDataFolders=async()=>[path.join(f.root,'iobroker/iobroker-data/eos-admin.0')];await f.module.start();await assert.rejects(()=>f.module.command('start',{}),/CONTROLLER_DATA_FOLDER_OVERLAP/);assert.equal(f.module.getStatus().current,null);assert.deepEqual(await fs.readdir(path.join(f.dataDir,'jobs')),[]);}finally{await f.cleanup();}});
|
|
16
18
|
|
|
17
19
|
// Real timer + real child boundary: automatic backups still start after removing node-schedule.
|
|
18
|
-
test('cron schedule starts the real hosted backup worker and stop removes its next run',async()=>{const f=await fixture({minimalEnabled:true,iobrokerCron:true,iobrokerCronJob:'* * * * * *'});try{await f.module.start();assert.equal(f.module.getStatus().nextRuns.length,1);const job=await finished(f.module);assert.equal(job.state,'succeeded',job.error);assert.equal(job.files.length,
|
|
20
|
+
test('cron schedule starts the real hosted backup worker and stop removes its next run',async()=>{const f=await fixture({minimalEnabled:true,iobrokerCron:true,iobrokerCronJob:'* * * * * *'});try{await f.module.start();assert.equal(f.module.getStatus().nextRuns.length,1);const job=await finished(f.module);assert.equal(job.state,'succeeded',job.error);assert.equal(job.files.length,3);await f.module.stop();assert.deepEqual(f.module.getStatus().nextRuns,[]);}finally{await f.cleanup();}});
|
|
21
|
+
|
|
22
|
+
test('real worker recovery set verifies controller fixture and restores exact private EOS files offline',async()=>{
|
|
23
|
+
const f=await fixture();
|
|
24
|
+
try{
|
|
25
|
+
await f.module.start(); await f.module.command('start',{}); const job=await finished(f.module);
|
|
26
|
+
assert.equal(job.state,'succeeded',job.error);
|
|
27
|
+
const exported=await f.module.command('exportRecoveryKey',{confirm:true});
|
|
28
|
+
const keyfile=path.join(f.root,'recovery-key.json'); await fs.writeFile(keyfile,exported.content,{mode:0o600});
|
|
29
|
+
const set=job.files.find(file=>file.kind==='recovery-set');
|
|
30
|
+
const output=path.join(f.root,'offline');
|
|
31
|
+
const planPath=await require('../build/restore-cli').prepareRestoreSet(path.join(f.dataDir,'archives',set.name),keyfile,output);
|
|
32
|
+
const plan=JSON.parse(await fs.readFile(planPath));
|
|
33
|
+
const controller=plan.files.find(file=>file.kind==='iobroker');
|
|
34
|
+
assert.equal(zlib.gunzipSync(await fs.readFile(path.join(output,controller.file))).toString(),'fixturecontrollerdata');
|
|
35
|
+
const profile=plan.files.find(file=>file.kind==='eos-profile');
|
|
36
|
+
const tar=require('tar-stream').extract(), values=new Map();
|
|
37
|
+
tar.on('entry',(header,stream,next)=>{const chunks=[];stream.on('data',chunk=>chunks.push(chunk));stream.once('end',()=>{values.set(header.name,Buffer.concat(chunks));next();});});
|
|
38
|
+
await require('node:stream/promises').pipeline(require('node:fs').createReadStream(path.join(output,profile.file)),zlib.createGunzip(),tar);
|
|
39
|
+
assert.equal(values.get('eos-data/tls/device-key.pem').toString(),'ephemeral fixture identity');
|
|
40
|
+
const manifest=JSON.parse(values.get('manifest.json'));
|
|
41
|
+
for(const entry of manifest.files) assert.equal(require('node:crypto').createHash('sha256').update(values.get(entry.path)).digest('hex'),entry.sha256);
|
|
42
|
+
assert.equal([...values.keys()].some(name=>name.includes('recovery.key')||name.includes('/archives/')),false);
|
|
43
|
+
assert.equal(plan.automaticRestore,false);
|
|
44
|
+
}finally{await f.cleanup();}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('active historian missing from backup is blocked before worker and profile choice remains unchanged',async()=>{
|
|
48
|
+
const f=await fixture({eosProfileEnabled:false});
|
|
49
|
+
try{
|
|
50
|
+
f.module.options.getHistoryBackupRequirement=()=>({provider:'influxdb2',url:'http://localhost:8086',bucket:'EOS',org:'EOS'});
|
|
51
|
+
await f.module.start();
|
|
52
|
+
assert.equal(f.module.getStatus().coverage.complete,false);
|
|
53
|
+
await assert.rejects(()=>f.module.command('start',{}),/EOS_PROFILE_REQUIRED/);
|
|
54
|
+
assert.equal(f.module.config.eosProfileEnabled,false);
|
|
55
|
+
assert.equal(f.module.getStatus().current,null);
|
|
56
|
+
assert.deepEqual(await fs.readdir(path.join(f.dataDir,'jobs')),[]);
|
|
57
|
+
}finally{await f.cleanup();}
|
|
58
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// Opt-in disposable servers only. Never contacts a configured customer database.
|
|
3
|
+
const test = require('node:test');
|
|
4
|
+
const assert = require('node:assert/strict');
|
|
5
|
+
const fs = require('node:fs/promises');
|
|
6
|
+
const { openSync, closeSync } = require('node:fs');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
const os = require('node:os');
|
|
9
|
+
const { randomBytes } = require('node:crypto');
|
|
10
|
+
const { spawn, execFile } = require('node:child_process');
|
|
11
|
+
const { promisify } = require('node:util');
|
|
12
|
+
const command = require('../build/command');
|
|
13
|
+
const { exportInflux2 } = require('../build/influxIntegrity');
|
|
14
|
+
const serverBinary = process.env.EOS_TEST_INFLUXD, cliBinary = process.env.EOS_TEST_INFLUX;
|
|
15
|
+
test('real InfluxDB2: actual export, active bucket proof, isolated restore, empty and missing buckets', {
|
|
16
|
+
skip: !serverBinary || !cliBinary ? 'Set EOS_TEST_INFLUXD and EOS_TEST_INFLUX for isolated real-server acceptance' : false,
|
|
17
|
+
timeout: 120000,
|
|
18
|
+
}, async t => {
|
|
19
|
+
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'eos-influx-real-'));
|
|
20
|
+
const token = randomBytes(48).toString('hex'), targetToken = randomBytes(48).toString('hex');
|
|
21
|
+
const source = 'http://127.0.0.1:19086', destination = 'http://127.0.0.1:19087';
|
|
22
|
+
const children = [], oldExecutable = command.executable;
|
|
23
|
+
async function api(base, url, auth, method = 'GET', body) {
|
|
24
|
+
const response = await fetch(base + url, { method, headers: { Authorization: `Token ${auth}`, 'Content-Type': typeof body === 'string' ? 'text/plain' : 'application/json' }, body: body === undefined ? undefined : typeof body === 'string' ? body : JSON.stringify(body), signal: AbortSignal.timeout(10000) });
|
|
25
|
+
const text = await response.text(); assert(response.ok, `${method} ${url}: HTTP ${response.status}: ${text}`);
|
|
26
|
+
return text ? (text.startsWith('{') ? JSON.parse(text) : text) : null;
|
|
27
|
+
}
|
|
28
|
+
async function start(name, port) {
|
|
29
|
+
const folder = path.join(root, name); await fs.mkdir(folder, { mode: 0o700 });
|
|
30
|
+
const fd = openSync(path.join(folder, 'server.log'), 'wx', 0o600);
|
|
31
|
+
const child = spawn(serverBinary, ['--http-bind-address', `127.0.0.1:${port}`, '--bolt-path', path.join(folder, 'influxd.bolt'), '--sqlite-path', path.join(folder, 'influxd.sqlite'), '--engine-path', path.join(folder, 'engine'), '--reporting-disabled', '--log-level', 'error'], { cwd: folder, stdio: ['ignore', fd, fd], env: { PATH: '/usr/bin:/bin', HOME: folder } });
|
|
32
|
+
closeSync(fd); children.push(child);
|
|
33
|
+
for (let i = 0; i < 200; i++) {
|
|
34
|
+
try { const r = await fetch(`http://127.0.0.1:${port}/health`, { signal: AbortSignal.timeout(300) }); if (r.ok) return; } catch {}
|
|
35
|
+
if (child.exitCode !== null) throw new Error(await fs.readFile(path.join(folder, 'server.log'), 'utf8'));
|
|
36
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
37
|
+
}
|
|
38
|
+
throw new Error('isolated server startup timeout');
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
t.diagnostic((await promisify(execFile)(serverBinary, ['version'])).stdout.trim());
|
|
42
|
+
await start('source', 19086); await start('target', 19087);
|
|
43
|
+
const sourceSetup = await api(source, '/api/v2/setup', token, 'POST', { username: 'fixtureuser', password: 'fixture-only-password-123', org: 'NexoWatt', bucket: 'EOS', token });
|
|
44
|
+
await api(destination, '/api/v2/setup', targetToken, 'POST', { username: 'restoreuser', password: 'fixture-only-password-456', org: 'Restored', bucket: 'initial', token: targetToken });
|
|
45
|
+
const samples = 'meter,device=one watts=611.5,online=true,label="known" 1700000000000000000\nmeter,device=two watts=673.25,online=false,label="second" 1700000001000000000';
|
|
46
|
+
await api(source, '/api/v2/write?org=NexoWatt&bucket=EOS&precision=ns', token, 'POST', samples);
|
|
47
|
+
await api(source, '/api/v2/buckets', token, 'POST', { name: 'Empty', orgID: sourceSetup.org.id, retentionRules: [] });
|
|
48
|
+
const target = { version: '2.x', host: '127.0.0.1', port: '19086', protocol: 'http', url: source, bucket: 'EOS', bucketId: '', org: 'NexoWatt', orgId: '', token };
|
|
49
|
+
command.executable = async name => { assert.equal(name, 'influx'); return cliBinary; };
|
|
50
|
+
const snapshot = path.join(root, 'snapshot'); await fs.mkdir(snapshot);
|
|
51
|
+
await exportInflux2(target, snapshot, root, 0, { provider: 'influxdb2', url: source, bucket: 'EOS', org: 'NexoWatt' });
|
|
52
|
+
const proof = JSON.parse(await fs.readFile(path.join(snapshot, 'eos-export-proof.json')));
|
|
53
|
+
assert.equal(proof.buckets.length, 1); assert.equal(proof.buckets[0].name, 'EOS'); assert(proof.files.length >= 3, 'real metadata and shard files');
|
|
54
|
+
await promisify(execFile)(cliBinary, ['restore', '--host', destination, '--org', 'NexoWatt', '--bucket', 'EOS', '--new-org', 'Restored', '--new-bucket', 'EOS', snapshot], { cwd: root, env: { PATH: '/usr/bin:/bin', HOME: root, INFLUX_TOKEN: targetToken }, timeout: 20000 });
|
|
55
|
+
const query = 'from(bucket: "EOS") |> range(start: 2023-01-01T00:00:00Z, stop: 2024-01-01T00:00:00Z) |> sort(columns:["_time"])';
|
|
56
|
+
const original = await api(source, '/api/v2/query?org=NexoWatt', token, 'POST', { query, type: 'flux' });
|
|
57
|
+
const restored = await api(destination, '/api/v2/query?org=Restored', targetToken, 'POST', { query, type: 'flux' });
|
|
58
|
+
assert.equal(restored, original); assert.match(restored, /611.5/); assert.match(restored, /673.25/); assert.match(restored, /known/);
|
|
59
|
+
const empty = path.join(root, 'empty'); await fs.mkdir(empty);
|
|
60
|
+
await exportInflux2({ ...target, bucket: 'Empty' }, empty, root, 1);
|
|
61
|
+
assert.equal(JSON.parse(await fs.readFile(path.join(empty, 'eos-export-proof.json'))).buckets[0].name, 'Empty');
|
|
62
|
+
const missing = path.join(root, 'missing'); await fs.mkdir(missing);
|
|
63
|
+
await assert.rejects(() => exportInflux2({ ...target, bucket: 'Deleted' }, missing, root, 2), /BUCKET_MISSING_OR_AMBIGUOUS/);
|
|
64
|
+
assert.deepEqual(await fs.readdir(missing), []);
|
|
65
|
+
const whole = path.join(root, 'whole'); await fs.mkdir(whole);
|
|
66
|
+
await exportInflux2({ ...target, bucket: '', org: '' }, whole, root, 3, { provider: 'influxdb2', url: source, bucket: 'EOS', org: 'NexoWatt' });
|
|
67
|
+
assert.equal(JSON.parse(await fs.readFile(path.join(whole, 'eos-export-proof.json'))).buckets.some(b => b.name === 'Empty'), true);
|
|
68
|
+
t.diagnostic('Actual source/target services, real CLI, exact six typed field rows after isolated restore; existing empty bucket accepted, nonexistent rejected before backup; full-server inventory checked.');
|
|
69
|
+
} finally {
|
|
70
|
+
command.executable = oldExecutable;
|
|
71
|
+
for (const child of children) if (child.exitCode === null) child.kill('SIGTERM');
|
|
72
|
+
await Promise.all(children.map(child => child.exitCode !== null ? undefined : new Promise(resolve => { child.once('exit', resolve); const timer = setTimeout(() => { child.kill('SIGKILL'); resolve(); }, 3000); timer.unref(); })));
|
|
73
|
+
await fs.rm(root, { recursive: true, force: true });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
// These isolated controller fixtures contain no manufacturer-provisioned trust.
|
|
3
|
+
require('../build/publicTrust').capturePublicTrust=async()=>null;
|
|
2
4
|
const test=require('node:test');const assert=require('node:assert/strict');const fs=require('node:fs/promises');const os=require('node:os');const path=require('node:path');const {fork}=require('node:child_process');const {randomBytes}=require('node:crypto');
|
|
3
5
|
const {createHostedModule}=require('../build');const {encryptFile}=require('../build/files');const {prepareRestore}=require('../build/restore-cli');const {cachedToken,saveToken}=require('../build/tokenCache');
|
|
4
6
|
async function temp(){return fs.mkdtemp(path.join(os.tmpdir(),'eos-backup-lifecycle-'));}
|
|
@@ -7,15 +9,15 @@ async function until(fn,timeout=10000){const end=Date.now()+timeout;while(Date.n
|
|
|
7
9
|
function alive(pid){try{process.kill(pid,0);return true;}catch{return false;}}
|
|
8
10
|
test('offline restore authenticates and preserves an existing output directory',async()=>{const dir=await temp();try{const key=randomBytes(32),source=path.join(dir,'data');await fs.writeFile(source,'private identity');const archive=path.join(dir,'eos-backup-00000000-0000-0000-0000-000000000000-eos-profile.nwb');await encryptFile(source,archive,key,1024);const keyfile=path.join(dir,'key.json');await fs.writeFile(keyfile,JSON.stringify({format:'nexowatt-eos-recovery-key/v1',key:key.toString('base64')}));const out=path.join(dir,'restore');const target=await prepareRestore(archive,keyfile,out);assert.equal(await fs.readFile(target,'utf8'),'private identity');await assert.rejects(()=>prepareRestore(archive,keyfile,out));assert.equal(await fs.readFile(target,'utf8'),'private identity');await fs.writeFile(keyfile,JSON.stringify({format:'nexowatt-eos-recovery-key/v1',key:randomBytes(32).toString('base64')}));await assert.rejects(()=>prepareRestore(archive,keyfile,path.join(dir,'failed')),/AUTHENTICATION/);await assert.rejects(()=>fs.stat(path.join(dir,'failed')),/ENOENT/);}finally{await fs.rm(dir,{recursive:true,force:true});}});
|
|
9
11
|
test('OAuth refresh cache is encrypted, survives jobs and invalidates after deliberate config change',async()=>{const dir=await temp();try{const workDir=path.join(dir,'work');await fs.mkdir(workDir,{mode:0o700});const ctx={dataDir:dir,workDir,key:randomBytes(32).toString('base64')};assert.equal(await cachedToken(ctx,'onedrive','original'),'original');await saveToken(ctx,'onedrive','original',{access_token:'fixture-private-access',refresh_token:'fixture-private-refresh'});const raw=await fs.readFile(path.join(dir,'provider-tokens.nwb'));assert(!raw.includes(Buffer.from('fixture-private')));const cached=await cachedToken({...ctx},'onedrive','original');assert.equal(JSON.parse(cached).refresh_token,'fixture-private-refresh');assert.equal(await cachedToken(ctx,'onedrive','changed-config'),'changed-config');assert.deepEqual(await fs.readdir(workDir),[]);}finally{await fs.rm(dir,{recursive:true,force:true});}});
|
|
10
|
-
test('stop kills worker plus inherited command process group and clears private job files',async()=>{if(process.platform==='win32')return;const dir=await temp();let module;try{const installationDir=path.join(dir,'iobroker'),eosDataDir=path.join(installationDir,'iobroker-data/eos-admin.0'),dataDir=path.join(eosDataDir,'modules/backup'),pidfile=path.join(dir,'pids');await fs.mkdir(path.join(installationDir,'node_modules/iobroker.js-controller'),{recursive:true});await fs.mkdir(eosDataDir,{recursive:true});await fs.writeFile(path.join(installationDir,'node_modules/iobroker.js-controller/iobroker.js'),`const c=require('node:child_process').spawn(process.execPath,['-e',"process.on('SIGTERM',()=>{});setInterval(()=>{},1000)"],{stdio:'ignore'});require('node:fs').writeFileSync(${JSON.stringify(pidfile)},JSON.stringify([process.pid,c.pid]));process.on('SIGTERM',()=>{});setInterval(()=>{},1000);`);module=createHostedModule({adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir,eosDataDir,installationDir});await module.start();await module.command('start',{});await until(()=>fs.stat(pidfile).then(()=>true,()=>false));const pids=JSON.parse(await fs.readFile(pidfile,'utf8'));await module.stop();await until(async()=>{for(const pid of pids){if(alive(pid)){try{const state=await fs.readFile('/proc/'+pid+'/stat','utf8');if(!state.includes(') Z '))return false;}catch{}}}return true;});assert.deepEqual(await fs.readdir(path.join(dataDir,'jobs')),[]);}finally{await module?.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
12
|
+
test('stop kills worker plus inherited command process group and clears private job files',async()=>{if(process.platform==='win32')return;const dir=await temp();let module;try{const installationDir=path.join(dir,'iobroker'),eosDataDir=path.join(installationDir,'iobroker-data/eos-admin.0'),dataDir=path.join(eosDataDir,'modules/backup'),pidfile=path.join(dir,'pids');await fs.mkdir(path.join(installationDir,'node_modules/iobroker.js-controller'),{recursive:true});await fs.mkdir(eosDataDir,{recursive:true});await fs.writeFile(path.join(installationDir,'node_modules/iobroker.js-controller/iobroker.js'),`const c=require('node:child_process').spawn(process.execPath,['-e',"process.on('SIGTERM',()=>{});setInterval(()=>{},1000)"],{stdio:'ignore'});require('node:fs').writeFileSync(${JSON.stringify(pidfile)},JSON.stringify([process.pid,c.pid]));process.on('SIGTERM',()=>{});setInterval(()=>{},1000);`);module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir,eosDataDir,installationDir});await module.start();await module.command('start',{});await until(()=>fs.stat(pidfile).then(()=>true,()=>false));const pids=JSON.parse(await fs.readFile(pidfile,'utf8'));await module.stop();await until(async()=>{for(const pid of pids){if(alive(pid)){try{const state=await fs.readFile('/proc/'+pid+'/stat','utf8');if(!state.includes(') Z '))return false;}catch{}}}return true;});assert.deepEqual(await fs.readdir(path.join(dataDir,'jobs')),[]);}finally{await module?.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
11
13
|
|
|
12
|
-
test('stop during delayed startup fences late readiness, subscriptions, key and timers',async()=>{const dir=await temp();let release;const gate=new Promise(r=>{release=r;});let entered=false,subscribed=0;const a=adapter();a.setObjectNotExistsAsync=async()=>{entered=true;await gate;};a.subscribeStatesAsync=async()=>{subscribed++;};a.unsubscribeStatesAsync=async()=>{subscribed--;};const module=createHostedModule({adapter:a,config:{enabled:true,minimalEnabled:true},canOperate:()=>true,dataDir:dir});const starting=module.start();const observed=starting.catch(e=>e);try{await until(()=>entered);const stopped=module.stop();release();assert.match((await observed).message,/STOPPING/);await stopped;assert.equal(subscribed,0);assert.equal(module.getStatus().recoveryKeyAvailable,false);assert.deepEqual(module.getStatus().nextRuns,[]);assert.equal(module.watchdog,null);assert.equal(module.started,false);await assert.rejects(()=>module.command('start',{}),/INACTIVE/);}finally{release();await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
14
|
+
test('stop during delayed startup fences late readiness, subscriptions, key and timers',async()=>{const dir=await temp();let release;const gate=new Promise(r=>{release=r;});let entered=false,subscribed=0;const a=adapter();a.setObjectNotExistsAsync=async()=>{entered=true;await gate;};a.subscribeStatesAsync=async()=>{subscribed++;};a.unsubscribeStatesAsync=async()=>{subscribed--;};const module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter:a,config:{enabled:true,minimalEnabled:true},canOperate:()=>true,dataDir:dir});const starting=module.start();const observed=starting.catch(e=>e);try{await until(()=>entered);const stopped=module.stop();release();assert.match((await observed).message,/STOPPING/);await stopped;assert.equal(subscribed,0);assert.equal(module.getStatus().recoveryKeyAvailable,false);assert.deepEqual(module.getStatus().nextRuns,[]);assert.equal(module.watchdog,null);assert.equal(module.started,false);await assert.rejects(()=>module.command('start',{}),/INACTIVE/);}finally{release();await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
13
15
|
|
|
14
|
-
test('synchronous worker creation error clears running state and allows controlled retry',async()=>{const dir=await temp();const module=createHostedModule({adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir:dir,installationDir:dir,eosDataDir:dir,workerPath:{invalid:true}});try{await module.start();await assert.rejects(()=>module.command('start',{}),/WORKER_START/);assert.equal(module.getStatus().current,null);assert.deepEqual(await fs.readdir(path.join(dir,'jobs')),[]);await assert.rejects(()=>module.command('start',{}),/WORKER_START/);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
16
|
+
test('synchronous worker creation error clears running state and allows controlled retry',async()=>{const dir=await temp();const module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir:dir,installationDir:dir,eosDataDir:dir,workerPath:{invalid:true}});try{await module.start();await assert.rejects(()=>module.command('start',{}),/WORKER_START/);assert.equal(module.getStatus().current,null);assert.deepEqual(await fs.readdir(path.join(dir,'jobs')),[]);await assert.rejects(()=>module.command('start',{}),/WORKER_START/);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
15
17
|
|
|
16
|
-
test('oversized private job history is rejected before reading into the parent heap',async()=>{const dir=await temp();await fs.writeFile(path.join(dir,'history.json'),Buffer.alloc(4*1024**2+1,32));const module=createHostedModule({adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir:dir});try{await module.start();assert.deepEqual(module.getStatus().history,[]);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
18
|
+
test('oversized private job history is rejected before reading into the parent heap',async()=>{const dir=await temp();await fs.writeFile(path.join(dir,'history.json'),Buffer.alloc(4*1024**2+1,32));const module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter:adapter(),config:{enabled:true,minimalEnabled:false},canOperate:()=>true,dataDir:dir});try{await module.start();assert.deepEqual(module.getStatus().history,[]);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
17
19
|
|
|
18
|
-
test('rejected unsubscribe still clears secrets, timers and permits repeated stop',async()=>{const dir=await temp();const a=adapter();a.subscribeStatesAsync=async()=>{};a.unsubscribeStatesAsync=async()=>{throw new Error('fixture controller unavailable');};const module=createHostedModule({adapter:a,config:{enabled:true,minimalEnabled:true},canOperate:()=>true,dataDir:dir});try{await module.start();await Promise.all([module.stop(),module.stop()]);assert.equal(module.getStatus().recoveryKeyAvailable,false);assert.deepEqual(module.getStatus().nextRuns,[]);assert.equal(module.watchdog,null);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
20
|
+
test('rejected unsubscribe still clears secrets, timers and permits repeated stop',async()=>{const dir=await temp();const a=adapter();a.subscribeStatesAsync=async()=>{};a.unsubscribeStatesAsync=async()=>{throw new Error('fixture controller unavailable');};const module=createHostedModule({getHistoryBackupRequirement:()=>({provider:'none'}),adapter:a,config:{enabled:true,minimalEnabled:true},canOperate:()=>true,dataDir:dir});try{await module.start();await Promise.all([module.stop(),module.stop()]);assert.equal(module.getStatus().recoveryKeyAvailable,false);assert.deepEqual(module.getStatus().nextRuns,[]);assert.equal(module.watchdog,null);}finally{await module.stop();await fs.rm(dir,{recursive:true,force:true});}});
|
|
19
21
|
|
|
20
22
|
test('offline recovery key installation preserves exact key and never overwrites existing identity',async()=>{const {installRecoveryKey}=require('../build/restore-cli');const dir=await temp();try{const key=require('node:crypto').randomBytes(32),keyPath=path.join(dir,'export.json'),data=path.join(dir,'private');await fs.writeFile(keyPath,JSON.stringify({format:'nexowatt-eos-recovery-key/v1',key:key.toString('base64')}));const target=await installRecoveryKey(keyPath,data);assert.deepEqual(await fs.readFile(target),key);assert.equal((await fs.stat(target)).mode&0o777,0o600);await assert.rejects(()=>installRecoveryKey(keyPath,data),/EEXIST/);assert.deepEqual(await fs.readFile(target),key);}finally{await fs.rm(dir,{recursive:true,force:true});}});
|
|
21
23
|
|