@aswless_854771076/ai_short_studio_cli 0.1.144 → 0.1.145

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.
@@ -6,10 +6,6 @@ export default class CanvasWorkflowStatus extends BaseCommand {
6
6
  async run() {
7
7
  const { flags } = await this.parse(CanvasWorkflowStatus);
8
8
  const { api } = await commandApi(flags);
9
- const response = await api.canvasDocuments(flags.project);
10
- if (!response || typeof response !== 'object' || !('workflow' in response)) {
11
- throw new Error('服务端未返回 Hypit 工作流状态');
12
- }
13
- this.print(response.workflow);
9
+ this.print(await api.canvasWorkflowStatus(flags.project));
14
10
  }
15
11
  }
@@ -119,6 +119,7 @@ export declare class VvicatApi {
119
119
  }>;
120
120
  canvasDocumentStatus(projectId: string, nodeId: string): Promise<JsonObject>;
121
121
  canvasDocuments(projectId: string): Promise<JsonObject>;
122
+ canvasWorkflowStatus(projectId: string): Promise<JsonObject>;
122
123
  listEdges(projectId: string): Promise<JsonObject[]>;
123
124
  inspectCanvas(projectId: string, options: CanvasInspectOptions): Promise<JsonObject>;
124
125
  continuityAnalysis(projectId: string): Promise<JsonObject>;
@@ -168,6 +168,15 @@ export class VvicatApi {
168
168
  canvasDocuments(projectId) {
169
169
  return this.client.request(`/api/projects/${projectId}/canvas/documents`);
170
170
  }
171
+ async canvasWorkflowStatus(projectId) {
172
+ const response = await this.canvasDocuments(projectId);
173
+ const workflow = response && typeof response === 'object' && !Array.isArray(response)
174
+ ? response.workflow : undefined;
175
+ if (!workflow || typeof workflow !== 'object' || Array.isArray(workflow)) {
176
+ throw new Error('服务端未返回 Hypit 工作流状态');
177
+ }
178
+ return workflow;
179
+ }
171
180
  async listEdges(projectId) {
172
181
  return (await this.canvas(projectId)).edges;
173
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aswless_854771076/ai_short_studio_cli",
3
- "version": "0.1.144",
3
+ "version": "0.1.145",
4
4
  "description": "VVICAT 无限画布项目命令行工具",
5
5
  "license": "MIT",
6
6
  "private": false,