@defer/client
Advanced tools
Comparing version 1.13.0-alpha-20231011122715-7677af5 to 1.13.0-alpha-20231011131946-a7974f8
@@ -188,2 +188,9 @@ "use strict"; | ||
}; | ||
/** | ||
* Delay an execution | ||
* @param fn Duration | ||
* @param delay Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
function delay(fn, delay) { | ||
@@ -193,2 +200,9 @@ return assignOptions(fn, { delay }); | ||
exports.delay = delay; | ||
/** | ||
* Add metadata to an execution | ||
* @param fn Duration | ||
* @param metadata Object | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
function addMetadata(fn, metadata) { | ||
@@ -198,2 +212,9 @@ return assignOptions(fn, { metadata }); | ||
exports.addMetadata = addMetadata; | ||
/** | ||
* Discard an execution if not started after a given interval | ||
* @param fn Duration | ||
* @param value Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
function discardAfter(fn, value) { | ||
@@ -200,0 +221,0 @@ return assignOptions(fn, { discardAfter: value }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = "1.13.0-alpha-20231011122715-7677af5"; | ||
exports.default = "1.13.0-alpha-20231011131946-a7974f8"; |
@@ -157,8 +157,29 @@ import parseDuration from "parse-duration"; | ||
}; | ||
/** | ||
* Delay an execution | ||
* @param fn Duration | ||
* @param delay Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export function delay(fn, delay) { | ||
return assignOptions(fn, { delay }); | ||
} | ||
/** | ||
* Add metadata to an execution | ||
* @param fn Duration | ||
* @param metadata Object | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export function addMetadata(fn, metadata) { | ||
return assignOptions(fn, { metadata }); | ||
} | ||
/** | ||
* Discard an execution if not started after a given interval | ||
* @param fn Duration | ||
* @param value Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export function discardAfter(fn, value) { | ||
@@ -165,0 +186,0 @@ return assignOptions(fn, { discardAfter: value }); |
@@ -1,1 +0,1 @@ | ||
export default "1.13.0-alpha-20231011122715-7677af5"; | ||
export default "1.13.0-alpha-20231011131946-a7974f8"; |
{ | ||
"name": "@defer/client", | ||
"version": "1.13.0-alpha-20231011122715-7677af5", | ||
"version": "1.13.0-alpha-20231011131946-a7974f8", | ||
"description": "Zero infrastructure NodeJS background jobs", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -62,4 +62,25 @@ import { Units } from "parse-duration"; | ||
} | ||
/** | ||
* Delay an execution | ||
* @param fn Duration | ||
* @param delay Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export declare function delay<F extends DeferableFunction>(fn: DeferredFunction<F>, delay: Duration | Date): DeferredFunction<F>; | ||
/** | ||
* Add metadata to an execution | ||
* @param fn Duration | ||
* @param metadata Object | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export declare function addMetadata<F extends DeferableFunction>(fn: DeferredFunction<F>, metadata: ExecutionMetadata): DeferredFunction<F>; | ||
/** | ||
* Discard an execution if not started after a given interval | ||
* @param fn Duration | ||
* @param value Duration | Date | ||
* @deprecated Prefer `assignOptions()` (https://docs.defer.run/references/defer-client/assign-options) | ||
* @returns | ||
*/ | ||
export declare function discardAfter<F extends DeferableFunction>(fn: DeferredFunction<F>, value: Duration | Date): DeferredFunction<F>; | ||
@@ -66,0 +87,0 @@ export declare function assignOptions<F extends DeferableFunction>(fn: DeferredFunction<F>, options: ExecutionOptions): DeferredFunction<F>; |
@@ -1,2 +0,2 @@ | ||
declare const _default: "1.13.0-alpha-20231011122715-7677af5"; | ||
declare const _default: "1.13.0-alpha-20231011131946-a7974f8"; | ||
export default _default; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68321
1488