diff --git a/.github/workflows/deflake.yml b/.github/workflows/deflake.yml index 5a612706e3..f3f10879d8 100644 --- a/.github/workflows/deflake.yml +++ b/.github/workflows/deflake.yml @@ -6,19 +6,19 @@ name: Deflake on: workflow_run: types: [completed] - # Exclude workflows that have significant side effects, like publishing releases. It's OK to - # retry CodeQL analysis. + # Generated by `pr-checks/sync.sh` from the templates in `pr-checks/checks` and the other + # workflows listed in `pr-checks/deflake.ts`. workflows: - - Check Expected Release Files - - Code-Scanning config CLI tests - - CodeQL action - - Manual Check - go + - "Check Expected Release Files" + - "Code-Scanning config CLI tests" + - "CodeQL action" + - "Manual Check - go" - "PR Check - All-platform bundle" - "PR Check - Analysis kinds" - "PR Check - Analyze: 'ref' and 'sha' from inputs" - - "PR Check - autobuild-action" - "PR Check - Autobuild direct tracing (custom working directory)" - "PR Check - Autobuild working directory" + - "PR Check - autobuild-action" - "PR Check - Build mode autobuild" - "PR Check - Build mode manual" - "PR Check - Build mode none" @@ -26,7 +26,6 @@ on: - "PR Check - Bundle: Caching checks" - "PR Check - Bundle: From nightly" - "PR Check - Bundle: From toolcache" - - "PR Check - Bundle: Zstandard checks" - "PR Check - C/C\\+\\+: autoinstalling dependencies (Linux)" - "PR Check - C/C\\+\\+: autoinstalling dependencies is skipped (macOS)" - "PR Check - C/C\\+\\+: disabling autoinstalling dependencies (Linux)" @@ -37,11 +36,12 @@ on: - "PR Check - Debug artifact upload" - "PR Check - Debug artifacts after failure" - "PR Check - Diagnostic export" + - "PR Check - Diagnostic export without database" - "PR Check - Export file baseline information" - "PR Check - Extractor ram and threads options test" - "PR Check - Go: Custom queries" - - "PR Check - Go: diagnostic when Go is changed after init step" - "PR Check - Go: diagnostic when `file` is not installed" + - "PR Check - Go: diagnostic when Go is changed after init step" - "PR Check - Go: tracing with autobuilder step" - "PR Check - Go: tracing with custom build steps" - "PR Check - Go: tracing with legacy workflow" @@ -56,6 +56,7 @@ on: - "PR Check - Packaging: Config and input passed to the CLI" - "PR Check - Packaging: Config file" - "PR Check - Packaging: Download using registries" + - "PR Check - Per-language bundles" - "PR Check - Proxy test" - "PR Check - Remote config file" - "PR Check - Resolve environment" @@ -69,19 +70,18 @@ on: - "PR Check - Swift analysis using autobuild" - "PR Check - Test different uses of `upload-sarif`" - "PR Check - Test unsetting environment variables" - - "PR Check - Upload-sarif: ref and sha from inputs" + - "PR Check - Unsupported macOS" + - "PR Check - Upload-sarif: 'ref' and 'sha' from inputs" - "PR Check - Use a custom `checkout_path`" - - PR Checks - - Query filters tests - - Test that the workaround for python 3.12 on windows works + - "PR Checks" + - "Query filters tests" + - "Test that the workaround for python 3.12 on windows works" jobs: rerun-on-failure: name: Rerun failed jobs if: >- - github.event.workflow_run.conclusion == 'failure' && - github.event.workflow_run.run_attempt == 1 && - ( + github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 && ( github.event.workflow_run.head_branch == 'main' || startsWith(github.event.workflow_run.head_branch, 'releases/') || github.event.workflow_run.event == 'merge_group' diff --git a/CHANGELOG.md b/CHANGELOG.md index b98bfa0a41..fafbf46927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. +## 3.39.5 - 24 Nov 2026 + +- Update default CodeQL bundle version to [2.27.6](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.6). [#4347](https://github.com/github/codeql-action/pull/4347) + ## 3.39.4 - 20 Nov 2026 - Update default CodeQL bundle version to [2.27.5](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.5). [#4333](https://github.com/github/codeql-action/pull/4333) diff --git a/init/action.yml b/init/action.yml index 806554458e..6dc3adedea 100644 --- a/init/action.yml +++ b/init/action.yml @@ -154,8 +154,8 @@ inputs: trap-caching: description: >- Explicitly enable or disable TRAP caching instead of using the automatically determined default. - TRAP caching is disabled by default when improved incremental analysis is enabled, - because improved incremental analysis of a pull request only extracts changed files, + TRAP caching is disabled by default when overlay analysis is enabled, + because overlay analysis of a pull request only extracts changed files, which rarely benefit from TRAP caching. required: false dependency-caching: diff --git a/lib/defaults.json b/lib/defaults.json index 23dd3f7e8e..2901191dc2 100644 --- a/lib/defaults.json +++ b/lib/defaults.json @@ -1,6 +1,6 @@ { - "bundleVersion": "codeql-bundle-v2.27.5", - "cliVersion": "2.27.5", - "priorBundleVersion": "codeql-bundle-v2.27.4", - "priorCliVersion": "2.27.4" + "bundleVersion": "codeql-bundle-v2.27.6", + "cliVersion": "2.27.6", + "priorBundleVersion": "codeql-bundle-v2.27.5", + "priorCliVersion": "2.27.5" } diff --git a/lib/entry-points.js b/lib/entry-points.js index 311fe1bea8..d16285fb5e 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -264,7 +264,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a6) { + } catch (_a5) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -653,7 +653,7 @@ var require_timers = __commonJS({ var fastTimers = []; var NOT_IN_LIST = -2; var TO_BE_CLEARED = -1; - var PENDING = 0; + var PENDING2 = 0; var ACTIVE = 1; function onTick() { fastNow += TICK_MS; @@ -661,7 +661,7 @@ var require_timers = __commonJS({ let len = fastTimers.length; while (idx < len) { const timer = fastTimers[idx]; - if (timer._state === PENDING) { + if (timer._state === PENDING2) { timer._idleStart = fastNow - TICK_MS; timer._state = ACTIVE; } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { @@ -764,7 +764,7 @@ var require_timers = __commonJS({ if (!fastNowTimeout || fastTimers.length === 1) { refreshTimeout(); } - this._state = PENDING; + this._state = PENDING2; } /** * The `clear` method cancels the timer, preventing it from executing. @@ -4977,7 +4977,7 @@ var require_webidl = __commonJS({ "node_modules/undici/lib/web/webidl/index.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var { types: types2, inspect } = require("node:util"); + var { types, inspect } = require("node:util"); var { runtimeFeatures } = require_runtime_features(); var UNDEFINED = 1; var BOOLEAN = 2; @@ -5179,10 +5179,10 @@ var require_webidl = __commonJS({ } }; webidl.util.IsResizableArrayBuffer = function(V) { - if (types2.isArrayBuffer(V)) { + if (types.isArrayBuffer(V)) { return V.resizable; } - if (types2.isSharedArrayBuffer(V)) { + if (types.isSharedArrayBuffer(V)) { return V.growable; } throw webidl.errors.exception({ @@ -5194,10 +5194,10 @@ var require_webidl = __commonJS({ return typeof flags === "number" && (flags & attributes) === attributes; }; webidl.sequenceConverter = function(converter) { - return (V, prefix, argument, Iterable) => { + return (V, prefix2, argument, Iterable) => { if (webidl.util.Type(V) !== OBJECT) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` }); } @@ -5206,7 +5206,7 @@ var require_webidl = __commonJS({ let index2 = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} is not iterable.` }); } @@ -5215,26 +5215,26 @@ var require_webidl = __commonJS({ if (done) { break; } - seq.push(converter(value, prefix, `${argument}[${index2++}]`)); + seq.push(converter(value, prefix2, `${argument}[${index2++}]`)); } return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { - return (O, prefix, argument) => { + return (O, prefix2, argument) => { if (webidl.util.Type(O) !== OBJECT) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} ("${webidl.util.TypeValueToString(O)}") is not an Object.` }); } const result = {}; - if (!types2.isProxy(O)) { + if (!types.isProxy(O)) { const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; for (const key of keys2) { const keyName = webidl.util.Stringify(key); - const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`); - const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`); + const typedKey = keyConverter(key, prefix2, `Key ${keyName} in ${argument}`); + const typedValue = valueConverter(O[key], prefix2, `${argument}[${keyName}]`); result[typedKey] = typedValue; } return result; @@ -5243,8 +5243,8 @@ var require_webidl = __commonJS({ for (const key of keys) { const desc = Reflect.getOwnPropertyDescriptor(O, key); if (desc?.enumerable) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); + const typedKey = keyConverter(key, prefix2, argument); + const typedValue = valueConverter(O[key], prefix2, argument); result[typedKey] = typedValue; } } @@ -5252,10 +5252,10 @@ var require_webidl = __commonJS({ }; }; webidl.interfaceConverter = function(TypeCheck, name) { - return (V, prefix, argument) => { + return (V, prefix2, argument) => { if (!TypeCheck(V)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` }); } @@ -5264,11 +5264,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { converters.sort((a, b) => (a.key > b.key) - (a.key < b.key)); - return (dictionary, prefix, argument) => { + return (dictionary, prefix2, argument) => { const dict = {}; if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` }); } @@ -5277,7 +5277,7 @@ var require_webidl = __commonJS({ if (required === true) { if (dictionary == null || !Object.hasOwn(dictionary, key)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `Missing required key "${key}".` }); } @@ -5288,10 +5288,10 @@ var require_webidl = __commonJS({ value = defaultValue(); } if (required || hasDefault || value !== void 0) { - value = converter(value, prefix, `${argument}.${key}`); + value = converter(value, prefix2, `${argument}.${key}`); if (options.allowedValues && !options.allowedValues.includes(value)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` }); } @@ -5302,11 +5302,11 @@ var require_webidl = __commonJS({ }; }; webidl.nullableConverter = function(converter) { - return (V, prefix, argument) => { + return (V, prefix2, argument) => { if (V === null) { return V; } - return converter(V, prefix, argument); + return converter(V, prefix2, argument); }; }; webidl.is.USVString = function(value) { @@ -5320,19 +5320,19 @@ var require_webidl = __commonJS({ webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal); webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort); webidl.is.BufferSource = function(V) { - return types2.isArrayBuffer(V) || ArrayBuffer.isView(V) && types2.isArrayBuffer(V.buffer); + return types.isArrayBuffer(V) || ArrayBuffer.isView(V) && types.isArrayBuffer(V.buffer); }; webidl.util.getCopyOfBytesHeldByBufferSource = function(bufferSource) { const jsBufferSource = bufferSource; let jsArrayBuffer = jsBufferSource; let offset = 0; let length = 0; - if (types2.isTypedArray(jsBufferSource) || types2.isDataView(jsBufferSource)) { + if (types.isTypedArray(jsBufferSource) || types.isDataView(jsBufferSource)) { jsArrayBuffer = jsBufferSource.buffer; offset = jsBufferSource.byteOffset; length = jsBufferSource.byteLength; } else { - assert(types2.isAnyArrayBuffer(jsBufferSource)); + assert(types.isAnyArrayBuffer(jsBufferSource)); length = jsBufferSource.byteLength; } if (jsArrayBuffer.detached) { @@ -5343,22 +5343,22 @@ var require_webidl = __commonJS({ bytes.set(view); return bytes; }; - webidl.converters.DOMString = function(V, prefix, argument, flags) { + webidl.converters.DOMString = function(V, prefix2, argument, flags) { if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) { return ""; } if (typeof V === "symbol") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} is a symbol, which cannot be converted to a DOMString.` }); } return String(V); }; - webidl.converters.ByteString = function(V, prefix, argument) { + webidl.converters.ByteString = function(V, prefix2, argument) { if (typeof V === "symbol") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} is a symbol, which cannot be converted to a ByteString.` }); } @@ -5385,153 +5385,153 @@ var require_webidl = __commonJS({ webidl.converters.any = function(V) { return V; }; - webidl.converters["long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "signed", 0, prefix, argument); + webidl.converters["long long"] = function(V, prefix2, argument) { + const x = webidl.util.ConvertToInt(V, 64, "signed", 0, prefix2, argument); return x; }; - webidl.converters["unsigned long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "unsigned", 0, prefix, argument); + webidl.converters["unsigned long long"] = function(V, prefix2, argument) { + const x = webidl.util.ConvertToInt(V, 64, "unsigned", 0, prefix2, argument); return x; }; - webidl.converters["unsigned long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 32, "unsigned", 0, prefix, argument); + webidl.converters["unsigned long"] = function(V, prefix2, argument) { + const x = webidl.util.ConvertToInt(V, 32, "unsigned", 0, prefix2, argument); return x; }; - webidl.converters["unsigned short"] = function(V, prefix, argument, flags) { - const x = webidl.util.ConvertToInt(V, 16, "unsigned", flags, prefix, argument); + webidl.converters["unsigned short"] = function(V, prefix2, argument, flags) { + const x = webidl.util.ConvertToInt(V, 16, "unsigned", flags, prefix2, argument); return x; }; - webidl.converters.ArrayBuffer = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types2.isArrayBuffer(V)) { + webidl.converters.ArrayBuffer = function(V, prefix2, argument, flags) { + if (webidl.util.Type(V) !== OBJECT || !types.isArrayBuffer(V)) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBuffer"] }); } if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a resizable ArrayBuffer.` }); } return V; }; - webidl.converters.SharedArrayBuffer = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types2.isSharedArrayBuffer(V)) { + webidl.converters.SharedArrayBuffer = function(V, prefix2, argument, flags) { + if (webidl.util.Type(V) !== OBJECT || !types.isSharedArrayBuffer(V)) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["SharedArrayBuffer"] }); } if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a resizable SharedArrayBuffer.` }); } return V; }; - webidl.converters.TypedArray = function(V, T, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types2.isTypedArray(V) || V.constructor.name !== T.name) { + webidl.converters.TypedArray = function(V, T, prefix2, argument, flags) { + if (webidl.util.Type(V) !== OBJECT || !types.isTypedArray(V) || V.constructor.name !== T.name) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: [T.name] }); } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V.buffer)) { + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a shared array buffer.` }); } if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a resizable array buffer.` }); } return V; }; - webidl.converters.DataView = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types2.isDataView(V)) { + webidl.converters.DataView = function(V, prefix2, argument, flags) { + if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["DataView"] }); } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V.buffer)) { + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a shared array buffer.` }); } if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a resizable array buffer.` }); } return V; }; - webidl.converters.ArrayBufferView = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types2.isArrayBufferView(V)) { + webidl.converters.ArrayBufferView = function(V, prefix2, argument, flags) { + if (webidl.util.Type(V) !== OBJECT || !types.isArrayBufferView(V)) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBufferView"] }); } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V.buffer)) { + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a shared array buffer.` }); } if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a view on a resizable array buffer.` }); } return V; }; - webidl.converters.BufferSource = function(V, prefix, argument, flags) { - if (types2.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags); + webidl.converters.BufferSource = function(V, prefix2, argument, flags) { + if (types.isArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, prefix2, argument, flags); } - if (types2.isArrayBufferView(V)) { + if (types.isArrayBufferView(V)) { flags &= ~webidl.attributes.AllowShared; - return webidl.converters.ArrayBufferView(V, prefix, argument, flags); + return webidl.converters.ArrayBufferView(V, prefix2, argument, flags); } - if (types2.isSharedArrayBuffer(V)) { + if (types.isSharedArrayBuffer(V)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: `${argument} cannot be a SharedArrayBuffer.` }); } throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBuffer", "ArrayBufferView"] }); }; - webidl.converters.AllowSharedBufferSource = function(V, prefix, argument, flags) { - if (types2.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags); + webidl.converters.AllowSharedBufferSource = function(V, prefix2, argument, flags) { + if (types.isArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, prefix2, argument, flags); } - if (types2.isSharedArrayBuffer(V)) { - return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags); + if (types.isSharedArrayBuffer(V)) { + return webidl.converters.SharedArrayBuffer(V, prefix2, argument, flags); } - if (types2.isArrayBufferView(V)) { + if (types.isArrayBufferView(V)) { flags |= webidl.attributes.AllowShared; - return webidl.converters.ArrayBufferView(V, prefix, argument, flags); + return webidl.converters.ArrayBufferView(V, prefix2, argument, flags); } throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBuffer", "SharedArrayBuffer", "ArrayBufferView"] }); @@ -6363,11 +6363,11 @@ var require_formdata = __commonJS({ } append(name, value, filename = void 0) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.append"; - webidl.argumentLengthCheck(arguments, 2, prefix); + const prefix2 = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix2); name = webidl.converters.USVString(name); if (arguments.length === 3 || webidl.is.Blob(value)) { - value = webidl.converters.Blob(value, prefix, "value"); + value = webidl.converters.Blob(value, prefix2, "value"); if (filename !== void 0) { filename = webidl.converters.USVString(filename); } @@ -6379,15 +6379,15 @@ var require_formdata = __commonJS({ } delete(name) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix2); name = webidl.converters.USVString(name); this.#state = this.#state.filter((entry) => entry.name !== name); } get(name) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.get"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix2); name = webidl.converters.USVString(name); const idx = this.#state.findIndex((entry) => entry.name === name); if (idx === -1) { @@ -6397,25 +6397,25 @@ var require_formdata = __commonJS({ } getAll(name) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.getAll"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix2); name = webidl.converters.USVString(name); return this.#state.filter((entry) => entry.name === name).map((entry) => entry.value); } has(name) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.has"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix2); name = webidl.converters.USVString(name); return this.#state.findIndex((entry) => entry.name === name) !== -1; } set(name, value, filename = void 0) { webidl.brandCheck(this, _FormData); - const prefix = "FormData.set"; - webidl.argumentLengthCheck(arguments, 2, prefix); + const prefix2 = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix2); name = webidl.converters.USVString(name); if (arguments.length === 3 || webidl.is.Blob(value)) { - value = webidl.converters.Blob(value, prefix, "value"); + value = webidl.converters.Blob(value, prefix2, "value"); if (filename !== void 0) { filename = webidl.converters.USVString(filename); } @@ -6918,7 +6918,7 @@ var require_body = __commonJS({ source = webidl.util.getCopyOfBytesHeldByBufferSource(object2); } else if (webidl.is.FormData(object2)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r + const prefix2 = `--${boundary}\r Content-Disposition: form-data`; const formdataEscape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); @@ -6928,14 +6928,14 @@ Content-Disposition: form-data`; let hasUnknownSizeValue = false; for (const [name, value] of object2) { if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r + const chunk2 = textEncoder.encode(prefix2 + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r + const chunk2 = textEncoder.encode(`${prefix2}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); @@ -19888,17 +19888,17 @@ var require_headers = __commonJS({ append(name, value) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 2, "Headers.append"); - const prefix = "Headers.append"; - name = webidl.converters.ByteString(name, prefix, "name"); - value = webidl.converters.ByteString(value, prefix, "value"); + const prefix2 = "Headers.append"; + name = webidl.converters.ByteString(name, prefix2, "name"); + value = webidl.converters.ByteString(value, prefix2, "value"); return appendHeader(this, name, value); } // https://fetch.spec.whatwg.org/#dom-headers-delete delete(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); - const prefix = "Headers.delete"; - name = webidl.converters.ByteString(name, prefix, "name"); + const prefix2 = "Headers.delete"; + name = webidl.converters.ByteString(name, prefix2, "name"); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ prefix: "Headers.delete", @@ -19918,11 +19918,11 @@ var require_headers = __commonJS({ get(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, "Headers.get"); - const prefix = "Headers.get"; - name = webidl.converters.ByteString(name, prefix, "name"); + const prefix2 = "Headers.get"; + name = webidl.converters.ByteString(name, prefix2, "name"); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ - prefix, + prefix: prefix2, value: name, type: "header name" }); @@ -19933,11 +19933,11 @@ var require_headers = __commonJS({ has(name) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 1, "Headers.has"); - const prefix = "Headers.has"; - name = webidl.converters.ByteString(name, prefix, "name"); + const prefix2 = "Headers.has"; + name = webidl.converters.ByteString(name, prefix2, "name"); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ - prefix, + prefix: prefix2, value: name, type: "header name" }); @@ -19948,19 +19948,19 @@ var require_headers = __commonJS({ set(name, value) { webidl.brandCheck(this, _Headers); webidl.argumentLengthCheck(arguments, 2, "Headers.set"); - const prefix = "Headers.set"; - name = webidl.converters.ByteString(name, prefix, "name"); - value = webidl.converters.ByteString(value, prefix, "value"); + const prefix2 = "Headers.set"; + name = webidl.converters.ByteString(name, prefix2, "name"); + value = webidl.converters.ByteString(value, prefix2, "value"); value = headerValueNormalize(value); if (!isValidHeaderName(name)) { throw webidl.errors.invalidArgument({ - prefix, + prefix: prefix2, value: name, type: "header name" }); } else if (!isValidHeaderValue(value)) { throw webidl.errors.invalidArgument({ - prefix, + prefix: prefix2, value, type: "header value" }); @@ -20024,7 +20024,7 @@ var require_headers = __commonJS({ enumerable: false } }); - webidl.converters.HeadersInit = function(V, prefix, argument) { + webidl.converters.HeadersInit = function(V, prefix2, argument) { if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { const iterator2 = Reflect.get(V, Symbol.iterator); if (!util4.types.isProxy(V) && iterator2 === Headers.prototype.entries) { @@ -20034,9 +20034,9 @@ var require_headers = __commonJS({ } } if (typeof iterator2 === "function") { - return webidl.converters["sequence>"](V, prefix, argument, iterator2.bind(V)); + return webidl.converters["sequence>"](V, prefix2, argument, iterator2.bind(V)); } - return webidl.converters["record"](V, prefix, argument); + return webidl.converters["record"](V, prefix2, argument); } throw webidl.errors.conversionFailed({ prefix: "Headers constructor", @@ -20422,9 +20422,9 @@ var require_response = __commonJS({ } return response; } - webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix2, name) { if (typeof V === "string") { - return webidl.converters.USVString(V, prefix, name); + return webidl.converters.USVString(V, prefix2, name); } if (webidl.is.Blob(V)) { return V; @@ -20438,16 +20438,16 @@ var require_response = __commonJS({ if (webidl.is.URLSearchParams(V)) { return V; } - return webidl.converters.DOMString(V, prefix, name); + return webidl.converters.DOMString(V, prefix2, name); }; - webidl.converters.BodyInit = function(V, prefix, argument) { + webidl.converters.BodyInit = function(V, prefix2, argument) { if (webidl.is.ReadableStream(V)) { return V; } if (V?.[Symbol.asyncIterator]) { return V; } - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + return webidl.converters.XMLHttpRequestBodyInit(V, prefix2, argument); }; webidl.converters.ResponseInit = webidl.dictionaryConverter([ { @@ -20559,8 +20559,8 @@ var require_request2 = __commonJS({ if (input === kConstruct) { return; } - const prefix = "Request constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); input = webidl.converters.RequestInfo(input); init2 = webidl.converters.RequestInit(init2); let request3 = null; @@ -22577,10 +22577,10 @@ var require_cache3 = __commonJS({ } async match(request3, options = {}) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.match"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix2); request3 = webidl.converters.RequestInfo(request3); - options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + options = webidl.converters.CacheQueryOptions(options, prefix2, "options"); const p = this.#internalMatchAll(request3, options, 1); if (p.length === 0) { return; @@ -22589,15 +22589,15 @@ var require_cache3 = __commonJS({ } async matchAll(request3 = void 0, options = {}) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.matchAll"; + const prefix2 = "Cache.matchAll"; if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); - options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + options = webidl.converters.CacheQueryOptions(options, prefix2, "options"); return this.#internalMatchAll(request3, options); } async add(request3) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.add"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix2); request3 = webidl.converters.RequestInfo(request3); const requests = [request3]; const responseArrayPromise = this.addAll(requests); @@ -22605,14 +22605,14 @@ var require_cache3 = __commonJS({ } async addAll(requests) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.addAll"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix2); const responsePromises = []; const requestList = []; for (let request3 of requests) { if (request3 === void 0) { throw webidl.errors.conversionFailed({ - prefix, + prefix: prefix2, argument: "Argument 1", types: ["undefined is not allowed"] }); @@ -22624,7 +22624,7 @@ var require_cache3 = __commonJS({ const r = getRequestState(request3); if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Expected http/s scheme when method is not GET." }); } @@ -22634,7 +22634,7 @@ var require_cache3 = __commonJS({ const r = getRequestState(new Request(request3)); if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Expected http/s scheme." }); } @@ -22710,10 +22710,10 @@ var require_cache3 = __commonJS({ } async put(request3, response) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.put"; - webidl.argumentLengthCheck(arguments, 2, prefix); + const prefix2 = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix2); request3 = webidl.converters.RequestInfo(request3); - response = webidl.converters.Response(response, prefix, "response"); + response = webidl.converters.Response(response, prefix2, "response"); let innerRequest = null; if (webidl.is.Request(request3)) { innerRequest = getRequestState(request3); @@ -22722,14 +22722,14 @@ var require_cache3 = __commonJS({ } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Expected an http/s scheme when method is not GET" }); } const innerResponse = getResponseState(response); if (innerResponse.status === 206) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Got 206 status" }); } @@ -22738,7 +22738,7 @@ var require_cache3 = __commonJS({ for (const fieldValue of fieldValues) { if (fieldValue === "*") { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Got * vary field value" }); } @@ -22746,7 +22746,7 @@ var require_cache3 = __commonJS({ } if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { throw webidl.errors.exception({ - header: prefix, + header: prefix2, message: "Response body is locked or disturbed" }); } @@ -22791,10 +22791,10 @@ var require_cache3 = __commonJS({ } async delete(request3, options = {}) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix2); request3 = webidl.converters.RequestInfo(request3); - options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + options = webidl.converters.CacheQueryOptions(options, prefix2, "options"); let r = null; if (webidl.is.Request(request3)) { r = getRequestState(request3); @@ -22837,9 +22837,9 @@ var require_cache3 = __commonJS({ */ async keys(request3 = void 0, options = {}) { webidl.brandCheck(this, _Cache); - const prefix = "Cache.keys"; + const prefix2 = "Cache.keys"; if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); - options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + options = webidl.converters.CacheQueryOptions(options, prefix2, "options"); let r = null; if (request3 !== void 0) { if (webidl.is.Request(request3)) { @@ -22884,8 +22884,8 @@ var require_cache3 = __commonJS({ * @returns {requestResponseList} */ #batchCacheOperations(operations) { - const cache = this.#relevantRequestResponseList; - const backupCache = [...cache]; + const cache2 = this.#relevantRequestResponseList; + const backupCache = [...cache2]; const addedItems = []; const resultList = []; try { @@ -22912,9 +22912,9 @@ var require_cache3 = __commonJS({ return []; } for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); + const idx = cache2.indexOf(requestResponse); assert(idx !== -1); - cache.splice(idx, 1); + cache2.splice(idx, 1); } } else if (operation.type === "put") { if (operation.response == null) { @@ -22944,11 +22944,11 @@ var require_cache3 = __commonJS({ } requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); + const idx = cache2.indexOf(requestResponse); assert(idx !== -1); - cache.splice(idx, 1); + cache2.splice(idx, 1); } - cache.push([operation.request, operation.response]); + cache2.push([operation.request, operation.response]); addedItems.push([operation.request, operation.response]); } resultList.push([operation.request, operation.response]); @@ -23125,13 +23125,13 @@ var require_cachestorage = __commonJS({ if (options.cacheName != null) { if (this.#caches.has(options.cacheName)) { const cacheList = this.#caches.get(options.cacheName); - const cache = new Cache(kConstruct, cacheList); - return await cache.match(request3, options); + const cache2 = new Cache(kConstruct, cacheList); + return await cache2.match(request3, options); } } else { for (const cacheList of this.#caches.values()) { - const cache = new Cache(kConstruct, cacheList); - const response = await cache.match(request3, options); + const cache2 = new Cache(kConstruct, cacheList); + const response = await cache2.match(request3, options); if (response !== void 0) { return response; } @@ -23145,9 +23145,9 @@ var require_cachestorage = __commonJS({ */ async has(cacheName) { webidl.brandCheck(this, _CacheStorage); - const prefix = "CacheStorage.has"; - webidl.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + const prefix2 = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + cacheName = webidl.converters.DOMString(cacheName, prefix2, "cacheName"); return this.#caches.has(cacheName); } /** @@ -23157,16 +23157,16 @@ var require_cachestorage = __commonJS({ */ async open(cacheName) { webidl.brandCheck(this, _CacheStorage); - const prefix = "CacheStorage.open"; - webidl.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + const prefix2 = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + cacheName = webidl.converters.DOMString(cacheName, prefix2, "cacheName"); if (this.#caches.has(cacheName)) { - const cache2 = this.#caches.get(cacheName); - return new Cache(kConstruct, cache2); + const cache3 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache3); } - const cache = []; - this.#caches.set(cacheName, cache); - return new Cache(kConstruct, cache); + const cache2 = []; + this.#caches.set(cacheName, cache2); + return new Cache(kConstruct, cache2); } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete @@ -23175,9 +23175,9 @@ var require_cachestorage = __commonJS({ */ async delete(cacheName) { webidl.brandCheck(this, _CacheStorage); - const prefix = "CacheStorage.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); - cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + const prefix2 = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + cacheName = webidl.converters.DOMString(cacheName, prefix2, "cacheName"); return this.#caches.delete(cacheName); } /** @@ -23594,9 +23594,9 @@ var require_cookies = __commonJS({ } function deleteCookie(headers, name, attributes) { brandChecks(headers); - const prefix = "deleteCookie"; - webidl.argumentLengthCheck(arguments, 2, prefix); - name = webidl.converters.DOMString(name, prefix, "name"); + const prefix2 = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix2); + name = webidl.converters.DOMString(name, prefix2, "name"); attributes = webidl.converters.DeleteCookieAttributes(attributes); setCookie(headers, { name, @@ -23612,7 +23612,7 @@ var require_cookies = __commonJS({ if (!cookies) { return []; } - return cookies.map((pair) => parseSetCookie(pair)); + return cookies.map((pair2) => parseSetCookie(pair2)); } function parseCookie(cookie) { cookie = webidl.converters.DOMString(cookie); @@ -23719,10 +23719,10 @@ var require_events = __commonJS({ webidl.util.markAsUncloneable(this); return; } - const prefix = "MessageEvent constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); - type = webidl.converters.DOMString(type, prefix, "type"); - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + const prefix2 = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + type = webidl.converters.DOMString(type, prefix2, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix2, "eventInitDict"); super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); @@ -23779,9 +23779,9 @@ var require_events = __commonJS({ var CloseEvent = class _CloseEvent extends Event { #eventInit; constructor(type, eventInitDict = {}) { - const prefix = "CloseEvent constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); - type = webidl.converters.DOMString(type, prefix, "type"); + const prefix2 = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); super(type, eventInitDict); this.#eventInit = eventInitDict; @@ -23803,11 +23803,11 @@ var require_events = __commonJS({ var ErrorEvent = class _ErrorEvent extends Event { #eventInit; constructor(type, eventInitDict) { - const prefix = "ErrorEvent constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type = webidl.converters.DOMString(type, prefix, "type"); + type = webidl.converters.DOMString(type, prefix2, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -24114,8 +24114,8 @@ var require_util5 = __commonJS({ const position = { position: 0 }; const extensionList = /* @__PURE__ */ new Map(); while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(";", extensions, position); - const [name, value = ""] = pair.split("=", 2); + const pair2 = collectASequenceOfCodePointsFast(";", extensions, position); + const [name, value = ""] = pair2.split("=", 2); extensionList.set( removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true) @@ -25110,9 +25110,9 @@ var require_websocket = __commonJS({ constructor(url2, protocols = []) { super(); webidl.util.markAsUncloneable(this); - const prefix = "WebSocket constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); - const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + const prefix2 = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix2, "options"); url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = environmentSettingsObject.settingsObject.baseUrl; @@ -25145,9 +25145,9 @@ var require_websocket = __commonJS({ */ close(code = void 0, reason = void 0) { webidl.brandCheck(this, _WebSocket); - const prefix = "WebSocket.close"; + const prefix2 = "WebSocket.close"; if (code !== void 0) { - code = webidl.converters["unsigned short"](code, prefix, "code", webidl.attributes.Clamp); + code = webidl.converters["unsigned short"](code, prefix2, "code", webidl.attributes.Clamp); } if (reason !== void 0) { reason = webidl.converters.USVString(reason); @@ -25162,9 +25162,9 @@ var require_websocket = __commonJS({ */ send(data) { webidl.brandCheck(this, _WebSocket); - const prefix = "WebSocket.send"; - webidl.argumentLengthCheck(arguments, 1, prefix); - data = webidl.converters.WebSocketSendData(data, prefix, "data"); + const prefix2 = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix2); + data = webidl.converters.WebSocketSendData(data, prefix2, "data"); if (isConnecting(this.#handler.readyState)) { throw new DOMException("Sent before connected.", "InvalidStateError"); } @@ -25453,11 +25453,11 @@ var require_websocket = __commonJS({ webidl.converters["sequence"] = webidl.sequenceConverter( webidl.converters.DOMString ); - webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + webidl.converters["DOMString or sequence"] = function(V, prefix2, argument) { if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) { return webidl.converters["sequence"](V); } - return webidl.converters.DOMString(V, prefix, argument); + return webidl.converters.DOMString(V, prefix2, argument); }; webidl.converters.WebSocketInit = webidl.dictionaryConverter([ { @@ -25926,7 +25926,7 @@ var require_eventsource_stream = __commonJS({ var defaultMaxEventSize = buffer.kStringMaxLength; var DATA = Buffer.from("data"); var EVENT = Buffer.from("event"); - var ID2 = Buffer.from("id"); + var ID = Buffer.from("id"); var RETRY = Buffer.from("retry"); var minParserItems = 1024; var maxParserItems = 131072; @@ -26143,7 +26143,7 @@ ${value}`; } return; } - if (isFieldName(line, fieldLength, ID2)) { + if (isFieldName(line, fieldLength, ID)) { if (isValidLastEventIdBytes(line, valueStart)) { this.setEventFieldSize("id", line.length - valueStart); event.id = line.toString("utf8", valueStart); @@ -26367,8 +26367,8 @@ var require_eventsource = __commonJS({ constructor(url2, eventSourceInitDict = {}) { super(); webidl.util.markAsUncloneable(this); - const prefix = "EventSource constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); + const prefix2 = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix2); if (!experimentalWarned) { experimentalWarned = true; process.emitWarning("EventSource is experimental, expect them to change at any time.", { @@ -26376,7 +26376,7 @@ var require_eventsource = __commonJS({ }); } url2 = webidl.converters.USVString(url2); - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix2, "eventSourceInitDict"); this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher; this.#state = { lastEventId: "", @@ -27687,7 +27687,7 @@ var require_oidc_utils = __commonJS({ } static getCall(id_token_url) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -27696,7 +27696,7 @@ var require_oidc_utils = __commonJS({ Error Message: ${error3.message}`); }); - const id_token = (_a6 = res.result) === null || _a6 === void 0 ? void 0 : _a6.value; + const id_token = (_a5 = res.result) === null || _a5 === void 0 ? void 0 : _a5.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } @@ -27784,7 +27784,7 @@ var require_summary = __commonJS({ } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a6) { + } catch (_a5) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; @@ -28145,7 +28145,7 @@ var require_io_util = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a6; + var _a5; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; exports2.readlink = readlink; @@ -28156,7 +28156,7 @@ var require_io_util = __commonJS({ exports2.getCmdPath = getCmdPath; var fs34 = __importStar2(require("fs")); var path30 = __importStar2(require("path")); - _a6 = fs34.promises, exports2.chmod = _a6.chmod, exports2.copyFile = _a6.copyFile, exports2.lstat = _a6.lstat, exports2.mkdir = _a6.mkdir, exports2.open = _a6.open, exports2.readdir = _a6.readdir, exports2.rename = _a6.rename, exports2.rm = _a6.rm, exports2.rmdir = _a6.rmdir, exports2.stat = _a6.stat, exports2.symlink = _a6.symlink, exports2.unlink = _a6.unlink; + _a5 = fs34.promises, exports2.chmod = _a5.chmod, exports2.copyFile = _a5.copyFile, exports2.lstat = _a5.lstat, exports2.mkdir = _a5.mkdir, exports2.open = _a5.open, exports2.readdir = _a5.readdir, exports2.rename = _a5.rename, exports2.rm = _a5.rm, exports2.rmdir = _a5.rmdir, exports2.stat = _a5.stat, exports2.symlink = _a5.symlink, exports2.unlink = _a5.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { return __awaiter2(this, void 0, void 0, function* () { @@ -28268,8 +28268,8 @@ var require_io_util = __commonJS({ return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a7; - return (_a7 = process.env["COMSPEC"]) !== null && _a7 !== void 0 ? _a7 : `cmd.exe`; + var _a6; + return (_a6 = process.env["COMSPEC"]) !== null && _a6 !== void 0 ? _a6 : `cmd.exe`; } } }); @@ -29120,12 +29120,12 @@ var require_exec = __commonJS({ } function getExecOutput(commandLine, args, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a6, _b2; + var _a5, _b2; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a6 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a6 === void 0 ? void 0 : _a6.stdout; + const originalStdoutListener = (_a5 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a5 === void 0 ? void 0 : _a5.stdout; const originalStdErrListener = (_b2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _b2 === void 0 ? void 0 : _b2.stderr; const stdErrListener = (data) => { stderr += stderrDecoder.write(data); @@ -29242,11 +29242,11 @@ var require_platform = __commonJS({ }; }); var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; const { stdout } = yield exec3.getExecOutput("sw_vers", void 0, { silent: true }); - const version = (_b2 = (_a6 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a6 === void 0 ? void 0 : _a6[1]) !== null && _b2 !== void 0 ? _b2 : ""; + const version = (_b2 = (_a5 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a5 === void 0 ? void 0 : _a5[1]) !== null && _b2 !== void 0 ? _b2 : ""; const name = (_d2 = (_c2 = stdout.match(/ProductName:\s*(.+)/)) === null || _c2 === void 0 ? void 0 : _c2[1]) !== null && _d2 !== void 0 ? _d2 : ""; return { name, @@ -29534,7 +29534,7 @@ var require_context = __commonJS({ * Hydrate the context from the environment */ constructor() { - var _a6, _b2, _c2; + var _a5, _b2, _c2; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { @@ -29554,7 +29554,7 @@ var require_context = __commonJS({ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a6 = process.env.GITHUB_API_URL) !== null && _a6 !== void 0 ? _a6 : `https://api.github.com`; + this.apiUrl = (_a5 = process.env.GITHUB_API_URL) !== null && _a5 !== void 0 ? _a5 : `https://api.github.com`; this.serverUrl = (_b2 = process.env.GITHUB_SERVER_URL) !== null && _b2 !== void 0 ? _b2 : `https://github.com`; this.graphqlUrl = (_c2 = process.env.GITHUB_GRAPHQL_URL) !== null && _c2 !== void 0 ? _c2 : `https://api.github.com/graphql`; } @@ -30028,7 +30028,7 @@ function expand(template, context5) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_2, expression, literal) { + function(_2, expression, literal2) { if (expression) { let operator = ""; const values = []; @@ -30052,7 +30052,7 @@ function expand(template, context5) { return values.join(","); } } else { - return encodeReserved(literal); + return encodeReserved(literal2); } } ); @@ -33607,9 +33607,9 @@ var init_endpoints_to_methods = __esm({ set(target, methodName, value) { return target.cache[methodName] = value; }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; + get({ octokit, scope, cache: cache2 }, methodName) { + if (cache2[methodName]) { + return cache2[methodName]; } const method = endpointMethodsMap.get(scope).get(methodName); if (!method) { @@ -33617,7 +33617,7 @@ var init_endpoints_to_methods = __esm({ } const { endpointDefaults, decorations } = method; if (decorations) { - cache[methodName] = decorate( + cache2[methodName] = decorate( octokit, scope, methodName, @@ -33625,9 +33625,9 @@ var init_endpoints_to_methods = __esm({ decorations ); } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); + cache2[methodName] = octokit.request.defaults(endpointDefaults); } - return cache[methodName]; + return cache2[methodName]; } }; } @@ -34787,15 +34787,15 @@ var require_diff = __commonJS({ return "patch"; } } - const prefix = highHasPre ? "pre" : ""; + const prefix2 = highHasPre ? "pre" : ""; if (v1.major !== v2.major) { - return prefix + "major"; + return prefix2 + "major"; } if (v1.minor !== v2.minor) { - return prefix + "minor"; + return prefix2 + "minor"; } if (v1.patch !== v2.patch) { - return prefix + "patch"; + return prefix2 + "patch"; } return "prerelease"; }; @@ -35059,8 +35059,8 @@ var require_coerce = __commonJS({ const minor = match2[3] || "0"; const patch = match2[4] || "0"; const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : ""; - const build2 = options.includePrerelease && match2[6] ? `+${match2[6]}` : ""; - return parse4(`${major}.${minor}.${patch}${prerelease}${build2}`, options); + const build3 = options.includePrerelease && match2[6] ? `+${match2[6]}` : ""; + return parse4(`${major}.${minor}.${patch}${prerelease}${build3}`, options); }; module2.exports = coerce4; } @@ -35409,7 +35409,7 @@ var require_range = __commonJS({ range2 = range2.replace(BUILDSTRIPRE, ""); const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); const memoKey = memoOpts + ":" + range2; - const cached = cache.get(memoKey); + const cached = cache2.get(memoKey); if (cached) { return cached; } @@ -35443,7 +35443,7 @@ var require_range = __commonJS({ rangeMap.delete(""); } const result = [...rangeMap.values()]; - cache.set(memoKey, result); + cache2.set(memoKey, result); return result; } intersects(range2, options) { @@ -35482,7 +35482,7 @@ var require_range = __commonJS({ }; module2.exports = Range2; var LRU = require_lrucache(); - var cache = new LRU(); + var cache2 = new LRU(); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug6 = require_debug(); @@ -38083,9 +38083,9 @@ var require_attribute = __commonJS({ return null; } var result = new ValidatorResult(instance8, schema, options, ctx); - var types2 = Array.isArray(schema.type) ? schema.type : [schema.type]; - if (!types2.some(this.testType.bind(this, instance8, schema, options, ctx))) { - var list = types2.map(function(v) { + var types = Array.isArray(schema.type) ? schema.type : [schema.type]; + if (!types.some(this.testType.bind(this, instance8, schema, options, ctx))) { + var list = types.map(function(v) { if (!v) return; var id = v.$id || v.id; return id ? "<" + id + ">" : v + ""; @@ -38806,7 +38806,7 @@ var require_validator = __commonJS({ this.customFormats = Object.create(Validator4.prototype.customFormats); this.schemas = {}; this.unresolvedRefs = []; - this.types = Object.create(types2); + this.types = Object.create(types); this.attributes = Object.create(attribute.validators); }; Validator3.prototype.customFormats = {}; @@ -38980,32 +38980,32 @@ var require_validator = __commonJS({ } return true; }; - var types2 = Validator3.prototype.types = {}; - types2.string = function testString(instance8) { + var types = Validator3.prototype.types = {}; + types.string = function testString(instance8) { return typeof instance8 == "string"; }; - types2.number = function testNumber(instance8) { + types.number = function testNumber(instance8) { return typeof instance8 == "number" && isFinite(instance8); }; - types2.integer = function testInteger(instance8) { + types.integer = function testInteger(instance8) { return typeof instance8 == "number" && instance8 % 1 === 0; }; - types2.boolean = function testBoolean(instance8) { + types.boolean = function testBoolean(instance8) { return typeof instance8 == "boolean"; }; - types2.array = function testArray(instance8) { + types.array = function testArray(instance8) { return Array.isArray(instance8); }; - types2["null"] = function testNull(instance8) { + types["null"] = function testNull(instance8) { return instance8 === null; }; - types2.date = function testDate(instance8) { + types.date = function testDate(instance8) { return instance8 instanceof Date; }; - types2.any = function testAny(instance8) { + types.any = function testAny(instance8) { return true; }; - types2.object = function testObject(instance8) { + types.object = function testObject(instance8) { return instance8 && typeof instance8 === "object" && !Array.isArray(instance8) && !(instance8 instanceof Date); }; module2.exports = Validator3; @@ -39538,10 +39538,10 @@ var require_concat_map = __commonJS({ var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; - module2.exports = balanced2; - function balanced2(a, b, str) { - if (a instanceof RegExp) a = maybeMatch2(a, str); - if (b instanceof RegExp) b = maybeMatch2(b, str); + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); var r = range2(a, b, str); return r && { start: r[0], @@ -39551,11 +39551,11 @@ var require_balanced_match = __commonJS({ post: str.slice(r[1] + b.length) }; } - function maybeMatch2(reg, str) { + function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } - balanced2.range = range2; + balanced.range = range2; function range2(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); @@ -39593,7 +39593,7 @@ var require_balanced_match = __commonJS({ var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports2, module2) { var concatMap = require_concat_map(); - var balanced2 = require_balanced_match(); + var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash2 = "\0SLASH" + Math.random() + "\0"; var escOpen2 = "\0OPEN" + Math.random() + "\0"; @@ -39622,7 +39622,7 @@ var require_brace_expansion = __commonJS({ var parts = []; var carry = ""; for (; ; ) { - var m = balanced2("{", "}", str); + var m = balanced("{", "}", str); if (!m) { var tail = str.split(","); tail[0] = carry + tail[0]; @@ -39741,7 +39741,7 @@ var require_brace_expansion = __commonJS({ var firstGroup = true; var nextBase; for (; ; ) { - var m = balanced2("{", "}", str); + var m = balanced("{", "}", str); if (!m) { return combine2(acc, accBase, str, [""], max, maxLength, dropEmpties, []); } @@ -39870,11 +39870,11 @@ var require_minimatch = __commonJS({ "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; - var qmark3 = "[^/]"; - var star3 = qmark3 + "*?"; - var twoStarDot2 = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot2 = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials2 = charSet("().*{}+?[]^$\\!"); + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { return s.split("").reduce(function(set, c) { set[c] = true; @@ -39920,7 +39920,7 @@ var require_minimatch = __commonJS({ m.defaults = function defaults3(options) { return orig.defaults(ext2(def, options)); }; - m.makeRe = function makeRe3(pattern, options) { + m.makeRe = function makeRe2(pattern, options) { return orig.makeRe(pattern, ext2(def, options)); }; m.braceExpand = function braceExpand3(pattern, options) { @@ -40066,11 +40066,11 @@ var require_minimatch = __commonJS({ if (stateChar) { switch (stateChar) { case "*": - re += star3; + re += star; hasMagic = true; break; case "?": - re += qmark3; + re += qmark; hasMagic = true; break; default: @@ -40083,7 +40083,7 @@ var require_minimatch = __commonJS({ } for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials2[c]) { + if (escaping && reSpecials[c]) { re += "\\" + c; escaping = false; continue; @@ -40196,7 +40196,7 @@ var require_minimatch = __commonJS({ clearStateChar(); if (escaping) { escaping = false; - } else if (reSpecials2[c] && !(c === "^" && inClass)) { + } else if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; @@ -40218,7 +40218,7 @@ var require_minimatch = __commonJS({ return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star3 : pl.type === "?" ? qmark3 : "\\" + pl.type; + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } @@ -40226,12 +40226,12 @@ var require_minimatch = __commonJS({ if (escaping) { re += "\\\\"; } - var addPatternStart2 = false; + var addPatternStart = false; switch (re.charAt(0)) { case "[": case ".": case "(": - addPatternStart2 = true; + addPatternStart = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; @@ -40256,7 +40256,7 @@ var require_minimatch = __commonJS({ if (re !== "" && hasMagic) { re = "(?=.)" + re; } - if (addPatternStart2) { + if (addPatternStart) { re = patternStart + re; } if (isSub === SUBPARSE) { @@ -40278,8 +40278,8 @@ var require_minimatch = __commonJS({ minimatch2.makeRe = function(pattern, options) { return new Minimatch2(pattern, options || {}).makeRe(); }; - Minimatch2.prototype.makeRe = makeRe2; - function makeRe2() { + Minimatch2.prototype.makeRe = makeRe; + function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; var set = this.set; if (!set.length) { @@ -40287,11 +40287,11 @@ var require_minimatch = __commonJS({ return this.regexp; } var options = this.options; - var twoStar = options.noglobstar ? star3 : options.dot ? twoStarDot2 : twoStarNoDot2; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; var re = set.map(function(pattern) { return pattern.map(function(p) { - return p === GLOBSTAR2 ? twoStar : typeof p === "string" ? regExpEscape3(p) : p._src; + return p === GLOBSTAR2 ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; @@ -40513,7 +40513,7 @@ var require_minimatch = __commonJS({ function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } - function regExpEscape3(s) { + function regExpEscape(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } } @@ -40795,11 +40795,11 @@ var require_internal_pattern = __commonJS({ * Otherwise returns empty string. */ static getLiteral(segment) { - let literal = ""; + let literal2 = ""; for (let i = 0; i < segment.length; i++) { const c = segment[i]; if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; + literal2 += segment[++i]; continue; } else if (c === "*" || c === "?") { return ""; @@ -40823,15 +40823,15 @@ var require_internal_pattern = __commonJS({ return ""; } if (set) { - literal += set; + literal2 += set; i = closed; continue; } } } - literal += c; + literal2 += c; } - return literal; + return literal2; } /** * Escapes regexp special characters @@ -41014,10 +41014,10 @@ var require_internal_globber = __commonJS({ } glob() { return __awaiter2(this, void 0, void 0, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; const result = []; try { - for (var _d2 = true, _e2 = __asyncValues2(this.globGenerator()), _f2; _f2 = yield _e2.next(), _a6 = _f2.done, !_a6; _d2 = true) { + for (var _d2 = true, _e2 = __asyncValues2(this.globGenerator()), _f2; _f2 = yield _e2.next(), _a5 = _f2.done, !_a5; _d2 = true) { _c2 = _f2.value; _d2 = false; const itemPath = _c2; @@ -41027,7 +41027,7 @@ var require_internal_globber = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a6 && (_b2 = _e2.return)) yield _b2.call(_e2); + if (!_d2 && !_a5 && (_b2 = _e2.return)) yield _b2.call(_e2); } finally { if (e_1) throw e_1.error; } @@ -41248,7 +41248,7 @@ var require_internal_hash_files = __commonJS({ var path30 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; var _d2; const writeDelegate = verbose ? core29.info : core29.debug; let hasMatch = false; @@ -41256,7 +41256,7 @@ var require_internal_hash_files = __commonJS({ const result = crypto3.createHash("sha256"); let count = 0; try { - for (var _e2 = true, _f2 = __asyncValues2(globber.globGenerator()), _g2; _g2 = yield _f2.next(), _a6 = _g2.done, !_a6; _e2 = true) { + for (var _e2 = true, _f2 = __asyncValues2(globber.globGenerator()), _g2; _g2 = yield _f2.next(), _a5 = _g2.done, !_a5; _e2 = true) { _c2 = _g2.value; _e2 = false; const file = _c2; @@ -41282,7 +41282,7 @@ var require_internal_hash_files = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_e2 && !_a6 && (_b2 = _f2.return)) yield _b2.call(_f2); + if (!_e2 && !_a5 && (_b2 = _f2.return)) yield _b2.call(_f2); } finally { if (e_1) throw e_1.error; } @@ -41763,15 +41763,15 @@ var require_semver3 = __commonJS({ } else { var v1 = parse4(version1); var v2 = parse4(version2); - var prefix = ""; + var prefix2 = ""; if (v1.prerelease.length || v2.prerelease.length) { - prefix = "pre"; + prefix2 = "pre"; var defaultResult = "prerelease"; } for (var key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { - return prefix + key; + return prefix2 + key; } } } @@ -42680,7 +42680,7 @@ var require_cacheUtils = __commonJS({ } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; var _d2; const paths = []; const workspace = (_d2 = process.env["GITHUB_WORKSPACE"]) !== null && _d2 !== void 0 ? _d2 : process.cwd(); @@ -42688,7 +42688,7 @@ var require_cacheUtils = __commonJS({ implicitDescendants: false }); try { - for (var _e2 = true, _f2 = __asyncValues2(globber.globGenerator()), _g2; _g2 = yield _f2.next(), _a6 = _g2.done, !_a6; _e2 = true) { + for (var _e2 = true, _f2 = __asyncValues2(globber.globGenerator()), _g2; _g2 = yield _f2.next(), _a5 = _g2.done, !_a5; _e2 = true) { _c2 = _g2.value; _e2 = false; const file = _c2; @@ -42704,7 +42704,7 @@ var require_cacheUtils = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_e2 && !_a6 && (_b2 = _f2.return)) yield _b2.call(_f2); + if (!_e2 && !_a5 && (_b2 = _f2.return)) yield _b2.call(_f2); } finally { if (e_1) throw e_1.error; } @@ -44676,12 +44676,12 @@ var require_userAgent = __commonJS({ function getUserAgentHeaderName() { return (0, import_userAgent.getHeaderName)(); } - async function getUserAgentValue(prefix) { + async function getUserAgentValue(prefix2) { const runtimeInfo = /* @__PURE__ */ new Map(); runtimeInfo.set("ts-http-runtime", import_constants5.SDK_VERSION); await (0, import_userAgent.setPlatformSpecificData)(runtimeInfo); const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + const userAgentValue = prefix2 ? `${prefix2} ${defaultAgent}` : defaultAgent; return userAgentValue; } } @@ -45875,8 +45875,8 @@ var require_has_flag = __commonJS({ "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); + const prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix2 + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; @@ -46113,8 +46113,8 @@ var require_node = __commonJS({ if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name} \x1B[0m`; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); + const prefix2 = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix2 + args[0].split("\n").join("\n" + prefix2); args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate2() + name + " " + args[0]; @@ -48295,10 +48295,10 @@ var require_urlHelpers = __commonJS({ } queryString = queryString.slice(1); const pairs = queryString.split("&"); - for (const pair of pairs) { - const eqIndex = pair.indexOf("="); - const name = eqIndex === -1 ? pair : pair.substring(0, eqIndex); - const value = eqIndex === -1 ? "" : pair.substring(eqIndex + 1); + for (const pair2 of pairs) { + const eqIndex = pair2.indexOf("="); + const name = eqIndex === -1 ? pair2 : pair2.substring(0, eqIndex); + const value = eqIndex === -1 ? "" : pair2.substring(eqIndex + 1); const existingValue = result.get(name); if (existingValue !== void 0) { if (Array.isArray(existingValue)) { @@ -49274,12 +49274,12 @@ var require_userAgent2 = __commonJS({ function getUserAgentHeaderName() { return (0, import_userAgent.getHeaderName)(); } - async function getUserAgentValue(prefix) { + async function getUserAgentValue(prefix2) { const runtimeInfo = /* @__PURE__ */ new Map(); runtimeInfo.set("core-rest-pipeline", import_constants5.SDK_VERSION); await (0, import_userAgent.setPlatformSpecificData)(runtimeInfo); const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + const userAgentValue = prefix2 ? `${prefix2} ${defaultAgent}` : defaultAgent; return userAgentValue; } } @@ -49727,9 +49727,9 @@ function __runInitializers(thisArg, initializers, value) { function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); } -function __setFunctionName(f, name, prefix) { +function __setFunctionName(f, name, prefix2) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + return Object.defineProperty(f, "name", { configurable: true, value: prefix2 ? "".concat(prefix2, " ", name) : name }); } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); @@ -53809,8 +53809,8 @@ var require_urlHelpers2 = __commonJS({ } queryString = queryString.slice(1); const pairs = queryString.split("&"); - for (const pair of pairs) { - const [name, value] = pair.split("=", 2); + for (const pair2 of pairs) { + const [name, value] = pair2.split("=", 2); const existingValue = result.get(name); if (existingValue) { if (Array.isArray(existingValue)) { @@ -56631,17 +56631,17 @@ var require_xml = __commonJS({ var fast_xml_parser_1 = require_fxp(); var xml_common_js_1 = require_xml_common(); function getCommonOptions(options) { - var _a6; + var _a5; return { attributesGroupName: xml_common_js_1.XML_ATTRKEY, - textNodeName: (_a6 = options.xmlCharKey) !== null && _a6 !== void 0 ? _a6 : xml_common_js_1.XML_CHARKEY, + textNodeName: (_a5 = options.xmlCharKey) !== null && _a5 !== void 0 ? _a5 : xml_common_js_1.XML_CHARKEY, ignoreAttributes: false, suppressBooleanAttributes: false }; } function getSerializerOptions(options = {}) { - var _a6, _b2; - return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a6 = options.rootName) !== null && _a6 !== void 0 ? _a6 : "root", cdataPropName: (_b2 = options.cdataPropName) !== null && _b2 !== void 0 ? _b2 : "__cdata" }); + var _a5, _b2; + return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a5 = options.rootName) !== null && _a5 !== void 0 ? _a5 : "root", cdataPropName: (_b2 = options.cdataPropName) !== null && _b2 !== void 0 ? _b2 : "__cdata" }); } function getParserOptions(options = {}) { return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); @@ -59343,12 +59343,12 @@ var require_crc64 = __commonJS({ } Module["getCache"] = getCache; function wrapPointer(ptr, __class__) { - var cache = getCache(__class__); - var ret = cache[ptr]; + var cache2 = getCache(__class__); + var ret = cache2[ptr]; if (ret) return ret; ret = Object.create((__class__ || WrapperObject).prototype); ret.ptr = ptr; - return cache[ptr] = ret; + return cache2[ptr] = ret; } Module["wrapPointer"] = wrapPointer; function castObject(obj, __class__) { @@ -61002,11 +61002,11 @@ var require_utils_common = __commonJS({ const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; const searchPieces = []; - for (const pair of searchString.slice(1).split("&")) { - if (pair) { - const [key] = pair.split("=", 2); + for (const pair2 of searchString.slice(1).split("&")) { + if (pair2) { + const [key] = pair2.split("=", 2); if (key !== encodedName) { - searchPieces.push(pair); + searchPieces.push(pair2); } } } @@ -72484,7 +72484,7 @@ var require_parameters = __commonJS({ multipartContentType: () => multipartContentType, pageWrite: () => pageWrite, pageWrite1: () => pageWrite1, - prefix: () => prefix, + prefix: () => prefix2, prevSnapshotUrl: () => prevSnapshotUrl, preventEncryptionScopeOverride: () => preventEncryptionScopeOverride, prevsnapshot: () => prevsnapshot, @@ -72662,7 +72662,7 @@ var require_parameters = __commonJS({ } } }; - var prefix = { + var prefix2 = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -78423,11 +78423,11 @@ var require_utils_common2 = __commonJS({ const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; const searchPieces = []; - for (const pair of searchString.slice(1).split("&")) { - if (pair) { - const [key] = pair.split("=", 2); + for (const pair2 of searchString.slice(1).split("&")) { + if (pair2) { + const [key] = pair2.split("=", 2); if (key !== encodedName) { - searchPieces.push(pair); + searchPieces.push(pair2); } } } @@ -84005,7 +84005,7 @@ var init_set = __esm({ return buffers; }; setBinaryViewBytes = (data, index2, bytes) => { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; const views = data.values; if (!views) { throw new Error("BinaryView data is missing view buffer"); @@ -84024,8 +84024,8 @@ var init_set = __esm({ views.set(bytes, viewOffset + BinaryView2.INLINE_OFFSET); return; } - const prefix = ((_a6 = bytes[0]) !== null && _a6 !== void 0 ? _a6 : 0) | ((_b2 = bytes[1]) !== null && _b2 !== void 0 ? _b2 : 0) << 8 | ((_c2 = bytes[2]) !== null && _c2 !== void 0 ? _c2 : 0) << 16 | ((_d2 = bytes[3]) !== null && _d2 !== void 0 ? _d2 : 0) << 24; - view.setUint32(BinaryView2.INLINE_OFFSET, prefix >>> 0, true); + const prefix2 = ((_a5 = bytes[0]) !== null && _a5 !== void 0 ? _a5 : 0) | ((_b2 = bytes[1]) !== null && _b2 !== void 0 ? _b2 : 0) << 8 | ((_c2 = bytes[2]) !== null && _c2 !== void 0 ? _c2 : 0) << 16 | ((_d2 = bytes[3]) !== null && _d2 !== void 0 ? _d2 : 0) << 24; + view.setUint32(BinaryView2.INLINE_OFFSET, prefix2 >>> 0, true); const buffers = ensureWritableVariadicBuffers(data); const copy = bytes.slice(); const bufferIndex = buffers.push(copy) - 1; @@ -84146,8 +84146,8 @@ var init_set = __esm({ instance.visit(child, index2, value); }; setDictionary = (data, index2, value) => { - var _a6; - (_a6 = data.dictionary) === null || _a6 === void 0 ? void 0 : _a6.set(data.values[index2], value); + var _a5; + (_a5 = data.dictionary) === null || _a5 === void 0 ? void 0 : _a5.set(data.values[index2], value); }; setIntervalValue = (data, index2, value) => { switch (data.type.unit) { @@ -84423,7 +84423,7 @@ var init_get = __esm({ getFixedSizeBinary = ({ stride, values }, index2) => values.subarray(stride * index2, stride * (index2 + 1)); getBinary = ({ values, valueOffsets }, index2) => getVariableWidthBytes(values, valueOffsets, index2); getBinaryViewBytes = (data, index2) => { - var _a6; + var _a5; const values = data.values; if (!values) { throw new Error("BinaryView data is missing view buffer"); @@ -84447,7 +84447,7 @@ var init_get = __esm({ } const bufferIndex = view.getInt32(8, true); const offset = view.getInt32(12, true); - const variadicBuffer = (_a6 = data.variadicBuffers) === null || _a6 === void 0 ? void 0 : _a6[bufferIndex]; + const variadicBuffer = (_a5 = data.variadicBuffers) === null || _a5 === void 0 ? void 0 : _a5[bufferIndex]; if (!variadicBuffer) { throw new Error(`BinaryView variadic buffer ${bufferIndex} is missing`); } @@ -84531,8 +84531,8 @@ var init_get = __esm({ return instance2.visit(child, index2); }; getDictionary = (data, index2) => { - var _a6; - return (_a6 = data.dictionary) === null || _a6 === void 0 ? void 0 : _a6.get(data.values[index2]); + var _a5; + return (_a5 = data.dictionary) === null || _a5 === void 0 ? void 0 : _a5.get(data.values[index2]); }; getInterval = (data, index2) => data.type.unit === IntervalUnit.MONTH_DAY_NANO ? getIntervalMonthDayNano(data, index2) : data.type.unit === IntervalUnit.DAY_TIME ? getIntervalDayTime(data, index2) : getIntervalYearMonth(data, index2); getIntervalDayTime = ({ values }, index2) => values.subarray(2 * index2, 2 * (index2 + 1)); @@ -85084,8 +85084,8 @@ var init_data = __esm({ nullBitmap && (byteLength += nullBitmap.byteLength); typeIds && (byteLength += typeIds.byteLength); byteLength += this.variadicBuffers.reduce((size, data) => { - var _a6; - return size + ((_a6 = data === null || data === void 0 ? void 0 : data.byteLength) !== null && _a6 !== void 0 ? _a6 : 0); + var _a5; + return size + ((_a5 = data === null || data === void 0 ? void 0 : data.byteLength) !== null && _a5 !== void 0 ? _a5 : 0); }, 0); return this.children.reduce((byteLength2, child) => byteLength2 + child.byteLength, byteLength); } @@ -85104,7 +85104,7 @@ var init_data = __esm({ return nullCount; } constructor(type, offset, length, nullCount, buffers, children = [], dictionary, variadicBuffers = []) { - var _a6; + var _a5; this.type = type; this.children = children; this.dictionary = dictionary; @@ -85129,7 +85129,7 @@ var init_data = __esm({ } this.variadicBuffers = variadicBuffers; } - (_a6 = this.variadicBuffers) !== null && _a6 !== void 0 ? _a6 : this.variadicBuffers = []; + (_a5 = this.variadicBuffers) !== null && _a5 !== void 0 ? _a5 : this.variadicBuffers = []; } getValid(index2) { const { type } = this; @@ -85280,12 +85280,12 @@ var init_data = __esm({ return new Data(type, offset, length, nullCount, [valueOffsets, data, nullBitmap]); } visitUtf8View(props) { - var _a6; + var _a5; const { ["type"]: type, ["offset"]: offset = 0 } = props; const views = toArrayBufferView(type.ArrayType, props["views"]); const nullBitmap = toUint8Array(props["nullBitmap"]); const variadicBuffers = (props["variadicBuffers"] || []).map((buffer) => toUint8Array(buffer)); - const length = (_a6 = props["length"]) !== null && _a6 !== void 0 ? _a6 : Math.trunc(views.length / Utf8View2.ELEMENT_WIDTH); + const length = (_a5 = props["length"]) !== null && _a5 !== void 0 ? _a5 : Math.trunc(views.length / Utf8View2.ELEMENT_WIDTH); const nullCount = props["nullBitmap"] ? -1 : 0; return new Data(type, offset, length, nullCount, [void 0, views, nullBitmap], [], void 0, variadicBuffers); } @@ -85306,12 +85306,12 @@ var init_data = __esm({ return new Data(type, offset, length, nullCount, [valueOffsets, data, nullBitmap]); } visitBinaryView(props) { - var _a6; + var _a5; const { ["type"]: type, ["offset"]: offset = 0 } = props; const views = toArrayBufferView(type.ArrayType, props["views"]); const nullBitmap = toUint8Array(props["nullBitmap"]); const variadicBuffers = (props["variadicBuffers"] || []).map((buffer) => toUint8Array(buffer)); - const length = (_a6 = props["length"]) !== null && _a6 !== void 0 ? _a6 : Math.trunc(views.length / BinaryView2.ELEMENT_WIDTH); + const length = (_a5 = props["length"]) !== null && _a5 !== void 0 ? _a5 : Math.trunc(views.length / BinaryView2.ELEMENT_WIDTH); const nullCount = props["nullBitmap"] ? -1 : 0; return new Data(type, offset, length, nullCount, [void 0, views, nullBitmap], [], void 0, variadicBuffers); } @@ -86142,22 +86142,22 @@ var init_vector2 = __esm({ const get = this.get; const set = this.set; const slice = this.slice; - const cache = new Array(this.length); + const cache2 = new Array(this.length); Object.defineProperty(this, "get", { value(index2) { - const cachedValue = cache[index2]; + const cachedValue = cache2[index2]; if (cachedValue !== void 0) { return cachedValue; } const value = get.call(this, index2); - cache[index2] = value; + cache2[index2] = value; return value; } }); Object.defineProperty(this, "set", { value(index2, value) { set.call(this, index2, value); - cache[index2] = value; + cache2[index2] = value; } }); Object.defineProperty(this, "slice", { @@ -86537,9 +86537,9 @@ var init_builder = __esm({ * @returns {this} The cleared `Builder` instance. */ clear() { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; this.length = 0; - (_a6 = this._nulls) === null || _a6 === void 0 ? void 0 : _a6.clear(); + (_a5 = this._nulls) === null || _a5 === void 0 ? void 0 : _a5.clear(); (_b2 = this._values) === null || _b2 === void 0 ? void 0 : _b2.clear(); (_c2 = this._offsets) === null || _c2 === void 0 ? void 0 : _c2.clear(); (_d2 = this._typeIds) === null || _d2 === void 0 ? void 0 : _d2.clear(); @@ -88208,11 +88208,11 @@ var init_stream = __esm({ } toUint8Array(sync = false) { return sync ? joinUint8Arrays(this._values)[0] : (() => __awaiter(this, void 0, void 0, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; const buffers = []; let byteLength = 0; try { - for (var _d2 = true, _e2 = __asyncValues(this), _f2; _f2 = yield _e2.next(), _a6 = _f2.done, !_a6; _d2 = true) { + for (var _d2 = true, _e2 = __asyncValues(this), _f2; _f2 = yield _e2.next(), _a5 = _f2.done, !_a5; _d2 = true) { _c2 = _f2.value; _d2 = false; const chunk = _c2; @@ -88223,7 +88223,7 @@ var init_stream = __esm({ e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a6 && (_b2 = _e2.return)) yield _b2.call(_e2); + if (!_d2 && !_a5 && (_b2 = _e2.return)) yield _b2.call(_e2); } finally { if (e_1) throw e_1.error; } @@ -88834,23 +88834,23 @@ __export(interval_exports, { toIntervalMonthDayNanoObjects: () => toIntervalMonthDayNanoObjects }); function toIntervalDayTimeInt32Array(objects) { - var _a6, _b2; + var _a5, _b2; const length = objects.length; const array2 = new Int32Array(length * 2); for (let oi = 0, ai = 0; oi < length; oi++) { const interval = objects[oi]; - array2[ai++] = (_a6 = interval["days"]) !== null && _a6 !== void 0 ? _a6 : 0; + array2[ai++] = (_a5 = interval["days"]) !== null && _a5 !== void 0 ? _a5 : 0; array2[ai++] = (_b2 = interval["milliseconds"]) !== null && _b2 !== void 0 ? _b2 : 0; } return array2; } function toIntervalMonthDayNanoInt32Array(objects) { - var _a6, _b2; + var _a5, _b2; const length = objects.length; const data = new Int32Array(length * 4); for (let oi = 0, ai = 0; oi < length; oi++) { const interval = objects[oi]; - data[ai++] = (_a6 = interval["months"]) !== null && _a6 !== void 0 ? _a6 : 0; + data[ai++] = (_a5 = interval["months"]) !== null && _a5 !== void 0 ? _a5 : 0; data[ai++] = (_b2 = interval["days"]) !== null && _b2 !== void 0 ? _b2 : 0; const nanoseconds = interval["nanoseconds"]; if (nanoseconds) { @@ -88916,9 +88916,9 @@ function parseViewDataFromJSON(views, parseInlined) { data[offset + 4 + j] = bytes[j]; } } else { - const prefix = view["PREFIX_HEX"]; - for (let j = 0; j < 8 && j < prefix.length; j += 2) { - data[offset + 4 + (j >> 1)] = Number.parseInt(prefix.slice(j, j + 2), 16); + const prefix2 = view["PREFIX_HEX"]; + for (let j = 0; j < 8 && j < prefix2.length; j += 2) { + data[offset + 4 + (j >> 1)] = Number.parseInt(prefix2.slice(j, j + 2), 16); } dataView.setInt32(offset + 8, view["BUFFER_INDEX"], true); dataView.setInt32(offset + 12, view["OFFSET"], true); @@ -89093,8 +89093,8 @@ var init_vectorloader = __esm({ return Array.from({ length }, () => this.readData(null)); } nextVariadicBufferCount() { - var _a6; - return (_a6 = this.variadicBufferCounts[++this.variadicBufferIndex]) !== null && _a6 !== void 0 ? _a6 : 0; + var _a5; + return (_a5 = this.variadicBufferCounts[++this.variadicBufferIndex]) !== null && _a5 !== void 0 ? _a5 : 0; } readDictionary(type) { return this.dictionaries.get(type.id); @@ -89934,8 +89934,8 @@ var init_binaryview = __esm({ viewBuffer[viewOffset + BinaryView2.INLINE_OFFSET + i] = 0; } } else { - const prefix = new DataView(data.buffer, data.byteOffset, Math.min(4, length)); - view.setUint32(BinaryView2.INLINE_OFFSET, prefix.getUint32(0, true), true); + const prefix2 = new DataView(data.buffer, data.byteOffset, Math.min(4, length)); + view.setUint32(BinaryView2.INLINE_OFFSET, prefix2.getUint32(0, true), true); if (!this._currentBuffer || this._currentBufferOffset + length > this._bufferSize) { if (this._currentBuffer) { this._variadicBuffers.push(this._currentBuffer.buffer.slice(0, this._currentBufferOffset)); @@ -90482,11 +90482,11 @@ function builderThroughAsyncIterable(options) { const sizeProperty = queueingStrategy !== "bytes" ? "length" : "byteLength"; return function(source) { return __asyncGenerator(this, arguments, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; let numChunks = 0; const builder = makeBuilder(options); try { - for (var _d2 = true, source_1 = __asyncValues(source), source_1_1; source_1_1 = yield __await(source_1.next()), _a6 = source_1_1.done, !_a6; _d2 = true) { + for (var _d2 = true, source_1 = __asyncValues(source), source_1_1; source_1_1 = yield __await(source_1.next()), _a5 = source_1_1.done, !_a5; _d2 = true) { _c2 = source_1_1.value; _d2 = false; const value = _c2; @@ -90498,7 +90498,7 @@ function builderThroughAsyncIterable(options) { e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a6 && (_b2 = source_1.return)) yield __await(_b2.call(source_1)); + if (!_d2 && !_a5 && (_b2 = source_1.return)) yield __await(_b2.call(source_1)); } finally { if (e_1) throw e_1.error; } @@ -90558,7 +90558,7 @@ function uniformlyDistributeChunksAcrossRecordBatches(schema, cols) { ]; } function distributeChildren(fields, batchLength, children, columns, memo) { - var _a6; + var _a5; const nullBitmapSize = (batchLength + 63 & ~63) >> 3; for (let i = -1, n = columns.length; ++i < n; ) { const child = children[i]; @@ -90573,7 +90573,7 @@ function distributeChildren(fields, batchLength, children, columns, memo) { } else { const field = fields[i]; fields[i] = field.clone({ nullable: true }); - children[i] = (_a6 = child === null || child === void 0 ? void 0 : child._changeLengthAndBackfillNullBitmap(batchLength)) !== null && _a6 !== void 0 ? _a6 : makeData({ + children[i] = (_a5 = child === null || child === void 0 ? void 0 : child._changeLengthAndBackfillNullBitmap(batchLength)) !== null && _a5 !== void 0 ? _a5 : makeData({ type: field.type, length: batchLength, nullCount: batchLength, @@ -91572,8 +91572,8 @@ var init_registry = __esm({ this.registry[compression] = codec; } get(compression) { - var _a6; - return ((_a6 = this.registry) === null || _a6 === void 0 ? void 0 : _a6[compression]) || null; + var _a5; + return ((_a5 = this.registry) === null || _a5 === void 0 ? void 0 : _a5[compression]) || null; } }; compressionRegistry = new _CompressionRegistry(); @@ -91791,7 +91791,7 @@ var init_reader = __esm({ return this._impl[Symbol.iterator](); } [Symbol.asyncIterator]() { - return __asyncGenerator(this, arguments, function* _a6() { + return __asyncGenerator(this, arguments, function* _a5() { yield __await(yield* __asyncDelegator(__asyncValues(this[Symbol.iterator]()))); }); } @@ -91803,10 +91803,10 @@ var init_reader = __esm({ } readAll() { return __awaiter(this, void 0, void 0, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; const batches = new Array(); try { - for (var _d2 = true, _e2 = __asyncValues(this), _f2; _f2 = yield _e2.next(), _a6 = _f2.done, !_a6; _d2 = true) { + for (var _d2 = true, _e2 = __asyncValues(this), _f2; _f2 = yield _e2.next(), _a5 = _f2.done, !_a5; _d2 = true) { _c2 = _f2.value; _d2 = false; const batch = _c2; @@ -91816,7 +91816,7 @@ var init_reader = __esm({ e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a6 && (_b2 = _e2.return)) yield _b2.call(_e2); + if (!_d2 && !_a5 && (_b2 = _e2.return)) yield _b2.call(_e2); } finally { if (e_1) throw e_1.error; } @@ -91913,11 +91913,11 @@ var init_reader = __esm({ } return (dictionary && isDelta ? dictionary.concat(new Vector(data)) : new Vector(data)).memoize(); } - _loadVectors(header, body, types2) { - return new VectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types2); + _loadVectors(header, body, types) { + return new VectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types); } - _loadCompressedVectors(header, body, types2) { - return new CompressedVectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types2); + _loadCompressedVectors(header, body, types) { + return new CompressedVectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types); } _decompressBuffers(header, body, codec) { const decompressedBuffers = []; @@ -92136,14 +92136,14 @@ var init_reader = __esm({ return super.open(options); } readRecordBatch(index2) { - var _a6; + var _a5; if (this.closed) { return null; } if (!this._footer) { this.open(); } - const block = (_a6 = this._footer) === null || _a6 === void 0 ? void 0 : _a6.getRecordBatch(index2); + const block = (_a5 = this._footer) === null || _a5 === void 0 ? void 0 : _a5.getRecordBatch(index2); if (block && this._handle.seek(block.offset)) { const message = this._reader.readMessage(MessageHeader.RecordBatch); if (message === null || message === void 0 ? void 0 : message.isRecordBatch()) { @@ -92156,8 +92156,8 @@ var init_reader = __esm({ return null; } _readDictionaryBatch(index2) { - var _a6; - const block = (_a6 = this._footer) === null || _a6 === void 0 ? void 0 : _a6.getDictionaryBatch(index2); + var _a5; + const block = (_a5 = this._footer) === null || _a5 === void 0 ? void 0 : _a5.getDictionaryBatch(index2); if (block && this._handle.seek(block.offset)) { const message = this._reader.readMessage(MessageHeader.DictionaryBatch); if (message === null || message === void 0 ? void 0 : message.isDictionaryBatch()) { @@ -92176,12 +92176,12 @@ var init_reader = __esm({ return Footer_.decode(buffer); } _readNextMessageAndValidate(type) { - var _a6; + var _a5; if (!this._footer) { this.open(); } if (this._footer && this._recordBatchIndex < this.numRecordBatches) { - const block = (_a6 = this._footer) === null || _a6 === void 0 ? void 0 : _a6.getRecordBatch(this._recordBatchIndex); + const block = (_a5 = this._footer) === null || _a5 === void 0 ? void 0 : _a5.getRecordBatch(this._recordBatchIndex); if (block && this._handle.seek(block.offset)) { return this._reader.readMessage(type); } @@ -92226,14 +92226,14 @@ var init_reader = __esm({ } readRecordBatch(index2) { return __awaiter(this, void 0, void 0, function* () { - var _a6; + var _a5; if (this.closed) { return null; } if (!this._footer) { yield this.open(); } - const block = (_a6 = this._footer) === null || _a6 === void 0 ? void 0 : _a6.getRecordBatch(index2); + const block = (_a5 = this._footer) === null || _a5 === void 0 ? void 0 : _a5.getRecordBatch(index2); if (block && (yield this._handle.seek(block.offset))) { const message = yield this._reader.readMessage(MessageHeader.RecordBatch); if (message === null || message === void 0 ? void 0 : message.isRecordBatch()) { @@ -92248,8 +92248,8 @@ var init_reader = __esm({ } _readDictionaryBatch(index2) { return __awaiter(this, void 0, void 0, function* () { - var _a6; - const block = (_a6 = this._footer) === null || _a6 === void 0 ? void 0 : _a6.getDictionaryBatch(index2); + var _a5; + const block = (_a5 = this._footer) === null || _a5 === void 0 ? void 0 : _a5.getDictionaryBatch(index2); if (block && (yield this._handle.seek(block.offset))) { const message = yield this._reader.readMessage(MessageHeader.DictionaryBatch); if (message === null || message === void 0 ? void 0 : message.isDictionaryBatch()) { @@ -92290,8 +92290,8 @@ var init_reader = __esm({ constructor(source, dictionaries) { super(source, dictionaries); } - _loadVectors(header, body, types2) { - return new JSONVectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types2); + _loadVectors(header, body, types) { + return new JSONVectorLoader(body, header.nodes, header.buffers, this.dictionaries, this.schema.metadataVersion, header.variadicBufferCounts).visitMany(types); } }; } @@ -92306,7 +92306,7 @@ function addBuffer(values) { return this; } function assembleUnion(data) { - var _a6; + var _a5; const { type, length, typeIds, valueOffsets } = data; addBuffer.call(this, typeIds); if (type.mode === UnionMode.Sparse) { @@ -92327,7 +92327,7 @@ function assembleUnion(data) { shift = childOffsets[typeId] = valueOffsets[index2]; } shiftedOffsets[index2] = valueOffsets[index2] - shift; - childLengths[typeId] = ((_a6 = childLengths[typeId]) !== null && _a6 !== void 0 ? _a6 : 0) + 1; + childLengths[typeId] = ((_a5 = childLengths[typeId]) !== null && _a5 !== void 0 ? _a5 : 0) + 1; } addBuffer.call(this, shiftedOffsets); this.visitMany(data.children.map((child, childIndex) => { @@ -92759,12 +92759,12 @@ function writeAll(writer, input) { } function writeAllAsync(writer, batches) { return __awaiter(this, void 0, void 0, function* () { - var _a6, batches_1, batches_1_1; + var _a5, batches_1, batches_1_1; var _b2, e_1, _c2, _d2; try { - for (_a6 = true, batches_1 = __asyncValues(batches); batches_1_1 = yield batches_1.next(), _b2 = batches_1_1.done, !_b2; _a6 = true) { + for (_a5 = true, batches_1 = __asyncValues(batches); batches_1_1 = yield batches_1.next(), _b2 = batches_1_1.done, !_b2; _a5 = true) { _d2 = batches_1_1.value; - _a6 = false; + _a5 = false; const batch = _d2; writer.write(batch); } @@ -92772,7 +92772,7 @@ function writeAllAsync(writer, batches) { e_1 = { error: e_1_1 }; } finally { try { - if (!_a6 && !_b2 && (_c2 = batches_1.return)) yield _c2.call(batches_1); + if (!_a5 && !_b2 && (_c2 = batches_1.return)) yield _c2.call(batches_1); } finally { if (e_1) throw e_1.error; } @@ -93087,9 +93087,9 @@ var init_writer = __esm({ return this; } _writeDictionaries(batch) { - var _a6, _b2; + var _a5, _b2; for (const [id, dictionary] of batch.dictionaries) { - const chunks = (_a6 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.data) !== null && _a6 !== void 0 ? _a6 : []; + const chunks = (_a5 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.data) !== null && _a5 !== void 0 ? _a5 : []; const prevDictionary = this._seenDictionaries.get(id); const offset = (_b2 = this._dictionaryDeltaOffsets.get(id)) !== null && _b2 !== void 0 ? _b2 : 0; if (!prevDictionary || prevDictionary.data[0] !== chunks[0]) { @@ -93684,12 +93684,12 @@ var init_builder3 = __esm({ } }; chunkLength = (chunk) => { - var _a6; - return (_a6 = chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _a6 !== void 0 ? _a6 : 0; + var _a5; + return (_a5 = chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _a5 !== void 0 ? _a5 : 0; }; chunkByteLength = (chunk) => { - var _a6; - return (_a6 = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a6 !== void 0 ? _a6 : 0; + var _a5; + return (_a5 = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a5 !== void 0 ? _a5 : 0; }; } }); @@ -97397,8 +97397,8 @@ var require_AvroParser = __commonJS({ }; const pairs = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; - for (const pair of pairs) { - dict[pair.key] = pair.value; + for (const pair2 of pairs) { + dict[pair2.key] = pair2.value; } return dict; } @@ -97538,9 +97538,9 @@ var require_AvroParser = __commonJS({ }; var AvroUnionType = class extends AvroType { _types; - constructor(types2) { + constructor(types) { super(); - this._types = types2; + this._types = types; } async read(stream2, options = {}) { const typeIndex = await AvroParser.readInt(stream2, options); @@ -98783,7 +98783,7 @@ var require_operation2 = __commonJS({ return rawResponse.headers["azure-asyncoperation"]; } function findResourceLocation(inputs) { - var _a6; + var _a5; const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; switch (requestMethod) { case "PUT": { @@ -98793,7 +98793,7 @@ var require_operation2 = __commonJS({ return void 0; } case "PATCH": { - return (_a6 = getDefault()) !== null && _a6 !== void 0 ? _a6 : requestPath; + return (_a5 = getDefault()) !== null && _a5 !== void 0 ? _a5 : requestPath; } default: { return getDefault(); @@ -98875,13 +98875,13 @@ var require_operation2 = __commonJS({ } } function getStatus(rawResponse) { - var _a6; - const { status } = (_a6 = rawResponse.body) !== null && _a6 !== void 0 ? _a6 : {}; + var _a5; + const { status } = (_a5 = rawResponse.body) !== null && _a5 !== void 0 ? _a5 : {}; return transformStatus({ status, statusCode: rawResponse.statusCode }); } function getProvisioningState(rawResponse) { - var _a6, _b2; - const { properties, provisioningState } = (_a6 = rawResponse.body) !== null && _a6 !== void 0 ? _a6 : {}; + var _a5, _b2; + const { properties, provisioningState } = (_a5 = rawResponse.body) !== null && _a5 !== void 0 ? _a5 : {}; const status = (_b2 = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b2 !== void 0 ? _b2 : provisioningState; return transformStatus({ status, statusCode: rawResponse.statusCode }); } @@ -98927,8 +98927,8 @@ var require_operation2 = __commonJS({ function getStatusFromInitialResponse(inputs) { const { response, state, operationLocation } = inputs; function helper() { - var _a6; - const mode = (_a6 = state.config.metadata) === null || _a6 === void 0 ? void 0 : _a6["mode"]; + var _a5; + const mode = (_a5 = state.config.metadata) === null || _a5 === void 0 ? void 0 : _a5["mode"]; switch (mode) { case void 0: return toOperationStatus(response.rawResponse.statusCode); @@ -98963,8 +98963,8 @@ var require_operation2 = __commonJS({ } exports2.initHttpOperation = initHttpOperation; function getOperationLocation({ rawResponse }, state) { - var _a6; - const mode = (_a6 = state.config.metadata) === null || _a6 === void 0 ? void 0 : _a6["mode"]; + var _a5; + const mode = (_a5 = state.config.metadata) === null || _a5 === void 0 ? void 0 : _a5["mode"]; switch (mode) { case "OperationLocation": { return getOperationLocationPollingUrl({ @@ -98983,8 +98983,8 @@ var require_operation2 = __commonJS({ } exports2.getOperationLocation = getOperationLocation; function getOperationStatus({ rawResponse }, state) { - var _a6; - const mode = (_a6 = state.config.metadata) === null || _a6 === void 0 ? void 0 : _a6["mode"]; + var _a5; + const mode = (_a5 = state.config.metadata) === null || _a5 === void 0 ? void 0 : _a5["mode"]; switch (mode) { case "OperationLocation": { return getStatus(rawResponse); @@ -99001,8 +99001,8 @@ var require_operation2 = __commonJS({ } exports2.getOperationStatus = getOperationStatus; function accessBodyProperty({ flatResponse, rawResponse }, prop) { - var _a6, _b2; - return (_a6 = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a6 !== void 0 ? _a6 : (_b2 = rawResponse.body) === null || _b2 === void 0 ? void 0 : _b2[prop]; + var _a5, _b2; + return (_a5 = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a5 !== void 0 ? _a5 : (_b2 = rawResponse.body) === null || _b2 === void 0 ? void 0 : _b2[prop]; } function getResourceLocation(res, state) { const loc = accessBodyProperty(res, "resourceLocation"); @@ -99289,7 +99289,7 @@ var require_operation3 = __commonJS({ this.pollerConfig = pollerConfig; } async update(options) { - var _a6; + var _a5; const stateProxy = createStateProxy(); if (!this.state.isStarted) { this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ @@ -99317,7 +99317,7 @@ var require_operation3 = __commonJS({ setErrorAsResult: this.setErrorAsResult }); } - (_a6 = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a6 === void 0 ? void 0 : _a6.call(options, this.state); + (_a5 = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a5 === void 0 ? void 0 : _a5.call(options, this.state); return this; } async cancel() { @@ -105110,10 +105110,10 @@ var require_ContainerClient = __commonJS({ )) { const segment = listBlobsHierarchySegmentResponse.segment; if (segment.blobPrefixes) { - for (const prefix of segment.blobPrefixes) { + for (const prefix2 of segment.blobPrefixes) { yield { kind: "prefix", - ...prefix + ...prefix2 }; } } @@ -107340,10 +107340,10 @@ var require_uploadUtils = __commonJS({ exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - const uploadProgress = new UploadProgress((_a6 = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a6 !== void 0 ? _a6 : 0); + const uploadProgress = new UploadProgress((_a5 = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a5 !== void 0 ? _a5 : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, @@ -107904,7 +107904,7 @@ var require_downloadUtils = __commonJS({ } function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const archiveDescriptor = yield fs34.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, @@ -107952,7 +107952,7 @@ var require_downloadUtils = __commonJS({ while (nextDownload = downloads.pop()) { activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); actives++; - if (actives >= ((_a6 = options.downloadConcurrency) !== null && _a6 !== void 0 ? _a6 : 10)) { + if (actives >= ((_a5 = options.downloadConcurrency) !== null && _a5 !== void 0 ? _a5 : 10)) { yield waitAndWrite(); } } @@ -108005,7 +108005,7 @@ var require_downloadUtils = __commonJS({ } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -108014,7 +108014,7 @@ var require_downloadUtils = __commonJS({ } }); const properties = yield client.getProperties(); - const contentLength = (_a6 = properties.contentLength) !== null && _a6 !== void 0 ? _a6 : -1; + const contentLength = (_a5 = properties.contentLength) !== null && _a5 !== void 0 ? _a5 : -1; if (contentLength < 0) { core29.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); @@ -108420,7 +108420,7 @@ var require_cacheHttpClient = __commonJS({ } function getCacheEntry(keys, paths, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; @@ -108434,7 +108434,7 @@ var require_cacheHttpClient = __commonJS({ return null; } if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) { - const errorMessage = (_a6 = response.error) === null || _a6 === void 0 ? void 0 : _a6.message; + const errorMessage = (_a5 = response.error) === null || _a5 === void 0 ? void 0 : _a5.message; if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.includes(constants_1.CacheReadDeniedMessagePrefix)) { throw new Error(errorMessage); } @@ -108575,9 +108575,9 @@ Other caches with similar key:`); core29.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); core29.debug("Commiting cache"); - const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core29.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); - const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + const cacheSize2 = utils.getArchiveFileSizeInBytes(archivePath); + core29.info(`Cache Size: ~${Math.round(cacheSize2 / (1024 * 1024))} MB (${cacheSize2} B)`); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize2); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } @@ -109666,9 +109666,9 @@ var require_json_format_contract = __commonJS({ } exports2.jsonWriteOptions = jsonWriteOptions; function mergeJsonOptions(a, b) { - var _a6, _b2; + var _a5, _b2; let c = Object.assign(Object.assign({}, a), b); - c.typeRegistry = [...(_a6 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a6 !== void 0 ? _a6 : [], ...(_b2 = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b2 !== void 0 ? _b2 : []]; + c.typeRegistry = [...(_a5 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a5 !== void 0 ? _a5 : [], ...(_b2 = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b2 !== void 0 ? _b2 : []]; return c; } exports2.mergeJsonOptions = mergeJsonOptions; @@ -109754,8 +109754,8 @@ var require_reflection_info = __commonJS({ RepeatType2[RepeatType2["UNPACKED"] = 2] = "UNPACKED"; })(RepeatType = exports2.RepeatType || (exports2.RepeatType = {})); function normalizeFieldInfo(field) { - var _a6, _b2, _c2, _d2; - field.localName = (_a6 = field.localName) !== null && _a6 !== void 0 ? _a6 : lower_camel_case_1.lowerCamelCase(field.name); + var _a5, _b2, _c2, _d2; + field.localName = (_a5 = field.localName) !== null && _a5 !== void 0 ? _a5 : lower_camel_case_1.lowerCamelCase(field.name); field.jsonName = (_b2 = field.jsonName) !== null && _b2 !== void 0 ? _b2 : lower_camel_case_1.lowerCamelCase(field.name); field.repeat = (_c2 = field.repeat) !== null && _c2 !== void 0 ? _c2 : RepeatType.NO; field.opt = (_d2 = field.opt) !== null && _d2 !== void 0 ? _d2 : field.repeat ? false : field.oneof ? false : field.kind == "message"; @@ -109763,14 +109763,14 @@ var require_reflection_info = __commonJS({ } exports2.normalizeFieldInfo = normalizeFieldInfo; function readFieldOptions(messageType, fieldName, extensionName, extensionType) { - var _a6; - const options = (_a6 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a6 === void 0 ? void 0 : _a6.options; + var _a5; + const options = (_a5 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a5 === void 0 ? void 0 : _a5.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } exports2.readFieldOptions = readFieldOptions; function readFieldOption(messageType, fieldName, extensionName, extensionType) { - var _a6; - const options = (_a6 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a6 === void 0 ? void 0 : _a6.options; + var _a5; + const options = (_a5 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a5 === void 0 ? void 0 : _a5.options; if (!options) { return void 0; } @@ -109866,8 +109866,8 @@ var require_reflection_type_check = __commonJS({ var oneof_1 = require_oneof(); var ReflectionTypeCheck = class { constructor(info8) { - var _a6; - this.fields = (_a6 = info8.fields) !== null && _a6 !== void 0 ? _a6 : []; + var _a5; + this.fields = (_a5 = info8.fields) !== null && _a5 !== void 0 ? _a5 : []; } prepare() { if (this.data) @@ -110117,10 +110117,10 @@ var require_reflection_json_reader = __commonJS({ this.info = info8; } prepare() { - var _a6; + var _a5; if (this.fMap === void 0) { this.fMap = {}; - const fieldsInput = (_a6 = this.info.fields) !== null && _a6 !== void 0 ? _a6 : []; + const fieldsInput = (_a5 = this.info.fields) !== null && _a5 !== void 0 ? _a5 : []; for (const field of fieldsInput) { this.fMap[field.name] = field; this.fMap[field.jsonName] = field; @@ -110411,8 +110411,8 @@ var require_reflection_json_writer = __commonJS({ var assert_1 = require_assert(); var ReflectionJsonWriter = class { constructor(info8) { - var _a6; - this.fields = (_a6 = info8.fields) !== null && _a6 !== void 0 ? _a6 : []; + var _a5; + this.fields = (_a5 = info8.fields) !== null && _a5 !== void 0 ? _a5 : []; } /** * Converts the message to a JSON object, based on the field descriptors. @@ -110669,9 +110669,9 @@ var require_reflection_binary_reader = __commonJS({ this.info = info8; } prepare() { - var _a6; + var _a5; if (!this.fieldNoToField) { - const fieldsInput = (_a6 = this.info.fields) !== null && _a6 !== void 0 ? _a6 : []; + const fieldsInput = (_a5 = this.info.fields) !== null && _a5 !== void 0 ? _a5 : []; this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); } } @@ -111339,9 +111339,9 @@ var require_message_type = __commonJS({ * This is equivalent to `JSON.stringify(T.toJson(t))` */ toJsonString(message, options) { - var _a6; + var _a5; let value = this.toJson(message, options); - return JSON.stringify(value, null, (_a6 = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a6 !== void 0 ? _a6 : 0); + return JSON.stringify(value, null, (_a5 = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a5 !== void 0 ? _a5 : 0); } /** * Write the message to binary format. @@ -111667,10 +111667,10 @@ var require_reflection_info2 = __commonJS({ exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { - var _a6, _b2, _c2; + var _a5, _b2, _c2; let m = method; m.service = service; - m.localName = (_a6 = m.localName) !== null && _a6 !== void 0 ? _a6 : runtime_1.lowerCamelCase(m.name); + m.localName = (_a5 = m.localName) !== null && _a5 !== void 0 ? _a5 : runtime_1.lowerCamelCase(m.name); m.serverStreaming = !!m.serverStreaming; m.clientStreaming = !!m.clientStreaming; m.options = (_b2 = m.options) !== null && _b2 !== void 0 ? _b2 : {}; @@ -111679,14 +111679,14 @@ var require_reflection_info2 = __commonJS({ } exports2.normalizeMethodInfo = normalizeMethodInfo; function readMethodOptions(service, methodName, extensionName, extensionType) { - var _a6; - const options = (_a6 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a6 === void 0 ? void 0 : _a6.options; + var _a5; + const options = (_a5 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a5 === void 0 ? void 0 : _a5.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } exports2.readMethodOptions = readMethodOptions; function readMethodOption(service, methodName, extensionName, extensionType) { - var _a6; - const options = (_a6 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a6 === void 0 ? void 0 : _a6.options; + var _a5; + const options = (_a5 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a5 === void 0 ? void 0 : _a5.options; if (!options) { return void 0; } @@ -112409,8 +112409,8 @@ var require_test_transport = __commonJS({ } // Creates a promise for response headers from the mock data. promiseHeaders() { - var _a6; - const headers = (_a6 = this.data.headers) !== null && _a6 !== void 0 ? _a6 : _TestTransport.defaultHeaders; + var _a5; + const headers = (_a5 = this.data.headers) !== null && _a5 !== void 0 ? _a5 : _TestTransport.defaultHeaders; return headers instanceof rpc_error_1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); } // Creates a promise for a single, valid, message from the mock data. @@ -112485,14 +112485,14 @@ var require_test_transport = __commonJS({ } // Creates a promise for response status from the mock data. promiseStatus() { - var _a6; - const status = (_a6 = this.data.status) !== null && _a6 !== void 0 ? _a6 : _TestTransport.defaultStatus; + var _a5; + const status = (_a5 = this.data.status) !== null && _a5 !== void 0 ? _a5 : _TestTransport.defaultStatus; return status instanceof rpc_error_1.RpcError ? Promise.reject(status) : Promise.resolve(status); } // Creates a promise for response trailers from the mock data. promiseTrailers() { - var _a6; - const trailers = (_a6 = this.data.trailers) !== null && _a6 !== void 0 ? _a6 : _TestTransport.defaultTrailers; + var _a5; + const trailers = (_a5 = this.data.trailers) !== null && _a5 !== void 0 ? _a5 : _TestTransport.defaultTrailers; return trailers instanceof rpc_error_1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); } maybeSuppressUncaught(...promise) { @@ -112507,8 +112507,8 @@ var require_test_transport = __commonJS({ return rpc_options_1.mergeRpcOptions({}, options); } unary(method, input, options) { - var _a6; - const requestHeaders = (_a6 = options.meta) !== null && _a6 !== void 0 ? _a6 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + var _a5; + const requestHeaders = (_a5 = options.meta) !== null && _a5 !== void 0 ? _a5 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { }).then(delay2(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); @@ -112517,16 +112517,16 @@ var require_test_transport = __commonJS({ return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); } serverStreaming(method, input, options) { - var _a6; - const requestHeaders = (_a6 = options.meta) !== null && _a6 !== void 0 ? _a6 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { + var _a5; + const requestHeaders = (_a5 = options.meta) !== null && _a5 !== void 0 ? _a5 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay2(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = { single: input }; return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); } clientStreaming(method, options) { - var _a6; - const requestHeaders = (_a6 = options.meta) !== null && _a6 !== void 0 ? _a6 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + var _a5; + const requestHeaders = (_a5 = options.meta) !== null && _a5 !== void 0 ? _a5 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { }).then(delay2(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); @@ -112535,8 +112535,8 @@ var require_test_transport = __commonJS({ return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); } duplex(method, options) { - var _a6; - const requestHeaders = (_a6 = options.meta) !== null && _a6 !== void 0 ? _a6 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { + var _a5; + const requestHeaders = (_a5 = options.meta) !== null && _a5 !== void 0 ? _a5 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay2(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = new TestInputStream(this.data, options.abort); @@ -112612,10 +112612,10 @@ var require_rpc_interceptor = __commonJS({ exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; if (kind == "unary") { let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); - for (const curr of ((_a6 = options.interceptors) !== null && _a6 !== void 0 ? _a6 : []).filter((i) => i.interceptUnary).reverse()) { + for (const curr of ((_a5 = options.interceptors) !== null && _a5 !== void 0 ? _a5 : []).filter((i) => i.interceptUnary).reverse()) { const next = tail; tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); } @@ -113902,8 +113902,8 @@ var require_tar = __commonJS({ }); } function getWorkingDirectory() { - var _a6; - return (_a6 = process.env["GITHUB_WORKSPACE"]) !== null && _a6 !== void 0 ? _a6 : process.cwd(); + var _a5; + return (_a5 = process.env["GITHUB_WORKSPACE"]) !== null && _a5 !== void 0 ? _a5 : process.cwd(); } function quoteAbsolutePath(filePath) { return `"${path30.resolve(filePath).replace(new RegExp(`\\${path30.sep}`, "g"), "/")}"`; @@ -114176,7 +114176,7 @@ var require_cache6 = __commonJS({ } function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - var _a6; + var _a5; restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core29.debug("Resolved Keys:"); @@ -114197,7 +114197,7 @@ var require_cache6 = __commonJS({ enableCrossOsArchive }); } catch (error3) { - const errorMessage = (_a6 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a6 !== void 0 ? _a6 : ""; + const errorMessage = (_a5 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a5 !== void 0 ? _a5 : ""; if (errorMessage.includes(exports2.CACHE_READ_DENIED_PREFIX)) { throw new CacheReadDeniedError(errorMessage); } @@ -114244,7 +114244,7 @@ var require_cache6 = __commonJS({ } function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - var _a6; + var _a5; options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -114269,7 +114269,7 @@ var require_cache6 = __commonJS({ try { response = yield twirpClient.GetCacheEntryDownloadURL(request3); } catch (error3) { - const errorMessage = (_a6 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a6 !== void 0 ? _a6 : ""; + const errorMessage = (_a5 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a5 !== void 0 ? _a5 : ""; if (errorMessage.includes(exports2.CACHE_READ_DENIED_PREFIX)) { throw new CacheReadDeniedError(errorMessage); } @@ -114347,7 +114347,7 @@ var require_cache6 = __commonJS({ } function saveCacheV1(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { - var _a6, _b2, _c2, _d2, _e2; + var _a5, _b2, _c2, _d2, _e2; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -114376,7 +114376,7 @@ var require_cache6 = __commonJS({ enableCrossOsArchive, cacheSize: archiveFileSize }); - if ((_a6 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a6 === void 0 ? void 0 : _a6.cacheId) { + if ((_a5 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a5 === void 0 ? void 0 : _a5.cacheId) { cacheId = (_b2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b2 === void 0 ? void 0 : _b2.cacheId; } else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) { throw new Error((_d2 = (_c2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c2 === void 0 ? void 0 : _c2.message) !== null && _d2 !== void 0 ? _d2 : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); @@ -114416,7 +114416,7 @@ var require_cache6 = __commonJS({ } function saveCacheV2(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { - var _a6; + var _a5; options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -114456,7 +114456,7 @@ var require_cache6 = __commonJS({ signedUploadUrl = response.signedUploadUrl; } catch (error3) { core29.debug(`Failed to reserve cache: ${error3}`); - const errorMessage = (_a6 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a6 !== void 0 ? _a6 : ""; + const errorMessage = (_a5 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a5 !== void 0 ? _a5 : ""; if (errorMessage.startsWith(exports2.CACHE_WRITE_DENIED_PREFIX)) { throw new CacheWriteDeniedError(`Unable to reserve cache with key ${key}. More details: ${errorMessage}`); } @@ -115240,7 +115240,7 @@ var require_tool_cache = __commonJS({ versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); - } catch (_a6) { + } catch (_a5) { core29.debug("Invalid json"); } } @@ -121684,7 +121684,7 @@ var require_path = __commonJS({ // node_modules/@actions/artifact/node_modules/brace-expansion/index.js var require_brace_expansion2 = __commonJS({ "node_modules/@actions/artifact/node_modules/brace-expansion/index.js"(exports2, module2) { - var balanced2 = require_balanced_match(); + var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash2 = "\0SLASH" + Math.random() + "\0"; var escOpen2 = "\0OPEN" + Math.random() + "\0"; @@ -121713,7 +121713,7 @@ var require_brace_expansion2 = __commonJS({ var parts = []; var carry = ""; for (; ; ) { - var m = balanced2("{", "}", str); + var m = balanced("{", "}", str); if (!m) { var tail = str.split(","); tail[0] = carry + tail[0]; @@ -121829,7 +121829,7 @@ var require_brace_expansion2 = __commonJS({ var dropEmpties = false; var firstGroup = true; for (; ; ) { - const m = balanced2("{", "}", str); + const m = balanced("{", "}", str); if (!m) { return combine2(acc, str, [""], max, maxLength, dropEmpties); } @@ -121946,15 +121946,15 @@ var require_minimatch2 = __commonJS({ "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; - var qmark3 = "[^/]"; - var star3 = qmark3 + "*?"; - var twoStarDot2 = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot2 = "(?:(?!(?:\\/|^)\\.).)*?"; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var charSet = (s) => s.split("").reduce((set, c) => { set[c] = true; return set; }, {}); - var reSpecials2 = charSet("().*{}+?[]^$\\!"); + var reSpecials = charSet("().*{}+?[]^$\\!"); var addPatternStartSet = charSet("[.("); var slashSplit = /\/+/; minimatch2.filter = (pattern, options = {}) => (p, i, list) => minimatch2(p, pattern, options); @@ -122012,7 +122012,7 @@ var require_minimatch2 = __commonJS({ }; var globUnescape = (s) => s.replace(/\\(.)/g, "$1"); var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1"); - var regExpEscape3 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&"); var Minimatch2 = class { constructor(pattern, options) { @@ -122267,11 +122267,11 @@ var require_minimatch2 = __commonJS({ if (stateChar) { switch (stateChar) { case "*": - re += star3; + re += star; hasMagic = true; break; case "?": - re += qmark3; + re += qmark; hasMagic = true; break; default: @@ -122288,7 +122288,7 @@ var require_minimatch2 = __commonJS({ if (c === "/") { return false; } - if (reSpecials2[c]) { + if (reSpecials[c]) { re += "\\"; } re += c; @@ -122414,7 +122414,7 @@ var require_minimatch2 = __commonJS({ continue; default: clearStateChar(); - if (reSpecials2[c] && !(c === "^" && inClass)) { + if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; @@ -122438,7 +122438,7 @@ var require_minimatch2 = __commonJS({ return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); - const t = pl.type === "*" ? star3 : pl.type === "?" ? qmark3 : "\\" + pl.type; + const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } @@ -122446,7 +122446,7 @@ var require_minimatch2 = __commonJS({ if (escaping) { re += "\\\\"; } - const addPatternStart2 = addPatternStartSet[re.charAt(0)]; + const addPatternStart = addPatternStartSet[re.charAt(0)]; for (let n = negativeLists.length - 1; n > -1; n--) { const nl = negativeLists[n]; const nlBefore = re.slice(0, nl.reStart); @@ -122466,7 +122466,7 @@ var require_minimatch2 = __commonJS({ if (re !== "" && hasMagic) { re = "(?=.)" + re; } - if (addPatternStart2) { + if (addPatternStart) { re = patternStart() + re; } if (isSub === SUBPARSE) { @@ -122496,11 +122496,11 @@ var require_minimatch2 = __commonJS({ return this.regexp; } const options = this.options; - const twoStar = options.noglobstar ? star3 : options.dot ? twoStarDot2 : twoStarNoDot2; + const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; const flags = options.nocase ? "i" : ""; let re = set.map((pattern) => { pattern = pattern.map( - (p) => typeof p === "string" ? regExpEscape3(p) : p === GLOBSTAR2 ? GLOBSTAR2 : p._src + (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR2 ? GLOBSTAR2 : p._src ).reduce((set2, p) => { if (!(set2[set2.length - 1] === GLOBSTAR2 && p === GLOBSTAR2)) { set2.push(p); @@ -123300,12 +123300,12 @@ var require_async = __commonJS({ let endBlockComment = string2.indexOf("*/"); while (index3 < string2.length) { if (string2[index3] === "/" && string2[index3 + 1] === "/") { - let endIndex = string2.indexOf("\n", index3); - index3 = endIndex === -1 ? string2.length : endIndex; + let endIndex2 = string2.indexOf("\n", index3); + index3 = endIndex2 === -1 ? string2.length : endIndex2; } else if (endBlockComment !== -1 && string2[index3] === "/" && string2[index3 + 1] === "*") { - let endIndex = string2.indexOf("*/", index3); - if (endIndex !== -1) { - index3 = endIndex + 2; + let endIndex2 = string2.indexOf("*/", index3); + if (endIndex2 !== -1) { + index3 = endIndex2 + 2; endBlockComment = string2.indexOf("*/", index3); } else { stripped += string2[index3]; @@ -124857,7 +124857,7 @@ var require_polyfills = __commonJS({ return ret; }; } else if (fs35.futimes) { - fs35.lutimes = function(_a6, _b2, _c2, cb) { + fs35.lutimes = function(_a5, _b2, _c2, cb) { if (cb) process.nextTick(cb); }; fs35.lutimesSync = function() { @@ -127484,19 +127484,19 @@ var require_normalize_path = __commonJS({ if (path30 === "\\" || path30 === "/") return "/"; var len = path30.length; if (len <= 1) return path30; - var prefix = ""; + var prefix2 = ""; if (len > 4 && path30[3] === "\\") { var ch = path30[2]; if ((ch === "?" || ch === ".") && path30.slice(0, 2) === "\\\\") { path30 = path30.slice(2); - prefix = "//"; + prefix2 = "//"; } } var segs = path30.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } - return prefix + segs.join("/"); + return prefix2 + segs.join("/"); }; } }); @@ -128081,9 +128081,9 @@ var require_nodeUtil = __commonJS({ var freeProcess = moduleExports && freeGlobal.process; var nodeUtil = (function() { try { - var types2 = freeModule && freeModule.require && freeModule.require("util").types; - if (types2) { - return types2; + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { @@ -128538,13 +128538,13 @@ var require_errors4 = __commonJS({ msg += `"${name}" ${name.includes(".") ? "property" : "argument"} `; } msg += "must be "; - const types2 = []; + const types = []; const instances = []; const other = []; for (const value of expected) { assert(typeof value === "string", "All expected entries have to be of type string"); if (kTypes.includes(value)) { - types2.push(value.toLowerCase()); + types.push(value.toLowerCase()); } else if (classRegExp.test(value)) { instances.push(value); } else { @@ -128553,23 +128553,23 @@ var require_errors4 = __commonJS({ } } if (instances.length > 0) { - const pos = types2.indexOf("object"); + const pos = types.indexOf("object"); if (pos !== -1) { - types2.splice(types2, pos, 1); + types.splice(types, pos, 1); instances.push("Object"); } } - if (types2.length > 0) { - switch (types2.length) { + if (types.length > 0) { + switch (types.length) { case 1: - msg += `of type ${types2[0]}`; + msg += `of type ${types[0]}`; break; case 2: - msg += `one of type ${types2[0]} or ${types2[1]}`; + msg += `one of type ${types[0]} or ${types[1]}`; break; default: { - const last = types2.pop(); - msg += `one of type ${types2.join(", ")}, or ${last}`; + const last = types.pop(); + msg += `one of type ${types.join(", ")}, or ${last}`; } } if (instances.length > 0 || other.length > 0) { @@ -129144,11 +129144,11 @@ var require_event_target_shim = __commonJS({ return defineCustomEventTarget(arguments[0]); } if (arguments.length > 0) { - const types2 = new Array(arguments.length); + const types = new Array(arguments.length); for (let i = 0; i < arguments.length; ++i) { - types2[i] = arguments[i]; + types[i] = arguments[i]; } - return defineCustomEventTarget(types2); + return defineCustomEventTarget(types); } throw new TypeError("Cannot call a class as a function"); } @@ -133068,9 +133068,9 @@ var require_duplexify = __commonJS({ } }; } - function _duplexify(pair) { - const r = pair.readable && typeof pair.readable.read !== "function" ? Readable4.wrap(pair.readable) : pair.readable; - const w = pair.writable; + function _duplexify(pair2) { + const r = pair2.readable && typeof pair2.readable.read !== "function" ? Readable4.wrap(pair2.readable) : pair2.readable; + const w = pair2.writable; let readable = !!isReadable(r); let writable = !!isWritable(w); let ondrain; @@ -133280,8 +133280,8 @@ var require_duplex = __commonJS({ if (webStreamsAdapters === void 0) webStreamsAdapters = {}; return webStreamsAdapters; } - Duplex4.fromWeb = function(pair, options) { - return lazyWebStreams().newStreamDuplexFromReadableWritablePair(pair, options); + Duplex4.fromWeb = function(pair2, options) { + return lazyWebStreams().newStreamDuplexFromReadableWritablePair(pair2, options); }; Duplex4.toWeb = function(duplex) { return lazyWebStreams().newReadableWritablePairFromDuplex(duplex); @@ -135225,8 +135225,8 @@ var require_arrayMap = __commonJS({ // node_modules/lodash/_cacheHas.js var require_cacheHas = __commonJS({ "node_modules/lodash/_cacheHas.js"(exports2, module2) { - function cacheHas(cache, key) { - return cache.has(key); + function cacheHas(cache2, key) { + return cache2.has(key); } module2.exports = cacheHas; } @@ -142452,16 +142452,16 @@ var require_headers2 = __commonJS({ exports2.encode = function encode(opts) { const buf = b4a.alloc(512); let name = opts.name; - let prefix = ""; + let prefix2 = ""; if (opts.typeflag === 5 && name[name.length - 1] !== "/") name += "/"; if (b4a.byteLength(name) !== name.length) return null; while (b4a.byteLength(name) > 100) { const i = name.indexOf("/"); if (i === -1) return null; - prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i); + prefix2 += prefix2 ? "/" + name.slice(0, i) : name.slice(0, i); name = name.slice(i + 1); } - if (b4a.byteLength(name) > 100 || b4a.byteLength(prefix) > 155) return null; + if (b4a.byteLength(name) > 100 || b4a.byteLength(prefix2) > 155) return null; if (opts.linkname && b4a.byteLength(opts.linkname) > 100) return null; b4a.write(buf, name); b4a.write(buf, encodeOct(opts.mode & MASK, 6), 100); @@ -142477,7 +142477,7 @@ var require_headers2 = __commonJS({ if (opts.gname) b4a.write(buf, opts.gname, 297); b4a.write(buf, encodeOct(opts.devmajor || 0, 6), 329); b4a.write(buf, encodeOct(opts.devminor || 0, 6), 337); - if (prefix) b4a.write(buf, prefix, 345); + if (prefix2) b4a.write(buf, prefix2, 345); b4a.write(buf, encodeOct(cksum(buf), 6), 148); return buf; }; @@ -144018,7 +144018,7 @@ var require_context2 = __commonJS({ * Hydrate the context from the environment */ constructor() { - var _a6, _b2, _c2; + var _a5, _b2, _c2; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { @@ -144038,7 +144038,7 @@ var require_context2 = __commonJS({ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a6 = process.env.GITHUB_API_URL) !== null && _a6 !== void 0 ? _a6 : `https://api.github.com`; + this.apiUrl = (_a5 = process.env.GITHUB_API_URL) !== null && _a5 !== void 0 ? _a5 : `https://api.github.com`; this.serverUrl = (_b2 = process.env.GITHUB_SERVER_URL) !== null && _b2 !== void 0 ? _b2 : `https://github.com`; this.graphqlUrl = (_c2 = process.env.GITHUB_GRAPHQL_URL) !== null && _c2 !== void 0 ? _c2 : `https://api.github.com/graphql`; } @@ -144085,7 +144085,7 @@ var require_proxy2 = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a6) { + } catch (_a5) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -145254,7 +145254,7 @@ var require_dist_node2 = __commonJS({ var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_2, expression, literal) { + function(_2, expression, literal2) { if (expression) { let operator = ""; const values = []; @@ -145278,7 +145278,7 @@ var require_dist_node2 = __commonJS({ return values.join(","); } } else { - return encodeReserved2(literal); + return encodeReserved2(literal2); } } ); @@ -145597,9 +145597,9 @@ var require_dist_node5 = __commonJS({ return response.arrayBuffer(); } function fetchWrapper2(requestOptions) { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a6 = requestOptions.request) == null ? void 0 : _a6.parseSuccessResponseBody) !== false; + const parseSuccessResponseBody = ((_a5 = requestOptions.request) == null ? void 0 : _a5.parseSuccessResponseBody) !== false; if (isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); } @@ -148203,9 +148203,9 @@ var require_dist_node9 = __commonJS({ set(target, methodName, value) { return target.cache[methodName] = value; }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; + get({ octokit, scope, cache: cache2 }, methodName) { + if (cache2[methodName]) { + return cache2[methodName]; } const method = endpointMethodsMap2.get(scope).get(methodName); if (!method) { @@ -148213,7 +148213,7 @@ var require_dist_node9 = __commonJS({ } const { endpointDefaults, decorations } = method; if (decorations) { - cache[methodName] = decorate2( + cache2[methodName] = decorate2( octokit, scope, methodName, @@ -148221,9 +148221,9 @@ var require_dist_node9 = __commonJS({ decorations ); } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); + cache2[methodName] = octokit.request.defaults(endpointDefaults); } - return cache[methodName]; + return cache2[methodName]; } }; function endpointsToMethods2(octokit) { @@ -150937,7 +150937,7 @@ var require_retry_options = __commonJS({ var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { - var _a6; + var _a5; if (retries <= 0) { return [{ enabled: false }, defaultOptions.request]; } @@ -150948,7 +150948,7 @@ var require_retry_options = __commonJS({ retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries }); - core29.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a6 = retryOptions.doNotRetry) !== null && _a6 !== void 0 ? _a6 : "octokit default: [400, 401, 403, 404, 422]"})`); + core29.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a5 = retryOptions.doNotRetry) !== null && _a5 !== void 0 ? _a5 : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } exports2.getRetryOptions = getRetryOptions; @@ -151116,7 +151116,7 @@ var require_get_artifact = __commonJS({ var errors_1 = require_errors3(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { log: void 0, @@ -151133,7 +151133,7 @@ var require_get_artifact = __commonJS({ name: artifactName }); if (getArtifactResp.status !== 200) { - throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a6 = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a6 === void 0 ? void 0 : _a6["x-github-request-id"]})`); + throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a5 = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a5 === void 0 ? void 0 : _a5["x-github-request-id"]})`); } if (getArtifactResp.data.artifacts.length === 0) { throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName} @@ -151159,7 +151159,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactPublic = getArtifactPublic; function getArtifactInternal(artifactName) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const req = { @@ -151184,7 +151184,7 @@ var require_get_artifact = __commonJS({ id: Number(artifact2.databaseId), size: Number(artifact2.size), createdAt: artifact2.createdAt ? generated_1.Timestamp.toDate(artifact2.createdAt) : void 0, - digest: (_a6 = artifact2.digest) === null || _a6 === void 0 ? void 0 : _a6.value + digest: (_a5 = artifact2.digest) === null || _a5 === void 0 ? void 0 : _a5.value } }; }); @@ -151240,7 +151240,7 @@ var require_delete_artifact = __commonJS({ var errors_1 = require_errors3(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { return __awaiter2(this, void 0, void 0, function* () { - var _a6; + var _a5; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { log: void 0, @@ -151257,7 +151257,7 @@ var require_delete_artifact = __commonJS({ artifact_id: getArtifactResp.artifact.id }); if (deleteArtifactResp.status !== 204) { - throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${deleteArtifactResp.status} (${(_a6 = deleteArtifactResp === null || deleteArtifactResp === void 0 ? void 0 : deleteArtifactResp.headers) === null || _a6 === void 0 ? void 0 : _a6["x-github-request-id"]})`); + throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${deleteArtifactResp.status} (${(_a5 = deleteArtifactResp === null || deleteArtifactResp === void 0 ? void 0 : deleteArtifactResp.headers) === null || _a5 === void 0 ? void 0 : _a5["x-github-request-id"]})`); } return { id: getArtifactResp.artifact.id @@ -151422,13 +151422,13 @@ var require_list_artifacts = __commonJS({ }; const res = yield artifactClient.ListArtifacts(req); let artifacts = res.artifacts.map((artifact2) => { - var _a6; + var _a5; return { name: artifact2.name, id: Number(artifact2.databaseId), size: Number(artifact2.size), createdAt: artifact2.createdAt ? generated_1.Timestamp.toDate(artifact2.createdAt) : void 0, - digest: (_a6 = artifact2.digest) === null || _a6 === void 0 ? void 0 : _a6.value + digest: (_a5 = artifact2.digest) === null || _a5 === void 0 ? void 0 : _a5.value }; }); if (latest) { @@ -151857,7 +151857,7 @@ var require_proxy3 = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a6) { + } catch (_a5) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -152700,7 +152700,7 @@ var require_oidc_utils2 = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a6; + var _a5; return __awaiter2(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { @@ -152710,7 +152710,7 @@ var require_oidc_utils2 = __commonJS({ Error Message: ${error3.message}`); }); - const id_token = (_a6 = res.result) === null || _a6 === void 0 ? void 0 : _a6.value; + const id_token = (_a5 = res.result) === null || _a5 === void 0 ? void 0 : _a5.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } @@ -152798,7 +152798,7 @@ var require_summary2 = __commonJS({ } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a6) { + } catch (_a5) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; @@ -153136,12 +153136,12 @@ var require_io_util2 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a6; + var _a5; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; var fs34 = __importStar2(require("fs")); var path30 = __importStar2(require("path")); - _a6 = fs34.promises, exports2.chmod = _a6.chmod, exports2.copyFile = _a6.copyFile, exports2.lstat = _a6.lstat, exports2.mkdir = _a6.mkdir, exports2.open = _a6.open, exports2.readdir = _a6.readdir, exports2.readlink = _a6.readlink, exports2.rename = _a6.rename, exports2.rm = _a6.rm, exports2.rmdir = _a6.rmdir, exports2.stat = _a6.stat, exports2.symlink = _a6.symlink, exports2.unlink = _a6.unlink; + _a5 = fs34.promises, exports2.chmod = _a5.chmod, exports2.copyFile = _a5.copyFile, exports2.lstat = _a5.lstat, exports2.mkdir = _a5.mkdir, exports2.open = _a5.open, exports2.readdir = _a5.readdir, exports2.readlink = _a5.readlink, exports2.rename = _a5.rename, exports2.rm = _a5.rm, exports2.rmdir = _a5.rmdir, exports2.stat = _a5.stat, exports2.symlink = _a5.symlink, exports2.unlink = _a5.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs34.constants.O_RDONLY; @@ -153248,8 +153248,8 @@ var require_io_util2 = __commonJS({ return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a7; - return (_a7 = process.env["COMSPEC"]) !== null && _a7 !== void 0 ? _a7 : `cmd.exe`; + var _a6; + return (_a6 = process.env["COMSPEC"]) !== null && _a6 !== void 0 ? _a6 : `cmd.exe`; } exports2.getCmdPath = getCmdPath; } @@ -154059,13 +154059,13 @@ var require_exec2 = __commonJS({ } exports2.exec = exec3; function getExecOutput(commandLine, args, options) { - var _a6, _b2; + var _a5, _b2; return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a6 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a6 === void 0 ? void 0 : _a6.stdout; + const originalStdoutListener = (_a5 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a5 === void 0 ? void 0 : _a5.stdout; const originalStdErrListener = (_b2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _b2 === void 0 ? void 0 : _b2.stderr; const stdErrListener = (data) => { stderr += stderrDecoder.write(data); @@ -154172,11 +154172,11 @@ var require_platform2 = __commonJS({ }; }); var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - var _a6, _b2, _c2, _d2; + var _a5, _b2, _c2, _d2; const { stdout } = yield exec3.getExecOutput("sw_vers", void 0, { silent: true }); - const version = (_b2 = (_a6 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a6 === void 0 ? void 0 : _a6[1]) !== null && _b2 !== void 0 ? _b2 : ""; + const version = (_b2 = (_a5 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a5 === void 0 ? void 0 : _a5[1]) !== null && _b2 !== void 0 ? _b2 : ""; const name = (_d2 = (_c2 = stdout.match(/ProductName:\s*(.+)/)) === null || _c2 === void 0 ? void 0 : _c2[1]) !== null && _d2 !== void 0 ? _d2 : ""; return { name, @@ -155836,13 +155836,13 @@ var require_upload_gzip = __commonJS({ function createGZipFileInBuffer(originalFilePath) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve15) => __awaiter2(this, void 0, void 0, function* () { - var _a6, e_1, _b2, _c2; + var _a5, e_1, _b2, _c2; const inputStream = fs34.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); inputStream.pipe(gzip); const chunks = []; try { - for (var _d2 = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a6 = gzip_1_1.done, !_a6; ) { + for (var _d2 = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a5 = gzip_1_1.done, !_a5; ) { _c2 = gzip_1_1.value; _d2 = false; try { @@ -155856,7 +155856,7 @@ var require_upload_gzip = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a6 && (_b2 = gzip_1.return)) yield _b2.call(gzip_1); + if (!_d2 && !_a5 && (_b2 = gzip_1.return)) yield _b2.call(gzip_1); } finally { if (e_1) throw e_1.error; } @@ -159088,8 +159088,8 @@ var require_cipherModes = __commonJS({ output.truncate(this.blockSize - options.overflow); } this.tag = forge.util.createBuffer(); - var lengths = this._aDataLength.concat(from64To32(this._cipherLength * 8)); - this._s = this.ghash(this._hashSubkey, this._s, lengths); + var lengths2 = this._aDataLength.concat(from64To32(this._cipherLength * 8)); + this._s = this.ghash(this._hashSubkey, this._s, lengths2); var tag = []; this.cipher.encrypt(this._j0, tag); for (var i = 0; i < this._ints; ++i) { @@ -164837,10 +164837,10 @@ var require_rsa = __commonJS({ modulusLength: bits, publicExponent: _intToUint8Array(e), hash: { name: "SHA-256" } - }, true, ["sign", "verify"]).then(function(pair) { + }, true, ["sign", "verify"]).then(function(pair2) { return util4.globalScope.crypto.subtle.exportKey( "pkcs8", - pair.privateKey + pair2.privateKey ); }).then(void 0, function(err) { callback(err); @@ -164864,10 +164864,10 @@ var require_rsa = __commonJS({ hash: { name: "SHA-256" } }, true, ["sign", "verify"]); genOp.oncomplete = function(e2) { - var pair = e2.target.result; + var pair2 = e2.target.result; var exportOp = util4.globalScope.msCrypto.subtle.exportKey( "pkcs8", - pair.privateKey + pair2.privateKey ); exportOp.oncomplete = function(e3) { var pkcs8 = e3.target.result; @@ -171944,20 +171944,20 @@ var require_tls = __commonJS({ } return !c.fail; }; - tls.createSessionCache = function(cache, capacity) { + tls.createSessionCache = function(cache2, capacity) { var rval = null; - if (cache && cache.getSession && cache.setSession && cache.order) { - rval = cache; + if (cache2 && cache2.getSession && cache2.setSession && cache2.order) { + rval = cache2; } else { rval = {}; - rval.cache = cache || {}; + rval.cache = cache2 || {}; rval.capacity = Math.max(capacity || 100, 1); rval.order = []; - for (var key2 in cache) { + for (var key2 in cache2) { if (rval.order.length <= capacity) { rval.order.push(key2); } else { - delete cache[key2]; + delete cache2[key2]; } } rval.getSession = function(sessionId) { @@ -176383,7 +176383,7 @@ var Schema = class Schema2 { const compiledTags = compileTags(tags); const implicitScalarTags = []; const exact = createTagDefinitionMap(); - const prefix = createTagDefinitionListMap(); + const prefix2 = createTagDefinitionListMap(); for (const tag of compiledTags) { if (tag.nodeKind === "scalar" && tag.implicit) { if (tag.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix"); @@ -176391,15 +176391,15 @@ var Schema = class Schema2 { } switch (tag.nodeKind) { case "scalar": - if (tag.matchByTagPrefix) prefix.scalar.push(tag); + if (tag.matchByTagPrefix) prefix2.scalar.push(tag); else exact.scalar[tag.tagName] = tag; break; case "sequence": - if (tag.matchByTagPrefix) prefix.sequence.push(tag); + if (tag.matchByTagPrefix) prefix2.sequence.push(tag); else exact.sequence[tag.tagName] = tag; break; case "mapping": - if (tag.matchByTagPrefix) prefix.mapping.push(tag); + if (tag.matchByTagPrefix) prefix2.mapping.push(tag); else exact.mapping[tag.tagName] = tag; } } @@ -176418,7 +176418,7 @@ var Schema = class Schema2 { this.defaultSequenceTag = exact.sequence["tag:yaml.org,2002:seq"]; this.defaultMappingTag = exact.mapping["tag:yaml.org,2002:map"]; this.exact = exact; - this.prefix = prefix; + this.prefix = prefix2; } /** @internal */ lookupScalarTag(tagName) { @@ -176874,8 +176874,8 @@ function getDoubleQuotedValue(input, start, end) { let hexResult = 0; for (; hexLength > 0; hexLength--) { position++; - const digit = fromHexCode$1(input.charCodeAt(position)); - hexResult = (hexResult << 4) + digit; + const digit2 = fromHexCode$1(input.charCodeAt(position)); + hexResult = (hexResult << 4) + digit2; } result += charFromCodepoint(hexResult); position++; @@ -177625,15 +177625,15 @@ function readBlockScalar(state, parentIndent, props) { state.position++; while (state.input.charCodeAt(state.position) !== 0) { const current = state.input.charCodeAt(state.position); - const digit = fromDecimalCode(current); + const digit2 = fromDecimalCode(current); if (current === 43 || current === 45) { if (chomping !== CHOMPING_MODE.CLIP) throwError(state, "repeat of a chomping mode identifier"); chomping = current === 43 ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP; state.position++; - } else if (digit >= 0) { - if (digit === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (digit2 >= 0) { + if (digit2 === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); if (detectedIndent) throwError(state, "repeat of an indentation width identifier"); - indent = parentIndent + digit - 1; + indent = parentIndent + digit2 - 1; detectedIndent = true; state.position++; } else break; @@ -178022,15 +178022,15 @@ function readDirective(state) { }); } else if (name === "TAG") { if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); - const [handle, prefix] = args; + const [handle, prefix2] = args; if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for "${handle}" tag handle`); - if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); - state.tagHandlers[handle] = prefix; + if (!PATTERN_TAG_PREFIX.test(prefix2)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + state.tagHandlers[handle] = prefix2; state.directives.push({ kind: "tag", handle, - prefix + prefix: prefix2 }); } return true; @@ -178553,10 +178553,10 @@ function foldBlockScalar(string2, width) { let moreIndented; let match2; while (match2 = lineRe.exec(string2)) { - const prefix = match2[1]; + const prefix2 = match2[1]; const line = match2[2]; moreIndented = line !== "" && isMoreIndented(line[0]); - result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); prevMoreIndented = moreIndented; } return result; @@ -178803,8 +178803,8 @@ function writeDocumentDirectives(doc) { `; continue; } - const { handle, prefix } = directive; - result += `%TAG ${handle} ${prefix} + const { handle, prefix: prefix2 } = directive; + result += `%TAG ${handle} ${prefix2} `; } return result; @@ -179737,7 +179737,7 @@ function getDiffRangesJsonFilePath(env = getEnv()) { return path2.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME); } function getActionVersion() { - return "3.39.4"; + return "3.39.5"; } function getWorkflowEventName(env = getEnv()) { return env.getRequired("GITHUB_EVENT_NAME" /* GITHUB_EVENT_NAME */); @@ -181064,8 +181064,8 @@ function getRegistryTypesFromEnv(logger2, env = getEnv()) { ); return void 0; } - const types2 = new Set(data.map((r) => r.type)); - return Array.from(types2).sort().join(","); + const types = new Set(data.map((r) => r.type)); + return Array.from(types).sort().join(","); } catch (err) { logger2.debug( `Failed to parse '${"CODEQL_PROXY_URLS" /* PROXY_URLS */}': ${getErrorMessage(err)}.` @@ -181344,8 +181344,8 @@ var path6 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json -var bundleVersion = "codeql-bundle-v2.27.5"; -var cliVersion = "2.27.5"; +var bundleVersion = "codeql-bundle-v2.27.6"; +var cliVersion = "2.27.6"; // src/overlay/index.ts var fs5 = __toESM(require("fs")); @@ -183603,14 +183603,14 @@ async function addOverlayDisablementDiagnostics(config, codeql, overlayDisabledR config, makeDiagnostic( "codeql-action/overlay-disabled-due-to-cached-status", - "Skipped improved incremental analysis because it failed previously with similar hardware resources", + "Skipped overlay analysis because it failed previously with similar hardware resources", { attributes: { languages: config.languages }, - markdownMessage: `Improved incremental analysis was skipped because it previously failed for this repository with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. One possible reason for this is that improved incremental analysis can require a significant amount of disk space for some repositories. If you want to try re-enabling improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance. + markdownMessage: `Overlay analysis was skipped because it previously failed for this repository with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. One possible reason for this is that overlay analysis can require a significant amount of disk space for some repositories. If you want to try re-enabling overlay analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance. -Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`, +Overlay analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`, severity: "note", visibility: { cliSummaryTable: true, @@ -183626,12 +183626,12 @@ Improved incremental analysis will be automatically retried when the next versio config, makeDiagnostic( "codeql-action/overlay-disabled-by-repository-property", - "Improved incremental analysis disabled by repository property", + "Overlay analysis disabled by repository property", { attributes: { languages: config.languages }, - markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`, + markdownMessage: `Overlay analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable overlay analysis, set this property to \`false\` or remove it.`, severity: "note", visibility: { cliSummaryTable: true, @@ -185150,9 +185150,9 @@ async function getCodeQlVersionsForOverlayBaseDatabases(rawLanguages, logger2) { ); const versionRegex = /^([\d.]+)-/; const versionSet = /* @__PURE__ */ new Set(); - for (const cache of caches) { - if (!cache.key) continue; - const suffix = cache.key.substring(cacheKeyPrefix.length); + for (const cache2 of caches) { + if (!cache2.key) continue; + const suffix = cache2.key.substring(cacheKeyPrefix.length); const match2 = suffix.match(versionRegex); if (match2 && semver5.valid(match2[1])) { versionSet.add(match2[1]); @@ -186867,8 +186867,8 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) { ]); } catch (e) { if (config.buildMode === "autobuild" /* Autobuild */) { - const prefix = `We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. See ${"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed" /* AUTOMATIC_BUILD_FAILED */} for more information.`; - throw new ConfigurationError(`${prefix} ${getErrorMessage(e)}`); + const prefix2 = `We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. See ${"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed" /* AUTOMATIC_BUILD_FAILED */} for more information.`; + throw new ConfigurationError(`${prefix2} ${getErrorMessage(e)}`); } else { throw e; } @@ -187605,18 +187605,18 @@ async function getFeaturePrefix(codeql, features, language) { async function cachePrefix2(codeql, features, language) { const runnerOs = getRequiredEnvParam("RUNNER_OS"); const customPrefix = process.env["CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX" /* DEPENDENCY_CACHING_PREFIX */]; - let prefix = CODEQL_DEPENDENCY_CACHE_PREFIX; + let prefix2 = CODEQL_DEPENDENCY_CACHE_PREFIX; if (customPrefix !== void 0 && customPrefix.length > 0) { - prefix = `${prefix}-${customPrefix}`; + prefix2 = `${prefix2}-${customPrefix}`; } const featurePrefix = await getFeaturePrefix(codeql, features, language); - return `${prefix}-${featurePrefix}${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`; + return `${prefix2}-${featurePrefix}${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`; } async function getDependencyCacheUsage(logger2) { try { const caches = await listActionsCaches(CODEQL_DEPENDENCY_CACHE_PREFIX); const totalSize = caches.reduce( - (acc, cache) => acc + (cache.size_in_bytes ?? 0), + (acc, cache2) => acc + (cache2.size_in_bytes ?? 0), 0 ); return { count: caches.length, size_bytes: totalSize }; @@ -188583,24 +188583,24 @@ Long.isLong = isLong; var INT_CACHE = {}; var UINT_CACHE = {}; function fromInt(value, unsigned) { - var obj, cachedObj, cache; + var obj, cachedObj, cache2; if (unsigned) { value >>>= 0; - if (cache = 0 <= value && value < 256) { + if (cache2 = 0 <= value && value < 256) { cachedObj = UINT_CACHE[value]; if (cachedObj) return cachedObj; } obj = fromBits(value, 0, true); - if (cache) UINT_CACHE[value] = obj; + if (cache2) UINT_CACHE[value] = obj; return obj; } else { value |= 0; - if (cache = -128 <= value && value < 128) { + if (cache2 = -128 <= value && value < 128) { cachedObj = INT_CACHE[value]; if (cachedObj) return cachedObj; } obj = fromBits(value, value < 0 ? -1 : 0, false); - if (cache) INT_CACHE[value] = obj; + if (cache2) INT_CACHE[value] = obj; return obj; } } @@ -190711,22 +190711,6 @@ var fs26 = __toESM(require("fs"), 1); var import_events = require("events"); // node_modules/readdir-glob/node_modules/balanced-match/dist/esm/index.js -var balanced = (a, b, str) => { - const ma = a instanceof RegExp ? maybeMatch(a, str) : a; - const mb = b instanceof RegExp ? maybeMatch(b, str) : b; - const r = ma !== null && mb != null && range(ma, mb, str); - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + ma.length, r[1]), - post: str.slice(r[1] + mb.length) - }; -}; -var maybeMatch = (reg, str) => { - const m = str.match(reg); - return m ? m[0] : null; -}; var range = (a, b, str) => { let begs, beg, left, right = void 0, result; let ai = str.indexOf(a); @@ -190764,11 +190748,11 @@ var range = (a, b, str) => { }; // node_modules/readdir-glob/node_modules/brace-expansion/dist/esm/index.js -var escSlash = "\0SLASH" + Math.random() + "\0"; -var escOpen = "\0OPEN" + Math.random() + "\0"; -var escClose = "\0CLOSE" + Math.random() + "\0"; -var escComma = "\0COMMA" + Math.random() + "\0"; -var escPeriod = "\0PERIOD" + Math.random() + "\0"; +var escSlash = "\0SLASH" + Math.random().toFixed(16) + "\0"; +var escOpen = "\0OPEN" + Math.random().toFixed(16) + "\0"; +var escClose = "\0CLOSE" + Math.random().toFixed(16) + "\0"; +var escComma = "\0COMMA" + Math.random().toFixed(16) + "\0"; +var escPeriod = "\0PERIOD" + Math.random().toFixed(16) + "\0"; var escSlashPattern = new RegExp(escSlash, "g"); var escOpenPattern = new RegExp(escOpen, "g"); var escClosePattern = new RegExp(escClose, "g"); @@ -190783,6 +190767,8 @@ var EXPANSION_MAX = 1e5; var EXPANSION_MAX_LENGTH = 4e6; var EXPANSION_MAX_DEPTH = 1e3; var EXPANSION_MAX_REWRITES = 1e3; +var EXPANSION_MAX_STEPS = 2e7; +var CALL_STEPS = 16; function numeric(str) { return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); } @@ -190797,11 +190783,70 @@ function pushAll(target, items) { target.push(items[i]); } } -function parseCommaParts(str) { +function balancedWithBudget(str, masked, budget) { + if (budget.remaining < 0) { + return void 0; + } + const r = range("{", "}", masked); + const unmatched = r !== void 0 && masked.indexOf("{") < r[0]; + budget.remaining -= r && !unmatched ? r[1] + 1 : str.length; + if (!r || budget.remaining < 0) { + return void 0; + } + return { + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + 1, r[1]), + post: str.slice(r[1] + 1), + unmatched + }; +} +function maskUnmatchedOpens(masked, budget) { + budget.remaining -= masked.length; + const open = []; + for (let i = 0; i < masked.length; i++) { + const c = masked.charCodeAt(i); + if (c === 123) { + open.push(i); + } else if (c === 125 && open.length) { + open.pop(); + } + } + let out = ""; + let last = 0; + for (let i = 0; i < open.length; i++) { + const at = open[i]; + out += masked.slice(last, at) + "\0"; + last = at + 1; + } + return out + masked.slice(last); +} +function commaSetFollows(str, budget) { + budget.remaining -= str.length; + if (budget.remaining < 0) { + return false; + } + let close = false; + for (let i = str.length - 1; i >= 0; i--) { + const c = str.charCodeAt(i); + if (c === 125) { + close = true; + } else if (c === 10 || c === 13 || c === 8232 || c === 8233) { + close = false; + } else if (c === 44 && close && str.charCodeAt(i + 1) !== 44) { + return true; + } + } + return false; +} +function parseCommaParts(str, budget) { const parts = []; let carry = ""; for (; ; ) { - const m = balanced("{", "}", str); + const m = balancedWithBudget(str, str, budget); + if (budget.remaining < 0) { + return void 0; + } if (!m) { const tail = str.split(","); tail[0] = carry + tail[0]; @@ -190821,15 +190866,22 @@ function parseCommaParts(str) { str = post; } } +function bound(value, fallback) { + return value === void 0 || isNaN(value) ? fallback : value; +} function expand2(str, options = {}) { if (!str) { return []; } - const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, maxRewrites = EXPANSION_MAX_REWRITES } = options; + const max = bound(options.max, EXPANSION_MAX); + const maxLength = bound(options.maxLength, EXPANSION_MAX_LENGTH); + const maxDepth = bound(options.maxDepth, EXPANSION_MAX_DEPTH); + const maxRewrites = bound(options.maxRewrites, EXPANSION_MAX_REWRITES); + const maxSteps = bound(options.maxSteps, EXPANSION_MAX_STEPS); if (str.slice(0, 2) === "{}") { str = "\\{\\}" + str.slice(2); } - return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces); + return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, { remaining: maxSteps }, true).map(unescapeBraces); } function embrace(str) { return "{" + str + "}"; @@ -190843,25 +190895,32 @@ function lte(i, y) { function gte6(i, y) { return i >= y; } -function combine(acc, pre, values, max, maxLength, dropEmpties) { +function combine(acc, pre, values, max, maxLength, dropEmpties, budget) { const out = []; let length = 0; - for (let a = 0; a < acc.length; a++) { - for (let v = 0; v < values.length; v++) { + let nonEmpty; + outer: for (let a = 0; a < acc.length; a++) { + const prefix2 = acc[a] + pre; + let vs = values; + if (dropEmpties && !prefix2) { + if (!nonEmpty) + nonEmpty = values.filter((v) => v); + vs = nonEmpty; + } + for (let v = 0; v < vs.length; v++) { if (out.length >= max) - return out; - const expansion = acc[a] + pre + values[v]; - if (dropEmpties && !expansion) - continue; + break outer; + const expansion = prefix2 + vs[v]; if (length + expansion.length > maxLength) - return out; + break outer; out.push(expansion); length += expansion.length; } } + budget.remaining -= out.length; return out; } -function expandSequence(body, isAlphaSequence, max, maxLength) { +function expandSequence(body, isAlphaSequence, max, maxLength, budget) { const n = body.split(/\.\./); const N = []; if (n[0] === void 0 || n[1] === void 0) { @@ -190878,8 +190937,13 @@ function expandSequence(body, isAlphaSequence, max, maxLength) { test = gte6; } const pad = n.some(isPadded); + const cost = pad ? width : 1; let length = 0; for (let i = x; test(i, y) && N.length < max; i += incr) { + budget.remaining -= cost; + if (budget.remaining < 0) { + return void 0; + } let c; if (isAlphaSequence) { c = String.fromCharCode(i); @@ -190907,7 +190971,8 @@ function expandSequence(body, isAlphaSequence, max, maxLength) { } return N; } -function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { +function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, budget, isTop) { + budget.remaining -= CALL_STEPS; if (depth > maxDepth) { return [str]; } @@ -190915,18 +190980,24 @@ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { let rewrites = 0; let dropEmpties = false; let firstGroup = true; + let masked = str; for (; ; ) { - const m = balanced("{", "}", str); + const m = balancedWithBudget(str, masked, budget); if (!m) { - return combine(acc, str, [""], max, maxLength, dropEmpties); + return combine(acc, str, [""], max, maxLength, dropEmpties, budget); + } + if (m.unmatched) { + masked = maskUnmatchedOpens(masked, budget); } const pre = m.pre; + const literal2 = () => combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties, budget); if (/\$$/.test(pre)) { - acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length); + acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length, budget); firstGroup = false; if (!m.post.length) break; str = m.post; + masked = masked.slice(m.end + 1); continue; } const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); @@ -190934,13 +191005,14 @@ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { const isSequence = isNumericSequence || isAlphaSequence; const isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) { + if (rewrites < maxRewrites && commaSetFollows(m.post, budget)) { rewrites++; str = m.pre + "{" + m.body + escClose + m.post; + masked = masked.slice(0, m.end) + escClose + masked.slice(m.end + 1); isTop = true; continue; } - return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties); + return literal2(); } if (firstGroup) { dropEmpties = isTop && !isSequence; @@ -190948,16 +191020,30 @@ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { } let values; if (isSequence) { - values = expandSequence(m.body, isAlphaSequence, max, maxLength); + values = expandSequence(m.body, isAlphaSequence, max, maxLength, budget); + if (!values) { + return literal2(); + } } else { - let n = parseCommaParts(m.body); + let n = parseCommaParts(m.body, budget); + if (!n) { + return literal2(); + } if (n.length === 1 && n[0] !== void 0) { - n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace); + n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, budget, false).map(embrace); + if (budget.remaining < 0) { + return literal2(); + } if (n.length === 1) { - acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length); + const next2 = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length, budget); + if (budget.remaining < 0) { + return literal2(); + } + acc = next2; if (!m.post.length) break; str = m.post; + masked = masked.slice(m.end + 1); continue; } } @@ -190970,7 +191056,10 @@ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { values = []; let valuesLength = 0; outer: for (let j = 0; j < n.length; j++) { - const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false); + const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, budget, false); + if (budget.remaining < 0) { + return literal2(); + } for (let k = 0; k < expanded.length; k++) { const v = expanded[k]; if (dropsEmpties && !v) @@ -190983,46 +191072,98 @@ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) { } } } - acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + const next = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length, budget); + if (budget.remaining < 0) { + return literal2(); + } + acc = next; if (!m.post.length) break; str = m.post; + masked = masked.slice(m.end + 1); } return acc; } -// node_modules/readdir-glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js -var MAX_PATTERN_LENGTH = 1024 * 64; -var assertValidPattern = (pattern) => { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); +// node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js +var digit = (a, b) => a === b ? { t: "lit", ch: String(a) } : { t: "class", re: new RegExp(`^[${a}-${b}]$`) }; +var prefix = (d, alts) => alts.map((s) => [digit(d, d), ...s]); +var fixed = (a, b) => { + if (!a) + return [[]]; + let lo = +a[0]; + let hi = +b[0]; + const ra = a.slice(1); + const rb = b.slice(1); + if (lo === hi) + return prefix(lo, fixed(ra, rb)); + const zeros = "0".repeat(ra.length); + const nines = "9".repeat(ra.length); + const out = []; + if (ra !== zeros) + out.push(...prefix(lo++, fixed(ra, nines))); + const last = rb === nines ? [] : prefix(hi--, fixed(zeros, rb)); + if (lo <= hi) { + out.push([digit(lo, hi), ...Array.from(ra, () => digit(0, 9))]); } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); + out.push(...last); + return out; +}; +var nonneg = (a, b, width) => { + if (width) { + return fixed(String(a).padStart(width, "0"), String(b).padStart(width, "0")); } + const out = []; + for (let len = String(a).length; len <= String(b).length; len++) { + const lo = Math.max(a, len === 1 ? 0 : 10 ** (len - 1)); + const hi = Math.min(b, 10 ** len - 1); + out.push(...fixed(String(lo), String(hi))); + } + return out; +}; +var numericRange = (loStr, hiStr) => { + let lo = Number(loStr); + let hi = Number(hiStr); + if (!Number.isSafeInteger(lo) || !Number.isSafeInteger(hi)) + return; + if (lo > hi) + [lo, hi] = [hi, lo]; + const padded = /^-?0\d/.test(loStr) || /^-?0\d/.test(hiStr); + const width = padded ? Math.max(loStr.length, hiStr.length) : 0; + const out = []; + if (lo < 0) { + const neg = nonneg(Math.max(-hi, 1), -lo, width && width - 1); + out.push(...neg.map((s) => [{ t: "lit", ch: "-" }, ...s])); + } + if (hi >= 0) + out.push(...nonneg(Math.max(lo, 0), hi, width)); + return out; }; -// node_modules/readdir-glob/node_modules/minimatch/dist/esm/brace-expressions.js +// node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js var posixClasses = { - "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], - "[:alpha:]": ["\\p{L}\\p{Nl}", true], - "[:ascii:]": ["\\x00-\\x7f", false], - "[:blank:]": ["\\p{Zs}\\t", true], - "[:cntrl:]": ["\\p{Cc}", true], - "[:digit:]": ["\\p{Nd}", true], - "[:graph:]": ["\\p{Z}\\p{C}", true, true], - "[:lower:]": ["\\p{Ll}", true], + "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}"], + "[:alpha:]": ["\\p{L}\\p{Nl}"], + "[:ascii:]": ["\\x00-\\x7f"], + "[:blank:]": ["\\p{Zs}\\t"], + "[:cntrl:]": ["\\p{Cc}"], + "[:digit:]": ["\\p{Nd}"], + "[:graph:]": ["\\p{Z}\\p{C}", true], + "[:lower:]": ["\\p{Ll}"], "[:print:]": ["\\p{C}", true], - "[:punct:]": ["\\p{P}", true], - "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], - "[:upper:]": ["\\p{Lu}", true], - "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], - "[:xdigit:]": ["A-Fa-f0-9", false] + "[:punct:]": ["\\p{P}\\p{S}"], + "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f"], + "[:upper:]": ["\\p{Lu}"], + "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"], + "[:xdigit:]": ["A-Fa-f0-9"] }; var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"); -var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); -var rangesToString = (ranges) => ranges.join(""); -var parseClass = (glob2, position) => { +var noMatch = /$./; +var parseClass = (glob2, position, nocase = false, form) => { + const norm = (c) => { + const n = form ? c.normalize(form) : c; + return [...n].length === 1 ? n : c; + }; const pos = position; if (glob2.charAt(pos) !== "[") { throw new Error("not in a brace expression"); @@ -191031,13 +191172,12 @@ var parseClass = (glob2, position) => { const negs = []; let i = pos + 1; let sawStart = false; - let uflag = false; let escaping = false; let negate2 = false; let endPos = pos; let rangeStart = ""; WHILE: while (i < glob2.length) { - const c = glob2.charAt(i); + const c = String.fromCodePoint(glob2.codePointAt(i)); if ((c === "!" || c === "^") && i === pos + 1) { negate2 = true; i++; @@ -191056,780 +191196,895 @@ var parseClass = (glob2, position) => { } } if (c === "[" && !escaping) { - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + for (const [cls, [unip, neg]] of Object.entries(posixClasses)) { if (glob2.startsWith(cls, i)) { if (rangeStart) { - return ["$.", false, glob2.length - pos, true]; + return [noMatch, glob2.length - pos]; } i += cls.length; if (neg) negs.push(unip); else ranges.push(unip); - uflag = uflag || u; continue WHILE; } } } escaping = false; + const n = norm(c); if (rangeStart) { - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)); - } else if (c === rangeStart) { - ranges.push(braceEscape(c)); + if (n.codePointAt(0) > rangeStart.codePointAt(0)) { + ranges.push(braceEscape(rangeStart) + "-" + braceEscape(n)); + } else if (n === rangeStart) { + ranges.push(braceEscape(n)); } rangeStart = ""; - i++; + i += c.length; continue; } - if (glob2.startsWith("-]", i + 1)) { - ranges.push(braceEscape(c + "-")); - i += 2; + if (glob2.startsWith("-]", i + c.length)) { + ranges.push(braceEscape(n + "-")); + i += c.length + 1; continue; } - if (glob2.startsWith("-", i + 1)) { - rangeStart = c; - i += 2; + if (glob2.startsWith("-", i + c.length)) { + rangeStart = n; + i += c.length + 1; continue; } - ranges.push(braceEscape(c)); - i++; + ranges.push(braceEscape(n)); + i += c.length; } if (endPos < i) { - return ["", false, 0, false]; + return [noMatch, 0]; } if (!ranges.length && !negs.length) { - return ["$.", false, glob2.length - pos, true]; + return [noMatch, glob2.length - pos]; } - if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate2) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = "[" + (negate2 ? "^" : "") + rangesToString(ranges) + "]"; - const snegs = "[" + (negate2 ? "" : "^") + rangesToString(negs) + "]"; - const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs; - return [comb, uflag, endPos - pos, true]; + const sranges = "[" + (negate2 ? "^" : "") + ranges.join("") + "]"; + const snegs = "[" + (negate2 ? "" : "^") + negs.join("") + "]"; + const comb = "^" + (ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs); + return [new RegExp(comb, nocase ? "iu" : "u"), endPos - pos]; }; -// node_modules/readdir-glob/node_modules/minimatch/dist/esm/unescape.js -var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => { - if (magicalBraces) { - return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1"); - } - return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1"); +// node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +var MATCH = { t: "match", id: 0 }; +var extTypes = "!?+*@"; +var lit = (ch) => ({ t: "lit", ch }); +var reEscape = (s) => s.replace(/[\\^$.*+?()[\]{}|/]/g, "\\$&"); +var newFoldRe = (s) => new RegExp(`^${reEscape(s)}$`, "iu"); +var foldCache = /* @__PURE__ */ new Map(); +var foldRe = (ch) => { + let re = foldCache.get(ch); + if (!re) { + re = newFoldRe(ch); + if (foldCache.size >= 1e3) + foldCache.clear(); + foldCache.set(ch, re); + } + return re; }; - -// node_modules/readdir-glob/node_modules/minimatch/dist/esm/ast.js -var _a5; -var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); -var isExtglobType = (c) => types.has(c); -var isExtglobAST = (c) => isExtglobType(c.type); -var adoptionMap = /* @__PURE__ */ new Map([ - ["!", ["@"]], - ["?", ["?", "@"]], - ["@", ["@"]], - ["*", ["*", "+", "?", "@"]], - ["+", ["+", "@"]] -]); -var adoptionWithSpaceMap = /* @__PURE__ */ new Map([ - ["!", ["?"]], - ["@", ["?"]], - ["+", ["?", "*"]] -]); -var adoptionAnyMap = /* @__PURE__ */ new Map([ - ["!", ["?", "@"]], - ["?", ["?", "@"]], - ["@", ["?", "@"]], - ["*", ["*", "+", "?", "@"]], - ["+", ["+", "@", "?", "*"]] -]); -var usurpMap = /* @__PURE__ */ new Map([ - ["!", /* @__PURE__ */ new Map([["!", "@"]])], - [ - "?", - /* @__PURE__ */ new Map([ - ["*", "*"], - ["+", "*"] - ]) - ], - [ - "@", - /* @__PURE__ */ new Map([ - ["!", "!"], - ["?", "?"], - ["@", "@"], - ["*", "*"], - ["+", "+"] - ]) - ], - [ - "+", - /* @__PURE__ */ new Map([ - ["?", "*"], - ["*", "*"] - ]) - ] -]); -var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))"; -var startNoDot = "(?!\\.)"; -var addPatternStart = /* @__PURE__ */ new Set(["[", "."]); -var justDots = /* @__PURE__ */ new Set(["..", "."]); -var reSpecials = new Set("().*{}+?[]^$\\!"); -var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); -var qmark = "[^/]"; -var star = qmark + "*?"; -var starNoEmpty = qmark + "+?"; -var ID = 0; -var AST = class { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - id = ++ID; - get depth() { - return (this.#parent?.depth ?? -1) + 1; - } - [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() { - return { - "@@type": "AST", - id: this.id, - type: this.type, - root: this.#root.id, - parent: this.#parent?.id, - depth: this.depth, - partsLength: this.#parts.length, - parts: this.#parts - }; - } - constructor(type, parent, options = {}) { - this.type = type; - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === "!" && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - if (this.#hasMagic !== void 0) - return this.#hasMagic; - for (const p of this.#parts) { - if (typeof p === "string") - continue; - if (p.type || p.hasMagic) - return this.#hasMagic = true; - } - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - return this.#toString !== void 0 ? this.#toString : !this.type ? this.#toString = this.#parts.map((p) => String(p)).join("") : this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")"; - } - #fillNegs() { - if (this !== this.#root) - throw new Error("should only call on root"); - if (this.#filledNegs) - return this; - this.toString(); - this.#filledNegs = true; - let n; - while (n = this.#negs.pop()) { - if (n.type !== "!") - continue; - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - if (typeof part === "string") { - throw new Error("string part in extglob AST??"); - } - part.copyIn(pp.#parts[i]); - } +var litMatch = (l, c) => { + if (c === l.ch) + return true; + if (!l.re) + return false; + const code = c.charCodeAt(0); + if (code >= 128) + return l.re.test(c); + const ascii = l.ascii ??= new Uint8Array(128); + ascii[code] ||= l.re.test(c) ? 1 : 2; + return ascii[code] === 1; +}; +var tokenize = (p, nocase, noext, form, mark) => { + const toks = []; + for (let i = 0; i < p.length; ) { + const c = String.fromCodePoint(p.codePointAt(i)); + if (mark) { + const m = c === "\\" && p.startsWith(mark, i + 1) ? 1 : 0; + if (m || c === mark) { + const start = i + m + mark.length; + const end = p.indexOf(mark, start); + const r = /^(-?\d+)\.\.(-?\d+)$/.exec(p.slice(start, end)); + const alts = end !== -1 && r && numericRange(r[1], r[2]); + if (alts) { + toks.push({ t: "ext", type: "@", alts }); + i = end + mark.length; + continue; } - p = pp; - pp = p.#parent; } } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === "") + if (c === "\\") { + const e = p.codePointAt(i + 1); + const ch = e === void 0 ? c : String.fromCodePoint(e); + toks.push(lit(ch)); + i += 1 + ch.length; + continue; + } + if (c === "[") { + const [re, consumed] = parseClass(p, i, nocase, form); + if (consumed) { + toks.push({ t: "class", re }); + i += consumed; continue; - if (typeof p !== "string" && !(p instanceof _a5 && p.#parent === this)) { - throw new Error("invalid part: " + p); } - this.#parts.push(p); } + if (!noext && extTypes.includes(c) && p[i + 1] === "(") { + toks.push({ t: "open", type: c }); + i += 2; + continue; + } + toks.push(!noext && c === "|" ? { t: "bar" } : !noext && c === ")" ? { t: "close" } : c === "*" ? { t: "star" } : c === "?" ? { t: "any" } : lit(c)); + i += c.length; } - toJSON() { - const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) { - ret.push({}); + return toks; +}; +var pair = (toks) => { + const pairs = /* @__PURE__ */ new Map(); + const stack = []; + toks.forEach((tok, i) => { + if (tok.t === "open") + stack.push(i); + else if (tok.t === "close" && stack.length) + pairs.set(stack.pop(), i); + }); + return pairs; +}; +var build2 = (toks, pairs, start, end, top) => { + let seq = []; + const alts = [seq]; + for (let i = start; i < end; i++) { + const tok = toks[i]; + const close = pairs.get(i); + if (tok.t === "open" && close !== void 0) { + const sub = build2(toks, pairs, i + 1, close, false); + seq.push({ t: "ext", type: tok.type, alts: sub }); + i = close; + } else if (tok.t === "bar" && !top) { + alts.push(seq = []); + } else if (tok.t === "open") { + seq.push(lit(tok.type), lit("(")); + } else if (tok.t === "bar") { + seq.push(lit("|")); + } else if (tok.t === "close") { + seq.push(lit(")")); + } else { + seq.push(tok); } - return ret; } - isStart() { - if (this.#root === this) - return true; - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof _a5 && pp.type === "!")) { - return false; - } + return alts; +}; +var normalize2 = (items, form) => { + const out = []; + let run9 = ""; + const flush = () => { + for (const ch of run9.normalize(form)) + out.push(lit(ch)); + run9 = ""; + }; + for (const it of items) { + if (it.t === "lit") { + run9 += it.ch; + continue; } + flush(); + out.push(it.t === "ext" ? { ...it, alts: it.alts.map((a) => normalize2(a, form)) } : it); + } + flush(); + return out; +}; +var compile = (items, nocase) => { + let id = 1; + const split = (out) => ({ t: "split", id: id++, out }); + const seq = (items2, next) => items2.reduceRight((next2, it) => item(it, next2), next); + const item = (it, next) => { + switch (it.t) { + case "lit": + const re = nocase ? foldRe(it.ch) : void 0; + return { t: "lit", id: id++, ch: it.ch, re, next }; + case "any": + case "star": + return { t: it.t, id: id++, next }; + case "class": + return { t: "class", id: id++, re: it.re, next }; + } + const alts = (next2) => it.alts.map((a) => seq(a, next2)); + switch (it.type) { + case "@": + return split(alts(next)); + case "?": + return split([next, ...alts(next)]); + case "!": + return { t: "neg", id: id++, sub: split(alts(MATCH)), next }; + } + const after = split([]); + const entry = split(alts(after)); + after.out.push(next, entry); + return it.type === "*" ? after : entry; + }; + const start = seq(items, MATCH); + return [start, id]; +}; +var show = (start) => { + const lines = []; + const seen = /* @__PURE__ */ new Set(); + const ref = (n) => n.t === "match" ? "match" : String(n.id); + const walk = (n, indent) => { + if (n.t === "match" || seen.has(n)) + return; + seen.add(n); + const line = (desc) => lines.push(`${indent}${n.id}: ${desc}`); + switch (n.t) { + case "split": + line(`split -> ${n.out.map(ref).join(", ")}`); + for (const o of n.out) + walk(o, indent); + return; + case "neg": + line(`!(${ref(n.sub)}) -> ${ref(n.next)}`); + walk(n.sub, indent + " "); + return walk(n.next, indent); + case "lit": + line(`${JSON.stringify(n.ch)} -> ${ref(n.next)}`); + break; + case "class": + line(`${n.re} -> ${ref(n.next)}`); + break; + default: + line(`${n.t === "any" ? "?" : "*"} -> ${ref(n.next)}`); + } + walk(n.next, indent); + }; + walk(start, ""); + return [`start -> ${ref(start)}`, ...lines].join("\n"); +}; +var State = class { + // set by the Sim, to mark the nodes that this state has + gen; + threads = []; + match = false; + runs = []; + // the sorted ids of the threads, with 0 for a match, once the + // state is done + ids = []; + constructor(gen) { + this.gen = gen; + } + // no threads, so nothing more can match + get dead() { + return !this.threads.length && !this.match && !this.runs.length; + } +}; +var sameState = (a, b) => { + if (a.ids.length !== b.ids.length) + return false; + if (a.runs.length !== b.runs.length) + return false; + if (a.ids.some((id, i) => id !== b.ids[i])) + return false; + return a.runs.every((r) => b.runs.some((o) => o.neg === r.neg && sameState(o.state, r.state))); +}; +var marks = (size) => ({ + has: new Float64Array(size), + seen: new Float64Array(size), + gen: 0 +}); +var Sim = class { + // `.` and `..` only match literal dots, even with `dot:true` + dots; + // the string starts with `.`, and `dot:true` is not set + dotStart; + #marks; + constructor(dots, dotStart, marks2) { + this.dots = dots; + this.dotStart = dotStart; + this.#marks = marks2; + } + state() { + return new State(++this.#marks.gen); + } + // sort the ids of a state, once it has all of its threads + done(state) { + state.ids = state.threads.map((n) => n.id).sort((a, b) => a - b); + if (state.match) + state.ids.unshift(MATCH.id); + return state; + } + // true the first time that the state walks through the node, so + // that loops in the graph stop + #visit(state, node) { + const { seen } = this.#marks; + if (seen[node.id] === state.gen) + return false; + seen[node.id] = state.gen; return true; } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === "!") - return true; - if (!this.#parent?.isEnd()) + #addThread(state, node) { + const { has } = this.#marks; + if (has[node.id] === state.gen) return false; - if (!this.type) - return this.#parent?.isEnd(); - const pl = this.#parent ? this.#parent.#parts.length : 0; - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === "string") - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new _a5(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt, extDepth) { - const maxDepth = opt.maxExtglobRecursion ?? 2; - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - let i2 = pos; - let acc2 = ""; - while (i2 < str.length) { - const c = str.charAt(i2++); - if (escaping || c === "\\") { - escaping = !escaping; - acc2 += c; - continue; - } - if (inBrace) { - if (i2 === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; - } - } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc2 += c; - continue; - } else if (c === "[") { - inBrace = true; - braceStart = i2; - braceNeg = false; - acc2 += c; - continue; - } - const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth; - if (doRecurse) { - ast.push(acc2); - acc2 = ""; - const ext2 = new _a5(c, ast); - i2 = _a5.#parseAST(str, ext2, i2, opt, extDepth + 1); - ast.push(ext2); - continue; - } - acc2 += c; - } - ast.push(acc2); - return i2; + has[node.id] = state.gen; + state.threads.push(node); + return true; + } + // wildcards only match a leading dot if `dot:true`. In a negated + // sub-pattern, this does not apply, because the negation itself + // can not match a leading dot. + restricted(i, top) { + return top && (this.dots || this.dotStart && i === 0); + } + add(state, node, i, top) { + switch (node.t) { + case "split": + if (!this.#visit(state, node)) + return; + for (const o of node.out) + this.add(state, o, i, top); + return; + case "neg": + if (!this.#visit(state, node)) + return; + const sub = this.state(); + this.add(sub, node.sub, i, false); + this.done(sub); + return this.addRun(state, { t: "run", neg: node, state: sub }, i, top); + case "star": + if (this.restricted(i, top)) + return; + if (this.#addThread(state, node)) + this.add(state, node.next, i, top); + return; + case "match": + state.match = true; + return; + default: + this.#addThread(state, node); } - let i = pos + 1; - let part = new _a5(null, ast); - const parts = []; - let acc = ""; - while (i < str.length) { - const c = str.charAt(i++); - if (escaping || c === "\\") { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; + } + addRun(state, run9, i, top) { + for (const r of state.runs) { + if (r.neg === run9.neg && sameState(r.state, run9.state)) + return; + } + state.runs.push(run9); + if (!run9.state.match) { + this.add(state, run9.neg.next, i, top); + } + } + // the threads after char `c`, at index `i` + step(state, c, i, top) { + const next = this.state(); + for (const th of state.threads) { + switch (th.t) { + case "lit": + if (litMatch(th, c)) { + this.add(next, th.next, i + 1, top); } - } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } else if (c === "[") { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */ - (extDepth <= maxDepth || ast && ast.#canAdoptType(c)); - if (doRecurse) { - const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1; - part.push(acc); - acc = ""; - const ext2 = new _a5(c, part); - part.push(ext2); - i = _a5.#parseAST(str, ext2, i, opt, extDepth + depthAdd); - continue; - } - if (c === "|") { - part.push(acc); - acc = ""; - parts.push(part); - part = new _a5(null, ast); - continue; + break; + case "any": + if (!this.restricted(i, top)) + this.add(next, th.next, i + 1, top); + break; + case "class": + if (!this.restricted(i, top) && th.re.test(c)) { + this.add(next, th.next, i + 1, top); + } + break; + case "star": + if (!this.restricted(i, top)) + this.add(next, th, i + 1, top); } - if (c === ")") { - if (acc === "" && ast.#parts.length === 0) { - ast.#emptyExt = true; + } + if (!this.restricted(i, top)) { + for (const run9 of state.runs) { + if (run9.state.dead) { + this.addRun(next, run9, i + 1, top); + continue; } - part.push(acc); - acc = ""; - ast.push(...parts, part); - return i; + const sub = this.step(run9.state, c, i, false); + this.addRun(next, { t: "run", neg: run9.neg, state: sub }, i + 1, top); } - acc += c; } - ast.type = null; - ast.#hasMagic = void 0; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - #canAdoptWithSpace(child) { - return this.#canAdopt(child, adoptionWithSpaceMap); + return this.done(next); } - #canAdopt(child, map = adoptionMap) { - if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) { - return false; - } - const gc = child.#parts[0]; - if (!gc || typeof gc !== "object" || gc.type === null) { - return false; +}; +var stateKey = (state) => { + const ids = state.ids.join(); + if (!state.runs.length) + return ids; + const runs = state.runs.map((r) => `${r.neg.id}(${stateKey(r.state)})`); + return `${ids}|${runs.sort().join("|")}`; +}; +var DFA_BUDGET = 1 << 18; +var Dfa = class { + #start; + #states = /* @__PURE__ */ new Map(); + #size = 0; + #plain; + #dotStart; + #sim; + #dotSim; + constructor(start, marks2) { + this.#start = start; + this.#sim = new Sim(false, false, marks2); + this.#dotSim = new Sim(false, true, marks2); + } + #make(state) { + return { + state, + match: state.match, + dead: state.dead, + next: /* @__PURE__ */ new Map() + }; + } + #intern(state) { + const key = stateKey(state); + const found = this.#states.get(key); + if (found) + return found; + if (this.#size > DFA_BUDGET) + this.#clear(); + const d = this.#make(state); + this.#states.set(key, d); + this.#size += key.length + 1; + return d; + } + #clear() { + this.#states.clear(); + this.#size = 0; + this.#plain = void 0; + this.#dotStart = void 0; + } + start(dotStart) { + if (dotStart) { + if (this.#dotStart) + return this.#dotStart; + const state2 = this.#dotSim.state(); + this.#dotSim.add(state2, this.#start, 0, true); + return this.#dotStart = this.#make(this.#dotSim.done(state2)); + } + if (this.#plain) + return this.#plain; + const state = this.#sim.state(); + this.#sim.add(state, this.#start, 0, true); + return this.#plain = this.#intern(this.#sim.done(state)); + } + // the next state, after a miss in `d.ascii` + next(d, c) { + const code = c.charCodeAt(0); + const found = code < 128 ? void 0 : d.next.get(c); + if (found) + return found; + const n = d === this.#dotStart ? this.#intern(this.#dotSim.step(d.state, c, 0, true)) : this.#intern(this.#sim.step(d.state, c, 1, true)); + if (code < 128) { + if (!d.ascii) { + d.ascii = new Array(128); + this.#size += 128; + } + d.ascii[code] = n; + } else { + d.next.set(c, n); } - return this.#canAdoptType(gc.type, map); + this.#size++; + return n; } - #canAdoptType(c, map = adoptionAnyMap) { - return !!map.get(this.type)?.includes(c); - } - #adoptWithSpace(child, index2) { - const gc = child.#parts[0]; - const blank = new _a5(null, gc, this.options); - blank.#parts.push(""); - gc.push(blank); - this.#adopt(child, index2); +}; +var linear = (start) => { + const nodes = []; + for (let n = start; n.t !== "match"; n = n.next) { + if (n.t === "split" || n.t === "neg") + return void 0; + nodes.push(n); } - #adopt(child, index2) { - const gc = child.#parts[0]; - this.#parts.splice(index2, 1, ...gc.#parts); - for (const p of gc.#parts) { - if (typeof p === "object") - p.#parent = this; + return nodes; +}; +var testLinear = (nodes, chars, start, end) => { + let ni = 0; + let ci = start; + let starNi = -1; + let starCi = 0; + while (ci < end) { + const n = nodes[ni]; + if (n?.t === "star") { + starNi = ni++; + starCi = ci; + continue; } - this.#toString = void 0; - } - #canUsurpType(c) { - const m = usurpMap.get(this.type); - return !!m?.has(c); - } - #canUsurp(child) { - if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) { - return false; + const c = chars[ci]; + if (n && (n.t === "any" || n.t === "lit" && litMatch(n, c) || n.t === "class" && n.re.test(c))) { + ni++; + ci++; + continue; } - const gc = child.#parts[0]; - if (!gc || typeof gc !== "object" || gc.type === null) { + if (starNi === -1) return false; - } - return this.#canUsurpType(gc.type); + ni = starNi + 1; + ci = ++starCi; } - #usurp(child) { - const m = usurpMap.get(this.type); - const gc = child.#parts[0]; - const nt = m?.get(gc.type); - if (!nt) + while (nodes[ni]?.t === "star") + ni++; + return ni === nodes.length; +}; +var lengths = (items) => { + let min = 0; + let max = 0; + for (const it of items) { + const [lo, hi] = itemLengths(it); + min += lo; + max += hi; + } + return [min, max]; +}; +var itemLengths = (it) => { + if (it.t === "star") + return [0, Infinity]; + if (it.t !== "ext") + return [1, 1]; + if (it.type === "!") + return [0, Infinity]; + const alts = it.alts.map(lengths); + const min = Math.min(...alts.map((a) => a[0])); + const max = Math.max(...alts.map((a) => a[1])); + const loop = max === 0 ? 0 : Infinity; + return it.type === "@" ? [min, max] : it.type === "?" ? [0, max] : it.type === "*" ? [0, loop] : [min, loop]; +}; +var hasAffix = (lits, chars, start) => { + for (let j = 0; j < lits.length; j++) { + if (!litMatch(lits[j], chars[start + j])) return false; - this.#parts = gc.#parts; - for (const p of this.#parts) { - if (typeof p === "object") { - p.#parent = this; - } - } - this.type = nt; - this.#toString = void 0; - this.#emptyExt = false; - } - static fromGlob(pattern, options = {}) { - const ast = new _a5(null, void 0, options); - _a5.#parseAST(pattern, ast, 0, options, 0); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - if (this !== this.#root) - return this.#root.toMMPattern(); - const glob2 = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob2.toUpperCase() !== glob2.toLowerCase(); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : ""); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob2 - }); } - get options() { - return this.#options; - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource(allowDot) { - const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) { - this.#flatten(); - this.#fillNegs(); - } - if (!isExtglobAST(this)) { - const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string"); - const src = this.#parts.map((p) => { - const [re, _2, hasMagic, uflag] = typeof p === "string" ? _a5.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }).join(""); - let start2 = ""; - if (this.isStart()) { - if (typeof this.#parts[0] === "string") { - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - const needNoTrav = ( - // dots are allowed, and the pattern starts with [ or . - dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or . - src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or . - src.startsWith("\\.\\.") && aps.has(src.charAt(4)) - ); - const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ""; - } - } + return true; +}; +var slashOrSurrogate = /[/\ud800-\udfff]/; +var surrogate = /[\ud800-\udfff]/; +var codePoints = (s) => surrogate.test(s) ? [...s] : s; +var noSlash = (s) => { + if (s.includes("/")) { + throw new Error("can only match a single path portion, got: " + s); + } +}; +var Matcher = class { + pattern; + options; + #start; + // the number of node ids + #size; + #marks; + // the Sim for strings that are only `.` or `..` + #dotsSim; + // the string to compare, if the pattern has no magic. With + // `nocase:true`, the RegExp that folds case is made when it is + // first used. + #literal; + #literalFold = false; + #literalRe; + // the nodes between the prefix and suffix, if the graph is a + // single chain + #linear; + // the linear nodes are only `*` and `?`, so the length bounds and + // the prefix and suffix decide the match + #wild = false; + // the least and most chars that a match can have + #min = 0; + #max = Infinity; + // the literals that a match must start and end with. Each one + // matches exactly one char, and they are distinct items in the + // pattern, so a string that does not have them can not match. + #prefix = []; + #suffix = []; + // the prefix and suffix as strings, if they do not fold case + #prefixStr; + #suffixStr; + // there is a prefix or suffix to check + #affix = false; + #dfa; + #form; + constructor(pattern, options = {}) { + if (pattern.includes("/")) { + throw new Error("can only match a single path portion, got pattern: " + pattern); + } + this.pattern = pattern; + this.options = options; + const { nocase = false, noext = false, normalize: n } = options; + this.#form = n === true ? "NFC" : n || void 0; + const literal2 = /^[?*+@]\(\)$/.test(pattern); + const toks = tokenize(pattern, nocase, noext || literal2, this.#form, options.rangeMark); + let [items] = build2(toks, pair(toks), 0, toks.length, true); + if (this.#form) + items = normalize2(items, this.#form); + const [start, size] = compile(items, nocase); + this.#start = start; + this.#size = size; + if (items.every((it) => it.t === "lit")) { + this.#literal = items.map((it) => it.ch).join(""); + this.#literalFold = nocase; + } else { + const lit2 = (it) => it.t !== "lit" ? void 0 : nocase ? { ch: it.ch, re: foldRe(it.ch) } : { ch: it.ch }; + for (const it of items) { + const l = lit2(it); + if (!l) + break; + this.#prefix.push(l); } - let end = ""; - if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") { - end = "(?:$|\\/)"; + for (let j = items.length - 1; j >= 0; j--) { + const l = lit2(items[j]); + if (!l) + break; + this.#suffix.unshift(l); } - const final2 = start2 + src + end; - return [ - final2, - unescape2(src), - this.#hasMagic = !!this.#hasMagic, - this.#uflag - ]; + this.#affix = !!(this.#prefix.length || this.#suffix.length); + if (!nocase) { + this.#prefixStr = this.#prefix.map((l) => l.ch).join(""); + this.#suffixStr = this.#suffix.map((l) => l.ch).join(""); + } + this.#linear = linear(this.#start)?.slice(this.#prefix.length, -this.#suffix.length || void 0); + this.#wild = !!this.#linear?.every((n2) => n2.t === "star" || n2.t === "any"); + const [min, max] = lengths(items); + this.#min = min; + this.#max = max; } - const repeated = this.type === "*" || this.type === "+"; - const start = this.type === "!" ? "(?:(?!(?:" : "(?:"; - let body = this.#partsToRegExp(dot); - if (this.isStart() && this.isEnd() && !body && this.type !== "!") { - const s = this.toString(); - const me = this; - me.#parts = [s]; - me.type = null; - me.#hasMagic = void 0; - return [s, unescape2(this.toString()), false, false]; - } - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true); - if (bodyDotAllowed === body) { - bodyDotAllowed = ""; - } - if (bodyDotAllowed) { - body = `(?:${body})(?:${bodyDotAllowed})*?`; - } - let final = ""; - if (this.type === "!" && this.#emptyExt) { - final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty; - } else { - const close = this.type === "!" ? ( - // !() must match something,but !(x) can match '' - "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")" - ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`; - final = start + body + close; + } + test(s) { + if (this.#form) { + noSlash(s); + return this.#test(s.normalize(this.#form)); } - return [ - final, - unescape2(body), - this.#hasMagic = !!this.#hasMagic, - this.#uflag - ]; + if (slashOrSurrogate.test(s)) { + noSlash(s); + return this.#test(s, [...s]); + } + return this.#test(s, s); } - #flatten() { - if (!isExtglobAST(this)) { - for (const p of this.#parts) { - if (typeof p === "object") { - p.#flatten(); + /** + * The same as {@link Matcher#test}, but the string is not checked + * for `/` chars, so the result for a string that has one is not + * defined. Only use it for a string that is known to be one path + * portion, such as a part of a path that was split on `/`. It can + * be faster, because some patterns do not need to look at each char + * of the string. + */ + testUnchecked(s) { + return this.#test(this.#form ? s.normalize(this.#form) : s); + } + // Test a string that has no `/`. `chars` indexes it by code point. + // If it is not given, it is only found if a step needs it. + #test(s, chars) { + if (this.#literal !== void 0) { + return this.#literalFold ? (this.#literalRe ??= newFoldRe(this.#literal)).test(s) : s === this.#literal; + } + const min = this.#min; + const max = this.#max; + if (chars === void 0) { + const most = s.length; + const least = most + 1 >> 1; + if (most < min || least > max) + return false; + if (least < min || most > max) + chars = codePoints(s); + } + if (chars !== void 0 && (chars.length < min || chars.length > max)) { + return false; + } + const prefix2 = this.#prefix.length; + if (this.#affix) { + if (this.#prefixStr !== void 0 && this.#suffixStr !== void 0) { + if (!s.startsWith(this.#prefixStr) || !s.endsWith(this.#suffixStr)) { + return false; } - } - } else { - let iterations = 0; - let done = false; - do { - done = true; - for (let i = 0; i < this.#parts.length; i++) { - const c = this.#parts[i]; - if (typeof c === "object") { - c.#flatten(); - if (this.#canAdopt(c)) { - done = false; - this.#adopt(c, i); - } else if (this.#canAdoptWithSpace(c)) { - done = false; - this.#adoptWithSpace(c, i); - } else if (this.#canUsurp(c)) { - done = false; - this.#usurp(c); - } - } - } - } while (!done && ++iterations < 10); - } - this.#toString = void 0; - } - #partsToRegExp(dot) { - return this.#parts.map((p) => { - if (typeof p === "string") { - throw new Error("string type in extglob ast??"); - } - const [re, _2, _hasMagic, uflag] = p.toRegExpSource(dot); - this.#uflag = this.#uflag || uflag; - return re; - }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); - } - static #parseGlob(glob2, hasMagic, noEmpty = false) { - let escaping = false; - let re = ""; - let uflag = false; - let inStar = false; - for (let i = 0; i < glob2.length; i++) { - const c = glob2.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? "\\" : "") + c; - continue; - } - if (c === "*") { - if (inStar) - continue; - inStar = true; - re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star; - hasMagic = true; - continue; } else { - inStar = false; - } - if (c === "\\") { - if (i === glob2.length - 1) { - re += "\\\\"; - } else { - escaping = true; - } - continue; - } - if (c === "[") { - const [src, needUflag, consumed, magic] = parseClass(glob2, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; + chars ??= codePoints(s); + const end = chars.length - this.#suffix.length; + if (!hasAffix(this.#prefix, chars, 0) || !hasAffix(this.#suffix, chars, end)) { + return false; } } - if (c === "?") { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); } - return [re, unescape2(glob2), !!hasMagic, uflag]; + const dotStart = !this.options.dot && s.startsWith("."); + if (this.#linear) { + if (s === "." || s === "..") + return false; + if (dotStart && !prefix2) + return false; + if (this.#wild) + return true; + chars ??= codePoints(s); + const end = chars.length - this.#suffix.length; + return testLinear(this.#linear, chars, prefix2, end); + } + chars ??= codePoints(s); + if (s === "." || s === "..") { + this.#marks ??= marks(this.#size); + const sim = this.#dotsSim ??= new Sim(true, false, this.#marks); + const start = sim.state(); + sim.add(start, this.#start, 0, true); + let state = sim.done(start); + for (let i = 0; i < chars.length; i++) { + state = sim.step(state, chars[i], i, true); + } + return state.match; + } + this.#marks ??= marks(this.#size); + const dfa = this.#dfa ??= new Dfa(this.#start, this.#marks); + let d = dfa.start(dotStart); + const str = chars === s; + for (let i = 0; i < chars.length; i++) { + if (d.dead) + return false; + const code = str ? s.charCodeAt(i) : chars[i].charCodeAt(0); + d = d.ascii?.[code] ?? dfa.next(d, chars[i]); + } + return d.match; + } + /** a readable listing of the state machine */ + toString() { + return show(this.#start); + } +}; + +// node_modules/readdir-glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js +var MAX_PATTERN_LENGTH = 1024 * 64; +var assertValidPattern = (pattern) => { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); } }; -_a5 = AST; // node_modules/readdir-glob/node_modules/minimatch/dist/esm/escape.js var escape2 = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => { + const e = magicalBraces ? windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&") : windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); + const c = e.charAt(0); + if (c === "#") { + return (windowsPathsNoEscape ? "[#]" : "\\#") + e.slice(1); + } + if (c === "!") { + return (windowsPathsNoEscape ? "@(!)" : "\\!") + e.slice(1); + } + return e; +}; + +// node_modules/readdir-glob/node_modules/minimatch/dist/esm/unescape.js +var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => { + if (windowsPathsNoEscape && s.startsWith("@(!)")) { + return "!" + unescape2(s.slice(4), { windowsPathsNoEscape, magicalBraces }); + } if (magicalBraces) { - return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&"); + return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1"); } - return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); + return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1"); }; // node_modules/readdir-glob/node_modules/minimatch/dist/esm/index.js -var minimatch = (p, pattern, options = {}) => { +var DEFAULT_BRACE_EXPAND_MAX = 1e5; +var DEFAULT_GLOB_STAR_RECURSION_MAX = 200; +var AWE_KEY = "allowWindowsEscape"; +var minimatch = (p, pattern, options) => { assertValidPattern(pattern); - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options?.nocomment && pattern.charAt(0) === "#") { return false; } - return new Minimatch(pattern, options).match(p); -}; -var starDotExtRE = /^\*+([^+@!?*[(]*)$/; -var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2); -var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2); -var starDotExtTestNocase = (ext2) => { - ext2 = ext2.toLowerCase(); - return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2); -}; -var starDotExtTestNocaseDot = (ext2) => { - ext2 = ext2.toLowerCase(); - return (f) => f.toLowerCase().endsWith(ext2); -}; -var starDotStarRE = /^\*+\.\*+$/; -var starDotStarTest = (f) => !f.startsWith(".") && f.includes("."); -var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes("."); -var dotStarRE = /^\.\*+$/; -var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."); -var starRE = /^\*+$/; -var starTest = (f) => f.length !== 0 && !f.startsWith("."); -var starTestDot = (f) => f.length !== 0 && f !== "." && f !== ".."; -var qmarksRE = /^\?+([^+@!?*[(]*)?$/; -var qmarksTestNocase = ([$0, ext2 = ""]) => { - const noext = qmarksTestNoExt([$0]); - if (!ext2) - return noext; - ext2 = ext2.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext2); + return cachedMinimatch(pattern, options).match(p); }; -var qmarksTestNocaseDot = ([$0, ext2 = ""]) => { - const noext = qmarksTestNoExtDot([$0]); - if (!ext2) - return noext; - ext2 = ext2.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext2); -}; -var qmarksTestDot = ([$0, ext2 = ""]) => { - const noext = qmarksTestNoExtDot([$0]); - return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); +var cache = /* @__PURE__ */ new Map(); +var oldCache = /* @__PURE__ */ new Map(); +var cacheSize = 0; +var cacheTotalWeight = 0; +var cacheMax = 256; +var cacheMaxWeight = 1 << 15; +var cacheMaxEntryWeight = 1 << 12; +var cacheWeight = (mm) => { + let w = mm.pattern.length; + for (const s of mm.globSet) { + w += s.length + 1; + if (w > cacheMaxEntryWeight) + break; + } + return w; }; -var qmarksTest = ([$0, ext2 = ""]) => { - const noext = qmarksTestNoExt([$0]); - return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); +var tri = (v) => v === void 0 ? 0 : v ? 2 : 1; +var booleanWeights = new Map(Object.keys({ + nobrace: 0, + nocomment: 0, + nonegate: 0, + noglobstar: 0, + noext: 0, + nonull: 0, + partial: 0, + dot: 0, + nocase: 0, + nocaseMagicOnly: 0, + magicalBraces: 0, + matchBase: 0, + flipNegate: 0, + preserveMultipleSlashes: 0, + windowsNoMagicRoot: 0 +}).map((k, i) => [k, 24 * 3 ** i])); +var optionsKey = (o) => { + let n = 0; + let wpe = false; + for (const k in o) { + const v = o[k]; + switch (k) { + // the same test as the Minimatch constructor + case "windowsPathsNoEscape": + if (v) + wpe = true; + break; + case AWE_KEY: + if (v === false) + wpe = true; + break; + case "platform": { + const p = v || defaultPlatform; + if (p === defaultPlatform) + break; + if (p === "darwin") + n += 3; + else if (p === "win32") + n += 6; + else if (p === "linux") + n += 9; + else + return JSON.stringify(o); + break; + } + case "optimizationLevel": + if (v === void 0) + break; + n += v >= 2 ? 1 : v >= 1 ? 0 : 2; + break; + case "braceExpandMax": + if (v !== void 0 && v !== DEFAULT_BRACE_EXPAND_MAX) { + return JSON.stringify(o); + } + break; + case "maxGlobstarRecursion": + if (v !== void 0 && v !== DEFAULT_GLOB_STAR_RECURSION_MAX) { + return JSON.stringify(o); + } + break; + case "normalize": + if (v !== void 0) + return JSON.stringify(o); + break; + default: + n += (booleanWeights.get(k) ?? 0) * tri(v); + } + } + return wpe ? n + 12 : n; }; -var qmarksTestNoExt = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && !f.startsWith("."); +var copyOptions = (o) => { + const copy = {}; + for (const k in o) + copy[k] = o[k]; + return copy; }; -var qmarksTestNoExtDot = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && f !== "." && f !== ".."; +var cachedMinimatch = (pattern, options) => { + const key = options ? optionsKey(options) : 0; + let mm = cache.get(key)?.get(pattern); + if (mm) + return mm; + mm = oldCache.get(key)?.get(pattern) ?? new Minimatch(pattern, copyOptions(options)); + const weight = cacheWeight(mm); + if (weight > cacheMaxEntryWeight) + return mm; + if (cacheSize >= cacheMax || cacheTotalWeight + weight > cacheMaxWeight) { + oldCache = cache; + cache = /* @__PURE__ */ new Map(); + cacheSize = 0; + cacheTotalWeight = 0; + } + let byPattern = cache.get(key); + if (!byPattern) + cache.set(key, byPattern = /* @__PURE__ */ new Map()); + byPattern.set(pattern, mm); + cacheSize++; + cacheTotalWeight += weight; + return mm; }; -var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; +var defaultPlatform = typeof process === "object" && process ? process.env?.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; var path21 = { win32: { sep: "\\" }, posix: { sep: "/" } @@ -191838,11 +192093,10 @@ var sep6 = defaultPlatform === "win32" ? path21.win32.sep : path21.posix.sep; minimatch.sep = sep6; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; -var qmark2 = "[^/]"; -var star2 = qmark2 + "*?"; -var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; -var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; -var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); +var filter = (pattern, options) => { + let mm; + return (p) => (mm ??= cachedMinimatch(pattern, options)).match(p); +}; minimatch.filter = filter; var ext = (a, b = {}) => Object.assign({}, a, b); var defaults2 = (def) => { @@ -191860,21 +192114,10 @@ var defaults2 = (def) => { return orig.defaults(ext(def, options)).Minimatch; } }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), escape: (s, options = {}) => orig.escape(s, ext(def, options)), filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), sep: orig.sep, @@ -191887,11 +192130,15 @@ var braceExpand = (pattern, options = {}) => { if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } - return expand2(pattern, { max: options.braceExpandMax }); + let p = pattern.replace(/\\\\/g, "\\\\\\\\"); + if (options.windowsPathsNoEscape || options[AWE_KEY] === false) { + p = p.replace(/\[([{}])\]/g, "[\\$1]"); + } + return expand2(p, { max: options.braceExpandMax }); }; minimatch.braceExpand = braceExpand; -var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); -minimatch.makeRe = makeRe; +var RANGE_MIN = 100; +var rangeRe = /(? { const mm = new Minimatch(pattern, options); list = list.filter((f) => mm.match(f)); @@ -191902,7 +192149,141 @@ var match = (list, pattern, options = {}) => { }; minimatch.match = match; var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; -var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +var classEnd = (pattern, start) => { + let i = start + 1; + if (pattern.charAt(i) === "!" || pattern.charAt(i) === "^") + i++; + let sawStart = false; + for (; i < pattern.length; i++) { + const c = pattern.charAt(i); + if (c === "]" && sawStart) + return i; + sawStart = true; + if (c === "\\") + i++; + } + return -1; +}; +var literal = (pattern, noext) => { + if (!noext && (pattern === "+()" || pattern === "@()")) + return pattern; + let lit2 = ""; + for (let i = 0; i < pattern.length; i++) { + const c = pattern.charAt(i); + if (c === "\\") { + lit2 += pattern.charAt(++i) || c; + } else if (c === "*" || c === "?") { + return void 0; + } else if (c === "[") { + const close = classEnd(pattern, i); + if (close === -1) { + lit2 += c; + continue; + } + let body = pattern.slice(i + 1, close); + if (body.startsWith("\\")) + body = body.slice(1); + if ([...body].length !== 1 || "!^".includes(pattern.charAt(i + 1))) { + return void 0; + } + lit2 += body; + i = close; + } else if (!noext && "+@!".includes(c) && pattern.charAt(i + 1) === "(" && pattern.includes(")", i + 2)) { + return void 0; + } else { + lit2 += c; + } + } + return lit2; +}; +var MAX_EXTGLOBS = 256; +var extglobCount = (pattern) => { + let n = 0; + for (let i = 0; i < pattern.length - 1; i++) { + const c = pattern.charAt(i); + if (c === "\\") { + i++; + } else if ("+@!?*".includes(c) && pattern.charAt(i + 1) === "(") { + n++; + i++; + } + } + return n; +}; +var assertValidExtglobs = (pattern) => { + if (extglobCount(pattern) > MAX_EXTGLOBS) { + throw new TypeError("pattern has too many extglobs"); + } +}; +var extSafe = (pattern) => { + if (/^[?*+@]\(\)$/.test(pattern) || pattern.includes("[:")) + return false; + let depth = 0; + for (let i = 0; i < pattern.length; i++) { + const c = pattern.charAt(i); + if (c === "\\") { + if (++i === pattern.length) + return false; + } else if (c === "[") { + const close = classEnd(pattern, i); + if (close !== -1) + i = close; + } else if ("+@!?*".includes(c) && pattern.charAt(i + 1) === "(") { + depth++; + i++; + } else if (c === ")") { + if (!depth--) + return false; + } else if (c === "|" && !depth) { + return false; + } + } + return !depth; +}; +var lastSplit; +var lastChecked; +var portionMatch = (p, f) => typeof p === "string" ? f === p : f !== "" && p.testUnchecked(f); +var endIndex = (p, last, lastStart, prev, prevStart) => portionMatch(p, last) ? lastStart : prev !== void 0 && portionMatch(p, prev) ? prevStart : -1; +var isDots = (p) => p === "." || p === ".."; +var isDrive = (p) => typeof p === "string" && /^[a-z]:$/i.test(p); +var isLongUNC = (p) => typeof p === "string" && /^unc$/i.test(p); +var uncHost = (p) => { + if (p[0] !== "" || p[1] !== "") + return -1; + const h = p[2] !== "?" ? 2 : isLongUNC(p[3]) ? 4 : -1; + const host = p[h]; + const share = p[h + 1]; + return h !== -1 && host !== void 0 && host !== "" && host !== GLOBSTAR && share !== void 0 && share !== "" && share !== GLOBSTAR ? h : -1; +}; +var walkable = (p, dot) => !isDots(p) && (dot || !p.startsWith(".")); +var dotPortion = (f, start, end, dot, sep7) => { + for (let k = start; k < end; ) { + if (f.charCodeAt(k) === 46) { + if (!dot) + return true; + const n = f.charCodeAt(k + 1) === 46 ? k + 2 : k + 1; + if (n >= end || isSep(f.charCodeAt(n), sep7)) + return true; + } + const s = nextSep(f, k, sep7); + if (s === -1) + return false; + k = s + 1; + while (k < end && isSep(f.charCodeAt(k), sep7)) + k++; + } + return false; +}; +var isSep = (c, sep7) => sep7 === "/" ? c === 47 : sep7 === "\\" ? c === 92 : c === 47 || c === 92; +var nextSep = (f, from, sep7) => { + if (sep7 !== "both") + return f.indexOf(sep7, from); + const s = f.indexOf("/", from); + const b = f.indexOf("\\", from); + return s === -1 ? b : b === -1 ? s : Math.min(s, b); +}; +var lastSep = (f, from, sep7) => sep7 !== "both" ? f.lastIndexOf(sep7, from) : Math.max(f.lastIndexOf("/", from), f.lastIndexOf("\\", from)); +var PENDING = {}; var Minimatch = class { options; set; @@ -191921,22 +192302,42 @@ var Minimatch = class { platform; windowsNoMagicRoot; maxGlobstarRecursion; - regexp; + // the path can be checked against the last portion, and the string + // portions, of each row before it is split. See #canMatch. + #endCheck; + #literalCheck; + // level 2 resolves `.` and `..` portions in the path + #level2; + // the unicode normalization form, if any + #form; + // the string portions of each row in the set + #literals = []; + // the rows that #canMatch can match without splitting the path + #shapes = []; + // the rows whose last portion can be checked against the path's + #endRows = []; + // brace expansion can make the same portion in many rows, so they + // share one Matcher, and the states that it caches + #matchers = /* @__PURE__ */ new Map(); + // parse() returns PENDING in place of a Matcher + #pending = false; + // the char that marks numeric ranges in globSet, if any + #rangeMark; + // the GlobstarParts of each pattern row, by start index and partial + #globstarParts = /* @__PURE__ */ new WeakMap(); constructor(pattern, options = {}) { assertValidPattern(pattern); options = options || {}; this.options = options; - this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200; + this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? DEFAULT_GLOB_STAR_RECURSION_MAX; this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === "win32"; - const awe = "allowWindowsEscape"; - this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false; + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[AWE_KEY] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, "/"); } this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; - this.regexp = null; this.negate = false; this.nonegate = !!options.nonegate; this.comment = false; @@ -191947,7 +192348,58 @@ var Minimatch = class { this.globSet = []; this.globParts = []; this.set = []; + this.#endCheck = !this.preserveMultipleSlashes; + this.#level2 = (options.optimizationLevel ?? 1) >= 2; + const n = options.normalize; + this.#form = n === true ? "NFC" : n || void 0; this.make(); + const drives = this.set.map((row) => this.#rootIndex(row)); + this.#endRows = this.set.map((row, r) => this.#endCheck && row.length - 1 > drives[r]); + this.#literals = this.set.map((row, r) => { + const end = this.#endRows[r] ? row.length - 1 : row.length; + const lits = row.slice(drives[r] + 1, end).filter((p) => typeof p === "string" && !!p); + return [...new Set(lits)]; + }); + this.#literalCheck = this.#literals.some((l) => l.length); + this.#shapes = this.set.map((row, r) => { + const [p0, p1, p2] = row; + if (this.#endRows[r] && row.length === 2) { + if (p0 === GLOBSTAR && p1 !== GLOBSTAR) + return "tail"; + } + if (this.#endRows[r] && options.matchBase && row.length === 1 && p0 !== GLOBSTAR && p0 !== "") { + return "base"; + } + if (!this.#endCheck || drives[r] !== -1) + return void 0; + if (row.length === 3 && p0 === GLOBSTAR && p2 === GLOBSTAR && p1 !== GLOBSTAR && p1 !== "" && // the portion between is only matched below this limit + this.maxGlobstarRecursion > 0) { + return "mid"; + } + if (row.length === 2 && p1 === GLOBSTAR && p0 !== GLOBSTAR && p0 !== "") { + return "head"; + } + return void 0; + }); + } + // a string portion of a pattern, normalized if the option is set + #norm(p) { + return this.#form ? p.normalize(this.#form) : p; + } + // On Windows, the index of the last root portion of a row, as + // #matchRow finds it: 0 for `c:/...`, 3 for `//?/c:/...` and + // `//host/share/...`, and 5 for `//?/UNC/host/share/...`. Otherwise + // -1. + #rootIndex(row) { + if (!this.isWindows) + return -1; + if (isDrive(row[0])) + return 0; + const uncDrive = row[0] === "" && row[1] === "" && row[2] === "?" && isDrive(row[3]); + if (uncDrive) + return 3; + const h = uncHost(row); + return h === -1 ? -1 : h + 1; } hasMagic() { if (this.options.magicalBraces && this.set.length > 1) { @@ -191961,8 +192413,6 @@ var Minimatch = class { } return false; } - debug(..._2) { - } make() { const pattern = this.pattern; const options = this.options; @@ -191975,40 +192425,149 @@ var Minimatch = class { return; } this.parseNegate(); - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - const rawGlobParts = this.globSet.map((s) => this.slashSplit(s)); + this.globSet = [...new Set(this.#expandBraces())]; + const rawGlobParts = this.globSet.map((s) => this.#slashSplit(s)); this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); + this.#pending = true; let set = this.globParts.map((s, _2, __) => { if (this.isWindows && this.windowsNoMagicRoot) { - const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); + const n = s[2] === "?" && isLongUNC(s[3]) ? 6 : 4; + const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && s.slice(3, n).every((p) => !globMagic.test(p)); + const isDrive2 = /^[a-z]:/i.test(s[0]); if (isUNC) { return [ - ...s.slice(0, 4), - ...s.slice(4).map((ss) => this.parse(ss)) + ...s.slice(0, n).map((p) => this.#norm(p)), + ...s.slice(n).map((ss) => this.parse(ss)) + ]; + } else if (isDrive2) { + return [ + this.#norm(s[0]), + ...s.slice(1).map((ss) => this.parse(ss)) ]; - } else if (isDrive) { - return [s[0], ...s.slice(1).map((ss) => this.parse(ss))]; } } return s.map((ss) => this.parse(ss)); }); - this.debug(this.pattern, set); this.set = set.filter((s) => s.indexOf(false) === -1); if (this.isWindows) { for (let i = 0; i < this.set.length; i++) { const p = this.set[i]; - if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) { + if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && (isDrive(p[3]) || isLongUNC(this.globParts[i][3]))) { + if (isLongUNC(this.globParts[i][3])) + p[3] = "UNC"; p[2] = "?"; } } } - this.debug(this.pattern, this.set); + if (!options.noext) + this.mergeRows(); + this.#pending = false; + this.set.forEach((row, i) => { + for (let k = 0; k < row.length; k++) { + if (row[k] === PENDING) { + row[k] = this.parse(this.globParts[i][k]); + } + } + }); + } + // Merge rows that only differ in one portion, where each of them + // is a Matcher, into one row that matches any of them with + // `@(a|b|...)`. Then a path is only walked once for all of them, + // for example with `**/*.{js,ts}`. + mergeRows() { + let merged = true; + while (merged) { + merged = false; + if (this.set.length < 2) + return; + let keys = this.#mergeKeys(); + const len = Math.max(0, ...this.set.map((r) => r.length)); + for (let k = 0; k < len; k++) { + const groups = /* @__PURE__ */ new Map(); + const R = this.set.length + 1; + this.set.forEach((row, i) => { + if (!(row[k] instanceof Matcher || row[k] === PENDING) || !extSafe(this.globParts[i][k])) { + return; + } + const { pre, suf } = keys[i]; + const key = pre[k] * R + suf[k + 1]; + const g = groups.get(key); + if (g) + g.push(i); + else + groups.set(key, [i]); + }); + const drop = /* @__PURE__ */ new Set(); + for (const g of groups.values()) { + if (g.length < 2) + continue; + const [first, ...rest] = g; + const alts = g.map((i) => this.globParts[i][k]); + const glob2 = `@(${alts.join("|")})`; + if (extglobCount(glob2) > MAX_EXTGLOBS) + continue; + this.globParts[first][k] = glob2; + this.set[first][k] = this.parse(glob2); + for (const i of rest) + drop.add(i); + } + if (drop.size) { + merged = true; + this.set = this.set.filter((_2, i) => !drop.has(i)); + this.globParts = this.globParts.filter((_2, i) => !drop.has(i)); + if (this.set.length < 2) + return; + keys = this.#mergeKeys(); + } + } + } + } + // For each row, number ids for its prefixes and suffixes, such that + // pre[k] identifies parts[0..k) and suf[k] identifies parts[k..n). + // Two rows are the same other than at portion k exactly when they + // have the same pre[k] and suf[k + 1]. This is linear in the size of + // the rows, where joining the whole row for every k was quadratic. + #mergeKeys() { + const partIds = /* @__PURE__ */ new Map(); + const ids = this.globParts.map((parts) => parts.map((s) => { + let id = partIds.get(s); + if (id === void 0) + partIds.set(s, id = partIds.size); + return id; + })); + const P = partIds.size; + const len = Math.max(0, ...ids.map((r) => r.length)); + const keys = ids.map((r) => ({ + pre: [0], + suf: new Array(r.length + 1).fill(0) + })); + for (let k = 0; k < len; k++) { + const m = /* @__PURE__ */ new Map(); + ids.forEach((r, i) => { + if (k >= r.length) + return; + const { pre } = keys[i]; + const key = pre[k] * P + r[k]; + let id = m.get(key); + if (id === void 0) + m.set(key, id = m.size + 1); + pre.push(id); + }); + } + for (let k = len - 1; k >= 0; k--) { + const m = /* @__PURE__ */ new Map(); + ids.forEach((r, i) => { + if (k >= r.length) + return; + const { suf } = keys[i]; + const key = suf[k + 1] * P + r[k]; + let id = m.get(key); + if (id === void 0) + m.set(key, id = m.size + 1); + suf[k] = id; + }); + } + return keys; } // various transforms to equivalent pattern sets that are // faster to process in a filesystem walk. The goal is to @@ -192055,13 +192614,14 @@ var Minimatch = class { // get rid of adjascent ** and resolve .. portions levelOneOptimize(globParts) { return globParts.map((parts) => { + const root = this.#rootIndex(parts) + 1; parts = parts.reduce((set, part) => { const prev = set[set.length - 1]; if (part === "**" && prev === "**") { return set; } if (part === "..") { - if (prev && prev !== ".." && prev !== "." && prev !== "**") { + if (set.length > root && prev && prev !== ".." && prev !== "." && prev !== "**") { set.pop(); return set; } @@ -192072,10 +192632,188 @@ var Minimatch = class { return parts.length === 0 ? [""] : parts; }); } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); + // Check the path against each row before it is split. 'no' if no + // row can match, so it does not need to be split. 'yes' if a row of + // `**` and one more portion matches. 'maybe' if it must be split to + // know. None of this applies with partial, where the path can end + // before the row does. + // + // On Windows, `\` is a separator in the path too, and the portions of + // a row up to its drive letter or UNC share are not checked (see + // #rootIndex). + // + // Each string portion of a row must be a portion of the path, so the + // path must contain it. Level 2 can only take portions out of the + // path, so this is still true then. + // + // The last portion of a row must match the last portion of the path, + // or the one before a trailing `/` (as a/* and a/**/* match a/b/). + // This does not apply to rows that end in **, rows that end in a + // root, or preserveMultipleSlashes (which can leave more + // than one '' at the end). At level 2, it does not apply if that + // portion is `.` or `..`, which can be + // resolved away. Level 2 only takes other portions out of the + // middle of the path. + // + // A row of `**/x` then matches if the ** can walk the portions + // before the one that x matches, the same as #matchGlobstar. At + // level 2, this is only known if none of them are `.` or `..`, so + // that the path does not change when it is resolved. + #canMatch(f) { + const sep7 = !this.isWindows || !f.includes("\\") ? "/" : f.includes("/") ? "both" : "\\"; + let ends = this.#endCheck ? 0 : -1; + let last = ""; + let lastStart = 0; + let prev; + let prevStart = 0; + const dot = !!this.options.dot; + ROWS: for (let r = 0; r < this.set.length; r++) { + const row = this.set[r]; + const p = row[row.length - 1]; + let end = ends !== -1 && this.#endRows[r] && p !== GLOBSTAR; + if (end && ends === 0) { + const i = lastSep(f, f.length, sep7); + lastStart = i + 1; + last = f.slice(lastStart); + if (last === "" && i >= 0) { + let j = i; + while (j > 0 && isSep(f.charCodeAt(j - 1), sep7)) + j--; + prevStart = j === 0 ? 0 : lastSep(f, j - 1, sep7) + 1; + prev = f.slice(prevStart, j); + } + const resolves = this.#level2 && (isDots(last) || last === "" && prev !== void 0 && isDots(prev)); + ends = resolves ? -1 : 1; + end = !resolves; + } + let tailStart = -1; + if (end && typeof p === "string") { + tailStart = endIndex(p, last, lastStart, prev, prevStart); + if (tailStart === -1) + continue; + } + if (this.#literalCheck) { + for (const l of this.#literals[r]) { + if (!f.includes(l)) + continue ROWS; + } + } + if (end && typeof p === "object") { + tailStart = endIndex(p, last, lastStart, prev, prevStart); + if (tailStart === -1) + continue; + } + const shape = this.#shapes[r]; + if (shape === "base" && end) + return "yes"; + if (shape === "tail" && end) { + if (this.#level2 && dotPortion(f, 0, tailStart, true, sep7)) { + return "maybe"; + } + if (!dotPortion(f, 0, tailStart, dot, sep7)) + return "yes"; + continue; + } + if (shape === "mid" || shape === "head") { + const m = this.#walk(f, row, shape === "head", dot, sep7); + if (m !== "no") + return m; + continue; + } + return "maybe"; + } + return "no"; + } + // Match a row of a known shape against the split path, the same as + // #matchGlobstar and #matchGlobStarBodySections do. None of these + // rows have a drive letter, so they start at the first portion. + #matchShape(file, row, shape) { + const dot = !!this.options.dot; + const n = file.length; + if (shape === "head") { + if (n < 2 || !portionMatch(row[0], file[0])) { + return false; + } + for (let i = 1; i < n; i++) + if (!walkable(file[i], dot)) + return false; + return true; + } + const x = row[1]; + if (shape === "tail") { + let t = n - 1; + if (!portionMatch(x, file[t])) { + if (file[t] !== "" || n === 1 || !portionMatch(x, file[--t])) { + return false; + } + } + for (let i = 0; i < t; i++) + if (!walkable(file[i], dot)) + return false; + return true; } + for (let k = 0; k < n; k++) { + if (portionMatch(x, file[k]) && k + 1 < n) { + let i = k + 1; + while (i < n && walkable(file[i], dot)) + i++; + if (i === n) + return true; + } + if (!walkable(file[k], dot)) + return false; + } + return false; + } + // Match a row of `**/x/**` or `x/**` against the path, the same as + // #matchGlobstar and #matchGlobStarBodySections do once it is split. + // x must match a portion (the first one, for `x/**`), the ** before + // it must be able to walk the portions before that one, and there + // must be a portion after it, which the ** after it can walk. At + // level 2, this is only known if no portion is `.` or `..`. + #walk(f, row, head, dot, sep7) { + if (this.#level2 && dotPortion(f, 0, f.length, true, sep7)) + return "maybe"; + const x = row[head ? 0 : 1]; + let s = 0; + for (let e = nextSep(f, s, sep7); e !== -1; e = nextSep(f, s, sep7)) { + let next = e + 1; + while (next < f.length && isSep(f.charCodeAt(next), sep7)) + next++; + const hit = typeof x === "string" ? e - s === x.length && f.startsWith(x, s) : e > s && x.testUnchecked(f.slice(s, e)); + if (hit && !dotPortion(f, next, f.length, dot, sep7)) + return "yes"; + if (head || dotPortion(f, s, next, dot, sep7)) + return "no"; + s = next; + } + return "no"; + } + // the last split, if it was the same path with the same split + // settings + #cachedSplit(f) { + const last = lastSplit; + return last?.f === f && last.isWindows === this.isWindows && last.preserveMultipleSlashes === this.preserveMultipleSlashes && last.normalize === this.#form ? last : void 0; + } + // split a path for match(), and keep the parts for the next call + #split(f) { + const { isWindows, preserveMultipleSlashes } = this; + let parts = this.#slashSplit(isWindows ? f.split("\\").join("/") : f); + const normalize4 = this.#form; + if (normalize4) + parts = parts.map((p) => p.normalize(normalize4)); + lastSplit = { + f, + isWindows, + preserveMultipleSlashes, + normalize: normalize4, + parts + }; + return lastSplit; + } + // resolve `.` and `..` portions of a path, for level 2 + #levelTwoFileOptimize(file) { + const parts = [...file]; let didSomething = false; do { didSomething = false; @@ -192095,13 +192833,14 @@ var Minimatch = class { parts.pop(); } } - let dd = 0; + const root = this.#rootIndex(parts) + 1; + let dd = root; while (-1 !== (dd = parts.indexOf("..", dd + 1))) { const p = parts[dd - 1]; - if (p && p !== "." && p !== ".." && p !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p))) { + if (p && p !== "." && p !== ".." && p !== "**") { didSomething = true; parts.splice(dd - 1, 2); - dd -= 2; + dd = Math.max(dd - 2, root); } } } while (didSomething); @@ -192126,6 +192865,9 @@ var Minimatch = class { // **/*/ -> */**/ <== not valid because ** doesn't follow // this WOULD be allowed if ** did follow symlinks, or * didn't firstPhasePreProcess(globParts) { + const { braceExpandMax = DEFAULT_BRACE_EXPAND_MAX } = this.options; + let splitCells = 0; + const maxSplitCells = 1e6; let didSomething = false; do { didSomething = false; @@ -192147,10 +192889,15 @@ var Minimatch = class { if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") { continue; } + const addedCells = parts.length - 1; + if (globParts.length >= braceExpandMax || splitCells + addedCells > maxSplitCells) { + throw new RangeError(`optimizationLevel 2: too many patterns from '**/..'`); + } didSomething = true; parts.splice(gs, 1); const other = parts.slice(0); other[gs] = "**"; + splitCells += addedCells; globParts.push(other); gs--; } @@ -192170,7 +192917,8 @@ var Minimatch = class { parts.pop(); } } - let dd = 0; + const root = this.#rootIndex(parts) + 1; + let dd = root; while (-1 !== (dd = parts.indexOf("..", dd + 1))) { const p = parts[dd - 1]; if (p && p !== "." && p !== ".." && p !== "**") { @@ -192180,7 +192928,7 @@ var Minimatch = class { parts.splice(dd - 1, 2, ...splin); if (parts.length === 0) parts.push(""); - dd -= 2; + dd = Math.max(dd - 2, root); } } } @@ -192188,60 +192936,53 @@ var Minimatch = class { return globParts; } // second phase: multi-pattern dedupes - // {
/*/,
/

/} ->

/*/
   // {
/,
/} -> 
/
-  // {
/**/,
/} -> 
/**/
-  //
-  // {
/**/,
/**/

/} ->

/**/
-  // ^-- not valid because ** doens't follow symlinks
+  // {
/*/,
/

/} ->

/*/
   secondPhasePreProcess(globParts) {
-    for (let i = 0; i < globParts.length - 1; i++) {
-      for (let j = i + 1; j < globParts.length; j++) {
-        const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
-        if (matched) {
-          globParts[i] = [];
-          globParts[j] = matched;
-          break;
+    const keys = /* @__PURE__ */ new Set();
+    const rows = globParts.filter((parts) => {
+      const key = parts.join("/");
+      if (keys.has(key))
+        return false;
+      keys.add(key);
+      return true;
+    });
+    const stars = /* @__PURE__ */ new Map();
+    for (const parts of rows) {
+      const s = [];
+      for (let i = 0; i < parts.length; i++) {
+        if (parts[i] === "*")
+          s.push(i);
+      }
+      if (s.length)
+        stars.set(s.join(","), s);
+    }
+    if (!stars.size || rows.length * stars.size > 1e5)
+      return rows;
+    const { dot } = this.options;
+    return rows.filter((parts) => {
+      for (const s of stars.values()) {
+        if (s[s.length - 1] >= parts.length)
+          continue;
+        const c = [...parts];
+        let ok = true;
+        let changed = false;
+        for (const i of s) {
+          const p = parts[i];
+          if (p === "*")
+            continue;
+          if (!p || p === "**" || !dot && p.startsWith(".")) {
+            ok = false;
+            break;
+          }
+          c[i] = "*";
+          changed = true;
         }
-      }
-    }
-    return globParts.filter((gs) => gs.length);
-  }
-  partsMatch(a, b, emptyGSMatch = false) {
-    let ai = 0;
-    let bi = 0;
-    let result = [];
-    let which10 = "";
-    while (ai < a.length && bi < b.length) {
-      if (a[ai] === b[bi]) {
-        result.push(which10 === "b" ? b[bi] : a[ai]);
-        ai++;
-        bi++;
-      } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
-        result.push(a[ai]);
-        ai++;
-      } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
-        result.push(b[bi]);
-        bi++;
-      } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
-        if (which10 === "b")
-          return false;
-        which10 = "a";
-        result.push(a[ai]);
-        ai++;
-        bi++;
-      } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
-        if (which10 === "a")
+        if (ok && changed && keys.has(c.join("/")))
           return false;
-        which10 = "b";
-        result.push(b[bi]);
-        ai++;
-        bi++;
-      } else {
-        return false;
       }
-    }
-    return a.length === b.length && result;
+      return true;
+    });
   }
   parseNegate() {
     if (this.nonegate)
@@ -192257,15 +192998,28 @@ var Minimatch = class {
       this.pattern = pattern.slice(negateOffset);
     this.negate = negate2;
   }
-  // set partial to true to test if, for example,
-  // "/a/b" matches the start of "/*/b/*/d"
-  // Partial means, if you run out of file before you run
-  // out of pattern, then that's fine, as long as all
-  // the parts match.
-  matchOne(file, pattern, partial = false) {
+  // Match the parts of a path against one row of the set. `resolved`
+  // is the parts after level 2 resolves `.` and `..` in them, or the
+  // same parts below level 2. Set partial to true to test if, for
+  // example, "/a/b" matches the start of "/*/b/*/d". Partial means, if
+  // you run out of file before you run out of pattern, then that's
+  // fine, as long as all the parts match.
+  #matchRow(file, resolved, pattern, partial) {
     let fileStartIndex = 0;
     let patternStartIndex = 0;
-    if (this.isWindows) {
+    const fh = this.isWindows ? uncHost(resolved) : -1;
+    const ph = fh === -1 ? -1 : uncHost(pattern);
+    if (ph !== -1) {
+      const host = pattern[ph];
+      const share = pattern[ph + 1];
+      if (typeof host !== "string" || typeof share !== "string") {
+        fileStartIndex = fh;
+        patternStartIndex = ph;
+      } else if (resolved[fh].toLowerCase() === host.toLowerCase() && resolved[fh + 1].toLowerCase() === share.toLowerCase()) {
+        fileStartIndex = fh + 2;
+        patternStartIndex = ph + 2;
+      }
+    } else if (this.isWindows) {
       const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
       const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
       const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
@@ -192278,36 +193032,22 @@ var Minimatch = class {
           pattern[pdi]
         ];
         if (fd.toLowerCase() === pd.toLowerCase()) {
-          pattern[pdi] = fd;
-          patternStartIndex = pdi;
-          fileStartIndex = fdi;
+          patternStartIndex = pdi + 1;
+          fileStartIndex = fdi + 1;
         }
       }
     }
-    const { optimizationLevel = 1 } = this.options;
-    if (optimizationLevel >= 2) {
-      file = this.levelTwoFileOptimize(file);
-    }
+    file = resolved;
     if (pattern.includes(GLOBSTAR)) {
       return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
     }
     return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
   }
   #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
-    const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
-    const lastgs = pattern.lastIndexOf(GLOBSTAR);
-    const [head, body, tail] = partial ? [
-      pattern.slice(patternIndex, firstgs),
-      pattern.slice(firstgs + 1),
-      []
-    ] : [
-      pattern.slice(patternIndex, firstgs),
-      pattern.slice(firstgs + 1, lastgs),
-      pattern.slice(lastgs + 1)
-    ];
+    const { head, body, tail, segments } = this.#getGlobstarParts(pattern, partial, patternIndex);
     if (head.length) {
-      const fileHead = file.slice(fileIndex, fileIndex + head.length);
-      if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
+      const headEnd = fileIndex + head.length;
+      if (!this.#matchOne(file, head, partial, fileIndex, 0, headEnd)) {
         return false;
       }
       fileIndex += head.length;
@@ -192333,8 +193073,8 @@ var Minimatch = class {
     }
     if (!body.length) {
       let sawSome = !!fileTailMatch;
-      for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
-        const f = String(file[i2]);
+      for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
+        const f = String(file[i]);
         sawSome = true;
         if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
           return false;
@@ -192342,33 +193082,57 @@ var Minimatch = class {
       }
       return partial || sawSome;
     }
-    const bodySegments = [[[], 0]];
-    let currentBody = bodySegments[0];
+    return !!this.#matchGlobStarBodySections(file, segments, file.length - fileTailMatch, fileIndex, 0, partial, 0, !!fileTailMatch, /* @__PURE__ */ new Set());
+  }
+  // Split the pattern into head, tail, and middle of ** delimited
+  // parts. The tail has to be at the end, and the others just have to
+  // be found in order from the head. These only depend on the pattern
+  // row, so they are kept for the next path.
+  #getGlobstarParts(pattern, partial, patternIndex) {
+    let byStart = this.#globstarParts.get(pattern);
+    if (!byStart) {
+      byStart = [];
+      this.#globstarParts.set(pattern, byStart);
+    }
+    const key = patternIndex * 2 + (partial ? 1 : 0);
+    const found = byStart[key];
+    if (found)
+      return found;
+    const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
+    const lastgs = pattern.lastIndexOf(GLOBSTAR);
+    const head = pattern.slice(patternIndex, firstgs);
+    const body = pattern.slice(firstgs + 1, partial ? void 0 : lastgs);
+    const tail = partial ? [] : pattern.slice(lastgs + 1);
+    const segments = [[[], 0]];
+    let current = segments[0];
     let nonGsParts = 0;
     const nonGsPartsSums = [0];
     for (const b of body) {
       if (b === GLOBSTAR) {
         nonGsPartsSums.push(nonGsParts);
-        currentBody = [[], 0];
-        bodySegments.push(currentBody);
+        current = [[], 0];
+        segments.push(current);
       } else {
-        currentBody[0].push(b);
+        current[0].push(b);
         nonGsParts++;
       }
     }
-    let i = bodySegments.length - 1;
-    const fileLength = file.length - fileTailMatch;
-    for (const b of bodySegments) {
-      b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
-    }
-    return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
+    segments.forEach((b, i) => {
+      b[1] = nonGsParts - nonGsPartsSums[i];
+    });
+    const parts = { head, body, tail, segments };
+    byStart[key] = parts;
+    return parts;
   }
   // return false for "nope, not matching"
   // return null for "not matching, cannot keep trying"
-  #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
+  #matchGlobStarBodySections(file, bodySegments, fileLength, fileIndex, bodyIndex, partial, globStarDepth, sawTail, tried) {
     const bs = bodySegments[bodyIndex];
     if (!bs) {
-      for (let i = fileIndex; i < file.length; i++) {
+      if (partial) {
+        return fileIndex >= fileLength || fileIndex === fileLength - 1 && file[fileIndex] === "";
+      }
+      for (let i = fileIndex; i < fileLength; i++) {
         sawTail = true;
         const f = file[i];
         if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
@@ -192377,15 +193141,22 @@ var Minimatch = class {
       }
       return sawTail;
     }
-    const [body, after] = bs;
+    const [body, need] = bs;
+    const after = partial ? fileLength : fileLength - need;
     while (fileIndex <= after) {
-      const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
+      const key = bodyIndex * (file.length + 1) + fileIndex;
+      if (tried.has(key))
+        return false;
+      tried.add(key);
+      const m = this.#matchOne(file, body, partial, fileIndex, 0, fileIndex + body.length);
       if (m && globStarDepth < this.maxGlobstarRecursion) {
-        const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
+        const sub = this.#matchGlobStarBodySections(file, bodySegments, fileLength, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail, tried);
         if (sub !== false) {
           return sub;
         }
       }
+      if (fileIndex === after)
+        break;
       const f = file[fileIndex];
       if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
         return false;
@@ -192394,28 +193165,18 @@ var Minimatch = class {
     }
     return partial || null;
   }
-  #matchOne(file, pattern, partial, fileIndex, patternIndex) {
+  #matchOne(file, pattern, partial, fileIndex, patternIndex, fileEnd = file.length) {
     let fi;
     let pi;
     let pl;
     let fl;
-    for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
-      this.debug("matchOne loop");
+    for (fi = fileIndex, pi = patternIndex, fl = Math.min(fileEnd, file.length), pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
       let p = pattern[pi];
       let f = file[fi];
-      this.debug(pattern, p, f);
       if (p === false || p === GLOBSTAR) {
         return false;
       }
-      let hit;
-      if (typeof p === "string") {
-        hit = f === p;
-        this.debug("string match", p, f, hit);
-      } else {
-        hit = p.test(f);
-        this.debug("pattern match", p, f, hit);
-      }
-      if (!hit)
+      if (!portionMatch(p, f))
         return false;
     }
     if (fi === fl && pi === pl) {
@@ -192431,6 +193192,44 @@ var Minimatch = class {
   braceExpand() {
     return braceExpand(this.pattern, this.options);
   }
+  // Expand braces, except numeric ranges such as {0..999} with at
+  // least RANGE_MIN values. Each of those stays in its pattern as
+  // `0..999`, for the Matcher to test. If a range might
+  // be inside a [...] class, expand all of them instead.
+  #expandBraces() {
+    const { pattern } = this;
+    if (this.options.nobrace)
+      return this.braceExpand();
+    let code = 57344;
+    while (pattern.includes(String.fromCharCode(code))) {
+      if (++code > 63743)
+        return this.braceExpand();
+    }
+    const mark = String.fromCharCode(code);
+    let found = false;
+    const marked = pattern.replace(rangeRe, (m, lo, hi) => {
+      const a = Number(lo);
+      const b = Number(hi);
+      if (!Number.isSafeInteger(a) || !Number.isSafeInteger(b) || Math.abs(a - b) + 1 < RANGE_MIN) {
+        return m;
+      }
+      found = true;
+      return `${mark}${lo}..${hi}${mark}`;
+    });
+    if (!found)
+      return this.braceExpand();
+    const set = braceExpand(marked, this.options);
+    for (const p of set) {
+      for (const portion of p.split("/")) {
+        const c = portion.indexOf("[");
+        if (c !== -1 && c < portion.lastIndexOf(mark)) {
+          return this.braceExpand();
+        }
+      }
+    }
+    this.#rangeMark = mark;
+    return set;
+  }
   parse(pattern) {
     assertValidPattern(pattern);
     const options = this.options;
@@ -192438,88 +193237,30 @@ var Minimatch = class {
       return GLOBSTAR;
     if (pattern === "")
       return "";
-    let m;
-    let fastTest = null;
-    if (m = pattern.match(starRE)) {
-      fastTest = options.dot ? starTestDot : starTest;
-    } else if (m = pattern.match(starDotExtRE)) {
-      fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
-    } else if (m = pattern.match(qmarksRE)) {
-      fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
-    } else if (m = pattern.match(starDotStarRE)) {
-      fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
-    } else if (m = pattern.match(dotStarRE)) {
-      fastTest = dotStarTest;
-    }
-    const re = AST.fromGlob(pattern, this.options).toMMPattern();
-    if (fastTest && typeof re === "object") {
-      Reflect.defineProperty(re, "test", { value: fastTest });
-    }
-    return re;
-  }
-  makeRe() {
-    if (this.regexp || this.regexp === false)
-      return this.regexp;
-    const set = this.set;
-    if (!set.length) {
-      this.regexp = false;
-      return this.regexp;
-    }
-    const options = this.options;
-    const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
-    const flags = new Set(options.nocase ? ["i"] : []);
-    let re = set.map((pattern) => {
-      const pp = pattern.map((p) => {
-        if (p instanceof RegExp) {
-          for (const f of p.flags.split(""))
-            flags.add(f);
-        }
-        return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
-      });
-      pp.forEach((p, i) => {
-        const next = pp[i + 1];
-        const prev = pp[i - 1];
-        if (p !== GLOBSTAR || prev === GLOBSTAR) {
-          return;
-        }
-        if (prev === void 0) {
-          if (next !== void 0 && next !== GLOBSTAR) {
-            pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
-          } else {
-            pp[i] = twoStar;
-          }
-        } else if (next === void 0) {
-          pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
-        } else if (next !== GLOBSTAR) {
-          pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
-          pp[i + 1] = GLOBSTAR;
-        }
+    const { nocase, nocaseMagicOnly, noext = false, dot, normalize: normalize4 } = options;
+    const rangeMark = this.#rangeMark;
+    const lit2 = rangeMark && pattern.includes(rangeMark) ? void 0 : literal(pattern, noext);
+    if (lit2 !== void 0 && !(nocase && !nocaseMagicOnly && pattern.toUpperCase() !== pattern.toLowerCase())) {
+      return this.#norm(lit2);
+    }
+    if (this.#pending)
+      return PENDING;
+    let m = this.#matchers.get(pattern);
+    if (!m) {
+      if (!noext)
+        assertValidExtglobs(pattern);
+      m = new Matcher(pattern, {
+        nocase,
+        noext,
+        dot,
+        normalize: normalize4,
+        ...rangeMark && { rangeMark }
       });
-      const filtered = pp.filter((p) => p !== GLOBSTAR);
-      if (this.partial && filtered.length >= 1) {
-        const prefixes = [];
-        for (let i = 1; i <= filtered.length; i++) {
-          prefixes.push(filtered.slice(0, i).join("/"));
-        }
-        return "(?:" + prefixes.join("|") + ")";
-      }
-      return filtered.join("/");
-    }).join("|");
-    const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
-    re = "^" + open + re + close + "$";
-    if (this.partial) {
-      re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
-    }
-    if (this.negate)
-      re = "^(?!" + re + ").+$";
-    try {
-      this.regexp = new RegExp(re, [...flags].join(""));
-    } catch {
-      this.regexp = false;
+      this.#matchers.set(pattern, m);
     }
-    return this.regexp;
+    return m;
   }
-  slashSplit(p) {
+  #slashSplit(p) {
     if (this.preserveMultipleSlashes) {
       return p.split("/");
     } else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
@@ -192529,7 +193270,6 @@ var Minimatch = class {
     }
   }
   match(f, partial = this.partial) {
-    this.debug("match", f, this.pattern);
     if (this.comment) {
       return false;
     }
@@ -192540,25 +193280,31 @@ var Minimatch = class {
       return true;
     }
     const options = this.options;
-    if (this.isWindows) {
-      f = f.split("\\").join("/");
-    }
-    const ff = this.slashSplit(f);
-    this.debug(this.pattern, "split", ff);
+    let split = this.#cachedSplit(f);
+    if (!split) {
+      if (!partial && !this.#form && (this.#endCheck || this.#literalCheck) && lastChecked !== f) {
+        lastChecked = f;
+        const can = this.#canMatch(f);
+        if (can === "no")
+          return options.flipNegate ? false : this.negate;
+        if (can === "yes")
+          return options.flipNegate ? true : !this.negate;
+      }
+      split = this.#split(f);
+    }
+    const ff = split.parts;
+    const resolved = this.#level2 ? split.resolved ??= this.#levelTwoFileOptimize(ff) : ff;
     const set = this.set;
-    this.debug(this.pattern, "set", set);
     let filename = ff[ff.length - 1];
     if (!filename) {
       for (let i = ff.length - 2; !filename && i >= 0; i--) {
         filename = ff[i];
       }
     }
-    for (const pattern of set) {
-      let file = ff;
-      if (options.matchBase && pattern.length === 1) {
-        file = [filename];
-      }
-      const hit = this.matchOne(file, pattern, partial);
+    for (let r = 0; r < set.length; r++) {
+      const pattern = set[r];
+      const shape = partial ? void 0 : this.#shapes[r];
+      const hit = shape === "base" ? portionMatch(pattern[0], filename) : shape ? this.#matchShape(resolved, pattern, shape) : options.matchBase && pattern.length === 1 ? this.#matchRow([filename], [filename], pattern, partial) : this.#matchRow(ff, resolved, pattern, partial);
       if (hit) {
         if (options.flipNegate) {
           return true;
@@ -192575,7 +193321,6 @@ var Minimatch = class {
     return minimatch.defaults(def).Minimatch;
   }
 };
-minimatch.AST = AST;
 minimatch.Minimatch = Minimatch;
 minimatch.escape = escape2;
 minimatch.unescape = unescape2;
@@ -196861,14 +197606,14 @@ async function maybeUploadFailedSarifArtifact(config, features, logger2) {
   const failedSarif = failedSarifResult.value;
   return uploadSarifArtifact(logger2, "sarif-artifact", failedSarif);
 }
-async function uploadSarifArtifact(logger2, prefix, failedSarif) {
+async function uploadSarifArtifact(logger2, prefix2, failedSarif) {
   logger2.startGroup(`Uploading failed SARIF file as artifact`);
   logger2.info(`Uploading '${failedSarif.sarifFile}' as artifact`);
   try {
     const gitHubVersion = await getGitHubVersion();
     const client = await getArtifactUploaderClient(logger2, gitHubVersion.type);
     const suffix = getArtifactSuffix(getOptionalInput("matrix"));
-    const name = sanitizeArtifactName(`${prefix}-${suffix}`);
+    const name = sanitizeArtifactName(`${prefix2}-${suffix}`);
     await client.uploadArtifact(
       name,
       [import_path8.default.normalize(failedSarif.sarifFile)],
@@ -196992,7 +197737,7 @@ async function recordOverlayStatus(codeql, config, features, jobStatus, env, log
   }
   if (!isConclusiveJobStatus(jobStatus) && !didCodeQlReportError(env)) {
     logger2.info(
-      `Not recording an improved incremental analysis failure for this job because the job status (${jobStatus ?? "unset"}) does not tell us whether the analysis itself failed.`
+      `Not recording an overlay analysis failure for this job because the job status (${jobStatus ?? "unset"}) does not tell us whether the analysis itself failed.`
     );
     return;
   }
@@ -197019,14 +197764,14 @@ async function recordOverlayStatus(codeql, config, features, jobStatus, env, log
     overlayStatus,
     logger2
   );
-  const blurb = "This job attempted to run with improved incremental analysis but it did not complete successfully. One possible reason for this is disk space constraints, since improved incremental analysis can require a significant amount of disk space for some repositories.";
+  const blurb = "This job attempted to run with overlay analysis but it did not complete successfully. One possible reason for this is disk space constraints, since overlay analysis can require a significant amount of disk space for some repositories.";
   if (saved) {
     logger2.error(
-      `${blurb} This failure has been recorded in the Actions cache, so the next CodeQL analysis will run without improved incremental analysis. If you want to enable improved incremental analysis, try increasing the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.`
+      `${blurb} This failure has been recorded in the Actions cache, so the next CodeQL analysis will run without overlay analysis. If you want to enable overlay analysis, try increasing the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.`
     );
   } else {
     logger2.error(
-      `${blurb} The attempt to save this failure status to the Actions cache failed. The Action will attempt to run with improved incremental analysis again.`
+      `${blurb} The attempt to save this failure status to the Actions cache failed. The Action will attempt to run with overlay analysis again.`
     );
   }
 }
diff --git a/package-lock.json b/package-lock.json
index 7d304ee0fc..70838f9295 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "codeql",
-  "version": "4.39.4",
+  "version": "4.39.5",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "codeql",
-      "version": "4.39.4",
+      "version": "4.39.5",
       "license": "MIT",
       "workspaces": [
         "pr-checks"
@@ -1789,9 +1789,9 @@
       }
     },
     "node_modules/@isaacs/nonrecursive-glob-match": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.0.2.tgz",
-      "integrity": "sha512-GJPHIgPPtFl+nLhFHyF0zZoFcOFLsZWbHFFzo+Zr+PWDXJbl9hHxb2w+9SiF2fHmLgKaXIpUzQo3SbBBZ9WObw==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
+      "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
       "license": "BlueOak-1.0.0"
     },
     "node_modules/@mapbox/node-pre-gyp": {
@@ -5412,16 +5412,17 @@
       }
     },
     "node_modules/eslint-plugin-import-x/node_modules/minimatch": {
-      "version": "10.2.4",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
-      "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
+      "version": "11.0.8",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.8.tgz",
+      "integrity": "sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "brace-expansion": "^5.0.2"
+        "@isaacs/nonrecursive-glob-match": "^1.1.0",
+        "brace-expansion": "^5.0.12"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -6337,16 +6338,16 @@
       }
     },
     "node_modules/glob/node_modules/minimatch": {
-      "version": "11.0.2",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.2.tgz",
-      "integrity": "sha512-pWTgz5CN3tjqyZNSK2tePlSmu9IwM41q8yn8Usdqqwe9TIHh+9dEpLLjF4uApsfPEAZY71qtSiA2B2APEr+1Yw==",
+      "version": "11.0.8",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.8.tgz",
+      "integrity": "sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==",
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@isaacs/nonrecursive-glob-match": "^1.0.2",
+        "@isaacs/nonrecursive-glob-match": "^1.1.0",
         "brace-expansion": "^5.0.12"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -8814,15 +8815,15 @@
       }
     },
     "node_modules/readdir-glob": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-3.0.0.tgz",
-      "integrity": "sha512-AhNB2KgKeVJr16nK9LLZbJNWnYoT23ZrumNKFDebHBdkC8KHSqWo871JAUhoWC/RtjEVdqNMFpM6qrwRbaUqpw==",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-4.0.0.tgz",
+      "integrity": "sha512-TG+tPOT85yLmgnlsp6xIu7/cOZsFYs74utMOZRahGQ1HAm3QGT63MSUD64WyzbQg/WN8hciv/+43XTzeIgn83w==",
       "license": "Apache-2.0",
       "dependencies": {
-        "minimatch": "^10.2.2"
+        "minimatch": "^11.0.1"
       },
       "engines": {
-        "node": ">=18"
+        "node": ">=20"
       },
       "funding": {
         "url": "https://github.com/sponsors/yqnn"
@@ -8838,9 +8839,9 @@
       }
     },
     "node_modules/readdir-glob/node_modules/brace-expansion": {
-      "version": "5.0.12",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
-      "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
+      "version": "5.0.13",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz",
+      "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==",
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^4.0.2"
@@ -8850,15 +8851,16 @@
       }
     },
     "node_modules/readdir-glob/node_modules/minimatch": {
-      "version": "10.2.5",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
-      "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
+      "version": "11.0.8",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.8.tgz",
+      "integrity": "sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==",
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "brace-expansion": "^5.0.5"
+        "@isaacs/nonrecursive-glob-match": "^1.1.0",
+        "brace-expansion": "^5.0.12"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
diff --git a/package.json b/package.json
index 3995a236c7..64d593f780 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "codeql",
-  "version": "3.39.4",
+  "version": "3.39.5",
   "private": true,
   "description": "CodeQL action",
   "scripts": {
@@ -90,6 +90,9 @@
     "@octokit/plugin-paginate-rest": {
       "semver": ">=9.2.2"
     },
+    "archiver@^8.0.0": {
+      "readdir-glob": "^4.0.0"
+    },
     "eslint-plugin-import": {
       "semver": ">=6.3.1"
     },
diff --git a/pr-checks/deflake.test.ts b/pr-checks/deflake.test.ts
new file mode 100644
index 0000000000..131ed98f16
--- /dev/null
+++ b/pr-checks/deflake.test.ts
@@ -0,0 +1,142 @@
+#!/usr/bin/env npx tsx
+
+/*
+Tests for `deflake.ts`.
+*/
+
+import * as assert from "node:assert/strict";
+import { describe, it } from "node:test";
+
+import { escapeWorkflowName, setWorkflowRunWorkflows } from "./deflake";
+
+describe("escapeWorkflowName", async () => {
+  await it("escapes the characters that filter patterns treat as glob syntax", () => {
+    assert.equal(
+      escapeWorkflowName(
+        String.raw`!Name with C/C++, [a-z]?, *, ! and \ in it`,
+      ),
+      String.raw`\!Name with C/C\+\+, \[a-z]\?, \*, \! and \\ in it`,
+    );
+  });
+
+  await it("leaves names without glob syntax unchanged", () => {
+    const name = "PR Check - Upload-sarif: 'ref' and `sha` (Linux) ]";
+    assert.equal(escapeWorkflowName(name), name);
+  });
+});
+
+describe("setWorkflowRunWorkflows", async () => {
+  await it("replaces the list with sorted, escaped names and leaves the rest of the workflow unchanged", () => {
+    const workflow = `on:
+  workflow_run:
+    types: [completed]
+    # A comment about the list.
+    workflows:
+      - Existing workflow
+      # A comment within the list.
+      - "Removed workflow"
+
+jobs:
+  rerun:
+    if: |-
+      github.event.workflow_run.conclusion == 'failure' &&
+      github.event.workflow_run.run_attempt == 1
+`;
+    assert.equal(
+      setWorkflowRunWorkflows(workflow, [
+        "PR Check - b",
+        "PR Check - C/C++",
+        "Existing workflow",
+        "PR Check - a",
+      ]),
+      String.raw`on:
+  workflow_run:
+    types: [completed]
+    # A comment about the list.
+    workflows:
+      - "Existing workflow"
+      - "PR Check - a"
+      - "PR Check - b"
+      - "PR Check - C/C\\+\\+"
+
+jobs:
+  rerun:
+    if: |-
+      github.event.workflow_run.conclusion == 'failure' &&
+      github.event.workflow_run.run_attempt == 1
+`,
+    );
+  });
+
+  await it("uses single quotes only for patterns that contain double quotes and no backslashes", () => {
+    // These are the quotes that Prettier uses when formatting these strings.
+    assert.equal(
+      setWorkflowRunWorkflows(
+        "on:\n  workflow_run:\n    workflows:\n      - Old\n",
+        ['Upload "quoted" SARIF', `It's "quoted"`, 'C++ "quoted"'],
+      ),
+      String.raw`on:
+  workflow_run:
+    workflows:
+      - "C\\+\\+ \"quoted\""
+      - 'It''s "quoted"'
+      - 'Upload "quoted" SARIF'
+`,
+    );
+  });
+
+  await it("leaves comments and keys after the last item unchanged", () => {
+    const after = `      # A comment after the list.
+
+    branches: [main]
+`;
+    assert.equal(
+      setWorkflowRunWorkflows(
+        `on:\n  workflow_run:\n    workflows:\n      - Old\n${after}`,
+        ["New"],
+      ),
+      `on:\n  workflow_run:\n    workflows:\n      - "New"\n${after}`,
+    );
+  });
+
+  await it("returns an up-to-date workflow unchanged", () => {
+    const workflow = String.raw`on:
+  workflow_run:
+    workflows:
+      - "C/C\\+\\+"
+      - "Other"
+`;
+    assert.equal(
+      setWorkflowRunWorkflows(workflow, ["Other", "C/C++"]),
+      workflow,
+    );
+  });
+
+  await it("writes a flow sequence as a block sequence", () => {
+    assert.equal(
+      setWorkflowRunWorkflows("on:\n  workflow_run:\n    workflows: [Old]\n", [
+        "New",
+      ]),
+      'on:\n  workflow_run:\n    workflows:\n      - "New"\n',
+    );
+  });
+
+  await it("throws if the workflow isn't valid YAML", () => {
+    // Duplicate keys are an error in the `yaml` library, though Prettier accepts them.
+    assert.throws(
+      () =>
+        setWorkflowRunWorkflows(
+          "on:\n  workflow_run:\n    workflows:\n      - Old\njobs: {}\njobs: {}\n",
+          ["New"],
+        ),
+      /Failed to parse the workflow: .* at line 6, column 1/,
+    );
+  });
+
+  await it("throws if the workflow has no workflow_run trigger", () => {
+    assert.throws(
+      () => setWorkflowRunWorkflows("on:\n  push: {}\n", ["Other"]),
+      /Expected `on.workflow_run.workflows` to be a sequence/,
+    );
+  });
+});
diff --git a/pr-checks/deflake.ts b/pr-checks/deflake.ts
new file mode 100644
index 0000000000..a682ae2028
--- /dev/null
+++ b/pr-checks/deflake.ts
@@ -0,0 +1,111 @@
+import * as fs from "fs";
+import * as path from "path";
+
+import * as yaml from "yaml";
+
+import { REPO_ROOT } from "./config";
+
+/** The path of the workflow that reruns failed jobs in other workflows. */
+const DEFLAKE_WORKFLOW_FILE = path.join(
+  REPO_ROOT,
+  ".github",
+  "workflows",
+  "deflake.yml",
+);
+
+/**
+ * The names of workflows that `sync.ts` doesn't generate, but whose failed jobs the Deflake
+ * workflow should rerun.
+ *
+ * Exclude workflows that have significant side effects, like publishing releases. It's OK to retry
+ * CodeQL analysis.
+ */
+const NON_GENERATED_WORKFLOWS_TO_RERUN = [
+  "Check Expected Release Files",
+  "Code-Scanning config CLI tests",
+  "CodeQL action",
+  "PR Check - Debug artifact upload",
+  "PR Check - Debug artifacts after failure",
+  "PR Checks",
+  "Query filters tests",
+  "Test that the workaround for python 3.12 on windows works",
+];
+
+/**
+ * Escapes the characters in a workflow name that `on.workflow_run.workflows` would otherwise treat
+ * as glob syntax.
+ *
+ * @returns A pattern that matches only the workflow called `name`.
+ */
+export function escapeWorkflowName(name: string): string {
+  // These are the characters that can be escaped in GitHub Actions filter patterns. `]` is only
+  // special after an unescaped `[`, so it doesn't need escaping.
+  return name.replace(/[\\[?*+!]/g, "\\$&");
+}
+
+/**
+ * Replaces the items in the `on.workflow_run.workflows` list of a workflow, and any comments on
+ * their lines or between them, with patterns that match the workflows called `workflowNames`,
+ * sorted by name. The list is written as a block sequence.
+ *
+ * The whole workflow is rewritten with the `yaml` library, so any other parts that aren't
+ * formatted the way that library formats them are reformatted, for example by joining lines of
+ * folded (`>`) block scalars. Prettier, which checks the formatting of YAML files in this
+ * repository, formats non-empty flow mappings, and flow sequences that don't fit within 80
+ * columns, differently from that library, so the workflow is expected not to contain any.
+ *
+ * @param workflow The contents of the workflow file.
+ * @param workflowNames The names of the workflows that should trigger the workflow.
+ * @returns The updated contents of the workflow file.
+ * @throws If the workflow isn't valid YAML, or `on.workflow_run.workflows` isn't a sequence.
+ */
+export function setWorkflowRunWorkflows(
+  workflow: string,
+  workflowNames: string[],
+): string {
+  const document = yaml.parseDocument(workflow);
+  if (document.errors.length > 0) {
+    throw new Error(
+      `Failed to parse the workflow: ${document.errors[0].message}`,
+    );
+  }
+  const workflows = document.getIn(["on", "workflow_run", "workflows"], true);
+  if (!yaml.isSeq(workflows)) {
+    throw new Error("Expected `on.workflow_run.workflows` to be a sequence.");
+  }
+
+  workflows.flow = false;
+  workflows.items = workflowNames
+    .toSorted((a, b) => a.localeCompare(b, "en"))
+    .map((name) => {
+      const pattern = escapeWorkflowName(name);
+      const item = new yaml.Scalar(pattern);
+      // Quote the pattern in the same way as Prettier, which uses single quotes for strings that
+      // contain `"` but no `\`, and double quotes otherwise.
+      item.type =
+        pattern.includes('"') && !pattern.includes("\\")
+          ? yaml.Scalar.QUOTE_SINGLE
+          : yaml.Scalar.QUOTE_DOUBLE;
+      return item;
+    });
+  // These options match how Prettier formats short flow sequences, such as `[completed]`, and long
+  // strings.
+  return document.toString({ flowCollectionPadding: false, lineWidth: 0 });
+}
+
+/**
+ * Updates the Deflake workflow so that it reruns failed jobs in the workflows called
+ * `generatedWorkflowNames` and in {@link NON_GENERATED_WORKFLOWS_TO_RERUN}.
+ */
+export function updateDeflakeWorkflow(generatedWorkflowNames: string[]): void {
+  console.log(`Updating the list of workflows in '${DEFLAKE_WORKFLOW_FILE}'.`);
+  const workflow = fs.readFileSync(DEFLAKE_WORKFLOW_FILE, "utf8");
+  fs.writeFileSync(
+    DEFLAKE_WORKFLOW_FILE,
+    setWorkflowRunWorkflows(workflow, [
+      ...generatedWorkflowNames,
+      ...NON_GENERATED_WORKFLOWS_TO_RERUN,
+    ]),
+    "utf8",
+  );
+}
diff --git a/pr-checks/readme.md b/pr-checks/readme.md
index 81eff0cdaf..d3eb9bd1f6 100644
--- a/pr-checks/readme.md
+++ b/pr-checks/readme.md
@@ -6,7 +6,7 @@ to one of the files in this directory.
 
 ## Updating workflows
 
-Run `./sync.sh` to invoke the workflow generator and re-generate the workflow files in `.github/workflows/` based on the templates in `pr-checks/checks/`.
+Run `./sync.sh` to invoke the workflow generator and re-generate the workflow files in `.github/workflows/` based on the templates in `pr-checks/checks/`. This also updates the list of workflows whose failed jobs `.github/workflows/deflake.yml` reruns.
 
 Alternatively, you can use `just`:
 
diff --git a/pr-checks/sync.ts b/pr-checks/sync.ts
index ec8d5a57c3..885be20625 100755
--- a/pr-checks/sync.ts
+++ b/pr-checks/sync.ts
@@ -8,6 +8,7 @@ import * as yaml from "yaml";
 import { BuiltInLanguage } from "../src/languages";
 
 import { PR_CHECKS_DIR, REPO_ROOT } from "./config";
+import { updateDeflakeWorkflow } from "./deflake";
 
 /**
  * Returns a `uses` value for `action` pinned to a commit SHA, with the
@@ -747,6 +748,7 @@ function main(): void {
 
   console.log(`Found ${checkFiles.length} check specification(s).`);
 
+  const generatedWorkflowNames: string[] = [];
   const collections: Record<
     string,
     Array<{
@@ -834,6 +836,7 @@ function main(): void {
 
     const outputPath = path.join(OUTPUT_DIR, `__${checkName}.yml`);
     writeYaml(outputPath, workflow);
+    generatedWorkflowNames.push(workflow.name);
   }
 
   // Write workflow files for collections.
@@ -878,8 +881,11 @@ function main(): void {
 
     const outputPath = path.join(OUTPUT_DIR, `__${collectionName}.yml`);
     writeYaml(outputPath, collectionWorkflow);
+    generatedWorkflowNames.push(collectionWorkflow.name);
   }
 
+  updateDeflakeWorkflow(generatedWorkflowNames);
+
   console.log(
     `\nDone. Wrote ${checkFiles.length} workflow file(s) to ${OUTPUT_DIR}`,
   );
diff --git a/src/defaults.json b/src/defaults.json
index 23dd3f7e8e..2901191dc2 100644
--- a/src/defaults.json
+++ b/src/defaults.json
@@ -1,6 +1,6 @@
 {
-  "bundleVersion": "codeql-bundle-v2.27.5",
-  "cliVersion": "2.27.5",
-  "priorBundleVersion": "codeql-bundle-v2.27.4",
-  "priorCliVersion": "2.27.4"
+  "bundleVersion": "codeql-bundle-v2.27.6",
+  "cliVersion": "2.27.6",
+  "priorBundleVersion": "codeql-bundle-v2.27.5",
+  "priorCliVersion": "2.27.5"
 }
diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts
index 060592cac2..76f55969f0 100644
--- a/src/init-action-post-helper.ts
+++ b/src/init-action-post-helper.ts
@@ -541,7 +541,7 @@ async function recordOverlayStatus(
   // one if a CodeQL Action reported an error before the job ended.
   if (!isConclusiveJobStatus(jobStatus) && !didCodeQlReportError(env)) {
     logger.info(
-      "Not recording an improved incremental analysis failure for this job because the job " +
+      "Not recording an overlay analysis failure for this job because the job " +
         `status (${jobStatus ?? "unset"}) does not tell us whether the analysis itself failed.`,
     );
     return;
@@ -576,15 +576,15 @@ async function recordOverlayStatus(
   );
 
   const blurb =
-    "This job attempted to run with improved incremental analysis but it did not complete successfully. " +
-    "One possible reason for this is disk space constraints, since improved incremental analysis can " +
+    "This job attempted to run with overlay analysis but it did not complete successfully. " +
+    "One possible reason for this is disk space constraints, since overlay analysis can " +
     "require a significant amount of disk space for some repositories.";
 
   if (saved) {
     logger.error(
       `${blurb} ` +
         "This failure has been recorded in the Actions cache, so the next CodeQL analysis will run " +
-        "without improved incremental analysis. If you want to enable improved incremental analysis, " +
+        "without overlay analysis. If you want to enable overlay analysis, " +
         "try increasing the disk space available to the runner. " +
         "If that doesn't help, contact GitHub Support for further assistance.",
     );
@@ -592,7 +592,7 @@ async function recordOverlayStatus(
     logger.error(
       `${blurb} ` +
         "The attempt to save this failure status to the Actions cache failed. The Action will attempt to " +
-        "run with improved incremental analysis again.",
+        "run with overlay analysis again.",
     );
   }
 }
diff --git a/src/overlay/diagnostics.ts b/src/overlay/diagnostics.ts
index 4b716c3df8..c9b39fa6c1 100644
--- a/src/overlay/diagnostics.ts
+++ b/src/overlay/diagnostics.ts
@@ -84,18 +84,18 @@ export async function addOverlayDisablementDiagnostics(
       config,
       makeDiagnostic(
         "codeql-action/overlay-disabled-due-to-cached-status",
-        "Skipped improved incremental analysis because it failed previously with similar hardware resources",
+        "Skipped overlay analysis because it failed previously with similar hardware resources",
         {
           attributes: {
             languages: config.languages,
           },
           markdownMessage:
-            `Improved incremental analysis was skipped because it previously failed for this repository ` +
+            `Overlay analysis was skipped because it previously failed for this repository ` +
             `with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. ` +
-            "One possible reason for this is that improved incremental analysis can require a significant amount of disk space for some repositories. " +
-            "If you want to try re-enabling improved incremental analysis, increase the disk space available " +
+            "One possible reason for this is that overlay analysis can require a significant amount of disk space for some repositories. " +
+            "If you want to try re-enabling overlay analysis, increase the disk space available " +
             "to the runner. If that doesn't help, contact GitHub Support for further assistance.\n\n" +
-            "Improved incremental analysis will be automatically retried when the next version of CodeQL is released. " +
+            "Overlay analysis will be automatically retried when the next version of CodeQL is released. " +
             `You can also manually trigger a retry by [removing](${DocUrl.DELETE_ACTIONS_CACHE_ENTRIES}) \`codeql-overlay-status-*\` entries from the Actions cache.`,
           severity: "note",
           visibility: {
@@ -115,15 +115,15 @@ export async function addOverlayDisablementDiagnostics(
       config,
       makeDiagnostic(
         "codeql-action/overlay-disabled-by-repository-property",
-        "Improved incremental analysis disabled by repository property",
+        "Overlay analysis disabled by repository property",
         {
           attributes: {
             languages: config.languages,
           },
           markdownMessage:
-            "Improved incremental analysis has been disabled because the " +
+            "Overlay analysis has been disabled because the " +
             `\`${RepositoryPropertyName.DISABLE_OVERLAY}\` repository property is set to \`true\`. ` +
-            "To re-enable improved incremental analysis, set this property to `false` or remove it.",
+            "To re-enable overlay analysis, set this property to `false` or remove it.",
           severity: "note",
           visibility: {
             cliSummaryTable: true,