@oclif/plugin-test-cjs-2 0.5.10 → 0.6.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/README.md +20 -11
- package/dist/commands/cjs2.d.ts +18 -2
- package/dist/commands/cjs2.js +23 -0
- package/oclif.manifest.json +40 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @oclif/plugin-test-cjs-2
|
|
|
18
18
|
$ cjs2 COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ cjs2 (--version)
|
|
21
|
-
@oclif/plugin-test-cjs-2/0.
|
|
21
|
+
@oclif/plugin-test-cjs-2/0.6.1 linux-x64 node-v18.17.1
|
|
22
22
|
$ cjs2 --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ cjs2 COMMAND
|
|
@@ -27,7 +27,7 @@ USAGE
|
|
|
27
27
|
<!-- usagestop -->
|
|
28
28
|
# Commands
|
|
29
29
|
<!-- commands -->
|
|
30
|
-
* [`cjs2 cjs2`](#cjs2-cjs2)
|
|
30
|
+
* [`cjs2 cjs2 [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`](#cjs2-cjs2-optionalarg-defaultarg-defaultfnarg)
|
|
31
31
|
* [`cjs2 help [COMMANDS]`](#cjs2-help-commands)
|
|
32
32
|
* [`cjs2 plugins`](#cjs2-plugins)
|
|
33
33
|
* [`cjs2 plugins:install PLUGIN...`](#cjs2-pluginsinstall-plugin)
|
|
@@ -39,14 +39,23 @@ USAGE
|
|
|
39
39
|
* [`cjs2 plugins:uninstall PLUGIN...`](#cjs2-pluginsuninstall-plugin-2)
|
|
40
40
|
* [`cjs2 plugins update`](#cjs2-plugins-update)
|
|
41
41
|
|
|
42
|
-
## `cjs2 cjs2`
|
|
42
|
+
## `cjs2 cjs2 [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`
|
|
43
43
|
|
|
44
44
|
```
|
|
45
45
|
USAGE
|
|
46
|
-
$ cjs2 cjs2
|
|
46
|
+
$ cjs2 cjs2 [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG] [--optionalString <value>] [--defaultString
|
|
47
|
+
<value>] [--defaultFnString <value>] [--json]
|
|
48
|
+
|
|
49
|
+
FLAGS
|
|
50
|
+
--defaultFnString=<value> [default: async fn default]
|
|
51
|
+
--defaultString=<value> [default: simple string default]
|
|
52
|
+
--optionalString=<value>
|
|
53
|
+
|
|
54
|
+
GLOBAL FLAGS
|
|
55
|
+
--json Format output as json.
|
|
47
56
|
```
|
|
48
57
|
|
|
49
|
-
_See code: [dist/commands/cjs2.ts](https://github.com/oclif/plugin-test-cjs-2/blob/v0.
|
|
58
|
+
_See code: [dist/commands/cjs2.ts](https://github.com/oclif/plugin-test-cjs-2/blob/v0.6.1/dist/commands/cjs2.ts)_
|
|
50
59
|
|
|
51
60
|
## `cjs2 help [COMMANDS]`
|
|
52
61
|
|
|
@@ -89,7 +98,7 @@ EXAMPLES
|
|
|
89
98
|
$ cjs2 plugins
|
|
90
99
|
```
|
|
91
100
|
|
|
92
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
101
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/index.ts)_
|
|
93
102
|
|
|
94
103
|
## `cjs2 plugins:install PLUGIN...`
|
|
95
104
|
|
|
@@ -154,7 +163,7 @@ EXAMPLES
|
|
|
154
163
|
$ cjs2 plugins:inspect myplugin
|
|
155
164
|
```
|
|
156
165
|
|
|
157
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
166
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/inspect.ts)_
|
|
158
167
|
|
|
159
168
|
## `cjs2 plugins:install PLUGIN...`
|
|
160
169
|
|
|
@@ -194,7 +203,7 @@ EXAMPLES
|
|
|
194
203
|
$ cjs2 plugins:install someuser/someplugin
|
|
195
204
|
```
|
|
196
205
|
|
|
197
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
206
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/install.ts)_
|
|
198
207
|
|
|
199
208
|
## `cjs2 plugins:link PLUGIN`
|
|
200
209
|
|
|
@@ -223,7 +232,7 @@ EXAMPLES
|
|
|
223
232
|
$ cjs2 plugins:link myplugin
|
|
224
233
|
```
|
|
225
234
|
|
|
226
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
235
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/link.ts)_
|
|
227
236
|
|
|
228
237
|
## `cjs2 plugins:uninstall PLUGIN...`
|
|
229
238
|
|
|
@@ -271,7 +280,7 @@ ALIASES
|
|
|
271
280
|
$ cjs2 plugins remove
|
|
272
281
|
```
|
|
273
282
|
|
|
274
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
283
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/uninstall.ts)_
|
|
275
284
|
|
|
276
285
|
## `cjs2 plugins:uninstall PLUGIN...`
|
|
277
286
|
|
|
@@ -312,5 +321,5 @@ DESCRIPTION
|
|
|
312
321
|
Update installed plugins.
|
|
313
322
|
```
|
|
314
323
|
|
|
315
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.
|
|
324
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.0/src/commands/plugins/update.ts)_
|
|
316
325
|
<!-- commandsstop -->
|
package/dist/commands/cjs2.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
1
|
+
import { Command, Interfaces } from '@oclif/core';
|
|
2
|
+
type Result = {
|
|
3
|
+
args: Interfaces.InferredArgs<typeof CJS2.args>;
|
|
4
|
+
flags: Interfaces.InferredFlags<typeof CJS2.flags>;
|
|
5
|
+
};
|
|
2
6
|
export default class CJS2 extends Command {
|
|
3
|
-
|
|
7
|
+
static flags: {
|
|
8
|
+
optionalString: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
9
|
+
defaultString: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
10
|
+
defaultFnString: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static args: {
|
|
13
|
+
optionalArg: Interfaces.Arg<string | undefined, Record<string, unknown>>;
|
|
14
|
+
defaultArg: Interfaces.Arg<string, Record<string, unknown>>;
|
|
15
|
+
defaultFnArg: Interfaces.Arg<string, Record<string, unknown>>;
|
|
16
|
+
};
|
|
17
|
+
static enableJsonFlag: boolean;
|
|
18
|
+
run(): Promise<Result>;
|
|
4
19
|
}
|
|
20
|
+
export {};
|
package/dist/commands/cjs2.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
class CJS2 extends core_1.Command {
|
|
5
6
|
async run() {
|
|
7
|
+
const { args, flags } = await this.parse(CJS2);
|
|
6
8
|
this.log(`hello I am a CJS plugin from ${this.config.root}!`);
|
|
9
|
+
return { args, flags };
|
|
7
10
|
}
|
|
8
11
|
}
|
|
9
12
|
exports.default = CJS2;
|
|
13
|
+
_a = CJS2;
|
|
14
|
+
CJS2.flags = {
|
|
15
|
+
optionalString: core_1.Flags.string(),
|
|
16
|
+
defaultString: core_1.Flags.string({
|
|
17
|
+
default: 'simple string default',
|
|
18
|
+
}),
|
|
19
|
+
defaultFnString: core_1.Flags.string({
|
|
20
|
+
default: async () => Promise.resolve('async fn default'),
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
CJS2.args = {
|
|
24
|
+
optionalArg: core_1.Args.string(),
|
|
25
|
+
defaultArg: core_1.Args.string({
|
|
26
|
+
default: 'simple string default',
|
|
27
|
+
}),
|
|
28
|
+
defaultFnArg: core_1.Args.string({
|
|
29
|
+
default: async () => Promise.resolve('async fn default'),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
CJS2.enableJsonFlag = true;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"cjs2": {
|
|
5
5
|
"id": "cjs2",
|
|
@@ -8,8 +8,45 @@
|
|
|
8
8
|
"pluginAlias": "@oclif/plugin-test-cjs-2",
|
|
9
9
|
"pluginType": "core",
|
|
10
10
|
"aliases": [],
|
|
11
|
-
"flags": {
|
|
12
|
-
|
|
11
|
+
"flags": {
|
|
12
|
+
"optionalString": {
|
|
13
|
+
"name": "optionalString",
|
|
14
|
+
"type": "option",
|
|
15
|
+
"multiple": false
|
|
16
|
+
},
|
|
17
|
+
"defaultString": {
|
|
18
|
+
"name": "defaultString",
|
|
19
|
+
"type": "option",
|
|
20
|
+
"multiple": false,
|
|
21
|
+
"default": "simple string default"
|
|
22
|
+
},
|
|
23
|
+
"defaultFnString": {
|
|
24
|
+
"name": "defaultFnString",
|
|
25
|
+
"type": "option",
|
|
26
|
+
"multiple": false,
|
|
27
|
+
"default": "async fn default"
|
|
28
|
+
},
|
|
29
|
+
"json": {
|
|
30
|
+
"name": "json",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Format output as json.",
|
|
33
|
+
"helpGroup": "GLOBAL",
|
|
34
|
+
"allowNo": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"args": {
|
|
38
|
+
"optionalArg": {
|
|
39
|
+
"name": "optionalArg"
|
|
40
|
+
},
|
|
41
|
+
"defaultArg": {
|
|
42
|
+
"name": "defaultArg",
|
|
43
|
+
"default": "simple string default"
|
|
44
|
+
},
|
|
45
|
+
"defaultFnArg": {
|
|
46
|
+
"name": "defaultFnArg",
|
|
47
|
+
"default": "async fn default"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
13
50
|
}
|
|
14
51
|
}
|
|
15
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-test-cjs-2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Test CJS plugin",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@oclif/core": "^3.0.0-beta.13",
|
|
21
21
|
"@oclif/plugin-help": "^5",
|
|
22
|
-
"@oclif/plugin-plugins": "^3.
|
|
22
|
+
"@oclif/plugin-plugins": "^3.8.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@oclif/test": "^2.5.
|
|
25
|
+
"@oclif/test": "^2.5.4",
|
|
26
26
|
"@types/chai": "^4",
|
|
27
27
|
"@types/mocha": "^9.0.0",
|
|
28
|
-
"@types/node": "^16.18.
|
|
28
|
+
"@types/node": "^16.18.51",
|
|
29
29
|
"chai": "^4",
|
|
30
30
|
"eslint": "^7",
|
|
31
31
|
"eslint-config-oclif": "^4",
|
|
32
32
|
"eslint-config-oclif-typescript": "^1.0.3",
|
|
33
33
|
"mocha": "^9",
|
|
34
|
-
"oclif": "^3.
|
|
34
|
+
"oclif": "^3.16.0",
|
|
35
35
|
"shx": "^0.3.4",
|
|
36
36
|
"ts-node": "^10.9.1",
|
|
37
37
|
"tslib": "^2.6.2",
|