@oclif/plugin-test-esbuild 0.1.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 ADDED
@@ -0,0 +1,397 @@
1
+ plugin-test-esbuild
2
+ =================
3
+
4
+ Example of using `esbuild` with oclif
5
+
6
+ [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
7
+ [![CircleCI](https://circleci.com/gh/oclif/hello-world/tree/main.svg?style=shield)](https://circleci.com/gh/oclif/hello-world/tree/main)
8
+ [![GitHub license](https://img.shields.io/github/license/oclif/hello-world)](https://github.com/oclif/hello-world/blob/main/LICENSE)
9
+
10
+ <!-- toc -->
11
+ * [Usage](#usage)
12
+ * [Commands](#commands)
13
+ <!-- tocstop -->
14
+ # Usage
15
+ <!-- usage -->
16
+ ```sh-session
17
+ $ npm install -g @oclif/plugin-test-esbuild
18
+ $ bundle COMMAND
19
+ running command...
20
+ $ bundle (--version)
21
+ @oclif/plugin-test-esbuild/0.1.3 linux-x64 node-v20.11.0
22
+ $ bundle --help [COMMAND]
23
+ USAGE
24
+ $ bundle COMMAND
25
+ ...
26
+ ```
27
+ <!-- usagestop -->
28
+ # Commands
29
+ <!-- commands -->
30
+ * [`bundle hello PERSON`](#bundle-hello-person)
31
+ * [`bundle hello alias`](#bundle-hello-alias)
32
+ * [`bundle hello world`](#bundle-hello-world)
33
+ * [`bundle help [COMMANDS]`](#bundle-help-commands)
34
+ * [`bundle plugins`](#bundle-plugins)
35
+ * [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin)
36
+ * [`bundle plugins:inspect PLUGIN...`](#bundle-pluginsinspect-plugin)
37
+ * [`bundle plugins:install PLUGIN...`](#bundle-pluginsinstall-plugin-1)
38
+ * [`bundle plugins:link PLUGIN`](#bundle-pluginslink-plugin)
39
+ * [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin)
40
+ * [`bundle plugins reset`](#bundle-plugins-reset)
41
+ * [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-1)
42
+ * [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-2)
43
+ * [`bundle plugins update`](#bundle-plugins-update)
44
+
45
+ ## `bundle hello PERSON`
46
+
47
+ Say hello
48
+
49
+ ```
50
+ USAGE
51
+ $ bundle hello PERSON -f <value>
52
+
53
+ ARGUMENTS
54
+ PERSON Person to say hello to
55
+
56
+ FLAGS
57
+ -f, --from=<value> (required) Who is saying hello
58
+
59
+ DESCRIPTION
60
+ Say hello
61
+
62
+ EXAMPLES
63
+ $ oex hello friend --from oclif
64
+ hello friend from oclif! (./src/commands/hello/index.ts)
65
+ ```
66
+
67
+ ## `bundle hello alias`
68
+
69
+ Say hello world
70
+
71
+ ```
72
+ USAGE
73
+ $ bundle hello alias
74
+
75
+ DESCRIPTION
76
+ Say hello world
77
+
78
+ EXAMPLES
79
+ $ bundle hello alias
80
+ hello world! (./src/commands/hello/world.ts)
81
+ ```
82
+
83
+ ## `bundle hello world`
84
+
85
+ Say hello world
86
+
87
+ ```
88
+ USAGE
89
+ $ bundle hello world
90
+
91
+ DESCRIPTION
92
+ Say hello world
93
+
94
+ EXAMPLES
95
+ $ bundle hello world
96
+ hello world! (./src/commands/hello/world.ts)
97
+ ```
98
+
99
+ ## `bundle help [COMMANDS]`
100
+
101
+ Display help for bundle.
102
+
103
+ ```
104
+ USAGE
105
+ $ bundle help [COMMANDS] [-n]
106
+
107
+ ARGUMENTS
108
+ COMMANDS Command to show help for.
109
+
110
+ FLAGS
111
+ -n, --nested-commands Include all nested commands in the output.
112
+
113
+ DESCRIPTION
114
+ Display help for bundle.
115
+ ```
116
+
117
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.12/src/commands/help.ts)_
118
+
119
+ ## `bundle plugins`
120
+
121
+ List installed plugins.
122
+
123
+ ```
124
+ USAGE
125
+ $ bundle plugins [--json] [--core]
126
+
127
+ FLAGS
128
+ --core Show core plugins.
129
+
130
+ GLOBAL FLAGS
131
+ --json Format output as json.
132
+
133
+ DESCRIPTION
134
+ List installed plugins.
135
+
136
+ EXAMPLES
137
+ $ bundle plugins
138
+ ```
139
+
140
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/index.ts)_
141
+
142
+ ## `bundle plugins:install PLUGIN...`
143
+
144
+ Installs a plugin into the CLI.
145
+
146
+ ```
147
+ USAGE
148
+ $ bundle plugins add plugins:install PLUGIN...
149
+
150
+ ARGUMENTS
151
+ PLUGIN Plugin to install.
152
+
153
+ FLAGS
154
+ -f, --force Run yarn install with force flag.
155
+ -h, --help Show CLI help.
156
+ -s, --silent Silences yarn output.
157
+ -v, --verbose Show verbose yarn output.
158
+
159
+ GLOBAL FLAGS
160
+ --json Format output as json.
161
+
162
+ DESCRIPTION
163
+ Installs a plugin into the CLI.
164
+ Can be installed from npm or a git url.
165
+
166
+ Installation of a user-installed plugin will override a core plugin.
167
+
168
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
169
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
170
+ the CLI without the need to patch and update the whole CLI.
171
+
172
+
173
+ ALIASES
174
+ $ bundle plugins add
175
+
176
+ EXAMPLES
177
+ $ bundle plugins add myplugin
178
+
179
+ $ bundle plugins add https://github.com/someuser/someplugin
180
+
181
+ $ bundle plugins add someuser/someplugin
182
+ ```
183
+
184
+ ## `bundle plugins:inspect PLUGIN...`
185
+
186
+ Displays installation properties of a plugin.
187
+
188
+ ```
189
+ USAGE
190
+ $ bundle plugins inspect PLUGIN...
191
+
192
+ ARGUMENTS
193
+ PLUGIN [default: .] Plugin to inspect.
194
+
195
+ FLAGS
196
+ -h, --help Show CLI help.
197
+ -v, --verbose
198
+
199
+ GLOBAL FLAGS
200
+ --json Format output as json.
201
+
202
+ DESCRIPTION
203
+ Displays installation properties of a plugin.
204
+
205
+ EXAMPLES
206
+ $ bundle plugins inspect myplugin
207
+ ```
208
+
209
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/inspect.ts)_
210
+
211
+ ## `bundle plugins:install PLUGIN...`
212
+
213
+ Installs a plugin into the CLI.
214
+
215
+ ```
216
+ USAGE
217
+ $ bundle plugins install PLUGIN...
218
+
219
+ ARGUMENTS
220
+ PLUGIN Plugin to install.
221
+
222
+ FLAGS
223
+ -f, --force Run yarn install with force flag.
224
+ -h, --help Show CLI help.
225
+ -s, --silent Silences yarn output.
226
+ -v, --verbose Show verbose yarn output.
227
+
228
+ GLOBAL FLAGS
229
+ --json Format output as json.
230
+
231
+ DESCRIPTION
232
+ Installs a plugin into the CLI.
233
+ Can be installed from npm or a git url.
234
+
235
+ Installation of a user-installed plugin will override a core plugin.
236
+
237
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
238
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
239
+ the CLI without the need to patch and update the whole CLI.
240
+
241
+
242
+ ALIASES
243
+ $ bundle plugins add
244
+
245
+ EXAMPLES
246
+ $ bundle plugins install myplugin
247
+
248
+ $ bundle plugins install https://github.com/someuser/someplugin
249
+
250
+ $ bundle plugins install someuser/someplugin
251
+ ```
252
+
253
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/install.ts)_
254
+
255
+ ## `bundle plugins:link PLUGIN`
256
+
257
+ Links a plugin into the CLI for development.
258
+
259
+ ```
260
+ USAGE
261
+ $ bundle plugins link PLUGIN
262
+
263
+ ARGUMENTS
264
+ PATH [default: .] path to plugin
265
+
266
+ FLAGS
267
+ -h, --help Show CLI help.
268
+ -v, --verbose
269
+ --[no-]install Install dependencies after linking the plugin.
270
+
271
+ DESCRIPTION
272
+ Links a plugin into the CLI for development.
273
+ Installation of a linked plugin will override a user-installed or core plugin.
274
+
275
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
276
+ command will override the user-installed or core plugin implementation. This is useful for development work.
277
+
278
+
279
+ EXAMPLES
280
+ $ bundle plugins link myplugin
281
+ ```
282
+
283
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/link.ts)_
284
+
285
+ ## `bundle plugins:uninstall PLUGIN...`
286
+
287
+ Removes a plugin from the CLI.
288
+
289
+ ```
290
+ USAGE
291
+ $ bundle plugins remove plugins:uninstall PLUGIN...
292
+
293
+ ARGUMENTS
294
+ PLUGIN plugin to uninstall
295
+
296
+ FLAGS
297
+ -h, --help Show CLI help.
298
+ -v, --verbose
299
+
300
+ DESCRIPTION
301
+ Removes a plugin from the CLI.
302
+
303
+ ALIASES
304
+ $ bundle plugins unlink
305
+ $ bundle plugins remove
306
+
307
+ EXAMPLES
308
+ $ bundle plugins remove myplugin
309
+ ```
310
+
311
+ ## `bundle plugins reset`
312
+
313
+ Remove all user-installed and linked plugins.
314
+
315
+ ```
316
+ USAGE
317
+ $ bundle plugins reset [--hard] [--reinstall]
318
+
319
+ FLAGS
320
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
321
+ --reinstall Reinstall all plugins after uninstalling.
322
+ ```
323
+
324
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/reset.ts)_
325
+
326
+ ## `bundle plugins:uninstall PLUGIN...`
327
+
328
+ Removes a plugin from the CLI.
329
+
330
+ ```
331
+ USAGE
332
+ $ bundle plugins uninstall PLUGIN...
333
+
334
+ ARGUMENTS
335
+ PLUGIN plugin to uninstall
336
+
337
+ FLAGS
338
+ -h, --help Show CLI help.
339
+ -v, --verbose
340
+
341
+ DESCRIPTION
342
+ Removes a plugin from the CLI.
343
+
344
+ ALIASES
345
+ $ bundle plugins unlink
346
+ $ bundle plugins remove
347
+
348
+ EXAMPLES
349
+ $ bundle plugins uninstall myplugin
350
+ ```
351
+
352
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/uninstall.ts)_
353
+
354
+ ## `bundle plugins:uninstall PLUGIN...`
355
+
356
+ Removes a plugin from the CLI.
357
+
358
+ ```
359
+ USAGE
360
+ $ bundle plugins unlink plugins:uninstall PLUGIN...
361
+
362
+ ARGUMENTS
363
+ PLUGIN plugin to uninstall
364
+
365
+ FLAGS
366
+ -h, --help Show CLI help.
367
+ -v, --verbose
368
+
369
+ DESCRIPTION
370
+ Removes a plugin from the CLI.
371
+
372
+ ALIASES
373
+ $ bundle plugins unlink
374
+ $ bundle plugins remove
375
+
376
+ EXAMPLES
377
+ $ bundle plugins unlink myplugin
378
+ ```
379
+
380
+ ## `bundle plugins update`
381
+
382
+ Update installed plugins.
383
+
384
+ ```
385
+ USAGE
386
+ $ bundle plugins update [-h] [-v]
387
+
388
+ FLAGS
389
+ -h, --help Show CLI help.
390
+ -v, --verbose
391
+
392
+ DESCRIPTION
393
+ Update installed plugins.
394
+ ```
395
+
396
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.1/src/commands/plugins/update.ts)_
397
+ <!-- commandsstop -->
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/dev.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node_modules/.bin/ts-node
2
+ // eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
3
+ ;(async () => {
4
+ const oclif = await import('@oclif/core')
5
+ await oclif.execute({development: true, dir: __dirname})
6
+ })()
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
package/bin/run.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+
3
+ // eslint-disable-next-line unicorn/prefer-top-level-await
4
+ (async () => {
5
+ const oclif = await import('@oclif/core')
6
+ await oclif.execute({development: false, dir: __dirname})
7
+ })()
@@ -0,0 +1,12 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class Hello extends Command {
3
+ static args: {
4
+ person: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ from: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ class Hello extends core_1.Command {
5
+ static args = {
6
+ person: core_1.Args.string({ description: 'Person to say hello to', required: true }),
7
+ };
8
+ static description = 'Say hello';
9
+ static examples = [
10
+ `$ oex hello friend --from oclif
11
+ hello friend from oclif! (./src/commands/hello/index.ts)
12
+ `,
13
+ ];
14
+ static flags = {
15
+ from: core_1.Flags.string({ char: 'f', description: 'Who is saying hello', required: true }),
16
+ };
17
+ async run() {
18
+ const { args, flags } = await this.parse(Hello);
19
+ this.log(`hello ${args.person} from ${flags.from}! (./src/commands/hello/index.ts)`);
20
+ }
21
+ }
22
+ exports.default = Hello;
@@ -0,0 +1,8 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class World extends Command {
3
+ static args: {};
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {};
7
+ run(): Promise<void>;
8
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ class World extends core_1.Command {
5
+ static args = {};
6
+ static description = 'Say hello world';
7
+ static examples = [
8
+ `<%= config.bin %> <%= command.id %>
9
+ hello world! (./src/commands/hello/world.ts)
10
+ `,
11
+ ];
12
+ static flags = {};
13
+ async run() {
14
+ this.log('hello world! (./src/commands/hello/world.ts)');
15
+ }
16
+ }
17
+ exports.default = World;
@@ -0,0 +1,3 @@
1
+ import { Hook } from '@oclif/core';
2
+ declare const hook: Hook<'init'>;
3
+ export default hook;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hook = async function (opts) {
4
+ process.stdout.write(`example hook running ${opts.id}\n`);
5
+ };
6
+ exports.default = hook;
@@ -0,0 +1,8 @@
1
+ import Hello from './commands/hello';
2
+ import HelloWorld from './commands/hello/world';
3
+ export { default as INIT_HOOK } from './hooks/init/init';
4
+ export declare const COMMANDS: {
5
+ hello: typeof Hello;
6
+ 'hello:alias': typeof HelloWorld;
7
+ 'hello:world': typeof HelloWorld;
8
+ };