@defer/client
Advanced tools
Comparing version 1.4.0-alpha-20230602084748-0333c50 to 1.4.0-alpha-20230602085529-80eaeba
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.INTERNAL_VERSION = void 0; | ||
exports.RETRY_MAX_ATTEMPTS_PLACEHOLDER = exports.INTERNAL_VERSION = void 0; | ||
exports.INTERNAL_VERSION = 4; | ||
exports.RETRY_MAX_ATTEMPTS_PLACEHOLDER = 13; |
@@ -115,3 +115,3 @@ "use strict"; | ||
if (options.retry) { | ||
retryPolicy.maxAttempts = 13; | ||
retryPolicy.maxAttempts = constants_js_1.RETRY_MAX_ATTEMPTS_PLACEHOLDER; | ||
} | ||
@@ -125,4 +125,8 @@ break; | ||
case "object": { | ||
if (options.retry.maxAttempts) | ||
if (options.retry.maxAttempts) { | ||
retryPolicy.maxAttempts = options.retry.maxAttempts; | ||
} | ||
else { | ||
options.retry.maxAttempts = constants_js_1.RETRY_MAX_ATTEMPTS_PLACEHOLDER; | ||
} | ||
if (options.retry.initialInterval) | ||
@@ -129,0 +133,0 @@ retryPolicy.initialInterval = options.retry.initialInterval; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = "1.4.0-alpha-20230602084748-0333c50"; | ||
exports.default = "1.4.0-alpha-20230602085529-80eaeba"; |
export const INTERNAL_VERSION = 4; | ||
export const RETRY_MAX_ATTEMPTS_PLACEHOLDER = 13; |
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { randomUUID } from "crypto"; | ||
import parseDuration from "parse-duration"; | ||
import { INTERNAL_VERSION } from "./constants.js"; | ||
import { INTERNAL_VERSION, RETRY_MAX_ATTEMPTS_PLACEHOLDER } from "./constants.js"; | ||
import { enqueueExecution, fetchExecution, waitExecutionResult, } from "./client.js"; | ||
@@ -106,3 +106,3 @@ import { APIError, DeferError } from "./errors.js"; | ||
if (options.retry) { | ||
retryPolicy.maxAttempts = 13; | ||
retryPolicy.maxAttempts = RETRY_MAX_ATTEMPTS_PLACEHOLDER; | ||
} | ||
@@ -116,4 +116,8 @@ break; | ||
case "object": { | ||
if (options.retry.maxAttempts) | ||
if (options.retry.maxAttempts) { | ||
retryPolicy.maxAttempts = options.retry.maxAttempts; | ||
} | ||
else { | ||
options.retry.maxAttempts = RETRY_MAX_ATTEMPTS_PLACEHOLDER; | ||
} | ||
if (options.retry.initialInterval) | ||
@@ -120,0 +124,0 @@ retryPolicy.initialInterval = options.retry.initialInterval; |
@@ -1,1 +0,1 @@ | ||
export default "1.4.0-alpha-20230602084748-0333c50"; | ||
export default "1.4.0-alpha-20230602085529-80eaeba"; |
{ | ||
"name": "@defer/client", | ||
"version": "1.4.0-alpha-20230602084748-0333c50", | ||
"version": "1.4.0-alpha-20230602085529-80eaeba", | ||
"description": "Zero infrastructure NodeJS background jobs", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
export declare const INTERNAL_VERSION = 4; | ||
export declare const RETRY_MAX_ATTEMPTS_PLACEHOLDER = 13; |
@@ -1,2 +0,2 @@ | ||
declare const _default: "1.4.0-alpha-20230602084748-0333c50"; | ||
declare const _default: "1.4.0-alpha-20230602085529-80eaeba"; | ||
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
49878
1187