c8ctl-plugin-nano 1.6.2 → 1.7.0
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/README.md +12 -5
- package/package.json +8 -6
- package/platforms.mjs +45 -0
package/README.md
CHANGED
|
@@ -577,13 +577,18 @@ scope we own) so the names can never be squatted or npm-security-held:
|
|
|
577
577
|
| `@nanobpm/c8ctl-plugin-nano-darwin-x64` | darwin | x64 |
|
|
578
578
|
| `@nanobpm/c8ctl-plugin-nano-linux-x64` | linux | x64 |
|
|
579
579
|
| `@nanobpm/c8ctl-plugin-nano-linux-arm64` | linux | arm64 |
|
|
580
|
+
| `@nanobpm/c8ctl-plugin-nano-linux-armv7` | linux | arm (v7) |
|
|
581
|
+
| `@nanobpm/c8ctl-plugin-nano-linux-armv6` | linux | arm (v6) |
|
|
580
582
|
| `@nanobpm/c8ctl-plugin-nano-win32-x64` | win32 | x64 |
|
|
581
583
|
|
|
582
|
-
The root `c8ctl-plugin-nano` lists all
|
|
583
|
-
the exact release version, injected into the published tarball at release
|
|
584
|
-
npm installs only
|
|
585
|
-
binary
|
|
586
|
-
|
|
584
|
+
The root `c8ctl-plugin-nano` lists all of these as `optionalDependencies` (pinned
|
|
585
|
+
to the exact release version, injected into the published tarball at release
|
|
586
|
+
time). npm installs only those matching the host, so each user downloads a single
|
|
587
|
+
binary — **except on 32-bit ARM**, where npm's `cpu` field is just `arm` for both
|
|
588
|
+
armv6 and armv7, so both install and `platformForHost` picks the right one at
|
|
589
|
+
runtime via the host's `arm_version` (falling back to the armv6 build, which also
|
|
590
|
+
runs on armv7). The mapping lives in `platforms.mjs` — the single source of truth
|
|
591
|
+
shared by the build/publish scripts and the plugin's runtime resolution.
|
|
587
592
|
|
|
588
593
|
### Binary delivery contract (upstream CI)
|
|
589
594
|
|
|
@@ -599,6 +604,8 @@ nanobpm-gateway-rest-server-darwin-arm64
|
|
|
599
604
|
nanobpm-gateway-rest-server-darwin-x64
|
|
600
605
|
nanobpm-gateway-rest-server-linux-x64
|
|
601
606
|
nanobpm-gateway-rest-server-linux-arm64
|
|
607
|
+
nanobpm-gateway-rest-server-linux-armv7
|
|
608
|
+
nanobpm-gateway-rest-server-linux-armv6
|
|
602
609
|
nanobpm-gateway-rest-server-win32-x64.exe
|
|
603
610
|
```
|
|
604
611
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c8ctl-plugin-nano",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
|
|
6
6
|
"main": "c8ctl-plugin.js",
|
|
@@ -49,10 +49,12 @@
|
|
|
49
49
|
"semantic-release": "^25.0.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.
|
|
53
|
-
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.
|
|
54
|
-
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.
|
|
55
|
-
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.
|
|
56
|
-
"@nanobpm/c8ctl-plugin-nano-
|
|
52
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.7.0",
|
|
53
|
+
"@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.7.0",
|
|
54
|
+
"@nanobpm/c8ctl-plugin-nano-linux-x64": "1.7.0",
|
|
55
|
+
"@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.7.0",
|
|
56
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.7.0",
|
|
57
|
+
"@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.7.0",
|
|
58
|
+
"@nanobpm/c8ctl-plugin-nano-win32-x64": "1.7.0"
|
|
57
59
|
}
|
|
58
60
|
}
|
package/platforms.mjs
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
* squatted or npm-security-held the way an unscoped name can.
|
|
8
8
|
* - os: the npm "os" field value (process.platform)
|
|
9
9
|
* - cpu: the npm "cpu" field value (process.arch)
|
|
10
|
+
* - armVersion: (32-bit ARM only) the host ARM version this binary targets.
|
|
11
|
+
* npm's `cpu` is just "arm" for BOTH armv6 and armv7, so the two
|
|
12
|
+
* 32-bit ARM packages share os/cpu and are disambiguated at runtime
|
|
13
|
+
* by the host's reported ARM version (see `platformForHost`).
|
|
10
14
|
* - triple: the Rust target triple (informational; used by the Nano BPM CI)
|
|
11
15
|
* - asset: the GitHub Release asset name uploaded by the Nano BPM CI
|
|
12
16
|
* - bin: the binary file name inside the platform package
|
|
@@ -52,6 +56,24 @@ export const PLATFORMS = [
|
|
|
52
56
|
asset: `${BIN_BASENAME}-linux-arm64`,
|
|
53
57
|
bin: BIN_BASENAME,
|
|
54
58
|
},
|
|
59
|
+
{
|
|
60
|
+
pkg: '@nanobpm/c8ctl-plugin-nano-linux-armv7',
|
|
61
|
+
os: 'linux',
|
|
62
|
+
cpu: 'arm',
|
|
63
|
+
armVersion: 7,
|
|
64
|
+
triple: 'armv7-unknown-linux-gnueabihf',
|
|
65
|
+
asset: `${BIN_BASENAME}-linux-armv7`,
|
|
66
|
+
bin: BIN_BASENAME,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
pkg: '@nanobpm/c8ctl-plugin-nano-linux-armv6',
|
|
70
|
+
os: 'linux',
|
|
71
|
+
cpu: 'arm',
|
|
72
|
+
armVersion: 6,
|
|
73
|
+
triple: 'arm-unknown-linux-gnueabihf',
|
|
74
|
+
asset: `${BIN_BASENAME}-linux-armv6`,
|
|
75
|
+
bin: BIN_BASENAME,
|
|
76
|
+
},
|
|
55
77
|
{
|
|
56
78
|
pkg: '@nanobpm/c8ctl-plugin-nano-win32-x64',
|
|
57
79
|
os: 'win32',
|
|
@@ -62,7 +84,30 @@ export const PLATFORMS = [
|
|
|
62
84
|
},
|
|
63
85
|
];
|
|
64
86
|
|
|
87
|
+
/**
|
|
88
|
+
* The npm-reported ARM version of the host (6, 7, 8, ...), or 0 when unknown or
|
|
89
|
+
* not ARM. Node stamps this into `process.config` at build time: a 32-bit
|
|
90
|
+
* hardfloat build reports 6 (Pi 1 / Zero) or 7 (Pi 2/3/4 on a 32-bit OS, most
|
|
91
|
+
* modern 32-bit SBCs). Absent on 64-bit and non-ARM builds.
|
|
92
|
+
*/
|
|
93
|
+
function hostArmVersion() {
|
|
94
|
+
const v = parseInt(process.config?.variables?.arm_version, 10);
|
|
95
|
+
return Number.isFinite(v) ? v : 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
65
98
|
/** The platform package that matches the host running this code, or undefined. */
|
|
66
99
|
export function platformForHost(platform = process.platform, arch = process.arch) {
|
|
100
|
+
// 32-bit ARM: process.arch is 'arm' for BOTH armv6 and armv7, so os/cpu alone
|
|
101
|
+
// can't choose between the two packages. Pick on the host's ARM version. An
|
|
102
|
+
// armv6 binary also runs on armv7 (v7 is backward-compatible), so when the
|
|
103
|
+
// version is unknown fall back to armv6 — the universally-runnable 32-bit
|
|
104
|
+
// hardfloat build.
|
|
105
|
+
if (platform === 'linux' && arch === 'arm') {
|
|
106
|
+
const want = hostArmVersion() >= 7 ? 7 : 6;
|
|
107
|
+
return (
|
|
108
|
+
PLATFORMS.find((p) => p.os === 'linux' && p.cpu === 'arm' && p.armVersion === want) ||
|
|
109
|
+
PLATFORMS.find((p) => p.os === 'linux' && p.cpu === 'arm' && p.armVersion === 6)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
67
112
|
return PLATFORMS.find((p) => p.os === platform && p.cpu === arch);
|
|
68
113
|
}
|