@seedance-studio/ss-cli 0.0.12
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/README.md +12 -0
- package/bin/ss-cli.js +27 -0
- package/package.json +27 -0
- package/prebuilt/darwin-amd64/ss-cli +0 -0
- package/prebuilt/darwin-arm64/ss-cli +0 -0
- package/prebuilt/linux-amd64/ss-cli +0 -0
- package/prebuilt/linux-arm64/ss-cli +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @seedance-studio/ss-cli
|
|
2
|
+
|
|
3
|
+
Seedance Studio CLI packaged for npm-based managed-agent environments.
|
|
4
|
+
|
|
5
|
+
The package ships prebuilt Go binaries and exposes `ss-cli` through npm's
|
|
6
|
+
`bin` mechanism. Runtime credentials and context are provided through
|
|
7
|
+
`SS_CLI_*` environment variables.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @seedance-studio/ss-cli
|
|
11
|
+
ss-cli version
|
|
12
|
+
```
|
package/bin/ss-cli.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
|
|
6
|
+
const archMap = {
|
|
7
|
+
x64: "amd64",
|
|
8
|
+
arm64: "arm64",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const os = process.platform;
|
|
12
|
+
const arch = archMap[process.arch];
|
|
13
|
+
|
|
14
|
+
if ((os !== "linux" && os !== "darwin") || !arch) {
|
|
15
|
+
console.error(`ss-cli: unsupported platform ${os}/${process.arch}`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const binary = path.join(__dirname, "..", "prebuilt", `${os}-${arch}`, "ss-cli");
|
|
20
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
21
|
+
|
|
22
|
+
if (result.error) {
|
|
23
|
+
console.error(`ss-cli: failed to execute ${binary}: ${result.error.message}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seedance-studio/ss-cli",
|
|
3
|
+
"version": "0.0.12",
|
|
4
|
+
"description": "Seedance Studio CLI",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ss-cli": "bin/ss-cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"prebuilt",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"os": [
|
|
14
|
+
"darwin",
|
|
15
|
+
"linux"
|
|
16
|
+
],
|
|
17
|
+
"cpu": [
|
|
18
|
+
"x64",
|
|
19
|
+
"arm64"
|
|
20
|
+
],
|
|
21
|
+
"license": "UNLICENSED",
|
|
22
|
+
"private": false,
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public",
|
|
25
|
+
"registry": "https://registry.npmjs.org/"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|