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

@clerc/core

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerc/core - npm Package Compare versions

Comparing version 0.18.0 to 0.19.0

15

dist/index.js

@@ -215,3 +215,3 @@ import { LiteEmit } from 'lite-emit';

};
var _name, _description, _version, _inspectors, _commands, _commandEmitter, _isSingleCommand, isSingleCommand_get, _hasCommands, hasCommands_get;
var _name, _description, _version, _inspectors, _commands, _commandEmitter, _usedNames, _isSingleCommand, isSingleCommand_get, _hasCommands, hasCommands_get;
const SingleCommand = Symbol("SingleCommand");

@@ -228,2 +228,3 @@ const _Clerc = class {

__privateAdd(this, _commandEmitter, new LiteEmit());
__privateAdd(this, _usedNames, []);
}

@@ -285,3 +286,3 @@ get _name() {

for (const name2 of nameList) {
if (Object.keys(__privateGet(this, _commands)).includes(name2) || Object.values(__privateGet(this, _commands)).some(({ alias }) => alias ? toArray(alias).includes(name2) : false)) {
if (__privateGet(this, _usedNames).includes(name2)) {
throw new CommandExistsError(name2);

@@ -291,2 +292,3 @@ }

__privateGet(this, _commands)[name] = commandToSave;
__privateGet(this, _usedNames).push(commandToSave.name, ...toArray(commandToSave.alias) || []);
isCommandObject && handler && this.on(nameOrCommand.name, handler);

@@ -325,3 +327,3 @@ return this;

const parsed = typeFlag((command == null ? void 0 : command.flags) || {}, [...argv]);
const { _: args, flags } = parsed;
const { _: args, flags, unknownFlags } = parsed;
let parameters = __privateGet(this, _isSingleCommand, isSingleCommand_get) || !isCommandResolved ? args : args.slice(command.name.split(" ").length);

@@ -334,3 +336,3 @@ let commandParameters = (command == null ? void 0 : command.parameters) || [];

commandParameters = commandParameters.slice(0, hasEof);
const eofArguments = parsed._["--"];
const eofArguments = args["--"];
parameters = parameters.slice(0, -eofArguments.length || void 0);

@@ -354,3 +356,3 @@ mapErrors.push(mapParametersToArguments(

}
const mergedFlags = { ...parsed.flags, ...parsed.unknownFlags };
const mergedFlags = { ...flags, ...unknownFlags };
const context = {

@@ -363,3 +365,3 @@ name: command == null ? void 0 : command.name,

flags,
unknownFlags: parsed.unknownFlags,
unknownFlags,
cli: this

@@ -401,2 +403,3 @@ };

_commandEmitter = new WeakMap();
_usedNames = new WeakMap();
_isSingleCommand = new WeakSet();

@@ -403,0 +406,0 @@ isSingleCommand_get = function() {

4

package.json
{
"name": "@clerc/core",
"version": "0.18.0",
"version": "0.19.0",
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",

@@ -53,3 +53,3 @@ "description": "Clerc core",

"type-flag": "^3.0.0",
"@clerc/utils": "0.18.0"
"@clerc/utils": "0.19.0"
},

@@ -56,0 +56,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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