@oclif/plugin-test-esm-1 0.1.0

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,306 @@
1
+ oclif-hello-world
2
+ =================
3
+
4
+ oclif example Hello World CLI
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-esm-1
18
+ $ esm1 COMMAND
19
+ running command...
20
+ $ esm1 (--version)
21
+ @oclif/plugin-test-esm-1/0.1.0 linux-x64 node-v18.17.0
22
+ $ esm1 --help [COMMAND]
23
+ USAGE
24
+ $ esm1 COMMAND
25
+ ...
26
+ ```
27
+ <!-- usagestop -->
28
+ # Commands
29
+ <!-- commands -->
30
+ * [`esm1 esm1`](#esm1-esm1)
31
+ * [`esm1 help [COMMANDS]`](#esm1-help-commands)
32
+ * [`esm1 plugins`](#esm1-plugins)
33
+ * [`esm1 plugins:install PLUGIN...`](#esm1-pluginsinstall-plugin)
34
+ * [`esm1 plugins:inspect PLUGIN...`](#esm1-pluginsinspect-plugin)
35
+ * [`esm1 plugins:install PLUGIN...`](#esm1-pluginsinstall-plugin-1)
36
+ * [`esm1 plugins:link PLUGIN`](#esm1-pluginslink-plugin)
37
+ * [`esm1 plugins:uninstall PLUGIN...`](#esm1-pluginsuninstall-plugin)
38
+ * [`esm1 plugins:uninstall PLUGIN...`](#esm1-pluginsuninstall-plugin-1)
39
+ * [`esm1 plugins:uninstall PLUGIN...`](#esm1-pluginsuninstall-plugin-2)
40
+ * [`esm1 plugins update`](#esm1-plugins-update)
41
+
42
+ ## `esm1 esm1`
43
+
44
+ ```
45
+ USAGE
46
+ $ esm1 esm1
47
+ ```
48
+
49
+ _See code: [dist/commands/esm1.ts](https://github.com/oclif/plugin-test-esm-1/blob/v0.1.0/dist/commands/esm1.ts)_
50
+
51
+ ## `esm1 help [COMMANDS]`
52
+
53
+ Display help for esm1.
54
+
55
+ ```
56
+ USAGE
57
+ $ esm1 help [COMMANDS] [-n]
58
+
59
+ ARGUMENTS
60
+ COMMANDS Command to show help for.
61
+
62
+ FLAGS
63
+ -n, --nested-commands Include all nested commands in the output.
64
+
65
+ DESCRIPTION
66
+ Display help for esm1.
67
+ ```
68
+
69
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.14/src/commands/help.ts)_
70
+
71
+ ## `esm1 plugins`
72
+
73
+ List installed plugins.
74
+
75
+ ```
76
+ USAGE
77
+ $ esm1 plugins [--json] [--core]
78
+
79
+ FLAGS
80
+ --core Show core plugins.
81
+
82
+ GLOBAL FLAGS
83
+ --json Format output as json.
84
+
85
+ DESCRIPTION
86
+ List installed plugins.
87
+
88
+ EXAMPLES
89
+ $ esm1 plugins
90
+ ```
91
+
92
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.1.8/src/commands/plugins/index.ts)_
93
+
94
+ ## `esm1 plugins:install PLUGIN...`
95
+
96
+ Installs a plugin into the CLI.
97
+
98
+ ```
99
+ USAGE
100
+ $ esm1 plugins:install PLUGIN...
101
+
102
+ ARGUMENTS
103
+ PLUGIN Plugin to install.
104
+
105
+ FLAGS
106
+ -f, --force Run yarn install with force flag.
107
+ -h, --help Show CLI help.
108
+ -v, --verbose
109
+
110
+ DESCRIPTION
111
+ Installs a plugin into the CLI.
112
+ Can be installed from npm or a git url.
113
+
114
+ Installation of a user-installed plugin will override a core plugin.
115
+
116
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
117
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
118
+ the CLI without the need to patch and update the whole CLI.
119
+
120
+
121
+ ALIASES
122
+ $ esm1 plugins add
123
+
124
+ EXAMPLES
125
+ $ esm1 plugins:install myplugin
126
+
127
+ $ esm1 plugins:install https://github.com/someuser/someplugin
128
+
129
+ $ esm1 plugins:install someuser/someplugin
130
+ ```
131
+
132
+ ## `esm1 plugins:inspect PLUGIN...`
133
+
134
+ Displays installation properties of a plugin.
135
+
136
+ ```
137
+ USAGE
138
+ $ esm1 plugins:inspect PLUGIN...
139
+
140
+ ARGUMENTS
141
+ PLUGIN [default: .] Plugin to inspect.
142
+
143
+ FLAGS
144
+ -h, --help Show CLI help.
145
+ -v, --verbose
146
+
147
+ GLOBAL FLAGS
148
+ --json Format output as json.
149
+
150
+ DESCRIPTION
151
+ Displays installation properties of a plugin.
152
+
153
+ EXAMPLES
154
+ $ esm1 plugins:inspect myplugin
155
+ ```
156
+
157
+ ## `esm1 plugins:install PLUGIN...`
158
+
159
+ Installs a plugin into the CLI.
160
+
161
+ ```
162
+ USAGE
163
+ $ esm1 plugins:install PLUGIN...
164
+
165
+ ARGUMENTS
166
+ PLUGIN Plugin to install.
167
+
168
+ FLAGS
169
+ -f, --force Run yarn install with force flag.
170
+ -h, --help Show CLI help.
171
+ -v, --verbose
172
+
173
+ DESCRIPTION
174
+ Installs a plugin into the CLI.
175
+ Can be installed from npm or a git url.
176
+
177
+ Installation of a user-installed plugin will override a core plugin.
178
+
179
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
180
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
181
+ the CLI without the need to patch and update the whole CLI.
182
+
183
+
184
+ ALIASES
185
+ $ esm1 plugins add
186
+
187
+ EXAMPLES
188
+ $ esm1 plugins:install myplugin
189
+
190
+ $ esm1 plugins:install https://github.com/someuser/someplugin
191
+
192
+ $ esm1 plugins:install someuser/someplugin
193
+ ```
194
+
195
+ ## `esm1 plugins:link PLUGIN`
196
+
197
+ Links a plugin into the CLI for development.
198
+
199
+ ```
200
+ USAGE
201
+ $ esm1 plugins:link PLUGIN
202
+
203
+ ARGUMENTS
204
+ PATH [default: .] path to plugin
205
+
206
+ FLAGS
207
+ -h, --help Show CLI help.
208
+ -v, --verbose
209
+
210
+ DESCRIPTION
211
+ Links a plugin into the CLI for development.
212
+ Installation of a linked plugin will override a user-installed or core plugin.
213
+
214
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
215
+ command will override the user-installed or core plugin implementation. This is useful for development work.
216
+
217
+
218
+ EXAMPLES
219
+ $ esm1 plugins:link myplugin
220
+ ```
221
+
222
+ ## `esm1 plugins:uninstall PLUGIN...`
223
+
224
+ Removes a plugin from the CLI.
225
+
226
+ ```
227
+ USAGE
228
+ $ esm1 plugins:uninstall PLUGIN...
229
+
230
+ ARGUMENTS
231
+ PLUGIN plugin to uninstall
232
+
233
+ FLAGS
234
+ -h, --help Show CLI help.
235
+ -v, --verbose
236
+
237
+ DESCRIPTION
238
+ Removes a plugin from the CLI.
239
+
240
+ ALIASES
241
+ $ esm1 plugins unlink
242
+ $ esm1 plugins remove
243
+ ```
244
+
245
+ ## `esm1 plugins:uninstall PLUGIN...`
246
+
247
+ Removes a plugin from the CLI.
248
+
249
+ ```
250
+ USAGE
251
+ $ esm1 plugins:uninstall PLUGIN...
252
+
253
+ ARGUMENTS
254
+ PLUGIN plugin to uninstall
255
+
256
+ FLAGS
257
+ -h, --help Show CLI help.
258
+ -v, --verbose
259
+
260
+ DESCRIPTION
261
+ Removes a plugin from the CLI.
262
+
263
+ ALIASES
264
+ $ esm1 plugins unlink
265
+ $ esm1 plugins remove
266
+ ```
267
+
268
+ ## `esm1 plugins:uninstall PLUGIN...`
269
+
270
+ Removes a plugin from the CLI.
271
+
272
+ ```
273
+ USAGE
274
+ $ esm1 plugins:uninstall PLUGIN...
275
+
276
+ ARGUMENTS
277
+ PLUGIN plugin to uninstall
278
+
279
+ FLAGS
280
+ -h, --help Show CLI help.
281
+ -v, --verbose
282
+
283
+ DESCRIPTION
284
+ Removes a plugin from the CLI.
285
+
286
+ ALIASES
287
+ $ esm1 plugins unlink
288
+ $ esm1 plugins remove
289
+ ```
290
+
291
+ ## `esm1 plugins update`
292
+
293
+ Update installed plugins.
294
+
295
+ ```
296
+ USAGE
297
+ $ esm1 plugins update [-h] [-v]
298
+
299
+ FLAGS
300
+ -h, --help Show CLI help.
301
+ -v, --verbose
302
+
303
+ DESCRIPTION
304
+ Update installed plugins.
305
+ ```
306
+ <!-- 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 ts-node
2
+ // eslint-disable-next-line node/shebang
3
+ (async () => {
4
+ const oclif = await import('@oclif/core')
5
+ await oclif.execute({type: 'esm', development: true, dir: import.meta.url})
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,6 @@
1
+ #!/usr/bin/env node
2
+ // eslint-disable-next-line node/shebang
3
+ (async () => {
4
+ const oclif = await import('@oclif/core')
5
+ await oclif.execute({type: 'esm', dir: import.meta.url})
6
+ })()
@@ -0,0 +1,4 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class ESM1 extends Command {
3
+ run(): Promise<void>;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class ESM1 extends Command {
3
+ async run() {
4
+ this.log(`hello I am an ESM plugin from ${this.config.root}!`);
5
+ }
6
+ }
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "commands": {
4
+ "esm1": {
5
+ "id": "esm1",
6
+ "strict": true,
7
+ "pluginName": "@oclif/plugin-test-esm-1",
8
+ "pluginAlias": "@oclif/plugin-test-esm-1",
9
+ "pluginType": "core",
10
+ "aliases": [],
11
+ "flags": {},
12
+ "args": {}
13
+ }
14
+ }
15
+ }
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@oclif/plugin-test-esm-1",
3
+ "version": "0.1.0",
4
+ "description": "Test ESM plugin",
5
+ "author": "Salesforce",
6
+ "bin": {
7
+ "esm1": "./bin/run"
8
+ },
9
+ "homepage": "https://github.com/oclif/plugin-test-esm-1",
10
+ "license": "MIT",
11
+ "main": "",
12
+ "repository": "oclif/plugin-test-esm-1",
13
+ "files": [
14
+ "/bin",
15
+ "/dist",
16
+ "/npm-shrinkwrap.json",
17
+ "/oclif.manifest.json"
18
+ ],
19
+ "dependencies": {
20
+ "@oclif/core": "^2",
21
+ "@oclif/plugin-help": "^5",
22
+ "@oclif/plugin-plugins": "^3.1.8"
23
+ },
24
+ "devDependencies": {
25
+ "@oclif/test": "^2.4.0",
26
+ "@types/chai": "^4",
27
+ "@types/mocha": "^9.0.0",
28
+ "@types/node": "^16.18.39",
29
+ "chai": "^4",
30
+ "eslint": "^7.32.0",
31
+ "eslint-config-oclif": "^4",
32
+ "eslint-config-oclif-typescript": "^1.0.3",
33
+ "mocha": "^9",
34
+ "oclif": "^3.10.0",
35
+ "shx": "^0.3.4",
36
+ "ts-node": "^10.9.1",
37
+ "tslib": "^2.6.1",
38
+ "typescript": "^4.9.5"
39
+ },
40
+ "oclif": {
41
+ "bin": "esm1",
42
+ "dirname": "esm1",
43
+ "commands": "./dist/commands",
44
+ "plugins": [
45
+ "@oclif/plugin-help",
46
+ "@oclif/plugin-plugins"
47
+ ],
48
+ "topicSeparator": " ",
49
+ "topics": {
50
+ "hello": {
51
+ "description": "Say hello to the world and others"
52
+ }
53
+ }
54
+ },
55
+ "scripts": {
56
+ "build": "shx rm -rf dist && tsc -b",
57
+ "lint": "eslint . --ext .ts --config .eslintrc",
58
+ "postpack": "shx rm -f oclif.manifest.json",
59
+ "posttest": "yarn lint",
60
+ "prepack": "yarn build && oclif manifest && oclif readme",
61
+ "test": "mocha --forbid-only \"test/**/*.test.ts\"",
62
+ "version": "oclif readme && git add README.md"
63
+ },
64
+ "engines": {
65
+ "node": ">=12.0.0"
66
+ },
67
+ "bugs": "https://github.com/oclif/plugin-test-esm-1/issues",
68
+ "keywords": [
69
+ "oclif"
70
+ ],
71
+ "types": "dist/index.d.ts",
72
+ "exports": "./lib/index.js",
73
+ "type": "module"
74
+ }