@command-center/command-center 0.2.1 → 0.2.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.
package/bin/command-center.js
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
7
8
|
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
const packageMetadata = require("../package.json");
|
|
11
|
+
|
|
12
|
+
const PACKAGE_VERSION = packageMetadata.version ?? "0.0.0";
|
|
13
|
+
|
|
8
14
|
const PLATFORM_KEY = `${process.platform}:${process.arch}`;
|
|
9
15
|
|
|
10
16
|
// TAG_PLATFORM_MATRIX 2025.10.02: Keep binary names in sync with scripts/build-all.ts outputs.
|
|
@@ -13,7 +19,7 @@ const PLATFORM_BINARIES = new Map([
|
|
|
13
19
|
["darwin:x64", "command-center-macos-x64"],
|
|
14
20
|
["linux:arm64", "command-center-linux-arm64"],
|
|
15
21
|
["linux:x64", "command-center-linux-x64"],
|
|
16
|
-
["win32:x64", "command-center-win-x64.exe"],
|
|
22
|
+
// ["win32:x64", "command-center-win-x64.exe"],
|
|
17
23
|
]);
|
|
18
24
|
|
|
19
25
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -46,8 +52,21 @@ function resolveBinary() {
|
|
|
46
52
|
return binaryPath;
|
|
47
53
|
}
|
|
48
54
|
|
|
55
|
+
const argv = process.argv.slice(2);
|
|
56
|
+
|
|
57
|
+
const printVersionBanner = () => {
|
|
58
|
+
console.log(`command-center ${PACKAGE_VERSION}`);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
if (argv.some((arg) => arg === "--version" || arg === "-v")) {
|
|
62
|
+
printVersionBanner();
|
|
63
|
+
process.exit(0);
|
|
64
|
+
}
|
|
65
|
+
|
|
49
66
|
const binaryPath = resolveBinary();
|
|
50
|
-
|
|
67
|
+
printVersionBanner();
|
|
68
|
+
|
|
69
|
+
const child = spawn(binaryPath, argv, {
|
|
51
70
|
stdio: "inherit",
|
|
52
71
|
});
|
|
53
72
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@command-center/command-center",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Binary distribution of UpToSpeed Command Center",
|
|
6
6
|
"bin": {
|
|
7
|
-
"command-center": "
|
|
7
|
+
"command-center": "bin/command-center.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
Binary file
|