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

@defer.run/client

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@defer.run/client - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0-alpha-20230208140706-398a6bf

4

cjs/index.js

@@ -25,3 +25,3 @@ "use strict";

exports.isDeferExecution = isDeferExecution;
const defer = (fn) => {
const defer = (fn, options) => {
const ret = (...args) => {

@@ -45,3 +45,3 @@ if (debug) {

ret.__fn = fn;
ret.__metadata = { version: constants_js_1.INTERNAL_VERSION };
ret.__metadata = { version: constants_js_1.INTERNAL_VERSION, retry: options?.retry };
ret.await = async (...args) => {

@@ -48,0 +48,0 @@ const executionResult = (await (0, exports.defer)(fn)(...args));

@@ -17,3 +17,3 @@ // @ts-expect-error untyped dep

export const isDeferExecution = (obj) => !!obj.__deferExecutionResponse;
export const defer = (fn) => {
export const defer = (fn, options) => {
const ret = (...args) => {

@@ -37,3 +37,3 @@ if (debug) {

ret.__fn = fn;
ret.__metadata = { version: INTERNAL_VERSION };
ret.__metadata = { version: INTERNAL_VERSION, retry: options?.retry };
ret.await = async (...args) => {

@@ -40,0 +40,0 @@ const executionResult = (await defer(fn)(...args));

{
"name": "@defer.run/client",
"version": "0.4.0",
"version": "0.5.0-alpha-20230208140706-398a6bf",
"description": "cua JavaScript client",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -20,2 +20,3 @@ import type { Units } from "parse-duration";

cron?: string;
retry?: RetryPolicy | boolean | undefined;
};

@@ -44,2 +45,14 @@ }

export declare const isDeferExecution: (obj: any) => obj is DeferExecuteResponse;
export interface DeferOptions {
retry?: RetryPolicy | boolean;
}
export interface RetryPolicy {
maxAttempts?: number;
backoff: RetryBackoffPolicy;
}
export interface RetryBackoffPolicy {
initialDelay?: number;
maxDelay?: number;
multiplier?: number;
}
export declare const defer: Defer;

@@ -46,0 +59,0 @@ interface DeferDelay {

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