Socket
Socket
Sign inDemoInstall

clipanion

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clipanion - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

README.md

2

lib/advanced/Cli.js

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

process: input => this.process(input),
run: (input, subContext) => this.run(input, Object.assign({}, context, subContext)),
run: (input, subContext) => this.run(input, Object.assign(Object.assign({}, context), subContext)),
usage: (command, opts) => this.usage(command, opts),

@@ -83,0 +83,0 @@ };

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

exports.BATCH_REGEX = /^-[a-zA-Z]{2,}$/;
exports.BINDING_REGEX = /^([^=]+)=(.*)$/;
exports.BINDING_REGEX = /^([^=]+)=([\s\S]*)$/;
// ------------------------------------------------------------------------

@@ -375,37 +375,37 @@ exports.DEBUG = process.env.DEBUG_CLI === `1`;

setCandidateUsage: (state, segment, usage) => {
return Object.assign({}, state, { candidateUsage: usage });
return Object.assign(Object.assign({}, state), { candidateUsage: usage });
},
setSelectedIndex: (state, segment, index) => {
return Object.assign({}, state, { selectedIndex: index });
return Object.assign(Object.assign({}, state), { selectedIndex: index });
},
pushBatch: (state, segment) => {
return Object.assign({}, state, { options: state.options.concat([...segment.slice(1)].map(name => ({ name: `-${name}`, value: true }))) });
return Object.assign(Object.assign({}, state), { options: state.options.concat([...segment.slice(1)].map(name => ({ name: `-${name}`, value: true }))) });
},
pushBound: (state, segment) => {
const [, name, value] = segment.match(exports.BINDING_REGEX);
return Object.assign({}, state, { options: state.options.concat({ name, value }) });
return Object.assign(Object.assign({}, state), { options: state.options.concat({ name, value }) });
},
pushPath: (state, segment) => {
return Object.assign({}, state, { path: state.path.concat(segment) });
return Object.assign(Object.assign({}, state), { path: state.path.concat(segment) });
},
pushPositional: (state, segment) => {
return Object.assign({}, state, { positionals: state.positionals.concat({ value: segment, extra: false }) });
return Object.assign(Object.assign({}, state), { positionals: state.positionals.concat({ value: segment, extra: false }) });
},
pushExtra: (state, segment) => {
return Object.assign({}, state, { positionals: state.positionals.concat({ value: segment, extra: true }) });
return Object.assign(Object.assign({}, state), { positionals: state.positionals.concat({ value: segment, extra: true }) });
},
pushTrue: (state, segment, name = segment) => {
return Object.assign({}, state, { options: state.options.concat({ name: segment, value: true }) });
return Object.assign(Object.assign({}, state), { options: state.options.concat({ name: segment, value: true }) });
},
pushFalse: (state, segment, name = segment) => {
return Object.assign({}, state, { options: state.options.concat({ name, value: false }) });
return Object.assign(Object.assign({}, state), { options: state.options.concat({ name, value: false }) });
},
pushUndefined: (state, segment) => {
return Object.assign({}, state, { options: state.options.concat({ name: segment, value: undefined }) });
return Object.assign(Object.assign({}, state), { options: state.options.concat({ name: segment, value: undefined }) });
},
setStringValue: (state, segment) => {
return Object.assign({}, state, { options: state.options.slice(0, -1).concat(Object.assign({}, state.options[state.options.length - 1], { value: segment })) });
return Object.assign(Object.assign({}, state), { options: state.options.slice(0, -1).concat(Object.assign(Object.assign({}, state.options[state.options.length - 1]), { value: segment })) });
},
inhibateOptions: (state) => {
return Object.assign({}, state, { ignoreOptions: true });
return Object.assign(Object.assign({}, state), { ignoreOptions: true });
},

@@ -415,6 +415,6 @@ useHelp: (state, segment, command) => {

if (typeof index !== `undefined`) {
return Object.assign({}, state, { options: [{ name: `-c`, value: String(command) }, { name: `-i`, value: index }] });
return Object.assign(Object.assign({}, state), { options: [{ name: `-c`, value: String(command) }, { name: `-i`, value: index }] });
}
else {
return Object.assign({}, state, { options: [{ name: `-c`, value: String(command) }] });
return Object.assign(Object.assign({}, state), { options: [{ name: `-c`, value: String(command) }] });
}

@@ -424,6 +424,6 @@ },

if (segment === exports.END_OF_INPUT) {
return Object.assign({}, state, { errorMessage: `${errorMessage}.` });
return Object.assign(Object.assign({}, state), { errorMessage: `${errorMessage}.` });
}
else {
return Object.assign({}, state, { errorMessage: `${errorMessage} ("${segment}").` });
return Object.assign(Object.assign({}, state), { errorMessage: `${errorMessage} ("${segment}").` });
}

@@ -430,0 +430,0 @@ },

{
"name": "clipanion",
"version": "2.1.5",
"version": "2.1.6",
"main": "lib/advanced",

@@ -5,0 +5,0 @@ "license": "MIT",

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