New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1 to 0.0.2

2

package.json
{
"name": "command-action",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

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

@@ -35,3 +35,2 @@ import { Command } from '../instance'

public rollback() {}

@@ -38,0 +37,0 @@ protected async exec(): Promise<void> {

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

import { ActionMethod, Context, PropsType } from '../types'
import { ActionMethod, CommandActionConfig, Context, PropsType } from '../types'

@@ -6,2 +6,5 @@ class Command {

public provider: PropsType | null = null
public config: CommandActionConfig = {
defaultForceFailures: false
}

@@ -16,2 +19,11 @@ public static instance() {

public settings(config: Partial<CommandActionConfig>) {
this.config = {
...this.config,
...config
}
return this
}
public async runWithProvider<Props extends PropsType, Result extends Props = Props>(

@@ -18,0 +30,0 @@ action: ActionMethod<Props, Result>, props: (Parameters<typeof action>)[0], provider: PropsType

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

import { Command } from '../instance'
import { PropsType, ActionInstance, FailureType } from '../types'

@@ -5,5 +6,5 @@ import { ForcedActionError } from '../Errors'

interface FailureMeta extends Record<string, any> {
exstras?: Record<string, any>
extras?: Record<string, any>
type: string
message: string | string[]
message?: string | string[]
force: boolean

@@ -49,3 +50,3 @@ }

public fail({ type = FailureType.Standard, message, force = false, ...rest }: FailParams): never {
public fail({ type = FailureType.Standard, message, force = Command.config.defaultForceFailures, ...rest }: FailParams): never {
this._failureMeta = {

@@ -55,3 +56,3 @@ type,

force,
exstras: rest
extras: rest
}

@@ -58,0 +59,0 @@

@@ -24,1 +24,5 @@ import { ContextClass } from './Context'

}
export interface CommandActionConfig {
defaultForceFailures: boolean
}
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