From f58284cee6f69aa2dad8c2ca683c0900bbbfb03f Mon Sep 17 00:00:00 2001 From: Ryan Cragun Date: Mon, 22 Dec 2025 14:40:35 -0700 Subject: [PATCH] release: enos 0.0.35 - Bump latest version to enos 0.0.35 - `npm upgrade` for latest deps - Pin actions to latest versions Signed-off-by: Ryan Cragun --- .github/workflows/tagrelease.yml | 2 +- .github/workflows/test.yml | 16 +- README.md | 4 +- dist/index.js | 4198 ++++++++++++++++++++---------- dist/licenses.txt | 152 +- package-lock.json | 999 ++++--- package.json | 2 +- src/enos.js | 2 +- 8 files changed, 3404 insertions(+), 1971 deletions(-) diff --git a/.github/workflows/tagrelease.yml b/.github/workflows/tagrelease.yml index 162a2c6..0372a1f 100644 --- a/.github/workflows/tagrelease.yml +++ b/.github/workflows/tagrelease.yml @@ -15,7 +15,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ github.head_ref }} # checkout the correct branch name fetch-depth: 0 # fetch the whole repo history diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24a849d..3061b13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,8 @@ jobs: ci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: 24 - run: npm install @@ -28,8 +28,8 @@ jobs: unauthenticated: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: 24 - name: Run action-setup-enos @@ -39,8 +39,8 @@ jobs: with-github-token-input: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: 24 - name: Run action-setup-enos @@ -52,8 +52,8 @@ jobs: with-GITHUB_TOKEN-env-var: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: 24 - name: Run action-setup-enos diff --git a/README.md b/README.md index 220f2a4..bcd7c37 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,14 @@ steps: - name: Set up Enos uses: hashicorp/action-setup-enos@v1 with: - version: 0.0.34 # You only need to specify a version if you wish to override the default version + version: 0.0.35 # You only need to specify a version if you wish to override the default version ``` ## Inputs The actions supports the following inputs: -- `version`: The version of `enos` to install, defaulting to `0.0.34` +- `version`: The version of `enos` to install, defaulting to `0.0.35` ## Release a new version of Enos diff --git a/dist/index.js b/dist/index.js index beb1f3d..6261864 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5613,209 +5613,6 @@ function _unique(values) { }))); -/***/ }), - -/***/ 1373: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {Transform, PassThrough} = __nccwpck_require__(2203); -const zlib = __nccwpck_require__(3106); -const mimicResponse = __nccwpck_require__(9382); - -module.exports = response => { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - - if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { - return response; - } - - // TODO: Remove this when targeting Node.js 12. - const isBrotli = contentEncoding === 'br'; - if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { - response.destroy(new Error('Brotli is not supported on Node.js < 12')); - return response; - } - - let isEmpty = true; - - const checker = new Transform({ - transform(data, _encoding, callback) { - isEmpty = false; - - callback(null, data); - }, - - flush(callback) { - callback(); - } - }); - - const finalStream = new PassThrough({ - autoDestroy: false, - destroy(error, callback) { - response.destroy(); - - callback(error); - } - }); - - const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); - - decompressStream.once('error', error => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; - } - - finalStream.destroy(error); - }); - - mimicResponse(response, finalStream); - response.pipe(checker).pipe(decompressStream).pipe(finalStream); - - return finalStream; -}; - - -/***/ }), - -/***/ 9382: -/***/ ((module) => { - - - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url' -]; - -module.exports = (fromStream, toStream) => { - if (toStream._readableState.autoDestroy) { - throw new Error('The second stream must have the `autoDestroy` option set to `false`'); - } - - const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); - - const properties = {}; - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === 'function'; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false - }; - } - - Object.defineProperties(toStream, properties); - - fromStream.once('aborted', () => { - toStream.destroy(); - - toStream.emit('aborted'); - }); - - fromStream.once('close', () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once('end', () => { - toStream.emit('close'); - }); - } else { - toStream.emit('close'); - } - } else { - toStream.emit('close'); - } - }); - - return toStream; -}; - - -/***/ }), - -/***/ 2114: -/***/ ((module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -function isTLSSocket(socket) { - return socket.encrypted; -} -const deferToConnect = (socket, fn) => { - let listeners; - if (typeof fn === 'function') { - const connect = fn; - listeners = { connect }; - } - else { - listeners = fn; - } - const hasConnectListener = typeof listeners.connect === 'function'; - const hasSecureConnectListener = typeof listeners.secureConnect === 'function'; - const hasCloseListener = typeof listeners.close === 'function'; - const onConnect = () => { - if (hasConnectListener) { - listeners.connect(); - } - if (isTLSSocket(socket) && hasSecureConnectListener) { - if (socket.authorized) { - listeners.secureConnect(); - } - else if (!socket.authorizationError) { - socket.once('secureConnect', listeners.secureConnect); - } - } - if (hasCloseListener) { - socket.once('close', listeners.close); - } - }; - if (socket.writable && !socket.connecting) { - onConnect(); - } - else if (socket.connecting) { - socket.once('connect', onConnect); - } - else if (socket.destroyed && hasCloseListener) { - listeners.close(socket._hadError); - } -}; -exports["default"] = deferToConnect; -// For CommonJS default export support -module.exports = deferToConnect; -module.exports["default"] = deferToConnect; - - /***/ }), /***/ 4584: @@ -9162,337 +8959,6 @@ module.exports = (name, value) => { }; -/***/ }), - -/***/ 5563: -/***/ ((__unused_webpack_module, exports) => { - -//TODO: handle reviver/dehydrate function like normal -//and handle indentation, like normal. -//if anyone needs this... please send pull request. - -exports.stringify = function stringify (o) { - if('undefined' == typeof o) return o - - if(o && Buffer.isBuffer(o)) - return JSON.stringify(':base64:' + o.toString('base64')) - - if(o && o.toJSON) - o = o.toJSON() - - if(o && 'object' === typeof o) { - var s = '' - var array = Array.isArray(o) - s = array ? '[' : '{' - var first = true - - for(var k in o) { - var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k]) - if(Object.hasOwnProperty.call(o, k) && !ignore) { - if(!first) - s += ',' - first = false - if (array) { - if(o[k] == undefined) - s += 'null' - else - s += stringify(o[k]) - } else if (o[k] !== void(0)) { - s += stringify(k) + ':' + stringify(o[k]) - } - } - } - - s += array ? ']' : '}' - - return s - } else if ('string' === typeof o) { - return JSON.stringify(/^:/.test(o) ? ':' + o : o) - } else if ('undefined' === typeof o) { - return 'null'; - } else - return JSON.stringify(o) -} - -exports.parse = function (s) { - return JSON.parse(s, function (key, value) { - if('string' === typeof value) { - if(/^:base64:/.test(value)) - return Buffer.from(value.substring(8), 'base64') - else - return /^:/.test(value) ? value.substring(1) : value - } - return value - }) -} - - -/***/ }), - -/***/ 6018: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const EventEmitter = __nccwpck_require__(4434); -const JSONB = __nccwpck_require__(5563); - -const loadStore = options => { - const adapters = { - redis: '@keyv/redis', - rediss: '@keyv/redis', - mongodb: '@keyv/mongo', - mongo: '@keyv/mongo', - sqlite: '@keyv/sqlite', - postgresql: '@keyv/postgres', - postgres: '@keyv/postgres', - mysql: '@keyv/mysql', - etcd: '@keyv/etcd', - offline: '@keyv/offline', - tiered: '@keyv/tiered', - }; - if (options.adapter || options.uri) { - const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0]; - return new (__WEBPACK_EXTERNAL_createRequire(import.meta.url)(adapters[adapter]))(options); - } - - return new Map(); -}; - -const iterableAdapters = [ - 'sqlite', - 'postgres', - 'mysql', - 'mongo', - 'redis', - 'tiered', -]; - -class Keyv extends EventEmitter { - constructor(uri, {emitErrors = true, ...options} = {}) { - super(); - this.opts = { - namespace: 'keyv', - serialize: JSONB.stringify, - deserialize: JSONB.parse, - ...((typeof uri === 'string') ? {uri} : uri), - ...options, - }; - - if (!this.opts.store) { - const adapterOptions = {...this.opts}; - this.opts.store = loadStore(adapterOptions); - } - - if (this.opts.compression) { - const compression = this.opts.compression; - this.opts.serialize = compression.serialize.bind(compression); - this.opts.deserialize = compression.deserialize.bind(compression); - } - - if (typeof this.opts.store.on === 'function' && emitErrors) { - this.opts.store.on('error', error => this.emit('error', error)); - } - - this.opts.store.namespace = this.opts.namespace; - - const generateIterator = iterator => async function * () { - for await (const [key, raw] of typeof iterator === 'function' - ? iterator(this.opts.store.namespace) - : iterator) { - const data = await this.opts.deserialize(raw); - if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) { - continue; - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - this.delete(key); - continue; - } - - yield [this._getKeyUnprefix(key), data.value]; - } - }; - - // Attach iterators - if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) { - this.iterator = generateIterator(this.opts.store); - } else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts - && this._checkIterableAdaptar()) { - this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store)); - } - } - - _checkIterableAdaptar() { - return iterableAdapters.includes(this.opts.store.opts.dialect) - || iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0; - } - - _getKeyPrefix(key) { - return `${this.opts.namespace}:${key}`; - } - - _getKeyPrefixArray(keys) { - return keys.map(key => `${this.opts.namespace}:${key}`); - } - - _getKeyUnprefix(key) { - return key - .split(':') - .splice(1) - .join(':'); - } - - get(key, options) { - const {store} = this.opts; - const isArray = Array.isArray(key); - const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); - if (isArray && store.getMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push(Promise.resolve() - .then(() => store.get(key)) - .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) - .then(data => { - if (data === undefined || data === null) { - return undefined; - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - return this.delete(key).then(() => undefined); - } - - return (options && options.raw) ? data : data.value; - }), - ); - } - - return Promise.allSettled(promises) - .then(values => { - const data = []; - for (const value of values) { - data.push(value.value); - } - - return data; - }); - } - - return Promise.resolve() - .then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed)) - .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) - .then(data => { - if (data === undefined || data === null) { - return undefined; - } - - if (isArray) { - return data.map((row, index) => { - if ((typeof row === 'string')) { - row = this.opts.deserialize(row); - } - - if (row === undefined || row === null) { - return undefined; - } - - if (typeof row.expires === 'number' && Date.now() > row.expires) { - this.delete(key[index]).then(() => undefined); - return undefined; - } - - return (options && options.raw) ? row : row.value; - }); - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - return this.delete(key).then(() => undefined); - } - - return (options && options.raw) ? data : data.value; - }); - } - - set(key, value, ttl) { - const keyPrefixed = this._getKeyPrefix(key); - if (typeof ttl === 'undefined') { - ttl = this.opts.ttl; - } - - if (ttl === 0) { - ttl = undefined; - } - - const {store} = this.opts; - - return Promise.resolve() - .then(() => { - const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; - if (typeof value === 'symbol') { - this.emit('error', 'symbol cannot be serialized'); - } - - value = {value, expires}; - return this.opts.serialize(value); - }) - .then(value => store.set(keyPrefixed, value, ttl)) - .then(() => true); - } - - delete(key) { - const {store} = this.opts; - if (Array.isArray(key)) { - const keyPrefixed = this._getKeyPrefixArray(key); - if (store.deleteMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push(store.delete(key)); - } - - return Promise.allSettled(promises) - .then(values => values.every(x => x.value === true)); - } - - return Promise.resolve() - .then(() => store.deleteMany(keyPrefixed)); - } - - const keyPrefixed = this._getKeyPrefix(key); - return Promise.resolve() - .then(() => store.delete(keyPrefixed)); - } - - clear() { - const {store} = this.opts; - return Promise.resolve() - .then(() => store.clear()); - } - - has(key) { - const keyPrefixed = this._getKeyPrefix(key); - const {store} = this.opts; - return Promise.resolve() - .then(async () => { - if (typeof store.has === 'function') { - return store.has(keyPrefixed); - } - - const value = await store.get(keyPrefixed); - return value !== undefined; - }); - } - - disconnect() { - const {store} = this.opts; - if (typeof store.disconnect === 'function') { - return store.disconnect(); - } - } -} - -module.exports = Keyv; - - /***/ }), /***/ 5475: @@ -36277,12 +35743,13 @@ class RequestError extends Error { */ response; constructor(message, statusCode, options) { - super(message); + super(message, { cause: options.cause }); this.name = "HttpError"; this.status = Number.parseInt(statusCode); if (Number.isNaN(this.status)) { this.status = 0; } + /* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */ if ("response" in options) { this.response = options.response; } @@ -36309,7 +35776,7 @@ class RequestError extends Error { // pkg/dist-src/version.js -var dist_bundle_VERSION = "10.0.3"; +var dist_bundle_VERSION = "10.0.7"; // pkg/dist-src/defaults.js var defaults_default = { @@ -36333,6 +35800,7 @@ function dist_bundle_isPlainObject(value) { // pkg/dist-src/fetch-wrapper.js +var noop = () => ""; async function fetchWrapper(requestOptions) { const fetch = requestOptions.request?.fetch || globalThis.fetch; if (!fetch) { @@ -36434,7 +35902,7 @@ async function fetchWrapper(requestOptions) { async function getResponseData(response) { const contentType = response.headers.get("content-type"); if (!contentType) { - return response.text().catch(() => ""); + return response.text().catch(noop); } const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType); if (isJSONResponse(mimetype)) { @@ -36446,9 +35914,12 @@ async function getResponseData(response) { return text; } } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { - return response.text().catch(() => ""); + return response.text().catch(noop); } else { - return response.arrayBuffer().catch(() => new ArrayBuffer(0)); + return response.arrayBuffer().catch( + /* v8 ignore next -- @preserve */ + () => new ArrayBuffer(0) + ); } } function isJSONResponse(mimetype) { @@ -36496,6 +35967,8 @@ function dist_bundle_withDefaults(oldEndpoint, newDefaults) { // pkg/dist-src/index.js var request = dist_bundle_withDefaults(endpoint, defaults_default); +/* v8 ignore next -- @preserve */ +/* v8 ignore else -- @preserve */ ;// CONCATENATED MODULE: ./node_modules/@octokit/graphql/dist-bundle/index.js // pkg/dist-src/index.js @@ -36680,7 +36153,7 @@ var createTokenAuth = function createTokenAuth2(token) { ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js -const version_VERSION = "7.0.3"; +const version_VERSION = "7.0.6"; ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js @@ -36690,16 +36163,16 @@ const version_VERSION = "7.0.3"; -const noop = () => { +const dist_src_noop = () => { }; const consoleWarn = console.warn.bind(console); const consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop; + logger.debug = dist_src_noop; } if (typeof logger.info !== "function") { - logger.info = noop; + logger.info = dist_src_noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -37086,7 +36559,7 @@ function throttling(octokit, octokitOptions) { const retryCount = ~~request.retryCount; request.retryCount = retryCount; options.request.retryCount = retryCount; - const { wantRetry, retryAfter = 0 } = await async function() { + const { wantRetry, retryAfter = 0 } = await (async function() { if (/\bsecondary rate\b/i.test(error.message)) { const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; const wantRetry2 = await emitter.trigger( @@ -37120,7 +36593,7 @@ function throttling(octokit, octokitOptions) { return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; } return {}; - }(); + })(); if (wantRetry) { request.retryCount++; return retryAfter * state2.retryAfterBaseValue; @@ -37283,7 +36756,13 @@ var external_fs_ = __nccwpck_require__(9896); var external_path_ = __nccwpck_require__(6928); ;// CONCATENATED MODULE: external "node:timers/promises" const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:timers/promises"); +;// CONCATENATED MODULE: ./node_modules/@sindresorhus/is/distribution/utilities.js +function keysOf(value) { + return Object.keys(value); +} + ;// CONCATENATED MODULE: ./node_modules/@sindresorhus/is/distribution/index.js + const typedArrayTypeNames = [ 'Int8Array', 'Uint8Array', @@ -37440,9 +36919,12 @@ function detect(value) { return 'Buffer'; } const tagType = getObjectType(value); - if (tagType) { + if (tagType && tagType !== 'Object') { return tagType; } + if (hasPromiseApi(value)) { + return 'Promise'; + } if (value instanceof String || value instanceof Boolean || value instanceof Number) { throw new TypeError('Please don\'t use object wrappers for primitive types'); } @@ -37537,6 +37019,7 @@ const is = Object.assign(detect, { urlInstance: isUrlInstance, urlSearchParams: isUrlSearchParams, urlString: isUrlString, + optional: isOptional, validDate: isValidDate, validLength: isValidLength, weakMap: isWeakMap, @@ -37554,6 +37037,9 @@ function isAny(predicate, ...values) { const predicates = isArray(predicate) ? predicate : [predicate]; return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); } +function isOptional(value, predicate) { + return isUndefined(value) || predicate(value); +} function isArray(value, assertion) { if (!Array.isArray(value)) { return false; @@ -37609,7 +37095,7 @@ function isBuffer(value) { return value?.constructor?.isBuffer?.(value) ?? false; } function isClass(value) { - return isFunction(value) && value.toString().startsWith('class '); + return isFunction(value) && /^class(\s+|{)/.test(value.toString()); } function isDataView(value) { return getObjectType(value) === 'DataView'; @@ -37927,6 +37413,7 @@ function typeErrorMessageMultipleValues(expectedType, values) { const assert = { all: assertAll, any: assertAny, + optional: assertOptional, array: assertArray, arrayBuffer: assertArrayBuffer, arrayLike: assertArrayLike, @@ -38106,9 +37593,6 @@ const methodTypeMap = { isWeakSet: 'WeakSet', isWhitespaceString: 'whitespace string', }; -function keysOf(value) { - return Object.keys(value); -} const isMethodNames = keysOf(methodTypeMap); function isIsMethodName(value) { return isMethodNames.includes(value); @@ -38126,6 +37610,11 @@ function assertAny(predicate, ...values) { throw new TypeError(typeErrorMessageMultipleValues(expectedTypes, values)); } } +function assertOptional(value, assertion, message) { + if (!isUndefined(value)) { + assertion(value, message); + } +} function assertArray(value, assertion, message) { if (!isArray(value)) { throw new TypeError(message ?? typeErrorMessage('Array', value)); @@ -38721,8 +38210,9 @@ An error to be thrown when a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. */ class errors_RequestError extends Error { + name = 'RequestError'; + code = 'ERR_GOT_REQUEST_ERROR'; input; - code; stack; response; request; @@ -38730,8 +38220,9 @@ class errors_RequestError extends Error { constructor(message, error, self) { super(message, { cause: error }); Error.captureStackTrace(this, this.constructor); - this.name = 'RequestError'; - this.code = error.code ?? 'ERR_GOT_REQUEST_ERROR'; + if (error.code) { + this.code = error.code; + } this.input = error.input; if (isRequest(self)) { Object.defineProperty(this, 'request', { @@ -38766,10 +38257,10 @@ An error to be thrown when the server redirects you more than ten times. Includes a `response` property. */ class MaxRedirectsError extends errors_RequestError { + name = 'MaxRedirectsError'; + code = 'ERR_TOO_MANY_REDIRECTS'; constructor(request) { super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); - this.name = 'MaxRedirectsError'; - this.code = 'ERR_TOO_MANY_REDIRECTS'; } } /** @@ -38779,10 +38270,10 @@ Includes a `response` property. // TODO: Change `HTTPError` to `HTTPError` in the next major version to enforce type usage. // eslint-disable-next-line @typescript-eslint/naming-convention class HTTPError extends errors_RequestError { + name = 'HTTPError'; + code = 'ERR_NON_2XX_3XX_RESPONSE'; constructor(response) { - super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); - this.name = 'HTTPError'; - this.code = 'ERR_NON_2XX_3XX_RESPONSE'; + super(`Request failed with status code ${response.statusCode} (${response.statusMessage}): ${response.request.options.method} ${response.request.options.url.toString()}`, {}, response.request); } } /** @@ -38790,20 +38281,24 @@ An error to be thrown when a cache method fails. For example, if the database goes down or there's a filesystem error. */ class CacheError extends errors_RequestError { + name = 'CacheError'; constructor(error, request) { super(error.message, error, request); - this.name = 'CacheError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code; + if (this.code === 'ERR_GOT_REQUEST_ERROR') { + this.code = 'ERR_CACHE_ACCESS'; + } } } /** An error to be thrown when the request body is a stream and an error occurs while reading from that stream. */ class UploadError extends errors_RequestError { + name = 'UploadError'; constructor(error, request) { super(error.message, error, request); - this.name = 'UploadError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code; + if (this.code === 'ERR_GOT_REQUEST_ERROR') { + this.code = 'ERR_UPLOAD'; + } } } /** @@ -38811,11 +38306,11 @@ An error to be thrown when the request is aborted due to a timeout. Includes an `event` and `timings` property. */ class TimeoutError extends errors_RequestError { + name = 'TimeoutError'; timings; event; constructor(error, timings, request) { super(error.message, error, request); - this.name = 'TimeoutError'; this.event = error.event; this.timings = timings; } @@ -38824,30 +38319,32 @@ class TimeoutError extends errors_RequestError { An error to be thrown when reading from response stream fails. */ class ReadError extends errors_RequestError { + name = 'ReadError'; constructor(error, request) { super(error.message, error, request); - this.name = 'ReadError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code; + if (this.code === 'ERR_GOT_REQUEST_ERROR') { + this.code = 'ERR_READING_RESPONSE_STREAM'; + } } } /** An error which always triggers a new retry when thrown. */ class RetryError extends errors_RequestError { + name = 'RetryError'; + code = 'ERR_RETRYING'; constructor(request) { super('Retrying', {}, request); - this.name = 'RetryError'; - this.code = 'ERR_RETRYING'; } } /** An error to be thrown when the request is aborted by AbortController. */ class AbortError extends errors_RequestError { + name = 'AbortError'; + code = 'ERR_ABORTED'; constructor(request) { super('This operation was aborted.', {}, request); - this.code = 'ERR_ABORTED'; - this.name = 'AbortError'; } } @@ -38859,434 +38356,25 @@ const external_node_buffer_namespaceObject = __WEBPACK_EXTERNAL_createRequire(im var external_node_stream_ = __nccwpck_require__(7075); ;// CONCATENATED MODULE: external "node:http" const external_node_http_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -// EXTERNAL MODULE: external "util" -var external_util_ = __nccwpck_require__(9023); -// EXTERNAL MODULE: ./node_modules/defer-to-connect/dist/source/index.js -var source = __nccwpck_require__(2114); -;// CONCATENATED MODULE: ./node_modules/@szmarczak/http-timer/dist/source/index.js - - - -const timer = (request) => { - if (request.timings) { - return request.timings; - } - const timings = { - start: Date.now(), - socket: undefined, - lookup: undefined, - connect: undefined, - secureConnect: undefined, - upload: undefined, - response: undefined, - end: undefined, - error: undefined, - abort: undefined, - phases: { - wait: undefined, - dns: undefined, - tcp: undefined, - tls: undefined, - request: undefined, - firstByte: undefined, - download: undefined, - total: undefined, - }, - }; - request.timings = timings; - const handleError = (origin) => { - origin.once(external_events_.errorMonitor, () => { - timings.error = Date.now(); - timings.phases.total = timings.error - timings.start; - }); - }; - handleError(request); - const onAbort = () => { - timings.abort = Date.now(); - timings.phases.total = timings.abort - timings.start; - }; - request.prependOnceListener('abort', onAbort); - const onSocket = (socket) => { - timings.socket = Date.now(); - timings.phases.wait = timings.socket - timings.start; - if (external_util_.types.isProxy(socket)) { - return; - } - const lookupListener = () => { - timings.lookup = Date.now(); - timings.phases.dns = timings.lookup - timings.socket; - }; - socket.prependOnceListener('lookup', lookupListener); - source(socket, { - connect: () => { - timings.connect = Date.now(); - if (timings.lookup === undefined) { - socket.removeListener('lookup', lookupListener); - timings.lookup = timings.connect; - timings.phases.dns = timings.lookup - timings.socket; - } - timings.phases.tcp = timings.connect - timings.lookup; - }, - secureConnect: () => { - timings.secureConnect = Date.now(); - timings.phases.tls = timings.secureConnect - timings.connect; - }, - }); - }; - if (request.socket) { - onSocket(request.socket); - } - else { - request.prependOnceListener('socket', onSocket); - } - const onUpload = () => { - timings.upload = Date.now(); - timings.phases.request = timings.upload - (timings.secureConnect ?? timings.connect); - }; - if (request.writableFinished) { - onUpload(); - } - else { - request.prependOnceListener('finish', onUpload); - } - request.prependOnceListener('response', (response) => { - timings.response = Date.now(); - timings.phases.firstByte = timings.response - timings.upload; - response.timings = timings; - handleError(response); - response.prependOnceListener('end', () => { - request.off('abort', onAbort); - response.off('aborted', onAbort); - if (timings.phases.total) { - // Aborted or errored - return; - } - timings.end = Date.now(); - timings.phases.download = timings.end - timings.response; - timings.phases.total = timings.end - timings.start; - }); - response.prependOnceListener('aborted', onAbort); - }); - return timings; -}; -/* harmony default export */ const dist_source = (timer); - -;// CONCATENATED MODULE: external "node:url" -const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); -// EXTERNAL MODULE: external "node:crypto" -var external_node_crypto_ = __nccwpck_require__(7598); -;// CONCATENATED MODULE: ./node_modules/normalize-url/index.js -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs -const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; -const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; - -const testParameter = (name, filters) => filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); - -const supportedProtocols = new Set([ - 'https:', - 'http:', - 'file:', -]); - -const hasCustomProtocol = urlString => { - try { - const {protocol} = new URL(urlString); - - return protocol.endsWith(':') - && !protocol.includes('.') - && !supportedProtocols.has(protocol); - } catch { - return false; - } -}; - -const normalizeDataURL = (urlString, {stripHash}) => { - const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); - - if (!match) { - throw new Error(`Invalid URL: ${urlString}`); - } - - let {type, data, hash} = match.groups; - const mediaType = type.split(';'); - hash = stripHash ? '' : hash; - - let isBase64 = false; - if (mediaType[mediaType.length - 1] === 'base64') { - mediaType.pop(); - isBase64 = true; - } - - // Lowercase MIME type - const mimeType = mediaType.shift()?.toLowerCase() ?? ''; - const attributes = mediaType - .map(attribute => { - let [key, value = ''] = attribute.split('=').map(string => string.trim()); - - // Lowercase `charset` - if (key === 'charset') { - value = value.toLowerCase(); - - if (value === DATA_URL_DEFAULT_CHARSET) { - return ''; - } - } - - return `${key}${value ? `=${value}` : ''}`; - }) - .filter(Boolean); - - const normalizedMediaType = [ - ...attributes, - ]; - - if (isBase64) { - normalizedMediaType.push('base64'); - } - - if (normalizedMediaType.length > 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { - normalizedMediaType.unshift(mimeType); - } - - return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; -}; - -function normalizeUrl(urlString, options) { - options = { - defaultProtocol: 'http', - normalizeProtocol: true, - forceHttp: false, - forceHttps: false, - stripAuthentication: true, - stripHash: false, - stripTextFragment: true, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeSingleSlash: true, - removeDirectoryIndex: false, - removeExplicitPort: false, - sortQueryParameters: true, - removePath: false, - transformPath: false, - ...options, - }; - - // Legacy: Append `:` to the protocol if missing. - if (typeof options.defaultProtocol === 'string' && !options.defaultProtocol.endsWith(':')) { - options.defaultProtocol = `${options.defaultProtocol}:`; - } - - urlString = urlString.trim(); - - // Data URL - if (/^data:/i.test(urlString)) { - return normalizeDataURL(urlString, options); - } - - if (hasCustomProtocol(urlString)) { - return urlString; - } - - const hasRelativeProtocol = urlString.startsWith('//'); - const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - - // Prepend protocol - if (!isRelativeUrl) { - urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); - } - - const urlObject = new URL(urlString); - - if (options.forceHttp && options.forceHttps) { - throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); - } - - if (options.forceHttp && urlObject.protocol === 'https:') { - urlObject.protocol = 'http:'; - } - - if (options.forceHttps && urlObject.protocol === 'http:') { - urlObject.protocol = 'https:'; - } - - // Remove auth - if (options.stripAuthentication) { - urlObject.username = ''; - urlObject.password = ''; - } - - // Remove hash - if (options.stripHash) { - urlObject.hash = ''; - } else if (options.stripTextFragment) { - urlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, ''); - } - - // Remove duplicate slashes if not preceded by a protocol - // NOTE: This could be implemented using a single negative lookbehind - // regex, but we avoid that to maintain compatibility with older js engines - // which do not have support for that feature. - if (urlObject.pathname) { - // TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(? 0) { - let pathComponents = urlObject.pathname.split('/'); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, options.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, -1); - urlObject.pathname = pathComponents.slice(1).join('/') + '/'; - } - } - - // Remove path - if (options.removePath) { - urlObject.pathname = '/'; - } - - // Transform path components - if (options.transformPath && typeof options.transformPath === 'function') { - const pathComponents = urlObject.pathname.split('/').filter(Boolean); - const newComponents = options.transformPath(pathComponents); - urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join('/')}` : '/'; - } - - if (urlObject.hostname) { - // Remove trailing dot - urlObject.hostname = urlObject.hostname.replace(/\.$/, ''); - - // Remove `www.` - if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) { - // Each label should be max 63 at length (min: 1). - // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names - // Each TLD should be up to 63 characters long (min: 2). - // It is technically possible to have a single character TLD, but none currently exist. - urlObject.hostname = urlObject.hostname.replace(/^www\./, ''); - } - } - - // Remove query unwanted parameters - if (Array.isArray(options.removeQueryParameters)) { - // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. - for (const key of [...urlObject.searchParams.keys()]) { - if (testParameter(key, options.removeQueryParameters)) { - urlObject.searchParams.delete(key); - } - } - } - - if (!Array.isArray(options.keepQueryParameters) && options.removeQueryParameters === true) { - urlObject.search = ''; - } - - // Keep wanted query parameters - if (Array.isArray(options.keepQueryParameters) && options.keepQueryParameters.length > 0) { - // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. - for (const key of [...urlObject.searchParams.keys()]) { - if (!testParameter(key, options.keepQueryParameters)) { - urlObject.searchParams.delete(key); - } - } - } - - // Sort query parameters - if (options.sortQueryParameters) { - const originalSearch = urlObject.search; - urlObject.searchParams.sort(); - - // Calling `.sort()` encodes the search parameters, so we need to decode them again. - try { - urlObject.search = decodeURIComponent(urlObject.search); - } catch {} - - // Fix parameters that originally had no equals sign but got one added by URLSearchParams - const partsWithoutEquals = originalSearch.slice(1).split('&').filter(p => p && !p.includes('=')); - for (const part of partsWithoutEquals) { - const decoded = decodeURIComponent(part); - // Only replace at word boundaries to avoid partial matches - urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`); - } - } - - if (options.removeTrailingSlash) { - urlObject.pathname = urlObject.pathname.replace(/\/$/, ''); - } - - // Remove an explicit port number, excluding a default port number, if applicable - if (options.removeExplicitPort && urlObject.port) { - urlObject.port = ''; - } - - const oldUrlString = urlString; - - // Take advantage of many of the Node `url` normalizations - urlString = urlObject.toString(); - - if (!options.removeSingleSlash && urlObject.pathname === '/' && !oldUrlString.endsWith('/') && urlObject.hash === '') { - urlString = urlString.replace(/\/$/, ''); - } - - // Remove ending `/` unless removeSingleSlash is false - if ((options.removeTrailingSlash || urlObject.pathname === '/') && urlObject.hash === '' && options.removeSingleSlash) { - urlString = urlString.replace(/\/$/, ''); - } +;// CONCATENATED MODULE: ./node_modules/byte-counter/utilities.js +const textEncoder = new TextEncoder(); - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !options.normalizeProtocol) { - urlString = urlString.replace(/^http:\/\//, '//'); +function byteLength(data) { + if (typeof data === 'string') { + return textEncoder.encode(data).byteLength; } - // Remove http/https - if (options.stripProtocol) { - urlString = urlString.replace(/^(?:https?:)?\/\//, ''); + if (ArrayBuffer.isView(data) || data instanceof ArrayBuffer || data instanceof SharedArrayBuffer) { + return data.byteLength; } - return urlString; + return 0; } +// EXTERNAL MODULE: external "node:crypto" +var external_node_crypto_ = __nccwpck_require__(7598); +;// CONCATENATED MODULE: external "node:url" +const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); ;// CONCATENATED MODULE: ./node_modules/is-stream/index.js function isStream(stream, {checkOpen = true} = {}) { return stream !== null @@ -39633,8 +38721,8 @@ async function getStreamAsArrayBuffer(stream, options) { const initArrayBuffer = () => ({contents: new ArrayBuffer(0)}); -const useTextEncoder = chunk => textEncoder.encode(chunk); -const textEncoder = new TextEncoder(); +const useTextEncoder = chunk => array_buffer_textEncoder.encode(chunk); +const array_buffer_textEncoder = new TextEncoder(); const useUint8Array = chunk => new Uint8Array(chunk); @@ -39732,6 +38820,1411 @@ const arrayBufferToNodeBuffer = arrayBuffer => globalThis.Buffer.from(arrayBuffe // EXTERNAL MODULE: ./node_modules/http-cache-semantics/index.js var http_cache_semantics = __nccwpck_require__(4584); +// EXTERNAL MODULE: external "buffer" +var external_buffer_ = __nccwpck_require__(181); +;// CONCATENATED MODULE: ./node_modules/@keyv/serialize/dist/index.js +// src/index.ts + +var _serialize = (data, escapeColonStrings = true) => { + if (data === void 0 || data === null) { + return "null"; + } + if (typeof data === "string") { + return JSON.stringify( + escapeColonStrings && data.startsWith(":") ? `:${data}` : data + ); + } + if (external_buffer_.Buffer.isBuffer(data)) { + return JSON.stringify(`:base64:${data.toString("base64")}`); + } + if (data?.toJSON) { + data = data.toJSON(); + } + if (typeof data === "object") { + let s = ""; + const array = Array.isArray(data); + s = array ? "[" : "{"; + let first = true; + for (const k in data) { + const ignore = typeof data[k] === "function" || !array && data[k] === void 0; + if (!Object.hasOwn(data, k) || ignore) { + continue; + } + if (!first) { + s += ","; + } + first = false; + if (array) { + s += _serialize(data[k], escapeColonStrings); + } else if (data[k] !== void 0) { + s += `${_serialize(k, false)}:${_serialize(data[k], escapeColonStrings)}`; + } + } + s += array ? "]" : "}"; + return s; + } + return JSON.stringify(data); +}; +var defaultSerialize = (data) => { + return _serialize(data, true); +}; +var defaultDeserialize = (data) => JSON.parse(data, (_, value) => { + if (typeof value === "string") { + if (value.startsWith(":base64:")) { + return external_buffer_.Buffer.from(value.slice(8), "base64"); + } + return value.startsWith(":") ? value.slice(1) : value; + } + return value; +}); + + +;// CONCATENATED MODULE: ./node_modules/cacheable-request/node_modules/keyv/dist/index.js +// src/index.ts + + +// src/event-manager.ts +var EventManager = class { + _eventListeners; + _maxListeners; + constructor() { + this._eventListeners = /* @__PURE__ */ new Map(); + this._maxListeners = 100; + } + maxListeners() { + return this._maxListeners; + } + // Add an event listener + addListener(event, listener) { + this.on(event, listener); + } + on(event, listener) { + if (!this._eventListeners.has(event)) { + this._eventListeners.set(event, []); + } + const listeners = this._eventListeners.get(event); + if (listeners) { + if (listeners.length >= this._maxListeners) { + console.warn( + `MaxListenersExceededWarning: Possible event memory leak detected. ${listeners.length + 1} ${event} listeners added. Use setMaxListeners() to increase limit.` + ); + } + listeners.push(listener); + } + return this; + } + // Remove an event listener + removeListener(event, listener) { + this.off(event, listener); + } + off(event, listener) { + const listeners = this._eventListeners.get(event) ?? []; + const index = listeners.indexOf(listener); + if (index !== -1) { + listeners.splice(index, 1); + } + if (listeners.length === 0) { + this._eventListeners.delete(event); + } + } + once(event, listener) { + const onceListener = (...arguments_) => { + listener(...arguments_); + this.off(event, onceListener); + }; + this.on(event, onceListener); + } + // Emit an event + // biome-ignore lint/suspicious/noExplicitAny: type format + emit(event, ...arguments_) { + const listeners = this._eventListeners.get(event); + if (listeners && listeners.length > 0) { + for (const listener of listeners) { + listener(...arguments_); + } + } + } + // Get all listeners for a specific event + listeners(event) { + return this._eventListeners.get(event) ?? []; + } + // Remove all listeners for a specific event + removeAllListeners(event) { + if (event) { + this._eventListeners.delete(event); + } else { + this._eventListeners.clear(); + } + } + // Set the maximum number of listeners for a single event + setMaxListeners(n) { + this._maxListeners = n; + } +}; +var event_manager_default = EventManager; + +// src/hooks-manager.ts +var HooksManager = class extends event_manager_default { + _hookHandlers; + constructor() { + super(); + this._hookHandlers = /* @__PURE__ */ new Map(); + } + // Adds a handler function for a specific event + addHandler(event, handler) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + eventHandlers.push(handler); + } else { + this._hookHandlers.set(event, [handler]); + } + } + // Removes a specific handler function for a specific event + removeHandler(event, handler) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + const index = eventHandlers.indexOf(handler); + if (index !== -1) { + eventHandlers.splice(index, 1); + } + } + } + // Triggers all handlers for a specific event with provided data + // biome-ignore lint/suspicious/noExplicitAny: type format + trigger(event, data) { + const eventHandlers = this._hookHandlers.get(event); + if (eventHandlers) { + for (const handler of eventHandlers) { + try { + handler(data); + } catch (error) { + this.emit( + "error", + new Error( + `Error in hook handler for event "${event}": ${error.message}` + ) + ); + } + } + } + } + // Provides read-only access to the current handlers + get handlers() { + return new Map(this._hookHandlers); + } +}; +var hooks_manager_default = HooksManager; + +// src/stats-manager.ts +var StatsManager = class extends event_manager_default { + enabled = true; + hits = 0; + misses = 0; + sets = 0; + deletes = 0; + errors = 0; + constructor(enabled) { + super(); + if (enabled !== void 0) { + this.enabled = enabled; + } + this.reset(); + } + hit() { + if (this.enabled) { + this.hits++; + } + } + miss() { + if (this.enabled) { + this.misses++; + } + } + set() { + if (this.enabled) { + this.sets++; + } + } + delete() { + if (this.enabled) { + this.deletes++; + } + } + hitsOrMisses(array) { + for (const item of array) { + if (item === void 0) { + this.miss(); + } else { + this.hit(); + } + } + } + reset() { + this.hits = 0; + this.misses = 0; + this.sets = 0; + this.deletes = 0; + this.errors = 0; + } +}; +var stats_manager_default = StatsManager; + +// src/index.ts +var KeyvHooks = /* @__PURE__ */ ((KeyvHooks2) => { + KeyvHooks2["PRE_SET"] = "preSet"; + KeyvHooks2["POST_SET"] = "postSet"; + KeyvHooks2["PRE_GET"] = "preGet"; + KeyvHooks2["POST_GET"] = "postGet"; + KeyvHooks2["PRE_GET_MANY"] = "preGetMany"; + KeyvHooks2["POST_GET_MANY"] = "postGetMany"; + KeyvHooks2["PRE_GET_RAW"] = "preGetRaw"; + KeyvHooks2["POST_GET_RAW"] = "postGetRaw"; + KeyvHooks2["PRE_GET_MANY_RAW"] = "preGetManyRaw"; + KeyvHooks2["POST_GET_MANY_RAW"] = "postGetManyRaw"; + KeyvHooks2["PRE_DELETE"] = "preDelete"; + KeyvHooks2["POST_DELETE"] = "postDelete"; + return KeyvHooks2; +})(KeyvHooks || {}); +var iterableAdapters = [ + "sqlite", + "postgres", + "mysql", + "mongo", + "redis", + "valkey", + "etcd" +]; +var Keyv = class extends event_manager_default { + opts; + iterator; + hooks = new hooks_manager_default(); + stats = new stats_manager_default(false); + /** + * Time to live in milliseconds + */ + _ttl; + /** + * Namespace + */ + _namespace; + /** + * Store + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + _store = /* @__PURE__ */ new Map(); + _serialize = defaultSerialize; + _deserialize = defaultDeserialize; + _compression; + _useKeyPrefix = true; + _throwOnErrors = false; + /** + * Keyv Constructor + * @param {KeyvStoreAdapter | KeyvOptions} store + * @param {Omit} [options] if you provide the store you can then provide the Keyv Options + */ + constructor(store, options) { + super(); + options ??= {}; + store ??= {}; + this.opts = { + namespace: "keyv", + serialize: defaultSerialize, + deserialize: defaultDeserialize, + emitErrors: true, + // @ts-expect-error - Map is not a KeyvStoreAdapter + store: /* @__PURE__ */ new Map(), + ...options + }; + if (store && store.get) { + this.opts.store = store; + } else { + this.opts = { + ...this.opts, + ...store + }; + } + this._store = this.opts.store ?? /* @__PURE__ */ new Map(); + this._compression = this.opts.compression; + this._serialize = this.opts.serialize; + this._deserialize = this.opts.deserialize; + if (this.opts.namespace) { + this._namespace = this.opts.namespace; + } + if (this._store) { + if (!this._isValidStorageAdapter(this._store)) { + throw new Error("Invalid storage adapter"); + } + if (typeof this._store.on === "function") { + this._store.on("error", (error) => this.emit("error", error)); + } + this._store.namespace = this._namespace; + if (typeof this._store[Symbol.iterator] === "function" && this._store instanceof Map) { + this.iterator = this.generateIterator( + this._store + ); + } else if ("iterator" in this._store && this._store.opts && this._checkIterableAdapter()) { + this.iterator = this.generateIterator( + // biome-ignore lint/style/noNonNullAssertion: need to fix + this._store.iterator.bind(this._store) + ); + } + } + if (this.opts.stats) { + this.stats.enabled = this.opts.stats; + } + if (this.opts.ttl) { + this._ttl = this.opts.ttl; + } + if (this.opts.useKeyPrefix !== void 0) { + this._useKeyPrefix = this.opts.useKeyPrefix; + } + if (this.opts.throwOnErrors !== void 0) { + this._throwOnErrors = this.opts.throwOnErrors; + } + } + /** + * Get the current store + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + get store() { + return this._store; + } + /** + * Set the current store. This will also set the namespace, event error handler, and generate the iterator. If the store is not valid it will throw an error. + * @param {KeyvStoreAdapter | Map | any} store the store to set + */ + // biome-ignore lint/suspicious/noExplicitAny: type format + set store(store) { + if (this._isValidStorageAdapter(store)) { + this._store = store; + this.opts.store = store; + if (typeof store.on === "function") { + store.on("error", (error) => this.emit("error", error)); + } + if (this._namespace) { + this._store.namespace = this._namespace; + } + if (typeof store[Symbol.iterator] === "function" && store instanceof Map) { + this.iterator = this.generateIterator( + store + ); + } else if ("iterator" in store && store.opts && this._checkIterableAdapter()) { + this.iterator = this.generateIterator(store.iterator?.bind(store)); + } + } else { + throw new Error("Invalid storage adapter"); + } + } + /** + * Get the current compression function + * @returns {CompressionAdapter} The current compression function + */ + get compression() { + return this._compression; + } + /** + * Set the current compression function + * @param {CompressionAdapter} compress The compression function to set + */ + set compression(compress) { + this._compression = compress; + } + /** + * Get the current namespace. + * @returns {string | undefined} The current namespace. + */ + get namespace() { + return this._namespace; + } + /** + * Set the current namespace. + * @param {string | undefined} namespace The namespace to set. + */ + set namespace(namespace) { + this._namespace = namespace; + this.opts.namespace = namespace; + this._store.namespace = namespace; + if (this.opts.store) { + this.opts.store.namespace = namespace; + } + } + /** + * Get the current TTL. + * @returns {number} The current TTL in milliseconds. + */ + get ttl() { + return this._ttl; + } + /** + * Set the current TTL. + * @param {number} ttl The TTL to set in milliseconds. + */ + set ttl(ttl) { + this.opts.ttl = ttl; + this._ttl = ttl; + } + /** + * Get the current serialize function. + * @returns {Serialize} The current serialize function. + */ + get serialize() { + return this._serialize; + } + /** + * Set the current serialize function. + * @param {Serialize} serialize The serialize function to set. + */ + set serialize(serialize) { + this.opts.serialize = serialize; + this._serialize = serialize; + } + /** + * Get the current deserialize function. + * @returns {Deserialize} The current deserialize function. + */ + get deserialize() { + return this._deserialize; + } + /** + * Set the current deserialize function. + * @param {Deserialize} deserialize The deserialize function to set. + */ + set deserialize(deserialize) { + this.opts.deserialize = deserialize; + this._deserialize = deserialize; + } + /** + * Get the current useKeyPrefix value. This will enable or disable key prefixing. + * @returns {boolean} The current useKeyPrefix value. + * @default true + */ + get useKeyPrefix() { + return this._useKeyPrefix; + } + /** + * Set the current useKeyPrefix value. This will enable or disable key prefixing. + * @param {boolean} value The useKeyPrefix value to set. + */ + set useKeyPrefix(value) { + this._useKeyPrefix = value; + this.opts.useKeyPrefix = value; + } + /** + * Get the current throwErrors value. This will enable or disable throwing errors on methods in addition to emitting them. + * @return {boolean} The current throwOnErrors value. + */ + get throwOnErrors() { + return this._throwOnErrors; + } + /** + * Set the current throwOnErrors value. This will enable or disable throwing errors on methods in addition to emitting them. + * @param {boolean} value The throwOnErrors value to set. + */ + set throwOnErrors(value) { + this._throwOnErrors = value; + this.opts.throwOnErrors = value; + } + generateIterator(iterator) { + const function_ = async function* () { + for await (const [key, raw] of typeof iterator === "function" ? iterator(this._store.namespace) : iterator) { + const data = await this.deserializeData(raw); + if (this._useKeyPrefix && this._store.namespace && !key.includes(this._store.namespace)) { + continue; + } + if (typeof data.expires === "number" && Date.now() > data.expires) { + this.delete(key); + continue; + } + yield [this._getKeyUnprefix(key), data.value]; + } + }; + return function_.bind(this); + } + _checkIterableAdapter() { + return iterableAdapters.includes(this._store.opts.dialect) || iterableAdapters.some( + (element) => this._store.opts.url.includes(element) + ); + } + _getKeyPrefix(key) { + if (!this._useKeyPrefix) { + return key; + } + if (!this._namespace) { + return key; + } + return `${this._namespace}:${key}`; + } + _getKeyPrefixArray(keys) { + if (!this._useKeyPrefix) { + return keys; + } + if (!this._namespace) { + return keys; + } + return keys.map((key) => `${this._namespace}:${key}`); + } + _getKeyUnprefix(key) { + if (!this._useKeyPrefix) { + return key; + } + return key.split(":").splice(1).join(":"); + } + // biome-ignore lint/suspicious/noExplicitAny: type format + _isValidStorageAdapter(store) { + return store instanceof Map || typeof store.get === "function" && typeof store.set === "function" && typeof store.delete === "function" && typeof store.clear === "function"; + } + // eslint-disable-next-line @stylistic/max-len + async get(key, options) { + const { store } = this.opts; + const isArray = Array.isArray(key); + const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); + const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; + if (isArray) { + if (options?.raw === true) { + return this.getMany(key, { raw: true }); + } + return this.getMany(key, { raw: false }); + } + this.hooks.trigger("preGet" /* PRE_GET */, { key: keyPrefixed }); + let rawData; + try { + rawData = await store.get(keyPrefixed); + } catch (error) { + if (this.throwOnErrors) { + throw error; + } + } + const deserializedData = typeof rawData === "string" || this.opts.compression ? await this.deserializeData(rawData) : rawData; + if (deserializedData === void 0 || deserializedData === null) { + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: void 0 + }); + this.stats.miss(); + return void 0; + } + if (isDataExpired(deserializedData)) { + await this.delete(key); + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: void 0 + }); + this.stats.miss(); + return void 0; + } + this.hooks.trigger("postGet" /* POST_GET */, { + key: keyPrefixed, + value: deserializedData + }); + this.stats.hit(); + return options?.raw ? deserializedData : deserializedData.value; + } + async getMany(keys, options) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; + this.hooks.trigger("preGetMany" /* PRE_GET_MANY */, { keys: keyPrefixed }); + if (store.getMany === void 0) { + const promises = keyPrefixed.map(async (key) => { + const rawData2 = await store.get(key); + const deserializedRow = typeof rawData2 === "string" || this.opts.compression ? await this.deserializeData(rawData2) : rawData2; + if (deserializedRow === void 0 || deserializedRow === null) { + return void 0; + } + if (isDataExpired(deserializedRow)) { + await this.delete(key); + return void 0; + } + return options?.raw ? deserializedRow : deserializedRow.value; + }); + const deserializedRows = await Promise.allSettled(promises); + const result2 = deserializedRows.map( + // biome-ignore lint/suspicious/noExplicitAny: type format + (row) => row.value + ); + this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result2); + if (result2.length > 0) { + this.stats.hit(); + } + return result2; + } + const rawData = await store.getMany(keyPrefixed); + const result = []; + const expiredKeys = []; + for (const index in rawData) { + let row = rawData[index]; + if (typeof row === "string") { + row = await this.deserializeData(row); + } + if (row === void 0 || row === null) { + result.push(void 0); + continue; + } + if (isDataExpired(row)) { + expiredKeys.push(keys[index]); + result.push(void 0); + continue; + } + const value = options?.raw ? row : row.value; + result.push(value); + } + if (expiredKeys.length > 0) { + await this.deleteMany(expiredKeys); + } + this.hooks.trigger("postGetMany" /* POST_GET_MANY */, result); + if (result.length > 0) { + this.stats.hit(); + } + return result; + } + /** + * Get the raw value of a key. This is the replacement for setting raw to true in the get() method. + * @param {string} key the key to get + * @returns {Promise | undefined>} will return a StoredDataRaw or undefined if the key does not exist or is expired. + */ + async getRaw(key) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefix(key); + this.hooks.trigger("preGetRaw" /* PRE_GET_RAW */, { key: keyPrefixed }); + const rawData = await store.get(keyPrefixed); + if (rawData === void 0 || rawData === null) { + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: void 0 + }); + this.stats.miss(); + return void 0; + } + const deserializedData = typeof rawData === "string" || this.opts.compression ? await this.deserializeData(rawData) : rawData; + if (deserializedData !== void 0 && deserializedData.expires !== void 0 && deserializedData.expires !== null && // biome-ignore lint/style/noNonNullAssertion: need to fix + deserializedData.expires < Date.now()) { + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: void 0 + }); + this.stats.miss(); + await this.delete(key); + return void 0; + } + this.stats.hit(); + this.hooks.trigger("postGetRaw" /* POST_GET_RAW */, { + key: keyPrefixed, + value: deserializedData + }); + return deserializedData; + } + /** + * Get the raw values of many keys. This is the replacement for setting raw to true in the getMany() method. + * @param {string[]} keys the keys to get + * @returns {Promise>>} will return an array of StoredDataRaw or undefined if the key does not exist or is expired. + */ + async getManyRaw(keys) { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + if (keys.length === 0) { + const result2 = Array.from({ length: keys.length }).fill( + void 0 + ); + this.stats.misses += keys.length; + this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { + keys: keyPrefixed, + values: result2 + }); + return result2; + } + let result = []; + if (store.getMany === void 0) { + const promises = keyPrefixed.map(async (key) => { + const rawData = await store.get(key); + if (rawData !== void 0 && rawData !== null) { + return this.deserializeData(rawData); + } + return void 0; + }); + const deserializedRows = await Promise.allSettled(promises); + result = deserializedRows.map( + // biome-ignore lint/suspicious/noExplicitAny: type format + (row) => row.value + ); + } else { + const rawData = await store.getMany(keyPrefixed); + for (const row of rawData) { + if (row !== void 0 && row !== null) { + result.push(await this.deserializeData(row)); + } else { + result.push(void 0); + } + } + } + const expiredKeys = []; + const isDataExpired = (data) => typeof data.expires === "number" && Date.now() > data.expires; + for (const [index, row] of result.entries()) { + if (row !== void 0 && isDataExpired(row)) { + expiredKeys.push(keyPrefixed[index]); + result[index] = void 0; + } + } + if (expiredKeys.length > 0) { + await this.deleteMany(expiredKeys); + } + this.stats.hitsOrMisses(result); + this.hooks.trigger("postGetManyRaw" /* POST_GET_MANY_RAW */, { + keys: keyPrefixed, + values: result + }); + return result; + } + /** + * Set an item to the store + * @param {string | Array} key the key to use. If you pass in an array of KeyvEntry it will set many items + * @param {Value} value the value of the key + * @param {number} [ttl] time to live in milliseconds + * @returns {boolean} if it sets then it will return a true. On failure will return false. + */ + async set(key, value, ttl) { + const data = { key, value, ttl }; + this.hooks.trigger("preSet" /* PRE_SET */, data); + const keyPrefixed = this._getKeyPrefix(data.key); + data.ttl ??= this._ttl; + if (data.ttl === 0) { + data.ttl = void 0; + } + const { store } = this.opts; + const expires = typeof data.ttl === "number" ? Date.now() + data.ttl : void 0; + if (typeof data.value === "symbol") { + this.emit("error", "symbol cannot be serialized"); + throw new Error("symbol cannot be serialized"); + } + const formattedValue = { value: data.value, expires }; + const serializedValue = await this.serializeData(formattedValue); + let result = true; + try { + const value2 = await store.set(keyPrefixed, serializedValue, data.ttl); + if (typeof value2 === "boolean") { + result = value2; + } + } catch (error) { + result = false; + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + } + this.hooks.trigger("postSet" /* POST_SET */, { + key: keyPrefixed, + value: serializedValue, + ttl + }); + this.stats.set(); + return result; + } + /** + * Set many items to the store + * @param {Array} entries the entries to set + * @returns {boolean[]} will return an array of booleans if it sets then it will return a true. On failure will return false. + */ + // biome-ignore lint/correctness/noUnusedVariables: type format + async setMany(entries) { + let results = []; + try { + if (this._store.setMany === void 0) { + const promises = []; + for (const entry of entries) { + promises.push(this.set(entry.key, entry.value, entry.ttl)); + } + const promiseResults = await Promise.all(promises); + results = promiseResults; + } else { + const serializedEntries = await Promise.all( + entries.map(async ({ key, value, ttl }) => { + ttl ??= this._ttl; + if (ttl === 0) { + ttl = void 0; + } + const expires = typeof ttl === "number" ? Date.now() + ttl : void 0; + if (typeof value === "symbol") { + this.emit("error", "symbol cannot be serialized"); + throw new Error("symbol cannot be serialized"); + } + const formattedValue = { value, expires }; + const serializedValue = await this.serializeData(formattedValue); + const keyPrefixed = this._getKeyPrefix(key); + return { key: keyPrefixed, value: serializedValue, ttl }; + }) + ); + results = await this._store.setMany(serializedEntries); + } + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + results = entries.map(() => false); + } + return results; + } + /** + * Delete an Entry + * @param {string | string[]} key the key to be deleted. if an array it will delete many items + * @returns {boolean} will return true if item or items are deleted. false if there is an error + */ + async delete(key) { + const { store } = this.opts; + if (Array.isArray(key)) { + return this.deleteMany(key); + } + const keyPrefixed = this._getKeyPrefix(key); + this.hooks.trigger("preDelete" /* PRE_DELETE */, { key: keyPrefixed }); + let result = true; + try { + const value = await store.delete(keyPrefixed); + if (typeof value === "boolean") { + result = value; + } + } catch (error) { + result = false; + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + } + this.hooks.trigger("postDelete" /* POST_DELETE */, { + key: keyPrefixed, + value: result + }); + this.stats.delete(); + return result; + } + /** + * Delete many items from the store + * @param {string[]} keys the keys to be deleted + * @returns {boolean} will return true if item or items are deleted. false if there is an error + */ + async deleteMany(keys) { + try { + const { store } = this.opts; + const keyPrefixed = this._getKeyPrefixArray(keys); + this.hooks.trigger("preDelete" /* PRE_DELETE */, { key: keyPrefixed }); + if (store.deleteMany !== void 0) { + return await store.deleteMany(keyPrefixed); + } + const promises = keyPrefixed.map(async (key) => store.delete(key)); + const results = await Promise.all(promises); + const returnResult = results.every(Boolean); + this.hooks.trigger("postDelete" /* POST_DELETE */, { + key: keyPrefixed, + value: returnResult + }); + return returnResult; + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + return false; + } + } + /** + * Clear the store + * @returns {void} + */ + async clear() { + this.emit("clear"); + const { store } = this.opts; + try { + await store.clear(); + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + } + } + async has(key) { + if (Array.isArray(key)) { + return this.hasMany(key); + } + const keyPrefixed = this._getKeyPrefix(key); + const { store } = this.opts; + if (store.has !== void 0 && !(store instanceof Map)) { + return store.has(keyPrefixed); + } + let rawData; + try { + rawData = await store.get(keyPrefixed); + } catch (error) { + this.emit("error", error); + if (this._throwOnErrors) { + throw error; + } + return false; + } + if (rawData) { + const data = await this.deserializeData(rawData); + if (data) { + if (data.expires === void 0 || data.expires === null) { + return true; + } + return data.expires > Date.now(); + } + } + return false; + } + /** + * Check if many keys exist + * @param {string[]} keys the keys to check + * @returns {boolean[]} will return an array of booleans if the keys exist + */ + async hasMany(keys) { + const keyPrefixed = this._getKeyPrefixArray(keys); + const { store } = this.opts; + if (store.hasMany !== void 0) { + return store.hasMany(keyPrefixed); + } + const results = []; + for (const key of keys) { + results.push(await this.has(key)); + } + return results; + } + /** + * Will disconnect the store. This is only available if the store has a disconnect method + * @returns {Promise} + */ + async disconnect() { + const { store } = this.opts; + this.emit("disconnect"); + if (typeof store.disconnect === "function") { + return store.disconnect(); + } + } + // biome-ignore lint/suspicious/noExplicitAny: type format + emit(event, ...arguments_) { + if (event === "error" && !this.opts.emitErrors) { + return; + } + super.emit(event, ...arguments_); + } + async serializeData(data) { + if (!this._serialize) { + return data; + } + if (this._compression?.compress) { + return this._serialize({ + value: await this._compression.compress(data.value), + expires: data.expires + }); + } + return this._serialize(data); + } + async deserializeData(data) { + if (!this._deserialize) { + return data; + } + if (this._compression?.decompress && typeof data === "string") { + const result = await this._deserialize(data); + return { + value: await this._compression.decompress(result?.value), + expires: result?.expires + }; + } + if (typeof data === "string") { + return this._deserialize(data); + } + return void 0; + } +}; +var index_default = (/* unused pure expression or super */ null && (Keyv)); + +/* v8 ignore next -- @preserve */ + +;// CONCATENATED MODULE: ./node_modules/mimic-response/index.js +// We define these manually to ensure they're always copied +// even if they would move up the prototype chain +// https://nodejs.org/api/http.html#http_class_http_incomingmessage +const knownProperties = [ + 'aborted', + 'complete', + 'headers', + 'httpVersion', + 'httpVersionMinor', + 'httpVersionMajor', + 'method', + 'rawHeaders', + 'rawTrailers', + 'setTimeout', + 'socket', + 'statusCode', + 'statusMessage', + 'trailers', + 'url', +]; + +function mimicResponse(fromStream, toStream) { + if (toStream._readableState.autoDestroy) { + throw new Error('The second stream must have the `autoDestroy` option set to `false`'); + } + + const fromProperties = new Set([...Object.keys(fromStream), ...knownProperties]); + + const properties = {}; + + for (const property of fromProperties) { + // Don't overwrite existing properties. + if (property in toStream) { + continue; + } + + properties[property] = { + get() { + const value = fromStream[property]; + const isFunction = typeof value === 'function'; + + return isFunction ? value.bind(fromStream) : value; + }, + set(value) { + fromStream[property] = value; + }, + enumerable: true, + configurable: false, + }; + } + + Object.defineProperties(toStream, properties); + + fromStream.once('aborted', () => { + toStream.destroy(); + + toStream.emit('aborted'); + }); + + fromStream.once('close', () => { + if (fromStream.complete) { + if (toStream.readable) { + toStream.once('end', () => { + toStream.emit('close'); + }); + } else { + toStream.emit('close'); + } + } else { + toStream.emit('close'); + } + }); + + return toStream; +} + +;// CONCATENATED MODULE: ./node_modules/normalize-url/index.js +// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs +const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; +const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; + +const testParameter = (name, filters) => filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); + +const supportedProtocols = new Set([ + 'https:', + 'http:', + 'file:', +]); + +const hasCustomProtocol = urlString => { + try { + const {protocol} = new URL(urlString); + + return protocol.endsWith(':') + && !protocol.includes('.') + && !supportedProtocols.has(protocol); + } catch { + return false; + } +}; + +const normalizeDataURL = (urlString, {stripHash}) => { + const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); + + if (!match) { + throw new Error(`Invalid URL: ${urlString}`); + } + + let {type, data, hash} = match.groups; + const mediaType = type.split(';'); + hash = stripHash ? '' : hash; + + let isBase64 = false; + if (mediaType[mediaType.length - 1] === 'base64') { + mediaType.pop(); + isBase64 = true; + } + + // Lowercase MIME type + const mimeType = mediaType.shift()?.toLowerCase() ?? ''; + const attributes = mediaType + .map(attribute => { + let [key, value = ''] = attribute.split('=').map(string => string.trim()); + + // Lowercase `charset` + if (key === 'charset') { + value = value.toLowerCase(); + + if (value === DATA_URL_DEFAULT_CHARSET) { + return ''; + } + } + + return `${key}${value ? `=${value}` : ''}`; + }) + .filter(Boolean); + + const normalizedMediaType = [ + ...attributes, + ]; + + if (isBase64) { + normalizedMediaType.push('base64'); + } + + if (normalizedMediaType.length > 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { + normalizedMediaType.unshift(mimeType); + } + + return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; +}; + +function normalizeUrl(urlString, options) { + options = { + defaultProtocol: 'http', + normalizeProtocol: true, + forceHttp: false, + forceHttps: false, + stripAuthentication: true, + stripHash: false, + stripTextFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeSingleSlash: true, + removeDirectoryIndex: false, + removeExplicitPort: false, + sortQueryParameters: true, + removePath: false, + transformPath: false, + ...options, + }; + + // Legacy: Append `:` to the protocol if missing. + if (typeof options.defaultProtocol === 'string' && !options.defaultProtocol.endsWith(':')) { + options.defaultProtocol = `${options.defaultProtocol}:`; + } + + urlString = urlString.trim(); + + // Data URL + if (/^data:/i.test(urlString)) { + return normalizeDataURL(urlString, options); + } + + if (hasCustomProtocol(urlString)) { + return urlString; + } + + const hasRelativeProtocol = urlString.startsWith('//'); + const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); + + // Prepend protocol + if (!isRelativeUrl) { + urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); + } + + const urlObject = new URL(urlString); + + if (options.forceHttp && options.forceHttps) { + throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); + } + + if (options.forceHttp && urlObject.protocol === 'https:') { + urlObject.protocol = 'http:'; + } + + if (options.forceHttps && urlObject.protocol === 'http:') { + urlObject.protocol = 'https:'; + } + + // Remove auth + if (options.stripAuthentication) { + urlObject.username = ''; + urlObject.password = ''; + } + + // Remove hash + if (options.stripHash) { + urlObject.hash = ''; + } else if (options.stripTextFragment) { + urlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, ''); + } + + // Remove duplicate slashes if not preceded by a protocol + // NOTE: This could be implemented using a single negative lookbehind + // regex, but we avoid that to maintain compatibility with older js engines + // which do not have support for that feature. + if (urlObject.pathname) { + // TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(? 0) { + let pathComponents = urlObject.pathname.split('/'); + const lastComponent = pathComponents[pathComponents.length - 1]; + + if (testParameter(lastComponent, options.removeDirectoryIndex)) { + pathComponents = pathComponents.slice(0, -1); + urlObject.pathname = pathComponents.slice(1).join('/') + '/'; + } + } + + // Remove path + if (options.removePath) { + urlObject.pathname = '/'; + } + + // Transform path components + if (options.transformPath && typeof options.transformPath === 'function') { + const pathComponents = urlObject.pathname.split('/').filter(Boolean); + const newComponents = options.transformPath(pathComponents); + urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join('/')}` : '/'; + } + + if (urlObject.hostname) { + // Remove trailing dot + urlObject.hostname = urlObject.hostname.replace(/\.$/, ''); + + // Remove `www.` + if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) { + // Each label should be max 63 at length (min: 1). + // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names + // Each TLD should be up to 63 characters long (min: 2). + // It is technically possible to have a single character TLD, but none currently exist. + urlObject.hostname = urlObject.hostname.replace(/^www\./, ''); + } + } + + // Remove query unwanted parameters + if (Array.isArray(options.removeQueryParameters)) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (testParameter(key, options.removeQueryParameters)) { + urlObject.searchParams.delete(key); + } + } + } + + if (!Array.isArray(options.keepQueryParameters) && options.removeQueryParameters === true) { + urlObject.search = ''; + } + + // Keep wanted query parameters + if (Array.isArray(options.keepQueryParameters) && options.keepQueryParameters.length > 0) { + // eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy. + for (const key of [...urlObject.searchParams.keys()]) { + if (!testParameter(key, options.keepQueryParameters)) { + urlObject.searchParams.delete(key); + } + } + } + + // Sort query parameters + if (options.sortQueryParameters) { + const originalSearch = urlObject.search; + urlObject.searchParams.sort(); + + // Calling `.sort()` encodes the search parameters, so we need to decode them again. + try { + urlObject.search = decodeURIComponent(urlObject.search); + } catch {} + + // Fix parameters that originally had no equals sign but got one added by URLSearchParams + const partsWithoutEquals = originalSearch.slice(1).split('&').filter(p => p && !p.includes('=')); + for (const part of partsWithoutEquals) { + const decoded = decodeURIComponent(part); + // Only replace at word boundaries to avoid partial matches + urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`); + } + } + + if (options.removeTrailingSlash) { + urlObject.pathname = urlObject.pathname.replace(/\/$/, ''); + } + + // Remove an explicit port number, excluding a default port number, if applicable + if (options.removeExplicitPort && urlObject.port) { + urlObject.port = ''; + } + + const oldUrlString = urlString; + + // Take advantage of many of the Node `url` normalizations + urlString = urlObject.toString(); + + if (!options.removeSingleSlash && urlObject.pathname === '/' && !oldUrlString.endsWith('/') && urlObject.hash === '') { + urlString = urlString.replace(/\/$/, ''); + } + + // Remove ending `/` unless removeSingleSlash is false + if ((options.removeTrailingSlash || urlObject.pathname === '/') && urlObject.hash === '' && options.removeSingleSlash) { + urlString = urlString.replace(/\/$/, ''); + } + + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !options.normalizeProtocol) { + urlString = urlString.replace(/^http:\/\//, '//'); + } + + // Remove http/https + if (options.stripProtocol) { + urlString = urlString.replace(/^(?:https?:)?\/\//, ''); + } + + return urlString; +} + ;// CONCATENATED MODULE: ./node_modules/lowercase-keys/index.js function lowercase_keys_lowercaseKeys(object) { return Object.fromEntries(Object.entries(object).map(([key, value]) => [key.toLowerCase(), value])); @@ -39746,6 +40239,7 @@ class Response extends external_node_stream_.Readable { headers; body; url; + complete; constructor({statusCode, headers, body, url}) { if (typeof statusCode !== 'number') { @@ -39764,9 +40258,17 @@ class Response extends external_node_stream_.Readable { throw new TypeError('Argument `url` should be a string'); } + let bodyPushed = false; super({ read() { - this.push(body); + // Push body on first read, end stream on second read. + // This allows listeners to attach before data flows through pipes. + if (!bodyPushed) { + bodyPushed = true; + this.push(body); + return; + } + this.push(null); }, }); @@ -39775,88 +40277,10 @@ class Response extends external_node_stream_.Readable { this.headers = lowercase_keys_lowercaseKeys(headers); this.body = body; this.url = url; + this.complete = true; } } -// EXTERNAL MODULE: ./node_modules/keyv/src/index.js -var src = __nccwpck_require__(6018); -;// CONCATENATED MODULE: ./node_modules/mimic-response/index.js -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url', -]; - -function mimicResponse(fromStream, toStream) { - if (toStream._readableState.autoDestroy) { - throw new Error('The second stream must have the `autoDestroy` option set to `false`'); - } - - const fromProperties = new Set([...Object.keys(fromStream), ...knownProperties]); - - const properties = {}; - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === 'function'; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false, - }; - } - - Object.defineProperties(toStream, properties); - - fromStream.once('aborted', () => { - toStream.destroy(); - - toStream.emit('aborted'); - }); - - fromStream.once('close', () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once('end', () => { - toStream.emit('close'); - }); - } else { - toStream.emit('close'); - } - } else { - toStream.emit('close'); - } - }); - - return toStream; -} - ;// CONCATENATED MODULE: ./node_modules/cacheable-request/dist/types.js // Type definitions for cacheable-request 6.0 // Project: https://github.com/lukechilds/cacheable-request#readme @@ -39867,17 +40291,19 @@ function mimicResponse(fromStream, toStream) { class types_RequestError extends Error { constructor(error) { super(error.message); - Object.assign(this, error); + Object.defineProperties(this, Object.getOwnPropertyDescriptors(error)); } } class types_CacheError extends Error { constructor(error) { super(error.message); - Object.assign(this, error); + Object.defineProperties(this, Object.getOwnPropertyDescriptors(error)); } } //# sourceMappingURL=types.js.map ;// CONCATENATED MODULE: ./node_modules/cacheable-request/dist/index.js +// biome-ignore-all lint/suspicious/noImplicitAnyLet: legacy format +// biome-ignore-all lint/suspicious/noExplicitAny: legacy format @@ -39891,37 +40317,39 @@ class types_CacheError extends Error { class CacheableRequest { constructor(cacheRequest, cacheAdapter) { + this.cache = new Keyv({ namespace: "cacheable-request" }); this.hooks = new Map(); this.request = () => (options, callback) => { let url; - if (typeof options === 'string') { - url = normalizeUrlObject(external_node_url_namespaceObject.parse(options)); + if (typeof options === "string") { + url = normalizeUrlObject(parseWithWhatwg(options)); options = {}; } else if (options instanceof external_node_url_namespaceObject.URL) { - url = normalizeUrlObject(external_node_url_namespaceObject.parse(options.toString())); + url = normalizeUrlObject(parseWithWhatwg(options.toString())); options = {}; } else { - const [pathname, ...searchParts] = (options.path ?? '').split('?'); - const search = searchParts.length > 0 - ? `?${searchParts.join('?')}` - : ''; + const [pathname, ...searchParts] = (options.path ?? "").split("?"); + const search = searchParts.length > 0 ? `?${searchParts.join("?")}` : ""; url = normalizeUrlObject({ ...options, pathname, search }); } options = { headers: {}, - method: 'GET', + method: "GET", cache: true, strictTtl: false, automaticFailover: false, ...options, ...urlObjectToRequestOptions(url), }; - options.headers = Object.fromEntries(entries(options.headers).map(([key, value]) => [key.toLowerCase(), value])); + options.headers = Object.fromEntries(entries(options.headers).map(([key, value]) => [ + key.toLowerCase(), + value, + ])); const ee = new external_node_events_(); const normalizedUrlString = normalizeUrl(external_node_url_namespaceObject.format(url), { - stripWWW: false, // eslint-disable-line @typescript-eslint/naming-convention + stripWWW: false, removeTrailingSlash: false, stripAuthentication: false, }); @@ -39929,7 +40357,9 @@ class CacheableRequest { // POST, PATCH, and PUT requests may be cached, depending on the response // cache-control headers. As a result, the body of the request should be // added to the cache key in order to avoid collisions. - if (options.body && options.method !== undefined && ['POST', 'PATCH', 'PUT'].includes(options.method)) { + if (options.body && + options.method !== undefined && + ["POST", "PATCH", "PUT"].includes(options.method)) { if (options.body instanceof external_node_stream_.Readable) { // Streamed bodies should completely skip the cache because they may // or may not be hashable and in either case the stream would need to @@ -39937,7 +40367,7 @@ class CacheableRequest { options.cache = false; } else { - key += `:${external_node_crypto_.createHash('md5').update(options.body).digest('hex')}`; + key += `:${external_node_crypto_.createHash("md5").update(options.body).digest("hex")}`; } } let revalidate = false; @@ -39945,8 +40375,11 @@ class CacheableRequest { const makeRequest = (options_) => { madeRequest = true; let requestErrored = false; - let requestErrorCallback = () => { }; - const requestErrorPromise = new Promise(resolve => { + /* c8 ignore next 4 */ + let requestErrorCallback = () => { + /* do nothing */ + }; + const requestErrorPromise = new Promise((resolve) => { requestErrorCallback = () => { if (!requestErrored) { requestErrored = true; @@ -39957,17 +40390,42 @@ class CacheableRequest { const handler = async (response) => { if (revalidate) { response.status = response.statusCode; - const revalidatedPolicy = http_cache_semantics.fromObject(revalidate.cachePolicy).revalidatedPolicy(options_, response); + const originalPolicy = http_cache_semantics.fromObject(revalidate.cachePolicy); + const revalidatedPolicy = originalPolicy.revalidatedPolicy(options_, response); if (!revalidatedPolicy.modified) { response.resume(); - await new Promise(resolve => { + await new Promise((resolve) => { // Skipping 'error' handler cause 'error' event should't be emitted for 304 response - response - .once('end', resolve); + response.once("end", resolve); }); + // Get headers from revalidated policy const headers = convertHeaders(revalidatedPolicy.policy.responseHeaders()); + // Preserve headers from the original cached response that may have been + // lost during revalidation (e.g., content-encoding, content-type, etc.) + // This works around a limitation in http-cache-semantics where some headers + // are not preserved when a 304 response has minimal headers + const originalHeaders = convertHeaders(originalPolicy.responseHeaders()); + // Headers that should be preserved from the cached response + // according to RFC 7232 section 4.1 + const preserveHeaders = [ + "content-encoding", + "content-type", + "content-length", + "content-language", + "content-location", + "etag", + ]; + for (const headerName of preserveHeaders) { + if (originalHeaders[headerName] !== undefined && + headers[headerName] === undefined) { + headers[headerName] = originalHeaders[headerName]; + } + } response = new Response({ - statusCode: revalidate.statusCode, headers, body: revalidate.body, url: revalidate.url, + statusCode: revalidate.statusCode, + headers, + body: revalidate.body, + url: revalidate.url, }); response.cachePolicy = revalidatedPolicy.policy; response.fromCache = true; @@ -39985,31 +40443,36 @@ class CacheableRequest { const bodyPromise = getStreamAsBuffer(response); await Promise.race([ requestErrorPromise, - new Promise(resolve => response.once('end', resolve)), // eslint-disable-line no-promise-executor-return - new Promise(resolve => response.once('close', resolve)), // eslint-disable-line no-promise-executor-return + new Promise((resolve) => response.once("end", resolve)), + new Promise((resolve) => response.once("close", resolve)), ]); const body = await bodyPromise; let value = { url: response.url, - statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, + statusCode: response.fromCache + ? revalidate.statusCode + : response.statusCode, body, cachePolicy: response.cachePolicy.toObject(), }; - let ttl = options_.strictTtl ? response.cachePolicy.timeToLive() : undefined; + let ttl = options_.strictTtl + ? response.cachePolicy.timeToLive() + : undefined; if (options_.maxTtl) { ttl = ttl ? Math.min(ttl, options_.maxTtl) : options_.maxTtl; } if (this.hooks.size > 0) { - /* eslint-disable no-await-in-loop */ for (const key_ of this.hooks.keys()) { value = await this.runHook(key_, value, response); } - /* eslint-enable no-await-in-loop */ } await this.cache.set(key, value, ttl); + /* c8 ignore next -- @preserve */ } catch (error) { - ee.emit('error', new types_CacheError(error)); + /* c8 ignore next -- @preserve */ + ee.emit("error", new types_CacheError(error)); + /* c8 ignore next -- @preserve */ } })(); } @@ -40017,50 +40480,63 @@ class CacheableRequest { (async () => { try { await this.cache.delete(key); + /* c8 ignore next -- @preserve */ } catch (error) { - ee.emit('error', new types_CacheError(error)); + /* c8 ignore next -- @preserve */ + ee.emit("error", new types_CacheError(error)); + /* c8 ignore next -- @preserve */ } })(); } - ee.emit('response', clonedResponse ?? response); - if (typeof callback === 'function') { + ee.emit("response", clonedResponse ?? response); + if (typeof callback === "function") { callback(clonedResponse ?? response); } }; try { const request_ = this.cacheRequest(options_, handler); - request_.once('error', requestErrorCallback); - request_.once('abort', requestErrorCallback); - request_.once('destroy', requestErrorCallback); - ee.emit('request', request_); + request_.once("error", requestErrorCallback); + request_.once("abort", requestErrorCallback); + request_.once("destroy", requestErrorCallback); + ee.emit("request", request_); } catch (error) { - ee.emit('error', new types_RequestError(error)); + ee.emit("error", new types_RequestError(error)); } }; (async () => { const get = async (options_) => { await Promise.resolve(); - const cacheEntry = options_.cache ? await this.cache.get(key) : undefined; + const cacheEntry = options_.cache + ? await this.cache.get(key) + : undefined; if (cacheEntry === undefined && !options_.forceRefresh) { makeRequest(options_); return; } const policy = http_cache_semantics.fromObject(cacheEntry.cachePolicy); - if (policy.satisfiesWithoutRevalidation(options_) && !options_.forceRefresh) { + if (policy.satisfiesWithoutRevalidation(options_) && + !options_.forceRefresh) { const headers = convertHeaders(policy.responseHeaders()); + const bodyBuffer = cacheEntry.body; + const body = Buffer.from(bodyBuffer); const response = new Response({ - statusCode: cacheEntry.statusCode, headers, body: cacheEntry.body, url: cacheEntry.url, + statusCode: cacheEntry.statusCode, + headers, + body, + url: cacheEntry.url, }); response.cachePolicy = policy; response.fromCache = true; - ee.emit('response', response); - if (typeof callback === 'function') { + ee.emit("response", response); + if (typeof callback === "function") { callback(response); } } - else if (policy.satisfiesWithoutRevalidation(options_) && Date.now() >= policy.timeToLive() && options_.forceRefresh) { + else if (policy.satisfiesWithoutRevalidation(options_) && + Date.now() >= policy.timeToLive() && + options_.forceRefresh) { await this.cache.delete(key); options_.headers = policy.revalidationHeaders(options_); makeRequest(options_); @@ -40071,21 +40547,26 @@ class CacheableRequest { makeRequest(options_); } }; - const errorHandler = (error) => ee.emit('error', new types_CacheError(error)); - if (this.cache instanceof src) { + const errorHandler = (error) => ee.emit("error", new types_CacheError(error)); + if (this.cache instanceof Keyv) { const cachek = this.cache; - cachek.once('error', errorHandler); - ee.on('error', () => cachek.removeListener('error', errorHandler)); - ee.on('response', () => cachek.removeListener('error', errorHandler)); + cachek.once("error", errorHandler); + ee.on("error", () => { + cachek.removeListener("error", errorHandler); + }); + ee.on("response", () => { + cachek.removeListener("error", errorHandler); + }); } try { await get(options); } catch (error) { + /* v8 ignore next -- @preserve */ if (options.automaticFailover && !madeRequest) { makeRequest(options); } - ee.emit('error', new types_CacheError(error)); + ee.emit("error", new types_CacheError(error)); } })(); return ee; @@ -40098,20 +40579,16 @@ class CacheableRequest { this.removeHook = (name) => this.hooks.delete(name); this.getHook = (name) => this.hooks.get(name); this.runHook = async (name, ...arguments_) => this.hooks.get(name)?.(...arguments_); - if (cacheAdapter instanceof src) { - this.cache = cacheAdapter; - } - else if (typeof cacheAdapter === 'string') { - this.cache = new src({ - uri: cacheAdapter, - namespace: 'cacheable-request', - }); - } - else { - this.cache = new src({ - store: cacheAdapter, - namespace: 'cacheable-request', - }); + if (cacheAdapter) { + if (cacheAdapter instanceof Keyv) { + this.cache = cacheAdapter; + } + else { + this.cache = new Keyv({ + store: cacheAdapter, + namespace: "cacheable-request", + }); + } } this.request = this.request.bind(this); this.cacheRequest = cacheRequest; @@ -40125,7 +40602,7 @@ const cloneResponse = (response) => { }; const urlObjectToRequestOptions = (url) => { const options = { ...url }; - options.path = `${url.pathname || '/'}${url.search || ''}`; + options.path = `${url.pathname || "/"}${url.search || ""}`; delete options.pathname; delete options.search; return options; @@ -40141,7 +40618,7 @@ const normalizeUrlObject = (url) => ({ protocol: url.protocol, auth: url.auth, - hostname: url.hostname || url.host || 'localhost', + hostname: url.hostname || url.host || "localhost", port: url.port, pathname: url.pathname, search: url.search, @@ -40153,12 +40630,123 @@ const convertHeaders = (headers) => { } return result; }; +const parseWithWhatwg = (raw) => { + const u = new external_node_url_namespaceObject.URL(raw); + // If normalizeUrlObject expects the same fields as url.parse() + return { + protocol: u.protocol, // E.g. 'https:' + slashes: true, // Always true for WHATWG URLs + /* c8 ignore next 3 */ + auth: u.username || u.password ? `${u.username}:${u.password}` : undefined, + host: u.host, // E.g. 'example.com:8080' + port: u.port, // E.g. '8080' + hostname: u.hostname, // E.g. 'example.com' + hash: u.hash, // E.g. '#quux' + search: u.search, // E.g. '?bar=baz' + query: Object.fromEntries(u.searchParams), // { bar: 'baz' } + pathname: u.pathname, // E.g. '/foo' + path: u.pathname + u.search, // '/foo?bar=baz' + href: u.href, // Full serialized URL + }; +}; /* harmony default export */ const dist = (CacheableRequest); -const onResponse = 'onResponse'; +const onResponse = "onResponse"; //# sourceMappingURL=index.js.map -// EXTERNAL MODULE: ./node_modules/decompress-response/index.js -var decompress_response = __nccwpck_require__(1373); +;// CONCATENATED MODULE: external "node:zlib" +const external_node_zlib_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); +;// CONCATENATED MODULE: ./node_modules/decompress-response/index.js + + + + +// Detect zstd support (available in Node.js >= 22.15.0) +const supportsZstd = typeof external_node_zlib_namespaceObject.createZstdDecompress === 'function'; + +function decompressResponse(response) { + const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); + const supportedEncodings = ['gzip', 'deflate', 'br']; + if (supportsZstd) { + supportedEncodings.push('zstd'); + } + + if (!supportedEncodings.includes(contentEncoding)) { + return response; + } + + let isEmpty = true; + + // Clone headers to avoid modifying the original response headers + const headers = {...response.headers}; + + const finalStream = new external_node_stream_.PassThrough({ + autoDestroy: false, + }); + + // Only destroy response on error, not on normal completion + finalStream.once('error', () => { + response.destroy(); + }); + + function handleContentEncoding(data) { + let decompressStream; + + if (contentEncoding === 'zstd') { + decompressStream = external_node_zlib_namespaceObject.createZstdDecompress(); + } else if (contentEncoding === 'br') { + decompressStream = external_node_zlib_namespaceObject.createBrotliDecompress(); + } else if (contentEncoding === 'deflate' && data.length > 0 && (data[0] & 0x08) === 0) { // eslint-disable-line no-bitwise + decompressStream = external_node_zlib_namespaceObject.createInflateRaw(); + } else { + decompressStream = external_node_zlib_namespaceObject.createUnzip(); + } + + decompressStream.once('error', error => { + if (isEmpty && !response.readable) { + finalStream.end(); + return; + } + + finalStream.destroy(error); + }); + + checker.pipe(decompressStream).pipe(finalStream); + } + + const checker = new external_node_stream_.Transform({ + transform(data, _encoding, callback) { + if (isEmpty === false) { + callback(null, data); + return; + } + + isEmpty = false; + + handleContentEncoding(data); + + callback(null, data); + }, + + flush(callback) { + if (isEmpty) { + finalStream.end(); + } + + callback(); + }, + }); + + delete headers['content-encoding']; + delete headers['content-length']; + finalStream.headers = headers; + + mimicResponse(response, finalStream); + + response.pipe(checker); + + return finalStream; +} + ;// CONCATENATED MODULE: ./node_modules/form-data-encoder/lib/index.js var __typeError = (msg) => { throw TypeError(msg); @@ -40506,6 +41094,216 @@ getContentLength_fn = function() { // EXTERNAL MODULE: external "node:util" var external_node_util_ = __nccwpck_require__(7975); +;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/defer-to-connect.js +function isTlsSocket(socket) { + return 'encrypted' in socket; +} +const deferToConnect = (socket, fn) => { + let listeners; + if (typeof fn === 'function') { + const connect = fn; + listeners = { connect }; + } + else { + listeners = fn; + } + const hasConnectListener = typeof listeners.connect === 'function'; + const hasSecureConnectListener = typeof listeners.secureConnect === 'function'; + const hasCloseListener = typeof listeners.close === 'function'; + const onConnect = () => { + if (hasConnectListener) { + listeners.connect(); + } + if (isTlsSocket(socket) && hasSecureConnectListener) { + if (socket.authorized) { + listeners.secureConnect(); + } + else { + // Wait for secureConnect event (even if authorization fails, we need the timing) + socket.once('secureConnect', listeners.secureConnect); + } + } + if (hasCloseListener) { + socket.once('close', listeners.close); + } + }; + if (socket.writable && !socket.connecting) { + onConnect(); + } + else if (socket.connecting) { + socket.once('connect', onConnect); + } + else if (socket.destroyed && hasCloseListener) { + const hadError = '_hadError' in socket ? Boolean(socket._hadError) : false; + listeners.close(hadError); + } +}; +/* harmony default export */ const defer_to_connect = (deferToConnect); + +;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/timer.js + + + +const timer = (request) => { + if (request.timings) { + return request.timings; + } + const timings = { + start: Date.now(), + socket: undefined, + lookup: undefined, + connect: undefined, + secureConnect: undefined, + upload: undefined, + response: undefined, + end: undefined, + error: undefined, + abort: undefined, + phases: { + wait: undefined, + dns: undefined, + tcp: undefined, + tls: undefined, + request: undefined, + firstByte: undefined, + download: undefined, + total: undefined, + }, + }; + request.timings = timings; + const handleError = (origin) => { + origin.once(external_node_events_.errorMonitor, () => { + timings.error = Date.now(); + timings.phases.total = timings.error - timings.start; + }); + }; + handleError(request); + const onAbort = () => { + timings.abort = Date.now(); + timings.phases.total = timings.abort - timings.start; + }; + request.prependOnceListener('abort', onAbort); + const onSocket = (socket) => { + timings.socket = Date.now(); + timings.phases.wait = timings.socket - timings.start; + if (external_node_util_.types.isProxy(socket)) { + // HTTP/2: The socket is a proxy, so connection events won't fire. + // We can't measure connection timings, so leave them undefined. + // This prevents NaN in phases.request calculation. + return; + } + // Check if socket is already connected (reused from connection pool) + const socketAlreadyConnected = socket.writable && !socket.connecting; + if (socketAlreadyConnected) { + // Socket reuse detected: the socket was already connected from a previous request. + // For reused sockets, set all connection timestamps to socket time since no new + // connection was made for THIS request. But preserve phase durations from the + // original connection so they're not lost. + timings.lookup = timings.socket; + timings.connect = timings.socket; + if (socket.__initial_connection_timings__) { + // Restore the phase timings from the initial connection + timings.phases.dns = socket.__initial_connection_timings__.dnsPhase; + timings.phases.tcp = socket.__initial_connection_timings__.tcpPhase; + timings.phases.tls = socket.__initial_connection_timings__.tlsPhase; + // Set secureConnect timestamp if there was TLS + if (timings.phases.tls !== undefined) { + timings.secureConnect = timings.socket; + } + } + else { + // Socket reused but no initial timings stored (e.g., from external code) + // Set phases to 0 + timings.phases.dns = 0; + timings.phases.tcp = 0; + } + return; + } + const lookupListener = () => { + timings.lookup = Date.now(); + timings.phases.dns = timings.lookup - timings.socket; + }; + socket.prependOnceListener('lookup', lookupListener); + defer_to_connect(socket, { + connect() { + timings.connect = Date.now(); + if (timings.lookup === undefined) { + // No DNS lookup occurred (e.g., connecting to an IP address directly) + // Set lookup to socket time (no time elapsed for DNS) + socket.removeListener('lookup', lookupListener); + timings.lookup = timings.socket; + timings.phases.dns = 0; + } + timings.phases.tcp = timings.connect - timings.lookup; + // If lookup and connect happen at the EXACT same time (tcp = 0), + // DNS was served from cache and the dns value is just event loop overhead. + // Set dns to 0 to indicate no actual DNS resolution occurred. + // Fixes https://github.com/szmarczak/http-timer/issues/35 + if (timings.phases.tcp === 0 && timings.phases.dns && timings.phases.dns > 0) { + timings.phases.dns = 0; + } + // Store connection phase timings on socket for potential reuse + if (!socket.__initial_connection_timings__) { + socket.__initial_connection_timings__ = { + dnsPhase: timings.phases.dns, + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TypeScript can't prove this is defined due to callback structure + tcpPhase: timings.phases.tcp, + }; + } + }, + secureConnect() { + timings.secureConnect = Date.now(); + timings.phases.tls = timings.secureConnect - timings.connect; + // Update stored timings with TLS phase timing + if (socket.__initial_connection_timings__) { + socket.__initial_connection_timings__.tlsPhase = timings.phases.tls; + } + }, + }); + }; + if (request.socket) { + onSocket(request.socket); + } + else { + request.prependOnceListener('socket', onSocket); + } + const onUpload = () => { + timings.upload = Date.now(); + // Calculate request phase if we have connection timings + const secureOrConnect = timings.secureConnect ?? timings.connect; + if (secureOrConnect !== undefined) { + timings.phases.request = timings.upload - secureOrConnect; + } + // If both are undefined (HTTP/2), phases.request stays undefined (not NaN) + }; + if (request.writableFinished) { + onUpload(); + } + else { + request.prependOnceListener('finish', onUpload); + } + request.prependOnceListener('response', (response) => { + timings.response = Date.now(); + timings.phases.firstByte = timings.response - timings.upload; + response.timings = timings; + handleError(response); + response.prependOnceListener('end', () => { + request.off('abort', onAbort); + response.off('aborted', onAbort); + if (timings.phases.total !== undefined) { + // Aborted or errored + return; + } + timings.end = Date.now(); + timings.phases.download = timings.end - timings.response; + timings.phases.total = timings.end - timings.start; + }); + response.prependOnceListener('aborted', onAbort); + }); + return timings; +}; +/* harmony default export */ const utils_timer = (timer); + ;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/is-form-data.js function is_form_data_isFormData(body) { @@ -40516,7 +41314,6 @@ function is_form_data_isFormData(body) { - async function getBodySize(body, headers) { if (headers && 'content-length' in headers) { return Number(headers['content-length']); @@ -40525,13 +41322,29 @@ async function getBodySize(body, headers) { return 0; } if (distribution.string(body)) { - return external_node_buffer_namespaceObject.Buffer.byteLength(body); + return new TextEncoder().encode(body).byteLength; } if (distribution.buffer(body)) { return body.length; } + if (distribution.typedArray(body)) { + return body.byteLength; + } if (is_form_data_isFormData(body)) { - return (0,external_node_util_.promisify)(body.getLength.bind(body))(); + try { + return await (0,external_node_util_.promisify)(body.getLength.bind(body))(); + } + catch (error) { + const typedError = error; + throw new Error('Cannot determine content-length for form-data with stream(s) of unknown length. ' + + 'This is a limitation of the `form-data` package. ' + + 'To fix this, either:\n' + + '1. Use the `knownLength` option when appending streams:\n' + + ' form.append(\'file\', stream, {knownLength: 12345});\n' + + '2. Switch to spec-compliant FormData (formdata-node package)\n' + + 'See: https://github.com/form-data/form-data#alternative-submission-methods\n' + + `Original error: ${typedError.message}`); + } } return undefined; } @@ -40584,12 +41397,11 @@ const reentry = Symbol('reentry'); const timed_out_noop = () => { }; class timed_out_TimeoutError extends Error { event; - code; + name = 'TimeoutError'; + code = 'ETIMEDOUT'; constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.event = event; - this.name = 'TimeoutError'; - this.code = 'ETIMEDOUT'; } } function timedOut(request, delays, options) { @@ -40742,12 +41554,8 @@ function urlToOptions(url) { ;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/utils/weakable-map.js class WeakableMap { - weakMap; - map; - constructor() { - this.weakMap = new WeakMap(); - this.map = new Map(); - } + weakMap = new WeakMap(); + map = new Map(); set(key, value) { if (typeof key === 'object') { this.weakMap.set(key, value); @@ -41258,7 +42066,7 @@ class CacheableLookup { } // EXTERNAL MODULE: ./node_modules/http2-wrapper/source/index.js -var http2_wrapper_source = __nccwpck_require__(4956); +var source = __nccwpck_require__(4956); ;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/parse-link-header.js function parseLinkHeader(link) { const parsed = []; @@ -41308,11 +42116,43 @@ function parseLinkHeader(link) { const [major, minor] = external_node_process_namespaceObject.versions.node.split('.').map(Number); +/** +Generic helper that wraps any assertion function to add context to error messages. +*/ +function wrapAssertionWithContext(optionName, assertionFn) { + try { + assertionFn(); + } + catch (error) { + if (error instanceof Error) { + error.message = `Option '${optionName}': ${error.message}`; + } + throw error; + } +} +/** +Helper function that wraps assert.any() to provide better error messages. +When assertion fails, it includes the option name in the error message. +*/ +function options_assertAny(optionName, validators, value) { + wrapAssertionWithContext(optionName, () => { + assert.any(validators, value); + }); +} +/** +Helper function that wraps assert.plainObject() to provide better error messages. +When assertion fails, it includes the option name in the error message. +*/ +function options_assertPlainObject(optionName, value) { + wrapAssertionWithContext(optionName, () => { + assert.plainObject(value); + }); +} function validateSearchParameters(searchParameters) { // eslint-disable-next-line guard-for-in for (const key in searchParameters) { const value = searchParameters[key]; - assert.any([distribution.string, distribution.number, distribution.boolean, distribution.null, distribution.undefined], value); + options_assertAny(`searchParams.${key}`, [distribution.string, distribution.number, distribution.boolean, distribution.null, distribution.undefined], value); } } const globalCache = new Map(); @@ -41324,6 +42164,39 @@ const getGlobalDnsCache = () => { globalDnsCache = new CacheableLookup(); return globalDnsCache; }; +// Detects and wraps QuickLRU v7+ instances to make them compatible with the StorageAdapter interface +const wrapQuickLruIfNeeded = (value) => { + // Check if this is QuickLRU v7+ using Symbol.toStringTag and the evict method (added in v7) + if (value?.[Symbol.toStringTag] === 'QuickLRU' && typeof value.evict === 'function') { + // QuickLRU v7+ uses set(key, value, {maxAge: number}) but StorageAdapter expects set(key, value, ttl) + // Wrap it to translate the interface + return { + get(key) { + return value.get(key); + }, + set(key, cacheValue, ttl) { + if (ttl === undefined) { + value.set(key, cacheValue); + } + else { + value.set(key, cacheValue, { maxAge: ttl }); + } + return true; + }, + delete(key) { + return value.delete(key); + }, + clear() { + return value.clear(); + }, + has(key) { + return value.has(key); + }, + }; + } + // QuickLRU v5 and other caches work as-is + return value; +}; const defaultInternals = { request: undefined, agent: { @@ -41359,6 +42232,7 @@ const defaultInternals = { beforeError: [], beforeRedirect: [], beforeRetry: [], + beforeCache: [], afterResponse: [], }, followRedirect: true, @@ -41369,6 +42243,7 @@ const defaultInternals = { password: '', http2: false, allowGetBody: false, + copyPipedHeaders: true, headers: { 'user-agent': 'got (https://github.com/sindresorhus/got)', }, @@ -41412,6 +42287,8 @@ const defaultInternals = { calculateDelay: ({ computedValue }) => computedValue, backoffLimit: Number.POSITIVE_INFINITY, noise: 100, + // TODO: Change default to `true` in the next major version to fix https://github.com/sindresorhus/got/issues/2243 + enforceRetryRules: false, }, localAddress: undefined, method: 'GET', @@ -41426,6 +42303,7 @@ const defaultInternals = { alpnProtocols: undefined, rejectUnauthorized: undefined, checkServerIdentity: undefined, + serverName: undefined, certificateAuthority: undefined, key: undefined, certificate: undefined, @@ -41440,6 +42318,7 @@ const defaultInternals = { dhparam: undefined, ecdhCurve: undefined, certificateRevocationLists: undefined, + secureOptions: undefined, }, encoding: undefined, resolveBodyOnly: false, @@ -41478,6 +42357,7 @@ const defaultInternals = { maxHeaderSize: undefined, signal: undefined, enableUnixSockets: false, + strictContentLength: false, }; const cloneInternals = (internals) => { const { hooks, retry } = internals; @@ -41501,14 +42381,12 @@ const cloneInternals = (internals) => { beforeError: [...hooks.beforeError], beforeRedirect: [...hooks.beforeRedirect], beforeRetry: [...hooks.beforeRetry], + beforeCache: [...hooks.beforeCache], afterResponse: [...hooks.afterResponse], }, searchParams: internals.searchParams ? new URLSearchParams(internals.searchParams) : undefined, pagination: { ...internals.pagination }, }; - if (result.url !== undefined) { - result.prefixUrl = ''; - } return result; }; const cloneRaw = (raw) => { @@ -41566,11 +42444,24 @@ const cloneRaw = (raw) => { if (distribution.array(hooks.beforeRetry)) { result.hooks.beforeRetry = [...hooks.beforeRetry]; } + if (distribution.array(hooks.beforeCache)) { + result.hooks.beforeCache = [...hooks.beforeCache]; + } if (distribution.array(hooks.afterResponse)) { result.hooks.afterResponse = [...hooks.afterResponse]; } } - // TODO: raw.searchParams + if (raw.searchParams) { + if (distribution.string(raw.searchParams)) { + result.searchParams = raw.searchParams; + } + else if (raw.searchParams instanceof URLSearchParams) { + result.searchParams = new URLSearchParams(raw.searchParams); + } + else if (distribution.object(raw.searchParams)) { + result.searchParams = { ...raw.searchParams }; + } + } if (distribution.object(raw.pagination)) { result.pagination = { ...raw.pagination }; } @@ -41594,19 +42485,17 @@ const init = (options, withOptions, self) => { class Options { _unixOptions; _internals; - _merging; + _merging = false; _init; constructor(input, options, defaults) { - assert.any([distribution.string, distribution.urlInstance, distribution.object, distribution.undefined], input); - assert.any([distribution.object, distribution.undefined], options); - assert.any([distribution.object, distribution.undefined], defaults); + options_assertAny('input', [distribution.string, distribution.urlInstance, distribution.object, distribution.undefined], input); + options_assertAny('options', [distribution.object, distribution.undefined], options); + options_assertAny('defaults', [distribution.object, distribution.undefined], defaults); if (input instanceof Options || options instanceof Options) { throw new TypeError('The defaults must be passed as the third argument'); } this._internals = cloneInternals(defaults?._internals ?? defaults ?? defaultInternals); this._init = [...(defaults?._init ?? [])]; - this._merging = false; - this._unixOptions = undefined; // This rule allows `finally` to be considered more important. // Meaning no matter the error thrown in the `try` block, // if `finally` throws then the `finally` error will be thrown. @@ -41683,6 +42572,10 @@ class Options { if (key === 'url') { continue; } + // Never merge `preserveHooks` - it's a control flag, not a persistent option + if (key === 'preserveHooks') { + continue; + } if (!(key in this)) { throw new Error(`Unexpected option: ${key}`); } @@ -41713,7 +42606,7 @@ class Options { return this._internals.request; } set request(value) { - assert.any([distribution.function, distribution.undefined], value); + options_assertAny('request', [distribution.function, distribution.undefined], value); this._internals.request = value; } /** @@ -41742,14 +42635,14 @@ class Options { return this._internals.agent; } set agent(value) { - assert.plainObject(value); + options_assertPlainObject('agent', value); // eslint-disable-next-line guard-for-in for (const key in value) { if (!(key in this._internals.agent)) { throw new TypeError(`Unexpected agent option: ${key}`); } // @ts-expect-error - No idea why `value[key]` doesn't work here. - assert.any([distribution.object, distribution.undefined], value[key]); + options_assertAny(`agent.${key}`, [distribution.object, distribution.undefined, (v) => v === false], value[key]); } if (this._merging) { Object.assign(this._internals.agent, value); @@ -41802,14 +42695,14 @@ class Options { return this._internals.timeout; } set timeout(value) { - assert.plainObject(value); + options_assertPlainObject('timeout', value); // eslint-disable-next-line guard-for-in for (const key in value) { if (!(key in this._internals.timeout)) { throw new Error(`Unexpected timeout option: ${key}`); } // @ts-expect-error - No idea why `value[key]` doesn't work here. - assert.any([distribution.number, distribution.undefined], value[key]); + options_assertAny(`timeout.${key}`, [distribution.number, distribution.undefined], value[key]); } if (this._merging) { Object.assign(this._internals.timeout, value); @@ -41863,7 +42756,7 @@ class Options { return this._internals.prefixUrl; } set prefixUrl(value) { - assert.any([distribution.string, distribution.urlInstance], value); + options_assertAny('prefixUrl', [distribution.string, distribution.urlInstance], value); if (value === '') { this._internals.prefixUrl = ''; return; @@ -41887,15 +42780,32 @@ class Options { __Note #4__: This option is not enumerable and will not be merged with the instance defaults. - The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`. + The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / typed array ([`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), etc.) / [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`. Since Got 12, the `content-length` is not automatically set when `body` is a `fs.createReadStream`. + + You can use `Iterable` and `AsyncIterable` objects as request body, including Web [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream): + + @example + ``` + import got from 'got'; + + // Using an async generator + async function* generateData() { + yield 'Hello, '; + yield 'world!'; + } + + await got.post('https://httpbin.org/anything', { + body: generateData() + }); + ``` */ get body() { return this._internals.body; } set body(value) { - assert.any([distribution.string, distribution.buffer, distribution.nodeStream, distribution.generator, distribution.asyncGenerator, lib_isFormData, distribution.undefined], value); + options_assertAny('body', [distribution.string, distribution.buffer, distribution.nodeStream, distribution.generator, distribution.asyncGenerator, distribution.iterable, distribution.asyncIterable, lib_isFormData, distribution.typedArray, distribution.undefined], value); if (distribution.nodeStream(value)) { assert.truthy(value.readable); } @@ -41918,7 +42828,7 @@ class Options { return this._internals.form; } set form(value) { - assert.any([distribution.plainObject, distribution.undefined], value); + options_assertAny('form', [distribution.plainObject, distribution.undefined], value); if (value !== undefined) { assert.undefined(this._internals.body); assert.undefined(this._internals.json); @@ -41926,7 +42836,9 @@ class Options { this._internals.form = value; } /** - JSON body. If the `Content-Type` header is not set, it will be set to `application/json`. + JSON request body. If the `content-type` header is not set, it will be set to `application/json`. + + __Important__: This option only affects the request body you send to the server. To parse the response as JSON, you must either call `.json()` on the promise or set `responseType: 'json'` in the options. __Note #1__: If you provide this option, `got.stream()` will be read-only. @@ -41964,7 +42876,7 @@ class Options { return this._internals.url; } set url(value) { - assert.any([distribution.string, distribution.urlInstance, distribution.undefined], value); + options_assertAny('url', [distribution.string, distribution.urlInstance, distribution.undefined], value); if (value === undefined) { this._internals.url = undefined; return; @@ -41972,7 +42884,11 @@ class Options { if (distribution.string(value) && value.startsWith('/')) { throw new Error('`url` must not start with a slash'); } - const urlString = `${this.prefixUrl}${value.toString()}`; + // Detect if URL is already absolute (has a protocol/scheme) + const valueString = value.toString(); + const isAbsolute = distribution.urlInstance(value) || /^[a-z][a-z\d+.-]*:\/\//i.test(valueString); + // Only concatenate prefixUrl if the URL is relative + const urlString = isAbsolute ? valueString : `${this.prefixUrl}${valueString}`; const url = new URL(urlString); this._internals.url = url; if (url.protocol === 'unix:') { @@ -42024,7 +42940,7 @@ class Options { return this._internals.cookieJar; } set cookieJar(value) { - assert.any([distribution.object, distribution.undefined], value); + options_assertAny('cookieJar', [distribution.object, distribution.undefined], value); if (value === undefined) { this._internals.cookieJar = undefined; return; @@ -42111,7 +43027,7 @@ class Options { return this._internals.searchParams; } set searchParams(value) { - assert.any([distribution.string, distribution.object, distribution.undefined], value); + options_assertAny('searchParams', [distribution.string, distribution.object, distribution.undefined], value); const url = this._internals.url; if (value === undefined) { this._internals.searchParams = undefined; @@ -42171,7 +43087,7 @@ class Options { return this._internals.dnsLookup; } set dnsLookup(value) { - assert.any([distribution.function, distribution.undefined], value); + options_assertAny('dnsLookup', [distribution.function, distribution.undefined], value); this._internals.dnsLookup = value; } /** @@ -42188,7 +43104,7 @@ class Options { return this._internals.dnsCache; } set dnsCache(value) { - assert.any([distribution.object, distribution.boolean, distribution.undefined], value); + options_assertAny('dnsCache', [distribution.object, distribution.boolean, distribution.undefined], value); if (value === true) { this._internals.dnsCache = getGlobalDnsCache(); } @@ -42258,7 +43174,7 @@ class Options { } const typedKnownHookEvent = knownHookEvent; const hooks = value[typedKnownHookEvent]; - assert.any([distribution.array, distribution.undefined], hooks); + options_assertAny(`hooks.${knownHookEvent}`, [distribution.array, distribution.undefined], hooks); if (hooks) { for (const hook of hooks) { assert.function(hook); @@ -42293,7 +43209,7 @@ class Options { return this._internals.followRedirect; } set followRedirect(value) { - assert.any([distribution.boolean, distribution.function], value); + options_assertAny('followRedirect', [distribution.boolean, distribution.function], value); this._internals.followRedirect = value; } get followRedirects() { @@ -42323,7 +43239,7 @@ class Options { return this._internals.cache; } set cache(value) { - assert.any([distribution.object, distribution.string, distribution.boolean, distribution.undefined], value); + options_assertAny('cache', [distribution.object, distribution.string, distribution.boolean, distribution.undefined], value); if (value === true) { this._internals.cache = globalCache; } @@ -42331,7 +43247,7 @@ class Options { this._internals.cache = undefined; } else { - this._internals.cache = value; + this._internals.cache = wrapQuickLruIfNeeded(value); } } /** @@ -42426,6 +43342,62 @@ class Options { this._internals.allowGetBody = value; } /** + Automatically copy headers from piped streams. + + When piping a request into a Got stream (e.g., `request.pipe(got.stream(url))`), this controls whether headers from the source stream are automatically merged into the Got request headers. + + Note: Piped headers overwrite any explicitly set headers with the same name. To override this, either set `copyPipedHeaders` to `false` and manually copy safe headers, or use a `beforeRequest` hook to force specific header values after piping. + + Useful for proxy scenarios, but you may want to disable this to filter out headers like `Host`, `Connection`, `Authorization`, etc. + + @default true + + @example + ``` + import got from 'got'; + import {pipeline} from 'node:stream/promises'; + + // Disable automatic header copying and manually copy only safe headers + server.get('/proxy', async (request, response) => { + const gotStream = got.stream('https://example.com', { + copyPipedHeaders: false, + headers: { + 'user-agent': request.headers['user-agent'], + 'accept': request.headers['accept'], + // Explicitly NOT copying host, connection, authorization, etc. + } + }); + + await pipeline(request, gotStream, response); + }); + ``` + + @example + ``` + import got from 'got'; + + // Override piped headers using beforeRequest hook + const gotStream = got.stream('https://example.com', { + hooks: { + beforeRequest: [ + options => { + // Force specific header values after piping + options.headers.host = 'example.com'; + delete options.headers.authorization; + } + ] + } + }); + ``` + */ + get copyPipedHeaders() { + return this._internals.copyPipedHeaders; + } + set copyPipedHeaders(value) { + assert.boolean(value); + this._internals.copyPipedHeaders = value; + } + /** Request headers. Existing headers will be overwritten. Headers set to `undefined` will be omitted. @@ -42436,7 +43408,7 @@ class Options { return this._internals.headers; } set headers(value) { - assert.plainObject(value); + options_assertPlainObject('headers', value); if (this._merging) { Object.assign(this._internals.headers, lowercase_keys_lowercaseKeys(value)); } @@ -42558,6 +43530,10 @@ class Options { The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value. The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry). + The `enforceRetryRules` property is a `boolean` that, when set to `true`, enforces the `limit`, `methods`, `statusCodes`, and `errorCodes` options before calling `calculateDelay`. Your `calculateDelay` function is only invoked when a retry is allowed based on these criteria. When `false` (default), `calculateDelay` receives the computed value but can override all retry logic. + + __Note:__ When `enforceRetryRules` is `false`, you must check `computedValue` in your `calculateDelay` function to respect the default retry logic. When `true`, the retry rules are enforced automatically. + By default, it retries *only* on the specified methods, status codes, and on these network errors: - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached. @@ -42576,14 +43552,15 @@ class Options { return this._internals.retry; } set retry(value) { - assert.plainObject(value); - assert.any([distribution.function, distribution.undefined], value.calculateDelay); - assert.any([distribution.number, distribution.undefined], value.maxRetryAfter); - assert.any([distribution.number, distribution.undefined], value.limit); - assert.any([distribution.array, distribution.undefined], value.methods); - assert.any([distribution.array, distribution.undefined], value.statusCodes); - assert.any([distribution.array, distribution.undefined], value.errorCodes); - assert.any([distribution.number, distribution.undefined], value.noise); + options_assertPlainObject('retry', value); + options_assertAny('retry.calculateDelay', [distribution.function, distribution.undefined], value.calculateDelay); + options_assertAny('retry.maxRetryAfter', [distribution.number, distribution.undefined], value.maxRetryAfter); + options_assertAny('retry.limit', [distribution.number, distribution.undefined], value.limit); + options_assertAny('retry.methods', [distribution.array, distribution.undefined], value.methods); + options_assertAny('retry.statusCodes', [distribution.array, distribution.undefined], value.statusCodes); + options_assertAny('retry.errorCodes', [distribution.array, distribution.undefined], value.errorCodes); + options_assertAny('retry.noise', [distribution.number, distribution.undefined], value.noise); + options_assertAny('retry.enforceRetryRules', [distribution.boolean, distribution.undefined], value.enforceRetryRules); if (value.noise && Math.abs(value.noise) > 100) { throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`); } @@ -42612,7 +43589,7 @@ class Options { return this._internals.localAddress; } set localAddress(value) { - assert.any([distribution.string, distribution.undefined], value); + options_assertAny('localAddress', [distribution.string, distribution.undefined], value); this._internals.localAddress = value; } /** @@ -42631,7 +43608,7 @@ class Options { return this._internals.createConnection; } set createConnection(value) { - assert.any([distribution.function, distribution.undefined], value); + options_assertAny('createConnection', [distribution.function, distribution.undefined], value); this._internals.createConnection = value; } /** @@ -42643,11 +43620,11 @@ class Options { return this._internals.cacheOptions; } set cacheOptions(value) { - assert.plainObject(value); - assert.any([distribution.boolean, distribution.undefined], value.shared); - assert.any([distribution.number, distribution.undefined], value.cacheHeuristic); - assert.any([distribution.number, distribution.undefined], value.immutableMinTimeToLive); - assert.any([distribution.boolean, distribution.undefined], value.ignoreCargoCult); + options_assertPlainObject('cacheOptions', value); + options_assertAny('cacheOptions.shared', [distribution.boolean, distribution.undefined], value.shared); + options_assertAny('cacheOptions.cacheHeuristic', [distribution.number, distribution.undefined], value.cacheHeuristic); + options_assertAny('cacheOptions.immutableMinTimeToLive', [distribution.number, distribution.undefined], value.immutableMinTimeToLive); + options_assertAny('cacheOptions.ignoreCargoCult', [distribution.boolean, distribution.undefined], value.ignoreCargoCult); for (const key in value) { if (!(key in this._internals.cacheOptions)) { throw new Error(`Cache option \`${key}\` does not exist`); @@ -42667,24 +43644,26 @@ class Options { return this._internals.https; } set https(value) { - assert.plainObject(value); - assert.any([distribution.boolean, distribution.undefined], value.rejectUnauthorized); - assert.any([distribution.function, distribution.undefined], value.checkServerIdentity); - assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificateAuthority); - assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.key); - assert.any([distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificate); - assert.any([distribution.string, distribution.undefined], value.passphrase); - assert.any([distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.pfx); - assert.any([distribution.array, distribution.undefined], value.alpnProtocols); - assert.any([distribution.string, distribution.undefined], value.ciphers); - assert.any([distribution.string, distribution.buffer, distribution.undefined], value.dhparam); - assert.any([distribution.string, distribution.undefined], value.signatureAlgorithms); - assert.any([distribution.string, distribution.undefined], value.minVersion); - assert.any([distribution.string, distribution.undefined], value.maxVersion); - assert.any([distribution.boolean, distribution.undefined], value.honorCipherOrder); - assert.any([distribution.number, distribution.undefined], value.tlsSessionLifetime); - assert.any([distribution.string, distribution.undefined], value.ecdhCurve); - assert.any([distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.certificateRevocationLists); + options_assertPlainObject('https', value); + options_assertAny('https.rejectUnauthorized', [distribution.boolean, distribution.undefined], value.rejectUnauthorized); + options_assertAny('https.checkServerIdentity', [distribution.function, distribution.undefined], value.checkServerIdentity); + options_assertAny('https.serverName', [distribution.string, distribution.undefined], value.serverName); + options_assertAny('https.certificateAuthority', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificateAuthority); + options_assertAny('https.key', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.key); + options_assertAny('https.certificate', [distribution.string, distribution.object, distribution.array, distribution.undefined], value.certificate); + options_assertAny('https.passphrase', [distribution.string, distribution.undefined], value.passphrase); + options_assertAny('https.pfx', [distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.pfx); + options_assertAny('https.alpnProtocols', [distribution.array, distribution.undefined], value.alpnProtocols); + options_assertAny('https.ciphers', [distribution.string, distribution.undefined], value.ciphers); + options_assertAny('https.dhparam', [distribution.string, distribution.buffer, distribution.undefined], value.dhparam); + options_assertAny('https.signatureAlgorithms', [distribution.string, distribution.undefined], value.signatureAlgorithms); + options_assertAny('https.minVersion', [distribution.string, distribution.undefined], value.minVersion); + options_assertAny('https.maxVersion', [distribution.string, distribution.undefined], value.maxVersion); + options_assertAny('https.honorCipherOrder', [distribution.boolean, distribution.undefined], value.honorCipherOrder); + options_assertAny('https.tlsSessionLifetime', [distribution.number, distribution.undefined], value.tlsSessionLifetime); + options_assertAny('https.ecdhCurve', [distribution.string, distribution.undefined], value.ecdhCurve); + options_assertAny('https.certificateRevocationLists', [distribution.string, distribution.buffer, distribution.array, distribution.undefined], value.certificateRevocationLists); + options_assertAny('https.secureOptions', [distribution.number, distribution.undefined], value.secureOptions); for (const key in value) { if (!(key in this._internals.https)) { throw new Error(`HTTPS option \`${key}\` does not exist`); @@ -42714,7 +43693,7 @@ class Options { if (value === null) { throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); } - assert.any([distribution.string, distribution.undefined], value); + options_assertAny('encoding', [distribution.string, distribution.undefined], value); this._internals.encoding = value; } /** @@ -42814,7 +43793,7 @@ class Options { return this._internals.maxHeaderSize; } set maxHeaderSize(value) { - assert.any([distribution.number, distribution.undefined], value); + options_assertAny('maxHeaderSize', [distribution.number, distribution.undefined], value); this._internals.maxHeaderSize = value; } get enableUnixSockets() { @@ -42824,6 +43803,23 @@ class Options { assert.boolean(value); this._internals.enableUnixSockets = value; } + /** + Throw an error if the server response's `content-length` header value doesn't match the number of bytes received. + + This is useful for detecting truncated responses and follows RFC 9112 requirements for message completeness. + + __Note__: Responses without a `content-length` header are not validated. + __Note__: When enabled and validation fails, a `ReadError` with code `ERR_HTTP_CONTENT_LENGTH_MISMATCH` will be thrown. + + @default false + */ + get strictContentLength() { + return this._internals.strictContentLength; + } + set strictContentLength(value) { + assert.boolean(value); + this._internals.strictContentLength = value; + } // eslint-disable-next-line @typescript-eslint/naming-convention toJSON() { return { ...this._internals }; @@ -42836,7 +43832,17 @@ class Options { const url = internals.url; let agent; if (url.protocol === 'https:') { - agent = internals.http2 ? internals.agent : internals.agent.https; + if (internals.http2) { + // Ensure HTTP/2 agent is configured for connection reuse + // If no custom agent.http2 is provided, use the global agent for connection pooling + agent = { + ...internals.agent, + http2: internals.agent.http2 ?? source.globalAgent, + }; + } + else { + agent = internals.agent.https; + } } else { agent = internals.agent.http; @@ -42862,6 +43868,7 @@ class Options { pfx: https.pfx, rejectUnauthorized: https.rejectUnauthorized, checkServerIdentity: https.checkServerIdentity ?? external_node_tls_namespaceObject.checkServerIdentity, + servername: https.serverName, ciphers: https.ciphers, honorCipherOrder: https.honorCipherOrder, minVersion: https.minVersion, @@ -42871,6 +43878,7 @@ class Options { dhparam: https.dhparam, ecdhCurve: https.ecdhCurve, crl: https.certificateRevocationLists, + secureOptions: https.secureOptions, // HTTP options lookup: internals.dnsLookup ?? internals.dnsCache?.lookup, family: internals.dnsLookupIpVersion, @@ -42906,7 +43914,7 @@ class Options { error.code = 'EUNSUPPORTED'; throw error; } - return http2_wrapper_source.auto; + return source.auto; } return external_node_https_namespaceObject.request; } @@ -42948,11 +43956,11 @@ An error to be thrown when server response code is 2xx, and parsing body fails. Includes a `response` property. */ class ParseError extends errors_RequestError { + name = 'ParseError'; + code = 'ERR_BODY_PARSE_FAILURE'; constructor(error, response) { const { options } = response.request; super(`${error.message} in "${options.url.toString()}"`, error, response.request); - this.name = 'ParseError'; - this.code = 'ERR_BODY_PARSE_FAILURE'; } } const parseBody = (response, responseType, parseJson, encoding) => { @@ -42988,6 +43996,80 @@ function isClientRequest(clientRequest) { function isUnixSocketURL(url) { return url.protocol === 'unix:' || url.hostname === 'unix'; } +/** +Extract the socket path from a UNIX socket URL. + +@example +``` +getUnixSocketPath(new URL('http://unix/foo:/path')); +//=> '/foo' + +getUnixSocketPath(new URL('unix:/foo:/path')); +//=> '/foo' + +getUnixSocketPath(new URL('http://example.com')); +//=> undefined +``` +*/ +function getUnixSocketPath(url) { + if (!isUnixSocketURL(url)) { + return undefined; + } + return /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`)?.groups?.socketPath; +} + +;// CONCATENATED MODULE: external "node:diagnostics_channel" +const external_node_diagnostics_channel_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); +;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/diagnostics-channel.js + + +const channels = { + requestCreate: external_node_diagnostics_channel_namespaceObject.channel('got:request:create'), + requestStart: external_node_diagnostics_channel_namespaceObject.channel('got:request:start'), + responseStart: external_node_diagnostics_channel_namespaceObject.channel('got:response:start'), + responseEnd: external_node_diagnostics_channel_namespaceObject.channel('got:response:end'), + retry: external_node_diagnostics_channel_namespaceObject.channel('got:request:retry'), + error: external_node_diagnostics_channel_namespaceObject.channel('got:request:error'), + redirect: external_node_diagnostics_channel_namespaceObject.channel('got:response:redirect'), +}; +function generateRequestId() { + return (0,external_node_crypto_.randomUUID)(); +} +function publishRequestCreate(message) { + if (channels.requestCreate.hasSubscribers) { + channels.requestCreate.publish(message); + } +} +function publishRequestStart(message) { + if (channels.requestStart.hasSubscribers) { + channels.requestStart.publish(message); + } +} +function publishResponseStart(message) { + if (channels.responseStart.hasSubscribers) { + channels.responseStart.publish(message); + } +} +function publishResponseEnd(message) { + if (channels.responseEnd.hasSubscribers) { + channels.responseEnd.publish(message); + } +} +function publishRetry(message) { + if (channels.retry.hasSubscribers) { + channels.retry.publish(message); + } +} +function publishError(message) { + if (channels.error.hasSubscribers) { + channels.error.publish(message); + } +} +function publishRedirect(message) { + if (channels.redirect.hasSubscribers) { + channels.redirect.publish(message); + } +} ;// CONCATENATED MODULE: ./node_modules/got/dist/source/core/index.js @@ -43008,13 +44090,20 @@ function isUnixSocketURL(url) { + + const supportsBrotli = distribution.string(external_node_process_namespaceObject.versions.brotli); +const core_supportsZstd = distribution.string(external_node_process_namespaceObject.versions.zstd); const methodsWithoutBody = new Set(['GET', 'HEAD']); +// Methods that should auto-end streams when no body is provided +const methodsWithoutBodyStream = new Set(['OPTIONS', 'DELETE', 'PATCH']); const cacheableStore = new WeakableMap(); const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); +// Track errors that have been processed by beforeError hooks to preserve custom error types +const errorsProcessedByHooks = new WeakSet(); const proxiedRequestEvents = [ 'socket', 'connect', @@ -43031,27 +44120,30 @@ class Request extends external_node_stream_.Duplex { options; response; requestUrl; - redirectUrls; - retryCount; - _stopRetry; - _downloadedSize; - _uploadedSize; - _stopReading; - _pipedServerResponses; + redirectUrls = []; + retryCount = 0; + _stopReading = false; + _stopRetry = core_noop; + _downloadedSize = 0; + _uploadedSize = 0; + _pipedServerResponses = new Set(); _request; _responseSize; _bodySize; - _unproxyEvents; + _unproxyEvents = core_noop; _isFromCache; - _cannotHaveBody; - _triggerRead; - _cancelTimeouts; - _removeListeners; + _triggerRead = false; + _jobs = []; + _cancelTimeouts = core_noop; + _removeListeners = core_noop; _nativeResponse; - _flushed; - _aborted; + _flushed = false; + _aborted = false; + _expectedContentLength; + _compressedBytesCount; + _requestId = generateRequestId(); // We need this because `this._request` if `undefined` when using cache - _requestInitialized; + _requestInitialized = false; constructor(url, options, defaults) { super({ // Don't destroy immediately, as the error may be emitted on unsuccessful retry @@ -43059,24 +44151,8 @@ class Request extends external_node_stream_.Duplex { // It needs to be zero because we're just proxying the data to another stream highWaterMark: 0, }); - this._downloadedSize = 0; - this._uploadedSize = 0; - this._stopReading = false; - this._pipedServerResponses = new Set(); - this._cannotHaveBody = false; - this._unproxyEvents = core_noop; - this._triggerRead = false; - this._cancelTimeouts = core_noop; - this._removeListeners = core_noop; - this._jobs = []; - this._flushed = false; - this._requestInitialized = false; - this._aborted = false; - this.redirectUrls = []; - this.retryCount = 0; - this._stopRetry = core_noop; this.on('pipe', (source) => { - if (source?.headers) { + if (this.options.copyPipedHeaders && source?.headers) { Object.assign(this.options.headers, source.headers); } }); @@ -43094,6 +44170,12 @@ class Request extends external_node_stream_.Duplex { this.options.url = ''; } this.requestUrl = this.options.url; + // Publish request creation event + publishRequestCreate({ + requestId: this._requestId, + url: this.options.url?.toString() ?? '', + method: this.options.method, + }); } catch (error) { const { options } = error; @@ -43102,7 +44184,18 @@ class Request extends external_node_stream_.Duplex { } this.flush = async () => { this.flush = async () => { }; - this.destroy(error); + // Defer error emission to next tick to allow user to attach error handlers + external_node_process_namespaceObject.nextTick(() => { + // _beforeError requires options to access retry logic and hooks + if (this.options) { + this._beforeError(error); + } + else { + // Options is undefined, skip _beforeError and destroy directly + const requestError = error instanceof errors_RequestError ? error : new errors_RequestError(error.message, error, this); + this.destroy(requestError); + } + }); }; return; } @@ -43213,19 +44306,29 @@ class Request extends external_node_stream_.Duplex { } } const retryOptions = options.retry; - backoff = await retryOptions.calculateDelay({ + const computedValue = calculate_retry_delay({ attemptCount, retryOptions, error: typedError, retryAfter, - computedValue: calculate_retry_delay({ + computedValue: retryOptions.maxRetryAfter ?? options.timeout.request ?? Number.POSITIVE_INFINITY, + }); + // When enforceRetryRules is true, respect the retry rules (limit, methods, statusCodes, errorCodes) + // before calling the user's calculateDelay function. If computedValue is 0 (meaning retry is not allowed + // based on these rules), skip calling calculateDelay entirely. + // When false (default), always call calculateDelay, allowing it to override retry decisions. + if (retryOptions.enforceRetryRules && computedValue === 0) { + backoff = 0; + } + else { + backoff = await retryOptions.calculateDelay({ attemptCount, retryOptions, error: typedError, retryAfter, - computedValue: retryOptions.maxRetryAfter ?? options.timeout.request ?? Number.POSITIVE_INFINITY, - }), - }); + computedValue, + }); + } } catch (error_) { void this._error(new errors_RequestError(error_.message, error_, this)); @@ -43243,6 +44346,8 @@ class Request extends external_node_stream_.Duplex { if (this.destroyed) { return; } + // Capture body BEFORE hooks run to detect reassignment + const bodyBeforeHooks = this.options.body; try { for (const hook of this.options.hooks.beforeRetry) { // eslint-disable-next-line no-await-in-loop @@ -43250,14 +44355,58 @@ class Request extends external_node_stream_.Duplex { } } catch (error_) { - void this._error(new errors_RequestError(error_.message, error, this)); + void this._error(new errors_RequestError(error_.message, error_, this)); return; } // Something forced us to abort the retry if (this.destroyed) { return; } - this.destroy(); + // Preserve stream body reassigned in beforeRetry hooks. + const bodyAfterHooks = this.options.body; + const bodyWasReassigned = bodyBeforeHooks !== bodyAfterHooks; + // Resource cleanup and preservation logic for retry with body reassignment. + // The Promise wrapper (as-promise/index.ts) compares body identity to detect consumed streams, + // so we must preserve the body reference across destroy(). However, destroy() calls _destroy() + // which destroys this.options.body, creating a complex dance of clear/restore operations. + // + // Key constraints: + // 1. If body was reassigned, we must NOT destroy the NEW stream (it will be used for retry) + // 2. If body was reassigned, we MUST destroy the OLD stream to prevent memory leaks + // 3. We must restore the body reference after destroy() for identity checks in promise wrapper + // 4. We cannot use the normal setter after destroy() because it validates stream readability + if (bodyWasReassigned) { + const oldBody = bodyBeforeHooks; + // Temporarily clear body to prevent destroy() from destroying the new stream + this.options.body = undefined; + this.destroy(); + // Clean up the old stream resource if it's a stream and different from new body + // (edge case: if old and new are same stream object, don't destroy it) + if (distribution.nodeStream(oldBody) && oldBody !== bodyAfterHooks) { + oldBody.destroy(); + } + // Restore new body for promise wrapper's identity check + // We bypass the setter because it validates stream.readable (which fails for destroyed request) + // Type assertion is necessary here to access private _internals without exposing internal API + if (distribution.nodeStream(bodyAfterHooks) && (bodyAfterHooks.readableEnded || bodyAfterHooks.destroyed)) { + throw new TypeError('The reassigned stream body must be readable. Ensure you provide a fresh, readable stream in the beforeRetry hook.'); + } + this.options._internals.body = bodyAfterHooks; + } + else { + // Body wasn't reassigned - use normal destroy flow which handles body cleanup + this.destroy(); + // Note: We do NOT restore the body reference here. The stream was destroyed by _destroy() + // and should not be accessed. The promise wrapper will see that body identity hasn't changed + // and will detect it's a consumed stream, which is the correct behavior. + } + // Publish retry event + publishRetry({ + requestId: this._requestId, + retryCount: this.retryCount + 1, + error: typedError, + delay: backoff, + }); this.emit('retry', this.retryCount + 1, error, (updatedOptions) => { const request = new Request(options.url, updatedOptions, options); request.retryCount = this.retryCount + 1; @@ -43348,8 +44497,28 @@ class Request extends external_node_stream_.Duplex { if (this._request) { this._request.destroy(); } - if (error !== null && !distribution.undefined(error) && !(error instanceof errors_RequestError)) { - error = new errors_RequestError(error.message, error, this); + // Workaround: http-timer only sets timings.end when the response emits 'end'. + // When a stream is destroyed before completion, the 'end' event may not fire, + // leaving timings.end undefined. This should ideally be fixed in http-timer + // by listening to the 'close' event, but we handle it here for now. + // Only set timings.end if there was no error or abort (to maintain semantic correctness). + const timings = this._request?.timings; + if (timings && distribution.undefined(timings.end) && !distribution.undefined(timings.response) && distribution.undefined(timings.error) && distribution.undefined(timings.abort)) { + timings.end = Date.now(); + if (distribution.undefined(timings.phases.total)) { + timings.phases.download = timings.end - timings.response; + timings.phases.total = timings.end - timings.start; + } + } + // Preserve custom errors returned by beforeError hooks. + // For other errors, wrap non-RequestError instances for consistency. + if (error !== null && !distribution.undefined(error)) { + const processedByHooks = error instanceof Error && errorsProcessedByHooks.has(error); + if (!processedByHooks && !(error instanceof errors_RequestError)) { + error = error instanceof Error + ? new errors_RequestError(error.message, error, this) + : new errors_RequestError(String(error), {}, this); + } } callback(error); } @@ -43366,6 +44535,22 @@ class Request extends external_node_stream_.Duplex { super.unpipe(destination); return this; } + _checkContentLengthMismatch() { + if (this.options.strictContentLength && this._expectedContentLength !== undefined) { + // Use compressed bytes count when available (for compressed responses), + // otherwise use _downloadedSize (for uncompressed responses) + const actualSize = this._compressedBytesCount ?? this._downloadedSize; + if (actualSize !== this._expectedContentLength) { + this._beforeError(new ReadError({ + message: `Content-Length mismatch: expected ${this._expectedContentLength} bytes, received ${actualSize} bytes`, + name: 'Error', + code: 'ERR_HTTP_CONTENT_LENGTH_MISMATCH', + }, this)); + return true; + } + } + return false; + } async _finalizeBody() { const { options } = this; const { headers } = options; @@ -43374,7 +44559,6 @@ class Request extends external_node_stream_.Duplex { const isJSON = !distribution.undefined(options.json); const isBody = !distribution.undefined(options.body); const cannotHaveBody = methodsWithoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); - this._cannotHaveBody = cannotHaveBody; if (isForm || isJSON || isBody) { if (cannotHaveBody) { throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); @@ -43441,12 +44625,32 @@ class Request extends external_node_stream_.Duplex { const { options } = this; const { url } = options; this._nativeResponse = response; - if (options.decompress) { - response = decompress_response(response); - } const statusCode = response.statusCode; + const { method } = options; + // Skip decompression for responses that must not have bodies per RFC 9110: + // - HEAD responses (any status code) + // - 1xx (Informational): 100, 101, 102, 103, etc. + // - 204 (No Content) + // - 205 (Reset Content) + // - 304 (Not Modified) + const hasNoBody = method === 'HEAD' + || (statusCode >= 100 && statusCode < 200) + || statusCode === 204 + || statusCode === 205 + || statusCode === 304; + if (options.decompress && !hasNoBody) { + // When strictContentLength is enabled, track compressed bytes by listening to + // the native response's data events before decompression + if (options.strictContentLength) { + this._compressedBytesCount = 0; + this._nativeResponse.on('data', (chunk) => { + this._compressedBytesCount += byteLength(chunk); + }); + } + response = decompressResponse(response); + } const typedResponse = response; - typedResponse.statusMessage = typedResponse.statusMessage ?? external_node_http_namespaceObject.STATUS_CODES[statusCode]; + typedResponse.statusMessage = typedResponse.statusMessage || external_node_http_namespaceObject.STATUS_CODES[statusCode]; // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing -- The status message can be empty. typedResponse.url = options.url.toString(); typedResponse.requestUrl = this.requestUrl; typedResponse.redirectUrls = this.redirectUrls; @@ -43458,9 +44662,13 @@ class Request extends external_node_stream_.Duplex { this._isFromCache = typedResponse.isFromCache; this._responseSize = Number(response.headers['content-length']) || undefined; this.response = typedResponse; - response.once('end', () => { - this._responseSize = this._downloadedSize; - this.emit('downloadProgress', this.downloadProgress); + // Publish response start event + publishResponseStart({ + requestId: this._requestId, + url: typedResponse.url, + statusCode, + headers: response.headers, + isFromCache: typedResponse.isFromCache, }); response.once('error', (error) => { this._aborted = true; @@ -43471,13 +44679,15 @@ class Request extends external_node_stream_.Duplex { }); response.once('aborted', () => { this._aborted = true; - this._beforeError(new ReadError({ - name: 'Error', - message: 'The server aborted pending request', - code: 'ECONNRESET', - }, this)); + // Check if there's a content-length mismatch to provide a more specific error + if (!this._checkContentLengthMismatch()) { + this._beforeError(new ReadError({ + name: 'Error', + message: 'The server aborted pending request', + code: 'ECONNRESET', + }, this)); + } }); - this.emit('downloadProgress', this.downloadProgress); const rawCookies = response.headers['set-cookie']; if (distribution.object(options.cookieJar) && rawCookies) { let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); @@ -43516,6 +44726,8 @@ class Request extends external_node_stream_.Duplex { return; } this._request = undefined; + // Reset download progress for the new request + this._downloadedSize = 0; const updatedOptions = new Options(undefined, undefined, this.options); const serverRequestedGet = statusCode === 303 && updatedOptions.method !== 'GET' && updatedOptions.method !== 'HEAD'; const canRewrite = statusCode !== 307 && statusCode !== 308; @@ -43536,7 +44748,11 @@ class Request extends external_node_stream_.Duplex { return; } // Redirecting to a different site, clear sensitive data. - if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { + // For UNIX sockets, different socket paths are also different origins. + const isDifferentOrigin = redirectUrl.hostname !== url.hostname + || redirectUrl.port !== url.port + || getUnixSocketPath(url) !== getUnixSocketPath(redirectUrl); + if (isDifferentOrigin) { if ('host' in updatedOptions.headers) { delete updatedOptions.headers.host; } @@ -43556,12 +44772,18 @@ class Request extends external_node_stream_.Duplex { redirectUrl.password = updatedOptions.password; } this.redirectUrls.push(redirectUrl); - updatedOptions.prefixUrl = ''; updatedOptions.url = redirectUrl; for (const hook of updatedOptions.hooks.beforeRedirect) { // eslint-disable-next-line no-await-in-loop await hook(updatedOptions, typedResponse); } + // Publish redirect event + publishRedirect({ + requestId: this._requestId, + fromUrl: url.toString(), + toUrl: redirectUrl.toString(), + statusCode, + }); this.emit('redirect', updatedOptions, typedResponse); this.options = updatedOptions; await this._makeRequest(); @@ -43581,6 +44803,41 @@ class Request extends external_node_stream_.Duplex { this._beforeError(new HTTPError(typedResponse)); return; } + // Store the expected content-length from the native response for validation. + // This is the content-length before decompression, which is what actually gets transferred. + // Skip storing for responses that shouldn't have bodies per RFC 9110. + // When decompression occurs, only store if strictContentLength is enabled. + const wasDecompressed = response !== this._nativeResponse; + if (!hasNoBody && (!wasDecompressed || options.strictContentLength)) { + const contentLengthHeader = this._nativeResponse.headers['content-length']; + if (contentLengthHeader !== undefined) { + const expectedLength = Number(contentLengthHeader); + if (!Number.isNaN(expectedLength) && expectedLength >= 0) { + this._expectedContentLength = expectedLength; + } + } + } + // Set up end listener AFTER redirect check to avoid emitting progress for redirect responses + response.once('end', () => { + // Validate content-length if it was provided + // Per RFC 9112: "If the sender closes the connection before the indicated number + // of octets are received, the recipient MUST consider the message to be incomplete" + if (this._checkContentLengthMismatch()) { + return; + } + this._responseSize = this._downloadedSize; + this.emit('downloadProgress', this.downloadProgress); + // Publish response end event + publishResponseEnd({ + requestId: this._requestId, + url: typedResponse.url, + statusCode, + bodySize: this._downloadedSize, + timings: this.timings, + }); + this.push(null); + }); + this.emit('downloadProgress', this.downloadProgress); response.on('readable', () => { if (this._triggerRead) { this._read(); @@ -43592,9 +44849,6 @@ class Request extends external_node_stream_.Duplex { this.on('pause', () => { response.pause(); }); - response.once('end', () => { - this.push(null); - }); if (this._noPipe) { const success = await this._setRawBody(); if (success) { @@ -43607,12 +44861,22 @@ class Request extends external_node_stream_.Duplex { if (destination.headersSent) { continue; } - // eslint-disable-next-line guard-for-in + // Check if decompression actually occurred by comparing stream objects. + // decompressResponse wraps the response stream when it decompresses, + // so response !== this._nativeResponse indicates decompression happened. + const wasDecompressed = response !== this._nativeResponse; for (const key in response.headers) { - const isAllowed = options.decompress ? key !== 'content-encoding' : true; - const value = response.headers[key]; - if (isAllowed) { - destination.setHeader(key, value); + if (Object.hasOwn(response.headers, key)) { + const value = response.headers[key]; + // When decompression occurred, skip content-encoding and content-length + // as they refer to the compressed data, not the decompressed stream. + if (wasDecompressed && (key === 'content-encoding' || key === 'content-length')) { + continue; + } + // Skip if value is undefined + if (value !== undefined) { + destination.setHeader(key, value); + } } } destination.statusCode = statusCode; @@ -43648,12 +44912,27 @@ class Request extends external_node_stream_.Duplex { _onRequest(request) { const { options } = this; const { timeout, url } = options; - dist_source(request); + // Publish request start event + publishRequestStart({ + requestId: this._requestId, + url: url?.toString() ?? '', + method: options.method, + headers: options.headers, + }); + utils_timer(request); + this._cancelTimeouts = timedOut(request, timeout, url); if (this.options.http2) { // Unset stream timeout, as the `timeout` option was used only for connection timeout. - request.setTimeout(0); + // We remove all 'timeout' listeners instead of calling setTimeout(0) because: + // 1. setTimeout(0) causes a memory leak (see https://github.com/sindresorhus/got/issues/690) + // 2. With HTTP/2 connection reuse, setTimeout(0) accumulates listeners on the socket + // 3. removeAllListeners('timeout') properly cleans up without the memory leak + request.removeAllListeners('timeout'); + // For HTTP/2, wait for socket and remove timeout listeners from it + request.once('socket', (socket) => { + socket.removeAllListeners('timeout'); + }); } - this._cancelTimeouts = timedOut(request, timeout, url); const responseEventName = options.cache ? 'cacheableResponse' : 'response'; request.once(responseEventName, (response) => { void this._onResponse(response); @@ -43689,7 +44968,20 @@ class Request extends external_node_stream_.Duplex { if (distribution.nodeStream(body)) { body.pipe(currentRequest); } - else if (distribution.generator(body) || distribution.asyncGenerator(body)) { + else if (distribution.buffer(body)) { + // Buffer should be sent directly without conversion + this._writeRequest(body, undefined, () => { }); + currentRequest.end(); + } + else if (distribution.typedArray(body)) { + // Typed arrays should be treated like buffers, not iterated over + // Create a Uint8Array view over the data (Node.js streams accept Uint8Array) + const typedArray = body; + const uint8View = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + this._writeRequest(uint8View, undefined, () => { }); + currentRequest.end(); + } + else if (distribution.asyncIterable(body) || (distribution.iterable(body) && !distribution.string(body) && !isBuffer(body))) { (async () => { try { for await (const chunk of body) { @@ -43702,56 +44994,125 @@ class Request extends external_node_stream_.Duplex { } })(); } - else if (!distribution.undefined(body)) { - this._writeRequest(body, undefined, () => { }); - currentRequest.end(); + else if (distribution.undefined(body)) { + // No body to send, end the request + const cannotHaveBody = methodsWithoutBody.has(this.options.method) && !(this.options.method === 'GET' && this.options.allowGetBody); + const shouldAutoEndStream = methodsWithoutBodyStream.has(this.options.method); + if ((this._noPipe ?? false) || cannotHaveBody || currentRequest !== this || shouldAutoEndStream) { + currentRequest.end(); + } } - else if (this._cannotHaveBody || this._noPipe) { + else { + this._writeRequest(body, undefined, () => { }); currentRequest.end(); } } _prepareCache(cache) { - if (!cacheableStore.has(cache)) { - const cacheableRequest = new dist(((requestOptions, handler) => { - const result = requestOptions._request(requestOptions, handler); - // TODO: remove this when `cacheable-request` supports async request functions. - if (distribution.promise(result)) { - // We only need to implement the error handler in order to support HTTP2 caching. - // The result will be a promise anyway. - // @ts-expect-error ignore - result.once = (event, handler) => { - if (event === 'error') { - (async () => { - try { - await result; - } - catch (error) { - handler(error); - } - })(); + if (cacheableStore.has(cache)) { + return; + } + const cacheableRequest = new dist(((requestOptions, handler) => { + /** + Wraps the cacheable-request handler to run beforeCache hooks. + These hooks control caching behavior by: + - Directly mutating the response object (changes apply to what gets cached) + - Returning `false` to prevent caching + - Returning `void`/`undefined` to use default caching behavior + + Hooks use direct mutation - they can modify response.headers, response.statusCode, etc. + Mutations take effect immediately and determine what gets cached. + */ + const wrappedHandler = handler ? (response) => { + const { beforeCacheHooks, gotRequest } = requestOptions; + // Early return if no hooks - cache the original response + if (!beforeCacheHooks || beforeCacheHooks.length === 0) { + handler(response); + return; + } + try { + // Call each beforeCache hook with the response + // Hooks can directly mutate the response - mutations take effect immediately + for (const hook of beforeCacheHooks) { + const result = hook(response); + if (result === false) { + // Prevent caching by adding no-cache headers + // Mutate the response directly to add headers + response.headers['cache-control'] = 'no-cache, no-store, must-revalidate'; + response.headers.pragma = 'no-cache'; + response.headers.expires = '0'; + handler(response); + // Don't call remaining hooks - we've decided not to cache + return; } - else if (event === 'abort' || event === 'destroy') { - // The empty catch is needed here in case when - // it rejects before it's `await`ed in `_makeRequest`. - (async () => { - try { - const request = (await result); - request.once(event, handler); - } - catch { } - })(); + if (distribution.promise(result)) { + // BeforeCache hooks must be synchronous because cacheable-request's handler is synchronous + throw new TypeError('beforeCache hooks must be synchronous. The hook returned a Promise, but this hook must return synchronously. If you need async logic, use beforeRequest hook instead.'); } - else { - /* istanbul ignore next: safety check */ - throw new Error(`Unknown HTTP2 promise event: ${event}`); + if (result !== undefined) { + // Hooks should return false or undefined only + // Mutations work directly - no need to return the response + throw new TypeError('beforeCache hook must return false or undefined. To modify the response, mutate it directly.'); } - return result; - }; + // Else: void/undefined = continue + } } - return result; - }), cache); - cacheableStore.set(cache, cacheableRequest.request()); - } + catch (error) { + // Convert hook errors to RequestError and propagate + // This is consistent with how other hooks handle errors + if (gotRequest) { + gotRequest._beforeError(error instanceof errors_RequestError ? error : new errors_RequestError(error.message, error, gotRequest)); + // Don't call handler when error was propagated successfully + return; + } + // If gotRequest is missing, log the error to aid debugging + // We still call the handler to prevent the request from hanging + console.error('Got: beforeCache hook error (request context unavailable):', error); + // Call handler with response (potentially partially modified) + handler(response); + return; + } + // All hooks ran successfully + // Cache the response with any mutations applied + handler(response); + } : handler; + const result = requestOptions._request(requestOptions, wrappedHandler); + // TODO: remove this when `cacheable-request` supports async request functions. + if (distribution.promise(result)) { + // We only need to implement the error handler in order to support HTTP2 caching. + // The result will be a promise anyway. + // @ts-expect-error ignore + result.once = (event, handler) => { + if (event === 'error') { + (async () => { + try { + await result; + } + catch (error) { + handler(error); + } + })(); + } + else if (event === 'abort' || event === 'destroy') { + // The empty catch is needed here in case when + // it rejects before it's `await`ed in `_makeRequest`. + (async () => { + try { + const request = (await result); + request.once(event, handler); + } + catch { } + })(); + } + else { + /* istanbul ignore next: safety check */ + throw new Error(`Unknown HTTP2 promise event: ${event}`); + } + return result; + }; + } + return result; + }), cache); + cacheableStore.set(cache, cacheableRequest.request()); } async _createCacheableRequest(url, options) { return new Promise((resolve, reject) => { @@ -43763,9 +45124,15 @@ class Request extends external_node_stream_.Duplex { response._readableState.autoDestroy = false; if (request) { const fix = () => { + // For ResponseLike objects from cache, set complete to true if not already set. + // For real HTTP responses, copy from the underlying response. if (response.req) { response.complete = response.req.res.complete; } + else if (response.complete === undefined) { + // ResponseLike from cache should have complete = true + response.complete = true; + } }; response.prependOnceListener('end', fix); fix(); @@ -43794,7 +45161,14 @@ class Request extends external_node_stream_.Duplex { } } if (options.decompress && distribution.undefined(headers['accept-encoding'])) { - headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; + const encodings = ['gzip', 'deflate']; + if (supportsBrotli) { + encodings.push('br'); + } + if (core_supportsZstd) { + encodings.push('zstd'); + } + headers['accept-encoding'] = encodings.join(', '); } if (username || password) { const credentials = external_node_buffer_namespaceObject.Buffer.from(`${username}:${password}`).toString('base64'); @@ -43807,12 +45181,10 @@ class Request extends external_node_stream_.Duplex { headers.cookie = cookieString; } } - // Reset `prefixUrl` - options.prefixUrl = ''; let request; for (const hook of options.hooks.beforeRequest) { // eslint-disable-next-line no-await-in-loop - const result = await hook(options); + const result = await hook(options, { retryCount: this.retryCount }); if (!distribution.undefined(result)) { // @ts-expect-error Skip the type mismatch to support abstract responses request = () => result; @@ -43826,7 +45198,14 @@ class Request extends external_node_stream_.Duplex { this._requestOptions._request = request; this._requestOptions.cache = options.cache; this._requestOptions.body = options.body; - this._prepareCache(options.cache); + this._requestOptions.beforeCacheHooks = options.hooks.beforeCache; + this._requestOptions.gotRequest = this; + try { + this._prepareCache(options.cache); + } + catch (error) { + throw new CacheError(error, this); + } } // Cache support const function_ = options.cache ? this._createCacheableRequest : request; @@ -43847,15 +45226,15 @@ class Request extends external_node_stream_.Duplex { if (is_client_request(requestOrResponse)) { this._onRequest(requestOrResponse); } - else if (this.writable) { + else if (this.writableEnded) { + void this._onResponse(requestOrResponse); + } + else { this.once('finish', () => { void this._onResponse(requestOrResponse); }); this._sendBody(); } - else { - void this._onResponse(requestOrResponse); - } } catch (error) { if (error instanceof types_CacheError) { @@ -43866,32 +45245,66 @@ class Request extends external_node_stream_.Duplex { } async _error(error) { try { - if (error instanceof HTTPError && !this.options.throwHttpErrors) { + if (this.options && error instanceof HTTPError && !this.options.throwHttpErrors) { // This branch can be reached only when using the Promise API // Skip calling the hooks on purpose. // See https://github.com/sindresorhus/got/issues/2103 } - else { - for (const hook of this.options.hooks.beforeError) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); + else if (this.options) { + const hooks = this.options.hooks.beforeError; + if (hooks.length > 0) { + for (const hook of hooks) { + // eslint-disable-next-line no-await-in-loop + error = await hook(error); + // Validate hook return value + if (!(error instanceof Error)) { + throw new TypeError(`The \`beforeError\` hook must return an Error instance. Received ${distribution.string(error) ? 'string' : String(typeof error)}.`); + } + } + // Mark this error as processed by hooks so _destroy preserves custom error types. + // Only mark non-RequestError errors, since RequestErrors are already preserved + // by the instanceof check in _destroy (line 642). + if (!(error instanceof errors_RequestError)) { + errorsProcessedByHooks.add(error); + } } } } catch (error_) { error = new errors_RequestError(error_.message, error_, this); } + // Publish error event + publishError({ + requestId: this._requestId, + url: this.options?.url?.toString() ?? '', + error, + timings: this.timings, + }); this.destroy(error); + // Manually emit error for Promise API to ensure it receives it. + // Node.js streams may not re-emit if an error was already emitted during retry attempts. + // Only emit for Promise API (_noPipe = true) to avoid double emissions in stream mode. + // Use process.nextTick to defer emission and allow destroy() to complete first. + // See https://github.com/sindresorhus/got/issues/1995 + if (this._noPipe) { + external_node_process_namespaceObject.nextTick(() => { + this.emit('error', error); + }); + } } _writeRequest(chunk, encoding, callback) { if (!this._request || this._request.destroyed) { - // Probably the `ClientRequest` instance will throw + // When there's no request (e.g., using cached response from beforeRequest hook), + // we still need to call the callback to allow the stream to finish properly. + callback(); return; } this._request.write(chunk, encoding, (error) => { // The `!destroyed` check is required to prevent `uploadProgress` being emitted after the stream was destroyed if (!error && !this._request.destroyed) { - this._uploadedSize += external_node_buffer_namespaceObject.Buffer.byteLength(chunk, encoding); + // For strings, encode them first to measure the actual bytes that will be sent + const bytes = typeof chunk === 'string' ? external_node_buffer_namespaceObject.Buffer.from(chunk, encoding) : chunk; + this._uploadedSize += byteLength(bytes); const progress = this.uploadProgress; if (progress.percent < 1) { this.emit('uploadProgress', progress); @@ -43994,6 +45407,12 @@ class Request extends external_node_stream_.Duplex { get reusedSocket() { return this._request?.reusedSocket; } + /** + Whether the stream is read-only. Returns `true` when `body`, `json`, or `form` options are provided. + */ + get isReadonly() { + return !distribution.undefined(this.options?.body) || !distribution.undefined(this.options?.json) || !distribution.undefined(this.options?.form); + } } ;// CONCATENATED MODULE: ./node_modules/got/dist/source/as-promise/types.js @@ -44036,12 +45455,14 @@ function asPromise(firstRequest) { let globalResponse; let normalizedOptions; const emitter = new external_node_events_.EventEmitter(); + let promiseSettled = false; const promise = new PCancelable((resolve, reject, onCancel) => { onCancel(() => { globalRequest.destroy(); }); onCancel.shouldReject = false; onCancel(() => { + promiseSettled = true; reject(new types_CancelError(globalRequest)); }); const makeRequest = (retryCount) => { @@ -44056,7 +45477,7 @@ function asPromise(firstRequest) { request.once('response', async (response) => { // Parse body const contentEncoding = (response.headers['content-encoding'] ?? '').toLowerCase(); - const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'deflate' || contentEncoding === 'br'; + const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'deflate' || contentEncoding === 'br' || contentEncoding === 'zstd'; const { options } = request; if (isCompressed && !options.decompress) { response.body = response.rawBody; @@ -44086,6 +45507,7 @@ function asPromise(firstRequest) { // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise // eslint-disable-next-line no-await-in-loop response = await hook(response, async (updatedOptions) => { + const preserveHooks = updatedOptions.preserveHooks ?? false; options.merge(updatedOptions); options.prefixUrl = ''; if (updatedOptions.url) { @@ -44093,10 +45515,13 @@ function asPromise(firstRequest) { } // Remove any further hooks for that request, because we'll call them anyway. // The loop continues. We don't want duplicates (asPromise recursion). - options.hooks.afterResponse = options.hooks.afterResponse.slice(0, index); + // Unless preserveHooks is true, in which case we keep the remaining hooks. + if (!preserveHooks) { + options.hooks.afterResponse = options.hooks.afterResponse.slice(0, index); + } throw new RetryError(request); }); - if (!(distribution.object(response) && distribution.number(response.statusCode) && !distribution.nullOrUndefined(response.body))) { + if (!(distribution.object(response) && distribution.number(response.statusCode) && 'body' in response)) { throw new TypeError('The `afterResponse` hook returned an invalid value'); } } @@ -44111,12 +45536,27 @@ function asPromise(firstRequest) { return; } request.destroy(); + promiseSettled = true; resolve(request.options.resolveBodyOnly ? response.body : response); }); + let handledFinalError = false; const onError = (error) => { if (promise.isCanceled) { return; } + // Route errors emitted directly on the stream (e.g., EPIPE from Node.js) + // through retry logic first, then handle them here after retries are exhausted. + // See https://github.com/sindresorhus/got/issues/1995 + if (!request._stopReading) { + request._beforeError(error); + return; + } + // Allow the manual re-emission from Request to land only once. + if (handledFinalError) { + return; + } + handledFinalError = true; + promiseSettled = true; const { options } = request; if (error instanceof HTTPError && !options.throwHttpErrors) { const { response } = error; @@ -44126,10 +45566,21 @@ function asPromise(firstRequest) { } reject(error); }; - request.once('error', onError); + // Use .on() instead of .once() to keep the listener active across retries. + // When _stopReading is false, we return early and the error gets re-emitted + // after retry logic completes, so we need this listener to remain active. + // See https://github.com/sindresorhus/got/issues/1995 + request.on('error', onError); const previousBody = request.options?.body; request.once('retry', (newRetryCount, error) => { firstRequest = undefined; + // If promise already settled, don't retry + // This prevents the race condition in #1489 where a late error + // (e.g., ECONNRESET after successful response) triggers retry + // after the promise has already resolved/rejected + if (promiseSettled) { + return; + } const newBody = request.options.body; if (previousBody === newBody && distribution.nodeStream(newBody)) { error.message = 'Cannot retry with consumed body stream'; @@ -44156,28 +45607,36 @@ function asPromise(firstRequest) { emitter.off(event, function_); return promise; }; - const shortcut = (responseType) => { + const shortcut = (promiseToAwait, responseType) => { const newPromise = (async () => { // Wait until downloading has ended - await promise; + await promiseToAwait; const { options } = globalResponse.request; return parseBody(globalResponse, responseType, options.parseJson, options.encoding); })(); // eslint-disable-next-line @typescript-eslint/no-floating-promises - Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); + Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promiseToAwait)); return newPromise; }; - promise.json = () => { + // Note: These use `function` syntax (not arrows) to access `this` context. + // When custom handlers wrap the promise to transform errors, these methods + // are copied to the handler's promise. Using `this` ensures we await the + // handler's wrapped promise, not the original, so errors propagate correctly. + promise.json = function () { if (globalRequest.options) { const { headers } = globalRequest.options; if (!globalRequest.writableFinished && !('accept' in headers)) { headers.accept = 'application/json'; } } - return shortcut('json'); + return shortcut(this, 'json'); + }; + promise.buffer = function () { + return shortcut(this, 'buffer'); + }; + promise.text = function () { + return shortcut(this, 'text'); }; - promise.buffer = () => shortcut('buffer'); - promise.text = () => shortcut('text'); return promise; } @@ -44323,7 +45782,15 @@ const create = (defaults) => { } else { normalizedOptions.merge(optionsToMerge); - assert.any([distribution.urlInstance, distribution.undefined], optionsToMerge.url); + try { + assert.any([distribution.urlInstance, distribution.undefined], optionsToMerge.url); + } + catch (error) { + if (error instanceof Error) { + error.message = `Option 'pagination.paginate.url': ${error.message}`; + } + throw error; + } if (optionsToMerge.url !== undefined) { normalizedOptions.prefixUrl = ''; normalizedOptions.url = optionsToMerge.url; @@ -44372,7 +45839,7 @@ const defaults = { mutableDefaults: false, }; const got = source_create(defaults); -/* harmony default export */ const got_dist_source = (got); +/* harmony default export */ const dist_source = (got); // TODO: Remove this in the next major version. @@ -44386,6 +45853,7 @@ const got = source_create(defaults); + ;// CONCATENATED MODULE: ./src/github-release.js /** * Copyright IBM Corp. 2022, 2025 @@ -44423,7 +45891,7 @@ async function downloadAsset( headers.Authorization = `Bearer ${auth.token}`; } - const response = await got_dist_source(releaseAsset.url, { + const response = await dist_source(releaseAsset.url, { method: "GET", headers, }); @@ -44492,7 +45960,7 @@ const executableName = "enos"; const gitHubRepositoryOwner = "hashicorp"; const gitHubRepositoryRepo = "enos"; -const latestVersion = "0.0.34"; +const latestVersion = "0.0.35"; async function downloadReleaseAsset(client, releaseAsset, directory) { try { diff --git a/dist/licenses.txt b/dist/licenses.txt index d5bc0df..8e386d7 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -93,6 +93,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@keyv/serialize +MIT +MIT License + +Copyright (c) 2017-2021 Luke Childs +Copyright (c) 2021-2022 Jared Wray + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @octokit/auth-token MIT The MIT License @@ -356,31 +382,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@szmarczak/http-timer -MIT -MIT License - -Copyright (c) 2018 Szymon Marczak - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - before-after-hook Apache-2.0 Apache License @@ -610,6 +611,19 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +byte-counter +MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + cacheable-lookup MIT MIT License @@ -637,25 +651,25 @@ SOFTWARE. cacheable-request MIT -MIT License +MIT License & © Jared Wray Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. decompress-response @@ -671,31 +685,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -defer-to-connect -MIT -MIT License - -Copyright (c) 2018 Szymon Marczak - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - fast-content-type-parse MIT MIT License @@ -825,34 +814,31 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -json-buffer +keyv MIT -Copyright (c) 2013 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: +MIT License -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. +Copyright (c) 2017-2021 Luke Childs +Copyright (c) 2021-2022 Jared Wray -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -keyv -MIT lowercase-keys MIT diff --git a/package-lock.json b/package-lock.json index fadaf63..4a58279 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "action-setup-enos", - "version": "1.39", + "version": "1.40", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "action-setup-enos", - "version": "1.39", + "version": "1.40", "license": "MPL-2.0", "dependencies": { "@actions/core": "^1.11.1", @@ -82,9 +82,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", - "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", "cpu": [ "ppc64" ], @@ -99,9 +99,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", - "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", "cpu": [ "arm" ], @@ -116,9 +116,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", - "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", "cpu": [ "arm64" ], @@ -133,9 +133,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", - "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", "cpu": [ "x64" ], @@ -150,9 +150,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", - "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", "cpu": [ "arm64" ], @@ -167,9 +167,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", - "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", "cpu": [ "x64" ], @@ -184,9 +184,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", - "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", "cpu": [ "arm64" ], @@ -201,9 +201,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", - "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", "cpu": [ "x64" ], @@ -218,9 +218,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", - "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", "cpu": [ "arm" ], @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", - "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", "cpu": [ "arm64" ], @@ -252,9 +252,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", - "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", "cpu": [ "ia32" ], @@ -269,9 +269,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", - "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", "cpu": [ "loong64" ], @@ -286,9 +286,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", - "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", "cpu": [ "mips64el" ], @@ -303,9 +303,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", - "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", "cpu": [ "ppc64" ], @@ -320,9 +320,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", - "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", "cpu": [ "riscv64" ], @@ -337,9 +337,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", - "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", "cpu": [ "s390x" ], @@ -354,9 +354,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", - "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", "cpu": [ "x64" ], @@ -371,9 +371,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", - "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", "cpu": [ "arm64" ], @@ -388,9 +388,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", - "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", "cpu": [ "x64" ], @@ -405,9 +405,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", - "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", "cpu": [ "arm64" ], @@ -422,9 +422,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", - "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", "cpu": [ "x64" ], @@ -439,9 +439,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", - "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", "cpu": [ "arm64" ], @@ -456,9 +456,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", - "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", "cpu": [ "x64" ], @@ -473,9 +473,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", - "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", "cpu": [ "arm64" ], @@ -490,9 +490,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", - "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", "cpu": [ "ia32" ], @@ -507,9 +507,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", - "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", "cpu": [ "x64" ], @@ -556,9 +556,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { @@ -566,13 +566,13 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -581,19 +581,22 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", - "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", - "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -604,9 +607,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", "dev": true, "license": "MIT", "dependencies": { @@ -616,7 +619,7 @@ "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, @@ -641,9 +644,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz", - "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", "dev": true, "license": "MIT", "engines": { @@ -654,9 +657,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -664,13 +667,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", - "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.2", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -745,10 +748,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@keyv/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", + "license": "MIT" + }, "node_modules/@mswjs/interceptors": { - "version": "0.39.6", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.6.tgz", - "integrity": "sha512-bndDP83naYYkfayr/qhBHMhk0YGwS1iv6vaEGcr0SQbO0IZtbOPqjKjds/WcG+bJA+1T5vCx6kprKOzn5Bg+Vw==", + "version": "0.39.8", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.8.tgz", + "integrity": "sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA==", "dev": true, "license": "MIT", "dependencies": { @@ -773,30 +782,30 @@ } }, "node_modules/@octokit/auth-unauthenticated": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-7.0.1.tgz", - "integrity": "sha512-qVq1vdjLLZdE8kH2vDycNNjuJRCD1q2oet1nA/GXWaYlpDxlR7rdVhX/K/oszXslXiQIiqrQf+rdhDlA99JdTQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-7.0.3.tgz", + "integrity": "sha512-8Jb1mtUdmBHL7lGmop9mU9ArMRUTRhg8vp0T1VtZ4yd9vEm3zcLwmjQkhNEduKawOOORie61xhtYIhTDN+ZQ3g==", "license": "MIT", "dependencies": { - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0" + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0" }, "engines": { "node": ">= 20" } }, "node_modules/@octokit/core": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.3.tgz", - "integrity": "sha512-oNXsh2ywth5aowwIa7RKtawnkdH6LgU1ztfP9AIUCQCvzysB+WeU8o2kyyosDPwBZutPpjZDKPQGIzzrfTWweQ==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz", + "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", "license": "MIT", "peer": true, "dependencies": { "@octokit/auth-token": "^6.0.0", - "@octokit/graphql": "^9.0.1", - "@octokit/request": "^10.0.2", - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0", + "@octokit/graphql": "^9.0.3", + "@octokit/request": "^10.0.6", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, @@ -805,12 +814,12 @@ } }, "node_modules/@octokit/endpoint": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz", - "integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz", + "integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==", "license": "MIT", "dependencies": { - "@octokit/types": "^14.0.0", + "@octokit/types": "^16.0.0", "universal-user-agent": "^7.0.2" }, "engines": { @@ -818,13 +827,13 @@ } }, "node_modules/@octokit/graphql": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz", - "integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz", + "integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==", "license": "MIT", "dependencies": { - "@octokit/request": "^10.0.2", - "@octokit/types": "^14.0.0", + "@octokit/request": "^10.0.6", + "@octokit/types": "^16.0.0", "universal-user-agent": "^7.0.0" }, "engines": { @@ -832,140 +841,140 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "25.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz", - "integrity": "sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA==", + "version": "27.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz", + "integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==", "license": "MIT" }, - "node_modules/@octokit/plugin-retry": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.0.1.tgz", - "integrity": "sha512-KUoYR77BjF5O3zcwDQHRRZsUvJwepobeqiSSdCJ8lWt27FZExzb0GgVxrhhfuyF6z2B2zpO0hN5pteni1sqWiw==", + "node_modules/@octokit/plugin-paginate-rest": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", + "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", + "dev": true, "license": "MIT", "dependencies": { - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0", - "bottleneck": "^2.15.3" + "@octokit/types": "^16.0.0" }, "engines": { "node": ">= 20" }, "peerDependencies": { - "@octokit/core": ">=7" + "@octokit/core": ">=6" } }, - "node_modules/@octokit/plugin-throttling": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-11.0.1.tgz", - "integrity": "sha512-S+EVhy52D/272L7up58dr3FNSMXWuNZolkL4zMJBNIfIxyZuUcczsQAU4b5w6dewJXnKYVgSHSV5wxitMSW1kw==", + "node_modules/@octokit/plugin-request-log": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-6.0.0.tgz", + "integrity": "sha512-UkOzeEN3W91/eBq9sPZNQ7sUBvYCqYbrrD8gTbBuGtHEuycE4/awMXcYvx6sVYo7LypPhmQwwpUe4Yyu4QZN5Q==", + "dev": true, "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0", - "bottleneck": "^2.15.3" - }, "engines": { "node": ">= 20" }, "peerDependencies": { - "@octokit/core": "^7.0.0" + "@octokit/core": ">=6" } }, - "node_modules/@octokit/request": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.3.tgz", - "integrity": "sha512-V6jhKokg35vk098iBqp2FBKunk3kMTXlmq+PtbV9Gl3TfskWlebSofU9uunVKhUN7xl+0+i5vt0TGTG8/p/7HA==", + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz", + "integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==", + "dev": true, "license": "MIT", "dependencies": { - "@octokit/endpoint": "^11.0.0", - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^3.0.0", - "universal-user-agent": "^7.0.2" + "@octokit/types": "^16.0.0" }, "engines": { "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" } }, - "node_modules/@octokit/request-error": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz", - "integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==", + "node_modules/@octokit/plugin-retry": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.0.3.tgz", + "integrity": "sha512-vKGx1i3MC0za53IzYBSBXcrhmd+daQDzuZfYDd52X5S0M2otf3kVZTVP8bLA3EkU0lTvd1WEC2OlNNa4G+dohA==", "license": "MIT", "dependencies": { - "@octokit/types": "^14.0.0" + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "bottleneck": "^2.15.3" }, "engines": { "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=7" } }, - "node_modules/@octokit/rest": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-22.0.0.tgz", - "integrity": "sha512-z6tmTu9BTnw51jYGulxrlernpsQYXpui1RK21vmXn8yF5bp6iX16yfTtJYGK5Mh1qDkvDOmp2n8sRMcQmR8jiA==", - "dev": true, + "node_modules/@octokit/plugin-throttling": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-11.0.3.tgz", + "integrity": "sha512-34eE0RkFCKycLl2D2kq7W+LovheM/ex3AwZCYN8udpi6bxsyjZidb2McXs69hZhLmJlDqTSP8cH+jSRpiaijBg==", "license": "MIT", "dependencies": { - "@octokit/core": "^7.0.2", - "@octokit/plugin-paginate-rest": "^13.0.1", - "@octokit/plugin-request-log": "^6.0.0", - "@octokit/plugin-rest-endpoint-methods": "^16.0.0" + "@octokit/types": "^16.0.0", + "bottleneck": "^2.15.3" }, "engines": { "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": "^7.0.0" } }, - "node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.1.1.tgz", - "integrity": "sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==", - "dev": true, + "node_modules/@octokit/request": { + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz", + "integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==", "license": "MIT", "dependencies": { - "@octokit/types": "^14.1.0" + "@octokit/endpoint": "^11.0.2", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "fast-content-type-parse": "^3.0.0", + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 20" - }, - "peerDependencies": { - "@octokit/core": ">=6" } }, - "node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-6.0.0.tgz", - "integrity": "sha512-UkOzeEN3W91/eBq9sPZNQ7sUBvYCqYbrrD8gTbBuGtHEuycE4/awMXcYvx6sVYo7LypPhmQwwpUe4Yyu4QZN5Q==", - "dev": true, + "node_modules/@octokit/request-error": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz", + "integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==", "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, "engines": { "node": ">= 20" - }, - "peerDependencies": { - "@octokit/core": ">=6" } }, - "node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.0.0.tgz", - "integrity": "sha512-kJVUQk6/dx/gRNLWUnAWKFs1kVPn5O5CYZyssyEoNYaFedqZxsfYs7DwI3d67hGz4qOwaJ1dpm07hOAD1BXx6g==", + "node_modules/@octokit/rest": { + "version": "22.0.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-22.0.1.tgz", + "integrity": "sha512-Jzbhzl3CEexhnivb1iQ0KJ7s5vvjMWcmRtq5aUsKmKDrRW6z3r84ngmiFKFvpZjpiU/9/S6ITPFRpn5s/3uQJw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^14.1.0" + "@octokit/core": "^7.0.6", + "@octokit/plugin-paginate-rest": "^14.0.0", + "@octokit/plugin-request-log": "^6.0.0", + "@octokit/plugin-rest-endpoint-methods": "^17.0.0" }, "engines": { "node": ">= 20" - }, - "peerDependencies": { - "@octokit/core": ">=6" } }, "node_modules/@octokit/types": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz", - "integrity": "sha512-1y6DgTy8Jomcpu33N+p5w58l6xyt55Ar2I91RPiIA0xCJBXyUAhXCcmZaDWSANiha7R9a6qJJ2CRomGPZ6f46g==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz", + "integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==", "license": "MIT", "dependencies": { - "@octokit/openapi-types": "^25.1.0" + "@octokit/openapi-types": "^27.0.0" } }, "node_modules/@open-draft/deferred-promise": { @@ -994,9 +1003,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.1.tgz", - "integrity": "sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.54.0.tgz", + "integrity": "sha512-OywsdRHrFvCdvsewAInDKCNyR3laPA2mc9bRYJ6LBp5IyvF3fvXbbNR0bSzHlZVFtn6E0xw2oZlyjg4rKCVcng==", "cpu": [ "arm" ], @@ -1008,9 +1017,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.1.tgz", - "integrity": "sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.54.0.tgz", + "integrity": "sha512-Skx39Uv+u7H224Af+bDgNinitlmHyQX1K/atIA32JP3JQw6hVODX5tkbi2zof/E69M1qH2UoN3Xdxgs90mmNYw==", "cpu": [ "arm64" ], @@ -1022,9 +1031,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.1.tgz", - "integrity": "sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.54.0.tgz", + "integrity": "sha512-k43D4qta/+6Fq+nCDhhv9yP2HdeKeP56QrUUTW7E6PhZP1US6NDqpJj4MY0jBHlJivVJD5P8NxrjuobZBJTCRw==", "cpu": [ "arm64" ], @@ -1036,9 +1045,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.1.tgz", - "integrity": "sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.54.0.tgz", + "integrity": "sha512-cOo7biqwkpawslEfox5Vs8/qj83M/aZCSSNIWpVzfU2CYHa2G3P1UN5WF01RdTHSgCkri7XOlTdtk17BezlV3A==", "cpu": [ "x64" ], @@ -1050,9 +1059,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.1.tgz", - "integrity": "sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.54.0.tgz", + "integrity": "sha512-miSvuFkmvFbgJ1BevMa4CPCFt5MPGw094knM64W9I0giUIMMmRYcGW/JWZDriaw/k1kOBtsWh1z6nIFV1vPNtA==", "cpu": [ "arm64" ], @@ -1064,9 +1073,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.1.tgz", - "integrity": "sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.54.0.tgz", + "integrity": "sha512-KGXIs55+b/ZfZsq9aR026tmr/+7tq6VG6MsnrvF4H8VhwflTIuYh+LFUlIsRdQSgrgmtM3fVATzEAj4hBQlaqQ==", "cpu": [ "x64" ], @@ -1078,9 +1087,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.1.tgz", - "integrity": "sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.54.0.tgz", + "integrity": "sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==", "cpu": [ "arm" ], @@ -1092,9 +1101,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.1.tgz", - "integrity": "sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.54.0.tgz", + "integrity": "sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==", "cpu": [ "arm" ], @@ -1106,9 +1115,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.1.tgz", - "integrity": "sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.54.0.tgz", + "integrity": "sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==", "cpu": [ "arm64" ], @@ -1120,9 +1129,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.1.tgz", - "integrity": "sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.54.0.tgz", + "integrity": "sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==", "cpu": [ "arm64" ], @@ -1133,10 +1142,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.1.tgz", - "integrity": "sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.54.0.tgz", + "integrity": "sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==", "cpu": [ "loong64" ], @@ -1148,9 +1157,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.1.tgz", - "integrity": "sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.54.0.tgz", + "integrity": "sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==", "cpu": [ "ppc64" ], @@ -1162,9 +1171,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.1.tgz", - "integrity": "sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.54.0.tgz", + "integrity": "sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==", "cpu": [ "riscv64" ], @@ -1176,9 +1185,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.1.tgz", - "integrity": "sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.54.0.tgz", + "integrity": "sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==", "cpu": [ "riscv64" ], @@ -1190,9 +1199,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.1.tgz", - "integrity": "sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.54.0.tgz", + "integrity": "sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==", "cpu": [ "s390x" ], @@ -1204,9 +1213,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.1.tgz", - "integrity": "sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.54.0.tgz", + "integrity": "sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==", "cpu": [ "x64" ], @@ -1218,9 +1227,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.1.tgz", - "integrity": "sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.54.0.tgz", + "integrity": "sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==", "cpu": [ "x64" ], @@ -1232,9 +1241,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.1.tgz", - "integrity": "sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.54.0.tgz", + "integrity": "sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==", "cpu": [ "arm64" ], @@ -1246,9 +1255,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.1.tgz", - "integrity": "sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.54.0.tgz", + "integrity": "sha512-c2V0W1bsKIKfbLMBu/WGBz6Yci8nJ/ZJdheE0EwB73N3MvHYKiKGs3mVilX4Gs70eGeDaMqEob25Tw2Gb9Nqyw==", "cpu": [ "arm64" ], @@ -1260,9 +1269,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.1.tgz", - "integrity": "sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.54.0.tgz", + "integrity": "sha512-woEHgqQqDCkAzrDhvDipnSirm5vxUXtSKDYTVpZG3nUdW/VVB5VdCYA2iReSj/u3yCZzXID4kuKG7OynPnB3WQ==", "cpu": [ "ia32" ], @@ -1273,10 +1282,24 @@ "win32" ] }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.54.0.tgz", + "integrity": "sha512-dzAc53LOuFvHwbCEOS0rPbXp6SIhAf2txMP5p6mGyOXXw5mWY8NGGbPMPrs4P1WItkfApDathBj/NzMLUZ9rtQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.1.tgz", - "integrity": "sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.54.0.tgz", + "integrity": "sha512-hYT5d3YNdSh3mbCU1gwQyPgQd3T2ne0A3KG8KSBdav5TiBg6eInVmV+TeR5uHufiIgSFg0XsOWGW5/RhNcSvPg==", "cpu": [ "x64" ], @@ -1294,9 +1317,9 @@ "license": "MIT" }, "node_modules/@sindresorhus/is": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.0.2.tgz", - "integrity": "sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.1.1.tgz", + "integrity": "sha512-rO92VvpgMc3kfiTjGT52LEtJ8Yc5kCWhZjLQ3LwlA4pSgPpQO7bVpYXParOD8Jwf+cVQECJo3yP/4I8aZtUQTQ==", "license": "MIT", "engines": { "node": ">=18" @@ -1305,26 +1328,15 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "license": "MIT", - "dependencies": { - "defer-to-connect": "^2.0.1" - }, - "engines": { - "node": ">=14.16" - } - }, "node_modules/@types/chai": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", - "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { - "@types/deep-eql": "*" + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" } }, "node_modules/@types/deep-eql": { @@ -1355,9 +1367,9 @@ "license": "MIT" }, "node_modules/@vercel/ncc": { - "version": "0.38.3", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz", - "integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==", + "version": "0.38.4", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz", + "integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==", "dev": true, "license": "MIT", "bin": { @@ -1583,6 +1595,18 @@ "concat-map": "0.0.1" } }, + "node_modules/byte-counter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/byte-counter/-/byte-counter-0.1.0.tgz", + "integrity": "sha512-jheRLVMeUKrDBjVw2O5+k4EvR4t9wtxHL+bo/LxfkxsVeuGMy3a5SEGgXdAFA4FSzTrU8rQXQIrsZ3oBq5a0pQ==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -1603,23 +1627,32 @@ } }, "node_modules/cacheable-request": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-12.0.1.tgz", - "integrity": "sha512-Yo9wGIQUaAfIbk+qY0X4cDQgCosecfBe3V9NSyeY4qPC2SAkbCS4Xj79VP8WOzitpJUZKc/wsRCYF5ariDIwkg==", + "version": "13.0.17", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-13.0.17.tgz", + "integrity": "sha512-tQm7K9zC0cJPpbJS8xZ+NUqJ1bZ78jEXc7/G8uqvQTSdEdbmrxdnvxGb7/piCPeICuRY/L82VVt8UA+qpJ8wyw==", "license": "MIT", "dependencies": { "@types/http-cache-semantics": "^4.0.4", "get-stream": "^9.0.1", - "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.4", + "http-cache-semantics": "^4.2.0", + "keyv": "^5.5.4", "mimic-response": "^4.0.0", - "normalize-url": "^8.0.1", - "responselike": "^3.0.0" + "normalize-url": "^8.1.0", + "responselike": "^4.0.2" }, "engines": { "node": ">=18" } }, + "node_modules/cacheable-request/node_modules/keyv": { + "version": "5.5.5", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.5.tgz", + "integrity": "sha512-FA5LmZVF1VziNc0bIdCSA1IoSVnDCqE8HJIZZv2/W8YmoAM50+tnUgJR/gQZwEeIMleuIOnRnHA/UaZRNeV4iQ==", + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1717,9 +1750,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -1735,27 +1768,15 @@ } }, "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-10.0.0.tgz", + "integrity": "sha512-oj7KWToJuuxlPr7VV0vabvxEIiqNMo+q0NueIiL3XhtwC6FVOX7Hr1c0C4eD0bmf7Zr+S/dSf2xvkH3Ad6sU3Q==", "license": "MIT", "dependencies": { - "mimic-response": "^3.1.0" + "mimic-response": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "license": "MIT", - "engines": { - "node": ">=10" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1778,15 +1799,6 @@ "dev": true, "license": "MIT" }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -1795,9 +1807,9 @@ "license": "MIT" }, "node_modules/esbuild": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", - "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1808,32 +1820,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.9", - "@esbuild/android-arm": "0.25.9", - "@esbuild/android-arm64": "0.25.9", - "@esbuild/android-x64": "0.25.9", - "@esbuild/darwin-arm64": "0.25.9", - "@esbuild/darwin-x64": "0.25.9", - "@esbuild/freebsd-arm64": "0.25.9", - "@esbuild/freebsd-x64": "0.25.9", - "@esbuild/linux-arm": "0.25.9", - "@esbuild/linux-arm64": "0.25.9", - "@esbuild/linux-ia32": "0.25.9", - "@esbuild/linux-loong64": "0.25.9", - "@esbuild/linux-mips64el": "0.25.9", - "@esbuild/linux-ppc64": "0.25.9", - "@esbuild/linux-riscv64": "0.25.9", - "@esbuild/linux-s390x": "0.25.9", - "@esbuild/linux-x64": "0.25.9", - "@esbuild/netbsd-arm64": "0.25.9", - "@esbuild/netbsd-x64": "0.25.9", - "@esbuild/openbsd-arm64": "0.25.9", - "@esbuild/openbsd-x64": "0.25.9", - "@esbuild/openharmony-arm64": "0.25.9", - "@esbuild/sunos-x64": "0.25.9", - "@esbuild/win32-arm64": "0.25.9", - "@esbuild/win32-ia32": "0.25.9", - "@esbuild/win32-x64": "0.25.9" + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" } }, "node_modules/escape-string-regexp": { @@ -1850,26 +1862,25 @@ } }, "node_modules/eslint": { - "version": "9.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.35.0.tgz", - "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.1", - "@eslint/core": "^0.15.2", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.35.0", - "@eslint/plugin-kit": "^0.3.5", + "@eslint/js": "9.39.2", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", @@ -2016,9 +2027,9 @@ } }, "node_modules/expect-type": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", - "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2062,6 +2073,24 @@ "dev": true, "license": "MIT" }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2167,9 +2196,9 @@ } }, "node_modules/globals": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", - "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", "engines": { @@ -2180,21 +2209,22 @@ } }, "node_modules/got": { - "version": "14.4.8", - "resolved": "https://registry.npmjs.org/got/-/got-14.4.8.tgz", - "integrity": "sha512-vxwU4HuR0BIl+zcT1LYrgBjM+IJjNElOjCzs0aPgHorQyr/V6H6Y73Sn3r3FOlUffvWD+Q5jtRuGWaXkU8Jbhg==", + "version": "14.6.5", + "resolved": "https://registry.npmjs.org/got/-/got-14.6.5.tgz", + "integrity": "sha512-Su87c0NNeg97de1sO02gy9I8EmE7DCJ1gzcFLcgGpYeq2PnLg4xz73MWrp6HjqbSsjb6Glf4UBDW6JNyZA6uSg==", "license": "MIT", "dependencies": { "@sindresorhus/is": "^7.0.1", - "@szmarczak/http-timer": "^5.0.1", + "byte-counter": "^0.1.0", "cacheable-lookup": "^7.0.0", - "cacheable-request": "^12.0.1", - "decompress-response": "^6.0.0", + "cacheable-request": "^13.0.12", + "decompress-response": "^10.0.0", "form-data-encoder": "^4.0.2", "http2-wrapper": "^2.2.1", + "keyv": "^5.5.3", "lowercase-keys": "^3.0.0", "p-cancelable": "^4.0.1", - "responselike": "^3.0.0", + "responselike": "^4.0.2", "type-fest": "^4.26.1" }, "engines": { @@ -2204,6 +2234,15 @@ "url": "https://github.com/sindresorhus/got?sponsor=1" } }, + "node_modules/got/node_modules/keyv": { + "version": "5.5.5", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.5.tgz", + "integrity": "sha512-FA5LmZVF1VziNc0bIdCSA1IoSVnDCqE8HJIZZv2/W8YmoAM50+tnUgJR/gQZwEeIMleuIOnRnHA/UaZRNeV4iQ==", + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2319,10 +2358,17 @@ "dev": true, "license": "ISC" }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -2336,6 +2382,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { @@ -2363,6 +2410,7 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -2425,9 +2473,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.19", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", - "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2642,6 +2690,20 @@ "dev": true, "license": "ISC" }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", @@ -2682,9 +2744,9 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", + "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", "bin": { @@ -2746,24 +2808,24 @@ } }, "node_modules/responselike": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", - "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-4.0.2.tgz", + "integrity": "sha512-cGk8IbWEAnaCpdAt1BHzJ3Ahz5ewDJa0KseTsE3qIRMJ3C698W8psM7byCeWVpd/Ha7FUYzuRVzXoKoM6nRUbA==", "license": "MIT", "dependencies": { "lowercase-keys": "^3.0.0" }, "engines": { - "node": ">=14.16" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/rollup": { - "version": "4.50.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.1.tgz", - "integrity": "sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz", + "integrity": "sha512-3nk8Y3a9Ea8szgKhinMlGMhGMw89mqule3KWczxhIzqudyHdCIOHw8WJlj/r329fACjKLEh13ZSk7oE22kyeIw==", "dev": true, "license": "MIT", "dependencies": { @@ -2777,27 +2839,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.50.1", - "@rollup/rollup-android-arm64": "4.50.1", - "@rollup/rollup-darwin-arm64": "4.50.1", - "@rollup/rollup-darwin-x64": "4.50.1", - "@rollup/rollup-freebsd-arm64": "4.50.1", - "@rollup/rollup-freebsd-x64": "4.50.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.50.1", - "@rollup/rollup-linux-arm-musleabihf": "4.50.1", - "@rollup/rollup-linux-arm64-gnu": "4.50.1", - "@rollup/rollup-linux-arm64-musl": "4.50.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.50.1", - "@rollup/rollup-linux-ppc64-gnu": "4.50.1", - "@rollup/rollup-linux-riscv64-gnu": "4.50.1", - "@rollup/rollup-linux-riscv64-musl": "4.50.1", - "@rollup/rollup-linux-s390x-gnu": "4.50.1", - "@rollup/rollup-linux-x64-gnu": "4.50.1", - "@rollup/rollup-linux-x64-musl": "4.50.1", - "@rollup/rollup-openharmony-arm64": "4.50.1", - "@rollup/rollup-win32-arm64-msvc": "4.50.1", - "@rollup/rollup-win32-ia32-msvc": "4.50.1", - "@rollup/rollup-win32-x64-msvc": "4.50.1", + "@rollup/rollup-android-arm-eabi": "4.54.0", + "@rollup/rollup-android-arm64": "4.54.0", + "@rollup/rollup-darwin-arm64": "4.54.0", + "@rollup/rollup-darwin-x64": "4.54.0", + "@rollup/rollup-freebsd-arm64": "4.54.0", + "@rollup/rollup-freebsd-x64": "4.54.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.54.0", + "@rollup/rollup-linux-arm-musleabihf": "4.54.0", + "@rollup/rollup-linux-arm64-gnu": "4.54.0", + "@rollup/rollup-linux-arm64-musl": "4.54.0", + "@rollup/rollup-linux-loong64-gnu": "4.54.0", + "@rollup/rollup-linux-ppc64-gnu": "4.54.0", + "@rollup/rollup-linux-riscv64-gnu": "4.54.0", + "@rollup/rollup-linux-riscv64-musl": "4.54.0", + "@rollup/rollup-linux-s390x-gnu": "4.54.0", + "@rollup/rollup-linux-x64-gnu": "4.54.0", + "@rollup/rollup-linux-x64-musl": "4.54.0", + "@rollup/rollup-openharmony-arm64": "4.54.0", + "@rollup/rollup-win32-arm64-msvc": "4.54.0", + "@rollup/rollup-win32-ia32-msvc": "4.54.0", + "@rollup/rollup-win32-x64-gnu": "4.54.0", + "@rollup/rollup-win32-x64-msvc": "4.54.0", "fsevents": "~2.3.2" } }, @@ -2858,9 +2921,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", "dev": true, "license": "MIT" }, @@ -2885,9 +2948,9 @@ } }, "node_modules/strip-literal": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", - "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", + "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", "dev": true, "license": "MIT", "dependencies": { @@ -2897,13 +2960,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/strip-literal/node_modules/js-tokens": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", - "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", - "dev": true, - "license": "MIT" - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2948,38 +3004,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tinypool": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", @@ -3001,9 +3025,9 @@ } }, "node_modules/tinyspy": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", - "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", "dev": true, "license": "MIT", "engines": { @@ -3073,14 +3097,14 @@ } }, "node_modules/vite": { - "version": "7.1.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.12.tgz", - "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz", + "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "esbuild": "^0.25.0", + "esbuild": "^0.27.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", @@ -3171,38 +3195,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/vitest": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", @@ -3276,19 +3268,6 @@ } } }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index c90a933..fa81912 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "action-setup-enos", "type": "module", - "version": "1.39", + "version": "1.40", "description": "Setup Enos CLI for GitHub Actions", "scripts": { "all": "npm run build && npm run ci", diff --git a/src/enos.js b/src/enos.js index 3daeda5..ae82787 100644 --- a/src/enos.js +++ b/src/enos.js @@ -13,7 +13,7 @@ const executableName = "enos"; const gitHubRepositoryOwner = "hashicorp"; const gitHubRepositoryRepo = "enos"; -export const latestVersion = "0.0.34"; +export const latestVersion = "0.0.35"; export async function downloadReleaseAsset(client, releaseAsset, directory) { try {