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

command-action

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

command-action - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

lib/Command/index.d.ts

@@ -1,8 +0,10 @@

import { ActionMethod, Context, PropsType } from '../types';
import { ActionMethod, CommandActionConfig, Context, PropsType } from '../types';
declare class Command {
private static command;
provider: PropsType | null;
config: CommandActionConfig;
static instance(): Command;
settings(config: Partial<CommandActionConfig>): this;
runWithProvider<Props extends PropsType, Result extends Props = Props>(action: ActionMethod<Props, Result>, props: (Parameters<typeof action>)[0], provider: PropsType): Promise<Context<Result>>;
}
export default Command;

@@ -15,2 +15,5 @@ "use strict";

this.provider = null;
this.config = {
defaultForceFailures: false
};
}

@@ -23,2 +26,6 @@ static instance() {

}
settings(config) {
this.config = Object.assign(Object.assign({}, this.config), config);
return this;
}
runWithProvider(action, props, provider) {

@@ -25,0 +32,0 @@ return __awaiter(this, void 0, void 0, function* () {

import { PropsType, ActionInstance } from '../types';
interface FailureMeta extends Record<string, any> {
exstras?: Record<string, any>;
extras?: Record<string, any>;
type: string;
message: string | string[];
message?: string | string[];
force: boolean;

@@ -7,0 +7,0 @@ }

@@ -23,2 +23,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const instance_1 = require("../instance");
const types_1 = require("../types");

@@ -52,3 +53,3 @@ const Errors_1 = require("../Errors");

fail(_a) {
var { type = types_1.FailureType.Standard, message, force = false } = _a, rest = __rest(_a, ["type", "message", "force"]);
var { type = types_1.FailureType.Standard, message, force = instance_1.Command.config.defaultForceFailures } = _a, rest = __rest(_a, ["type", "message", "force"]);
this._failureMeta = {

@@ -58,3 +59,3 @@ type,

force,
exstras: rest
extras: rest
};

@@ -61,0 +62,0 @@ if (force) {

@@ -15,1 +15,4 @@ import { ContextClass } from './Context';

}
export interface CommandActionConfig {
defaultForceFailures: boolean;
}
{
"name": "command-action",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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