@xiaojian-cli/dingtalk-workspace-cli 1.0.61-ipass.2
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/dws.js +12 -0
- package/package.json +22 -0
package/bin/dws.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
const pkg = {"darwin-arm64":"@xiaojian-cli/dingtalk-workspace-cli-darwin-arm64","linux-x64":"@xiaojian-cli/dingtalk-workspace-cli-linux-x64"}[`${process.platform}-${process.arch}`];
|
|
6
|
+
if (!pkg) { console.error("Unsupported platform: " + process.platform + "-" + process.arch); process.exit(1); }
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
let manifest;
|
|
9
|
+
try { manifest = require.resolve(pkg + "/package.json"); } catch { console.error("Cannot find " + pkg + ". Reinstall @xiaojian-cli/dingtalk-workspace-cli without omitting optional dependencies."); process.exit(1); }
|
|
10
|
+
const result = spawnSync(join(dirname(manifest), "bin", "dws"), process.argv.slice(2), { env: process.env, stdio: "inherit" });
|
|
11
|
+
if (result.error) { console.error(result.error.message); process.exit(1); }
|
|
12
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xiaojian-cli/dingtalk-workspace-cli",
|
|
3
|
+
"version": "1.0.61-ipass.2",
|
|
4
|
+
"description": "DingTalk Workspace CLI for Yingdao iPaaS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"dws": "bin/dws.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin"
|
|
11
|
+
],
|
|
12
|
+
"optionalDependencies": {
|
|
13
|
+
"@xiaojian-cli/dingtalk-workspace-cli-darwin-arm64": "1.0.61-ipass.2",
|
|
14
|
+
"@xiaojian-cli/dingtalk-workspace-cli-linux-x64": "1.0.61-ipass.2"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
}
|
|
22
|
+
}
|