diff --git a/out/github-action.cjs b/out/github-action.cjs index 7f24a08..4e78824 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -738,18 +738,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug3("got illegal response body from proxy"); socket.destroy(); - var error = new Error("got illegal response body from proxy"); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("got illegal response body from proxy"); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); return; } @@ -764,9 +764,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error = new Error("tunneling socket could not be established, cause=" + cause.message); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("tunneling socket could not be established, cause=" + cause.message); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); } }; @@ -4581,18 +4581,18 @@ var require_webidl = __commonJS({ webidl.errors.exception = function(message) { return new TypeError(`${message.header}: ${message.message}`); }; - webidl.errors.conversionFailed = function(context2) { - const plural = context2.types.length === 1 ? "" : " one of"; - const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`; + webidl.errors.conversionFailed = function(context3) { + const plural = context3.types.length === 1 ? "" : " one of"; + const message = `${context3.argument} could not be converted to${plural}: ${context3.types.join(", ")}.`; return webidl.errors.exception({ - header: context2.prefix, + header: context3.prefix, message }); }; - webidl.errors.invalidArgument = function(context2) { + webidl.errors.invalidArgument = function(context3) { return webidl.errors.exception({ - header: context2.prefix, - message: `"${context2.value}" is an invalid ${context2.type}.` + header: context3.prefix, + message: `"${context3.value}" is an invalid ${context3.type}.` }); }; webidl.brandCheck = function(V4, I2, opts = void 0) { @@ -5894,7 +5894,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error) => promise.reject(error); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -6180,16 +6180,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -7052,8 +7052,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error) { - this.handler.onError(error); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util4.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -9194,7 +9194,7 @@ var require_pool = __commonJS({ this[kOptions] = { ...util4.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin3, targets, error) => { + this.on("connectionError", (origin3, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -9918,15 +9918,15 @@ var require_api_request = __commonJS({ } addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context3) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context3; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this; + const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this; const headers = responseHeaders === "raw" ? util4.parseRawHeaders(rawHeaders) : util4.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { @@ -9953,7 +9953,7 @@ var require_api_request = __commonJS({ trailers: this.trailers, opaque, body, - context: context2 + context: context3 }); } } @@ -10073,15 +10073,15 @@ var require_api_stream = __commonJS({ } addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context3) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context3; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context: context2, callback, responseHeaders } = this; + const { factory, opaque, context: context3, callback, responseHeaders } = this; const headers = responseHeaders === "raw" ? util4.parseRawHeaders(rawHeaders) : util4.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { @@ -10109,7 +10109,7 @@ var require_api_stream = __commonJS({ statusCode, headers, opaque, - context: context2 + context: context3 }); if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); @@ -10301,17 +10301,17 @@ var require_api_pipeline = __commonJS({ this.res = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context3) { const { ret, res } = this; assert(!res, "pipeline cannot be retried"); if (ret.destroyed) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context3; } onHeaders(statusCode, rawHeaders, resume) { - const { opaque, handler, context: context2 } = this; + const { opaque, handler, context: context3 } = this; if (statusCode < 200) { if (this.onInfo) { const headers = this.responseHeaders === "raw" ? util4.parseRawHeaders(rawHeaders) : util4.parseHeaders(rawHeaders); @@ -10329,7 +10329,7 @@ var require_api_pipeline = __commonJS({ headers, opaque, body: this.res, - context: context2 + context: context3 }); } catch (err) { this.res.on("error", util4.nop); @@ -10413,7 +10413,7 @@ var require_api_upgrade = __commonJS({ this.context = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context3) { if (!this.callback) { throw new RequestAbortedError(); } @@ -10424,7 +10424,7 @@ var require_api_upgrade = __commonJS({ throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context2 } = this; + const { callback, opaque, context: context3 } = this; assert.strictEqual(statusCode, 101); removeSignal(this); this.callback = null; @@ -10433,7 +10433,7 @@ var require_api_upgrade = __commonJS({ headers, socket, opaque, - context: context2 + context: context3 }); } onError(err) { @@ -10501,18 +10501,18 @@ var require_api_connect = __commonJS({ this.abort = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context3) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context3; } onHeaders() { throw new SocketError("bad connect", null); } onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context2 } = this; + const { callback, opaque, context: context3 } = this; removeSignal(this); this.callback = null; let headers = rawHeaders; @@ -10524,7 +10524,7 @@ var require_api_connect = __commonJS({ headers, socket, opaque, - context: context2 + context: context3 }); } onError(err) { @@ -10803,13 +10803,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error }, delay: delay4, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error2 }, delay: delay4, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler.onError(error); + handler.onError(error2); return true; } if (typeof delay4 === "number" && delay4 > 0) { @@ -10847,19 +10847,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); - } catch (error) { - if (error instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin2} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin2} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin2)) { originalDispatch.call(this, opts, handler); } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin2} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin2} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error; + throw error2; } } } else { @@ -11022,11 +11022,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error) { - if (typeof error === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -13353,17 +13353,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error) { - error = new DOMException3("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException3("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error; - this.connection?.destroy(error); - this.emit("terminated", error); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function fetch4(input, init = {}) { @@ -13467,13 +13467,13 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p3, request4, responseObject, error) { - if (!error) { - error = new DOMException3("The operation was aborted.", "AbortError"); + function abortFetch(p3, request4, responseObject, error2) { + if (!error2) { + error2 = new DOMException3("The operation was aborted.", "AbortError"); } - p3.reject(error); + p3.reject(error2); if (request4.body != null && isReadable(request4.body?.stream)) { - request4.body.stream.cancel(error).catch((err) => { + request4.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13485,7 +13485,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -14265,13 +14265,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error); - fetchParams.controller.terminate(error); - reject(error); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -14737,8 +14737,8 @@ var require_util4 = __commonJS({ } fr2[kResult] = result; fireAProgressEvent("load", fr2); - } catch (error) { - fr2[kError] = error; + } catch (error2) { + fr2[kError] = error2; fireAProgressEvent("error", fr2); } if (fr2[kState] !== "loading") { @@ -14747,13 +14747,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error) { + } catch (error2) { if (fr2[kAborted]) { return; } queueMicrotask(() => { fr2[kState] = "done"; - fr2[kError] = error; + fr2[kError] = error2; fireAProgressEvent("error", fr2); if (fr2[kState] !== "loading") { fireAProgressEvent("loadend", fr2); @@ -16753,11 +16753,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error); + channels.socketError.publish(error2); } this.destroy(); } @@ -18389,12 +18389,12 @@ var require_oidc_utils = __commonJS({ var _a5; return __awaiter(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error) => { + const res = yield httpclient.getJson(id_token_url).catch((error2) => { throw new Error(`Failed to get ID Token. - Error Code : ${error.statusCode} + Error Code : ${error2.statusCode} - Error Message: ${error.message}`); + Error Message: ${error2.message}`); }); const id_token = (_a5 = res.result) === null || _a5 === void 0 ? void 0 : _a5.value; if (!id_token) { @@ -18415,8 +18415,8 @@ var require_oidc_utils = __commonJS({ const id_token = yield _OidcClient.getCall(id_token_url); core_1.setSecret(id_token); return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); + } catch (error2) { + throw new Error(`Error message: ${error2.message}`); } }); } @@ -18855,7 +18855,7 @@ var require_core = __commonJS({ process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; - function getInput(name, options) { + function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); @@ -18865,9 +18865,9 @@ var require_core = __commonJS({ } return val.trim(); } - exports2.getInput = getInput; + exports2.getInput = getInput2; function getMultilineInput(name, options) { - const inputs = getInput(name, options).split("\n").filter((x2) => x2 !== ""); + const inputs = getInput2(name, options).split("\n").filter((x2) => x2 !== ""); if (options && options.trimWhitespace === false) { return inputs; } @@ -18877,7 +18877,7 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); + const val = getInput2(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) @@ -18899,11 +18899,11 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); command_1.issue("echo", enabled2 ? "on" : "off"); } exports2.setCommandEcho = setCommandEcho; - function setFailed(message) { + function setFailed2(message) { process.exitCode = ExitCode.Failure; - error(message); + error2(message); } - exports2.setFailed = setFailed; + exports2.setFailed = setFailed2; function isDebug() { return process.env["RUNNER_DEBUG"] === "1"; } @@ -18912,10 +18912,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); command_1.issueCommand("debug", {}, message); } exports2.debug = debug3; - function error(message, properties = {}) { + function error2(message, properties = {}) { command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error; + exports2.error = error2; function warning(message, properties = {}) { command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } @@ -19216,8 +19216,8 @@ var require_add = __commonJS({ } if (kind3 === "error") { hook2 = function(method, options) { - return Promise.resolve().then(method.bind(null, options)).catch(function(error) { - return orig(error, options); + return Promise.resolve().then(method.bind(null, options)).catch(function(error2) { + return orig(error2, options); }); }; } @@ -19467,8 +19467,8 @@ var require_dist_node2 = __commonJS({ function isKeyOperator2(operator) { return operator === ";" || operator === "&" || operator === "?"; } - function getValues2(context2, operator, key, modifier) { - var value = context2[key], result = []; + function getValues2(context3, operator, key, modifier) { + var value = context3[key], result = []; if (isDefined3(value) && value !== "") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { value = value.toString(); @@ -19532,7 +19532,7 @@ var require_dist_node2 = __commonJS({ expand: expand2.bind(null, template) }; } - function expand2(template, context2) { + function expand2(template, context3) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, @@ -19546,7 +19546,7 @@ var require_dist_node2 = __commonJS({ } expression.split(/,/g).forEach(function(variable) { var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues2(context2, operator, tmp[1], tmp[2] || tmp[3])); + values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3])); }); if (operator && operator !== "+") { var separator = ","; @@ -19949,7 +19949,7 @@ var require_dist_node5 = __commonJS({ } if (status >= 400) { const data = await getResponseData2(response); - const error = new import_request_error4.RequestError(toErrorMessage2(data), status, { + const error2 = new import_request_error4.RequestError(toErrorMessage2(data), status, { response: { url: url2, status, @@ -19958,7 +19958,7 @@ var require_dist_node5 = __commonJS({ }, request: requestOptions }); - throw error; + throw error2; } return parseSuccessResponseBody ? await getResponseData2(response) : response.body; }).then((data) => { @@ -19968,17 +19968,17 @@ var require_dist_node5 = __commonJS({ headers, data }; - }).catch((error) => { - if (error instanceof import_request_error4.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; + }).catch((error2) => { + if (error2 instanceof import_request_error4.RequestError) + throw error2; + else if (error2.name === "AbortError") + throw error2; + let message = error2.message; + if (error2.name === "TypeError" && "cause" in error2) { + if (error2.cause instanceof Error) { + message = error2.cause.message; + } else if (typeof error2.cause === "string") { + message = error2.cause; } } throw new import_request_error4.RequestError(message, 500, { @@ -22643,9 +22643,9 @@ var require_dist_node10 = __commonJS({ /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) - throw error; + } catch (error2) { + if (error2.status !== 409) + throw error2; url2 = ""; return { value: { @@ -23042,11 +23042,11 @@ var require_github = __commonJS({ var Context = __importStar(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); - function getOctokit(token, options, ...additionalPlugins) { + function getOctokit2(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); } - exports2.getOctokit = getOctokit; + exports2.getOctokit = getOctokit2; } }); @@ -23295,9 +23295,9 @@ var require_main2 = __commonJS({ const attrs = _instructions(result, key); decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); break; - } catch (error) { + } catch (error2) { if (i3 + 1 >= length) { - throw error; + throw error2; } } } @@ -23325,13 +23325,13 @@ var require_main2 = __commonJS({ let uri; try { uri = new URL(dotenvKey); - } catch (error) { - if (error.code === "ERR_INVALID_URL") { + } catch (error2) { + if (error2.code === "ERR_INVALID_URL") { const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); err.code = "INVALID_DOTENV_KEY"; throw err; } - throw error; + throw error2; } const key = uri.password; if (!key) { @@ -23454,10 +23454,10 @@ var require_main2 = __commonJS({ const aesgcm = crypto6.createDecipheriv("aes-256-gcm", key, nonce); aesgcm.setAuthTag(authTag); return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; - } catch (error) { - const isRange = error instanceof RangeError; - const invalidKeyLength = error.message === "Invalid key length"; - const decryptionFailed = error.message === "Unsupported state or unable to authenticate data"; + } catch (error2) { + const isRange = error2 instanceof RangeError; + const invalidKeyLength = error2.message === "Invalid key length"; + const decryptionFailed = error2.message === "Unsupported state or unable to authenticate data"; if (isRange || invalidKeyLength) { const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); err.code = "INVALID_DOTENV_KEY"; @@ -23467,7 +23467,7 @@ var require_main2 = __commonJS({ err.code = "DECRYPTION_FAILED"; throw err; } else { - throw error; + throw error2; } } } @@ -24230,7 +24230,7 @@ var require_punycode = __commonJS({ var baseMinusTMin = base - tMin; var floor = Math.floor; var stringFromCharCode = String.fromCharCode; - function error(type2) { + function error2(type2) { throw new RangeError(errors[type2]); } function map(array, callback) { @@ -24310,7 +24310,7 @@ var require_punycode = __commonJS({ } for (let j4 = 0; j4 < basic; ++j4) { if (input.charCodeAt(j4) >= 128) { - error("not-basic"); + error2("not-basic"); } output.push(input.charCodeAt(j4)); } @@ -24318,14 +24318,14 @@ var require_punycode = __commonJS({ const oldi = i3; for (let w4 = 1, k4 = base; ; k4 += base) { if (index >= inputLength) { - error("invalid-input"); + error2("invalid-input"); } const digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base) { - error("invalid-input"); + error2("invalid-input"); } if (digit > floor((maxInt - i3) / w4)) { - error("overflow"); + error2("overflow"); } i3 += digit * w4; const t2 = k4 <= bias ? tMin : k4 >= bias + tMax ? tMax : k4 - bias; @@ -24334,14 +24334,14 @@ var require_punycode = __commonJS({ } const baseMinusT = base - t2; if (w4 > floor(maxInt / baseMinusT)) { - error("overflow"); + error2("overflow"); } w4 *= baseMinusT; } const out = output.length + 1; bias = adapt(i3 - oldi, out, oldi == 0); if (floor(i3 / out) > maxInt - n2) { - error("overflow"); + error2("overflow"); } n2 += floor(i3 / out); i3 %= out; @@ -24375,13 +24375,13 @@ var require_punycode = __commonJS({ } const handledCPCountPlusOne = handledCPCount + 1; if (m4 - n2 > floor((maxInt - delta) / handledCPCountPlusOne)) { - error("overflow"); + error2("overflow"); } delta += (m4 - n2) * handledCPCountPlusOne; n2 = m4; for (const currentValue of input) { if (currentValue < n2 && ++delta > maxInt) { - error("overflow"); + error2("overflow"); } if (currentValue === n2) { let q3 = delta; @@ -24664,30 +24664,30 @@ var require_tr46 = __commonJS({ string = string.normalize("NFC"); const labels = string.split("."); const isBidi = isBidiDomain(labels); - let error = false; + let error2 = false; for (const [i3, origLabel] of labels.entries()) { let label = origLabel; let transitionalProcessingForThisLabel = options.transitionalProcessing; if (label.startsWith("xn--")) { if (containsNonASCII(label)) { - error = true; + error2 = true; continue; } try { label = punycode.decode(label.substring(4)); } catch { if (!options.ignoreInvalidPunycode) { - error = true; + error2 = true; continue; } } labels[i3] = label; if (label === "" || !containsNonASCII(label)) { - error = true; + error2 = true; } transitionalProcessingForThisLabel = false; } - if (error) { + if (error2) { continue; } const validation = validateLabel(label, { @@ -24696,12 +24696,12 @@ var require_tr46 = __commonJS({ isBidi }); if (!validation) { - error = true; + error2 = true; } } return { string: labels.join("."), - error + error: error2 }; } function toASCII(domainName, { @@ -26064,9 +26064,9 @@ var require_Function = __commonJS({ "use strict"; var conversions = require_lib2(); var utils = require_utils5(); - exports2.convert = (globalObject, value, { context: context2 = "The provided value" } = {}) => { + exports2.convert = (globalObject, value, { context: context3 = "The provided value" } = {}) => { if (typeof value !== "function") { - throw new globalObject.TypeError(context2 + " is not a function"); + throw new globalObject.TypeError(context3 + " is not a function"); } function invokeTheCallbackFunction(...args) { const thisArg = utils.tryWrapperForImpl(this); @@ -26075,7 +26075,7 @@ var require_Function = __commonJS({ args[i3] = utils.tryWrapperForImpl(args[i3]); } callResult = Reflect.apply(value, thisArg, args); - callResult = conversions["any"](callResult, { context: context2, globals: globalObject }); + callResult = conversions["any"](callResult, { context: context3, globals: globalObject }); return callResult; } invokeTheCallbackFunction.construct = (...args) => { @@ -26083,7 +26083,7 @@ var require_Function = __commonJS({ args[i3] = utils.tryWrapperForImpl(args[i3]); } let callResult = Reflect.construct(value, args); - callResult = conversions["any"](callResult, { context: context2, globals: globalObject }); + callResult = conversions["any"](callResult, { context: context3, globals: globalObject }); return callResult; }; invokeTheCallbackFunction[utils.wrapperSymbol] = value; @@ -26234,11 +26234,11 @@ var require_URLSearchParams = __commonJS({ exports2.isImpl = (value) => { return utils.isObject(value) && value instanceof Impl.implementation; }; - exports2.convert = (globalObject, value, { context: context2 = "The provided value" } = {}) => { + exports2.convert = (globalObject, value, { context: context3 = "The provided value" } = {}) => { if (exports2.is(value)) { return utils.implForWrapper(value); } - throw new globalObject.TypeError(`${context2} is not of type 'URLSearchParams'.`); + throw new globalObject.TypeError(`${context3} is not of type 'URLSearchParams'.`); }; exports2.createDefaultIterator = (globalObject, target, kind3) => { const ctorRegistry = globalObject[ctorRegistrySymbol]; @@ -26870,11 +26870,11 @@ var require_URL = __commonJS({ exports2.isImpl = (value) => { return utils.isObject(value) && value instanceof Impl.implementation; }; - exports2.convert = (globalObject, value, { context: context2 = "The provided value" } = {}) => { + exports2.convert = (globalObject, value, { context: context3 = "The provided value" } = {}) => { if (exports2.is(value)) { return utils.implForWrapper(value); } - throw new globalObject.TypeError(`${context2} is not of type 'URL'.`); + throw new globalObject.TypeError(`${context3} is not of type 'URL'.`); }; function makeWrapper(globalObject, newTarget) { let proto2; @@ -27458,8 +27458,8 @@ var require_lib3 = __commonJS({ this.timeout = timeout; if (body instanceof Stream3) { body.on("error", function(err) { - const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err); - _this[INTERNALS].error = error; + const error2 = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err); + _this[INTERNALS].error = error2; }); } } @@ -28302,13 +28302,13 @@ var require_lib3 = __commonJS({ const signal = request4.signal; let response = null; const abort = function abort2() { - let error = new AbortError2("The user aborted a request."); - reject(error); + let error2 = new AbortError2("The user aborted a request."); + reject(error2); if (request4.body && request4.body instanceof Stream3.Readable) { - destroyStream(request4.body, error); + destroyStream(request4.body, error2); } if (!response || !response.body) return; - response.body.emit("error", error); + response.body.emit("error", error2); }; if (signal && signal.aborted) { abort(); @@ -31023,10 +31023,10 @@ var require_agent2 = __commonJS({ debug3("%s is free, destroy quietly", socket[SOCKET_NAME]); } else { if (reqTimeoutListenerCount === 0) { - const error = new Error("Socket timeout"); - error.code = "ERR_SOCKET_TIMEOUT"; - error.timeout = timeout; - socket.destroy(error); + const error2 = new Error("Socket timeout"); + error2.code = "ERR_SOCKET_TIMEOUT"; + error2.timeout = timeout; + socket.destroy(error2); agent.removeSocket(socket, options); debug3("%s destroy with timeout error", socket[SOCKET_NAME]); } @@ -32043,32 +32043,32 @@ var require_ponyfill_es2018 = __commonJS({ function isDictionary(x2) { return typeof x2 === "object" || typeof x2 === "function"; } - function assertDictionary(obj, context2) { + function assertDictionary(obj, context3) { if (obj !== void 0 && !isDictionary(obj)) { - throw new TypeError(`${context2} is not an object.`); + throw new TypeError(`${context3} is not an object.`); } } - function assertFunction(x2, context2) { + function assertFunction(x2, context3) { if (typeof x2 !== "function") { - throw new TypeError(`${context2} is not a function.`); + throw new TypeError(`${context3} is not a function.`); } } function isObject3(x2) { return typeof x2 === "object" && x2 !== null || typeof x2 === "function"; } - function assertObject(x2, context2) { + function assertObject(x2, context3) { if (!isObject3(x2)) { - throw new TypeError(`${context2} is not an object.`); + throw new TypeError(`${context3} is not an object.`); } } - function assertRequiredArgument(x2, position, context2) { + function assertRequiredArgument(x2, position, context3) { if (x2 === void 0) { - throw new TypeError(`Parameter ${position} is required in '${context2}'.`); + throw new TypeError(`Parameter ${position} is required in '${context3}'.`); } } - function assertRequiredField(x2, field, context2) { + function assertRequiredField(x2, field, context3) { if (x2 === void 0) { - throw new TypeError(`${field} is required in '${context2}'.`); + throw new TypeError(`${field} is required in '${context3}'.`); } } function convertUnrestrictedDouble(value) { @@ -32080,26 +32080,26 @@ var require_ponyfill_es2018 = __commonJS({ function integerPart(x2) { return censorNegativeZero(MathTrunc(x2)); } - function convertUnsignedLongLongWithEnforceRange(value, context2) { + function convertUnsignedLongLongWithEnforceRange(value, context3) { const lowerBound = 0; const upperBound = Number.MAX_SAFE_INTEGER; let x2 = Number(value); x2 = censorNegativeZero(x2); if (!NumberIsFinite(x2)) { - throw new TypeError(`${context2} is not a finite number`); + throw new TypeError(`${context3} is not a finite number`); } x2 = integerPart(x2); if (x2 < lowerBound || x2 > upperBound) { - throw new TypeError(`${context2} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`); + throw new TypeError(`${context3} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`); } if (!NumberIsFinite(x2) || x2 === 0) { return 0; } return x2; } - function assertReadableStream(x2, context2) { + function assertReadableStream(x2, context3) { if (!IsReadableStream(x2)) { - throw new TypeError(`${context2} is not a ReadableStream.`); + throw new TypeError(`${context3} is not a ReadableStream.`); } } function AcquireReadableStreamDefaultReader(stream4) { @@ -33179,26 +33179,26 @@ var require_ponyfill_es2018 = __commonJS({ function byteStreamControllerBrandCheckException(name) { return new TypeError(`ReadableByteStreamController.prototype.${name} can only be used on a ReadableByteStreamController`); } - function convertReaderOptions(options, context2) { - assertDictionary(options, context2); + function convertReaderOptions(options, context3) { + assertDictionary(options, context3); const mode = options === null || options === void 0 ? void 0 : options.mode; return { - mode: mode === void 0 ? void 0 : convertReadableStreamReaderMode(mode, `${context2} has member 'mode' that`) + mode: mode === void 0 ? void 0 : convertReadableStreamReaderMode(mode, `${context3} has member 'mode' that`) }; } - function convertReadableStreamReaderMode(mode, context2) { + function convertReadableStreamReaderMode(mode, context3) { mode = `${mode}`; if (mode !== "byob") { - throw new TypeError(`${context2} '${mode}' is not a valid enumeration value for ReadableStreamReaderMode`); + throw new TypeError(`${context3} '${mode}' is not a valid enumeration value for ReadableStreamReaderMode`); } return mode; } - function convertByobReadOptions(options, context2) { + function convertByobReadOptions(options, context3) { var _a6; - assertDictionary(options, context2); + assertDictionary(options, context3); const min = (_a6 = options === null || options === void 0 ? void 0 : options.min) !== null && _a6 !== void 0 ? _a6 : 1; return { - min: convertUnsignedLongLongWithEnforceRange(min, `${context2} has member 'min' that`) + min: convertUnsignedLongLongWithEnforceRange(min, `${context3} has member 'min' that`) }; } function AcquireReadableStreamBYOBReader(stream4) { @@ -33398,53 +33398,53 @@ var require_ponyfill_es2018 = __commonJS({ } return size; } - function convertQueuingStrategy(init, context2) { - assertDictionary(init, context2); + function convertQueuingStrategy(init, context3) { + assertDictionary(init, context3); const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; const size = init === null || init === void 0 ? void 0 : init.size; return { highWaterMark: highWaterMark === void 0 ? void 0 : convertUnrestrictedDouble(highWaterMark), - size: size === void 0 ? void 0 : convertQueuingStrategySize(size, `${context2} has member 'size' that`) + size: size === void 0 ? void 0 : convertQueuingStrategySize(size, `${context3} has member 'size' that`) }; } - function convertQueuingStrategySize(fn, context2) { - assertFunction(fn, context2); + function convertQueuingStrategySize(fn, context3) { + assertFunction(fn, context3); return (chunk) => convertUnrestrictedDouble(fn(chunk)); } - function convertUnderlyingSink(original, context2) { - assertDictionary(original, context2); + function convertUnderlyingSink(original, context3) { + assertDictionary(original, context3); const abort = original === null || original === void 0 ? void 0 : original.abort; const close = original === null || original === void 0 ? void 0 : original.close; const start = original === null || original === void 0 ? void 0 : original.start; const type2 = original === null || original === void 0 ? void 0 : original.type; const write = original === null || original === void 0 ? void 0 : original.write; return { - abort: abort === void 0 ? void 0 : convertUnderlyingSinkAbortCallback(abort, original, `${context2} has member 'abort' that`), - close: close === void 0 ? void 0 : convertUnderlyingSinkCloseCallback(close, original, `${context2} has member 'close' that`), - start: start === void 0 ? void 0 : convertUnderlyingSinkStartCallback(start, original, `${context2} has member 'start' that`), - write: write === void 0 ? void 0 : convertUnderlyingSinkWriteCallback(write, original, `${context2} has member 'write' that`), + abort: abort === void 0 ? void 0 : convertUnderlyingSinkAbortCallback(abort, original, `${context3} has member 'abort' that`), + close: close === void 0 ? void 0 : convertUnderlyingSinkCloseCallback(close, original, `${context3} has member 'close' that`), + start: start === void 0 ? void 0 : convertUnderlyingSinkStartCallback(start, original, `${context3} has member 'start' that`), + write: write === void 0 ? void 0 : convertUnderlyingSinkWriteCallback(write, original, `${context3} has member 'write' that`), type: type2 }; } - function convertUnderlyingSinkAbortCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSinkAbortCallback(fn, original, context3) { + assertFunction(fn, context3); return (reason) => promiseCall(fn, original, [reason]); } - function convertUnderlyingSinkCloseCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSinkCloseCallback(fn, original, context3) { + assertFunction(fn, context3); return () => promiseCall(fn, original, []); } - function convertUnderlyingSinkStartCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSinkStartCallback(fn, original, context3) { + assertFunction(fn, context3); return (controller) => reflectCall(fn, original, [controller]); } - function convertUnderlyingSinkWriteCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSinkWriteCallback(fn, original, context3) { + assertFunction(fn, context3); return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); } - function assertWritableStream(x2, context2) { + function assertWritableStream(x2, context3) { if (!IsWritableStream(x2)) { - throw new TypeError(`${context2} is not a WritableStream.`); + throw new TypeError(`${context3} is not a WritableStream.`); } } function isAbortSignal(value) { @@ -33659,10 +33659,10 @@ var require_ponyfill_es2018 = __commonJS({ }); return promise; } - function WritableStreamDealWithRejection(stream4, error) { + function WritableStreamDealWithRejection(stream4, error2) { const state2 = stream4._state; if (state2 === "writable") { - WritableStreamStartErroring(stream4, error); + WritableStreamStartErroring(stream4, error2); return; } WritableStreamFinishErroring(stream4); @@ -33713,10 +33713,10 @@ var require_ponyfill_es2018 = __commonJS({ stream4._inFlightWriteRequest._resolve(void 0); stream4._inFlightWriteRequest = void 0; } - function WritableStreamFinishInFlightWriteWithError(stream4, error) { - stream4._inFlightWriteRequest._reject(error); + function WritableStreamFinishInFlightWriteWithError(stream4, error2) { + stream4._inFlightWriteRequest._reject(error2); stream4._inFlightWriteRequest = void 0; - WritableStreamDealWithRejection(stream4, error); + WritableStreamDealWithRejection(stream4, error2); } function WritableStreamFinishInFlightClose(stream4) { stream4._inFlightCloseRequest._resolve(void 0); @@ -33735,14 +33735,14 @@ var require_ponyfill_es2018 = __commonJS({ defaultWriterClosedPromiseResolve(writer); } } - function WritableStreamFinishInFlightCloseWithError(stream4, error) { - stream4._inFlightCloseRequest._reject(error); + function WritableStreamFinishInFlightCloseWithError(stream4, error2) { + stream4._inFlightCloseRequest._reject(error2); stream4._inFlightCloseRequest = void 0; if (stream4._pendingAbortRequest !== void 0) { - stream4._pendingAbortRequest._reject(error); + stream4._pendingAbortRequest._reject(error2); stream4._pendingAbortRequest = void 0; } - WritableStreamDealWithRejection(stream4, error); + WritableStreamDealWithRejection(stream4, error2); } function WritableStreamCloseQueuedOrInFlight(stream4) { if (stream4._closeRequest === void 0 && stream4._inFlightCloseRequest === void 0) { @@ -33959,18 +33959,18 @@ var require_ponyfill_es2018 = __commonJS({ } return WritableStreamDefaultWriterClose(writer); } - function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { + function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error2) { if (writer._closedPromiseState === "pending") { - defaultWriterClosedPromiseReject(writer, error); + defaultWriterClosedPromiseReject(writer, error2); } else { - defaultWriterClosedPromiseResetToRejected(writer, error); + defaultWriterClosedPromiseResetToRejected(writer, error2); } } - function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { + function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error2) { if (writer._readyPromiseState === "pending") { - defaultWriterReadyPromiseReject(writer, error); + defaultWriterReadyPromiseReject(writer, error2); } else { - defaultWriterReadyPromiseResetToRejected(writer, error); + defaultWriterReadyPromiseResetToRejected(writer, error2); } } function WritableStreamDefaultWriterGetDesiredSize(writer) { @@ -34205,9 +34205,9 @@ var require_ponyfill_es2018 = __commonJS({ WritableStreamDefaultControllerProcessWrite(controller, value); } } - function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { + function WritableStreamDefaultControllerErrorIfNeeded(controller, error2) { if (controller._controlledWritableStream._state === "writable") { - WritableStreamDefaultControllerError(controller, error); + WritableStreamDefaultControllerError(controller, error2); } } function WritableStreamDefaultControllerProcessClose(controller) { @@ -34250,10 +34250,10 @@ var require_ponyfill_es2018 = __commonJS({ const desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); return desiredSize <= 0; } - function WritableStreamDefaultControllerError(controller, error) { + function WritableStreamDefaultControllerError(controller, error2) { const stream4 = controller._controlledWritableStream; WritableStreamDefaultControllerClearAlgorithms(controller); - WritableStreamStartErroring(stream4, error); + WritableStreamStartErroring(stream4, error2); } function streamBrandCheckException$2(name) { return new TypeError(`WritableStream.prototype.${name} can only be used on a WritableStream`); @@ -34397,12 +34397,12 @@ var require_ponyfill_es2018 = __commonJS({ let abortAlgorithm; if (signal !== void 0) { abortAlgorithm = () => { - const error = signal.reason !== void 0 ? signal.reason : new DOMException3("Aborted", "AbortError"); + const error2 = signal.reason !== void 0 ? signal.reason : new DOMException3("Aborted", "AbortError"); const actions = []; if (!preventAbort) { actions.push(() => { if (dest._state === "writable") { - return WritableStreamAbort(dest, error); + return WritableStreamAbort(dest, error2); } return promiseResolvedWith(void 0); }); @@ -34410,12 +34410,12 @@ var require_ponyfill_es2018 = __commonJS({ if (!preventCancel) { actions.push(() => { if (source._state === "readable") { - return ReadableStreamCancel(source, error); + return ReadableStreamCancel(source, error2); } return promiseResolvedWith(void 0); }); } - shutdownWithAction(() => Promise.all(actions.map((action) => action())), true, error); + shutdownWithAction(() => Promise.all(actions.map((action) => action())), true, error2); }; if (signal.aborted) { abortAlgorithm(); @@ -34518,25 +34518,25 @@ var require_ponyfill_es2018 = __commonJS({ return null; } } - function shutdown(isError2, error) { + function shutdown(isError2, error2) { if (shuttingDown) { return; } shuttingDown = true; if (dest._state === "writable" && !WritableStreamCloseQueuedOrInFlight(dest)) { - uponFulfillment(waitForWritesToFinish(), () => finalize(isError2, error)); + uponFulfillment(waitForWritesToFinish(), () => finalize(isError2, error2)); } else { - finalize(isError2, error); + finalize(isError2, error2); } } - function finalize(isError2, error) { + function finalize(isError2, error2) { WritableStreamDefaultWriterRelease(writer); ReadableStreamReaderGenericRelease(reader); if (signal !== void 0) { signal.removeEventListener("abort", abortAlgorithm); } if (isError2) { - reject(error); + reject(error2); } else { resolve(void 0); } @@ -35206,8 +35206,8 @@ var require_ponyfill_es2018 = __commonJS({ stream4 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, 0); return stream4; } - function convertUnderlyingDefaultOrByteSource(source, context2) { - assertDictionary(source, context2); + function convertUnderlyingDefaultOrByteSource(source, context3) { + assertDictionary(source, context3); const original = source; const autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize; const cancel = original === null || original === void 0 ? void 0 : original.cancel; @@ -35215,45 +35215,45 @@ var require_ponyfill_es2018 = __commonJS({ const start = original === null || original === void 0 ? void 0 : original.start; const type2 = original === null || original === void 0 ? void 0 : original.type; return { - autoAllocateChunkSize: autoAllocateChunkSize === void 0 ? void 0 : convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, `${context2} has member 'autoAllocateChunkSize' that`), - cancel: cancel === void 0 ? void 0 : convertUnderlyingSourceCancelCallback(cancel, original, `${context2} has member 'cancel' that`), - pull: pull === void 0 ? void 0 : convertUnderlyingSourcePullCallback(pull, original, `${context2} has member 'pull' that`), - start: start === void 0 ? void 0 : convertUnderlyingSourceStartCallback(start, original, `${context2} has member 'start' that`), - type: type2 === void 0 ? void 0 : convertReadableStreamType(type2, `${context2} has member 'type' that`) + autoAllocateChunkSize: autoAllocateChunkSize === void 0 ? void 0 : convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, `${context3} has member 'autoAllocateChunkSize' that`), + cancel: cancel === void 0 ? void 0 : convertUnderlyingSourceCancelCallback(cancel, original, `${context3} has member 'cancel' that`), + pull: pull === void 0 ? void 0 : convertUnderlyingSourcePullCallback(pull, original, `${context3} has member 'pull' that`), + start: start === void 0 ? void 0 : convertUnderlyingSourceStartCallback(start, original, `${context3} has member 'start' that`), + type: type2 === void 0 ? void 0 : convertReadableStreamType(type2, `${context3} has member 'type' that`) }; } - function convertUnderlyingSourceCancelCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSourceCancelCallback(fn, original, context3) { + assertFunction(fn, context3); return (reason) => promiseCall(fn, original, [reason]); } - function convertUnderlyingSourcePullCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSourcePullCallback(fn, original, context3) { + assertFunction(fn, context3); return (controller) => promiseCall(fn, original, [controller]); } - function convertUnderlyingSourceStartCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertUnderlyingSourceStartCallback(fn, original, context3) { + assertFunction(fn, context3); return (controller) => reflectCall(fn, original, [controller]); } - function convertReadableStreamType(type2, context2) { + function convertReadableStreamType(type2, context3) { type2 = `${type2}`; if (type2 !== "bytes") { - throw new TypeError(`${context2} '${type2}' is not a valid enumeration value for ReadableStreamType`); + throw new TypeError(`${context3} '${type2}' is not a valid enumeration value for ReadableStreamType`); } return type2; } - function convertIteratorOptions(options, context2) { - assertDictionary(options, context2); + function convertIteratorOptions(options, context3) { + assertDictionary(options, context3); const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; return { preventCancel: Boolean(preventCancel) }; } - function convertPipeOptions(options, context2) { - assertDictionary(options, context2); + function convertPipeOptions(options, context3) { + assertDictionary(options, context3); const preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort; const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; const preventClose = options === null || options === void 0 ? void 0 : options.preventClose; const signal = options === null || options === void 0 ? void 0 : options.signal; if (signal !== void 0) { - assertAbortSignal(signal, `${context2} has member 'signal' that`); + assertAbortSignal(signal, `${context3} has member 'signal' that`); } return { preventAbort: Boolean(preventAbort), @@ -35262,19 +35262,19 @@ var require_ponyfill_es2018 = __commonJS({ signal }; } - function assertAbortSignal(signal, context2) { + function assertAbortSignal(signal, context3) { if (!isAbortSignal(signal)) { - throw new TypeError(`${context2} is not an AbortSignal.`); + throw new TypeError(`${context3} is not an AbortSignal.`); } } - function convertReadableWritablePair(pair, context2) { - assertDictionary(pair, context2); + function convertReadableWritablePair(pair, context3) { + assertDictionary(pair, context3); const readable = pair === null || pair === void 0 ? void 0 : pair.readable; assertRequiredField(readable, "readable", "ReadableWritablePair"); - assertReadableStream(readable, `${context2} has member 'readable' that`); + assertReadableStream(readable, `${context3} has member 'readable' that`); const writable = pair === null || pair === void 0 ? void 0 : pair.writable; assertRequiredField(writable, "writable", "ReadableWritablePair"); - assertWritableStream(writable, `${context2} has member 'writable' that`); + assertWritableStream(writable, `${context3} has member 'writable' that`); return { readable, writable }; } class ReadableStream7 { @@ -35529,8 +35529,8 @@ var require_ponyfill_es2018 = __commonJS({ function streamBrandCheckException$1(name) { return new TypeError(`ReadableStream.prototype.${name} can only be used on a ReadableStream`); } - function convertQueuingStrategyInit(init, context2) { - assertDictionary(init, context2); + function convertQueuingStrategyInit(init, context3) { + assertDictionary(init, context3); const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; assertRequiredField(highWaterMark, "highWaterMark", "QueuingStrategyInit"); return { @@ -35640,8 +35640,8 @@ var require_ponyfill_es2018 = __commonJS({ } return x2 instanceof CountQueuingStrategy2; } - function convertTransformer(original, context2) { - assertDictionary(original, context2); + function convertTransformer(original, context3) { + assertDictionary(original, context3); const cancel = original === null || original === void 0 ? void 0 : original.cancel; const flush = original === null || original === void 0 ? void 0 : original.flush; const readableType = original === null || original === void 0 ? void 0 : original.readableType; @@ -35649,28 +35649,28 @@ var require_ponyfill_es2018 = __commonJS({ const transform = original === null || original === void 0 ? void 0 : original.transform; const writableType = original === null || original === void 0 ? void 0 : original.writableType; return { - cancel: cancel === void 0 ? void 0 : convertTransformerCancelCallback(cancel, original, `${context2} has member 'cancel' that`), - flush: flush === void 0 ? void 0 : convertTransformerFlushCallback(flush, original, `${context2} has member 'flush' that`), + cancel: cancel === void 0 ? void 0 : convertTransformerCancelCallback(cancel, original, `${context3} has member 'cancel' that`), + flush: flush === void 0 ? void 0 : convertTransformerFlushCallback(flush, original, `${context3} has member 'flush' that`), readableType, - start: start === void 0 ? void 0 : convertTransformerStartCallback(start, original, `${context2} has member 'start' that`), - transform: transform === void 0 ? void 0 : convertTransformerTransformCallback(transform, original, `${context2} has member 'transform' that`), + start: start === void 0 ? void 0 : convertTransformerStartCallback(start, original, `${context3} has member 'start' that`), + transform: transform === void 0 ? void 0 : convertTransformerTransformCallback(transform, original, `${context3} has member 'transform' that`), writableType }; } - function convertTransformerFlushCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertTransformerFlushCallback(fn, original, context3) { + assertFunction(fn, context3); return (controller) => promiseCall(fn, original, [controller]); } - function convertTransformerStartCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertTransformerStartCallback(fn, original, context3) { + assertFunction(fn, context3); return (controller) => reflectCall(fn, original, [controller]); } - function convertTransformerTransformCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertTransformerTransformCallback(fn, original, context3) { + assertFunction(fn, context3); return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); } - function convertTransformerCancelCallback(fn, original, context2) { - assertFunction(fn, context2); + function convertTransformerCancelCallback(fn, original, context3) { + assertFunction(fn, context3); return (reason) => promiseCall(fn, original, [reason]); } class TransformStream3 { @@ -35931,8 +35931,8 @@ var require_ponyfill_es2018 = __commonJS({ const stream4 = controller._controlledTransformStream; const readableController = stream4._readable._readableStreamController; ReadableStreamDefaultControllerClose(readableController); - const error = new TypeError("TransformStream terminated"); - TransformStreamErrorWritableAndUnblockWrite(stream4, error); + const error2 = new TypeError("TransformStream terminated"); + TransformStreamErrorWritableAndUnblockWrite(stream4, error2); } function TransformStreamDefaultSinkWriteAlgorithm(stream4, chunk) { const controller = stream4._transformStreamController; @@ -45144,17 +45144,17 @@ var require_iterate = __commonJS({ module2.exports = iterate; function iterate(list, iterator3, state2, callback) { var key = state2["keyedList"] ? state2["keyedList"][state2.index] : state2.index; - state2.jobs[key] = runJob(iterator3, key, list[key], function(error, output) { + state2.jobs[key] = runJob(iterator3, key, list[key], function(error2, output) { if (!(key in state2.jobs)) { return; } delete state2.jobs[key]; - if (error) { + if (error2) { abort(state2); } else { state2.results[key] = output; } - callback(error, state2.results); + callback(error2, state2.results); }); } function runJob(iterator3, key, item, callback) { @@ -45218,9 +45218,9 @@ var require_parallel = __commonJS({ function parallel(list, iterator3, callback) { var state2 = initState(list); while (state2.index < (state2["keyedList"] || list).length) { - iterate(list, iterator3, state2, function(error, result) { - if (error) { - callback(error, result); + iterate(list, iterator3, state2, function(error2, result) { + if (error2) { + callback(error2, result); return; } if (Object.keys(state2.jobs).length === 0) { @@ -45246,9 +45246,9 @@ var require_serialOrdered = __commonJS({ module2.exports.descending = descending; function serialOrdered(list, iterator3, sortMethod, callback) { var state2 = initState(list, sortMethod); - iterate(list, iterator3, state2, function iteratorHandler(error, result) { - if (error) { - callback(error, result); + iterate(list, iterator3, state2, function iteratorHandler(error2, result) { + if (error2) { + callback(error2, result); return; } state2.index++; @@ -45592,10 +45592,10 @@ var require_form_data = __commonJS({ this.pipe(request4); if (cb) { var onResponse; - var callback = function(error, responce) { + var callback = function(error2, responce) { request4.removeListener("error", callback); request4.removeListener("response", onResponse); - return cb.call(this, error, responce); + return cb.call(this, error2, responce); }; onResponse = callback.bind(this, null); request4.on("error", callback); @@ -45987,14 +45987,14 @@ var require_browser = __commonJS({ } else { exports2.storage.removeItem("debug"); } - } catch (error) { + } catch (error2) { } } function load() { let r3; try { r3 = exports2.storage.getItem("debug"); - } catch (error) { + } catch (error2) { } if (!r3 && typeof process !== "undefined" && "env" in process) { r3 = process.env.DEBUG; @@ -46004,7 +46004,7 @@ var require_browser = __commonJS({ function localstorage() { try { return localStorage; - } catch (error) { + } catch (error2) { } } module2.exports = require_common()(exports2); @@ -46012,8 +46012,8 @@ var require_browser = __commonJS({ formatters.j = function(v2) { try { return JSON.stringify(v2); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; + } catch (error2) { + return "[UnexpectedJSONParseError]: " + error2.message; } }; } @@ -46233,7 +46233,7 @@ var require_node = __commonJS({ 221 ]; } - } catch (error) { + } catch (error2) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); @@ -46327,7 +46327,7 @@ var require_debug = __commonJS({ if (!debug3) { try { debug3 = require_src2()("follow-redirects"); - } catch (error) { + } catch (error2) { } if (typeof debug3 !== "function") { debug3 = function() { @@ -46352,8 +46352,8 @@ var require_follow_redirects = __commonJS({ var useNativeURL = false; try { assert(new URL3()); - } catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; + } catch (error2) { + useNativeURL = error2.code === "ERR_INVALID_URL"; } var preservedUrlFields = [ "auth", @@ -46427,9 +46427,9 @@ var require_follow_redirects = __commonJS({ this._currentRequest.abort(); this.emit("abort"); }; - RedirectableRequest.prototype.destroy = function(error) { - destroyRequest(this._currentRequest, error); - destroy2.call(this, error); + RedirectableRequest.prototype.destroy = function(error2) { + destroyRequest(this._currentRequest, error2); + destroy2.call(this, error2); return this; }; RedirectableRequest.prototype.write = function(data, encoding, callback) { @@ -46596,10 +46596,10 @@ var require_follow_redirects = __commonJS({ var i3 = 0; var self2 = this; var buffers = this._requestBodyBuffers; - (function writeNext(error) { + (function writeNext(error2) { if (request4 === self2._currentRequest) { - if (error) { - self2.emit("error", error); + if (error2) { + self2.emit("error", error2); } else if (i3 < buffers.length) { var buffer = buffers[i3++]; if (!request4.finished) { @@ -46796,12 +46796,12 @@ var require_follow_redirects = __commonJS({ }); return CustomError; } - function destroyRequest(request4, error) { + function destroyRequest(request4, error2) { for (var event of events) { request4.removeListener(event, eventHandlers[event]); } request4.on("error", noop4); - request4.destroy(error); + request4.destroy(error2); } function isSubdomain(subdomain, domain) { assert(isString2(subdomain) && isString2(domain)); @@ -50174,9 +50174,9 @@ var require_hooks = __commonJS({ } return res; } - async afterError(hookCtx, response, error) { + async afterError(hookCtx, response, error2) { let res = response; - let err = error; + let err = error2; for (const hook2 of this.afterErrorHooks) { const result = await hook2.afterError(hookCtx, res, err); res = result.response; @@ -50259,8 +50259,8 @@ var require_fp = __commonJS({ function OK(value) { return { ok: true, value }; } - function ERR(error) { - return { ok: false, error }; + function ERR(error2) { + return { ok: false, error: error2 }; } function unwrap(r3) { if (!r3.ok) { @@ -50476,8 +50476,8 @@ var require_ZodError = __commonJS({ return issue.message; }; const fieldErrors = { _errors: [] }; - const processError = (error) => { - for (const issue of error.issues) { + const processError = (error2) => { + for (const issue of error2.issues) { if (issue.code === "invalid_union") { issue.unionErrors.map(processError); } else if (issue.code === "invalid_return_type") { @@ -50540,8 +50540,8 @@ var require_ZodError = __commonJS({ }; exports2.ZodError = ZodError; ZodError.create = (issues) => { - const error = new ZodError(issues); - return error; + const error2 = new ZodError(issues); + return error2; }; } }); @@ -50884,8 +50884,8 @@ var require_types = __commonJS({ get error() { if (this._error) return this._error; - const error = new ZodError_1.ZodError(ctx.common.issues); - this._error = error; + const error2 = new ZodError_1.ZodError(ctx.common.issues); + this._error = error2; return this._error; } }; @@ -53438,7 +53438,7 @@ var require_types = __commonJS({ }); return parseUtil_1.INVALID; } - function makeArgsIssue(args, error) { + function makeArgsIssue(args, error2) { return (0, parseUtil_1.makeIssue)({ data: args, path: ctx.path, @@ -53450,11 +53450,11 @@ var require_types = __commonJS({ ].filter((x2) => !!x2), issueData: { code: ZodError_1.ZodIssueCode.invalid_arguments, - argumentsError: error + argumentsError: error2 } }); } - function makeReturnsIssue(returns, error) { + function makeReturnsIssue(returns, error2) { return (0, parseUtil_1.makeIssue)({ data: returns, path: ctx.path, @@ -53466,7 +53466,7 @@ var require_types = __commonJS({ ].filter((x2) => !!x2), issueData: { code: ZodError_1.ZodIssueCode.invalid_return_type, - returnTypeError: error + returnTypeError: error2 } }); } @@ -53475,15 +53475,15 @@ var require_types = __commonJS({ if (this._def.returns instanceof ZodPromise) { const me2 = this; return (0, parseUtil_1.OK)(async function(...args) { - const error = new ZodError_1.ZodError([]); + const error2 = new ZodError_1.ZodError([]); const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e3) => { - error.addIssue(makeArgsIssue(args, e3)); - throw error; + error2.addIssue(makeArgsIssue(args, e3)); + throw error2; }); const result = await Reflect.apply(fn, this, parsedArgs); const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e3) => { - error.addIssue(makeReturnsIssue(result, e3)); - throw error; + error2.addIssue(makeReturnsIssue(result, e3)); + throw error2; }); return parsedReturns; }); @@ -55163,7 +55163,7 @@ var require_sdks = __commonJS({ __classPrivateFieldSet11(this, _ClientSDK_logger, console, "f"); } } - _createRequest(context2, conf, options) { + _createRequest(context3, conf, options) { var _a5, _b2, _c2, _d2; const { method, path: path2, query, headers: opHeaders, security } = conf; const base = (_a5 = conf.baseURL) !== null && _a5 !== void 0 ? _a5 : this._baseURL; @@ -55232,7 +55232,7 @@ var require_sdks = __commonJS({ } let input; try { - input = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeCreateRequest(context2, { + input = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeCreateRequest(context3, { url: reqURL, options: { ...fetchOptions, @@ -55249,9 +55249,9 @@ var require_sdks = __commonJS({ return (0, fp_js_1.OK)(new Request(input.url, input.options)); } async _do(request4, options) { - const { context: context2, errorCodes } = options; + const { context: context3, errorCodes } = options; return (0, retries_js_1.retry)(async () => { - const req = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeRequest(context2, request4.clone()); + const req = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeRequest(context3, request4.clone()); await logRequest(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), req).catch((e3) => { var _a5; return (_a5 = __classPrivateFieldGet13(this, _ClientSDK_logger, "f")) === null || _a5 === void 0 ? void 0 : _a5.log("Failed to log request:", e3); @@ -55259,13 +55259,13 @@ var require_sdks = __commonJS({ let response = await __classPrivateFieldGet13(this, _ClientSDK_httpClient, "f").request(req); try { if ((0, http_js_1.matchStatusCode)(response, errorCodes)) { - const result = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterError(context2, response, null); + const result = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterError(context3, response, null); if (result.error) { throw result.error; } response = result.response || response; } else { - response = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterSuccess(context2, response); + response = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterSuccess(context3, response); } } finally { await logResponse(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), response, req).catch((e3) => { @@ -63707,7 +63707,7 @@ var require_agentsComplete = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "agents_completion_v1_agents_completions_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -63715,7 +63715,7 @@ var require_agentsComplete = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -63728,10 +63728,10 @@ var require_agentsComplete = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -63806,7 +63806,7 @@ var require_agentsStream = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "stream_agents", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -63814,7 +63814,7 @@ var require_agentsStream = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -63827,10 +63827,10 @@ var require_agentsStream = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65432,7 +65432,7 @@ var require_batchJobsCancel = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_batch_cancel_batch_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -65440,7 +65440,7 @@ var require_batchJobsCancel = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -65453,10 +65453,10 @@ var require_batchJobsCancel = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65525,7 +65525,7 @@ var require_batchJobsCreate = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_batch_create_batch_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -65533,7 +65533,7 @@ var require_batchJobsCreate = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -65546,10 +65546,10 @@ var require_batchJobsCreate = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65624,7 +65624,7 @@ var require_batchJobsGet = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_batch_get_batch_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -65632,7 +65632,7 @@ var require_batchJobsGet = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -65645,10 +65645,10 @@ var require_batchJobsGet = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65726,7 +65726,7 @@ var require_batchJobsList = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_batch_get_batch_jobs", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -65734,7 +65734,7 @@ var require_batchJobsList = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -65748,10 +65748,10 @@ var require_batchJobsList = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65893,7 +65893,7 @@ var require_chatComplete = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "chat_completion_v1_chat_completions_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -65901,7 +65901,7 @@ var require_chatComplete = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -65914,10 +65914,10 @@ var require_chatComplete = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -65992,7 +65992,7 @@ var require_chatStream = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "stream_chat", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66000,7 +66000,7 @@ var require_chatStream = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -66013,10 +66013,10 @@ var require_chatStream = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66128,7 +66128,7 @@ var require_classifiersModerate = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "moderations_v1_moderations_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66136,7 +66136,7 @@ var require_classifiersModerate = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -66149,10 +66149,10 @@ var require_classifiersModerate = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66225,7 +66225,7 @@ var require_classifiersModerateChat = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "moderations_chat_v1_chat_moderations_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66233,7 +66233,7 @@ var require_classifiersModerateChat = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -66246,10 +66246,10 @@ var require_classifiersModerateChat = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66350,7 +66350,7 @@ var require_embeddingsCreate = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "embeddings_v1_embeddings_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66358,7 +66358,7 @@ var require_embeddingsCreate = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -66371,10 +66371,10 @@ var require_embeddingsCreate = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66476,7 +66476,7 @@ var require_filesDelete = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_delete_file", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66484,7 +66484,7 @@ var require_filesDelete = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "DELETE", path: path2, @@ -66497,10 +66497,10 @@ var require_filesDelete = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66575,7 +66575,7 @@ var require_filesDownload = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_download_file", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66583,7 +66583,7 @@ var require_filesDownload = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -66596,10 +66596,10 @@ var require_filesDownload = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66677,7 +66677,7 @@ var require_filesGetSignedUrl = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_get_signed_url", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66685,7 +66685,7 @@ var require_filesGetSignedUrl = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -66699,10 +66699,10 @@ var require_filesGetSignedUrl = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66779,7 +66779,7 @@ var require_filesList = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_list_files", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66787,7 +66787,7 @@ var require_filesList = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -66801,10 +66801,10 @@ var require_filesList = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -66879,7 +66879,7 @@ var require_filesRetrieve = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_retrieve_file", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -66887,7 +66887,7 @@ var require_filesRetrieve = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -66900,10 +66900,10 @@ var require_filesRetrieve = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67002,7 +67002,7 @@ var require_filesUpload = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "files_api_routes_upload_file", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67010,7 +67010,7 @@ var require_filesUpload = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67023,10 +67023,10 @@ var require_filesUpload = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67171,7 +67171,7 @@ var require_fimComplete = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "fim_completion_v1_fim_completions_post", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67179,7 +67179,7 @@ var require_fimComplete = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67192,10 +67192,10 @@ var require_fimComplete = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67270,7 +67270,7 @@ var require_fimStream = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "stream_fim", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67278,7 +67278,7 @@ var require_fimStream = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67291,10 +67291,10 @@ var require_fimStream = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67414,7 +67414,7 @@ var require_fineTuningJobsCancel = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_cancel_fine_tuning_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67422,7 +67422,7 @@ var require_fineTuningJobsCancel = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67435,10 +67435,10 @@ var require_fineTuningJobsCancel = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67508,7 +67508,7 @@ var require_fineTuningJobsCreate = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_create_fine_tuning_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67516,7 +67516,7 @@ var require_fineTuningJobsCreate = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67529,10 +67529,10 @@ var require_fineTuningJobsCreate = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67607,7 +67607,7 @@ var require_fineTuningJobsGet = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_get_fine_tuning_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67615,7 +67615,7 @@ var require_fineTuningJobsGet = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -67628,10 +67628,10 @@ var require_fineTuningJobsGet = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67711,7 +67711,7 @@ var require_fineTuningJobsList = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_get_fine_tuning_jobs", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67719,7 +67719,7 @@ var require_fineTuningJobsList = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -67733,10 +67733,10 @@ var require_fineTuningJobsList = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67811,7 +67811,7 @@ var require_fineTuningJobsStart = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_start_fine_tuning_job", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -67819,7 +67819,7 @@ var require_fineTuningJobsStart = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -67832,10 +67832,10 @@ var require_fineTuningJobsStart = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -67992,7 +67992,7 @@ var require_modelsArchive = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_archive_fine_tuned_model", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68000,7 +68000,7 @@ var require_modelsArchive = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "POST", path: path2, @@ -68013,10 +68013,10 @@ var require_modelsArchive = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68092,7 +68092,7 @@ var require_modelsDelete = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "delete_model_v1_models__model_id__delete", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68100,7 +68100,7 @@ var require_modelsDelete = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "DELETE", path: path2, @@ -68113,10 +68113,10 @@ var require_modelsDelete = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68180,7 +68180,7 @@ var require_modelsList = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "list_models_v1_models_get", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68188,7 +68188,7 @@ var require_modelsList = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -68200,10 +68200,10 @@ var require_modelsList = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68281,7 +68281,7 @@ var require_modelsRetrieve = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "retrieve_model_v1_models__model_id__get", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68289,7 +68289,7 @@ var require_modelsRetrieve = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "GET", path: path2, @@ -68302,10 +68302,10 @@ var require_modelsRetrieve = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["422", "4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68383,7 +68383,7 @@ var require_modelsUnarchive = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_unarchive_fine_tuned_model", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68391,7 +68391,7 @@ var require_modelsUnarchive = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "DELETE", path: path2, @@ -68404,10 +68404,10 @@ var require_modelsUnarchive = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68483,7 +68483,7 @@ var require_modelsUpdate = __commonJS({ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput); - const context2 = { + const context3 = { operationID: "jobs_api_routes_fine_tuning_update_fine_tuned_model", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -68491,7 +68491,7 @@ var require_modelsUpdate = __commonJS({ retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client._options.retryConfig || { strategy: "none" }, retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"] }; - const requestRes = client._createRequest(context2, { + const requestRes = client._createRequest(context3, { security: requestSecurity, method: "PATCH", path: path2, @@ -68504,10 +68504,10 @@ var require_modelsUpdate = __commonJS({ } const req = requestRes.value; const doResult = await client._do(req, { - context: context2, + context: context3, errorCodes: ["4XX", "5XX"], - retryConfig: context2.retryConfig, - retryCodes: context2.retryCodes + retryConfig: context3.retryConfig, + retryCodes: context3.retryCodes }); if (!doResult.ok) { return doResult; @@ -68870,8 +68870,8 @@ function addHook(state2, kind3, name, hook2) { } if (kind3 === "error") { hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error) => { - return orig(error, options); + return Promise.resolve().then(method.bind(null, options)).catch((error2) => { + return orig(error2, options); }); }; } @@ -69063,8 +69063,8 @@ function isDefined2(value) { function isKeyOperator(operator) { return operator === ";" || operator === "&" || operator === "?"; } -function getValues(context2, operator, key, modifier) { - var value = context2[key], result = []; +function getValues(context3, operator, key, modifier) { + var value = context3[key], result = []; if (isDefined2(value) && value !== "") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { value = value.toString(); @@ -69128,7 +69128,7 @@ function parseUrl(template) { expand: expand.bind(null, template) }; } -function expand(template, context2) { +function expand(template, context3) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, @@ -69142,7 +69142,7 @@ function expand(template, context2) { } expression.split(/,/g).forEach(function(variable) { var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context2, operator, tmp[1], tmp[2] || tmp[3])); + values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3])); }); if (operator && operator !== "+") { var separator = ","; @@ -69441,26 +69441,26 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error) { + } catch (error2) { let message = "Unknown Error"; - if (error instanceof Error) { - if (error.name === "AbortError") { - error.status = 500; - throw error; + if (error2 instanceof Error) { + if (error2.name === "AbortError") { + error2.status = 500; + throw error2; } - message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; + message = error2.message; + if (error2.name === "TypeError" && "cause" in error2) { + if (error2.cause instanceof Error) { + message = error2.cause.message; + } else if (typeof error2.cause === "string") { + message = error2.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error; + requestError.cause = error2; throw requestError; } const status = fetchResponse.status; @@ -69966,8 +69966,8 @@ function iterator2(octokit2, route, parameters) { } } return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) throw error; + } catch (error2) { + if (error2.status !== 409) throw error2; url2 = ""; return { value: { @@ -70209,8 +70209,8 @@ var require_light = __commonJS({ } else { return returned; } - } catch (error) { - e4 = error; + } catch (error2) { + e4 = error2; { this.trigger("error", e4); } @@ -70220,8 +70220,8 @@ var require_light = __commonJS({ return (await Promise.all(promises)).find(function(x2) { return x2 != null; }); - } catch (error) { - e3 = error; + } catch (error2) { + e3 = error2; { this.trigger("error", e3); } @@ -70333,10 +70333,10 @@ var require_light = __commonJS({ _randomIndex() { return Math.random().toString(36).slice(2); } - doDrop({ error, message = "This job has been dropped by Bottleneck" } = {}) { + doDrop({ error: error2, message = "This job has been dropped by Bottleneck" } = {}) { if (this._states.remove(this.options.id)) { if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); + this._reject(error2 != null ? error2 : new BottleneckError$1(message)); } this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); return true; @@ -70370,7 +70370,7 @@ var require_light = __commonJS({ return this.Events.trigger("scheduled", { args: this.args, options: this.options }); } async doExecute(chained, clearGlobalState, run2, free) { - var error, eventInfo, passed; + var error2, eventInfo, passed; if (this.retryCount === 0) { this._assertStatus("RUNNING"); this._states.next(this.options.id); @@ -70388,24 +70388,24 @@ var require_light = __commonJS({ return this._resolve(passed); } } catch (error1) { - error = error1; - return this._onFailure(error, eventInfo, clearGlobalState, run2, free); + error2 = error1; + return this._onFailure(error2, eventInfo, clearGlobalState, run2, free); } } doExpire(clearGlobalState, run2, free) { - var error, eventInfo; + var error2, eventInfo; if (this._states.jobStatus(this.options.id === "RUNNING")) { this._states.next(this.options.id); } this._assertStatus("EXECUTING"); eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; - error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run2, free); + error2 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error2, eventInfo, clearGlobalState, run2, free); } - async _onFailure(error, eventInfo, clearGlobalState, run2, free) { + async _onFailure(error2, eventInfo, clearGlobalState, run2, free) { var retry2, retryAfter; if (clearGlobalState()) { - retry2 = await this.Events.trigger("failed", error, eventInfo); + retry2 = await this.Events.trigger("failed", error2, eventInfo); if (retry2 != null) { retryAfter = ~~retry2; this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); @@ -70415,7 +70415,7 @@ var require_light = __commonJS({ this.doDone(eventInfo); await free(this.options, eventInfo); this._assertStatus("DONE"); - return this._reject(error); + return this._reject(error2); } } } @@ -70694,7 +70694,7 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error, reject, resolve, returned, task; + var args, cb, error2, reject, resolve, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; ({ task, args, resolve, reject } = this._queue.shift()); @@ -70705,9 +70705,9 @@ var require_light = __commonJS({ return resolve(returned); }; } catch (error1) { - error = error1; + error2 = error1; return function() { - return reject(error); + return reject(error2); }; } }(); @@ -70841,8 +70841,8 @@ var require_light = __commonJS({ } else { results.push(void 0); } - } catch (error) { - e3 = error; + } catch (error2) { + e3 = error2; results.push(v2.Events.trigger("error", e3)); } } @@ -71175,14 +71175,14 @@ var require_light = __commonJS({ return done; } async _addToQueue(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy; + var args, blocked, error2, options, reachedHWM, shifted, strategy; ({ args, options } = job); try { ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); } catch (error1) { - error = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error }); - job.doDrop({ error }); + error2 = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error: error2 }); + job.doDrop({ error: error2 }); return false; } if (blocked) { @@ -71349,22 +71349,22 @@ var require_light = __commonJS({ }); // node_modules/@go-gitea/sdk.js/node_modules/@octokit/plugin-retry/dist-bundle/index.js -async function errorRequest(state2, octokit2, error, options) { - if (!error.request || !error.request.request) { - throw error; +async function errorRequest(state2, octokit2, error2, options) { + if (!error2.request || !error2.request.request) { + throw error2; } - if (error.status >= 400 && !state2.doNotRetry.includes(error.status)) { + if (error2.status >= 400 && !state2.doNotRetry.includes(error2.status)) { const retries = options.request.retries != null ? options.request.retries : state2.retries; const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); - throw octokit2.retry.retryRequest(error, retries, retryAfter); + throw octokit2.retry.retryRequest(error2, retries, retryAfter); } - throw error; + throw error2; } async function wrapRequest(state2, octokit2, request4, options) { const limiter = new import_light.default(); - limiter.on("failed", function(error, info) { - const maxRetries = ~~error.request.request.retries; - const after = ~~error.request.request.retryAfter; + limiter.on("failed", function(error2, info) { + const maxRetries = ~~error2.request.request.retries; + const after = ~~error2.request.request.retryAfter; options.request.retryCount = info.retryCount + 1; if (maxRetries > info.retryCount) { return after * state2.retryAfterBaseValue; @@ -71380,11 +71380,11 @@ async function requestWithGraphqlErrorHandling(state2, octokit2, request4, optio if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test( response.data.errors[0].message )) { - const error = new RequestError(response.data.errors[0].message, 500, { + const error2 = new RequestError(response.data.errors[0].message, 500, { request: options, response }); - return errorRequest(state2, octokit2, error, options); + return errorRequest(state2, octokit2, error2, options); } return response; } @@ -71404,12 +71404,12 @@ function retry(octokit2, octokitOptions) { } return { retry: { - retryRequest: (error, retries, retryAfter) => { - error.request.request = Object.assign({}, error.request.request, { + retryRequest: (error2, retries, retryAfter) => { + error2.request.request = Object.assign({}, error2.request.request, { retries, retryAfter }); - return error; + return error2; } } }; @@ -71955,8 +71955,8 @@ var init_dist_bundle7 = __esm({ }); // src/github-action.ts -var import_core23 = __toESM(require_core(), 1); -var import_github = __toESM(require_github(), 1); +var core = __toESM(require_core(), 1); +var github = __toESM(require_github(), 1); // node_modules/@clack/core/dist/index.mjs var import_sisteransi = __toESM(require_src(), 1); @@ -73618,7 +73618,7 @@ var configValidators = { JSON.parse(value); } return value; - } catch (error) { + } catch (error2) { validateConfig( "OCO_API_CUSTOM_HEADERS" /* OCO_API_CUSTOM_HEADERS */, false, @@ -73819,7 +73819,7 @@ var initGlobalConfig = (configPath = defaultConfigPath) => { var parseConfigVarValue = (value) => { try { return JSON.parse(value); - } catch (error) { + } catch (error2) { return value; } }; @@ -73881,7 +73881,7 @@ var cleanUndefinedValues = (config6) => { return [_3, parsedValue]; } return [_3, v2]; - } catch (error) { + } catch (error2) { return [_3, v2]; } }) @@ -73917,7 +73917,7 @@ For more help refer to our docs: https://github.com/di-sukharev/opencommit` try { if (typeof value === "string") parsedConfigValue = JSON.parse(value); else parsedConfigValue = value; - } catch (error) { + } catch (error2) { parsedConfigValue = value; } const validValue = configValidators[key]( @@ -74131,8 +74131,8 @@ var configCommand = G2( `Unsupported mode: ${mode}. Valid modes are: "set", "get", and "describe"` ); } - } catch (error) { - ce(`${source_default.red("\u2716")} ${error}`); + } catch (error2) { + ce(`${source_default.red("\u2716")} ${error2}`); process.exit(1); } } @@ -74582,14 +74582,14 @@ __export(error_exports, { var AnthropicError = class extends Error { }; var APIError = class _APIError extends AnthropicError { - constructor(status, error, message, headers) { - super(`${_APIError.makeMessage(status, error, message)}`); + constructor(status, error2, message, headers) { + super(`${_APIError.makeMessage(status, error2, message)}`); this.status = status; this.headers = headers; - this.error = error; + this.error = error2; } - static makeMessage(status, error, message) { - const msg = error?.message ? typeof error.message === "string" ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; + static makeMessage(status, error2, message) { + const msg = error2?.message ? typeof error2.message === "string" ? error2.message : JSON.stringify(error2.message) : error2 ? JSON.stringify(error2) : message; if (status && msg) { return `${status} ${msg}`; } @@ -74605,32 +74605,32 @@ var APIError = class _APIError extends AnthropicError { if (!status) { return new APIConnectionError({ cause: castToError(errorResponse) }); } - const error = errorResponse; + const error2 = errorResponse; if (status === 400) { - return new BadRequestError(status, error, message, headers); + return new BadRequestError(status, error2, message, headers); } if (status === 401) { - return new AuthenticationError(status, error, message, headers); + return new AuthenticationError(status, error2, message, headers); } if (status === 403) { - return new PermissionDeniedError(status, error, message, headers); + return new PermissionDeniedError(status, error2, message, headers); } if (status === 404) { - return new NotFoundError(status, error, message, headers); + return new NotFoundError(status, error2, message, headers); } if (status === 409) { - return new ConflictError(status, error, message, headers); + return new ConflictError(status, error2, message, headers); } if (status === 422) { - return new UnprocessableEntityError(status, error, message, headers); + return new UnprocessableEntityError(status, error2, message, headers); } if (status === 429) { - return new RateLimitError(status, error, message, headers); + return new RateLimitError(status, error2, message, headers); } if (status >= 500) { - return new InternalServerError(status, error, message, headers); + return new InternalServerError(status, error2, message, headers); } - return new _APIError(status, error, message, headers); + return new _APIError(status, error2, message, headers); } }; var APIUserAbortError = class extends APIError { @@ -75349,8 +75349,8 @@ var APIClient = class { parseHeaders(headers) { return !headers ? {} : Symbol.iterator in headers ? Object.fromEntries(Array.from(headers).map((header) => [...header])) : { ...headers }; } - makeStatusError(status, error, message, headers) { - return APIError.generate(status, error, message, headers); + makeStatusError(status, error2, message, headers) { + return APIError.generate(status, error2, message, headers); } request(options, remainingRetries = null) { return new APIPromise(this.makeRequest(options, remainingRetries)); @@ -75825,24 +75825,24 @@ var MessageStream = class _MessageStream { _MessageStream_errored.set(this, false); _MessageStream_aborted.set(this, false); _MessageStream_catchingPromiseCreated.set(this, false); - _MessageStream_handleError.set(this, (error) => { + _MessageStream_handleError.set(this, (error2) => { __classPrivateFieldSet6(this, _MessageStream_errored, true, "f"); - if (error instanceof Error && error.name === "AbortError") { - error = new APIUserAbortError(); + if (error2 instanceof Error && error2.name === "AbortError") { + error2 = new APIUserAbortError(); } - if (error instanceof APIUserAbortError) { + if (error2 instanceof APIUserAbortError) { __classPrivateFieldSet6(this, _MessageStream_aborted, true, "f"); - return this._emit("abort", error); + return this._emit("abort", error2); } - if (error instanceof AnthropicError) { - return this._emit("error", error); + if (error2 instanceof AnthropicError) { + return this._emit("error", error2); } - if (error instanceof Error) { - const anthropicError = new AnthropicError(error.message); - anthropicError.cause = error; + if (error2 instanceof Error) { + const anthropicError = new AnthropicError(error2.message); + anthropicError.cause = error2; return this._emit("error", anthropicError); } - return this._emit("error", new AnthropicError(String(error))); + return this._emit("error", new AnthropicError(String(error2))); }); __classPrivateFieldSet6(this, _MessageStream_connectedPromise, new Promise((resolve, reject) => { __classPrivateFieldSet6(this, _MessageStream_resolveConnectedPromise, resolve, "f"); @@ -76022,22 +76022,22 @@ var MessageStream = class _MessageStream { listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { - const error = args[0]; + const error2 = args[0]; if (!__classPrivateFieldGet7(this, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { - Promise.reject(error); + Promise.reject(error2); } - __classPrivateFieldGet7(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet7(this, _MessageStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet7(this, _MessageStream_rejectConnectedPromise, "f").call(this, error2); + __classPrivateFieldGet7(this, _MessageStream_rejectEndPromise, "f").call(this, error2); this._emit("end"); return; } if (event === "error") { - const error = args[0]; + const error2 = args[0]; if (!__classPrivateFieldGet7(this, _MessageStream_catchingPromiseCreated, "f") && !listeners?.length) { - Promise.reject(error); + Promise.reject(error2); } - __classPrivateFieldGet7(this, _MessageStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet7(this, _MessageStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet7(this, _MessageStream_rejectConnectedPromise, "f").call(this, error2); + __classPrivateFieldGet7(this, _MessageStream_rejectEndPromise, "f").call(this, error2); this._emit("end"); } } @@ -76442,7 +76442,7 @@ var _global = (() => { if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; })(); -var isContextDefined = (context2) => !isUndefined(context2) && context2 !== _global; +var isContextDefined = (context3) => !isUndefined(context3) && context3 !== _global; function merge() { const { caseless } = isContextDefined(this) && this || {}; const result = {}; @@ -76774,16 +76774,16 @@ var descriptors = {}; }); Object.defineProperties(AxiosError, descriptors); Object.defineProperty(prototype, "isAxiosError", { value: true }); -AxiosError.from = (error, code, config6, request4, response, customProps) => { +AxiosError.from = (error2, code, config6, request4, response, customProps) => { const axiosError = Object.create(prototype); - utils_default.toFlatObject(error, axiosError, function filter2(obj) { + utils_default.toFlatObject(error2, axiosError, function filter2(obj) { return obj !== Error.prototype; }, (prop) => { return prop !== "isAxiosError"; }); - AxiosError.call(axiosError, error.message, code, config6, request4, response); - axiosError.cause = error; - axiosError.name = error.name; + AxiosError.call(axiosError, error2.message, code, config6, request4, response); + axiosError.cause = error2; + axiosError.name = error2.name; customProps && Object.assign(axiosError, customProps); return axiosError; }; @@ -77342,7 +77342,7 @@ function parseTokens(str2) { return tokens; } var isValidHeaderName = (str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim()); -function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { +function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); } @@ -77553,9 +77553,9 @@ var AxiosHeaders_default = AxiosHeaders; // node_modules/axios/lib/core/transformData.js function transformData(fns, response) { const config6 = this || defaults_default; - const context2 = response || config6; - const headers = AxiosHeaders_default.from(context2.headers); - let data = context2.data; + const context3 = response || config6; + const headers = AxiosHeaders_default.from(context3.headers); + let data = context3.data; utils_default.forEach(fns, function transform(fn) { data = fn.call(config6, data, headers.normalize(), response ? response.status : void 0); }); @@ -79367,15 +79367,15 @@ var Axios = class { const onRejected = requestInterceptorChain[i3++]; try { newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); + } catch (error2) { + onRejected.call(this, error2); break; } } try { promise = dispatchRequest.call(this, newConfig); - } catch (error) { - return Promise.reject(error); + } catch (error2) { + return Promise.reject(error2); } i3 = 0; len = responseInterceptorChain.length; @@ -79600,10 +79600,10 @@ var HttpStatusCode_default = HttpStatusCode; // node_modules/axios/lib/axios.js function createInstance(defaultConfig) { - const context2 = new Axios_default(defaultConfig); - const instance = bind(Axios_default.prototype.request, context2); - utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true }); - utils_default.extend(instance, context2, null, { allOwnKeys: true }); + const context3 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context3); + utils_default.extend(instance, Axios_default.prototype, context3, { allOwnKeys: true }); + utils_default.extend(instance, context3, null, { allOwnKeys: true }); instance.create = function create(instanceConfig) { return createInstance(mergeConfig(defaultConfig, instanceConfig)); }; @@ -79726,11 +79726,11 @@ var AnthropicEngine = class { const message = data?.content[0].text; let content = message; return removeContentTags(content, "think"); - } catch (error) { - const err = error; + } catch (error2) { + const err = error2; ce(`${source_default.red("\u2716")} ${err?.message || err}`); - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const anthropicAiError = error.response.data.error; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const anthropicAiError = error2.response.data.error; if (anthropicAiError?.message) ce(anthropicAiError.message); ce( "For help look into README https://github.com/di-sukharev/opencommit#setup" @@ -81272,14 +81272,14 @@ var knownContextKeys = { namespace: Symbol.for("@azure/core-tracing namespace") }; function createTracingContext(options = {}) { - let context2 = new TracingContextImpl(options.parentContext); + let context3 = new TracingContextImpl(options.parentContext); if (options.span) { - context2 = context2.setValue(knownContextKeys.span, options.span); + context3 = context3.setValue(knownContextKeys.span, options.span); } if (options.namespace) { - context2 = context2.setValue(knownContextKeys.namespace, options.namespace); + context3 = context3.setValue(knownContextKeys.namespace, options.namespace); } - return context2; + return context3; } var TracingContextImpl = class _TracingContextImpl { constructor(initialContext) { @@ -81377,8 +81377,8 @@ function createTracingClient(options) { span.end(); } } - function withContext(context2, callback, ...callbackArgs) { - return getInstrumenter().withContext(context2, callback, ...callbackArgs); + function withContext(context3, callback, ...callbackArgs) { + return getInstrumenter().withContext(context3, callback, ...callbackArgs); } function parseTraceparentHeader(traceparentHeader) { return getInstrumenter().parseTraceparentHeader(traceparentHeader); @@ -81494,14 +81494,14 @@ function tryCreateSpan(tracingClient, request4, userAgent2) { return void 0; } } -function tryProcessError(span, error) { +function tryProcessError(span, error2) { try { span.setStatus({ status: "error", - error: isError(error) ? error : void 0 + error: isError(error2) ? error2 : void 0 }); - if (isRestError(error) && error.statusCode) { - span.setAttribute("http.status_code", error.statusCode); + if (isRestError(error2) && error2.statusCode) { + span.setAttribute("http.status_code", error2.statusCode); } span.end(); } catch (e3) { @@ -82014,11 +82014,11 @@ function bearerTokenAuthenticationPolicy(options) { logger: logger3 }); let response; - let error; + let error2; try { response = await next(request4); } catch (err) { - error = err; + error2 = err; response = err.response; } if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { @@ -82033,8 +82033,8 @@ function bearerTokenAuthenticationPolicy(options) { return next(request4); } } - if (error) { - throw error; + if (error2) { + throw error2; } else { return response; } @@ -82160,7 +82160,7 @@ function getContentType(body) { try { JSON.parse(body); return "application/json; charset=UTF-8"; - } catch (error) { + } catch (error2) { return void 0; } } @@ -82244,9 +82244,9 @@ function getResponseBody(response) { } try { return bodyToParse ? JSON.parse(bodyToParse) : void 0; - } catch (error) { + } catch (error2) { if (firstType === "application/json") { - throw createParseError(response, error); + throw createParseError(response, error2); } return String(bodyToParse); } @@ -83107,11 +83107,11 @@ async function getOaiSSEs(response, toEvent) { } // node_modules/@azure/openai/dist-esm/src/api/operations.js -async function getAudioTranscription(context2, deploymentName, fileContent, formatOrOptions, inputOptions) { +async function getAudioTranscription(context3, deploymentName, fileContent, formatOrOptions, inputOptions) { const options = inputOptions !== null && inputOptions !== void 0 ? inputOptions : typeof formatOrOptions === "string" ? {} : formatOrOptions !== null && formatOrOptions !== void 0 ? formatOrOptions : {}; const response_format = typeof formatOrOptions === "string" ? formatOrOptions : void 0; const { abortSignal, onResponse, requestOptions, tracingOptions } = options, rest = __rest(options, ["abortSignal", "onResponse", "requestOptions", "tracingOptions"]); - const { body, status } = await context2.pathUnchecked("deployments/{deploymentName}/audio/transcriptions", deploymentName).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters({ + const { body, status } = await context3.pathUnchecked("deployments/{deploymentName}/audio/transcriptions", deploymentName).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters({ abortSignal, onResponse, tracingOptions, @@ -83122,11 +83122,11 @@ async function getAudioTranscription(context2, deploymentName, fileContent, form } return response_format !== "verbose_json" ? body : camelCaseKeys(body); } -async function getAudioTranslation(context2, deploymentName, fileContent, formatOrOptions, inputOptions) { +async function getAudioTranslation(context3, deploymentName, fileContent, formatOrOptions, inputOptions) { const options = inputOptions !== null && inputOptions !== void 0 ? inputOptions : typeof formatOrOptions === "string" ? {} : formatOrOptions !== null && formatOrOptions !== void 0 ? formatOrOptions : {}; const response_format = typeof formatOrOptions === "string" ? formatOrOptions : void 0; const { abortSignal, onResponse, requestOptions, tracingOptions } = options, rest = __rest(options, ["abortSignal", "onResponse", "requestOptions", "tracingOptions"]); - const { body, status } = await context2.pathUnchecked("deployments/{deploymentName}/audio/translations", deploymentName).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters({ + const { body, status } = await context3.pathUnchecked("deployments/{deploymentName}/audio/translations", deploymentName).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters({ abortSignal, onResponse, tracingOptions, @@ -83137,8 +83137,8 @@ async function getAudioTranslation(context2, deploymentName, fileContent, format } return response_format !== "verbose_json" ? body : camelCaseKeys(body); } -function _getCompletionsSend(context2, deploymentId, body, options = { requestOptions: {} }) { - return context2.path("/deployments/{deploymentId}/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { +function _getCompletionsSend(context3, deploymentId, body, options = { requestOptions: {} }) { + return context3.path("/deployments/{deploymentId}/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { prompt: body["prompt"], max_tokens: body["maxTokens"], temperature: body["temperature"], @@ -83177,18 +83177,18 @@ function getCompletionsResult(body) { }); }) }); } -async function getCompletions(context2, deploymentId, body, options = { requestOptions: {} }) { - const result = await _getCompletionsSend(context2, deploymentId, body, options); +async function getCompletions(context3, deploymentId, body, options = { requestOptions: {} }) { + const result = await _getCompletionsSend(context3, deploymentId, body, options); return _getCompletionsDeserialize(result); } -function streamCompletions(context2, deploymentName, prompt, options = { requestOptions: {} }) { +function streamCompletions(context3, deploymentName, prompt, options = { requestOptions: {} }) { const { abortSignal, onResponse, requestOptions, tracingOptions } = options, rest = __rest(options, ["abortSignal", "onResponse", "requestOptions", "tracingOptions"]); - const response = _getCompletionsSend(context2, deploymentName, Object.assign(Object.assign({ prompt }, rest), { stream: true }), { abortSignal, onResponse, requestOptions, tracingOptions }); + const response = _getCompletionsSend(context3, deploymentName, Object.assign(Object.assign({ prompt }, rest), { stream: true }), { abortSignal, onResponse, requestOptions, tracingOptions }); return getOaiSSEs(response, getCompletionsResult); } -function _getChatCompletionsSend(context2, deploymentId, body, options = { requestOptions: {} }) { +function _getChatCompletionsSend(context3, deploymentId, body, options = { requestOptions: {} }) { var _a5, _b2, _c2, _d2, _e2, _f, _g; - return context2.path("/deployments/{deploymentId}/chat/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { + return context3.path("/deployments/{deploymentId}/chat/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { model: body["model"], stream: body["stream"], max_tokens: body["maxTokens"], @@ -83246,11 +83246,11 @@ function getChatCompletionsResult(body) { }); }) }); } -async function getChatCompletions(context2, deploymentName, messages, options = { requestOptions: {} }) { - const result = await _getChatCompletionsSendX(context2, deploymentName, messages, options); +async function getChatCompletions(context3, deploymentName, messages, options = { requestOptions: {} }) { + const result = await _getChatCompletionsSendX(context3, deploymentName, messages, options); return _getChatCompletionsDeserialize(result); } -function _getChatCompletionsSendX(context2, deploymentName, messages, options = { requestOptions: {} }) { +function _getChatCompletionsSendX(context3, deploymentName, messages, options = { requestOptions: {} }) { const { azureExtensionOptions, abortSignal, onResponse, requestOptions, tracingOptions } = options, rest = __rest(options, ["azureExtensionOptions", "abortSignal", "onResponse", "requestOptions", "tracingOptions"]); const coreOptions = { abortSignal, @@ -83259,14 +83259,14 @@ function _getChatCompletionsSendX(context2, deploymentName, messages, options = tracingOptions }; const azure = Object.assign(Object.assign({}, !(azureExtensionOptions === null || azureExtensionOptions === void 0 ? void 0 : azureExtensionOptions.extensions) ? {} : { dataSources: azureExtensionOptions.extensions }), !(azureExtensionOptions === null || azureExtensionOptions === void 0 ? void 0 : azureExtensionOptions.enhancements) ? {} : { enhancements: azureExtensionOptions.enhancements }); - return _getChatCompletionsSend(context2, deploymentName, Object.assign(Object.assign({ messages }, rest), azure), coreOptions); + return _getChatCompletionsSend(context3, deploymentName, Object.assign(Object.assign({ messages }, rest), azure), coreOptions); } -function streamChatCompletions(context2, deploymentName, messages, options = { requestOptions: {} }) { - const response = _getChatCompletionsSendX(context2, deploymentName, messages, Object.assign(Object.assign({}, options), { stream: true })); +function streamChatCompletions(context3, deploymentName, messages, options = { requestOptions: {} }) { + const response = _getChatCompletionsSendX(context3, deploymentName, messages, Object.assign(Object.assign({}, options), { stream: true })); return getOaiSSEs(response, getChatCompletionsResult); } -function _getImageGenerationsSend(context2, deploymentId, body, options = { requestOptions: {} }) { - return context2.path("/deployments/{deploymentId}/images/generations", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { +function _getImageGenerationsSend(context3, deploymentId, body, options = { requestOptions: {} }) { + return context3.path("/deployments/{deploymentId}/images/generations", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { model: body["model"], prompt: body["prompt"], n: body["n"], @@ -83337,12 +83337,12 @@ async function _getImageGenerationsDeserialize(result) { }) }; } -async function getImageGenerations(context2, deploymentId, body, options = { requestOptions: {} }) { - const result = await _getImageGenerationsSend(context2, deploymentId, body, options); +async function getImageGenerations(context3, deploymentId, body, options = { requestOptions: {} }) { + const result = await _getImageGenerationsSend(context3, deploymentId, body, options); return _getImageGenerationsDeserialize(result); } -function _getEmbeddingsSend(context2, deploymentId, body, options = { requestOptions: {} }) { - return context2.path("/deployments/{deploymentId}/embeddings", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { +function _getEmbeddingsSend(context3, deploymentId, body, options = { requestOptions: {} }) { + return context3.path("/deployments/{deploymentId}/embeddings", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { user: body["user"], model: body["model"], input: body["input"], @@ -83364,8 +83364,8 @@ async function _getEmbeddingsDeserialize(result) { } }; } -async function getEmbeddings(context2, deploymentId, body, options = { requestOptions: {} }) { - const result = await _getEmbeddingsSend(context2, deploymentId, body, options); +async function getEmbeddings(context3, deploymentId, body, options = { requestOptions: {} }) { + const result = await _getEmbeddingsSend(context3, deploymentId, body, options); return _getEmbeddingsDeserialize(result); } function getContentFilterResultsForPrompt({ prompt_annotations, prompt_filter_results }) { @@ -83376,20 +83376,20 @@ function getContentFilterResultsForPrompt({ prompt_annotations, prompt_filter_re }); } function parseContentFilterResultDetailsForPromptOutput(_a5 = {}) { - var { error } = _a5, rest = __rest(_a5, ["error"]); - return error ? parseError(error) : camelCaseKeys(rest); + var { error: error2 } = _a5, rest = __rest(_a5, ["error"]); + return error2 ? parseError(error2) : camelCaseKeys(rest); } -function parseError(error) { +function parseError(error2) { var _a5; return { - error: Object.assign(Object.assign({}, error), { details: (_a5 = error["details"]) !== null && _a5 !== void 0 ? _a5 : [] }) + error: Object.assign(Object.assign({}, error2), { details: (_a5 = error2["details"]) !== null && _a5 !== void 0 ? _a5 : [] }) }; } function parseContentFilterResultsForChoiceOutput(_a5 = {}) { var _b2; - var { error } = _a5, successResult = __rest(_a5, ["error"]); - return error ? { - error: Object.assign(Object.assign({}, error), { details: (_b2 = error["details"]) !== null && _b2 !== void 0 ? _b2 : [] }) + var { error: error2 } = _a5, successResult = __rest(_a5, ["error"]); + return error2 ? { + error: Object.assign(Object.assign({}, error2), { details: (_b2 = error2["details"]) !== null && _b2 !== void 0 ? _b2 : [] }) } : camelCaseKeys(successResult); } @@ -83570,12 +83570,12 @@ var AzureEngine = class { } let content = message?.content; return removeContentTags(content, "think"); - } catch (error) { + } catch (error2) { ce(`${source_default.red("\u2716")} ${this.config.model}`); - const err = error; - ce(`${source_default.red("\u2716")} ${JSON.stringify(error)}`); - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openAiError = error.response.data.error; + const err = error2; + ce(`${source_default.red("\u2716")} ${JSON.stringify(error2)}`); + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const openAiError = error2.response.data.error; if (openAiError?.message) ce(openAiError.message); ce( "For help look into README https://github.com/di-sukharev/opencommit#setup" @@ -84476,10 +84476,10 @@ var GeminiEngine = class { }); const content = result.response.text(); return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const geminiError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const geminiError = error2.response.data.error; if (geminiError) throw new Error(geminiError?.message); } throw err; @@ -85342,8 +85342,8 @@ var APIClient2 = class { parseHeaders(headers) { return !headers ? {} : Symbol.iterator in headers ? Object.fromEntries(Array.from(headers).map((header) => [...header])) : { ...headers }; } - makeStatusError(status, error, message, headers) { - return APIError3.generate(status, error, message, headers); + makeStatusError(status, error2, message, headers) { + return APIError3.generate(status, error2, message, headers); } request(options, remainingRetries = null) { return new APIPromise2(this.makeRequest(options, remainingRetries)); @@ -85777,19 +85777,19 @@ function isObj(obj) { var OpenAIError = class extends Error { }; var APIError3 = class _APIError extends OpenAIError { - constructor(status, error, message, headers) { - super(`${_APIError.makeMessage(status, error, message)}`); + constructor(status, error2, message, headers) { + super(`${_APIError.makeMessage(status, error2, message)}`); this.status = status; this.headers = headers; this.request_id = headers?.["x-request-id"]; - const data = error; + const data = error2; this.error = data; this.code = data?.["code"]; this.param = data?.["param"]; this.type = data?.["type"]; } - static makeMessage(status, error, message) { - const msg = error?.message ? typeof error.message === "string" ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; + static makeMessage(status, error2, message) { + const msg = error2?.message ? typeof error2.message === "string" ? error2.message : JSON.stringify(error2.message) : error2 ? JSON.stringify(error2) : message; if (status && msg) { return `${status} ${msg}`; } @@ -85805,32 +85805,32 @@ var APIError3 = class _APIError extends OpenAIError { if (!status) { return new APIConnectionError3({ cause: castToError2(errorResponse) }); } - const error = errorResponse?.["error"]; + const error2 = errorResponse?.["error"]; if (status === 400) { - return new BadRequestError3(status, error, message, headers); + return new BadRequestError3(status, error2, message, headers); } if (status === 401) { - return new AuthenticationError3(status, error, message, headers); + return new AuthenticationError3(status, error2, message, headers); } if (status === 403) { - return new PermissionDeniedError3(status, error, message, headers); + return new PermissionDeniedError3(status, error2, message, headers); } if (status === 404) { - return new NotFoundError3(status, error, message, headers); + return new NotFoundError3(status, error2, message, headers); } if (status === 409) { - return new ConflictError3(status, error, message, headers); + return new ConflictError3(status, error2, message, headers); } if (status === 422) { - return new UnprocessableEntityError3(status, error, message, headers); + return new UnprocessableEntityError3(status, error2, message, headers); } if (status === 429) { - return new RateLimitError3(status, error, message, headers); + return new RateLimitError3(status, error2, message, headers); } if (status >= 500) { - return new InternalServerError3(status, error, message, headers); + return new InternalServerError3(status, error2, message, headers); } - return new _APIError(status, error, message, headers); + return new _APIError(status, error2, message, headers); } }; var APIUserAbortError3 = class extends APIError3 { @@ -86309,46 +86309,46 @@ var EventStream = class { listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { - const error = args[0]; + const error2 = args[0]; if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { - Promise.reject(error); + Promise.reject(error2); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error2); + __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error2); this._emit("end"); return; } if (event === "error") { - const error = args[0]; + const error2 = args[0]; if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { - Promise.reject(error); + Promise.reject(error2); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error2); + __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error2); this._emit("end"); } } _emitFinal() { } }; -_EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_endPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_listeners = /* @__PURE__ */ new WeakMap(), _EventStream_ended = /* @__PURE__ */ new WeakMap(), _EventStream_errored = /* @__PURE__ */ new WeakMap(), _EventStream_aborted = /* @__PURE__ */ new WeakMap(), _EventStream_catchingPromiseCreated = /* @__PURE__ */ new WeakMap(), _EventStream_instances = /* @__PURE__ */ new WeakSet(), _EventStream_handleError = function _EventStream_handleError2(error) { +_EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_endPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_listeners = /* @__PURE__ */ new WeakMap(), _EventStream_ended = /* @__PURE__ */ new WeakMap(), _EventStream_errored = /* @__PURE__ */ new WeakMap(), _EventStream_aborted = /* @__PURE__ */ new WeakMap(), _EventStream_catchingPromiseCreated = /* @__PURE__ */ new WeakMap(), _EventStream_instances = /* @__PURE__ */ new WeakSet(), _EventStream_handleError = function _EventStream_handleError2(error2) { __classPrivateFieldSet8(this, _EventStream_errored, true, "f"); - if (error instanceof Error && error.name === "AbortError") { - error = new APIUserAbortError3(); + if (error2 instanceof Error && error2.name === "AbortError") { + error2 = new APIUserAbortError3(); } - if (error instanceof APIUserAbortError3) { + if (error2 instanceof APIUserAbortError3) { __classPrivateFieldSet8(this, _EventStream_aborted, true, "f"); - return this._emit("abort", error); + return this._emit("abort", error2); } - if (error instanceof OpenAIError) { - return this._emit("error", error); + if (error2 instanceof OpenAIError) { + return this._emit("error", error2); } - if (error instanceof Error) { - const openAIError = new OpenAIError(error.message); - openAIError.cause = error; + if (error2 instanceof Error) { + const openAIError = new OpenAIError(error2.message); + openAIError.cause = error2; return this._emit("error", openAIError); } - return this._emit("error", new OpenAIError(String(error))); + return this._emit("error", new OpenAIError(String(error2))); }; // node_modules/openai/lib/parser.mjs @@ -86613,11 +86613,11 @@ var AbstractChatCompletionRunner = class extends EventStream { let parsed; try { parsed = isRunnableFunctionWithParse(fn) ? await fn.parse(args) : args; - } catch (error) { + } catch (error2) { this._addMessage({ role, name, - content: error instanceof Error ? error.message : String(error) + content: error2 instanceof Error ? error2.message : String(error2) }); continue; } @@ -86702,8 +86702,8 @@ var AbstractChatCompletionRunner = class extends EventStream { let parsed; try { parsed = isRunnableFunctionWithParse(fn) ? await fn.parse(args) : args; - } catch (error) { - const content2 = error instanceof Error ? error.message : String(error); + } catch (error2) { + const content2 = error2 instanceof Error ? error2.message : String(error2); this._addMessage({ role, tool_call_id, content: content2 }); continue; } @@ -89245,10 +89245,10 @@ var OpenAiEngine = class { const message = completion.choices[0].message; let content = message?.content; return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openAiError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const openAiError = error2.response.data.error; if (openAiError) throw new Error(openAiError.message); } throw err; @@ -89294,10 +89294,10 @@ var MistralAiEngine = class { throw Error("No completion choice available."); let content = message.content; return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const mistralError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const mistralError = error2.response.data.error; if (mistralError) throw new Error(mistralError.message); } throw err; @@ -89380,10 +89380,10 @@ var DeepseekEngine = class extends OpenAiEngine { const message = completion.choices[0].message; let content = message?.content; return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openAiError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const openAiError = error2.response.data.error; if (openAiError) throw new Error(openAiError.message); } throw err; @@ -89404,10 +89404,10 @@ var AimlApiEngine = class { }); const message = response.data.choices?.[0]?.message; return message?.content ?? null; - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const apiError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const apiError = error2.response.data.error; if (apiError) throw new Error(apiError.message); } throw err; @@ -89439,10 +89439,10 @@ var OpenRouterEngine = class { const message = response.data.choices[0].message; let content = message?.content; return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openRouterError = error.response.data.error; + } catch (error2) { + const err = error2; + if (axios_default.isAxiosError(error2) && error2.response?.status === 401) { + const openRouterError = error2.response.data.error; if (openRouterError) throw new Error(openRouterError.message); } throw err; @@ -89472,7 +89472,7 @@ function parseCustomHeaders(headers) { } else { parsedHeaders = JSON.parse(headers); } - } catch (error) { + } catch (error2) { console.warn( "Invalid OCO_API_CUSTOM_HEADERS format, ignoring custom headers" ); @@ -89531,9 +89531,9 @@ var computeHash = async (content, algorithm = "sha256") => { const hash = import_crypto6.default.createHash(algorithm); hash.update(content); return hash.digest("hex"); - } catch (error) { - console.error("Error while computing hash:", error); - throw error; + } catch (error2) { + console.error("Error while computing hash:", error2); + throw error2; } }; @@ -89901,14 +89901,14 @@ var getCommitConvention = (fullGitMojiSpec) => config4.OCO_EMOJI ? fullGitMojiSp var getDescriptionInstruction = () => config4.OCO_DESCRIPTION ? `Add a short description of WHY the changes are done after the commit message. Don't start it with "This commit", just describe the changes.` : "Don't add any descriptions to the commit, only commit message."; var getOneLineCommitInstruction = () => config4.OCO_ONE_LINE_COMMIT ? "Craft a concise, single sentence, commit message that encapsulates all changes made, with an emphasis on the primary updates. If the modifications share a common theme or scope, mention it succinctly; otherwise, leave the scope out to maintain focus. The goal is to provide a clear and unified overview of the changes in one single message." : ""; var getScopeInstruction = () => config4.OCO_OMIT_SCOPE ? "Do not include a scope in the commit message format. Use the format: : " : ""; -var userInputCodeContext = (context2) => { - if (context2 !== "" && context2 !== " ") { - return `Additional context provided by the user: ${context2} +var userInputCodeContext = (context3) => { + if (context3 !== "" && context3 !== " ") { + return `Additional context provided by the user: ${context3} Consider this context when generating the commit message, incorporating relevant information when appropriate.`; } return ""; }; -var INIT_MAIN_PROMPT2 = (language, fullGitMojiSpec, context2) => ({ +var INIT_MAIN_PROMPT2 = (language, fullGitMojiSpec, context3) => ({ role: "system", content: (() => { const commitConvention = fullGitMojiSpec ? "GitMoji specification" : "Conventional Commit Convention"; @@ -89919,7 +89919,7 @@ var INIT_MAIN_PROMPT2 = (language, fullGitMojiSpec, context2) => ({ const oneLineCommitGuideline = getOneLineCommitInstruction(); const scopeInstruction = getScopeInstruction(); const generalGuidelines = `Use the present tense. Lines must not be longer than 74 characters. Use ${language} for the commit message.`; - const userInputContext = userInputCodeContext(context2); + const userInputContext = userInputCodeContext(context3); return `${missionStatement} ${diffInstruction} ${conventionGuidelines} @@ -89977,7 +89977,7 @@ var INIT_CONSISTENCY_PROMPT = (translation4) => ({ role: "assistant", content: getConsistencyContent(translation4) }); -var getMainCommitPrompt = async (fullGitMojiSpec, context2) => { +var getMainCommitPrompt = async (fullGitMojiSpec, context3) => { switch (config4.OCO_PROMPT_MODULE) { case "@commitlint": if (!await commitlintLLMConfigExists()) { @@ -89999,7 +89999,7 @@ var getMainCommitPrompt = async (fullGitMojiSpec, context2) => { ]; default: return [ - INIT_MAIN_PROMPT2(translation3.localLanguage, fullGitMojiSpec, context2), + INIT_MAIN_PROMPT2(translation3.localLanguage, fullGitMojiSpec, context3), INIT_DIFF_PROMPT, INIT_CONSISTENCY_PROMPT(translation3) ]; @@ -90026,10 +90026,10 @@ function mergeDiffs(arr, maxStringLength) { var config5 = getConfig(); var MAX_TOKENS_INPUT = config5.OCO_TOKENS_MAX_INPUT; var MAX_TOKENS_OUTPUT = config5.OCO_TOKENS_MAX_OUTPUT; -var generateCommitMessageChatCompletionPrompt = async (diff, fullGitMojiSpec, context2) => { +var generateCommitMessageChatCompletionPrompt = async (diff, fullGitMojiSpec, context3) => { const INIT_MESSAGES_PROMPT = await getMainCommitPrompt( fullGitMojiSpec, - context2 + context3 ); const chatContextAsCompletionRequest = [...INIT_MESSAGES_PROMPT]; chatContextAsCompletionRequest.push({ @@ -90046,11 +90046,11 @@ var GenerateCommitMessageErrorEnum = ((GenerateCommitMessageErrorEnum2) => { return GenerateCommitMessageErrorEnum2; })(GenerateCommitMessageErrorEnum || {}); var ADJUSTMENT_FACTOR = 20; -var generateCommitMessageByDiff = async (diff, fullGitMojiSpec = false, context2 = "") => { +var generateCommitMessageByDiff = async (diff, fullGitMojiSpec = false, context3 = "") => { try { const INIT_MESSAGES_PROMPT = await getMainCommitPrompt( fullGitMojiSpec, - context2 + context3 ); const INIT_MESSAGES_PROMPT_LENGTH = INIT_MESSAGES_PROMPT.map( (msg) => tokenCount(msg.content) + 4 @@ -90072,15 +90072,15 @@ var generateCommitMessageByDiff = async (diff, fullGitMojiSpec = false, context2 const messages = await generateCommitMessageChatCompletionPrompt( diff, fullGitMojiSpec, - context2 + context3 ); const engine = getEngine(); const commitMessage = await engine.generateCommitMessage(messages); if (!commitMessage) throw new Error("EMPTY_MESSAGE" /* emptyMessage */); return commitMessage; - } catch (error) { - throw error; + } catch (error2) { + throw error2; } }; function getMessagesPromisesByChangesInFile(fileDiff, separator, maxChangeLength, fullGitMojiSpec) { @@ -90177,37 +90177,37 @@ function sleep3(ms) { } // src/github-action.ts -var GITHUB_TOKEN = import_core23.default.getInput("GITHUB_TOKEN"); -var PLATFORM = import_core23.default.getInput("PLATFORM") || "github"; -var DRY_RUN = import_core23.default.getInput("DRY_RUN") === "true"; -var GITEA_URL = import_core23.default.getInput("GITEA_URL") || "https://try.gitea.io"; +var GITHUB_TOKEN = core.getInput("GITHUB_TOKEN"); +var PLATFORM = core.getInput("PLATFORM") || "github"; +var DRY_RUN = core.getInput("DRY_RUN") === "true"; +var GITEA_URL = core.getInput("GITEA_URL") || "https://try.gitea.io"; var octokit; var giteaClient; if (PLATFORM === "gitea" || PLATFORM === "forgejo") { try { - const GiteaClient = (init_dist_bundle7(), __toCommonJS(dist_bundle_exports)).GiteaClient; + const GiteaClient = (init_dist_bundle7(), __toCommonJS(dist_bundle_exports)).Gitea; giteaClient = new GiteaClient(GITEA_URL, { token: GITHUB_TOKEN }); - } catch (error) { - import_core23.default.error(`Failed to import Gitea client: ${error}`); - throw error; + } catch (error2) { + core.error(`Failed to import Gitea client: ${error2}`); + throw error2; } } else { - octokit = import_github.default.getOctokit(GITHUB_TOKEN); + octokit = github.getOctokit(GITHUB_TOKEN); } -var context = import_github.default.context; -var owner = context.repo.owner; -var repo = context.repo.repo; +var context2 = github.context; +var owner = context2.repo.owner; +var repo = context2.repo.repo; async function getCommitDiff(commitSha) { if (PLATFORM === "gitea" || PLATFORM === "forgejo") { try { const commit = await giteaClient.getCommit(owner, repo, commitSha); const diffResponse = await giteaClient.getRepoCommitDiff(owner, repo, commitSha); return { sha: commitSha, diff: diffResponse.data }; - } catch (error) { - import_core23.default.error(`Failed to fetch Gitea/Forgejo commit diff: ${error}`); - throw error; + } catch (error2) { + core.error(`Failed to fetch Gitea/Forgejo commit diff: ${error2}`); + throw error2; } } else { const diffResponse = await octokit.request( @@ -90248,8 +90248,8 @@ async function improveMessagesInChunks(diffsAndSHAs) { `Improved ${chunkOfPromises.length} messages. Sleeping for ${sleepFor}` ); await sleep3(sleepFor); - } catch (error) { - ce(error); + } catch (error2) { + ce(error2); const sleepFor = 6e4 + 1e3 * randomIntFromInterval(1, 5); ce(`Retrying after sleeping for ${sleepFor}`); await sleep3(sleepFor); @@ -90260,9 +90260,9 @@ async function improveMessagesInChunks(diffsAndSHAs) { } var getDiffsBySHAs = async (SHAs) => { const diffPromises = SHAs.map((sha) => getCommitDiff(sha)); - const diffs = await Promise.all(diffPromises).catch((error) => { - ce(`Error in Promise.all(getCommitDiffs(SHAs)): ${error}.`); - throw error; + const diffs = await Promise.all(diffPromises).catch((error2) => { + ce(`Error in Promise.all(getCommitDiffs(SHAs)): ${error2}.`); + throw error2; }); return diffs; }; @@ -90300,9 +90300,9 @@ async function improveCommitMessages(commitsToImprove) { } try { ce("Would apply improved commit messages (DRY_RUN mode disabled)."); - } catch (error) { - import_core23.default.error(`Failed to apply improved commit messages: ${error}`); - throw error; + } catch (error2) { + core.error(`Failed to apply improved commit messages: ${error2}`); + throw error2; } } async function run() { @@ -90312,8 +90312,8 @@ async function run() { } else { ce("Running on GitHub platform"); } - if (import_github.default.context.eventName === "push") { - const commits = import_github.default.context.payload.commits || []; + if (github.context.eventName === "push") { + const commits = github.context.payload.commits || []; if (DRY_RUN) { ce("DRY_RUN mode enabled. Skipping commit processing."); return; @@ -90321,13 +90321,13 @@ async function run() { await improveCommitMessages(commits); } else { ce("Wrong action."); - import_core23.default.error( - `OpenCommit was called on ${import_github.default.context.payload.action}. OpenCommit is supposed to be used on "push" action.` + core.error( + `OpenCommit was called on ${github.context.payload.action}. OpenCommit is supposed to be used on "push" action.` ); } - } catch (error) { - const err = error?.message || error; - import_core23.default.setFailed(err); + } catch (error2) { + const err = error2?.message || error2; + core.setFailed(err); } } run();