diff --git a/dist/index.js b/dist/index.js index bd92440..c3b61ea 100644 --- a/dist/index.js +++ b/dist/index.js @@ -86331,13 +86331,9 @@ var external_node_os_ = __nccwpck_require__(612); var external_node_util_ = __nccwpck_require__(7261); // EXTERNAL MODULE: external "os" var external_os_ = __nccwpck_require__(2037); -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -;// CONCATENATED MODULE: external "node:zlib" -const external_node_zlib_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); ;// CONCATENATED MODULE: external "node:crypto" const external_node_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@7.0.0/node_modules/@sindresorhus/is/distribution/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/@sindresorhus+is@6.3.1/node_modules/@sindresorhus/is/dist/index.js const typedArrayTypeNames = [ 'Int8Array', 'Uint8Array', @@ -86523,10 +86519,14 @@ const is = Object.assign(detect, { boundFunction: isBoundFunction, buffer: isBuffer, class: isClass, + /** @deprecated Renamed to `class`. */ + class_: isClass, dataView: isDataView, date: isDate, detect, directInstanceOf: isDirectInstanceOf, + /** @deprecated Renamed to `htmlElement` */ + domElement: isHtmlElement, emptyArray: isEmptyArray, emptyMap: isEmptyMap, emptyObject: isEmptyObject, @@ -86541,6 +86541,8 @@ const is = Object.assign(detect, { float64Array: isFloat64Array, formData: isFormData, function: isFunction, + /** @deprecated Renamed to `function`. */ + function_: isFunction, generator: isGenerator, generatorFunction: isGeneratorFunction, htmlElement: isHtmlElement, @@ -86563,6 +86565,8 @@ const is = Object.assign(detect, { nonEmptyString: isNonEmptyString, nonEmptyStringAndNotWhitespace: isNonEmptyStringAndNotWhitespace, null: isNull, + /** @deprecated Renamed to `null`. */ + null_: isNull, nullOrUndefined: isNullOrUndefined, number: isNumber, numericString: isNumericString, @@ -86598,7 +86602,7 @@ const is = Object.assign(detect, { weakSet: isWeakSet, whitespaceString: isWhitespaceString, }); -function isAbsoluteModule2(remainder) { +function isAbsoluteMod2(remainder) { return (value) => isInteger(value) && Math.abs(value % 2) === remainder; } function isAll(predicate, ...values) { @@ -86653,11 +86657,8 @@ function isBoolean(value) { } // eslint-disable-next-line @typescript-eslint/ban-types function isBoundFunction(value) { - return isFunction(value) && !Object.hasOwn(value, 'prototype'); + return isFunction(value) && !Object.prototype.hasOwnProperty.call(value, 'prototype'); } -/** -Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer) -*/ function isBuffer(value) { // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call return value?.constructor?.isBuffer?.(value) ?? false; @@ -86703,7 +86704,7 @@ function isError(value) { return getObjectType(value) === 'Error'; } function isEvenInteger(value) { - return isAbsoluteModule2(0)(value); + return isAbsoluteMod2(0)(value); } // Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` function isFalsy(value) { @@ -86842,7 +86843,7 @@ function isObservable(value) { return false; } function isOddInteger(value) { - return isAbsoluteModule2(1)(value); + return isAbsoluteMod2(1)(value); } function isPlainObject(value) { // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js @@ -86942,7 +86943,7 @@ function isValidLength(value) { function isWeakMap(value) { return getObjectType(value) === 'WeakMap'; } -// eslint-disable-next-line @typescript-eslint/ban-types, unicorn/prevent-abbreviations +// eslint-disable-next-line @typescript-eslint/ban-types function isWeakRef(value) { return getObjectType(value) === 'WeakRef'; } @@ -86994,9 +86995,11 @@ const assert = { boundFunction: assertBoundFunction, buffer: assertBuffer, class: assertClass, + class_: assertClass, dataView: assertDataView, date: assertDate, directInstanceOf: assertDirectInstanceOf, + domElement: assertHtmlElement, emptyArray: assertEmptyArray, emptyMap: assertEmptyMap, emptyObject: assertEmptyObject, @@ -87011,6 +87014,7 @@ const assert = { float64Array: assertFloat64Array, formData: assertFormData, function: assertFunction, + function_: assertFunction, generator: assertGenerator, generatorFunction: assertGeneratorFunction, htmlElement: assertHtmlElement, @@ -87033,6 +87037,7 @@ const assert = { nonEmptyString: assertNonEmptyString, nonEmptyStringAndNotWhitespace: assertNonEmptyStringAndNotWhitespace, null: assertNull, + null_: assertNull, nullOrUndefined: assertNullOrUndefined, number: assertNumber, numericString: assertNumericString, @@ -87087,6 +87092,8 @@ const methodTypeMap = { isDataView: 'DataView', isDate: 'Date', isDirectInstanceOf: 'T', + /** @deprecated */ + isDomElement: 'HTMLElement', isEmptyArray: 'empty array', isEmptyMap: 'empty map', isEmptyObject: 'empty object', @@ -87249,9 +87256,6 @@ function assertBoundFunction(value, message) { throw new TypeError(message ?? typeErrorMessage('Function', value)); } } -/** -Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer) -*/ function assertBuffer(value, message) { if (!isBuffer(value)) { throw new TypeError(message ?? typeErrorMessage('Buffer', value)); @@ -87618,7 +87622,7 @@ function assertWeakMap(value, message) { throw new TypeError(message ?? typeErrorMessage('WeakMap', value)); } } -// eslint-disable-next-line @typescript-eslint/ban-types, unicorn/prevent-abbreviations +// eslint-disable-next-line @typescript-eslint/ban-types function assertWeakRef(value, message) { if (!isWeakRef(value)) { throw new TypeError(message ?? typeErrorMessage('WeakRef', value)); @@ -87635,7 +87639,7 @@ function assertWhitespaceString(value, message) { throw new TypeError(message ?? typeErrorMessage('whitespace string', value)); } } -/* harmony default export */ const distribution = (is); +/* harmony default export */ const dist = (is); // EXTERNAL MODULE: external "node:events" var external_node_events_ = __nccwpck_require__(5673); @@ -87760,11 +87764,11 @@ class PCancelable { Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/errors.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/errors.js // A hacky check to prevent circular references. function isRequest(x) { - return distribution.object(x) && '_onResponse' in x; + return dist.object(x) && '_onResponse' in x; } /** An error to be thrown when a request fails. @@ -87799,7 +87803,7 @@ class RequestError extends Error { } this.timings = this.request?.timings; // Recover the original stacktrace - if (distribution.string(error.stack) && distribution.string(this.stack)) { + if (dist.string(error.stack) && dist.string(this.stack)) { const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse(); const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse(); @@ -88515,7 +88519,7 @@ const nodeImports = {}; ;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js -const getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => { +const contents_getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => { const asyncIterable = getAsyncIterable(stream); const state = init(); @@ -88653,7 +88657,7 @@ const getLengthProperty = convertedChunk => convertedChunk.length; async function getStreamAsArrayBuffer(stream, options) { - return getStreamContents(stream, arrayBufferMethods, options); + return contents_getStreamContents(stream, arrayBufferMethods, options); } const initArrayBuffer = () => ({contents: new ArrayBuffer(0)}); @@ -89178,12 +89182,315 @@ const convertHeaders = (headers) => { } return result; }; -/* harmony default export */ const dist = (CacheableRequest); +/* harmony default export */ const cacheable_request_dist = (CacheableRequest); const onResponse = 'onResponse'; //# sourceMappingURL=index.js.map // EXTERNAL MODULE: ./node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js var decompress_response = __nccwpck_require__(7748); +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js +const source_contents_getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => { + if (!contents_isAsyncIterable(stream)) { + throw new Error('The first argument must be a Readable, a ReadableStream, or an async iterable.'); + } + + const state = init(); + state.length = 0; + + try { + for await (const chunk of stream) { + const chunkType = contents_getChunkType(chunk); + const convertedChunk = convertChunk[chunkType](chunk, state); + contents_appendChunk({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer}); + } + + contents_appendFinalChunk({state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer}); + return finalize(state); + } catch (error) { + error.bufferedData = finalize(state); + throw error; + } +}; + +const contents_appendFinalChunk = ({state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer}) => { + const convertedChunk = getFinalChunk(state); + if (convertedChunk !== undefined) { + contents_appendChunk({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer}); + } +}; + +const contents_appendChunk = ({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer}) => { + const chunkSize = getSize(convertedChunk); + const newLength = state.length + chunkSize; + + if (newLength <= maxBuffer) { + contents_addNewChunk(convertedChunk, state, addChunk, newLength); + return; + } + + const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length); + + if (truncatedChunk !== undefined) { + contents_addNewChunk(truncatedChunk, state, addChunk, maxBuffer); + } + + throw new contents_MaxBufferError(); +}; + +const contents_addNewChunk = (convertedChunk, state, addChunk, newLength) => { + state.contents = addChunk(convertedChunk, state, newLength); + state.length = newLength; +}; + +const contents_isAsyncIterable = stream => typeof stream === 'object' && stream !== null && typeof stream[Symbol.asyncIterator] === 'function'; + +const contents_getChunkType = chunk => { + const typeOfChunk = typeof chunk; + + if (typeOfChunk === 'string') { + return 'string'; + } + + if (typeOfChunk !== 'object' || chunk === null) { + return 'others'; + } + + // eslint-disable-next-line n/prefer-global/buffer + if (globalThis.Buffer?.isBuffer(chunk)) { + return 'buffer'; + } + + const prototypeName = contents_objectToString.call(chunk); + + if (prototypeName === '[object ArrayBuffer]') { + return 'arrayBuffer'; + } + + if (prototypeName === '[object DataView]') { + return 'dataView'; + } + + if ( + Number.isInteger(chunk.byteLength) + && Number.isInteger(chunk.byteOffset) + && contents_objectToString.call(chunk.buffer) === '[object ArrayBuffer]' + ) { + return 'typedArray'; + } + + return 'others'; +}; + +const {toString: contents_objectToString} = Object.prototype; + +class contents_MaxBufferError extends Error { + name = 'MaxBufferError'; + + constructor() { + super('maxBuffer exceeded'); + } +} + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js +const utils_identity = value => value; + +const utils_noop = () => undefined; + +const getContentsProp = ({contents}) => contents; + +const utils_throwObjectStream = chunk => { + throw new Error(`Streams in object mode are not supported: ${String(chunk)}`); +}; + +const getLengthProp = convertedChunk => convertedChunk.length; + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js + + + +async function getStreamAsArray(stream, options) { + return getStreamContents(stream, arrayMethods, options); +} + +const initArray = () => ({contents: []}); + +const increment = () => 1; + +const addArrayChunk = (convertedChunk, {contents}) => { + contents.push(convertedChunk); + return contents; +}; + +const arrayMethods = { + init: initArray, + convertChunk: { + string: utils_identity, + buffer: utils_identity, + arrayBuffer: utils_identity, + dataView: utils_identity, + typedArray: utils_identity, + others: utils_identity, + }, + getSize: increment, + truncateChunk: utils_noop, + addChunk: addArrayChunk, + getFinalChunk: utils_noop, + finalize: getContentsProp, +}; + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js + + + +async function array_buffer_getStreamAsArrayBuffer(stream, options) { + return source_contents_getStreamContents(stream, array_buffer_arrayBufferMethods, options); +} + +const array_buffer_initArrayBuffer = () => ({contents: new ArrayBuffer(0)}); + +const array_buffer_useTextEncoder = chunk => array_buffer_textEncoder.encode(chunk); +const array_buffer_textEncoder = new TextEncoder(); + +const array_buffer_useUint8Array = chunk => new Uint8Array(chunk); + +const array_buffer_useUint8ArrayWithOffset = chunk => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); + +const array_buffer_truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); + +// `contents` is an increasingly growing `Uint8Array`. +const array_buffer_addArrayBufferChunk = (convertedChunk, {contents, length: previousLength}, length) => { + const newContents = array_buffer_hasArrayBufferResize() ? array_buffer_resizeArrayBuffer(contents, length) : array_buffer_resizeArrayBufferSlow(contents, length); + new Uint8Array(newContents).set(convertedChunk, previousLength); + return newContents; +}; + +// Without `ArrayBuffer.resize()`, `contents` size is always a power of 2. +// This means its last bytes are zeroes (not stream data), which need to be +// trimmed at the end with `ArrayBuffer.slice()`. +const array_buffer_resizeArrayBufferSlow = (contents, length) => { + if (length <= contents.byteLength) { + return contents; + } + + const arrayBuffer = new ArrayBuffer(array_buffer_getNewContentsLength(length)); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; + +// With `ArrayBuffer.resize()`, `contents` size matches exactly the size of +// the stream data. It does not include extraneous zeroes to trim at the end. +// The underlying `ArrayBuffer` does allocate a number of bytes that is a power +// of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`. +const array_buffer_resizeArrayBuffer = (contents, length) => { + if (length <= contents.maxByteLength) { + contents.resize(length); + return contents; + } + + const arrayBuffer = new ArrayBuffer(length, {maxByteLength: array_buffer_getNewContentsLength(length)}); + new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0); + return arrayBuffer; +}; + +// Retrieve the closest `length` that is both >= and a power of 2 +const array_buffer_getNewContentsLength = length => array_buffer_SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(array_buffer_SCALE_FACTOR)); + +const array_buffer_SCALE_FACTOR = 2; + +const array_buffer_finalizeArrayBuffer = ({contents, length}) => array_buffer_hasArrayBufferResize() ? contents : contents.slice(0, length); + +// `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available +// (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead. +// eslint-disable-next-line no-warning-comments +// TODO: remove after dropping support for Node 20. +// eslint-disable-next-line no-warning-comments +// TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available +const array_buffer_hasArrayBufferResize = () => 'resize' in ArrayBuffer.prototype; + +const array_buffer_arrayBufferMethods = { + init: array_buffer_initArrayBuffer, + convertChunk: { + string: array_buffer_useTextEncoder, + buffer: array_buffer_useUint8Array, + arrayBuffer: array_buffer_useUint8Array, + dataView: array_buffer_useUint8ArrayWithOffset, + typedArray: array_buffer_useUint8ArrayWithOffset, + others: utils_throwObjectStream, + }, + getSize: getLengthProp, + truncateChunk: array_buffer_truncateArrayBufferChunk, + addChunk: array_buffer_addArrayBufferChunk, + getFinalChunk: utils_noop, + finalize: array_buffer_finalizeArrayBuffer, +}; + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js + + +async function buffer_getStreamAsBuffer(stream, options) { + if (!('Buffer' in globalThis)) { + throw new Error('getStreamAsBuffer() is only supported in Node.js'); + } + + try { + return buffer_arrayBufferToNodeBuffer(await array_buffer_getStreamAsArrayBuffer(stream, options)); + } catch (error) { + if (error.bufferedData !== undefined) { + error.bufferedData = buffer_arrayBufferToNodeBuffer(error.bufferedData); + } + + throw error; + } +} + +// eslint-disable-next-line n/prefer-global/buffer +const buffer_arrayBufferToNodeBuffer = arrayBuffer => globalThis.Buffer.from(arrayBuffer); + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js + + + +async function getStreamAsString(stream, options) { + return getStreamContents(stream, stringMethods, options); +} + +const initString = () => ({contents: '', textDecoder: new TextDecoder()}); + +const useTextDecoder = (chunk, {textDecoder}) => textDecoder.decode(chunk, {stream: true}); + +const addStringChunk = (convertedChunk, {contents}) => contents + convertedChunk; + +const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize); + +const getFinalStringChunk = ({textDecoder}) => { + const finalChunk = textDecoder.decode(); + return finalChunk === '' ? undefined : finalChunk; +}; + +const stringMethods = { + init: initString, + convertChunk: { + string: utils_identity, + buffer: useTextDecoder, + arrayBuffer: useTextDecoder, + dataView: useTextDecoder, + typedArray: useTextDecoder, + others: utils_throwObjectStream, + }, + getSize: getLengthProp, + truncateChunk: truncateStringChunk, + addChunk: addStringChunk, + getFinalChunk: getFinalStringChunk, + finalize: getContentsProp, +}; + +;// CONCATENATED MODULE: ./node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js + + + + + + ;// CONCATENATED MODULE: ./node_modules/.pnpm/form-data-encoder@4.0.2/node_modules/form-data-encoder/lib/index.js var __accessCheck = (obj, member, msg) => { if (!member.has(obj)) @@ -89547,13 +89854,13 @@ getContentLength_fn = function() { }; -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/is-form-data.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/is-form-data.js function is_form_data_isFormData(body) { - return distribution.nodeStream(body) && distribution["function"](body.getBoundary); + return dist.nodeStream(body) && dist.function_(body.getBoundary); } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/get-body-size.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/get-body-size.js @@ -89565,10 +89872,10 @@ async function getBodySize(body, headers) { if (!body) { return 0; } - if (distribution.string(body)) { + if (dist.string(body)) { return external_node_buffer_namespaceObject.Buffer.byteLength(body); } - if (distribution.buffer(body)) { + if (dist.buffer(body)) { return body.length; } if (is_form_data_isFormData(body)) { @@ -89577,7 +89884,7 @@ async function getBodySize(body, headers) { return undefined; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/proxy-events.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/proxy-events.js function proxyEvents(from, to, events) { const eventFunctions = {}; for (const event of events) { @@ -89596,7 +89903,7 @@ function proxyEvents(from, to, events) { ;// CONCATENATED MODULE: external "node:net" const external_node_net_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/unhandle.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/unhandle.js // When attaching listeners, it's very easy to forget about them. // Especially if you do error handling and set timeouts. // So instead of checking if it's proper to throw an error on every timeout ever, @@ -89618,7 +89925,7 @@ function unhandle() { }; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/timed-out.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/timed-out.js const reentry = Symbol('reentry'); @@ -89749,14 +90056,14 @@ function timedOut(request, delays, options) { return cancelTimeouts; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/url-to-options.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/url-to-options.js function urlToOptions(url) { // Cast to URL url = url; const options = { protocol: url.protocol, - hostname: distribution.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, + hostname: dist.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, host: url.host, hash: url.hash, search: url.search, @@ -89764,7 +90071,7 @@ function urlToOptions(url) { href: url.href, path: `${url.pathname || ''}${url.search || ''}`, }; - if (distribution.string(url.port) && url.port.length > 0) { + if (dist.string(url.port) && url.port.length > 0) { options.port = Number(url.port); } if (url.username || url.password) { @@ -89773,7 +90080,7 @@ function urlToOptions(url) { return options; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/weakable-map.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/weakable-map.js class WeakableMap { weakMap; map; @@ -89803,7 +90110,7 @@ class WeakableMap { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/calculate-retry-delay.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/calculate-retry-delay.js const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter, computedValue, }) => { if (error.name === 'RetryError') { return 1; @@ -90290,7 +90597,7 @@ class CacheableLookup { // EXTERNAL MODULE: ./node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.js var http2_wrapper_source = __nccwpck_require__(9695); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/parse-link-header.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/parse-link-header.js function parseLinkHeader(link) { const parsed = []; const items = link.split(','); @@ -90325,7 +90632,7 @@ function parseLinkHeader(link) { return parsed; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/options.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/options.js @@ -90343,7 +90650,7 @@ 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); + assert.any([dist.string, dist.number, dist.boolean, dist.null_, dist.undefined], value); } } const globalCache = new Map(); @@ -90545,64 +90852,64 @@ const cloneInternals = (internals) => { const cloneRaw = (raw) => { const { hooks, retry } = raw; const result = { ...raw }; - if (distribution.object(raw.context)) { + if (dist.object(raw.context)) { result.context = { ...raw.context }; } - if (distribution.object(raw.cacheOptions)) { + if (dist.object(raw.cacheOptions)) { result.cacheOptions = { ...raw.cacheOptions }; } - if (distribution.object(raw.https)) { + if (dist.object(raw.https)) { result.https = { ...raw.https }; } - if (distribution.object(raw.cacheOptions)) { + if (dist.object(raw.cacheOptions)) { result.cacheOptions = { ...result.cacheOptions }; } - if (distribution.object(raw.agent)) { + if (dist.object(raw.agent)) { result.agent = { ...raw.agent }; } - if (distribution.object(raw.headers)) { + if (dist.object(raw.headers)) { result.headers = { ...raw.headers }; } - if (distribution.object(retry)) { + if (dist.object(retry)) { result.retry = { ...retry }; - if (distribution.array(retry.errorCodes)) { + if (dist.array(retry.errorCodes)) { result.retry.errorCodes = [...retry.errorCodes]; } - if (distribution.array(retry.methods)) { + if (dist.array(retry.methods)) { result.retry.methods = [...retry.methods]; } - if (distribution.array(retry.statusCodes)) { + if (dist.array(retry.statusCodes)) { result.retry.statusCodes = [...retry.statusCodes]; } } - if (distribution.object(raw.timeout)) { + if (dist.object(raw.timeout)) { result.timeout = { ...raw.timeout }; } - if (distribution.object(hooks)) { + if (dist.object(hooks)) { result.hooks = { ...hooks, }; - if (distribution.array(hooks.init)) { + if (dist.array(hooks.init)) { result.hooks.init = [...hooks.init]; } - if (distribution.array(hooks.beforeRequest)) { + if (dist.array(hooks.beforeRequest)) { result.hooks.beforeRequest = [...hooks.beforeRequest]; } - if (distribution.array(hooks.beforeError)) { + if (dist.array(hooks.beforeError)) { result.hooks.beforeError = [...hooks.beforeError]; } - if (distribution.array(hooks.beforeRedirect)) { + if (dist.array(hooks.beforeRedirect)) { result.hooks.beforeRedirect = [...hooks.beforeRedirect]; } - if (distribution.array(hooks.beforeRetry)) { + if (dist.array(hooks.beforeRetry)) { result.hooks.beforeRetry = [...hooks.beforeRetry]; } - if (distribution.array(hooks.afterResponse)) { + if (dist.array(hooks.afterResponse)) { result.hooks.afterResponse = [...hooks.afterResponse]; } } // TODO: raw.searchParams - if (distribution.object(raw.pagination)) { + if (dist.object(raw.pagination)) { result.pagination = { ...raw.pagination }; } return result; @@ -90628,9 +90935,9 @@ class Options { _merging; _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); + assert.any([dist.string, dist.urlInstance, dist.object, dist.undefined], input); + assert.any([dist.object, dist.undefined], options); + assert.any([dist.object, dist.undefined], defaults); if (input instanceof Options || options instanceof Options) { throw new TypeError('The defaults must be passed as the third argument'); } @@ -90648,7 +90955,7 @@ class Options { // /* eslint-disable no-unsafe-finally */ try { - if (distribution.plainObject(input)) { + if (dist.plainObject(input)) { try { this.merge(input); this.merge(options); @@ -90741,7 +91048,7 @@ class Options { return this._internals.request; } set request(value) { - assert.any([distribution["function"], distribution.undefined], value); + assert.any([dist.function_, dist.undefined], value); this._internals.request = value; } /** @@ -90777,7 +91084,7 @@ class Options { 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]); + assert.any([dist.object, dist.undefined], value[key]); } if (this._merging) { Object.assign(this._internals.agent, value); @@ -90837,7 +91144,7 @@ class Options { 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]); + assert.any([dist.number, dist.undefined], value[key]); } if (this._merging) { Object.assign(this._internals.timeout, value); @@ -90891,7 +91198,7 @@ class Options { return this._internals.prefixUrl; } set prefixUrl(value) { - assert.any([distribution.string, distribution.urlInstance], value); + assert.any([dist.string, dist.urlInstance], value); if (value === '') { this._internals.prefixUrl = ''; return; @@ -90923,8 +91230,8 @@ class Options { return this._internals.body; } set body(value) { - assert.any([distribution.string, distribution.buffer, distribution.nodeStream, distribution.generator, distribution.asyncGenerator, lib_isFormData, distribution.undefined], value); - if (distribution.nodeStream(value)) { + assert.any([dist.string, dist.buffer, dist.nodeStream, dist.generator, dist.asyncGenerator, lib_isFormData, dist.undefined], value); + if (dist.nodeStream(value)) { assert.truthy(value.readable); } if (value !== undefined) { @@ -90946,7 +91253,7 @@ class Options { return this._internals.form; } set form(value) { - assert.any([distribution.plainObject, distribution.undefined], value); + assert.any([dist.plainObject, dist.undefined], value); if (value !== undefined) { assert.undefined(this._internals.body); assert.undefined(this._internals.json); @@ -90992,12 +91299,12 @@ class Options { return this._internals.url; } set url(value) { - assert.any([distribution.string, distribution.urlInstance, distribution.undefined], value); + assert.any([dist.string, dist.urlInstance, dist.undefined], value); if (value === undefined) { this._internals.url = undefined; return; } - if (distribution.string(value) && value.startsWith('/')) { + if (dist.string(value) && value.startsWith('/')) { throw new Error('`url` must not start with a slash'); } const urlString = `${this.prefixUrl}${value.toString()}`; @@ -91052,14 +91359,14 @@ class Options { return this._internals.cookieJar; } set cookieJar(value) { - assert.any([distribution.object, distribution.undefined], value); + assert.any([dist.object, dist.undefined], value); if (value === undefined) { this._internals.cookieJar = undefined; return; } let { setCookie, getCookieString } = value; - assert["function"](setCookie); - assert["function"](getCookieString); + assert.function_(setCookie); + assert.function_(getCookieString); /* istanbul ignore next: Horrible `tough-cookie` v3 check */ if (setCookie.length === 4 && getCookieString.length === 0) { setCookie = (0,external_node_util_.promisify)(setCookie.bind(value)); @@ -91139,7 +91446,7 @@ class Options { return this._internals.searchParams; } set searchParams(value) { - assert.any([distribution.string, distribution.object, distribution.undefined], value); + assert.any([dist.string, dist.object, dist.undefined], value); const url = this._internals.url; if (value === undefined) { this._internals.searchParams = undefined; @@ -91150,7 +91457,7 @@ class Options { } const searchParameters = this.searchParams; let updated; - if (distribution.string(value)) { + if (dist.string(value)) { updated = new URLSearchParams(value); } else if (value instanceof URLSearchParams) { @@ -91199,7 +91506,7 @@ class Options { return this._internals.dnsLookup; } set dnsLookup(value) { - assert.any([distribution["function"], distribution.undefined], value); + assert.any([dist.function_, dist.undefined], value); this._internals.dnsLookup = value; } /** @@ -91216,7 +91523,7 @@ class Options { return this._internals.dnsCache; } set dnsCache(value) { - assert.any([distribution.object, distribution.boolean, distribution.undefined], value); + assert.any([dist.object, dist.boolean, dist.undefined], value); if (value === true) { this._internals.dnsCache = getGlobalDnsCache(); } @@ -91286,10 +91593,10 @@ class Options { } const typedKnownHookEvent = knownHookEvent; const hooks = value[typedKnownHookEvent]; - assert.any([distribution.array, distribution.undefined], hooks); + assert.any([dist.array, dist.undefined], hooks); if (hooks) { for (const hook of hooks) { - assert["function"](hook); + assert.function_(hook); } } if (this._merging) { @@ -91321,7 +91628,7 @@ class Options { return this._internals.followRedirect; } set followRedirect(value) { - assert.any([distribution.boolean, distribution["function"]], value); + assert.any([dist.boolean, dist.function_], value); this._internals.followRedirect = value; } get followRedirects() { @@ -91351,7 +91658,7 @@ class Options { return this._internals.cache; } set cache(value) { - assert.any([distribution.object, distribution.string, distribution.boolean, distribution.undefined], value); + assert.any([dist.object, dist.string, dist.boolean, dist.undefined], value); if (value === true) { this._internals.cache = globalCache; } @@ -91527,7 +91834,7 @@ class Options { return this._internals.parseJson; } set parseJson(value) { - assert["function"](value); + assert.function_(value); this._internals.parseJson = value; } /** @@ -91575,7 +91882,7 @@ class Options { return this._internals.stringifyJson; } set stringifyJson(value) { - assert["function"](value); + assert.function_(value); this._internals.stringifyJson = value; } /** @@ -91605,13 +91912,13 @@ class Options { } 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); + assert.any([dist.function_, dist.undefined], value.calculateDelay); + assert.any([dist.number, dist.undefined], value.maxRetryAfter); + assert.any([dist.number, dist.undefined], value.limit); + assert.any([dist.array, dist.undefined], value.methods); + assert.any([dist.array, dist.undefined], value.statusCodes); + assert.any([dist.array, dist.undefined], value.errorCodes); + assert.any([dist.number, dist.undefined], value.noise); if (value.noise && Math.abs(value.noise) > 100) { throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`); } @@ -91640,7 +91947,7 @@ class Options { return this._internals.localAddress; } set localAddress(value) { - assert.any([distribution.string, distribution.undefined], value); + assert.any([dist.string, dist.undefined], value); this._internals.localAddress = value; } /** @@ -91659,7 +91966,7 @@ class Options { return this._internals.createConnection; } set createConnection(value) { - assert.any([distribution["function"], distribution.undefined], value); + assert.any([dist.function_, dist.undefined], value); this._internals.createConnection = value; } /** @@ -91672,10 +91979,10 @@ class Options { } 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); + assert.any([dist.boolean, dist.undefined], value.shared); + assert.any([dist.number, dist.undefined], value.cacheHeuristic); + assert.any([dist.number, dist.undefined], value.immutableMinTimeToLive); + assert.any([dist.boolean, dist.undefined], value.ignoreCargoCult); for (const key in value) { if (!(key in this._internals.cacheOptions)) { throw new Error(`Cache option \`${key}\` does not exist`); @@ -91696,23 +92003,23 @@ class Options { } 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); + assert.any([dist.boolean, dist.undefined], value.rejectUnauthorized); + assert.any([dist.function_, dist.undefined], value.checkServerIdentity); + assert.any([dist.string, dist.object, dist.array, dist.undefined], value.certificateAuthority); + assert.any([dist.string, dist.object, dist.array, dist.undefined], value.key); + assert.any([dist.string, dist.object, dist.array, dist.undefined], value.certificate); + assert.any([dist.string, dist.undefined], value.passphrase); + assert.any([dist.string, dist.buffer, dist.array, dist.undefined], value.pfx); + assert.any([dist.array, dist.undefined], value.alpnProtocols); + assert.any([dist.string, dist.undefined], value.ciphers); + assert.any([dist.string, dist.buffer, dist.undefined], value.dhparam); + assert.any([dist.string, dist.undefined], value.signatureAlgorithms); + assert.any([dist.string, dist.undefined], value.minVersion); + assert.any([dist.string, dist.undefined], value.maxVersion); + assert.any([dist.boolean, dist.undefined], value.honorCipherOrder); + assert.any([dist.number, dist.undefined], value.tlsSessionLifetime); + assert.any([dist.string, dist.undefined], value.ecdhCurve); + assert.any([dist.string, dist.buffer, dist.array, dist.undefined], value.certificateRevocationLists); for (const key in value) { if (!(key in this._internals.https)) { throw new Error(`HTTPS option \`${key}\` does not exist`); @@ -91742,7 +92049,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); + assert.any([dist.string, dist.undefined], value); this._internals.encoding = value; } /** @@ -91842,7 +92149,7 @@ class Options { return this._internals.maxHeaderSize; } set maxHeaderSize(value) { - assert.any([distribution.number, distribution.undefined], value); + assert.any([dist.number, dist.undefined], value); this._internals.maxHeaderSize = value; } get enableUnixSockets() { @@ -91871,7 +92178,7 @@ class Options { } const { https } = internals; let { pfx } = https; - if (distribution.array(pfx) && distribution.plainObject(pfx[0])) { + if (dist.array(pfx) && dist.plainObject(pfx[0])) { pfx = pfx.map(object => ({ buf: object.buffer, passphrase: object.passphrase, @@ -91962,7 +92269,7 @@ class Options { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/response.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/response.js const isResponseOk = (response) => { const { statusCode } = response; @@ -92005,19 +92312,19 @@ const parseBody = (response, responseType, parseJson, encoding) => { }, response); }; -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/is-client-request.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/is-client-request.js function isClientRequest(clientRequest) { return clientRequest.writable && !clientRequest.writableEnded; } /* harmony default export */ const is_client_request = (isClientRequest); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/utils/is-unix-socket-url.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/utils/is-unix-socket-url.js // eslint-disable-next-line @typescript-eslint/naming-convention function isUnixSocketURL(url) { return url.protocol === 'unix:' || url.hostname === 'unix'; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/core/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/core/index.js @@ -92039,7 +92346,8 @@ function isUnixSocketURL(url) { -const supportsBrotli = distribution.string(external_node_process_.versions.brotli); + +const supportsBrotli = dist.string(external_node_process_.versions.brotli); const methodsWithoutBody = new Set(['GET', 'HEAD']); const cacheableStore = new WeakableMap(); const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); @@ -92137,7 +92445,7 @@ class Request extends external_node_stream_.Duplex { // Important! If you replace `body` in a handler with another stream, make sure it's readable first. // The below is run only once. const { body } = this.options; - if (distribution.nodeStream(body)) { + if (dist.nodeStream(body)) { body.once('error', error => { if (this._flushed) { this._beforeError(new UploadError(error, this)); @@ -92363,14 +92671,14 @@ class Request extends external_node_stream_.Duplex { this._removeListeners(); if (this.options) { const { body } = this.options; - if (distribution.nodeStream(body)) { + if (dist.nodeStream(body)) { body.destroy(); } } if (this._request) { this._request.destroy(); } - if (error !== null && !distribution.undefined(error) && !(error instanceof RequestError)) { + if (error !== null && !dist.undefined(error) && !(error instanceof RequestError)) { error = new RequestError(error.message, error, this); } callback(error); @@ -92391,10 +92699,10 @@ class Request extends external_node_stream_.Duplex { async _finalizeBody() { const { options } = this; const { headers } = options; - const isForm = !distribution.undefined(options.form); + const isForm = !dist.undefined(options.form); // eslint-disable-next-line @typescript-eslint/naming-convention - const isJSON = !distribution.undefined(options.json); - const isBody = !distribution.undefined(options.body); + const isJSON = !dist.undefined(options.json); + const isBody = !dist.undefined(options.body); const cannotHaveBody = methodsWithoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); this._cannotHaveBody = cannotHaveBody; if (isForm || isJSON || isBody) { @@ -92402,7 +92710,7 @@ class Request extends external_node_stream_.Duplex { throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); } // Serialize body - const noContentType = !distribution.string(headers['content-type']); + const noContentType = !dist.string(headers['content-type']); if (isBody) { // Body is spec-compliant FormData if (lib_isFormData(options.body)) { @@ -92446,7 +92754,7 @@ class Request extends external_node_stream_.Duplex { // Content-Length header field when the request message does not contain // a payload body and the method semantics do not anticipate such a // body. - if (distribution.undefined(headers['content-length']) && distribution.undefined(headers['transfer-encoding']) && !cannotHaveBody && !distribution.undefined(uploadBodySize)) { + if (dist.undefined(headers['content-length']) && dist.undefined(headers['transfer-encoding']) && !cannotHaveBody && !dist.undefined(uploadBodySize)) { headers['content-length'] = String(uploadBodySize); } } @@ -92501,7 +92809,7 @@ class Request extends external_node_stream_.Duplex { }); this.emit('downloadProgress', this.downloadProgress); const rawCookies = response.headers['set-cookie']; - if (distribution.object(options.cookieJar) && rawCookies) { + if (dist.object(options.cookieJar) && rawCookies) { let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); if (options.ignoreInvalidCookies) { // eslint-disable-next-line @typescript-eslint/no-floating-promises @@ -92646,8 +92954,10 @@ class Request extends external_node_stream_.Duplex { } try { // Errors are emitted via the `error` event - const fromArray = await from.toArray(); - const rawBody = isBuffer(fromArray.at(0)) ? external_node_buffer_namespaceObject.Buffer.concat(fromArray) : external_node_buffer_namespaceObject.Buffer.from(fromArray.join('')); + const rawBody = await buffer_getStreamAsBuffer(from); + // TODO: Switch to this: + // let rawBody = await from.toArray(); + // rawBody = Buffer.concat(rawBody); // On retry Request is destroyed with no error, therefore the above will successfully resolve. // So in order to check if this was really successfull, we need to check if it has been properly ended. if (!this.isAborted) { @@ -92708,10 +93018,10 @@ class Request extends external_node_stream_.Duplex { // Send body const { body } = this.options; const currentRequest = this.redirectUrls.length === 0 ? this : this._request ?? this; - if (distribution.nodeStream(body)) { + if (dist.nodeStream(body)) { body.pipe(currentRequest); } - else if (distribution.generator(body) || distribution.asyncGenerator(body)) { + else if (dist.generator(body) || dist.asyncGenerator(body)) { (async () => { try { for await (const chunk of body) { @@ -92724,7 +93034,7 @@ class Request extends external_node_stream_.Duplex { } })(); } - else if (!distribution.undefined(body)) { + else if (!dist.undefined(body)) { this._writeRequest(body, undefined, () => { }); currentRequest.end(); } @@ -92734,10 +93044,10 @@ class Request extends external_node_stream_.Duplex { } _prepareCache(cache) { if (!cacheableStore.has(cache)) { - const cacheableRequest = new dist(((requestOptions, handler) => { + const cacheableRequest = new cacheable_request_dist(((requestOptions, handler) => { const result = requestOptions._request(requestOptions, handler); // TODO: remove this when `cacheable-request` supports async request functions. - if (distribution.promise(result)) { + if (dist.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 @@ -92807,15 +93117,15 @@ class Request extends external_node_stream_.Duplex { const { headers, username, password } = options; const cookieJar = options.cookieJar; for (const key in headers) { - if (distribution.undefined(headers[key])) { + if (dist.undefined(headers[key])) { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete headers[key]; } - else if (distribution["null"](headers[key])) { + else if (dist.null_(headers[key])) { throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`); } } - if (options.decompress && distribution.undefined(headers['accept-encoding'])) { + if (options.decompress && dist.undefined(headers['accept-encoding'])) { headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; } if (username || password) { @@ -92825,7 +93135,7 @@ class Request extends external_node_stream_.Duplex { // Set cookies if (cookieJar) { const cookieString = await cookieJar.getCookieString(options.url.toString()); - if (distribution.nonEmptyString(cookieString)) { + if (dist.nonEmptyString(cookieString)) { headers.cookie = cookieString; } } @@ -92835,7 +93145,7 @@ class Request extends external_node_stream_.Duplex { for (const hook of options.hooks.beforeRequest) { // eslint-disable-next-line no-await-in-loop const result = await hook(options); - if (!distribution.undefined(result)) { + if (!dist.undefined(result)) { // @ts-expect-error Skip the type mismatch to support abstract responses request = () => result; break; @@ -92856,13 +93166,13 @@ class Request extends external_node_stream_.Duplex { // We can't do `await fn(...)`, // because stream `error` event can be emitted before `Promise.resolve()`. let requestOrResponse = function_(url, this._requestOptions); - if (distribution.promise(requestOrResponse)) { + if (dist.promise(requestOrResponse)) { requestOrResponse = await requestOrResponse; } // Fallback - if (distribution.undefined(requestOrResponse)) { + if (dist.undefined(requestOrResponse)) { requestOrResponse = options.getFallbackRequestFunction()(url, this._requestOptions); - if (distribution.promise(requestOrResponse)) { + if (dist.promise(requestOrResponse)) { requestOrResponse = await requestOrResponse; } } @@ -93018,7 +93328,7 @@ class Request extends external_node_stream_.Duplex { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/as-promise/types.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/as-promise/types.js /** An error to be thrown when the request is aborted with `.cancel()`. @@ -93037,7 +93347,7 @@ class types_CancelError extends RequestError { } } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/as-promise/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/as-promise/index.js @@ -93118,7 +93428,7 @@ function asPromise(firstRequest) { 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 (!(dist.object(response) && dist.number(response.statusCode) && !dist.nullOrUndefined(response.body))) { throw new TypeError('The `afterResponse` hook returned an invalid value'); } } @@ -93153,7 +93463,7 @@ function asPromise(firstRequest) { request.once('retry', (newRetryCount, error) => { firstRequest = undefined; const newBody = request.options.body; - if (previousBody === newBody && distribution.nodeStream(newBody)) { + if (previousBody === newBody && dist.nodeStream(newBody)) { error.message = 'Cannot retry with consumed body stream'; onError(error); return; @@ -93164,7 +93474,7 @@ function asPromise(firstRequest) { makeRequest(newRetryCount); }); proxyEvents(request, emitter, as_promise_proxiedRequestEvents); - if (distribution.undefined(firstRequest)) { + if (dist.undefined(firstRequest)) { void request.flush(); } }; @@ -93203,7 +93513,7 @@ function asPromise(firstRequest) { return promise; } -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/create.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/create.js @@ -93212,7 +93522,7 @@ function asPromise(firstRequest) { const delay = async (ms) => new Promise(resolve => { setTimeout(resolve, ms); }); -const isGotInstance = (value) => distribution["function"](value); +const isGotInstance = (value) => dist.function_(value); const aliases = [ 'get', 'post', @@ -93239,9 +93549,9 @@ const create = (defaults) => { const lastHandler = (normalized) => { // Note: `options` is `undefined` when `new Options(...)` fails request.options = normalized; - request._noPipe = !normalized?.isStream; + request._noPipe = !normalized.isStream; void request.flush(); - if (normalized?.isStream) { + if (normalized.isStream) { return request; } promise ||= asPromise(request); @@ -93251,7 +93561,7 @@ const create = (defaults) => { const iterateHandlers = (newOptions) => { const handler = defaults.handlers[iteration++] ?? lastHandler; const result = handler(newOptions, iterateHandlers); - if (distribution.promise(result) && !request.options?.isStream) { + if (dist.promise(result) && !request.options.isStream) { promise ||= asPromise(request); if (result !== promise) { const descriptors = Object.getOwnPropertyDescriptors(promise); @@ -93299,10 +93609,10 @@ const create = (defaults) => { let normalizedOptions = new Options(url, options, defaults.options); normalizedOptions.resolveBodyOnly = false; const { pagination } = normalizedOptions; - assert["function"](pagination.transform); - assert["function"](pagination.shouldContinue); - assert["function"](pagination.filter); - assert["function"](pagination.paginate); + assert.function_(pagination.transform); + assert.function_(pagination.shouldContinue); + assert.function_(pagination.filter); + assert.function_(pagination.paginate); assert.number(pagination.countLimit); assert.number(pagination.requestLimit); assert.number(pagination.backoff); @@ -93348,7 +93658,7 @@ const create = (defaults) => { } else { normalizedOptions.merge(optionsToMerge); - assert.any([distribution.urlInstance, distribution.undefined], optionsToMerge.url); + assert.any([dist.urlInstance, dist.undefined], optionsToMerge.url); if (optionsToMerge.url !== undefined) { normalizedOptions.prefixUrl = ''; normalizedOptions.url = optionsToMerge.url; @@ -93388,7 +93698,7 @@ const create = (defaults) => { }; /* harmony default export */ const source_create = (create); -;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.2/node_modules/got/dist/source/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/got@14.4.0/node_modules/got/dist/source/index.js const defaults = { @@ -93412,14 +93722,20 @@ const got = source_create(defaults); ;// CONCATENATED MODULE: external "node:dns/promises" -const external_node_dns_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns/promises"); +const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns/promises"); // EXTERNAL MODULE: ./node_modules/.pnpm/@actions+cache@3.2.4/node_modules/@actions/cache/lib/cache.js var cache = __nccwpck_require__(6878); ;// CONCATENATED MODULE: external "node:child_process" const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process"); +;// CONCATENATED MODULE: external "node:fs/promises" +const external_node_fs_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); ;// CONCATENATED MODULE: external "node:path" const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@65dd73c562ac60a068340f8e0c040bdcf2c59afe_eek3lsas7notlem5iqjfyrzcca/node_modules/detsys-ts/dist/index.js +;// CONCATENATED MODULE: external "node:stream/promises" +const external_node_stream_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream/promises"); +;// CONCATENATED MODULE: external "node:zlib" +const external_node_zlib_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); +;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@bc45b6c0a6318ae30192c4bf23a73dc879bdb632_gnkvhsupsr4227wkpq3ncrmpsq/node_modules/detsys-ts/dist/index.js var __defProp = Object.defineProperty; var __export = (target, all) => { for (var name in all) @@ -93632,165 +93948,6 @@ async function getDetails() { }; } -// src/errors.ts -function stringifyError(e) { - if (e instanceof Error) { - return e.message; - } else if (typeof e === "string") { - return e; - } else { - return JSON.stringify(e); - } -} - -// src/backtrace.ts - - - - - -async function collectBacktraces(prefixes, startTimestampMs) { - if (isMacOS) { - return await collectBacktracesMacOS(prefixes, startTimestampMs); - } - if (isLinux) { - return await collectBacktracesSystemd(prefixes, startTimestampMs); - } - return /* @__PURE__ */ new Map(); -} -async function collectBacktracesMacOS(prefixes, startTimestampMs) { - const backtraces = /* @__PURE__ */ new Map(); - try { - const { stdout: logJson } = await exec.getExecOutput( - "log", - [ - "show", - "--style", - "json", - "--last", - // Note we collect the last 1m only, because it should only take a few seconds to write the crash log. - // Therefore, any crashes before this 1m should be long done by now. - "1m", - "--no-info", - "--predicate", - "sender = 'ReportCrash'" - ], - { - silent: true - } - ); - const sussyArray = JSON.parse(logJson); - if (!Array.isArray(sussyArray)) { - throw new Error(`Log json isn't an array: ${logJson}`); - } - if (sussyArray.length > 0) { - core.info(`Collecting crash data...`); - const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - await delay(5e3); - } - } catch (e) { - core.debug( - "Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed." - ); - } - const dirs = [ - ["system", "/Library/Logs/DiagnosticReports/"], - ["user", `${process.env["HOME"]}/Library/Logs/DiagnosticReports/`] - ]; - for (const [source, dir] of dirs) { - const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => { - return prefixes.some((prefix) => fileName.startsWith(prefix)); - }).filter((fileName) => { - return !fileName.endsWith(".diag"); - }); - const doGzip = (0,external_node_util_.promisify)(external_node_zlib_namespaceObject.gzip); - for (const fileName of fileNames) { - try { - if ((await (0,promises_namespaceObject.stat)(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) { - const logText = await (0,promises_namespaceObject.readFile)(`${dir}/${fileName}`); - const buf = await doGzip(logText); - backtraces.set( - `backtrace_value_${source}_${fileName}`, - buf.toString("base64") - ); - } - } catch (innerError) { - backtraces.set( - `backtrace_failure_${source}_${fileName}`, - stringifyError(innerError) - ); - } - } - } - return backtraces; -} -async function collectBacktracesSystemd(prefixes, startTimestampMs) { - const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3); - const backtraces = /* @__PURE__ */ new Map(); - const coredumps = []; - try { - const { stdout: coredumpjson } = await exec.getExecOutput( - "coredumpctl", - ["--json=pretty", "list", "--since", `${sinceSeconds} seconds ago`], - { - silent: true - } - ); - const sussyArray = JSON.parse(coredumpjson); - if (!Array.isArray(sussyArray)) { - throw new Error(`Coredump isn't an array: ${coredumpjson}`); - } - for (const sussyObject of sussyArray) { - const keys = Object.keys(sussyObject); - if (keys.includes("exe") && keys.includes("pid")) { - if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { - const execParts = sussyObject.exe.split("/"); - const binaryName = execParts[execParts.length - 1]; - if (prefixes.some((prefix) => binaryName.startsWith(prefix))) { - coredumps.push({ - exe: sussyObject.exe, - pid: sussyObject.pid - }); - } - } else { - core.debug( - `Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}` - ); - } - } else { - core.debug( - `Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}` - ); - } - } - } catch (innerError) { - core.debug( - `Cannot collect backtraces: ${stringifyError(innerError)}` - ); - return backtraces; - } - const doGzip = (0,external_node_util_.promisify)(external_node_zlib_namespaceObject.gzip); - for (const coredump of coredumps) { - try { - const { stdout: logText } = await exec.getExecOutput( - "coredumpctl", - ["info", `${coredump.pid}`], - { - silent: true - } - ); - const buf = await doGzip(logText); - backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString("base64")); - } catch (innerError) { - backtraces.set( - `backtrace_failure_${coredump.pid}`, - stringifyError(innerError) - ); - } - } - return backtraces; -} - // src/correlation.ts @@ -93882,6 +94039,17 @@ function hashEnvironmentVariables(prefix, variables) { return `${prefix}-${hash.digest("hex")}`; } +// src/errors.ts +function stringifyError(e) { + if (e instanceof Error) { + return e.message; + } else if (typeof e === "string") { + return e; + } else { + return JSON.stringify(e); + } +} + // src/ids-host.ts @@ -93893,7 +94061,7 @@ var ALLOWED_SUFFIXES = [ ]; var DEFAULT_IDS_HOST = "https://install.determinate.systems"; var LOOKUP = process.env["IDS_LOOKUP"] ?? DEFAULT_LOOKUP; -var DEFAULT_TIMEOUT = 1e4; +var DEFAULT_TIMEOUT = 3e4; var IdsHost = class { constructor(idsProjectName, diagnosticsSuffix, runtimeDiagnosticsUrl) { this.idsProjectName = idsProjectName; @@ -93908,7 +94076,7 @@ var IdsHost = class { request: DEFAULT_TIMEOUT }, retry: { - limit: Math.max((await this.getUrlsByPreference()).length, 3), + limit: (await this.getUrlsByPreference()).length, methods: ["GET", "HEAD"] }, hooks: { @@ -93918,7 +94086,7 @@ var IdsHost = class { this.markCurrentHostBroken(); const nextUrl = await this.getRootUrl(); if (recordFailoverCallback !== void 0) { - recordFailoverCallback(error3, prevUrl, nextUrl); + recordFailoverCallback(prevUrl, nextUrl); } core.info( `Retrying after error ${error3.code}, retry #: ${retryCount}` @@ -94041,7 +94209,7 @@ function recordToUrl(record) { } } async function discoverServiceRecords() { - return await discoverServicesStub((0,external_node_dns_promises_namespaceObject.resolveSrv)(LOOKUP), 1e3); + return await discoverServicesStub((0,promises_namespaceObject.resolveSrv)(LOOKUP), 1e3); } async function discoverServicesStub(lookup, timeout) { const defaultFallback = new Promise( @@ -94281,7 +94449,6 @@ function noisilyGetInput(suffix, legacyPrefix) { -var EVENT_BACKTRACES = "backtrace"; var EVENT_EXCEPTION = "exception"; var EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit"; var EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss"; @@ -94302,10 +94469,8 @@ var FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error"; var STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase"; var STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found"; var STATE_NOT_FOUND = "not-found"; -var STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id"; -var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; -var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; -var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; +var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 3e4; +var CHECK_IN_ENDPOINT_TIMEOUT_MS = 5e3; var DetSysAction = class { determineExecutionPhase() { const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE); @@ -94331,8 +94496,6 @@ var DetSysAction = class { this.features = {}; this.featureEventMetadata = {}; this.events = []; - this.getCrossPhaseId(); - this.collectBacktraceSetup(); this.facts = { $lib: "idslib", $lib_version: version, @@ -94422,15 +94585,6 @@ var DetSysAction = class { getUniqueId() { return this.identity.run_differentiator || process.env.RUNNER_TRACKING_ID || (0,external_node_crypto_namespaceObject.randomUUID)(); } - // This ID will be saved in the action's state, to be persisted across phase steps - getCrossPhaseId() { - let crossPhaseId = core.getState(STATE_KEY_CROSS_PHASE_ID); - if (crossPhaseId === "") { - crossPhaseId = (0,external_node_crypto_namespaceObject.randomUUID)(); - core.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId); - } - return crossPhaseId; - } getCorrelationHashes() { return this.identity; } @@ -94466,7 +94620,7 @@ var DetSysAction = class { */ async fetchExecutable() { const binaryPath = await this.fetchArtifact(); - await (0,promises_namespaceObject.chmod)(binaryPath, promises_namespaceObject.constants.S_IXUSR | promises_namespaceObject.constants.S_IXGRP); + await (0,external_node_fs_promises_namespaceObject.chmod)(binaryPath, external_node_fs_promises_namespaceObject.constants.S_IXUSR | external_node_fs_promises_namespaceObject.constants.S_IXGRP); return binaryPath; } get isMain() { @@ -94522,22 +94676,16 @@ var DetSysAction = class { } this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext)); } finally { - if (this.isPost) { - await this.collectBacktraces(); - } await this.complete(); } } async getClient() { - return await this.idsHost.getGot( - (incitingError, prevUrl, nextUrl) => { - this.recordPlausibleTimeout(incitingError); - this.recordEvent("ids-failover", { - previousUrl: prevUrl.toString(), - nextUrl: nextUrl.toString() - }); - } - ); + return await this.idsHost.getGot((prevUrl, nextUrl) => { + this.recordEvent("ids-failover", { + previousUrl: prevUrl.toString(), + nextUrl: nextUrl.toString() + }); + }); } async checkIn() { const checkin = await this.requestCheckIn(); @@ -94621,27 +94769,12 @@ var DetSysAction = class { } }).json(); } catch (e) { - this.recordPlausibleTimeout(e); core.debug(`Error checking in: ${stringifyError2(e)}`); this.idsHost.markCurrentHostBroken(); } } return void 0; } - recordPlausibleTimeout(e) { - if (e instanceof TimeoutError && "timings" in e && "request" in e) { - const reportContext = { - url: e.request.requestUrl?.toString(), - retry_count: e.request.retryCount - }; - for (const [key, value] of Object.entries(e.timings.phases)) { - if (Number.isFinite(value)) { - reportContext[`timing_phase_${key}`] = value; - } - } - this.recordEvent("timeout", reportContext); - } - } /** * Fetch an artifact, such as a tarball, from the location determined by the * `source-*` inputs. If `source-binary` is specified, this will return a path @@ -94685,9 +94818,13 @@ var DetSysAction = class { `No match from the cache, re-fetching from the redirect: ${versionCheckup.url}` ); const destFile = this.getTemporaryName(); - const fetchStream = await this.downloadFile( - new URL(versionCheckup.url), - destFile + const fetchStream = (await this.getClient()).stream(versionCheckup.url); + await (0,external_node_stream_promises_namespaceObject.pipeline)( + fetchStream, + (0,external_node_fs_namespaceObject.createWriteStream)(destFile, { + encoding: "binary", + mode: 493 + }) ); if (fetchStream.response?.headers.etag) { const v = fetchStream.response.headers.etag; @@ -94698,9 +94835,6 @@ var DetSysAction = class { } } return destFile; - } catch (e) { - this.recordPlausibleTimeout(e); - throw e; } finally { core.endGroup(); } @@ -94714,36 +94848,6 @@ var DetSysAction = class { core.setFailed(`strict mode failure: ${msg}`); } } - async downloadFile(url, destination) { - const client = await this.getClient(); - return new Promise((resolve, reject) => { - let writeStream; - let failed = false; - const retry = (stream) => { - if (writeStream) { - writeStream.destroy(); - } - writeStream = (0,external_node_fs_namespaceObject.createWriteStream)(destination, { - encoding: "binary", - mode: 493 - }); - writeStream.once("error", (error3) => { - failed = true; - reject(error3); - }); - writeStream.on("finish", () => { - if (!failed) { - resolve(stream); - } - }); - stream.once("retry", (_count, _error, createRetryStream) => { - retry(createRetryStream()); - }); - stream.pipe(writeStream); - }; - retry(client.stream(url)); - }); - } async complete() { this.recordEvent(`complete_${this.executionPhase}`); await this.submitEvents(); @@ -94787,7 +94891,7 @@ var DetSysAction = class { const startCwd = process.cwd(); try { const tempDir = this.getTemporaryName(); - await (0,promises_namespaceObject.mkdir)(tempDir); + await (0,external_node_fs_promises_namespaceObject.mkdir)(tempDir); process.chdir(tempDir); process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; delete process.env.GITHUB_WORKSPACE; @@ -94813,9 +94917,9 @@ var DetSysAction = class { const startCwd = process.cwd(); try { const tempDir = this.getTemporaryName(); - await (0,promises_namespaceObject.mkdir)(tempDir); + await (0,external_node_fs_promises_namespaceObject.mkdir)(tempDir); process.chdir(tempDir); - await (0,promises_namespaceObject.copyFile)(toolPath, `${tempDir}/${this.actionOptions.name}`); + await (0,external_node_fs_promises_namespaceObject.copyFile)(toolPath, `${tempDir}/${this.actionOptions.name}`); process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; delete process.env.GITHUB_WORKSPACE; await cache.saveCache( @@ -94831,41 +94935,13 @@ var DetSysAction = class { process.chdir(startCwd); } } - collectBacktraceSetup() { - if (process.env.DETSYS_BACKTRACE_COLLECTOR === "") { - core.exportVariable( - "DETSYS_BACKTRACE_COLLECTOR", - this.getCrossPhaseId() - ); - core.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now()); - } - } - async collectBacktraces() { - try { - if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) { - return; - } - const backtraces = await collectBacktraces( - this.actionOptions.binaryNamePrefixes, - parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP)) - ); - core.debug(`Backtraces identified: ${backtraces.size}`); - if (backtraces.size > 0) { - this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces)); - } - } catch (innerError) { - core.debug( - `Error collecting backtraces: ${stringifyError2(innerError)}` - ); - } - } async preflightRequireNix() { let nixLocation; const pathParts = (process.env["PATH"] || "").split(":"); for (const location of pathParts) { const candidateNix = external_node_path_namespaceObject.join(location, "nix"); try { - await promises_namespaceObject.access(candidateNix, promises_namespaceObject.constants.X_OK); + await external_node_fs_promises_namespaceObject.access(candidateNix, external_node_fs_promises_namespaceObject.constants.X_OK); core.debug(`Found Nix at ${candidateNix}`); nixLocation = candidateNix; break; @@ -94967,7 +95043,6 @@ var DetSysAction = class { } }); } catch (err) { - this.recordPlausibleTimeout(err); core.debug( `Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError2(err)}` ); @@ -94986,12 +95061,7 @@ function makeOptionsConfident(actionOptions) { eventPrefix: actionOptions.eventPrefix || "action:", fetchStyle: actionOptions.fetchStyle, legacySourcePrefix: actionOptions.legacySourcePrefix, - requireNix: actionOptions.requireNix, - binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [ - "nix", - "determinate-nixd", - actionOptions.name - ] + requireNix: actionOptions.requireNix }; core.debug("idslib options:"); core.debug(JSON.stringify(finalOpts, void 0, 2)); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c65c964..06670d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ dependencies: version: 1.1.1 detsys-ts: specifier: github:DeterminateSystems/detsys-ts - version: github.com/DeterminateSystems/detsys-ts/65dd73c562ac60a068340f8e0c040bdcf2c59afe + version: github.com/DeterminateSystems/detsys-ts/bc45b6c0a6318ae30192c4bf23a73dc879bdb632 devDependencies: '@trivago/prettier-plugin-sort-imports': @@ -21,7 +21,7 @@ devDependencies: version: 4.3.0(prettier@3.2.5) '@typescript-eslint/eslint-plugin': specifier: ^7.11.0 - version: 7.11.0(@typescript-eslint/parser@7.18.0)(eslint@8.57.0)(typescript@5.4.5) + version: 7.11.0(@typescript-eslint/parser@7.12.0)(eslint@8.57.0)(typescript@5.4.5) '@vercel/ncc': specifier: ^0.38.1 version: 0.38.1 @@ -30,13 +30,13 @@ devDependencies: version: 8.57.0 eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@7.18.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + version: 3.6.1(@typescript-eslint/parser@7.12.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-github: specifier: ^4.10.2 version: 4.10.2(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)(typescript@5.4.5) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-prettier: specifier: ^5.1.3 version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) @@ -1055,9 +1055,9 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sindresorhus/is@7.0.0: - resolution: {integrity: sha512-WDTlVTyvFivSOuyvMeedzg2hdoBLZ3f1uNVuEida2Rl9BrfjrIRjWA/VZIrMRLvSwJYCAlCRA3usDt1THytxWQ==} - engines: {node: '>=18'} + /@sindresorhus/is@6.3.1: + resolution: {integrity: sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==} + engines: {node: '>=16'} dev: false /@szmarczak/http-timer@5.0.1: @@ -1145,7 +1145,7 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.18.0)(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.12.0)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1157,7 +1157,7 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/scope-manager': 7.11.0 '@typescript-eslint/type-utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) @@ -1193,8 +1193,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} + /@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-dm/J2UDY3oV3TKius2OUZIFHsomQmpHtsV0FTh1WO8EKgHLQ1QCADUqscPgTpU+ih1e21FQSRjXckHn3txn6kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1203,11 +1203,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.12.0 + debug: 4.3.5 eslint: 8.57.0 typescript: 5.4.5 transitivePeerDependencies: @@ -1222,12 +1222,12 @@ packages: '@typescript-eslint/visitor-keys': 7.11.0 dev: true - /@typescript-eslint/scope-manager@7.18.0: - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + /@typescript-eslint/scope-manager@7.12.0: + resolution: {integrity: sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 dev: true /@typescript-eslint/type-utils@7.11.0(eslint@8.57.0)(typescript@5.4.5): @@ -1255,8 +1255,8 @@ packages: engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/types@7.18.0: - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + /@typescript-eslint/types@7.12.0: + resolution: {integrity: sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg==} engines: {node: ^18.18.0 || >=20.0.0} dev: true @@ -1282,8 +1282,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.18.0(typescript@5.4.5): - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + /@typescript-eslint/typescript-estree@7.12.0(typescript@5.4.5): + resolution: {integrity: sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1291,13 +1291,13 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 + debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 + minimatch: 9.0.4 + semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: @@ -1328,11 +1328,11 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@7.18.0: - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + /@typescript-eslint/visitor-keys@7.12.0: + resolution: {integrity: sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/types': 7.12.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1821,18 +1821,6 @@ packages: ms: 2.1.2 dev: true - /debug@4.3.6: - resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -2145,7 +2133,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.18.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.12.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2155,8 +2143,8 @@ packages: debug: 4.3.5 enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -2193,12 +2181,12 @@ packages: debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.18.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.12.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -2219,11 +2207,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.18.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.12.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color dev: true @@ -2335,7 +2323,7 @@ packages: - supports-color dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -2345,7 +2333,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -2354,7 +2342,7 @@ packages: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.12.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -2723,7 +2711,6 @@ packages: /get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - dev: true /get-stream@9.0.1: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} @@ -2824,21 +2811,21 @@ packages: get-intrinsic: 1.2.4 dev: true - /got@14.4.2: - resolution: {integrity: sha512-+Te/qEZ6hr7i+f0FNgXx/6WQteSM/QqueGvxeYQQFm0GDfoxLVJ/oiwUKYMTeioColWUTdewZ06hmrBjw6F7tw==} + /got@14.4.0: + resolution: {integrity: sha512-baa2HMfREJ9UQSXOPwWe0DNK+FT8Okcxe9kmTJvaetv2q/MUxq0qFzEnfSbxo+wj45/QioGcH5ZhuT9VBIPJ5Q==} engines: {node: '>=20'} dependencies: - '@sindresorhus/is': 7.0.0 + '@sindresorhus/is': 6.3.1 '@szmarczak/http-timer': 5.0.1 cacheable-lookup: 7.0.0 cacheable-request: 12.0.1 decompress-response: 6.0.0 form-data-encoder: 4.0.2 + get-stream: 8.0.1 http2-wrapper: 2.2.1 lowercase-keys: 3.0.0 p-cancelable: 4.0.1 responselike: 3.0.0 - type-fest: 4.25.0 dev: false /graceful-fs@4.2.11: @@ -3396,13 +3383,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -3906,12 +3886,6 @@ packages: hasBin: true dev: true - /semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - dev: true - /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -4282,8 +4256,8 @@ packages: engines: {node: '>=10'} dev: true - /type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} + /type-fest@4.19.0: + resolution: {integrity: sha512-CN2l+hWACRiejlnr68vY0/7734Kzu+9+TOslUXbSCQ1ruY9XIHDBSceVXCcHm/oXrdzhtLMMdJEKfemf1yXiZQ==} engines: {node: '>=16'} dev: false @@ -4645,16 +4619,16 @@ packages: engines: {node: '>=12.20'} dev: true - github.com/DeterminateSystems/detsys-ts/65dd73c562ac60a068340f8e0c040bdcf2c59afe: - resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/65dd73c562ac60a068340f8e0c040bdcf2c59afe} + github.com/DeterminateSystems/detsys-ts/bc45b6c0a6318ae30192c4bf23a73dc879bdb632: + resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/bc45b6c0a6318ae30192c4bf23a73dc879bdb632} name: detsys-ts version: 1.0.0 dependencies: '@actions/cache': 3.2.4 '@actions/core': 1.10.1 '@actions/exec': 1.1.1 - got: 14.4.2 - type-fest: 4.25.0 + got: 14.4.0 + type-fest: 4.19.0 transitivePeerDependencies: - encoding dev: false