@choiceopen/automation-plugin-cli 0.2.0 → 0.2.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/README.md CHANGED
@@ -1,7 +1,7 @@
1
- automation-plugin-cli
1
+ atomemo-plugin-cli
2
2
  =================
3
3
 
4
- A command-line utility for building and publishing Choiceform Automation Plugin.
4
+ A command-line utility for building and publishing Choiceform Atomemo Plugin.
5
5
 
6
6
 
7
7
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
@@ -17,37 +17,37 @@ A command-line utility for building and publishing Choiceform Automation Plugin.
17
17
  <!-- usage -->
18
18
  ```sh-session
19
19
  $ npm install -g @choiceopen/automation-plugin-cli
20
- $ automation COMMAND
20
+ $ atomemo COMMAND
21
21
  running command...
22
- $ automation (--version)
23
- @choiceopen/automation-plugin-cli/0.2.0 darwin-arm64 node-v24.13.0
24
- $ automation --help [COMMAND]
22
+ $ atomemo (--version)
23
+ @choiceopen/automation-plugin-cli/0.2.2 darwin-arm64 node-v24.13.0
24
+ $ atomemo --help [COMMAND]
25
25
  USAGE
26
- $ automation COMMAND
26
+ $ atomemo COMMAND
27
27
  ...
28
28
  ```
29
29
  <!-- usagestop -->
30
30
  # Commands
31
31
  <!-- commands -->
32
- * [`automation auth login`](#automation-auth-login)
33
- * [`automation auth status`](#automation-auth-status)
34
- * [`automation autocomplete [SHELL]`](#automation-autocomplete-shell)
35
- * [`automation help [COMMAND]`](#automation-help-command)
36
- * [`automation plugin checksum [FILE]`](#automation-plugin-checksum-file)
37
- * [`automation plugin init`](#automation-plugin-init)
38
- * [`automation plugin pack [FILE]`](#automation-plugin-pack-file)
39
- * [`automation plugin permission [FILE]`](#automation-plugin-permission-file)
40
- * [`automation plugin refresh-key`](#automation-plugin-refresh-key)
41
- * [`automation plugin run [FILE]`](#automation-plugin-run-file)
42
- * [`automation version`](#automation-version)
43
-
44
- ## `automation auth login`
32
+ * [`atomemo auth login`](#atomemo-auth-login)
33
+ * [`atomemo auth status`](#atomemo-auth-status)
34
+ * [`atomemo autocomplete [SHELL]`](#atomemo-autocomplete-shell)
35
+ * [`atomemo help [COMMAND]`](#atomemo-help-command)
36
+ * [`atomemo plugin checksum [FILE]`](#atomemo-plugin-checksum-file)
37
+ * [`atomemo plugin init`](#atomemo-plugin-init)
38
+ * [`atomemo plugin pack [FILE]`](#atomemo-plugin-pack-file)
39
+ * [`atomemo plugin permission [FILE]`](#atomemo-plugin-permission-file)
40
+ * [`atomemo plugin refresh-key`](#atomemo-plugin-refresh-key)
41
+ * [`atomemo plugin run [FILE]`](#atomemo-plugin-run-file)
42
+ * [`atomemo version`](#atomemo-version)
43
+
44
+ ## `atomemo auth login`
45
45
 
46
46
  Uses device authorization flow to login with your Choiceform account by following these steps:
47
47
 
48
48
  ```
49
49
  USAGE
50
- $ automation auth login
50
+ $ atomemo auth login
51
51
 
52
52
  DESCRIPTION
53
53
  Uses device authorization flow to login with your Choiceform account by following these steps:
@@ -60,18 +60,18 @@ DESCRIPTION
60
60
  EXAMPLES
61
61
  Login by using device authorization flow
62
62
 
63
- $ automation auth login
63
+ $ atomemo auth login
64
64
  ```
65
65
 
66
- _See code: [src/commands/auth/login.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/auth/login.ts)_
66
+ _See code: [src/commands/auth/login.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/auth/login.ts)_
67
67
 
68
- ## `automation auth status`
68
+ ## `atomemo auth status`
69
69
 
70
70
  Display the current authentication status.
71
71
 
72
72
  ```
73
73
  USAGE
74
- $ automation auth status
74
+ $ atomemo auth status
75
75
 
76
76
  DESCRIPTION
77
77
  Display the current authentication status.
@@ -82,18 +82,18 @@ DESCRIPTION
82
82
  EXAMPLES
83
83
  Check current authentication status
84
84
 
85
- $ automation auth status
85
+ $ atomemo auth status
86
86
  ```
87
87
 
88
- _See code: [src/commands/auth/status.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/auth/status.ts)_
88
+ _See code: [src/commands/auth/status.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/auth/status.ts)_
89
89
 
90
- ## `automation autocomplete [SHELL]`
90
+ ## `atomemo autocomplete [SHELL]`
91
91
 
92
92
  Display autocomplete installation instructions.
93
93
 
94
94
  ```
95
95
  USAGE
96
- $ automation autocomplete [SHELL] [-r]
96
+ $ atomemo autocomplete [SHELL] [-r]
97
97
 
98
98
  ARGUMENTS
99
99
  [SHELL] (zsh|bash|powershell) Shell type
@@ -105,26 +105,26 @@ DESCRIPTION
105
105
  Display autocomplete installation instructions.
106
106
 
107
107
  EXAMPLES
108
- $ automation autocomplete
108
+ $ atomemo autocomplete
109
109
 
110
- $ automation autocomplete bash
110
+ $ atomemo autocomplete bash
111
111
 
112
- $ automation autocomplete zsh
112
+ $ atomemo autocomplete zsh
113
113
 
114
- $ automation autocomplete powershell
114
+ $ atomemo autocomplete powershell
115
115
 
116
- $ automation autocomplete --refresh-cache
116
+ $ atomemo autocomplete --refresh-cache
117
117
  ```
118
118
 
119
119
  _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.39/src/commands/autocomplete/index.ts)_
120
120
 
121
- ## `automation help [COMMAND]`
121
+ ## `atomemo help [COMMAND]`
122
122
 
123
- Display help for automation.
123
+ Display help for atomemo.
124
124
 
125
125
  ```
126
126
  USAGE
127
- $ automation help [COMMAND...] [-n]
127
+ $ atomemo help [COMMAND...] [-n]
128
128
 
129
129
  ARGUMENTS
130
130
  [COMMAND...] Command to show help for.
@@ -133,18 +133,18 @@ FLAGS
133
133
  -n, --nested-commands Include all nested commands in the output.
134
134
 
135
135
  DESCRIPTION
136
- Display help for automation.
136
+ Display help for atomemo.
137
137
  ```
138
138
 
139
139
  _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
140
140
 
141
- ## `automation plugin checksum [FILE]`
141
+ ## `atomemo plugin checksum [FILE]`
142
142
 
143
143
  describe the command here
144
144
 
145
145
  ```
146
146
  USAGE
147
- $ automation plugin checksum [FILE] [-f] [-n <value>]
147
+ $ atomemo plugin checksum [FILE] [-f] [-n <value>]
148
148
 
149
149
  ARGUMENTS
150
150
  [FILE] file to read
@@ -157,19 +157,19 @@ DESCRIPTION
157
157
  describe the command here
158
158
 
159
159
  EXAMPLES
160
- $ automation plugin checksum
160
+ $ atomemo plugin checksum
161
161
  ```
162
162
 
163
- _See code: [src/commands/plugin/checksum.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/checksum.ts)_
163
+ _See code: [src/commands/plugin/checksum.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/checksum.ts)_
164
164
 
165
- ## `automation plugin init`
165
+ ## `atomemo plugin init`
166
166
 
167
167
  Initialize a new plugin with step-by-step interactive instructions.
168
168
 
169
169
  ```
170
170
  USAGE
171
- $ automation plugin init [-i] [-n my-awesome-plugin] [-d Descriptive
172
- text...] [-a John Doe] [-e john.doe@example.com] [-u <value>] [--locales en_US|zh_Hans|ja_JP...] [-l
171
+ $ atomemo plugin init [-i] [-n my-awesome-plugin] [-d Descriptive text...]
172
+ [-a John Doe] [-e john.doe@example.com] [-u <value>] [--locales en_US|zh_Hans|ja_JP...] [-l
173
173
  elixir|python|typescript] [-t extension|llm|tool|trigger]
174
174
 
175
175
  FLAGS
@@ -194,18 +194,18 @@ DESCRIPTION
194
194
  EXAMPLES
195
195
  Start with interactive initialization:
196
196
 
197
- $ automation plugin init
197
+ $ atomemo plugin init
198
198
  ```
199
199
 
200
- _See code: [src/commands/plugin/init.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/init.ts)_
200
+ _See code: [src/commands/plugin/init.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/init.ts)_
201
201
 
202
- ## `automation plugin pack [FILE]`
202
+ ## `atomemo plugin pack [FILE]`
203
203
 
204
204
  describe the command here
205
205
 
206
206
  ```
207
207
  USAGE
208
- $ automation plugin pack [FILE] [-f] [-n <value>]
208
+ $ atomemo plugin pack [FILE] [-f] [-n <value>]
209
209
 
210
210
  ARGUMENTS
211
211
  [FILE] file to read
@@ -218,18 +218,18 @@ DESCRIPTION
218
218
  describe the command here
219
219
 
220
220
  EXAMPLES
221
- $ automation plugin pack
221
+ $ atomemo plugin pack
222
222
  ```
223
223
 
224
- _See code: [src/commands/plugin/pack.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/pack.ts)_
224
+ _See code: [src/commands/plugin/pack.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/pack.ts)_
225
225
 
226
- ## `automation plugin permission [FILE]`
226
+ ## `atomemo plugin permission [FILE]`
227
227
 
228
228
  describe the command here
229
229
 
230
230
  ```
231
231
  USAGE
232
- $ automation plugin permission [FILE] [-f] [-n <value>]
232
+ $ atomemo plugin permission [FILE] [-f] [-n <value>]
233
233
 
234
234
  ARGUMENTS
235
235
  [FILE] file to read
@@ -242,35 +242,35 @@ DESCRIPTION
242
242
  describe the command here
243
243
 
244
244
  EXAMPLES
245
- $ automation plugin permission
245
+ $ atomemo plugin permission
246
246
  ```
247
247
 
248
- _See code: [src/commands/plugin/permission.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/permission.ts)_
248
+ _See code: [src/commands/plugin/permission.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/permission.ts)_
249
249
 
250
- ## `automation plugin refresh-key`
250
+ ## `atomemo plugin refresh-key`
251
251
 
252
252
  Refresh or create API Key for plugin debugging in development stage.
253
253
 
254
254
  ```
255
255
  USAGE
256
- $ automation plugin refresh-key
256
+ $ atomemo plugin refresh-key
257
257
 
258
258
  DESCRIPTION
259
259
  Refresh or create API Key for plugin debugging in development stage.
260
260
 
261
261
  EXAMPLES
262
- $ automation plugin refresh-key
262
+ $ atomemo plugin refresh-key
263
263
  ```
264
264
 
265
- _See code: [src/commands/plugin/refresh-key.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/refresh-key.ts)_
265
+ _See code: [src/commands/plugin/refresh-key.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/refresh-key.ts)_
266
266
 
267
- ## `automation plugin run [FILE]`
267
+ ## `atomemo plugin run [FILE]`
268
268
 
269
269
  describe the command here
270
270
 
271
271
  ```
272
272
  USAGE
273
- $ automation plugin run [FILE] [-f] [-n <value>]
273
+ $ atomemo plugin run [FILE] [-f] [-n <value>]
274
274
 
275
275
  ARGUMENTS
276
276
  [FILE] file to read
@@ -283,16 +283,16 @@ DESCRIPTION
283
283
  describe the command here
284
284
 
285
285
  EXAMPLES
286
- $ automation plugin run
286
+ $ atomemo plugin run
287
287
  ```
288
288
 
289
- _See code: [src/commands/plugin/run.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.0/src/commands/plugin/run.ts)_
289
+ _See code: [src/commands/plugin/run.ts](https://github.com/choice-open/automation-plugin-cli/blob/v0.2.2/src/commands/plugin/run.ts)_
290
290
 
291
- ## `automation version`
291
+ ## `atomemo version`
292
292
 
293
293
  ```
294
294
  USAGE
295
- $ automation version [--json] [--verbose]
295
+ $ atomemo version [--json] [--verbose]
296
296
 
297
297
  FLAGS
298
298
  --verbose Show additional information about the CLI.
@@ -23,7 +23,7 @@ export default class AuthLogin extends Command {
23
23
  ];
24
24
  static flags = {};
25
25
  pollingInterval = 5;
26
- client_id = "automation_plugin_cli";
26
+ client_id = "atomemo_plugin_cli";
27
27
  grant_type = "urn:ietf:params:oauth:grant-type:device_code";
28
28
  async run() {
29
29
  await this.parse(AuthLogin);
@@ -49,14 +49,14 @@ export default class AuthLogin extends Command {
49
49
  const session = await fetch(`${this.endpoint}/v1/auth/get-session`, {
50
50
  headers: {
51
51
  "Content-Type": "application/json",
52
- "User-Agent": "Choiceform (Automation Plugin CLI)",
52
+ "User-Agent": "Choiceform (Atomemo Plugin CLI)",
53
53
  Authorization: `Bearer ${result.access_token}`,
54
54
  },
55
55
  }).then((response) => response.json());
56
56
  this.log(colorize("greenBright", dedent `
57
57
  Welcome back, ${session.user.name} <${session.user.email}>!
58
58
  To create a new plugin, you can use the following command:
59
- \`${colorize("bold", colorize("yellowBright", "automation plugin init"))}\`
59
+ \`${colorize("bold", colorize("yellowBright", "atomemo plugin init"))}\`
60
60
  `));
61
61
  }
62
62
  async requestDeviceCode(endpoint) {
@@ -64,7 +64,7 @@ export default class AuthLogin extends Command {
64
64
  method: "POST",
65
65
  headers: {
66
66
  "Content-Type": "application/json",
67
- "User-Agent": "Choiceform (Automation Plugin CLI)",
67
+ "User-Agent": "Choiceform (Atomemo Plugin CLI)",
68
68
  },
69
69
  body: JSON.stringify({ client_id: this.client_id }),
70
70
  });
@@ -77,7 +77,7 @@ export default class AuthLogin extends Command {
77
77
  method: "POST",
78
78
  headers: {
79
79
  "Content-Type": "application/json",
80
- "User-Agent": "Choiceform (Automation Plugin CLI)",
80
+ "User-Agent": "Choiceform (Atomemo Plugin CLI)",
81
81
  },
82
82
  body: JSON.stringify({
83
83
  grant_type: this.grant_type,
@@ -20,7 +20,7 @@ export default class AuthStatus extends Command {
20
20
  await this.parse(AuthStatus);
21
21
  const config = await configStore.load();
22
22
  if (!config.auth?.access_token) {
23
- this.log(colorize("yellow", "Your device has not been authenticated yet. Please execute `automation auth login`."));
23
+ this.log(colorize("yellow", "Your device has not been authenticated yet. Please execute `atomemo auth login`."));
24
24
  return;
25
25
  }
26
26
  assert(config.auth?.endpoint, "Auth endpoint is required");
@@ -42,7 +42,7 @@ export default class AuthStatus extends Command {
42
42
  const response = await fetch(`${endpoint}/v1/auth/get-session`, {
43
43
  headers: {
44
44
  "Content-Type": "application/json",
45
- "User-Agent": "Choiceform (Automation Plugin CLI)",
45
+ "User-Agent": "Choiceform (Atomemo Plugin CLI)",
46
46
  Authorization: `Bearer ${accessToken}`,
47
47
  },
48
48
  });
@@ -89,7 +89,12 @@ export default class PluginInit extends Command {
89
89
  assert(flags.name, "flags.name should be valid here...");
90
90
  assert(flags.language, "flags.language should be valid here...");
91
91
  const generator = createPluginGenerator(flags.language, {
92
- props: { ...flags, createdAt: new Date().toISOString() },
92
+ props: {
93
+ ...flags,
94
+ createdAt: new Date().toISOString(),
95
+ date: new Date().toISOString().slice(0, 10),
96
+ year: new Date().getFullYear().toString(),
97
+ },
93
98
  target: path.join(process.cwd(), flags.name),
94
99
  });
95
100
  await generator.generate();
@@ -104,7 +109,7 @@ export default class PluginInit extends Command {
104
109
  if (!flags.interactive && !this.nameIsValid(flags.name)) {
105
110
  this.log(colorize("redBright", dedent `
106
111
  Without interactive mode, you should provide initial information manually.
107
- Use ${colorize("blue", "automation help plugin init")} to see all available options.
112
+ Use ${colorize("blue", "atomemo help plugin init")} to see all available options.
108
113
  `));
109
114
  this.exit(0);
110
115
  }
@@ -13,7 +13,7 @@ export default class PluginRefreshKey extends Command {
13
13
  // Step 1: Check access token
14
14
  const config = await configStore.load();
15
15
  if (!config.auth?.access_token) {
16
- this.log(colorize("red", "✗ You're not authenticated yet, please run 'automation auth login' first."));
16
+ this.log(colorize("red", "✗ You're not authenticated yet, please run 'atomemo auth login' first."));
17
17
  return process.exit(1);
18
18
  }
19
19
  try {
@@ -42,7 +42,7 @@ export default class PluginRefreshKey extends Command {
42
42
  method: "GET",
43
43
  headers: {
44
44
  "Content-Type": "application/json",
45
- "User-Agent": "Choiceform (Automation Plugin CLI)",
45
+ "User-Agent": "Choiceform (Atomemo Plugin CLI)",
46
46
  Authorization: `Bearer ${accessToken}`,
47
47
  },
48
48
  });
@@ -450,5 +450,5 @@
450
450
  ]
451
451
  }
452
452
  },
453
- "version": "0.2.0"
453
+ "version": "0.2.2"
454
454
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@choiceopen/automation-plugin-cli",
3
- "version": "0.2.0",
4
- "description": "A command-line utility for building and publishing Choiceform Automation Plugin.",
3
+ "version": "0.2.2",
4
+ "description": "A command-line utility for building and publishing Choiceform Atomemo Plugin.",
5
5
  "keywords": [
6
6
  "oclif"
7
7
  ],
@@ -17,7 +17,7 @@
17
17
  "main": "dist/index.js",
18
18
  "types": "dist/index.d.ts",
19
19
  "bin": {
20
- "automation": "bin/run.js",
20
+ "atomemo": "bin/run.js",
21
21
  "cap": "bin/run.js"
22
22
  },
23
23
  "files": [
@@ -36,12 +36,11 @@
36
36
  },
37
37
  "oclif": {
38
38
  "alias": [
39
- "automation",
40
- "cap"
39
+ "atomemo"
41
40
  ],
42
- "bin": "automation",
41
+ "bin": "atomemo",
43
42
  "commands": "./dist/commands",
44
- "dirname": "automation",
43
+ "dirname": "atomemo",
45
44
  "helpOptions": {
46
45
  "flagSortOrder": "none"
47
46
  },
@@ -54,10 +53,10 @@
54
53
  "topicSeparator": " "
55
54
  },
56
55
  "dependencies": {
57
- "@inquirer/checkbox": "^5.0.3",
56
+ "@inquirer/checkbox": "^5.0.4",
58
57
  "@inquirer/confirm": "^6.0.3",
59
- "@inquirer/input": "^5.0.3",
60
- "@inquirer/select": "^5.0.3",
58
+ "@inquirer/input": "^5.0.4",
59
+ "@inquirer/select": "^5.0.4",
61
60
  "@oclif/core": "^4.8.0",
62
61
  "@oclif/plugin-autocomplete": "^3.2.39",
63
62
  "@oclif/plugin-help": "^6.2.36",
@@ -77,7 +76,7 @@
77
76
  "@types/node": "20.19.27",
78
77
  "chai": "4.5.0",
79
78
  "mocha": "10.8.2",
80
- "oclif": "^4.22.63",
79
+ "oclif": "^4.22.65",
81
80
  "shx": "^0.4.0",
82
81
  "ts-node": "^10.9.2",
83
82
  "typescript": "^5.9.3"