Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oclif/plugin-commands

Package Overview
Dependencies
Maintainers
3
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/plugin-commands - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

<a name="1.1.0"></a>
# [1.1.0](https://github.com/oclif/plugin-commands/compare/v1.0.0...v1.1.0) (2018-05-31)
### Features
* add --hidden flag ([e6b9424](https://github.com/oclif/plugin-commands/commit/e6b9424))
<a name="1.0.0"></a>

@@ -2,0 +10,0 @@ # 1.0.0 (2018-05-31)

@@ -33,4 +33,18 @@ import { Command } from '@oclif/command';

};
hidden: {
name: string;
char?: "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "X" | "Y" | "Z" | undefined;
description?: string | undefined;
hidden?: boolean | undefined;
required?: boolean | undefined;
dependsOn?: string[] | undefined;
exclusive?: string[] | undefined;
env?: string | undefined;
parse(input: boolean, context: any): boolean;
} & {
type: "boolean";
allowNo: boolean;
};
};
run(): Promise<void>;
}

8

lib/commands/commands.js

@@ -9,4 +9,7 @@ "use strict";

const { flags } = this.parse(Commands);
const commands = this.config.commands;
_.sortBy(commands, 'id');
let commands = this.config.commands;
if (!flags.hidden) {
commands = commands.filter(c => !c.hidden);
}
commands = _.sortBy(commands, 'id');
if (flags.json) {

@@ -26,3 +29,4 @@ cli_ux_1.default.styledJSON(commands);

json: command_1.flags.boolean({ char: 'j', description: 'output in json format' }),
hidden: command_1.flags.boolean({ description: 'also show hidden commands' }),
};
exports.default = Commands;

@@ -1,1 +0,1 @@

{"version":"1.0.0","commands":{"commands":{"id":"commands","description":"list all the commands","pluginName":"@oclif/plugin-commands","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help"},"json":{"name":"json","type":"boolean","char":"j","description":"output in json format"}},"args":[]}}}
{"version":"1.1.0","commands":{"commands":{"id":"commands","description":"list all the commands","pluginName":"@oclif/plugin-commands","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help"},"json":{"name":"json","type":"boolean","char":"j","description":"output in json format"},"hidden":{"name":"hidden","type":"boolean","description":"also show hidden commands"}},"args":[]}}}
{
"name": "@oclif/plugin-commands",
"description": "plugin to show the list of all the commands",
"version": "1.0.0",
"version": "1.1.0",
"author": "Jeff Dickey @jdxcode",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/plugin-commands/issues",

@@ -25,3 +25,3 @@ @oclif/plugin-commands

$ oclif-example (-v|--version|version)
@oclif/plugin-commands/1.0.0 linux-x64 node-v10.2.1
@oclif/plugin-commands/1.1.0 linux-x64 node-v10.2.1
$ oclif-example --help [COMMAND]

@@ -48,5 +48,6 @@ USAGE

-j, --json output in json format
--hidden also show hidden commands
```
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v1.0.0/src/commands/commands.ts)_
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v1.1.0/src/commands/commands.ts)_
<!-- commandsstop -->
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc