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

sgray

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sgray - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

3

dist/index.d.ts

@@ -0,1 +1,2 @@

import * as inversify_lib_interfaces_interfaces from 'inversify/lib/interfaces/interfaces';
import { Container } from 'inversify';

@@ -28,3 +29,3 @@ import { Argv as Argv$1 } from 'yargs';

constructor({ container, yargs }?: CLIOptions);
register(...commands: CommandStatic[]): this;
register<T extends CommandStatic>(command: T): inversify_lib_interfaces_interfaces.interfaces.BindingWhenOnSyntax<T>;
run(processArgs: string[]): Promise<number>;

@@ -31,0 +32,0 @@ private init;

@@ -125,2 +125,14 @@ "use strict";

// src/error.ts
var CLIError = class extends Error {
static {
__name(this, "CLIError");
}
exitCode;
constructor(message, exitCode) {
super(message);
this.exitCode = exitCode;
}
};
// src/cli.ts

@@ -138,7 +150,4 @@ var CLI = class _CLI {

}
register(...commands) {
for (const Command2 of commands) {
this.container.bind(Command).toConstantValue(Command2);
}
return this;
register(command) {
return this.container.bind(Command).toConstantValue(command);
}

@@ -174,5 +183,15 @@ async run(processArgs) {

container.bind(Command2).toSelf();
const stderr = await container.getAsync(Stderr);
const command = await container.getAsync(Command2);
const commandResult = await command.execute();
args["$?"] = commandResult;
try {
args["$?"] = await command.execute();
} catch (error) {
if (error instanceof CLIError) {
args["$?"] = error.exitCode ?? 1;
stderr.write(error.message);
stderr.write("\n");
return;
}
throw error;
}
});

@@ -179,0 +198,0 @@ this.isInit = true;

{
"name": "sgray",
"version": "0.3.0",
"version": "0.4.0",
"author": "cumul <gg6123@naver.com>",

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

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