@choiceopen/automation-plugin-cli 0.0.1

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.
@@ -0,0 +1,8 @@
1
+ import path from "node:path";
2
+ import { Eta } from "eta";
3
+ export const views = new Eta({
4
+ autoTrim: false,
5
+ autoEscape: false,
6
+ varName: "props",
7
+ views: path.join(import.meta.dirname, "../templates"),
8
+ });
@@ -0,0 +1,423 @@
1
+ {
2
+ "commands": {
3
+ "auth": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Manages your plugin via subcommands",
7
+ "examples": [
8
+ {
9
+ "command": "<%= config.bin %> help <%= command.id %> [COMMAND]",
10
+ "description": "Check help for each individual sub-command"
11
+ }
12
+ ],
13
+ "flags": {
14
+ "json": {
15
+ "description": "Format output as json.",
16
+ "helpGroup": "GLOBAL",
17
+ "name": "json",
18
+ "allowNo": false,
19
+ "type": "boolean"
20
+ }
21
+ },
22
+ "hasDynamicHelp": false,
23
+ "hidden": true,
24
+ "hiddenAliases": [],
25
+ "id": "auth",
26
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
27
+ "pluginName": "@choiceopen/automation-plugin-cli",
28
+ "pluginType": "core",
29
+ "strict": true,
30
+ "enableJsonFlag": true,
31
+ "isESM": true,
32
+ "relativePath": [
33
+ "dist",
34
+ "commands",
35
+ "auth",
36
+ "index.js"
37
+ ]
38
+ },
39
+ "auth:login": {
40
+ "aliases": [],
41
+ "args": {},
42
+ "description": "Uses device authorization flow to login with your Choiceform account by following these steps:\n\n1. Request a validation code automatically\n2. Show the validation code and a verification URL to the user\n3. Open the verification URL in the user's browser and paste the verification code\n4. Submit the validation code to complete the device authorization flow",
43
+ "examples": [
44
+ {
45
+ "command": "<%= config.bin %> <%= command.id %>",
46
+ "description": "Login by using device authorization flow"
47
+ }
48
+ ],
49
+ "flags": {},
50
+ "hasDynamicHelp": false,
51
+ "hiddenAliases": [],
52
+ "id": "auth:login",
53
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
54
+ "pluginName": "@choiceopen/automation-plugin-cli",
55
+ "pluginType": "core",
56
+ "strict": true,
57
+ "enableJsonFlag": false,
58
+ "isESM": true,
59
+ "relativePath": [
60
+ "dist",
61
+ "commands",
62
+ "auth",
63
+ "login.js"
64
+ ]
65
+ },
66
+ "plugin:checksum": {
67
+ "aliases": [],
68
+ "args": {
69
+ "file": {
70
+ "description": "file to read",
71
+ "name": "file"
72
+ }
73
+ },
74
+ "description": "describe the command here",
75
+ "examples": [
76
+ "<%= config.bin %> <%= command.id %>"
77
+ ],
78
+ "flags": {
79
+ "force": {
80
+ "char": "f",
81
+ "name": "force",
82
+ "allowNo": false,
83
+ "type": "boolean"
84
+ },
85
+ "name": {
86
+ "char": "n",
87
+ "description": "name to print",
88
+ "name": "name",
89
+ "hasDynamicHelp": false,
90
+ "multiple": false,
91
+ "type": "option"
92
+ }
93
+ },
94
+ "hasDynamicHelp": false,
95
+ "hiddenAliases": [],
96
+ "id": "plugin:checksum",
97
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
98
+ "pluginName": "@choiceopen/automation-plugin-cli",
99
+ "pluginType": "core",
100
+ "strict": true,
101
+ "enableJsonFlag": false,
102
+ "isESM": true,
103
+ "relativePath": [
104
+ "dist",
105
+ "commands",
106
+ "plugin",
107
+ "checksum.js"
108
+ ]
109
+ },
110
+ "plugin": {
111
+ "aliases": [],
112
+ "args": {},
113
+ "description": "Manages your plugin via subcommands",
114
+ "examples": [
115
+ {
116
+ "command": "<%= config.bin %> help <%= command.id %> [COMMAND]",
117
+ "description": "Check help for each individual sub-command"
118
+ }
119
+ ],
120
+ "flags": {
121
+ "json": {
122
+ "description": "Format output as json.",
123
+ "helpGroup": "GLOBAL",
124
+ "name": "json",
125
+ "allowNo": false,
126
+ "type": "boolean"
127
+ }
128
+ },
129
+ "hasDynamicHelp": false,
130
+ "hidden": true,
131
+ "hiddenAliases": [],
132
+ "id": "plugin",
133
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
134
+ "pluginName": "@choiceopen/automation-plugin-cli",
135
+ "pluginType": "core",
136
+ "strict": true,
137
+ "enableJsonFlag": true,
138
+ "isESM": true,
139
+ "relativePath": [
140
+ "dist",
141
+ "commands",
142
+ "plugin",
143
+ "index.js"
144
+ ]
145
+ },
146
+ "plugin:init": {
147
+ "aliases": [],
148
+ "args": {},
149
+ "description": "Initialize a new plugin with step-by-step interactive instructions.\n\nProviding required flags skips interactive flow and completes initialization in one go.",
150
+ "examples": [
151
+ {
152
+ "command": "<%= config.bin %> <%= command.id %>",
153
+ "description": "Start with interactive initialization:"
154
+ }
155
+ ],
156
+ "flags": {
157
+ "interactive": {
158
+ "char": "i",
159
+ "name": "interactive",
160
+ "summary": "Use interactive mode (by default)",
161
+ "allowNo": true,
162
+ "type": "boolean"
163
+ },
164
+ "name": {
165
+ "char": "n",
166
+ "name": "name",
167
+ "summary": "Plugin name",
168
+ "hasDynamicHelp": false,
169
+ "helpValue": "my-awesome-plugin",
170
+ "multiple": false,
171
+ "type": "option"
172
+ },
173
+ "description": {
174
+ "char": "d",
175
+ "name": "description",
176
+ "summary": "Short description",
177
+ "default": "",
178
+ "hasDynamicHelp": false,
179
+ "helpValue": "Descriptive text...",
180
+ "multiple": false,
181
+ "type": "option"
182
+ },
183
+ "author": {
184
+ "char": "a",
185
+ "name": "author",
186
+ "summary": "Author name",
187
+ "default": "",
188
+ "hasDynamicHelp": false,
189
+ "helpValue": "John Doe",
190
+ "multiple": false,
191
+ "type": "option"
192
+ },
193
+ "email": {
194
+ "char": "e",
195
+ "name": "email",
196
+ "summary": "Author email address",
197
+ "default": "",
198
+ "hasDynamicHelp": false,
199
+ "helpValue": "john.doe@example.com",
200
+ "multiple": false,
201
+ "type": "option"
202
+ },
203
+ "url": {
204
+ "char": "u",
205
+ "name": "url",
206
+ "summary": "Repository URL",
207
+ "default": "",
208
+ "hasDynamicHelp": false,
209
+ "multiple": false,
210
+ "type": "option"
211
+ },
212
+ "locales": {
213
+ "name": "locales",
214
+ "summary": "Provide READMEs in which languages",
215
+ "delimiter": ",",
216
+ "hasDynamicHelp": false,
217
+ "multiple": true,
218
+ "options": [
219
+ "en_US",
220
+ "zh_Hans",
221
+ "ja_JP"
222
+ ],
223
+ "type": "option"
224
+ },
225
+ "language": {
226
+ "char": "l",
227
+ "name": "language",
228
+ "summary": "Programming language to use for plugin development",
229
+ "hasDynamicHelp": false,
230
+ "multiple": false,
231
+ "options": [
232
+ "elixir",
233
+ "python",
234
+ "typescript"
235
+ ],
236
+ "type": "option"
237
+ },
238
+ "type": {
239
+ "char": "t",
240
+ "name": "type",
241
+ "summary": "Plugin type",
242
+ "hasDynamicHelp": false,
243
+ "multiple": false,
244
+ "options": [
245
+ "extension",
246
+ "llm",
247
+ "tool",
248
+ "trigger"
249
+ ],
250
+ "type": "option"
251
+ },
252
+ "permissions": {
253
+ "char": "p",
254
+ "name": "permissions",
255
+ "summary": "Permissions required by the plugin",
256
+ "delimiter": ",",
257
+ "hasDynamicHelp": false,
258
+ "multiple": true,
259
+ "options": [
260
+ "endpoints:register",
261
+ "model:call_llm",
262
+ "model:call_embedding",
263
+ "model:call_moderation",
264
+ "model:call_rerank",
265
+ "model:call_stt",
266
+ "model:call_tts",
267
+ "storage:kv",
268
+ "tools:invoke"
269
+ ],
270
+ "type": "option"
271
+ }
272
+ },
273
+ "hasDynamicHelp": false,
274
+ "hiddenAliases": [],
275
+ "id": "plugin:init",
276
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
277
+ "pluginName": "@choiceopen/automation-plugin-cli",
278
+ "pluginType": "core",
279
+ "strict": true,
280
+ "enableJsonFlag": false,
281
+ "isESM": true,
282
+ "relativePath": [
283
+ "dist",
284
+ "commands",
285
+ "plugin",
286
+ "init.js"
287
+ ]
288
+ },
289
+ "plugin:pack": {
290
+ "aliases": [],
291
+ "args": {
292
+ "file": {
293
+ "description": "file to read",
294
+ "name": "file"
295
+ }
296
+ },
297
+ "description": "describe the command here",
298
+ "examples": [
299
+ "<%= config.bin %> <%= command.id %>"
300
+ ],
301
+ "flags": {
302
+ "force": {
303
+ "char": "f",
304
+ "name": "force",
305
+ "allowNo": false,
306
+ "type": "boolean"
307
+ },
308
+ "name": {
309
+ "char": "n",
310
+ "description": "name to print",
311
+ "name": "name",
312
+ "hasDynamicHelp": false,
313
+ "multiple": false,
314
+ "type": "option"
315
+ }
316
+ },
317
+ "hasDynamicHelp": false,
318
+ "hiddenAliases": [],
319
+ "id": "plugin:pack",
320
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
321
+ "pluginName": "@choiceopen/automation-plugin-cli",
322
+ "pluginType": "core",
323
+ "strict": true,
324
+ "enableJsonFlag": false,
325
+ "isESM": true,
326
+ "relativePath": [
327
+ "dist",
328
+ "commands",
329
+ "plugin",
330
+ "pack.js"
331
+ ]
332
+ },
333
+ "plugin:permission": {
334
+ "aliases": [],
335
+ "args": {
336
+ "file": {
337
+ "description": "file to read",
338
+ "name": "file"
339
+ }
340
+ },
341
+ "description": "describe the command here",
342
+ "examples": [
343
+ "<%= config.bin %> <%= command.id %>"
344
+ ],
345
+ "flags": {
346
+ "force": {
347
+ "char": "f",
348
+ "name": "force",
349
+ "allowNo": false,
350
+ "type": "boolean"
351
+ },
352
+ "name": {
353
+ "char": "n",
354
+ "description": "name to print",
355
+ "name": "name",
356
+ "hasDynamicHelp": false,
357
+ "multiple": false,
358
+ "type": "option"
359
+ }
360
+ },
361
+ "hasDynamicHelp": false,
362
+ "hiddenAliases": [],
363
+ "id": "plugin:permission",
364
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
365
+ "pluginName": "@choiceopen/automation-plugin-cli",
366
+ "pluginType": "core",
367
+ "strict": true,
368
+ "enableJsonFlag": false,
369
+ "isESM": true,
370
+ "relativePath": [
371
+ "dist",
372
+ "commands",
373
+ "plugin",
374
+ "permission.js"
375
+ ]
376
+ },
377
+ "plugin:run": {
378
+ "aliases": [],
379
+ "args": {
380
+ "file": {
381
+ "description": "file to read",
382
+ "name": "file"
383
+ }
384
+ },
385
+ "description": "describe the command here",
386
+ "examples": [
387
+ "<%= config.bin %> <%= command.id %>"
388
+ ],
389
+ "flags": {
390
+ "force": {
391
+ "char": "f",
392
+ "name": "force",
393
+ "allowNo": false,
394
+ "type": "boolean"
395
+ },
396
+ "name": {
397
+ "char": "n",
398
+ "description": "name to print",
399
+ "name": "name",
400
+ "hasDynamicHelp": false,
401
+ "multiple": false,
402
+ "type": "option"
403
+ }
404
+ },
405
+ "hasDynamicHelp": false,
406
+ "hiddenAliases": [],
407
+ "id": "plugin:run",
408
+ "pluginAlias": "@choiceopen/automation-plugin-cli",
409
+ "pluginName": "@choiceopen/automation-plugin-cli",
410
+ "pluginType": "core",
411
+ "strict": true,
412
+ "enableJsonFlag": false,
413
+ "isESM": true,
414
+ "relativePath": [
415
+ "dist",
416
+ "commands",
417
+ "plugin",
418
+ "run.js"
419
+ ]
420
+ }
421
+ },
422
+ "version": "0.0.1"
423
+ }
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@choiceopen/automation-plugin-cli",
3
+ "version": "0.0.1",
4
+ "description": "A command-line utility for building and publishing Choiceform Automation Plugin.",
5
+ "keywords": [
6
+ "oclif"
7
+ ],
8
+ "homepage": "https://github.com/choice-open/automation-plugin-cli",
9
+ "bugs": "https://github.com/choice-open/automation-plugin-cli/issues",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/choice-open/automation-plugin-cli.git"
13
+ },
14
+ "license": "MIT",
15
+ "author": "Albert Yu",
16
+ "type": "module",
17
+ "main": "dist/index.js",
18
+ "types": "dist/index.d.ts",
19
+ "bin": {
20
+ "automation": "bin/run.js",
21
+ "cap": "bin/run.js"
22
+ },
23
+ "files": [
24
+ "./bin",
25
+ "./dist",
26
+ "./oclif.manifest.json"
27
+ ],
28
+ "scripts": {
29
+ "build": "shx rm -rf dist && tsc --build",
30
+ "check": "biome check --write",
31
+ "prepack": "oclif manifest && oclif readme",
32
+ "postpack": "shx rm -f oclif.manifest.json",
33
+ "test": "mocha --forbid-only \"test/**/*.test.ts\"",
34
+ "posttest": "npm run check",
35
+ "version": "oclif readme && git add README.md"
36
+ },
37
+ "oclif": {
38
+ "alias": [
39
+ "automation",
40
+ "cap"
41
+ ],
42
+ "bin": "automation",
43
+ "commands": "./dist/commands",
44
+ "dirname": "automation",
45
+ "helpOptions": {
46
+ "flagSortOrder": "none"
47
+ },
48
+ "plugins": [
49
+ "@oclif/plugin-autocomplete",
50
+ "@oclif/plugin-help",
51
+ "@oclif/plugin-version"
52
+ ],
53
+ "theme": "./theme.json",
54
+ "topicSeparator": " "
55
+ },
56
+ "dependencies": {
57
+ "@inquirer/checkbox": "^5.0.3",
58
+ "@inquirer/confirm": "^6.0.3",
59
+ "@inquirer/input": "^5.0.3",
60
+ "@inquirer/select": "^5.0.3",
61
+ "@oclif/core": "^4.8.0",
62
+ "@oclif/plugin-autocomplete": "^3.2.39",
63
+ "@oclif/plugin-help": "^6.2.36",
64
+ "@oclif/plugin-version": "^2.2.36",
65
+ "es-toolkit": "^1.43.0",
66
+ "eta": "^4.5.0",
67
+ "open": "^11.0.0",
68
+ "ts-dedent": "^2.2.0",
69
+ "yocto-spinner": "^1.0.0",
70
+ "zod": "^4.3.5"
71
+ },
72
+ "devDependencies": {
73
+ "@biomejs/biome": "2.3.11",
74
+ "@oclif/test": "^4.1.15",
75
+ "@types/chai": "4.3.20",
76
+ "@types/mocha": "10.0.10",
77
+ "@types/node": "20.19.27",
78
+ "chai": "4.5.0",
79
+ "mocha": "10.8.2",
80
+ "oclif": "^4.22.63",
81
+ "shx": "^0.4.0",
82
+ "ts-node": "^10.9.2",
83
+ "typescript": "^5.9.3"
84
+ },
85
+ "engines": {
86
+ "node": ">=20.0.0"
87
+ }
88
+ }