oclif 3.0.1 → 3.1.2

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.
@@ -1 +1 @@
1
- {"version":"3.0.1","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}],"_globalFlags":{}},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[],"_globalFlags":{}},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[],"_globalFlags":{}},"generate:command":{"id":"generate:command","description":"add a command to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}],"_globalFlags":{}},"generate:hook":{"id":"generate:hook","description":"add a hook to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","multiple":false,"default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}],"_globalFlags":{}},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true},"tarball":{"name":"tarball","type":"option","char":"l","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[],"_globalFlags":{}},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}}}}
1
+ {"version":"3.1.2","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}],"_globalFlags":{}},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[],"_globalFlags":{}},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[],"_globalFlags":{}},"generate:command":{"id":"generate:command","description":"add a command to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}],"_globalFlags":{}},"generate:hook":{"id":"generate:hook","description":"add a hook to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","multiple":false,"default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}],"_globalFlags":{}},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true},"parallel":{"name":"parallel","type":"boolean","description":"build tarballs in parallel","allowNo":false},"tarball":{"name":"tarball","type":"option","char":"l","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[],"_globalFlags":{}},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[],"_globalFlags":{}}}}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.1.2](https://github.com/oclif/oclif/compare/v3.1.1...v3.1.2) (2022-07-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * await yeoman generators ([#926](https://github.com/oclif/oclif/issues/926)) ([da5a4d2](https://github.com/oclif/oclif/commit/da5a4d202be114fe7f0c00d2737a9faf8f4e19ab))
11
+
12
+ ### [3.1.1](https://github.com/oclif/oclif/compare/v3.1.0...v3.1.1) (2022-07-15)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * readme for single command cli ([#916](https://github.com/oclif/oclif/issues/916)) ([242b34f](https://github.com/oclif/oclif/commit/242b34f62656b2c6ee8a1d0ecda8d98f8c1c5bbc))
18
+
19
+ ## [3.1.0](https://github.com/oclif/oclif/compare/v3.0.1...v3.1.0) (2022-07-07)
20
+
21
+
22
+ ### Features
23
+
24
+ * build/pack in parallel ([#914](https://github.com/oclif/oclif/issues/914)) ([d86c722](https://github.com/oclif/oclif/commit/d86c722d8de66560c672c2fbdb338cc9a024caa2))
25
+
5
26
  ### [3.0.1](https://github.com/oclif/oclif/compare/v3.0.0...v3.0.1) (2022-04-18)
6
27
 
7
28
 
package/README.md CHANGED
@@ -146,7 +146,7 @@ DESCRIPTION
146
146
  This will clone the template repo 'oclif/hello-world' and update package properties
147
147
  ```
148
148
 
149
- _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/generate.ts)_
149
+ _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v3.1.1/src/commands/generate.ts)_
150
150
 
151
151
  ## `oclif generate command NAME`
152
152
 
@@ -220,7 +220,7 @@ DESCRIPTION
220
220
  generates plugin manifest json
221
221
  ```
222
222
 
223
- _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/manifest.ts)_
223
+ _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v3.1.1/src/commands/manifest.ts)_
224
224
 
225
225
  ## `oclif pack deb`
226
226
 
@@ -260,12 +260,13 @@ packages oclif CLI into tarballs
260
260
 
261
261
  ```
262
262
  USAGE
263
- $ oclif pack tarballs -r <value> [-t <value>] [--xz] [-l <value>]
263
+ $ oclif pack tarballs -r <value> [-t <value>] [--xz] [--parallel] [-l <value>]
264
264
 
265
265
  FLAGS
266
266
  -l, --tarball=<value> optionally specify a path to a tarball already generated by NPM
267
267
  -r, --root=<value> (required) [default: .] path to oclif CLI root
268
268
  -t, --targets=<value> comma-separated targets to pack (e.g.: linux-arm,win32-x64)
269
+ --parallel build tarballs in parallel
269
270
  --[no-]xz also build xz
270
271
 
271
272
  DESCRIPTION
@@ -319,7 +320,7 @@ DESCRIPTION
319
320
  promote CLI builds to a S3 release channel
320
321
  ```
321
322
 
322
- _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/promote.ts)_
323
+ _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v3.1.1/src/commands/promote.ts)_
323
324
 
324
325
  ## `oclif readme`
325
326
 
@@ -349,7 +350,7 @@ DESCRIPTION
349
350
  Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
350
351
  ```
351
352
 
352
- _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/readme.ts)_
353
+ _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v3.1.1/src/commands/readme.ts)_
353
354
 
354
355
  ## `oclif upload deb`
355
356
 
@@ -1,4 +1,4 @@
1
1
  import { Command } from '@oclif/core';
2
2
  export default abstract class CommandBase extends Command {
3
- protected generate(type: string, generatorOptions?: Record<string, unknown>): void;
3
+ protected generate(type: string, generatorOptions?: Record<string, unknown>): Promise<void>;
4
4
  }
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const yeoman_environment_1 = require("yeoman-environment");
5
5
  class CommandBase extends core_1.Command {
6
- generate(type, generatorOptions = {}) {
6
+ async generate(type, generatorOptions = {}) {
7
7
  const env = (0, yeoman_environment_1.createEnv)();
8
8
  env.register(require.resolve(`./generators/${type}`), `oclif:${type}`);
9
9
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
10
  // @ts-ignore
11
- env.run(`oclif:${type}`, generatorOptions);
11
+ await env.run(`oclif:${type}`, generatorOptions);
12
12
  }
13
13
  }
14
14
  exports.default = CommandBase;
@@ -5,7 +5,7 @@ const core_1 = require("@oclif/core");
5
5
  class GenerateCommand extends command_base_1.default {
6
6
  async run() {
7
7
  const { args, flags } = await this.parse(GenerateCommand);
8
- super.generate('command', {
8
+ await super.generate('command', {
9
9
  name: args.name,
10
10
  force: flags.force,
11
11
  });
@@ -5,7 +5,7 @@ const core_1 = require("@oclif/core");
5
5
  class GenerateHook extends command_base_1.default {
6
6
  async run() {
7
7
  const { args, flags } = await this.parse(GenerateHook);
8
- super.generate('hook', {
8
+ await super.generate('hook', {
9
9
  name: args.name,
10
10
  event: flags.event,
11
11
  force: flags.force,
@@ -4,7 +4,7 @@ const command_base_1 = require("./../command-base");
4
4
  class Generate extends command_base_1.default {
5
5
  async run() {
6
6
  const { args } = await this.parse(Generate);
7
- super.generate('cli', {
7
+ await super.generate('cli', {
8
8
  name: args.name,
9
9
  force: true,
10
10
  });
@@ -5,6 +5,7 @@ export default class PackTarballs extends Command {
5
5
  root: import("@oclif/core/lib/interfaces").OptionFlag<string>;
6
6
  targets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
7
7
  xz: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ parallel: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
9
  tarball: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
9
10
  };
10
11
  run(): Promise<void>;
@@ -16,6 +16,7 @@ class PackTarballs extends core_1.Command {
16
16
  }
17
17
  await Tarballs.build(buildConfig, {
18
18
  tarball: flags.tarball,
19
+ parallel: flags.parallel,
19
20
  });
20
21
  qq.cd(prevCwd);
21
22
  }
@@ -29,5 +30,6 @@ PackTarballs.flags = {
29
30
  root: core_1.Flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
30
31
  targets: core_1.Flags.string({ char: 't', description: 'comma-separated targets to pack (e.g.: linux-arm,win32-x64)' }),
31
32
  xz: core_1.Flags.boolean({ description: 'also build xz', allowNo: true }),
33
+ parallel: core_1.Flags.boolean({ description: 'build tarballs in parallel' }),
32
34
  tarball: core_1.Flags.string({ char: 'l', description: 'optionally specify a path to a tarball already generated by NPM', required: false }),
33
35
  };
@@ -27,9 +27,9 @@ class Readme extends core_1.Command {
27
27
  await config.runHook('init', { id: 'readme', argv: this.argv });
28
28
  this.HelpClass = await (0, core_1.loadHelpClass)(config);
29
29
  let readme = await fs.readFile(readmePath, 'utf8');
30
- let commands = config.commands;
31
- commands = commands.filter(c => !c.hidden);
32
- commands = commands.filter(c => c.pluginType === 'core');
30
+ let commands = config.commands
31
+ .filter(c => !c.hidden && c.pluginType === 'core')
32
+ .map(c => c.id === '.' ? Object.assign(Object.assign({}, c), { id: '' }) : c);
33
33
  this.debug('commands:', commands.map(c => c.id).length);
34
34
  commands = (0, util_1.uniqBy)(commands, c => c.id);
35
35
  commands = (0, util_1.sortBy)(commands, c => c.id);
@@ -108,7 +108,7 @@ USAGE
108
108
  return [
109
109
  ...commands.map(c => {
110
110
  const usage = this.commandUsage(config, c);
111
- return `* [\`${config.bin} ${usage}\`](#${slugify.slug(`${config.bin}-${usage}`)})`;
111
+ return usage ? `* [\`${config.bin} ${usage}\`](#${slugify.slug(`${config.bin}-${usage}`)})` : `* [\`${config.bin}\`](#${slugify.slug(`${config.bin}`)})`;
112
112
  }),
113
113
  '',
114
114
  ...commands.map(c => this.renderCommand(config, c)).map(s => s.trim() + '\n'),
@@ -119,7 +119,10 @@ USAGE
119
119
  const title = (0, util_1.template)({ config, command: c })(c.summary || c.description || '').trim().split('\n')[0];
120
120
  const help = new this.HelpClass(config, { stripAnsi: true, maxWidth: columns });
121
121
  const wrapper = new help_compatibility_1.HelpCompatibilityWrapper(help);
122
- const header = () => `## \`${config.bin} ${this.commandUsage(config, c)}\``;
122
+ const header = () => {
123
+ const usage = this.commandUsage(config, c);
124
+ return usage ? `## \`${config.bin} ${usage}\`` : `## \`${config.bin}\``;
125
+ };
123
126
  try {
124
127
  return (0, util_1.compact)([
125
128
  header(),
@@ -211,7 +214,7 @@ USAGE
211
214
  return `${name}`;
212
215
  return `[${name}]`;
213
216
  };
214
- const id = config.topicSeparator ? command.id.replace(/:/g, config.topicSeparator) : command.id;
217
+ const id = (0, core_1.toConfiguredId)(command.id, config);
215
218
  const defaultUsage = () => {
216
219
  return (0, util_1.compact)([
217
220
  id,
@@ -3,4 +3,5 @@ export declare function build(c: BuildConfig, options?: {
3
3
  platform?: string;
4
4
  pack?: boolean;
5
5
  tarball?: string;
6
+ parallel?: boolean;
6
7
  }): Promise<void>;
@@ -104,9 +104,15 @@ async function build(c, options = {}) {
104
104
  });
105
105
  if (options.pack === false)
106
106
  return;
107
- await pack(workspace, c.dist(gzLocalKey));
108
- if (xz)
109
- await pack(workspace, c.dist(xzLocalKey));
107
+ if (options.parallel) {
108
+ await Promise.all([pack(workspace, c.dist(gzLocalKey))]
109
+ .concat(xz ? [pack(workspace, c.dist(xzLocalKey))] : []));
110
+ }
111
+ else {
112
+ await pack(workspace, c.dist(gzLocalKey));
113
+ if (xz)
114
+ await pack(workspace, c.dist(xzLocalKey));
115
+ }
110
116
  if (!c.updateConfig.s3.host)
111
117
  return;
112
118
  const rollout = (typeof c.updateConfig.autoupdate === 'object' && c.updateConfig.autoupdate.rollout);
@@ -141,8 +147,14 @@ async function build(c, options = {}) {
141
147
  await addDependencies();
142
148
  await (0, bin_1.writeBinScripts)({ config, baseWorkspace: c.workspace(), nodeVersion: c.nodeVersion });
143
149
  await pretarball();
144
- for (const target of c.targets) {
145
- if (!options.platform || options.platform === target.platform) {
150
+ const targetsToBuild = c.targets.filter(t => !options.platform || options.platform === t.platform);
151
+ if (options.parallel) {
152
+ (0, log_1.log)(`will build ${targetsToBuild.length} targets in parallel`);
153
+ await Promise.all(targetsToBuild.map(t => buildTarget(t)));
154
+ }
155
+ else {
156
+ (0, log_1.log)(`will build ${targetsToBuild.length} targets sequentially`);
157
+ for (const target of targetsToBuild) {
146
158
  // eslint-disable-next-line no-await-in-loop
147
159
  await buildTarget(target);
148
160
  }
@@ -41,19 +41,17 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
41
41
  const basedir = path.dirname(tarball);
42
42
  await qq.mkdirp(basedir);
43
43
  await qq.download(url, tarball);
44
- await qq.x(`grep "${path.basename(tarball)}" "${shasums}" | shasum -a 256 -c -`, { cwd: basedir });
44
+ if (platform !== 'win32')
45
+ await qq.x(`grep "${path.basename(tarball)}" "${shasums}" | shasum -a 256 -c -`, { cwd: basedir });
45
46
  };
46
47
  const extract = async () => {
47
48
  (0, log_1.log)(`extracting ${nodeBase}`);
48
49
  const nodeTmp = path.join(tmp, 'node');
49
- await qq.rm([nodeTmp, nodeBase]);
50
50
  await qq.mkdirp(nodeTmp);
51
51
  await qq.mkdirp(path.dirname(cache));
52
52
  if (platform === 'win32') {
53
- qq.pushd(nodeTmp);
54
- await qq.x(`7z x -bd -y "${tarball}" > /dev/null`);
55
- await qq.mv([nodeBase, 'node.exe'], cache);
56
- qq.popd();
53
+ await qq.x(`7z x -bd -y "${tarball}"`, { cwd: nodeTmp });
54
+ await qq.mv([nodeTmp, nodeBase, 'node.exe'], cache);
57
55
  }
58
56
  else {
59
57
  await qq.x(`tar -C "${tmp}/node" -xJf "${tarball}"`);
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "3.0.1",
4
+ "version": "3.1.2",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run"
8
8
  },
9
9
  "bugs": "https://github.com/oclif/oclif/issues",
10
10
  "dependencies": {
11
- "@oclif/core": "^1.6.4",
11
+ "@oclif/core": "^1.9.9",
12
12
  "@oclif/plugin-help": "^5.1.12",
13
13
  "@oclif/plugin-not-found": "^2.3.1",
14
14
  "@oclif/plugin-warn-if-update-available": "^2.0.4",
15
- "aws-sdk": "^2.1069.0",
15
+ "aws-sdk": "^2.1116.0",
16
16
  "concurrently": "^7.0.0",
17
17
  "debug": "^4.3.3",
18
18
  "find-yarn-workspace-root": "^2.0.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@oclif/plugin-legacy": "^1.2.7",
32
- "@oclif/test": "^2.0.3",
32
+ "@oclif/test": "^2.1.0",
33
33
  "@types/chai": "^4.3.0",
34
34
  "@types/execa": "^0.9.0",
35
35
  "@types/fs-extra": "^9.0",
@@ -42,7 +42,7 @@
42
42
  "@types/shelljs": "^0.8.11",
43
43
  "@types/supports-color": "^7.2.1",
44
44
  "@types/write-json-file": "^3.2.1",
45
- "@types/yeoman-generator": "^5.2.9",
45
+ "@types/yeoman-generator": "^5.2.10",
46
46
  "@types/yosay": "^2.0.1",
47
47
  "chai": "^4.3.6",
48
48
  "conventional-changelog-cli": "^2.2.2",
@@ -52,13 +52,13 @@
52
52
  "execa": "^0.11.0",
53
53
  "fancy-test": "^1.4.10",
54
54
  "globby": "^11.1.0",
55
- "mocha": "^9.2.0",
55
+ "mocha": "^9.2.2",
56
56
  "npm-run-path": "^4.0.1",
57
57
  "nps": "^5.10.0",
58
58
  "shelljs": "^0.8.5",
59
59
  "shx": "^0.3.4",
60
60
  "tmp": "^0.2.1",
61
- "ts-node": "^10.4.0",
61
+ "ts-node": "^10.7.0",
62
62
  "typescript": "4.5.5"
63
63
  },
64
64
  "resolutions": {