juggernaut-bedrock 5.2.5 → 5.2.7

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.
Files changed (2) hide show
  1. package/package.json +6 -7
  2. package/preinstall.js +0 -71
package/package.json CHANGED
@@ -1,20 +1,19 @@
1
1
  {
2
2
  "name": "juggernaut-bedrock",
3
- "version": "5.2.5",
3
+ "version": "5.2.7",
4
4
  "description": "Route Claude Code through Amazon Bedrock in one command — IAM, SSO, or API key. Cross-platform CLI for GenAI developers.",
5
5
  "bin": {
6
6
  "juggernaut": "./index.js"
7
7
  },
8
8
  "scripts": {
9
- "preinstall": "node preinstall.js",
10
9
  "test": "node --test"
11
10
  },
12
11
  "optionalDependencies": {
13
- "juggernaut-bedrock-linux-x64": "5.2.5",
14
- "juggernaut-bedrock-linux-arm64": "5.2.5",
15
- "juggernaut-bedrock-darwin-x64": "5.2.5",
16
- "juggernaut-bedrock-darwin-arm64": "5.2.5",
17
- "juggernaut-bedrock-win32-x64": "5.2.5"
12
+ "juggernaut-bedrock-linux-x64": "5.2.7",
13
+ "juggernaut-bedrock-linux-arm64": "5.2.7",
14
+ "juggernaut-bedrock-darwin-x64": "5.2.7",
15
+ "juggernaut-bedrock-darwin-arm64": "5.2.7",
16
+ "juggernaut-bedrock-win32-x64": "5.2.7"
18
17
  },
19
18
  "os": [
20
19
  "darwin",
package/preinstall.js DELETED
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- // Best-effort install-time guard (NOT a guarantee).
5
- //
6
- // npm runs this `preinstall` script only AFTER it reifies the dependency
7
- // tree — including extracting the optional platform package that ships
8
- // juggernaut.exe. So in the exact scenario this warns about (a running
9
- // session holding a lock on juggernaut.exe under Windows), npm may already
10
- // have hit EPERM overwriting that binary before this script ever runs. When
11
- // that happens this gate cannot prevent the partial install.
12
- //
13
- // The reliable safety net is the runtime version-skew guard in index.js,
14
- // which refuses to launch a partially-updated install. This script is an
15
- // early, friendly heads-up for the cases where it does run first (e.g. a
16
- // repeat install once npm has already aborted, or non-reifying flows); it is
17
- // not the thing that makes a partial install safe.
18
-
19
- var childProcess = require("node:child_process");
20
-
21
- /**
22
- * @returns {string}
23
- */
24
- function buildBlockMessage() {
25
- return (
26
- "juggernaut-bedrock: a Claude Code / Juggernaut session is currently " +
27
- "running and is holding a lock on the Juggernaut binary.\n" +
28
- "Installing now may leave the package in a partially-updated state.\n" +
29
- "Close all `claude` sessions and terminals, then re-run:\n" +
30
- " npm install -g juggernaut-bedrock\n"
31
- );
32
- }
33
-
34
- /**
35
- * Detects a running juggernaut.exe on Windows. Fails open (returns false) on
36
- * non-Windows platforms and on any probe error, so a misfiring detection can
37
- * never wedge a legitimate repair install.
38
- * @returns {boolean}
39
- */
40
- function isLockingProcessRunning() {
41
- if (process.platform !== "win32") {
42
- return false;
43
- }
44
- try {
45
- var out = childProcess.execFileSync(
46
- "tasklist",
47
- ["/FI", "IMAGENAME eq juggernaut.exe", "/NH"],
48
- { encoding: "utf8", windowsHide: true }
49
- );
50
- return out.toLowerCase().indexOf("juggernaut.exe") !== -1;
51
- } catch (_) {
52
- return false;
53
- }
54
- }
55
-
56
- function main() {
57
- if (isLockingProcessRunning()) {
58
- process.stderr.write(buildBlockMessage());
59
- process.exit(1);
60
- }
61
- }
62
-
63
- if (require.main === module) {
64
- main();
65
- }
66
-
67
- module.exports = {
68
- buildBlockMessage: buildBlockMessage,
69
- isLockingProcessRunning: isLockingProcessRunning,
70
- main: main
71
- };