@luthersystems/shirotester 0.0.1
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/shirotester.js +46 -0
- package/package.json +37 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const { spawnSync } = require("child_process");
|
|
6
|
+
|
|
7
|
+
const PLATFORM_MAP = {
|
|
8
|
+
"darwin-arm64": "@luthersystems/shirotester-darwin-arm64",
|
|
9
|
+
"darwin-x64": "@luthersystems/shirotester-darwin-x64",
|
|
10
|
+
"linux-arm64": "@luthersystems/shirotester-linux-arm64",
|
|
11
|
+
"linux-x64": "@luthersystems/shirotester-linux-x64",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const platform = `${os.platform()}-${os.arch()}`;
|
|
15
|
+
const pkg = PLATFORM_MAP[platform];
|
|
16
|
+
|
|
17
|
+
if (!pkg) {
|
|
18
|
+
console.error(`Unsupported platform: ${platform}`);
|
|
19
|
+
console.error(`Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let binPath;
|
|
24
|
+
try {
|
|
25
|
+
binPath = path.join(
|
|
26
|
+
path.dirname(require.resolve(`${pkg}/package.json`)),
|
|
27
|
+
"bin",
|
|
28
|
+
"shirotester"
|
|
29
|
+
);
|
|
30
|
+
} catch {
|
|
31
|
+
console.error(`Platform package ${pkg} not installed.`);
|
|
32
|
+
console.error(`Try: npm install @luthersystems/shirotester`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const result = spawnSync(binPath, process.argv.slice(2), {
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
env: process.env,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (result.error) {
|
|
42
|
+
console.error(`Failed to run shirotester: ${result.error.message}`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@luthersystems/shirotester",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Substrate shirotester CLI — test, lint, analyze, debug, and serve ELPS phyla with full chaincode builtin support",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/luthersystems/substrate"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/luthersystems/substrate",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mcp",
|
|
13
|
+
"model-context-protocol",
|
|
14
|
+
"substrate",
|
|
15
|
+
"elps",
|
|
16
|
+
"lisp",
|
|
17
|
+
"chaincode",
|
|
18
|
+
"hyperledger",
|
|
19
|
+
"language-server",
|
|
20
|
+
"shirotester",
|
|
21
|
+
"linter",
|
|
22
|
+
"debugger",
|
|
23
|
+
"repl"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"shirotester": "bin/shirotester.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"bin/"
|
|
30
|
+
],
|
|
31
|
+
"optionalDependencies": {
|
|
32
|
+
"@luthersystems/shirotester-darwin-arm64": "0.0.0",
|
|
33
|
+
"@luthersystems/shirotester-darwin-x64": "0.0.0",
|
|
34
|
+
"@luthersystems/shirotester-linux-arm64": "0.0.0",
|
|
35
|
+
"@luthersystems/shirotester-linux-x64": "0.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|