@oclif/plugin-test-cjs-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,303 @@
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-cjs-1
18
+ $ cjs1 COMMAND
19
+ running command...
20
+ $ cjs1 (--version)
21
+ @oclif/plugin-test-cjs-1/0.1.0 linux-x64 node-v18.17.0
22
+ $ cjs1 --help [COMMAND]
23
+ USAGE
24
+ $ cjs1 COMMAND
25
+ ...
26
+ ```
27
+ <!-- usagestop -->
28
+ # Commands
29
+ <!-- commands -->
30
+ * [`cjs1 cjs1`](#cjs1-cjs1)
31
+ * [`cjs1 help [COMMANDS]`](#cjs1-help-commands)
32
+ * [`cjs1 plugins`](#cjs1-plugins)
33
+ * [`cjs1 plugins:install PLUGIN...`](#cjs1-pluginsinstall-plugin)
34
+ * [`cjs1 plugins:inspect PLUGIN...`](#cjs1-pluginsinspect-plugin)
35
+ * [`cjs1 plugins:install PLUGIN...`](#cjs1-pluginsinstall-plugin-1)
36
+ * [`cjs1 plugins:link PLUGIN`](#cjs1-pluginslink-plugin)
37
+ * [`cjs1 plugins:uninstall PLUGIN...`](#cjs1-pluginsuninstall-plugin)
38
+ * [`cjs1 plugins:uninstall PLUGIN...`](#cjs1-pluginsuninstall-plugin-1)
39
+ * [`cjs1 plugins:uninstall PLUGIN...`](#cjs1-pluginsuninstall-plugin-2)
40
+ * [`cjs1 plugins update`](#cjs1-plugins-update)
41
+
42
+ ## `cjs1 cjs1`
43
+
44
+ ```
45
+ USAGE
46
+ $ cjs1 cjs1
47
+ ```
48
+
49
+ _See code: [dist/commands/cjs1.ts](https://github.com/oclif/plugin-test-cjs-1/blob/v0.1.0/dist/commands/cjs1.ts)_
50
+
51
+ ## `cjs1 help [COMMANDS]`
52
+
53
+ Display help for cjs1.
54
+
55
+ ```
56
+ USAGE
57
+ $ cjs1 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 cjs1.
67
+ ```
68
+
69
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.14/src/commands/help.ts)_
70
+
71
+ ## `cjs1 plugins`
72
+
73
+ List installed plugins.
74
+
75
+ ```
76
+ USAGE
77
+ $ cjs1 plugins [--core]
78
+
79
+ FLAGS
80
+ --core Show core plugins.
81
+
82
+ DESCRIPTION
83
+ List installed plugins.
84
+
85
+ EXAMPLES
86
+ $ cjs1 plugins
87
+ ```
88
+
89
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/index.ts)_
90
+
91
+ ## `cjs1 plugins:install PLUGIN...`
92
+
93
+ Installs a plugin into the CLI.
94
+
95
+ ```
96
+ USAGE
97
+ $ cjs1 plugins:install PLUGIN...
98
+
99
+ ARGUMENTS
100
+ PLUGIN Plugin to install.
101
+
102
+ FLAGS
103
+ -f, --force Run yarn install with force flag.
104
+ -h, --help Show CLI help.
105
+ -v, --verbose
106
+
107
+ DESCRIPTION
108
+ Installs a plugin into the CLI.
109
+ Can be installed from npm or a git url.
110
+
111
+ Installation of a user-installed plugin will override a core plugin.
112
+
113
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
114
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
115
+ the CLI without the need to patch and update the whole CLI.
116
+
117
+
118
+ ALIASES
119
+ $ cjs1 plugins add
120
+
121
+ EXAMPLES
122
+ $ cjs1 plugins:install myplugin
123
+
124
+ $ cjs1 plugins:install https://github.com/someuser/someplugin
125
+
126
+ $ cjs1 plugins:install someuser/someplugin
127
+ ```
128
+
129
+ ## `cjs1 plugins:inspect PLUGIN...`
130
+
131
+ Displays installation properties of a plugin.
132
+
133
+ ```
134
+ USAGE
135
+ $ cjs1 plugins:inspect PLUGIN...
136
+
137
+ ARGUMENTS
138
+ PLUGIN [default: .] Plugin to inspect.
139
+
140
+ FLAGS
141
+ -h, --help Show CLI help.
142
+ -v, --verbose
143
+
144
+ GLOBAL FLAGS
145
+ --json Format output as json.
146
+
147
+ DESCRIPTION
148
+ Displays installation properties of a plugin.
149
+
150
+ EXAMPLES
151
+ $ cjs1 plugins:inspect myplugin
152
+ ```
153
+
154
+ ## `cjs1 plugins:install PLUGIN...`
155
+
156
+ Installs a plugin into the CLI.
157
+
158
+ ```
159
+ USAGE
160
+ $ cjs1 plugins:install PLUGIN...
161
+
162
+ ARGUMENTS
163
+ PLUGIN Plugin to install.
164
+
165
+ FLAGS
166
+ -f, --force Run yarn install with force flag.
167
+ -h, --help Show CLI help.
168
+ -v, --verbose
169
+
170
+ DESCRIPTION
171
+ Installs a plugin into the CLI.
172
+ Can be installed from npm or a git url.
173
+
174
+ Installation of a user-installed plugin will override a core plugin.
175
+
176
+ e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
177
+ will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
178
+ the CLI without the need to patch and update the whole CLI.
179
+
180
+
181
+ ALIASES
182
+ $ cjs1 plugins add
183
+
184
+ EXAMPLES
185
+ $ cjs1 plugins:install myplugin
186
+
187
+ $ cjs1 plugins:install https://github.com/someuser/someplugin
188
+
189
+ $ cjs1 plugins:install someuser/someplugin
190
+ ```
191
+
192
+ ## `cjs1 plugins:link PLUGIN`
193
+
194
+ Links a plugin into the CLI for development.
195
+
196
+ ```
197
+ USAGE
198
+ $ cjs1 plugins:link PLUGIN
199
+
200
+ ARGUMENTS
201
+ PATH [default: .] path to plugin
202
+
203
+ FLAGS
204
+ -h, --help Show CLI help.
205
+ -v, --verbose
206
+
207
+ DESCRIPTION
208
+ Links a plugin into the CLI for development.
209
+ Installation of a linked plugin will override a user-installed or core plugin.
210
+
211
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
212
+ command will override the user-installed or core plugin implementation. This is useful for development work.
213
+
214
+
215
+ EXAMPLES
216
+ $ cjs1 plugins:link myplugin
217
+ ```
218
+
219
+ ## `cjs1 plugins:uninstall PLUGIN...`
220
+
221
+ Removes a plugin from the CLI.
222
+
223
+ ```
224
+ USAGE
225
+ $ cjs1 plugins:uninstall PLUGIN...
226
+
227
+ ARGUMENTS
228
+ PLUGIN plugin to uninstall
229
+
230
+ FLAGS
231
+ -h, --help Show CLI help.
232
+ -v, --verbose
233
+
234
+ DESCRIPTION
235
+ Removes a plugin from the CLI.
236
+
237
+ ALIASES
238
+ $ cjs1 plugins unlink
239
+ $ cjs1 plugins remove
240
+ ```
241
+
242
+ ## `cjs1 plugins:uninstall PLUGIN...`
243
+
244
+ Removes a plugin from the CLI.
245
+
246
+ ```
247
+ USAGE
248
+ $ cjs1 plugins:uninstall PLUGIN...
249
+
250
+ ARGUMENTS
251
+ PLUGIN plugin to uninstall
252
+
253
+ FLAGS
254
+ -h, --help Show CLI help.
255
+ -v, --verbose
256
+
257
+ DESCRIPTION
258
+ Removes a plugin from the CLI.
259
+
260
+ ALIASES
261
+ $ cjs1 plugins unlink
262
+ $ cjs1 plugins remove
263
+ ```
264
+
265
+ ## `cjs1 plugins:uninstall PLUGIN...`
266
+
267
+ Removes a plugin from the CLI.
268
+
269
+ ```
270
+ USAGE
271
+ $ cjs1 plugins:uninstall PLUGIN...
272
+
273
+ ARGUMENTS
274
+ PLUGIN plugin to uninstall
275
+
276
+ FLAGS
277
+ -h, --help Show CLI help.
278
+ -v, --verbose
279
+
280
+ DESCRIPTION
281
+ Removes a plugin from the CLI.
282
+
283
+ ALIASES
284
+ $ cjs1 plugins unlink
285
+ $ cjs1 plugins remove
286
+ ```
287
+
288
+ ## `cjs1 plugins update`
289
+
290
+ Update installed plugins.
291
+
292
+ ```
293
+ USAGE
294
+ $ cjs1 plugins update [-h] [-v]
295
+
296
+ FLAGS
297
+ -h, --help Show CLI help.
298
+ -v, --verbose
299
+
300
+ DESCRIPTION
301
+ Update installed plugins.
302
+ ```
303
+ <!-- commandsstop -->
package/bin/dev ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require('@oclif/core')
4
+
5
+ const path = require('path')
6
+ const project = path.join(__dirname, '..', 'tsconfig.json')
7
+
8
+ // In dev mode -> use ts-node and dev plugins
9
+ process.env.NODE_ENV = 'development'
10
+
11
+ require('ts-node').register({project})
12
+
13
+ // In dev mode, always show stack traces
14
+ oclif.settings.debug = true;
15
+
16
+ // Start the CLI
17
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require('@oclif/core')
4
+
5
+ oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
@@ -0,0 +1,4 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class CJS1 extends Command {
3
+ run(): Promise<void>;
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ class CJS1 extends core_1.Command {
5
+ async run() {
6
+ this.log(`hello I am a CJS plugin from ${this.config.root}!`);
7
+ }
8
+ }
9
+ exports.default = CJS1;
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.run = void 0;
4
+ var core_1 = require("@oclif/core");
5
+ Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "commands": {
4
+ "cjs1": {
5
+ "id": "cjs1",
6
+ "strict": true,
7
+ "pluginName": "@oclif/plugin-test-cjs-1",
8
+ "pluginAlias": "@oclif/plugin-test-cjs-1",
9
+ "pluginType": "core",
10
+ "aliases": [],
11
+ "flags": {},
12
+ "args": {}
13
+ }
14
+ }
15
+ }
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@oclif/plugin-test-cjs-1",
3
+ "version": "0.1.0",
4
+ "description": "Test CJS plugin",
5
+ "author": "Salesforce",
6
+ "bin": {
7
+ "cjs1": "./bin/run"
8
+ },
9
+ "homepage": "https://github.com/oclif/plugin-test-cjs-1",
10
+ "license": "MIT",
11
+ "main": "dist/index.js",
12
+ "repository": "oclif/plugin-test-cjs-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": "^2.4.7"
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.3",
36
+ "ts-node": "^10.9.1",
37
+ "tslib": "^2.6.1",
38
+ "typescript": "^4.9.5"
39
+ },
40
+ "oclif": {
41
+ "bin": "cjs1",
42
+ "dirname": "cjs1",
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-cjs-1/issues",
68
+ "keywords": [
69
+ "oclif"
70
+ ],
71
+ "types": "dist/index.d.ts"
72
+ }