@diggerhq/catty 0.5.2 → 0.5.3
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/catty +29 -0
- package/bin/catty-darwin-amd64 +0 -0
- package/bin/catty-darwin-arm64 +0 -0
- package/bin/catty-linux-amd64 +0 -0
- package/bin/catty-linux-arm64 +0 -0
- package/package.json +1 -1
package/bin/catty
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
const platform = os.platform();
|
|
8
|
+
const arch = os.arch();
|
|
9
|
+
|
|
10
|
+
const platformMap = { darwin: 'darwin', linux: 'linux' };
|
|
11
|
+
const archMap = { x64: 'amd64', arm64: 'arm64' };
|
|
12
|
+
|
|
13
|
+
const goPlatform = platformMap[platform];
|
|
14
|
+
const goArch = archMap[arch];
|
|
15
|
+
|
|
16
|
+
if (!goPlatform || !goArch) {
|
|
17
|
+
console.error(`Unsupported platform: ${platform}/${arch}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const binary = path.join(__dirname, `catty-${goPlatform}-${goArch}`);
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
execFileSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
25
|
+
} catch (err) {
|
|
26
|
+
if (err.status !== undefined) process.exit(err.status);
|
|
27
|
+
console.error(`Failed to run catty: ${err.message}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
package/bin/catty-darwin-amd64
CHANGED
|
Binary file
|
package/bin/catty-darwin-arm64
CHANGED
|
Binary file
|
package/bin/catty-linux-amd64
CHANGED
|
Binary file
|
package/bin/catty-linux-arm64
CHANGED
|
Binary file
|