@runfile/cli 0.38.0 → 0.40.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.
Binary file
Binary file
Binary file
package/bin/linux-x64/run CHANGED
Binary file
package/bin/run.js CHANGED
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
- // Picks the bundled binary for the current platform/arch and execs it.
2
+
3
3
  const path = require('node:path');
4
4
  const { spawnSync } = require('node:child_process');
5
-
6
5
  const KEY = process.platform + '-' + process.arch;
7
6
  const BINARIES = {
8
7
  "linux-x64": "run",
@@ -12,8 +11,8 @@ const BINARIES = {
12
11
  "win32-x64": "run.exe",
13
12
  "win32-arm64": "run.exe"
14
13
  };
15
-
16
14
  const bin = BINARIES[KEY];
15
+
17
16
  if (!bin) {
18
17
  console.error(`run: unsupported platform ${KEY}. Supported: ${Object.keys(BINARIES).join(', ')}`);
19
18
  process.exit(1);
@@ -21,8 +20,10 @@ if (!bin) {
21
20
 
22
21
  const binPath = path.join(__dirname, KEY, bin);
23
22
  const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
23
+
24
24
  if (result.error) {
25
25
  console.error(`run: failed to spawn ${binPath}: ${result.error.message}`);
26
26
  process.exit(1);
27
27
  }
28
+
28
29
  process.exit(result.status == null ? 1 : result.status);
Binary file
Binary file
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
- "name": "@runfile/cli",
3
- "version": "0.38.0",
4
- "description": "Runfile CLI — an easy-to-use, batteries-included task runner",
5
- "repository": "https://github.com/Skiley/runfile",
6
- "homepage": "https://github.com/Skiley/runfile",
7
- "license": "MIT",
8
- "bin": {
9
- "run": "bin/run.js"
10
- },
11
- "files": [
12
- "bin"
13
- ],
14
- "engines": {
15
- "node": ">=16"
16
- }
2
+ "bin": {
3
+ "run": "bin/run.js"
4
+ },
5
+ "description": "Runfile CLI — an easy-to-use, batteries-included task runner",
6
+ "engines": {
7
+ "node": ">=16"
8
+ },
9
+ "files": [
10
+ "bin"
11
+ ],
12
+ "homepage": "https://github.com/JoaaoVerona/runfile",
13
+ "license": "MIT",
14
+ "name": "@runfile/cli",
15
+ "repository": "https://github.com/JoaaoVerona/runfile",
16
+ "version": "0.40.0"
17
17
  }