@oclif/plugin-test-esbuild 0.1.7 → 0.2.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 CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @oclif/plugin-test-esbuild
18
18
  $ bundle COMMAND
19
19
  running command...
20
20
  $ bundle (--version)
21
- @oclif/plugin-test-esbuild/0.1.7 linux-x64 node-v20.11.0
21
+ @oclif/plugin-test-esbuild/0.2.1 linux-x64 node-v20.11.0
22
22
  $ bundle --help [COMMAND]
23
23
  USAGE
24
24
  $ bundle COMMAND
@@ -27,6 +27,7 @@ USAGE
27
27
  <!-- usagestop -->
28
28
  # Commands
29
29
  <!-- commands -->
30
+ * [`bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`](#bundle-esbuild-optionalarg-defaultarg-defaultfnarg)
30
31
  * [`bundle hello PERSON`](#bundle-hello-person)
31
32
  * [`bundle hello alias`](#bundle-hello-alias)
32
33
  * [`bundle hello world`](#bundle-hello-world)
@@ -42,6 +43,22 @@ USAGE
42
43
  * [`bundle plugins:uninstall PLUGIN...`](#bundle-pluginsuninstall-plugin-2)
43
44
  * [`bundle plugins update`](#bundle-plugins-update)
44
45
 
46
+ ## `bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG]`
47
+
48
+ ```
49
+ USAGE
50
+ $ bundle esbuild [OPTIONALARG] [DEFAULTARG] [DEFAULTFNARG] [--json] [--defaultFnString <value>]
51
+ [--defaultString <value>] [--optionalString <value>]
52
+
53
+ FLAGS
54
+ --defaultFnString=<value> [default: async fn default]
55
+ --defaultString=<value> [default: simple string default]
56
+ --optionalString=<value>
57
+
58
+ GLOBAL FLAGS
59
+ --json Format output as json.
60
+ ```
61
+
45
62
  ## `bundle hello PERSON`
46
63
 
47
64
  Say hello
package/dist/index.js CHANGED
@@ -220797,7 +220797,7 @@ var require_cli_ux = __commonJS({
220797
220797
  var wait_1 = __importDefault(require_wait());
220798
220798
  var write_1 = __importDefault(require_write());
220799
220799
  var hyperlinker = require_hyperlinker();
220800
- var ux = class {
220800
+ var ux2 = class {
220801
220801
  static config = config_1.config;
220802
220802
  static get action() {
220803
220803
  return config_1.config.action;
@@ -220884,8 +220884,8 @@ var require_cli_ux = __commonJS({
220884
220884
  return wait_1.default;
220885
220885
  }
220886
220886
  };
220887
- exports2.ux = ux;
220888
- var { action, annotation, anykey, confirm, debug, done, flush, info, log, logToStderr, progress, prompt, styledHeader, styledJSON, styledObject, table, trace, tree, url, wait } = ux;
220887
+ exports2.ux = ux2;
220888
+ var { action, annotation, anykey, confirm, debug, done, flush, info, log, logToStderr, progress, prompt, styledHeader, styledJSON, styledObject, table, trace, tree, url, wait } = ux2;
220889
220889
  exports2.action = action;
220890
220890
  exports2.annotation = annotation;
220891
220891
  exports2.anykey = anykey;
@@ -220912,7 +220912,7 @@ var require_cli_ux = __commonJS({
220912
220912
  exports2.warn = warn;
220913
220913
  var uxProcessExitHandler = async () => {
220914
220914
  try {
220915
- await ux.done();
220915
+ await ux2.done();
220916
220916
  } catch (error2) {
220917
220917
  console.error(error2);
220918
220918
  process.exitCode = 1;
@@ -230055,7 +230055,7 @@ var require_command2 = __commonJS({
230055
230055
  return;
230056
230056
  throw err;
230057
230057
  });
230058
- var Command3 = class {
230058
+ var Command4 = class {
230059
230059
  argv;
230060
230060
  config;
230061
230061
  /** An array of aliases for this command. */
@@ -230318,7 +230318,7 @@ var require_command2 = __commonJS({
230318
230318
  keys.map((key) => delete process.env[key]);
230319
230319
  }
230320
230320
  };
230321
- exports2.Command = Command3;
230321
+ exports2.Command = Command4;
230322
230322
  }
230323
230323
  });
230324
230324
 
@@ -230572,11 +230572,41 @@ __export(src_exports, {
230572
230572
  });
230573
230573
  module.exports = __toCommonJS(src_exports);
230574
230574
 
230575
- // src/commands/hello/index.ts
230575
+ // src/commands/esbuild.ts
230576
230576
  var import_core = __toESM(require_lib2());
230577
- var Hello = class _Hello extends import_core.Command {
230577
+ var ESBuild = class _ESBuild extends import_core.Command {
230578
230578
  static args = {
230579
- person: import_core.Args.string({ description: "Person to say hello to", required: true })
230579
+ optionalArg: import_core.Args.string(),
230580
+ // eslint-disable-next-line perfectionist/sort-objects
230581
+ defaultArg: import_core.Args.string({
230582
+ default: "simple string default"
230583
+ }),
230584
+ defaultFnArg: import_core.Args.string({
230585
+ default: async () => "async fn default"
230586
+ })
230587
+ };
230588
+ static enableJsonFlag = true;
230589
+ static flags = {
230590
+ defaultFnString: import_core.Flags.string({
230591
+ default: async () => "async fn default"
230592
+ }),
230593
+ defaultString: import_core.Flags.string({
230594
+ default: "simple string default"
230595
+ }),
230596
+ optionalString: import_core.Flags.string()
230597
+ };
230598
+ async run() {
230599
+ const { args, flags } = await this.parse(_ESBuild);
230600
+ this.log(`hello I am a bundled (esbuild) plugin from ${this.config.root}!`);
230601
+ return { args, flags };
230602
+ }
230603
+ };
230604
+
230605
+ // src/commands/hello/index.ts
230606
+ var import_core2 = __toESM(require_lib2());
230607
+ var Hello = class _Hello extends import_core2.Command {
230608
+ static args = {
230609
+ person: import_core2.Args.string({ description: "Person to say hello to", required: true })
230580
230610
  };
230581
230611
  static description = "Say hello";
230582
230612
  static examples = [
@@ -230585,7 +230615,7 @@ hello friend from oclif! (./src/commands/hello/index.ts)
230585
230615
  `
230586
230616
  ];
230587
230617
  static flags = {
230588
- from: import_core.Flags.string({ char: "f", description: "Who is saying hello", required: true })
230618
+ from: import_core2.Flags.string({ char: "f", description: "Who is saying hello", required: true })
230589
230619
  };
230590
230620
  async run() {
230591
230621
  const { args, flags } = await this.parse(_Hello);
@@ -230594,8 +230624,8 @@ hello friend from oclif! (./src/commands/hello/index.ts)
230594
230624
  };
230595
230625
 
230596
230626
  // src/commands/hello/world.ts
230597
- var import_core2 = __toESM(require_lib2());
230598
- var World = class extends import_core2.Command {
230627
+ var import_core3 = __toESM(require_lib2());
230628
+ var World = class extends import_core3.Command {
230599
230629
  static args = {};
230600
230630
  static description = "Say hello world";
230601
230631
  static examples = [
@@ -230610,14 +230640,15 @@ hello world! (./src/commands/hello/world.ts)
230610
230640
  };
230611
230641
 
230612
230642
  // src/hooks/init/init.ts
230613
- var hook = async function(opts) {
230614
- process.stdout.write(`example hook running ${opts.id}
230615
- `);
230643
+ var import_core4 = __toESM(require_lib2());
230644
+ var hook = async function() {
230645
+ import_core4.ux.log("Greetings! from plugin-test-esbuild init hook");
230616
230646
  };
230617
230647
  var init_default = hook;
230618
230648
 
230619
230649
  // src/index.ts
230620
230650
  var COMMANDS = {
230651
+ esbuild: ESBuild,
230621
230652
  hello: Hello,
230622
230653
  "hello:alias": World,
230623
230654
  "hello:world": World
@@ -1,5 +1,58 @@
1
1
  {
2
2
  "commands": {
3
+ "esbuild": {
4
+ "aliases": [],
5
+ "args": {
6
+ "optionalArg": {
7
+ "name": "optionalArg"
8
+ },
9
+ "defaultArg": {
10
+ "default": "simple string default",
11
+ "name": "defaultArg"
12
+ },
13
+ "defaultFnArg": {
14
+ "default": "async fn default",
15
+ "name": "defaultFnArg"
16
+ }
17
+ },
18
+ "flags": {
19
+ "json": {
20
+ "description": "Format output as json.",
21
+ "helpGroup": "GLOBAL",
22
+ "name": "json",
23
+ "allowNo": false,
24
+ "type": "boolean"
25
+ },
26
+ "defaultFnString": {
27
+ "name": "defaultFnString",
28
+ "default": "async fn default",
29
+ "hasDynamicHelp": false,
30
+ "multiple": false,
31
+ "type": "option"
32
+ },
33
+ "defaultString": {
34
+ "name": "defaultString",
35
+ "default": "simple string default",
36
+ "hasDynamicHelp": false,
37
+ "multiple": false,
38
+ "type": "option"
39
+ },
40
+ "optionalString": {
41
+ "name": "optionalString",
42
+ "hasDynamicHelp": false,
43
+ "multiple": false,
44
+ "type": "option"
45
+ }
46
+ },
47
+ "hasDynamicHelp": false,
48
+ "hiddenAliases": [],
49
+ "id": "esbuild",
50
+ "pluginAlias": "@oclif/plugin-test-esbuild",
51
+ "pluginName": "@oclif/plugin-test-esbuild",
52
+ "pluginType": "core",
53
+ "strict": true,
54
+ "enableJsonFlag": true
55
+ },
3
56
  "hello": {
4
57
  "aliases": [],
5
58
  "args": {
@@ -68,5 +121,5 @@
68
121
  "enableJsonFlag": false
69
122
  }
70
123
  },
71
- "version": "0.1.7"
124
+ "version": "0.2.1"
72
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oclif/plugin-test-esbuild",
3
- "version": "0.1.7",
3
+ "version": "0.2.1",
4
4
  "description": "Bundled plugin for testing",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-test-esbuild/issues",