@serwist/core
Advanced tools
Comparing version 8.4.0 to 8.4.1
@@ -0,1 +1,3 @@ | ||
import { Deferred } from "./_private/Deferred.js"; | ||
import { SerwistError } from "./_private/SerwistError.js"; | ||
import { assert } from "./_private/assert.js"; | ||
@@ -6,3 +8,2 @@ import { cacheMatchIgnoreParams } from "./_private/cacheMatchIgnoreParams.js"; | ||
import { canConstructResponseFromBodyStream } from "./_private/canConstructResponseFromBodyStream.js"; | ||
import { Deferred } from "./_private/Deferred.js"; | ||
import { dontWaitFor } from "./_private/dontWaitFor.js"; | ||
@@ -13,5 +14,4 @@ import { executeQuotaErrorCallbacks } from "./_private/executeQuotaErrorCallbacks.js"; | ||
import { resultingClientExists } from "./_private/resultingClientExists.js"; | ||
import { SerwistError } from "./_private/SerwistError.js"; | ||
import { timeout } from "./_private/timeout.js"; | ||
import { waitUntil } from "./_private/waitUntil.js"; | ||
export { assert, cacheMatchIgnoreParams, canConstructReadableStream, canConstructResponseFromBodyStream, Deferred, dontWaitFor, executeQuotaErrorCallbacks, getFriendlyURL, logger, privateCacheNames, resultingClientExists, SerwistError, timeout, waitUntil, }; |
@@ -5,2 +5,29 @@ import { l as logger, q as quotaErrorCallbacks } from './quotaErrorCallbacks.js'; | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ /** | ||
* The Deferred class composes Promises in a way that allows for them to be | ||
* resolved or rejected from outside the constructor. In most cases promises | ||
* should be used directly, but Deferreds can be necessary when the logic to | ||
* resolve a promise must be separate. | ||
* | ||
* @private | ||
*/ class Deferred { | ||
promise; | ||
resolve; | ||
reject; | ||
/** | ||
* Creates a promise and exposes its resolve and reject functions as methods. | ||
*/ constructor(){ | ||
this.promise = new Promise((resolve, reject)=>{ | ||
this.resolve = resolve; | ||
this.reject = reject; | ||
}); | ||
} | ||
} | ||
/* | ||
Copyright 2020 Google LLC | ||
@@ -80,29 +107,2 @@ Use of this source code is governed by an MIT-style | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ /** | ||
* The Deferred class composes Promises in a way that allows for them to be | ||
* resolved or rejected from outside the constructor. In most cases promises | ||
* should be used directly, but Deferreds can be necessary when the logic to | ||
* resolve a promise must be separate. | ||
* | ||
* @private | ||
*/ class Deferred { | ||
promise; | ||
resolve; | ||
reject; | ||
/** | ||
* Creates a promise and exposes its resolve and reject functions as methods. | ||
*/ constructor(){ | ||
this.promise = new Promise((resolve, reject)=>{ | ||
this.resolve = resolve; | ||
this.reject = reject; | ||
}); | ||
} | ||
} | ||
/* | ||
Copyright 2019 Google LLC | ||
@@ -128,3 +128,3 @@ Use of this source code is governed by an MIT-style | ||
if (process.env.NODE_ENV !== "production") { | ||
logger.log(`About to run ${quotaErrorCallbacks.size} ` + `callbacks to clean up caches.`); | ||
logger.log(`About to run ${quotaErrorCallbacks.size} callbacks to clean up caches.`); | ||
} | ||
@@ -189,3 +189,3 @@ for (const callback of quotaErrorCallbacks){ | ||
const existingWindowIds = new Set(existingWindows.map((w)=>w.id)); | ||
let resultingWindow; | ||
let resultingWindow = undefined; | ||
const startTime = performance.now(); | ||
@@ -201,6 +201,5 @@ // Only wait up to `MAX_RETRY_TIME` to find a matching client. | ||
return w.id === resultingClientId; | ||
} else { | ||
// Otherwise match on finding a window not in `existingWindowIds`. | ||
return !existingWindowIds.has(w.id); | ||
} | ||
// Otherwise match on finding a window not in `existingWindowIds`. | ||
return !existingWindowIds.has(w.id); | ||
}); | ||
@@ -207,0 +206,0 @@ if (resultingWindow) { |
@@ -96,4 +96,3 @@ import { c as cacheNames$1, S as SerwistError, a as canConstructResponseFromBodyStream, f as finalAssertExports, q as quotaErrorCallbacks, l as logger } from './quotaErrorCallbacks.js'; | ||
* @param callback | ||
*/ // Can't change Function type | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
*/ // biome-ignore lint/complexity/noBannedTypes: Can't change Function type | ||
function registerQuotaErrorCallback(callback) { | ||
@@ -120,3 +119,3 @@ if (process.env.NODE_ENV !== "production") { | ||
if (process.env.NODE_ENV !== "production") { | ||
Object.keys(details).forEach((key)=>{ | ||
for (const key of Object.keys(details)){ | ||
finalAssertExports.isType(details[key], "string", { | ||
@@ -127,19 +126,19 @@ moduleName: "@serwist/core", | ||
}); | ||
}); | ||
if (details["precache"]?.length === 0) { | ||
} | ||
if (details.precache?.length === 0) { | ||
throw new SerwistError("invalid-cache-name", { | ||
cacheNameId: "precache", | ||
value: details["precache"] | ||
value: details.precache | ||
}); | ||
} | ||
if (details["runtime"]?.length === 0) { | ||
if (details.runtime?.length === 0) { | ||
throw new SerwistError("invalid-cache-name", { | ||
cacheNameId: "runtime", | ||
value: details["runtime"] | ||
value: details.runtime | ||
}); | ||
} | ||
if (details["googleAnalytics"]?.length === 0) { | ||
if (details.googleAnalytics?.length === 0) { | ||
throw new SerwistError("invalid-cache-name", { | ||
cacheNameId: "googleAnalytics", | ||
value: details["googleAnalytics"] | ||
value: details.googleAnalytics | ||
}); | ||
@@ -146,0 +145,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const enum pluginEvents { | ||
export declare enum pluginEvents { | ||
CACHE_DID_UPDATE = "cacheDidUpdate", | ||
@@ -3,0 +3,0 @@ CACHE_KEY_WILL_BE_USED = "cacheKeyWillBeUsed", |
@@ -53,32 +53,2 @@ /* | ||
/* | ||
Copyright 2019 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ let supportStatus; | ||
/** | ||
* A utility function that determines whether the current browser supports | ||
* constructing a new `Response` from a `response.body` stream. | ||
* | ||
* @returns `true`, if the current browser can successfully construct | ||
* a `Response` from a `response.body` stream, `false` otherwise. | ||
* @private | ||
*/ function canConstructResponseFromBodyStream() { | ||
if (supportStatus === undefined) { | ||
const testResponse = new Response(""); | ||
if ("body" in testResponse) { | ||
try { | ||
new Response(testResponse.body); | ||
supportStatus = true; | ||
} catch (error) { | ||
supportStatus = false; | ||
} | ||
} | ||
supportStatus = false; | ||
} | ||
return supportStatus; | ||
} | ||
/* | ||
Copyright 2018 Google LLC | ||
@@ -115,3 +85,3 @@ | ||
if (isReturnValueProblem) { | ||
return `The return value from ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; | ||
return `The return value from '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`; | ||
} | ||
@@ -127,15 +97,15 @@ return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; | ||
"add-to-cache-list-unexpected-type": ({ entry })=>{ | ||
return `An unexpected entry was passed to ` + `'@serwist/precaching.PrecacheController.addToCacheList()' The entry ` + `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` + `strings with one or more characters, objects with a url property or ` + `Request objects.`; | ||
return `An unexpected entry was passed to '@serwist/precaching.PrecacheController.addToCacheList()' The entry '${JSON.stringify(entry)}' isn't supported. You must supply an array of strings with one or more characters, objects with a url property or Request objects.`; | ||
}, | ||
"add-to-cache-list-conflicting-entries": ({ firstEntry, secondEntry })=>{ | ||
if (!firstEntry || !secondEntry) { | ||
throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`); | ||
throw new Error("Unexpected input to " + `'add-to-cache-list-duplicate-entries' error.`); | ||
} | ||
return `Two of the entries passed to ` + `'@serwist/precaching.PrecacheController.addToCacheList()' had the URL ` + `${firstEntry} but different revision details. Serwist is ` + `unable to cache and version the asset correctly. Please remove one ` + `of the entries.`; | ||
return `Two of the entries passed to '@serwist/precaching.PrecacheController.addToCacheList()' had the URL ${firstEntry} but different revision details. Serwist is unable to cache and version the asset correctly. Please remove one of the entries.`; | ||
}, | ||
"plugin-error-request-will-fetch": ({ thrownErrorMessage })=>{ | ||
if (!thrownErrorMessage) { | ||
throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`); | ||
throw new Error("Unexpected input to " + `'plugin-error-request-will-fetch', error.`); | ||
} | ||
return `An error was thrown by a plugins 'requestWillFetch()' method. ` + `The thrown error message was: '${thrownErrorMessage}'.`; | ||
return `An error was thrown by a plugins 'requestWillFetch()' method. The thrown error message was: '${thrownErrorMessage}'.`; | ||
}, | ||
@@ -146,12 +116,12 @@ "invalid-cache-name": ({ cacheNameId, value })=>{ | ||
} | ||
return `You must provide a name containing at least one character for ` + `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` + `'${JSON.stringify(value)}'`; | ||
return `You must provide a name containing at least one character for setCacheDetails({${cacheNameId}: '...'}). Received a value of '${JSON.stringify(value)}'`; | ||
}, | ||
"unregister-route-but-not-found-with-method": ({ method })=>{ | ||
if (!method) { | ||
throw new Error(`Unexpected input to ` + `'unregister-route-but-not-found-with-method' error.`); | ||
throw new Error("Unexpected input to " + `'unregister-route-but-not-found-with-method' error.`); | ||
} | ||
return `The route you're trying to unregister was not previously ` + `registered for the method type '${method}'.`; | ||
return `The route you're trying to unregister was not previously registered for the method type '${method}'.`; | ||
}, | ||
"unregister-route-route-not-registered": ()=>{ | ||
return `The route you're trying to unregister was not previously ` + `registered.`; | ||
return `The route you're trying to unregister was not previously ` + "registered."; | ||
}, | ||
@@ -162,3 +132,3 @@ "queue-replay-failed": ({ name })=>{ | ||
"duplicate-queue-name": ({ name })=>{ | ||
return `The Queue name '${name}' is already being used. ` + `All instances of backgroundSync.Queue must be given unique names.`; | ||
return `The Queue name '${name}' is already being used. All instances of backgroundSync.Queue must be given unique names.`; | ||
}, | ||
@@ -169,12 +139,12 @@ "expired-test-without-max-age": ({ methodName, paramName })=>{ | ||
"unsupported-route-type": ({ moduleName, className, funcName, paramName })=>{ | ||
return `The supplied '${paramName}' parameter was an unsupported type. ` + `Please check the docs for ${moduleName}.${className}.${funcName} for ` + `valid input types.`; | ||
return `The supplied '${paramName}' parameter was an unsupported type. Please check the docs for ${moduleName}.${className}.${funcName} for valid input types.`; | ||
}, | ||
"not-array-of-class": ({ value, expectedClass, moduleName, className, funcName, paramName })=>{ | ||
return `The supplied '${paramName}' parameter must be an array of ` + `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` + `Please check the call to ${moduleName}.${className}.${funcName}() ` + `to fix the issue.`; | ||
return `The supplied '${paramName}' parameter must be an array of '${expectedClass}' objects. Received '${JSON.stringify(value)},'. Please check the call to ${moduleName}.${className}.${funcName}() to fix the issue.`; | ||
}, | ||
"max-entries-or-age-required": ({ moduleName, className, funcName })=>{ | ||
return `You must define either config.maxEntries or config.maxAgeSeconds` + `in ${moduleName}.${className}.${funcName}`; | ||
return `You must define either config.maxEntries or config.maxAgeSecondsin ${moduleName}.${className}.${funcName}`; | ||
}, | ||
"statuses-or-headers-required": ({ moduleName, className, funcName })=>{ | ||
return `You must define either config.statuses or config.headers` + `in ${moduleName}.${className}.${funcName}`; | ||
return `You must define either config.statuses or config.headersin ${moduleName}.${className}.${funcName}`; | ||
}, | ||
@@ -185,12 +155,12 @@ "invalid-string": ({ moduleName, funcName, paramName })=>{ | ||
} | ||
return `When using strings, the '${paramName}' parameter must start with ` + `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + `Please see the docs for ${moduleName}.${funcName}() for ` + `more info.`; | ||
return `When using strings, the '${paramName}' parameter must start with 'http' (for cross-origin matches) or '/' (for same-origin matches). Please see the docs for ${moduleName}.${funcName}() for more info.`; | ||
}, | ||
"channel-name-required": ()=>{ | ||
return `You must provide a channelName to construct a ` + `BroadcastCacheUpdate instance.`; | ||
return "You must provide a channelName to construct a " + "BroadcastCacheUpdate instance."; | ||
}, | ||
"invalid-responses-are-same-args": ()=>{ | ||
return `The arguments passed into responsesAreSame() appear to be ` + `invalid. Please ensure valid Responses are used.`; | ||
return "The arguments passed into responsesAreSame() appear to be " + "invalid. Please ensure valid Responses are used."; | ||
}, | ||
"expire-custom-caches-only": ()=>{ | ||
return `You must provide a 'cacheName' property when using the ` + `expiration plugin with a runtime caching strategy.`; | ||
return `You must provide a 'cacheName' property when using the ` + "expiration plugin with a runtime caching strategy."; | ||
}, | ||
@@ -201,3 +171,3 @@ "unit-must-be-bytes": ({ normalizedRangeHeader })=>{ | ||
} | ||
return `The 'unit' portion of the Range header must be set to 'bytes'. ` + `The Range header provided was "${normalizedRangeHeader}"`; | ||
return `The 'unit' portion of the Range header must be set to 'bytes'. The Range header provided was "${normalizedRangeHeader}"`; | ||
}, | ||
@@ -208,3 +178,3 @@ "single-range-only": ({ normalizedRangeHeader })=>{ | ||
} | ||
return `Multiple ranges are not supported. Please use a single start ` + `value, and optional end value. The Range header provided was ` + `"${normalizedRangeHeader}"`; | ||
return `Multiple ranges are not supported. Please use a single start value, and optional end value. The Range header provided was "${normalizedRangeHeader}"`; | ||
}, | ||
@@ -215,6 +185,6 @@ "invalid-range-values": ({ normalizedRangeHeader })=>{ | ||
} | ||
return `The Range header is missing both start and end values. At least ` + `one of those values is needed. The Range header provided was ` + `"${normalizedRangeHeader}"`; | ||
return `The Range header is missing both start and end values. At least one of those values is needed. The Range header provided was "${normalizedRangeHeader}"`; | ||
}, | ||
"no-range-header": ()=>{ | ||
return `No Range header was found in the Request provided.`; | ||
return "No Range header was found in the Request provided."; | ||
}, | ||
@@ -225,6 +195,6 @@ "range-not-satisfiable": ({ size, start, end })=>{ | ||
"attempt-to-cache-non-get-request": ({ url, method })=>{ | ||
return `Unable to cache '${url}' because it is a '${method}' request and ` + `only 'GET' requests can be cached.`; | ||
return `Unable to cache '${url}' because it is a '${method}' request and only 'GET' requests can be cached.`; | ||
}, | ||
"cache-put-with-no-response": ({ url })=>{ | ||
return `There was an attempt to cache '${url}' but the response was not ` + `defined.`; | ||
return `There was an attempt to cache '${url}' but the response was not defined.`; | ||
}, | ||
@@ -239,9 +209,9 @@ "no-response": ({ url, error })=>{ | ||
"bad-precaching-response": ({ url, status })=>{ | ||
return `The precaching request for '${url}' failed` + (status ? ` with an HTTP status of ${status}.` : `.`); | ||
return `The precaching request for '${url}' failed${status ? ` with an HTTP status of ${status}.` : "."}`; | ||
}, | ||
"non-precached-url": ({ url })=>{ | ||
return `createHandlerBoundToURL('${url}') was called, but that URL is ` + `not precached. Please pass in a URL that is precached instead.`; | ||
return `createHandlerBoundToURL('${url}') was called, but that URL is not precached. Please pass in a URL that is precached instead.`; | ||
}, | ||
"add-to-cache-list-conflicting-integrities": ({ url })=>{ | ||
return `Two of the entries passed to ` + `'@serwist/precaching.PrecacheController.addToCacheList()' had the URL ` + `${url} with different integrity values. Please remove one of them.`; | ||
return `Two of the entries passed to '@serwist/precaching.PrecacheController.addToCacheList()' had the URL ${url} with different integrity values. Please remove one of them.`; | ||
}, | ||
@@ -252,8 +222,8 @@ "missing-precache-entry": ({ cacheName, url })=>{ | ||
"cross-origin-copy-response": ({ origin })=>{ | ||
return `@serwist/core.copyResponse() can only be used with same-origin ` + `responses. It was passed a response with origin ${origin}.`; | ||
return `@serwist/core.copyResponse() can only be used with same-origin responses. It was passed a response with origin ${origin}.`; | ||
}, | ||
"opaque-streams-source": ({ type })=>{ | ||
const message = `One of the @serwist/streams sources resulted in an ` + `'${type}' response.`; | ||
const message = `One of the @serwist/streams sources resulted in an '${type}' response.`; | ||
if (type === "opaqueredirect") { | ||
return `${message} Please do not use a navigation request that results ` + `in a redirect as a source.`; | ||
return `${message} Please do not use a navigation request that results in a redirect as a source.`; | ||
} | ||
@@ -306,2 +276,32 @@ return `${message} Please ensure your sources are CORS-enabled.`; | ||
/* | ||
Copyright 2019 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ let supportStatus; | ||
/** | ||
* A utility function that determines whether the current browser supports | ||
* constructing a new `Response` from a `response.body` stream. | ||
* | ||
* @returns `true`, if the current browser can successfully construct | ||
* a `Response` from a `response.body` stream, `false` otherwise. | ||
* @private | ||
*/ function canConstructResponseFromBodyStream() { | ||
if (supportStatus === undefined) { | ||
const testResponse = new Response(""); | ||
if ("body" in testResponse) { | ||
try { | ||
new Response(testResponse.body); | ||
supportStatus = true; | ||
} catch (error) { | ||
supportStatus = false; | ||
} | ||
} | ||
supportStatus = false; | ||
} | ||
return supportStatus; | ||
} | ||
/* | ||
* This method throws if the supplied value is not an array. | ||
@@ -319,3 +319,3 @@ * The destructed values are required to produce a meaningful error for users. | ||
if (type !== "function") { | ||
details["expectedMethod"] = expectedMethod; | ||
details.expectedMethod = expectedMethod; | ||
throw new SerwistError("missing-a-method", details); | ||
@@ -325,12 +325,12 @@ } | ||
const isType = (object, expectedType, details)=>{ | ||
// biome-ignore lint/suspicious/useValidTypeof: Know to not make a mistake... | ||
if (typeof object !== expectedType) { | ||
details["expectedType"] = expectedType; | ||
details.expectedType = expectedType; | ||
throw new SerwistError("incorrect-type", details); | ||
} | ||
}; | ||
const isInstance = (object, // Need the general type to do the check later. | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
const isInstance = (object, // biome-ignore lint/complexity/noBannedTypes: Need the general type to do the check later. | ||
expectedClass, details)=>{ | ||
if (!(object instanceof expectedClass)) { | ||
details["expectedClassName"] = expectedClass.name; | ||
details.expectedClassName = expectedClass.name; | ||
throw new SerwistError("incorrect-class", details); | ||
@@ -341,7 +341,7 @@ } | ||
if (!validValues.includes(value)) { | ||
details["validValueDescription"] = `Valid values are ${JSON.stringify(validValues)}.`; | ||
details.validValueDescription = `Valid values are ${JSON.stringify(validValues)}.`; | ||
throw new SerwistError("invalid-value", details); | ||
} | ||
}; | ||
const isArrayOfClass = (value, // Need general type to do check later. | ||
const isArrayOfClass = (value, // biome-ignore lint/complexity/noBannedTypes: Need general type to do check later. | ||
expectedClass, details)=>{ | ||
@@ -381,10 +381,10 @@ const error = new SerwistError("not-array-of-class", details); | ||
const methodToColorMap = { | ||
debug: `#7f8c8d`, | ||
log: `#2ecc71`, | ||
warn: `#f39c12`, | ||
error: `#c0392b`, | ||
groupCollapsed: `#3498db`, | ||
debug: "#7f8c8d", | ||
log: "#2ecc71", | ||
warn: "#f39c12", | ||
error: "#c0392b", | ||
groupCollapsed: "#3498db", | ||
groupEnd: null | ||
}; | ||
const print = function(method, args) { | ||
const print = (method, args)=>{ | ||
if (self.__WB_DISABLE_DEV_LOGS) { | ||
@@ -403,6 +403,6 @@ return; | ||
`background: ${methodToColorMap[method]}`, | ||
`border-radius: 0.5em`, | ||
`color: white`, | ||
`font-weight: bold`, | ||
`padding: 2px 0.5em` | ||
"border-radius: 0.5em", | ||
"color: white", | ||
"font-weight: bold", | ||
"padding: 2px 0.5em" | ||
]; | ||
@@ -422,3 +422,3 @@ // When in a group, the serwist prefix is not displayed. | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
// biome-ignore lint/complexity/noBannedTypes: Unknown reason | ||
const api = {}; | ||
@@ -442,6 +442,5 @@ const loggerMethods = Object.keys(methodToColorMap); | ||
*/ // Callbacks to be executed whenever there's a quota error. | ||
// Can't change Function type right now. | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
// biome-ignore lint/complexity/noBannedTypes: Can't change Function type right now. | ||
const quotaErrorCallbacks = new Set(); | ||
export { SerwistError as S, canConstructResponseFromBodyStream as a, cacheNames as c, finalAssertExports as f, logger as l, quotaErrorCallbacks as q }; |
@@ -107,3 +107,3 @@ export interface MapLikeObject { | ||
export interface HandlerWillStartCallback { | ||
(param: HandlerWillStartCallbackParam): Promise<void | null | undefined>; | ||
(param: HandlerWillStartCallbackParam): Promise<any>; | ||
} | ||
@@ -135,3 +135,3 @@ export interface CacheDidUpdateCallbackParam { | ||
export interface CacheDidUpdateCallback { | ||
(param: CacheDidUpdateCallbackParam): Promise<void | null | undefined>; | ||
(param: CacheDidUpdateCallbackParam): Promise<any>; | ||
} | ||
@@ -155,3 +155,3 @@ export interface CacheKeyWillBeUsedCallbackParam { | ||
export interface CacheWillUpdateCallback { | ||
(param: CacheWillUpdateCallbackParam): Promise<Response | void | null | undefined>; | ||
(param: CacheWillUpdateCallbackParam): Promise<any>; | ||
} | ||
@@ -178,3 +178,3 @@ export interface CachedResponseWillBeUsedCallbackParam { | ||
export interface CachedResponseWillBeUsedCallback { | ||
(param: CachedResponseWillBeUsedCallbackParam): Promise<Response | void | null | undefined>; | ||
(param: CachedResponseWillBeUsedCallbackParam): Promise<any>; | ||
} | ||
@@ -189,3 +189,3 @@ export interface FetchDidFailCallbackParam { | ||
export interface FetchDidFailCallback { | ||
(param: FetchDidFailCallbackParam): Promise<void | null | undefined>; | ||
(param: FetchDidFailCallbackParam): Promise<any>; | ||
} | ||
@@ -234,3 +234,3 @@ export interface FetchDidSucceedCallbackParam { | ||
export interface HandlerDidRespondCallback { | ||
(param: HandlerDidRespondCallbackParam): Promise<void | null | undefined>; | ||
(param: HandlerDidRespondCallbackParam): Promise<any>; | ||
} | ||
@@ -245,3 +245,3 @@ export interface HandlerDidCompleteCallbackParam { | ||
export interface HandlerDidCompleteCallback { | ||
(param: HandlerDidCompleteCallbackParam): Promise<void | null | undefined>; | ||
(param: HandlerDidCompleteCallbackParam): Promise<any>; | ||
} | ||
@@ -248,0 +248,0 @@ /** |
{ | ||
"name": "@serwist/core", | ||
"version": "8.4.0", | ||
"version": "8.4.1", | ||
"type": "module", | ||
@@ -55,3 +55,3 @@ "description": "This module is used by a number of the other Serwist modules to share common code.", | ||
"rollup": "4.9.1", | ||
"@serwist/constants": "8.4.0" | ||
"@serwist/constants": "8.4.1" | ||
}, | ||
@@ -61,5 +61,5 @@ "scripts": { | ||
"dev": "rollup --config rollup.config.js --watch", | ||
"lint": "eslint src --ext ts,tsx,js,jsx,cjs,mjs", | ||
"lint": "biome lint ./src", | ||
"typecheck": "tsc" | ||
} | ||
} |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
105547
5
80
2130