@qawolf/ci-sdk
Advanced tools
Comparing version 0.15.6 to 0.15.7
@@ -5,2 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const utils_1 = require("../utils"); | ||
const fetch_1 = require("./defaults/fetch"); | ||
@@ -18,3 +19,7 @@ const log_1 = require("./defaults/log"); | ||
} | ||
const deps = { fetch, log }; | ||
const deps = { | ||
// Versions of fetch may have different default timeouts. For consistency, we explicitly set it to 60 seconds here. | ||
fetch: (0, utils_1.buildFetchWithTimeout)(fetch, 60000), | ||
log, | ||
}; | ||
const apiConfig = { apiKey, serviceBase }; | ||
@@ -21,0 +26,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import { type FetchDriver } from "./sdk/dependencies"; | ||
export declare function sleep(ms: number): Promise<void>; | ||
@@ -8,2 +9,3 @@ export declare function pluralize(count: number): "" | "s"; | ||
export declare function getBackoffMs(attemptNumber: number, minWaitMs?: number, maxWaitMs?: number): number; | ||
export declare const buildFetchWithTimeout: (fetch: FetchDriver, timeout: number) => (input: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>; | ||
//# sourceMappingURL=utils.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildFetchWithTimeout = void 0; | ||
exports.sleep = sleep; | ||
@@ -22,2 +23,4 @@ exports.pluralize = pluralize; | ||
} | ||
const buildFetchWithTimeout = (fetch, timeout) => async (...args) => fetch(args[0], { ...args[1], signal: AbortSignal.timeout(timeout) }); | ||
exports.buildFetchWithTimeout = buildFetchWithTimeout; | ||
//# sourceMappingURL=utils.js.map |
@@ -0,1 +1,2 @@ | ||
import { buildFetchWithTimeout } from "../utils"; | ||
import { defaultFetch } from "./defaults/fetch"; | ||
@@ -13,3 +14,7 @@ import { defaultLogDriver } from "./defaults/log"; | ||
} | ||
const deps = { fetch, log }; | ||
const deps = { | ||
// Versions of fetch may have different default timeouts. For consistency, we explicitly set it to 60 seconds here. | ||
fetch: buildFetchWithTimeout(fetch, 60000), | ||
log, | ||
}; | ||
const apiConfig = { apiKey, serviceBase }; | ||
@@ -16,0 +21,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import { type FetchDriver } from "./sdk/dependencies"; | ||
export declare function sleep(ms: number): Promise<void>; | ||
@@ -8,2 +9,3 @@ export declare function pluralize(count: number): "" | "s"; | ||
export declare function getBackoffMs(attemptNumber: number, minWaitMs?: number, maxWaitMs?: number): number; | ||
export declare const buildFetchWithTimeout: (fetch: FetchDriver, timeout: number) => (input: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -16,2 +16,3 @@ export function sleep(ms) { | ||
} | ||
export const buildFetchWithTimeout = (fetch, timeout) => async (...args) => fetch(args[0], { ...args[1], signal: AbortSignal.timeout(timeout) }); | ||
//# sourceMappingURL=utils.js.map |
@@ -0,1 +1,2 @@ | ||
import { type FetchDriver } from "./sdk/dependencies"; | ||
export declare function sleep(ms: number): Promise<void>; | ||
@@ -8,2 +9,3 @@ export declare function pluralize(count: number): "" | "s"; | ||
export declare function getBackoffMs(attemptNumber: number, minWaitMs?: number, maxWaitMs?: number): number; | ||
export declare const buildFetchWithTimeout: (fetch: FetchDriver, timeout: number) => (input: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@qawolf/ci-sdk", | ||
"version": "0.15.6", | ||
"version": "0.15.7", | ||
"description": "A simple SDK for interacting with QAWolf in CI scripts.", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
@@ -150,2 +150,6 @@ # QAWolf CI SDK | ||
## v0.15.7 | ||
- Set the default timeout for `fetch` calls to 60 seconds. | ||
## v0.15.6 | ||
@@ -152,0 +156,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
407234
5482
236