@tplog/zendcli 1.2.0 → 1.4.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.
- package/bin/zend.js +39 -0
- package/package.json +10 -14
- package/dist/cli.js +0 -3860
package/bin/zend.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require("child_process");
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
|
|
7
|
+
const PLATFORMS = {
|
|
8
|
+
"darwin-arm64": "@tplog/zendcli-darwin-arm64",
|
|
9
|
+
"darwin-x64": "@tplog/zendcli-darwin-x64",
|
|
10
|
+
"linux-x64": "@tplog/zendcli-linux-x64",
|
|
11
|
+
"linux-arm64": "@tplog/zendcli-linux-arm64",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const platform = os.platform();
|
|
15
|
+
const arch = os.arch();
|
|
16
|
+
const key = `${platform}-${arch}`;
|
|
17
|
+
const pkg = PLATFORMS[key];
|
|
18
|
+
|
|
19
|
+
if (!pkg) {
|
|
20
|
+
console.error(`Unsupported platform: ${key}`);
|
|
21
|
+
console.error(`Supported: ${Object.keys(PLATFORMS).join(", ")}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let binPath;
|
|
26
|
+
try {
|
|
27
|
+
binPath = path.join(require.resolve(`${pkg}/package.json`), "..", "zend");
|
|
28
|
+
} catch {
|
|
29
|
+
console.error(`Could not find package ${pkg}. Try reinstalling @tplog/zendcli.`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
const result = execFileSync(binPath, process.argv.slice(2), {
|
|
35
|
+
stdio: "inherit",
|
|
36
|
+
});
|
|
37
|
+
} catch (e) {
|
|
38
|
+
process.exit(e.status || 1);
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplog/zendcli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Minimal Zendesk CLI for tickets and comments",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Minimal Zendesk CLI for tickets and comments (Rust)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/tplog/zendcli.git"
|
|
@@ -11,22 +11,18 @@
|
|
|
11
11
|
"url": "https://github.com/tplog/zendcli/issues"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"zend": "
|
|
14
|
+
"zend": "bin/zend.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"
|
|
17
|
+
"bin/"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"prepublishOnly": "npm run build",
|
|
22
|
-
"start": "node dist/cli.js"
|
|
20
|
+
"test": "cargo test"
|
|
23
21
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"@
|
|
28
|
-
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"commander": "^14.0.3"
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"@tplog/zendcli-darwin-arm64": "1.4.0",
|
|
24
|
+
"@tplog/zendcli-darwin-x64": "1.4.0",
|
|
25
|
+
"@tplog/zendcli-linux-x64": "1.4.0",
|
|
26
|
+
"@tplog/zendcli-linux-arm64": "1.4.0"
|
|
31
27
|
}
|
|
32
28
|
}
|