@aswless_854771076/ai_short_studio_cli 0.1.49 → 0.1.51
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 +18 -3
- package/dist/base-command.d.ts +1 -0
- package/dist/base-command.js +1 -0
- package/dist/client/api-client.d.ts +2 -0
- package/dist/client/api-client.js +4 -0
- package/dist/commands/auth/login.d.ts +1 -0
- package/dist/commands/auth/logout.d.ts +1 -0
- package/dist/commands/auth/signup.d.ts +1 -0
- package/dist/commands/auth/status.d.ts +1 -0
- package/dist/commands/canvas/apply.d.ts +1 -0
- package/dist/commands/canvas/asset/download.d.ts +1 -0
- package/dist/commands/canvas/asset/get.d.ts +1 -0
- package/dist/commands/canvas/asset/list.d.ts +1 -0
- package/dist/commands/canvas/asset/select.d.ts +1 -0
- package/dist/commands/canvas/asset/upload.d.ts +1 -0
- package/dist/commands/canvas/continuity/analyze.d.ts +1 -0
- package/dist/commands/canvas/edge/connect.d.ts +1 -0
- package/dist/commands/canvas/edge/disconnect.d.ts +1 -0
- package/dist/commands/canvas/edge/list.d.ts +1 -0
- package/dist/commands/canvas/episode/create.d.ts +14 -0
- package/dist/commands/canvas/episode/create.js +16 -0
- package/dist/commands/canvas/episode/list.d.ts +12 -0
- package/dist/commands/canvas/episode/list.js +10 -0
- package/dist/commands/canvas/folder/copy-cross-project.d.ts +25 -0
- package/dist/commands/canvas/folder/copy-cross-project.js +51 -0
- package/dist/commands/canvas/folder/create.d.ts +20 -0
- package/dist/commands/canvas/folder/create.js +28 -0
- package/dist/commands/canvas/folder/delete.d.ts +19 -0
- package/dist/commands/canvas/folder/delete.js +25 -0
- package/dist/commands/canvas/folder/list.d.ts +19 -0
- package/dist/commands/canvas/folder/list.js +26 -0
- package/dist/commands/canvas/folder/move.d.ts +21 -0
- package/dist/commands/canvas/folder/move.js +32 -0
- package/dist/commands/canvas/folder/rename.d.ts +21 -0
- package/dist/commands/canvas/folder/rename.js +27 -0
- package/dist/commands/canvas/folder/restore.d.ts +19 -0
- package/dist/commands/canvas/folder/restore.js +25 -0
- package/dist/commands/canvas/get.d.ts +1 -0
- package/dist/commands/canvas/inspect.d.ts +1 -0
- package/dist/commands/canvas/node/add.d.ts +1 -0
- package/dist/commands/canvas/node/delete.d.ts +1 -0
- package/dist/commands/canvas/node/edit-resource.d.ts +1 -0
- package/dist/commands/canvas/node/edit-shot.d.ts +1 -0
- package/dist/commands/canvas/node/get.d.ts +1 -0
- package/dist/commands/canvas/node/list.d.ts +1 -0
- package/dist/commands/canvas/node/run.d.ts +1 -0
- package/dist/commands/canvas/node/types.d.ts +1 -0
- package/dist/commands/canvas/node/update-many.d.ts +1 -0
- package/dist/commands/canvas/node/update.d.ts +1 -0
- package/dist/commands/canvas/settings/get.d.ts +1 -0
- package/dist/commands/canvas/settings/set.d.ts +1 -0
- package/dist/commands/config/get.d.ts +1 -0
- package/dist/commands/config/set.d.ts +1 -0
- package/dist/commands/preflight.d.ts +1 -0
- package/dist/commands/project/create.d.ts +1 -0
- package/dist/commands/project/delete.d.ts +1 -0
- package/dist/commands/project/get.d.ts +1 -0
- package/dist/commands/project/list.d.ts +1 -0
- package/dist/commands/project/provider/get.d.ts +1 -0
- package/dist/commands/project/provider/set.d.ts +1 -0
- package/dist/commands/project/provider/test.d.ts +1 -0
- package/dist/commands/project/update.d.ts +1 -0
- package/dist/commands/skill/install.d.ts +1 -0
- package/dist/commands/skill/path.d.ts +1 -0
- package/dist/commands/skill/status.d.ts +1 -0
- package/dist/commands/task/cancel.d.ts +1 -0
- package/dist/commands/task/get.d.ts +1 -0
- package/dist/commands/task/wait.d.ts +1 -0
- package/dist/domain/vvicat-api.d.ts +21 -0
- package/dist/domain/vvicat-api.js +42 -0
- package/dist/preflight.js +0 -4
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/SKILL.md +51 -9
- package/skills/using-vvicat-ai-short-studio-cli/references/commands.md +5 -3
package/README.md
CHANGED
|
@@ -42,8 +42,14 @@ CLI 只把 refresh token 保存到系统钥匙串。短期 access token 会写
|
|
|
42
42
|
- `ai-short-studio canvas edge`:连线读写。
|
|
43
43
|
- `ai-short-studio canvas continuity analyze`:视频生成前分析镜头依赖,可修复已具备源视频的首尾帧连线。
|
|
44
44
|
- `ai-short-studio canvas asset`:资产列表、上传、版本选择和下载。
|
|
45
|
+
- `ai-short-studio canvas folder`:画布资产目录管理(5 预设 + 用户子目录 + 软删 + 跨项目复制)。
|
|
46
|
+
- `ai-short-studio canvas episode`:列出或创建无限画布分集。其他画布命令用 `--episode <ID|集数>` 选择分集。
|
|
45
47
|
- `ai-short-studio task`:异步任务读取、批量等待和取消。
|
|
46
|
-
- `ai-short-studio config
|
|
48
|
+
- `ai-short-studio config`:读取管理员发布的全局模型,管理个人默认模型、能力默认值和并发配置;CLI 会拒绝写入 Provider 或模型目录。
|
|
49
|
+
|
|
50
|
+
CLI 不提供分集删除或任务人工复核提交;这两类需要确认生产资产或保留范围的操作继续在网页端完成。
|
|
51
|
+
|
|
52
|
+
`config get` 返回管理员发布的全局模型与个人默认值,不返回供应商密钥。Comfly 和 RunningHub 的凭据、服务地址与工作流均由服务端维护;CLI 预检只检查默认模型及能力选项。`config set` 会拒绝写入任何供应商或模型目录。
|
|
47
53
|
|
|
48
54
|
```bash
|
|
49
55
|
ai-short-studio canvas edge add --project <projectId> --from <sourceNodeId>:<sourceHandle> --to <targetNodeId>:<targetHandle> --json
|
|
@@ -51,8 +57,15 @@ ai-short-studio canvas edge delete <edgeId> --project <projectId> --yes --json
|
|
|
51
57
|
ai-short-studio canvas continuity analyze --project <projectId> --json
|
|
52
58
|
ai-short-studio canvas continuity analyze --project <projectId> --apply-ready --json
|
|
53
59
|
ai-short-studio canvas asset select-version <assetId> --project <projectId> --version <versionId> --json
|
|
60
|
+
ai-short-studio canvas folder list --project <projectId> --json
|
|
61
|
+
ai-short-studio canvas episode list --project <projectId> --json
|
|
62
|
+
ai-short-studio canvas episode create --project <projectId> --number 2 --json
|
|
63
|
+
ai-short-studio canvas get --project <projectId> --episode 2 --json
|
|
64
|
+
ai-short-studio canvas folder copy-cross-project --project <sourceProjectId> --asset-id <assetId> --target-project <targetProjectId> --target-episode-id <episodeId> --target-folder-id <folderId> --json
|
|
54
65
|
```
|
|
55
66
|
|
|
67
|
+
`canvas folder copy-cross-project` 可用 `--target-episode-id` 指定复制品所属分集;省略 `--target-folder-id` 时,复制品进入该分集的未分类资产。目标目录必须属于目标项目和目标分集。两个参数都会去除首尾空白并拒绝空白值。该命令只复制资产及版本,不复制源目录结构。
|
|
68
|
+
|
|
56
69
|
## 项目配置
|
|
57
70
|
|
|
58
71
|
```bash
|
|
@@ -103,7 +116,7 @@ CLI 通过 `/api/v1/bootstrap` 完成版本、连通性与 Supabase 公共配置
|
|
|
103
116
|
|
|
104
117
|
`canvas node types [kind] --json` 同时兼容节点目录 schema v1/v2,并原样返回动态节点的 `source`、`definitionId` 和 `definitionVersionId`。后台发布后重新执行该命令即可读取新目录;归档节点不能新建,但已有实例仍按画布中的固定版本 schema 更新和执行。CLI 创建节点只提交 `kind` 与配置,版本由服务端固定,不能由客户端伪造。
|
|
105
118
|
|
|
106
|
-
新建视频生成节点按实时模型能力执行:首尾帧模型使用 `start-frame` + `end-frame`,普通图生视频使用 `start-frame`,图片参考使用 `references
|
|
119
|
+
新建视频生成节点按实时模型能力执行:首尾帧模型使用 `start-frame` + `end-frame`,普通图生视频使用 `start-frame`,图片参考使用 `references`。Ark 两个 Seedance 2.0 和 StarRouter 两个内置 Dreamina Seedance 2.0 可使用 `reference-videos` 和 `reference-audios`,上限为 9 张参考图、3 个参考视频和 3 个参考音频;部署方启用的内部 RunningHub MiniMax H3 模型支持纯文本零媒体输入,参考图、参考视频和独立参考音频范围分别为 0–9、0–2 和 0–2。RunningHub 参考视频只传画面,需要声音时须单独连接参考音频。它的实时 `durationOptions` 为 5–15 秒的每个整数,服务端把 1–4 秒兼容输入归一为 5 秒。其他 StarRouter 和自定义模型不会按名称猜能力。参考音频不能作为唯一媒体输入;纯文本指不连接任何媒体,不是只连参考音频。多模态参考不能与首尾帧混用。历史节点未声明新版输入语义时继续按原多图参考逻辑执行,不会被读取或保存自动迁移。
|
|
107
120
|
|
|
108
121
|
`storyboard-image` schema 现在暴露节点级 `gridSize`。CLI 继续按实时 schema 通用写入,配套 Skill 会分析每个镜头的动作、运镜、多人调度和连续性难度,向用户确认后逐镜设置;未单独设置或连接旧服务时回退到项目格数,系统默认为 6 格。
|
|
109
122
|
|
|
@@ -129,6 +142,8 @@ CLI 通过 `/api/v1/bootstrap` 完成版本、连通性与 Supabase 公共配置
|
|
|
129
142
|
|
|
130
143
|
配套 Agent Skill 位于 `skills/using-vvicat-ai-short-studio-cli`,随 npm 包发布。安装或更新 CLI 时会自动安装到 Codex Skill 目录;已被用户修改或非 CLI 托管的目录不会被覆盖。
|
|
131
144
|
|
|
145
|
+
RunningHub MiniMax H3 通过实时能力暴露 16:9、9:16 与 480p、720p、1K、2K,默认为 1K;Agent 不得臆造其他值。
|
|
146
|
+
|
|
132
147
|
## 本地真实验收
|
|
133
148
|
|
|
134
149
|
CLI 开发完成后运行以下命令:
|
|
@@ -140,7 +155,7 @@ npm run test:local-e2e
|
|
|
140
155
|
|
|
141
156
|
该命令先构建真实 CLI,再启动隔离的本地 mock API,通过多个 `bin/run.js` 子进程验证聚合查询、字段级与多节点更新、`canvas apply` 免预读、批量执行/等待和旧位置参数兼容;同时启动 8 个独立认证进程,确认共享 session 缓存只触发一次模拟 Keychain 读取和一次刷新。测试不连接生产服务、不调用模型,所有配置、令牌、画布和任务数据均在系统临时目录中创建并在结束时清理。
|
|
142
157
|
|
|
143
|
-
标准创作中,用户未指定时角色、道具、场景/背景和分镜图统一使用 `16:9
|
|
158
|
+
标准创作中,用户未指定时角色、道具、场景/背景和分镜图统一使用 `16:9`。视频时长以当前模型实时 `durationOptions` 为准;只有实时模型仅提供 5、10、15 秒时,才按镜头目标时长向上取这三档为剪辑保留余量,其他模型不硬编码三档。每批生成后 Agent 必须重新读取任务与资产、核对最终时长在实时合法选项中,并实际检查预览,完成自我审计后才能继续或交付。
|
|
144
159
|
|
|
145
160
|
```bash
|
|
146
161
|
ai-short-studio skill install --target codex
|
package/dist/base-command.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare abstract class BaseCommand extends Command {
|
|
|
5
5
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
6
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
};
|
|
9
10
|
protected print(value: unknown): void;
|
|
10
11
|
catch(error: unknown): Promise<void>;
|
package/dist/base-command.js
CHANGED
|
@@ -7,6 +7,7 @@ export class BaseCommand extends Command {
|
|
|
7
7
|
json: Flags.boolean({ description: '输出稳定 JSON', default: false }),
|
|
8
8
|
locale: Flags.string({ description: '响应语言', default: 'zh', options: ['zh', 'en'] }),
|
|
9
9
|
profile: Flags.string({ description: '配置档案名称' }),
|
|
10
|
+
episode: Flags.string({ description: '画布分集 ID 或集数', env: 'VVICAT_CANVAS_EPISODE' }),
|
|
10
11
|
};
|
|
11
12
|
print(value) {
|
|
12
13
|
this.log(formatJson(value));
|
|
@@ -11,11 +11,13 @@ export declare class ApiClient {
|
|
|
11
11
|
private readonly fetcher;
|
|
12
12
|
private readonly locale;
|
|
13
13
|
private readonly session;
|
|
14
|
+
private readonly episode?;
|
|
14
15
|
constructor(input: {
|
|
15
16
|
baseUrl: string;
|
|
16
17
|
session: ApiSession;
|
|
17
18
|
fetcher?: typeof fetch;
|
|
18
19
|
locale?: string;
|
|
20
|
+
episode?: string;
|
|
19
21
|
});
|
|
20
22
|
request<T = unknown>(path: string, options?: ApiRequestOptions): Promise<T>;
|
|
21
23
|
response(path: string, options?: ApiRequestOptions): Promise<Response>;
|
|
@@ -4,11 +4,13 @@ export class ApiClient {
|
|
|
4
4
|
fetcher;
|
|
5
5
|
locale;
|
|
6
6
|
session;
|
|
7
|
+
episode;
|
|
7
8
|
constructor(input) {
|
|
8
9
|
this.baseUrl = input.baseUrl.replace(/\/+$/, '');
|
|
9
10
|
this.session = input.session;
|
|
10
11
|
this.fetcher = input.fetcher ?? fetch;
|
|
11
12
|
this.locale = input.locale ?? 'zh';
|
|
13
|
+
this.episode = input.episode?.trim() || undefined;
|
|
12
14
|
}
|
|
13
15
|
async request(path, options = {}) {
|
|
14
16
|
const firstToken = options.auth === false ? null : await this.session.accessToken();
|
|
@@ -39,6 +41,8 @@ export class ApiClient {
|
|
|
39
41
|
headers.set('accept-language', this.locale);
|
|
40
42
|
if (accessToken)
|
|
41
43
|
headers.set('authorization', `Bearer ${accessToken}`);
|
|
44
|
+
if (this.episode)
|
|
45
|
+
headers.set('x-canvas-episode', this.episode);
|
|
42
46
|
let body = inputBody;
|
|
43
47
|
if (inputBody !== undefined && isJsonBody(inputBody)) {
|
|
44
48
|
headers.set('content-type', 'application/json');
|
|
@@ -11,6 +11,7 @@ export default class AuthLogin extends BaseCommand {
|
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -6,6 +6,7 @@ export default class AuthLogout extends BaseCommand {
|
|
|
6
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -11,6 +11,7 @@ export default class AuthSignup extends BaseCommand {
|
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -6,6 +6,7 @@ export default class AuthStatus extends BaseCommand {
|
|
|
6
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -9,6 +9,7 @@ export default class CanvasApply extends BaseCommand {
|
|
|
9
9
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -11,6 +11,7 @@ export default class CanvasAssetDownload extends BaseCommand {
|
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -9,6 +9,7 @@ export default class CanvasAssetGet extends BaseCommand {
|
|
|
9
9
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -8,6 +8,7 @@ export default class CanvasAssetList extends BaseCommand {
|
|
|
8
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -10,6 +10,7 @@ export default class CanvasAssetSelect extends BaseCommand {
|
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -10,6 +10,7 @@ export default class CanvasAssetUpload extends BaseCommand {
|
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -8,6 +8,7 @@ export default class CanvasContinuityAnalyze extends BaseCommand {
|
|
|
8
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -8,6 +8,7 @@ export default class CanvasEdgeConnect extends BaseCommand {
|
|
|
8
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -10,6 +10,7 @@ export default class CanvasEdgeDisconnect extends BaseCommand {
|
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -6,6 +6,7 @@ export default class CanvasEdgeList extends BaseCommand {
|
|
|
6
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasEpisodeCreate extends BaseCommand {
|
|
3
|
+
static flags: {
|
|
4
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
5
|
+
number: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
export default class CanvasEpisodeCreate extends BaseCommand {
|
|
5
|
+
static flags = {
|
|
6
|
+
...BaseCommand.baseFlags,
|
|
7
|
+
project: projectFlag,
|
|
8
|
+
number: Flags.integer({ required: true, min: 1, description: '集数' }),
|
|
9
|
+
name: Flags.string({ description: '分集名称' }),
|
|
10
|
+
};
|
|
11
|
+
async run() {
|
|
12
|
+
const { flags } = await this.parse(CanvasEpisodeCreate);
|
|
13
|
+
const { api } = await commandApi(flags);
|
|
14
|
+
this.print(await api.createCanvasEpisode(flags.project, flags.number, flags.name?.trim() || undefined));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasEpisodeList extends BaseCommand {
|
|
3
|
+
static flags: {
|
|
4
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
5
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
3
|
+
export default class CanvasEpisodeList extends BaseCommand {
|
|
4
|
+
static flags = { ...BaseCommand.baseFlags, project: projectFlag };
|
|
5
|
+
async run() {
|
|
6
|
+
const { flags } = await this.parse(CanvasEpisodeList);
|
|
7
|
+
const { api } = await commandApi(flags);
|
|
8
|
+
this.print(await api.listCanvasEpisodes(flags.project));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 跨项目复制画布资产;可明确指定目标项目中的目录。
|
|
4
|
+
* - --asset-id 源资产 ID(alias --asset)
|
|
5
|
+
* - --target-project 目标项目 ID
|
|
6
|
+
* - --target-episode-id 可选;指定复制品所属的目标分集
|
|
7
|
+
* - --target-folder-id 可选;省略时进入目标项目未分类
|
|
8
|
+
* - 失败码:FOLDER_FORBIDDEN / GONE
|
|
9
|
+
*/
|
|
10
|
+
export default class CanvasFolderCopyCrossProject extends BaseCommand {
|
|
11
|
+
static description: string;
|
|
12
|
+
static flags: {
|
|
13
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'asset-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'target-project': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'target-folder-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'target-episode-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* 跨项目复制画布资产;可明确指定目标项目中的目录。
|
|
6
|
+
* - --asset-id 源资产 ID(alias --asset)
|
|
7
|
+
* - --target-project 目标项目 ID
|
|
8
|
+
* - --target-episode-id 可选;指定复制品所属的目标分集
|
|
9
|
+
* - --target-folder-id 可选;省略时进入目标项目未分类
|
|
10
|
+
* - 失败码:FOLDER_FORBIDDEN / GONE
|
|
11
|
+
*/
|
|
12
|
+
export default class CanvasFolderCopyCrossProject extends BaseCommand {
|
|
13
|
+
static description = '跨项目复制画布资产(Copy canvas asset across projects)';
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.baseFlags,
|
|
16
|
+
project: projectFlag,
|
|
17
|
+
'asset-id': Flags.string({
|
|
18
|
+
description: '源资产 ID;可用 --asset 替代(Source asset id)',
|
|
19
|
+
required: true,
|
|
20
|
+
aliases: ['asset'],
|
|
21
|
+
}),
|
|
22
|
+
'target-project': Flags.string({
|
|
23
|
+
description: '目标项目 ID(Target project id)',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
'target-folder-id': Flags.string({
|
|
27
|
+
description: '目标目录 ID;省略则放入未分类(Target folder id; omit for Uncategorized)',
|
|
28
|
+
}),
|
|
29
|
+
'target-episode-id': Flags.string({
|
|
30
|
+
description: '目标分集 ID;省略则沿用服务端默认分集(Target canvas episode id)',
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
async run() {
|
|
34
|
+
const { flags } = await this.parse(CanvasFolderCopyCrossProject);
|
|
35
|
+
const rawTargetFolderId = flags['target-folder-id'];
|
|
36
|
+
const rawTargetEpisodeId = flags['target-episode-id'];
|
|
37
|
+
if (typeof rawTargetFolderId === 'string' && !rawTargetFolderId.trim()) {
|
|
38
|
+
this.error('--target-folder-id 不能为空白;省略该参数可复制到未分类');
|
|
39
|
+
}
|
|
40
|
+
if (typeof rawTargetEpisodeId === 'string' && !rawTargetEpisodeId.trim()) {
|
|
41
|
+
this.error('--target-episode-id 不能为空白;省略该参数可使用服务端默认分集');
|
|
42
|
+
}
|
|
43
|
+
const { api } = await commandApi(flags);
|
|
44
|
+
this.print(await api.copyAssetCrossProject(flags.project, {
|
|
45
|
+
assetId: flags['asset-id'],
|
|
46
|
+
targetProjectId: flags['target-project'],
|
|
47
|
+
targetFolderId: rawTargetFolderId?.trim() || null,
|
|
48
|
+
...(rawTargetEpisodeId ? { targetCanvasEpisodeId: rawTargetEpisodeId.trim() } : {}),
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 在画布项目下新建一个用户自建目录。
|
|
4
|
+
* - --name 必填;--parent-id 缺省时 parentId 显式置 null,服务端挂到项目根
|
|
5
|
+
* - 失败码:FOLDER_CONFLICT / FOLDER_INVALID_PARAMS
|
|
6
|
+
*/
|
|
7
|
+
export default class CanvasFolderCreate extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static flags: {
|
|
10
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'parent-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* 在画布项目下新建一个用户自建目录。
|
|
6
|
+
* - --name 必填;--parent-id 缺省时 parentId 显式置 null,服务端挂到项目根
|
|
7
|
+
* - 失败码:FOLDER_CONFLICT / FOLDER_INVALID_PARAMS
|
|
8
|
+
*/
|
|
9
|
+
export default class CanvasFolderCreate extends BaseCommand {
|
|
10
|
+
static description = '新建画布目录(Create canvas asset folder)';
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
project: projectFlag,
|
|
14
|
+
name: Flags.string({ description: '目录名称(Folder name)', required: true }),
|
|
15
|
+
'parent-id': Flags.string({
|
|
16
|
+
description: '父目录 ID;省略则挂到项目根(Parent folder id; omit for root)',
|
|
17
|
+
aliases: ['parent'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
const { flags } = await this.parse(CanvasFolderCreate);
|
|
22
|
+
const rawParent = flags['parent-id'];
|
|
23
|
+
// 显式传值时透传;缺省或空字符串 → null 表示挂到项目根(与服务端契约保持一致)
|
|
24
|
+
const parentId = typeof rawParent === 'string' && rawParent.length > 0 ? rawParent : null;
|
|
25
|
+
const { api } = await commandApi(flags);
|
|
26
|
+
this.print(await api.createFolder(flags.project, { name: flags.name, parentId }));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 软删画布目录(含引用拦截 + 30 天快照回滚窗口)
|
|
4
|
+
* - --folder-id 目标目录 ID(camelCase 别名 --folder 也可)
|
|
5
|
+
* - 失败码:FOLDER_PRESET_IMMUTABLE / FOLDER_IN_USE
|
|
6
|
+
*/
|
|
7
|
+
export default class CanvasFolderDelete extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static flags: {
|
|
10
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'folder-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* 软删画布目录(含引用拦截 + 30 天快照回滚窗口)
|
|
6
|
+
* - --folder-id 目标目录 ID(camelCase 别名 --folder 也可)
|
|
7
|
+
* - 失败码:FOLDER_PRESET_IMMUTABLE / FOLDER_IN_USE
|
|
8
|
+
*/
|
|
9
|
+
export default class CanvasFolderDelete extends BaseCommand {
|
|
10
|
+
static description = '软删画布目录(Soft-delete canvas asset folder)';
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
project: projectFlag,
|
|
14
|
+
'folder-id': Flags.string({
|
|
15
|
+
description: '目录 ID;可用 --folder 替代(Folder id)',
|
|
16
|
+
required: true,
|
|
17
|
+
aliases: ['folder'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
const { flags } = await this.parse(CanvasFolderDelete);
|
|
22
|
+
const { api } = await commandApi(flags);
|
|
23
|
+
this.print(await api.deleteFolder(flags.project, flags['folder-id']));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 列出画布目录(5 预设 + 用户子目录的树形结构)
|
|
4
|
+
* - 默认仅活跃目录(query 为空,依赖服务端默认行为)
|
|
5
|
+
* - --include-soft-deleted 携带 true 时返回含 deletedAt / purgeInDays / referencedBy 的回收站视图
|
|
6
|
+
*/
|
|
7
|
+
export default class CanvasFolderList extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static flags: {
|
|
10
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'include-soft-deleted': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* 列出画布目录(5 预设 + 用户子目录的树形结构)
|
|
6
|
+
* - 默认仅活跃目录(query 为空,依赖服务端默认行为)
|
|
7
|
+
* - --include-soft-deleted 携带 true 时返回含 deletedAt / purgeInDays / referencedBy 的回收站视图
|
|
8
|
+
*/
|
|
9
|
+
export default class CanvasFolderList extends BaseCommand {
|
|
10
|
+
static description = '列出画布目录树(List canvas asset folders)';
|
|
11
|
+
static flags = {
|
|
12
|
+
...BaseCommand.baseFlags,
|
|
13
|
+
project: projectFlag,
|
|
14
|
+
'include-soft-deleted': Flags.boolean({
|
|
15
|
+
description: '包含 30 天软删回收站目录(Include soft-deleted folders)',
|
|
16
|
+
default: false,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(CanvasFolderList);
|
|
21
|
+
// 默认空 query 走服务端默认行为;仅在用户显式开启回收站视图时追加参数
|
|
22
|
+
const query = flags['include-soft-deleted'] === true ? 'includeSoftDeleted=true' : '';
|
|
23
|
+
const { api } = await commandApi(flags);
|
|
24
|
+
this.print(await api.listFolders(flags.project, query));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 移动画布目录到新父目录(同项目内移动)
|
|
4
|
+
* - --folder-id 目标目录 ID(camelCase 别名 --folder 也可)
|
|
5
|
+
* - --parent-id 父目录 ID 必填(alias --parent);服务端契约字段为 newParentId
|
|
6
|
+
* - 失败码:FOLDER_CYCLE / FOLDER_INVALID_PARAMS
|
|
7
|
+
*/
|
|
8
|
+
export default class CanvasFolderMove extends BaseCommand {
|
|
9
|
+
static description: string;
|
|
10
|
+
static flags: {
|
|
11
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'folder-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'parent-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* 移动画布目录到新父目录(同项目内移动)
|
|
6
|
+
* - --folder-id 目标目录 ID(camelCase 别名 --folder 也可)
|
|
7
|
+
* - --parent-id 父目录 ID 必填(alias --parent);服务端契约字段为 newParentId
|
|
8
|
+
* - 失败码:FOLDER_CYCLE / FOLDER_INVALID_PARAMS
|
|
9
|
+
*/
|
|
10
|
+
export default class CanvasFolderMove extends BaseCommand {
|
|
11
|
+
static description = '移动画布目录(Move canvas asset folder)';
|
|
12
|
+
static flags = {
|
|
13
|
+
...BaseCommand.baseFlags,
|
|
14
|
+
project: projectFlag,
|
|
15
|
+
'folder-id': Flags.string({
|
|
16
|
+
description: '目录 ID;可用 --folder 替代(Folder id)',
|
|
17
|
+
required: true,
|
|
18
|
+
aliases: ['folder'],
|
|
19
|
+
}),
|
|
20
|
+
'parent-id': Flags.string({
|
|
21
|
+
description: '新父目录 ID(New parent folder id)',
|
|
22
|
+
required: true,
|
|
23
|
+
aliases: ['parent'],
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
const { flags } = await this.parse(CanvasFolderMove);
|
|
28
|
+
// 服务端契约:body 字段为 newParentId;调用方仅传字符串 ID(不允许传 null)
|
|
29
|
+
const { api } = await commandApi(flags);
|
|
30
|
+
this.print(await api.moveFolder(flags.project, flags['folder-id'], { newParentId: flags['parent-id'] }));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
/**
|
|
3
|
+
* 重命名画布目录(仅用户自建目录,preset 不可改)
|
|
4
|
+
* - --folder-id 目标目录 ID(camelCase 别名 --folder 也可)
|
|
5
|
+
* - --name 新名称
|
|
6
|
+
* - 失败码:FOLDER_PRESET_IMMUTABLE / FOLDER_NOT_FOUND
|
|
7
|
+
*/
|
|
8
|
+
export default class CanvasFolderRename extends BaseCommand {
|
|
9
|
+
static description: string;
|
|
10
|
+
static flags: {
|
|
11
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'folder-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|