New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@drizzle-team/brocli

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drizzle-team/brocli - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

index.d.ts

@@ -128,5 +128,5 @@ /**

*/
declare const runCli: (commands: Command[], config?: BroCliConfig) => void;
declare const runCli: (commands: Command[], config?: BroCliConfig) => Promise<void>;
declare const handler: <TOpts extends Record<string, GenericBuilderInternals>>(options: TOpts, handler: CommandHandler<TOpts>) => CommandHandler<TOpts>;
export { type AssignConfigName, type BroCliConfig, BroCliError as BrocliError, type BuilderConfig, type Command, type CommandHandler, type GenericBuilderInternals, type GenericBuilderInternalsFields, type GenericCommandHandler, type GenericProcessedOptions, OptionBuilderBase, type OptionType, type OutputType, type ProcessedOptions, type RawCommand, type Simplify, type TypeOf, boolean, command, handler, number, positional, runCli, string };

@@ -9,2 +9,5 @@ // src/brocli-error.ts

// src/command-core.ts
import clone from "clone";
// src/option-builder.ts

@@ -147,6 +150,10 @@ var OptionBuilderBase = class {

var enumViolation = (matchedName, data, values) => {
return new Error(``);
return new Error(
`Invalid value: value for the argument '${matchedName}' must be either one of the following: ${values.join(", ")}; Received: ${data}`
);
};
var enumViolationPos = (matchedName, data, values) => {
return new Error(``);
return new Error(
`Invalid value: value for the argument '${matchedName}' must be either one of the following: ${values.join(", ")}; Received: ${data}`
);
};

@@ -180,5 +187,6 @@ var invalidNumberSyntax = (matchedName) => {

var validateOptions = (config) => {
const cloned = clone(config);
const entries = [];
const storedNames = {};
const cfgEntries = Object.entries(config);
const cfgEntries = Object.entries(cloned);
for (const [key, value] of cfgEntries) {

@@ -401,4 +409,5 @@ const cfg = value._.config;

var validateCommands = (commands) => {
const cloned = clone(commands);
const storedNames = {};
for (const cmd of commands) {
for (const cmd of cloned) {
const storageVals = Object.values(storedNames);

@@ -425,5 +434,5 @@ for (const storage of storageVals) {

}
return commands;
return cloned;
};
var rawCli = (commands, config) => {
var rawCli = async (commands, config) => {
let options;

@@ -437,3 +446,3 @@ let cmd;

let args = argSource.slice(2, argSource.length);
if (!args.length) return executeOrLog(helpHandler);
if (!args.length) return await executeOrLog(helpHandler);
const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h");

@@ -452,3 +461,3 @@ if (helpIndex !== -1 && (helpIndex > 0 ? args[helpIndex - 1]?.startsWith("-") ? false : true : true)) {

}
return command3 ? executeOrLog(command3.help) : executeOrLog(helpHandler);
return command3 ? await executeOrLog(command3.help) : await executeOrLog(helpHandler);
}

@@ -464,8 +473,8 @@ const versionIndex = args.findIndex((arg) => arg === "--version" || arg === "-v");

cmd = command2;
cmd.handler(options);
await cmd.handler(options);
return void 0;
};
var runCli = (commands, config) => {
var runCli = async (commands, config) => {
try {
rawCli(commands, config);
await rawCli(commands, config);
} catch (e) {

@@ -472,0 +481,0 @@ if (e instanceof BroCliError) throw e;

@@ -5,3 +5,3 @@ {

"author": "Drizzle Team",
"version": "0.2.2",
"version": "0.2.3",
"description": "Typed CLI command runner",

@@ -30,2 +30,3 @@ "license": "Apache-2.0",

"@originjs/vite-plugin-commonjs": "^1.0.3",
"@types/clone": "^2.1.4",
"@types/node": "^20.12.13",

@@ -56,3 +57,6 @@ "dprint": "^0.46.2",

}
},
"dependencies": {
"clone": "^2.1.2"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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