iobroker.eos-admin 9.0.20 → 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.
Files changed (718) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +17 -11
  2. package/README.md +34 -8
  3. package/START_HIER_9.0.21.md +53 -0
  4. package/START_HIER_9.0.22.md +48 -0
  5. package/START_HIER_9.0.23.md +47 -0
  6. package/START_HIER_9.0.24.md +70 -0
  7. package/adminWww/.vite/manifest.json +55 -55
  8. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
  9. package/adminWww/assets/{AdapterUpdateDialog-CRD3XVom.js → AdapterUpdateDialog-D7sI5VRm.js} +1 -1
  10. package/adminWww/assets/{Adapters-Cuf0X0CU.js → Adapters-DS6ITaEH.js} +1 -1
  11. package/adminWww/assets/{ConfigManager-B8ycQt1C.js → ConfigManager-_iFDSXuD.js} +1 -1
  12. package/adminWww/assets/{Enums-CctVCgZX.js → Enums-Bdv7Tqmf.js} +1 -1
  13. package/adminWww/assets/{Fields-onm4DfoO.js → Fields-CWUY1AnV.js} +1 -1
  14. package/adminWww/assets/{Files-OLP3Rwc7.js → Files-BveV1b_F.js} +1 -1
  15. package/adminWww/assets/{Hosts-C31oqMcW.js → Hosts-B1HWZLGl.js} +1 -1
  16. package/adminWww/assets/{Instances-DFdvJ9pa.js → Instances-DYvbOlj7.js} +1 -1
  17. package/adminWww/assets/{Intro-DvsFJxU0.js → Intro-pYT2FzIK.js} +1 -1
  18. package/adminWww/assets/{Logs-Zqg2Bqv6.js → Logs-D2ZbCY3Z.js} +1 -1
  19. package/adminWww/assets/{Objects-CpWZp6yp.js → Objects-CTUxbXJM.js} +1 -1
  20. package/adminWww/assets/{Overview-BsKUo298.js → Overview-i6PsoN_F.js} +1 -1
  21. package/adminWww/assets/{State-D_xwlhhb.js → State-BEQXNcI3.js} +1 -1
  22. package/adminWww/assets/{UsedResources-C79N6yZx.js → UsedResources-CLc1afk1.js} +1 -1
  23. package/adminWww/assets/{Users-WgC0O8P0.js → Users-DG6i7iqC.js} +1 -1
  24. package/adminWww/assets/{bootstrap-BcfBoIoa.js → bootstrap-4KhX67tn.js} +4 -4
  25. package/adminWww/assets/{hostInit-B7bBV7cH.js → hostInit-B08JmaAP.js} +1 -1
  26. package/adminWww/assets/{icons-material-D1JYmRTj.js → icons-material-sOCHi6x9.js} +1 -1
  27. package/adminWww/assets/{index-DbiuoDjo.js → index-DHSNS0v8.js} +2 -2
  28. package/adminWww/assets/{installSVGRenderer-BAY-Pzp-.js → installSVGRenderer-CWaaO5tF.js} +1 -1
  29. package/adminWww/assets/{mf-entry-bootstrap-0-33384c20.js → mf-entry-bootstrap-0-e7c54f7f.js} +2 -2
  30. package/adminWww/index.html +23 -23
  31. package/adminWww/mf-manifest.json +1 -1
  32. package/adminWww/mf-stats.json +1 -1
  33. package/adminWww/remoteEntry-eos-9.0.24.js +12 -0
  34. package/adminWww/remoteEntry.js +1 -1
  35. package/build/lib/eosCustomerUpdateHttp.js +203 -0
  36. package/build/lib/eosCustomerUpdateHttp.js.map +1 -0
  37. package/build/lib/eosCustomerUpdateTransport.js +472 -0
  38. package/build/lib/eosCustomerUpdateTransport.js.map +1 -0
  39. package/build/lib/eosCustomerUpdateWorker.js +567 -0
  40. package/build/lib/eosCustomerUpdateWorker.js.map +1 -0
  41. package/build/lib/eosCustomerUpdates.js +631 -0
  42. package/build/lib/eosCustomerUpdates.js.map +1 -0
  43. package/build/lib/eosHistoryBackupScope.js +73 -0
  44. package/build/lib/eosHistoryBackupScope.js.map +1 -0
  45. package/build/lib/eosKiosk.js +348 -0
  46. package/build/lib/eosKiosk.js.map +1 -0
  47. package/build/lib/eosLegacyMigration.js +14 -3
  48. package/build/lib/eosLegacyMigration.js.map +1 -1
  49. package/build/lib/eosLicenseService.js +1 -1
  50. package/build/lib/eosLicenseService.js.map +1 -1
  51. package/build/lib/eosModuleConfigStore.js +13 -2
  52. package/build/lib/eosModuleConfigStore.js.map +1 -1
  53. package/build/lib/eosModuleHost.js +282 -47
  54. package/build/lib/eosModuleHost.js.map +1 -1
  55. package/build/lib/eosModuleHttp.js +48 -8
  56. package/build/lib/eosModuleHttp.js.map +1 -1
  57. package/build/lib/eosModuleProcess.js +317 -0
  58. package/build/lib/eosModuleProcess.js.map +1 -0
  59. package/build/lib/eosModuleProcessProtocol.js +213 -0
  60. package/build/lib/eosModuleProcessProtocol.js.map +1 -0
  61. package/build/lib/eosModuleProcessWorker.js +279 -0
  62. package/build/lib/eosModuleProcessWorker.js.map +1 -0
  63. package/build/lib/eosPostgresProvisioning.js +189 -0
  64. package/build/lib/eosPostgresProvisioning.js.map +1 -0
  65. package/build/lib/eosRuntimeHealth.js +155 -0
  66. package/build/lib/eosRuntimeHealth.js.map +1 -0
  67. package/build/lib/eosUiProcess.js +689 -0
  68. package/build/lib/eosUiProcess.js.map +1 -0
  69. package/build/lib/eosUiProcessRpc.js +279 -0
  70. package/build/lib/eosUiProcessRpc.js.map +1 -0
  71. package/build/lib/eosUiProcessWorker.js +399 -0
  72. package/build/lib/eosUiProcessWorker.js.map +1 -0
  73. package/build/lib/eosUiSecretCodec.js +64 -0
  74. package/build/lib/eosUiSecretCodec.js.map +1 -0
  75. package/build/lib/eosUnifiedBoundary.js +28 -4
  76. package/build/lib/eosUnifiedBoundary.js.map +1 -1
  77. package/build/lib/eosUpdateSnapshot.js +321 -0
  78. package/build/lib/eosUpdateSnapshot.js.map +1 -0
  79. package/build/lib/eosUploadGuard.js +124 -81
  80. package/build/lib/eosUploadGuard.js.map +1 -1
  81. package/build/lib/web.js +184 -7
  82. package/build/lib/web.js.map +1 -1
  83. package/docs/reports/unified-9.0.21/CRA_NACHWEISSTAND.md +159 -0
  84. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_BACKEND_REVIEW.md +30 -0
  85. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_UI_REVIEW.md +44 -0
  86. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_WORKER_REVIEW.md +147 -0
  87. package/docs/reports/unified-9.0.21/CUSTOMER_WORKER_ZWEITPRUEFUNG.md +108 -0
  88. package/docs/reports/unified-9.0.21/DEVICE_STABILITY_REVIEW.md +50 -0
  89. package/docs/reports/unified-9.0.21/EMS_STABILITAET.md +41 -0
  90. package/docs/reports/unified-9.0.21/HISTORY_TARIFF_STABILITY_REVIEW.md +48 -0
  91. package/docs/reports/unified-9.0.21/MQTT_ZWEITPRUEFUNG_EMS.md +47 -0
  92. package/docs/reports/unified-9.0.21/PERSISTENZ_STABILITAET.md +76 -0
  93. package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +64 -0
  94. package/docs/reports/unified-9.0.21/SECURITY_STABILITY_REVIEW.md +118 -0
  95. package/docs/reports/unified-9.0.21/UI_SECURITY_GATE_REVIEW.md +62 -0
  96. package/docs/reports/unified-9.0.21/UPDATE_HTTP_SNAPSHOT_PRUEFUNG.md +46 -0
  97. package/docs/reports/unified-9.0.21/raw/INDEX.json +1307 -0
  98. package/docs/reports/unified-9.0.21/raw/audit-full.log +345 -0
  99. package/docs/reports/unified-9.0.21/raw/audit-full.result.json +14 -0
  100. package/docs/reports/unified-9.0.21/raw/audit-runtime.log +23 -0
  101. package/docs/reports/unified-9.0.21/raw/audit-runtime.result.json +15 -0
  102. package/docs/reports/unified-9.0.21/raw/backend-final.log +5 -0
  103. package/docs/reports/unified-9.0.21/raw/backend-final.result.json +14 -0
  104. package/docs/reports/unified-9.0.21/raw/cra/frontend-installer-sbom.json +32 -0
  105. package/docs/reports/unified-9.0.21/raw/customer-update-glue/root-glue-focused-node24.tap +34 -0
  106. package/docs/reports/unified-9.0.21/raw/customer-update-service/lint.log +0 -0
  107. package/docs/reports/unified-9.0.21/raw/customer-update-service/real920-archive-inspection.json +20 -0
  108. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node22.log +110 -0
  109. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node24.log +24 -0
  110. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-verification.json +54 -0
  111. package/docs/reports/unified-9.0.21/raw/customer-update-service/typecheck.log +0 -0
  112. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-lint.log +0 -0
  113. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node22.tap +86 -0
  114. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node24.tap +20 -0
  115. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-strict-typecheck.log +0 -0
  116. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-typecheck.log +0 -0
  117. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/independent-worker-probes.cjs +109 -0
  118. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node22.tap +86 -0
  119. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node24.tap +20 -0
  120. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node22.tap +44 -0
  121. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node24.tap +13 -0
  122. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/receipt.json +89 -0
  123. package/docs/reports/unified-9.0.21/raw/customer-update-worker/receipt.json +42 -0
  124. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-catch-node22.log +1959 -0
  125. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node22.log +1968 -0
  126. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node24.log +337 -0
  127. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node22.log +1895 -0
  128. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node24.log +317 -0
  129. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node22.log +1959 -0
  130. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node24.log +327 -0
  131. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node22.log +36 -0
  132. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node24.log +28 -0
  133. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node22.log +36 -0
  134. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node24.log +28 -0
  135. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node22.log +15 -0
  136. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node24.log +13 -0
  137. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node22.log +16 -0
  138. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node24.log +14 -0
  139. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node22.log +74 -0
  140. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node24.log +46 -0
  141. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-drain-test-update.json +206 -0
  142. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-runtime-review.json +150 -0
  143. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-final.json +275 -0
  144. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands.json +134 -0
  145. package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node22.log +3 -0
  146. package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node24.log +1 -0
  147. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node22.log +2 -0
  148. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node24.log +0 -0
  149. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node22.log +2 -0
  150. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node24.log +0 -0
  151. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node22.log +2 -0
  152. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node24.log +0 -0
  153. package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-command-replay-repro.cjs +38 -0
  154. package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-shutdown-repro.cjs +31 -0
  155. package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node22.log +322 -0
  156. package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node24.log +55 -0
  157. package/docs/reports/unified-9.0.21/raw/device-mqtt/run-evidence.py +23 -0
  158. package/docs/reports/unified-9.0.21/raw/device-mqtt/run-final-evidence.py +20 -0
  159. package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-920.json +1 -0
  160. package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-921.json +1 -0
  161. package/docs/reports/unified-9.0.21/raw/device-mqtt/source-hashes.json +16 -0
  162. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node22.log +0 -0
  163. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node24.log +0 -0
  164. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node22.log +0 -0
  165. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node24.log +0 -0
  166. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node22.log +0 -0
  167. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node24.log +0 -0
  168. package/docs/reports/unified-9.0.21/raw/ems/baseline-files-eslint.json +1 -0
  169. package/docs/reports/unified-9.0.21/raw/ems/changed-files-eslint.json +1 -0
  170. package/docs/reports/unified-9.0.21/raw/ems/engine.patch +38 -0
  171. package/docs/reports/unified-9.0.21/raw/ems/eslint-delta.json +6 -0
  172. package/docs/reports/unified-9.0.21/raw/ems/evidence.json +171 -0
  173. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-baseline-node24.log +124 -0
  174. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node22.log +56 -0
  175. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node24.log +15 -0
  176. package/docs/reports/unified-9.0.21/raw/ems/farm-owned-methods.patch +133 -0
  177. package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node22.log +460 -0
  178. package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node24.log +82 -0
  179. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node22.log +170 -0
  180. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node24.log +33 -0
  181. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node22.log +153 -0
  182. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node24.log +39 -0
  183. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node22.log +170 -0
  184. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node24.log +33 -0
  185. package/docs/reports/unified-9.0.21/raw/ems/mqtt-queue-inheritance-before.log +28 -0
  186. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-baseline-node24.log +64 -0
  187. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-initial-timing.log +32 -0
  188. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node22.log +44 -0
  189. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node24.log +13 -0
  190. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.cjs +23 -0
  191. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.log +119 -0
  192. package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node22.log +170 -0
  193. package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node24.log +121 -0
  194. package/docs/reports/unified-9.0.21/raw/ems/nvp-node22.log +68 -0
  195. package/docs/reports/unified-9.0.21/raw/ems/nvp-node24.log +17 -0
  196. package/docs/reports/unified-9.0.21/raw/ems/ui-code-delta-inventory.json +32 -0
  197. package/docs/reports/unified-9.0.21/raw/ems/ui-docs-check.log +6 -0
  198. package/docs/reports/unified-9.0.21/raw/ems/ui-farm-fingerprint-moves.json +74 -0
  199. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-policy-tests.log +6 -0
  200. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node22.log +5 -0
  201. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node24.log +8 -0
  202. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-initial.log +6 -0
  203. package/docs/reports/unified-9.0.21/raw/ems/ui-main-full-delta.patch +135 -0
  204. package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-changes.json +93 -0
  205. package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-findings-before.json +3185 -0
  206. package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node22.json +28833 -0
  207. package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node24.json +28833 -0
  208. package/docs/reports/unified-9.0.21/raw/ems/ui-security-inventory-before.json +28991 -0
  209. package/docs/reports/unified-9.0.21/raw/ems/update-ui-reviewed-findings.cjs +59 -0
  210. package/docs/reports/unified-9.0.21/raw/frontend-build.log +152 -0
  211. package/docs/reports/unified-9.0.21/raw/frontend-build.result.json +14 -0
  212. package/docs/reports/unified-9.0.21/raw/frontend-installer-sbom.json +32 -0
  213. package/docs/reports/unified-9.0.21/raw/history/baseline920-influx-sequence-node24.log +12 -0
  214. package/docs/reports/unified-9.0.21/raw/history/baseline920-outage-node24.log +64 -0
  215. package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node22.log +38 -0
  216. package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node24.log +36 -0
  217. package/docs/reports/unified-9.0.21/raw/history/lint-baseline-comparison.json +83 -0
  218. package/docs/reports/unified-9.0.21/raw/history/lint-scope.cjs +29 -0
  219. package/docs/reports/unified-9.0.21/raw/history/regression-node22.log +438 -0
  220. package/docs/reports/unified-9.0.21/raw/history/regression-node24.log +75 -0
  221. package/docs/reports/unified-9.0.21/raw/history/results-node22.json +37 -0
  222. package/docs/reports/unified-9.0.21/raw/history/results-node24.json +66 -0
  223. package/docs/reports/unified-9.0.21/raw/history/run-checks.py +18 -0
  224. package/docs/reports/unified-9.0.21/raw/history/source-evidence.json +83 -0
  225. package/docs/reports/unified-9.0.21/raw/installer-build.log +26 -0
  226. package/docs/reports/unified-9.0.21/raw/installer-build.result.json +14 -0
  227. package/docs/reports/unified-9.0.21/raw/keygen-source.json +6 -0
  228. package/docs/reports/unified-9.0.21/raw/lint-final.log +16 -0
  229. package/docs/reports/unified-9.0.21/raw/lint-final.result.json +14 -0
  230. package/docs/reports/unified-9.0.21/raw/modules-build.log +5 -0
  231. package/docs/reports/unified-9.0.21/raw/modules-build.result.json +14 -0
  232. package/docs/reports/unified-9.0.21/raw/node22-tests-final.log +13274 -0
  233. package/docs/reports/unified-9.0.21/raw/node22-tests-final.result.json +13 -0
  234. package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.log +7 -0
  235. package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.result.json +14 -0
  236. package/docs/reports/unified-9.0.21/raw/node22-version.log +1 -0
  237. package/docs/reports/unified-9.0.21/raw/node24-tests-final.log +2223 -0
  238. package/docs/reports/unified-9.0.21/raw/node24-tests-final.result.json +13 -0
  239. package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.log +5 -0
  240. package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.result.json +14 -0
  241. package/docs/reports/unified-9.0.21/raw/node24-version.log +1 -0
  242. package/docs/reports/unified-9.0.21/raw/persistence/920-http-draft-revision-node24.log +50 -0
  243. package/docs/reports/unified-9.0.21/raw/persistence/920-late-commit-overwrite-node24.log +30 -0
  244. package/docs/reports/unified-9.0.21/raw/persistence/920-save-lifecycle-node24.log +59 -0
  245. package/docs/reports/unified-9.0.21/raw/persistence/921-backend-types.log +0 -0
  246. package/docs/reports/unified-9.0.21/raw/persistence/921-editor-lint.log +0 -0
  247. package/docs/reports/unified-9.0.21/raw/persistence/921-eebus-editor-typecheck.log +0 -0
  248. package/docs/reports/unified-9.0.21/raw/persistence/921-final-format-review.json +24 -0
  249. package/docs/reports/unified-9.0.21/raw/persistence/921-lint.log +0 -0
  250. package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-http-before.log +177 -0
  251. package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-snapshot-before.log +80 -0
  252. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.log +1019 -0
  253. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.receipt.json +28 -0
  254. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.log +174 -0
  255. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.receipt.json +28 -0
  256. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-eslint-final.log +0 -0
  257. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.log +137 -0
  258. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.receipt.json +21 -0
  259. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.log +30 -0
  260. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.receipt.json +21 -0
  261. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-strict-typecheck.log +0 -0
  262. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-typecheck-final.log +0 -0
  263. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-after.log +3 -0
  264. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-before-observation.json +25 -0
  265. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-repro.cjs +7 -0
  266. package/docs/reports/unified-9.0.21/raw/persistence/source-files.pre-final-format.sha256 +14 -0
  267. package/docs/reports/unified-9.0.21/raw/persistence/source-files.sha256 +14 -0
  268. package/docs/reports/unified-9.0.21/raw/release-overlay/obsolete-assets-920-added.json +94 -0
  269. package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.log +49 -0
  270. package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.result.json +15 -0
  271. package/docs/reports/unified-9.0.21/raw/sbom-runtime.log +7 -0
  272. package/docs/reports/unified-9.0.21/raw/sbom-runtime.result.json +14 -0
  273. package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.log +1 -0
  274. package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.result.json +14 -0
  275. package/docs/reports/unified-9.0.21/raw/security-stability/backend-typecheck.log +0 -0
  276. package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node22.tap +495 -0
  277. package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node24.tap +88 -0
  278. package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node22.tap +179 -0
  279. package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node24.tap +36 -0
  280. package/docs/reports/unified-9.0.21/raw/security-stability/results.json +118 -0
  281. package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node22.tap +63 -0
  282. package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node24.tap +47 -0
  283. package/docs/reports/unified-9.0.21/raw/security-stability/upload-lint.log +0 -0
  284. package/docs/reports/unified-9.0.21/raw/security-stability/upload-node22.tap +148 -0
  285. package/docs/reports/unified-9.0.21/raw/security-stability/upload-node24.tap +30 -0
  286. package/docs/reports/unified-9.0.21/raw/ui-docs-check.log +6 -0
  287. package/docs/reports/unified-9.0.21/raw/ui-docs-check.result.json +14 -0
  288. package/docs/reports/unified-9.0.21/raw/ui-runtime-final.log +7 -0
  289. package/docs/reports/unified-9.0.21/raw/ui-runtime-final.result.json +14 -0
  290. package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.log +1 -0
  291. package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.result.json +14 -0
  292. package/docs/reports/unified-9.0.21/raw/ui-sbom-check.log +6 -0
  293. package/docs/reports/unified-9.0.21/raw/ui-sbom-check.result.json +14 -0
  294. package/docs/reports/unified-9.0.21/raw/ui-sbom-final.log +6 -0
  295. package/docs/reports/unified-9.0.21/raw/ui-sbom-final.result.json +14 -0
  296. package/docs/reports/unified-9.0.21/raw/ui-secret-final.log +6 -0
  297. package/docs/reports/unified-9.0.21/raw/ui-secret-final.result.json +14 -0
  298. package/docs/reports/unified-9.0.21/raw/ui-security-final.log +8 -0
  299. package/docs/reports/unified-9.0.21/raw/ui-security-final.result.json +14 -0
  300. package/docs/reports/unified-9.0.21/raw/update-ui/baseline-ui.log +280 -0
  301. package/docs/reports/unified-9.0.21/raw/update-ui/browser-preview.test.cjs +170 -0
  302. package/docs/reports/unified-9.0.21/raw/update-ui/draft-regression.log +214 -0
  303. package/docs/reports/unified-9.0.21/raw/update-ui/eos-updates-before.ts +171 -0
  304. package/docs/reports/unified-9.0.21/raw/update-ui/lint.log +0 -0
  305. package/docs/reports/unified-9.0.21/raw/update-ui/results.json +90 -0
  306. package/docs/reports/unified-9.0.21/raw/update-ui/source-evidence.json +30 -0
  307. package/docs/reports/unified-9.0.21/raw/update-ui/type-node22.log +0 -0
  308. package/docs/reports/unified-9.0.21/raw/update-ui/type-node24.log +0 -0
  309. package/docs/reports/unified-9.0.21/raw/update-ui/ui-node22.log +98 -0
  310. package/docs/reports/unified-9.0.21/raw/update-ui/ui-node24.log +22 -0
  311. package/docs/reports/unified-9.0.22/BACKUP_POSTGRES_FOLLOWUP.md +44 -0
  312. package/docs/reports/unified-9.0.22/ENERGIEFLUSS_BROWSERPRUEFUNG.md +40 -0
  313. package/docs/reports/unified-9.0.22/ENERGY_FLOW_BACKEND.md +44 -0
  314. package/docs/reports/unified-9.0.22/FLOW_TARIFF_INDEPENDENT_REVIEW.md +33 -0
  315. package/docs/reports/unified-9.0.22/OCPP_STOP_WRITER_REVIEW.md +27 -0
  316. package/docs/reports/unified-9.0.22/POSTGRESQL_SYSTEM_SETUP.md +34 -0
  317. package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +85 -0
  318. package/docs/reports/unified-9.0.22/flow/PRUEFVERMERK.md +42 -0
  319. package/docs/reports/unified-9.0.22/flow/frontend-cadence-tests.log +37 -0
  320. package/docs/reports/unified-9.0.22/flow/frontend-source-hashes.json +13 -0
  321. package/docs/reports/unified-9.0.22/flow/frontend-tests.log +31 -0
  322. package/docs/reports/unified-9.0.22/postgres-history-review.md +43 -0
  323. package/docs/reports/unified-9.0.22/postgres-real-review.tap +21 -0
  324. package/docs/reports/unified-9.0.22/postgres-review-lint.log +0 -0
  325. package/docs/reports/unified-9.0.22/postgres-review-typecheck.log +0 -0
  326. package/docs/reports/unified-9.0.22/postgres-review-unit-api.tap +25 -0
  327. package/docs/reports/unified-9.0.22/raw/INDEX.json +43 -0
  328. package/docs/reports/unified-9.0.22/raw/backup-followup/eslint-backup.log +0 -0
  329. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-after.tap +13 -0
  330. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-before.tap +54 -0
  331. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-test-eslint.log +0 -0
  332. package/docs/reports/unified-9.0.22/raw/backup-followup/influx-real-node24.tap +11 -0
  333. package/docs/reports/unified-9.0.22/raw/backup-followup/scope-hashes.json +51 -0
  334. package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-before.tap +96 -0
  335. package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-flow.tap +12 -0
  336. package/docs/reports/unified-9.0.22/raw/backup-followup/tests-node24.tap +116 -0
  337. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup-scope.log +0 -0
  338. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup.log +0 -0
  339. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-postgres-setup.log +0 -0
  340. package/docs/reports/unified-9.0.22/raw/current/admin-build.log +152 -0
  341. package/docs/reports/unified-9.0.22/raw/current/availability-final.log +1 -0
  342. package/docs/reports/unified-9.0.22/raw/current/backend-build.log +5 -0
  343. package/docs/reports/unified-9.0.22/raw/current/baseline-repairs.log +60 -0
  344. package/docs/reports/unified-9.0.22/raw/current/baseline-unified.log +1675 -0
  345. package/docs/reports/unified-9.0.22/raw/current/combined-fixes.log +65 -0
  346. package/docs/reports/unified-9.0.22/raw/current/control-final.log +25 -0
  347. package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.json +244 -0
  348. package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.stderr +0 -0
  349. package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.json +63 -0
  350. package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.stderr +0 -0
  351. package/docs/reports/unified-9.0.22/raw/current/lint-final.log +5 -0
  352. package/docs/reports/unified-9.0.22/raw/current/lint.log +5 -0
  353. package/docs/reports/unified-9.0.22/raw/current/markdown-build.log +1 -0
  354. package/docs/reports/unified-9.0.22/raw/current/modules-build.log +5 -0
  355. package/docs/reports/unified-9.0.22/raw/current/pre-ocpp-full.log +2337 -0
  356. package/docs/reports/unified-9.0.22/raw/current/production-audit.json +22 -0
  357. package/docs/reports/unified-9.0.22/raw/current/production-audit.stderr +1 -0
  358. package/docs/reports/unified-9.0.22/raw/current/runtime-build-final.log +8 -0
  359. package/docs/reports/unified-9.0.22/raw/current/runtime-build.log +32 -0
  360. package/docs/reports/unified-9.0.22/raw/current/runtime-sync.log +1 -0
  361. package/docs/reports/unified-9.0.22/raw/current/safety-envelope-final.log +1 -0
  362. package/docs/reports/unified-9.0.22/raw/current/sbom-lock-graph.log +1 -0
  363. package/docs/reports/unified-9.0.22/raw/current/sbom.log +6120 -0
  364. package/docs/reports/unified-9.0.22/raw/current/station-permission-final.log +1 -0
  365. package/docs/reports/unified-9.0.22/raw/current/storage-feedforward-final.log +1 -0
  366. package/docs/reports/unified-9.0.22/raw/current/typecheck-final.log +5 -0
  367. package/docs/reports/unified-9.0.22/raw/current/typecheck.log +5 -0
  368. package/docs/reports/unified-9.0.22/raw/ems-control-points/eslint.txt +0 -0
  369. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-availability.txt +1 -0
  370. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-safety.txt +1 -0
  371. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-station.txt +1 -0
  372. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-tests.tap +124 -0
  373. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-availability.txt +1 -0
  374. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-safety.txt +1 -0
  375. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-station.txt +1 -0
  376. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-tests.tap +26 -0
  377. package/docs/reports/unified-9.0.22/raw/ems-control-points/typecheck.txt +0 -0
  378. package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node22.tap +30 -0
  379. package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node24.tap +11 -0
  380. package/docs/reports/unified-9.0.22/raw/flow-backend/environment.json +7 -0
  381. package/docs/reports/unified-9.0.22/raw/flow-backend/lint.log +0 -0
  382. package/docs/reports/unified-9.0.22/raw/flow-backend/node22.tap +164 -0
  383. package/docs/reports/unified-9.0.22/raw/flow-backend/node24.tap +33 -0
  384. package/docs/reports/unified-9.0.22/raw/flow-backend/typecheck.log +0 -0
  385. package/docs/reports/unified-9.0.22/raw/history-ui/browser-runtime.json +11 -0
  386. package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.json +49 -0
  387. package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.stderr +0 -0
  388. package/docs/reports/unified-9.0.22/raw/history-ui/build.log +18 -0
  389. package/docs/reports/unified-9.0.22/raw/history-ui/environment.json +38 -0
  390. package/docs/reports/unified-9.0.22/raw/history-ui/lint.log +0 -0
  391. package/docs/reports/unified-9.0.22/raw/history-ui/node22.tap +144 -0
  392. package/docs/reports/unified-9.0.22/raw/history-ui/node24.tap +30 -0
  393. package/docs/reports/unified-9.0.22/raw/node22-tests-final.log +14086 -0
  394. package/docs/reports/unified-9.0.22/raw/node22-version.log +1 -0
  395. package/docs/reports/unified-9.0.22/raw/node24-tests-final.log +2356 -0
  396. package/docs/reports/unified-9.0.22/raw/node24-version.log +1 -0
  397. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-eslint.log +0 -0
  398. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node22.tap +72 -0
  399. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node24.tap +70 -0
  400. package/docs/reports/unified-9.0.22/raw/postgresql-system/status-eslint.log +0 -0
  401. package/docs/reports/unified-9.0.22/raw/postgresql-system/typecheck.log +0 -0
  402. package/docs/reports/unified-9.0.23/MODULE_PROCESS_IMPLEMENTATION.md +43 -0
  403. package/docs/reports/unified-9.0.23/OCPP_0.4.3_ERGEBNIS.json +24 -0
  404. package/docs/reports/unified-9.0.23/OCPP_0.4.3_PRUEFBERICHT.md +50 -0
  405. package/docs/reports/unified-9.0.23/OCPP_AUTOMATISCHE_ZUORDNUNG.md +49 -0
  406. package/docs/reports/unified-9.0.23/OCPP_CM_INTEGRATION.md +31 -0
  407. package/docs/reports/unified-9.0.23/PROZESSDIAGNOSE.md +35 -0
  408. package/docs/reports/unified-9.0.23/PRUEFBERICHT.md +75 -0
  409. package/docs/reports/unified-9.0.23/UI_EMS_PROZESSGRENZE.md +36 -0
  410. package/docs/reports/unified-9.0.23/UI_PROCESS_INDEPENDENT_FOLLOWUP.md +33 -0
  411. package/docs/reports/unified-9.0.23/module-process-contract-review-node22.tap +86 -0
  412. package/docs/reports/unified-9.0.23/module-process-contract-review-node24.tap +20 -0
  413. package/docs/reports/unified-9.0.23/module-process-contract-review.md +39 -0
  414. package/docs/reports/unified-9.0.23/module-process-contract-review.tap +20 -0
  415. package/docs/reports/unified-9.0.23/module-process-final.tap +27 -0
  416. package/docs/reports/unified-9.0.23/module-process-static.json +57 -0
  417. package/docs/reports/unified-9.0.23/raw/INDEX.json +43 -0
  418. package/docs/reports/unified-9.0.23/raw/build-backend-final.log +5 -0
  419. package/docs/reports/unified-9.0.23/raw/build-frontend.log +152 -0
  420. package/docs/reports/unified-9.0.23/raw/build-installer.log +26 -0
  421. package/docs/reports/unified-9.0.23/raw/build-ui-final.log +7 -0
  422. package/docs/reports/unified-9.0.23/raw/current/evcs-stop-writer-ocpp043.txt +20 -0
  423. package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-lint.txt +1 -0
  424. package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-tests.txt +28 -0
  425. package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.json +49 -0
  426. package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.stderr.txt +0 -0
  427. package/docs/reports/unified-9.0.23/raw/current/runtime-health-lint.txt +1 -0
  428. package/docs/reports/unified-9.0.23/raw/current/runtime-health-tests.txt +27 -0
  429. package/docs/reports/unified-9.0.23/raw/current/runtime-health-types.txt +1 -0
  430. package/docs/reports/unified-9.0.23/raw/eos-production-audit.json +22 -0
  431. package/docs/reports/unified-9.0.23/raw/idle-pwa-node22.log +75 -0
  432. package/docs/reports/unified-9.0.23/raw/idle-pwa-node24.log +22 -0
  433. package/docs/reports/unified-9.0.23/raw/lint-final.log +5 -0
  434. package/docs/reports/unified-9.0.23/raw/node22-tests-final.log +14612 -0
  435. package/docs/reports/unified-9.0.23/raw/node22-version.log +1 -0
  436. package/docs/reports/unified-9.0.23/raw/node24-tests-final.log +2443 -0
  437. package/docs/reports/unified-9.0.23/raw/node24-version.log +1 -0
  438. package/docs/reports/unified-9.0.23/raw/ocpp-auto-discovery.log +21 -0
  439. package/docs/reports/unified-9.0.23/raw/ocpp-discovery-browser.json +55 -0
  440. package/docs/reports/unified-9.0.23/raw/ocpp-discovery-lifecycle-regression.log +48 -0
  441. package/docs/reports/unified-9.0.23/raw/ocpp-production-audit.json +69 -0
  442. package/docs/reports/unified-9.0.23/raw/typecheck-final.log +5 -0
  443. package/docs/reports/unified-9.0.23/raw/ui-process/discovery-review.tap +21 -0
  444. package/docs/reports/unified-9.0.23/raw/ui-process/lint.log +0 -0
  445. package/docs/reports/unified-9.0.23/raw/ui-process/node22.tap +118 -0
  446. package/docs/reports/unified-9.0.23/raw/ui-process/node24.tap +112 -0
  447. package/docs/reports/unified-9.0.23/raw/ui-process/root-typecheck.log +0 -0
  448. package/docs/reports/unified-9.0.23/raw/ui-process/typecheck.log +0 -0
  449. package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-build-node24.tap +196 -0
  450. package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-node22.tap +200 -0
  451. package/docs/reports/unified-9.0.23/raw/ui-process/web-lint.log +0 -0
  452. package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node22.tap +92 -0
  453. package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node24.tap +90 -0
  454. package/docs/reports/unified-9.0.23/ui-process-contract-review.md +30 -0
  455. package/docs/reports/unified-9.0.23/ui-process-final-review-node22.tap +50 -0
  456. package/docs/reports/unified-9.0.23/ui-process-final-review-node24.tap +14 -0
  457. package/docs/reports/unified-9.0.23/ui-process-followup-hashes.json +13 -0
  458. package/docs/reports/unified-9.0.23/ui-process-operational-review-node22.tap +30 -0
  459. package/docs/reports/unified-9.0.23/ui-process-operational-review-node24.tap +11 -0
  460. package/docs/reports/unified-9.0.23/ui-process-review-node22.tap +48 -0
  461. package/docs/reports/unified-9.0.23/ui-process-review-node24.tap +46 -0
  462. package/docs/reports/unified-9.0.24/BACKUP_INTEROP_PRUEFBERICHT.md +48 -0
  463. package/docs/reports/unified-9.0.24/KIOSK_FRONTEND_BROWSERPRUEFUNG.md +49 -0
  464. package/docs/reports/unified-9.0.24/KIOSK_UNABHAENGIGER_REVIEW.md +21 -0
  465. package/docs/reports/unified-9.0.24/OCPP_HOST_MIGRATION.md +41 -0
  466. package/docs/reports/unified-9.0.24/OCPP_NAMESPACE_REGELPFAD.md +55 -0
  467. package/docs/reports/unified-9.0.24/OCPP_UNABHAENGIGER_REVIEW.md +37 -0
  468. package/docs/reports/unified-9.0.24/OCPP_VERWALTUNG.md +33 -0
  469. package/docs/reports/unified-9.0.24/PRUEFBERICHT.md +54 -0
  470. package/docs/reports/unified-9.0.24/PUBLISH_OVERLAY_9_0_21.md +23 -0
  471. package/docs/reports/unified-9.0.24/raw/INDEX.json +43 -0
  472. package/docs/reports/unified-9.0.24/raw/backup-interop/ems-independence-node24.tap +9 -0
  473. package/docs/reports/unified-9.0.24/raw/backup-interop/final-node22.tap +175 -0
  474. package/docs/reports/unified-9.0.24/raw/backup-interop/final-node24.tap +35 -0
  475. package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node22.tap +132 -0
  476. package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node24.tap +27 -0
  477. package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-review-node24.tap +13 -0
  478. package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-update-snapshot-node24.tap +22 -0
  479. package/docs/reports/unified-9.0.24/raw/backup-interop/lint-source.txt +0 -0
  480. package/docs/reports/unified-9.0.24/raw/backup-interop/lint-tests.txt +0 -0
  481. package/docs/reports/unified-9.0.24/raw/backup-interop/ocpp-backup-node24.tap +10 -0
  482. package/docs/reports/unified-9.0.24/raw/backup-interop/own-source-hashes.json +12 -0
  483. package/docs/reports/unified-9.0.24/raw/backup-interop/types.txt +0 -0
  484. package/docs/reports/unified-9.0.24/raw/backup-interop/update-snapshot-node24.tap +20 -0
  485. package/docs/reports/unified-9.0.24/raw/build.log +200 -0
  486. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.json +69 -0
  487. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.stderr.txt +3 -0
  488. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.json +69 -0
  489. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.stderr.txt +2 -0
  490. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node22.txt +253 -0
  491. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node24.txt +52 -0
  492. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-lint.txt +0 -0
  493. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-types.txt +0 -0
  494. package/docs/reports/unified-9.0.24/raw/current/ocpp-lease-registration-before.txt +28 -0
  495. package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node22.txt +302 -0
  496. package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node24.txt +55 -0
  497. package/docs/reports/unified-9.0.24/raw/current/ocpp-native-generic-before.txt +25 -0
  498. package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.json +49 -0
  499. package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.stderr.txt +0 -0
  500. package/docs/reports/unified-9.0.24/raw/current/runtime-health-types.txt +0 -0
  501. package/docs/reports/unified-9.0.24/raw/eos-production-audit.json +77 -0
  502. package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node22.log +16 -0
  503. package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node24.log +14 -0
  504. package/docs/reports/unified-9.0.24/raw/kiosk-browser-node22.json +57 -0
  505. package/docs/reports/unified-9.0.24/raw/kiosk-browser-node24.json +57 -0
  506. package/docs/reports/unified-9.0.24/raw/kiosk-idle-node22.log +215 -0
  507. package/docs/reports/unified-9.0.24/raw/kiosk-idle-node24.log +42 -0
  508. package/docs/reports/unified-9.0.24/raw/lint.log +45 -0
  509. package/docs/reports/unified-9.0.24/raw/node22-tests-final.log +15517 -0
  510. package/docs/reports/unified-9.0.24/raw/node22-version.log +1 -0
  511. package/docs/reports/unified-9.0.24/raw/node24-tests-final.log +2595 -0
  512. package/docs/reports/unified-9.0.24/raw/node24-version.log +1 -0
  513. package/docs/reports/unified-9.0.24/raw/ocpp-host-node22.tap +105 -0
  514. package/docs/reports/unified-9.0.24/raw/ocpp-host-node24.tap +24 -0
  515. package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node22.tap +818 -0
  516. package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node24.tap +140 -0
  517. package/docs/reports/unified-9.0.24/raw/ocpp-hosted-mapping-browser.log +2 -0
  518. package/docs/reports/unified-9.0.24/raw/ocpp-legacy-mapping-browser.log +2 -0
  519. package/docs/reports/unified-9.0.24/raw/ocpp-namespace-control.log +49 -0
  520. package/docs/reports/unified-9.0.24/raw/publish-overlay-node22.tap +278 -0
  521. package/docs/reports/unified-9.0.24/raw/publish-overlay-node24.tap +52 -0
  522. package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance-922-923.json +32 -0
  523. package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance.json +19 -0
  524. package/docs/reports/unified-9.0.24/raw/typecheck.log +5 -0
  525. package/docs/unified/EMS_BEDIEN_DATENPUNKTE_9_0_22.md +51 -0
  526. package/docs/unified/HISTORY_UI_9_0_22.md +75 -0
  527. package/docs/unified/POSTGRESQL_9_0_22.md +89 -0
  528. package/io-package.json +20 -21
  529. package/modules/backup/README.md +10 -0
  530. package/modules/backup/RECOVERY-9.0.22.md +59 -0
  531. package/modules/backup/admin/index.html +2 -1
  532. package/modules/backup/admin/index.js +21 -2
  533. package/modules/backup/build/config.js +2 -0
  534. package/modules/backup/build/coverage.js +64 -0
  535. package/modules/backup/build/creators.js +22 -17
  536. package/modules/backup/build/databaseTargets.js +42 -0
  537. package/modules/backup/build/index.js +47 -4
  538. package/modules/backup/build/influxIntegrity.js +159 -0
  539. package/modules/backup/build/postgresHistory.js +91 -0
  540. package/modules/backup/build/preflight.js +3 -8
  541. package/modules/backup/build/publicTrust.js +46 -0
  542. package/modules/backup/build/restore-cli.js +72 -1
  543. package/modules/backup/build/storageRetention.js +26 -0
  544. package/modules/backup/build/worker.js +18 -1
  545. package/modules/backup/src/config.ts +2 -0
  546. package/modules/backup/src/coverage.ts +50 -0
  547. package/modules/backup/src/creators.ts +20 -17
  548. package/modules/backup/src/databaseTargets.ts +45 -0
  549. package/modules/backup/src/index.ts +37 -4
  550. package/modules/backup/src/influxIntegrity.ts +125 -0
  551. package/modules/backup/src/postgresHistory.ts +66 -0
  552. package/modules/backup/src/preflight.ts +3 -10
  553. package/modules/backup/src/publicTrust.ts +34 -0
  554. package/modules/backup/src/restore-cli.ts +55 -4
  555. package/modules/backup/src/storageRetention.ts +20 -0
  556. package/modules/backup/src/types.ts +5 -0
  557. package/modules/backup/src/worker.ts +18 -2
  558. package/modules/backup/test/completeness.test.cjs +193 -0
  559. package/modules/backup/test/hosted.test.cjs +43 -3
  560. package/modules/backup/test/influx-real.test.cjs +75 -0
  561. package/modules/backup/test/lifecycle.test.cjs +7 -5
  562. package/modules/backup/test/ocpp-coverage.test.cjs +152 -0
  563. package/modules/devices/admin/host-bridge.js +5 -1
  564. package/modules/devices/admin/index.html +1 -1
  565. package/modules/devices/lib/deviceRuntime.js +27 -4
  566. package/modules/devices/lib/drivers/mqtt.js +204 -82
  567. package/modules/devices/lib/drivers/mqttPendingOperations.js +119 -0
  568. package/modules/devices/test/mqttCommandLifecycle.test.js +255 -0
  569. package/modules/devices/test/mqttResourceBounds.test.js +98 -0
  570. package/modules/devices/test/mqttRuntimeSession.test.js +109 -0
  571. package/modules/devices/tsconfig.mqtt-lifecycle.json +20 -0
  572. package/modules/eebus/admin/index.html +1 -1
  573. package/modules/eebus/admin/index.js +6 -3
  574. package/modules/ocpp/LICENSE +21 -0
  575. package/modules/ocpp/README.md +61 -0
  576. package/modules/ocpp/admin/config-fields.json +353 -0
  577. package/modules/ocpp/admin/index.html +52 -0
  578. package/modules/ocpp/admin/index.js +228 -0
  579. package/modules/ocpp/admin/style.css +27 -0
  580. package/modules/ocpp/build/index.js +401 -0
  581. package/modules/ocpp/build/operationGuard.js +26 -0
  582. package/modules/ocpp/build/server.js +155 -0
  583. package/modules/ocpp/eslint.config.mjs +13 -0
  584. package/modules/ocpp/index.js +3 -0
  585. package/modules/ocpp/native-defaults.json +44 -0
  586. package/modules/ocpp/ocpp/common.js +646 -0
  587. package/modules/ocpp/ocpp/compact.js +332 -0
  588. package/modules/ocpp/ocpp/configuration.js +364 -0
  589. package/modules/ocpp/ocpp/eos-contract.js +149 -0
  590. package/modules/ocpp/ocpp/freshness.d.ts +10 -0
  591. package/modules/ocpp/ocpp/freshness.js +272 -0
  592. package/modules/ocpp/ocpp/schemas/NOTICE.md +17 -0
  593. package/modules/ocpp/ocpp/schemas/ocpp2_0_1_official.json +1 -0
  594. package/modules/ocpp/ocpp/schemas/ocpp2_1_official.json +1 -0
  595. package/modules/ocpp/ocpp/server.js +3 -0
  596. package/modules/ocpp/ocpp/v16.js +213 -0
  597. package/modules/ocpp/ocpp/v201.js +4 -0
  598. package/modules/ocpp/ocpp/v21.js +4 -0
  599. package/modules/ocpp/ocpp/v2base.js +255 -0
  600. package/modules/ocpp/package.json +11 -0
  601. package/modules/ocpp/provenance.json +33 -0
  602. package/modules/ocpp/runtime.d.ts +16 -0
  603. package/modules/ocpp/runtime.js +3391 -0
  604. package/modules/ocpp/src/index.ts +463 -0
  605. package/modules/ocpp/src/operationGuard.ts +29 -0
  606. package/modules/ocpp/src/server.ts +193 -0
  607. package/modules/ocpp/test/configuration-runtime.test.js +786 -0
  608. package/modules/ocpp/test/core.test.js +772 -0
  609. package/modules/ocpp/test/eos-contract.test.js +67 -0
  610. package/modules/ocpp/test/hosted.test.cjs +165 -0
  611. package/modules/ocpp/tsconfig.json +7 -0
  612. package/modules/ocpp/validation/manifest.json +36 -0
  613. package/modules/ocpp/validation/node22-tests.log +525 -0
  614. package/modules/ocpp/validation/node24-tests.log +92 -0
  615. package/package.json +27 -11
  616. package/public/eos-migration/index.html +1 -1
  617. package/public/eos-migration/index.js +2 -2
  618. package/public/eos-runtime/index.html +35 -0
  619. package/public/eos-runtime/index.js +111 -0
  620. package/public/eos-runtime/style.css +18 -0
  621. package/release-manifests/unified/build-environment.cdx.json +767 -131
  622. package/release-manifests/unified/files.json +898 -225
  623. package/release-manifests/unified/frontend.cdx.json +6 -6
  624. package/release-manifests/unified/installer.cdx.json +6 -6
  625. package/release-manifests/unified/obsolete-admin-assets.json +276 -6
  626. package/release-manifests/unified/runtime.cdx.json +871 -143
  627. package/release-manifests/unified/validation.json +15 -15
  628. package/reports/unified/ocpp-pure-pv-9.0.22/PRUEFVERMERK.md +35 -0
  629. package/reports/unified/ocpp-pure-pv-9.0.22/raw/auto-pv-phases.log +1 -0
  630. package/reports/unified/ocpp-pure-pv-9.0.22/raw/control-tests.log +11 -0
  631. package/reports/unified/ocpp-pure-pv-9.0.22/raw/ocpp-stability.log +1 -0
  632. package/reports/unified/ocpp-pure-pv-9.0.22/raw/rc60.log +1 -0
  633. package/reports/unified/tariff-energy-flow-9.0.22/PRUEFVERMERK.md +44 -0
  634. package/reports/unified/tariff-energy-flow-9.0.22/raw/focused-tests.log +37 -0
  635. package/reports/unified/tariff-energy-flow-9.0.22/raw/grid-charge-policy.log +1 -0
  636. package/reports/unified/tariff-energy-flow-9.0.22/raw/status-truth.log +1 -0
  637. package/tools/eos-release-check.cjs +5 -0
  638. package/tools/eos-release-manifest.cjs +4 -4
  639. package/tools/eos-sbom-vendored.cjs +2 -1
  640. package/tools/system/eos-postgresql-setup.cjs +409 -0
  641. package/tsconfig.eos-history-backup-scope.json +9 -0
  642. package/tsconfig.eos-postgres-system.json +15 -0
  643. package/ui/admin/react/assets/index-wHWXfD_g.js +13 -0
  644. package/ui/admin/react/index.html +1 -1
  645. package/ui/docs/security/eslint-reviewed-findings.json +83 -27
  646. package/ui/ems/consumers/evcs.js +11 -7
  647. package/ui/ems/datapoints.js +14 -5
  648. package/ui/ems/engine.js +17 -3
  649. package/ui/ems/modules/charging-management.js +193 -63
  650. package/ui/ems/modules/core-limits.js +15 -20
  651. package/ui/ems/modules/storage-control.js +8 -6
  652. package/ui/ems/modules/tarif-vis.js +7 -2
  653. package/ui/ems/modules/tariff-provider.js +34 -10
  654. package/ui/ems/modules/tariff-status.js +19 -1
  655. package/ui/ems/services/tariff-provider-registry.js +18 -8
  656. package/ui/eslint.postgres-history.config.mjs +9 -0
  657. package/ui/io-package.json +5 -1
  658. package/ui/lib/ems-control-values.js +64 -0
  659. package/ui/lib/flow-measurement.js +72 -0
  660. package/ui/lib/hosted-adapter.js +12 -1
  661. package/ui/lib/influx-history-runtime.js +66 -24
  662. package/ui/lib/installer-lifecycle.js +4 -2
  663. package/ui/lib/ocpp-auto-discovery.js +397 -0
  664. package/ui/lib/ocpp-limit-feedback.js +166 -0
  665. package/ui/lib/partner-runtime.js +35 -2
  666. package/ui/lib/partner-websocket.js +4 -1
  667. package/ui/lib/postgres-history-config.js +57 -0
  668. package/ui/lib/postgres-history.js +344 -0
  669. package/ui/lib/runtime-proxy-html.js +34 -1
  670. package/ui/lib/smarthome-device-controls.js +4 -1
  671. package/ui/lib/ui-access-policy.js +39 -6
  672. package/ui/main.js +456 -255
  673. package/ui/package.json +1 -1
  674. package/ui/tsconfig.postgres-history.json +4 -0
  675. package/ui/www/app.js +108 -153
  676. package/ui/www/auth.js +36 -10
  677. package/ui/www/charging-diagnostics-appcenter.js +1 -0
  678. package/ui/www/customer-tariff.js +1 -0
  679. package/ui/www/dashboard-lp-status.js +1 -0
  680. package/ui/www/dc-station-display.js +1 -0
  681. package/ui/www/ems-apps.js +48 -8
  682. package/ui/www/energy-origin-appcenter.js +1 -0
  683. package/ui/www/energy-origin-ledger-view.js +1 -0
  684. package/ui/www/eos-kiosk-settings.js +174 -0
  685. package/ui/www/eos-session-idle.js +40 -6
  686. package/ui/www/eos-updates.css +15 -0
  687. package/ui/www/eos-updates.js +352 -0
  688. package/ui/www/index.html +4 -1
  689. package/ui/www/license.js +1 -0
  690. package/ui/www/licenses/smarthome-markdown-components.json +157 -157
  691. package/ui/www/live-display.js +4 -2
  692. package/ui/www/login.js +19 -7
  693. package/ui/www/manifest.webmanifest +2 -2
  694. package/ui/www/netoperator-appcenter.js +1 -0
  695. package/ui/www/netoperator.js +1 -0
  696. package/ui/www/operating-strategies-appcenter.js +1 -0
  697. package/ui/www/operating-strategies-rule-builder.js +1 -0
  698. package/ui/www/power-measurements.js +27 -2
  699. package/ui/www/pwa.js +1 -0
  700. package/ui/www/runtime-base.js +1 -0
  701. package/ui/www/settings.html +47 -1
  702. package/ui/www/smarthome-activation.js +1 -0
  703. package/ui/www/smarthome-alias-config.js +1 -0
  704. package/ui/www/smarthome-custom-config.js +1 -0
  705. package/ui/www/smarthome-custom-views.js +1 -0
  706. package/ui/www/smarthome-device-categories.js +1 -0
  707. package/ui/www/smarthome-device-config.js +1 -0
  708. package/ui/www/smarthome-device-controls.js +1 -0
  709. package/ui/www/smarthome-feedback.js +1 -0
  710. package/ui/www/smarthome-layout-editor.js +1 -0
  711. package/ui/www/smarthome-presentation.js +1 -0
  712. package/ui/www/smarthome-setup.js +1 -0
  713. package/ui/www/smarthome-touch.js +1 -0
  714. package/ui/www/storagefarm-dispatch.js +1 -0
  715. package/ui/www/storagefarm-summary.js +1 -0
  716. package/ui/www/tariff-display.js +62 -2
  717. package/adminWww/remoteEntry-eos-9.0.20.js +0 -12
  718. package/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
@@ -0,0 +1,317 @@
1
+ /* Copyright (c) 2026 NexoWatt. Confidential and proprietary. */
2
+ 'use strict';
3
+ const { fork } = require('node:child_process');
4
+ const { join } = require('node:path');
5
+ const { Readable } = require('node:stream');
6
+ const { performance } = require('node:perf_hooks');
7
+ const { randomUUID } = require('node:crypto');
8
+ const { channel, ADAPTER_METHODS, error, errorCode, isRecord, sanitizeLog, validate } = require('./eosModuleProcessProtocol');
9
+ /** @typedef {import('./eosModuleProcessTypes').RecordValue} RecordValue */
10
+ /** One runtime per OS process. No adapter-core or owner object crosses this boundary. */
11
+ class EosModuleProcess {
12
+ /** @param {import('./eosModuleProcess').ModuleProcessOptions} options */
13
+ constructor(options) {
14
+ this.options = options;
15
+ /** @type {import('node:child_process').ChildProcess|null} */
16
+ this.child = null;
17
+ /** @type {import('./eosModuleProcessTypes').Channel|null} */
18
+ this.rpc = null;
19
+ /** @type {NodeJS.Timeout|undefined} */
20
+ this.timer = undefined;
21
+ this.stopping = false;
22
+ this.failure = '';
23
+ /** @type {Promise<void>|null} */
24
+ this.stopPromise = null;
25
+ /** @type {Set<Readable>} */
26
+ this.streams = new Set();
27
+ this.state = 'stopped';
28
+ this.lastHeartbeatAt = 0;
29
+ this.lastHeartbeat = 0;
30
+ /** @type {Promise<{code:number|null,signal:NodeJS.Signals|null}>|null} */
31
+ this.exitPromise = null;
32
+ this.leaseSequence = 0;
33
+ this.logWindow = 0;
34
+ this.logCount = 0;
35
+ }
36
+ health() {
37
+ return { mode: 'process', state: this.state, pid: this.child?.pid || null,
38
+ generation: this.options.generation, lastError: this.failure, lastHeartbeatAt: this.lastHeartbeatAt };
39
+ }
40
+ /** @param {string} code */
41
+ fail(code) {
42
+ if (this.stopping || this.failure)
43
+ return;
44
+ this.failure = errorCode({ code });
45
+ this.state = 'error';
46
+ try {
47
+ this.options.onFailure?.(this.failure);
48
+ }
49
+ catch { /* process still must stop */ }
50
+ // Kill first; the host may restart only after stop() confirms actual exit.
51
+ void this.stop().catch(() => this.options.onFailure?.('EOS_MODULE_PROCESS_STOP_UNCONFIRMED'));
52
+ }
53
+ /** @param {boolean} allowed */
54
+ authority(allowed) {
55
+ this.rpc?.event('lease', { allowed, sequence: ++this.leaseSequence, expiresAt: Date.now() + 1000 });
56
+ }
57
+ revoke() { try {
58
+ this.authority(false);
59
+ }
60
+ catch { /* watchdog/stop retain authority */ } }
61
+ async start() {
62
+ if (this.child || this.stopping)
63
+ throw error('EOS_MODULE_PROCESS_ALREADY_STARTED');
64
+ if (!this.options.canOperate())
65
+ throw error('EOS_MODULE_PROCESS_INACTIVE');
66
+ this.state = 'starting';
67
+ const child = fork(this.options.workerPath || join(__dirname, 'eosModuleProcessWorker.js'), [], {
68
+ stdio: ['ignore', 'ignore', 'ignore', 'ipc'], serialization: 'json',
69
+ // Do not inherit inspector/test switches or parent environment secrets.
70
+ execArgv: [], env: Object.fromEntries(['PATH', 'HOME', 'TMPDIR', 'TEMP', 'TZ', 'LANG', 'NODE_EXTRA_CA_CERTS']
71
+ .filter(key => typeof process.env[key] === 'string').map(key => [key, process.env[key]])),
72
+ detached: process.platform !== 'win32',
73
+ });
74
+ this.child = child;
75
+ const parentExit = () => { try {
76
+ this.kill('SIGKILL');
77
+ }
78
+ catch { /* OS is already exiting */ } };
79
+ process.once('exit', parentExit);
80
+ this.lastHeartbeat = performance.now();
81
+ this.lastHeartbeatAt = 0;
82
+ this.exitPromise = new Promise(resolve => {
83
+ let settled = false;
84
+ /** @param {number|null} code @param {NodeJS.Signals|null} signal */
85
+ const ended = (code, signal) => {
86
+ if (settled)
87
+ return;
88
+ settled = true;
89
+ process.off('exit', parentExit);
90
+ this.child = null;
91
+ clearInterval(this.timer);
92
+ this.timer = undefined;
93
+ this.rpc?.close();
94
+ for (const stream of this.streams)
95
+ stream.destroy(error('EOS_MODULE_PROCESS_DISCONNECTED'));
96
+ this.streams.clear();
97
+ if (!this.stopping)
98
+ this.fail(signal ? 'EOS_MODULE_PROCESS_SIGNAL' : 'EOS_MODULE_PROCESS_EXIT');
99
+ if (!this.failure)
100
+ this.state = 'stopped';
101
+ resolve({ code, signal });
102
+ };
103
+ child.once('exit', ended);
104
+ // A failed spawn has no PID and may emit close without exit.
105
+ child.once('close', (code, signal) => { if (!child.pid)
106
+ ended(code, signal); });
107
+ });
108
+ child.on('error', () => this.fail('EOS_MODULE_PROCESS_SPAWN_FAILED'));
109
+ child.on('disconnect', () => { if (!this.stopping)
110
+ this.fail('EOS_MODULE_PROCESS_DISCONNECTED'); });
111
+ this.rpc = channel(child, this.options.generation, async (method, args) => {
112
+ if (!ADAPTER_METHODS.includes(method) && method !== 'getHistoryBackupRequirement')
113
+ throw error('EOS_MODULE_PROCESS_METHOD');
114
+ // A child lease is only a fast local fence. The authoritative owner
115
+ // checks every RPC again, including requests queued before revocation.
116
+ if (!this.options.canOperate() && method !== 'unsubscribeStatesAsync')
117
+ throw error('EOS_MODULE_PROCESS_INACTIVE');
118
+ if (method === 'getHistoryBackupRequirement') {
119
+ if (this.options.id !== 'backup')
120
+ throw error('EOS_MODULE_PROCESS_METHOD');
121
+ return this.options.moduleOptions.getHistoryBackupRequirement?.();
122
+ }
123
+ const facade = this.options.moduleOptions.adapter;
124
+ const callable = /** @type {RecordValue} */ ( /** @type {unknown} */(facade))[method];
125
+ if (typeof callable !== 'function')
126
+ throw error('EOS_MODULE_PROCESS_METHOD');
127
+ const invoke = /** @type {import('./eosModuleProcessTypes').Call} */ (callable);
128
+ if (method === 'sendTo')
129
+ return new Promise(resolve => invoke(...args, resolve));
130
+ return invoke(...args);
131
+ }, message => {
132
+ if (message.type === 'heartbeat') {
133
+ this.lastHeartbeat = performance.now();
134
+ this.lastHeartbeatAt = Date.now();
135
+ }
136
+ else if (message.type === 'failure')
137
+ this.fail(errorCode({ code: message.code }));
138
+ else if (message.type === 'invalid')
139
+ this.fail('EOS_MODULE_PROCESS_INVALID_MESSAGE');
140
+ else if (message.type === 'log' && typeof message.level === 'string' && ['warn', 'error', 'info', 'debug'].includes(message.level)) {
141
+ if (Date.now() - this.logWindow > 1000) {
142
+ this.logWindow = Date.now();
143
+ this.logCount = 0;
144
+ }
145
+ const level = /** @type {'warn'|'error'|'info'|'debug'} */ (message.level);
146
+ if (++this.logCount <= 20)
147
+ this.options.moduleOptions.adapter.log[level]?.(`[EOS ${this.options.id}] ${sanitizeLog(message.text, this.options.moduleOptions.config)}`);
148
+ }
149
+ });
150
+ const heartbeatMs = this.options.heartbeatMs || 250;
151
+ this.timer = setInterval(() => {
152
+ if (performance.now() - this.lastHeartbeat > (this.options.watchdogMs || 4000)) {
153
+ this.fail('EOS_MODULE_PROCESS_HEARTBEAT_TIMEOUT');
154
+ return;
155
+ }
156
+ try {
157
+ this.authority(!this.stopping && this.options.canOperate());
158
+ }
159
+ catch {
160
+ this.fail('EOS_MODULE_PROCESS_DISCONNECTED');
161
+ }
162
+ }, heartbeatMs);
163
+ this.timer.unref?.();
164
+ const moduleOptions = this.options.moduleOptions;
165
+ const adapter = moduleOptions.adapter;
166
+ const init = { id: this.options.id, baseDir: this.options.baseDir,
167
+ moduleOptions: { config: moduleOptions.config, dataDir: moduleOptions.dataDir,
168
+ installationDir: moduleOptions.installationDir, eosDataDir: moduleOptions.eosDataDir,
169
+ preservedUiNamespace: moduleOptions.preservedUiNamespace,
170
+ adapter: { namespace: adapter.namespace, hostNamespace: adapter.hostNamespace,
171
+ eosTargetNamespace: adapter.eosTargetNamespace, instance: adapter.instance, config: adapter.config } },
172
+ allowed: this.options.canOperate(), sequence: ++this.leaseSequence, expiresAt: Date.now() + 1000 };
173
+ validate(init);
174
+ this.rpc.event('init', init);
175
+ try {
176
+ await this.rpc.request('start', [], this.options.startTimeoutMs || 125000);
177
+ if (!this.options.canOperate() || this.stopping)
178
+ throw error('EOS_MODULE_PROCESS_INACTIVE');
179
+ this.state = 'running';
180
+ }
181
+ catch (issue) {
182
+ this.fail(errorCode(issue));
183
+ throw issue;
184
+ }
185
+ }
186
+ /** @param {string} method @param {unknown[]} args @returns {Promise<unknown>} */
187
+ async request(method, args) {
188
+ if (!this.rpc || this.stopping || !this.options.canOperate())
189
+ throw error('EOS_MODULE_PROCESS_INACTIVE');
190
+ return this.rpc.request(method, args);
191
+ }
192
+ getStatus() { return this.request('getStatus', []); }
193
+ /** @param {string} name @param {unknown} payload */
194
+ command(name, payload) { return this.request('command', [name, payload]); }
195
+ /** @param {string} id @param {unknown} state */
196
+ onStateChange(id, state) {
197
+ // Match the public module event contracts before IPC: ordinary telemetry
198
+ // is not a control event. EEBUS acknowledged trust revocation is one.
199
+ if (this.options.id === 'devices' && (!isRecord(state) || state.ack !== false))
200
+ return Promise.resolve();
201
+ if (this.options.id === 'ocpp' && (!isRecord(state) || state.ack !== false))
202
+ return Promise.resolve();
203
+ if (this.options.id === 'eebus' && isRecord(state) && state.ack && !/\.pairing\.(trusted|pinnedFingerprint)$/.test(id))
204
+ return Promise.resolve();
205
+ if (this.options.id === 'backup' && (!isRecord(state) || state.ack !== false || state.val !== true ||
206
+ !['oneClick.iobroker', 'oneClick.ccu'].some(local => id === `${this.options.moduleOptions.adapter.namespace}.${local}`)))
207
+ return Promise.resolve();
208
+ return this.request('onStateChange', [id, state]);
209
+ }
210
+ /** @param {unknown} message */
211
+ onMessage(message) { return this.request('onMessage', [message]); }
212
+ /** @param {string} name @returns {Promise<import('./eosModuleProcessTypes').Download>} */
213
+ async getDownload(name) {
214
+ // Parent selects the token so a timed-out open can be cancelled before
215
+ // its asynchronous file open completes in the worker.
216
+ const handle = randomUUID();
217
+ let result;
218
+ const close = () => this.rpc?.request('download.close', [handle]).catch(() => { });
219
+ try {
220
+ result = await this.request('download.open', [name, handle]);
221
+ }
222
+ catch (issue) {
223
+ void close();
224
+ throw issue;
225
+ }
226
+ if (!isRecord(result) || result.handle !== handle || typeof result.filename !== 'string' ||
227
+ (result.contentType !== undefined && typeof result.contentType !== 'string') ||
228
+ (result.size !== undefined && (typeof result.size !== 'number' || !Number.isSafeInteger(result.size) || result.size < 0))) {
229
+ void close();
230
+ throw error('EOS_MODULE_PROCESS_DOWNLOAD');
231
+ }
232
+ const self = this;
233
+ let reading = false;
234
+ const stream = new Readable({ objectMode: false, highWaterMark: 65536,
235
+ read() {
236
+ if (reading)
237
+ return;
238
+ reading = true;
239
+ void self.request('download.read', [handle]).then(chunk => {
240
+ reading = false;
241
+ if (this.destroyed)
242
+ return;
243
+ if (!isRecord(chunk))
244
+ this.destroy(error('EOS_MODULE_PROCESS_DOWNLOAD'));
245
+ else if (chunk.done)
246
+ this.push(null);
247
+ else if (typeof chunk.data !== 'string' || chunk.data.length > 90000)
248
+ this.destroy(error('EOS_MODULE_PROCESS_DOWNLOAD'));
249
+ else
250
+ this.push(Buffer.from(chunk.data, 'base64'));
251
+ }, issue => { reading = false; this.destroy(issue); });
252
+ },
253
+ destroy(issue, callback) { void Promise.resolve(close()).finally(() => callback(issue)); },
254
+ });
255
+ this.streams.add(stream);
256
+ // The consumer may not have installed its pipeline yet when the child
257
+ // exits. Preserve stream.errored while preventing an unhandled event.
258
+ stream.on('error', () => { });
259
+ stream.once('close', () => this.streams.delete(stream));
260
+ return { stream, filename: result.filename, contentType: result.contentType, size: result.size };
261
+ }
262
+ /** @param {NodeJS.Signals} signal */
263
+ kill(signal) {
264
+ if (!this.child?.pid)
265
+ return;
266
+ try {
267
+ if (process.platform !== 'win32')
268
+ process.kill(-this.child.pid, signal);
269
+ else
270
+ this.child.kill(signal);
271
+ }
272
+ catch (issue) {
273
+ if (!isRecord(issue) || issue.code !== 'ESRCH')
274
+ throw issue;
275
+ }
276
+ }
277
+ async stop() {
278
+ if (this.stopPromise)
279
+ return this.stopPromise;
280
+ this.stopping = true;
281
+ this.state = this.failure ? 'error' : 'stopping';
282
+ this.stopPromise = (async () => {
283
+ clearInterval(this.timer);
284
+ this.timer = undefined;
285
+ for (const stream of this.streams)
286
+ stream.destroy();
287
+ this.streams.clear();
288
+ if (!this.child) {
289
+ this.rpc?.close();
290
+ this.state = this.failure ? 'error' : 'stopped';
291
+ return;
292
+ }
293
+ this.revoke();
294
+ void this.rpc?.request('stop', [], 800).catch(() => { });
295
+ /** @type {NodeJS.Timeout|undefined} */ let term;
296
+ /** @type {NodeJS.Timeout|undefined} */ let hard;
297
+ /** @type {NodeJS.Timeout|undefined} */ let deadline;
298
+ try {
299
+ await Promise.race([this.exitPromise, new Promise((_, reject) => {
300
+ term = setTimeout(() => this.kill('SIGTERM'), 900);
301
+ hard = setTimeout(() => this.kill('SIGKILL'), 1600);
302
+ deadline = setTimeout(() => reject(error('EOS_MODULE_PROCESS_STOP_UNCONFIRMED')), 2300);
303
+ })]);
304
+ }
305
+ finally {
306
+ clearTimeout(term);
307
+ clearTimeout(hard);
308
+ clearTimeout(deadline);
309
+ this.rpc?.close();
310
+ }
311
+ this.state = this.failure ? 'error' : 'stopped';
312
+ })();
313
+ return this.stopPromise;
314
+ }
315
+ }
316
+ module.exports = { EosModuleProcess };
317
+ //# sourceMappingURL=eosModuleProcess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eosModuleProcess.js","sourceRoot":"./src/","sources":["lib/eosModuleProcess.js"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,YAAY,CAAC;AAEb,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC/C,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5C,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACnD,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC9C,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAC9H,2EAA2E;AAE3E,yFAAyF;AACzF,MAAM,gBAAgB;IAClB,yEAAyE;IACzE,YAAY,OAAO;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,6DAA6D;QAC7D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,6DAA6D;QAC7D,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,uCAAuC;QACvC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,iCAAiC;QACjC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,4BAA4B;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC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+ /** @typedef {import('./eosModuleProcessTypes').RecordValue} RecordValue */
4
+ /** @typedef {import('./eosModuleProcessTypes').Channel} Channel */
5
+ const MAX_BYTES = 2 * 1024 * 1024;
6
+ const MAX_PENDING = 128;
7
+ const ADAPTER_METHODS = Object.freeze(['getObjectAsync', 'getStateAsync', 'setObjectNotExistsAsync',
8
+ 'extendObjectAsync', 'setStateAsync', 'subscribeStatesAsync', 'unsubscribeStatesAsync',
9
+ 'getStatesAsync', 'getObjectViewAsync', 'setStateChangedAsync', 'delObjectAsync',
10
+ 'setForeignObjectNotExistsAsync', 'extendForeignObjectAsync', 'delForeignObjectAsync',
11
+ 'getBackupDataFolders', 'sendBackupNotification', 'sendTo']);
12
+ const MODULE_METHODS = Object.freeze(['start', 'stop', 'getStatus', 'command', 'onStateChange', 'onMessage',
13
+ 'download.open', 'download.read', 'download.close']);
14
+ /** @param {string} code */
15
+ const error = code => Object.assign(new Error(code), { code });
16
+ /** @param {unknown} value @returns {value is RecordValue} */
17
+ const isRecord = value => !!value && typeof value === 'object' && !Array.isArray(value);
18
+ /** @param {unknown} value @returns {string} */
19
+ const errorCode = value => {
20
+ const code = isRecord(value) ? value.code || value.message : '';
21
+ return typeof code === 'string' && /^(?:EOS|EEBUS)_[A-Z0-9_]{1,100}$/.test(code) ? code : 'EOS_MODULE_PROCESS_OPERATION_FAILED';
22
+ };
23
+ /** @param {unknown} value @param {unknown} config */
24
+ function sanitizeLog(value, config) {
25
+ const source = String(value);
26
+ // Never cut a secret in half before matching it. Oversized diagnostics are
27
+ // suppressed as a whole rather than leaking their unmatched prefix.
28
+ if (source.length > 4096)
29
+ return 'EOS_MODULE_PROCESS_LOG_REDACTED';
30
+ let text = [...source].map(character => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127 ? ' ' : character).join('');
31
+ /** @param {unknown} node @param {number} depth */
32
+ const visit = (node, depth) => {
33
+ if (!node || typeof node !== 'object' || depth > 16)
34
+ return;
35
+ for (const [key, item] of Object.entries(node)) {
36
+ if (/password|passwd|secret|token|privatekey|pairingpin|apikey|credential|authorization|accessjson|^pass$/i.test(key) &&
37
+ typeof item === 'string' && item.length >= 1)
38
+ text = text.split(item).join('[redacted]');
39
+ else if (item && typeof item === 'object')
40
+ visit(item, depth + 1);
41
+ }
42
+ };
43
+ visit(config, 0);
44
+ return text.replace(/([a-z][a-z0-9+.-]*:\/\/)[^\s/@]+:[^\s/@]+@/gi, '$1[redacted]@')
45
+ .replace(/(Bearer\s+)[A-Za-z0-9._~+/-]+/gi, '$1[redacted]')
46
+ .replace(/(["']?(?:password|passwd|secret|token|apikey|authorization)["']?\s*[=:]\s*)(?:"[^"]*"|'[^']*'|[^\s,;&]+)/gi, '$1[redacted]').slice(0, 1024);
47
+ }
48
+ /** @param {unknown} value @returns {unknown} */
49
+ function validate(value) {
50
+ const text = JSON.stringify(value);
51
+ if (!text || Buffer.byteLength(text) > MAX_BYTES)
52
+ throw error('EOS_MODULE_PROCESS_MESSAGE_SIZE');
53
+ /** @param {unknown} node @param {number} depth */
54
+ const visit = (node, depth) => {
55
+ if (depth > 24)
56
+ throw error('EOS_MODULE_PROCESS_MESSAGE_DEPTH');
57
+ if (node && typeof node === 'object') {
58
+ for (const [key, child] of Object.entries(node)) {
59
+ if (['__proto__', 'constructor', 'prototype'].includes(key))
60
+ throw error('EOS_MODULE_PROCESS_MESSAGE_KEY');
61
+ visit(child, depth + 1);
62
+ }
63
+ }
64
+ };
65
+ visit(value, 0);
66
+ return value;
67
+ }
68
+ /** Finite requests, bounded serialized messages and bounded outbound queue.
69
+ * @param {import('./eosModuleProcessTypes').Transport} transport
70
+ * @param {number} generation
71
+ * @param {(method:string,args:unknown[])=>unknown} onRequest
72
+ * @param {(message:RecordValue)=>void} onEvent
73
+ * @param {number} [timeoutMs]
74
+ * @returns {Channel}
75
+ */
76
+ function channel(transport, generation, onRequest, onEvent, timeoutMs = 5000) {
77
+ /** @type {Map<number, import('./eosModuleProcessTypes').PendingRequest>} */
78
+ const pending = new Map();
79
+ let nextId = 0;
80
+ let sending = 0;
81
+ let active = 0;
82
+ let lastRequest = 0;
83
+ let windowStart = Date.now();
84
+ let messages = 0;
85
+ let closed = false;
86
+ /** @param {RecordValue} message */
87
+ function send(message) {
88
+ if (closed || !transport.connected || !transport.send)
89
+ throw error('EOS_MODULE_PROCESS_DISCONNECTED');
90
+ validate(message);
91
+ if (sending >= MAX_PENDING)
92
+ throw error('EOS_MODULE_PROCESS_BACKPRESSURE');
93
+ sending++;
94
+ try {
95
+ transport.send(message, issue => { sending--; if (issue)
96
+ close(); });
97
+ }
98
+ catch (issue) {
99
+ sending--;
100
+ throw issue;
101
+ }
102
+ }
103
+ /** @param {RecordValue} message @param {unknown} result @param {unknown} issue */
104
+ function reply(message, result, issue) {
105
+ try {
106
+ send({ type: 'reply', generation, id: message.id, ...(issue ? { error: errorCode(issue) } : { result }) });
107
+ }
108
+ catch {
109
+ close();
110
+ }
111
+ }
112
+ /** @param {RecordValue} message */
113
+ function notify(message) {
114
+ try {
115
+ onEvent(message);
116
+ }
117
+ catch {
118
+ close();
119
+ }
120
+ }
121
+ /** @param {unknown} message */
122
+ const receive = async (message) => {
123
+ if (Date.now() - windowStart > 1000) {
124
+ windowStart = Date.now();
125
+ messages = 0;
126
+ }
127
+ if (++messages > 8192) {
128
+ close();
129
+ notify({ type: 'invalid' });
130
+ return;
131
+ }
132
+ try {
133
+ validate(message);
134
+ }
135
+ catch {
136
+ close();
137
+ notify({ type: 'invalid' });
138
+ return;
139
+ }
140
+ if (closed || !isRecord(message) || message.generation !== generation)
141
+ return;
142
+ if (message.type === 'reply') {
143
+ if (typeof message.id !== 'number')
144
+ return;
145
+ const request = pending.get(message.id);
146
+ if (!request)
147
+ return;
148
+ pending.delete(message.id);
149
+ clearTimeout(request.timer);
150
+ if (message.error)
151
+ request.reject(error(errorCode({ code: message.error })));
152
+ else
153
+ request.resolve(message.result);
154
+ }
155
+ else if (message.type === 'request') {
156
+ if (typeof message.id !== 'number' || !Number.isSafeInteger(message.id) || message.id <= lastRequest || !Array.isArray(message.args) ||
157
+ typeof message.method !== 'string' || active >= MAX_PENDING) {
158
+ reply(message, null, error('EOS_MODULE_PROCESS_REQUEST_LIMIT'));
159
+ return;
160
+ }
161
+ lastRequest = message.id;
162
+ if (typeof message.expiresAt !== 'number' || !Number.isFinite(message.expiresAt) || message.expiresAt < Date.now()) {
163
+ reply(message, null, error('EOS_MODULE_PROCESS_REQUEST_EXPIRED'));
164
+ return;
165
+ }
166
+ active++;
167
+ try {
168
+ reply(message, await onRequest(message.method, message.args), null);
169
+ }
170
+ catch (issue) {
171
+ reply(message, null, issue);
172
+ }
173
+ finally {
174
+ active--;
175
+ }
176
+ }
177
+ else
178
+ notify(message);
179
+ };
180
+ transport.on('message', receive);
181
+ function close() {
182
+ if (closed)
183
+ return;
184
+ closed = true;
185
+ transport.off('message', receive);
186
+ for (const request of pending.values()) {
187
+ clearTimeout(request.timer);
188
+ request.reject(error('EOS_MODULE_PROCESS_DISCONNECTED'));
189
+ }
190
+ pending.clear();
191
+ }
192
+ return { close, event: (type, data = {}) => send({ ...data, type, generation }),
193
+ request(method, args = [], deadline = timeoutMs) {
194
+ if (pending.size >= MAX_PENDING)
195
+ return Promise.reject(error('EOS_MODULE_PROCESS_REQUEST_LIMIT'));
196
+ return new Promise((resolve, reject) => {
197
+ const id = ++nextId;
198
+ const timer = setTimeout(() => { pending.delete(id); reject(error('EOS_MODULE_PROCESS_TIMEOUT')); }, deadline);
199
+ pending.set(id, { resolve, reject, timer });
200
+ try {
201
+ send({ type: 'request', generation, id, method, args, expiresAt: Date.now() + deadline });
202
+ }
203
+ catch (issue) {
204
+ pending.delete(id);
205
+ clearTimeout(timer);
206
+ reject(issue);
207
+ }
208
+ });
209
+ },
210
+ };
211
+ }
212
+ module.exports = { MAX_BYTES, MAX_PENDING, ADAPTER_METHODS, MODULE_METHODS, error, errorCode, isRecord, sanitizeLog, validate, channel };
213
+ //# sourceMappingURL=eosModuleProcessProtocol.js.map
@@ -0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