oclif 3.1.0 → 3.2.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.
@@ -1 +1 @@
1
- {"version":"3.1.0","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":{}}}}
1
+ {"version":"3.2.0","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},"aliases":{"name":"aliases","type":"boolean","description":"include aliases in the command list","allowNo":true}},"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.2.0](https://github.com/oclif/oclif/compare/v3.1.2...v3.2.0) (2022-09-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * add `--aliases` flag for readme command ([#925](https://github.com/oclif/oclif/issues/925)) ([#952](https://github.com/oclif/oclif/issues/952)) ([5bf2b5a](https://github.com/oclif/oclif/commit/5bf2b5a51210d554a1768d69fbf93c9c6f6b2b2a))
11
+
12
+ ### [3.1.2](https://github.com/oclif/oclif/compare/v3.1.1...v3.1.2) (2022-07-27)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * await yeoman generators ([#926](https://github.com/oclif/oclif/issues/926)) ([da5a4d2](https://github.com/oclif/oclif/commit/da5a4d202be114fe7f0c00d2737a9faf8f4e19ab))
18
+
19
+ ### [3.1.1](https://github.com/oclif/oclif/compare/v3.1.0...v3.1.1) (2022-07-15)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * readme for single command cli ([#916](https://github.com/oclif/oclif/issues/916)) ([242b34f](https://github.com/oclif/oclif/commit/242b34f62656b2c6ee8a1d0ecda8d98f8c1c5bbc))
25
+
5
26
  ## [3.1.0](https://github.com/oclif/oclif/compare/v3.0.1...v3.1.0) (2022-07-07)
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.1/src/commands/generate.ts)_
149
+ _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v3.1.2/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.1/src/commands/manifest.ts)_
223
+ _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v3.1.2/src/commands/manifest.ts)_
224
224
 
225
225
  ## `oclif pack deb`
226
226
 
@@ -320,7 +320,7 @@ DESCRIPTION
320
320
  promote CLI builds to a S3 release channel
321
321
  ```
322
322
 
323
- _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v3.0.1/src/commands/promote.ts)_
323
+ _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v3.1.2/src/commands/promote.ts)_
324
324
 
325
325
  ## `oclif readme`
326
326
 
@@ -328,11 +328,12 @@ adds commands to README.md in current directory
328
328
 
329
329
  ```
330
330
  USAGE
331
- $ oclif readme --dir <value> [--multi]
331
+ $ oclif readme --dir <value> [--multi] [--aliases]
332
332
 
333
333
  FLAGS
334
- --dir=<value> (required) [default: docs] output directory for multi docs
335
- --multi create a different markdown page for each topic
334
+ --[no-]aliases include aliases in the command list
335
+ --dir=<value> (required) [default: docs] output directory for multi docs
336
+ --multi create a different markdown page for each topic
336
337
 
337
338
  DESCRIPTION
338
339
  adds commands to README.md in current directory
@@ -350,7 +351,7 @@ DESCRIPTION
350
351
  Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
351
352
  ```
352
353
 
353
- _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v3.0.1/src/commands/readme.ts)_
354
+ _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v3.1.2/src/commands/readme.ts)_
354
355
 
355
356
  ## `oclif upload deb`
356
357
 
@@ -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
  });
@@ -4,6 +4,7 @@ export default class Readme extends Command {
4
4
  static flags: {
5
5
  dir: Interfaces.OptionFlag<string>;
6
6
  multi: Interfaces.BooleanFlag<boolean>;
7
+ aliases: Interfaces.BooleanFlag<boolean>;
7
8
  };
8
9
  private HelpClass;
9
10
  run(): Promise<void>;
@@ -27,9 +27,10 @@ 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
+ .filter(c => flags.aliases ? true : !c.aliases.includes(c.id))
33
+ .map(c => c.id === '.' ? Object.assign(Object.assign({}, c), { id: '' }) : c);
33
34
  this.debug('commands:', commands.map(c => c.id).length);
34
35
  commands = (0, util_1.uniqBy)(commands, c => c.id);
35
36
  commands = (0, util_1.sortBy)(commands, c => c.id);
@@ -108,7 +109,7 @@ USAGE
108
109
  return [
109
110
  ...commands.map(c => {
110
111
  const usage = this.commandUsage(config, c);
111
- return `* [\`${config.bin} ${usage}\`](#${slugify.slug(`${config.bin}-${usage}`)})`;
112
+ return usage ? `* [\`${config.bin} ${usage}\`](#${slugify.slug(`${config.bin}-${usage}`)})` : `* [\`${config.bin}\`](#${slugify.slug(`${config.bin}`)})`;
112
113
  }),
113
114
  '',
114
115
  ...commands.map(c => this.renderCommand(config, c)).map(s => s.trim() + '\n'),
@@ -119,7 +120,10 @@ USAGE
119
120
  const title = (0, util_1.template)({ config, command: c })(c.summary || c.description || '').trim().split('\n')[0];
120
121
  const help = new this.HelpClass(config, { stripAnsi: true, maxWidth: columns });
121
122
  const wrapper = new help_compatibility_1.HelpCompatibilityWrapper(help);
122
- const header = () => `## \`${config.bin} ${this.commandUsage(config, c)}\``;
123
+ const header = () => {
124
+ const usage = this.commandUsage(config, c);
125
+ return usage ? `## \`${config.bin} ${usage}\`` : `## \`${config.bin}\``;
126
+ };
123
127
  try {
124
128
  return (0, util_1.compact)([
125
129
  header(),
@@ -211,7 +215,7 @@ USAGE
211
215
  return `${name}`;
212
216
  return `[${name}]`;
213
217
  };
214
- const id = config.topicSeparator ? command.id.replace(/:/g, config.topicSeparator) : command.id;
218
+ const id = (0, core_1.toConfiguredId)(command.id, config);
215
219
  const defaultUsage = () => {
216
220
  return (0, util_1.compact)([
217
221
  id,
@@ -235,4 +239,5 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
235
239
  Readme.flags = {
236
240
  dir: core_1.Flags.string({ description: 'output directory for multi docs', default: 'docs', required: true }),
237
241
  multi: core_1.Flags.boolean({ description: 'create a different markdown page for each topic' }),
242
+ aliases: core_1.Flags.boolean({ description: 'include aliases in the command list', allowNo: true, default: true }),
238
243
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "3.1.0",
4
+ "version": "3.2.0",
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",