iobroker.eos-admin 9.0.20 → 9.0.21
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 +3 -3
- package/README.md +5 -3
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-CRD3XVom.js → AdapterUpdateDialog-Dxl_b7Op.js} +1 -1
- package/adminWww/assets/{Adapters-Cuf0X0CU.js → Adapters-CVKKhXmI.js} +1 -1
- package/adminWww/assets/{ConfigManager-B8ycQt1C.js → ConfigManager-Bf6nTAkL.js} +1 -1
- package/adminWww/assets/{Enums-CctVCgZX.js → Enums-CJHVJY7t.js} +1 -1
- package/adminWww/assets/{Fields-onm4DfoO.js → Fields-DWHbZKvm.js} +1 -1
- package/adminWww/assets/{Files-OLP3Rwc7.js → Files-a6owMTXA.js} +1 -1
- package/adminWww/assets/{Hosts-C31oqMcW.js → Hosts-LtEMeXpV.js} +1 -1
- package/adminWww/assets/{Instances-DFdvJ9pa.js → Instances-DhChziA1.js} +1 -1
- package/adminWww/assets/{Intro-DvsFJxU0.js → Intro-Cyq9gVDC.js} +1 -1
- package/adminWww/assets/{Logs-Zqg2Bqv6.js → Logs-wcramXsg.js} +1 -1
- package/adminWww/assets/{Objects-CpWZp6yp.js → Objects-DINVHd_e.js} +1 -1
- package/adminWww/assets/{Overview-BsKUo298.js → Overview-DK4R41zR.js} +1 -1
- package/adminWww/assets/{State-D_xwlhhb.js → State-DcEACXzL.js} +1 -1
- package/adminWww/assets/{UsedResources-C79N6yZx.js → UsedResources-C1LcM0Rb.js} +1 -1
- package/adminWww/assets/{Users-WgC0O8P0.js → Users-DvDdSyDY.js} +1 -1
- package/adminWww/assets/{bootstrap-BcfBoIoa.js → bootstrap-Dbj_GbnP.js} +3 -3
- package/adminWww/assets/{hostInit-B7bBV7cH.js → hostInit-BNFIx0-f.js} +1 -1
- package/adminWww/assets/{icons-material-D1JYmRTj.js → icons-material-DVbdXNgr.js} +1 -1
- package/adminWww/assets/{index-DbiuoDjo.js → index-CoKP1NSA.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BAY-Pzp-.js → installSVGRenderer-CMvku1F1.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-33384c20.js → mf-entry-bootstrap-0-ac330bce.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 +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosCustomerUpdateHttp.js +203 -0
- package/build/lib/eosCustomerUpdateHttp.js.map +1 -0
- package/build/lib/eosCustomerUpdateTransport.js +472 -0
- package/build/lib/eosCustomerUpdateTransport.js.map +1 -0
- package/build/lib/eosCustomerUpdateWorker.js +567 -0
- package/build/lib/eosCustomerUpdateWorker.js.map +1 -0
- package/build/lib/eosCustomerUpdates.js +631 -0
- package/build/lib/eosCustomerUpdates.js.map +1 -0
- package/build/lib/eosModuleConfigStore.js +12 -1
- package/build/lib/eosModuleConfigStore.js.map +1 -1
- package/build/lib/eosModuleHost.js +41 -26
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +8 -2
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosUpdateSnapshot.js +290 -0
- package/build/lib/eosUpdateSnapshot.js.map +1 -0
- package/build/lib/eosUploadGuard.js +124 -81
- package/build/lib/eosUploadGuard.js.map +1 -1
- package/build/lib/web.js +80 -0
- package/build/lib/web.js.map +1 -1
- package/io-package.json +8 -8
- package/modules/backup/admin/index.js +4 -1
- package/modules/devices/admin/host-bridge.js +5 -1
- package/modules/devices/lib/deviceRuntime.js +27 -4
- package/modules/devices/lib/drivers/mqtt.js +204 -82
- package/modules/devices/lib/drivers/mqttPendingOperations.js +119 -0
- package/modules/devices/test/mqttCommandLifecycle.test.js +255 -0
- package/modules/devices/test/mqttResourceBounds.test.js +98 -0
- package/modules/devices/test/mqttRuntimeSession.test.js +109 -0
- package/modules/devices/tsconfig.mqtt-lifecycle.json +20 -0
- package/modules/eebus/admin/index.js +6 -3
- package/package.json +4 -4
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +363 -95
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +66 -0
- package/release-manifests/unified/runtime.cdx.json +25 -25
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +3 -3
- package/ui/docs/security/eslint-reviewed-findings.json +83 -27
- package/ui/ems/engine.js +14 -3
- package/ui/ems/modules/tariff-provider.js +34 -10
- package/ui/ems/services/tariff-provider-registry.js +18 -8
- package/ui/io-package.json +1 -1
- package/ui/main.js +65 -34
- package/ui/package.json +1 -1
- package/ui/www/app.js +3 -2
- package/ui/www/eos-updates.css +15 -0
- package/ui/www/eos-updates.js +351 -0
- package/ui/www/index.html +2 -0
- package/ui/www/manifest.webmanifest +3 -3
- package/ui/www/settings.html +34 -0
- package/adminWww/remoteEntry-eos-9.0.20.js +0 -12
package/build/lib/web.js
CHANGED
|
@@ -59,6 +59,9 @@ const eosCookieNamespace_1 = require("./eosCookieNamespace");
|
|
|
59
59
|
const eosRolePolicy_1 = require("./eosRolePolicy");
|
|
60
60
|
const eosRequestSecurity_1 = require("./eosRequestSecurity");
|
|
61
61
|
const eosAutoUpdate_1 = require("./eosAutoUpdate");
|
|
62
|
+
const eosCustomerUpdates_1 = require("./eosCustomerUpdates");
|
|
63
|
+
const eosCustomerUpdateHttp_1 = require("./eosCustomerUpdateHttp");
|
|
64
|
+
const eosUpdateSnapshot_1 = require("./eosUpdateSnapshot");
|
|
62
65
|
const eosLicenseHttp_1 = require("./eosLicenseHttp");
|
|
63
66
|
const eosHttpsClient_1 = require("./eosHttpsClient");
|
|
64
67
|
const eosWebResources_1 = require("./eosWebResources");
|
|
@@ -318,6 +321,7 @@ async function createEosServer(app, adapter, settings, managedTls) {
|
|
|
318
321
|
/** Webserver class */
|
|
319
322
|
class Web {
|
|
320
323
|
nexowattStableUpdateManager;
|
|
324
|
+
eosCustomerUpdates;
|
|
321
325
|
server = {
|
|
322
326
|
app: null,
|
|
323
327
|
server: null,
|
|
@@ -454,6 +458,7 @@ class Web {
|
|
|
454
458
|
this.checkTimeout = undefined;
|
|
455
459
|
}
|
|
456
460
|
this.nexowattStableUpdateManager?.stop();
|
|
461
|
+
this.eosCustomerUpdates?.stop();
|
|
457
462
|
this.detachCookieNamespace?.();
|
|
458
463
|
this.detachCookieNamespace = undefined;
|
|
459
464
|
this.instanceProxy.close();
|
|
@@ -1781,6 +1786,81 @@ class Web {
|
|
|
1781
1786
|
void this.unified.status(req).then(value => res.json(value), () => res.status(503).json({ error: 'AUTH_UNAVAILABLE' }));
|
|
1782
1787
|
});
|
|
1783
1788
|
app.get('/license.html', (_req, res) => res.redirect('/nexowatt/license'));
|
|
1789
|
+
try {
|
|
1790
|
+
this.eosCustomerUpdates = new eosCustomerUpdates_1.EosCustomerUpdates({
|
|
1791
|
+
namespace: this.adapter.namespace,
|
|
1792
|
+
currentVersion: this.adapter.version ?? '',
|
|
1793
|
+
nodeVersion: process.versions.node,
|
|
1794
|
+
packageDir: (0, node_path_1.resolve)(this.baseDir),
|
|
1795
|
+
controllerDir: (0, node_path_1.resolve)(adapter_core_1.controllerDir),
|
|
1796
|
+
dataDir: (0, node_path_1.resolve)((0, adapter_core_1.getAbsoluteInstanceDataDir)(this.adapter)),
|
|
1797
|
+
encryptSnapshot: value => this.adapter.encrypt(value),
|
|
1798
|
+
decryptSnapshot: value => this.adapter.decrypt(value),
|
|
1799
|
+
readConfigurationSnapshot: () => (0, eosUpdateSnapshot_1.readEosUpdateConfiguration)({
|
|
1800
|
+
namespace: this.adapter.namespace,
|
|
1801
|
+
getForeignObjectAsync: id => this.adapter.getForeignObjectAsync(id),
|
|
1802
|
+
getForeignStateAsync: id => this.adapter.getForeignStateAsync(id),
|
|
1803
|
+
getForeignStatesAsync: pattern => this.adapter.getForeignStatesAsync(pattern),
|
|
1804
|
+
decrypt: value => this.adapter.decrypt(value),
|
|
1805
|
+
isBusy: () => {
|
|
1806
|
+
const phase = this.adapter.eosMigration?.status().phase;
|
|
1807
|
+
return (this.closed ||
|
|
1808
|
+
!this.moduleHost ||
|
|
1809
|
+
this.moduleHost.mutation ||
|
|
1810
|
+
!!this.moduleHost.configurationSavePromise ||
|
|
1811
|
+
(!!phase &&
|
|
1812
|
+
![
|
|
1813
|
+
'DISABLED',
|
|
1814
|
+
'NOT_NEEDED',
|
|
1815
|
+
'COMMITTED',
|
|
1816
|
+
'LICENSE_REQUIRED',
|
|
1817
|
+
'BLOCKED',
|
|
1818
|
+
'ROLLBACK_REQUIRED',
|
|
1819
|
+
].includes(phase)));
|
|
1820
|
+
},
|
|
1821
|
+
}),
|
|
1822
|
+
readHostInstances: async () => {
|
|
1823
|
+
const own = await this.adapter.getForeignObjectAsync(`system.adapter.${this.adapter.namespace}`);
|
|
1824
|
+
if (own?.type !== 'instance' || typeof own.common.host !== 'string' || !own.common.host) {
|
|
1825
|
+
throw new Error('UPDATE_HOST_INVALID');
|
|
1826
|
+
}
|
|
1827
|
+
const view = await this.adapter.getObjectViewAsync('system', 'instance', {
|
|
1828
|
+
startkey: 'system.adapter.eos-admin.',
|
|
1829
|
+
endkey: 'system.adapter.eos-admin.\u9999',
|
|
1830
|
+
});
|
|
1831
|
+
if (view.rows.length > 128) {
|
|
1832
|
+
throw new Error('UPDATE_HOST_INVALID');
|
|
1833
|
+
}
|
|
1834
|
+
return view.rows
|
|
1835
|
+
.filter(row => row.value?.common?.host === own.common.host)
|
|
1836
|
+
.map(row => {
|
|
1837
|
+
if (!/^system\.adapter\.eos-admin\.\d{1,6}$/.test(row.id) ||
|
|
1838
|
+
typeof row.value.common.enabled !== 'boolean') {
|
|
1839
|
+
throw new Error('UPDATE_HOST_INVALID');
|
|
1840
|
+
}
|
|
1841
|
+
return {
|
|
1842
|
+
namespace: row.id.slice('system.adapter.'.length),
|
|
1843
|
+
enabled: row.value.common.enabled,
|
|
1844
|
+
};
|
|
1845
|
+
});
|
|
1846
|
+
},
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
catch {
|
|
1850
|
+
this.adapter.log.warn('EOS_UPDATE_INITIALIZATION_FAILED: Update service unavailable; EOS continues.');
|
|
1851
|
+
}
|
|
1852
|
+
const unavailableUpdate = () => Promise.reject(new Error('UPDATE_UNAVAILABLE'));
|
|
1853
|
+
(0, eosCustomerUpdateHttp_1.registerEosCustomerUpdateRoutes)(app, {
|
|
1854
|
+
service: this.eosCustomerUpdates ?? {
|
|
1855
|
+
status: unavailableUpdate,
|
|
1856
|
+
check: unavailableUpdate,
|
|
1857
|
+
prepare: unavailableUpdate,
|
|
1858
|
+
start: unavailableUpdate,
|
|
1859
|
+
},
|
|
1860
|
+
requestAllowed: req => this.unified.requestAllowed(req),
|
|
1861
|
+
csrfAllowed: req => this.unified.csrfAllowed(req),
|
|
1862
|
+
access: req => this.unified.status(req),
|
|
1863
|
+
});
|
|
1784
1864
|
app.get('/api/license/info', (req, res) => {
|
|
1785
1865
|
void this.getEosRequestAccess(req).then(access => {
|
|
1786
1866
|
if (!access.userId) {
|