@trigger.dev/sdk 0.0.0-cross-runtime-20231201165423 → 0.0.0-cross-runtime-20231201165945
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2361,10 +2361,7 @@ function getApiKey(key) {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
__name(getApiKey, "getApiKey");
|
|
2363
2363
|
async function zodfetchWithVersions(versionedSchemaMap, unversionedSchema, url, requestInit, options, retryCount = 0) {
|
|
2364
|
-
const response = await fetch(url,
|
|
2365
|
-
...requestInit,
|
|
2366
|
-
cache: "no-cache"
|
|
2367
|
-
});
|
|
2364
|
+
const response = await fetch(url, requestInitWithCache(requestInit));
|
|
2368
2365
|
if ((!requestInit || requestInit.method === "GET") && response.status === 404 && options?.optional) {
|
|
2369
2366
|
return;
|
|
2370
2367
|
}
|
|
@@ -2398,15 +2395,23 @@ async function zodfetchWithVersions(versionedSchemaMap, unversionedSchema, url,
|
|
|
2398
2395
|
};
|
|
2399
2396
|
}
|
|
2400
2397
|
__name(zodfetchWithVersions, "zodfetchWithVersions");
|
|
2398
|
+
function requestInitWithCache(requestInit) {
|
|
2399
|
+
try {
|
|
2400
|
+
return {
|
|
2401
|
+
...requestInit,
|
|
2402
|
+
cache: "no-cache"
|
|
2403
|
+
};
|
|
2404
|
+
} catch (error) {
|
|
2405
|
+
return requestInit ?? {};
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
__name(requestInitWithCache, "requestInitWithCache");
|
|
2401
2409
|
async function fetchHead(url, requestInitWithoutMethod, retryCount = 0) {
|
|
2402
2410
|
const requestInit = {
|
|
2403
2411
|
...requestInitWithoutMethod,
|
|
2404
2412
|
method: "HEAD"
|
|
2405
2413
|
};
|
|
2406
|
-
const response = await fetch(url,
|
|
2407
|
-
...requestInit,
|
|
2408
|
-
cache: "no-cache"
|
|
2409
|
-
});
|
|
2414
|
+
const response = await fetch(url, requestInitWithCache(requestInit));
|
|
2410
2415
|
if (response.status >= 500 && retryCount < 6) {
|
|
2411
2416
|
const delay = exponentialBackoff(retryCount + 1, 2, 50, 1150, 50);
|
|
2412
2417
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
@@ -2416,10 +2421,7 @@ async function fetchHead(url, requestInitWithoutMethod, retryCount = 0) {
|
|
|
2416
2421
|
}
|
|
2417
2422
|
__name(fetchHead, "fetchHead");
|
|
2418
2423
|
async function zodfetch(schema, url, requestInit, options, retryCount = 0) {
|
|
2419
|
-
const response = await fetch(url,
|
|
2420
|
-
...requestInit,
|
|
2421
|
-
cache: "no-cache"
|
|
2422
|
-
});
|
|
2424
|
+
const response = await fetch(url, requestInitWithCache(requestInit));
|
|
2423
2425
|
if ((!requestInit || requestInit.method === "GET") && response.status === 404 && options?.optional) {
|
|
2424
2426
|
return;
|
|
2425
2427
|
}
|
|
@@ -3006,7 +3008,7 @@ var DynamicSchedule = _DynamicSchedule;
|
|
|
3006
3008
|
var import_node_events = __toESM(require("node:events"));
|
|
3007
3009
|
|
|
3008
3010
|
// package.json
|
|
3009
|
-
var version = "0.0.0-cross-runtime-
|
|
3011
|
+
var version = "0.0.0-cross-runtime-20231201165945";
|
|
3010
3012
|
|
|
3011
3013
|
// src/concurrencyLimit.ts
|
|
3012
3014
|
var _ConcurrencyLimit = class _ConcurrencyLimit {
|