From 9a62ae71446ab0ceee0fcdfef68c6f8d652f8350 Mon Sep 17 00:00:00 2001 From: Daniel Sim <geemee@gmail.com> Date: Tue, 30 May 2023 19:47:13 +0100 Subject: [PATCH 1/2] fix(githook.ts): support for git < 2.9 and submodules --- out/cli.cjs | 429 ++++++++-- out/github-action.cjs | 1688 ++++++++++++++++++++++++++++++++------- src/commands/githook.ts | 10 +- 3 files changed, 1731 insertions(+), 396 deletions(-) diff --git a/out/cli.cjs b/out/cli.cjs index 533d691a..07805e1f 100755 --- a/out/cli.cjs +++ b/out/cli.cjs @@ -992,11 +992,11 @@ var require_signals = __commonJS({ // node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "node_modules/signal-exit/index.js"(exports, module2) { - var process5 = global.process; - var processOk = function(process6) { - return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function"; + var process6 = global.process; + var processOk = function(process7) { + return process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; }; - if (!processOk(process5)) { + if (!processOk(process6)) { module2.exports = function() { return function() { }; @@ -1004,15 +1004,15 @@ var require_signal_exit = __commonJS({ } else { assert = require("assert"); signals = require_signals(); - isWin = /^win/i.test(process5.platform); + isWin = /^win/i.test(process6.platform); EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } - if (process5.__signal_exit_emitter__) { - emitter = process5.__signal_exit_emitter__; + if (process6.__signal_exit_emitter__) { + emitter = process6.__signal_exit_emitter__; } else { - emitter = process5.__signal_exit_emitter__ = new EE(); + emitter = process6.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } @@ -1049,12 +1049,12 @@ var require_signal_exit = __commonJS({ loaded = false; signals.forEach(function(sig) { try { - process5.removeListener(sig, sigListeners[sig]); + process6.removeListener(sig, sigListeners[sig]); } catch (er) { } }); - process5.emit = originalProcessEmit; - process5.reallyExit = originalProcessReallyExit; + process6.emit = originalProcessEmit; + process6.reallyExit = originalProcessReallyExit; emitter.count -= 1; }; module2.exports.unload = unload; @@ -1071,7 +1071,7 @@ var require_signal_exit = __commonJS({ if (!processOk(global.process)) { return; } - var listeners = process5.listeners(sig); + var listeners = process6.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); @@ -1079,7 +1079,7 @@ var require_signal_exit = __commonJS({ if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } - process5.kill(process5.pid, sig); + process6.kill(process6.pid, sig); } }; }); @@ -1095,35 +1095,35 @@ var require_signal_exit = __commonJS({ emitter.count += 1; signals = signals.filter(function(sig) { try { - process5.on(sig, sigListeners[sig]); + process6.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); - process5.emit = processEmit; - process5.reallyExit = processReallyExit; + process6.emit = processEmit; + process6.reallyExit = processReallyExit; }; module2.exports.load = load; - originalProcessReallyExit = process5.reallyExit; + originalProcessReallyExit = process6.reallyExit; processReallyExit = function processReallyExit2(code) { if (!processOk(global.process)) { return; } - process5.exitCode = code || 0; - emit("exit", process5.exitCode, null); - emit("afterexit", process5.exitCode, null); - originalProcessReallyExit.call(process5, process5.exitCode); + process6.exitCode = code || 0; + emit("exit", process6.exitCode, null); + emit("afterexit", process6.exitCode, null); + originalProcessReallyExit.call(process6, process6.exitCode); }; - originalProcessEmit = process5.emit; + originalProcessEmit = process6.emit; processEmit = function processEmit2(ev, arg) { if (ev === "exit" && processOk(global.process)) { if (arg !== void 0) { - process5.exitCode = arg; + process6.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process5.exitCode, null); - emit("afterexit", process5.exitCode, null); + emit("exit", process6.exitCode, null); + emit("afterexit", process6.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); @@ -16229,8 +16229,8 @@ function x2(t, e2, r2, n) { b3(h4, w3(c3), m4, u2); Object.assign(l._, h4); } - const $4 = { ...l, showVersion: f3, showHelp: u2 }; - return typeof r2 == "function" && r2($4), { command: t, ...$4 }; + const $5 = { ...l, showVersion: f3, showHelp: u2 }; + return typeof r2 == "function" && r2($5), { command: t, ...$5 }; } function z2(t, e2) { const r2 = /* @__PURE__ */ new Map(); @@ -16864,8 +16864,8 @@ ${import_picocolors.default.gray(a)}` : ""}`; `).map((i2, c3) => c3 === 0 ? `${import_picocolors.default.yellow(o)} ${import_picocolors.default.yellow(i2)}` : ` ${i2}`).join(` `); return s + import_picocolors.default.yellow(a) + " " + this.options.map((i2, c3) => { - const l = this.value.includes(i2.value), $4 = c3 === this.cursor; - return $4 && l ? n(i2, "active-selected") : l ? n(i2, "selected") : n(i2, $4 ? "active" : "inactive"); + const l = this.value.includes(i2.value), $5 = c3 === this.cursor; + return $5 && l ? n(i2, "active-selected") : l ? n(i2, "selected") : n(i2, $5 ? "active" : "inactive"); }).join(` ${import_picocolors.default.yellow(a)} `) + ` ` + t + ` @@ -17774,10 +17774,10 @@ var import_promises = __toESM(require("fs/promises"), 1); var import_path2 = __toESM(require("path"), 1); // node_modules/execa/index.js -var import_node_buffer = require("node:buffer"); +var import_node_buffer2 = require("node:buffer"); var import_node_path2 = __toESM(require("node:path"), 1); -var import_node_child_process = __toESM(require("node:child_process"), 1); -var import_node_process5 = __toESM(require("node:process"), 1); +var import_node_child_process3 = __toESM(require("node:child_process"), 1); +var import_node_process6 = __toESM(require("node:process"), 1); var import_cross_spawn = __toESM(require_cross_spawn(), 1); // node_modules/strip-final-newline/index.js @@ -17917,19 +17917,17 @@ var onetime_default = onetime; var import_node_os3 = require("node:os"); // node_modules/human-signals/build/src/realtime.js -var getRealtimeSignals = function() { +var getRealtimeSignals = () => { const length = SIGRTMAX - SIGRTMIN + 1; return Array.from({ length }, getRealtimeSignal); }; -var getRealtimeSignal = function(value, index) { - return { - name: `SIGRT${index + 1}`, - number: SIGRTMIN + index, - action: "terminate", - description: "Application-specific signal (realtime)", - standard: "posix" - }; -}; +var getRealtimeSignal = (value, index) => ({ + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" +}); var SIGRTMIN = 34; var SIGRTMAX = 64; @@ -18210,19 +18208,19 @@ var SIGNALS = [ ]; // node_modules/human-signals/build/src/signals.js -var getSignals = function() { +var getSignals = () => { const realtimeSignals = getRealtimeSignals(); const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); return signals; }; -var normalizeSignal = function({ +var normalizeSignal = ({ name, number: defaultNumber, description, action, forced = false, standard -}) { +}) => { const { signals: { [name]: constantSignal } } = import_node_os2.constants; @@ -18232,11 +18230,11 @@ var normalizeSignal = function({ }; // node_modules/human-signals/build/src/main.js -var getSignalsByName = function() { +var getSignalsByName = () => { const signals = getSignals(); return Object.fromEntries(signals.map(getSignalByName)); }; -var getSignalByName = function({ +var getSignalByName = ({ name, number, description, @@ -18244,20 +18242,15 @@ var getSignalByName = function({ action, forced, standard -}) { - return [ - name, - { name, number, description, supported, action, forced, standard } - ]; -}; +}) => [name, { name, number, description, supported, action, forced, standard }]; var signalsByName = getSignalsByName(); -var getSignalsByNumber = function() { +var getSignalsByNumber = () => { const signals = getSignals(); const length = SIGRTMAX + 1; const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); return Object.assign({}, ...signalsA); }; -var getSignalByNumber = function(number, signals) { +var getSignalByNumber = (number, signals) => { const signal = findSignalByNumber(number, signals); if (signal === void 0) { return {}; @@ -18275,7 +18268,7 @@ var getSignalByNumber = function(number, signals) { } }; }; -var findSignalByNumber = function(number, signals) { +var findSignalByNumber = (number, signals) => { const signal = signals.find(({ name }) => import_node_os3.constants.signals[name] === number); if (signal !== void 0) { return signal; @@ -18452,15 +18445,82 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { }); }; +// node_modules/execa/lib/pipe.js +var import_node_fs = require("node:fs"); +var import_node_child_process = require("node:child_process"); + // node_modules/is-stream/index.js function isStream(stream4) { return stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function"; } +function isWritableStream(stream4) { + return isStream(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object"; +} + +// node_modules/execa/lib/pipe.js +var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function"; +var pipeToTarget = (spawned, streamName, target) => { + if (typeof target === "string") { + spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target)); + return spawned; + } + if (isWritableStream(target)) { + spawned[streamName].pipe(target); + return spawned; + } + if (!isExecaChildProcess(target)) { + throw new TypeError("The second argument must be a string, a stream or an Execa child process."); + } + if (!isWritableStream(target.stdin)) { + throw new TypeError("The target child process's stdin must be available."); + } + spawned[streamName].pipe(target.stdin); + return target; +}; +var addPipeMethods = (spawned) => { + if (spawned.stdout !== null) { + spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); + } + if (spawned.stderr !== null) { + spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); + } + if (spawned.all !== void 0) { + spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); + } +}; // node_modules/execa/lib/stream.js +var import_node_fs2 = require("node:fs"); var import_get_stream = __toESM(require_get_stream(), 1); var import_merge_stream = __toESM(require_merge_stream(), 1); -var handleInput = (spawned, input) => { +var validateInputOptions = (input) => { + if (input !== void 0) { + throw new TypeError("The `input` and `inputFile` options cannot be both set."); + } +}; +var getInputSync = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs2.readFileSync)(inputFile); +}; +var handleInputSync = (options) => { + const input = getInputSync(options); + if (isStream(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + return input; +}; +var getInput = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs2.createReadStream)(inputFile); +}; +var handleInput = (spawned, options) => { + const input = getInput(options); if (input === void 0) { return; } @@ -18531,7 +18591,6 @@ var mergePromise = (spawned, promise) => { const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); Reflect.defineProperty(spawned, property, { ...descriptor, value }); } - return spawned; }; var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { spawned.on("exit", (exitCode, signal) => { @@ -18548,6 +18607,8 @@ var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { }); // node_modules/execa/lib/command.js +var import_node_buffer = require("node:buffer"); +var import_node_child_process2 = require("node:child_process"); var normalizeArgs = (file, args = []) => { if (!Array.isArray(args)) { return [file]; @@ -18564,11 +18625,80 @@ var escapeArg = (arg) => { }; var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); +var SPACES_REGEXP = / +/g; +var parseExpression = (expression) => { + const typeOfExpression = typeof expression; + if (typeOfExpression === "string") { + return expression; + } + if (typeOfExpression === "number") { + return String(expression); + } + if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) { + const typeOfStdout = typeof expression.stdout; + if (typeOfStdout === "string") { + return expression.stdout; + } + if (import_node_buffer.Buffer.isBuffer(expression.stdout)) { + return expression.stdout.toString(); + } + throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); + } + throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); +}; +var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ + ...tokens.slice(0, -1), + `${tokens[tokens.length - 1]}${nextTokens[0]}`, + ...nextTokens.slice(1) +]; +var parseTemplate = ({ templates, expressions, tokens, index, template }) => { + const templateString = template ?? templates.raw[index]; + const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); + const newTokens = concatTokens( + tokens, + templateTokens, + templateString.startsWith(" ") + ); + if (index === expressions.length) { + return newTokens; + } + const expression = expressions[index]; + const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; + return concatTokens( + newTokens, + expressionTokens, + templateString.endsWith(" ") + ); +}; +var parseTemplates = (templates, expressions) => { + let tokens = []; + for (const [index, template] of templates.entries()) { + tokens = parseTemplate({ templates, expressions, tokens, index, template }); + } + return tokens; +}; + +// node_modules/execa/lib/verbose.js +var import_node_util = require("node:util"); +var import_node_process5 = __toESM(require("node:process"), 1); +var verboseDefault = (0, import_node_util.debuglog)("execa").enabled; +var padField = (field, padding) => String(field).padStart(padding, "0"); +var getTimestamp = () => { + const date = new Date(); + return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; +}; +var logCommand = (escapedCommand, { verbose }) => { + if (!verbose) { + return; + } + import_node_process5.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} +`); +}; // node_modules/execa/index.js var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { - const env2 = extendEnv ? { ...import_node_process5.default.env, ...envOption } : envOption; + const env2 = extendEnv ? { ...import_node_process6.default.env, ...envOption } : envOption; if (preferLocal) { return npmRunPathEnv({ env: env2, cwd: localDir, execPath }); } @@ -18585,24 +18715,25 @@ var handleArguments = (file, args, options = {}) => { stripFinalNewline: true, extendEnv: true, preferLocal: false, - localDir: options.cwd || import_node_process5.default.cwd(), - execPath: import_node_process5.default.execPath, + localDir: options.cwd || import_node_process6.default.cwd(), + execPath: import_node_process6.default.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, + verbose: verboseDefault, ...options }; options.env = getEnv(options); options.stdio = normalizeStdio(options); - if (import_node_process5.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { + if (import_node_process6.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { args.unshift("/q"); } return { file, args, options, parsed }; }; var handleOutput = (options, value, error) => { - if (typeof value !== "string" && !import_node_buffer.Buffer.isBuffer(value)) { + if (typeof value !== "string" && !import_node_buffer2.Buffer.isBuffer(value)) { return error === void 0 ? void 0 : ""; } if (options.stripFinalNewline) { @@ -18614,12 +18745,13 @@ function execa(file, args, options) { const parsed = handleArguments(file, args, options); const command2 = joinCommand(file, args); const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); validateTimeout(parsed.options); let spawned; try { - spawned = import_node_child_process.default.spawn(parsed.file, parsed.args, parsed.options); + spawned = import_node_child_process3.default.spawn(parsed.file, parsed.args, parsed.options); } catch (error) { - const dummySpawned = new import_node_child_process.default.ChildProcess(); + const dummySpawned = new import_node_child_process3.default.ChildProcess(); const errorPromise = Promise.reject(makeError({ error, stdout: "", @@ -18632,7 +18764,8 @@ function execa(file, args, options) { isCanceled: false, killed: false })); - return mergePromise(dummySpawned, errorPromise); + mergePromise(dummySpawned, errorPromise); + return dummySpawned; } const spawnedPromise = getSpawnedPromise(spawned); const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); @@ -18679,10 +18812,92 @@ function execa(file, args, options) { }; }; const handlePromiseOnce = onetime_default(handlePromise); - handleInput(spawned, parsed.options.input); + handleInput(spawned, parsed.options); spawned.all = makeAllStream(spawned, parsed.options); - return mergePromise(spawned, handlePromiseOnce); + addPipeMethods(spawned); + mergePromise(spawned, handlePromiseOnce); + return spawned; } +function execaSync(file, args, options) { + const parsed = handleArguments(file, args, options); + const command2 = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + const input = handleInputSync(parsed.options); + let result; + try { + result = import_node_child_process3.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command: command2, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command: command2, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command: command2, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; +} +var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; +var normalizeScriptOptions = (options = {}) => ({ + preferLocal: true, + ...normalizeScriptStdin(options), + ...options +}); +function create$(options) { + function $5(templatesOrOptions, ...expressions) { + if (!Array.isArray(templatesOrOptions)) { + return create$({ ...options, ...templatesOrOptions }); + } + const [file, ...args] = parseTemplates(templatesOrOptions, expressions); + return execa(file, args, normalizeScriptOptions(options)); + } + $5.sync = (templates, ...expressions) => { + if (!Array.isArray(templates)) { + throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); + } + const [file, ...args] = parseTemplates(templates, expressions); + return execaSync(file, args, normalizeScriptOptions(options)); + }; + return $5; +} +var $4 = create$(); // src/utils/git.ts var import_fs2 = require("fs"); @@ -18781,7 +18996,12 @@ var getHooksPath = async () => { const hooksPath = await getCoreHooksPath(); return import_path2.default.join(hooksPath, HOOK_NAME); } catch (error) { - return DEFAULT_SYMLINK_URL; + try { + const { stdout } = await execa("git", ["rev-parse", "--git-path", "hooks"]); + return import_path2.default.join(stdout, HOOK_NAME); + } catch (error2) { + return DEFAULT_SYMLINK_URL; + } } }; var isHookCalled = async () => { @@ -18910,8 +19130,8 @@ var isBlob = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream2 = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { - const pattern = "[object FormData]"; - return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); + let kind; + return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); @@ -19165,6 +19385,8 @@ var toJSONObject = (obj) => { }; return visit(obj, 0); }; +var isAsyncFn = kindOfTest("AsyncFunction"); +var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); var utils_default = { isArray, isArrayBuffer, @@ -19214,7 +19436,9 @@ var utils_default = { ALPHABET, generateString, isSpecCompliantForm, - toJSONObject + toJSONObject, + isAsyncFn, + isThenable }; // node_modules/axios/lib/core/AxiosError.js @@ -19757,9 +19981,7 @@ function parseTokens(str) { } return tokens; } -function isValidHeaderName(str) { - return /^[-_a-zA-Z]+$/.test(str.trim()); -} +var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -20020,7 +20242,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.3.4"; +var VERSION = "1.4.0"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url3) { @@ -20398,6 +20620,21 @@ var ZlibHeaderTransformStream = class extends import_stream4.default.Transform { }; var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; +// node_modules/axios/lib/helpers/callbackify.js +var callbackify = (fn, reducer) => { + return utils_default.isAsyncFn(fn) ? function(...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } : fn; +}; +var callbackify_default = callbackify; + // node_modules/axios/lib/adapters/http.js var zlibOptions = { flush: import_zlib.default.constants.Z_SYNC_FLUSH, @@ -20478,12 +20715,22 @@ var wrapAsync = (asyncExecutor) => { }; var http_default = isHttpAdapterSupported && function httpAdapter(config4) { return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let { data } = config4; + let { data, lookup, family } = config4; const { responseType, responseEncoding } = config4; const method = config4.method.toUpperCase(); let isDone; let rejected = false; let req; + if (lookup && utils_default.isAsyncFn(lookup)) { + lookup = callbackify_default(lookup, (entry) => { + if (utils_default.isString(entry)) { + entry = [entry, entry.indexOf(".") < 0 ? 6 : 4]; + } else if (!utils_default.isArray(entry)) { + throw new TypeError("lookup async function must return an array [ip: string, family: number]]"); + } + return entry; + }); + } const emitter = new import_events.default(); const onFinished = () => { if (config4.cancelToken) { @@ -20663,6 +20910,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { agents: { http: config4.httpAgent, https: config4.httpsAgent }, auth, protocol, + family, + lookup, beforeRedirect: dispatchBeforeRedirect, beforeRedirects: {} }; @@ -20986,8 +21235,12 @@ var xhr_default = isXHRAdapterSupported && function(config4) { config4.signal.removeEventListener("abort", onCanceled); } } - if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) { - requestHeaders.setContentType(false); + if (utils_default.isFormData(requestData)) { + if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); + } else { + requestHeaders.setContentType("multipart/form-data;", false); + } } let request = new XMLHttpRequest(); if (config4.auth) { @@ -21269,7 +21522,7 @@ function mergeConfig(config1, config22) { validateStatus: mergeDirectKeys, headers: (a2, b5) => mergeDeepProperties(headersToObject(a2), headersToObject(b5), true) }; - utils_default.forEach(Object.keys(config1).concat(Object.keys(config22)), function computeConfigValue(prop) { + utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; const configValue = merge2(config1[prop], config22[prop], prop); utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config4[prop] = configValue); @@ -21361,11 +21614,17 @@ var Axios = class { clarifyTimeoutError: validators2.transitional(validators2.boolean) }, false); } - if (paramsSerializer !== void 0) { - validator_default.assertOptions(paramsSerializer, { - encode: validators2.function, - serialize: validators2.function - }, true); + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config4.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions(paramsSerializer, { + encode: validators2.function, + serialize: validators2.function + }, true); + } } config4.method = (config4.method || this.defaults.method || "get").toLowerCase(); let contextHeaders; diff --git a/out/github-action.cjs b/out/github-action.cjs index 0792c474..99d00c98 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -87,11 +87,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command2, properties, message) { const cmd = new Command(command2, properties, message); - process.stdout.write(cmd.toString() + os2.EOL); + process.stdout.write(cmd.toString() + os3.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -666,7 +666,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs = __importStar(require("fs")); - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var uuid_1 = require_dist(); var utils_1 = require_utils(); function issueFileCommand(command2, message) { @@ -677,7 +677,7 @@ var require_file_command = __commonJS({ if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os3.EOL}`, { encoding: "utf8" }); } @@ -691,7 +691,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -1944,7 +1944,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path = __importStar(require("path")); + var path3 = __importStar(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -1954,7 +1954,7 @@ var require_path_utils = __commonJS({ } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); + return pth.replace(/[/\\]/g, path3.sep); } exports.toPlatformPath = toPlatformPath; } @@ -2024,8 +2024,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os2 = __importStar(require("os")); - var path = __importStar(require("path")); + var os3 = __importStar(require("os")); + var path3 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -2053,10 +2053,10 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; } exports.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}`); @@ -2066,9 +2066,9 @@ var require_core = __commonJS({ } return val.trim(); } - exports.getInput = getInput; + exports.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; } @@ -2078,7 +2078,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)) @@ -2092,7 +2092,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os2.EOL); + process.stdout.write(os3.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput; @@ -2126,7 +2126,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os2.EOL); + process.stdout.write(message + os3.EOL); } exports.info = info; function startGroup(name) { @@ -2205,8 +2205,8 @@ var require_context = __commonJS({ if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + const path3 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path3} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -2488,9 +2488,9 @@ var require_is_plain_object = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js +// node_modules/@octokit/endpoint/dist-node/index.js var require_dist_node2 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js"(exports) { + "node_modules/@octokit/endpoint/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isPlainObject2 = require_is_plain_object(); @@ -2532,10 +2532,10 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults2, route, options) { if (typeof route === "string") { - let [method, url2] = route.split(" "); - options = Object.assign(url2 ? { + let [method, url3] = route.split(" "); + options = Object.assign(url3 ? { method, - url: url2 + url: url3 } : { url: method }, options); @@ -2552,13 +2552,13 @@ var require_dist_node2 = __commonJS({ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); return mergedOptions; } - function addQueryParameters(url2, parameters) { - const separator = /\?/.test(url2) ? "&" : "?"; + function addQueryParameters(url3, parameters) { + const separator = /\?/.test(url3) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url2; + return url3; } - return url2 + separator + names.map((name) => { + return url3 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -2569,8 +2569,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - function extractUrlVariableNames(url2) { - const matches = url2.match(urlVariableRegex); + function extractUrlVariableNames(url3) { + const matches = url3.match(urlVariableRegex); if (!matches) { return []; } @@ -2702,14 +2702,14 @@ var require_dist_node2 = __commonJS({ } function parse(options) { let method = options.method.toUpperCase(); - let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let url3 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); - const urlVariableNames = extractUrlVariableNames(url2); - url2 = parseUrl(url2).expand(parameters); - if (!/^http/.test(url2)) { - url2 = options.baseUrl + url2; + const urlVariableNames = extractUrlVariableNames(url3); + url3 = parseUrl(url3).expand(parameters); + if (!/^http/.test(url3)) { + url3 = options.baseUrl + url3; } const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -2727,7 +2727,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url2 = addQueryParameters(url2, remainingParameters); + url3 = addQueryParameters(url3, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -2747,7 +2747,7 @@ var require_dist_node2 = __commonJS({ } return Object.assign({ method, - url: url2, + url: url3, headers }, typeof body !== "undefined" ? { body @@ -3194,8 +3194,8 @@ var require_url_state_machine = __commonJS({ function isSpecialScheme(scheme) { return specialSchemes[scheme] !== void 0; } - function isSpecial(url2) { - return isSpecialScheme(url2.scheme); + function isSpecial(url3) { + return isSpecialScheme(url3.scheme); } function defaultPort(scheme) { return specialSchemes[scheme]; @@ -3517,38 +3517,38 @@ var require_url_state_machine = __commonJS({ } return host; } - function trimControlChars(url2) { - return url2.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); + function trimControlChars(url3) { + return url3.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); } - function trimTabAndNewline(url2) { - return url2.replace(/\u0009|\u000A|\u000D/g, ""); + function trimTabAndNewline(url3) { + return url3.replace(/\u0009|\u000A|\u000D/g, ""); } - function shortenPath(url2) { - const path = url2.path; - if (path.length === 0) { + function shortenPath(url3) { + const path3 = url3.path; + if (path3.length === 0) { return; } - if (url2.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + if (url3.scheme === "file" && path3.length === 1 && isNormalizedWindowsDriveLetter(path3[0])) { return; } - path.pop(); + path3.pop(); } - function includesCredentials(url2) { - return url2.username !== "" || url2.password !== ""; + function includesCredentials(url3) { + return url3.username !== "" || url3.password !== ""; } - function cannotHaveAUsernamePasswordPort(url2) { - return url2.host === null || url2.host === "" || url2.cannotBeABaseURL || url2.scheme === "file"; + function cannotHaveAUsernamePasswordPort(url3) { + return url3.host === null || url3.host === "" || url3.cannotBeABaseURL || url3.scheme === "file"; } function isNormalizedWindowsDriveLetter(string) { return /^[A-Za-z]:$/.test(string); } - function URLStateMachine(input, base, encodingOverride, url2, stateOverride) { + function URLStateMachine(input, base, encodingOverride, url3, stateOverride) { this.pointer = 0; this.input = input; this.base = base || null; this.encodingOverride = encodingOverride || "utf-8"; this.stateOverride = stateOverride; - this.url = url2; + this.url = url3; this.failure = false; this.parseError = false; if (!this.url) { @@ -4099,36 +4099,36 @@ var require_url_state_machine = __commonJS({ } return true; }; - function serializeURL(url2, excludeFragment) { - let output = url2.scheme + ":"; - if (url2.host !== null) { + function serializeURL(url3, excludeFragment) { + let output = url3.scheme + ":"; + if (url3.host !== null) { output += "//"; - if (url2.username !== "" || url2.password !== "") { - output += url2.username; - if (url2.password !== "") { - output += ":" + url2.password; + if (url3.username !== "" || url3.password !== "") { + output += url3.username; + if (url3.password !== "") { + output += ":" + url3.password; } output += "@"; } - output += serializeHost(url2.host); - if (url2.port !== null) { - output += ":" + url2.port; + output += serializeHost(url3.host); + if (url3.port !== null) { + output += ":" + url3.port; } - } else if (url2.host === null && url2.scheme === "file") { + } else if (url3.host === null && url3.scheme === "file") { output += "//"; } - if (url2.cannotBeABaseURL) { - output += url2.path[0]; + if (url3.cannotBeABaseURL) { + output += url3.path[0]; } else { - for (const string of url2.path) { + for (const string of url3.path) { output += "/" + string; } } - if (url2.query !== null) { - output += "?" + url2.query; + if (url3.query !== null) { + output += "?" + url3.query; } - if (!excludeFragment && url2.fragment !== null) { - output += "#" + url2.fragment; + if (!excludeFragment && url3.fragment !== null) { + output += "#" + url3.fragment; } return output; } @@ -4141,11 +4141,11 @@ var require_url_state_machine = __commonJS({ return result; } module2.exports.serializeURL = serializeURL; - module2.exports.serializeURLOrigin = function(url2) { - switch (url2.scheme) { + module2.exports.serializeURLOrigin = function(url3) { + switch (url3.scheme) { case "blob": try { - return module2.exports.serializeURLOrigin(module2.exports.parseURL(url2.path[0])); + return module2.exports.serializeURLOrigin(module2.exports.parseURL(url3.path[0])); } catch (e2) { return "null"; } @@ -4156,9 +4156,9 @@ var require_url_state_machine = __commonJS({ case "ws": case "wss": return serializeOrigin({ - scheme: url2.scheme, - host: url2.host, - port: url2.port + scheme: url3.scheme, + host: url3.host, + port: url3.port }); case "file": return "file://"; @@ -4176,18 +4176,18 @@ var require_url_state_machine = __commonJS({ } return usm.url; }; - module2.exports.setTheUsername = function(url2, username) { - url2.username = ""; + module2.exports.setTheUsername = function(url3, username) { + url3.username = ""; const decoded = punycode.ucs2.decode(username); for (let i2 = 0; i2 < decoded.length; ++i2) { - url2.username += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); + url3.username += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); } }; - module2.exports.setThePassword = function(url2, password) { - url2.password = ""; + module2.exports.setThePassword = function(url3, password) { + url3.password = ""; const decoded = punycode.ucs2.decode(password); for (let i2 = 0; i2 < decoded.length; ++i2) { - url2.password += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); + url3.password += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); } }; module2.exports.serializeHost = serializeHost; @@ -4211,7 +4211,7 @@ var require_URL_impl = __commonJS({ var usm = require_url_state_machine(); exports.implementation = class URLImpl { constructor(constructorArgs) { - const url2 = constructorArgs[0]; + const url3 = constructorArgs[0]; const base = constructorArgs[1]; let parsedBase = null; if (base !== void 0) { @@ -4220,7 +4220,7 @@ var require_URL_impl = __commonJS({ throw new TypeError("Invalid base URL"); } } - const parsedURL = usm.basicURLParse(url2, { baseURL: parsedBase }); + const parsedURL = usm.basicURLParse(url3, { baseURL: parsedBase }); if (parsedURL === "failure") { throw new TypeError("Invalid URL"); } @@ -4264,14 +4264,14 @@ var require_URL_impl = __commonJS({ usm.setThePassword(this._url, v2); } get host() { - const url2 = this._url; - if (url2.host === null) { + const url3 = this._url; + if (url3.host === null) { return ""; } - if (url2.port === null) { - return usm.serializeHost(url2.host); + if (url3.port === null) { + return usm.serializeHost(url3.host); } - return usm.serializeHost(url2.host) + ":" + usm.serializeInteger(url2.port); + return usm.serializeHost(url3.host) + ":" + usm.serializeInteger(url3.port); } set host(v2) { if (this._url.cannotBeABaseURL) { @@ -4330,14 +4330,14 @@ var require_URL_impl = __commonJS({ return "?" + this._url.query; } set search(v2) { - const url2 = this._url; + const url3 = this._url; if (v2 === "") { - url2.query = null; + url3.query = null; return; } const input = v2[0] === "?" ? v2.substring(1) : v2; - url2.query = ""; - usm.basicURLParse(input, { url: url2, stateOverride: "query" }); + url3.query = ""; + usm.basicURLParse(input, { url: url3, stateOverride: "query" }); } get hash() { if (this._url.fragment === null || this._url.fragment === "") { @@ -4369,7 +4369,7 @@ var require_URL = __commonJS({ var utils = require_utils3(); var Impl = require_URL_impl(); var impl = utils.implSymbol; - function URL2(url2) { + function URL2(url3) { if (!this || this[impl] || !(this instanceof URL2)) { throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); } @@ -5449,13 +5449,13 @@ var require_lib3 = __commonJS({ const dest = new URL$1(destination).protocol; return orig === dest; }; - function fetch(url2, opts) { + function fetch(url3, opts) { if (!fetch.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); } Body.Promise = fetch.Promise; return new fetch.Promise(function(resolve, reject) { - const request = new Request(url2, opts); + const request = new Request(url3, opts); const options = getNodeRequestOptions(request); const send = (options.protocol === "https:" ? https2 : http2).request; const signal = request.signal; @@ -5790,9 +5790,9 @@ var require_once = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js +// node_modules/@octokit/request-error/dist-node/index.js var require_dist_node4 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js"(exports) { + "node_modules/@octokit/request-error/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _interopDefault(ex) { @@ -5844,9 +5844,9 @@ var require_dist_node4 = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js +// node_modules/@octokit/request/dist-node/index.js var require_dist_node5 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js"(exports) { + "node_modules/@octokit/request/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _interopDefault(ex) { @@ -5868,7 +5868,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url2; + let url3; const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; return fetch(requestOptions.url, Object.assign( { @@ -5879,7 +5879,7 @@ var require_dist_node5 = __commonJS({ }, requestOptions.request )).then(async (response) => { - url2 = response.url; + url3 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -5898,7 +5898,7 @@ var require_dist_node5 = __commonJS({ } throw new requestError.RequestError(response.statusText, status, { response: { - url: url2, + url: url3, status, headers, data: void 0 @@ -5909,7 +5909,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new requestError.RequestError("Not modified", status, { response: { - url: url2, + url: url3, status, headers, data: await getResponseData(response) @@ -5921,7 +5921,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error = new requestError.RequestError(toErrorMessage(data), status, { response: { - url: url2, + url: url3, status, headers, data @@ -5934,7 +5934,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url: url2, + url: url3, headers, data }; @@ -5997,9 +5997,9 @@ var require_dist_node5 = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js +// node_modules/@octokit/graphql/dist-node/index.js var require_dist_node6 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js"(exports) { + "node_modules/@octokit/graphql/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var request = require_dist_node5(); @@ -6095,9 +6095,9 @@ var require_dist_node6 = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js +// node_modules/@octokit/auth-token/dist-node/index.js var require_dist_node7 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js"(exports) { + "node_modules/@octokit/auth-token/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; @@ -6141,9 +6141,9 @@ var require_dist_node7 = __commonJS({ } }); -// node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js +// node_modules/@octokit/core/dist-node/index.js var require_dist_node8 = __commonJS({ - "node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js"(exports) { + "node_modules/@octokit/core/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var universalUserAgent = require_dist_node(); @@ -7279,10 +7279,10 @@ var require_dist_node9 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpointsMap)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults2, decorations] = endpoint; - const [method, url2] = route.split(/ /); + const [method, url3] = route.split(/ /); const endpointDefaults = Object.assign({ method, - url: url2 + url: url3 }, defaults2); if (!newMethods[scope]) { newMethods[scope] = {}; @@ -7423,29 +7423,29 @@ var require_dist_node10 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit2.request; const method = options.method; const headers = options.headers; - let url2 = options.url; + let url3 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url2) + if (!url3) return { done: true }; try { const response = await requestMethod({ method, - url: url2, + url: url3, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url2 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + url3 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; return { value: normalizedResponse }; } catch (error) { if (error.status !== 409) throw error; - url2 = ""; + url3 = ""; return { value: { status: 200, @@ -7675,7 +7675,7 @@ var require_io_util = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; var fs = __importStar(require("fs")); - var path = __importStar(require("path")); + var path3 = __importStar(require("path")); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === "win32"; exports.UV_FS_O_EXLOCK = 268435456; @@ -7724,7 +7724,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { - const upperExt = path.extname(filePath).toUpperCase(); + const upperExt = path3.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -7748,11 +7748,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); + const directory = path3.dirname(filePath); + const upperName = path3.basename(filePath).toUpperCase(); for (const actualName of yield exports.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path.join(directory, actualName); + filePath = path3.join(directory, actualName); break; } } @@ -7852,7 +7852,7 @@ var require_io = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; var assert_1 = require("assert"); - var path = __importStar(require("path")); + var path3 = __importStar(require("path")); var ioUtil = __importStar(require_io_util()); function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { @@ -7861,7 +7861,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path3.join(dest, path3.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -7873,7 +7873,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path.relative(source, newDest) === "") { + if (path3.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -7886,7 +7886,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path.join(dest, path.basename(source)); + dest = path3.join(dest, path3.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -7897,7 +7897,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path.dirname(dest)); + yield mkdirP(path3.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -7960,7 +7960,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path3.delimiter)) { if (extension) { extensions.push(extension); } @@ -7973,12 +7973,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path.sep)) { + if (tool.includes(path3.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p2 of process.env.PATH.split(path.delimiter)) { + for (const p2 of process.env.PATH.split(path3.delimiter)) { if (p2) { directories.push(p2); } @@ -7986,7 +7986,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path3.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -8104,10 +8104,10 @@ var require_toolrunner = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.argStringToArray = exports.ToolRunner = void 0; - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var events = __importStar(require("events")); var child = __importStar(require("child_process")); - var path = __importStar(require("path")); + var path3 = __importStar(require("path")); var io = __importStar(require_io()); var ioUtil = __importStar(require_io_util()); var timers_1 = require("timers"); @@ -8159,12 +8159,12 @@ var require_toolrunner = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os2.EOL); + let n = s.indexOf(os3.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os2.EOL.length); - n = s.indexOf(os2.EOL); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); } return s; } catch (err) { @@ -8313,7 +8313,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path3.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { @@ -8324,7 +8324,7 @@ var require_toolrunner = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { @@ -8922,9 +8922,9 @@ var require_buildURL = __commonJS({ function encode3(val) { return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } - module2.exports = function buildURL2(url2, params, paramsSerializer) { + module2.exports = function buildURL2(url3, params, paramsSerializer) { if (!params) { - return url2; + return url3; } var serializedParams; if (paramsSerializer) { @@ -8954,13 +8954,13 @@ var require_buildURL = __commonJS({ serializedParams = parts.join("&"); } if (serializedParams) { - var hashmarkIndex = url2.indexOf("#"); + var hashmarkIndex = url3.indexOf("#"); if (hashmarkIndex !== -1) { - url2 = url2.slice(0, hashmarkIndex); + url3 = url3.slice(0, hashmarkIndex); } - url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams; } - return url2; + return url3; }; } }); @@ -9099,14 +9099,14 @@ var require_cookies = __commonJS({ var utils = require_utils5(); module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv3() { return { - write: function write(name, value, expires, path, domain, secure) { + write: function write(name, value, expires, path3, domain, secure) { var cookie = []; cookie.push(name + "=" + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push("expires=" + new Date(expires).toGMTString()); } - if (utils.isString(path)) { - cookie.push("path=" + path); + if (utils.isString(path3)) { + cookie.push("path=" + path3); } if (utils.isString(domain)) { cookie.push("domain=" + domain); @@ -9142,8 +9142,8 @@ var require_cookies = __commonJS({ var require_isAbsoluteURL = __commonJS({ "node_modules/openai/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module2) { "use strict"; - module2.exports = function isAbsoluteURL2(url2) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); + module2.exports = function isAbsoluteURL2(url3) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3); }; } }); @@ -9234,8 +9234,8 @@ var require_isURLSameOrigin = __commonJS({ var msie = /(msie|trident)/i.test(navigator.userAgent); var urlParsingNode = document.createElement("a"); var originURL; - function resolveURL(url2) { - var href = url2; + function resolveURL(url3) { + var href = url3; if (msie) { urlParsingNode.setAttribute("href", href); href = urlParsingNode.href; @@ -9892,7 +9892,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports, module2) { "use strict"; - var os2 = require("os"); + var os3 = require("os"); var tty2 = require("tty"); var hasFlag2 = require_has_flag(); var { env: env2 } = process; @@ -9940,7 +9940,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os2.release().split("."); + const osRelease = os3.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -10198,8 +10198,8 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports, module2) { - var url2 = require("url"); - var URL2 = url2.URL; + var url3 = require("url"); + var URL2 = url3.URL; var http2 = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -10411,7 +10411,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path; + this._currentUrl = /^\//.test(this._options.path) ? url3.format(this._options) : this._options.path; if (this._isRedirect) { var i2 = 0; var self2 = this; @@ -10469,19 +10469,19 @@ var require_follow_redirects = __commonJS({ removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = url2.parse(this._currentUrl); + var currentUrlParts = url3.parse(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url3.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl; try { - redirectUrl = url2.resolve(currentUrl, location); + redirectUrl = url3.resolve(currentUrl, location); } catch (cause) { this.emit("error", new RedirectionError({ cause })); return; } debug("redirecting to", redirectUrl); this._isRedirect = true; - var redirectUrlParts = url2.parse(redirectUrl); + var redirectUrlParts = url3.parse(redirectUrl); Object.assign(this._options, redirectUrlParts); if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) { removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); @@ -10526,7 +10526,7 @@ var require_follow_redirects = __commonJS({ try { parsed = urlToOptions(new URL2(input)); } catch (err) { - parsed = url2.parse(input); + parsed = url3.parse(input); } if (!isString2(parsed.protocol)) { throw new InvalidUrlError({ input }); @@ -10653,7 +10653,7 @@ var require_http = __commonJS({ var https2 = require("https"); var httpFollow2 = require_follow_redirects().http; var httpsFollow2 = require_follow_redirects().https; - var url2 = require("url"); + var url3 = require("url"); var zlib2 = require("zlib"); var VERSION3 = require_data().version; var createError = require_createError(); @@ -10735,7 +10735,7 @@ var require_http = __commonJS({ auth = username + ":" + password; } var fullPath = buildFullPath2(config4.baseURL, config4.url); - var parsed = url2.parse(fullPath); + var parsed = url3.parse(fullPath); var protocol = parsed.protocol || "http:"; if (!auth && parsed.auth) { var urlAuth = parsed.auth.split(":"); @@ -10776,7 +10776,7 @@ var require_http = __commonJS({ var proxyEnv = protocol.slice(0, -1) + "_proxy"; var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; if (proxyUrl) { - var parsedProxyUrl = url2.parse(proxyUrl); + var parsedProxyUrl = url3.parse(proxyUrl); var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; var shouldProxy = true; if (noProxyEnv) { @@ -11393,19 +11393,19 @@ var require_Axios = __commonJS({ return buildURL2(config4.url, config4.params, config4.paramsSerializer).replace(/^\?/, ""); }; utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData3(method) { - Axios3.prototype[method] = function(url2, config4) { + Axios3.prototype[method] = function(url3, config4) { return this.request(mergeConfig3(config4 || {}, { method, - url: url2, + url: url3, data: (config4 || {}).data })); }; }); utils.forEach(["post", "put", "patch"], function forEachMethodWithData3(method) { - Axios3.prototype[method] = function(url2, data, config4) { + Axios3.prototype[method] = function(url3, data, config4) { return this.request(mergeConfig3(config4 || {}, { method, - url: url2, + url: url3, data })); }; @@ -11683,18 +11683,18 @@ var require_common2 = __commonJS({ } } } - exports.setSearchParams = function(url2, ...objects) { - const searchParams = new URLSearchParams(url2.search); + exports.setSearchParams = function(url3, ...objects) { + const searchParams = new URLSearchParams(url3.search); setFlattenedQueryParams(searchParams, objects); - url2.search = searchParams.toString(); + url3.search = searchParams.toString(); }; exports.serializeDataIfNeeded = function(value, requestOptions, configuration) { const nonString = typeof value !== "string"; const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString; return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || ""; }; - exports.toPathString = function(url2) { - return url2.pathname + url2.search + url2.hash; + exports.toPathString = function(url3) { + return url3.pathname + url3.search + url3.hash; }; exports.createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) { return (axios2 = globalAxios, basePath2 = BASE_PATH) => { @@ -21649,11 +21649,11 @@ var require_mime_types = __commonJS({ } return exts[0]; } - function lookup(path) { - if (!path || typeof path !== "string") { + function lookup(path3) { + if (!path3 || typeof path3 !== "string") { return false; } - var extension2 = extname("x." + path).toLowerCase().substr(1); + var extension2 = extname("x." + path3).toLowerCase().substr(1); if (!extension2) { return false; } @@ -21910,7 +21910,7 @@ var require_form_data = __commonJS({ "node_modules/form-data/lib/form_data.js"(exports, module2) { var CombinedStream = require_combined_stream(); var util2 = require("util"); - var path = require("path"); + var path3 = require("path"); var http2 = require("http"); var https2 = require("https"); var parseUrl = require("url").parse; @@ -22035,11 +22035,11 @@ var require_form_data = __commonJS({ FormData3.prototype._getContentDisposition = function(value, options) { var filename, contentDisposition; if (typeof options.filepath === "string") { - filename = path.normalize(options.filepath).replace(/\\/g, "/"); + filename = path3.normalize(options.filepath).replace(/\\/g, "/"); } else if (options.filename || value.name || value.path) { - filename = path.basename(options.filename || value.name || value.path); + filename = path3.basename(options.filename || value.name || value.path); } else if (value.readable && value.hasOwnProperty("httpVersion")) { - filename = path.basename(value.client._httpMessage.path || ""); + filename = path3.basename(value.client._httpMessage.path || ""); } if (filename) { contentDisposition = 'filename="' + filename + '"'; @@ -22297,8 +22297,8 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl2(url2) { - var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; + function getProxyForUrl2(url3) { + var parsedUrl = typeof url3 === "string" ? parseUrl(url3) : url3 || {}; var proto2 = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; @@ -22311,14 +22311,14 @@ var require_proxy_from_env = __commonJS({ if (!shouldProxy(hostname, port)) { return ""; } - var proxy = getEnv("npm_config_" + proto2 + "_proxy") || getEnv(proto2 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); + var proxy = getEnv2("npm_config_" + proto2 + "_proxy") || getEnv2(proto2 + "_proxy") || getEnv2("npm_config_proxy") || getEnv2("all_proxy"); if (proxy && proxy.indexOf("://") === -1) { proxy = proto2 + "://" + proxy; } return proxy; } function shouldProxy(hostname, port) { - var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); + var NO_PROXY = (getEnv2("npm_config_no_proxy") || getEnv2("no_proxy")).toLowerCase(); if (!NO_PROXY) { return true; } @@ -22344,7 +22344,7 @@ var require_proxy_from_env = __commonJS({ return !stringEndsWith.call(hostname, parsedProxyHostname); }); } - function getEnv(key) { + function getEnv2(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; } exports.getProxyForUrl = getProxyForUrl2; @@ -22600,8 +22600,8 @@ var require_package2 = __commonJS({ var require_main = __commonJS({ "node_modules/dotenv/lib/main.js"(exports, module2) { var fs = require("fs"); - var path = require("path"); - var os2 = require("os"); + var path3 = require("path"); + var os3 = require("os"); var packageJson = require_package2(); var version = packageJson.version; var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; @@ -22628,10 +22628,10 @@ var require_main = __commonJS({ console.log(`[dotenv@${version}][DEBUG] ${message}`); } function _resolveHome(envPath) { - return envPath[0] === "~" ? path.join(os2.homedir(), envPath.slice(1)) : envPath; + return envPath[0] === "~" ? path3.join(os3.homedir(), envPath.slice(1)) : envPath; } function config4(options) { - let dotenvPath = path.resolve(process.cwd(), ".env"); + let dotenvPath = path3.resolve(process.cwd(), ".env"); let encoding = "utf8"; const debug = Boolean(options && options.debug); const override = Boolean(options && options.override); @@ -23003,13 +23003,13 @@ var require_tiktoken = __commonJS({ var wasm = require_tiktoken_bg(); var imports = {}; imports["./tiktoken_bg.js"] = wasm; - var path = require("path"); + var path3 = require("path"); var fs = require("fs"); - var candidates = __dirname.split(path.sep).reduce((memo, _2, index, array) => { - const prefix = array.slice(0, index + 1).join(path.sep) + path.sep; - if (!prefix.includes("node_modules" + path.sep)) { + var candidates = __dirname.split(path3.sep).reduce((memo, _2, index, array) => { + const prefix = array.slice(0, index + 1).join(path3.sep) + path3.sep; + if (!prefix.includes("node_modules" + path3.sep)) { memo.unshift( - path.join( + path3.join( prefix, "node_modules", "@dqbd", @@ -23021,7 +23021,7 @@ var require_tiktoken = __commonJS({ } return memo; }, []); - candidates.unshift(path.join(__dirname, "./tiktoken_bg.wasm")); + candidates.unshift(path3.join(__dirname, "./tiktoken_bg.wasm")); var bytes = null; for (const candidate of candidates) { try { @@ -23045,7 +23045,7 @@ var require_windows = __commonJS({ module2.exports = isexe; isexe.sync = sync; var fs = require("fs"); - function checkPathExt(path, options) { + function checkPathExt(path3, options) { var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; if (!pathext) { return true; @@ -23056,25 +23056,25 @@ var require_windows = __commonJS({ } for (var i2 = 0; i2 < pathext.length; i2++) { var p2 = pathext[i2].toLowerCase(); - if (p2 && path.substr(-p2.length).toLowerCase() === p2) { + if (p2 && path3.substr(-p2.length).toLowerCase() === p2) { return true; } } return false; } - function checkStat(stat, path, options) { + function checkStat(stat, path3, options) { if (!stat.isSymbolicLink() && !stat.isFile()) { return false; } - return checkPathExt(path, options); + return checkPathExt(path3, options); } - function isexe(path, options, cb) { - fs.stat(path, function(er, stat) { - cb(er, er ? false : checkStat(stat, path, options)); + function isexe(path3, options, cb) { + fs.stat(path3, function(er, stat) { + cb(er, er ? false : checkStat(stat, path3, options)); }); } - function sync(path, options) { - return checkStat(fs.statSync(path), path, options); + function sync(path3, options) { + return checkStat(fs.statSync(path3), path3, options); } } }); @@ -23085,13 +23085,13 @@ var require_mode = __commonJS({ module2.exports = isexe; isexe.sync = sync; var fs = require("fs"); - function isexe(path, options, cb) { - fs.stat(path, function(er, stat) { + function isexe(path3, options, cb) { + fs.stat(path3, function(er, stat) { cb(er, er ? false : checkStat(stat, options)); }); } - function sync(path, options) { - return checkStat(fs.statSync(path), options); + function sync(path3, options) { + return checkStat(fs.statSync(path3), options); } function checkStat(stat, options) { return stat.isFile() && checkMode(stat, options); @@ -23124,7 +23124,7 @@ var require_isexe = __commonJS({ } module2.exports = isexe; isexe.sync = sync; - function isexe(path, options, cb) { + function isexe(path3, options, cb) { if (typeof options === "function") { cb = options; options = {}; @@ -23134,7 +23134,7 @@ var require_isexe = __commonJS({ throw new TypeError("callback not provided"); } return new Promise(function(resolve, reject) { - isexe(path, options || {}, function(er, is) { + isexe(path3, options || {}, function(er, is) { if (er) { reject(er); } else { @@ -23143,7 +23143,7 @@ var require_isexe = __commonJS({ }); }); } - core2(path, options || {}, function(er, is) { + core2(path3, options || {}, function(er, is) { if (er) { if (er.code === "EACCES" || options && options.ignoreErrors) { er = null; @@ -23153,9 +23153,9 @@ var require_isexe = __commonJS({ cb(er, is); }); } - function sync(path, options) { + function sync(path3, options) { try { - return core2.sync(path, options || {}); + return core2.sync(path3, options || {}); } catch (er) { if (options && options.ignoreErrors || er.code === "EACCES") { return false; @@ -23171,7 +23171,7 @@ var require_isexe = __commonJS({ var require_which = __commonJS({ "node_modules/which/which.js"(exports, module2) { var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; - var path = require("path"); + var path3 = require("path"); var COLON = isWindows ? ";" : ":"; var isexe = require_isexe(); var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); @@ -23207,7 +23207,7 @@ var require_which = __commonJS({ return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); + const pCmd = path3.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; resolve(subStep(p2, i2, 0)); }); @@ -23234,7 +23234,7 @@ var require_which = __commonJS({ for (let i2 = 0; i2 < pathEnv.length; i2++) { const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); + const pCmd = path3.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; for (let j2 = 0; j2 < pathExt.length; j2++) { const cur = p2 + pathExt[j2]; @@ -23282,7 +23282,7 @@ var require_path_key = __commonJS({ var require_resolveCommand = __commonJS({ "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { "use strict"; - var path = require("path"); + var path3 = require("path"); var which = require_which(); var getPathKey = require_path_key(); function resolveCommandAttempt(parsed, withoutPathExt) { @@ -23300,7 +23300,7 @@ var require_resolveCommand = __commonJS({ try { resolved = which.sync(parsed.command, { path: env2[getPathKey({ env: env2 })], - pathExt: withoutPathExt ? path.delimiter : void 0 + pathExt: withoutPathExt ? path3.delimiter : void 0 }); } catch (e2) { } finally { @@ -23309,7 +23309,7 @@ var require_resolveCommand = __commonJS({ } } if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); } return resolved; } @@ -23363,8 +23363,8 @@ var require_shebang_command = __commonJS({ if (!match) { return null; } - const [path, argument] = match[0].replace(/#! ?/, "").split(" "); - const binary = path.split("/").pop(); + const [path3, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path3.split("/").pop(); if (binary === "env") { return argument; } @@ -23399,7 +23399,7 @@ var require_readShebang = __commonJS({ var require_parse2 = __commonJS({ "node_modules/cross-spawn/lib/parse.js"(exports, module2) { "use strict"; - var path = require("path"); + var path3 = require("path"); var resolveCommand = require_resolveCommand(); var escape = require_escape(); var readShebang = require_readShebang(); @@ -23424,7 +23424,7 @@ var require_parse2 = __commonJS({ const needsShell = !isExecutableRegExp.test(commandFile); if (parsed.options.forceShell || needsShell) { const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path.normalize(parsed.command); + parsed.command = path3.normalize(parsed.command); parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(" "); @@ -23571,11 +23571,11 @@ var require_signals = __commonJS({ // node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "node_modules/signal-exit/index.js"(exports, module2) { - var process3 = global.process; - var processOk = function(process4) { - return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function"; + var process6 = global.process; + var processOk = function(process7) { + return process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; }; - if (!processOk(process3)) { + if (!processOk(process6)) { module2.exports = function() { return function() { }; @@ -23583,15 +23583,15 @@ var require_signal_exit = __commonJS({ } else { assert = require("assert"); signals = require_signals(); - isWin = /^win/i.test(process3.platform); + isWin = /^win/i.test(process6.platform); EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } - if (process3.__signal_exit_emitter__) { - emitter = process3.__signal_exit_emitter__; + if (process6.__signal_exit_emitter__) { + emitter = process6.__signal_exit_emitter__; } else { - emitter = process3.__signal_exit_emitter__ = new EE(); + emitter = process6.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } @@ -23628,12 +23628,12 @@ var require_signal_exit = __commonJS({ loaded = false; signals.forEach(function(sig) { try { - process3.removeListener(sig, sigListeners[sig]); + process6.removeListener(sig, sigListeners[sig]); } catch (er) { } }); - process3.emit = originalProcessEmit; - process3.reallyExit = originalProcessReallyExit; + process6.emit = originalProcessEmit; + process6.reallyExit = originalProcessReallyExit; emitter.count -= 1; }; module2.exports.unload = unload; @@ -23650,7 +23650,7 @@ var require_signal_exit = __commonJS({ if (!processOk(global.process)) { return; } - var listeners = process3.listeners(sig); + var listeners = process6.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); @@ -23658,7 +23658,7 @@ var require_signal_exit = __commonJS({ if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } - process3.kill(process3.pid, sig); + process6.kill(process6.pid, sig); } }; }); @@ -23674,35 +23674,35 @@ var require_signal_exit = __commonJS({ emitter.count += 1; signals = signals.filter(function(sig) { try { - process3.on(sig, sigListeners[sig]); + process6.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); - process3.emit = processEmit; - process3.reallyExit = processReallyExit; + process6.emit = processEmit; + process6.reallyExit = processReallyExit; }; module2.exports.load = load; - originalProcessReallyExit = process3.reallyExit; + originalProcessReallyExit = process6.reallyExit; processReallyExit = function processReallyExit2(code) { if (!processOk(global.process)) { return; } - process3.exitCode = code || 0; - emit("exit", process3.exitCode, null); - emit("afterexit", process3.exitCode, null); - originalProcessReallyExit.call(process3, process3.exitCode); + process6.exitCode = code || 0; + emit("exit", process6.exitCode, null); + emit("afterexit", process6.exitCode, null); + originalProcessReallyExit.call(process6, process6.exitCode); }; - originalProcessEmit = process3.emit; + originalProcessEmit = process6.emit; processEmit = function processEmit2(ev, arg) { if (ev === "exit" && processOk(global.process)) { if (arg !== void 0) { - process3.exitCode = arg; + process6.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process3.exitCode, null); - emit("afterexit", process3.exitCode, null); + emit("exit", process6.exitCode, null); + emit("afterexit", process6.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); @@ -23867,7 +23867,7 @@ var require_merge_stream = __commonJS({ }); // src/github-action.ts -var import_core3 = __toESM(require_core(), 1); +var import_core4 = __toESM(require_core(), 1); var import_github = __toESM(require_github(), 1); var import_exec = __toESM(require_exec(), 1); @@ -24054,8 +24054,8 @@ var isBlob = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { - const pattern = "[object FormData]"; - return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); + let kind; + return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); @@ -24309,6 +24309,8 @@ var toJSONObject = (obj) => { }; return visit(obj, 0); }; +var isAsyncFn = kindOfTest("AsyncFunction"); +var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); var utils_default = { isArray, isArrayBuffer, @@ -24358,7 +24360,9 @@ var utils_default = { ALPHABET, generateString, isSpecCompliantForm, - toJSONObject + toJSONObject, + isAsyncFn, + isThenable }; // node_modules/axios/lib/core/AxiosError.js @@ -24439,10 +24443,10 @@ function isVisitable(thing) { function removeBrackets(key) { return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } -function renderKey(path, key, dots) { - if (!path) +function renderKey(path3, key, dots) { + if (!path3) return key; - return path.concat(key).map(function each(token, i2) { + return path3.concat(key).map(function each(token, i2) { token = removeBrackets(token); return !dots && i2 ? "[" + token + "]" : token; }).join(dots ? "." : ""); @@ -24488,9 +24492,9 @@ function toFormData(obj, formData, options) { } return value; } - function defaultVisitor(value, key, path) { + function defaultVisitor(value, key, path3) { let arr = value; - if (value && !path && typeof value === "object") { + if (value && !path3 && typeof value === "object") { if (utils_default.endsWith(key, "{}")) { key = metaTokens ? key : key.slice(0, -2); value = JSON.stringify(value); @@ -24508,7 +24512,7 @@ function toFormData(obj, formData, options) { if (isVisitable(value)) { return true; } - formData.append(renderKey(path, key, dots), convertValue(value)); + formData.append(renderKey(path3, key, dots), convertValue(value)); return false; } const stack = []; @@ -24517,11 +24521,11 @@ function toFormData(obj, formData, options) { convertValue, isVisitable }); - function build(value, path) { + function build(value, path3) { if (utils_default.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { - throw Error("Circular reference detected in " + path.join(".")); + throw Error("Circular reference detected in " + path3.join(".")); } stack.push(value); utils_default.forEach(value, function each(el, key) { @@ -24529,11 +24533,11 @@ function toFormData(obj, formData, options) { formData, el, utils_default.isString(key) ? key.trim() : key, - path, + path3, exposedHelpers ); if (result === true) { - build(el, path ? path.concat(key) : [key]); + build(el, path3 ? path3.concat(key) : [key]); } }); stack.pop(); @@ -24583,9 +24587,9 @@ var AxiosURLSearchParams_default = AxiosURLSearchParams; function encode2(val) { return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } -function buildURL(url2, params, options) { +function buildURL(url3, params, options) { if (!params) { - return url2; + return url3; } const _encode = options && options.encode || encode2; const serializeFn = options && options.serialize; @@ -24596,13 +24600,13 @@ function buildURL(url2, params, options) { serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode); } if (serializedParams) { - const hashmarkIndex = url2.indexOf("#"); + const hashmarkIndex = url3.indexOf("#"); if (hashmarkIndex !== -1) { - url2 = url2.slice(0, hashmarkIndex); + url3 = url3.slice(0, hashmarkIndex); } - url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams; } - return url2; + return url3; } // node_modules/axios/lib/core/InterceptorManager.js @@ -24664,7 +24668,7 @@ var node_default = { // node_modules/axios/lib/helpers/toURLEncodedForm.js function toURLEncodedForm(data, options) { return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { + visitor: function(value, key, path3, helpers) { if (node_default.isNode && utils_default.isBuffer(value)) { this.append(key, value.toString("base64")); return false; @@ -24693,10 +24697,10 @@ function arrayToObject(arr) { return obj; } function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; + function buildPath(path3, value, target, index) { + let name = path3[index++]; const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; + const isLast = index >= path3.length; name = !name && utils_default.isArray(target) ? target.length : name; if (isLast) { if (utils_default.hasOwnProp(target, name)) { @@ -24709,7 +24713,7 @@ function formDataToJSON(formData) { if (!target[name] || !utils_default.isObject(target[name])) { target[name] = []; } - const result = buildPath(path, value, target[name], index); + const result = buildPath(path3, value, target[name], index); if (result && utils_default.isArray(target[name])) { target[name] = arrayToObject(target[name]); } @@ -24901,9 +24905,7 @@ function parseTokens(str) { } return tokens; } -function isValidHeaderName(str) { - return /^[-_a-zA-Z]+$/.test(str.trim()); -} +var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -25138,8 +25140,8 @@ function settle(resolve, reject, response) { } // node_modules/axios/lib/helpers/isAbsoluteURL.js -function isAbsoluteURL(url2) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); +function isAbsoluteURL(url3) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3); } // node_modules/axios/lib/helpers/combineURLs.js @@ -25164,11 +25166,11 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.3.4"; +var VERSION = "1.4.0"; // node_modules/axios/lib/helpers/parseProtocol.js -function parseProtocol(url2) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); +function parseProtocol(url3) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url3); return match && match[1] || ""; } @@ -25542,6 +25544,21 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform { }; var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; +// node_modules/axios/lib/helpers/callbackify.js +var callbackify = (fn, reducer) => { + return utils_default.isAsyncFn(fn) ? function(...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } : fn; +}; +var callbackify_default = callbackify; + // node_modules/axios/lib/adapters/http.js var zlibOptions = { flush: import_zlib.default.constants.Z_SYNC_FLUSH, @@ -25622,12 +25639,22 @@ var wrapAsync = (asyncExecutor) => { }; var http_default = isHttpAdapterSupported && function httpAdapter(config4) { return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let { data } = config4; + let { data, lookup, family } = config4; const { responseType, responseEncoding } = config4; const method = config4.method.toUpperCase(); let isDone; let rejected = false; let req; + if (lookup && utils_default.isAsyncFn(lookup)) { + lookup = callbackify_default(lookup, (entry) => { + if (utils_default.isString(entry)) { + entry = [entry, entry.indexOf(".") < 0 ? 6 : 4]; + } else if (!utils_default.isArray(entry)) { + throw new TypeError("lookup async function must return an array [ip: string, family: number]]"); + } + return entry; + }); + } const emitter = new import_events.default(); const onFinished = () => { if (config4.cancelToken) { @@ -25781,9 +25808,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { auth = urlUsername + ":" + urlPassword; } auth && headers.delete("authorization"); - let path; + let path3; try { - path = buildURL( + path3 = buildURL( parsed.pathname + parsed.search, config4.params, config4.paramsSerializer @@ -25801,12 +25828,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { false ); const options = { - path, + path: path3, method, headers: headers.toJSON(), agents: { http: config4.httpAgent, https: config4.httpsAgent }, auth, protocol, + family, + lookup, beforeRedirect: dispatchBeforeRedirect, beforeRedirects: {} }; @@ -26020,14 +26049,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { // node_modules/axios/lib/helpers/cookies.js var cookies_default = node_default.isStandardBrowserEnv ? function standardBrowserEnv() { return { - write: function write(name, value, expires, path, domain, secure) { + write: function write(name, value, expires, path3, domain, secure) { const cookie = []; cookie.push(name + "=" + encodeURIComponent(value)); if (utils_default.isNumber(expires)) { cookie.push("expires=" + new Date(expires).toGMTString()); } - if (utils_default.isString(path)) { - cookie.push("path=" + path); + if (utils_default.isString(path3)) { + cookie.push("path=" + path3); } if (utils_default.isString(domain)) { cookie.push("domain=" + domain); @@ -26062,8 +26091,8 @@ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? function stand const msie = /(msie|trident)/i.test(navigator.userAgent); const urlParsingNode = document.createElement("a"); let originURL; - function resolveURL(url2) { - let href = url2; + function resolveURL(url3) { + let href = url3; if (msie) { urlParsingNode.setAttribute("href", href); href = urlParsingNode.href; @@ -26130,8 +26159,12 @@ var xhr_default = isXHRAdapterSupported && function(config4) { config4.signal.removeEventListener("abort", onCanceled); } } - if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) { - requestHeaders.setContentType(false); + if (utils_default.isFormData(requestData)) { + if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); + } else { + requestHeaders.setContentType("multipart/form-data;", false); + } } let request = new XMLHttpRequest(); if (config4.auth) { @@ -26413,7 +26446,7 @@ function mergeConfig(config1, config22) { validateStatus: mergeDirectKeys, headers: (a2, b) => mergeDeepProperties(headersToObject(a2), headersToObject(b), true) }; - utils_default.forEach(Object.keys(config1).concat(Object.keys(config22)), function computeConfigValue(prop) { + utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; const configValue = merge2(config1[prop], config22[prop], prop); utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config4[prop] = configValue); @@ -26505,11 +26538,17 @@ var Axios = class { clarifyTimeoutError: validators2.transitional(validators2.boolean) }, false); } - if (paramsSerializer !== void 0) { - validator_default.assertOptions(paramsSerializer, { - encode: validators2.function, - serialize: validators2.function - }, true); + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config4.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions(paramsSerializer, { + encode: validators2.function, + serialize: validators2.function + }, true); + } } config4.method = (config4.method || this.defaults.method || "get").toLowerCase(); let contextHeaders; @@ -26583,23 +26622,23 @@ var Axios = class { } }; utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) { - Axios.prototype[method] = function(url2, config4) { + Axios.prototype[method] = function(url3, config4) { return this.request(mergeConfig(config4 || {}, { method, - url: url2, + url: url3, data: (config4 || {}).data })); }; }); utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) { function generateHTTPMethod(isForm) { - return function httpMethod(url2, data, config4) { + return function httpMethod(url3, data, config4) { return this.request(mergeConfig(config4 || {}, { method, headers: isForm ? { "Content-Type": "multipart/form-data" } : {}, - url: url2, + url: url3, data })); }; @@ -27613,8 +27652,8 @@ var I18N_CONFIG_ALIAS = { }; function getI18nLocal(value) { for (const key in I18N_CONFIG_ALIAS) { - const aliases = I18N_CONFIG_ALIAS[key]; - if (aliases.includes(value)) { + const aliases2 = I18N_CONFIG_ALIAS[key]; + if (aliases2.includes(value)) { return key; } } @@ -27811,8 +27850,69 @@ function tokenCount(content) { } // node_modules/execa/index.js +var import_node_buffer2 = require("node:buffer"); +var import_node_path2 = __toESM(require("node:path"), 1); +var import_node_child_process3 = __toESM(require("node:child_process"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); var import_cross_spawn = __toESM(require_cross_spawn(), 1); +// node_modules/strip-final-newline/index.js +function stripFinalNewline(input) { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) { + input = input.slice(0, -1); + } + if (input[input.length - 1] === CR) { + input = input.slice(0, -1); + } + return input; +} + +// node_modules/npm-run-path/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_path = __toESM(require("node:path"), 1); +var import_node_url = __toESM(require("node:url"), 1); + +// node_modules/npm-run-path/node_modules/path-key/index.js +function pathKey(options = {}) { + const { + env: env2 = process.env, + platform = process.platform + } = options; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; +} + +// node_modules/npm-run-path/index.js +function npmRunPath(options = {}) { + const { + cwd = import_node_process3.default.cwd(), + path: path_ = import_node_process3.default.env[pathKey()], + execPath = import_node_process3.default.execPath + } = options; + let previous; + const cwdString = cwd instanceof URL ? import_node_url.default.fileURLToPath(cwd) : cwd; + let cwdPath = import_node_path.default.resolve(cwdString); + const result = []; + while (previous !== cwdPath) { + result.push(import_node_path.default.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = import_node_path.default.resolve(cwdPath, ".."); + } + result.push(import_node_path.default.resolve(cwdString, execPath, "..")); + return [...result, path_].join(import_node_path.default.delimiter); +} +function npmRunPathEnv({ env: env2 = import_node_process3.default.env, ...options } = {}) { + env2 = { ...env2 }; + const path3 = pathKey({ env: env2 }); + options.path = env2[path3]; + env2[path3] = npmRunPath(options); + return env2; +} + // node_modules/mimic-fn/index.js var copyProperty = (to, from, property, ignoreNonConfigurable) => { if (property === "length" || property === "prototype") { @@ -27887,14 +27987,673 @@ onetime.callCount = (function_) => { } return calledFunctions.get(function_); }; +var onetime_default = onetime; + +// node_modules/human-signals/build/src/main.js +var import_node_os3 = require("node:os"); + +// node_modules/human-signals/build/src/realtime.js +var getRealtimeSignals = () => { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); +}; +var getRealtimeSignal = (value, index) => ({ + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" +}); +var SIGRTMIN = 34; +var SIGRTMAX = 64; + +// node_modules/human-signals/build/src/signals.js +var import_node_os2 = require("node:os"); + +// node_modules/human-signals/build/src/core.js +var SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: 'Paused using CTRL-Z or "suspend"', + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } +]; + +// node_modules/human-signals/build/src/signals.js +var getSignals = () => { + const realtimeSignals = getRealtimeSignals(); + const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); + return signals; +}; +var normalizeSignal = ({ + name, + number: defaultNumber, + description, + action, + forced = false, + standard +}) => { + const { + signals: { [name]: constantSignal } + } = import_node_os2.constants; + const supported = constantSignal !== void 0; + const number = supported ? constantSignal : defaultNumber; + return { name, number, description, supported, action, forced, standard }; +}; + +// node_modules/human-signals/build/src/main.js +var getSignalsByName = () => { + const signals = getSignals(); + return Object.fromEntries(signals.map(getSignalByName)); +}; +var getSignalByName = ({ + name, + number, + description, + supported, + action, + forced, + standard +}) => [name, { name, number, description, supported, action, forced, standard }]; +var signalsByName = getSignalsByName(); +var getSignalsByNumber = () => { + const signals = getSignals(); + const length = SIGRTMAX + 1; + const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); + return Object.assign({}, ...signalsA); +}; +var getSignalByNumber = (number, signals) => { + const signal = findSignalByNumber(number, signals); + if (signal === void 0) { + return {}; + } + const { name, description, supported, action, forced, standard } = signal; + return { + [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; +}; +var findSignalByNumber = (number, signals) => { + const signal = signals.find(({ name }) => import_node_os3.constants.signals[name] === number); + if (signal !== void 0) { + return signal; + } + return signals.find((signalA) => signalA.number === number); +}; +var signalsByNumber = getSignalsByNumber(); + +// node_modules/execa/lib/error.js +var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + if (isCanceled) { + return "was canceled"; + } + if (errorCode !== void 0) { + return `failed with ${errorCode}`; + } + if (signal !== void 0) { + return `was killed with ${signal} (${signalDescription})`; + } + if (exitCode !== void 0) { + return `failed with exit code ${exitCode}`; + } + return "failed"; +}; +var makeError = ({ + stdout, + stderr, + all: all3, + error, + signal, + exitCode, + command: command2, + escapedCommand, + timedOut, + isCanceled, + killed, + parsed: { options: { timeout } } +}) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const errorCode = error && error.code; + const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); + const execaMessage = `Command ${prefix}: ${command2}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage} +${error.message}` : execaMessage; + const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message; + } else { + error = new Error(message); + } + error.shortMessage = shortMessage; + error.command = command2; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + if (all3 !== void 0) { + error.all = all3; + } + if ("bufferedData" in error) { + delete error.bufferedData; + } + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; +}; + +// node_modules/execa/lib/stdio.js +var aliases = ["stdin", "stdout", "stderr"]; +var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); +var normalizeStdio = (options) => { + if (!options) { + return; + } + const { stdio } = options; + if (stdio === void 0) { + return aliases.map((alias) => options[alias]); + } + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + } + if (typeof stdio === "string") { + return stdio; + } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); +}; // node_modules/execa/lib/kill.js +var import_node_os4 = __toESM(require("node:os"), 1); var import_signal_exit = __toESM(require_signal_exit(), 1); var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; +var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; +}; +var setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + if (t.unref) { + t.unref(); + } +}; +var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; +var isSigterm = (signal) => signal === import_node_os4.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; +var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + return forceKillAfterTimeout; +}; +var spawnedCancel = (spawned, context2) => { + const killResult = spawned.kill(); + if (killResult) { + context2.isCanceled = true; + } +}; +var timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); +}; +var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) { + return spawnedPromise; + } + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); +}; +var validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } +}; +var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + const removeExitHandler = (0, import_signal_exit.default)(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); +}; + +// node_modules/execa/lib/pipe.js +var import_node_fs = require("node:fs"); +var import_node_child_process = require("node:child_process"); + +// node_modules/is-stream/index.js +function isStream2(stream4) { + return stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function"; +} +function isWritableStream(stream4) { + return isStream2(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object"; +} + +// node_modules/execa/lib/pipe.js +var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function"; +var pipeToTarget = (spawned, streamName, target) => { + if (typeof target === "string") { + spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target)); + return spawned; + } + if (isWritableStream(target)) { + spawned[streamName].pipe(target); + return spawned; + } + if (!isExecaChildProcess(target)) { + throw new TypeError("The second argument must be a string, a stream or an Execa child process."); + } + if (!isWritableStream(target.stdin)) { + throw new TypeError("The target child process's stdin must be available."); + } + spawned[streamName].pipe(target.stdin); + return target; +}; +var addPipeMethods = (spawned) => { + if (spawned.stdout !== null) { + spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); + } + if (spawned.stderr !== null) { + spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); + } + if (spawned.all !== void 0) { + spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); + } +}; // node_modules/execa/lib/stream.js +var import_node_fs2 = require("node:fs"); var import_get_stream = __toESM(require_get_stream(), 1); var import_merge_stream = __toESM(require_merge_stream(), 1); +var validateInputOptions = (input) => { + if (input !== void 0) { + throw new TypeError("The `input` and `inputFile` options cannot be both set."); + } +}; +var getInputSync = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs2.readFileSync)(inputFile); +}; +var handleInputSync = (options) => { + const input = getInputSync(options); + if (isStream2(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + return input; +}; +var getInput = ({ input, inputFile }) => { + if (typeof inputFile !== "string") { + return input; + } + validateInputOptions(input); + return (0, import_node_fs2.createReadStream)(inputFile); +}; +var handleInput = (spawned, options) => { + const input = getInput(options); + if (input === void 0) { + return; + } + if (isStream2(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +}; +var makeAllStream = (spawned, { all: all3 }) => { + if (!all3 || !spawned.stdout && !spawned.stderr) { + return; + } + const mixed = (0, import_merge_stream.default)(); + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + return mixed; +}; +var getBufferedData = async (stream4, streamPromise) => { + if (!stream4 || streamPromise === void 0) { + return; + } + stream4.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } +}; +var getStreamPromise = (stream4, { encoding, buffer, maxBuffer }) => { + if (!stream4 || !buffer) { + return; + } + if (encoding) { + return (0, import_get_stream.default)(stream4, { encoding, maxBuffer }); + } + return import_get_stream.default.buffer(stream4, { maxBuffer }); +}; +var getSpawnedResult = async ({ stdout, stderr, all: all3 }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); + const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); + const allPromise = getStreamPromise(all3, { encoding, buffer, maxBuffer: maxBuffer * 2 }); + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + { error, signal: error.signal, timedOut: error.timedOut }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all3, allPromise) + ]); + } +}; // node_modules/execa/lib/promise.js var nativePromisePrototype = (async () => { @@ -27903,9 +28662,318 @@ var descriptors2 = ["then", "catch", "finally"].map((property) => [ property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) ]); +var mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors2) { + const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { ...descriptor, value }); + } +}; +var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ exitCode, signal }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) { + spawned.stdin.on("error", (error) => { + reject(error); + }); + } +}); + +// node_modules/execa/lib/command.js +var import_node_buffer = require("node:buffer"); +var import_node_child_process2 = require("node:child_process"); +var normalizeArgs = (file, args = []) => { + if (!Array.isArray(args)) { + return [file]; + } + return [file, ...args]; +}; +var NO_ESCAPE_REGEXP = /^[\w.-]+$/; +var DOUBLE_QUOTES_REGEXP = /"/g; +var escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { + return arg; + } + return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; +}; +var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); +var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); +var SPACES_REGEXP = / +/g; +var parseExpression = (expression) => { + const typeOfExpression = typeof expression; + if (typeOfExpression === "string") { + return expression; + } + if (typeOfExpression === "number") { + return String(expression); + } + if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) { + const typeOfStdout = typeof expression.stdout; + if (typeOfStdout === "string") { + return expression.stdout; + } + if (import_node_buffer.Buffer.isBuffer(expression.stdout)) { + return expression.stdout.toString(); + } + throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); + } + throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); +}; +var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ + ...tokens.slice(0, -1), + `${tokens[tokens.length - 1]}${nextTokens[0]}`, + ...nextTokens.slice(1) +]; +var parseTemplate = ({ templates, expressions, tokens, index, template }) => { + const templateString = template ?? templates.raw[index]; + const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); + const newTokens = concatTokens( + tokens, + templateTokens, + templateString.startsWith(" ") + ); + if (index === expressions.length) { + return newTokens; + } + const expression = expressions[index]; + const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; + return concatTokens( + newTokens, + expressionTokens, + templateString.endsWith(" ") + ); +}; +var parseTemplates = (templates, expressions) => { + let tokens = []; + for (const [index, template] of templates.entries()) { + tokens = parseTemplate({ templates, expressions, tokens, index, template }); + } + return tokens; +}; + +// node_modules/execa/lib/verbose.js +var import_node_util = require("node:util"); +var import_node_process4 = __toESM(require("node:process"), 1); +var verboseDefault = (0, import_node_util.debuglog)("execa").enabled; +var padField = (field, padding) => String(field).padStart(padding, "0"); +var getTimestamp = () => { + const date = new Date(); + return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; +}; +var logCommand = (escapedCommand, { verbose }) => { + if (!verbose) { + return; + } + import_node_process4.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} +`); +}; // node_modules/execa/index.js var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; +var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env2 = extendEnv ? { ...import_node_process5.default.env, ...envOption } : envOption; + if (preferLocal) { + return npmRunPathEnv({ env: env2, cwd: localDir, execPath }); + } + return env2; +}; +var handleArguments = (file, args, options = {}) => { + const parsed = import_cross_spawn.default._parse(file, args, options); + file = parsed.command; + args = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || import_node_process5.default.cwd(), + execPath: import_node_process5.default.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + verbose: verboseDefault, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (import_node_process5.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { + args.unshift("/q"); + } + return { file, args, options, parsed }; +}; +var handleOutput = (options, value, error) => { + if (typeof value !== "string" && !import_node_buffer2.Buffer.isBuffer(value)) { + return error === void 0 ? void 0 : ""; + } + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + return value; +}; +function execa(file, args, options) { + const parsed = handleArguments(file, args, options); + const command2 = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + validateTimeout(parsed.options); + let spawned; + try { + spawned = import_node_child_process3.default.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + const dummySpawned = new import_node_child_process3.default.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command: command2, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + mergePromise(dummySpawned, errorPromise); + return dummySpawned; + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context2 = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context2); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all3 = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all: all3, + command: command2, + escapedCommand, + parsed, + timedOut, + isCanceled: context2.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false), + killed: spawned.killed + }); + if (!parsed.options.reject) { + return returnedError; + } + throw returnedError; + } + return { + command: command2, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all: all3, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime_default(handlePromise); + handleInput(spawned, parsed.options); + spawned.all = makeAllStream(spawned, parsed.options); + addPipeMethods(spawned); + mergePromise(spawned, handlePromiseOnce); + return spawned; +} +function execaSync(file, args, options) { + const parsed = handleArguments(file, args, options); + const command2 = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + logCommand(escapedCommand, parsed.options); + const input = handleInputSync(parsed.options); + let result; + try { + result = import_node_child_process3.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command: command2, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command: command2, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command: command2, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; +} +var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; +var normalizeScriptOptions = (options = {}) => ({ + preferLocal: true, + ...normalizeScriptStdin(options), + ...options +}); +function create$(options) { + function $3(templatesOrOptions, ...expressions) { + if (!Array.isArray(templatesOrOptions)) { + return create$({ ...options, ...templatesOrOptions }); + } + const [file, ...args] = parseTemplates(templatesOrOptions, expressions); + return execa(file, args, normalizeScriptOptions(options)); + } + $3.sync = (templates, ...expressions) => { + if (!Array.isArray(templates)) { + throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); + } + const [file, ...args] = parseTemplates(templates, expressions); + return execaSync(file, args, normalizeScriptOptions(options)); + }; + return $3; +} +var $2 = create$(); // src/api.ts var config2 = getConfig(); @@ -28152,7 +29220,7 @@ function randomIntFromInterval(min, max) { // src/github-action.ts var import_fs2 = require("fs"); -var GITHUB_TOKEN = import_core3.default.getInput("GITHUB_TOKEN"); +var GITHUB_TOKEN = import_core4.default.getInput("GITHUB_TOKEN"); var octokit = import_github.default.getOctokit(GITHUB_TOKEN); var context = import_github.default.context; var owner = context.repo.owner; @@ -28277,13 +29345,13 @@ async function run() { await improveCommitMessages(commits); } else { ce("Wrong action."); - import_core3.default.error( + import_core4.default.error( `OpenCommit was called on ${import_github.default.context.payload.action}. OpenCommit is supposed to be used on "push" action.` ); } } catch (error) { const err = error?.message || error; - import_core3.default.setFailed(err); + import_core4.default.setFailed(err); } } run(); diff --git a/src/commands/githook.ts b/src/commands/githook.ts index d06de8cd..3bc93a19 100755 --- a/src/commands/githook.ts +++ b/src/commands/githook.ts @@ -6,6 +6,7 @@ import { existsSync } from 'fs'; import chalk from 'chalk'; import { intro, outro } from '@clack/prompts'; import { COMMANDS } from '../CommandsEnum.js'; +import { execa } from 'execa'; const HOOK_NAME = 'prepare-commit-msg'; const DEFAULT_SYMLINK_URL = path.join('.git', 'hooks', HOOK_NAME); @@ -15,7 +16,14 @@ const getHooksPath = async (): Promise<string> => { const hooksPath = await getCoreHooksPath(); return path.join(hooksPath, HOOK_NAME); } catch (error) { - return DEFAULT_SYMLINK_URL; + try { + // Git < 2.9 will throw error. Hence, alternative hook path query for Git < 2.9 + // This works for submodules too. + const { stdout } = await execa("git", ["rev-parse", "--git-path", "hooks"]); + return path.join(stdout, HOOK_NAME); + } catch (error) { + return DEFAULT_SYMLINK_URL; + } } }; From 262f00b2895e9682ed54ef0e115717ac319a46fa Mon Sep 17 00:00:00 2001 From: Daniel Sim <dannie.sim@gmail.com> Date: Thu, 29 Feb 2024 16:56:30 +0000 Subject: [PATCH 2/2] (chore): update out files --- out/cli.cjs | 422 ++--------- out/github-action.cjs | 1688 ++++++++--------------------------------- 2 files changed, 394 insertions(+), 1716 deletions(-) diff --git a/out/cli.cjs b/out/cli.cjs index 9127ecb2..0051afc4 100755 --- a/out/cli.cjs +++ b/out/cli.cjs @@ -992,11 +992,11 @@ var require_signals = __commonJS({ // node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "node_modules/signal-exit/index.js"(exports, module2) { - var process6 = global.process; - var processOk = function(process7) { - return process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; + var process5 = global.process; + var processOk = function(process6) { + return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function"; }; - if (!processOk(process6)) { + if (!processOk(process5)) { module2.exports = function() { return function() { }; @@ -1004,15 +1004,15 @@ var require_signal_exit = __commonJS({ } else { assert = require("assert"); signals = require_signals(); - isWin = /^win/i.test(process6.platform); + isWin = /^win/i.test(process5.platform); EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } - if (process6.__signal_exit_emitter__) { - emitter = process6.__signal_exit_emitter__; + if (process5.__signal_exit_emitter__) { + emitter = process5.__signal_exit_emitter__; } else { - emitter = process6.__signal_exit_emitter__ = new EE(); + emitter = process5.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } @@ -1049,12 +1049,12 @@ var require_signal_exit = __commonJS({ loaded = false; signals.forEach(function(sig) { try { - process6.removeListener(sig, sigListeners[sig]); + process5.removeListener(sig, sigListeners[sig]); } catch (er) { } }); - process6.emit = originalProcessEmit; - process6.reallyExit = originalProcessReallyExit; + process5.emit = originalProcessEmit; + process5.reallyExit = originalProcessReallyExit; emitter.count -= 1; }; module2.exports.unload = unload; @@ -1071,7 +1071,7 @@ var require_signal_exit = __commonJS({ if (!processOk(global.process)) { return; } - var listeners = process6.listeners(sig); + var listeners = process5.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); @@ -1079,7 +1079,7 @@ var require_signal_exit = __commonJS({ if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } - process6.kill(process6.pid, sig); + process5.kill(process5.pid, sig); } }; }); @@ -1095,35 +1095,35 @@ var require_signal_exit = __commonJS({ emitter.count += 1; signals = signals.filter(function(sig) { try { - process6.on(sig, sigListeners[sig]); + process5.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); - process6.emit = processEmit; - process6.reallyExit = processReallyExit; + process5.emit = processEmit; + process5.reallyExit = processReallyExit; }; module2.exports.load = load; - originalProcessReallyExit = process6.reallyExit; + originalProcessReallyExit = process5.reallyExit; processReallyExit = function processReallyExit2(code) { if (!processOk(global.process)) { return; } - process6.exitCode = code || 0; - emit("exit", process6.exitCode, null); - emit("afterexit", process6.exitCode, null); - originalProcessReallyExit.call(process6, process6.exitCode); + process5.exitCode = code || 0; + emit("exit", process5.exitCode, null); + emit("afterexit", process5.exitCode, null); + originalProcessReallyExit.call(process5, process5.exitCode); }; - originalProcessEmit = process6.emit; + originalProcessEmit = process5.emit; processEmit = function processEmit2(ev, arg) { if (ev === "exit" && processOk(global.process)) { if (arg !== void 0) { - process6.exitCode = arg; + process5.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process6.exitCode, null); - emit("afterexit", process6.exitCode, null); + emit("exit", process5.exitCode, null); + emit("afterexit", process5.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); @@ -16229,8 +16229,8 @@ function x2(t, e2, r2, n) { b3(h4, w3(c3), m4, u2); Object.assign(l._, h4); } - const $5 = { ...l, showVersion: f3, showHelp: u2 }; - return typeof r2 == "function" && r2($5), { command: t, ...$5 }; + const $4 = { ...l, showVersion: f3, showHelp: u2 }; + return typeof r2 == "function" && r2($4), { command: t, ...$4 }; } function z2(t, e2) { const r2 = /* @__PURE__ */ new Map(); @@ -16272,7 +16272,7 @@ function G3(t, e2) { // package.json var package_default = { name: "opencommit", - version: "2.4.1", + version: "2.4.2", description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}", keywords: [ "git", @@ -16858,8 +16858,8 @@ ${import_picocolors.default.gray(a)}` : ""}`; `).map((i2, c3) => c3 === 0 ? `${import_picocolors.default.yellow(o)} ${import_picocolors.default.yellow(i2)}` : ` ${i2}`).join(` `); return s + import_picocolors.default.yellow(a) + " " + this.options.map((i2, c3) => { - const l = this.value.includes(i2.value), $5 = c3 === this.cursor; - return $5 && l ? n(i2, "active-selected") : l ? n(i2, "selected") : n(i2, $5 ? "active" : "inactive"); + const l = this.value.includes(i2.value), $4 = c3 === this.cursor; + return $4 && l ? n(i2, "active-selected") : l ? n(i2, "selected") : n(i2, $4 ? "active" : "inactive"); }).join(` ${import_picocolors.default.yellow(a)} `) + ` ` + t + ` @@ -17788,10 +17788,10 @@ var import_promises = __toESM(require("fs/promises"), 1); var import_path2 = __toESM(require("path"), 1); // node_modules/execa/index.js -var import_node_buffer2 = require("node:buffer"); +var import_node_buffer = require("node:buffer"); var import_node_path2 = __toESM(require("node:path"), 1); -var import_node_child_process3 = __toESM(require("node:child_process"), 1); -var import_node_process6 = __toESM(require("node:process"), 1); +var import_node_child_process = __toESM(require("node:child_process"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); var import_cross_spawn = __toESM(require_cross_spawn(), 1); // node_modules/strip-final-newline/index.js @@ -17931,17 +17931,19 @@ var onetime_default = onetime; var import_node_os3 = require("node:os"); // node_modules/human-signals/build/src/realtime.js -var getRealtimeSignals = () => { +var getRealtimeSignals = function() { const length = SIGRTMAX - SIGRTMIN + 1; return Array.from({ length }, getRealtimeSignal); }; -var getRealtimeSignal = (value, index) => ({ - name: `SIGRT${index + 1}`, - number: SIGRTMIN + index, - action: "terminate", - description: "Application-specific signal (realtime)", - standard: "posix" -}); +var getRealtimeSignal = function(value, index) { + return { + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" + }; +}; var SIGRTMIN = 34; var SIGRTMAX = 64; @@ -18222,19 +18224,19 @@ var SIGNALS = [ ]; // node_modules/human-signals/build/src/signals.js -var getSignals = () => { +var getSignals = function() { const realtimeSignals = getRealtimeSignals(); const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); return signals; }; -var normalizeSignal = ({ +var normalizeSignal = function({ name, number: defaultNumber, description, action, forced = false, standard -}) => { +}) { const { signals: { [name]: constantSignal } } = import_node_os2.constants; @@ -18244,11 +18246,11 @@ var normalizeSignal = ({ }; // node_modules/human-signals/build/src/main.js -var getSignalsByName = () => { +var getSignalsByName = function() { const signals = getSignals(); return Object.fromEntries(signals.map(getSignalByName)); }; -var getSignalByName = ({ +var getSignalByName = function({ name, number, description, @@ -18256,15 +18258,20 @@ var getSignalByName = ({ action, forced, standard -}) => [name, { name, number, description, supported, action, forced, standard }]; +}) { + return [ + name, + { name, number, description, supported, action, forced, standard } + ]; +}; var signalsByName = getSignalsByName(); -var getSignalsByNumber = () => { +var getSignalsByNumber = function() { const signals = getSignals(); const length = SIGRTMAX + 1; const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); return Object.assign({}, ...signalsA); }; -var getSignalByNumber = (number, signals) => { +var getSignalByNumber = function(number, signals) { const signal = findSignalByNumber(number, signals); if (signal === void 0) { return {}; @@ -18282,7 +18289,7 @@ var getSignalByNumber = (number, signals) => { } }; }; -var findSignalByNumber = (number, signals) => { +var findSignalByNumber = function(number, signals) { const signal = signals.find(({ name }) => import_node_os3.constants.signals[name] === number); if (signal !== void 0) { return signal; @@ -18459,82 +18466,15 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { }); }; -// node_modules/execa/lib/pipe.js -var import_node_fs = require("node:fs"); -var import_node_child_process = require("node:child_process"); - // node_modules/is-stream/index.js function isStream(stream4) { return stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function"; } -function isWritableStream(stream4) { - return isStream(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object"; -} - -// node_modules/execa/lib/pipe.js -var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function"; -var pipeToTarget = (spawned, streamName, target) => { - if (typeof target === "string") { - spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target)); - return spawned; - } - if (isWritableStream(target)) { - spawned[streamName].pipe(target); - return spawned; - } - if (!isExecaChildProcess(target)) { - throw new TypeError("The second argument must be a string, a stream or an Execa child process."); - } - if (!isWritableStream(target.stdin)) { - throw new TypeError("The target child process's stdin must be available."); - } - spawned[streamName].pipe(target.stdin); - return target; -}; -var addPipeMethods = (spawned) => { - if (spawned.stdout !== null) { - spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); - } - if (spawned.stderr !== null) { - spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); - } - if (spawned.all !== void 0) { - spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); - } -}; // node_modules/execa/lib/stream.js -var import_node_fs2 = require("node:fs"); var import_get_stream = __toESM(require_get_stream(), 1); var import_merge_stream = __toESM(require_merge_stream(), 1); -var validateInputOptions = (input) => { - if (input !== void 0) { - throw new TypeError("The `input` and `inputFile` options cannot be both set."); - } -}; -var getInputSync = ({ input, inputFile }) => { - if (typeof inputFile !== "string") { - return input; - } - validateInputOptions(input); - return (0, import_node_fs2.readFileSync)(inputFile); -}; -var handleInputSync = (options) => { - const input = getInputSync(options); - if (isStream(input)) { - throw new TypeError("The `input` option cannot be a stream in sync mode"); - } - return input; -}; -var getInput = ({ input, inputFile }) => { - if (typeof inputFile !== "string") { - return input; - } - validateInputOptions(input); - return (0, import_node_fs2.createReadStream)(inputFile); -}; -var handleInput = (spawned, options) => { - const input = getInput(options); +var handleInput = (spawned, input) => { if (input === void 0) { return; } @@ -18605,6 +18545,7 @@ var mergePromise = (spawned, promise) => { const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); Reflect.defineProperty(spawned, property, { ...descriptor, value }); } + return spawned; }; var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { spawned.on("exit", (exitCode, signal) => { @@ -18621,8 +18562,6 @@ var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { }); // node_modules/execa/lib/command.js -var import_node_buffer = require("node:buffer"); -var import_node_child_process2 = require("node:child_process"); var normalizeArgs = (file, args = []) => { if (!Array.isArray(args)) { return [file]; @@ -18639,80 +18578,11 @@ var escapeArg = (arg) => { }; var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); -var SPACES_REGEXP = / +/g; -var parseExpression = (expression) => { - const typeOfExpression = typeof expression; - if (typeOfExpression === "string") { - return expression; - } - if (typeOfExpression === "number") { - return String(expression); - } - if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) { - const typeOfStdout = typeof expression.stdout; - if (typeOfStdout === "string") { - return expression.stdout; - } - if (import_node_buffer.Buffer.isBuffer(expression.stdout)) { - return expression.stdout.toString(); - } - throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); - } - throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); -}; -var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ - ...tokens.slice(0, -1), - `${tokens[tokens.length - 1]}${nextTokens[0]}`, - ...nextTokens.slice(1) -]; -var parseTemplate = ({ templates, expressions, tokens, index, template }) => { - const templateString = template ?? templates.raw[index]; - const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); - const newTokens = concatTokens( - tokens, - templateTokens, - templateString.startsWith(" ") - ); - if (index === expressions.length) { - return newTokens; - } - const expression = expressions[index]; - const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; - return concatTokens( - newTokens, - expressionTokens, - templateString.endsWith(" ") - ); -}; -var parseTemplates = (templates, expressions) => { - let tokens = []; - for (const [index, template] of templates.entries()) { - tokens = parseTemplate({ templates, expressions, tokens, index, template }); - } - return tokens; -}; - -// node_modules/execa/lib/verbose.js -var import_node_util = require("node:util"); -var import_node_process5 = __toESM(require("node:process"), 1); -var verboseDefault = (0, import_node_util.debuglog)("execa").enabled; -var padField = (field, padding) => String(field).padStart(padding, "0"); -var getTimestamp = () => { - const date = new Date(); - return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; -}; -var logCommand = (escapedCommand, { verbose }) => { - if (!verbose) { - return; - } - import_node_process5.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} -`); -}; // node_modules/execa/index.js var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { - const env2 = extendEnv ? { ...import_node_process6.default.env, ...envOption } : envOption; + const env2 = extendEnv ? { ...import_node_process5.default.env, ...envOption } : envOption; if (preferLocal) { return npmRunPathEnv({ env: env2, cwd: localDir, execPath }); } @@ -18729,25 +18599,24 @@ var handleArguments = (file, args, options = {}) => { stripFinalNewline: true, extendEnv: true, preferLocal: false, - localDir: options.cwd || import_node_process6.default.cwd(), - execPath: import_node_process6.default.execPath, + localDir: options.cwd || import_node_process5.default.cwd(), + execPath: import_node_process5.default.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, - verbose: verboseDefault, ...options }; options.env = getEnv(options); options.stdio = normalizeStdio(options); - if (import_node_process6.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { + if (import_node_process5.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { args.unshift("/q"); } return { file, args, options, parsed }; }; var handleOutput = (options, value, error) => { - if (typeof value !== "string" && !import_node_buffer2.Buffer.isBuffer(value)) { + if (typeof value !== "string" && !import_node_buffer.Buffer.isBuffer(value)) { return error === void 0 ? void 0 : ""; } if (options.stripFinalNewline) { @@ -18759,13 +18628,12 @@ function execa(file, args, options) { const parsed = handleArguments(file, args, options); const command2 = joinCommand(file, args); const escapedCommand = getEscapedCommand(file, args); - logCommand(escapedCommand, parsed.options); validateTimeout(parsed.options); let spawned; try { - spawned = import_node_child_process3.default.spawn(parsed.file, parsed.args, parsed.options); + spawned = import_node_child_process.default.spawn(parsed.file, parsed.args, parsed.options); } catch (error) { - const dummySpawned = new import_node_child_process3.default.ChildProcess(); + const dummySpawned = new import_node_child_process.default.ChildProcess(); const errorPromise = Promise.reject(makeError({ error, stdout: "", @@ -18778,8 +18646,7 @@ function execa(file, args, options) { isCanceled: false, killed: false })); - mergePromise(dummySpawned, errorPromise); - return dummySpawned; + return mergePromise(dummySpawned, errorPromise); } const spawnedPromise = getSpawnedPromise(spawned); const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); @@ -18826,92 +18693,10 @@ function execa(file, args, options) { }; }; const handlePromiseOnce = onetime_default(handlePromise); - handleInput(spawned, parsed.options); + handleInput(spawned, parsed.options.input); spawned.all = makeAllStream(spawned, parsed.options); - addPipeMethods(spawned); - mergePromise(spawned, handlePromiseOnce); - return spawned; + return mergePromise(spawned, handlePromiseOnce); } -function execaSync(file, args, options) { - const parsed = handleArguments(file, args, options); - const command2 = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - logCommand(escapedCommand, parsed.options); - const input = handleInputSync(parsed.options); - let result; - try { - result = import_node_child_process3.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); - } catch (error) { - throw makeError({ - error, - stdout: "", - stderr: "", - all: "", - command: command2, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command: command2, - escapedCommand, - parsed, - timedOut: result.error && result.error.code === "ETIMEDOUT", - isCanceled: false, - killed: result.signal !== null - }); - if (!parsed.options.reject) { - return error; - } - throw error; - } - return { - command: command2, - escapedCommand, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -} -var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; -var normalizeScriptOptions = (options = {}) => ({ - preferLocal: true, - ...normalizeScriptStdin(options), - ...options -}); -function create$(options) { - function $5(templatesOrOptions, ...expressions) { - if (!Array.isArray(templatesOrOptions)) { - return create$({ ...options, ...templatesOrOptions }); - } - const [file, ...args] = parseTemplates(templatesOrOptions, expressions); - return execa(file, args, normalizeScriptOptions(options)); - } - $5.sync = (templates, ...expressions) => { - if (!Array.isArray(templates)) { - throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); - } - const [file, ...args] = parseTemplates(templates, expressions); - return execaSync(file, args, normalizeScriptOptions(options)); - }; - return $5; -} -var $4 = create$(); // src/utils/git.ts var import_fs2 = require("fs"); @@ -19141,8 +18926,8 @@ var isBlob = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream2 = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { - let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); + const pattern = "[object FormData]"; + return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); @@ -19396,8 +19181,6 @@ var toJSONObject = (obj) => { }; return visit(obj, 0); }; -var isAsyncFn = kindOfTest("AsyncFunction"); -var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); var utils_default = { isArray, isArrayBuffer, @@ -19447,9 +19230,7 @@ var utils_default = { ALPHABET, generateString, isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable + toJSONObject }; // node_modules/axios/lib/core/AxiosError.js @@ -19992,7 +19773,9 @@ function parseTokens(str) { } return tokens; } -var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); +function isValidHeaderName(str) { + return /^[-_a-zA-Z]+$/.test(str.trim()); +} function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -20253,7 +20036,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.4.0"; +var VERSION = "1.3.4"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url3) { @@ -20631,21 +20414,6 @@ var ZlibHeaderTransformStream = class extends import_stream4.default.Transform { }; var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; -// node_modules/axios/lib/helpers/callbackify.js -var callbackify = (fn, reducer) => { - return utils_default.isAsyncFn(fn) ? function(...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); - } - }, cb); - } : fn; -}; -var callbackify_default = callbackify; - // node_modules/axios/lib/adapters/http.js var zlibOptions = { flush: import_zlib.default.constants.Z_SYNC_FLUSH, @@ -20732,16 +20500,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config5) { let isDone; let rejected = false; let req; - if (lookup && utils_default.isAsyncFn(lookup)) { - lookup = callbackify_default(lookup, (entry) => { - if (utils_default.isString(entry)) { - entry = [entry, entry.indexOf(".") < 0 ? 6 : 4]; - } else if (!utils_default.isArray(entry)) { - throw new TypeError("lookup async function must return an array [ip: string, family: number]]"); - } - return entry; - }); - } const emitter = new import_events.default(); const onFinished = () => { if (config5.cancelToken) { @@ -20921,8 +20679,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config5) { agents: { http: config5.httpAgent, https: config5.httpsAgent }, auth, protocol, - family, - lookup, beforeRedirect: dispatchBeforeRedirect, beforeRedirects: {} }; @@ -21246,12 +21002,8 @@ var xhr_default = isXHRAdapterSupported && function(config5) { config5.signal.removeEventListener("abort", onCanceled); } } - if (utils_default.isFormData(requestData)) { - if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) { - requestHeaders.setContentType(false); - } else { - requestHeaders.setContentType("multipart/form-data;", false); - } + if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) { + requestHeaders.setContentType(false); } let request = new XMLHttpRequest(); if (config5.auth) { @@ -21533,7 +21285,7 @@ function mergeConfig(config1, config22) { validateStatus: mergeDirectKeys, headers: (a2, b5) => mergeDeepProperties(headersToObject(a2), headersToObject(b5), true) }; - utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { + utils_default.forEach(Object.keys(config1).concat(Object.keys(config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; const configValue = merge2(config1[prop], config22[prop], prop); utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config5[prop] = configValue); @@ -21625,17 +21377,11 @@ var Axios = class { clarifyTimeoutError: validators2.transitional(validators2.boolean) }, false); } - if (paramsSerializer != null) { - if (utils_default.isFunction(paramsSerializer)) { - config4.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator_default.assertOptions(paramsSerializer, { - encode: validators2.function, - serialize: validators2.function - }, true); - } + if (paramsSerializer !== void 0) { + validator_default.assertOptions(paramsSerializer, { + encode: validators2.function, + serialize: validators2.function + }, true); } config5.method = (config5.method || this.defaults.method || "get").toLowerCase(); let contextHeaders; diff --git a/out/github-action.cjs b/out/github-action.cjs index 34601cba..538491b5 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -87,11 +87,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os3 = __importStar(require("os")); + var os2 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command2, properties, message) { const cmd = new Command(command2, properties, message); - process.stdout.write(cmd.toString() + os3.EOL); + process.stdout.write(cmd.toString() + os2.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -666,7 +666,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs = __importStar(require("fs")); - var os3 = __importStar(require("os")); + var os2 = __importStar(require("os")); var uuid_1 = require_dist(); var utils_1 = require_utils(); function issueFileCommand(command2, message) { @@ -677,7 +677,7 @@ var require_file_command = __commonJS({ if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os3.EOL}`, { + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -691,7 +691,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -1944,7 +1944,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path3 = __importStar(require("path")); + var path = __importStar(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -1954,7 +1954,7 @@ var require_path_utils = __commonJS({ } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path3.sep); + return pth.replace(/[/\\]/g, path.sep); } exports.toPlatformPath = toPlatformPath; } @@ -2024,8 +2024,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os3 = __importStar(require("os")); - var path3 = __importStar(require("path")); + var os2 = __importStar(require("os")); + var path = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -2053,10 +2053,10 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath; - function getInput2(name, options) { + function getInput(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}`); @@ -2066,9 +2066,9 @@ var require_core = __commonJS({ } return val.trim(); } - exports.getInput = getInput2; + exports.getInput = getInput; function getMultilineInput(name, options) { - const inputs = getInput2(name, options).split("\n").filter((x2) => x2 !== ""); + const inputs = getInput(name, options).split("\n").filter((x2) => x2 !== ""); if (options && options.trimWhitespace === false) { return inputs; } @@ -2078,7 +2078,7 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput2(name, options); + const val = getInput(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) @@ -2092,7 +2092,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os3.EOL); + process.stdout.write(os2.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput; @@ -2126,7 +2126,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os3.EOL); + process.stdout.write(message + os2.EOL); } exports.info = info; function startGroup(name) { @@ -2205,8 +2205,8 @@ var require_context = __commonJS({ if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path3 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path3} does not exist${os_1.EOL}`); + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -2488,9 +2488,9 @@ var require_is_plain_object = __commonJS({ } }); -// node_modules/@octokit/endpoint/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js var require_dist_node2 = __commonJS({ - "node_modules/@octokit/endpoint/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isPlainObject2 = require_is_plain_object(); @@ -2532,10 +2532,10 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults2, route, options) { if (typeof route === "string") { - let [method, url3] = route.split(" "); - options = Object.assign(url3 ? { + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, - url: url3 + url: url2 } : { url: method }, options); @@ -2552,13 +2552,13 @@ var require_dist_node2 = __commonJS({ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); return mergedOptions; } - function addQueryParameters(url3, parameters) { - const separator = /\?/.test(url3) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url3; + return url2; } - return url3 + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -2569,8 +2569,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - function extractUrlVariableNames(url3) { - const matches = url3.match(urlVariableRegex); + function extractUrlVariableNames(url2) { + const matches = url2.match(urlVariableRegex); if (!matches) { return []; } @@ -2702,14 +2702,14 @@ var require_dist_node2 = __commonJS({ } function parse(options) { let method = options.method.toUpperCase(); - let url3 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); - const urlVariableNames = extractUrlVariableNames(url3); - url3 = parseUrl(url3).expand(parameters); - if (!/^http/.test(url3)) { - url3 = options.baseUrl + url3; + const urlVariableNames = extractUrlVariableNames(url2); + url2 = parseUrl(url2).expand(parameters); + if (!/^http/.test(url2)) { + url2 = options.baseUrl + url2; } const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -2727,7 +2727,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url3 = addQueryParameters(url3, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -2747,7 +2747,7 @@ var require_dist_node2 = __commonJS({ } return Object.assign({ method, - url: url3, + url: url2, headers }, typeof body !== "undefined" ? { body @@ -3194,8 +3194,8 @@ var require_url_state_machine = __commonJS({ function isSpecialScheme(scheme) { return specialSchemes[scheme] !== void 0; } - function isSpecial(url3) { - return isSpecialScheme(url3.scheme); + function isSpecial(url2) { + return isSpecialScheme(url2.scheme); } function defaultPort(scheme) { return specialSchemes[scheme]; @@ -3517,38 +3517,38 @@ var require_url_state_machine = __commonJS({ } return host; } - function trimControlChars(url3) { - return url3.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); + function trimControlChars(url2) { + return url2.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); } - function trimTabAndNewline(url3) { - return url3.replace(/\u0009|\u000A|\u000D/g, ""); + function trimTabAndNewline(url2) { + return url2.replace(/\u0009|\u000A|\u000D/g, ""); } - function shortenPath(url3) { - const path3 = url3.path; - if (path3.length === 0) { + function shortenPath(url2) { + const path = url2.path; + if (path.length === 0) { return; } - if (url3.scheme === "file" && path3.length === 1 && isNormalizedWindowsDriveLetter(path3[0])) { + if (url2.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { return; } - path3.pop(); + path.pop(); } - function includesCredentials(url3) { - return url3.username !== "" || url3.password !== ""; + function includesCredentials(url2) { + return url2.username !== "" || url2.password !== ""; } - function cannotHaveAUsernamePasswordPort(url3) { - return url3.host === null || url3.host === "" || url3.cannotBeABaseURL || url3.scheme === "file"; + function cannotHaveAUsernamePasswordPort(url2) { + return url2.host === null || url2.host === "" || url2.cannotBeABaseURL || url2.scheme === "file"; } function isNormalizedWindowsDriveLetter(string) { return /^[A-Za-z]:$/.test(string); } - function URLStateMachine(input, base, encodingOverride, url3, stateOverride) { + function URLStateMachine(input, base, encodingOverride, url2, stateOverride) { this.pointer = 0; this.input = input; this.base = base || null; this.encodingOverride = encodingOverride || "utf-8"; this.stateOverride = stateOverride; - this.url = url3; + this.url = url2; this.failure = false; this.parseError = false; if (!this.url) { @@ -4099,36 +4099,36 @@ var require_url_state_machine = __commonJS({ } return true; }; - function serializeURL(url3, excludeFragment) { - let output = url3.scheme + ":"; - if (url3.host !== null) { + function serializeURL(url2, excludeFragment) { + let output = url2.scheme + ":"; + if (url2.host !== null) { output += "//"; - if (url3.username !== "" || url3.password !== "") { - output += url3.username; - if (url3.password !== "") { - output += ":" + url3.password; + if (url2.username !== "" || url2.password !== "") { + output += url2.username; + if (url2.password !== "") { + output += ":" + url2.password; } output += "@"; } - output += serializeHost(url3.host); - if (url3.port !== null) { - output += ":" + url3.port; + output += serializeHost(url2.host); + if (url2.port !== null) { + output += ":" + url2.port; } - } else if (url3.host === null && url3.scheme === "file") { + } else if (url2.host === null && url2.scheme === "file") { output += "//"; } - if (url3.cannotBeABaseURL) { - output += url3.path[0]; + if (url2.cannotBeABaseURL) { + output += url2.path[0]; } else { - for (const string of url3.path) { + for (const string of url2.path) { output += "/" + string; } } - if (url3.query !== null) { - output += "?" + url3.query; + if (url2.query !== null) { + output += "?" + url2.query; } - if (!excludeFragment && url3.fragment !== null) { - output += "#" + url3.fragment; + if (!excludeFragment && url2.fragment !== null) { + output += "#" + url2.fragment; } return output; } @@ -4141,11 +4141,11 @@ var require_url_state_machine = __commonJS({ return result; } module2.exports.serializeURL = serializeURL; - module2.exports.serializeURLOrigin = function(url3) { - switch (url3.scheme) { + module2.exports.serializeURLOrigin = function(url2) { + switch (url2.scheme) { case "blob": try { - return module2.exports.serializeURLOrigin(module2.exports.parseURL(url3.path[0])); + return module2.exports.serializeURLOrigin(module2.exports.parseURL(url2.path[0])); } catch (e2) { return "null"; } @@ -4156,9 +4156,9 @@ var require_url_state_machine = __commonJS({ case "ws": case "wss": return serializeOrigin({ - scheme: url3.scheme, - host: url3.host, - port: url3.port + scheme: url2.scheme, + host: url2.host, + port: url2.port }); case "file": return "file://"; @@ -4176,18 +4176,18 @@ var require_url_state_machine = __commonJS({ } return usm.url; }; - module2.exports.setTheUsername = function(url3, username) { - url3.username = ""; + module2.exports.setTheUsername = function(url2, username) { + url2.username = ""; const decoded = punycode.ucs2.decode(username); for (let i2 = 0; i2 < decoded.length; ++i2) { - url3.username += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); + url2.username += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); } }; - module2.exports.setThePassword = function(url3, password) { - url3.password = ""; + module2.exports.setThePassword = function(url2, password) { + url2.password = ""; const decoded = punycode.ucs2.decode(password); for (let i2 = 0; i2 < decoded.length; ++i2) { - url3.password += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); + url2.password += percentEncodeChar(decoded[i2], isUserinfoPercentEncode); } }; module2.exports.serializeHost = serializeHost; @@ -4211,7 +4211,7 @@ var require_URL_impl = __commonJS({ var usm = require_url_state_machine(); exports.implementation = class URLImpl { constructor(constructorArgs) { - const url3 = constructorArgs[0]; + const url2 = constructorArgs[0]; const base = constructorArgs[1]; let parsedBase = null; if (base !== void 0) { @@ -4220,7 +4220,7 @@ var require_URL_impl = __commonJS({ throw new TypeError("Invalid base URL"); } } - const parsedURL = usm.basicURLParse(url3, { baseURL: parsedBase }); + const parsedURL = usm.basicURLParse(url2, { baseURL: parsedBase }); if (parsedURL === "failure") { throw new TypeError("Invalid URL"); } @@ -4264,14 +4264,14 @@ var require_URL_impl = __commonJS({ usm.setThePassword(this._url, v2); } get host() { - const url3 = this._url; - if (url3.host === null) { + const url2 = this._url; + if (url2.host === null) { return ""; } - if (url3.port === null) { - return usm.serializeHost(url3.host); + if (url2.port === null) { + return usm.serializeHost(url2.host); } - return usm.serializeHost(url3.host) + ":" + usm.serializeInteger(url3.port); + return usm.serializeHost(url2.host) + ":" + usm.serializeInteger(url2.port); } set host(v2) { if (this._url.cannotBeABaseURL) { @@ -4330,14 +4330,14 @@ var require_URL_impl = __commonJS({ return "?" + this._url.query; } set search(v2) { - const url3 = this._url; + const url2 = this._url; if (v2 === "") { - url3.query = null; + url2.query = null; return; } const input = v2[0] === "?" ? v2.substring(1) : v2; - url3.query = ""; - usm.basicURLParse(input, { url: url3, stateOverride: "query" }); + url2.query = ""; + usm.basicURLParse(input, { url: url2, stateOverride: "query" }); } get hash() { if (this._url.fragment === null || this._url.fragment === "") { @@ -4369,7 +4369,7 @@ var require_URL = __commonJS({ var utils = require_utils3(); var Impl = require_URL_impl(); var impl = utils.implSymbol; - function URL2(url3) { + function URL2(url2) { if (!this || this[impl] || !(this instanceof URL2)) { throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); } @@ -5449,13 +5449,13 @@ var require_lib3 = __commonJS({ const dest = new URL$1(destination).protocol; return orig === dest; }; - function fetch(url3, opts) { + function fetch(url2, opts) { if (!fetch.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); } Body.Promise = fetch.Promise; return new fetch.Promise(function(resolve, reject) { - const request = new Request(url3, opts); + const request = new Request(url2, opts); const options = getNodeRequestOptions(request); const send = (options.protocol === "https:" ? https2 : http2).request; const signal = request.signal; @@ -5790,9 +5790,9 @@ var require_once = __commonJS({ } }); -// node_modules/@octokit/request-error/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js var require_dist_node4 = __commonJS({ - "node_modules/@octokit/request-error/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _interopDefault(ex) { @@ -5844,9 +5844,9 @@ var require_dist_node4 = __commonJS({ } }); -// node_modules/@octokit/request/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js var require_dist_node5 = __commonJS({ - "node_modules/@octokit/request/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _interopDefault(ex) { @@ -5868,7 +5868,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url3; + let url2; const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; return fetch(requestOptions.url, Object.assign( { @@ -5879,7 +5879,7 @@ var require_dist_node5 = __commonJS({ }, requestOptions.request )).then(async (response) => { - url3 = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -5898,7 +5898,7 @@ var require_dist_node5 = __commonJS({ } throw new requestError.RequestError(response.statusText, status, { response: { - url: url3, + url: url2, status, headers, data: void 0 @@ -5909,7 +5909,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new requestError.RequestError("Not modified", status, { response: { - url: url3, + url: url2, status, headers, data: await getResponseData(response) @@ -5921,7 +5921,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error = new requestError.RequestError(toErrorMessage(data), status, { response: { - url: url3, + url: url2, status, headers, data @@ -5934,7 +5934,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url: url3, + url: url2, headers, data }; @@ -5997,9 +5997,9 @@ var require_dist_node5 = __commonJS({ } }); -// node_modules/@octokit/graphql/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js var require_dist_node6 = __commonJS({ - "node_modules/@octokit/graphql/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var request = require_dist_node5(); @@ -6095,9 +6095,9 @@ var require_dist_node6 = __commonJS({ } }); -// node_modules/@octokit/auth-token/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js var require_dist_node7 = __commonJS({ - "node_modules/@octokit/auth-token/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; @@ -6141,9 +6141,9 @@ var require_dist_node7 = __commonJS({ } }); -// node_modules/@octokit/core/dist-node/index.js +// node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js var require_dist_node8 = __commonJS({ - "node_modules/@octokit/core/dist-node/index.js"(exports) { + "node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var universalUserAgent = require_dist_node(); @@ -7279,10 +7279,10 @@ var require_dist_node9 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpointsMap)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults2, decorations] = endpoint; - const [method, url3] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign({ method, - url: url3 + url: url2 }, defaults2); if (!newMethods[scope]) { newMethods[scope] = {}; @@ -7423,29 +7423,29 @@ var require_dist_node10 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit2.request; const method = options.method; const headers = options.headers; - let url3 = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url3) + if (!url2) return { done: true }; try { const response = await requestMethod({ method, - url: url3, + url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url3 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + url2 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; return { value: normalizedResponse }; } catch (error) { if (error.status !== 409) throw error; - url3 = ""; + url2 = ""; return { value: { status: 200, @@ -7675,7 +7675,7 @@ var require_io_util = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; var fs = __importStar(require("fs")); - var path3 = __importStar(require("path")); + var path = __importStar(require("path")); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === "win32"; exports.UV_FS_O_EXLOCK = 268435456; @@ -7724,7 +7724,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { - const upperExt = path3.extname(filePath).toUpperCase(); + const upperExt = path.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -7748,11 +7748,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { try { - const directory = path3.dirname(filePath); - const upperName = path3.basename(filePath).toUpperCase(); + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); for (const actualName of yield exports.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path3.join(directory, actualName); + filePath = path.join(directory, actualName); break; } } @@ -7852,7 +7852,7 @@ var require_io = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; var assert_1 = require("assert"); - var path3 = __importStar(require("path")); + var path = __importStar(require("path")); var ioUtil = __importStar(require_io_util()); function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { @@ -7861,7 +7861,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path3.join(dest, path3.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -7873,7 +7873,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path3.relative(source, newDest) === "") { + if (path.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -7886,7 +7886,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path3.join(dest, path3.basename(source)); + dest = path.join(dest, path.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -7897,7 +7897,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path3.dirname(dest)); + yield mkdirP(path.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -7960,7 +7960,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path3.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path.delimiter)) { if (extension) { extensions.push(extension); } @@ -7973,12 +7973,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path3.sep)) { + if (tool.includes(path.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p2 of process.env.PATH.split(path3.delimiter)) { + for (const p2 of process.env.PATH.split(path.delimiter)) { if (p2) { directories.push(p2); } @@ -7986,7 +7986,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path3.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -8104,10 +8104,10 @@ var require_toolrunner = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.argStringToArray = exports.ToolRunner = void 0; - var os3 = __importStar(require("os")); + var os2 = __importStar(require("os")); var events = __importStar(require("events")); var child = __importStar(require("child_process")); - var path3 = __importStar(require("path")); + var path = __importStar(require("path")); var io = __importStar(require_io()); var ioUtil = __importStar(require_io_util()); var timers_1 = require("timers"); @@ -8159,12 +8159,12 @@ var require_toolrunner = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os3.EOL); + let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os3.EOL.length); - n = s.indexOf(os3.EOL); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); } return s; } catch (err) { @@ -8313,7 +8313,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path3.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { @@ -8324,7 +8324,7 @@ var require_toolrunner = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { @@ -8922,9 +8922,9 @@ var require_buildURL = __commonJS({ function encode3(val) { return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } - module2.exports = function buildURL2(url3, params, paramsSerializer) { + module2.exports = function buildURL2(url2, params, paramsSerializer) { if (!params) { - return url3; + return url2; } var serializedParams; if (paramsSerializer) { @@ -8954,13 +8954,13 @@ var require_buildURL = __commonJS({ serializedParams = parts.join("&"); } if (serializedParams) { - var hashmarkIndex = url3.indexOf("#"); + var hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { - url3 = url3.slice(0, hashmarkIndex); + url2 = url2.slice(0, hashmarkIndex); } - url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams; + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } - return url3; + return url2; }; } }); @@ -9099,14 +9099,14 @@ var require_cookies = __commonJS({ var utils = require_utils5(); module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv3() { return { - write: function write(name, value, expires, path3, domain, secure) { + write: function write(name, value, expires, path, domain, secure) { var cookie = []; cookie.push(name + "=" + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push("expires=" + new Date(expires).toGMTString()); } - if (utils.isString(path3)) { - cookie.push("path=" + path3); + if (utils.isString(path)) { + cookie.push("path=" + path); } if (utils.isString(domain)) { cookie.push("domain=" + domain); @@ -9142,8 +9142,8 @@ var require_cookies = __commonJS({ var require_isAbsoluteURL = __commonJS({ "node_modules/openai/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module2) { "use strict"; - module2.exports = function isAbsoluteURL2(url3) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3); + module2.exports = function isAbsoluteURL2(url2) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); }; } }); @@ -9234,8 +9234,8 @@ var require_isURLSameOrigin = __commonJS({ var msie = /(msie|trident)/i.test(navigator.userAgent); var urlParsingNode = document.createElement("a"); var originURL; - function resolveURL(url3) { - var href = url3; + function resolveURL(url2) { + var href = url2; if (msie) { urlParsingNode.setAttribute("href", href); href = urlParsingNode.href; @@ -9892,7 +9892,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports, module2) { "use strict"; - var os3 = require("os"); + var os2 = require("os"); var tty2 = require("tty"); var hasFlag2 = require_has_flag(); var { env: env2 } = process; @@ -9940,7 +9940,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os3.release().split("."); + const osRelease = os2.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -10198,8 +10198,8 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports, module2) { - var url3 = require("url"); - var URL2 = url3.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http2 = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -10411,7 +10411,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url3.format(this._options) : this._options.path; + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path; if (this._isRedirect) { var i2 = 0; var self2 = this; @@ -10469,19 +10469,19 @@ var require_follow_redirects = __commonJS({ removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = url3.parse(this._currentUrl); + var currentUrlParts = url2.parse(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url3.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl; try { - redirectUrl = url3.resolve(currentUrl, location); + redirectUrl = url2.resolve(currentUrl, location); } catch (cause) { this.emit("error", new RedirectionError({ cause })); return; } debug("redirecting to", redirectUrl); this._isRedirect = true; - var redirectUrlParts = url3.parse(redirectUrl); + var redirectUrlParts = url2.parse(redirectUrl); Object.assign(this._options, redirectUrlParts); if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) { removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); @@ -10526,7 +10526,7 @@ var require_follow_redirects = __commonJS({ try { parsed = urlToOptions(new URL2(input)); } catch (err) { - parsed = url3.parse(input); + parsed = url2.parse(input); } if (!isString2(parsed.protocol)) { throw new InvalidUrlError({ input }); @@ -10653,7 +10653,7 @@ var require_http = __commonJS({ var https2 = require("https"); var httpFollow2 = require_follow_redirects().http; var httpsFollow2 = require_follow_redirects().https; - var url3 = require("url"); + var url2 = require("url"); var zlib2 = require("zlib"); var VERSION3 = require_data().version; var createError = require_createError(); @@ -10735,7 +10735,7 @@ var require_http = __commonJS({ auth = username + ":" + password; } var fullPath = buildFullPath2(config4.baseURL, config4.url); - var parsed = url3.parse(fullPath); + var parsed = url2.parse(fullPath); var protocol = parsed.protocol || "http:"; if (!auth && parsed.auth) { var urlAuth = parsed.auth.split(":"); @@ -10776,7 +10776,7 @@ var require_http = __commonJS({ var proxyEnv = protocol.slice(0, -1) + "_proxy"; var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; if (proxyUrl) { - var parsedProxyUrl = url3.parse(proxyUrl); + var parsedProxyUrl = url2.parse(proxyUrl); var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; var shouldProxy = true; if (noProxyEnv) { @@ -11393,19 +11393,19 @@ var require_Axios = __commonJS({ return buildURL2(config4.url, config4.params, config4.paramsSerializer).replace(/^\?/, ""); }; utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData3(method) { - Axios3.prototype[method] = function(url3, config4) { + Axios3.prototype[method] = function(url2, config4) { return this.request(mergeConfig3(config4 || {}, { method, - url: url3, + url: url2, data: (config4 || {}).data })); }; }); utils.forEach(["post", "put", "patch"], function forEachMethodWithData3(method) { - Axios3.prototype[method] = function(url3, data, config4) { + Axios3.prototype[method] = function(url2, data, config4) { return this.request(mergeConfig3(config4 || {}, { method, - url: url3, + url: url2, data })); }; @@ -11683,18 +11683,18 @@ var require_common2 = __commonJS({ } } } - exports.setSearchParams = function(url3, ...objects) { - const searchParams = new URLSearchParams(url3.search); + exports.setSearchParams = function(url2, ...objects) { + const searchParams = new URLSearchParams(url2.search); setFlattenedQueryParams(searchParams, objects); - url3.search = searchParams.toString(); + url2.search = searchParams.toString(); }; exports.serializeDataIfNeeded = function(value, requestOptions, configuration) { const nonString = typeof value !== "string"; const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString; return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || ""; }; - exports.toPathString = function(url3) { - return url3.pathname + url3.search + url3.hash; + exports.toPathString = function(url2) { + return url2.pathname + url2.search + url2.hash; }; exports.createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) { return (axios2 = globalAxios, basePath2 = BASE_PATH) => { @@ -21649,11 +21649,11 @@ var require_mime_types = __commonJS({ } return exts[0]; } - function lookup(path3) { - if (!path3 || typeof path3 !== "string") { + function lookup(path) { + if (!path || typeof path !== "string") { return false; } - var extension2 = extname("x." + path3).toLowerCase().substr(1); + var extension2 = extname("x." + path).toLowerCase().substr(1); if (!extension2) { return false; } @@ -21910,7 +21910,7 @@ var require_form_data = __commonJS({ "node_modules/form-data/lib/form_data.js"(exports, module2) { var CombinedStream = require_combined_stream(); var util2 = require("util"); - var path3 = require("path"); + var path = require("path"); var http2 = require("http"); var https2 = require("https"); var parseUrl = require("url").parse; @@ -22035,11 +22035,11 @@ var require_form_data = __commonJS({ FormData3.prototype._getContentDisposition = function(value, options) { var filename, contentDisposition; if (typeof options.filepath === "string") { - filename = path3.normalize(options.filepath).replace(/\\/g, "/"); + filename = path.normalize(options.filepath).replace(/\\/g, "/"); } else if (options.filename || value.name || value.path) { - filename = path3.basename(options.filename || value.name || value.path); + filename = path.basename(options.filename || value.name || value.path); } else if (value.readable && value.hasOwnProperty("httpVersion")) { - filename = path3.basename(value.client._httpMessage.path || ""); + filename = path.basename(value.client._httpMessage.path || ""); } if (filename) { contentDisposition = 'filename="' + filename + '"'; @@ -22297,8 +22297,8 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl2(url3) { - var parsedUrl = typeof url3 === "string" ? parseUrl(url3) : url3 || {}; + function getProxyForUrl2(url2) { + var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; var proto2 = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; @@ -22311,14 +22311,14 @@ var require_proxy_from_env = __commonJS({ if (!shouldProxy(hostname, port)) { return ""; } - var proxy = getEnv2("npm_config_" + proto2 + "_proxy") || getEnv2(proto2 + "_proxy") || getEnv2("npm_config_proxy") || getEnv2("all_proxy"); + var proxy = getEnv("npm_config_" + proto2 + "_proxy") || getEnv(proto2 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); if (proxy && proxy.indexOf("://") === -1) { proxy = proto2 + "://" + proxy; } return proxy; } function shouldProxy(hostname, port) { - var NO_PROXY = (getEnv2("npm_config_no_proxy") || getEnv2("no_proxy")).toLowerCase(); + var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); if (!NO_PROXY) { return true; } @@ -22344,7 +22344,7 @@ var require_proxy_from_env = __commonJS({ return !stringEndsWith.call(hostname, parsedProxyHostname); }); } - function getEnv2(key) { + function getEnv(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; } exports.getProxyForUrl = getProxyForUrl2; @@ -22600,8 +22600,8 @@ var require_package2 = __commonJS({ var require_main = __commonJS({ "node_modules/dotenv/lib/main.js"(exports, module2) { var fs = require("fs"); - var path3 = require("path"); - var os3 = require("os"); + var path = require("path"); + var os2 = require("os"); var packageJson = require_package2(); var version = packageJson.version; var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; @@ -22628,10 +22628,10 @@ var require_main = __commonJS({ console.log(`[dotenv@${version}][DEBUG] ${message}`); } function _resolveHome(envPath) { - return envPath[0] === "~" ? path3.join(os3.homedir(), envPath.slice(1)) : envPath; + return envPath[0] === "~" ? path.join(os2.homedir(), envPath.slice(1)) : envPath; } function config4(options) { - let dotenvPath = path3.resolve(process.cwd(), ".env"); + let dotenvPath = path.resolve(process.cwd(), ".env"); let encoding = "utf8"; const debug = Boolean(options && options.debug); const override = Boolean(options && options.override); @@ -23003,13 +23003,13 @@ var require_tiktoken = __commonJS({ var wasm = require_tiktoken_bg(); var imports = {}; imports["./tiktoken_bg.js"] = wasm; - var path3 = require("path"); + var path = require("path"); var fs = require("fs"); - var candidates = __dirname.split(path3.sep).reduce((memo, _2, index, array) => { - const prefix = array.slice(0, index + 1).join(path3.sep) + path3.sep; - if (!prefix.includes("node_modules" + path3.sep)) { + var candidates = __dirname.split(path.sep).reduce((memo, _2, index, array) => { + const prefix = array.slice(0, index + 1).join(path.sep) + path.sep; + if (!prefix.includes("node_modules" + path.sep)) { memo.unshift( - path3.join( + path.join( prefix, "node_modules", "@dqbd", @@ -23021,7 +23021,7 @@ var require_tiktoken = __commonJS({ } return memo; }, []); - candidates.unshift(path3.join(__dirname, "./tiktoken_bg.wasm")); + candidates.unshift(path.join(__dirname, "./tiktoken_bg.wasm")); var bytes = null; for (const candidate of candidates) { try { @@ -23045,7 +23045,7 @@ var require_windows = __commonJS({ module2.exports = isexe; isexe.sync = sync; var fs = require("fs"); - function checkPathExt(path3, options) { + function checkPathExt(path, options) { var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; if (!pathext) { return true; @@ -23056,25 +23056,25 @@ var require_windows = __commonJS({ } for (var i2 = 0; i2 < pathext.length; i2++) { var p2 = pathext[i2].toLowerCase(); - if (p2 && path3.substr(-p2.length).toLowerCase() === p2) { + if (p2 && path.substr(-p2.length).toLowerCase() === p2) { return true; } } return false; } - function checkStat(stat, path3, options) { + function checkStat(stat, path, options) { if (!stat.isSymbolicLink() && !stat.isFile()) { return false; } - return checkPathExt(path3, options); + return checkPathExt(path, options); } - function isexe(path3, options, cb) { - fs.stat(path3, function(er, stat) { - cb(er, er ? false : checkStat(stat, path3, options)); + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, path, options)); }); } - function sync(path3, options) { - return checkStat(fs.statSync(path3), path3, options); + function sync(path, options) { + return checkStat(fs.statSync(path), path, options); } } }); @@ -23085,13 +23085,13 @@ var require_mode = __commonJS({ module2.exports = isexe; isexe.sync = sync; var fs = require("fs"); - function isexe(path3, options, cb) { - fs.stat(path3, function(er, stat) { + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { cb(er, er ? false : checkStat(stat, options)); }); } - function sync(path3, options) { - return checkStat(fs.statSync(path3), options); + function sync(path, options) { + return checkStat(fs.statSync(path), options); } function checkStat(stat, options) { return stat.isFile() && checkMode(stat, options); @@ -23124,7 +23124,7 @@ var require_isexe = __commonJS({ } module2.exports = isexe; isexe.sync = sync; - function isexe(path3, options, cb) { + function isexe(path, options, cb) { if (typeof options === "function") { cb = options; options = {}; @@ -23134,7 +23134,7 @@ var require_isexe = __commonJS({ throw new TypeError("callback not provided"); } return new Promise(function(resolve, reject) { - isexe(path3, options || {}, function(er, is) { + isexe(path, options || {}, function(er, is) { if (er) { reject(er); } else { @@ -23143,7 +23143,7 @@ var require_isexe = __commonJS({ }); }); } - core2(path3, options || {}, function(er, is) { + core2(path, options || {}, function(er, is) { if (er) { if (er.code === "EACCES" || options && options.ignoreErrors) { er = null; @@ -23153,9 +23153,9 @@ var require_isexe = __commonJS({ cb(er, is); }); } - function sync(path3, options) { + function sync(path, options) { try { - return core2.sync(path3, options || {}); + return core2.sync(path, options || {}); } catch (er) { if (options && options.ignoreErrors || er.code === "EACCES") { return false; @@ -23171,7 +23171,7 @@ var require_isexe = __commonJS({ var require_which = __commonJS({ "node_modules/which/which.js"(exports, module2) { var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; - var path3 = require("path"); + var path = require("path"); var COLON = isWindows ? ";" : ":"; var isexe = require_isexe(); var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); @@ -23207,7 +23207,7 @@ var require_which = __commonJS({ return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path3.join(pathPart, cmd); + const pCmd = path.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; resolve(subStep(p2, i2, 0)); }); @@ -23234,7 +23234,7 @@ var require_which = __commonJS({ for (let i2 = 0; i2 < pathEnv.length; i2++) { const ppRaw = pathEnv[i2]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path3.join(pathPart, cmd); + const pCmd = path.join(pathPart, cmd); const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; for (let j2 = 0; j2 < pathExt.length; j2++) { const cur = p2 + pathExt[j2]; @@ -23282,7 +23282,7 @@ var require_path_key = __commonJS({ var require_resolveCommand = __commonJS({ "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { "use strict"; - var path3 = require("path"); + var path = require("path"); var which = require_which(); var getPathKey = require_path_key(); function resolveCommandAttempt(parsed, withoutPathExt) { @@ -23300,7 +23300,7 @@ var require_resolveCommand = __commonJS({ try { resolved = which.sync(parsed.command, { path: env2[getPathKey({ env: env2 })], - pathExt: withoutPathExt ? path3.delimiter : void 0 + pathExt: withoutPathExt ? path.delimiter : void 0 }); } catch (e2) { } finally { @@ -23309,7 +23309,7 @@ var require_resolveCommand = __commonJS({ } } if (resolved) { - resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); } return resolved; } @@ -23363,8 +23363,8 @@ var require_shebang_command = __commonJS({ if (!match) { return null; } - const [path3, argument] = match[0].replace(/#! ?/, "").split(" "); - const binary = path3.split("/").pop(); + const [path, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path.split("/").pop(); if (binary === "env") { return argument; } @@ -23399,7 +23399,7 @@ var require_readShebang = __commonJS({ var require_parse2 = __commonJS({ "node_modules/cross-spawn/lib/parse.js"(exports, module2) { "use strict"; - var path3 = require("path"); + var path = require("path"); var resolveCommand = require_resolveCommand(); var escape = require_escape(); var readShebang = require_readShebang(); @@ -23424,7 +23424,7 @@ var require_parse2 = __commonJS({ const needsShell = !isExecutableRegExp.test(commandFile); if (parsed.options.forceShell || needsShell) { const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path3.normalize(parsed.command); + parsed.command = path.normalize(parsed.command); parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(" "); @@ -23571,11 +23571,11 @@ var require_signals = __commonJS({ // node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "node_modules/signal-exit/index.js"(exports, module2) { - var process6 = global.process; - var processOk = function(process7) { - return process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function"; + var process3 = global.process; + var processOk = function(process4) { + return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function"; }; - if (!processOk(process6)) { + if (!processOk(process3)) { module2.exports = function() { return function() { }; @@ -23583,15 +23583,15 @@ var require_signal_exit = __commonJS({ } else { assert = require("assert"); signals = require_signals(); - isWin = /^win/i.test(process6.platform); + isWin = /^win/i.test(process3.platform); EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } - if (process6.__signal_exit_emitter__) { - emitter = process6.__signal_exit_emitter__; + if (process3.__signal_exit_emitter__) { + emitter = process3.__signal_exit_emitter__; } else { - emitter = process6.__signal_exit_emitter__ = new EE(); + emitter = process3.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } @@ -23628,12 +23628,12 @@ var require_signal_exit = __commonJS({ loaded = false; signals.forEach(function(sig) { try { - process6.removeListener(sig, sigListeners[sig]); + process3.removeListener(sig, sigListeners[sig]); } catch (er) { } }); - process6.emit = originalProcessEmit; - process6.reallyExit = originalProcessReallyExit; + process3.emit = originalProcessEmit; + process3.reallyExit = originalProcessReallyExit; emitter.count -= 1; }; module2.exports.unload = unload; @@ -23650,7 +23650,7 @@ var require_signal_exit = __commonJS({ if (!processOk(global.process)) { return; } - var listeners = process6.listeners(sig); + var listeners = process3.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); @@ -23658,7 +23658,7 @@ var require_signal_exit = __commonJS({ if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } - process6.kill(process6.pid, sig); + process3.kill(process3.pid, sig); } }; }); @@ -23674,35 +23674,35 @@ var require_signal_exit = __commonJS({ emitter.count += 1; signals = signals.filter(function(sig) { try { - process6.on(sig, sigListeners[sig]); + process3.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); - process6.emit = processEmit; - process6.reallyExit = processReallyExit; + process3.emit = processEmit; + process3.reallyExit = processReallyExit; }; module2.exports.load = load; - originalProcessReallyExit = process6.reallyExit; + originalProcessReallyExit = process3.reallyExit; processReallyExit = function processReallyExit2(code) { if (!processOk(global.process)) { return; } - process6.exitCode = code || 0; - emit("exit", process6.exitCode, null); - emit("afterexit", process6.exitCode, null); - originalProcessReallyExit.call(process6, process6.exitCode); + process3.exitCode = code || 0; + emit("exit", process3.exitCode, null); + emit("afterexit", process3.exitCode, null); + originalProcessReallyExit.call(process3, process3.exitCode); }; - originalProcessEmit = process6.emit; + originalProcessEmit = process3.emit; processEmit = function processEmit2(ev, arg) { if (ev === "exit" && processOk(global.process)) { if (arg !== void 0) { - process6.exitCode = arg; + process3.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process6.exitCode, null); - emit("afterexit", process6.exitCode, null); + emit("exit", process3.exitCode, null); + emit("afterexit", process3.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); @@ -23867,7 +23867,7 @@ var require_merge_stream = __commonJS({ }); // src/github-action.ts -var import_core4 = __toESM(require_core(), 1); +var import_core3 = __toESM(require_core(), 1); var import_github = __toESM(require_github(), 1); var import_exec = __toESM(require_exec(), 1); @@ -24054,8 +24054,8 @@ var isBlob = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { - let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); + const pattern = "[object FormData]"; + return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); @@ -24309,8 +24309,6 @@ var toJSONObject = (obj) => { }; return visit(obj, 0); }; -var isAsyncFn = kindOfTest("AsyncFunction"); -var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); var utils_default = { isArray, isArrayBuffer, @@ -24360,9 +24358,7 @@ var utils_default = { ALPHABET, generateString, isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable + toJSONObject }; // node_modules/axios/lib/core/AxiosError.js @@ -24443,10 +24439,10 @@ function isVisitable(thing) { function removeBrackets(key) { return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } -function renderKey(path3, key, dots) { - if (!path3) +function renderKey(path, key, dots) { + if (!path) return key; - return path3.concat(key).map(function each(token, i2) { + return path.concat(key).map(function each(token, i2) { token = removeBrackets(token); return !dots && i2 ? "[" + token + "]" : token; }).join(dots ? "." : ""); @@ -24492,9 +24488,9 @@ function toFormData(obj, formData, options) { } return value; } - function defaultVisitor(value, key, path3) { + function defaultVisitor(value, key, path) { let arr = value; - if (value && !path3 && typeof value === "object") { + if (value && !path && typeof value === "object") { if (utils_default.endsWith(key, "{}")) { key = metaTokens ? key : key.slice(0, -2); value = JSON.stringify(value); @@ -24512,7 +24508,7 @@ function toFormData(obj, formData, options) { if (isVisitable(value)) { return true; } - formData.append(renderKey(path3, key, dots), convertValue(value)); + formData.append(renderKey(path, key, dots), convertValue(value)); return false; } const stack = []; @@ -24521,11 +24517,11 @@ function toFormData(obj, formData, options) { convertValue, isVisitable }); - function build(value, path3) { + function build(value, path) { if (utils_default.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { - throw Error("Circular reference detected in " + path3.join(".")); + throw Error("Circular reference detected in " + path.join(".")); } stack.push(value); utils_default.forEach(value, function each(el, key) { @@ -24533,11 +24529,11 @@ function toFormData(obj, formData, options) { formData, el, utils_default.isString(key) ? key.trim() : key, - path3, + path, exposedHelpers ); if (result === true) { - build(el, path3 ? path3.concat(key) : [key]); + build(el, path ? path.concat(key) : [key]); } }); stack.pop(); @@ -24587,9 +24583,9 @@ var AxiosURLSearchParams_default = AxiosURLSearchParams; function encode2(val) { return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } -function buildURL(url3, params, options) { +function buildURL(url2, params, options) { if (!params) { - return url3; + return url2; } const _encode = options && options.encode || encode2; const serializeFn = options && options.serialize; @@ -24600,13 +24596,13 @@ function buildURL(url3, params, options) { serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode); } if (serializedParams) { - const hashmarkIndex = url3.indexOf("#"); + const hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { - url3 = url3.slice(0, hashmarkIndex); + url2 = url2.slice(0, hashmarkIndex); } - url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams; + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } - return url3; + return url2; } // node_modules/axios/lib/core/InterceptorManager.js @@ -24668,7 +24664,7 @@ var node_default = { // node_modules/axios/lib/helpers/toURLEncodedForm.js function toURLEncodedForm(data, options) { return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path3, helpers) { + visitor: function(value, key, path, helpers) { if (node_default.isNode && utils_default.isBuffer(value)) { this.append(key, value.toString("base64")); return false; @@ -24697,10 +24693,10 @@ function arrayToObject(arr) { return obj; } function formDataToJSON(formData) { - function buildPath(path3, value, target, index) { - let name = path3[index++]; + function buildPath(path, value, target, index) { + let name = path[index++]; const isNumericKey = Number.isFinite(+name); - const isLast = index >= path3.length; + const isLast = index >= path.length; name = !name && utils_default.isArray(target) ? target.length : name; if (isLast) { if (utils_default.hasOwnProp(target, name)) { @@ -24713,7 +24709,7 @@ function formDataToJSON(formData) { if (!target[name] || !utils_default.isObject(target[name])) { target[name] = []; } - const result = buildPath(path3, value, target[name], index); + const result = buildPath(path, value, target[name], index); if (result && utils_default.isArray(target[name])) { target[name] = arrayToObject(target[name]); } @@ -24905,7 +24901,9 @@ function parseTokens(str) { } return tokens; } -var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); +function isValidHeaderName(str) { + return /^[-_a-zA-Z]+$/.test(str.trim()); +} function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { if (utils_default.isFunction(filter2)) { return filter2.call(this, value, header); @@ -25140,8 +25138,8 @@ function settle(resolve, reject, response) { } // node_modules/axios/lib/helpers/isAbsoluteURL.js -function isAbsoluteURL(url3) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3); +function isAbsoluteURL(url2) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } // node_modules/axios/lib/helpers/combineURLs.js @@ -25166,11 +25164,11 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.4.0"; +var VERSION = "1.3.4"; // node_modules/axios/lib/helpers/parseProtocol.js -function parseProtocol(url3) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url3); +function parseProtocol(url2) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); return match && match[1] || ""; } @@ -25544,21 +25542,6 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform { }; var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; -// node_modules/axios/lib/helpers/callbackify.js -var callbackify = (fn, reducer) => { - return utils_default.isAsyncFn(fn) ? function(...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); - } - }, cb); - } : fn; -}; -var callbackify_default = callbackify; - // node_modules/axios/lib/adapters/http.js var zlibOptions = { flush: import_zlib.default.constants.Z_SYNC_FLUSH, @@ -25639,22 +25622,12 @@ var wrapAsync = (asyncExecutor) => { }; var http_default = isHttpAdapterSupported && function httpAdapter(config4) { return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let { data, lookup, family } = config4; + let { data } = config4; const { responseType, responseEncoding } = config4; const method = config4.method.toUpperCase(); let isDone; let rejected = false; let req; - if (lookup && utils_default.isAsyncFn(lookup)) { - lookup = callbackify_default(lookup, (entry) => { - if (utils_default.isString(entry)) { - entry = [entry, entry.indexOf(".") < 0 ? 6 : 4]; - } else if (!utils_default.isArray(entry)) { - throw new TypeError("lookup async function must return an array [ip: string, family: number]]"); - } - return entry; - }); - } const emitter = new import_events.default(); const onFinished = () => { if (config4.cancelToken) { @@ -25808,9 +25781,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { auth = urlUsername + ":" + urlPassword; } auth && headers.delete("authorization"); - let path3; + let path; try { - path3 = buildURL( + path = buildURL( parsed.pathname + parsed.search, config4.params, config4.paramsSerializer @@ -25828,14 +25801,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { false ); const options = { - path: path3, + path, method, headers: headers.toJSON(), agents: { http: config4.httpAgent, https: config4.httpsAgent }, auth, protocol, - family, - lookup, beforeRedirect: dispatchBeforeRedirect, beforeRedirects: {} }; @@ -26049,14 +26020,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config4) { // node_modules/axios/lib/helpers/cookies.js var cookies_default = node_default.isStandardBrowserEnv ? function standardBrowserEnv() { return { - write: function write(name, value, expires, path3, domain, secure) { + write: function write(name, value, expires, path, domain, secure) { const cookie = []; cookie.push(name + "=" + encodeURIComponent(value)); if (utils_default.isNumber(expires)) { cookie.push("expires=" + new Date(expires).toGMTString()); } - if (utils_default.isString(path3)) { - cookie.push("path=" + path3); + if (utils_default.isString(path)) { + cookie.push("path=" + path); } if (utils_default.isString(domain)) { cookie.push("domain=" + domain); @@ -26091,8 +26062,8 @@ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? function stand const msie = /(msie|trident)/i.test(navigator.userAgent); const urlParsingNode = document.createElement("a"); let originURL; - function resolveURL(url3) { - let href = url3; + function resolveURL(url2) { + let href = url2; if (msie) { urlParsingNode.setAttribute("href", href); href = urlParsingNode.href; @@ -26159,12 +26130,8 @@ var xhr_default = isXHRAdapterSupported && function(config4) { config4.signal.removeEventListener("abort", onCanceled); } } - if (utils_default.isFormData(requestData)) { - if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) { - requestHeaders.setContentType(false); - } else { - requestHeaders.setContentType("multipart/form-data;", false); - } + if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) { + requestHeaders.setContentType(false); } let request = new XMLHttpRequest(); if (config4.auth) { @@ -26446,7 +26413,7 @@ function mergeConfig(config1, config22) { validateStatus: mergeDirectKeys, headers: (a2, b) => mergeDeepProperties(headersToObject(a2), headersToObject(b), true) }; - utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { + utils_default.forEach(Object.keys(config1).concat(Object.keys(config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; const configValue = merge2(config1[prop], config22[prop], prop); utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config4[prop] = configValue); @@ -26538,17 +26505,11 @@ var Axios = class { clarifyTimeoutError: validators2.transitional(validators2.boolean) }, false); } - if (paramsSerializer != null) { - if (utils_default.isFunction(paramsSerializer)) { - config4.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator_default.assertOptions(paramsSerializer, { - encode: validators2.function, - serialize: validators2.function - }, true); - } + if (paramsSerializer !== void 0) { + validator_default.assertOptions(paramsSerializer, { + encode: validators2.function, + serialize: validators2.function + }, true); } config4.method = (config4.method || this.defaults.method || "get").toLowerCase(); let contextHeaders; @@ -26622,23 +26583,23 @@ var Axios = class { } }; utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) { - Axios.prototype[method] = function(url3, config4) { + Axios.prototype[method] = function(url2, config4) { return this.request(mergeConfig(config4 || {}, { method, - url: url3, + url: url2, data: (config4 || {}).data })); }; }); utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) { function generateHTTPMethod(isForm) { - return function httpMethod(url3, data, config4) { + return function httpMethod(url2, data, config4) { return this.request(mergeConfig(config4 || {}, { method, headers: isForm ? { "Content-Type": "multipart/form-data" } : {}, - url: url3, + url: url2, data })); }; @@ -27652,8 +27613,8 @@ var I18N_CONFIG_ALIAS = { }; function getI18nLocal(value) { for (const key in I18N_CONFIG_ALIAS) { - const aliases2 = I18N_CONFIG_ALIAS[key]; - if (aliases2.includes(value)) { + const aliases = I18N_CONFIG_ALIAS[key]; + if (aliases.includes(value)) { return key; } } @@ -27864,69 +27825,8 @@ function tokenCount(content) { } // node_modules/execa/index.js -var import_node_buffer2 = require("node:buffer"); -var import_node_path2 = __toESM(require("node:path"), 1); -var import_node_child_process3 = __toESM(require("node:child_process"), 1); -var import_node_process5 = __toESM(require("node:process"), 1); var import_cross_spawn = __toESM(require_cross_spawn(), 1); -// node_modules/strip-final-newline/index.js -function stripFinalNewline(input) { - const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); - const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); - if (input[input.length - 1] === LF) { - input = input.slice(0, -1); - } - if (input[input.length - 1] === CR) { - input = input.slice(0, -1); - } - return input; -} - -// node_modules/npm-run-path/index.js -var import_node_process3 = __toESM(require("node:process"), 1); -var import_node_path = __toESM(require("node:path"), 1); -var import_node_url = __toESM(require("node:url"), 1); - -// node_modules/npm-run-path/node_modules/path-key/index.js -function pathKey(options = {}) { - const { - env: env2 = process.env, - platform = process.platform - } = options; - if (platform !== "win32") { - return "PATH"; - } - return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; -} - -// node_modules/npm-run-path/index.js -function npmRunPath(options = {}) { - const { - cwd = import_node_process3.default.cwd(), - path: path_ = import_node_process3.default.env[pathKey()], - execPath = import_node_process3.default.execPath - } = options; - let previous; - const cwdString = cwd instanceof URL ? import_node_url.default.fileURLToPath(cwd) : cwd; - let cwdPath = import_node_path.default.resolve(cwdString); - const result = []; - while (previous !== cwdPath) { - result.push(import_node_path.default.join(cwdPath, "node_modules/.bin")); - previous = cwdPath; - cwdPath = import_node_path.default.resolve(cwdPath, ".."); - } - result.push(import_node_path.default.resolve(cwdString, execPath, "..")); - return [...result, path_].join(import_node_path.default.delimiter); -} -function npmRunPathEnv({ env: env2 = import_node_process3.default.env, ...options } = {}) { - env2 = { ...env2 }; - const path3 = pathKey({ env: env2 }); - options.path = env2[path3]; - env2[path3] = npmRunPath(options); - return env2; -} - // node_modules/mimic-fn/index.js var copyProperty = (to, from, property, ignoreNonConfigurable) => { if (property === "length" || property === "prototype") { @@ -28001,673 +27901,14 @@ onetime.callCount = (function_) => { } return calledFunctions.get(function_); }; -var onetime_default = onetime; - -// node_modules/human-signals/build/src/main.js -var import_node_os3 = require("node:os"); - -// node_modules/human-signals/build/src/realtime.js -var getRealtimeSignals = () => { - const length = SIGRTMAX - SIGRTMIN + 1; - return Array.from({ length }, getRealtimeSignal); -}; -var getRealtimeSignal = (value, index) => ({ - name: `SIGRT${index + 1}`, - number: SIGRTMIN + index, - action: "terminate", - description: "Application-specific signal (realtime)", - standard: "posix" -}); -var SIGRTMIN = 34; -var SIGRTMAX = 64; - -// node_modules/human-signals/build/src/signals.js -var import_node_os2 = require("node:os"); - -// node_modules/human-signals/build/src/core.js -var SIGNALS = [ - { - name: "SIGHUP", - number: 1, - action: "terminate", - description: "Terminal closed", - standard: "posix" - }, - { - name: "SIGINT", - number: 2, - action: "terminate", - description: "User interruption with CTRL-C", - standard: "ansi" - }, - { - name: "SIGQUIT", - number: 3, - action: "core", - description: "User interruption with CTRL-\\", - standard: "posix" - }, - { - name: "SIGILL", - number: 4, - action: "core", - description: "Invalid machine instruction", - standard: "ansi" - }, - { - name: "SIGTRAP", - number: 5, - action: "core", - description: "Debugger breakpoint", - standard: "posix" - }, - { - name: "SIGABRT", - number: 6, - action: "core", - description: "Aborted", - standard: "ansi" - }, - { - name: "SIGIOT", - number: 6, - action: "core", - description: "Aborted", - standard: "bsd" - }, - { - name: "SIGBUS", - number: 7, - action: "core", - description: "Bus error due to misaligned, non-existing address or paging error", - standard: "bsd" - }, - { - name: "SIGEMT", - number: 7, - action: "terminate", - description: "Command should be emulated but is not implemented", - standard: "other" - }, - { - name: "SIGFPE", - number: 8, - action: "core", - description: "Floating point arithmetic error", - standard: "ansi" - }, - { - name: "SIGKILL", - number: 9, - action: "terminate", - description: "Forced termination", - standard: "posix", - forced: true - }, - { - name: "SIGUSR1", - number: 10, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGSEGV", - number: 11, - action: "core", - description: "Segmentation fault", - standard: "ansi" - }, - { - name: "SIGUSR2", - number: 12, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGPIPE", - number: 13, - action: "terminate", - description: "Broken pipe or socket", - standard: "posix" - }, - { - name: "SIGALRM", - number: 14, - action: "terminate", - description: "Timeout or timer", - standard: "posix" - }, - { - name: "SIGTERM", - number: 15, - action: "terminate", - description: "Termination", - standard: "ansi" - }, - { - name: "SIGSTKFLT", - number: 16, - action: "terminate", - description: "Stack is empty or overflowed", - standard: "other" - }, - { - name: "SIGCHLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "posix" - }, - { - name: "SIGCLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "other" - }, - { - name: "SIGCONT", - number: 18, - action: "unpause", - description: "Unpaused", - standard: "posix", - forced: true - }, - { - name: "SIGSTOP", - number: 19, - action: "pause", - description: "Paused", - standard: "posix", - forced: true - }, - { - name: "SIGTSTP", - number: 20, - action: "pause", - description: 'Paused using CTRL-Z or "suspend"', - standard: "posix" - }, - { - name: "SIGTTIN", - number: 21, - action: "pause", - description: "Background process cannot read terminal input", - standard: "posix" - }, - { - name: "SIGBREAK", - number: 21, - action: "terminate", - description: "User interruption with CTRL-BREAK", - standard: "other" - }, - { - name: "SIGTTOU", - number: 22, - action: "pause", - description: "Background process cannot write to terminal output", - standard: "posix" - }, - { - name: "SIGURG", - number: 23, - action: "ignore", - description: "Socket received out-of-band data", - standard: "bsd" - }, - { - name: "SIGXCPU", - number: 24, - action: "core", - description: "Process timed out", - standard: "bsd" - }, - { - name: "SIGXFSZ", - number: 25, - action: "core", - description: "File too big", - standard: "bsd" - }, - { - name: "SIGVTALRM", - number: 26, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGPROF", - number: 27, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGWINCH", - number: 28, - action: "ignore", - description: "Terminal window size changed", - standard: "bsd" - }, - { - name: "SIGIO", - number: 29, - action: "terminate", - description: "I/O is available", - standard: "other" - }, - { - name: "SIGPOLL", - number: 29, - action: "terminate", - description: "Watched event", - standard: "other" - }, - { - name: "SIGINFO", - number: 29, - action: "ignore", - description: "Request for process information", - standard: "other" - }, - { - name: "SIGPWR", - number: 30, - action: "terminate", - description: "Device running out of power", - standard: "systemv" - }, - { - name: "SIGSYS", - number: 31, - action: "core", - description: "Invalid system call", - standard: "other" - }, - { - name: "SIGUNUSED", - number: 31, - action: "terminate", - description: "Invalid system call", - standard: "other" - } -]; - -// node_modules/human-signals/build/src/signals.js -var getSignals = () => { - const realtimeSignals = getRealtimeSignals(); - const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); - return signals; -}; -var normalizeSignal = ({ - name, - number: defaultNumber, - description, - action, - forced = false, - standard -}) => { - const { - signals: { [name]: constantSignal } - } = import_node_os2.constants; - const supported = constantSignal !== void 0; - const number = supported ? constantSignal : defaultNumber; - return { name, number, description, supported, action, forced, standard }; -}; - -// node_modules/human-signals/build/src/main.js -var getSignalsByName = () => { - const signals = getSignals(); - return Object.fromEntries(signals.map(getSignalByName)); -}; -var getSignalByName = ({ - name, - number, - description, - supported, - action, - forced, - standard -}) => [name, { name, number, description, supported, action, forced, standard }]; -var signalsByName = getSignalsByName(); -var getSignalsByNumber = () => { - const signals = getSignals(); - const length = SIGRTMAX + 1; - const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); - return Object.assign({}, ...signalsA); -}; -var getSignalByNumber = (number, signals) => { - const signal = findSignalByNumber(number, signals); - if (signal === void 0) { - return {}; - } - const { name, description, supported, action, forced, standard } = signal; - return { - [number]: { - name, - number, - description, - supported, - action, - forced, - standard - } - }; -}; -var findSignalByNumber = (number, signals) => { - const signal = signals.find(({ name }) => import_node_os3.constants.signals[name] === number); - if (signal !== void 0) { - return signal; - } - return signals.find((signalA) => signalA.number === number); -}; -var signalsByNumber = getSignalsByNumber(); - -// node_modules/execa/lib/error.js -var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - if (isCanceled) { - return "was canceled"; - } - if (errorCode !== void 0) { - return `failed with ${errorCode}`; - } - if (signal !== void 0) { - return `was killed with ${signal} (${signalDescription})`; - } - if (exitCode !== void 0) { - return `failed with exit code ${exitCode}`; - } - return "failed"; -}; -var makeError = ({ - stdout, - stderr, - all: all3, - error, - signal, - exitCode, - command: command2, - escapedCommand, - timedOut, - isCanceled, - killed, - parsed: { options: { timeout } } -}) => { - exitCode = exitCode === null ? void 0 : exitCode; - signal = signal === null ? void 0 : signal; - const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; - const errorCode = error && error.code; - const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); - const execaMessage = `Command ${prefix}: ${command2}`; - const isError = Object.prototype.toString.call(error) === "[object Error]"; - const shortMessage = isError ? `${execaMessage} -${error.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); - if (isError) { - error.originalMessage = error.message; - error.message = message; - } else { - error = new Error(message); - } - error.shortMessage = shortMessage; - error.command = command2; - error.escapedCommand = escapedCommand; - error.exitCode = exitCode; - error.signal = signal; - error.signalDescription = signalDescription; - error.stdout = stdout; - error.stderr = stderr; - if (all3 !== void 0) { - error.all = all3; - } - if ("bufferedData" in error) { - delete error.bufferedData; - } - error.failed = true; - error.timedOut = Boolean(timedOut); - error.isCanceled = isCanceled; - error.killed = killed && !timedOut; - return error; -}; - -// node_modules/execa/lib/stdio.js -var aliases = ["stdin", "stdout", "stderr"]; -var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); -var normalizeStdio = (options) => { - if (!options) { - return; - } - const { stdio } = options; - if (stdio === void 0) { - return aliases.map((alias) => options[alias]); - } - if (hasAlias(options)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); - } - if (typeof stdio === "string") { - return stdio; - } - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - const length = Math.max(stdio.length, aliases.length); - return Array.from({ length }, (value, index) => stdio[index]); -}; // node_modules/execa/lib/kill.js -var import_node_os4 = __toESM(require("node:os"), 1); var import_signal_exit = __toESM(require_signal_exit(), 1); var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; -var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; -}; -var setKillTimeout = (kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - const timeout = getForceKillAfterTimeout(options); - const t = setTimeout(() => { - kill("SIGKILL"); - }, timeout); - if (t.unref) { - t.unref(); - } -}; -var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; -var isSigterm = (signal) => signal === import_node_os4.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; -var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - return forceKillAfterTimeout; -}; -var spawnedCancel = (spawned, context2) => { - const killResult = spawned.kill(); - if (killResult) { - context2.isCanceled = true; - } -}; -var timeoutKill = (spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); -}; -var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { - if (timeout === 0 || timeout === void 0) { - return spawnedPromise; - } - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - return Promise.race([timeoutPromise, safeSpawnedPromise]); -}; -var validateTimeout = ({ timeout }) => { - if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } -}; -var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - const removeExitHandler = (0, import_signal_exit.default)(() => { - spawned.kill(); - }); - return timedPromise.finally(() => { - removeExitHandler(); - }); -}; - -// node_modules/execa/lib/pipe.js -var import_node_fs = require("node:fs"); -var import_node_child_process = require("node:child_process"); - -// node_modules/is-stream/index.js -function isStream2(stream4) { - return stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function"; -} -function isWritableStream(stream4) { - return isStream2(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object"; -} - -// node_modules/execa/lib/pipe.js -var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function"; -var pipeToTarget = (spawned, streamName, target) => { - if (typeof target === "string") { - spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target)); - return spawned; - } - if (isWritableStream(target)) { - spawned[streamName].pipe(target); - return spawned; - } - if (!isExecaChildProcess(target)) { - throw new TypeError("The second argument must be a string, a stream or an Execa child process."); - } - if (!isWritableStream(target.stdin)) { - throw new TypeError("The target child process's stdin must be available."); - } - spawned[streamName].pipe(target.stdin); - return target; -}; -var addPipeMethods = (spawned) => { - if (spawned.stdout !== null) { - spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout"); - } - if (spawned.stderr !== null) { - spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr"); - } - if (spawned.all !== void 0) { - spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all"); - } -}; // node_modules/execa/lib/stream.js -var import_node_fs2 = require("node:fs"); var import_get_stream = __toESM(require_get_stream(), 1); var import_merge_stream = __toESM(require_merge_stream(), 1); -var validateInputOptions = (input) => { - if (input !== void 0) { - throw new TypeError("The `input` and `inputFile` options cannot be both set."); - } -}; -var getInputSync = ({ input, inputFile }) => { - if (typeof inputFile !== "string") { - return input; - } - validateInputOptions(input); - return (0, import_node_fs2.readFileSync)(inputFile); -}; -var handleInputSync = (options) => { - const input = getInputSync(options); - if (isStream2(input)) { - throw new TypeError("The `input` option cannot be a stream in sync mode"); - } - return input; -}; -var getInput = ({ input, inputFile }) => { - if (typeof inputFile !== "string") { - return input; - } - validateInputOptions(input); - return (0, import_node_fs2.createReadStream)(inputFile); -}; -var handleInput = (spawned, options) => { - const input = getInput(options); - if (input === void 0) { - return; - } - if (isStream2(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -}; -var makeAllStream = (spawned, { all: all3 }) => { - if (!all3 || !spawned.stdout && !spawned.stderr) { - return; - } - const mixed = (0, import_merge_stream.default)(); - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - return mixed; -}; -var getBufferedData = async (stream4, streamPromise) => { - if (!stream4 || streamPromise === void 0) { - return; - } - stream4.destroy(); - try { - return await streamPromise; - } catch (error) { - return error.bufferedData; - } -}; -var getStreamPromise = (stream4, { encoding, buffer, maxBuffer }) => { - if (!stream4 || !buffer) { - return; - } - if (encoding) { - return (0, import_get_stream.default)(stream4, { encoding, maxBuffer }); - } - return import_get_stream.default.buffer(stream4, { maxBuffer }); -}; -var getSpawnedResult = async ({ stdout, stderr, all: all3 }, { encoding, buffer, maxBuffer }, processDone) => { - const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); - const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); - const allPromise = getStreamPromise(all3, { encoding, buffer, maxBuffer: maxBuffer * 2 }); - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error) { - return Promise.all([ - { error, signal: error.signal, timedOut: error.timedOut }, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all3, allPromise) - ]); - } -}; // node_modules/execa/lib/promise.js var nativePromisePrototype = (async () => { @@ -28676,318 +27917,9 @@ var descriptors2 = ["then", "catch", "finally"].map((property) => [ property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) ]); -var mergePromise = (spawned, promise) => { - for (const [property, descriptor] of descriptors2) { - const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); - Reflect.defineProperty(spawned, property, { ...descriptor, value }); - } -}; -var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { - spawned.on("exit", (exitCode, signal) => { - resolve({ exitCode, signal }); - }); - spawned.on("error", (error) => { - reject(error); - }); - if (spawned.stdin) { - spawned.stdin.on("error", (error) => { - reject(error); - }); - } -}); - -// node_modules/execa/lib/command.js -var import_node_buffer = require("node:buffer"); -var import_node_child_process2 = require("node:child_process"); -var normalizeArgs = (file, args = []) => { - if (!Array.isArray(args)) { - return [file]; - } - return [file, ...args]; -}; -var NO_ESCAPE_REGEXP = /^[\w.-]+$/; -var DOUBLE_QUOTES_REGEXP = /"/g; -var escapeArg = (arg) => { - if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { - return arg; - } - return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; -}; -var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); -var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); -var SPACES_REGEXP = / +/g; -var parseExpression = (expression) => { - const typeOfExpression = typeof expression; - if (typeOfExpression === "string") { - return expression; - } - if (typeOfExpression === "number") { - return String(expression); - } - if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) { - const typeOfStdout = typeof expression.stdout; - if (typeOfStdout === "string") { - return expression.stdout; - } - if (import_node_buffer.Buffer.isBuffer(expression.stdout)) { - return expression.stdout.toString(); - } - throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); - } - throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`); -}; -var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [ - ...tokens.slice(0, -1), - `${tokens[tokens.length - 1]}${nextTokens[0]}`, - ...nextTokens.slice(1) -]; -var parseTemplate = ({ templates, expressions, tokens, index, template }) => { - const templateString = template ?? templates.raw[index]; - const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean); - const newTokens = concatTokens( - tokens, - templateTokens, - templateString.startsWith(" ") - ); - if (index === expressions.length) { - return newTokens; - } - const expression = expressions[index]; - const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)]; - return concatTokens( - newTokens, - expressionTokens, - templateString.endsWith(" ") - ); -}; -var parseTemplates = (templates, expressions) => { - let tokens = []; - for (const [index, template] of templates.entries()) { - tokens = parseTemplate({ templates, expressions, tokens, index, template }); - } - return tokens; -}; - -// node_modules/execa/lib/verbose.js -var import_node_util = require("node:util"); -var import_node_process4 = __toESM(require("node:process"), 1); -var verboseDefault = (0, import_node_util.debuglog)("execa").enabled; -var padField = (field, padding) => String(field).padStart(padding, "0"); -var getTimestamp = () => { - const date = new Date(); - return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`; -}; -var logCommand = (escapedCommand, { verbose }) => { - if (!verbose) { - return; - } - import_node_process4.default.stderr.write(`[${getTimestamp()}] ${escapedCommand} -`); -}; // node_modules/execa/index.js var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; -var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { - const env2 = extendEnv ? { ...import_node_process5.default.env, ...envOption } : envOption; - if (preferLocal) { - return npmRunPathEnv({ env: env2, cwd: localDir, execPath }); - } - return env2; -}; -var handleArguments = (file, args, options = {}) => { - const parsed = import_cross_spawn.default._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || import_node_process5.default.cwd(), - execPath: import_node_process5.default.execPath, - encoding: "utf8", - reject: true, - cleanup: true, - all: false, - windowsHide: true, - verbose: verboseDefault, - ...options - }; - options.env = getEnv(options); - options.stdio = normalizeStdio(options); - if (import_node_process5.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { - args.unshift("/q"); - } - return { file, args, options, parsed }; -}; -var handleOutput = (options, value, error) => { - if (typeof value !== "string" && !import_node_buffer2.Buffer.isBuffer(value)) { - return error === void 0 ? void 0 : ""; - } - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - return value; -}; -function execa(file, args, options) { - const parsed = handleArguments(file, args, options); - const command2 = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - logCommand(escapedCommand, parsed.options); - validateTimeout(parsed.options); - let spawned; - try { - spawned = import_node_child_process3.default.spawn(parsed.file, parsed.args, parsed.options); - } catch (error) { - const dummySpawned = new import_node_child_process3.default.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error, - stdout: "", - stderr: "", - all: "", - command: command2, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - mergePromise(dummySpawned, errorPromise); - return dummySpawned; - } - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - const context2 = { isCanceled: false }; - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context2); - const handlePromise = async () => { - const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all3 = handleOutput(parsed.options, allResult); - if (error || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error, - exitCode, - signal, - stdout, - stderr, - all: all3, - command: command2, - escapedCommand, - parsed, - timedOut, - isCanceled: context2.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false), - killed: spawned.killed - }); - if (!parsed.options.reject) { - return returnedError; - } - throw returnedError; - } - return { - command: command2, - escapedCommand, - exitCode: 0, - stdout, - stderr, - all: all3, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - const handlePromiseOnce = onetime_default(handlePromise); - handleInput(spawned, parsed.options); - spawned.all = makeAllStream(spawned, parsed.options); - addPipeMethods(spawned); - mergePromise(spawned, handlePromiseOnce); - return spawned; -} -function execaSync(file, args, options) { - const parsed = handleArguments(file, args, options); - const command2 = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - logCommand(escapedCommand, parsed.options); - const input = handleInputSync(parsed.options); - let result; - try { - result = import_node_child_process3.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input }); - } catch (error) { - throw makeError({ - error, - stdout: "", - stderr: "", - all: "", - command: command2, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command: command2, - escapedCommand, - parsed, - timedOut: result.error && result.error.code === "ETIMEDOUT", - isCanceled: false, - killed: result.signal !== null - }); - if (!parsed.options.reject) { - return error; - } - throw error; - } - return { - command: command2, - escapedCommand, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -} -var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}; -var normalizeScriptOptions = (options = {}) => ({ - preferLocal: true, - ...normalizeScriptStdin(options), - ...options -}); -function create$(options) { - function $3(templatesOrOptions, ...expressions) { - if (!Array.isArray(templatesOrOptions)) { - return create$({ ...options, ...templatesOrOptions }); - } - const [file, ...args] = parseTemplates(templatesOrOptions, expressions); - return execa(file, args, normalizeScriptOptions(options)); - } - $3.sync = (templates, ...expressions) => { - if (!Array.isArray(templates)) { - throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`."); - } - const [file, ...args] = parseTemplates(templates, expressions); - return execaSync(file, args, normalizeScriptOptions(options)); - }; - return $3; -} -var $2 = create$(); // src/api.ts var config2 = getConfig(); @@ -29234,7 +28166,7 @@ function randomIntFromInterval(min, max) { // src/github-action.ts var import_fs2 = require("fs"); -var GITHUB_TOKEN = import_core4.default.getInput("GITHUB_TOKEN"); +var GITHUB_TOKEN = import_core3.default.getInput("GITHUB_TOKEN"); var octokit = import_github.default.getOctokit(GITHUB_TOKEN); var context = import_github.default.context; var owner = context.repo.owner; @@ -29359,13 +28291,13 @@ async function run() { await improveCommitMessages(commits); } else { ce("Wrong action."); - import_core4.default.error( + import_core3.default.error( `OpenCommit was called on ${import_github.default.context.payload.action}. OpenCommit is supposed to be used on "push" action.` ); } } catch (error) { const err = error?.message || error; - import_core4.default.setFailed(err); + import_core3.default.setFailed(err); } } run();