@spira-lab/cli 0.0.2 → 0.0.3
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 +2 -0
- package/dist/index.cjs +104 -4
- package/package.json +25 -2
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ npm install -g @spira-lab/cli
|
|
|
14
14
|
spira --help
|
|
15
15
|
spira auth login
|
|
16
16
|
spira ai models list
|
|
17
|
+
spira workflows create --name "Product launch workflow"
|
|
18
|
+
spira workflows update <workflowId> --workflow-definition-json '{"nodes":[],"edges":[]}'
|
|
17
19
|
```
|
|
18
20
|
|
|
19
21
|
Use `spira --json` when you need machine-readable output.
|
package/dist/index.cjs
CHANGED
|
@@ -20586,7 +20586,56 @@ var commandDefinitions = [
|
|
|
20586
20586
|
},
|
|
20587
20587
|
resultType: "workflowList",
|
|
20588
20588
|
examples: ["spira workflows list --limit 10"],
|
|
20589
|
-
relatedCommands: [
|
|
20589
|
+
relatedCommands: [
|
|
20590
|
+
"spira workflows get <workflowId>",
|
|
20591
|
+
"spira workflows create --name <name>",
|
|
20592
|
+
"spira workflows runs list <workflowId>"
|
|
20593
|
+
]
|
|
20594
|
+
},
|
|
20595
|
+
{
|
|
20596
|
+
path: ["workflows", "create"],
|
|
20597
|
+
purpose: "Create a canvas workflow.",
|
|
20598
|
+
options: [
|
|
20599
|
+
{ name: "name", flag: "--name <name>", description: "Workflow name.", type: "string", required: true },
|
|
20600
|
+
{
|
|
20601
|
+
name: "workflowDefinitionJson",
|
|
20602
|
+
flag: "--workflow-definition-json <json>",
|
|
20603
|
+
description: "Workflow definition JSON object with nodes and edges.",
|
|
20604
|
+
type: "json"
|
|
20605
|
+
},
|
|
20606
|
+
{
|
|
20607
|
+
name: "visibility",
|
|
20608
|
+
flag: "--visibility <visibility>",
|
|
20609
|
+
description: "Workflow visibility.",
|
|
20610
|
+
type: "string",
|
|
20611
|
+
enumValues: ["public", "private"]
|
|
20612
|
+
},
|
|
20613
|
+
{
|
|
20614
|
+
name: "surface",
|
|
20615
|
+
flag: "--surface <surface>",
|
|
20616
|
+
description: "Workflow access surface.",
|
|
20617
|
+
type: "string",
|
|
20618
|
+
enumValues: ["dashboard", "admin"],
|
|
20619
|
+
defaultValue: "dashboard"
|
|
20620
|
+
}
|
|
20621
|
+
],
|
|
20622
|
+
http: {
|
|
20623
|
+
method: "POST",
|
|
20624
|
+
path: "/api/cli/v1/workflows",
|
|
20625
|
+
authRequired: true,
|
|
20626
|
+
body: [
|
|
20627
|
+
{ name: "name", source: "option", from: "name" },
|
|
20628
|
+
{ name: "workflowDefinition", source: "option", from: "workflowDefinitionJson" },
|
|
20629
|
+
{ name: "visibility", source: "option", from: "visibility" },
|
|
20630
|
+
{ name: "surface", source: "option", from: "surface" }
|
|
20631
|
+
]
|
|
20632
|
+
},
|
|
20633
|
+
resultType: "workflowDetail",
|
|
20634
|
+
examples: [
|
|
20635
|
+
'spira workflows create --name "Product launch workflow"',
|
|
20636
|
+
`spira workflows create --name "Product launch workflow" --workflow-definition-json '{"nodes":[],"edges":[]}'`
|
|
20637
|
+
],
|
|
20638
|
+
relatedCommands: ["spira workflows get <workflowId>", "spira workflows update <workflowId>", "spira workflows runs start <workflowId>"]
|
|
20590
20639
|
},
|
|
20591
20640
|
{
|
|
20592
20641
|
path: ["workflows", "get"],
|
|
@@ -20611,7 +20660,58 @@ var commandDefinitions = [
|
|
|
20611
20660
|
},
|
|
20612
20661
|
resultType: "workflowDetail",
|
|
20613
20662
|
examples: ["spira workflows get wf_123"],
|
|
20614
|
-
relatedCommands: [
|
|
20663
|
+
relatedCommands: [
|
|
20664
|
+
"spira workflows update <workflowId>",
|
|
20665
|
+
"spira workflows runs start <workflowId>",
|
|
20666
|
+
"spira workflows runs list <workflowId>"
|
|
20667
|
+
]
|
|
20668
|
+
},
|
|
20669
|
+
{
|
|
20670
|
+
path: ["workflows", "update"],
|
|
20671
|
+
purpose: "Update a canvas workflow.",
|
|
20672
|
+
arguments: [{ name: "workflowId", description: "Workflow ID.", required: true }],
|
|
20673
|
+
options: [
|
|
20674
|
+
{ name: "name", flag: "--name <name>", description: "Workflow name.", type: "string" },
|
|
20675
|
+
{
|
|
20676
|
+
name: "workflowDefinitionJson",
|
|
20677
|
+
flag: "--workflow-definition-json <json>",
|
|
20678
|
+
description: "Workflow definition JSON object with nodes and edges.",
|
|
20679
|
+
type: "json"
|
|
20680
|
+
},
|
|
20681
|
+
{
|
|
20682
|
+
name: "visibility",
|
|
20683
|
+
flag: "--visibility <visibility>",
|
|
20684
|
+
description: "Workflow visibility.",
|
|
20685
|
+
type: "string",
|
|
20686
|
+
enumValues: ["public", "private"]
|
|
20687
|
+
},
|
|
20688
|
+
{
|
|
20689
|
+
name: "surface",
|
|
20690
|
+
flag: "--surface <surface>",
|
|
20691
|
+
description: "Workflow access surface.",
|
|
20692
|
+
type: "string",
|
|
20693
|
+
enumValues: ["dashboard", "admin"],
|
|
20694
|
+
defaultValue: "dashboard"
|
|
20695
|
+
}
|
|
20696
|
+
],
|
|
20697
|
+
http: {
|
|
20698
|
+
method: "PATCH",
|
|
20699
|
+
path: "/api/cli/v1/workflows/:workflowId",
|
|
20700
|
+
authRequired: true,
|
|
20701
|
+
pathParams: [{ name: "workflowId", source: "argument", from: "workflowId" }],
|
|
20702
|
+
body: [
|
|
20703
|
+
{ name: "name", source: "option", from: "name" },
|
|
20704
|
+
{ name: "workflowDefinition", source: "option", from: "workflowDefinitionJson" },
|
|
20705
|
+
{ name: "visibility", source: "option", from: "visibility" },
|
|
20706
|
+
{ name: "surface", source: "option", from: "surface" }
|
|
20707
|
+
]
|
|
20708
|
+
},
|
|
20709
|
+
resultType: "workflowDetail",
|
|
20710
|
+
examples: [
|
|
20711
|
+
'spira workflows update wf_123 --name "Updated workflow"',
|
|
20712
|
+
`spira workflows update wf_123 --workflow-definition-json '{"nodes":[],"edges":[]}'`
|
|
20713
|
+
],
|
|
20714
|
+
relatedCommands: ["spira workflows get <workflowId>", "spira workflows runs start <workflowId>"]
|
|
20615
20715
|
},
|
|
20616
20716
|
{
|
|
20617
20717
|
path: ["workflows", "runs", "list"],
|
|
@@ -21966,8 +22066,8 @@ function renderCommandIndex() {
|
|
|
21966
22066
|
`;
|
|
21967
22067
|
}
|
|
21968
22068
|
async function packageVersion() {
|
|
21969
|
-
if ("0.0.
|
|
21970
|
-
return "0.0.
|
|
22069
|
+
if ("0.0.3".length > 0) {
|
|
22070
|
+
return "0.0.3";
|
|
21971
22071
|
}
|
|
21972
22072
|
try {
|
|
21973
22073
|
const packageUrl = new URL("../package.json", import_meta.url);
|
package/package.json
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spira-lab/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Command line client for Spira.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
6
7
|
"bin": {
|
|
7
8
|
"spira": "dist/index.cjs"
|
|
8
9
|
},
|
|
9
|
-
"main": "./dist/index.cjs",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=20.0.0"
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public",
|
|
15
15
|
"registry": "https://registry.npmjs.org/"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"package.json",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "pnpm --filter @spira-ai/contracts build && node scripts/build.mjs && node scripts/fix-bin-mode.mjs",
|
|
24
|
+
"dev": "tsx src/index.ts",
|
|
25
|
+
"publish:public": "node scripts/publish.mjs",
|
|
26
|
+
"typecheck": "tsgo --noEmit -p tsconfig.json",
|
|
27
|
+
"test": "vitest run"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@typescript/native-preview": "catalog:",
|
|
31
|
+
"@spira-ai/contracts": "workspace:*",
|
|
32
|
+
"@types/node": "catalog:",
|
|
33
|
+
"commander": "^14.0.2",
|
|
34
|
+
"esbuild": "^0.27.1",
|
|
35
|
+
"tsx": "^4.22.4",
|
|
36
|
+
"typescript": "catalog:",
|
|
37
|
+
"vitest": "catalog:",
|
|
38
|
+
"zod": "catalog:"
|
|
16
39
|
}
|
|
17
40
|
}
|