swytchcode 2.2.3 → 2.2.4
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/swytchcode.js +12 -0
- package/package.json +7 -7
package/bin/swytchcode.js
CHANGED
|
@@ -71,6 +71,11 @@ try {
|
|
|
71
71
|
process.exit(1);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// Detect npx: binary lives in the npx temp cache, or npm_execpath names npx
|
|
75
|
+
const isNpx =
|
|
76
|
+
binPath.includes('_npx') ||
|
|
77
|
+
(process.env.npm_execpath || '').includes('npx');
|
|
78
|
+
|
|
74
79
|
const result = spawnBin(binPath, process.argv.slice(2));
|
|
75
80
|
|
|
76
81
|
if (result.error) {
|
|
@@ -78,4 +83,11 @@ if (result.error) {
|
|
|
78
83
|
process.exit(1);
|
|
79
84
|
}
|
|
80
85
|
|
|
86
|
+
if (isNpx && result.status === 0) {
|
|
87
|
+
process.stderr.write(
|
|
88
|
+
'\n\x1b[33mTip:\x1b[0m install swytchcode globally for faster startup:\n' +
|
|
89
|
+
' npm install -g swytchcode\n\n'
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
81
93
|
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swytchcode",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "Execution layer for API integrations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"README.md"
|
|
24
24
|
],
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"swytchcode-cli-darwin-arm64": "2.2.
|
|
27
|
-
"swytchcode-cli-darwin-x64": "2.2.
|
|
28
|
-
"swytchcode-cli-linux-arm64": "2.2.
|
|
29
|
-
"swytchcode-cli-linux-x64": "2.2.
|
|
30
|
-
"swytchcode-cli-win32-arm64": "2.2.
|
|
31
|
-
"swytchcode-cli-win32-x64": "2.2.
|
|
26
|
+
"swytchcode-cli-darwin-arm64": "2.2.4",
|
|
27
|
+
"swytchcode-cli-darwin-x64": "2.2.4",
|
|
28
|
+
"swytchcode-cli-linux-arm64": "2.2.4",
|
|
29
|
+
"swytchcode-cli-linux-x64": "2.2.4",
|
|
30
|
+
"swytchcode-cli-win32-arm64": "2.2.4",
|
|
31
|
+
"swytchcode-cli-win32-x64": "2.2.4"
|
|
32
32
|
}
|
|
33
33
|
}
|