@cargo-ai/cli 1.0.1 → 1.0.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/build/commands/orchestration/batch.d.ts.map +1 -1
- package/build/commands/orchestration/batch.js +7 -1
- package/build/commands/orchestration/node.d.ts.map +1 -1
- package/build/commands/orchestration/node.js +11 -0
- package/build/commands/orchestration/run.d.ts.map +1 -1
- package/build/commands/orchestration/run.js +6 -2
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAiLN"}
|
|
@@ -59,12 +59,18 @@ export function registerBatchCommands(parent, getApi) {
|
|
|
59
59
|
batch
|
|
60
60
|
.command("create")
|
|
61
61
|
.description("Create a batch")
|
|
62
|
-
.
|
|
62
|
+
.option("--workflow-uuid <uuid>", "Workflow UUID")
|
|
63
63
|
.requiredOption("--data <json>", 'Batch data (JSON, e.g. {"kind":"segment","segmentUuid":"..."} or {"kind":"file","s3Filename":"..."})')
|
|
64
|
+
.option("--release-uuid <uuid>", "Release UUID")
|
|
65
|
+
.option("--nodes <json>", 'Custom nodes to override the workflow definition (JSON array). Must include a start node (slug:"start") and an end node (slug:"end"). E.g. [{"uuid":"a","slug":"start","kind":"native","actionSlug":"start","config":{},"childrenUuids":["b"],"fallbackOnFailure":false,"position":{"x":0,"y":0}},{"uuid":"b","slug":"end","kind":"native","actionSlug":"end","config":{},"childrenUuids":[],"fallbackOnFailure":false,"position":{"x":1,"y":0}}]')
|
|
64
66
|
.action(async (opts) => {
|
|
65
67
|
const api = getApi();
|
|
66
68
|
const result = await handleApiCall(() => api.orchestration.batch.create({
|
|
67
69
|
workflowUuid: opts.workflowUuid,
|
|
70
|
+
releaseUuid: opts.releaseUuid,
|
|
71
|
+
nodes: opts.nodes !== undefined
|
|
72
|
+
? parseJson(opts.nodes, "--nodes")
|
|
73
|
+
: undefined,
|
|
68
74
|
data: parseJson(opts.data, "--data"),
|
|
69
75
|
}));
|
|
70
76
|
outputJson(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA+E7E"}
|
|
@@ -18,6 +18,17 @@ export function registerNodeCommands(parent, getApi) {
|
|
|
18
18
|
}));
|
|
19
19
|
outputJson(result);
|
|
20
20
|
});
|
|
21
|
+
node
|
|
22
|
+
.command("validate")
|
|
23
|
+
.description("Validate nodes")
|
|
24
|
+
.requiredOption("--nodes <json>", "Array of node definitions (JSON array)")
|
|
25
|
+
.action(async (opts) => {
|
|
26
|
+
const api = getApi();
|
|
27
|
+
const result = await handleApiCall(() => api.orchestration.node.validate({
|
|
28
|
+
nodes: parseJson(opts.nodes, "--nodes"),
|
|
29
|
+
}));
|
|
30
|
+
outputJson(result);
|
|
31
|
+
});
|
|
21
32
|
node
|
|
22
33
|
.command("execute")
|
|
23
34
|
.description("Execute a node")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA0T5E"}
|
|
@@ -59,15 +59,19 @@ export function registerRunCommands(parent, getApi) {
|
|
|
59
59
|
run
|
|
60
60
|
.command("create")
|
|
61
61
|
.description("Create a run")
|
|
62
|
-
.
|
|
63
|
-
.requiredOption("--data <json>",
|
|
62
|
+
.option("--workflow-uuid <uuid>", "Workflow UUID")
|
|
63
|
+
.requiredOption("--data <json>", "Run data (JSON, e.g. {...})")
|
|
64
64
|
.option("--release-uuid <uuid>", "Release UUID")
|
|
65
|
+
.option("--nodes <json>", 'Custom nodes to override the workflow definition (JSON array). Must include a start node (slug:"start") and an end node (slug:"end"). E.g. [{"uuid":"a","slug":"start","kind":"native","actionSlug":"start","config":{},"childrenUuids":["b"],"fallbackOnFailure":false,"position":{"x":0,"y":0}},{"uuid":"b","slug":"end","kind":"native","actionSlug":"end","config":{},"childrenUuids":[],"fallbackOnFailure":false,"position":{"x":1,"y":0}}]')
|
|
65
66
|
.action(async (opts) => {
|
|
66
67
|
const data = parseJson(opts.data, "--data");
|
|
67
68
|
const api = getApi();
|
|
68
69
|
const result = await handleApiCall(() => api.orchestration.run.create({
|
|
69
70
|
workflowUuid: opts.workflowUuid,
|
|
70
71
|
releaseUuid: opts.releaseUuid,
|
|
72
|
+
nodes: opts.nodes !== undefined
|
|
73
|
+
? parseJson(opts.nodes, "--nodes")
|
|
74
|
+
: undefined,
|
|
71
75
|
data,
|
|
72
76
|
}));
|
|
73
77
|
outputJson(result);
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line interface for the Cargo API",
|
|
6
6
|
"engines": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"commander": "^12.1.0",
|
|
32
|
-
"@cargo-ai/api": "^1.0.
|
|
32
|
+
"@cargo-ai/api": "^1.0.9"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@cargo-ai/eslint-config": "*",
|