iobroker.eos-admin 7.9.26 → 7.9.28

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iobroker.eos-admin",
3
3
  "description": "NexoWatt EOS Admin standalone interface for Energy Operation System",
4
- "version": "7.9.26",
4
+ "version": "7.9.28",
5
5
  "contributors": [
6
6
  "bluefox <dogafox@gmail.com>",
7
7
  "apollon77",
@@ -41,7 +41,6 @@
41
41
  "express": "^5.2.1",
42
42
  "express-fileupload": "^1.5.2",
43
43
  "express-session": "^1.19.0",
44
- "iobroker.mcp": "^1.0.0",
45
44
  "json5": "^2.2.3",
46
45
  "mime": "^3.0.0",
47
46
  "semver": "^7.8.3"
@@ -102,7 +101,8 @@
102
101
  "tools/nexowatt-generate-repo-entry.cjs",
103
102
  "tools/nexowatt-patch-repo.cjs",
104
103
  "NEXOWATT_EOS_STANDALONE.md",
105
- "tools/nexowatt-generate-eos-admin-repo-entry.cjs"
104
+ "tools/nexowatt-generate-eos-admin-repo-entry.cjs",
105
+ "tools/nexowatt-repair-eos-admin-update.cjs"
106
106
  ],
107
107
  "scripts": {
108
108
  "npm": "npm i -f && cd src-admin && npm i -f",
@@ -135,7 +135,8 @@
135
135
  "update-packages": "npx -y npm-check-updates --upgrade && cd src-admin && npx -y npm-check-updates --upgrade",
136
136
  "check:eos-package": "node tools/nexowatt-validate-package.cjs",
137
137
  "nexowatt:repo-entry": "node tools/nexowatt-generate-repo-entry.cjs",
138
- "nexowatt:patch-repo": "node tools/nexowatt-patch-repo.cjs"
138
+ "nexowatt:patch-repo": "node tools/nexowatt-patch-repo.cjs",
139
+ "nexowatt:repair-update": "node tools/nexowatt-repair-eos-admin-update.cjs"
139
140
  },
140
141
  "author": "NexoWatt",
141
142
  "private": false,
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ 'use strict';
2
3
  const pkg = require('../package.json');
3
4
  const io = require('../io-package.json');
4
5
  const version = io.common.version || pkg.version;
5
- const base = process.argv[2] || 'https://iobroker.live/repo/eos-admin';
6
+ const base = (process.argv[2] || `https://unpkg.com/iobroker.eos-admin@${version}`).replace(/\/$/, '');
6
7
  const entry = {
7
8
  'eos-admin': {
8
9
  name: 'eos-admin',
@@ -10,8 +11,26 @@ const entry = {
10
11
  title: 'NexoWatt EOS Admin',
11
12
  titleLang: io.common.titleLang,
12
13
  desc: io.common.desc,
14
+ news: io.common.news,
13
15
  meta: `${base}/io-package.json`,
14
- icon: /unpkg\.com\/iobroker\.eos-admin@/i.test(base) ? `${base}/admin/admin.png` : `${base}/admin.png`
16
+ icon: `${base}/admin/admin.png`,
17
+ extIcon: `${base}/admin/admin.svg`,
18
+ type: io.common.type || 'general',
19
+ mode: io.common.mode || 'daemon',
20
+ platform: io.common.platform || 'Javascript/Node.js',
21
+ connectionType: io.common.connectionType || 'local',
22
+ dataSource: io.common.dataSource || 'push',
23
+ adminUI: io.common.adminUI || { config: 'json' },
24
+ license: io.common.license || 'NexoWatt Proprietary',
25
+ licenseInformation: io.common.licenseInformation,
26
+ dependencies: io.common.dependencies || [{ 'js-controller': '>=6.0.11' }],
27
+ stopBeforeUpdate: false,
28
+ dontDelete: false,
29
+ nondeletable: false,
30
+ readme: `${base}/README.md`,
31
+ npmPackage: 'iobroker.eos-admin',
32
+ allowAdapterUpdate: true,
33
+ allowAdapterDelete: false,
15
34
  }
16
35
  };
17
36
  console.log(JSON.stringify(entry, null, 2));
@@ -1,33 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
-
4
- const pkg = require('../package.json');
5
- const io = require('../io-package.json');
6
-
7
- if (pkg.name !== 'iobroker.eos-admin') {
8
- throw new Error(`Unexpected package name: ${pkg.name}`);
9
- }
10
- if (!io.common || io.common.name !== 'eos-admin') {
11
- throw new Error('io-package.json common.name must be eos-admin for the standalone EOS Admin adapter');
12
- }
13
- if (pkg.version !== io.common.version) {
14
- throw new Error(`Version mismatch: package.json=${pkg.version}, io-package=${io.common.version}`);
15
- }
16
-
17
- const defaultBaseUrl = `https://unpkg.com/${pkg.name}@${pkg.version}`;
18
- const baseUrl = (process.argv[2] || defaultBaseUrl).replace(/\/$/, '');
19
- const iconUrl = /\/admin$/i.test(baseUrl) ? `${baseUrl}/admin.png` : `${baseUrl}/admin/admin.png`;
20
-
21
- const entry = {
22
- 'eos-admin': {
23
- name: 'eos-admin',
24
- version: pkg.version,
25
- title: 'NexoWatt EOS Admin',
26
- titleLang: io.common.titleLang,
27
- desc: io.common.desc,
28
- meta: `${baseUrl}/io-package.json`,
29
- icon: iconUrl
30
- }
31
- };
32
-
33
- console.log(JSON.stringify(entry, null, 2));
3
+ require('./nexowatt-generate-eos-admin-repo-entry.cjs');
@@ -1,30 +1,53 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
-
4
3
  const fs = require('fs');
4
+ const path = require('path');
5
5
  const input = process.argv[2];
6
6
  const output = process.argv[3] || input;
7
7
  const version = process.argv[4] || require('../package.json').version;
8
8
  const baseUrl = (process.argv[5] || `https://unpkg.com/iobroker.eos-admin@${version}`).replace(/\/$/, '');
9
-
10
9
  if (!input) {
11
10
  console.error('Usage: node tools/nexowatt-patch-repo.cjs <repo-nexowatt.json> [output.json] [version] [base-url]');
12
11
  process.exit(2);
13
12
  }
14
-
15
- const io = require('../io-package.json');
16
13
  const repo = JSON.parse(fs.readFileSync(input, 'utf8'));
14
+ const ioPath = path.join(__dirname, '..', 'io-package.json');
15
+ const io = JSON.parse(fs.readFileSync(ioPath, 'utf8'));
17
16
  repo['eos-admin'] = {
18
17
  ...(repo['eos-admin'] || {}),
19
18
  name: 'eos-admin',
20
19
  version,
21
20
  title: 'NexoWatt EOS Admin',
22
21
  titleLang: io.common.titleLang,
23
- desc: io.common.desc,
22
+ desc: {
23
+ de: 'Eigenständige NexoWatt EOS Administrationsoberfläche mit zuverlässigem In-App-Updatepfad für Energy Operation System Installationen.',
24
+ en: 'Standalone NexoWatt EOS administration interface with reliable in-app update flow for Energy Operation System installations.',
25
+ },
26
+ news: io.common.news,
24
27
  meta: `${baseUrl}/io-package.json`,
25
- icon: /\/admin$/i.test(baseUrl) ? `${baseUrl}/admin.png` : `${baseUrl}/admin/admin.png`
28
+ icon: `${baseUrl}/admin/admin.png`,
29
+ extIcon: `${baseUrl}/admin/admin.svg`,
30
+ type: 'general',
31
+ mode: 'daemon',
32
+ platform: 'Javascript/Node.js',
33
+ connectionType: 'local',
34
+ dataSource: 'push',
35
+ adminUI: { config: 'json' },
36
+ license: 'NexoWatt Proprietary',
37
+ licenseInformation: io.common.licenseInformation,
38
+ dependencies: [{ 'js-controller': '>=6.0.11' }],
39
+ stopBeforeUpdate: false,
40
+ dontDelete: false,
41
+ nondeletable: false,
42
+ readme: `${baseUrl}/README.md`,
43
+ npmPackage: 'iobroker.eos-admin',
44
+ allowAdapterUpdate: true,
45
+ allowAdapterDelete: false,
26
46
  };
27
-
28
47
  fs.writeFileSync(output, JSON.stringify(repo, null, 2) + '\n');
29
48
  console.log(`Patched ${input} -> ${output}`);
30
- console.log(`repo["eos-admin"].version=${repo['eos-admin'].version}`);
49
+ console.log(`repo["eos-admin"].version=${version}`);
50
+ console.log(`repo["eos-admin"].meta=${repo['eos-admin'].meta}`);
51
+ console.log('repo["eos-admin"].stopBeforeUpdate=false');
52
+ console.log('repo["eos-admin"].dontDelete=false');
53
+ console.log('repo["eos-admin"].nondeletable=false');
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /** Repair installed EOS Admin flags that can block in-app updates from older builds. */
4
+ const cp = require('node:child_process');
5
+ function run(cmd) {
6
+ console.log(`$ ${cmd}`);
7
+ cp.execFileSync('/bin/sh', ['-lc', cmd], { stdio: 'inherit' });
8
+ }
9
+ run('iobroker object set system.adapter.eos-admin common.stopBeforeUpdate=false || true');
10
+ run('iobroker object set system.adapter.eos-admin common.dontDelete=false || true');
11
+ run('iobroker object set system.adapter.eos-admin common.nondeletable=false || true');
12
+ run('iobroker object set system.adapter.eos-admin.0 common.dontDelete=false || true');
13
+ run('iobroker object set system.adapter.eos-admin.0 common.nondeletable=false || true');
14
+ console.log('EOS Admin update flags repaired. Deletion protection remains enforced by EOS ACL/UI guard, while updates stay possible.');
15
+ console.log('Next: iobroker upgrade eos-admin https://iobroker.live/repo/repo-nexowatt.json');
@@ -18,6 +18,9 @@ if (pkg.private !== false) fail('package.json private must be false for npm publ
18
18
  if (pkg.version !== io.common.version) fail(`package.json and io-package.json versions differ: ${pkg.version} vs ${io.common.version}`);
19
19
  if (io.common.name !== 'eos-admin') fail(`io-package common.name must be eos-admin, got ${io.common.name}`);
20
20
  if (io.native.port !== 8091 && io.native.port !== 8081) fail(`unexpected default port ${io.native.port}`);
21
+ if (io.common.stopBeforeUpdate !== false) fail('io-package common.stopBeforeUpdate must be false so EOS Admin can self-update from older UI builds');
22
+ if (io.common.dontDelete === true) fail('io-package common.dontDelete must not be true because it blocks clean updates');
23
+ if (io.common.nondeletable === true) fail('io-package common.nondeletable must not be true because it blocks updates');
21
24
 
22
25
  for (const file of [
23
26
  'adminWww/index.html',