@seavideo/cli 0.3.5 → 0.3.7
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/dist/src/cli/program.js
CHANGED
|
@@ -16,7 +16,7 @@ import { updateCommand } from "./commands/update.js";
|
|
|
16
16
|
import { walletCommand } from "./commands/wallet.js";
|
|
17
17
|
import { skillListCommand, skillReadCommand } from "./commands/skill.js";
|
|
18
18
|
import { agentSkillsAddCommand, agentSkillsListCommand, agentSkillsRemoveCommand, } from "./commands/agent-skills.js";
|
|
19
|
-
export const VERSION = '0.3.
|
|
19
|
+
export const VERSION = '0.3.7';
|
|
20
20
|
export function buildProgram(deps, ctx, entry = 'seavideo', presetNames = []) {
|
|
21
21
|
const program = new Command();
|
|
22
22
|
program
|
|
@@ -13,6 +13,7 @@ export const ENV_VAR_FIELDS = {
|
|
|
13
13
|
};
|
|
14
14
|
export const ENVS_FILE_NAME = 'envs.json';
|
|
15
15
|
export const PRESET_ENV_NAME_VAR = 'SEAVIDEO_ENV';
|
|
16
|
+
export const DEV_ENVS_FILE_NAME = 'envs.dev.json';
|
|
16
17
|
export const ENCRYPTED_ENVS_FILE_NAME = 'envs.enc.json';
|
|
17
18
|
export const SOPS_LOG_FILE_NAME = 'sops.log';
|
|
18
19
|
const PACKAGED_ENVS_RELATIVE = join('..', 'src', 'config', 'envs', ENVS_FILE_NAME);
|
|
@@ -22,6 +23,9 @@ function packagedEnvsPath(deps) {
|
|
|
22
23
|
function encryptedEnvsPath(deps) {
|
|
23
24
|
return join(dirname(packagedEnvsPath(deps)), ENCRYPTED_ENVS_FILE_NAME);
|
|
24
25
|
}
|
|
26
|
+
function devEnvsPath(deps) {
|
|
27
|
+
return join(dirname(packagedEnvsPath(deps)), DEV_ENVS_FILE_NAME);
|
|
28
|
+
}
|
|
25
29
|
async function readEnvsFile(path, deps) {
|
|
26
30
|
const text = await readTextOrNull(path, deps);
|
|
27
31
|
let result;
|
|
@@ -142,6 +146,7 @@ function defineEntry(target, name, value) {
|
|
|
142
146
|
export async function loadPresetRegistry(deps, paths) {
|
|
143
147
|
const registry = { presets: {}, origins: {} };
|
|
144
148
|
overlay(registry, await readEnvsFile(packagedEnvsPath(deps), deps), 'builtin');
|
|
149
|
+
overlay(registry, await readEnvsFile(devEnvsPath(deps), deps), 'builtin');
|
|
145
150
|
overlay(registry, await readEncryptedEnvsFile(encryptedEnvsPath(deps), deps, paths), 'builtin');
|
|
146
151
|
overlay(registry, await readEnvsFile(join(paths.root, ENVS_FILE_NAME), deps), 'user-file');
|
|
147
152
|
overlay(registry, await readEnvsFile(join(deps.cwd(), ENVS_FILE_NAME), deps), 'project-file');
|
package/dist/src/deps.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { spawn, spawnSync } from 'node:child_process';
|
|
2
2
|
import { randomBytes } from 'node:crypto';
|
|
3
|
+
import { realpathSync } from 'node:fs';
|
|
3
4
|
import { chmod, cp, lstat, mkdir, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile, } from 'node:fs/promises';
|
|
4
5
|
import { homedir, platform as osPlatform } from 'node:os';
|
|
5
6
|
import { makeEngineDownloader } from "./canvas/engine-install.js";
|
|
6
|
-
import { makeNpmInstall, npmCommandOf,
|
|
7
|
+
import { makeNpmInstall, npmCommandOf, resolvedScriptPathOf } from "./update/npm-install.js";
|
|
7
8
|
import { makeSopsDecrypt } from "./config/sops.js";
|
|
8
9
|
import { startLoopbackServer } from "./loopback.js";
|
|
9
10
|
async function readStdin() {
|
|
@@ -86,7 +87,7 @@ export function createDeps() {
|
|
|
86
87
|
arch: process.arch,
|
|
87
88
|
downloadEngine: makeEngineDownloader(),
|
|
88
89
|
runNpmInstall: makeNpmInstall(npmCommandOf(process.platform), undefined, process.platform === 'win32'),
|
|
89
|
-
scriptPath: () =>
|
|
90
|
+
scriptPath: () => resolvedScriptPathOf(process.argv, realpathSync),
|
|
90
91
|
decryptSopsFile: makeSopsDecrypt(),
|
|
91
92
|
readWindowsRegistry: readRegistryWith(runCapture),
|
|
92
93
|
realpath: (path) => realpath(path),
|
|
@@ -18,6 +18,22 @@ export function npmCommandOf(platform) {
|
|
|
18
18
|
export function scriptPathOf(argv) {
|
|
19
19
|
return argv[1] ?? '';
|
|
20
20
|
}
|
|
21
|
+
export function resolvedScriptPathOf(argv, realpath) {
|
|
22
|
+
const path = scriptPathOf(argv);
|
|
23
|
+
let result = path;
|
|
24
|
+
if (path !== '') {
|
|
25
|
+
try {
|
|
26
|
+
result = realpath(path);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
result = path;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
result = path;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
21
37
|
const OUTPUT_TAIL = 2000;
|
|
22
38
|
export function exitCodeOf(code) {
|
|
23
39
|
return typeof code === 'number' ? code : 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seavideo/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "CLI gateway for Seavideo canvas workflows: build, run and inspect image/video generation graphs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"package:skills": "node scripts/package-skills.mjs",
|
|
43
43
|
"sync:version": "node scripts/sync-version.mjs",
|
|
44
44
|
"version": "node scripts/sync-version.mjs",
|
|
45
|
-
"prepublishOnly": "npm run build"
|
|
45
|
+
"prepublishOnly": "node scripts/check-publish-target.mjs && npm run build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@puppeteer/browsers": "3.2.6",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"envs": {
|
|
3
|
-
"cn-dev": {
|
|
4
|
-
"platform": "ENC[AES256_GCM,data:ddw=,iv:C16SedQouP2VAnyDElBDPKcaH/luLkFXKmXaKBf3szI=,tag:TDhZksETLfUfrkCz9Gxeqw==,type:str]",
|
|
5
|
-
"seavideoBaseUrl": "ENC[AES256_GCM,data:SC4Qh/2WG1Zg7rJC4FFsfb2Wgg3bTMQNja9OBpIaJiZZ6VPYBz6Z5uJC5Uqpc8DEpdM=,iv:Obb+44DnvFFjCs5Os5OMkxgLwoDhTufB03ztR6k/bUU=,tag:PfPJttD2y1TFi4mwsg/2fg==,type:str]",
|
|
6
|
-
"flowWebBaseUrl": "ENC[AES256_GCM,data:UWfzTjnksCn8QumishxMaaYnVvuJ+M4qtI3ZtQ==,iv:RmVUySfNqDRJ9tAupQGVo5PCt6q3X8po4N8kaRBLDV4=,tag:3wUjWez4OHOkcgMoJohGBQ==,type:str]",
|
|
7
|
-
"flowApiBaseUrl": "ENC[AES256_GCM,data:bBhLUaUqqRne6HC6Nv/Qgtuni5GB7wRYuUQYFk/22qdEiTsTHe3qE/PJq6NQ,iv:GAmw6ytpQiHw3k+GX4F6yfhM0w64RmM1b7mBfMPxy8Y=,tag:tvK7/owRoQ/VmLTJxL2H5w==,type:str]",
|
|
8
|
-
"aiVideoApiBaseUrl": "ENC[AES256_GCM,data:gSVfGS5iveh1lgDMMOYPmLmvJ8tVo+n6caT0QbdK8riRLFkxLuLBqeQLXQ0=,iv:PtdOi+XbLswND5Bg3WGWjUtOtk1QFiKrlEbbzdmRCPw=,tag:SbnyHQHQG1Llp6uZJqJLGw==,type:str]",
|
|
9
|
-
"authIssuer": "ENC[AES256_GCM,data:HpMKbV+BmSYc8xZyQ3tOGRA9Ae3TQ//9VdRUj7v8G3UyC0A4,iv:MhX/rLrfkvwuYwijknmLs8xuERC6QJ4F45kpznIEj3Y=,tag:6vRPH+i9ikVWYozB+w1+uA==,type:str]",
|
|
10
|
-
"authClientId": "ENC[AES256_GCM,data:EV5WXX/PVF1bTeUGnnJQWw==,iv:9Qn0y/VSrgTZ4tOwUDUZVSlnhXXoIwZMHZhLYcP88LA=,tag:b6oPm9w27aBSmcCGRq4Qag==,type:str]"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"sops": {
|
|
14
|
-
"age": [
|
|
15
|
-
{
|
|
16
|
-
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2MUY4OVB2eDVZM25Jd01w\nZXFtbUFyQXMra0JSUDg5Z05MVEZzVjYvK1MwCkpXT3hXdXRudmdnRU1aam94cG1s\nS1Zha055blZXWlNLZU5HbzllWDArbHcKLS0tIFNLU014dTNjY2o0L2lBS1lkUEZn\nQS81MEFwVVRQdkVmcVFrNnVMZU9BTjAK51r9s+kfxoKXy4Q9ZDcLnQNM2yB2PLEm\nClBgYsqLb/IDQbM3Y7BQRDKZZmFh9xrqZ6276FIhj+XwFUeE2rLMkQ==\n-----END AGE ENCRYPTED FILE-----\n",
|
|
17
|
-
"recipient": "age1489m0aw3cke0x5l4u5dyk3j4zvgq4wyksjatsssj4kzz0hevlf3qe9gsre"
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"lastmodified": "2026-12-04T02:01:42Z",
|
|
21
|
-
"mac": "ENC[AES256_GCM,data:W8k0WBDxas4YeUOuat3lcshU0Yk6pdpeqBK1d9JPBOapBS34vtYVWlLEreJUGgGIu4tnjieUw+JrPnp5d4yGjC9qbxV3y6V60PTiEYvaRoIlXIR2vdqMCrvTKoywop397veWizeR+W4iy4nj+OB3+XBA9YWhAG/FLiRYuBjxPnU=,iv:6XpR/QD5pjwtmOjbMbfKmGqDSgvi9kiyHh5Oj2X5ChI=,tag:b02oORq9CfkIw9vwxMFEjA==,type:str]",
|
|
22
|
-
"unencrypted_suffix": "_unencrypted",
|
|
23
|
-
"version": "3.13.3"
|
|
24
|
-
}
|
|
25
|
-
}
|