New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

to
1.0.6

6

dist/cli-command.d.ts

@@ -145,2 +145,8 @@ export declare type ArgumentValue = any;

private isEmpty;
/**
* Splits all --option=value strings into ['--option', 'value'] so they
* can be parsed consistently
* @param processArgs process.argv
*/
private splitOptionAssignments;
}

21

dist/cli-command.js

@@ -139,3 +139,3 @@ "use strict";

// The "queue" of arguments, cloned so we don't modify the original
const q = [...opts.raw ? processArgs : processArgs.slice(2)];
const q = this.splitOptionAssignments([...opts.raw ? processArgs : processArgs.slice(2)]);
// Parse the input

@@ -467,4 +467,23 @@ while (q.length) {

}
/**
* Splits all --option=value strings into ['--option', 'value'] so they
* can be parsed consistently
* @param processArgs process.argv
*/
splitOptionAssignments(processArgs) {
const splitArgs = [];
for (const arg of processArgs) {
if (token_parser_1.TokenParser.isOptionAssignment(arg)) {
const [option, value] = arg.split('=');
splitArgs.push(option);
splitArgs.push(value);
}
else {
splitArgs.push(arg);
}
}
return splitArgs;
}
}
exports.CliCommand = CliCommand;
//# sourceMappingURL=cli-command.js.map

@@ -15,2 +15,3 @@ export declare const getNegatedFlag: (longFlag: any) => string;

isVariadicTerminator: (token: string) => boolean;
isOptionAssignment: (token: string) => boolean;
};

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

const OPTIONAL_VALUE_SYNTAX = new RegExp(`(${WHITESPACE.source}\\[${VARIADIC_SYNTAX.source}?${OPTION_NAME_SYNTAX.source}\\])`);
const OPTION_ASSIGNMENT = new RegExp(`(${OPTION_NAME_SYNTAX.source})`);
const OPTION_SIGNATURE_SYNTAX = new RegExp(`^${SHORT_OPTION_NAME_SYNTAX.source},${WHITESPACE.source}${LONG_OPTION_NAME_SYNTAX.source}` +

@@ -28,2 +29,5 @@ `(${REQUIRED_VALUE_SYNTAX.source}|${OPTIONAL_VALUE_SYNTAX.source})*$`);

const isVariadicTerminator = (token) => token === '--';
const isOptionAssignment = (token) => {
return token.includes('=') && isOptionName(token.split('=')[0]);
};
/**

@@ -63,4 +67,5 @@ * Capitalizes the first letter in a string

toCamelCase,
isVariadicTerminator
isVariadicTerminator,
isOptionAssignment
};
//# sourceMappingURL=token-parser.js.map

2

package.json
{
"name": "cilly",
"version": "1.0.5",
"version": "1.0.6",
"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",