From 7ea76400911cfe772ae93d51b5eba0bb1b12c918 Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Thu, 16 Apr 2026 20:28:26 +0200 Subject: [PATCH] Fix wildcard src input --- .github/workflows/test.yml | 30 + README.md | 22 +- .../fixtures/glob-project/pyproject.toml | 13 + __tests__/fixtures/glob-project/sub/main.py | 1 + .../glob-project/sub/nested/deeper.py | 1 + .../foo/bar/file_to_check.py | 1 + .../foo/file_to_ignore.py | 2 + .../glob-single-star-project/pyproject.toml | 13 + __tests__/utils/source-input.test.ts | 396 ++ action.yml | 2 +- dist/ruff-action/index.cjs | 3656 ++++++++++++++--- package-lock.json | 47 + package.json | 1 + src/ruff-action.ts | 23 +- src/utils/pyproject-finder.ts | 24 +- src/utils/source-input.ts | 252 ++ 16 files changed, 3977 insertions(+), 507 deletions(-) create mode 100644 __tests__/fixtures/glob-project/pyproject.toml create mode 100644 __tests__/fixtures/glob-project/sub/main.py create mode 100644 __tests__/fixtures/glob-project/sub/nested/deeper.py create mode 100644 __tests__/fixtures/glob-single-star-project/foo/bar/file_to_check.py create mode 100644 __tests__/fixtures/glob-single-star-project/foo/file_to_ignore.py create mode 100644 __tests__/fixtures/glob-single-star-project/pyproject.toml create mode 100644 __tests__/utils/source-input.test.ts create mode 100644 src/utils/source-input.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1ab75f..3f745a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -395,6 +395,34 @@ jobs: fi env: CHECK_SHOULD_FAIL_OUTCOME: ${{ steps.check-should-fail.outcome }} + test-glob-src: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Use glob pattern in src + uses: ./ + with: + src: __tests__/fixtures/glob-project/**/*.py + + test-glob-single-star-src: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Use single-star glob pattern in src + uses: ./ + with: + src: __tests__/fixtures/glob-single-star-project/foo/bar/*.py + test-multiple-src: runs-on: ${{ matrix.os }} strategy: @@ -479,6 +507,8 @@ jobs: - test-with-explicit-token - test-args - test-failure + - test-glob-src + - test-glob-single-star-src - test-multiple-src - test-parent-directory-pyproject - test-custom-manifest-file diff --git a/README.md b/README.md index aa5d2c2..3ebc88c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ anything `ruff` can (ex, fix). | `version-file` | The file to read the version from. See [Install a version from a specified version file](#install-a-version-from-a-specified-version-file) | None | | `manifest-file` | URL to a custom Ruff manifest in the `astral-sh/versions` format. | None | | `args` | The arguments to pass to the `ruff` command. See [Configuring Ruff] | `check` | -| `src` | The directory or single files to run `ruff` on. | [github.workspace] | +| `src` | Source path(s) to run `ruff` on. Supports glob patterns. | [github.workspace] | | `checksum` | The sha256 checksum of the downloaded artifact. | None | | `github-token` | The GitHub token to use when downloading Ruff release artifacts from GitHub. | `GITHUB_TOKEN` | @@ -56,6 +56,8 @@ By default, Ruff version metadata is resolved from the ### Specify multiple files +Separate multiple `src` values with whitespace. + ```yaml - uses: astral-sh/ruff-action@v3 with: @@ -64,6 +66,24 @@ By default, Ruff version metadata is resolved from the path/to/file2.py ``` +### Use glob patterns + +Glob patterns (`*`, `?`, `[...]`, and `**`) are expanded by the action using +`@actions/glob`, so they work consistently across Linux, macOS, and Windows +runners. Hidden files and directories are skipped by default; target them +explicitly, for example with `.venv/**/*.py`, to include them. + +```yaml +- uses: astral-sh/ruff-action@v3 + with: + src: "src/**/*.py" +``` + +> [!NOTE] +> When using multiple patterns, only the first is used to search for +> `pyproject.toml` to determine the Ruff version. Use the `version` input +> for explicit control. + ### Use to install ruff This action adds ruff to the PATH, so you can use it in subsequent steps. diff --git a/__tests__/fixtures/glob-project/pyproject.toml b/__tests__/fixtures/glob-project/pyproject.toml new file mode 100644 index 0000000..f8999d3 --- /dev/null +++ b/__tests__/fixtures/glob-project/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "pyython-project" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "ruff==0.6.2", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" diff --git a/__tests__/fixtures/glob-project/sub/main.py b/__tests__/fixtures/glob-project/sub/main.py new file mode 100644 index 0000000..11b15b1 --- /dev/null +++ b/__tests__/fixtures/glob-project/sub/main.py @@ -0,0 +1 @@ +print("hello") diff --git a/__tests__/fixtures/glob-project/sub/nested/deeper.py b/__tests__/fixtures/glob-project/sub/nested/deeper.py new file mode 100644 index 0000000..3a8df16 --- /dev/null +++ b/__tests__/fixtures/glob-project/sub/nested/deeper.py @@ -0,0 +1 @@ +print("deeper") diff --git a/__tests__/fixtures/glob-single-star-project/foo/bar/file_to_check.py b/__tests__/fixtures/glob-single-star-project/foo/bar/file_to_check.py new file mode 100644 index 0000000..372d2d1 --- /dev/null +++ b/__tests__/fixtures/glob-single-star-project/foo/bar/file_to_check.py @@ -0,0 +1 @@ +print("check me") diff --git a/__tests__/fixtures/glob-single-star-project/foo/file_to_ignore.py b/__tests__/fixtures/glob-single-star-project/foo/file_to_ignore.py new file mode 100644 index 0000000..ba51a4d --- /dev/null +++ b/__tests__/fixtures/glob-single-star-project/foo/file_to_ignore.py @@ -0,0 +1,2 @@ +# This file should be ignored when using foo/bar/*.py glob +print("ignore me") diff --git a/__tests__/fixtures/glob-single-star-project/pyproject.toml b/__tests__/fixtures/glob-single-star-project/pyproject.toml new file mode 100644 index 0000000..8a7200e --- /dev/null +++ b/__tests__/fixtures/glob-single-star-project/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "glob-single-star-project" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "ruff==0.6.2", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" diff --git a/__tests__/utils/source-input.test.ts b/__tests__/utils/source-input.test.ts new file mode 100644 index 0000000..d8231f3 --- /dev/null +++ b/__tests__/utils/source-input.test.ts @@ -0,0 +1,396 @@ +import * as fs from "node:fs/promises"; +import * as os from "node:os"; +import * as path from "node:path"; +import { afterEach, describe, expect, it, jest } from "@jest/globals"; + +jest.unstable_mockModule("@actions/core", () => ({ + debug: jest.fn(), + info: jest.fn(), +})); + +const { + expandSourceInput, + getSourceBasePath, + getVersionSourceDirectory, + splitInput, +} = await import("../../src/utils/source-input"); +const { findPyprojectToml } = await import("../../src/utils/pyproject-finder"); + +let tempDir: string | undefined; + +afterEach(async () => { + if (tempDir !== undefined) { + await fs.rm(tempDir, { force: true, recursive: true }); + tempDir = undefined; + } +}); + +async function createTempProject(): Promise { + tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "ruff-action-source-")); + await fs.mkdir(path.join(tempDir, "src", "package", "nested"), { + recursive: true, + }); + await fs.writeFile(path.join(tempDir, "src", "package", "__init__.py"), ""); + await fs.writeFile(path.join(tempDir, "src", "package", "main.py"), ""); + await fs.writeFile( + path.join(tempDir, "src", "package", "nested", "mod.py"), + "", + ); + await fs.writeFile(path.join(tempDir, "src", "package", "notes.txt"), ""); + await fs.mkdir(path.join(tempDir, "src", "pkg[legacy]"), { + recursive: true, + }); + await fs.writeFile(path.join(tempDir, "src", "pkg[legacy]", "main.py"), ""); + await fs.mkdir(path.join(tempDir, "src", "pkgl"), { recursive: true }); + await fs.writeFile(path.join(tempDir, "src", "pkgl", "main.py"), ""); + + return tempDir; +} + +describe("splitInput", () => { + it("splits whitespace-delimited inputs", () => { + expect(splitInput(" check --fix\n--diff ")).toEqual([ + "check", + "--fix", + "--diff", + ]); + }); + + it("returns an empty array for empty input", () => { + expect(splitInput(" \n\t ")).toEqual([]); + }); +}); + +describe("expandSourceInput", () => { + it("leaves non-glob sources unchanged", async () => { + await expect(expandSourceInput("src file.py")).resolves.toEqual([ + "src", + "file.py", + ]); + }); + + it("expands recursive globs without relying on shell behavior", async () => { + const projectDir = await createTempProject(); + const pattern = path.join(projectDir, "src", "**", "*.py"); + + await expect(expandSourceInput(pattern)).resolves.toEqual([ + path.join(projectDir, "src", "package", "__init__.py"), + path.join(projectDir, "src", "package", "main.py"), + path.join(projectDir, "src", "package", "nested", "mod.py"), + path.join(projectDir, "src", "pkg[legacy]", "main.py"), + path.join(projectDir, "src", "pkgl", "main.py"), + ]); + }); + + it("preserves relative source patterns as relative paths", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + + try { + process.chdir(projectDir); + await expect(expandSourceInput("src/**/*.py")).resolves.toEqual([ + path.join("src", "package", "__init__.py"), + path.join("src", "package", "main.py"), + path.join("src", "package", "nested", "mod.py"), + path.join("src", "pkg[legacy]", "main.py"), + path.join("src", "pkgl", "main.py"), + ]); + } finally { + process.chdir(originalCwd); + } + }); + + it("maps relative root glob matches to . instead of an empty argument", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + + try { + process.chdir(projectDir); + for (const pattern of ["**", "**/", "./**"]) { + const sources = await expandSourceInput(pattern); + + expect(sources).toContain("."); + expect(sources).not.toContain(""); + } + } finally { + process.chdir(originalCwd); + } + }); + + it("excludes hidden paths by default while allowing explicit hidden patterns", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + await fs.mkdir(path.join(projectDir, ".venv")); + await fs.writeFile(path.join(projectDir, ".venv", "ignored.py"), ""); + await fs.mkdir(path.join(projectDir, ".tox")); + await fs.writeFile(path.join(projectDir, ".tox", "ignored.py"), ""); + + try { + process.chdir(projectDir); + const defaultSources = await expandSourceInput("**/*.py"); + + expect(defaultSources).not.toContain(path.join(".venv", "ignored.py")); + expect(defaultSources).not.toContain(path.join(".tox", "ignored.py")); + await expect(expandSourceInput(".venv/**/*.py")).resolves.toEqual([ + path.join(".venv", "ignored.py"), + ]); + } finally { + process.chdir(originalCwd); + } + }); + + it("preserves unmatched globs for Ruff to report", async () => { + const projectDir = await createTempProject(); + const pattern = path.join(projectDir, "src", "**", "missing-*.py"); + + await expect(expandSourceInput(pattern)).resolves.toEqual([pattern]); + }); + + it("expands multiple sources in input order", async () => { + const projectDir = await createTempProject(); + const first = path.join(projectDir, "src", "package", "main.py"); + const second = path.join(projectDir, "src", "package", "nested", "*.py"); + + await expect(expandSourceInput(`${first} ${second}`)).resolves.toEqual([ + first, + path.join(projectDir, "src", "package", "nested", "mod.py"), + ]); + }); + + it("preserves existing literal paths that contain glob metacharacters", async () => { + const projectDir = await createTempProject(); + const source = path.join(projectDir, "src", "pkg[legacy]"); + + await expect(expandSourceInput(source)).resolves.toEqual([source]); + }); + + it("escapes existing literal path segments before later glob segments", async () => { + const projectDir = await createTempProject(); + const pattern = path.join(projectDir, "src", "pkg[legacy]", "*.py"); + + await expect(expandSourceInput(pattern)).resolves.toEqual([ + path.join(projectDir, "src", "pkg[legacy]", "main.py"), + ]); + }); + + it("escapes existing literal path segments that contain * or ?", async () => { + if (process.platform === "win32") { + return; + } + + const projectDir = await createTempProject(); + await fs.mkdir(path.join(projectDir, "src", "pkg*star")); + await fs.writeFile(path.join(projectDir, "src", "pkg*star", "main.py"), ""); + await fs.mkdir(path.join(projectDir, "src", "pkg-other-star")); + await fs.writeFile( + path.join(projectDir, "src", "pkg-other-star", "main.py"), + "", + ); + await fs.mkdir(path.join(projectDir, "src", "pkg?question")); + await fs.writeFile( + path.join(projectDir, "src", "pkg?question", "main.py"), + "", + ); + await fs.mkdir(path.join(projectDir, "src", "pkgxquestion")); + await fs.writeFile( + path.join(projectDir, "src", "pkgxquestion", "main.py"), + "", + ); + + await expect( + expandSourceInput(path.join(projectDir, "src", "pkg*star", "*.py")), + ).resolves.toEqual([path.join(projectDir, "src", "pkg*star", "main.py")]); + await expect( + expandSourceInput(path.join(projectDir, "src", "pkg?question", "*.py")), + ).resolves.toEqual([ + path.join(projectDir, "src", "pkg?question", "main.py"), + ]); + }); + + it("does not traverse symlinked directories", async () => { + const projectDir = await createTempProject(); + const externalDir = path.join(projectDir, "external"); + const symlinkPath = path.join(projectDir, "src", "linked"); + await fs.mkdir(externalDir); + await fs.writeFile(path.join(externalDir, "external.py"), ""); + await fs.symlink(externalDir, symlinkPath, "dir"); + + const sources = await expandSourceInput( + path.join(projectDir, "src", "**", "*.py"), + ); + + expect(sources).not.toContain(path.join(symlinkPath, "external.py")); + }); + + it("still expands missing paths that contain glob metacharacters", async () => { + const projectDir = await createTempProject(); + const pattern = path.join(projectDir, "src", "pkg[l]"); + + await expect(expandSourceInput(pattern)).resolves.toEqual([ + path.join(projectDir, "src", "pkgl"), + ]); + }); +}); + +describe("getVersionSourceDirectory", () => { + it("does not scan src globs when version input is explicit", async () => { + await expect( + getVersionSourceDirectory("../**/*.py", "0.1.0", undefined), + ).resolves.toBe("."); + }); + + it("does not scan src globs when version-file input is explicit", async () => { + await expect( + getVersionSourceDirectory("../**/*.py", undefined, "pyproject.toml"), + ).resolves.toBe("."); + }); + + it("uses source discovery when no version input is explicit", async () => { + await expect( + getVersionSourceDirectory("../**/*.py", undefined, undefined), + ).rejects.toThrow("Invalid pattern '../**/*.py'"); + }); +}); + +describe("getSourceBasePath", () => { + it("returns the directory for a plain path", async () => { + await expect(getSourceBasePath("my-project")).resolves.toBe("my-project"); + }); + + it("returns the directory for a dotted path", async () => { + await expect(getSourceBasePath("./src")).resolves.toBe("./src"); + }); + + it("strips glob pattern and returns parent directory", async () => { + await expect(getSourceBasePath("src/**/*.py")).resolves.toBe("src"); + }); + + it("returns . for a top-level glob", async () => { + await expect(getSourceBasePath("*.py")).resolves.toBe("."); + }); + + it("returns . for empty string", async () => { + await expect(getSourceBasePath("")).resolves.toBe("."); + }); + + it("uses only the first whitespace-delimited token", async () => { + await expect(getSourceBasePath("sub1/*.py sub2/")).resolves.toBe("sub1"); + }); + + it("handles trailing slash in prefix", async () => { + await expect(getSourceBasePath("sub/*.py")).resolves.toBe("sub"); + }); + + it("uses the parent directory when a glob appears in a filename", async () => { + await expect(getSourceBasePath("src/file*.py")).resolves.toBe("src"); + }); + + it("handles ? glob", async () => { + await expect(getSourceBasePath("file?.py")).resolves.toBe("."); + }); + + it("handles bracket glob", async () => { + await expect(getSourceBasePath("file[0-9].py")).resolves.toBe("."); + }); + + it("preserves existing literal base paths that contain glob metacharacters", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + + try { + process.chdir(projectDir); + await expect(getSourceBasePath("src/pkg[legacy]")).resolves.toBe( + "src/pkg[legacy]", + ); + await expect(getSourceBasePath("src/pkg[legacy]/*.py")).resolves.toBe( + path.join("src", "pkg[legacy]", "main.py"), + ); + } finally { + process.chdir(originalCwd); + } + }); + + it("keeps version discovery rooted in existing literal paths with glob metacharacters", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + const pyprojectPath = path.join( + projectDir, + "src", + "pkg[legacy]", + "pyproject.toml", + ); + await fs.writeFile( + pyprojectPath, + "[project]\ndependencies = ['ruff==0.6.2']\n", + ); + + try { + process.chdir(projectDir); + const sourceBasePath = await getSourceBasePath("src/pkg[legacy]/main.py"); + + expect(findPyprojectToml(sourceBasePath, projectDir)).toBe( + await fs.realpath(pyprojectPath), + ); + } finally { + process.chdir(originalCwd); + } + }); + + it("uses the first expanded glob match for version discovery", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + const pyprojectPath = path.join( + projectDir, + "packages", + "foo", + "pyproject.toml", + ); + await fs.mkdir(path.join(projectDir, "packages", "foo", "src"), { + recursive: true, + }); + await fs.writeFile( + pyprojectPath, + "[project]\ndependencies = ['ruff==0.10.0']\n", + ); + await fs.writeFile( + path.join(projectDir, "packages", "foo", "src", "module.py"), + "", + ); + + try { + process.chdir(projectDir); + const sourceBasePath = await getSourceBasePath("packages/*/src/**/*.py"); + + expect(sourceBasePath).toBe( + path.join("packages", "foo", "src", "module.py"), + ); + const workspaceRoot = await fs.realpath(projectDir); + expect(findPyprojectToml(sourceBasePath, workspaceRoot)).toBe( + await fs.realpath(pyprojectPath), + ); + } finally { + process.chdir(originalCwd); + } + }); + + it("uses the unmatched glob fallback when version-discovery glob has no matches", async () => { + const projectDir = await createTempProject(); + const originalCwd = process.cwd(); + await fs.mkdir(path.join(projectDir, "packages")); + + try { + process.chdir(projectDir); + await expect(getSourceBasePath("packages/*/src/**/*.py")).resolves.toBe( + "packages", + ); + } finally { + process.chdir(originalCwd); + } + }); + + it("does not treat brace expansion as glob syntax", async () => { + await expect(getSourceBasePath("src/{a,b}/*.py")).resolves.toBe( + "src/{a,b}", + ); + }); +}); diff --git a/action.yml b/action.yml index c63a362..5a11fc5 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ inputs: required: false default: "check" src: - description: "Source to run Ruff. Defaults to the current directory." + description: "Source path(s) or glob pattern(s) to run Ruff on. Defaults to the current workspace." required: false default: ${{ github.workspace }} version: diff --git a/dist/ruff-action/index.cjs b/dist/ruff-action/index.cjs index a3175c3..abe2404 100644 --- a/dist/ruff-action/index.cjs +++ b/dist/ruff-action/index.cjs @@ -34,7 +34,7 @@ var require_tunnel = __commonJS({ var http2 = require("http"); var https2 = require("https"); var events2 = require("events"); - var assert = require("assert"); + var assert4 = require("assert"); var util2 = require("util"); exports2.httpOverHttp = httpOverHttp2; exports2.httpsOverHttp = httpsOverHttp2; @@ -952,7 +952,7 @@ var require_tree = __commonJS({ var require_util = __commonJS({ "node_modules/undici/lib/core/util.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols(); var { IncomingMessage } = require("node:http"); var stream2 = require("node:stream"); @@ -971,7 +971,7 @@ var require_util = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert(!this[kBodyUsed], "disturbed"); + assert4(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -980,7 +980,7 @@ var require_util = __commonJS({ if (isStream(body)) { if (bodyLength(body) === 0) { body.on("data", function() { - assert(false); + assert4(false); }); } if (typeof body.readableDidRead !== "boolean") { @@ -1064,14 +1064,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path9 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path15 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path9 && path9[0] !== "/") { - path9 = `/${path9}`; + if (path15 && path15[0] !== "/") { + path15 = `/${path15}`; } - return new URL(`${origin}${path9}`); + return new URL(`${origin}${path15}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1088,7 +1088,7 @@ var require_util = __commonJS({ function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); - assert(idx2 !== -1); + assert4(idx2 !== -1); return host.substring(1, idx2); } const idx = host.indexOf(":"); @@ -1099,7 +1099,7 @@ var require_util = __commonJS({ if (!host) { return null; } - assert(typeof host === "string"); + assert4(typeof host === "string"); const servername = getHostname(host); if (net.isIP(servername)) { return ""; @@ -1352,9 +1352,9 @@ var require_util = __commonJS({ function isValidHeaderValue(characters) { return !headerCharRegex.test(characters); } - function parseRangeHeader(range) { - if (range == null || range === "") return { start: 0, end: null, size: null }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + function parseRangeHeader(range2) { + if (range2 == null || range2 === "") return { start: 0, end: null, size: null }; + const m = range2 ? range2.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; return m ? { start: parseInt(m[1]), end: m[2] ? parseInt(m[2]) : null, @@ -1376,7 +1376,7 @@ var require_util = __commonJS({ function errorRequest(client, request, err) { try { request.onError(err); - assert(request.aborted); + assert4(request.aborted); } catch (err2) { client.emit("error", err2); } @@ -1522,39 +1522,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path9, origin } + request: { method, path: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path9); + debuglog("sending request to %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path9, origin }, + request: { method, path: path15, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path9, + path15, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path9, origin } + request: { method, path: path15, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path9); + debuglog("trailers received from %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path9, origin }, + request: { method, path: path15, origin }, error: error2 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path9, + path15, error2.message ); }); @@ -1603,9 +1603,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path9, origin } + request: { method, path: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path9); + debuglog("sending request to %s %s/%s", method, origin, path15); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1647,7 +1647,7 @@ var require_request = __commonJS({ InvalidArgumentError, NotSupportedError } = require_errors(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { isValidHTTPToken, isValidHeaderValue, @@ -1668,7 +1668,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path9, + path: path15, method, body, headers, @@ -1683,11 +1683,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler) { - if (typeof path9 !== "string") { + if (typeof path15 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path9[0] !== "/" && !(path9.startsWith("http://") || path9.startsWith("https://")) && method !== "CONNECT") { + } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path9)) { + } else if (invalidPathRegex.test(path15)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -1753,7 +1753,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path9, query) : path9; + this.path = query ? buildURL(path15, query) : path15; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -1816,8 +1816,8 @@ var require_request = __commonJS({ } } onConnect(abort) { - assert(!this.aborted); - assert(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (this.error) { abort(this.error); } else { @@ -1829,8 +1829,8 @@ var require_request = __commonJS({ return this[kHandler].onResponseStarted?.(); } onHeaders(statusCode, headers, resume, statusText) { - assert(!this.aborted); - assert(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } @@ -1841,8 +1841,8 @@ var require_request = __commonJS({ } } onData(chunk) { - assert(!this.aborted); - assert(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); try { return this[kHandler].onData(chunk); } catch (err) { @@ -1851,13 +1851,13 @@ var require_request = __commonJS({ } } onUpgrade(statusCode, headers, socket) { - assert(!this.aborted); - assert(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { this.onFinally(); - assert(!this.aborted); + assert4(!this.aborted); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); @@ -2424,7 +2424,7 @@ var require_connect = __commonJS({ "node_modules/undici/lib/core/connect.js"(exports2, module2) { "use strict"; var net = require("node:net"); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var util2 = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var timers = require_timers(); @@ -2496,7 +2496,7 @@ var require_connect = __commonJS({ } servername = servername || options.servername || util2.getServerName(host) || null; const sessionKey = servername || hostname; - assert(sessionKey); + assert4(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; socket = tls.connect({ @@ -2517,7 +2517,7 @@ var require_connect = __commonJS({ sessionCache.set(sessionKey, session2); }); } else { - assert(!httpSocket, "httpSocket can only be sent on TLS update"); + assert4(!httpSocket, "httpSocket can only be sent on TLS update"); port = port || 80; socket = net.connect({ highWaterMark: 64 * 1024, @@ -3216,14 +3216,14 @@ var require_global = __commonJS({ var require_data_url = __commonJS({ "node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var encoder = new TextEncoder(); var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; function dataURLProcessor(dataURL) { - assert(dataURL.protocol === "data:"); + assert4(dataURL.protocol === "data:"); let input = URLSerializer(dataURL, true); input = input.slice(5); const position = { position: 0 }; @@ -3424,7 +3424,7 @@ var require_data_url = __commonJS({ function collectAnHTTPQuotedString(input, position, extractValue2) { const positionStart = position.position; let value = ""; - assert(input[position.position] === '"'); + assert4(input[position.position] === '"'); position.position++; while (true) { value += collectASequenceOfCodePoints( @@ -3445,7 +3445,7 @@ var require_data_url = __commonJS({ value += input[position.position]; position.position++; } else { - assert(quoteOrBackslash === '"'); + assert4(quoteOrBackslash === '"'); break; } } @@ -3455,7 +3455,7 @@ var require_data_url = __commonJS({ return input.slice(positionStart, position.position); } function serializeAMimeType(mimeType) { - assert(mimeType !== "failure"); + assert4(mimeType !== "failure"); const { parameters, essence } = mimeType; let serialization = essence; for (let [name, value] of parameters.entries()) { @@ -3568,7 +3568,7 @@ var require_data_url = __commonJS({ var require_webidl = __commonJS({ "node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { "use strict"; - var { types, inspect } = require("node:util"); + var { types: types2, inspect } = require("node:util"); var { markAsUncloneable } = require("node:worker_threads"); var { toUSVString } = require_util(); var webidl = {}; @@ -3758,7 +3758,7 @@ var require_webidl = __commonJS({ }); } const result = {}; - if (!types.isProxy(O)) { + if (!types2.isProxy(O)) { const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; for (const key of keys2) { const typedKey = keyConverter(key, prefix, argument); @@ -3887,14 +3887,14 @@ var require_webidl = __commonJS({ return x; }; webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { + if (webidl.util.Type(V) !== "Object" || !types2.isAnyArrayBuffer(V)) { throw webidl.errors.conversionFailed({ prefix, argument: `${argument} ("${webidl.util.Stringify(V)}")`, types: ["ArrayBuffer"] }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -3909,14 +3909,14 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.TypedArray = function(V, T, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { + if (webidl.util.Type(V) !== "Object" || !types2.isTypedArray(V) || V.constructor.name !== T.name) { throw webidl.errors.conversionFailed({ prefix, argument: `${name} ("${webidl.util.Stringify(V)}")`, types: [T.name] }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -3931,13 +3931,13 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.DataView = function(V, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { + if (webidl.util.Type(V) !== "Object" || !types2.isDataView(V)) { throw webidl.errors.exception({ header: prefix, message: `${name} is not a DataView.` }); } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + if (opts?.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { throw webidl.errors.exception({ header: "ArrayBuffer", message: "SharedArrayBuffer is not allowed." @@ -3952,13 +3952,13 @@ var require_webidl = __commonJS({ return V; }; webidl.converters.BufferSource = function(V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { + if (types2.isAnyArrayBuffer(V)) { return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }); } - if (types.isTypedArray(V)) { + if (types2.isTypedArray(V)) { return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }); } - if (types.isDataView(V)) { + if (types2.isDataView(V)) { return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }); } throw webidl.errors.conversionFailed({ @@ -3994,7 +3994,7 @@ var require_util2 = __commonJS({ var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { performance: performance2 } = require("node:perf_hooks"); var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; @@ -4180,7 +4180,7 @@ var require_util2 = __commonJS({ } function determineRequestsReferrer(request) { const policy = request.referrerPolicy; - assert(policy); + assert4(policy); let referrerSource = null; if (request.referrer === "client") { const globalOrigin = getGlobalOrigin(); @@ -4238,7 +4238,7 @@ var require_util2 = __commonJS({ } } function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); + assert4(url instanceof URL); url = new URL(url); if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { return "no-referrer"; @@ -4403,7 +4403,7 @@ var require_util2 = __commonJS({ if (result === void 0) { throw new TypeError("Value is not JSON serializable"); } - assert(typeof result === "string"); + assert4(typeof result === "string"); return result; } var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); @@ -4564,7 +4564,7 @@ var require_util2 = __commonJS({ } var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; function isomorphicEncode(input) { - assert(!invalidIsomorphicEncodeValueRegex.test(input)); + assert4(!invalidIsomorphicEncodeValueRegex.test(input)); return input; } async function readAllBytes(reader) { @@ -4583,7 +4583,7 @@ var require_util2 = __commonJS({ } } function urlIsLocal(url) { - assert("protocol" in url); + assert4("protocol" in url); const protocol = url.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } @@ -4591,7 +4591,7 @@ var require_util2 = __commonJS({ return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; } function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); + assert4("protocol" in url); const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } @@ -4756,7 +4756,7 @@ var require_util2 = __commonJS({ continue; } } else { - assert(input.charCodeAt(position.position) === 44); + assert4(input.charCodeAt(position.position) === 44); position.position++; } } @@ -5086,7 +5086,7 @@ var require_formdata_parser = __commonJS({ var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); var { isFileLike } = require_file(); var { makeEntry } = require_formdata(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { File: NodeFile } = require("node:buffer"); var File = globalThis.File ?? NodeFile; var formDataNameBuffer = Buffer.from('form-data; name="'); @@ -5115,7 +5115,7 @@ var require_formdata_parser = __commonJS({ return true; } function multipartFormDataParser(input, mimeType) { - assert(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + assert4(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); const boundaryString = mimeType.parameters.get("boundary"); if (boundaryString === void 0) { return "failure"; @@ -5179,8 +5179,8 @@ var require_formdata_parser = __commonJS({ } else { value = utf8DecodeBytes(Buffer.from(body)); } - assert(isUSVString(name)); - assert(typeof value === "string" && isUSVString(value) || isFileLike(value)); + assert4(isUSVString(name)); + assert4(typeof value === "string" && isUSVString(value) || isFileLike(value)); entryList.push(makeEntry(name, value, filename)); } } @@ -5278,7 +5278,7 @@ var require_formdata_parser = __commonJS({ } } function parseMultipartFormDataName(input, position) { - assert(input[position.position - 1] === 34); + assert4(input[position.position - 1] === 34); let name = collectASequenceOfBytes( (char) => char !== 10 && char !== 13 && char !== 34, input, @@ -5347,7 +5347,7 @@ var require_body = __commonJS({ var { kState } = require_symbols2(); var { webidl } = require_webidl(); var { Blob: Blob2 } = require("node:buffer"); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { isErrored, isDisturbed } = require("node:stream"); var { isArrayBuffer } = require("node:util/types"); var { serializeAMimeType } = require_data_url(); @@ -5392,7 +5392,7 @@ var require_body = __commonJS({ type: "bytes" }); } - assert(isReadableStreamLike(stream2)); + assert4(isReadableStreamLike(stream2)); let action = null; let source = null; let length = null; @@ -5411,7 +5411,7 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); const blobParts = []; const rn = new Uint8Array([13, 10]); @@ -5419,14 +5419,14 @@ Content-Disposition: form-data`; let hasUnknownSizeValue = false; for (const [name, value] of object) { if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r + const chunk2 = textEncoder.encode(prefix + `; name="${escape2(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r + const chunk2 = textEncoder.encode(`${prefix}; name="${escape2(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape2(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); @@ -5510,8 +5510,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r } function safelyExtractBody(object, keepalive = false) { if (object instanceof ReadableStream) { - assert(!util2.isDisturbed(object), "The body has already been consumed."); - assert(!object.locked, "The stream is locked."); + assert4(!util2.isDisturbed(object), "The body has already been consumed."); + assert4(!object.locked, "The stream is locked."); } return extractBody(object, keepalive); } @@ -5646,7 +5646,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r var require_client_h1 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var util2 = require_util(); var { channels } = require_diagnostics(); var timers = require_timers(); @@ -5716,35 +5716,35 @@ var require_client_h1 = __commonJS({ return 0; }, wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onMessageBegin() || 0; }, wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; }, wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onMessageComplete() || 0; } /* eslint-enable camelcase */ @@ -5765,7 +5765,7 @@ var require_client_h1 = __commonJS({ var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; var Parser = class { constructor(client, socket, { exports: exports3 }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE); this.client = client; @@ -5814,10 +5814,10 @@ var require_client_h1 = __commonJS({ if (this.socket.destroyed || !this.paused) { return; } - assert(this.ptr != null); - assert(currentParser == null); + assert4(this.ptr != null); + assert4(currentParser == null); this.llhttp.llhttp_resume(this.ptr); - assert(this.timeoutType === TIMEOUT_BODY); + assert4(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); @@ -5837,9 +5837,9 @@ var require_client_h1 = __commonJS({ } } execute(data) { - assert(this.ptr != null); - assert(currentParser == null); - assert(!this.paused); + assert4(this.ptr != null); + assert4(currentParser == null); + assert4(!this.paused); const { socket, llhttp } = this; if (data.length > currentBufferSize) { if (currentBufferPtr) { @@ -5881,8 +5881,8 @@ var require_client_h1 = __commonJS({ } } destroy() { - assert(this.ptr != null); - assert(currentParser == null); + assert4(this.ptr != null); + assert4(currentParser == null); this.llhttp.llhttp_free(this.ptr); this.ptr = null; this.timeout && timers.clearTimeout(this.timeout); @@ -5943,14 +5943,14 @@ var require_client_h1 = __commonJS({ } onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; - assert(upgrade); - assert(client[kSocket] === socket); - assert(!socket.destroyed); - assert(!this.paused); - assert((headers.length & 1) === 0); + assert4(upgrade); + assert4(client[kSocket] === socket); + assert4(!socket.destroyed); + assert4(!this.paused); + assert4((headers.length & 1) === 0); const request = client[kQueue][client[kRunningIdx]]; - assert(request); - assert(request.upgrade || request.method === "CONNECT"); + assert4(request); + assert4(request.upgrade || request.method === "CONNECT"); this.statusCode = null; this.statusText = ""; this.shouldKeepAlive = null; @@ -5982,8 +5982,8 @@ var require_client_h1 = __commonJS({ if (!request) { return -1; } - assert(!this.upgrade); - assert(this.statusCode < 200); + assert4(!this.upgrade); + assert4(this.statusCode < 200); if (statusCode === 100) { util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket))); return -1; @@ -5992,7 +5992,7 @@ var require_client_h1 = __commonJS({ util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket))); return -1; } - assert(this.timeoutType === TIMEOUT_HEADERS); + assert4(this.timeoutType === TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; @@ -6005,16 +6005,16 @@ var require_client_h1 = __commonJS({ } } if (request.method === "CONNECT") { - assert(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } if (upgrade) { - assert(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } - assert((this.headers.length & 1) === 0); + assert4((this.headers.length & 1) === 0); this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { @@ -6057,14 +6057,14 @@ var require_client_h1 = __commonJS({ return -1; } const request = client[kQueue][client[kRunningIdx]]; - assert(request); - assert(this.timeoutType === TIMEOUT_BODY); + assert4(request); + assert4(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - assert(statusCode >= 200); + assert4(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util2.destroy(socket, new ResponseExceededMaxSizeError()); return -1; @@ -6082,10 +6082,10 @@ var require_client_h1 = __commonJS({ if (upgrade) { return; } - assert(statusCode >= 100); - assert((this.headers.length & 1) === 0); + assert4(statusCode >= 100); + assert4((this.headers.length & 1) === 0); const request = client[kQueue][client[kRunningIdx]]; - assert(request); + assert4(request); this.statusCode = null; this.statusText = ""; this.bytesRead = 0; @@ -6104,7 +6104,7 @@ var require_client_h1 = __commonJS({ request.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { - assert(client[kRunning] === 0); + assert4(client[kRunning] === 0); util2.destroy(socket, new InformationalError("reset")); return constants3.ERROR.PAUSED; } else if (!shouldKeepAlive) { @@ -6124,7 +6124,7 @@ var require_client_h1 = __commonJS({ const { socket, timeoutType, client, paused } = parser.deref(); if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, "cannot be paused while waiting for headers"); + assert4(!paused, "cannot be paused while waiting for headers"); util2.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { @@ -6132,7 +6132,7 @@ var require_client_h1 = __commonJS({ util2.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + assert4(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util2.destroy(socket, new InformationalError("socket idle timeout")); } } @@ -6148,7 +6148,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; socket[kParser] = new Parser(client, socket, llhttpInstance); addListener(socket, "error", function(err) { - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); const parser = this[kParser]; if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); @@ -6185,7 +6185,7 @@ var require_client_h1 = __commonJS({ client2[kSocket] = null; client2[kHTTPContext] = null; if (client2.destroyed) { - assert(client2[kPending] === 0); + assert4(client2[kPending] === 0); const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; @@ -6197,7 +6197,7 @@ var require_client_h1 = __commonJS({ util2.errorRequest(client2, request, err); } client2[kPendingIdx] = client2[kRunningIdx]; - assert(client2[kRunning] === 0); + assert4(client2[kRunning] === 0); client2.emit("disconnect", client2[kUrl], [client2], err); client2[kResume](); }); @@ -6272,7 +6272,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request) { - const { method, path: path9, host, upgrade, blocking, reset } = request; + const { method, path: path15, host, upgrade, blocking, reset } = request; let { body, headers, contentLength } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util2.isFormDataLike(body)) { @@ -6338,7 +6338,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path9} HTTP/1.1\r + let header = `${method} ${path15} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6388,12 +6388,12 @@ upgrade: ${upgrade}\r } else if (util2.isIterable(body)) { writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); } else { - assert(false); + assert4(false); } return true; } function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); let finished = false; const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { @@ -6430,7 +6430,7 @@ upgrade: ${upgrade}\r return; } finished = true; - assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + assert4(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); if (!err) { @@ -6469,12 +6469,12 @@ upgrade: ${upgrade}\r \r `, "latin1"); } else { - assert(contentLength === null, "no body must not have content length"); + assert4(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } } else if (util2.isBuffer(body)) { - assert(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r @@ -6493,7 +6493,7 @@ upgrade: ${upgrade}\r } } async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, "blob body must have content length"); + assert4(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -6516,7 +6516,7 @@ upgrade: ${upgrade}\r } } async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -6526,7 +6526,7 @@ upgrade: ${upgrade}\r } } const waitForDrain = () => new Promise((resolve4, reject) => { - assert(callback === null); + assert4(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -6653,7 +6653,7 @@ ${len.toString(16)}\r const { socket, client, abort } = this; socket[kWriting] = false; if (err) { - assert(client[kRunning] <= 1, "pipeline should only contain this request"); + assert4(client[kRunning] <= 1, "pipeline should only contain this request"); abort(err); } } @@ -6666,7 +6666,7 @@ ${len.toString(16)}\r var require_client_h2 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { pipeline: pipeline2 } = require("node:stream"); var util2 = require_util(); var { @@ -6752,7 +6752,7 @@ var require_client_h2 = __commonJS({ const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util2.getSocketInfo(socket2)); client2[kHTTP2Session] = null; if (client2.destroyed) { - assert(client2[kPending] === 0); + assert4(client2[kPending] === 0); const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; @@ -6764,7 +6764,7 @@ var require_client_h2 = __commonJS({ client[kHTTP2Session] = session; socket[kHTTP2Session] = session; util2.addListener(socket, "error", function(err) { - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kError] = err; this[kClient][kOnError](err); }); @@ -6778,7 +6778,7 @@ var require_client_h2 = __commonJS({ this[kHTTP2Session].destroy(err); } client[kPendingIdx] = client[kRunningIdx]; - assert(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); }); @@ -6823,7 +6823,7 @@ var require_client_h2 = __commonJS({ } } function onHttp2SessionError(err) { - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -6855,7 +6855,7 @@ var require_client_h2 = __commonJS({ util2.errorRequest(client, request, err); client[kPendingIdx] = client[kRunningIdx]; } - assert(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); } @@ -6864,7 +6864,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request) { const session = client[kHTTP2Session]; - const { method, path: path9, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { method, path: path15, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let { body } = request; if (upgrade) { util2.errorRequest(client, request, new Error("Upgrade not supported for H2")); @@ -6931,7 +6931,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path9; + headers[HTTP2_HEADER_PATH] = path15; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -6959,7 +6959,7 @@ var require_client_h2 = __commonJS({ process.emitWarning(new RequestContentLengthMismatchError()); } if (contentLength != null) { - assert(body, "no body must not have content length"); + assert4(body, "no body must not have content length"); headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); @@ -7089,14 +7089,14 @@ var require_client_h2 = __commonJS({ expectsPayload ); } else { - assert(false); + assert4(false); } } } function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { try { if (body != null && util2.isBuffer(body)) { - assert(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); h2stream.cork(); h2stream.write(body); h2stream.uncork(); @@ -7113,7 +7113,7 @@ var require_client_h2 = __commonJS({ } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); const pipe = pipeline2( body, h2stream, @@ -7137,7 +7137,7 @@ var require_client_h2 = __commonJS({ } } async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, "blob body must have content length"); + assert4(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -7158,7 +7158,7 @@ var require_client_h2 = __commonJS({ } } async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -7168,7 +7168,7 @@ var require_client_h2 = __commonJS({ } } const waitForDrain = () => new Promise((resolve4, reject) => { - assert(callback === null); + assert4(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -7209,7 +7209,7 @@ var require_redirect_handler = __commonJS({ "use strict"; var util2 = require_util(); var { kBodyUsed } = require_symbols(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { InvalidArgumentError } = require_errors(); var EE = require("node:events"); var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; @@ -7220,7 +7220,7 @@ var require_redirect_handler = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert(!this[kBodyUsed], "disturbed"); + assert4(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -7242,7 +7242,7 @@ var require_redirect_handler = __commonJS({ if (util2.isStream(this.opts.body)) { if (util2.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { - assert(false); + assert4(false); }); } if (typeof this.opts.body.readableDidRead !== "boolean") { @@ -7284,9 +7284,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path9 = search ? `${pathname}${search}` : pathname; + const path15 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path9; + this.opts.path = path15; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7354,7 +7354,7 @@ var require_redirect_handler = __commonJS({ } } } else { - assert(headers == null, "headers must be an object or an array"); + assert4(headers == null, "headers must be an object or an array"); } return ret; } @@ -7388,7 +7388,7 @@ var require_redirect_interceptor = __commonJS({ var require_client = __commonJS({ "node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var net = require("node:net"); var http2 = require("node:http"); var util2 = require_util(); @@ -7684,24 +7684,24 @@ var require_client = __commonJS({ var createRedirectInterceptor = require_redirect_interceptor(); function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert(client[kPendingIdx] === client[kRunningIdx]); + assert4(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; util2.errorRequest(client, request, err); } - assert(client[kSize] === 0); + assert4(client[kSize] === 0); } } async function connect(client) { - assert(!client[kConnecting]); - assert(!client[kHTTPContext]); + assert4(!client[kConnecting]); + assert4(!client[kHTTPContext]); let { host, hostname, protocol, port } = client[kUrl]; if (hostname[0] === "[") { const idx = hostname.indexOf("]"); - assert(idx !== -1); + assert4(idx !== -1); const ip = hostname.substring(1, idx); - assert(net.isIP(ip)); + assert4(net.isIP(ip)); hostname = ip; } client[kConnecting] = true; @@ -7740,7 +7740,7 @@ var require_client = __commonJS({ util2.destroy(socket.on("error", noop), new ClientDestroyedError()); return; } - assert(socket); + assert4(socket); try { client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); } catch (err) { @@ -7789,7 +7789,7 @@ var require_client = __commonJS({ }); } if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert(client[kRunning] === 0); + assert4(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request = client[kQueue][client[kPendingIdx]++]; util2.errorRequest(client, request, err); @@ -7821,7 +7821,7 @@ var require_client = __commonJS({ function _resume(client, sync) { while (true) { if (client.destroyed) { - assert(client[kPending] === 0); + assert4(client[kPending] === 0); return; } if (client[kClosedResolve] && !client[kSize]) { @@ -8520,10 +8520,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path9 = "/", + path: path15 = "/", headers = {} } = opts; - opts.path = origin + path9; + opts.path = origin + path15; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -8823,7 +8823,7 @@ var require_env_http_proxy_agent = __commonJS({ var require_retry_handler = __commonJS({ "node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { kRetryHandlerDefaultRetry } = require_symbols(); var { RequestRetryError } = require_errors(); var { @@ -9009,15 +9009,15 @@ var require_retry_handler = __commonJS({ return false; } const { start, size, end = size - 1 } = contentRange; - assert(this.start === start, "content-range mismatch"); - assert(this.end == null || this.end === end, "content-range mismatch"); + assert4(this.start === start, "content-range mismatch"); + assert4(this.end == null || this.end === end, "content-range mismatch"); this.resume = resume; return true; } if (this.end == null) { if (statusCode === 206) { - const range = parseRangeHeader(headers["content-range"]); - if (range == null) { + const range2 = parseRangeHeader(headers["content-range"]); + if (range2 == null) { return this.handler.onHeaders( statusCode, rawHeaders, @@ -9025,12 +9025,12 @@ var require_retry_handler = __commonJS({ statusMessage ); } - const { start, size, end = size - 1 } = range; - assert( + const { start, size, end = size - 1 } = range2; + assert4( start != null && Number.isFinite(start), "content-range mismatch" ); - assert(end != null && Number.isFinite(end), "invalid content-length"); + assert4(end != null && Number.isFinite(end), "invalid content-length"); this.start = start; this.end = end; } @@ -9038,8 +9038,8 @@ var require_retry_handler = __commonJS({ const contentLength = headers["content-length"]; this.end = contentLength != null ? Number(contentLength) - 1 : null; } - assert(Number.isFinite(this.start)); - assert( + assert4(Number.isFinite(this.start)); + assert4( this.end == null || Number.isFinite(this.end), "invalid content-length" ); @@ -9156,7 +9156,7 @@ var require_retry_agent = __commonJS({ var require_readable = __commonJS({ "node_modules/undici/lib/api/readable.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { Readable } = require("node:stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); var util2 = require_util(); @@ -9269,7 +9269,7 @@ var require_readable = __commonJS({ this[kBody] = ReadableStreamFrom(this); if (this[kConsume]) { this[kBody].getReader(); - assert(this[kBody].locked); + assert4(this[kBody].locked); } } return this[kBody]; @@ -9315,7 +9315,7 @@ var require_readable = __commonJS({ return util2.isDisturbed(self) || isLocked(self); } async function consume(stream2, type) { - assert(!stream2[kConsume]); + assert4(!stream2[kConsume]); return new Promise((resolve4, reject) => { if (isUnusable(stream2)) { const rState = stream2._readableState; @@ -9448,14 +9448,14 @@ var require_readable = __commonJS({ // node_modules/undici/lib/api/util.js var require_util3 = __commonJS({ "node_modules/undici/lib/api/util.js"(exports2, module2) { - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { ResponseStatusCodeError } = require_errors(); var { chunksDecode } = require_readable(); var CHUNK_LIMIT = 128 * 1024; async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body); + assert4(body); let chunks = []; let length = 0; try { @@ -9510,7 +9510,7 @@ var require_util3 = __commonJS({ var require_api_request = __commonJS({ "node_modules/undici/lib/api/api-request.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { Readable } = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var util2 = require_util(); @@ -9590,7 +9590,7 @@ var require_api_request = __commonJS({ abort(this.reason); return; } - assert(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -9747,7 +9747,7 @@ var require_abort_signal = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { finished, PassThrough } = require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); var util2 = require_util(); @@ -9806,7 +9806,7 @@ var require_api_stream = __commonJS({ abort(this.reason); return; } - assert(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -9933,7 +9933,7 @@ var require_api_pipeline = __commonJS({ var util2 = require_util(); var { AsyncResource } = require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var kResume = /* @__PURE__ */ Symbol("resume"); var PipelineRequest = class extends Readable { constructor() { @@ -10037,8 +10037,8 @@ var require_api_pipeline = __commonJS({ abort(this.reason); return; } - assert(!res, "pipeline cannot be retried"); - assert(!ret.destroyed); + assert4(!res, "pipeline cannot be retried"); + assert4(!ret.destroyed); this.abort = abort; this.context = context; } @@ -10124,7 +10124,7 @@ var require_api_upgrade = __commonJS({ var { AsyncResource } = require("node:async_hooks"); var util2 = require_util(); var { addSignal, removeSignal } = require_abort_signal(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var UpgradeHandler = class extends AsyncResource { constructor(opts, callback) { if (!opts || typeof opts !== "object") { @@ -10150,7 +10150,7 @@ var require_api_upgrade = __commonJS({ abort(this.reason); return; } - assert(this.callback); + assert4(this.callback); this.abort = abort; this.context = null; } @@ -10158,7 +10158,7 @@ var require_api_upgrade = __commonJS({ throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { - assert(statusCode === 101); + assert4(statusCode === 101); const { callback, opaque, context } = this; removeSignal(this); this.callback = null; @@ -10212,7 +10212,7 @@ var require_api_upgrade = __commonJS({ var require_api_connect = __commonJS({ "node_modules/undici/lib/api/api-connect.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { AsyncResource } = require("node:async_hooks"); var { InvalidArgumentError, SocketError } = require_errors(); var util2 = require_util(); @@ -10241,7 +10241,7 @@ var require_api_connect = __commonJS({ abort(this.reason); return; } - assert(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -10382,15 +10382,15 @@ var require_mock_utils = __commonJS({ isPromise } } = require("node:util"); - function matchValue(match, value) { - if (typeof match === "string") { - return match === value; + function matchValue(match3, value) { + if (typeof match3 === "string") { + return match3 === value; } - if (match instanceof RegExp) { - return match.test(value); + if (match3 instanceof RegExp) { + return match3.test(value); } - if (typeof match === "function") { - return match(value) === true; + if (typeof match3 === "function") { + return match3(value) === true; } return false; } @@ -10444,20 +10444,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path9) { - if (typeof path9 !== "string") { - return path9; + function safeUrl(path15) { + if (typeof path15 !== "string") { + return path15; } - const pathSegments = path9.split("?"); + const pathSegments = path15.split("?"); if (pathSegments.length !== 2) { - return path9; + return path15; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path9, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path9); + function matchKey(mockDispatch2, { path: path15, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path15); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10479,7 +10479,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path9 }) => matchValue(safeUrl(path9), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path15 }) => matchValue(safeUrl(path15), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10517,9 +10517,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path9, method, body, headers, query } = opts; + const { path: path15, method, body, headers, query } = opts; return { - path: path9, + path: path15, method, body, headers, @@ -10982,10 +10982,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path9, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path9, + Path: path15, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -11649,7 +11649,7 @@ var require_headers = __commonJS({ isValidHeaderValue } = require_util2(); var { webidl } = require_webidl(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var util2 = require("node:util"); var kHeadersMap = /* @__PURE__ */ Symbol("headers map"); var kHeadersSortedMap = /* @__PURE__ */ Symbol("headers map sorted"); @@ -11839,11 +11839,11 @@ var require_headers = __commonJS({ const iterator = this[kHeadersMap][Symbol.iterator](); const firstValue = iterator.next().value; array[0] = [firstValue[0], firstValue[1].value]; - assert(firstValue[1].value !== null); + assert4(firstValue[1].value !== null); for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { value = iterator.next().value; x = array[i] = [value[0], value[1].value]; - assert(x[1] !== null); + assert4(x[1] !== null); left = 0; right = i; while (left < right) { @@ -11870,7 +11870,7 @@ var require_headers = __commonJS({ let i = 0; for (const { 0: name, 1: { value } } of this[kHeadersMap]) { array[i++] = [name, value]; - assert(value !== null); + assert4(value !== null); } return array.sort(compareHeaderName); } @@ -12109,8 +12109,8 @@ var require_response = __commonJS({ var { FormData } = require_formdata(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); - var assert = require("node:assert"); - var { types } = require("node:util"); + var assert4 = require("node:assert"); + var { types: types2 } = require("node:util"); var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { // Creates network error Response. @@ -12332,7 +12332,7 @@ var require_response = __commonJS({ return p in state ? state[p] : target[p]; }, set(target, p, value) { - assert(!(p in state)); + assert4(!(p in state)); target[p] = value; return true; } @@ -12366,11 +12366,11 @@ var require_response = __commonJS({ body: null }); } else { - assert(false); + assert4(false); } } function makeAppropriateNetworkError(fetchParams, err = null) { - assert(isCancelled(fetchParams)); + assert4(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); } function initializeResponse(response, init, body) { @@ -12431,7 +12431,7 @@ var require_response = __commonJS({ if (isBlobLike(V)) { return webidl.converters.Blob(V, prefix, name, { strict: false }); } - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + if (ArrayBuffer.isView(V) || types2.isArrayBuffer(V)) { return webidl.converters.BufferSource(V, prefix, name); } if (util2.isFormDataLike(V)) { @@ -12551,7 +12551,7 @@ var require_request2 = __commonJS({ var { webidl } = require_webidl(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require("node:events"); var kAbortController = /* @__PURE__ */ Symbol("abortController"); var requestFinalizer = new FinalizationRegistry2(({ signal, abort }) => { @@ -12615,7 +12615,7 @@ var require_request2 = __commonJS({ fallbackMode = "cors"; } else { this[kDispatcher] = init.dispatcher || input[kDispatcher]; - assert(input instanceof _Request); + assert4(input instanceof _Request); request = input[kState]; signal = input[kSignal]; } @@ -13267,7 +13267,7 @@ var require_fetch = __commonJS({ extractMimeType } = require_util2(); var { kState, kDispatcher } = require_symbols2(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { safelyExtractBody, extractBody } = require_body(); var { redirectStatusSet, @@ -13345,7 +13345,7 @@ var require_fetch = __commonJS({ requestObject.signal, () => { locallyAborted = true; - assert(controller != null); + assert4(controller != null); controller.abort(requestObject.signal.reason); const realResponse = responseObject?.deref(); abortFetch(p, request, realResponse, requestObject.signal.reason); @@ -13445,7 +13445,7 @@ var require_fetch = __commonJS({ dispatcher = getGlobalDispatcher() // undici }) { - assert(dispatcher); + assert4(dispatcher); let taskDestination = null; let crossOriginIsolatedCapability = false; if (request.client != null) { @@ -13468,7 +13468,7 @@ var require_fetch = __commonJS({ taskDestination, crossOriginIsolatedCapability }; - assert(!request.body || request.body.stream); + assert4(!request.body || request.body.stream); if (request.window === "client") { request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; } @@ -13561,7 +13561,7 @@ var require_fetch = __commonJS({ } else if (request.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { - assert(false); + assert4(false); } } let internalResponse = response.status === 0 ? response : response.internalResponse; @@ -13788,7 +13788,7 @@ var require_fetch = __commonJS({ } else if (request.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { - assert(false); + assert4(false); } } response.timingInfo = timingInfo; @@ -13841,7 +13841,7 @@ var require_fetch = __commonJS({ request.headersList.delete("host", true); } if (request.body != null) { - assert(request.body.source != null); + assert4(request.body.source != null); request.body = safelyExtractBody(request.body.source)[0]; } const timingInfo = fetchParams.timingInfo; @@ -13974,7 +13974,7 @@ var require_fetch = __commonJS({ return response; } async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + assert4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { abort: null, destroyed: false, @@ -14667,7 +14667,7 @@ var require_util4 = __commonJS({ var { ProgressEvent } = require_progressevent(); var { getEncoding } = require_encoding(); var { serializeAMimeType, parseMIMEType } = require_data_url(); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var { StringDecoder } = require("string_decoder"); var { btoa } = require("node:buffer"); var staticPropertyDescriptors = { @@ -14697,7 +14697,7 @@ var require_util4 = __commonJS({ }); } isFirstChunk = false; - if (!done && types.isUint8Array(value)) { + if (!done && types2.isUint8Array(value)) { bytes.push(value); if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { fr[kLastProgressEventFired] = Date.now(); @@ -15111,7 +15111,7 @@ var require_symbols4 = __commonJS({ var require_util5 = __commonJS({ "node_modules/undici/lib/web/cache/util.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { URLSerializer } = require_data_url(); var { isValidHeaderName } = require_util2(); function urlEquals(A, B, excludeFragment = false) { @@ -15120,7 +15120,7 @@ var require_util5 = __commonJS({ return serializedA === serializedB; } function getFieldValues(header) { - assert(header !== null); + assert4(header !== null); const values = []; for (let value of header.split(",")) { value = value.trim(); @@ -15150,7 +15150,7 @@ var require_cache = __commonJS({ var { kState } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var Cache = class _Cache { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list @@ -15391,7 +15391,7 @@ var require_cache = __commonJS({ return false; } } else { - assert(typeof request === "string"); + assert4(typeof request === "string"); r = new Request(request)[kState]; } const operations = []; @@ -15501,7 +15501,7 @@ var require_cache = __commonJS({ } for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } } else if (operation.type === "put") { @@ -15533,7 +15533,7 @@ var require_cache = __commonJS({ requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } cache.push([operation.request, operation.response]); @@ -15866,9 +15866,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path9) { - for (let i = 0; i < path9.length; ++i) { - const code = path9.charCodeAt(i); + function validateCookiePath(path15) { + for (let i = 0; i < path15.length; ++i) { + const code = path15.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -15982,7 +15982,7 @@ var require_parse = __commonJS({ var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4(); var { isCTLExcludingHtab } = require_util6(); var { collectASequenceOfCodePointsFast } = require_data_url(); - var assert = require("node:assert"); + var assert4 = require("node:assert"); function parseSetCookie(header) { if (isCTLExcludingHtab(header)) { return null; @@ -16024,7 +16024,7 @@ var require_parse = __commonJS({ if (unparsedAttributes.length === 0) { return cookieAttributeList; } - assert(unparsedAttributes[0] === ";"); + assert4(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; if (unparsedAttributes.includes(";")) { @@ -17117,7 +17117,7 @@ var require_receiver = __commonJS({ "node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) { "use strict"; var { Writable } = require("node:stream"); - var assert = require("node:assert"); + var assert4 = require("node:assert"); var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5(); var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols5(); var { channels } = require_diagnostics(); @@ -17336,7 +17336,7 @@ var require_receiver = __commonJS({ return buffer; } parseCloseBody(data) { - assert(data.length !== 1); + assert4(data.length !== 1); let code; if (data.length >= 2) { code = data.readUInt16BE(0); @@ -17531,7 +17531,7 @@ var require_websocket = __commonJS({ var { ByteParser } = require_receiver(); var { kEnumerableProperty, isBlobLike } = require_util(); var { getGlobalDispatcher } = require_global2(); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var { ErrorEvent, CloseEvent } = require_events(); var { SendQueue } = require_sender(); var WebSocket = class _WebSocket extends EventTarget { @@ -17654,7 +17654,7 @@ var require_websocket = __commonJS({ this.#sendQueue.add(data, () => { this.#bufferedAmount -= length; }, sendHints.string); - } else if (types.isArrayBuffer(data)) { + } else if (types2.isArrayBuffer(data)) { this.#bufferedAmount += data.byteLength; this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.byteLength; @@ -17860,7 +17860,7 @@ var require_websocket = __commonJS({ if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { + if (ArrayBuffer.isView(V) || types2.isArrayBuffer(V)) { return webidl.converters.BufferSource(V); } } @@ -18508,11 +18508,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path9 = opts.path; + let path15 = opts.path; if (!opts.path.startsWith("/")) { - path9 = `/${path9}`; + path15 = `/${path15}`; } - url = new URL(util2.parseOrigin(url).origin + path9); + url = new URL(util2.parseOrigin(url).origin + path15); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -18720,8 +18720,8 @@ var require_semver = __commonJS({ } } var i; - exports2.parse = parse2; - function parse2(version2, options) { + exports2.parse = parse3; + function parse3(version2, options) { if (!options || typeof options !== "object") { options = { loose: !!options, @@ -18749,12 +18749,12 @@ var require_semver = __commonJS({ } exports2.valid = valid2; function valid2(version2, options) { - var v = parse2(version2, options); + var v = parse3(version2, options); return v ? v.version : null; } exports2.clean = clean2; function clean2(version2, options) { - var s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + var s = parse3(version2.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } exports2.SemVer = SemVer; @@ -18990,8 +18990,8 @@ var require_semver = __commonJS({ if (eq(version1, version2)) { return null; } else { - var v1 = parse2(version1); - var v2 = parse2(version2); + var v1 = parse3(version1); + var v2 = parse3(version2); var prefix = ""; if (v1.prerelease.length || v2.prerelease.length) { prefix = "pre"; @@ -19008,10 +19008,10 @@ var require_semver = __commonJS({ } } exports2.compareIdentifiers = compareIdentifiers; - var numeric = /^[0-9]+$/; + var numeric2 = /^[0-9]+$/; function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); + var anum = numeric2.test(a); + var bnum = numeric2.test(b); if (anum && bnum) { a = +a; b = +b; @@ -19080,12 +19080,12 @@ var require_semver = __commonJS({ function neq(a, b, loose) { return compare(a, b, loose) !== 0; } - exports2.gte = gte2; - function gte2(a, b, loose) { + exports2.gte = gte3; + function gte3(a, b, loose) { return compare(a, b, loose) >= 0; } - exports2.lte = lte2; - function lte2(a, b, loose) { + exports2.lte = lte3; + function lte3(a, b, loose) { return compare(a, b, loose) <= 0; } exports2.cmp = cmp; @@ -19112,11 +19112,11 @@ var require_semver = __commonJS({ case ">": return gt2(a, b, loose); case ">=": - return gte2(a, b, loose); + return gte3(a, b, loose); case "<": return lt2(a, b, loose); case "<=": - return lte2(a, b, loose); + return lte3(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } @@ -19218,32 +19218,32 @@ var require_semver = __commonJS({ return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range; - function Range(range, options) { + function Range(range2, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (range instanceof Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; + if (range2 instanceof Range) { + if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) { + return range2; } else { - return new Range(range.raw, options); + return new Range(range2.raw, options); } } - if (range instanceof Comparator) { - return new Range(range.value, options); + if (range2 instanceof Comparator) { + return new Range(range2.value, options); } if (!(this instanceof Range)) { - return new Range(range, options); + return new Range(range2, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().split(/\s+/).join(" "); - this.set = this.raw.split("||").map(function(range2) { - return this.parseRange(range2.trim()); + this.raw = range2.trim().split(/\s+/).join(" "); + this.set = this.raw.split("||").map(function(range3) { + return this.parseRange(range3.trim()); }, this).filter(function(c) { return c.length; }); @@ -19261,18 +19261,18 @@ var require_semver = __commonJS({ Range.prototype.toString = function() { return this.range; }; - Range.prototype.parseRange = function(range) { + Range.prototype.parseRange = function(range2) { var loose = this.options.loose; var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug2("hyphen replace", range); - range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug2("comparator trim", range, safeRe[t.COMPARATORTRIM]); - range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace); - range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace); - range = range.split(/\s+/).join(" "); + range2 = range2.replace(hr, hyphenReplace); + debug2("hyphen replace", range2); + range2 = range2.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug2("comparator trim", range2, safeRe[t.COMPARATORTRIM]); + range2 = range2.replace(safeRe[t.TILDETRIM], tildeTrimReplace); + range2 = range2.replace(safeRe[t.CARETTRIM], caretTrimReplace); + range2 = range2.split(/\s+/).join(" "); var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var set = range.split(" ").map(function(comp) { + var set = range2.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { @@ -19285,12 +19285,12 @@ var require_semver = __commonJS({ }, this); return set; }; - Range.prototype.intersects = function(range, options) { - if (!(range instanceof Range)) { + Range.prototype.intersects = function(range2, options) { + if (!(range2 instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { - return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(thisComparators, options) && range2.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); @@ -19312,8 +19312,8 @@ var require_semver = __commonJS({ return result; } exports2.toComparators = toComparators; - function toComparators(range, options) { - return new Range(range, options).set.map(function(comp) { + function toComparators(range2, options) { + return new Range(range2, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); @@ -19535,20 +19535,20 @@ var require_semver = __commonJS({ return true; } exports2.satisfies = satisfies3; - function satisfies3(version2, range, options) { + function satisfies3(version2, range2, options) { try { - range = new Range(range, options); + range2 = new Range(range2, options); } catch (er) { return false; } - return range.test(version2); + return range2.test(version2); } exports2.maxSatisfying = maxSatisfying3; - function maxSatisfying3(versions, range, options) { + function maxSatisfying3(versions, range2, options) { var max = null; var maxSV = null; try { - var rangeObj = new Range(range, options); + var rangeObj = new Range(range2, options); } catch (er) { return null; } @@ -19563,11 +19563,11 @@ var require_semver = __commonJS({ return max; } exports2.minSatisfying = minSatisfying; - function minSatisfying(versions, range, options) { + function minSatisfying(versions, range2, options) { var min = null; var minSV = null; try { - var rangeObj = new Range(range, options); + var rangeObj = new Range(range2, options); } catch (er) { return null; } @@ -19582,19 +19582,19 @@ var require_semver = __commonJS({ return min; } exports2.minVersion = minVersion; - function minVersion(range, loose) { - range = new Range(range, loose); + function minVersion(range2, loose) { + range2 = new Range(range2, loose); var minver = new SemVer("0.0.0"); - if (range.test(minver)) { + if (range2.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); - if (range.test(minver)) { + if (range2.test(minver)) { return minver; } minver = null; - for (var i2 = 0; i2 < range.set.length; ++i2) { - var comparators = range.set[i2]; + for (var i2 = 0; i2 < range2.set.length; ++i2) { + var comparators = range2.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { @@ -19621,43 +19621,43 @@ var require_semver = __commonJS({ } }); } - if (minver && range.test(minver)) { + if (minver && range2.test(minver)) { return minver; } return null; } exports2.validRange = validRange; - function validRange(range, options) { + function validRange(range2, options) { try { - return new Range(range, options).range || "*"; + return new Range(range2, options).range || "*"; } catch (er) { return null; } } exports2.ltr = ltr; - function ltr(version2, range, options) { - return outside(version2, range, "<", options); + function ltr(version2, range2, options) { + return outside(version2, range2, "<", options); } exports2.gtr = gtr; - function gtr(version2, range, options) { - return outside(version2, range, ">", options); + function gtr(version2, range2, options) { + return outside(version2, range2, ">", options); } exports2.outside = outside; - function outside(version2, range, hilo, options) { + function outside(version2, range2, hilo, options) { version2 = new SemVer(version2, options); - range = new Range(range, options); + range2 = new Range(range2, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt2; - ltefn = lte2; + ltefn = lte3; ltfn = lt2; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt2; - ltefn = gte2; + ltefn = gte3; ltfn = gt2; comp = "<"; ecomp = "<="; @@ -19665,11 +19665,11 @@ var require_semver = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies3(version2, range, options)) { + if (satisfies3(version2, range2, options)) { return false; } - for (var i2 = 0; i2 < range.set.length; ++i2) { - var comparators = range.set[i2]; + for (var i2 = 0; i2 < range2.set.length; ++i2) { + var comparators = range2.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { @@ -19697,7 +19697,7 @@ var require_semver = __commonJS({ } exports2.prerelease = prerelease; function prerelease(version2, options) { - var parsed = parse2(version2, options); + var parsed = parse3(version2, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } exports2.intersects = intersects; @@ -19718,23 +19718,23 @@ var require_semver = __commonJS({ return null; } options = options || {}; - var match = null; + var match3 = null; if (!options.rtl) { - match = version2.match(safeRe[t.COERCE]); + match3 = version2.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + while ((next = safeRe[t.COERCERTL].exec(version2)) && (!match3 || match3.index + match3[0].length !== version2.length)) { + if (!match3 || next.index + next[0].length !== match3.index + match3[0].length) { + match3 = next; } safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } safeRe[t.COERCERTL].lastIndex = -1; } - if (match === null) { + if (match3 === null) { return null; } - return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + return parse3(match3[2] + "." + (match3[3] || "0") + "." + (match3[4] || "0"), options); } } }); @@ -19892,13 +19892,13 @@ var require_parse_options = __commonJS({ var require_identifiers = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/internal/identifiers.js"(exports2, module2) { "use strict"; - var numeric = /^[0-9]+$/; + var numeric2 = /^[0-9]+$/; var compareIdentifiers = (a, b) => { if (typeof a === "number" && typeof b === "number") { return a === b ? 0 : a < b ? -1 : 1; } - const anum = numeric.test(a); - const bnum = numeric.test(b); + const anum = numeric2.test(a); + const bnum = numeric2.test(b); if (anum && bnum) { a = +a; b = +b; @@ -20082,8 +20082,8 @@ var require_semver2 = __commonJS({ throw new Error("invalid increment argument: identifier is empty"); } if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); - if (!match || match[1] !== identifier) { + const match3 = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match3 || match3[1] !== identifier) { throw new Error(`invalid identifier: ${identifier}`); } } @@ -20197,7 +20197,7 @@ var require_parse2 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver2(); - var parse2 = (version2, options, throwErrors = false) => { + var parse3 = (version2, options, throwErrors = false) => { if (version2 instanceof SemVer) { return version2; } @@ -20210,7 +20210,7 @@ var require_parse2 = __commonJS({ throw er; } }; - module2.exports = parse2; + module2.exports = parse3; } }); @@ -20218,9 +20218,9 @@ var require_parse2 = __commonJS({ var require_valid = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var valid2 = (version2, options) => { - const v = parse2(version2, options); + const v = parse3(version2, options); return v ? v.version : null; }; module2.exports = valid2; @@ -20231,9 +20231,9 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var clean2 = (version2, options) => { - const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + const s = parse3(version2.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; module2.exports = clean2; @@ -20268,10 +20268,10 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var diff = (version1, version2) => { - const v1 = parse2(version1, null, true); - const v2 = parse2(version2, null, true); + const v1 = parse3(version1, null, true); + const v2 = parse3(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) { return null; @@ -20342,9 +20342,9 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var prerelease = (version2, options) => { - const parsed = parse2(version2, options); + const parsed = parse3(version2, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; module2.exports = prerelease; @@ -20460,8 +20460,8 @@ var require_gte = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/gte.js"(exports2, module2) { "use strict"; var compare = require_compare(); - var gte2 = (a, b, loose) => compare(a, b, loose) >= 0; - module2.exports = gte2; + var gte3 = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte3; } }); @@ -20470,8 +20470,8 @@ var require_lte = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/lte.js"(exports2, module2) { "use strict"; var compare = require_compare(); - var lte2 = (a, b, loose) => compare(a, b, loose) <= 0; - module2.exports = lte2; + var lte3 = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte3; } }); @@ -20482,9 +20482,9 @@ var require_cmp = __commonJS({ var eq = require_eq(); var neq = require_neq(); var gt2 = require_gt(); - var gte2 = require_gte(); + var gte3 = require_gte(); var lt2 = require_lt(); - var lte2 = require_lte(); + var lte3 = require_lte(); var cmp = (a, op, b, loose) => { switch (op) { case "===": @@ -20512,11 +20512,11 @@ var require_cmp = __commonJS({ case ">": return gt2(a, b, loose); case ">=": - return gte2(a, b, loose); + return gte3(a, b, loose); case "<": return lt2(a, b, loose); case "<=": - return lte2(a, b, loose); + return lte3(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } @@ -20530,7 +20530,7 @@ var require_coerce = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver2(); - var parse2 = require_parse2(); + var parse3 = require_parse2(); var { safeRe: re, t } = require_re(); var coerce = (version2, options) => { if (version2 instanceof SemVer) { @@ -20543,29 +20543,29 @@ var require_coerce = __commonJS({ return null; } options = options || {}; - let match = null; + let match3 = null; if (!options.rtl) { - match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + match3 = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; let next; - while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + while ((next = coerceRtlRegex.exec(version2)) && (!match3 || match3.index + match3[0].length !== version2.length)) { + if (!match3 || next.index + next[0].length !== match3.index + match3[0].length) { + match3 = next; } coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } coerceRtlRegex.lastIndex = -1; } - if (match === null) { + if (match3 === null) { return null; } - const major = match[2]; - const minor = match[3] || "0"; - const patch = match[4] || "0"; - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; - const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; - return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); + const major = match3[2]; + const minor = match3[3] || "0"; + const patch = match3[4] || "0"; + const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : ""; + const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : ""; + return parse3(`${major}.${minor}.${patch}${prerelease}${build}`, options); }; module2.exports = coerce; } @@ -20615,25 +20615,25 @@ var require_range = __commonJS({ "use strict"; var SPACE_CHARACTERS = /\s+/g; var Range = class _Range { - constructor(range, options) { + constructor(range2, options) { options = parseOptions(options); - if (range instanceof _Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; + if (range2 instanceof _Range) { + if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) { + return range2; } else { - return new _Range(range.raw, options); + return new _Range(range2.raw, options); } } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; + if (range2 instanceof Comparator) { + this.raw = range2.value; + this.set = [[range2]]; this.formatted = void 0; return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.raw = range2.trim().replace(SPACE_CHARACTERS, " "); this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${this.raw}`); @@ -20678,24 +20678,24 @@ var require_range = __commonJS({ toString() { return this.range; } - parseRange(range) { + parseRange(range2) { const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; + const memoKey = memoOpts + ":" + range2; const cached = cache.get(memoKey); if (cached) { return cached; } const loose = this.options.loose; const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug2("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug2("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - debug2("tilde trim", range); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - debug2("caret trim", range); - let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug2("hyphen replace", range2); + range2 = range2.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug2("comparator trim", range2); + range2 = range2.replace(re[t.TILDETRIM], tildeTrimReplace); + debug2("tilde trim", range2); + range2 = range2.replace(re[t.CARETTRIM], caretTrimReplace); + debug2("caret trim", range2); + let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) { rangeList = rangeList.filter((comp) => { debug2("loose invalid filter", comp, this.options); @@ -20718,12 +20718,12 @@ var require_range = __commonJS({ cache.set(memoKey, result); return result; } - intersects(range, options) { - if (!(range instanceof _Range)) { + intersects(range2, options) { + if (!(range2 instanceof _Range)) { throw new TypeError("a Range is required"); } return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); @@ -21104,13 +21104,13 @@ var require_satisfies = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/functions/satisfies.js"(exports2, module2) { "use strict"; var Range = require_range(); - var satisfies3 = (version2, range, options) => { + var satisfies3 = (version2, range2, options) => { try { - range = new Range(range, options); + range2 = new Range(range2, options); } catch (er) { return false; } - return range.test(version2); + return range2.test(version2); }; module2.exports = satisfies3; } @@ -21121,7 +21121,7 @@ var require_to_comparators = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { "use strict"; var Range = require_range(); - var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + var toComparators = (range2, options) => new Range(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); module2.exports = toComparators; } }); @@ -21132,12 +21132,12 @@ var require_max_satisfying = __commonJS({ "use strict"; var SemVer = require_semver2(); var Range = require_range(); - var maxSatisfying3 = (versions, range, options) => { + var maxSatisfying3 = (versions, range2, options) => { let max = null; let maxSV = null; let rangeObj = null; try { - rangeObj = new Range(range, options); + rangeObj = new Range(range2, options); } catch (er) { return null; } @@ -21161,12 +21161,12 @@ var require_min_satisfying = __commonJS({ "use strict"; var SemVer = require_semver2(); var Range = require_range(); - var minSatisfying = (versions, range, options) => { + var minSatisfying = (versions, range2, options) => { let min = null; let minSV = null; let rangeObj = null; try { - rangeObj = new Range(range, options); + rangeObj = new Range(range2, options); } catch (er) { return null; } @@ -21191,19 +21191,19 @@ var require_min_version = __commonJS({ var SemVer = require_semver2(); var Range = require_range(); var gt2 = require_gt(); - var minVersion = (range, loose) => { - range = new Range(range, loose); + var minVersion = (range2, loose) => { + range2 = new Range(range2, loose); let minver = new SemVer("0.0.0"); - if (range.test(minver)) { + if (range2.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); - if (range.test(minver)) { + if (range2.test(minver)) { return minver; } minver = null; - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; + for (let i = 0; i < range2.set.length; ++i) { + const comparators = range2.set[i]; let setMin = null; comparators.forEach((comparator) => { const compver = new SemVer(comparator.semver.version); @@ -21234,7 +21234,7 @@ var require_min_version = __commonJS({ minver = setMin; } } - if (minver && range.test(minver)) { + if (minver && range2.test(minver)) { return minver; } return null; @@ -21248,9 +21248,9 @@ var require_valid2 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/ranges/valid.js"(exports2, module2) { "use strict"; var Range = require_range(); - var validRange = (range, options) => { + var validRange = (range2, options) => { try { - return new Range(range, options).range || "*"; + return new Range(range2, options).range || "*"; } catch (er) { return null; } @@ -21270,23 +21270,23 @@ var require_outside = __commonJS({ var satisfies3 = require_satisfies(); var gt2 = require_gt(); var lt2 = require_lt(); - var lte2 = require_lte(); - var gte2 = require_gte(); - var outside = (version2, range, hilo, options) => { + var lte3 = require_lte(); + var gte3 = require_gte(); + var outside = (version2, range2, hilo, options) => { version2 = new SemVer(version2, options); - range = new Range(range, options); + range2 = new Range(range2, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt2; - ltefn = lte2; + ltefn = lte3; ltfn = lt2; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt2; - ltefn = gte2; + ltefn = gte3; ltfn = gt2; comp = "<"; ecomp = "<="; @@ -21294,11 +21294,11 @@ var require_outside = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies3(version2, range, options)) { + if (satisfies3(version2, range2, options)) { return false; } - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; + for (let i = 0; i < range2.set.length; ++i) { + const comparators = range2.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { @@ -21333,7 +21333,7 @@ var require_gtr = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/ranges/gtr.js"(exports2, module2) { "use strict"; var outside = require_outside(); - var gtr = (version2, range, options) => outside(version2, range, ">", options); + var gtr = (version2, range2, options) => outside(version2, range2, ">", options); module2.exports = gtr; } }); @@ -21343,7 +21343,7 @@ var require_ltr = __commonJS({ "node_modules/@actions/tool-cache/node_modules/semver/ranges/ltr.js"(exports2, module2) { "use strict"; var outside = require_outside(); - var ltr = (version2, range, options) => outside(version2, range, "<", options); + var ltr = (version2, range2, options) => outside(version2, range2, "<", options); module2.exports = ltr; } }); @@ -21368,13 +21368,13 @@ var require_simplify = __commonJS({ "use strict"; var satisfies3 = require_satisfies(); var compare = require_compare(); - module2.exports = (versions, range, options) => { + module2.exports = (versions, range2, options) => { const set = []; let first = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); for (const version2 of v) { - const included = satisfies3(version2, range, options); + const included = satisfies3(version2, range2, options); if (included) { prev = version2; if (!first) { @@ -21406,8 +21406,8 @@ var require_simplify = __commonJS({ } } const simplified = ranges.join(" || "); - const original = typeof range.raw === "string" ? range.raw : String(range); - return simplified.length < original.length ? simplified : range; + const original = typeof range2.raw === "string" ? range2.raw : String(range2); + return simplified.length < original.length ? simplified : range2; }; } }); @@ -21582,7 +21582,7 @@ var require_semver3 = __commonJS({ var constants3 = require_constants6(); var SemVer = require_semver2(); var identifiers = require_identifiers(); - var parse2 = require_parse2(); + var parse3 = require_parse2(); var valid2 = require_valid(); var clean2 = require_clean(); var inc = require_inc(); @@ -21601,8 +21601,8 @@ var require_semver3 = __commonJS({ var lt2 = require_lt(); var eq = require_eq(); var neq = require_neq(); - var gte2 = require_gte(); - var lte2 = require_lte(); + var gte3 = require_gte(); + var lte3 = require_lte(); var cmp = require_cmp(); var coerce = require_coerce(); var Comparator = require_comparator(); @@ -21620,7 +21620,7 @@ var require_semver3 = __commonJS({ var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { - parse: parse2, + parse: parse3, valid: valid2, clean: clean2, inc, @@ -21639,8 +21639,8 @@ var require_semver3 = __commonJS({ lt: lt2, eq, neq, - gte: gte2, - lte: lte2, + gte: gte3, + lte: lte3, cmp, coerce, Comparator, @@ -21737,7 +21737,7 @@ var require_version = __commonJS({ valid: valid2, clean: clean2, explain, - parse: parse2, + parse: parse3, stringify: stringify2 }; var validRegex = new RegExp("^" + VERSION_PATTERN + "$", "i"); @@ -21746,9 +21746,9 @@ var require_version = __commonJS({ } var cleanRegex = new RegExp("^\\s*" + VERSION_PATTERN + "\\s*$", "i"); function clean2(version2) { - return stringify2(parse2(version2, cleanRegex)); + return stringify2(parse3(version2, cleanRegex)); } - function parse2(version2, regex) { + function parse3(version2, regex) { const { groups } = (regex || validRegex).exec(version2) || {}; if (!groups) { return null; @@ -21824,7 +21824,7 @@ var require_version = __commonJS({ return null; } function explain(version2) { - const parsed = parse2(version2); + const parsed = parse3(version2); if (!parsed) { return parsed; } @@ -21857,7 +21857,7 @@ var require_version = __commonJS({ // node_modules/@renovatebot/pep440/lib/operator.js var require_operator = __commonJS({ "node_modules/@renovatebot/pep440/lib/operator.js"(exports2, module2) { - var { parse: parse2 } = require_version(); + var { parse: parse3 } = require_version(); module2.exports = { compare, rcompare, @@ -21897,8 +21897,8 @@ var require_operator = __commonJS({ return version2.toLowerCase() === other.toLowerCase(); } function compare(version2, other) { - const parsedVersion = parse2(version2); - const parsedOther = parse2(other); + const parsedVersion = parse3(version2); + const parsedOther = parse3(other); const keyVersion = calculateKey(parsedVersion); const keyOther = calculateKey(parsedOther); return pyCompare(keyVersion, keyOther); @@ -21980,20 +21980,20 @@ var require_specifier = __commonJS({ ].join(""); module2.exports = { RANGE_PATTERN, - parse: parse2, + parse: parse3, satisfies: satisfies3, - filter, + filter: filter2, validRange, maxSatisfying: maxSatisfying3, minSatisfying }; var isEqualityOperator = (op) => ["==", "!=", "==="].includes(op); var rangeRegex = new RegExp("^" + RANGE_PATTERN + "$", "i"); - function parse2(ranges) { + function parse3(ranges) { if (!ranges.trim()) { return []; } - const specifiers = ranges.split(",").map((range) => rangeRegex.exec(range.trim()) || {}).map(({ groups }) => { + const specifiers = ranges.split(",").map((range2) => rangeRegex.exec(range2.trim()) || {}).map(({ groups }) => { if (!groups) { return null; } @@ -22025,23 +22025,23 @@ var require_specifier = __commonJS({ } return specifiers; } - function filter(versions, specifier, options = {}) { + function filter2(versions, specifier, options = {}) { const filtered = pick(versions, specifier, options); if (filtered.length === 0 && options.prereleases === void 0) { return pick(versions, specifier, { prereleases: true }); } return filtered; } - function maxSatisfying3(versions, range, options) { - const found = filter(versions, range, options).sort(Operator.compare); + function maxSatisfying3(versions, range2, options) { + const found = filter2(versions, range2, options).sort(Operator.compare); return found.length === 0 ? null : found[found.length - 1]; } - function minSatisfying(versions, range, options) { - const found = filter(versions, range, options).sort(Operator.compare); + function minSatisfying(versions, range2, options) { + const found = filter2(versions, range2, options).sort(Operator.compare); return found.length === 0 ? null : found[0]; } function pick(versions, specifier, options) { - const parsed = parse2(specifier); + const parsed = parse3(specifier); if (!parsed) { return []; } @@ -22110,7 +22110,7 @@ var require_specifier = __commonJS({ return op(version2, spec.version || spec.legacy); } function validRange(specifier) { - return Boolean(parse2(specifier)); + return Boolean(parse3(specifier)); } } }); @@ -22118,7 +22118,7 @@ var require_specifier = __commonJS({ // node_modules/@renovatebot/pep440/lib/semantic.js var require_semantic = __commonJS({ "node_modules/@renovatebot/pep440/lib/semantic.js"(exports2, module2) { - var { explain, parse: parse2, stringify: stringify2 } = require_version(); + var { explain, parse: parse3, stringify: stringify2 } = require_version(); module2.exports = { major, minor, @@ -22154,7 +22154,7 @@ var require_semantic = __commonJS({ } function inc(input, release, preReleaseIdentifier) { let identifier = preReleaseIdentifier || `a`; - const version2 = parse2(input); + const version2 = parse3(input); if (!version2) { return null; } @@ -22270,10 +22270,10 @@ var require_semantic = __commonJS({ // node_modules/@renovatebot/pep440/index.js var require_pep440 = __commonJS({ "node_modules/@renovatebot/pep440/index.js"(exports2, module2) { - var { valid: valid2, clean: clean2, explain, parse: parse2 } = require_version(); + var { valid: valid2, clean: clean2, explain, parse: parse3 } = require_version(); var { lt: lt2, le, eq, ne, ge, gt: gt2, compare, rcompare } = require_operator(); var { - filter, + filter: filter2, maxSatisfying: maxSatisfying3, minSatisfying, RANGE_PATTERN, @@ -22286,7 +22286,7 @@ var require_pep440 = __commonJS({ valid: valid2, clean: clean2, explain, - parse: parse2, + parse: parse3, // operator lt: lt2, le, @@ -22300,7 +22300,7 @@ var require_pep440 = __commonJS({ compare, rcompare, // range - filter, + filter: filter2, maxSatisfying: maxSatisfying3, minSatisfying, RANGE_PATTERN, @@ -22316,7 +22316,7 @@ var require_pep440 = __commonJS({ }); // src/ruff-action.ts -var path8 = __toESM(require("node:path"), 1); +var path14 = __toESM(require("node:path"), 1); // node_modules/@actions/core/lib/command.js var os = __toESM(require("os"), 1); @@ -22441,7 +22441,7 @@ function getProxyUrl(reqUrl) { if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a) { + } catch (_a2) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -23182,7 +23182,7 @@ var Summary = class { } try { yield access(pathFromEnv, import_fs.constants.R_OK | import_fs.constants.W_OK); - } catch (_a) { + } catch (_a2) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; @@ -24639,8 +24639,8 @@ function find(toolName, versionSpec, arch3) { arch3 = arch3 || os6.arch(); if (!isExplicitVersion(versionSpec)) { const localVersions = findAllVersions(toolName, arch3); - const match = evaluateVersions(localVersions, versionSpec); - versionSpec = match; + const match3 = evaluateVersions(localVersions, versionSpec); + versionSpec = match3; } let toolPath = ""; if (versionSpec) { @@ -28179,6 +28179,2670 @@ function getPlatform() { } } +// src/utils/source-input.ts +var fs7 = __toESM(require("node:fs/promises"), 1); +var path12 = __toESM(require("node:path"), 1); + +// node_modules/@actions/glob/lib/internal-globber.js +var fs6 = __toESM(require("fs"), 1); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +function getOptions(copy) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false + }; + if (copy) { + if (typeof copy.followSymbolicLinks === "boolean") { + result.followSymbolicLinks = copy.followSymbolicLinks; + debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === "boolean") { + result.implicitDescendants = copy.implicitDescendants; + debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + debug(`matchDirectories '${result.matchDirectories}'`); + } + if (typeof copy.omitBrokenSymbolicLinks === "boolean") { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } + } + return result; +} + +// node_modules/@actions/glob/lib/internal-globber.js +var path11 = __toESM(require("path"), 1); + +// node_modules/@actions/glob/lib/internal-path-helper.js +var path7 = __toESM(require("path"), 1); +var import_assert3 = __toESM(require("assert"), 1); +var IS_WINDOWS4 = process.platform === "win32"; +function dirname5(p) { + p = safeTrimTrailingSeparator(p); + if (IS_WINDOWS4 && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { + return p; + } + let result = path7.dirname(p); + if (IS_WINDOWS4 && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { + result = safeTrimTrailingSeparator(result); + } + return result; +} +function ensureAbsoluteRoot(root, itemPath) { + (0, import_assert3.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, import_assert3.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + if (hasAbsoluteRoot(itemPath)) { + return itemPath; + } + if (IS_WINDOWS4) { + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + (0, import_assert3.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { + if (itemPath.length === 2) { + return `${itemPath[0]}:\\${cwd.substr(3)}`; + } else { + if (!cwd.endsWith("\\")) { + cwd += "\\"; + } + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + } else { + return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } + } else if (normalizeSeparators2(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + (0, import_assert3.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; + } + } + (0, import_assert3.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + if (root.endsWith("/") || IS_WINDOWS4 && root.endsWith("\\")) { + } else { + root += path7.sep; + } + return root + itemPath; +} +function hasAbsoluteRoot(itemPath) { + (0, import_assert3.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators2(itemPath); + if (IS_WINDOWS4) { + return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); + } + return itemPath.startsWith("/"); +} +function hasRoot(itemPath) { + (0, import_assert3.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); + itemPath = normalizeSeparators2(itemPath); + if (IS_WINDOWS4) { + return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); + } + return itemPath.startsWith("/"); +} +function normalizeSeparators2(p) { + p = p || ""; + if (IS_WINDOWS4) { + p = p.replace(/\//g, "\\"); + const isUnc = /^\\\\+[^\\]/.test(p); + return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function safeTrimTrailingSeparator(p) { + if (!p) { + return ""; + } + p = normalizeSeparators2(p); + if (!p.endsWith(path7.sep)) { + return p; + } + if (p === path7.sep) { + return p; + } + if (IS_WINDOWS4 && /^[A-Z]:\\$/i.test(p)) { + return p; + } + return p.substr(0, p.length - 1); +} + +// node_modules/@actions/glob/lib/internal-match-kind.js +var MatchKind; +(function(MatchKind2) { + MatchKind2[MatchKind2["None"] = 0] = "None"; + MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; + MatchKind2[MatchKind2["File"] = 2] = "File"; + MatchKind2[MatchKind2["All"] = 3] = "All"; +})(MatchKind || (MatchKind = {})); + +// node_modules/@actions/glob/lib/internal-pattern-helper.js +var IS_WINDOWS5 = process.platform === "win32"; +function getSearchPaths(patterns) { + patterns = patterns.filter((x) => !x.negate); + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS5 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + searchPathMap[key] = "candidate"; + } + const result = []; + for (const pattern of patterns) { + const key = IS_WINDOWS5 ? pattern.searchPath.toUpperCase() : pattern.searchPath; + if (searchPathMap[key] === "included") { + continue; + } + let foundAncestor = false; + let tempKey = key; + let parent = dirname5(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = dirname5(tempKey); + } + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = "included"; + } + } + return result; +} +function match(patterns, itemPath) { + let result = MatchKind.None; + for (const pattern of patterns) { + if (pattern.negate) { + result &= ~pattern.match(itemPath); + } else { + result |= pattern.match(itemPath); + } + } + return result; +} +function partialMatch(patterns, itemPath) { + return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); +} + +// node_modules/@actions/glob/lib/internal-pattern.js +var os7 = __toESM(require("os"), 1); +var path10 = __toESM(require("path"), 1); +var import_assert5 = __toESM(require("assert"), 1); + +// node_modules/@actions/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); + let bi = str.indexOf(b, ai + 1); + let i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i === ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length === 1) { + const r = begs.pop(); + if (r !== void 0) + result = [r, bi]; + } else { + beg = begs.pop(); + if (beg !== void 0 && beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length && right !== void 0) { + result = [left, right]; + } + } + return result; +}; + +// node_modules/@actions/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 escSlashPattern = new RegExp(escSlash, "g"); +var escOpenPattern = new RegExp(escOpen, "g"); +var escClosePattern = new RegExp(escClose, "g"); +var escCommaPattern = new RegExp(escComma, "g"); +var escPeriodPattern = new RegExp(escPeriod, "g"); +var slashPattern = /\\\\/g; +var openPattern = /\\{/g; +var closePattern = /\\}/g; +var commaPattern = /\\,/g; +var periodPattern = /\\\./g; +var EXPANSION_MAX = 1e5; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, "."); +} +function parseCommaParts(str) { + if (!str) { + return [""]; + } + const parts = []; + const m = balanced("{", "}", str); + if (!m) { + return str.split(","); + } + const { pre, body, post } = m; + const p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = EXPANSION_MAX } = options; + if (str.slice(0, 2) === "{}") { + str = "\\{\\}" + str.slice(2); + } + return expand_(escapeBraces(str), max, true).map(unescapeBraces); +} +function embrace(str) { + return "{" + str + "}"; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte2(i, y) { + return i <= y; +} +function gte2(i, y) { + return i >= y; +} +function expand_(str, max, isTop) { + const expansions = []; + const m = balanced("{", "}", str); + if (!m) + return [str]; + const pre = m.pre; + const post = m.post.length ? expand_(m.post, max, false) : [""]; + if (/\$$/.test(m.pre)) { + for (let k = 0; k < post.length && k < max; k++) { + const expansion = pre + "{" + m.body + "}" + post[k]; + expansions.push(expansion); + } + } else { + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand_(str, max, true); + } + return [str]; + } + let n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand_(n[0], max, false).map(embrace); + if (n.length === 1) { + return post.map((p) => m.pre + n[0] + p); + } + } + } + let N; + if (isSequence && n[0] !== void 0 && n[1] !== void 0) { + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; + let test = lte2; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte2; + } + const pad = n.some(isPadded); + N = []; + for (let i = x; test(i, y); i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + N.push(c); + } + } else { + N = []; + for (let j = 0; j < n.length; j++) { + N.push.apply(N, expand_(n[j], max, false)); + } + } + for (let j = 0; j < N.length; j++) { + for (let k = 0; k < post.length && expansions.length < max; k++) { + const expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) { + expansions.push(expansion); + } + } + } + } + return expansions; +} + +// node_modules/@actions/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"); + } +}; + +// node_modules/@actions/glob/node_modules/minimatch/dist/esm/brace-expressions.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], + "[: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] +}; +var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"); +var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +var rangesToString = (ranges) => ranges.join(""); +var parseClass = (glob, position) => { + const pos = position; + if (glob.charAt(pos) !== "[") { + throw new Error("not in a brace expression"); + } + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ""; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === "!" || c === "^") && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === "]" && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === "\\") { + if (!escaping) { + escaping = true; + i++; + continue; + } + } + if (c === "[" && !escaping) { + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + if (rangeStart) { + return ["$.", false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + escaping = false; + if (rangeStart) { + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)); + } else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ""; + i++; + continue; + } + if (glob.startsWith("-]", i + 1)) { + ranges.push(braceEscape(c + "-")); + i += 2; + continue; + } + if (glob.startsWith("-", i + 1)) { + rangeStart = c; + i += 2; + continue; + } + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + return ["", false, 0, false]; + } + if (!ranges.length && !negs.length) { + return ["$.", false, glob.length - pos, true]; + } + if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]"; + const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]"; + const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs; + return [comb, uflag, endPos - pos, true]; +}; + +// node_modules/@actions/glob/node_modules/minimatch/dist/esm/unescape.js +var unescape = (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/@actions/glob/node_modules/minimatch/dist/esm/ast.js +var _a; +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]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === "") + continue; + if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) { + throw new Error("invalid part: " + p); + } + this.#parts.push(p); + } + } + 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 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 _a && pp.type === "!")) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === "!") + return true; + if (!this.#parent?.isEnd()) + 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 _a(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 _a(c, ast); + i2 = _a.#parseAST(str, ext2, i2, opt, extDepth + 1); + ast.push(ext2); + continue; + } + acc2 += c; + } + ast.push(acc2); + return i2; + } + let i = pos + 1; + let part = new _a(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; + } + } 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 _a(c, part); + part.push(ext2); + i = _a.#parseAST(str, ext2, i, opt, extDepth + depthAdd); + continue; + } + if (c === "|") { + part.push(acc); + acc = ""; + parts.push(part); + part = new _a(null, ast); + continue; + } + if (c === ")") { + if (acc === "" && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ""; + ast.push(...parts, part); + return i; + } + acc += c; + } + ast.type = null; + ast.#hasMagic = void 0; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + #canAdoptWithSpace(child2) { + return this.#canAdopt(child2, adoptionWithSpaceMap); + } + #canAdopt(child2, map = adoptionMap) { + if (!child2 || typeof child2 !== "object" || child2.type !== null || child2.#parts.length !== 1 || this.type === null) { + return false; + } + const gc = child2.#parts[0]; + if (!gc || typeof gc !== "object" || gc.type === null) { + return false; + } + return this.#canAdoptType(gc.type, map); + } + #canAdoptType(c, map = adoptionAnyMap) { + return !!map.get(this.type)?.includes(c); + } + #adoptWithSpace(child2, index) { + const gc = child2.#parts[0]; + const blank = new _a(null, gc, this.options); + blank.#parts.push(""); + gc.push(blank); + this.#adopt(child2, index); + } + #adopt(child2, index) { + const gc = child2.#parts[0]; + this.#parts.splice(index, 1, ...gc.#parts); + for (const p of gc.#parts) { + if (typeof p === "object") + p.#parent = this; + } + this.#toString = void 0; + } + #canUsurpType(c) { + const m = usurpMap.get(this.type); + return !!m?.has(c); + } + #canUsurp(child2) { + if (!child2 || typeof child2 !== "object" || child2.type !== null || child2.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) { + return false; + } + const gc = child2.#parts[0]; + if (!gc || typeof gc !== "object" || gc.type === null) { + return false; + } + return this.#canUsurpType(gc.type); + } + #usurp(child2) { + const m = usurpMap.get(this.type); + const gc = child2.#parts[0]; + const nt = m?.get(gc.type); + if (!nt) + 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 _a(null, void 0, options); + _a.#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 glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase(); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : ""); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob + }); + } + 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 src2 = this.#parts.map((p) => { + const [re, _, hasMagic, uflag] = typeof p === "string" ? _a.#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(src2.charAt(0)) || // the pattern starts with \., and then [ or . + src2.startsWith("\\.") && aps.has(src2.charAt(2)) || // the pattern starts with \.\., and then [ or . + src2.startsWith("\\.\\.") && aps.has(src2.charAt(4)) + ); + const needNoDot = !dot && !allowDot && aps.has(src2.charAt(0)); + start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ""; + } + } + } + let end = ""; + if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") { + end = "(?:$|\\/)"; + } + const final2 = start2 + src2 + end; + return [ + final2, + unescape(src2), + this.#hasMagic = !!this.#hasMagic, + this.#uflag + ]; + } + 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, unescape(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; + } + return [ + final, + unescape(body), + this.#hasMagic = !!this.#hasMagic, + this.#uflag + ]; + } + #flatten() { + if (!isExtglobAST(this)) { + for (const p of this.#parts) { + if (typeof p === "object") { + p.#flatten(); + } + } + } 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, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ""; + let uflag = false; + let inStar = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? "\\" : "") + c; + continue; + } + if (c === "*") { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } else { + inStar = false; + } + if (c === "\\") { + if (i === glob.length - 1) { + re += "\\\\"; + } else { + escaping = true; + } + continue; + } + if (c === "[") { + const [src2, needUflag, consumed, magic] = parseClass(glob, i); + if (consumed) { + re += src2; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === "?") { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, unescape(glob), !!hasMagic, uflag]; + } +}; +_a = AST; + +// node_modules/@actions/glob/node_modules/minimatch/dist/esm/escape.js +var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => { + if (magicalBraces) { + return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&"); + } + return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); +}; + +// node_modules/@actions/glob/node_modules/minimatch/dist/esm/index.js +var minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + 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); +}; +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 qmarksTest = ([$0, ext2 = ""]) => { + const noext = qmarksTestNoExt([$0]); + return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2); +}; +var qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith("."); +}; +var qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== "." && f !== ".."; +}; +var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; +var path8 = { + win32: { sep: "\\" }, + posix: { sep: "/" } +}; +var sep3 = defaultPlatform === "win32" ? path8.win32.sep : path8.posix.sep; +minimatch.sep = sep3; +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); +minimatch.filter = filter; +var ext = (a, b = {}) => Object.assign({}, a, b); +var defaults = (def) => { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + 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, + GLOBSTAR + }); +}; +minimatch.defaults = defaults; +var braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern, { max: options.braceExpandMax }); +}; +minimatch.braceExpand = braceExpand; +var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +minimatch.makeRe = makeRe; +var match2 = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter((f) => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +minimatch.match = match2; +var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +var Minimatch = class { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + maxGlobstarRecursion; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === "win32"; + const awe = "allowWindowsEscape"; + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === 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; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== "string") + return true; + } + } + return false; + } + debug(..._) { + } + make() { + const pattern = this.pattern; + const options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args2) => console.error(...args2); + } + this.debug(this.pattern, this.globSet); + const rawGlobParts = this.globSet.map((s) => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + let set = this.globParts.map((s, _, __) => { + 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]); + if (isUNC) { + return [ + ...s.slice(0, 4), + ...s.slice(4).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])) { + p[2] = "?"; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + if (this.options.noglobstar) { + for (const partset of globParts) { + for (let j = 0; j < partset.length; j++) { + if (partset[j] === "**") { + partset[j] = "*"; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } else if (optimizationLevel >= 1) { + globParts = this.levelOneOptimize(globParts); + } else { + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map((parts) => { + let gs = -1; + while (-1 !== (gs = parts.indexOf("**", gs + 1))) { + let i = gs; + while (parts[i + 1] === "**") { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map((parts) => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === "**" && prev === "**") { + return set; + } + if (part === "..") { + if (prev && prev !== ".." && prev !== "." && prev !== "**") { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [""] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + if (i === 1 && p === "" && parts[0] === "") + continue; + if (p === "." || p === "") { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) { + didSomething = true; + parts.pop(); + } + } + let dd = 0; + while (-1 !== (dd = parts.indexOf("..", dd + 1))) { + const p = parts[dd - 1]; + if (p && p !== "." && p !== ".." && p !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p))) { + didSomething = true; + parts.splice(dd - 1, 2); + dd -= 2; + } + } + } while (didSomething); + return parts.length === 0 ? [""] : parts; + } + // First phase: single-pattern processing + //
 is 1 or more portions
+  //  is 1 or more portions
+  // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+  // 
/

/../ ->

/
+  // **/**/ -> **/
+  //
+  // **/*/ -> */**/ <== not valid because ** doesn't follow
+  // this WOULD be allowed if ** did follow symlinks, or * didn't
+  firstPhasePreProcess(globParts) {
+    let didSomething = false;
+    do {
+      didSomething = false;
+      for (let parts of globParts) {
+        let gs = -1;
+        while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
+          let gss = gs;
+          while (parts[gss + 1] === "**") {
+            gss++;
+          }
+          if (gss > gs) {
+            parts.splice(gs + 1, gss - gs);
+          }
+          let next = parts[gs + 1];
+          const p = parts[gs + 2];
+          const p2 = parts[gs + 3];
+          if (next !== "..")
+            continue;
+          if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
+            continue;
+          }
+          didSomething = true;
+          parts.splice(gs, 1);
+          const other = parts.slice(0);
+          other[gs] = "**";
+          globParts.push(other);
+          gs--;
+        }
+        if (!this.preserveMultipleSlashes) {
+          for (let i = 1; i < parts.length - 1; i++) {
+            const p = parts[i];
+            if (i === 1 && p === "" && parts[0] === "")
+              continue;
+            if (p === "." || p === "") {
+              didSomething = true;
+              parts.splice(i, 1);
+              i--;
+            }
+          }
+          if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
+            didSomething = true;
+            parts.pop();
+          }
+        }
+        let dd = 0;
+        while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
+          const p = parts[dd - 1];
+          if (p && p !== "." && p !== ".." && p !== "**") {
+            didSomething = true;
+            const needDot = dd === 1 && parts[dd + 1] === "**";
+            const splin = needDot ? ["."] : [];
+            parts.splice(dd - 1, 2, ...splin);
+            if (parts.length === 0)
+              parts.push("");
+            dd -= 2;
+          }
+        }
+      }
+    } while (didSomething);
+    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;
+        }
+      }
+    }
+    return globParts.filter((gs) => gs.length);
+  }
+  partsMatch(a, b, emptyGSMatch = false) {
+    let ai = 0;
+    let bi = 0;
+    let result = [];
+    let which2 = "";
+    while (ai < a.length && bi < b.length) {
+      if (a[ai] === b[bi]) {
+        result.push(which2 === "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 (which2 === "b")
+          return false;
+        which2 = "a";
+        result.push(a[ai]);
+        ai++;
+        bi++;
+      } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
+        if (which2 === "a")
+          return false;
+        which2 = "b";
+        result.push(b[bi]);
+        ai++;
+        bi++;
+      } else {
+        return false;
+      }
+    }
+    return a.length === b.length && result;
+  }
+  parseNegate() {
+    if (this.nonegate)
+      return;
+    const pattern = this.pattern;
+    let negate = false;
+    let negateOffset = 0;
+    for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
+      negate = !negate;
+      negateOffset++;
+    }
+    if (negateOffset)
+      this.pattern = pattern.slice(negateOffset);
+    this.negate = negate;
+  }
+  // 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) {
+    let fileStartIndex = 0;
+    let patternStartIndex = 0;
+    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]);
+      const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
+      const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
+      const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
+      if (typeof fdi === "number" && typeof pdi === "number") {
+        const [fd, pd] = [
+          file[fdi],
+          pattern[pdi]
+        ];
+        if (fd.toLowerCase() === pd.toLowerCase()) {
+          pattern[pdi] = fd;
+          patternStartIndex = pdi;
+          fileStartIndex = fdi;
+        }
+      }
+    }
+    const { optimizationLevel = 1 } = this.options;
+    if (optimizationLevel >= 2) {
+      file = this.levelTwoFileOptimize(file);
+    }
+    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)
+    ];
+    if (head.length) {
+      const fileHead = file.slice(fileIndex, fileIndex + head.length);
+      if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
+        return false;
+      }
+      fileIndex += head.length;
+      patternIndex += head.length;
+    }
+    let fileTailMatch = 0;
+    if (tail.length) {
+      if (tail.length + fileIndex > file.length)
+        return false;
+      let tailStart = file.length - tail.length;
+      if (this.#matchOne(file, tail, partial, tailStart, 0)) {
+        fileTailMatch = tail.length;
+      } else {
+        if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
+          return false;
+        }
+        tailStart--;
+        if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
+          return false;
+        }
+        fileTailMatch = tail.length + 1;
+      }
+    }
+    if (!body.length) {
+      let sawSome = !!fileTailMatch;
+      for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
+        const f = String(file[i2]);
+        sawSome = true;
+        if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
+          return false;
+        }
+      }
+      return partial || sawSome;
+    }
+    const bodySegments = [[[], 0]];
+    let currentBody = bodySegments[0];
+    let nonGsParts = 0;
+    const nonGsPartsSums = [0];
+    for (const b of body) {
+      if (b === GLOBSTAR) {
+        nonGsPartsSums.push(nonGsParts);
+        currentBody = [[], 0];
+        bodySegments.push(currentBody);
+      } else {
+        currentBody[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);
+  }
+  // return false for "nope, not matching"
+  // return null for "not matching, cannot keep trying"
+  #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
+    const bs = bodySegments[bodyIndex];
+    if (!bs) {
+      for (let i = fileIndex; i < file.length; i++) {
+        sawTail = true;
+        const f = file[i];
+        if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
+          return false;
+        }
+      }
+      return sawTail;
+    }
+    const [body, after] = bs;
+    while (fileIndex <= after) {
+      const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
+      if (m && globStarDepth < this.maxGlobstarRecursion) {
+        const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
+        if (sub !== false) {
+          return sub;
+        }
+      }
+      const f = file[fileIndex];
+      if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
+        return false;
+      }
+      fileIndex++;
+    }
+    return partial || null;
+  }
+  #matchOne(file, pattern, partial, fileIndex, patternIndex) {
+    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");
+      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)
+        return false;
+    }
+    if (fi === fl && pi === pl) {
+      return true;
+    } else if (fi === fl) {
+      return partial;
+    } else if (pi === pl) {
+      return fi === fl - 1 && file[fi] === "";
+    } else {
+      throw new Error("wtf?");
+    }
+  }
+  braceExpand() {
+    return braceExpand(this.pattern, this.options);
+  }
+  parse(pattern) {
+    assertValidPattern(pattern);
+    const options = this.options;
+    if (pattern === "**")
+      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 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 [open2, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
+    re = "^" + open2 + re + close + "$";
+    if (this.partial) {
+      re = "^(?:\\/|" + open2 + re.slice(1, -1) + close + ")$";
+    }
+    if (this.negate)
+      re = "^(?!" + re + ").+$";
+    try {
+      this.regexp = new RegExp(re, [...flags].join(""));
+    } catch {
+      this.regexp = false;
+    }
+    return this.regexp;
+  }
+  slashSplit(p) {
+    if (this.preserveMultipleSlashes) {
+      return p.split("/");
+    } else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
+      return ["", ...p.split(/\/+/)];
+    } else {
+      return p.split(/\/+/);
+    }
+  }
+  match(f, partial = this.partial) {
+    this.debug("match", f, this.pattern);
+    if (this.comment) {
+      return false;
+    }
+    if (this.empty) {
+      return f === "";
+    }
+    if (f === "/" && partial) {
+      return true;
+    }
+    const options = this.options;
+    if (this.isWindows) {
+      f = f.split("\\").join("/");
+    }
+    const ff = this.slashSplit(f);
+    this.debug(this.pattern, "split", 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);
+      if (hit) {
+        if (options.flipNegate) {
+          return true;
+        }
+        return !this.negate;
+      }
+    }
+    if (options.flipNegate) {
+      return false;
+    }
+    return this.negate;
+  }
+  static defaults(def) {
+    return minimatch.defaults(def).Minimatch;
+  }
+};
+minimatch.AST = AST;
+minimatch.Minimatch = Minimatch;
+minimatch.escape = escape;
+minimatch.unescape = unescape;
+
+// node_modules/@actions/glob/lib/internal-path.js
+var path9 = __toESM(require("path"), 1);
+var import_assert4 = __toESM(require("assert"), 1);
+var IS_WINDOWS6 = process.platform === "win32";
+var Path = class {
+  /**
+   * Constructs a Path
+   * @param itemPath Path or array of segments
+   */
+  constructor(itemPath) {
+    this.segments = [];
+    if (typeof itemPath === "string") {
+      (0, import_assert4.default)(itemPath, `Parameter 'itemPath' must not be empty`);
+      itemPath = safeTrimTrailingSeparator(itemPath);
+      if (!hasRoot(itemPath)) {
+        this.segments = itemPath.split(path9.sep);
+      } else {
+        let remaining = itemPath;
+        let dir = dirname5(remaining);
+        while (dir !== remaining) {
+          const basename5 = path9.basename(remaining);
+          this.segments.unshift(basename5);
+          remaining = dir;
+          dir = dirname5(remaining);
+        }
+        this.segments.unshift(remaining);
+      }
+    } else {
+      (0, import_assert4.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
+      for (let i = 0; i < itemPath.length; i++) {
+        let segment = itemPath[i];
+        (0, import_assert4.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
+        segment = normalizeSeparators2(itemPath[i]);
+        if (i === 0 && hasRoot(segment)) {
+          segment = safeTrimTrailingSeparator(segment);
+          (0, import_assert4.default)(segment === dirname5(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
+          this.segments.push(segment);
+        } else {
+          (0, import_assert4.default)(!segment.includes(path9.sep), `Parameter 'itemPath' contains unexpected path separators`);
+          this.segments.push(segment);
+        }
+      }
+    }
+  }
+  /**
+   * Converts the path to it's string representation
+   */
+  toString() {
+    let result = this.segments[0];
+    let skipSlash = result.endsWith(path9.sep) || IS_WINDOWS6 && /^[A-Z]:$/i.test(result);
+    for (let i = 1; i < this.segments.length; i++) {
+      if (skipSlash) {
+        skipSlash = false;
+      } else {
+        result += path9.sep;
+      }
+      result += this.segments[i];
+    }
+    return result;
+  }
+};
+
+// node_modules/@actions/glob/lib/internal-pattern.js
+var IS_WINDOWS7 = process.platform === "win32";
+var Pattern = class _Pattern {
+  constructor(patternOrNegate, isImplicitPattern = false, segments, homedir2) {
+    this.negate = false;
+    let pattern;
+    if (typeof patternOrNegate === "string") {
+      pattern = patternOrNegate.trim();
+    } else {
+      segments = segments || [];
+      (0, import_assert5.default)(segments.length, `Parameter 'segments' must not empty`);
+      const root = _Pattern.getLiteral(segments[0]);
+      (0, import_assert5.default)(root && hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
+      pattern = new Path(segments).toString().trim();
+      if (patternOrNegate) {
+        pattern = `!${pattern}`;
+      }
+    }
+    while (pattern.startsWith("!")) {
+      this.negate = !this.negate;
+      pattern = pattern.substr(1).trim();
+    }
+    pattern = _Pattern.fixupPattern(pattern, homedir2);
+    this.segments = new Path(pattern).segments;
+    this.trailingSeparator = normalizeSeparators2(pattern).endsWith(path10.sep);
+    pattern = safeTrimTrailingSeparator(pattern);
+    let foundGlob = false;
+    const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === ""));
+    this.searchPath = new Path(searchSegments).toString();
+    this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS7 ? "i" : "");
+    this.isImplicitPattern = isImplicitPattern;
+    const minimatchOptions = {
+      dot: true,
+      nobrace: true,
+      nocase: IS_WINDOWS7,
+      nocomment: true,
+      noext: true,
+      nonegate: true
+    };
+    pattern = IS_WINDOWS7 ? pattern.replace(/\\/g, "/") : pattern;
+    this.minimatch = new Minimatch(pattern, minimatchOptions);
+  }
+  /**
+   * Matches the pattern against the specified path
+   */
+  match(itemPath) {
+    if (this.segments[this.segments.length - 1] === "**") {
+      itemPath = normalizeSeparators2(itemPath);
+      if (!itemPath.endsWith(path10.sep) && this.isImplicitPattern === false) {
+        itemPath = `${itemPath}${path10.sep}`;
+      }
+    } else {
+      itemPath = safeTrimTrailingSeparator(itemPath);
+    }
+    if (this.minimatch.match(itemPath)) {
+      return this.trailingSeparator ? MatchKind.Directory : MatchKind.All;
+    }
+    return MatchKind.None;
+  }
+  /**
+   * Indicates whether the pattern may match descendants of the specified path
+   */
+  partialMatch(itemPath) {
+    itemPath = safeTrimTrailingSeparator(itemPath);
+    if (dirname5(itemPath) === itemPath) {
+      return this.rootRegExp.test(itemPath);
+    }
+    return this.minimatch.matchOne(itemPath.split(IS_WINDOWS7 ? /\\+/ : /\/+/), this.minimatch.set[0], true);
+  }
+  /**
+   * Escapes glob patterns within a path
+   */
+  static globEscape(s) {
+    return (IS_WINDOWS7 ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]");
+  }
+  /**
+   * Normalizes slashes and ensures absolute root
+   */
+  static fixupPattern(pattern, homedir2) {
+    (0, import_assert5.default)(pattern, "pattern cannot be empty");
+    const literalSegments = new Path(pattern).segments.map((x) => _Pattern.getLiteral(x));
+    (0, import_assert5.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
+    (0, import_assert5.default)(!hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
+    pattern = normalizeSeparators2(pattern);
+    if (pattern === "." || pattern.startsWith(`.${path10.sep}`)) {
+      pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1);
+    } else if (pattern === "~" || pattern.startsWith(`~${path10.sep}`)) {
+      homedir2 = homedir2 || os7.homedir();
+      (0, import_assert5.default)(homedir2, "Unable to determine HOME directory");
+      (0, import_assert5.default)(hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`);
+      pattern = _Pattern.globEscape(homedir2) + pattern.substr(1);
+    } else if (IS_WINDOWS7 && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) {
+      let root = ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2));
+      if (pattern.length > 2 && !root.endsWith("\\")) {
+        root += "\\";
+      }
+      pattern = _Pattern.globEscape(root) + pattern.substr(2);
+    } else if (IS_WINDOWS7 && (pattern === "\\" || pattern.match(/^\\[^\\]/))) {
+      let root = ensureAbsoluteRoot("C:\\dummy-root", "\\");
+      if (!root.endsWith("\\")) {
+        root += "\\";
+      }
+      pattern = _Pattern.globEscape(root) + pattern.substr(1);
+    } else {
+      pattern = ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern);
+    }
+    return normalizeSeparators2(pattern);
+  }
+  /**
+   * Attempts to unescape a pattern segment to create a literal path segment.
+   * Otherwise returns empty string.
+   */
+  static getLiteral(segment) {
+    let literal = "";
+    for (let i = 0; i < segment.length; i++) {
+      const c = segment[i];
+      if (c === "\\" && !IS_WINDOWS7 && i + 1 < segment.length) {
+        literal += segment[++i];
+        continue;
+      } else if (c === "*" || c === "?") {
+        return "";
+      } else if (c === "[" && i + 1 < segment.length) {
+        let set = "";
+        let closed = -1;
+        for (let i2 = i + 1; i2 < segment.length; i2++) {
+          const c2 = segment[i2];
+          if (c2 === "\\" && !IS_WINDOWS7 && i2 + 1 < segment.length) {
+            set += segment[++i2];
+            continue;
+          } else if (c2 === "]") {
+            closed = i2;
+            break;
+          } else {
+            set += c2;
+          }
+        }
+        if (closed >= 0) {
+          if (set.length > 1) {
+            return "";
+          }
+          if (set) {
+            literal += set;
+            i = closed;
+            continue;
+          }
+        }
+      }
+      literal += c;
+    }
+    return literal;
+  }
+  /**
+   * Escapes regexp special characters
+   * https://javascript.info/regexp-escaping
+   */
+  static regExpEscape(s) {
+    return s.replace(/[[\\^$.|?*+()]/g, "\\$&");
+  }
+};
+
+// node_modules/@actions/glob/lib/internal-search-state.js
+var SearchState = class {
+  constructor(path15, level) {
+    this.path = path15;
+    this.level = level;
+  }
+};
+
+// node_modules/@actions/glob/lib/internal-globber.js
+var __awaiter9 = function(thisArg, _arguments, P, generator) {
+  function adopt(value) {
+    return value instanceof P ? value : new P(function(resolve4) {
+      resolve4(value);
+    });
+  }
+  return new (P || (P = Promise))(function(resolve4, reject) {
+    function fulfilled(value) {
+      try {
+        step(generator.next(value));
+      } catch (e) {
+        reject(e);
+      }
+    }
+    function rejected(value) {
+      try {
+        step(generator["throw"](value));
+      } catch (e) {
+        reject(e);
+      }
+    }
+    function step(result) {
+      result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected);
+    }
+    step((generator = generator.apply(thisArg, _arguments || [])).next());
+  });
+};
+var __asyncValues = function(o) {
+  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+  var m = o[Symbol.asyncIterator], i;
+  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
+    return this;
+  }, i);
+  function verb(n) {
+    i[n] = o[n] && function(v) {
+      return new Promise(function(resolve4, reject) {
+        v = o[n](v), settle(resolve4, reject, v.done, v.value);
+      });
+    };
+  }
+  function settle(resolve4, reject, d, v) {
+    Promise.resolve(v).then(function(v2) {
+      resolve4({ value: v2, done: d });
+    }, reject);
+  }
+};
+var __await = function(v) {
+  return this instanceof __await ? (this.v = v, this) : new __await(v);
+};
+var __asyncGenerator = function(thisArg, _arguments, generator) {
+  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+  var g = generator.apply(thisArg, _arguments || []), i, q = [];
+  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
+    return this;
+  }, i;
+  function awaitReturn(f) {
+    return function(v) {
+      return Promise.resolve(v).then(f, reject);
+    };
+  }
+  function verb(n, f) {
+    if (g[n]) {
+      i[n] = function(v) {
+        return new Promise(function(a, b) {
+          q.push([n, v, a, b]) > 1 || resume(n, v);
+        });
+      };
+      if (f) i[n] = f(i[n]);
+    }
+  }
+  function resume(n, v) {
+    try {
+      step(g[n](v));
+    } catch (e) {
+      settle(q[0][3], e);
+    }
+  }
+  function step(r) {
+    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
+  }
+  function fulfill(value) {
+    resume("next", value);
+  }
+  function reject(value) {
+    resume("throw", value);
+  }
+  function settle(f, v) {
+    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
+  }
+};
+var IS_WINDOWS8 = process.platform === "win32";
+var DefaultGlobber = class _DefaultGlobber {
+  constructor(options) {
+    this.patterns = [];
+    this.searchPaths = [];
+    this.options = getOptions(options);
+  }
+  getSearchPaths() {
+    return this.searchPaths.slice();
+  }
+  glob() {
+    return __awaiter9(this, void 0, void 0, function* () {
+      var _a2, e_1, _b, _c;
+      const result = [];
+      try {
+        for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a2 = _f.done, !_a2; _d = true) {
+          _c = _f.value;
+          _d = false;
+          const itemPath = _c;
+          result.push(itemPath);
+        }
+      } catch (e_1_1) {
+        e_1 = { error: e_1_1 };
+      } finally {
+        try {
+          if (!_d && !_a2 && (_b = _e.return)) yield _b.call(_e);
+        } finally {
+          if (e_1) throw e_1.error;
+        }
+      }
+      return result;
+    });
+  }
+  globGenerator() {
+    return __asyncGenerator(this, arguments, function* globGenerator_1() {
+      const options = getOptions(this.options);
+      const patterns = [];
+      for (const pattern of this.patterns) {
+        patterns.push(pattern);
+        if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) {
+          patterns.push(new Pattern(pattern.negate, true, pattern.segments.concat("**")));
+        }
+      }
+      const stack = [];
+      for (const searchPath of getSearchPaths(patterns)) {
+        debug(`Search path '${searchPath}'`);
+        try {
+          yield __await(fs6.promises.lstat(searchPath));
+        } catch (err) {
+          if (err.code === "ENOENT") {
+            continue;
+          }
+          throw err;
+        }
+        stack.unshift(new SearchState(searchPath, 1));
+      }
+      const traversalChain = [];
+      while (stack.length) {
+        const item = stack.pop();
+        const match3 = match(patterns, item.path);
+        const partialMatch2 = !!match3 || partialMatch(patterns, item.path);
+        if (!match3 && !partialMatch2) {
+          continue;
+        }
+        const stats = yield __await(
+          _DefaultGlobber.stat(item, options, traversalChain)
+          // Broken symlink, or symlink cycle detected, or no longer exists
+        );
+        if (!stats) {
+          continue;
+        }
+        if (options.excludeHiddenFiles && path11.basename(item.path).match(/^\./)) {
+          continue;
+        }
+        if (stats.isDirectory()) {
+          if (match3 & MatchKind.Directory && options.matchDirectories) {
+            yield yield __await(item.path);
+          } else if (!partialMatch2) {
+            continue;
+          }
+          const childLevel = item.level + 1;
+          const childItems = (yield __await(fs6.promises.readdir(item.path))).map((x) => new SearchState(path11.join(item.path, x), childLevel));
+          stack.push(...childItems.reverse());
+        } else if (match3 & MatchKind.File) {
+          yield yield __await(item.path);
+        }
+      }
+    });
+  }
+  /**
+   * Constructs a DefaultGlobber
+   */
+  static create(patterns, options) {
+    return __awaiter9(this, void 0, void 0, function* () {
+      const result = new _DefaultGlobber(options);
+      if (IS_WINDOWS8) {
+        patterns = patterns.replace(/\r\n/g, "\n");
+        patterns = patterns.replace(/\r/g, "\n");
+      }
+      const lines = patterns.split("\n").map((x) => x.trim());
+      for (const line of lines) {
+        if (!line || line.startsWith("#")) {
+          continue;
+        } else {
+          result.patterns.push(new Pattern(line));
+        }
+      }
+      result.searchPaths.push(...getSearchPaths(result.patterns));
+      return result;
+    });
+  }
+  static stat(item, options, traversalChain) {
+    return __awaiter9(this, void 0, void 0, function* () {
+      let stats;
+      if (options.followSymbolicLinks) {
+        try {
+          stats = yield fs6.promises.stat(item.path);
+        } catch (err) {
+          if (err.code === "ENOENT") {
+            if (options.omitBrokenSymbolicLinks) {
+              debug(`Broken symlink '${item.path}'`);
+              return void 0;
+            }
+            throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);
+          }
+          throw err;
+        }
+      } else {
+        stats = yield fs6.promises.lstat(item.path);
+      }
+      if (stats.isDirectory() && options.followSymbolicLinks) {
+        const realPath = yield fs6.promises.realpath(item.path);
+        while (traversalChain.length >= item.level) {
+          traversalChain.pop();
+        }
+        if (traversalChain.some((x) => x === realPath)) {
+          debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);
+          return void 0;
+        }
+        traversalChain.push(realPath);
+      }
+      return stats;
+    });
+  }
+};
+
+// node_modules/@actions/glob/lib/glob.js
+var __awaiter10 = function(thisArg, _arguments, P, generator) {
+  function adopt(value) {
+    return value instanceof P ? value : new P(function(resolve4) {
+      resolve4(value);
+    });
+  }
+  return new (P || (P = Promise))(function(resolve4, reject) {
+    function fulfilled(value) {
+      try {
+        step(generator.next(value));
+      } catch (e) {
+        reject(e);
+      }
+    }
+    function rejected(value) {
+      try {
+        step(generator["throw"](value));
+      } catch (e) {
+        reject(e);
+      }
+    }
+    function step(result) {
+      result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected);
+    }
+    step((generator = generator.apply(thisArg, _arguments || [])).next());
+  });
+};
+function create(patterns, options) {
+  return __awaiter10(this, void 0, void 0, function* () {
+    return yield DefaultGlobber.create(patterns, options);
+  });
+}
+
+// src/utils/source-input.ts
+var GLOB_PATTERN = /[*?[]/;
+function splitInput(input) {
+  return input.trim().split(/\s+/).filter(Boolean);
+}
+async function expandSourceInput(srcInput) {
+  const sources = splitInput(srcInput);
+  if (sources.length === 0) {
+    return [];
+  }
+  const expandedSources = [];
+  for (const source of sources) {
+    if (!hasGlobPattern(source) || await pathExists(source)) {
+      expandedSources.push(source);
+      continue;
+    }
+    const matches = await globMatches(source);
+    expandedSources.push(...matches.length > 0 ? matches : [source]);
+  }
+  return expandedSources;
+}
+async function getVersionSourceDirectory(srcInput, versionInput, versionFileInput) {
+  if (hasInput(versionInput) || hasInput(versionFileInput)) {
+    return ".";
+  }
+  return await getSourceBasePath(srcInput);
+}
+async function getSourceBasePath(srcInput) {
+  const firstSource = splitInput(srcInput)[0] ?? ".";
+  if (!hasGlobPattern(firstSource) || await pathExists(firstSource)) {
+    return stripTrailingSeparators(firstSource);
+  }
+  const matches = await globMatches(firstSource);
+  if (matches.length > 0) {
+    return matches[0] ?? ".";
+  }
+  return await getUnmatchedSourceBasePath(firstSource);
+}
+async function getUnmatchedSourceBasePath(source) {
+  const sourcePath = splitSourcePath(source);
+  const existingSegments = await getExistingLiteralSegments(sourcePath);
+  const nextSegment = sourcePath.segments[existingSegments.length];
+  if (existingSegments.length > 0 && hasGlobPattern(nextSegment ?? "")) {
+    return formatSourcePath(sourcePath.root, existingSegments);
+  }
+  const globIndex = source.search(GLOB_PATTERN);
+  const literalPrefix = source.substring(0, globIndex);
+  if (literalPrefix === "") {
+    return ".";
+  }
+  if (hasTrailingSeparator(literalPrefix)) {
+    return stripTrailingSeparators(literalPrefix);
+  }
+  return path12.dirname(literalPrefix);
+}
+function hasInput(input) {
+  return input !== void 0 && input.trim() !== "";
+}
+function hasGlobPattern(source) {
+  return GLOB_PATTERN.test(source);
+}
+function hasTrailingSeparator(source) {
+  return /[/\\]$/.test(source);
+}
+function stripTrailingSeparators(source) {
+  return source.replace(/[/\\]+$/, "") || ".";
+}
+async function pathExists(source) {
+  try {
+    await fs7.stat(source);
+    return true;
+  } catch (err) {
+    if (isPathNotFoundError(err)) {
+      return false;
+    }
+    throw err;
+  }
+}
+function isPathNotFoundError(err) {
+  const code = err.code;
+  return code === "ENOENT" || code === "ENOTDIR";
+}
+async function getGlobPattern(pattern) {
+  const sourcePath = splitSourcePath(pattern);
+  const existingSegments = await getExistingLiteralSegments(sourcePath);
+  if (existingSegments.length === 0) {
+    return normalizeGlobPattern(pattern);
+  }
+  const escapedSegments = sourcePath.segments.map(
+    (segment, index) => index < existingSegments.length ? globEscape(segment) : segment
+  );
+  return normalizeGlobPattern(
+    formatSourcePath(sourcePath.root, escapedSegments)
+  );
+}
+function splitSourcePath(source) {
+  const root = path12.parse(source).root;
+  const relativePath = source.slice(root.length);
+  const separatorPattern = process.platform === "win32" ? /[/\\]+/ : /\/+/;
+  return {
+    root,
+    segments: relativePath.split(separatorPattern).filter(Boolean)
+  };
+}
+async function getExistingLiteralSegments(sourcePath) {
+  const existingSegments = [];
+  for (const segment of sourcePath.segments) {
+    const candidateSegments = [...existingSegments, segment];
+    if (!await pathExists(toFileSystemPath(sourcePath.root, candidateSegments))) {
+      break;
+    }
+    existingSegments.push(segment);
+  }
+  return existingSegments;
+}
+function toFileSystemPath(root, segments) {
+  if (segments.length === 0) {
+    return root || ".";
+  }
+  return root ? path12.join(root, ...segments) : path12.join(...segments);
+}
+function formatSourcePath(root, segments) {
+  if (segments.length === 0) {
+    return root || ".";
+  }
+  if (!root) {
+    return segments.join("/");
+  }
+  const normalizedRoot = root.replace(/\\/g, "/").replace(/\/+$/, "");
+  return `${normalizedRoot || "/"}/${segments.join("/")}`;
+}
+function globEscape(source) {
+  return source.replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]");
+}
+async function globMatches(pattern) {
+  const globber = await create(await getGlobPattern(pattern), {
+    excludeHiddenFiles: !explicitlyTargetsHiddenPath(pattern),
+    followSymbolicLinks: false,
+    implicitDescendants: false
+  });
+  const matches = await globber.glob();
+  return await preserveSourcePathStyle(pattern, matches.sort());
+}
+async function preserveSourcePathStyle(pattern, matches) {
+  if (path12.isAbsolute(pattern)) {
+    return matches;
+  }
+  const cwd = await fs7.realpath(process.cwd());
+  return matches.map((match3) => path12.relative(cwd, match3) || ".");
+}
+function explicitlyTargetsHiddenPath(pattern) {
+  return splitSourcePath(pattern).segments.some(isHiddenPathSegment);
+}
+function isHiddenPathSegment(segment) {
+  return segment.startsWith(".") && segment !== "." && segment !== "..";
+}
+function normalizeGlobPattern(pattern) {
+  if (process.platform !== "win32") {
+    return pattern;
+  }
+  return pattern.replace(/\\/g, "/");
+}
+
 // src/version/resolve.ts
 var pep440 = __toESM(require_pep440(), 1);
 
@@ -28215,31 +30879,39 @@ function parseVersionSpecifier(specifier) {
 }
 
 // src/utils/pyproject-finder.ts
-var fs6 = __toESM(require("node:fs"), 1);
-var path7 = __toESM(require("node:path"), 1);
-function findPyprojectToml(startDir, workspaceRoot) {
-  let currentDir = path7.resolve(startDir);
-  const resolvedWorkspaceRoot = path7.resolve(workspaceRoot);
+var fs8 = __toESM(require("node:fs"), 1);
+var path13 = __toESM(require("node:path"), 1);
+function findPyprojectToml(startPath, workspaceRoot) {
+  let currentDir = resolveStartDirectory(startPath);
+  const resolvedWorkspaceRoot = path13.resolve(workspaceRoot);
   while (true) {
-    const pyprojectPath = path7.join(currentDir, "pyproject.toml");
+    const pyprojectPath = path13.join(currentDir, "pyproject.toml");
     debug(`Checking for ${pyprojectPath}`);
-    if (fs6.existsSync(pyprojectPath)) {
+    if (fs8.existsSync(pyprojectPath)) {
       info(`Found pyproject.toml at ${pyprojectPath}`);
       return pyprojectPath;
     }
     if (currentDir === resolvedWorkspaceRoot) {
       return void 0;
     }
-    const parentDir = path7.dirname(currentDir);
+    const parentDir = path13.dirname(currentDir);
     if (parentDir === currentDir || !isPathWithinWorkspace(parentDir, resolvedWorkspaceRoot)) {
       return void 0;
     }
     currentDir = parentDir;
   }
 }
+function resolveStartDirectory(startPath) {
+  const resolvedStartPath = path13.resolve(startPath);
+  if (!fs8.existsSync(resolvedStartPath)) {
+    return resolvedStartPath;
+  }
+  const stats = fs8.statSync(resolvedStartPath);
+  return stats.isDirectory() ? resolvedStartPath : path13.dirname(resolvedStartPath);
+}
 function isPathWithinWorkspace(checkPath, workspaceRoot) {
-  const relativePath = path7.relative(workspaceRoot, checkPath);
-  return !relativePath.startsWith("..") && !path7.isAbsolute(relativePath);
+  const relativePath = path13.relative(workspaceRoot, checkPath);
+  return !relativePath.startsWith("..") && !path13.isAbsolute(relativePath);
 }
 
 // src/version/file-parser.ts
@@ -28325,7 +30997,7 @@ function skipVoid(str, ptr, banNewLines, banComments) {
   }
   return ptr;
 }
-function skipUntil(str, ptr, sep2, end, banNewLines = false) {
+function skipUntil(str, ptr, sep6, end, banNewLines = false) {
   if (!end) {
     ptr = indexOfNewline(str, ptr);
     return ptr < 0 ? str.length : ptr;
@@ -28334,7 +31006,7 @@ function skipUntil(str, ptr, sep2, end, banNewLines = false) {
     let c = str[i];
     if (c === "#") {
       i = indexOfNewline(str, i);
-    } else if (c === sep2) {
+    } else if (c === sep6) {
       return i + 1;
     } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
       return i;
@@ -28375,18 +31047,18 @@ var TomlDate = class _TomlDate extends Date {
     let hasTime = true;
     let offset = "Z";
     if (typeof date === "string") {
-      let match = date.match(DATE_TIME_RE);
-      if (match) {
-        if (!match[1]) {
+      let match3 = date.match(DATE_TIME_RE);
+      if (match3) {
+        if (!match3[1]) {
           hasDate = false;
           date = `0000-01-01T${date}`;
         }
-        hasTime = !!match[2];
+        hasTime = !!match3[2];
         hasTime && date[10] === " " && (date = date.replace(" ", "T"));
-        if (match[2] && +match[2] > 23) {
+        if (match3[2] && +match3[2] > 23) {
           date = "";
         } else {
-          offset = match[3] || null;
+          offset = match3[3] || null;
           date = date.toUpperCase();
           if (!offset && hasTime)
             date += "Z";
@@ -28566,24 +31238,24 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
       });
     }
     value = value.replace(/_/g, "");
-    let numeric = +value;
-    if (isNaN(numeric)) {
+    let numeric2 = +value;
+    if (isNaN(numeric2)) {
       throw new TomlError("invalid number", {
         toml,
         ptr
       });
     }
     if (isInt) {
-      if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
+      if ((isInt = !Number.isSafeInteger(numeric2)) && !integersAsBigInt) {
         throw new TomlError("integer value cannot be represented losslessly", {
           toml,
           ptr
         });
       }
       if (isInt || integersAsBigInt === true)
-        numeric = BigInt(value);
+        numeric2 = BigInt(value);
     }
-    return numeric;
+    return numeric2;
   }
   const date = new TomlDate(value);
   if (!date.isValid()) {
@@ -28870,7 +31542,7 @@ function peekTable(key, table, meta, type) {
   }
   return [k, t, state.c];
 }
-function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
+function parse2(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
   let res = {};
   let meta = {};
   let tbl = res;
@@ -28992,9 +31664,9 @@ function findRuffVersionInSpec(spec) {
     return void 0;
   }
   versionSpec = versionSpec.replace(/\\$/, "").trim();
-  const match = versionSpec.match(/^([^;]+)(?:;.*)?$/);
-  if (match) {
-    let version2 = match[1].trim();
+  const match3 = versionSpec.match(/^([^;]+)(?:;.*)?$/);
+  if (match3) {
+    let version2 = match3[1].trim();
     if (version2) {
       version2 = normalizeVersionSpecifier(version2);
       if (trimmedSpec.includes(";")) {
@@ -29016,7 +31688,7 @@ function getRuffVersionFromPyprojectContent(pyprojectContent) {
   return getRuffVersionFromParsedPyproject(pyproject);
 }
 function parsePyprojectContent(pyprojectContent) {
-  return parse(pyprojectContent);
+  return parse2(pyprojectContent);
 }
 function getVersionFileParser(filePath) {
   return VERSION_FILE_PARSERS.find((parser) => parser.supports(filePath));
@@ -29262,11 +31934,7 @@ async function run() {
     addMatchers();
     setOutput("ruff-version", setupResult.version);
     info(`Successfully installed ruff version ${setupResult.version}`);
-    await runRuff(
-      path8.join(setupResult.ruffDir, "ruff"),
-      args.split(" "),
-      src.split(" ")
-    );
+    await runRuff(path14.join(setupResult.ruffDir, "ruff"), args, src);
     process.exit(0);
   } catch (err) {
     setFailed(err.message);
@@ -29304,7 +31972,11 @@ async function setupRuff(platform2, arch3, checkSum2, githubToken2) {
 async function determineVersion() {
   return await resolveRuffVersion({
     manifestFile: manifestFile || void 0,
-    sourceDirectory: src,
+    sourceDirectory: await getVersionSourceDirectory(
+      src,
+      version,
+      versionFile
+    ),
     version,
     versionFile,
     workspaceRoot: process.env.GITHUB_WORKSPACE || "."
@@ -29320,16 +31992,16 @@ function setOutputFormat() {
 }
 function addMatchers() {
   const actionRoot = getActionRoot();
-  const matchersPath = path8.join(actionRoot, ".github", "matchers");
-  info(`##[add-matcher]${path8.join(matchersPath, "check.json")}`);
-  info(`##[add-matcher]${path8.join(matchersPath, "format.json")}`);
+  const matchersPath = path14.join(actionRoot, ".github", "matchers");
+  info(`##[add-matcher]${path14.join(matchersPath, "check.json")}`);
+  info(`##[add-matcher]${path14.join(matchersPath, "format.json")}`);
 }
 function getActionRoot() {
   const entrypoint = process.argv[1] ?? process.cwd();
-  return path8.resolve(path8.dirname(entrypoint), "..", "..");
+  return path14.resolve(path14.dirname(entrypoint), "..", "..");
 }
 async function runRuff(ruffExecutablePath, args2, src2) {
-  const execArgs = [...args2, ...src2];
+  const execArgs = [...splitInput(args2), ...await expandSourceInput(src2)];
   await exec(ruffExecutablePath, execArgs);
 }
 run();
diff --git a/package-lock.json b/package-lock.json
index 37e2ec1..7987f5d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,6 +11,7 @@
       "dependencies": {
         "@actions/core": "^3.0.0",
         "@actions/exec": "^3.0.0",
+        "@actions/glob": "^0.7.0",
         "@actions/tool-cache": "^4.0.0",
         "@octokit/core": "^7.0.3",
         "@octokit/plugin-paginate-rest": "^13.1.1",
@@ -51,6 +52,52 @@
         "@actions/io": "^3.0.2"
       }
     },
+    "node_modules/@actions/glob": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.7.0.tgz",
+      "integrity": "sha512-+7s3wM+cXapDLmLL1NVWHawqcJOZzXZy2df/VhNn8DnZtS/x83iTCKaUn9F0llur4h3CII0AilvKKH4CMPL8Gw==",
+      "license": "MIT",
+      "dependencies": {
+        "@actions/core": "^3.0.0",
+        "minimatch": "^10.2.5"
+      }
+    },
+    "node_modules/@actions/glob/node_modules/balanced-match": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+      "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+      "license": "MIT",
+      "engines": {
+        "node": "18 || 20 || >=22"
+      }
+    },
+    "node_modules/@actions/glob/node_modules/brace-expansion": {
+      "version": "5.0.5",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
+      "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^4.0.2"
+      },
+      "engines": {
+        "node": "18 || 20 || >=22"
+      }
+    },
+    "node_modules/@actions/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==",
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "brace-expansion": "^5.0.5"
+      },
+      "engines": {
+        "node": "18 || 20 || >=22"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/@actions/http-client": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
diff --git a/package.json b/package.json
index 3425847..82cae0d 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
   "dependencies": {
     "@actions/core": "^3.0.0",
     "@actions/exec": "^3.0.0",
+    "@actions/glob": "^0.7.0",
     "@actions/tool-cache": "^4.0.0",
     "@octokit/core": "^7.0.3",
     "@octokit/plugin-paginate-rest": "^13.1.1",
diff --git a/src/ruff-action.ts b/src/ruff-action.ts
index 38f610e..5c62d3d 100644
--- a/src/ruff-action.ts
+++ b/src/ruff-action.ts
@@ -21,6 +21,11 @@ import {
   getPlatform,
   type Platform,
 } from "./utils/platforms";
+import {
+  expandSourceInput,
+  getVersionSourceDirectory,
+  splitInput,
+} from "./utils/source-input";
 import { resolveRuffVersion } from "./version/resolve";
 
 async function run(): Promise {
@@ -42,11 +47,7 @@ async function run(): Promise {
     core.setOutput("ruff-version", setupResult.version);
     core.info(`Successfully installed ruff version ${setupResult.version}`);
 
-    await runRuff(
-      path.join(setupResult.ruffDir, "ruff"),
-      args.split(" "),
-      src.split(" "),
-    );
+    await runRuff(path.join(setupResult.ruffDir, "ruff"), args, src);
 
     process.exit(0);
   } catch (err) {
@@ -94,7 +95,11 @@ async function setupRuff(
 async function determineVersion(): Promise {
   return await resolveRuffVersion({
     manifestFile: manifestFile || undefined,
-    sourceDirectory: src,
+    sourceDirectory: await getVersionSourceDirectory(
+      src,
+      version,
+      versionFileInput,
+    ),
     version,
     versionFile: versionFileInput,
     workspaceRoot: process.env.GITHUB_WORKSPACE || ".",
@@ -125,10 +130,10 @@ function getActionRoot(): string {
 
 async function runRuff(
   ruffExecutablePath: string,
-  args: string[],
-  src: string[],
+  args: string,
+  src: string,
 ): Promise {
-  const execArgs = [...args, ...src];
+  const execArgs = [...splitInput(args), ...(await expandSourceInput(src))];
   await exec.exec(ruffExecutablePath, execArgs);
 }
 
diff --git a/src/utils/pyproject-finder.ts b/src/utils/pyproject-finder.ts
index d1c679a..df3590d 100644
--- a/src/utils/pyproject-finder.ts
+++ b/src/utils/pyproject-finder.ts
@@ -3,19 +3,22 @@ import * as path from "node:path";
 import * as core from "@actions/core";
 
 /**
- * Search for a pyproject.toml file starting from the given directory
+ * Search for a pyproject.toml file starting from the given source path
  * and traversing upwards through parent directories until reaching
  * the GitHub workspace root.
  *
- * @param startDir The directory to start the search from (e.g., the src input)
+ * If the source path points to a file, the search begins in that file's
+ * parent directory.
+ *
+ * @param startPath The source path to start the search from (file or directory)
  * @param workspaceRoot The GitHub workspace directory (GITHUB_WORKSPACE)
  * @returns The path to the found pyproject.toml, or undefined if not found
  */
 export function findPyprojectToml(
-  startDir: string,
+  startPath: string,
   workspaceRoot: string,
 ): string | undefined {
-  let currentDir = path.resolve(startDir);
+  let currentDir = resolveStartDirectory(startPath);
   const resolvedWorkspaceRoot = path.resolve(workspaceRoot);
 
   while (true) {
@@ -42,6 +45,19 @@ export function findPyprojectToml(
   }
 }
 
+function resolveStartDirectory(startPath: string): string {
+  const resolvedStartPath = path.resolve(startPath);
+
+  if (!fs.existsSync(resolvedStartPath)) {
+    return resolvedStartPath;
+  }
+
+  const stats = fs.statSync(resolvedStartPath);
+  return stats.isDirectory()
+    ? resolvedStartPath
+    : path.dirname(resolvedStartPath);
+}
+
 /**
  * Check if a given path is within or equal to the workspace root.
  *
diff --git a/src/utils/source-input.ts b/src/utils/source-input.ts
new file mode 100644
index 0000000..bc2a237
--- /dev/null
+++ b/src/utils/source-input.ts
@@ -0,0 +1,252 @@
+import * as fs from "node:fs/promises";
+import * as path from "node:path";
+import * as glob from "@actions/glob";
+
+const GLOB_PATTERN = /[*?[]/;
+
+/**
+ * Split an action input into whitespace-delimited tokens.
+ *
+ * The action has historically documented both `args` and `src` as plain
+ * whitespace-delimited inputs. Keep that behavior instead of invoking a shell.
+ */
+export function splitInput(input: string): string[] {
+  return input.trim().split(/\s+/).filter(Boolean);
+}
+
+/**
+ * Expand glob patterns from the `src` input in a cross-platform way.
+ *
+ * Shell expansion is not portable across GitHub runners (notably Windows), so
+ * we expand globs with @actions/glob and pass the result to Ruff as argv entries.
+ * Unmatched patterns are preserved, matching the default behavior of POSIX
+ * shells and allowing Ruff to report the missing path.
+ */
+export async function expandSourceInput(srcInput: string): Promise {
+  const sources = splitInput(srcInput);
+
+  if (sources.length === 0) {
+    return [];
+  }
+
+  const expandedSources: string[] = [];
+  for (const source of sources) {
+    if (!hasGlobPattern(source) || (await pathExists(source))) {
+      expandedSources.push(source);
+      continue;
+    }
+
+    const matches = await globMatches(source);
+    expandedSources.push(...(matches.length > 0 ? matches : [source]));
+  }
+
+  return expandedSources;
+}
+
+/**
+ * Resolve the starting path for version discovery from the `src` input.
+ *
+ * Takes the first whitespace-delimited token. Literal paths are preserved. Glob
+ * patterns use their first match when available, so pyproject.toml discovery
+ * starts from the project that Ruff will actually check. Unmatched globs fall
+ * back to their literal prefix so Ruff can report the unmatched source later.
+ */
+export async function getVersionSourceDirectory(
+  srcInput: string,
+  versionInput: string | undefined,
+  versionFileInput: string | undefined,
+): Promise {
+  if (hasInput(versionInput) || hasInput(versionFileInput)) {
+    return ".";
+  }
+
+  return await getSourceBasePath(srcInput);
+}
+
+export async function getSourceBasePath(srcInput: string): Promise {
+  const firstSource = splitInput(srcInput)[0] ?? ".";
+
+  if (!hasGlobPattern(firstSource) || (await pathExists(firstSource))) {
+    return stripTrailingSeparators(firstSource);
+  }
+
+  const matches = await globMatches(firstSource);
+  if (matches.length > 0) {
+    return matches[0] ?? ".";
+  }
+
+  return await getUnmatchedSourceBasePath(firstSource);
+}
+
+async function getUnmatchedSourceBasePath(source: string): Promise {
+  const sourcePath = splitSourcePath(source);
+  const existingSegments = await getExistingLiteralSegments(sourcePath);
+  const nextSegment = sourcePath.segments[existingSegments.length];
+  if (existingSegments.length > 0 && hasGlobPattern(nextSegment ?? "")) {
+    return formatSourcePath(sourcePath.root, existingSegments);
+  }
+
+  const globIndex = source.search(GLOB_PATTERN);
+  const literalPrefix = source.substring(0, globIndex);
+  if (literalPrefix === "") {
+    return ".";
+  }
+
+  if (hasTrailingSeparator(literalPrefix)) {
+    return stripTrailingSeparators(literalPrefix);
+  }
+
+  return path.dirname(literalPrefix);
+}
+
+function hasInput(input: string | undefined): boolean {
+  return input !== undefined && input.trim() !== "";
+}
+
+function hasGlobPattern(source: string): boolean {
+  return GLOB_PATTERN.test(source);
+}
+
+function hasTrailingSeparator(source: string): boolean {
+  return /[/\\]$/.test(source);
+}
+
+function stripTrailingSeparators(source: string): string {
+  return source.replace(/[/\\]+$/, "") || ".";
+}
+
+async function pathExists(source: string): Promise {
+  try {
+    await fs.stat(source);
+    return true;
+  } catch (err) {
+    if (isPathNotFoundError(err)) {
+      return false;
+    }
+
+    throw err;
+  }
+}
+
+function isPathNotFoundError(err: unknown): boolean {
+  const code = (err as { code?: unknown }).code;
+  return code === "ENOENT" || code === "ENOTDIR";
+}
+
+async function getGlobPattern(pattern: string): Promise {
+  const sourcePath = splitSourcePath(pattern);
+  const existingSegments = await getExistingLiteralSegments(sourcePath);
+
+  if (existingSegments.length === 0) {
+    return normalizeGlobPattern(pattern);
+  }
+
+  const escapedSegments = sourcePath.segments.map((segment, index) =>
+    index < existingSegments.length ? globEscape(segment) : segment,
+  );
+  return normalizeGlobPattern(
+    formatSourcePath(sourcePath.root, escapedSegments),
+  );
+}
+
+interface SourcePath {
+  root: string;
+  segments: string[];
+}
+
+function splitSourcePath(source: string): SourcePath {
+  const root = path.parse(source).root;
+  const relativePath = source.slice(root.length);
+  const separatorPattern = process.platform === "win32" ? /[/\\]+/ : /\/+/;
+
+  return {
+    root,
+    segments: relativePath.split(separatorPattern).filter(Boolean),
+  };
+}
+
+async function getExistingLiteralSegments(
+  sourcePath: SourcePath,
+): Promise {
+  const existingSegments: string[] = [];
+
+  for (const segment of sourcePath.segments) {
+    const candidateSegments = [...existingSegments, segment];
+    if (
+      !(await pathExists(toFileSystemPath(sourcePath.root, candidateSegments)))
+    ) {
+      break;
+    }
+
+    existingSegments.push(segment);
+  }
+
+  return existingSegments;
+}
+
+function toFileSystemPath(root: string, segments: string[]): string {
+  if (segments.length === 0) {
+    return root || ".";
+  }
+
+  return root ? path.join(root, ...segments) : path.join(...segments);
+}
+
+function formatSourcePath(root: string, segments: string[]): string {
+  if (segments.length === 0) {
+    return root || ".";
+  }
+
+  if (!root) {
+    return segments.join("/");
+  }
+
+  const normalizedRoot = root.replace(/\\/g, "/").replace(/\/+$/, "");
+  return `${normalizedRoot || "/"}/${segments.join("/")}`;
+}
+
+function globEscape(source: string): string {
+  return source
+    .replace(/(\[)(?=[^/]+\])/g, "[[]")
+    .replace(/\?/g, "[?]")
+    .replace(/\*/g, "[*]");
+}
+
+async function globMatches(pattern: string): Promise {
+  const globber = await glob.create(await getGlobPattern(pattern), {
+    excludeHiddenFiles: !explicitlyTargetsHiddenPath(pattern),
+    followSymbolicLinks: false,
+    implicitDescendants: false,
+  });
+  const matches = await globber.glob();
+
+  return await preserveSourcePathStyle(pattern, matches.sort());
+}
+
+async function preserveSourcePathStyle(
+  pattern: string,
+  matches: string[],
+): Promise {
+  if (path.isAbsolute(pattern)) {
+    return matches;
+  }
+
+  const cwd = await fs.realpath(process.cwd());
+  return matches.map((match) => path.relative(cwd, match) || ".");
+}
+
+function explicitlyTargetsHiddenPath(pattern: string): boolean {
+  return splitSourcePath(pattern).segments.some(isHiddenPathSegment);
+}
+
+function isHiddenPathSegment(segment: string): boolean {
+  return segment.startsWith(".") && segment !== "." && segment !== "..";
+}
+
+function normalizeGlobPattern(pattern: string): string {
+  if (process.platform !== "win32") {
+    return pattern;
+  }
+
+  return pattern.replace(/\\/g, "/");
+}