@argycloud/code 1.9.1 → 1.10.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/argy CHANGED
@@ -52,6 +52,15 @@ function findBinary(startDir) {
52
52
  for (;;) {
53
53
  const modules = path.join(current, "node_modules")
54
54
  if (fs.existsSync(modules)) {
55
+ // Scoped layout produced by `npm install -g @argycloud/code` — the
56
+ // meta-package declares its platform binaries as @argycloud-scoped
57
+ // optionalDependencies, so node_modules/@argycloud/argy-<plat>-<arch>/
58
+ // is where the actual binary lives.
59
+ const scoped = path.join(modules, "@argycloud", base, "bin", binary)
60
+ if (fs.existsSync(scoped)) {
61
+ return scoped
62
+ }
63
+ // Legacy unscoped layout kept for older caches / direct platform installs.
55
64
  const entries = fs.readdirSync(modules)
56
65
  for (const entry of entries) {
57
66
  if (!entry.startsWith(base)) {
package/package.json CHANGED
@@ -6,19 +6,19 @@
6
6
  "scripts": {
7
7
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
8
8
  },
9
- "version": "1.9.1",
9
+ "version": "1.10.1",
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@argycloud/argy-linux-x64-musl": "1.9.1",
13
- "@argycloud/argy-linux-arm64": "1.9.1",
14
- "@argycloud/argy-darwin-x64": "1.9.1",
15
- "@argycloud/argy-windows-x64-baseline": "1.9.1",
16
- "@argycloud/argy-linux-x64": "1.9.1",
17
- "@argycloud/argy-linux-x64-baseline-musl": "1.9.1",
18
- "@argycloud/argy-darwin-arm64": "1.9.1",
19
- "@argycloud/argy-linux-x64-baseline": "1.9.1",
20
- "@argycloud/argy-darwin-x64-baseline": "1.9.1",
21
- "@argycloud/argy-windows-x64": "1.9.1",
22
- "@argycloud/argy-linux-arm64-musl": "1.9.1"
12
+ "@argycloud/argy-darwin-x64-baseline": "1.10.1",
13
+ "@argycloud/argy-linux-x64-baseline-musl": "1.10.1",
14
+ "@argycloud/argy-linux-arm64-musl": "1.10.1",
15
+ "@argycloud/argy-windows-x64": "1.10.1",
16
+ "@argycloud/argy-linux-x64-musl": "1.10.1",
17
+ "@argycloud/argy-linux-arm64": "1.10.1",
18
+ "@argycloud/argy-darwin-x64": "1.10.1",
19
+ "@argycloud/argy-linux-x64": "1.10.1",
20
+ "@argycloud/argy-darwin-arm64": "1.10.1",
21
+ "@argycloud/argy-windows-x64-baseline": "1.10.1",
22
+ "@argycloud/argy-linux-x64-baseline": "1.10.1"
23
23
  }
24
24
  }
package/postinstall.mjs CHANGED
@@ -50,7 +50,9 @@ function detectPlatformAndArch() {
50
50
 
51
51
  function findBinary() {
52
52
  const { platform, arch } = detectPlatformAndArch()
53
- const packageName = `argy-${platform}-${arch}`
53
+ // Platform binaries are published as @argycloud-scoped optionalDependencies
54
+ // of @argycloud/code, so require.resolve must use the scoped specifier.
55
+ const packageName = `@argycloud/argy-${platform}-${arch}`
54
56
  const binaryName = platform === "windows" ? "argy.exe" : "argy"
55
57
 
56
58
  try {