@runfile/cli 0.46.1 → 1.0.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 +671 -699
- package/bin/darwin-arm64/run +0 -0
- package/bin/darwin-arm64/runfile-lsp +0 -0
- package/bin/darwin-x64/run +0 -0
- package/bin/darwin-x64/runfile-lsp +0 -0
- package/bin/linux-arm64/run +0 -0
- package/bin/linux-arm64/runfile-lsp +0 -0
- package/bin/linux-x64/run +0 -0
- package/bin/linux-x64/runfile-lsp +0 -0
- package/bin/run.js +10 -7
- package/bin/runfile-lsp.js +32 -0
- package/bin/win32-arm64/run.exe +0 -0
- package/bin/win32-arm64/runfile-lsp.exe +0 -0
- package/bin/win32-x64/run.exe +0 -0
- package/bin/win32-x64/runfile-lsp.exe +0 -0
- package/package.json +4 -3
package/bin/darwin-arm64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/darwin-x64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/linux-arm64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/linux-x64/run
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/run.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
2
|
const path = require('node:path');
|
|
4
3
|
const { spawnSync } = require('node:child_process');
|
|
5
4
|
const KEY = process.platform + '-' + process.arch;
|
|
5
|
+
// One launcher for both binaries, `run` and `runfile-lsp`: which one is
|
|
6
|
+
// decided by this file's own name, so the second is a copy, not a second file.
|
|
7
|
+
const NAME = path.basename(__filename, ".js");
|
|
8
|
+
const EXE = process.platform === "win32" ? `${NAME}.exe` : NAME;
|
|
6
9
|
const BINARIES = {
|
|
7
|
-
"linux-x64":
|
|
8
|
-
"linux-arm64":
|
|
9
|
-
"darwin-arm64":
|
|
10
|
-
"darwin-x64":
|
|
11
|
-
"win32-x64":
|
|
12
|
-
"win32-arm64":
|
|
10
|
+
"linux-x64": EXE,
|
|
11
|
+
"linux-arm64": EXE,
|
|
12
|
+
"darwin-arm64": EXE,
|
|
13
|
+
"darwin-x64": EXE,
|
|
14
|
+
"win32-x64": EXE,
|
|
15
|
+
"win32-arm64": EXE,
|
|
13
16
|
};
|
|
14
17
|
const bin = BINARIES[KEY];
|
|
15
18
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
const { spawnSync } = require('node:child_process');
|
|
4
|
+
const KEY = process.platform + '-' + process.arch;
|
|
5
|
+
// One launcher for both binaries, `run` and `runfile-lsp`: which one is
|
|
6
|
+
// decided by this file's own name, so the second is a copy, not a second file.
|
|
7
|
+
const NAME = path.basename(__filename, ".js");
|
|
8
|
+
const EXE = process.platform === "win32" ? `${NAME}.exe` : NAME;
|
|
9
|
+
const BINARIES = {
|
|
10
|
+
"linux-x64": EXE,
|
|
11
|
+
"linux-arm64": EXE,
|
|
12
|
+
"darwin-arm64": EXE,
|
|
13
|
+
"darwin-x64": EXE,
|
|
14
|
+
"win32-x64": EXE,
|
|
15
|
+
"win32-arm64": EXE,
|
|
16
|
+
};
|
|
17
|
+
const bin = BINARIES[KEY];
|
|
18
|
+
|
|
19
|
+
if (!bin) {
|
|
20
|
+
console.error(`run: unsupported platform ${KEY}. Supported: ${Object.keys(BINARIES).join(', ')}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const binPath = path.join(__dirname, KEY, bin);
|
|
25
|
+
const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
26
|
+
|
|
27
|
+
if (result.error) {
|
|
28
|
+
console.error(`run: failed to spawn ${binPath}: ${result.error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
process.exit(result.status == null ? 1 : result.status);
|
package/bin/win32-arm64/run.exe
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/win32-x64/run.exe
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bin": {
|
|
3
|
-
"run": "bin/run.js"
|
|
3
|
+
"run": "bin/run.js",
|
|
4
|
+
"runfile-lsp": "bin/runfile-lsp.js"
|
|
4
5
|
},
|
|
5
|
-
"description": "Runfile CLI —
|
|
6
|
+
"description": "Runfile CLI — a cross-platform command runner with its own small language",
|
|
6
7
|
"engines": {
|
|
7
8
|
"node": ">=16"
|
|
8
9
|
},
|
|
@@ -13,5 +14,5 @@
|
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"name": "@runfile/cli",
|
|
15
16
|
"repository": "https://github.com/JoaaoVerona/runfile",
|
|
16
|
-
"version": "0.
|
|
17
|
+
"version": "1.0.0"
|
|
17
18
|
}
|