@vercel/vc-native 54.10.0 → 54.11.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.
Files changed (2) hide show
  1. package/bin/vercel.exe +39 -4
  2. package/package.json +6 -6
package/bin/vercel.exe CHANGED
@@ -1,6 +1,41 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- console.error(
4
- 'The native Vercel CLI binary was not installed. Try reinstalling with `npm i -g @vercel/vc-native --force`.'
5
- );
6
- process.exit(1);
3
+ // Fallback launcher used when postinstall did not replace this file with the
4
+ // native binary (e.g. pnpm blocks dependency build scripts by default).
5
+ // It resolves the platform package at runtime and forwards to its binary.
6
+
7
+ const { spawnSync } = require('child_process');
8
+ const path = require('path');
9
+
10
+ const packageName = `@vercel/vc-native-${process.platform}-${process.arch}`;
11
+ const binaryName = process.platform === 'win32' ? 'vercel.exe' : 'vercel';
12
+
13
+ let binaryPath;
14
+ try {
15
+ binaryPath = path.join(
16
+ path.dirname(require.resolve(`${packageName}/package.json`)),
17
+ 'bin',
18
+ binaryName
19
+ );
20
+ } catch {
21
+ console.error(
22
+ `The native Vercel CLI binary was not installed. Try manually installing "${packageName}", or reinstall with \`npm i -g @vercel/vc-native --force\`.`
23
+ );
24
+ process.exit(1);
25
+ }
26
+
27
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
28
+ stdio: 'inherit',
29
+ windowsHide: true,
30
+ });
31
+
32
+ if (result.error) {
33
+ console.error(result.error.message);
34
+ process.exit(1);
35
+ }
36
+
37
+ if (result.signal) {
38
+ process.kill(process.pid, result.signal);
39
+ }
40
+
41
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/vc-native",
3
- "version": "54.10.0",
3
+ "version": "54.11.0",
4
4
  "description": "Native Vercel CLI installer for npm",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com",
@@ -17,11 +17,11 @@
17
17
  "postinstall": "node ./postinstall.mjs"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@vercel/vc-native-darwin-arm64": "54.10.0",
21
- "@vercel/vc-native-darwin-x64": "54.10.0",
22
- "@vercel/vc-native-linux-arm64": "54.10.0",
23
- "@vercel/vc-native-linux-x64": "54.10.0",
24
- "@vercel/vc-native-win32-x64": "54.10.0"
20
+ "@vercel/vc-native-darwin-arm64": "54.11.0",
21
+ "@vercel/vc-native-darwin-x64": "54.11.0",
22
+ "@vercel/vc-native-linux-arm64": "54.11.0",
23
+ "@vercel/vc-native-linux-x64": "54.11.0",
24
+ "@vercel/vc-native-win32-x64": "54.11.0"
25
25
  },
26
26
  "files": [
27
27
  "bin",