Skip to content

Commit 27d2ebd

Browse files
committed
feat: use inquirer for generating spec
1 parent 83cb1f6 commit 27d2ebd

File tree

9 files changed

+641
-207
lines changed

9 files changed

+641
-207
lines changed

command-snapshot.json

Lines changed: 81 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,82 @@
11
[
2-
{
3-
"alias": [],
4-
"command": "agent:create",
5-
"flagAliases": [],
6-
"flagChars": ["f", "o"],
7-
"flags": ["api-version", "flags-dir", "json", "spec", "target-org"],
8-
"plugin": "@salesforce/plugin-agent"
9-
},
10-
{
11-
"alias": [],
12-
"command": "agent:create:spec",
13-
"flagAliases": [],
14-
"flagChars": ["d", "n", "o", "t"],
15-
"flags": [
16-
"api-version",
17-
"company-description",
18-
"company-name",
19-
"company-website",
20-
"flags-dir",
21-
"json",
22-
"name",
23-
"output-dir",
24-
"role",
25-
"target-org",
26-
"type"
27-
],
28-
"plugin": "@salesforce/plugin-agent"
29-
},
30-
{
31-
"alias": [],
32-
"command": "agent:test:cancel",
33-
"flagAliases": [],
34-
"flagChars": ["i", "o", "r"],
35-
"flags": ["flags-dir", "job-id", "json", "target-org", "use-most-recent"],
36-
"plugin": "@salesforce/plugin-agent"
37-
},
38-
{
39-
"alias": [],
40-
"command": "agent:test:run",
41-
"flagAliases": [],
42-
"flagChars": ["d", "i", "o", "w"],
43-
"flags": ["flags-dir", "id", "json", "output-dir", "target-org", "wait"],
44-
"plugin": "@salesforce/plugin-agent"
45-
}
46-
]
2+
{
3+
"alias": [],
4+
"command": "agent:create",
5+
"flagAliases": [],
6+
"flagChars": [
7+
"f",
8+
"o"
9+
],
10+
"flags": [
11+
"api-version",
12+
"flags-dir",
13+
"json",
14+
"spec",
15+
"target-org"
16+
],
17+
"plugin": "@salesforce/plugin-agent"
18+
},
19+
{
20+
"alias": [],
21+
"command": "agent:generate:spec",
22+
"flagAliases": [],
23+
"flagChars": [
24+
"d",
25+
"n",
26+
"o",
27+
"t"
28+
],
29+
"flags": [
30+
"api-version",
31+
"company-description",
32+
"company-name",
33+
"company-website",
34+
"flags-dir",
35+
"json",
36+
"name",
37+
"output-dir",
38+
"role",
39+
"target-org",
40+
"type"
41+
],
42+
"plugin": "@salesforce/plugin-agent"
43+
},
44+
{
45+
"alias": [],
46+
"command": "agent:test:cancel",
47+
"flagAliases": [],
48+
"flagChars": [
49+
"i",
50+
"o",
51+
"r"
52+
],
53+
"flags": [
54+
"flags-dir",
55+
"job-id",
56+
"json",
57+
"target-org",
58+
"use-most-recent"
59+
],
60+
"plugin": "@salesforce/plugin-agent"
61+
},
62+
{
63+
"alias": [],
64+
"command": "agent:test:run",
65+
"flagAliases": [],
66+
"flagChars": [
67+
"d",
68+
"i",
69+
"o",
70+
"w"
71+
],
72+
"flags": [
73+
"flags-dir",
74+
"id",
75+
"json",
76+
"output-dir",
77+
"target-org",
78+
"wait"
79+
],
80+
"plugin": "@salesforce/plugin-agent"
81+
}
82+
]

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
8+
"@inquirer/figures": "^1.0.7",
9+
"@inquirer/input": "^4.0.1",
10+
"@inquirer/select": "^4.0.1",
811
"@oclif/core": "^4",
912
"@salesforce/core": "^8.5.2",
1013
"@salesforce/kit": "^3.2.1",
11-
"@salesforce/sf-plugins-core": "^11.3.12"
14+
"@salesforce/sf-plugins-core": "^12",
15+
"ansis": "^3.3.2"
1216
},
1317
"devDependencies": {
1418
"@oclif/plugin-command-snapshot": "^5.2.19",

schemas/agent-create.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
"type": "string"
1313
}
1414
},
15-
"required": ["isSuccess"],
15+
"required": [
16+
"isSuccess"
17+
],
1618
"additionalProperties": false
1719
}
1820
}
19-
}
21+
}

schemas/agent-create-spec.json renamed to schemas/agent-generate-spec.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"type": "string"
1616
}
1717
},
18-
"required": ["isSuccess"],
18+
"required": [
19+
"isSuccess"
20+
],
1921
"additionalProperties": false
2022
}
2123
}
22-
}
24+
}

schemas/agent-test-cancel.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
"type": "string"
1919
}
2020
},
21-
"required": ["jobId", "success"],
21+
"required": [
22+
"jobId",
23+
"success"
24+
],
2225
"additionalProperties": false
2326
}
2427
}
25-
}
28+
}

schemas/agent-test-run.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
"type": "string"
1919
}
2020
},
21-
"required": ["jobId", "success"],
21+
"required": [
22+
"jobId",
23+
"success"
24+
],
2225
"additionalProperties": false
2326
}
2427
}
25-
}
28+
}

src/commands/agent/create/spec.ts

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)