@depup/oclif 4.22.92-depup.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.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +7 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +7 -0
- package/changes.json +62 -0
- package/lib/aws.d.ts +22 -0
- package/lib/aws.js +146 -0
- package/lib/commands/generate/command.d.ts +12 -0
- package/lib/commands/generate/command.js +44 -0
- package/lib/commands/generate/hook.d.ts +12 -0
- package/lib/commands/generate/hook.js +87 -0
- package/lib/commands/generate.d.ts +67 -0
- package/lib/commands/generate.js +269 -0
- package/lib/commands/init.d.ts +39 -0
- package/lib/commands/init.js +165 -0
- package/lib/commands/lock.d.ts +4 -0
- package/lib/commands/lock.js +70 -0
- package/lib/commands/manifest.d.ts +13 -0
- package/lib/commands/manifest.js +156 -0
- package/lib/commands/pack/deb.d.ts +13 -0
- package/lib/commands/pack/deb.js +194 -0
- package/lib/commands/pack/macos.d.ts +14 -0
- package/lib/commands/pack/macos.js +273 -0
- package/lib/commands/pack/tarballs.d.ts +15 -0
- package/lib/commands/pack/tarballs.js +77 -0
- package/lib/commands/pack/win.d.ts +16 -0
- package/lib/commands/pack/win.js +398 -0
- package/lib/commands/promote.d.ts +20 -0
- package/lib/commands/promote.js +305 -0
- package/lib/commands/readme.d.ts +19 -0
- package/lib/commands/readme.js +143 -0
- package/lib/commands/upload/deb.d.ts +10 -0
- package/lib/commands/upload/deb.js +113 -0
- package/lib/commands/upload/macos.d.ts +11 -0
- package/lib/commands/upload/macos.js +92 -0
- package/lib/commands/upload/tarballs.d.ts +12 -0
- package/lib/commands/upload/tarballs.js +135 -0
- package/lib/commands/upload/win.d.ts +11 -0
- package/lib/commands/upload/win.js +97 -0
- package/lib/generator.d.ts +57 -0
- package/lib/generator.js +184 -0
- package/lib/help-compatibility.d.ts +11 -0
- package/lib/help-compatibility.js +22 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -0
- package/lib/log.d.ts +2 -0
- package/lib/log.js +13 -0
- package/lib/readme-generator.d.ts +38 -0
- package/lib/readme-generator.js +305 -0
- package/lib/tarballs/bin.d.ts +7 -0
- package/lib/tarballs/bin.js +126 -0
- package/lib/tarballs/build.d.ts +10 -0
- package/lib/tarballs/build.js +250 -0
- package/lib/tarballs/config.d.ts +45 -0
- package/lib/tarballs/config.js +132 -0
- package/lib/tarballs/index.d.ts +4 -0
- package/lib/tarballs/index.js +20 -0
- package/lib/tarballs/node.d.ts +10 -0
- package/lib/tarballs/node.js +78 -0
- package/lib/upload-util.d.ts +17 -0
- package/lib/upload-util.js +56 -0
- package/lib/util.d.ts +18 -0
- package/lib/util.js +160 -0
- package/lib/version-indexes.d.ts +9 -0
- package/lib/version-indexes.js +119 -0
- package/oclif.manifest.json +1199 -0
- package/package.json +217 -0
- package/templates/cli/commonjs/.mocharc.json.ejs +11 -0
- package/templates/cli/commonjs/.vscode/launch.json.ejs +20 -0
- package/templates/cli/commonjs/bin/dev.cmd.ejs +3 -0
- package/templates/cli/commonjs/bin/dev.js.ejs +7 -0
- package/templates/cli/commonjs/bin/run.cmd.ejs +3 -0
- package/templates/cli/commonjs/bin/run.js.ejs +7 -0
- package/templates/cli/commonjs/eslint.config.mjs.ejs +19 -0
- package/templates/cli/commonjs/tsconfig.json.ejs +11 -0
- package/templates/cli/esm/.mocharc.json.ejs +15 -0
- package/templates/cli/esm/.vscode/launch.json.ejs +22 -0
- package/templates/cli/esm/bin/dev.cmd.ejs +3 -0
- package/templates/cli/esm/bin/dev.js.ejs +5 -0
- package/templates/cli/esm/bin/run.cmd.ejs +3 -0
- package/templates/cli/esm/bin/run.js.ejs +5 -0
- package/templates/cli/esm/eslint.config.mjs.ejs +9 -0
- package/templates/cli/esm/tsconfig.json.ejs +15 -0
- package/templates/cli/shared/.github/workflows/onPushToMain.yml.ejs +56 -0
- package/templates/cli/shared/.github/workflows/onRelease.yml.ejs +21 -0
- package/templates/cli/shared/.github/workflows/test.yml.ejs +23 -0
- package/templates/cli/shared/.gitignore.ejs +27 -0
- package/templates/cli/shared/.prettierrc.json.ejs +1 -0
- package/templates/cli/shared/README.md.ejs +396 -0
- package/templates/cli/shared/package.json.ejs +73 -0
- package/templates/cli/shared/src/commands/hello/index.ts.ejs +22 -0
- package/templates/cli/shared/src/commands/hello/world.ts.ejs +16 -0
- package/templates/cli/shared/src/index.ts.ejs +1 -0
- package/templates/cli/shared/test/commands/hello/index.test.ts.ejs +9 -0
- package/templates/cli/shared/test/commands/hello/world.test.ts.ejs +9 -0
- package/templates/cli/shared/test/tsconfig.json.ejs +9 -0
- package/templates/src/command.ts.ejs +27 -0
- package/templates/src/hook.ts.ejs +7 -0
- package/templates/src/init/dev.cmd.ejs +12 -0
- package/templates/src/init/dev.js.ejs +17 -0
- package/templates/src/init/run.cmd.ejs +3 -0
- package/templates/src/init/run.js.ejs +17 -0
- package/templates/test/command.test.ts.ejs +14 -0
- package/templates/test/hook.test.ts.ejs +9 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
<%- name %>
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
<%- description %>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
[](https://oclif.io)
|
|
8
|
+
[](https://npmjs.org/package/<%- name %>)
|
|
9
|
+
[](https://npmjs.org/package/<%- name %>)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<!-- toc -->
|
|
13
|
+
* [Usage](#usage)
|
|
14
|
+
* [Commands](#commands)
|
|
15
|
+
<!-- tocstop -->
|
|
16
|
+
# Usage
|
|
17
|
+
<!-- usage -->
|
|
18
|
+
```sh-session
|
|
19
|
+
$ npm install -g mycli123
|
|
20
|
+
$ mycli123 COMMAND
|
|
21
|
+
running command...
|
|
22
|
+
$ mycli123 (--version)
|
|
23
|
+
mycli123/0.0.0 darwin-arm64 node-v20.12.2
|
|
24
|
+
$ mycli123 --help [COMMAND]
|
|
25
|
+
USAGE
|
|
26
|
+
$ mycli123 COMMAND
|
|
27
|
+
...
|
|
28
|
+
```
|
|
29
|
+
<!-- usagestop -->
|
|
30
|
+
# Commands
|
|
31
|
+
<!-- commands -->
|
|
32
|
+
* [`mycli123 hello PERSON`](#mycli123-hello-person)
|
|
33
|
+
* [`mycli123 hello world`](#mycli123-hello-world)
|
|
34
|
+
* [`mycli123 help [COMMAND]`](#mycli123-help-command)
|
|
35
|
+
* [`mycli123 plugins`](#mycli123-plugins)
|
|
36
|
+
* [`mycli123 plugins add PLUGIN`](#mycli123-plugins-add-plugin)
|
|
37
|
+
* [`mycli123 plugins:inspect PLUGIN...`](#mycli123-pluginsinspect-plugin)
|
|
38
|
+
* [`mycli123 plugins install PLUGIN`](#mycli123-plugins-install-plugin)
|
|
39
|
+
* [`mycli123 plugins link PATH`](#mycli123-plugins-link-path)
|
|
40
|
+
* [`mycli123 plugins remove [PLUGIN]`](#mycli123-plugins-remove-plugin)
|
|
41
|
+
* [`mycli123 plugins reset`](#mycli123-plugins-reset)
|
|
42
|
+
* [`mycli123 plugins uninstall [PLUGIN]`](#mycli123-plugins-uninstall-plugin)
|
|
43
|
+
* [`mycli123 plugins unlink [PLUGIN]`](#mycli123-plugins-unlink-plugin)
|
|
44
|
+
* [`mycli123 plugins update`](#mycli123-plugins-update)
|
|
45
|
+
|
|
46
|
+
## `mycli123 hello PERSON`
|
|
47
|
+
|
|
48
|
+
Say hello
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
USAGE
|
|
52
|
+
$ mycli123 hello PERSON -f <value>
|
|
53
|
+
|
|
54
|
+
ARGUMENTS
|
|
55
|
+
PERSON Person to say hello to
|
|
56
|
+
|
|
57
|
+
FLAGS
|
|
58
|
+
-f, --from=<value> (required) Who is saying hello
|
|
59
|
+
|
|
60
|
+
DESCRIPTION
|
|
61
|
+
Say hello
|
|
62
|
+
|
|
63
|
+
EXAMPLES
|
|
64
|
+
$ mycli123 hello friend --from oclif
|
|
65
|
+
hello friend from oclif! (./src/commands/hello/index.ts)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
_See code: [src/commands/hello/index.ts](https://github.com/mdonnalley/mycli123/blob/v0.0.0/src/commands/hello/index.ts)_
|
|
69
|
+
|
|
70
|
+
## `mycli123 hello world`
|
|
71
|
+
|
|
72
|
+
Say hello world
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
USAGE
|
|
76
|
+
$ mycli123 hello world
|
|
77
|
+
|
|
78
|
+
DESCRIPTION
|
|
79
|
+
Say hello world
|
|
80
|
+
|
|
81
|
+
EXAMPLES
|
|
82
|
+
$ mycli123 hello world
|
|
83
|
+
hello world! (./src/commands/hello/world.ts)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
_See code: [src/commands/hello/world.ts](https://github.com/mdonnalley/mycli123/blob/v0.0.0/src/commands/hello/world.ts)_
|
|
87
|
+
|
|
88
|
+
## `mycli123 help [COMMAND]`
|
|
89
|
+
|
|
90
|
+
Display help for mycli123.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
USAGE
|
|
94
|
+
$ mycli123 help [COMMAND...] [-n]
|
|
95
|
+
|
|
96
|
+
ARGUMENTS
|
|
97
|
+
COMMAND... Command to show help for.
|
|
98
|
+
|
|
99
|
+
FLAGS
|
|
100
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
101
|
+
|
|
102
|
+
DESCRIPTION
|
|
103
|
+
Display help for mycli123.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.21/src/commands/help.ts)_
|
|
107
|
+
|
|
108
|
+
## `mycli123 plugins`
|
|
109
|
+
|
|
110
|
+
List installed plugins.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
USAGE
|
|
114
|
+
$ mycli123 plugins [--json] [--core]
|
|
115
|
+
|
|
116
|
+
FLAGS
|
|
117
|
+
--core Show core plugins.
|
|
118
|
+
|
|
119
|
+
GLOBAL FLAGS
|
|
120
|
+
--json Format output as json.
|
|
121
|
+
|
|
122
|
+
DESCRIPTION
|
|
123
|
+
List installed plugins.
|
|
124
|
+
|
|
125
|
+
EXAMPLES
|
|
126
|
+
$ mycli123 plugins
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/index.ts)_
|
|
130
|
+
|
|
131
|
+
## `mycli123 plugins add PLUGIN`
|
|
132
|
+
|
|
133
|
+
Installs a plugin into mycli123.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
USAGE
|
|
137
|
+
$ mycli123 plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
|
|
138
|
+
|
|
139
|
+
ARGUMENTS
|
|
140
|
+
PLUGIN... Plugin to install.
|
|
141
|
+
|
|
142
|
+
FLAGS
|
|
143
|
+
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
|
|
144
|
+
-h, --help Show CLI help.
|
|
145
|
+
-s, --silent Silences npm output.
|
|
146
|
+
-v, --verbose Show verbose npm output.
|
|
147
|
+
|
|
148
|
+
GLOBAL FLAGS
|
|
149
|
+
--json Format output as json.
|
|
150
|
+
|
|
151
|
+
DESCRIPTION
|
|
152
|
+
Installs a plugin into mycli123.
|
|
153
|
+
|
|
154
|
+
Uses bundled npm executable to install plugins into /Users/mdonnalley/.local/share/mycli123
|
|
155
|
+
|
|
156
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
157
|
+
|
|
158
|
+
Use the MYCLI123_NPM_LOG_LEVEL environment variable to set the npm loglevel.
|
|
159
|
+
Use the MYCLI123_NPM_REGISTRY environment variable to set the npm registry.
|
|
160
|
+
|
|
161
|
+
ALIASES
|
|
162
|
+
$ mycli123 plugins add
|
|
163
|
+
|
|
164
|
+
EXAMPLES
|
|
165
|
+
Install a plugin from npm registry.
|
|
166
|
+
|
|
167
|
+
$ mycli123 plugins add myplugin
|
|
168
|
+
|
|
169
|
+
Install a plugin from a github url.
|
|
170
|
+
|
|
171
|
+
$ mycli123 plugins add https://github.com/someuser/someplugin
|
|
172
|
+
|
|
173
|
+
Install a plugin from a github slug.
|
|
174
|
+
|
|
175
|
+
$ mycli123 plugins add someuser/someplugin
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## `mycli123 plugins:inspect PLUGIN...`
|
|
179
|
+
|
|
180
|
+
Displays installation properties of a plugin.
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
USAGE
|
|
184
|
+
$ mycli123 plugins inspect PLUGIN...
|
|
185
|
+
|
|
186
|
+
ARGUMENTS
|
|
187
|
+
PLUGIN... [default: .] Plugin to inspect.
|
|
188
|
+
|
|
189
|
+
FLAGS
|
|
190
|
+
-h, --help Show CLI help.
|
|
191
|
+
-v, --verbose
|
|
192
|
+
|
|
193
|
+
GLOBAL FLAGS
|
|
194
|
+
--json Format output as json.
|
|
195
|
+
|
|
196
|
+
DESCRIPTION
|
|
197
|
+
Displays installation properties of a plugin.
|
|
198
|
+
|
|
199
|
+
EXAMPLES
|
|
200
|
+
$ mycli123 plugins inspect myplugin
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/inspect.ts)_
|
|
204
|
+
|
|
205
|
+
## `mycli123 plugins install PLUGIN`
|
|
206
|
+
|
|
207
|
+
Installs a plugin into mycli123.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
USAGE
|
|
211
|
+
$ mycli123 plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
|
|
212
|
+
|
|
213
|
+
ARGUMENTS
|
|
214
|
+
PLUGIN... Plugin to install.
|
|
215
|
+
|
|
216
|
+
FLAGS
|
|
217
|
+
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
|
|
218
|
+
-h, --help Show CLI help.
|
|
219
|
+
-s, --silent Silences npm output.
|
|
220
|
+
-v, --verbose Show verbose npm output.
|
|
221
|
+
|
|
222
|
+
GLOBAL FLAGS
|
|
223
|
+
--json Format output as json.
|
|
224
|
+
|
|
225
|
+
DESCRIPTION
|
|
226
|
+
Installs a plugin into mycli123.
|
|
227
|
+
|
|
228
|
+
Uses bundled npm executable to install plugins into /Users/mdonnalley/.local/share/mycli123
|
|
229
|
+
|
|
230
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
231
|
+
|
|
232
|
+
Use the MYCLI123_NPM_LOG_LEVEL environment variable to set the npm loglevel.
|
|
233
|
+
Use the MYCLI123_NPM_REGISTRY environment variable to set the npm registry.
|
|
234
|
+
|
|
235
|
+
ALIASES
|
|
236
|
+
$ mycli123 plugins add
|
|
237
|
+
|
|
238
|
+
EXAMPLES
|
|
239
|
+
Install a plugin from npm registry.
|
|
240
|
+
|
|
241
|
+
$ mycli123 plugins install myplugin
|
|
242
|
+
|
|
243
|
+
Install a plugin from a github url.
|
|
244
|
+
|
|
245
|
+
$ mycli123 plugins install https://github.com/someuser/someplugin
|
|
246
|
+
|
|
247
|
+
Install a plugin from a github slug.
|
|
248
|
+
|
|
249
|
+
$ mycli123 plugins install someuser/someplugin
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/install.ts)_
|
|
253
|
+
|
|
254
|
+
## `mycli123 plugins link PATH`
|
|
255
|
+
|
|
256
|
+
Links a plugin into the CLI for development.
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
USAGE
|
|
260
|
+
$ mycli123 plugins link PATH [-h] [--install] [-v]
|
|
261
|
+
|
|
262
|
+
ARGUMENTS
|
|
263
|
+
PATH [default: .] path to plugin
|
|
264
|
+
|
|
265
|
+
FLAGS
|
|
266
|
+
-h, --help Show CLI help.
|
|
267
|
+
-v, --verbose
|
|
268
|
+
--[no-]install Install dependencies after linking the plugin.
|
|
269
|
+
|
|
270
|
+
DESCRIPTION
|
|
271
|
+
Links a plugin into the CLI for development.
|
|
272
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
|
273
|
+
|
|
274
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
275
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
EXAMPLES
|
|
279
|
+
$ mycli123 plugins link myplugin
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/link.ts)_
|
|
283
|
+
|
|
284
|
+
## `mycli123 plugins remove [PLUGIN]`
|
|
285
|
+
|
|
286
|
+
Removes a plugin from the CLI.
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
USAGE
|
|
290
|
+
$ mycli123 plugins remove [PLUGIN...] [-h] [-v]
|
|
291
|
+
|
|
292
|
+
ARGUMENTS
|
|
293
|
+
PLUGIN... plugin to uninstall
|
|
294
|
+
|
|
295
|
+
FLAGS
|
|
296
|
+
-h, --help Show CLI help.
|
|
297
|
+
-v, --verbose
|
|
298
|
+
|
|
299
|
+
DESCRIPTION
|
|
300
|
+
Removes a plugin from the CLI.
|
|
301
|
+
|
|
302
|
+
ALIASES
|
|
303
|
+
$ mycli123 plugins unlink
|
|
304
|
+
$ mycli123 plugins remove
|
|
305
|
+
|
|
306
|
+
EXAMPLES
|
|
307
|
+
$ mycli123 plugins remove myplugin
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## `mycli123 plugins reset`
|
|
311
|
+
|
|
312
|
+
Remove all user-installed and linked plugins.
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
USAGE
|
|
316
|
+
$ mycli123 plugins reset [--hard] [--reinstall]
|
|
317
|
+
|
|
318
|
+
FLAGS
|
|
319
|
+
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
|
|
320
|
+
--reinstall Reinstall all plugins after uninstalling.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/reset.ts)_
|
|
324
|
+
|
|
325
|
+
## `mycli123 plugins uninstall [PLUGIN]`
|
|
326
|
+
|
|
327
|
+
Removes a plugin from the CLI.
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
USAGE
|
|
331
|
+
$ mycli123 plugins uninstall [PLUGIN...] [-h] [-v]
|
|
332
|
+
|
|
333
|
+
ARGUMENTS
|
|
334
|
+
PLUGIN... plugin to uninstall
|
|
335
|
+
|
|
336
|
+
FLAGS
|
|
337
|
+
-h, --help Show CLI help.
|
|
338
|
+
-v, --verbose
|
|
339
|
+
|
|
340
|
+
DESCRIPTION
|
|
341
|
+
Removes a plugin from the CLI.
|
|
342
|
+
|
|
343
|
+
ALIASES
|
|
344
|
+
$ mycli123 plugins unlink
|
|
345
|
+
$ mycli123 plugins remove
|
|
346
|
+
|
|
347
|
+
EXAMPLES
|
|
348
|
+
$ mycli123 plugins uninstall myplugin
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/uninstall.ts)_
|
|
352
|
+
|
|
353
|
+
## `mycli123 plugins unlink [PLUGIN]`
|
|
354
|
+
|
|
355
|
+
Removes a plugin from the CLI.
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
USAGE
|
|
359
|
+
$ mycli123 plugins unlink [PLUGIN...] [-h] [-v]
|
|
360
|
+
|
|
361
|
+
ARGUMENTS
|
|
362
|
+
PLUGIN... plugin to uninstall
|
|
363
|
+
|
|
364
|
+
FLAGS
|
|
365
|
+
-h, --help Show CLI help.
|
|
366
|
+
-v, --verbose
|
|
367
|
+
|
|
368
|
+
DESCRIPTION
|
|
369
|
+
Removes a plugin from the CLI.
|
|
370
|
+
|
|
371
|
+
ALIASES
|
|
372
|
+
$ mycli123 plugins unlink
|
|
373
|
+
$ mycli123 plugins remove
|
|
374
|
+
|
|
375
|
+
EXAMPLES
|
|
376
|
+
$ mycli123 plugins unlink myplugin
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
## `mycli123 plugins update`
|
|
380
|
+
|
|
381
|
+
Update installed plugins.
|
|
382
|
+
|
|
383
|
+
```
|
|
384
|
+
USAGE
|
|
385
|
+
$ mycli123 plugins update [-h] [-v]
|
|
386
|
+
|
|
387
|
+
FLAGS
|
|
388
|
+
-h, --help Show CLI help.
|
|
389
|
+
-v, --verbose
|
|
390
|
+
|
|
391
|
+
DESCRIPTION
|
|
392
|
+
Update installed plugins.
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.16/src/commands/plugins/update.ts)_
|
|
396
|
+
<!-- commandsstop -->
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%- name %>",
|
|
3
|
+
"description": "<%- description %>",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"author": "<%- author %>",
|
|
6
|
+
"bin": {
|
|
7
|
+
"<%- bin %>": "./bin/run.js"
|
|
8
|
+
},
|
|
9
|
+
"bugs": "https://github.com/<%- owner %>/<%- repository %>/issues",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@oclif/core": "^4",
|
|
12
|
+
"@oclif/plugin-help": "^6",
|
|
13
|
+
"@oclif/plugin-plugins": "^5"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@eslint/compat": "^1",
|
|
17
|
+
"@oclif/prettier-config": "^0.2.1",
|
|
18
|
+
"@oclif/test": "^4",
|
|
19
|
+
"@types/chai": "^4",
|
|
20
|
+
"@types/mocha": "^10",
|
|
21
|
+
"@types/node": "^18",
|
|
22
|
+
"chai": "^4",
|
|
23
|
+
"eslint": "^9",
|
|
24
|
+
"eslint-config-oclif": "^6",
|
|
25
|
+
"eslint-config-prettier": "^10",
|
|
26
|
+
"mocha": "^11",
|
|
27
|
+
"oclif": "^4",
|
|
28
|
+
"shx": "^0.3.3",
|
|
29
|
+
"ts-node": "^10",
|
|
30
|
+
"typescript": "^5"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"./bin",
|
|
37
|
+
"./dist",
|
|
38
|
+
"./oclif.manifest.json"
|
|
39
|
+
],
|
|
40
|
+
"homepage": "https://github.com/<%- owner %>/<%- repository %>",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"oclif"
|
|
43
|
+
],
|
|
44
|
+
"license": "<%- license %>",
|
|
45
|
+
"main": "dist/index.js",
|
|
46
|
+
<% if (moduleType == 'ESM') { %>"type": "module",<% } %>
|
|
47
|
+
"oclif": {
|
|
48
|
+
"bin": "<%- bin %>",
|
|
49
|
+
"dirname": "<%- bin %>",
|
|
50
|
+
"commands": "./dist/commands",
|
|
51
|
+
"plugins": [
|
|
52
|
+
"@oclif/plugin-help",
|
|
53
|
+
"@oclif/plugin-plugins"
|
|
54
|
+
],
|
|
55
|
+
"topicSeparator": " ",
|
|
56
|
+
"topics": {
|
|
57
|
+
"hello": {
|
|
58
|
+
"description": "Say hello to the world and others"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"repository": "<%- owner %>/<%- repository %>",
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "shx rm -rf dist && tsc -b",
|
|
65
|
+
"lint": "eslint",
|
|
66
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
67
|
+
"posttest": "<%- pkgManagerScript %> lint",
|
|
68
|
+
"prepack": "oclif manifest && oclif readme",
|
|
69
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
70
|
+
"version": "oclif readme && git add README.md"
|
|
71
|
+
},
|
|
72
|
+
"types": "dist/index.d.ts"
|
|
73
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Args, Command, Flags} from '@oclif/core'
|
|
2
|
+
|
|
3
|
+
export default class Hello extends Command {
|
|
4
|
+
static args = {
|
|
5
|
+
person: Args.string({description: 'Person to say hello to', required: true}),
|
|
6
|
+
}
|
|
7
|
+
static description = 'Say hello'
|
|
8
|
+
static examples = [
|
|
9
|
+
`<%%= config.bin %> <%%= command.id %> friend --from oclif
|
|
10
|
+
hello friend from oclif! (./src/commands/hello/index.ts)
|
|
11
|
+
`,
|
|
12
|
+
]
|
|
13
|
+
static flags = {
|
|
14
|
+
from: Flags.string({char: 'f', description: 'Who is saying hello', required: true}),
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async run(): Promise<void> {
|
|
18
|
+
const {args, flags} = await this.parse(Hello)
|
|
19
|
+
|
|
20
|
+
this.log(`hello ${args.person} from ${flags.from}! (./src/commands/hello/index.ts)`)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {Command} from '@oclif/core'
|
|
2
|
+
|
|
3
|
+
export default class World extends Command {
|
|
4
|
+
static args = {}
|
|
5
|
+
static description = 'Say hello world'
|
|
6
|
+
static examples = [
|
|
7
|
+
`<%%= config.bin %> <%%= command.id %>
|
|
8
|
+
hello world! (./src/commands/hello/world.ts)
|
|
9
|
+
`,
|
|
10
|
+
]
|
|
11
|
+
static flags = {}
|
|
12
|
+
|
|
13
|
+
async run(): Promise<void> {
|
|
14
|
+
this.log('hello world! (./src/commands/hello/world.ts)')
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {run} from '@oclif/core'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {Args, Command, Flags} from '@oclif/core'
|
|
2
|
+
|
|
3
|
+
export default class <%- className %> extends Command {
|
|
4
|
+
static override args = {
|
|
5
|
+
file: Args.string({description: 'file to read'}),
|
|
6
|
+
}
|
|
7
|
+
static override description = 'describe the command here'
|
|
8
|
+
static override examples = [
|
|
9
|
+
'<%%= config.bin %> <%%= command.id %>',
|
|
10
|
+
]
|
|
11
|
+
static override flags = {
|
|
12
|
+
// flag with no value (-f, --force)
|
|
13
|
+
force: Flags.boolean({char: 'f'}),
|
|
14
|
+
// flag with a value (-n, --name=VALUE)
|
|
15
|
+
name: Flags.string({char: 'n', description: 'name to print'}),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async run(): Promise<void> {
|
|
19
|
+
const {args, flags} = await this.parse(<%- className %>)
|
|
20
|
+
|
|
21
|
+
const name = flags.name ?? 'world'
|
|
22
|
+
this.log(`hello ${name} from <%- path.replace(/\\/g, '\\\\') %>`)
|
|
23
|
+
if (args.file && flags.force) {
|
|
24
|
+
this.log(`you input --force and --file: ${args.file}`)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% switch (moduleType) {
|
|
2
|
+
case 'ESM' : _%>
|
|
3
|
+
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
|
|
4
|
+
|
|
5
|
+
import {execute} from '@oclif/core'
|
|
6
|
+
await execute({development: true, dir: import.meta.url})
|
|
7
|
+
<%_ break;
|
|
8
|
+
case 'CommonJS' : _%>
|
|
9
|
+
#!/usr/bin/env node_modules/.bin/ts-node
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
|
|
12
|
+
(async () => {
|
|
13
|
+
const oclif = await import('@oclif/core')
|
|
14
|
+
await oclif.execute({development: true, dir: __dirname})
|
|
15
|
+
})()
|
|
16
|
+
<%_ break;
|
|
17
|
+
} _%>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% switch (moduleType) {
|
|
2
|
+
case 'ESM' : _%>
|
|
3
|
+
#!/usr/bin/env node
|
|
4
|
+
|
|
5
|
+
import {execute} from '@oclif/core'
|
|
6
|
+
await execute({dir: import.meta.url})
|
|
7
|
+
<%_ break;
|
|
8
|
+
case 'CommonJS' : _%>
|
|
9
|
+
#!/usr/bin/env node
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
12
|
+
(async () => {
|
|
13
|
+
const oclif = await import('@oclif/core')
|
|
14
|
+
await oclif.execute({development: false, dir: __dirname})
|
|
15
|
+
})()
|
|
16
|
+
<%_ break;
|
|
17
|
+
} _%>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {runCommand} from '@oclif/test'
|
|
2
|
+
import {expect} from 'chai'
|
|
3
|
+
|
|
4
|
+
describe('<%- name %>', () => {
|
|
5
|
+
it('runs <%- name %> cmd', async () => {
|
|
6
|
+
const {stdout} = await runCommand('<%- name %>')
|
|
7
|
+
expect(stdout).to.contain('hello world')
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('runs <%- name %> --name oclif', async () => {
|
|
11
|
+
const {stdout} = await runCommand('<%- name %> --name oclif')
|
|
12
|
+
expect(stdout).to.contain('hello oclif')
|
|
13
|
+
})
|
|
14
|
+
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {runHook} from '@oclif/test'
|
|
2
|
+
import {expect} from 'chai'
|
|
3
|
+
|
|
4
|
+
describe('hooks', () => {
|
|
5
|
+
it('shows a message', async () => {
|
|
6
|
+
const {stdout} = await runHook('init', {id: 'mycommand'})
|
|
7
|
+
expect(stdout).to.contain('example hook running mycommand')
|
|
8
|
+
})
|
|
9
|
+
})
|