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.5.0 to 0.5.1

4

dist/index.d.ts

@@ -14,2 +14,4 @@ import * as inversify_lib_interfaces_interfaces from 'inversify/lib/interfaces/interfaces';

interface CommandArgs {
'$?'?: CommandResult;
'$!'?: unknown;
}

@@ -26,3 +28,3 @@ type CommandResult = number | void;

}
type ErrorHandler = (error: unknown, context: ErrorHandlerContext) => number;
type ErrorHandler = (error: {}, context: ErrorHandlerContext) => number | Promise<number>;
interface ErrorHandlerContext {

@@ -29,0 +31,0 @@ stdout: Writable;

@@ -138,11 +138,7 @@ "use strict";

var defualtErrorHandler = /* @__PURE__ */ __name((error, { stderr }) => {
const message = error.message;
if (message != null) {
stderr.write(message);
if (error.message != null) {
stderr.write(error.message);
stderr.write("\n");
}
if (error instanceof CLIError) {
return error.exitCode;
}
return 1;
return error.exitCode ?? 1;
}, "defualtErrorHandler");

@@ -172,3 +168,4 @@

return new Promise((resolve) => {
this.yargs.parse(processArgs, {}, (error, argv, output) => {
this.yargs.parse(processArgs, {}, (yargsError, argv, yargsOutput) => {
const error = yargsError ?? argv["$!"];
if (error != null) {

@@ -179,9 +176,10 @@ resolve(this.onError(error, {

}));
} else if (output !== "") {
writeln(stdout, output);
return;
}
if (yargsOutput !== "") {
writeln(stdout, yargsOutput);
resolve(0);
} else {
const exitCode = argv["$?"];
resolve(exitCode != null ? Number(exitCode) : 0);
return;
}
resolve(argv["$?"] != null ? Number(argv["$?"]) : 0);
});

@@ -202,4 +200,7 @@ });

const command = await container.getAsync(Command2);
const commandResult = await command.execute();
args["$?"] = commandResult ?? 0;
try {
args["$?"] = await command.execute();
} catch (error) {
args["$!"] = error;
}
});

@@ -206,0 +207,0 @@ this.isInit = true;

{
"name": "sgray",
"version": "0.5.0",
"version": "0.5.1",
"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