@fastybird/smart-panel 1.0.0-beta.2 → 1.0.0-beta.3
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.
|
@@ -36,6 +36,25 @@ const packageJsonPath = join(__dirname, '..', 'package.json');
|
|
|
36
36
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
37
37
|
const version = packageJson.version;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Detect a display installed by the retired eLinux path, by the systemd unit the old installer
|
|
41
|
+
* wrote. Its description is the only durable marker: the install directory and binary name are
|
|
42
|
+
* shared with the desktop build.
|
|
43
|
+
*/
|
|
44
|
+
function isLegacyElinuxInstall() {
|
|
45
|
+
try {
|
|
46
|
+
const unitPath = '/etc/systemd/system/smart-panel-display.service';
|
|
47
|
+
|
|
48
|
+
if (!existsSync(unitPath)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return readFileSync(unitPath, 'utf-8').includes('eLinux DRM-GBM');
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
39
58
|
const program = new Command();
|
|
40
59
|
|
|
41
60
|
program
|
|
@@ -626,7 +645,7 @@ program
|
|
|
626
645
|
program
|
|
627
646
|
.command('update-panel')
|
|
628
647
|
.description('Update the Smart Panel display app')
|
|
629
|
-
.option('--platform <platform>', 'Panel platform: flutter-pi-armv7, flutter-pi-arm64,
|
|
648
|
+
.option('--platform <platform>', 'Panel platform: flutter-pi-armv7, flutter-pi-arm64, linux, android')
|
|
630
649
|
.option('--version <version>', 'Install specific version')
|
|
631
650
|
.option('--beta', 'Install latest beta release')
|
|
632
651
|
.option('-d, --install-dir <dir>', 'Installation directory', '/opt/smart-panel-display')
|
|
@@ -661,7 +680,7 @@ program
|
|
|
661
680
|
} else if (arch === 'armv7') {
|
|
662
681
|
platform = 'flutter-pi-armv7';
|
|
663
682
|
} else if (arch === 'x64') {
|
|
664
|
-
platform = '
|
|
683
|
+
platform = 'linux';
|
|
665
684
|
} else {
|
|
666
685
|
logger.error('Could not detect platform. Use --platform to specify.');
|
|
667
686
|
process.exit(1);
|
|
@@ -669,6 +688,15 @@ program
|
|
|
669
688
|
}
|
|
670
689
|
}
|
|
671
690
|
|
|
691
|
+
// Only the desktop Linux path replaces the local display bundle and restarts its unit,
|
|
692
|
+
// so only it can damage an install left behind by the retired eLinux build. An Android
|
|
693
|
+
// panel over ADB or a flutter-pi device must not be blocked by a stale unit on this host.
|
|
694
|
+
if (platform === 'linux' && isLegacyElinuxInstall()) {
|
|
695
|
+
logger.error('This display was installed with the eLinux build, which is no longer produced.');
|
|
696
|
+
logger.error('Reinstall with install-display.sh to move to a supported build before updating.');
|
|
697
|
+
process.exit(1);
|
|
698
|
+
}
|
|
699
|
+
|
|
672
700
|
logger.info(`Platform: ${platform}`);
|
|
673
701
|
|
|
674
702
|
// Get release info
|
|
@@ -707,7 +735,6 @@ program
|
|
|
707
735
|
const assetPatterns = {
|
|
708
736
|
'flutter-pi-armv7': /smart-panel-display-armv7\.tar\.gz/,
|
|
709
737
|
'flutter-pi-arm64': /smart-panel-display-arm64\.tar\.gz/,
|
|
710
|
-
elinux: /smart-panel-display-elinux-x64\.tar\.gz/,
|
|
711
738
|
linux: /smart-panel-display-linux-x64\.tar\.gz/,
|
|
712
739
|
android: /smart-panel-display\.apk/,
|
|
713
740
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAkC1D"}
|
package/dist/utils/version.js
CHANGED
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export function compareSemver(a, b) {
|
|
11
11
|
const parseVersion = (v) => {
|
|
12
|
-
|
|
12
|
+
// Build metadata is ignored when determining precedence (semver §10), and it has to go
|
|
13
|
+
// before the pre-release split rather than after: it may itself contain a '-', so
|
|
14
|
+
// "1.0.0+build-7" would otherwise parse as a pre-release of 1.0.0 and rank below it,
|
|
15
|
+
// and "1.0.1+build-alpha" would leave "1.0.1+build" as the base, making the patch NaN.
|
|
16
|
+
const cleaned = v.replace(/^v/, '').split('+')[0];
|
|
13
17
|
const [base, ...prereleaseParts] = cleaned.split('-');
|
|
14
18
|
const parts = base.split('.').map(Number);
|
|
15
19
|
const prerelease = prereleaseParts.length > 0 ? prereleaseParts.join('-') : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS;IACjD,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE;QAClC,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS;IACjD,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE;QAClC,uFAAuF;QACvF,kFAAkF;QAClF,qFAAqF;QACrF,uFAAuF;QACvF,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC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,CAAC;YACP,uCAAuC;YACvC,IAAI,KAAK,GAAG,KAAK;gBAAE,OAAO,CAAC,CAAC,CAAC;YAC7B,IAAI,KAAK,GAAG,KAAK;gBAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastybird/smart-panel",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "FastyBird Smart Panel - IoT Dashboard for Linux devices",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fastybird",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"migration:revert": "node ./node_modules/typeorm/cli.js migration:revert -d ./node_modules/@fastybird/smart-panel-backend/dist/dataSource.js"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@fastybird/smart-panel-admin": "1.0.0-beta.
|
|
52
|
-
"@fastybird/smart-panel-backend": "1.0.0-beta.
|
|
51
|
+
"@fastybird/smart-panel-admin": "1.0.0-beta.3",
|
|
52
|
+
"@fastybird/smart-panel-backend": "1.0.0-beta.3",
|
|
53
53
|
"chalk": "^5.4.1",
|
|
54
54
|
"commander": "^13.1.0",
|
|
55
55
|
"ora": "^8.2.0"
|