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

cilly

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cilly - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

3

dist/cli-command.d.ts

@@ -71,2 +71,3 @@ export declare type ArgumentValue = any;

subCommands: CommandDefinition[];
extra?: any;
};

@@ -89,2 +90,3 @@ export declare class CliCommand {

private negatableOptsMap;
private extra;
private onProcessQueue;

@@ -112,2 +114,3 @@ private parsed;

withVersion(version: string, handler?: (command: CommandDefinition) => void): CliCommand;
withExtra(extra: any): CliCommand;
dump(dumped?: CliCommand[]): CommandDefinition;

@@ -114,0 +117,0 @@ /**

@@ -28,2 +28,3 @@ "use strict";

this.negatableOptsMap = {}; // Maps --no-* flags to negatable options
this.extra = undefined; // Arbitrary data (e.g. documentation) to append to a dumped command
// Maintain option/argument assignment order to call onProcess() hooks in the order they were defined

@@ -155,2 +156,6 @@ this.onProcessQueue = [];

}
withExtra(extra) {
this.extra = extra;
return this;
}
dump(dumped = []) {

@@ -163,2 +168,3 @@ return {

args: Object.values(this.argsMap).map(a => this.dumpArgument(a)),
extra: this.extra,
subCommands: dumped.includes(this)

@@ -165,0 +171,0 @@ ? [] // Prevent endless recursion

2

package.json
{
"name": "cilly",
"version": "1.0.19",
"version": "1.0.20",
"description": "The last library you'll ever need for building intuitive, robust and flexible CLI tools with Node.js and TypeScript.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -644,2 +644,15 @@ # Cilly

Arbitrary data can be appended to dumped command objects using the `.withExtra()` method, e.g.:
```typescript
new CliCommand('build')
.withExtra({
documentationSections: [
{ type: 'title', content: 'Running the build command' },
{ type: 'body', content: 'When running the build command, ...' },
...
]
})
```
Here's an example of a command dump:

@@ -646,0 +659,0 @@

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