jpcode-cli 1.18.32 → 1.18.33

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/jpcode.mjs ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ // Launcher for the installed jpcode. Bare `jpcode` opens the inline chat (the
3
+ // --mini interface); every other invocation is forwarded untouched, so flags
4
+ // and subcommands behave exactly like the compiled binary.
5
+ import { spawn } from "node:child_process"
6
+ import { existsSync } from "node:fs"
7
+ import path from "node:path"
8
+ import { fileURLToPath } from "node:url"
9
+
10
+ const binary = path.join(path.dirname(fileURLToPath(import.meta.url)), "jpcode.exe")
11
+
12
+ if (!existsSync(binary)) {
13
+ console.error("jpcode: the platform binary is missing, so the postinstall script did not run.")
14
+ console.error("")
15
+ console.error("Reinstall without --ignore-scripts, or run it manually:")
16
+ console.error(" cd node_modules/jpcode-cli && node postinstall.mjs")
17
+ process.exit(1)
18
+ }
19
+
20
+ const args = process.argv.slice(2)
21
+ const child = spawn(binary, args.length === 0 ? ["--mini"] : args, { stdio: "inherit" })
22
+
23
+ child.on("error", (error) => {
24
+ console.error("jpcode: " + error.message)
25
+ process.exit(1)
26
+ })
27
+ child.on("exit", (code, signal) => {
28
+ process.exit(signal ? 1 : (code ?? 0))
29
+ })
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "jpcode-cli",
3
3
  "bin": {
4
- "jpcode": "./bin/jpcode.exe"
4
+ "jpcode": "./bin/jpcode.mjs"
5
5
  },
6
6
  "scripts": {
7
7
  "postinstall": "node ./postinstall.mjs"
8
8
  },
9
- "version": "1.18.32",
9
+ "version": "1.18.33",
10
10
  "license": "MIT",
11
11
  "os": [
12
12
  "darwin",
@@ -18,17 +18,17 @@
18
18
  "x64"
19
19
  ],
20
20
  "optionalDependencies": {
21
- "jpcode-linux-x64-baseline": "1.18.32",
22
- "jpcode-linux-x64-baseline-musl": "1.18.32",
23
- "jpcode-windows-arm64": "1.18.32",
24
- "jpcode-linux-arm64": "1.18.32",
25
- "jpcode-linux-x64-musl": "1.18.32",
26
21
  "jpcode-darwin-x64": "1.18.32",
27
- "jpcode-linux-x64": "1.18.32",
28
22
  "jpcode-darwin-x64-baseline": "1.18.32",
23
+ "jpcode-windows-x64": "1.18.32",
24
+ "jpcode-linux-x64-baseline-musl": "1.18.32",
25
+ "jpcode-darwin-arm64": "1.18.32",
26
+ "jpcode-linux-x64": "1.18.32",
27
+ "jpcode-linux-arm64": "1.18.32",
28
+ "jpcode-linux-x64-baseline": "1.18.32",
29
29
  "jpcode-windows-x64-baseline": "1.18.32",
30
30
  "jpcode-linux-arm64-musl": "1.18.32",
31
- "jpcode-windows-x64": "1.18.32",
32
- "jpcode-darwin-arm64": "1.18.32"
31
+ "jpcode-windows-arm64": "1.18.32",
32
+ "jpcode-linux-x64-musl": "1.18.32"
33
33
  }
34
34
  }
package/bin/jpcode.exe DELETED
@@ -1,10 +0,0 @@
1
- echo "Error: jpcode-cli's postinstall script was not run." >&2
2
- echo "" >&2
3
- echo "This occurs when using --ignore-scripts during installation, or when using a" >&2
4
- echo "package manager like pnpm that does not run postinstall scripts by default." >&2
5
- echo "" >&2
6
- echo "To fix this, run the postinstall script manually:" >&2
7
- echo " cd node_modules/jpcode-cli && node postinstall.mjs" >&2
8
- echo "" >&2
9
- echo "Or reinstall jpcode-cli without the --ignore-scripts flag." >&2
10
- exit 1