diff --git a/.github/actions/prepare-mergeback-branch/action.yml b/.github/actions/prepare-mergeback-branch/action.yml index d4dee99bcb..2c57dfc012 100644 --- a/.github/actions/prepare-mergeback-branch/action.yml +++ b/.github/actions/prepare-mergeback-branch/action.yml @@ -91,18 +91,15 @@ runs: Please do the following: - - [ ] Mark the PR as ready for review to trigger the full set of PR checks. + - [ ] Approve running the full set of PR checks. - [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is selected rather than "Squash and merge" or "Rebase and merge". EOF ) - # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft - # so that a maintainer can take the PR out of draft, thereby triggering the PR checks. gh pr create \ --head "${NEW_BRANCH}" \ --base "${BASE_BRANCH}" \ --title "${pr_title}" \ --body "${pr_body}" \ - --assignee "${GITHUB_ACTOR}" \ - --draft + --assignee "${GITHUB_ACTOR}" diff --git a/.github/actions/release-branches/action.yml b/.github/actions/release-branches/action.yml index 26be726205..7734411c73 100644 --- a/.github/actions/release-branches/action.yml +++ b/.github/actions/release-branches/action.yml @@ -22,7 +22,6 @@ runs: MAJOR_VERSION: ${{ inputs.major_version }} LATEST_TAG: ${{ inputs.latest_tag }} run: | - npm ci npx tsx ./pr-checks/release-branches.ts \ --major-version "$MAJOR_VERSION" \ --latest-tag "$LATEST_TAG" diff --git a/.github/actions/release-initialise/action.yml b/.github/actions/release-initialise/action.yml index 057d5a5b6d..239dfa9428 100644 --- a/.github/actions/release-initialise/action.yml +++ b/.github/actions/release-initialise/action.yml @@ -21,16 +21,9 @@ runs: node-version: 24 cache: 'npm' - - name: Set up Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.12' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install PyGithub==2.3.0 requests + - name: Install JavaScript dependencies shell: bash + run: npm ci - name: Update git config run: | diff --git a/.github/update-release-branch.py b/.github/update-release-branch.py deleted file mode 100644 index 784a450ef0..0000000000 --- a/.github/update-release-branch.py +++ /dev/null @@ -1,476 +0,0 @@ -import argparse -import datetime -import fileinput -import re -from github import Github -import json -import os -import subprocess - -EMPTY_CHANGELOG = """# CodeQL Action Changelog - -## [UNRELEASED] - -No user facing changes. - -""" - -# NB: This exact commit message is used to find commits for reverting during backports. -# Changing it requires a transition period where both old and new versions are supported. -BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v' - -# Commit message used for rebuild commits, both those produced by this script and those produced -# by the `Rebuild Action` workflow (`.github/workflows/rebuild.yml`). -REBUILD_COMMIT_MESSAGE = 'Rebuild' - -# Name of the remote -ORIGIN = 'origin' - -# Environment variables to check for a GitHub API token. -TOKEN_ENVIRONMENT_VARIABLES = ('GH_TOKEN', 'GITHUB_TOKEN') - -# Gets a GitHub API token from one of the supported environment variables. -def get_github_token(): - for variable_name in TOKEN_ENVIRONMENT_VARIABLES: - token = os.environ.get(variable_name, '').strip() - if token: - return token - raise Exception('Missing GitHub token. Set GITHUB_TOKEN or GH_TOKEN.') - -# Runs git with the given args and returns the stdout. -# Raises an error if git does not exit successfully (unless passed -# allow_non_zero_exit_code=True). -def run_git(*args, allow_non_zero_exit_code=False): - cmd = ['git', *args] - p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if not allow_non_zero_exit_code and p.returncode != 0: - raise Exception(f'Call to {" ".join(cmd)} exited with code {p.returncode} stderr: {p.stderr.decode("ascii")}.') - return p.stdout.decode('ascii') - -# Runs the given command, streaming output to the console. -# Raises an error if the command does not exit successfully. -def run_command(*args): - cmd = list(args) - print(f'Running `{" ".join(cmd)}`.') - subprocess.run(cmd, check=True) - -# Rebuilds the action and commits any changes. -def rebuild_action(): - # For backports, the only source-level change vs the source branch is the new version number, - # so we just need to refresh the version embedded in `lib/`. - run_command('npm', 'ci') - run_command('npm', 'run', 'build') - - run_git('add', '--all') - # `git diff --cached --quiet` exits 0 if there are no staged changes, 1 if there are. - if subprocess.run(['git', 'diff', '--cached', '--quiet']).returncode == 0: - print('Rebuild produced no changes; skipping Rebuild commit.') - else: - run_git('commit', '-m', REBUILD_COMMIT_MESSAGE) - print('Created Rebuild commit.') - -# Returns true if the given branch exists on the origin remote -def branch_exists_on_remote(branch_name): - return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != '' - -# Opens a PR from the given branch to the target branch -def open_pr( - repo, all_commits, source_branch_short_sha, new_branch_name, source_branch, target_branch, - conductor, is_primary_release, conflicted_files): - # Sort the commits into the pull requests that introduced them, - # and any commits that don't have a pull request - pull_requests = [] - commits_without_pull_requests = [] - for commit in all_commits: - pr = get_pr_for_commit(commit) - - if pr is None: - commits_without_pull_requests.append(commit) - elif not any(p for p in pull_requests if p.number == pr.number): - pull_requests.append(pr) - - print(f'Found {len(pull_requests)} pull requests.') - print(f'Found {len(commits_without_pull_requests)} commits not in a pull request.') - - # Sort PRs and commits by age - pull_requests = sorted(pull_requests, key=lambda pr: pr.number) - commits_without_pull_requests = sorted(commits_without_pull_requests, key=lambda c: c.commit.author.date) - - # Start constructing the body text - body = [] - body.append(f'Merging {source_branch_short_sha} into `{target_branch}`.') - - body.append('') - body.append(f'Conductor for this PR is @{conductor}.') - - # List all PRs merged - if len(pull_requests) > 0: - body.append('') - body.append('Contains the following pull requests:') - for pr in pull_requests: - # Use PR author if they are GitHub staff, otherwise use the merger - display_user = get_pr_author_if_staff(pr) or get_merger_of_pr(repo, pr) - body.append(f'- #{pr.number} (@{display_user})') - - # List all commits not part of a PR - if len(commits_without_pull_requests) > 0: - body.append('') - body.append('Contains the following commits not from a pull request:') - for commit in commits_without_pull_requests: - author_description = f' (@{commit.author.login})' if commit.author is not None else '' - body.append(f'- {commit.sha} - {get_truncated_commit_message(commit)}{author_description}') - - body.append('') - body.append('Please do the following:') - if len(conflicted_files) > 0: - body.append(' - [ ] Ensure `package.json` file contains the correct version.') - body.append(' - [ ] Add a commit to this branch to resolve the merge conflicts ' + - 'in the following files:') - body.extend([f' - `{file}`' for file in conflicted_files]) - body.append(' - [ ] Rebuild the Action locally (`npm run build`) and push any changes to the ' + - f'built output in `lib` as a separate commit named exactly `{REBUILD_COMMIT_MESSAGE}`.') - body.append(' - [ ] Ensure another maintainer has reviewed the additional commits you added to this ' + - 'branch to resolve the merge conflicts.') - body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.') - body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.') - body.append(f' - [ ] Check that there are not any unexpected commits being merged into the `{target_branch}` branch.') - body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.') - - body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.') - body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.') - - if is_primary_release: - body.append(' - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.') - body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.') - - title = f'Merge {source_branch} into {target_branch}' - - # Create the pull request - # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that - # a maintainer can take the PR out of draft, thereby triggering the PR checks. - pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch, draft=True) - print(f'Created PR #{str(pr.number)}') - - # Assign the conductor - pr.add_to_assignees(conductor) - print(f'Assigned PR to {conductor}') - -# Gets a list of the SHAs of all commits that have happened on the source branch -# since the last release to the target branch. -# This will not include any commits that exist on the target branch -# that aren't on the source branch. -def get_commit_difference(repo, source_branch, target_branch): - # Passing split nothing means that the empty string splits to nothing: compare `''.split() == []` - # to `''.split('\n') == ['']`. - commits = run_git('log', '--pretty=format:%H', f'{ORIGIN}/{target_branch}..{ORIGIN}/{source_branch}').strip().split() - - # Convert to full-fledged commit objects - commits = [repo.get_commit(c) for c in commits] - - # Filter out merge commits for PRs - return list(filter(lambda c: not is_pr_merge_commit(c), commits)) - -# Is the given commit the automatic merge commit from when merging a PR -def is_pr_merge_commit(commit): - return commit.committer is not None and commit.committer.login == 'web-flow' and len(commit.parents) > 1 - -# Gets a copy of the commit message that should display nicely -def get_truncated_commit_message(commit): - message = commit.commit.message.split('\n')[0] - if len(message) > 60: - return f'{message[:57]}...' - else: - return message - -# Converts a commit into the PR that introduced it to the source branch. -# Returns the PR object, or None if no PR could be found. -def get_pr_for_commit(commit): - prs = commit.get_pulls() - - if prs.totalCount > 0: - # In the case that there are multiple PRs, return the earliest one - prs = list(prs) - sorted_prs = sorted(prs, key=lambda pr: int(pr.number)) - return sorted_prs[0] - else: - return None - -# Get the person who merged the pull request. -# For most cases this will be the same as the author, but for PRs opened -# by external contributors getting the merger will get us the GitHub -# employee who reviewed and merged the PR. -def get_merger_of_pr(repo, pr): - return repo.get_commit(pr.merge_commit_sha).author.login - -# Get the PR author if they are GitHub staff, otherwise None. -def get_pr_author_if_staff(pr): - if pr.user is None: - return None - if getattr(pr.user, 'site_admin', False): - return pr.user.login - return None - -def get_current_version(): - with open('package.json', 'r') as f: - return json.load(f)['version'] - -# `npm version` doesn't always work because of merge conflicts, so we -# replace the version in package.json textually. -def replace_version_package_json(prev_version, new_version): - prev_line_is_codeql = False - for line in fileinput.input('package.json', inplace = True, encoding='utf-8'): - if prev_line_is_codeql and f'\"version\": \"{prev_version}\"' in line: - print(line.replace(prev_version, new_version), end='') - else: - prev_line_is_codeql = False - print(line, end='') - if '\"name\": \"codeql\",' in line: - prev_line_is_codeql = True - -def get_today_string(): - today = datetime.datetime.today() - return '{:%d %b %Y}'.format(today) - -def process_changelog_for_backports(source_branch_major_version, target_branch_major_version): - - # changelog entries can use the following format to indicate - # that they only apply to newer versions - some_versions_only_regex = re.compile(r'\[v(\d+)\+ only\]') - - output = '' - - with open('CHANGELOG.md', 'r') as f: - - # until we find the first section, just duplicate all lines - found_first_section = False - while not found_first_section: - line = f.readline() - if not line: - raise Exception('Could not find any change sections in CHANGELOG.md') # EOF - - if line.startswith('## '): - line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}') - found_first_section = True - - output += line - - # found_content tracks whether we hit two headings in a row - found_content = False - output += '\n' - while True: - line = f.readline() - if not line: - break # EOF - line = line.rstrip('\n') - - # filter out changenote entries that apply only to newer versions - match = some_versions_only_regex.search(line) - if match: - if int(target_branch_major_version) < int(match.group(1)): - continue - - if line.startswith('## '): - line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}') - if found_content == False: - # we have found two headings in a row, so we need to add the placeholder message. - output += 'No user facing changes.\n' - found_content = False - output += f'\n{line}\n\n' - else: - if line.strip() != '': - found_content = True - # we use the original line here, rather than the stripped version - # so that we preserve indentation - output += line + '\n' - - with open('CHANGELOG.md', 'w') as f: - f.write(output) - -def update_changelog(version): - if (os.path.exists('CHANGELOG.md')): - content = '' - with open('CHANGELOG.md', 'r') as f: - content = f.read() - else: - content = EMPTY_CHANGELOG - - newContent = content.replace('[UNRELEASED]', f'{version} - {get_today_string()}', 1) - - with open('CHANGELOG.md', 'w') as f: - f.write(newContent) - - -def main(): - parser = argparse.ArgumentParser('update-release-branch.py') - - parser.add_argument( - '--repository-nwo', - type=str, - required=True, - help='The nwo of the repository, for example github/codeql-action.' - ) - parser.add_argument( - '--source-branch', - type=str, - required=True, - help='Source branch for release branch update.' - ) - parser.add_argument( - '--target-branch', - type=str, - required=True, - help='Target branch for release branch update.' - ) - parser.add_argument( - '--is-primary-release', - action='store_true', - default=False, - help='Whether this update is the primary release for the current major version.' - ) - parser.add_argument( - '--conductor', - type=str, - required=True, - help='The GitHub handle of the person who is conducting the release process.' - ) - - args = parser.parse_args() - - source_branch = args.source_branch - target_branch = args.target_branch - is_primary_release = args.is_primary_release - - repo = Github(get_github_token()).get_repo(args.repository_nwo) - - # the target branch will be of the form releases/vN, where N is the major version number - target_branch_major_version = target_branch.strip('releases/v') - - # split version into major, minor, patch - _, v_minor, v_patch = get_current_version().split('.') - - version = f"{target_branch_major_version}.{v_minor}.{v_patch}" - - # Print what we intend to go - print(f'Considering difference between {source_branch} and {target_branch}...') - source_branch_short_sha = run_git('rev-parse', '--short', f'{ORIGIN}/{source_branch}').strip() - print(f'Current head of {source_branch} is {source_branch_short_sha}.') - - # See if there are any commits to merge in - commits = get_commit_difference(repo=repo, source_branch=source_branch, target_branch=target_branch) - if len(commits) == 0: - print(f'No commits to merge from {source_branch} to {target_branch}.') - return - - # define distinct prefix in order to support specific pr checks on backports - branch_prefix = 'update' if is_primary_release else 'backport' - - # The branch name is based off of the name of branch being merged into - # and the SHA of the branch being merged from. Thus if the branch already - # exists we can assume we don't need to recreate it. - new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}' - print(f'Branch name is {new_branch_name}.') - - # Check if the branch already exists. If so we can abort as this script - # has already run on this combination of branches. - if branch_exists_on_remote(new_branch_name): - print(f'Branch {new_branch_name} already exists. Nothing to do.') - return - - # Create the new branch and push it to the remote - print(f'Creating branch {new_branch_name}.') - - # The process of creating the v{Older} release can run into merge conflicts. We commit the unresolved - # conflicts so a maintainer can easily resolve them (vs erroring and requiring maintainers to - # reconstruct the release manually) - conflicted_files = [] - - if not is_primary_release: - - # the source branch will be of the form releases/vN, where N is the major version number - source_branch_major_version = source_branch.strip('releases/v') - - # If we're performing a backport, start from the target branch - print(f'Creating {new_branch_name} from the {ORIGIN}/{target_branch} branch') - run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{target_branch}') - - # Revert the commit that we made as part of the last release that updated the version number and - # changelog to refer to {older}.x.x variants. This avoids merge conflicts in the changelog and - # package.json files when we merge in the v{latest} branch. - # This commit will not exist the first time we release the v{N-1} branch from the v{N} branch, so we - # use `git log --grep` to conditionally revert the commit. - print('Reverting the version number and changelog updates from the last release to avoid conflicts') - vOlder_update_commits = run_git('log', '--grep', f'^{BACKPORT_COMMIT_MESSAGE}', '--format=%H').split() - - if len(vOlder_update_commits) > 0: - print(f' Reverting {vOlder_update_commits[0]}') - # Only revert the newest commit as older ones will already have been reverted in previous - # releases. - run_git('revert', vOlder_update_commits[0], '--no-edit') - - # Also revert the "Rebuild" commit, whether created by this script or by the - # `Rebuild Action` workflow. - rebuild_commit = run_git('log', '--grep', f'^{REBUILD_COMMIT_MESSAGE}$', '--format=%H').split()[0] - print(f' Reverting {rebuild_commit}') - run_git('revert', rebuild_commit, '--no-edit') - - else: - print(' Nothing to revert.') - - print(f'Merging {ORIGIN}/{source_branch} into the release prep branch') - # Commit any conflicts (see the comment for `conflicted_files`) - run_git('merge', f'{ORIGIN}/{source_branch}', allow_non_zero_exit_code=True) - conflicted_files = run_git('diff', '--name-only', '--diff-filter', 'U').splitlines() - if len(conflicted_files) > 0: - run_git('add', '.') - run_git('commit', '--no-edit') - - # Migrate the package version number from a vLatest version number to a vOlder version number. - # `package-lock.json` is updated as part of the subsequent rebuild step (see `rebuild_action`). - print(f'Setting version number to {version} in package.json') - replace_version_package_json(get_current_version(), version) - run_git('add', 'package.json') - - # Migrate the changelog notes from vLatest version numbers to vOlder version numbers - print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}') - process_changelog_for_backports(source_branch_major_version, target_branch_major_version) - - # Amend the commit generated by `npm version` to update the CHANGELOG - run_git('add', 'CHANGELOG.md') - run_git('commit', '-m', f'{BACKPORT_COMMIT_MESSAGE}{version}') - else: - # If we're performing a standard release, there won't be any new commits on the target branch, - # as these will have already been merged back into the source branch. Therefore we can just - # start from the source branch. - run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{source_branch}') - - print('Updating changelog') - update_changelog(version) - - # Create a commit that updates the CHANGELOG - run_git('add', 'CHANGELOG.md') - run_git('commit', '-m', f'Update changelog for v{version}') - - if not is_primary_release: - if len(conflicted_files) == 0: - print('Rebuilding the Action.') - rebuild_action() - else: - print(f'Skipping automatic rebuild because the merge produced conflicts in {conflicted_files}.') - - run_git('push', ORIGIN, new_branch_name) - - # Open a PR to update the branch - open_pr( - repo, - commits, - source_branch_short_sha, - new_branch_name, - source_branch=source_branch, - target_branch=target_branch, - conductor=args.conductor, - is_primary_release=is_primary_release, - conflicted_files=conflicted_files - ) - -if __name__ == '__main__': - main() diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index 648679b7bf..c3cf8d63f3 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,13 +69,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__analysis-kinds.yml b/.github/workflows/__analysis-kinds.yml index 504c1fcc6e..5d0576e2f6 100644 --- a/.github/workflows/__analysis-kinds.yml +++ b/.github/workflows/__analysis-kinds.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -72,7 +67,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 5f4bb4d04a..7341a41740 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -70,13 +65,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index f8cd1275d7..730a387f90 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -64,9 +59,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Prepare test diff --git a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml index d0a4e7d783..b527638feb 100644 --- a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml +++ b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -66,9 +61,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Java - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: java-version: ${{ inputs.java-version || '17' }} distribution: temurin diff --git a/.github/workflows/__autobuild-working-dir.yml b/.github/workflows/__autobuild-working-dir.yml index f9718baf7b..fac4ef9f54 100644 --- a/.github/workflows/__autobuild-working-dir.yml +++ b/.github/workflows/__autobuild-working-dir.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__build-mode-autobuild.yml b/.github/workflows/__build-mode-autobuild.yml index f22f642e6b..5043433ee3 100644 --- a/.github/workflows/__build-mode-autobuild.yml +++ b/.github/workflows/__build-mode-autobuild.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -66,9 +61,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Java - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: java-version: ${{ inputs.java-version || '17' }} distribution: temurin diff --git a/.github/workflows/__build-mode-manual.yml b/.github/workflows/__build-mode-manual.yml index 515e28223c..bfe92c55ea 100644 --- a/.github/workflows/__build-mode-manual.yml +++ b/.github/workflows/__build-mode-manual.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -70,13 +65,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__build-mode-none.yml b/.github/workflows/__build-mode-none.yml index 4aff835887..da7aa76383 100644 --- a/.github/workflows/__build-mode-none.yml +++ b/.github/workflows/__build-mode-none.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__build-mode-rollback.yml b/.github/workflows/__build-mode-rollback.yml index f7c4d090e6..fcc77ea36e 100644 --- a/.github/workflows/__build-mode-rollback.yml +++ b/.github/workflows/__build-mode-rollback.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__bundle-from-nightly.yml b/.github/workflows/__bundle-from-nightly.yml index 5499696453..6c414fb67e 100644 --- a/.github/workflows/__bundle-from-nightly.yml +++ b/.github/workflows/__bundle-from-nightly.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__bundle-from-toolcache.yml b/.github/workflows/__bundle-from-toolcache.yml index 389981985c..a1c1fade09 100644 --- a/.github/workflows/__bundle-from-toolcache.yml +++ b/.github/workflows/__bundle-from-toolcache.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__bundle-toolcache.yml b/.github/workflows/__bundle-toolcache.yml index 7e83829d6a..9cc983a843 100644 --- a/.github/workflows/__bundle-toolcache.yml +++ b/.github/workflows/__bundle-toolcache.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__bundle-zstd.yml b/.github/workflows/__bundle-zstd.yml deleted file mode 100644 index 45cf73a0ed..0000000000 --- a/.github/workflows/__bundle-zstd.yml +++ /dev/null @@ -1,125 +0,0 @@ -# Warning: This file is generated automatically, and should not be modified. -# Instead, please modify the template in the pr-checks directory and run: -# pr-checks/sync.sh -# to regenerate this file. - -name: 'PR Check - Bundle: Zstandard checks' -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GO111MODULE: auto -on: - push: - branches: - - main - - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - merge_group: - types: - - checks_requested - schedule: - - cron: '0 5 * * *' - workflow_dispatch: - inputs: {} - workflow_call: - inputs: {} -defaults: - run: - shell: bash -concurrency: - cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: bundle-zstd-${{github.ref}} -jobs: - bundle-zstd: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - version: linked - - os: macos-latest - version: linked - - os: windows-latest - version: linked - name: 'Bundle: Zstandard checks' - if: github.triggering_actor != 'dependabot[bot]' - permissions: - contents: read - security-events: read - timeout-minutes: 45 - runs-on: ${{ matrix.os }} - steps: - - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - name: Prepare test - id: prepare-test - uses: ./.github/actions/prepare-test - with: - version: ${{ matrix.version }} - use-all-platform-bundle: 'false' - setup-kotlin: 'true' - - name: Remove CodeQL from toolcache - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: | - const fs = require('fs'); - const path = require('path'); - const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); - if (codeqlPath !== undefined) { - fs.rmdirSync(codeqlPath, { recursive: true }); - } - - id: init - uses: ./../action/init - with: - languages: javascript - tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/analyze - with: - output: ${{ runner.temp }}/results - upload-database: false - - name: Upload SARIF - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ${{ matrix.os }}-zstd-bundle.sarif - path: ${{ runner.temp }}/results/javascript.sarif - retention-days: 7 - - name: Check diagnostic with expected tools URL appears in SARIF - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - env: - SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif - with: - script: | - const fs = require('fs'); - - const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8')); - const run = sarif.runs[0]; - - const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications; - const downloadTelemetryNotifications = toolExecutionNotifications.filter(n => - n.descriptor.id === 'codeql-action/bundle-download-telemetry' - ); - if (downloadTelemetryNotifications.length !== 1) { - core.setFailed( - 'Expected exactly one reporting descriptor in the ' + - `'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` + - `${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` + - `${JSON.stringify(toolExecutionNotifications)}.` - ); - } - - const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl; - console.log(`Found tools URL: ${toolsUrl}`); - - const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst'; - - if (!toolsUrl.endsWith(expectedExtension)) { - core.setFailed( - `Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.` - ); - } - env: - CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__cleanup-db-cluster-dir.yml b/.github/workflows/__cleanup-db-cluster-dir.yml index 249a1f81b6..3153041401 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index e359764bdd..0c7a2cc151 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index 2a82e9aa5c..4267e00584 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,9 +45,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 20.x cache: npm diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index 9e44285198..e2434f4256 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml index 825d4acd99..344ed8d1ea 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index c4ac54f3db..ab1a70584b 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 418517a159..c55f3de9b8 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 18fcfafe08..4ce8b40285 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,13 +69,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index a647124bcc..5bd5c8b940 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__global-proxy.yml b/.github/workflows/__global-proxy.yml index df544fb68a..9244d1fc8f 100644 --- a/.github/workflows/__global-proxy.yml +++ b/.github/workflows/__global-proxy.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -60,17 +55,45 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'false' + - name: Block direct internet access to force proxy usage + run: | + apt-get update -qq && apt-get install -y -qq iptables >/dev/null 2>&1 + PROXY_IP=$(getent hosts squid-proxy | awk '{ print $1 }') + echo "Squid proxy IP: $PROXY_IP" + # Allow all traffic to the proxy container + iptables -A OUTPUT -d "$PROXY_IP" -j ACCEPT + # Allow DNS resolution + iptables -A OUTPUT -p udp --dport 53 -j ACCEPT + iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT + # Allow loopback + iptables -A OUTPUT -o lo -j ACCEPT + # Allow already-established connections (from checkout/prepare-test) + iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT + # Block all other outbound HTTP and HTTPS, ensuring direct access fails + iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset + iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset + echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy" + + - name: Set proxy environment variables + shell: bash + run: | + echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV + echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV + echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV + echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV + - uses: ./../action/init with: languages: javascript tools: ${{ steps.prepare-test.outputs.tools-url }} + - uses: ./../action/analyze env: - https_proxy: http://squid-proxy:3128 CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true CODEQL_ACTION_TEST_MODE: true container: image: ubuntu:22.04 + options: --cap-add=NET_ADMIN services: squid-proxy: image: ubuntu/squid:latest diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index a595300652..7b4cd1305b 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -72,13 +67,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml index 2415c7ff8e..968caf1e69 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -60,9 +55,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false @@ -78,7 +73,7 @@ jobs: languages: go tools: ${{ steps.prepare-test.outputs.tools-url }} # Deliberately change Go after the `init` step - - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: '1.20' - name: Build code diff --git a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml index 38718fba2c..0f13b1e663 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -60,9 +55,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__go-indirect-tracing-workaround.yml b/.github/workflows/__go-indirect-tracing-workaround.yml index 754299d3ed..915835c2ab 100644 --- a/.github/workflows/__go-indirect-tracing-workaround.yml +++ b/.github/workflows/__go-indirect-tracing-workaround.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -60,9 +55,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 5c96e28f11..ccbb1b5a6e 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -80,9 +75,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 7d3ea3aea0..2acc617cb1 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -80,9 +75,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 68012f0d4d..a43705b703 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -80,9 +75,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index 2c55e14e4a..9293dcc196 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index 31662fc166..1dcbd38a85 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__job-run-uuid-sarif.yml b/.github/workflows/__job-run-uuid-sarif.yml index c0fa820e52..429a694947 100644 --- a/.github/workflows/__job-run-uuid-sarif.yml +++ b/.github/workflows/__job-run-uuid-sarif.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -76,8 +71,8 @@ jobs: run: | cd "$RUNNER_TEMP/results" actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif) - if [[ "$actual" != "$JOB_RUN_UUID" ]]; then - echo "Expected SARIF output to contain job run UUID '$JOB_RUN_UUID', but found '$actual'." + if [[ "$actual" != "$CODEQL_ACTION_JOB_RUN_UUID" ]]; then + echo "Expected SARIF output to contain job run UUID '$CODEQL_ACTION_JOB_RUN_UUID', but found '$actual'." exit 1 else echo "Found job run UUID '$actual'." diff --git a/.github/workflows/__language-aliases.yml b/.github/workflows/__language-aliases.yml index fe9ebef9c3..731d975ce3 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__local-bundle.yml b/.github/workflows/__local-bundle.yml index a6ab9f523f..8e448080f3 100644 --- a/.github/workflows/__local-bundle.yml +++ b/.github/workflows/__local-bundle.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -70,13 +65,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index f4849b9903..55023cd916 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -61,19 +56,19 @@ jobs: include: - os: ubuntu-latest version: stable-v2.19.4 - - os: macos-latest-xlarge + - os: macos-15-xlarge version: stable-v2.19.4 - os: ubuntu-latest version: stable-v2.20.7 - - os: macos-latest-xlarge + - os: macos-15-xlarge version: stable-v2.20.7 - os: ubuntu-latest version: stable-v2.21.4 - - os: macos-latest-xlarge + - os: macos-15-xlarge version: stable-v2.21.4 - os: ubuntu-latest version: stable-v2.22.4 - - os: macos-latest-xlarge + - os: macos-15-xlarge version: stable-v2.22.4 - os: ubuntu-latest version: stable-v2.23.9 @@ -104,13 +99,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false @@ -125,12 +120,13 @@ jobs: # We need Python 3.13 for older CLI versions because they are not compatible with Python 3.14 or newer. # See https://github.com/github/codeql-action/pull/3212 if: matrix.version != 'nightly-latest' && matrix.version != 'linked' - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.13' - name: Use Xcode 16 - if: runner.os == 'macOS' && matrix.version != 'nightly-latest' + # Only the older CodeQL CLI versions need Xcode 16, and these run on macOS 15. + if: matrix.os == 'macos-15-xlarge' run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init diff --git a/.github/workflows/__overlay-init-fallback.yml b/.github/workflows/__overlay-init-fallback.yml index 554e9defcc..b6c99efcef 100644 --- a/.github/workflows/__overlay-init-fallback.yml +++ b/.github/workflows/__overlay-init-fallback.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -52,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 9c7d842293..409e0a1a65 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,18 +69,18 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 20.x cache: npm diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index c446c7ff36..34d4ae1bca 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,18 +69,18 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 20.x cache: npm diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index e550e493d5..88426cd684 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,18 +69,18 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 20.x cache: npm diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 7d3450d04b..2461944dbd 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,18 +69,18 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 20.x cache: npm diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index 277f9293e9..e1c3785f6a 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -72,13 +67,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index 05125ca107..11a31fdabc 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index 055aae50bc..c405b44fed 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -59,7 +54,7 @@ jobs: use-all-platform-bundle: 'false' setup-kotlin: 'true' - name: Set up Ruby - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 + uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 with: ruby-version: 2.6 - name: Install Code Scanning integration diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index b8d556e534..98f8ec6a2a 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -60,7 +55,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__rust.yml b/.github/workflows/__rust.yml index 91c3d6618e..b3638ca6df 100644 --- a/.github/workflows/__rust.yml +++ b/.github/workflows/__rust.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -58,7 +53,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index 64efae65f2..512058a598 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -80,13 +75,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__start-proxy.yml b/.github/workflows/__start-proxy.yml index 7a318b0233..edc6aa1cc5 100644 --- a/.github/workflows/__start-proxy.yml +++ b/.github/workflows/__start-proxy.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -62,15 +57,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: ./../action/init - with: - languages: csharp - tools: ${{ steps.prepare-test.outputs.tools-url }} - - name: Setup proxy for registries id: proxy uses: ./../action/start-proxy with: + language: java registry_secrets: | [ { @@ -99,5 +90,16 @@ jobs: || !contains(steps.proxy.outputs.proxy_urls, 'https://repo.maven.apache.org/maven2/') || !contains(steps.proxy.outputs.proxy_urls, 'https://repo1.maven.org/maven2') run: exit 1 + + - uses: ./../action/init + env: + CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }} + CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }} + CODEQL_PROXY_CA_CERTIFICATE: ${{ steps.proxy.outputs.proxy_ca_certificate }} + with: + languages: java + tools: ${{ steps.prepare-test.outputs.tools-url }} + config-file: codeql-action@main:tests/multi-language-repo/.github/codeql/custom-queries.yml env: + CODEQL_ACTION_PROXY_API_REQUESTS: 'true' CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 03ea2de232..099e93001f 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -54,7 +49,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -62,7 +57,7 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./init with: languages: javascript diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index 4962547032..52c189f3a8 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -50,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index 83c06ffd09..99fbf7a897 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -74,13 +69,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false @@ -91,9 +86,6 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - name: Use Xcode 16 - if: runner.os == 'macOS' && matrix.version != 'nightly-latest' - run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index b519e01dd6..8a8796d9a7 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -72,13 +67,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index 9a1c91dea9..76e8f4e3c0 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -70,13 +65,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__upload-sarif.yml b/.github/workflows/__upload-sarif.yml index 182adbfdea..77fa0264e5 100644 --- a/.github/workflows/__upload-sarif.yml +++ b/.github/workflows/__upload-sarif.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -77,13 +72,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 3d6380462b..59a8edc9d1 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -12,12 +12,7 @@ on: branches: - main - releases/v* - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review + pull_request: {} merge_group: types: - checks_requested @@ -71,13 +66,13 @@ jobs: steps: # This ensures we don't accidentally use the original checkout for any part of the test. - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: ${{ inputs.dotnet-version || '9.x' }} - name: Install Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false @@ -96,7 +91,7 @@ jobs: rm -rf ./* .github .git # Check out the actions repo again, but at a different location. # choose an arbitrary SHA so that we can later test that the commit_oid is not from main - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 path: x/y/z/some-path diff --git a/.github/workflows/check-expected-release-files.yml b/.github/workflows/check-expected-release-files.yml index ee6ad120bc..6cabd0454b 100644 --- a/.github/workflows/check-expected-release-files.yml +++ b/.github/workflows/check-expected-release-files.yml @@ -5,9 +5,6 @@ on: paths: - .github/workflows/check-expected-release-files.yml - src/defaults.json - # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened - # by other workflows. - types: [opened, synchronize, reopened, ready_for_review] concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} @@ -26,7 +23,7 @@ jobs: steps: - name: Checkout CodeQL Action - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Check Expected Release Files run: | bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d604bbd80e..f27de17fd8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,9 +4,6 @@ on: push: branches: [main, releases/v*] pull_request: - # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened - # by other workflows. - types: [opened, synchronize, reopened, ready_for_review] merge_group: types: [checks_requested] schedule: @@ -35,7 +32,7 @@ jobs: security-events: read steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up default CodeQL bundle id: setup-default uses: ./setup-codeql @@ -87,7 +84,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize CodeQL uses: ./init id: init @@ -116,7 +113,6 @@ jobs: matrix: include: - language: actions - - language: python permissions: contents: read @@ -124,7 +120,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize CodeQL uses: ./init with: diff --git a/.github/workflows/codescanning-config-cli.yml b/.github/workflows/codescanning-config-cli.yml index 3a62bd78d3..7bc6718e35 100644 --- a/.github/workflows/codescanning-config-cli.yml +++ b/.github/workflows/codescanning-config-cli.yml @@ -13,11 +13,6 @@ on: - main - releases/v* pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review merge_group: types: [checks_requested] schedule: @@ -59,10 +54,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: 'npm' diff --git a/.github/workflows/debug-artifacts-failure-safe.yml b/.github/workflows/debug-artifacts-failure-safe.yml index d044d8420a..f67cef5c75 100644 --- a/.github/workflows/debug-artifacts-failure-safe.yml +++ b/.github/workflows/debug-artifacts-failure-safe.yml @@ -9,11 +9,6 @@ on: - main - releases/v* pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review merge_group: types: [checks_requested] schedule: @@ -53,17 +48,17 @@ jobs: - name: Dump GitHub event run: cat "${GITHUB_EVENT_PATH}" - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ^1.13.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: '9.x' - name: Assert best-effort artifact scan completed diff --git a/.github/workflows/debug-artifacts-safe.yml b/.github/workflows/debug-artifacts-safe.yml index 4699436a11..c27f195113 100644 --- a/.github/workflows/debug-artifacts-safe.yml +++ b/.github/workflows/debug-artifacts-safe.yml @@ -8,11 +8,6 @@ on: - main - releases/v* pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review merge_group: types: [checks_requested] schedule: @@ -49,17 +44,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ^1.13.1 - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: '9.x' - name: Assert best-effort artifact scan completed diff --git a/.github/workflows/label-pr-size.yml b/.github/workflows/label-pr-size.yml index f688122b2f..170ccb0744 100644 --- a/.github/workflows/label-pr-size.yml +++ b/.github/workflows/label-pr-size.yml @@ -7,7 +7,6 @@ on: - synchronize - reopened - edited - - ready_for_review permissions: contents: read diff --git a/.github/workflows/post-release-mergeback.yml b/.github/workflows/post-release-mergeback.yml index 313a1e3558..c493c2a382 100644 --- a/.github/workflows/post-release-mergeback.yml +++ b/.github/workflows/post-release-mergeback.yml @@ -44,16 +44,16 @@ jobs: GITHUB_CONTEXT: '${{ toJson(github) }}' run: echo "${GITHUB_CONTEXT}" - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # ensure we have all tags and can push commits - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: 'npm' - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.12' + + - name: Install JavaScript dependencies + run: npm ci - name: Update git config run: | @@ -127,7 +127,7 @@ jobs: env: PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md" run: | - python .github/workflows/script/prepare_changelog.py CHANGELOG.md > $PARTIAL_CHANGELOG + npx tsx pr-checks/prepare-changelog.ts --output="$PARTIAL_CHANGELOG" echo "::group::Partial CHANGELOG" cat $PARTIAL_CHANGELOG diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 195494c185..ac61475d62 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -3,9 +3,6 @@ name: PR Checks on: push: pull_request: - # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened - # by other workflows. - types: [opened, synchronize, reopened, ready_for_review] merge_group: types: [checks_requested] workflow_dispatch: @@ -42,10 +39,10 @@ jobs: if: runner.os == 'Windows' run: git config --global core.autocrlf false - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ matrix.node-version }} cache: 'npm' @@ -69,7 +66,7 @@ jobs: run: npm run lint-ci - name: Upload sarif - uses: github/codeql-action/upload-sarif@v4 + uses: ./upload-sarif if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 with: sarif_file: eslint.sarif @@ -91,10 +88,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: 'npm' @@ -164,7 +161,7 @@ jobs: - name: 'Backport: Check out base ref' id: checkout-base if: ${{ startsWith(github.head_ref, 'backport-') }} - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.base_ref }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 915148e277..4eb300704d 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Need full history for calculation of diffs diff --git a/.github/workflows/publish-immutable-action.yml b/.github/workflows/publish-immutable-action.yml index 3944a81e6d..5e5623bb07 100644 --- a/.github/workflows/publish-immutable-action.yml +++ b/.github/workflows/publish-immutable-action.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Publish immutable release id: publish diff --git a/.github/workflows/python312-windows.yml b/.github/workflows/python312-windows.yml index 76a9c4ff26..ab169499e2 100644 --- a/.github/workflows/python312-windows.yml +++ b/.github/workflows/python312-windows.yml @@ -4,9 +4,6 @@ on: push: branches: [main, releases/v*] pull_request: - # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened - # by other workflows. - types: [opened, synchronize, reopened, ready_for_review] merge_group: types: [checks_requested] schedule: @@ -35,11 +32,11 @@ jobs: runs-on: windows-latest steps: - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: 3.12 - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/query-filters.yml b/.github/workflows/query-filters.yml index 3d1f4275cf..87b934eb6b 100644 --- a/.github/workflows/query-filters.yml +++ b/.github/workflows/query-filters.yml @@ -6,11 +6,6 @@ on: - main - releases/v* pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review merge_group: types: [checks_requested] schedule: @@ -35,10 +30,10 @@ jobs: contents: read # This permission is needed to allow the GitHub Actions workflow to read the contents of the repository. steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: npm diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index f1d74dc8f4..faa32c65d9 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -24,13 +24,13 @@ jobs: pull-requests: write # needed to comment on the PR steps: - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 ref: ${{ env.HEAD_REF }} - name: Set up Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: 'npm' @@ -143,6 +143,5 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | echo "Pushed a commit to rebuild the Action." \ - "Please mark the PR as ready for review to trigger PR checks." | + "Please approve running the PR checks." | gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER" - gh pr ready --undo --repo github/codeql-action "$PR_NUMBER" diff --git a/.github/workflows/rollback-release.yml b/.github/workflows/rollback-release.yml index e6a9da61f9..c37f8a79ae 100644 --- a/.github/workflows/rollback-release.yml +++ b/.github/workflows/rollback-release.yml @@ -52,7 +52,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Need full history for calculation of diffs @@ -93,7 +93,7 @@ jobs: LATEST_TAG: ${{ needs.prepare.outputs.latest_tag }} VERSION: "${{ needs.prepare.outputs.version }}" run: | - python .github/workflows/script/rollback_changelog.py \ + npx tsx pr-checks/rollback-changelog.ts \ --target-version "${ROLLBACK_TAG:1}" \ --rollback-version "${LATEST_TAG:1}" \ --new-version "$VERSION" > $NEW_CHANGELOG @@ -128,7 +128,9 @@ jobs: NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md" PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md" run: | - python .github/workflows/script/prepare_changelog.py $NEW_CHANGELOG > $PARTIAL_CHANGELOG + npx tsx pr-checks/prepare-changelog.ts \ + --changelog="$NEW_CHANGELOG" \ + --output="$PARTIAL_CHANGELOG" echo "::group::Partial CHANGELOG" cat $PARTIAL_CHANGELOG diff --git a/.github/workflows/script/bundle_changelog.py b/.github/workflows/script/bundle_changelog.py deleted file mode 100755 index d8ced87d8d..0000000000 --- a/.github/workflows/script/bundle_changelog.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 -import os -import re - -cli_version = os.environ['CLI_VERSION'] - -# The GitHub Release for the new bundle version. -bundle_release_url = f"https://github.com/github/codeql-action/releases/tag/codeql-bundle-v{cli_version}" -# Get the PR number from the PR URL. -pr_number = os.environ['PR_URL'].split('/')[-1] -changelog_note = f"- Update default CodeQL bundle version to [{cli_version}]({bundle_release_url}). [#{pr_number}]({os.environ['PR_URL']})" - -# If the "[UNRELEASED]" section starts with "no user facing changes", remove that line. -with open('CHANGELOG.md', 'r') as f: - changelog = f.read() - -changelog = changelog.replace('## [UNRELEASED]\n\nNo user facing changes.', '## [UNRELEASED]\n') - -# Add the changelog note to the bottom of the "[UNRELEASED]" section. -changelog = re.sub(r'\n## (\d+\.\d+\.\d+)', f'{changelog_note}\n\n## \\1', changelog, count=1) - -with open('CHANGELOG.md', 'w') as f: - f.write(changelog) diff --git a/.github/workflows/script/prepare_changelog.py b/.github/workflows/script/prepare_changelog.py deleted file mode 100755 index dafb84b39c..0000000000 --- a/.github/workflows/script/prepare_changelog.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys - -EMPTY_CHANGELOG = 'No changes.\n\n' - -# Prepare the changelog for the new release -# This function will extract the part of the changelog that -# we want to include in the new release. -def extract_changelog_snippet(changelog_file): - output = '' - if (not os.path.exists(changelog_file)): - output = EMPTY_CHANGELOG - - else: - with open(changelog_file, 'r') as f: - lines = f.readlines() - - # Include only the contents of the first section - found_first_section = False - for line in lines: - if line.startswith('## '): - if found_first_section: - break - found_first_section = True - elif found_first_section: - output += line - - return output.strip() - - -if len(sys.argv) < 2: - raise Exception('Expecting argument: changelog_file') -changelog_file = sys.argv[1] -print(extract_changelog_snippet(changelog_file)) diff --git a/.github/workflows/script/rollback_changelog.py b/.github/workflows/script/rollback_changelog.py deleted file mode 100644 index 5e06f83455..0000000000 --- a/.github/workflows/script/rollback_changelog.py +++ /dev/null @@ -1,62 +0,0 @@ -import datetime -import os -import argparse - -EMPTY_CHANGELOG = """# CodeQL Action Changelog - -""" - -def get_today_string(): - today = datetime.datetime.today() - return '{:%d %b %Y}'.format(today) - -# Include everything up to and after the first heading, -# but not the first heading and body. -def drop_unreleased_section(lines: list[str]): - before_first_section = '' - after_first_section = '' - found_first_section = False - skipped_first_section = False - - for i, line in enumerate(lines): - if line.startswith('## ') and not found_first_section: - found_first_section = True - elif line.startswith('## ') and found_first_section: - skipped_first_section = True - - if not found_first_section: - before_first_section += line - if skipped_first_section: - after_first_section += line - - return (before_first_section, after_first_section) - -def update_changelog(target_version, rollback_version, new_version): - before_first_section = EMPTY_CHANGELOG - after_first_section = '' - - if (os.path.exists('CHANGELOG.md')): - with open('CHANGELOG.md', 'r') as f: - (before_first_section, after_first_section) = drop_unreleased_section(f.readlines()) - - newHeader = f'## {new_version} - {get_today_string()}\n' - - print(before_first_section, end="") - print(newHeader) - print(f"This release rolls back {rollback_version} due to issues with that release. It is identical to {target_version}.\n") - print(after_first_section) - -# We expect three version strings as input: -# -# - target_version: the version that we are re-releasing as `new_version` -# - rollback_version: the version that we are rolling back, typically the one that followed `target_version` -# - new_version: the new version that we are releasing `target_version` as, typically the one that follows `rollback_version` -# -# Example: python3 .github/workflows/script/rollback_changelog.py --target-version "1.2.3" --rollback-version "1.2.4" --new-version "1.2.5" -parser = argparse.ArgumentParser(description="Update CHANGELOG.md for a rollback release.") -parser.add_argument("--target-version", "-t", required=True, help="Version to re-release as new_version.") -parser.add_argument("--rollback-version", "-r", required=True, help="Version being rolled back.") -parser.add_argument("--new-version", "-n", required=True, help="New version to publish for target_version.") -args = parser.parse_args() - -update_changelog(args.target_version, args.rollback_version, args.new_version) diff --git a/.github/workflows/test-codeql-bundle-all.yml b/.github/workflows/test-codeql-bundle-all.yml index c44dafc590..477fdf0524 100644 --- a/.github/workflows/test-codeql-bundle-all.yml +++ b/.github/workflows/test-codeql-bundle-all.yml @@ -8,11 +8,6 @@ on: - main - releases/v* pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review merge_group: types: [checks_requested] schedule: @@ -43,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -51,7 +46,7 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: true - name: Install .NET - uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: '9.x' - id: init diff --git a/.github/workflows/update-bundle.yml b/.github/workflows/update-bundle.yml index 94c79bc56e..d3ee924e59 100644 --- a/.github/workflows/update-bundle.yml +++ b/.github/workflows/update-bundle.yml @@ -33,20 +33,15 @@ jobs: GITHUB_CONTEXT: '${{ toJson(github) }}' run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Update git config run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - - name: Set up Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.12' - - name: Set up Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: 'npm' @@ -114,14 +109,13 @@ jobs: --title "Update default bundle to $cli_version" \ --body "$pr_body" \ --assignee "$GITHUB_ACTOR" \ - --draft \ ) echo "CLI_VERSION=$cli_version" | tee -a "$GITHUB_ENV" echo "PR_URL=$pr_url" | tee -a "$GITHUB_ENV" - name: Create changelog note run: | - python .github/workflows/script/bundle_changelog.py + npx tsx pr-checks/bundle-changelog.ts - name: Push changelog note run: | diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index bef7965742..9f38f0f0b4 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -38,7 +38,7 @@ jobs: contents: write # needed to push commits pull-requests: write # needed to create pull request steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Need full history for calculation of diffs - uses: ./.github/actions/release-initialise @@ -69,7 +69,7 @@ jobs: run: | echo SOURCE_BRANCH=${REF_NAME} echo TARGET_BRANCH=releases/${MAJOR_VERSION} - python .github/update-release-branch.py \ + npx tsx ./pr-checks/update-release-branch.ts \ --repository-nwo ${{ github.repository }} \ --source-branch '${{ env.REF_NAME }}' \ --target-branch 'releases/${{ env.MAJOR_VERSION }}' \ @@ -101,7 +101,7 @@ jobs: private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }} - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Need full history for calculation of diffs token: ${{ steps.app-token.outputs.token }} @@ -113,7 +113,7 @@ jobs: run: | echo SOURCE_BRANCH=${SOURCE_BRANCH} echo TARGET_BRANCH=${TARGET_BRANCH} - python .github/update-release-branch.py \ + npx tsx ./pr-checks/update-release-branch.ts \ --repository-nwo ${{ github.repository }} \ --source-branch ${SOURCE_BRANCH} \ --target-branch ${TARGET_BRANCH} \ diff --git a/.github/workflows/update-supported-enterprise-server-versions.yml b/.github/workflows/update-supported-enterprise-server-versions.yml index 16f6f528c5..ee2649ad0e 100644 --- a/.github/workflows/update-supported-enterprise-server-versions.yml +++ b/.github/workflows/update-supported-enterprise-server-versions.yml @@ -9,7 +9,7 @@ on: - main paths: - .github/workflows/update-supported-enterprise-server-versions.yml - - .github/workflows/update-supported-enterprise-server-versions/update.py + - pr-checks/update-ghes-versions.ts jobs: update-supported-enterprise-server-versions: @@ -22,31 +22,37 @@ jobs: pull-requests: write # needed to create pull request steps: - - name: Setup Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: "3.13" - name: Checkout CodeQL Action - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: 24 + cache: 'npm' + + - name: Install dependencies + run: npm ci + - name: Checkout Enterprise Releases - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: github/enterprise-releases - token: ${{ secrets.ENTERPRISE_RELEASE_TOKEN }} + token: ${{ secrets.CODEQL_CI_ENTERPRISE_RELEASE_PAT }} path: ${{ github.workspace }}/enterprise-releases/ sparse-checkout: releases.json + - name: Update Supported Enterprise Server Versions + working-directory: pr-checks run: | - cd ./.github/workflows/update-supported-enterprise-server-versions/ - python3 -m pip install pipenv - pipenv install - pipenv run ./update.py + npx tsx update-ghes-versions.ts rm --recursive "$ENTERPRISE_RELEASES_PATH" - npm ci - npm run build env: ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/ + - name: Rebuild + run: npm run build + - name: Update git config run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/.github/workflows/update-supported-enterprise-server-versions/Pipfile b/.github/workflows/update-supported-enterprise-server-versions/Pipfile deleted file mode 100644 index e892e49219..0000000000 --- a/.github/workflows/update-supported-enterprise-server-versions/Pipfile +++ /dev/null @@ -1,9 +0,0 @@ -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] - -[packages] -semver = "*" diff --git a/.github/workflows/update-supported-enterprise-server-versions/Pipfile.lock b/.github/workflows/update-supported-enterprise-server-versions/Pipfile.lock deleted file mode 100644 index 3357cf2864..0000000000 --- a/.github/workflows/update-supported-enterprise-server-versions/Pipfile.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "e3ba923dcb4888e05de5448c18a732bf40197e80fabfa051a61c01b22c504879" - }, - "pipfile-spec": 6, - "requires": {}, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "semver": { - "hashes": [ - "sha256:ced8b23dceb22134307c1b8abfa523da14198793d9787ac838e70e29e77458d4", - "sha256:fa0fe2722ee1c3f57eac478820c3a5ae2f624af8264cbdf9000c980ff7f75e3f" - ], - "index": "pypi", - "version": "==2.13.0" - } - }, - "develop": {} -} diff --git a/.github/workflows/update-supported-enterprise-server-versions/update.py b/.github/workflows/update-supported-enterprise-server-versions/update.py deleted file mode 100755 index bdda902cd0..0000000000 --- a/.github/workflows/update-supported-enterprise-server-versions/update.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python3 -import datetime -import json -import os -import pathlib - -import semver - -_API_COMPATIBILITY_PATH = pathlib.Path(__file__).absolute().parents[3] / "src" / "api-compatibility.json" -_ENTERPRISE_RELEASES_PATH = pathlib.Path(os.environ["ENTERPRISE_RELEASES_PATH"]) -_RELEASE_FILE_PATH = _ENTERPRISE_RELEASES_PATH / "releases.json" -_FIRST_SUPPORTED_RELEASE = semver.VersionInfo.parse("2.22.0") # Versions older than this did not include Code Scanning. - -def main(): - api_compatibility_data = json.loads(_API_COMPATIBILITY_PATH.read_text()) - - releases = json.loads(_RELEASE_FILE_PATH.read_text()) - - # Remove GHES version using a previous version numbering scheme. - if "11.10" in releases: - del releases["11.10"] - - oldest_supported_release = None - newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0") - - for release_version_string, release_data in releases.items(): - release_version = semver.VersionInfo.parse(release_version_string + ".0") - if release_version < _FIRST_SUPPORTED_RELEASE: - continue - - if release_version > newest_supported_release: - feature_freeze_date = datetime.date.fromisoformat(release_data["feature_freeze"]) - if feature_freeze_date < datetime.date.today() + datetime.timedelta(weeks=2): - newest_supported_release = release_version - - if oldest_supported_release is None or release_version < oldest_supported_release: - end_of_life_date = datetime.date.fromisoformat(release_data["end"]) - # The GHES version is not actually end of life until the end of the day specified by - # `end_of_life_date`. Wait an extra week to be safe. - is_end_of_life = datetime.date.today() > end_of_life_date + datetime.timedelta(weeks=1) - if not is_end_of_life: - oldest_supported_release = release_version - - api_compatibility_data = { - "minimumVersion": f"{oldest_supported_release.major}.{oldest_supported_release.minor}", - "maximumVersion": f"{newest_supported_release.major}.{newest_supported_release.minor}", - } - _API_COMPATIBILITY_PATH.write_text(json.dumps(api_compatibility_data, sort_keys=True) + "\n") - -if __name__ == "__main__": - main() diff --git a/CHANGELOG.md b/CHANGELOG.md index a16b469fad..db809345bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,50 @@ See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. +## 4.37.7 - 13 Aug 2026 + +- Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://github.com/github/codeql-action/pull/4085) + +## 4.37.6 - 04 Aug 2026 + +- Changed the default filepath for the new remote file address format that was introduced in CodeQL Action 4.37.0 / 3.37.0 to `.github/codeql-config.yml` to align it with the suggested path that is used elsewhere. [#4070](https://github.com/github/codeql-action/pull/4070) + +## 4.37.5 - 03 Aug 2026 + +- Fixed a bug where a network error while streaming the download of the CodeQL bundle could terminate the `init` Action instead of falling back to downloading the bundle before extracting it. [#4061](https://github.com/github/codeql-action/pull/4061) + +## 4.37.4 - 29 Jul 2026 + +- This version of the CodeQL Action adds support for the `tools` input for the `codeql-action/init` step to be specified using a `github-codeql-tools` [repository property](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to `toolcache` to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for `tools` in the workflow definition always takes precedence unless the value of the repository property starts with `!`. [#4037](https://github.com/github/codeql-action/pull/4037) +- Update default CodeQL bundle version to [2.26.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2). [#4051](https://github.com/github/codeql-action/pull/4051) + +## 4.37.3 - 22 Jul 2026 + +No user facing changes. + +## 4.37.2 - 21 Jul 2026 + +- The new address format for the `config-file` input that was introduced in CodeQL Action 4.37.0 is now enabled by default. In addition to the format described there, the `remote=` prefix can now be used to explicitly indicate that the input refers to a remote file. All previous input formats continue to be accepted as well. [#4023](https://github.com/github/codeql-action/pull/4023) +- The CodeQL Action can now make use of [configured private registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) in Default Setup to retrieve CodeQL configuration files from remote repositories that require authentication. This will allow customers to store their CodeQL configuration in a single repository that can then be referenced by Default Setup workflows in other repositories. We expect to roll this and other, related changes out to everyone in July. [#4007](https://github.com/github/codeql-action/pull/4007) + +## 4.37.1 - 16 Jul 2026 + +- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://github.com/github/codeql-action/pull/3956) +- Update default CodeQL bundle version to [2.26.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1). [#4019](https://github.com/github/codeql-action/pull/4019) + +## 4.37.0 - 08 Jul 2026 + +- Update default CodeQL bundle version to [2.26.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0). [#3995](https://github.com/github/codeql-action/pull/3995) +- In addition to the existing input format, the `config-file` input for the `codeql-action/init` step will soon support a new `[owner/]repo[@ref][:path]` format. All components except the repository name are optional. If omitted, `owner` defaults to the same owner as the repository the analysis is running for, `ref` to `main`, and `path` to `.github/codeql-action.yaml`. Support for this format ships in this version of the CodeQL Action, but will only be enabled over the coming weeks. [#3973](https://github.com/github/codeql-action/pull/3973) + +## 4.36.3 - 01 Jul 2026 + +No user facing changes. + ## 4.36.2 - 04 Jun 2026 - - Cache CodeQL CLI version information across Actions steps. [#3943](https://github.com/github/codeql-action/pull/3943) - - Reduce requests while waiting for analysis processing by using exponential backoff when polling SARIF processing status. [#3937](https://github.com/github/codeql-action/pull/3937) +- Cache CodeQL CLI version information across Actions steps. [#3943](https://github.com/github/codeql-action/pull/3943) +- Reduce requests while waiting for analysis processing by using exponential backoff when polling SARIF processing status. [#3937](https://github.com/github/codeql-action/pull/3937) - Update default CodeQL bundle version to [2.25.6](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.6). [#3948](https://github.com/github/codeql-action/pull/3948) ## 4.36.1 - 02 Jun 2026 diff --git a/lib/defaults.json b/lib/defaults.json index 7c82ff2a6e..b5d9f13644 100644 --- a/lib/defaults.json +++ b/lib/defaults.json @@ -1,6 +1,6 @@ { - "bundleVersion": "codeql-bundle-v2.25.6", - "cliVersion": "2.25.6", - "priorBundleVersion": "codeql-bundle-v2.25.5", - "priorCliVersion": "2.25.5" + "bundleVersion": "codeql-bundle-v2.26.3", + "cliVersion": "2.26.3", + "priorBundleVersion": "codeql-bundle-v2.26.2", + "priorCliVersion": "2.26.2" } diff --git a/lib/entry-points.js b/lib/entry-points.js index 0e93e0ec61..af11ed2bb8 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -5,11 +5,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +var __esm = (fn, res, err) => function __init() { + if (err) throw err[0]; + try { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; + } catch (e) { + throw err = [e], e; + } }; var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e) { + throw mod = 0, e; + } }; var __export = (target, all) => { for (var name in all) @@ -204,7 +213,7 @@ var require_file_command = __commonJS({ exports2.issueFileCommand = issueFileCommand; exports2.prepareKeyValueMessage = prepareKeyValueMessage; var crypto3 = __importStar2(require("crypto")); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var os7 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -212,10 +221,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs30.existsSync(filePath)) { + if (!fs31.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs30.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, { + fs31.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, { encoding: "utf8" }); } @@ -255,7 +264,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a) { + } catch (_a2) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -324,7 +333,7 @@ var require_tunnel = __commonJS({ var https3 = require("https"); var events = require("events"); var assert = require("assert"); - var util = require("util"); + var util3 = require("util"); exports2.httpOverHttp = httpOverHttp; exports2.httpsOverHttp = httpsOverHttp; exports2.httpOverHttps = httpOverHttps; @@ -374,7 +383,7 @@ var require_tunnel = __commonJS({ self2.removeSocket(socket); }); } - util.inherits(TunnelingAgent, events.EventEmitter); + util3.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { var self2 = this; var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); @@ -1121,16 +1130,16 @@ var require_tree = __commonJS({ * @param {any} value * @param {number} index */ - constructor(key, value, index) { - if (index === void 0 || index >= key.length) { + constructor(key, value, index2) { + if (index2 === void 0 || index2 >= key.length) { throw new TypeError("Unreachable"); } - const code = this.code = key.charCodeAt(index); + const code = this.code = key.charCodeAt(index2); if (code > 127) { throw new TypeError("key must be ascii string"); } - if (key.length !== ++index) { - this.middle = new _TstNode(key, value, index); + if (key.length !== ++index2) { + this.middle = new _TstNode(key, value, index2); } else { this.value = value; } @@ -1144,34 +1153,34 @@ var require_tree = __commonJS({ if (length === 0) { throw new TypeError("Unreachable"); } - let index = 0; + let index2 = 0; let node = this; while (true) { - const code = key.charCodeAt(index); + const code = key.charCodeAt(index2); if (code > 127) { throw new TypeError("key must be ascii string"); } if (node.code === code) { - if (length === ++index) { + if (length === ++index2) { node.value = value; break; } else if (node.middle !== null) { node = node.middle; } else { - node.middle = new _TstNode(key, value, index); + node.middle = new _TstNode(key, value, index2); break; } } else if (node.code < code) { if (node.left !== null) { node = node.left; } else { - node.left = new _TstNode(key, value, index); + node.left = new _TstNode(key, value, index2); break; } } else if (node.right !== null) { node = node.right; } else { - node.right = new _TstNode(key, value, index); + node.right = new _TstNode(key, value, index2); break; } } @@ -1182,16 +1191,16 @@ var require_tree = __commonJS({ */ search(key) { const keylength = key.length; - let index = 0; + let index2 = 0; let node = this; - while (node !== null && index < keylength) { - let code = key[index]; + while (node !== null && index2 < keylength) { + let code = key[index2]; if (code <= 90 && code >= 65) { code |= 32; } while (node !== null) { if (code === node.code) { - if (keylength === ++index) { + if (keylength === ++index2) { return node; } node = node.middle; @@ -1266,7 +1275,7 @@ var require_util = __commonJS({ } }; function wrapRequestBody(body) { - if (isStream(body)) { + if (isStream2(body)) { if (bodyLength(body) === 0) { body.on("data", function() { assert(false); @@ -1289,19 +1298,19 @@ var require_util = __commonJS({ } function nop() { } - function isStream(obj) { + function isStream2(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - function isBlobLike(object) { - if (object === null) { + function isBlobLike(object2) { + if (object2 === null) { return false; - } else if (object instanceof Blob2) { + } else if (object2 instanceof Blob2) { return true; - } else if (typeof object !== "object") { + } else if (typeof object2 !== "object") { return false; } else { - const sTag = object[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + const sTag = object2[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object2 && typeof object2.stream === "function" || "arrayBuffer" in object2 && typeof object2.arrayBuffer === "function"); } } function buildURL(url2, queryParams) { @@ -1353,14 +1362,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`; - let path28 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path29 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path28 && path28[0] !== "/") { - path28 = `/${path28}`; + if (path29 && path29[0] !== "/") { + path29 = `/${path29}`; } - return new URL(`${origin}${path28}`); + return new URL(`${origin}${path29}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1407,7 +1416,7 @@ var require_util = __commonJS({ function bodyLength(body) { if (body == null) { return 0; - } else if (isStream(body)) { + } else if (isStream2(body)) { const state = body._readableState; return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; } else if (isBlobLike(body)) { @@ -1421,7 +1430,7 @@ var require_util = __commonJS({ return body && !!(body.destroyed || body[kDestroyed] || stream2.isDestroyed?.(body)); } function destroy(stream3, err) { - if (stream3 == null || !isStream(stream3) || isDestroyed(stream3)) { + if (stream3 == null || !isStream2(stream3) || isDestroyed(stream3)) { return; } if (typeof stream3.destroy === "function") { @@ -1583,8 +1592,8 @@ var require_util = __commonJS({ } ); } - function isFormDataLike(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + function isFormDataLike(object2) { + return object2 && typeof object2 === "object" && typeof object2.append === "function" && typeof object2.delete === "function" && typeof object2.get === "function" && typeof object2.getAll === "function" && typeof object2.has === "function" && typeof object2.set === "function" && object2[Symbol.toStringTag] === "FormData"; } function addAbortListener(signal, listener) { if ("addEventListener" in signal) { @@ -1641,9 +1650,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, @@ -1705,7 +1714,7 @@ var require_util = __commonJS({ parseOrigin, parseURL, getServerName, - isStream, + isStream: isStream2, isIterable, isAsyncIterable, isDestroyed, @@ -1748,10 +1757,10 @@ var require_diagnostics = __commonJS({ "node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { "use strict"; var diagnosticsChannel = require("node:diagnostics_channel"); - var util = require("node:util"); - var undiciDebugLog = util.debuglog("undici"); - var fetchDebuglog = util.debuglog("fetch"); - var websocketDebuglog = util.debuglog("websocket"); + var util3 = require("node:util"); + var undiciDebugLog = util3.debuglog("undici"); + var fetchDebuglog = util3.debuglog("fetch"); + var websocketDebuglog = util3.debuglog("websocket"); var isClientSet = false; var channels = { // Client @@ -1811,39 +1820,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path28, origin } + request: { method, path: path29, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path28); + debuglog("sending request to %s %s/%s", method, origin, path29); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path28, origin }, + request: { method, path: path29, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path28, + path29, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path28, origin } + request: { method, path: path29, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path28); + debuglog("trailers received from %s %s/%s", method, origin, path29); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path28, origin }, + request: { method, path: path29, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path28, + path29, error3.message ); }); @@ -1892,9 +1901,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path28, origin } + request: { method, path: path29, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path28); + debuglog("sending request to %s %s/%s", method, origin, path29); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1940,7 +1949,7 @@ var require_request = __commonJS({ var { isValidHTTPToken, isValidHeaderValue, - isStream, + isStream: isStream2, destroy, isBuffer, isFormDataLike, @@ -1957,7 +1966,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path28, + path: path29, method, body, headers, @@ -1972,11 +1981,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path28 !== "string") { + if (typeof path29 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path28[0] !== "/" && !(path28.startsWith("http://") || path28.startsWith("https://")) && method !== "CONNECT") { + } else if (path29[0] !== "/" && !(path29.startsWith("http://") || path29.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path28)) { + } else if (invalidPathRegex.test(path29)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2009,7 +2018,7 @@ var require_request = __commonJS({ this.abort = null; if (body == null) { this.body = null; - } else if (isStream(body)) { + } else if (isStream2(body)) { this.body = body; const rState = this.body._readableState; if (!rState || !rState.autoDestroy) { @@ -2042,7 +2051,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path28, query) : path28; + this.path = query ? buildURL(path29, query) : path29; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -2209,7 +2218,11 @@ var require_request = __commonJS({ } else if (typeof val[i] === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } else { - arr.push(`${val[i]}`); + const str = `${val[i]}`; + if (!isValidHeaderValue(str)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + arr.push(str); } } val = arr; @@ -2221,6 +2234,9 @@ var require_request = __commonJS({ val = ""; } else { val = `${val}`; + if (!isValidHeaderValue(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } } if (headerName === "host") { if (request3.host !== null) { @@ -2265,8 +2281,8 @@ var require_request = __commonJS({ var require_dispatcher = __commonJS({ "node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { "use strict"; - var EventEmitter = require("node:events"); - var Dispatcher = class extends EventEmitter { + var EventEmitter2 = require("node:events"); + var Dispatcher = class extends EventEmitter2 { dispatch() { throw new Error("not implemented"); } @@ -2330,13 +2346,21 @@ var require_dispatcher_base = __commonJS({ var kOnDestroyed = /* @__PURE__ */ Symbol("onDestroyed"); var kOnClosed = /* @__PURE__ */ Symbol("onClosed"); var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch"); + var kWebSocketOptions = /* @__PURE__ */ Symbol("webSocketOptions"); var DispatcherBase = class extends Dispatcher { - constructor() { + constructor(opts) { super(); this[kDestroyed] = false; this[kOnDestroyed] = null; this[kClosed] = false; this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { + maxFragments: this[kWebSocketOptions].maxFragments ?? 131072, + maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 + }; } get destroyed() { return this[kDestroyed]; @@ -2360,9 +2384,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve14(data); }); }); } @@ -2400,12 +2424,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve13(data); + ) : resolve14(data); }); }); } @@ -2714,7 +2738,7 @@ var require_connect = __commonJS({ "use strict"; var net = require("node:net"); var assert = require("node:assert"); - var util = require_util(); + var util3 = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var timers = require_timers(); function noop3() { @@ -2783,7 +2807,7 @@ var require_connect = __commonJS({ if (!tls) { tls = require("node:tls"); } - servername = servername || options.servername || util.getServerName(host) || null; + servername = servername || options.servername || util3.getServerName(host) || null; const sessionKey = servername || hostname; assert(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; @@ -2882,7 +2906,7 @@ var require_connect = __commonJS({ message += ` (attempted address: ${opts.hostname}:${opts.port},`; } message += ` timeout: ${opts.timeout}ms)`; - util.destroy(socket, new ConnectTimeoutError(message)); + util3.destroy(socket, new ConnectTimeoutError(message)); } module2.exports = buildConnector; } @@ -3611,12 +3635,12 @@ var require_data_url = __commonJS({ function parseMIMEType(input) { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; - const type2 = collectASequenceOfCodePointsFast( + const type = collectASequenceOfCodePointsFast( "/", input, position ); - if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } if (position.position > input.length) { @@ -3632,7 +3656,7 @@ var require_data_url = __commonJS({ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { return "failure"; } - const typeLowercase = type2.toLowerCase(); + const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, @@ -3763,25 +3787,25 @@ var require_data_url = __commonJS({ function isHTTPWhiteSpace(char) { return char === 13 || char === 10 || char === 9 || char === 32; } - function removeHTTPWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); } function isASCIIWhitespace(char) { return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; } - function removeASCIIWhitespace(str2, leading = true, trailing = true) { - return removeChars(str2, leading, trailing, isASCIIWhitespace); + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); } - function removeChars(str2, leading, trailing, predicate) { + function removeChars(str, leading, trailing, predicate) { let lead = 0; - let trail = str2.length - 1; + let trail = str.length - 1; if (leading) { - while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; } if (trailing) { - while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; } - return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } function isomorphicDecode(input) { const length = input.length; @@ -3857,7 +3881,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 = {}; @@ -3999,8 +4023,8 @@ var require_webidl = __commonJS({ return r; }; webidl.util.Stringify = function(V) { - const type2 = webidl.util.Type(V); - switch (type2) { + const type = webidl.util.Type(V); + switch (type) { case "Symbol": return `Symbol(${V.description})`; case "Object": @@ -4020,8 +4044,8 @@ var require_webidl = __commonJS({ }); } const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq2 = []; - let index = 0; + const seq = []; + let index2 = 0; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ header: prefix, @@ -4033,9 +4057,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq2.push(converter(value, prefix, `${argument}[${index++}]`)); + seq.push(converter(value, prefix, `${argument}[${index2++}]`)); } - return seq2; + return seq; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -4047,7 +4071,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); @@ -4081,11 +4105,11 @@ var require_webidl = __commonJS({ }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix, argument) => { - const type2 = webidl.util.Type(dictionary); + const type = webidl.util.Type(dictionary); const dict = {}; - if (type2 === "Null" || type2 === "Undefined") { + if (type === "Null" || type === "Undefined") { return dict; - } else if (type2 !== "Object") { + } else if (type !== "Object") { throw webidl.errors.exception({ header: prefix, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -4142,10 +4166,10 @@ var require_webidl = __commonJS({ }; webidl.converters.ByteString = function(V, prefix, argument) { const x = webidl.converters.DOMString(V, prefix, argument); - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { + for (let index2 = 0; index2 < x.length; index2++) { + if (x.charCodeAt(index2) > 255) { throw new TypeError( - `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + `Cannot convert argument to a ByteString because the character at index ${index2} has a value of ${x.charCodeAt(index2)} which is greater than 255.` ); } } @@ -4176,14 +4200,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." @@ -4198,14 +4222,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." @@ -4220,13 +4244,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." @@ -4241,13 +4265,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({ @@ -4276,7 +4300,7 @@ var require_webidl = __commonJS({ var require_util2 = __commonJS({ "node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { "use strict"; - var { Transform } = require("node:stream"); + var { Transform: Transform5 } = require("node:stream"); var zlib3 = require("node:zlib"); var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants3(); var { getGlobalOrigin } = require_global(); @@ -4338,8 +4362,8 @@ var require_util2 = __commonJS({ } return "allowed"; } - function isErrorLike(object) { - return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); + function isErrorLike(object2) { + return object2 instanceof Error || (object2?.constructor?.name === "Error" || object2?.constructor?.name === "DOMException"); } function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { @@ -4416,8 +4440,8 @@ var require_util2 = __commonJS({ request3.headersList.append("origin", serializedOrigin, true); } } - function coarsenTime(timestamp2, crossOriginIsolatedCapability) { - return timestamp2; + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; } function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { @@ -4672,8 +4696,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve13, reject) => { - res = resolve13; + const promise = new Promise((resolve14, reject) => { + res = resolve14; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -4720,17 +4744,17 @@ var require_util2 = __commonJS({ `'next' called on an object that does not implement interface ${name} Iterator.` ); } - const index = this.#index; + const index2 = this.#index; const values = this.#target[kInternalIterator]; const len = values.length; - if (index >= len) { + if (index2 >= len) { return { value: void 0, done: true }; } - const { [keyIndex]: key, [valueIndex]: value } = values[index]; - this.#index = index + 1; + const { [keyIndex]: key, [valueIndex]: value } = values[index2]; + this.#index = index2 + 1; let result; switch (this.#kind) { case "key": @@ -4764,7 +4788,7 @@ var require_util2 = __commonJS({ return new FastIterableIterator(target, kind); }; } - function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + function iteratorMixin(name, object2, kInternalIterator, keyIndex = 0, valueIndex = 1) { const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); const properties = { keys: { @@ -4772,7 +4796,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function keys() { - webidl.brandCheck(this, object); + webidl.brandCheck(this, object2); return makeIterator(this, "key"); } }, @@ -4781,7 +4805,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function values() { - webidl.brandCheck(this, object); + webidl.brandCheck(this, object2); return makeIterator(this, "value"); } }, @@ -4790,7 +4814,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function entries() { - webidl.brandCheck(this, object); + webidl.brandCheck(this, object2); return makeIterator(this, "key+value"); } }, @@ -4799,7 +4823,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function forEach(callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object); + webidl.brandCheck(this, object2); webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); if (typeof callbackfn !== "function") { throw new TypeError( @@ -4812,7 +4836,7 @@ var require_util2 = __commonJS({ } } }; - return Object.defineProperties(object.prototype, { + return Object.defineProperties(object2.prototype, { ...properties, [Symbol.iterator]: { writable: true, @@ -4964,7 +4988,7 @@ var require_util2 = __commonJS({ contentRange += isomorphicEncode(`${fullLength}`); return contentRange; } - var InflateStream = class extends Transform { + var InflateStream = class extends Transform5 { #zlibOptions; /** @param {zlib.ZlibOptions} [zlibOptions] */ constructor(zlibOptions) { @@ -5212,8 +5236,8 @@ var require_file = __commonJS({ } }; webidl.converters.Blob = webidl.interfaceConverter(Blob2); - function isFileLike(object) { - return object instanceof File2 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + function isFileLike(object2) { + return object2 instanceof File2 || object2 && (typeof object2.stream === "function" || typeof object2.arrayBuffer === "function") && object2[Symbol.toStringTag] === "File"; } module2.exports = { FileLike, isFileLike }; } @@ -5621,7 +5645,7 @@ var require_formdata_parser = __commonJS({ var require_body = __commonJS({ "node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { "use strict"; - var util = require_util(); + var util3 = require_util(); var { ReadableStreamFrom, isBlobLike, @@ -5661,12 +5685,12 @@ var require_body = __commonJS({ } }); } - function extractBody(object, keepalive = false) { + function extractBody(object2, keepalive = false) { let stream2 = null; - if (object instanceof ReadableStream) { - stream2 = object; - } else if (isBlobLike(object)) { - stream2 = object.stream(); + if (object2 instanceof ReadableStream) { + stream2 = object2; + } else if (isBlobLike(object2)) { + stream2 = object2.stream(); } else { stream2 = new ReadableStream({ async pull(controller) { @@ -5685,37 +5709,37 @@ var require_body = __commonJS({ let action = null; let source = null; let length = null; - let type2 = null; - if (typeof object === "string") { - source = object; - type2 = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - source = object.toString(); - type2 = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) { - source = new Uint8Array(object.slice()); - } else if (ArrayBuffer.isView(object)) { - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - } else if (util.isFormDataLike(object)) { + let type = null; + if (typeof object2 === "string") { + source = object2; + type = "text/plain;charset=UTF-8"; + } else if (object2 instanceof URLSearchParams) { + source = object2.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object2)) { + source = new Uint8Array(object2.slice()); + } else if (ArrayBuffer.isView(object2)) { + source = new Uint8Array(object2.buffer.slice(object2.byteOffset, object2.byteOffset + object2.byteLength)); + } else if (util3.isFormDataLike(object2)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape2 = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const escape3 = (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]); length = 0; let hasUnknownSizeValue = false; - for (const [name, value] of object) { + for (const [name, value] of object2) { if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape2(normalizeLinefeeds(name))}"\r + const chunk2 = textEncoder.encode(prefix + `; name="${escape3(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape2(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape2(value.name)}"` : "") + `\r + const chunk2 = textEncoder.encode(`${prefix}; name="${escape3(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape3(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); @@ -5734,7 +5758,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r if (hasUnknownSizeValue) { length = null; } - source = object; + source = object2; action = async function* () { for (const part of blobParts) { if (part.stream) { @@ -5744,32 +5768,32 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } }; - type2 = `multipart/form-data; boundary=${boundary}`; - } else if (isBlobLike(object)) { - source = object; - length = object.size; - if (object.type) { - type2 = object.type; - } - } else if (typeof object[Symbol.asyncIterator] === "function") { + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object2)) { + source = object2; + length = object2.size; + if (object2.type) { + type = object2.type; + } + } else if (typeof object2[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } - if (util.isDisturbed(object) || object.locked) { + if (util3.isDisturbed(object2) || object2.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } - stream2 = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + stream2 = object2 instanceof ReadableStream ? object2 : ReadableStreamFrom(object2); } - if (typeof source === "string" || util.isBuffer(source)) { + if (typeof source === "string" || util3.isBuffer(source)) { length = Buffer.byteLength(source); } if (action != null) { let iterator2; stream2 = new ReadableStream({ async start() { - iterator2 = action(object)[Symbol.asyncIterator](); + iterator2 = action(object2)[Symbol.asyncIterator](); }, async pull(controller) { const { value, done } = await iterator2.next(); @@ -5795,14 +5819,14 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } const body = { stream: stream2, source, length }; - return [body, type2]; + return [body, type]; } - function safelyExtractBody(object, keepalive = false) { - if (object instanceof ReadableStream) { - assert(!util.isDisturbed(object), "The body has already been consumed."); - assert(!object.locked, "The stream is locked."); + function safelyExtractBody(object2, keepalive = false) { + if (object2 instanceof ReadableStream) { + assert(!util3.isDisturbed(object2), "The body has already been consumed."); + assert(!object2.locked, "The stream is locked."); } - return extractBody(object, keepalive); + return extractBody(object2, keepalive); } function cloneBody(instance, body) { const [out1, out2] = body.stream.tee(); @@ -5882,12 +5906,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r function mixinBody(prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } - async function consumeBody(object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance); - if (bodyUnusable(object)) { + async function consumeBody(object2, convertBytesToJSValue, instance) { + webidl.brandCheck(object2, instance); + if (bodyUnusable(object2)) { throw new TypeError("Body is unusable: Body has already been read"); } - throwIfAborted(object[kState]); + throwIfAborted(object2[kState]); const promise = createDeferredPromise(); const errorSteps = (error3) => promise.reject(error3); const successSteps = (data) => { @@ -5897,16 +5921,16 @@ Content-Type: ${value.type || "application/octet-stream"}\r errorSteps(e); } }; - if (object[kState].body == null) { + if (object2[kState].body == null) { successSteps(Buffer.allocUnsafe(0)); return promise.promise; } - await fullyReadBody(object[kState].body, successSteps, errorSteps); + await fullyReadBody(object2[kState].body, successSteps, errorSteps); return promise.promise; } - function bodyUnusable(object) { - const body = object[kState].body; - return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + function bodyUnusable(object2) { + const body = object2[kState].body; + return body != null && (body.stream.locked || util3.isDisturbed(body.stream)); } function parseJSONFromBytes(bytes) { return JSON.parse(utf8DecodeBytes(bytes)); @@ -5936,13 +5960,14 @@ var require_client_h1 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var util = require_util(); + var util3 = require_util(); var { channels } = require_diagnostics(); var timers = require_timers(); var { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, + InvalidArgumentError, HeadersTimeoutError, HeadersOverflowError, SocketError, @@ -5987,8 +6012,11 @@ var require_client_h1 = __commonJS({ var constants = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; - var addListener = util.addListener; - var removeAllListeners = util.removeAllListeners; + var addListener = util3.addListener; + var removeAllListeners = util3.removeAllListeners; + var kIdleSocketValidation = /* @__PURE__ */ Symbol("kIdleSocketValidation"); + var kIdleSocketValidationTimeout = /* @__PURE__ */ Symbol("kIdleSocketValidationTimeout"); + var kSocketUsed = /* @__PURE__ */ Symbol("kSocketUsed"); var extractBody; async function lazyllhttp() { const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; @@ -6077,14 +6105,14 @@ var require_client_h1 = __commonJS({ this.connection = ""; this.maxResponseSize = client[kMaxResponseSize]; } - setTimeout(delay2, type2) { - if (delay2 !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + setTimeout(delay2, type) { + if (delay2 !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { if (this.timeout) { timers.clearTimeout(this.timeout); this.timeout = null; } if (delay2) { - if (type2 & USE_FAST_TIMER) { + if (type & USE_FAST_TIMER) { this.timeout = timers.setFastTimeout(onParserTimeout, delay2, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay2, new WeakRef(this)); @@ -6097,7 +6125,7 @@ var require_client_h1 = __commonJS({ this.timeout.refresh(); } } - this.timeoutType = type2; + this.timeoutType = type; } resume() { if (this.socket.destroyed || !this.paused) { @@ -6151,23 +6179,54 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)); - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + if (ret !== constants.ERROR.OK) { + const body = data.subarray(offset); + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(body); + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(body); + } else { + throw this.createError(ret, body); + } } } catch (err) { - util.destroy(socket, err); + util3.destroy(socket, err); + } + } + finish() { + assert(currentParser === null); + assert(this.ptr != null); + assert(!this.paused); + const { llhttp } = this; + let ret; + try { + currentParser = this; + ret = llhttp.llhttp_finish(this.ptr); + } finally { + currentParser = null; + } + if (ret === constants.ERROR.OK) { + return null; + } + if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) { + this.paused = true; + return null; } + return this.createError(ret, EMPTY_BUF); + } + createError(ret, data) { + const { llhttp, contentLength, bytesRead } = this; + if (contentLength && bytesRead !== parseInt(contentLength, 10)) { + return new ResponseContentLengthMismatchError(); + } + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + return new HTTPParserError(message, constants.ERROR[ret], data); } destroy() { assert(this.ptr != null); @@ -6188,6 +6247,10 @@ var require_client_h1 = __commonJS({ if (socket.destroyed) { return -1; } + if (client[kRunning] === 0) { + util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); + return -1; + } const request3 = client[kQueue][client[kRunningIdx]]; if (!request3) { return -1; @@ -6213,13 +6276,13 @@ var require_client_h1 = __commonJS({ } const key = this.headers[len - 2]; if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key); + const headerName = util3.bufferToLowerCasedHeaderName(key); if (headerName === "keep-alive") { this.keepAlive += buf.toString(); } else if (headerName === "connection") { this.connection += buf.toString(); } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { + } else if (key.length === 14 && util3.bufferToLowerCasedHeaderName(key) === "content-length") { this.contentLength += buf.toString(); } this.trackHeader(buf.length); @@ -6227,7 +6290,7 @@ var require_client_h1 = __commonJS({ trackHeader(len) { this.headersSize += len; if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()); + util3.destroy(this.socket, new HeadersOverflowError()); } } onUpgrade(head) { @@ -6258,7 +6321,7 @@ var require_client_h1 = __commonJS({ try { request3.onUpgrade(statusCode, headers, socket); } catch (err) { - util.destroy(socket, err); + util3.destroy(socket, err); } client[kResume](); } @@ -6267,6 +6330,10 @@ var require_client_h1 = __commonJS({ if (socket.destroyed) { return -1; } + if (client[kRunning] === 0) { + util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); + return -1; + } const request3 = client[kQueue][client[kRunningIdx]]; if (!request3) { return -1; @@ -6274,11 +6341,11 @@ var require_client_h1 = __commonJS({ assert(!this.upgrade); assert(this.statusCode < 200); if (statusCode === 100) { - util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); return -1; } if (upgrade && !request3.upgrade) { - util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket))); return -1; } assert(this.timeoutType === TIMEOUT_HEADERS); @@ -6307,7 +6374,7 @@ var require_client_h1 = __commonJS({ this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + const keepAliveTimeout = this.keepAlive ? util3.parseKeepAliveTimeout(this.keepAlive) : null; if (keepAliveTimeout != null) { const timeout = Math.min( keepAliveTimeout - client[kKeepAliveTimeoutThreshold], @@ -6355,7 +6422,7 @@ var require_client_h1 = __commonJS({ } assert(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()); + util3.destroy(socket, new ResponseExceededMaxSizeError()); return -1; } this.bytesRead += buf.length; @@ -6387,20 +6454,21 @@ var require_client_h1 = __commonJS({ return; } if (request3.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()); + util3.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } request3.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; + socket[kSocketUsed] = true; if (socket[kWriting]) { assert(client[kRunning] === 0); - util.destroy(socket, new InformationalError("reset")); + util3.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError("reset")); + util3.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { - util.destroy(socket, new InformationalError("reset")); + util3.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); @@ -6414,15 +6482,15 @@ var require_client_h1 = __commonJS({ if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { assert(!paused, "cannot be paused while waiting for headers"); - util.destroy(socket, new HeadersTimeoutError()); + util3.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { if (!paused) { - util.destroy(socket, new BodyTimeoutError()); + util3.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); - util.destroy(socket, new InformationalError("socket idle timeout")); + util3.destroy(socket, new InformationalError("socket idle timeout")); } } async function connectH1(client, socket) { @@ -6435,12 +6503,19 @@ var require_client_h1 = __commonJS({ socket[kWriting] = false; socket[kReset] = false; socket[kBlocking] = false; + socket[kIdleSocketValidation] = 0; + socket[kIdleSocketValidationTimeout] = null; + socket[kSocketUsed] = false; socket[kParser] = new Parser(client, socket, llhttpInstance); addListener(socket, "error", function(err) { assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); const parser = this[kParser]; if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); + const parserErr = parser.finish(); + if (parserErr) { + this[kError] = parserErr; + this[kClient][kOnError](parserErr); + } return; } this[kError] = err; @@ -6455,22 +6530,26 @@ var require_client_h1 = __commonJS({ addListener(socket, "end", function() { const parser = this[kParser]; if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); + const parserErr = parser.finish(); + if (parserErr) { + util3.destroy(this, parserErr); + } return; } - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + util3.destroy(this, new SocketError("other side closed", util3.getSocketInfo(this))); }); addListener(socket, "close", function() { const client2 = this[kClient]; const parser = this[kParser]; + clearIdleSocketValidation(this); if (parser) { if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); + this[kError] = parser.finish() || this[kError]; } this[kParser].destroy(); this[kParser] = null; } - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this)); client2[kSocket] = null; client2[kHTTPContext] = null; if (client2.destroyed) { @@ -6478,12 +6557,12 @@ var require_client_h1 = __commonJS({ const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request3 = requests[i]; - util.errorRequest(client2, request3, err); + util3.errorRequest(client2, request3, err); } } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { const request3 = client2[kQueue][client2[kRunningIdx]]; client2[kQueue][client2[kRunningIdx]++] = null; - util.errorRequest(client2, request3, err); + util3.errorRequest(client2, request3, err); } client2[kPendingIdx] = client2[kRunningIdx]; assert(client2[kRunning] === 0); @@ -6514,7 +6593,7 @@ var require_client_h1 = __commonJS({ return socket.destroyed; }, busy(request3) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) { return true; } if (request3) { @@ -6524,7 +6603,7 @@ var require_client_h1 = __commonJS({ if (client[kRunning] > 0 && (request3.upgrade || request3.method === "CONNECT")) { return true; } - if (client[kRunning] > 0 && util.bodyLength(request3.body) !== 0 && (util.isStream(request3.body) || util.isAsyncIterable(request3.body) || util.isFormDataLike(request3.body))) { + if (client[kRunning] > 0 && util3.bodyLength(request3.body) !== 0 && (util3.isStream(request3.body) || util3.isAsyncIterable(request3.body) || util3.isFormDataLike(request3.body))) { return true; } } @@ -6532,6 +6611,24 @@ var require_client_h1 = __commonJS({ } }; } + function clearIdleSocketValidation(socket) { + if (socket[kIdleSocketValidationTimeout]) { + clearTimeout(socket[kIdleSocketValidationTimeout]); + socket[kIdleSocketValidationTimeout] = null; + } + socket[kIdleSocketValidation] = 0; + } + function scheduleIdleSocketValidation(client, socket) { + socket[kIdleSocketValidation] = 1; + socket[kIdleSocketValidationTimeout] = setTimeout(() => { + socket[kIdleSocketValidationTimeout] = null; + socket[kIdleSocketValidation] = 2; + if (client[kSocket] === socket && !socket.destroyed) { + client[kResume](); + } + }, 0); + socket[kIdleSocketValidationTimeout].unref?.(); + } function resumeH1(client) { const socket = client[kSocket]; if (socket && !socket.destroyed) { @@ -6544,6 +6641,29 @@ var require_client_h1 = __commonJS({ socket.ref(); socket[kNoRef] = false; } + if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) { + if (socket[kIdleSocketValidation] === 0) { + scheduleIdleSocketValidation(client, socket); + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + return; + } + if (socket[kIdleSocketValidation] === 1) { + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + return; + } + } + if (client[kRunning] === 0) { + socket[kParser].readMore(); + if (socket.destroyed) { + return; + } + } if (client[kSize] === 0) { if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); @@ -6561,10 +6681,10 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request3) { - const { method, path: path28, host, upgrade, blocking, reset } = request3; + const { method, path: path29, host, upgrade, blocking, reset } = request3; let { body, headers, contentLength } = request3; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; - if (util.isFormDataLike(body)) { + if (util3.isFormDataLike(body)) { if (!extractBody) { extractBody = require_body().extractBody; } @@ -6574,13 +6694,21 @@ var require_client_h1 = __commonJS({ } body = bodyStream.stream; contentLength = bodyStream.length; - } else if (util.isBlobLike(body) && request3.contentType == null && body.type) { - headers.push("content-type", body.type); + } else if (util3.isBlobLike(body) && request3.contentType == null) { + const contentType = body.type; + if (contentType) { + const contentTypeValue = `${contentType}`; + if (!util3.isValidHeaderValue(contentTypeValue)) { + util3.errorRequest(client, request3, new InvalidArgumentError("invalid content-type header")); + return false; + } + headers.push("content-type", contentTypeValue); + } } if (body && typeof body.read === "function") { body.read(0); } - const bodyLength = util.bodyLength(body); + const bodyLength = util3.bodyLength(body); contentLength = bodyLength ?? contentLength; if (contentLength === null) { contentLength = request3.contentLength; @@ -6590,24 +6718,25 @@ var require_client_h1 = __commonJS({ } if (shouldSendContentLength(method) && contentLength > 0 && request3.contentLength !== null && request3.contentLength !== contentLength) { if (client[kStrictContentLength]) { - util.errorRequest(client, request3, new RequestContentLengthMismatchError()); + util3.errorRequest(client, request3, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } const socket = client[kSocket]; + clearIdleSocketValidation(socket); const abort = (err) => { if (request3.aborted || request3.completed) { return; } - util.errorRequest(client, request3, err || new RequestAbortedError()); - util.destroy(body); - util.destroy(socket, new InformationalError("aborted")); + util3.errorRequest(client, request3, err || new RequestAbortedError()); + util3.destroy(body); + util3.destroy(socket, new InformationalError("aborted")); }; try { request3.onConnect(abort); } catch (err) { - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); } if (request3.aborted) { return false; @@ -6627,7 +6756,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path28} HTTP/1.1\r + let header = `${method} ${path29} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6664,17 +6793,17 @@ upgrade: ${upgrade}\r } if (!body || bodyLength === 0) { writeBuffer(abort, null, client, request3, socket, contentLength, header, expectsPayload); - } else if (util.isBuffer(body)) { + } else if (util3.isBuffer(body)) { writeBuffer(abort, body, client, request3, socket, contentLength, header, expectsPayload); - } else if (util.isBlobLike(body)) { + } else if (util3.isBlobLike(body)) { if (typeof body.stream === "function") { writeIterable(abort, body.stream(), client, request3, socket, contentLength, header, expectsPayload); } else { writeBlob(abort, body, client, request3, socket, contentLength, header, expectsPayload); } - } else if (util.isStream(body)) { + } else if (util3.isStream(body)) { writeStream(abort, body, client, request3, socket, contentLength, header, expectsPayload); - } else if (util.isIterable(body)) { + } else if (util3.isIterable(body)) { writeIterable(abort, body, client, request3, socket, contentLength, header, expectsPayload); } else { assert(false); @@ -6694,7 +6823,7 @@ upgrade: ${upgrade}\r this.pause(); } } catch (err) { - util.destroy(this, err); + util3.destroy(this, err); } }; const onDrain = function() { @@ -6731,9 +6860,9 @@ upgrade: ${upgrade}\r } writer.destroy(err); if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util.destroy(body, err); + util3.destroy(body, err); } else { - util.destroy(body); + util3.destroy(body); } }; body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); @@ -6762,7 +6891,7 @@ upgrade: ${upgrade}\r socket.write(`${header}\r `, "latin1"); } - } else if (util.isBuffer(body)) { + } else if (util3.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r @@ -6814,12 +6943,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve13, reject) => { + const waitForDrain = () => new Promise((resolve14, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve13; + callback = resolve14; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -6956,8 +7085,8 @@ var require_client_h2 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var { pipeline } = require("node:stream"); - var util = require_util(); + var { pipeline: pipeline2 } = require("node:stream"); + var util3 = require_util(); var { RequestContentLengthMismatchError, RequestAbortedError, @@ -7031,37 +7160,37 @@ var require_client_h2 = __commonJS({ session[kOpenStreams] = 0; session[kClient] = client; session[kSocket] = socket; - util.addListener(session, "error", onHttp2SessionError); - util.addListener(session, "frameError", onHttp2FrameError); - util.addListener(session, "end", onHttp2SessionEnd); - util.addListener(session, "goaway", onHTTP2GoAway); - util.addListener(session, "close", function() { + util3.addListener(session, "error", onHttp2SessionError); + util3.addListener(session, "frameError", onHttp2FrameError); + util3.addListener(session, "end", onHttp2SessionEnd); + util3.addListener(session, "goaway", onHTTP2GoAway); + util3.addListener(session, "close", function() { const { [kClient]: client2 } = this; const { [kSocket]: socket2 } = client2; - const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket2)); + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util3.getSocketInfo(socket2)); client2[kHTTP2Session] = null; if (client2.destroyed) { assert(client2[kPending] === 0); const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request3 = requests[i]; - util.errorRequest(client2, request3, err); + util3.errorRequest(client2, request3, err); } } }); session.unref(); client[kHTTP2Session] = session; socket[kHTTP2Session] = session; - util.addListener(socket, "error", function(err) { + util3.addListener(socket, "error", function(err) { assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kError] = err; this[kClient][kOnError](err); }); - util.addListener(socket, "end", function() { - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + util3.addListener(socket, "end", function() { + util3.destroy(this, new SocketError("other side closed", util3.getSocketInfo(this))); }); - util.addListener(socket, "close", function() { - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + util3.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this)); client[kSocket] = null; if (this[kHTTP2Session] != null) { this[kHTTP2Session].destroy(err); @@ -7116,20 +7245,20 @@ var require_client_h2 = __commonJS({ this[kSocket][kError] = err; this[kClient][kOnError](err); } - function onHttp2FrameError(type2, code, id) { + function onHttp2FrameError(type, code, id) { if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); this[kSocket][kError] = err; this[kClient][kOnError](err); } } function onHttp2SessionEnd() { - const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + const err = new SocketError("other side closed", util3.getSocketInfo(this[kSocket])); this.destroy(err); - util.destroy(this[kSocket], err); + util3.destroy(this[kSocket], err); } function onHTTP2GoAway(code) { - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util3.getSocketInfo(this)); const client = this[kClient]; client[kSocket] = null; client[kHTTPContext] = null; @@ -7137,11 +7266,11 @@ var require_client_h2 = __commonJS({ this[kHTTP2Session].destroy(err); this[kHTTP2Session] = null; } - util.destroy(this[kSocket], err); + util3.destroy(this[kSocket], err); if (client[kRunningIdx] < client[kQueue].length) { const request3 = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); client[kPendingIdx] = client[kRunningIdx]; } assert(client[kRunning] === 0); @@ -7153,10 +7282,10 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request3) { const session = client[kHTTP2Session]; - const { method, path: path28, host, upgrade, expectContinue, signal, headers: reqHeaders } = request3; + const { method, path: path29, host, upgrade, expectContinue, signal, headers: reqHeaders } = request3; let { body } = request3; if (upgrade) { - util.errorRequest(client, request3, new Error("Upgrade not supported for H2")); + util3.errorRequest(client, request3, new Error("Upgrade not supported for H2")); return false; } const headers = {}; @@ -7184,18 +7313,18 @@ var require_client_h2 = __commonJS({ return; } err = err || new RequestAbortedError(); - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); if (stream2 != null) { - util.destroy(stream2, err); + util3.destroy(stream2, err); } - util.destroy(body, err); + util3.destroy(body, err); client[kQueue][client[kRunningIdx]++] = null; client[kResume](); }; try { request3.onConnect(abort); } catch (err) { - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); } if (request3.aborted) { return false; @@ -7220,14 +7349,14 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path28; + headers[HTTP2_HEADER_PATH] = path29; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); } - let contentLength = util.bodyLength(body); - if (util.isFormDataLike(body)) { + let contentLength = util3.bodyLength(body); + if (util3.isFormDataLike(body)) { extractBody ??= require_body().extractBody; const [bodyStream, contentType] = extractBody(body); headers["content-type"] = contentType; @@ -7242,7 +7371,7 @@ var require_client_h2 = __commonJS({ } if (shouldSendContentLength(method) && contentLength > 0 && request3.contentLength != null && request3.contentLength !== contentLength) { if (client[kStrictContentLength]) { - util.errorRequest(client, request3, new RequestContentLengthMismatchError()); + util3.errorRequest(client, request3, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); @@ -7270,8 +7399,8 @@ var require_client_h2 = __commonJS({ request3.onResponseStarted(); if (request3.aborted) { const err = new RequestAbortedError(); - util.errorRequest(client, request3, err); - util.destroy(stream2, err); + util3.errorRequest(client, request3, err); + util3.destroy(stream2, err); return; } if (request3.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream2.resume.bind(stream2), "") === false) { @@ -7304,8 +7433,8 @@ var require_client_h2 = __commonJS({ stream2.once("error", function(err) { abort(err); }); - stream2.once("frameError", (type2, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + stream2.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); }); return true; function writeBodyH2() { @@ -7320,7 +7449,7 @@ var require_client_h2 = __commonJS({ contentLength, expectsPayload ); - } else if (util.isBuffer(body)) { + } else if (util3.isBuffer(body)) { writeBuffer( abort, stream2, @@ -7331,7 +7460,7 @@ var require_client_h2 = __commonJS({ contentLength, expectsPayload ); - } else if (util.isBlobLike(body)) { + } else if (util3.isBlobLike(body)) { if (typeof body.stream === "function") { writeIterable( abort, @@ -7355,7 +7484,7 @@ var require_client_h2 = __commonJS({ expectsPayload ); } - } else if (util.isStream(body)) { + } else if (util3.isStream(body)) { writeStream( abort, client[kSocket], @@ -7366,7 +7495,7 @@ var require_client_h2 = __commonJS({ request3, contentLength ); - } else if (util.isIterable(body)) { + } else if (util3.isIterable(body)) { writeIterable( abort, stream2, @@ -7384,7 +7513,7 @@ var require_client_h2 = __commonJS({ } function writeBuffer(abort, h2stream, body, client, request3, socket, contentLength, expectsPayload) { try { - if (body != null && util.isBuffer(body)) { + if (body != null && util3.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); h2stream.cork(); h2stream.write(body); @@ -7403,15 +7532,15 @@ var require_client_h2 = __commonJS({ } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request3, contentLength) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - const pipe = pipeline( + const pipe = pipeline2( body, h2stream, (err) => { if (err) { - util.destroy(pipe, err); + util3.destroy(pipe, err); abort(err); } else { - util.removeAllListeners(pipe); + util3.removeAllListeners(pipe); request3.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; @@ -7420,7 +7549,7 @@ var require_client_h2 = __commonJS({ } } ); - util.addListener(pipe, "data", onPipeData); + util3.addListener(pipe, "data", onPipeData); function onPipeData(chunk) { request3.onBodySent(chunk); } @@ -7456,12 +7585,12 @@ var require_client_h2 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve13, reject) => { + const waitForDrain = () => new Promise((resolve14, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve13; + callback = resolve14; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -7496,7 +7625,7 @@ var require_client_h2 = __commonJS({ var require_redirect_handler = __commonJS({ "node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { "use strict"; - var util = require_util(); + var util3 = require_util(); var { kBodyUsed } = require_symbols(); var assert = require("node:assert"); var { InvalidArgumentError } = require_errors(); @@ -7519,7 +7648,7 @@ var require_redirect_handler = __commonJS({ if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } - util.validateHandler(handler2, opts.method, opts.upgrade); + util3.validateHandler(handler2, opts.method, opts.upgrade); this.dispatch = dispatch; this.location = null; this.abort = null; @@ -7528,8 +7657,8 @@ var require_redirect_handler = __commonJS({ this.handler = handler2; this.history = []; this.redirectionLimitReached = false; - if (util.isStream(this.opts.body)) { - if (util.bodyLength(this.opts.body) === 0) { + if (util3.isStream(this.opts.body)) { + if (util3.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { assert(false); }); @@ -7542,7 +7671,7 @@ var require_redirect_handler = __commonJS({ } } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util3.isIterable(this.opts.body)) { this.opts.body = new BodyAsyncIterable(this.opts.body); } } @@ -7557,7 +7686,7 @@ var require_redirect_handler = __commonJS({ this.handler.onError(error3); } onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { if (this.request) { this.request.abort(new Error("max redirects")); @@ -7572,10 +7701,10 @@ var require_redirect_handler = __commonJS({ if (!this.location) { return this.handler.onHeaders(statusCode, headers, resume, statusText); } - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path28 = search ? `${pathname}${search}` : pathname; + const { origin, pathname, search } = util3.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path29 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path28; + this.opts.path = path29; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7610,20 +7739,20 @@ var require_redirect_handler = __commonJS({ return null; } for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") { + if (headers[i].length === 8 && util3.headerNameToString(headers[i]) === "location") { return headers[i + 1]; } } } function shouldRemoveHeader(header, removeContent, unknownOrigin) { if (header.length === 4) { - return util.headerNameToString(header) === "host"; + return util3.headerNameToString(header) === "host"; } - if (removeContent && util.headerNameToString(header).startsWith("content-")) { + if (removeContent && util3.headerNameToString(header).startsWith("content-")) { return true; } if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header); + const name = util3.headerNameToString(header); return name === "authorization" || name === "cookie" || name === "proxy-authorization"; } return false; @@ -7680,7 +7809,7 @@ var require_client = __commonJS({ var assert = require("node:assert"); var net = require("node:net"); var http = require("node:http"); - var util = require_util(); + var util3 = require_util(); var { channels } = require_diagnostics(); var Request = require_request(); var DispatcherBase = require_dispatcher_base(); @@ -7775,9 +7904,10 @@ var require_client = __commonJS({ autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2 + allowH2, + webSocket } = {}) { - super(); + super({ webSocket }); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } @@ -7863,7 +7993,7 @@ var require_client = __commonJS({ } else { this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; } - this[kUrl] = util.parseOrigin(url2); + this[kUrl] = util3.parseOrigin(url2); this[kConnector] = connect2; this[kPipelining] = pipelining != null ? pipelining : 1; this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; @@ -7926,7 +8056,7 @@ var require_client = __commonJS({ const request3 = new Request(origin, opts, handler2); this[kQueue].push(request3); if (this[kResuming]) { - } else if (util.bodyLength(request3.body) == null && util.isIterable(request3.body)) { + } else if (util3.bodyLength(request3.body) == null && util3.isIterable(request3.body)) { this[kResuming] = 1; queueMicrotask(() => resume(this)); } else { @@ -7938,27 +8068,27 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve13) => { + return new Promise((resolve14) => { if (this[kSize]) { - this[kClosedResolve] = resolve13; + this[kClosedResolve] = resolve14; } else { - resolve13(null); + resolve14(null); } }); } async [kDestroy](err) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request3 = requests[i]; - util.errorRequest(this, request3, err); + util3.errorRequest(this, request3, err); } const callback = () => { if (this[kClosedResolve]) { this[kClosedResolve](); this[kClosedResolve] = null; } - resolve13(null); + resolve14(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -7977,7 +8107,7 @@ var require_client = __commonJS({ const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request3 = requests[i]; - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); } assert(client[kSize] === 0); } @@ -8009,7 +8139,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve13, reject) => { + const socket = await new Promise((resolve14, reject) => { client[kConnector]({ host, hostname, @@ -8021,12 +8151,12 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve13(socket2); + resolve14(socket2); } }); }); if (client.destroyed) { - util.destroy(socket.on("error", noop3), new ClientDestroyedError()); + util3.destroy(socket.on("error", noop3), new ClientDestroyedError()); return; } assert(socket); @@ -8081,7 +8211,7 @@ var require_client = __commonJS({ assert(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request3 = client[kQueue][client[kPendingIdx]++]; - util.errorRequest(client, request3, err); + util3.errorRequest(client, request3, err); } } else { onError(client, err); @@ -8283,17 +8413,17 @@ var require_pool_base = __commonJS({ var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); var kStats = /* @__PURE__ */ Symbol("stats"); var PoolBase = class extends DispatcherBase { - constructor() { - super(); + constructor(opts) { + super(opts); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; const pool = this; this[kOnDrain] = function onDrain(origin, targets) { - const queue = pool[kQueue]; + const queue2 = pool[kQueue]; let needDrain = false; while (!needDrain) { - const item = queue.shift(); + const item = queue2.shift(); if (!item) { break; } @@ -8305,7 +8435,7 @@ var require_pool_base = __commonJS({ pool[kNeedDrain] = false; pool.emit("drain", origin, [pool, ...targets]); } - if (pool[kClosedResolve] && queue.isEmpty()) { + if (pool[kClosedResolve] && queue2.isEmpty()) { Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); } }; @@ -8357,8 +8487,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve13) => { - this[kClosedResolve] = resolve13; + await new Promise((resolve14) => { + this[kClosedResolve] = resolve14; }); } } @@ -8432,7 +8562,7 @@ var require_pool = __commonJS({ var { InvalidArgumentError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { kUrl, kInterceptors } = require_symbols(); var buildConnector = require_connect(); var kOptions = /* @__PURE__ */ Symbol("options"); @@ -8455,7 +8585,6 @@ var require_pool = __commonJS({ allowH2, ...options } = {}) { - super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } @@ -8476,10 +8605,11 @@ var require_pool = __commonJS({ ...connect }); } + super(options); this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; this[kConnections] = connections || null; - this[kUrl] = util.parseOrigin(origin); - this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; + this[kUrl] = util3.parseOrigin(origin); + this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; this.on("connectionError", (origin2, targets, error3) => { @@ -8661,7 +8791,7 @@ var require_agent = __commonJS({ var DispatcherBase = require_dispatcher_base(); var Pool = require_pool(); var Client = require_client(); - var util = require_util(); + var util3 = require_util(); var createRedirectInterceptor = require_redirect_interceptor(); var kOnConnect = /* @__PURE__ */ Symbol("onConnect"); var kOnDisconnect = /* @__PURE__ */ Symbol("onDisconnect"); @@ -8675,7 +8805,6 @@ var require_agent = __commonJS({ } var Agent = class extends DispatcherBase { constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super(); if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } @@ -8685,11 +8814,12 @@ var require_agent = __commonJS({ if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } + super(options); if (connect && typeof connect !== "function") { connect = { ...connect }; } this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; - this[kOptions] = { ...util.deepClone(options), connect }; + this[kOptions] = { ...util3.deepClone(options), connect }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kMaxRedirections] = maxRedirections; this[kFactory] = factory; @@ -8809,10 +8939,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path28 = "/", + path: path29 = "/", headers = {} } = opts; - opts.path = origin + path28; + opts.path = origin + path29; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -8827,7 +8957,7 @@ var require_proxy_agent = __commonJS({ return this.#client.destroy(err); } }; - var ProxyAgent = class extends DispatcherBase { + var ProxyAgent2 = class extends DispatcherBase { constructor(opts) { super(); if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { @@ -8968,7 +9098,7 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } - module2.exports = ProxyAgent; + module2.exports = ProxyAgent2; } }); @@ -8978,7 +9108,7 @@ var require_env_http_proxy_agent = __commonJS({ "use strict"; var DispatcherBase = require_dispatcher_base(); var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols(); - var ProxyAgent = require_proxy_agent(); + var ProxyAgent2 = require_proxy_agent(); var Agent = require_agent(); var DEFAULT_PORTS = { "http:": 80, @@ -9002,13 +9132,13 @@ var require_env_http_proxy_agent = __commonJS({ this[kNoProxyAgent] = new Agent(agentOpts); const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }); + this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); } else { this[kHttpProxyAgent] = this[kNoProxyAgent]; } const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }); + this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent]; } @@ -9125,6 +9255,24 @@ var require_retry_handler = __commonJS({ const current = Date.now(); return new Date(retryAfter).getTime() - current; } + function validatePartialResponseContentLength(headers, range2, statusCode, retryCount) { + const contentLength = headers["content-length"]; + if (contentLength == null) { + return null; + } + if (!Number.isFinite(range2.start) || !Number.isFinite(range2.end)) { + return null; + } + const length = Number(contentLength); + const expectedLength = range2.end - range2.start + 1; + if (!Number.isFinite(length) || length !== expectedLength) { + return new RequestRetryError("Content-Length mismatch", statusCode, { + headers, + data: { count: retryCount } + }); + } + return null; + } var RetryHandler = class _RetryHandler { constructor(opts, handlers) { const { retryOptions, ...dispatchOpts } = opts; @@ -9297,6 +9445,11 @@ var require_retry_handler = __commonJS({ ); return false; } + const contentLengthError = validatePartialResponseContentLength(headers, contentRange, statusCode, this.retryCount); + if (contentLengthError != null) { + this.abort(contentLengthError); + 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"); @@ -9305,8 +9458,8 @@ var require_retry_handler = __commonJS({ } 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, @@ -9314,7 +9467,12 @@ var require_retry_handler = __commonJS({ statusMessage ); } - const { start, size, end = size - 1 } = range; + const contentLengthError = validatePartialResponseContentLength(headers, range2, statusCode, this.retryCount); + if (contentLengthError != null) { + this.abort(contentLengthError); + return false; + } + const { start, size, end = size - 1 } = range2; assert( start != null && Number.isFinite(start), "content-range mismatch" @@ -9446,9 +9604,9 @@ var require_readable = __commonJS({ "node_modules/undici/lib/api/readable.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var { Readable: Readable2 } = require("node:stream"); + var { Readable: Readable3 } = require("node:stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { ReadableStreamFrom } = require_util(); var kConsume = /* @__PURE__ */ Symbol("kConsume"); var kReading = /* @__PURE__ */ Symbol("kReading"); @@ -9458,7 +9616,7 @@ var require_readable = __commonJS({ var kContentLength = /* @__PURE__ */ Symbol("kContentLength"); var noop3 = () => { }; - var BodyReadable = class extends Readable2 { + var BodyReadable = class extends Readable3 { constructor({ resume, abort, @@ -9550,7 +9708,7 @@ var require_readable = __commonJS({ } // https://fetch.spec.whatwg.org/#dom-body-bodyused get bodyUsed() { - return util.isDisturbed(this); + return util3.isDisturbed(this); } // https://fetch.spec.whatwg.org/#dom-body-body get body() { @@ -9573,7 +9731,7 @@ var require_readable = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve13, reject) => { + return await new Promise((resolve14, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -9586,7 +9744,7 @@ var require_readable = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve13(null); + resolve14(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -9601,11 +9759,11 @@ var require_readable = __commonJS({ return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; } function isUnusable(self2) { - return util.isDisturbed(self2) || isLocked(self2); + return util3.isDisturbed(self2) || isLocked(self2); } - async function consume(stream2, type2) { + async function consume(stream2, type) { assert(!stream2[kConsume]); - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { if (isUnusable(stream2)) { const rState = stream2._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -9620,9 +9778,9 @@ var require_readable = __commonJS({ } else { queueMicrotask(() => { stream2[kConsume] = { - type: type2, + type, stream: stream2, - resolve: resolve13, + resolve: resolve14, reject, length: 0, body: [] @@ -9692,18 +9850,18 @@ var require_readable = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve13, stream: stream2, length } = consume2; + const { type, body, resolve: resolve14, stream: stream2, length } = consume2; try { - if (type2 === "text") { - resolve13(chunksDecode(body, length)); - } else if (type2 === "json") { - resolve13(JSON.parse(chunksDecode(body, length))); - } else if (type2 === "arrayBuffer") { - resolve13(chunksConcat(body, length).buffer); - } else if (type2 === "blob") { - resolve13(new Blob(body, { type: stream2[kContentType] })); - } else if (type2 === "bytes") { - resolve13(chunksConcat(body, length)); + if (type === "text") { + resolve14(chunksDecode(body, length)); + } else if (type === "json") { + resolve14(JSON.parse(chunksDecode(body, length))); + } else if (type === "arrayBuffer") { + resolve14(chunksConcat(body, length).buffer); + } else if (type === "blob") { + resolve14(new Blob(body, { type: stream2[kContentType] })); + } else if (type === "bytes") { + resolve14(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -9800,9 +9958,9 @@ var require_api_request = __commonJS({ "node_modules/undici/lib/api/api-request.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var { Readable: Readable2 } = require_readable(); + var { Readable: Readable3 } = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("node:async_hooks"); var RequestHandler = class extends AsyncResource { @@ -9829,8 +9987,8 @@ var require_api_request = __commonJS({ } super("UNDICI_REQUEST"); } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", util.nop), err); + if (util3.isStream(body)) { + util3.destroy(body.on("error", util3.nop), err); } throw err; } @@ -9849,7 +10007,7 @@ var require_api_request = __commonJS({ this.signal = signal; this.reason = null; this.removeAbortListener = null; - if (util.isStream(body)) { + if (util3.isStream(body)) { body.on("error", (err) => { this.onError(err); }); @@ -9858,10 +10016,10 @@ var require_api_request = __commonJS({ if (this.signal.aborted) { this.reason = this.signal.reason ?? new RequestAbortedError(); } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.removeAbortListener = util3.addAbortListener(this.signal, () => { this.reason = this.signal.reason ?? new RequestAbortedError(); if (this.res) { - util.destroy(this.res.on("error", util.nop), this.reason); + util3.destroy(this.res.on("error", util3.nop), this.reason); } else if (this.abort) { this.abort(this.reason); } @@ -9885,17 +10043,17 @@ var require_api_request = __commonJS({ } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { callback, opaque, abort, context: context5, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); } return; } - const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const parsedHeaders = responseHeaders === "raw" ? util3.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; const contentLength = parsedHeaders["content-length"]; - const res = new Readable2({ + const res = new Readable3({ resume, abort, contentType, @@ -9930,7 +10088,7 @@ var require_api_request = __commonJS({ return this.res.push(chunk); } onComplete(trailers) { - util.parseHeaders(trailers, this.trailers); + util3.parseHeaders(trailers, this.trailers); this.res.push(null); } onError(err) { @@ -9944,12 +10102,12 @@ var require_api_request = __commonJS({ if (res) { this.res = null; queueMicrotask(() => { - util.destroy(res, err); + util3.destroy(res, err); }); } if (body) { this.body = null; - util.destroy(body, err); + util3.destroy(body, err); } if (this.removeAbortListener) { res?.off("close", this.removeAbortListener); @@ -9960,9 +10118,9 @@ var require_api_request = __commonJS({ }; function request3(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { request3.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve14(data); }); }); } @@ -10037,9 +10195,9 @@ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); - var { finished, PassThrough } = require("node:stream"); + var { finished, PassThrough: PassThrough3 } = require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); @@ -10067,8 +10225,8 @@ var require_api_stream = __commonJS({ } super("UNDICI_STREAM"); } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", util.nop), err); + if (util3.isStream(body)) { + util3.destroy(body.on("error", util3.nop), err); } throw err; } @@ -10083,7 +10241,7 @@ var require_api_stream = __commonJS({ this.body = body; this.onInfo = onInfo || null; this.throwOnError = throwOnError || false; - if (util.isStream(body)) { + if (util3.isStream(body)) { body.on("error", (err) => { this.onError(err); }); @@ -10101,7 +10259,7 @@ var require_api_stream = __commonJS({ } onHeaders(statusCode, rawHeaders, resume, statusMessage) { const { factory, opaque, context: context5, callback, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { this.onInfo({ statusCode, headers }); @@ -10111,9 +10269,9 @@ var require_api_stream = __commonJS({ this.factory = null; let res; if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const parsedHeaders = responseHeaders === "raw" ? util3.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; - res = new PassThrough(); + res = new PassThrough3(); this.callback = null; this.runInAsyncScope( getResolveErrorBodyCallback, @@ -10137,7 +10295,7 @@ var require_api_stream = __commonJS({ const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { - util.destroy(res2, err); + util3.destroy(res2, err); } this.callback = null; this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); @@ -10161,7 +10319,7 @@ var require_api_stream = __commonJS({ if (!res) { return; } - this.trailers = util.parseHeaders(trailers); + this.trailers = util3.parseHeaders(trailers); res.end(); } onError(err) { @@ -10170,7 +10328,7 @@ var require_api_stream = __commonJS({ this.factory = null; if (res) { this.res = null; - util.destroy(res, err); + util3.destroy(res, err); } else if (callback) { this.callback = null; queueMicrotask(() => { @@ -10179,15 +10337,15 @@ var require_api_stream = __commonJS({ } if (body) { this.body = null; - util.destroy(body, err); + util3.destroy(body, err); } } }; function stream2(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { stream2.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve14(data); }); }); } @@ -10210,21 +10368,21 @@ var require_api_pipeline = __commonJS({ "node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { "use strict"; var { - Readable: Readable2, + Readable: Readable3, Duplex, - PassThrough + PassThrough: PassThrough3 } = require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { AsyncResource } = require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); var assert = require("node:assert"); var kResume = /* @__PURE__ */ Symbol("resume"); - var PipelineRequest = class extends Readable2 { + var PipelineRequest = class extends Readable3 { constructor() { super({ autoDestroy: true }); this[kResume] = null; @@ -10241,7 +10399,7 @@ var require_api_pipeline = __commonJS({ callback(err); } }; - var PipelineResponse = class extends Readable2 { + var PipelineResponse = class extends Readable3 { constructor(resume) { super({ autoDestroy: true }); this[kResume] = resume; @@ -10281,7 +10439,7 @@ var require_api_pipeline = __commonJS({ this.abort = null; this.context = null; this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", util.nop); + this.req = new PipelineRequest().on("error", util3.nop); this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, @@ -10307,9 +10465,9 @@ var require_api_pipeline = __commonJS({ if (abort && err) { abort(); } - util.destroy(body, err); - util.destroy(req, err); - util.destroy(res, err); + util3.destroy(body, err); + util3.destroy(req, err); + util3.destroy(res, err); removeSignal(this); callback(err); } @@ -10335,7 +10493,7 @@ var require_api_pipeline = __commonJS({ const { opaque, handler: handler2, context: context5 } = this; if (statusCode < 200) { if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); this.onInfo({ statusCode, headers }); } return; @@ -10344,7 +10502,7 @@ var require_api_pipeline = __commonJS({ let body; try { this.handler = null; - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); body = this.runInAsyncScope(handler2, null, { statusCode, headers, @@ -10353,7 +10511,7 @@ var require_api_pipeline = __commonJS({ context: context5 }); } catch (err) { - this.res.on("error", util.nop); + this.res.on("error", util3.nop); throw err; } if (!body || typeof body.on !== "function") { @@ -10366,14 +10524,14 @@ var require_api_pipeline = __commonJS({ } }).on("error", (err) => { const { ret } = this; - util.destroy(ret, err); + util3.destroy(ret, err); }).on("end", () => { const { ret } = this; ret.push(null); }).on("close", () => { const { ret } = this; if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()); + util3.destroy(ret, new RequestAbortedError()); } }); this.body = body; @@ -10389,19 +10547,19 @@ var require_api_pipeline = __commonJS({ onError(err) { const { ret } = this; this.handler = null; - util.destroy(ret, err); + util3.destroy(ret, err); } }; - function pipeline(opts, handler2) { + function pipeline2(opts, handler2) { try { const pipelineHandler = new PipelineHandler(opts, handler2); this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); return pipelineHandler.ret; } catch (err) { - return new PassThrough().destroy(err); + return new PassThrough3().destroy(err); } } - module2.exports = pipeline; + module2.exports = pipeline2; } }); @@ -10411,7 +10569,7 @@ var require_api_upgrade = __commonJS({ "use strict"; var { InvalidArgumentError, SocketError } = require_errors(); var { AsyncResource } = require("node:async_hooks"); - var util = require_util(); + var util3 = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var assert = require("node:assert"); var UpgradeHandler = class extends AsyncResource { @@ -10451,7 +10609,7 @@ var require_api_upgrade = __commonJS({ const { callback, opaque, context: context5 } = this; removeSignal(this); this.callback = null; - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); this.runInAsyncScope(callback, null, null, { headers, socket, @@ -10472,9 +10630,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve14(data); }); }); } @@ -10504,7 +10662,7 @@ var require_api_connect = __commonJS({ var assert = require("node:assert"); var { AsyncResource } = require("node:async_hooks"); var { InvalidArgumentError, SocketError } = require_errors(); - var util = require_util(); + var util3 = require_util(); var { addSignal, removeSignal } = require_abort_signal(); var ConnectHandler = class extends AsyncResource { constructor(opts, callback) { @@ -10543,7 +10701,7 @@ var require_api_connect = __commonJS({ this.callback = null; let headers = rawHeaders; if (headers != null) { - headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); } this.runInAsyncScope(callback, null, null, { statusCode, @@ -10566,9 +10724,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve13(data); + return err ? reject(err) : resolve14(data); }); }); } @@ -10671,15 +10829,15 @@ var require_mock_utils = __commonJS({ isPromise } } = require("node:util"); - function matchValue(match, value) { - if (typeof match === "string") { - return match === value; + function matchValue(match2, value) { + if (typeof match2 === "string") { + return match2 === value; } - if (match instanceof RegExp) { - return match.test(value); + if (match2 instanceof RegExp) { + return match2.test(value); } - if (typeof match === "function") { - return match(value) === true; + if (typeof match2 === "function") { + return match2(value) === true; } return false; } @@ -10707,8 +10865,8 @@ var require_mock_utils = __commonJS({ function buildHeadersFromArray(headers) { const clone = headers.slice(); const entries = []; - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]); + for (let index2 = 0; index2 < clone.length; index2 += 2) { + entries.push([clone[index2], clone[index2 + 1]]); } return Object.fromEntries(entries); } @@ -10733,20 +10891,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path28) { - if (typeof path28 !== "string") { - return path28; + function safeUrl(path29) { + if (typeof path29 !== "string") { + return path29; } - const pathSegments = path28.split("?"); + const pathSegments = path29.split("?"); if (pathSegments.length !== 2) { - return path28; + return path29; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path28, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path28); + function matchKey(mockDispatch2, { path: path29, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path29); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10768,7 +10926,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: path28 }) => matchValue(safeUrl(path28), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path29 }) => matchValue(safeUrl(path29), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10795,20 +10953,20 @@ var require_mock_utils = __commonJS({ return newMockDispatch; } function deleteMockDispatch(mockDispatches, key) { - const index = mockDispatches.findIndex((dispatch) => { + const index2 = mockDispatches.findIndex((dispatch) => { if (!dispatch.consumed) { return false; } return matchKey(dispatch, key); }); - if (index !== -1) { - mockDispatches.splice(index, 1); + if (index2 !== -1) { + mockDispatches.splice(index2, 1); } } function buildKey(opts) { - const { path: path28, method, body, headers, query } = opts; + const { path: path29, method, body, headers, query } = opts; return { - path: path28, + path: path29, method, body, headers, @@ -11251,13 +11409,13 @@ var require_pluralizer = __commonJS({ var require_pending_interceptors_formatter = __commonJS({ "node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports2, module2) { "use strict"; - var { Transform } = require("node:stream"); + var { Transform: Transform5 } = require("node:stream"); var { Console } = require("node:console"); var PERSISTENT = process.versions.icu ? "\u2705" : "Y "; var NOT_PERSISTENT = process.versions.icu ? "\u274C" : "N "; module2.exports = class PendingInterceptorsFormatter { constructor({ disableColors } = {}) { - this.transform = new Transform({ + this.transform = new Transform5({ transform(chunk, _enc, cb) { cb(null, chunk); } @@ -11271,10 +11429,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path28, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path29, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path28, + Path: path29, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -11543,7 +11701,7 @@ var require_retry = __commonJS({ var require_dump = __commonJS({ "node_modules/undici/lib/interceptor/dump.js"(exports2, module2) { "use strict"; - var util = require_util(); + var util3 = require_util(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var DecoratorHandler = require_decorator_handler(); var DumpHandler = class extends DecoratorHandler { @@ -11572,7 +11730,7 @@ var require_dump = __commonJS({ } // TODO: will require adjustment after new hooks are out onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders); + const headers = util3.parseHeaders(rawHeaders); const contentLength = headers["content-length"]; if (contentLength != null && contentLength > this.#maxSize) { throw new RequestAbortedError( @@ -11793,10 +11951,10 @@ var require_dns = __commonJS({ return ip; } setRecords(origin, addresses) { - const timestamp2 = Date.now(); + const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; for (const record of addresses) { - record.timestamp = timestamp2; + record.timestamp = timestamp; if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); } else { @@ -11939,7 +12097,7 @@ var require_headers = __commonJS({ } = require_util2(); var { webidl } = require_webidl(); var assert = require("node:assert"); - var util = require("node:util"); + var util3 = require("node:util"); var kHeadersMap = /* @__PURE__ */ Symbol("headers map"); var kHeadersSortedMap = /* @__PURE__ */ Symbol("headers map sorted"); function isHTTPWhiteSpaceCharCode(code) { @@ -11952,10 +12110,10 @@ var require_headers = __commonJS({ while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } - function fill(headers, object) { - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i]; + function fill(headers, object2) { + if (Array.isArray(object2)) { + for (let i = 0; i < object2.length; ++i) { + const header = object2[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", @@ -11964,10 +12122,10 @@ var require_headers = __commonJS({ } appendHeader(headers, header[0], header[1]); } - } else if (typeof object === "object" && object !== null) { - const keys = Object.keys(object); + } else if (typeof object2 === "object" && object2 !== null) { + const keys = Object.keys(object2); for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]); + appendHeader(headers, keys[i], object2[keys[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -12003,13 +12161,13 @@ var require_headers = __commonJS({ var HeadersList = class _HeadersList { /** @type {[string, string][]|null} */ cookies = null; - constructor(init) { - if (init instanceof _HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]); - this[kHeadersSortedMap] = init[kHeadersSortedMap]; - this.cookies = init.cookies === null ? null : [...init.cookies]; + constructor(init2) { + if (init2 instanceof _HeadersList) { + this[kHeadersMap] = new Map(init2[kHeadersMap]); + this[kHeadersSortedMap] = init2[kHeadersSortedMap]; + this.cookies = init2.cookies === null ? null : [...init2.cookies]; } else { - this[kHeadersMap] = new Map(init); + this[kHeadersMap] = new Map(init2); this[kHeadersSortedMap] = null; } } @@ -12120,24 +12278,24 @@ var require_headers = __commonJS({ // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set toSortedArray() { const size = this[kHeadersMap].size; - const array = new Array(size); + const array2 = new Array(size); if (size <= 32) { if (size === 0) { - return array; + return array2; } const iterator2 = this[kHeadersMap][Symbol.iterator](); const firstValue = iterator2.next().value; - array[0] = [firstValue[0], firstValue[1].value]; + array2[0] = [firstValue[0], firstValue[1].value]; assert(firstValue[1].value !== null); for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { value = iterator2.next().value; - x = array[i] = [value[0], value[1].value]; + x = array2[i] = [value[0], value[1].value]; assert(x[1] !== null); left = 0; right = i; while (left < right) { pivot = left + (right - left >> 1); - if (array[pivot][0] <= x[0]) { + if (array2[pivot][0] <= x[0]) { left = pivot + 1; } else { right = pivot; @@ -12146,38 +12304,38 @@ var require_headers = __commonJS({ if (i !== pivot) { j = i; while (j > left) { - array[j] = array[--j]; + array2[j] = array2[--j]; } - array[left] = x; + array2[left] = x; } } if (!iterator2.next().done) { throw new TypeError("Unreachable"); } - return array; + return array2; } else { let i = 0; for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value]; + array2[i++] = [name, value]; assert(value !== null); } - return array.sort(compareHeaderName); + return array2.sort(compareHeaderName); } } }; var Headers = class _Headers { #guard; #headersList; - constructor(init = void 0) { + constructor(init2 = void 0) { webidl.util.markAsUncloneable(this); - if (init === kConstruct) { + if (init2 === kConstruct) { return; } this.#headersList = new HeadersList(); this.#guard = "none"; - if (init !== void 0) { - init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); - fill(this, init); + if (init2 !== void 0) { + init2 = webidl.converters.HeadersInit(init2, "Headers contructor", "init"); + fill(this, init2); } } // https://fetch.spec.whatwg.org/#dom-headers-append @@ -12298,9 +12456,9 @@ var require_headers = __commonJS({ } return this.#headersList[kHeadersSortedMap] = headers; } - [util.inspect.custom](depth, options) { + [util3.inspect.custom](depth, options) { options.depth ??= depth; - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + return `Headers ${util3.formatWithOptions(options, this.#headersList.entries)}`; } static getHeadersGuard(o) { return o.#guard; @@ -12332,14 +12490,14 @@ var require_headers = __commonJS({ value: "Headers", configurable: true }, - [util.inspect.custom]: { + [util3.inspect.custom]: { enumerable: false } }); webidl.converters.HeadersInit = function(V, prefix, argument) { if (webidl.util.Type(V) === "Object") { const iterator2 = Reflect.get(V, Symbol.iterator); - if (!util.types.isProxy(V) && iterator2 === Headers.prototype.entries) { + if (!util3.types.isProxy(V) && iterator2 === Headers.prototype.entries) { try { return getHeadersList(V).entriesList; } catch { @@ -12376,9 +12534,9 @@ var require_response = __commonJS({ "use strict"; var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); var { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); - var util = require_util(); + var util3 = require_util(); var nodeUtil = require("node:util"); - var { kEnumerableProperty } = util; + var { kEnumerableProperty } = util3; var { isValidReasonPhrase, isCancelled, @@ -12399,7 +12557,7 @@ var require_response = __commonJS({ var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); var assert = require("node:assert"); - var { types } = require("node:util"); + var { types: types2 } = require("node:util"); var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { // Creates network error Response. @@ -12408,17 +12566,17 @@ var require_response = __commonJS({ return responseObject; } // https://fetch.spec.whatwg.org/#dom-response-json - static json(data, init = {}) { + static json(data, init2 = {}) { webidl.argumentLengthCheck(arguments, 1, "Response.json"); - if (init !== null) { - init = webidl.converters.ResponseInit(init); + if (init2 !== null) { + init2 = webidl.converters.ResponseInit(init2); } const bytes = textEncoder.encode( serializeJavascriptValueToJSONString(data) ); const body = extractBody(bytes); const responseObject = fromInnerResponse(makeResponse({}), "response"); - initializeResponse(responseObject, init, { body: body[0], type: "application/json" }); + initializeResponse(responseObject, init2, { body: body[0], type: "application/json" }); return responseObject; } // Creates a redirect Response that redirects to url with status status. @@ -12442,7 +12600,7 @@ var require_response = __commonJS({ return responseObject; } // https://fetch.spec.whatwg.org/#dom-response - constructor(body = null, init = {}) { + constructor(body = null, init2 = {}) { webidl.util.markAsUncloneable(this); if (body === kConstruct) { return; @@ -12450,17 +12608,17 @@ var require_response = __commonJS({ if (body !== null) { body = webidl.converters.BodyInit(body); } - init = webidl.converters.ResponseInit(init); + init2 = webidl.converters.ResponseInit(init2); this[kState] = makeResponse({}); this[kHeaders] = new Headers(kConstruct); setHeadersGuard(this[kHeaders], "response"); setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; if (body != null) { - const [extractedBody, type2] = extractBody(body); - bodyWithType = { body: extractedBody, type: type2 }; + const [extractedBody, type] = extractBody(body); + bodyWithType = { body: extractedBody, type }; } - initializeResponse(this, init, bodyWithType); + initializeResponse(this, init2, bodyWithType); } // Returns response’s type, e.g., "cors". get type() { @@ -12508,7 +12666,7 @@ var require_response = __commonJS({ } get bodyUsed() { webidl.brandCheck(this, _Response); - return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + return !!this[kState].body && util3.isDisturbed(this[kState].body.stream); } // Returns a clone of response. clone() { @@ -12579,7 +12737,7 @@ var require_response = __commonJS({ } return newResponse; } - function makeResponse(init) { + function makeResponse(init2) { return { aborted: false, rangeRequested: false, @@ -12590,9 +12748,9 @@ var require_response = __commonJS({ timingInfo: null, cacheState: "", statusText: "", - ...init, - headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] + ...init2, + headersList: init2?.headersList ? new HeadersList(init2?.headersList) : new HeadersList(), + urlList: init2?.urlList ? [...init2.urlList] : [] }; } function makeNetworkError(reason) { @@ -12627,18 +12785,18 @@ var require_response = __commonJS({ } }); } - function filterResponse(response, type2) { - if (type2 === "basic") { + function filterResponse(response, type) { + if (type === "basic") { return makeFilteredResponse(response, { type: "basic", headersList: response.headersList }); - } else if (type2 === "cors") { + } else if (type === "cors") { return makeFilteredResponse(response, { type: "cors", headersList: response.headersList }); - } else if (type2 === "opaque") { + } else if (type === "opaque") { return makeFilteredResponse(response, { type: "opaque", urlList: Object.freeze([]), @@ -12646,7 +12804,7 @@ var require_response = __commonJS({ statusText: "", body: null }); - } else if (type2 === "opaqueredirect") { + } else if (type === "opaqueredirect") { return makeFilteredResponse(response, { type: "opaqueredirect", status: 0, @@ -12662,23 +12820,23 @@ var require_response = __commonJS({ assert(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) { - if (init.status !== null && (init.status < 200 || init.status > 599)) { + function initializeResponse(response, init2, body) { + if (init2.status !== null && (init2.status < 200 || init2.status > 599)) { throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); } - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase(String(init.statusText))) { + if ("statusText" in init2 && init2.statusText != null) { + if (!isValidReasonPhrase(String(init2.statusText))) { throw new TypeError("Invalid statusText"); } } - if ("status" in init && init.status != null) { - response[kState].status = init.status; + if ("status" in init2 && init2.status != null) { + response[kState].status = init2.status; } - if ("statusText" in init && init.statusText != null) { - response[kState].statusText = init.statusText; + if ("statusText" in init2 && init2.statusText != null) { + response[kState].statusText = init2.statusText; } - if ("headers" in init && init.headers != null) { - fill(response[kHeaders], init.headers); + if ("headers" in init2 && init2.headers != null) { + fill(response[kHeaders], init2.headers); } if (body) { if (nullBodyStatus.includes(response.status)) { @@ -12720,10 +12878,10 @@ 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 (util.isFormDataLike(V)) { + if (util3.isFormDataLike(V)) { return webidl.converters.FormData(V, prefix, name, { strict: false }); } if (V instanceof URLSearchParams) { @@ -12818,7 +12976,7 @@ var require_request2 = __commonJS({ var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); - var util = require_util(); + var util3 = require_util(); var nodeUtil = require("node:util"); var { isValidHTTPToken, @@ -12835,7 +12993,7 @@ var require_request2 = __commonJS({ requestCache, requestDuplex } = require_constants3(); - var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util3; var { kHeaders, kSignal, kState, kDispatcher } = require_symbols2(); var { webidl } = require_webidl(); var { URLSerializer } = require_data_url(); @@ -12874,7 +13032,7 @@ var require_request2 = __commonJS({ var patchMethodWarning = false; var Request = class _Request { // https://fetch.spec.whatwg.org/#dom-request - constructor(input, init = {}) { + constructor(input, init2 = {}) { webidl.util.markAsUncloneable(this); if (input === kConstruct) { return; @@ -12882,13 +13040,13 @@ var require_request2 = __commonJS({ const prefix = "Request constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); input = webidl.converters.RequestInfo(input, prefix, "input"); - init = webidl.converters.RequestInit(init, prefix, "init"); + init2 = webidl.converters.RequestInit(init2, prefix, "init"); let request3 = null; let fallbackMode = null; const baseUrl = environmentSettingsObject.settingsObject.baseUrl; let signal = null; if (typeof input === "string") { - this[kDispatcher] = init.dispatcher; + this[kDispatcher] = init2.dispatcher; let parsedURL; try { parsedURL = new URL(input, baseUrl); @@ -12903,7 +13061,7 @@ var require_request2 = __commonJS({ request3 = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher]; + this[kDispatcher] = init2.dispatcher || input[kDispatcher]; assert(input instanceof _Request); request3 = input[kState]; signal = input[kSignal]; @@ -12913,10 +13071,10 @@ var require_request2 = __commonJS({ if (request3.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request3.window, origin)) { window2 = request3.window; } - if (init.window != null) { + if (init2.window != null) { throw new TypeError(`'window' option '${window2}' must be null`); } - if ("window" in init) { + if ("window" in init2) { window2 = "no-window"; } request3 = makeRequest({ @@ -12962,7 +13120,7 @@ var require_request2 = __commonJS({ // URL list A clone of request’s URL list. urlList: [...request3.urlList] }); - const initHasKey = Object.keys(init).length !== 0; + const initHasKey = Object.keys(init2).length !== 0; if (initHasKey) { if (request3.mode === "navigate") { request3.mode = "same-origin"; @@ -12975,8 +13133,8 @@ var require_request2 = __commonJS({ request3.url = request3.urlList[request3.urlList.length - 1]; request3.urlList = [request3.url]; } - if (init.referrer !== void 0) { - const referrer = init.referrer; + if (init2.referrer !== void 0) { + const referrer = init2.referrer; if (referrer === "") { request3.referrer = "no-referrer"; } else { @@ -12993,12 +13151,12 @@ var require_request2 = __commonJS({ } } } - if (init.referrerPolicy !== void 0) { - request3.referrerPolicy = init.referrerPolicy; + if (init2.referrerPolicy !== void 0) { + request3.referrerPolicy = init2.referrerPolicy; } let mode; - if (init.mode !== void 0) { - mode = init.mode; + if (init2.mode !== void 0) { + mode = init2.mode; } else { mode = fallbackMode; } @@ -13011,28 +13169,28 @@ var require_request2 = __commonJS({ if (mode != null) { request3.mode = mode; } - if (init.credentials !== void 0) { - request3.credentials = init.credentials; + if (init2.credentials !== void 0) { + request3.credentials = init2.credentials; } - if (init.cache !== void 0) { - request3.cache = init.cache; + if (init2.cache !== void 0) { + request3.cache = init2.cache; } if (request3.cache === "only-if-cached" && request3.mode !== "same-origin") { throw new TypeError( "'only-if-cached' can be set only with 'same-origin' mode" ); } - if (init.redirect !== void 0) { - request3.redirect = init.redirect; + if (init2.redirect !== void 0) { + request3.redirect = init2.redirect; } - if (init.integrity != null) { - request3.integrity = String(init.integrity); + if (init2.integrity != null) { + request3.integrity = String(init2.integrity); } - if (init.keepalive !== void 0) { - request3.keepalive = Boolean(init.keepalive); + if (init2.keepalive !== void 0) { + request3.keepalive = Boolean(init2.keepalive); } - if (init.method !== void 0) { - let method = init.method; + if (init2.method !== void 0) { + let method = init2.method; const mayBeNormalized = normalizedMethodRecords[method]; if (mayBeNormalized !== void 0) { request3.method = mayBeNormalized; @@ -13054,8 +13212,8 @@ var require_request2 = __commonJS({ patchMethodWarning = true; } } - if (init.signal !== void 0) { - signal = init.signal; + if (init2.signal !== void 0) { + signal = init2.signal; } this[kState] = request3; const ac = new AbortController(); @@ -13080,7 +13238,7 @@ var require_request2 = __commonJS({ } } catch { } - util.addAbortListener(signal, abort); + util3.addAbortListener(signal, abort); requestFinalizer.register(ac, { signal, abort }, abort); } } @@ -13097,7 +13255,7 @@ var require_request2 = __commonJS({ } if (initHasKey) { const headersList = getHeadersList(this[kHeaders]); - const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + const headers = init2.headers !== void 0 ? init2.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { for (const { name, value } of headers.rawValues()) { @@ -13109,13 +13267,13 @@ var require_request2 = __commonJS({ } } const inputBody = input instanceof _Request ? input[kState].body : null; - if ((init.body != null || inputBody != null) && (request3.method === "GET" || request3.method === "HEAD")) { + if ((init2.body != null || inputBody != null) && (request3.method === "GET" || request3.method === "HEAD")) { throw new TypeError("Request with GET/HEAD method cannot have body."); } let initBody = null; - if (init.body != null) { + if (init2.body != null) { const [extractedBody, contentType] = extractBody( - init.body, + init2.body, request3.keepalive ); initBody = extractedBody; @@ -13125,7 +13283,7 @@ var require_request2 = __commonJS({ } const inputOrInitBody = initBody ?? inputBody; if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (initBody != null && init.duplex == null) { + if (initBody != null && init2.duplex == null) { throw new TypeError("RequestInit: duplex option is required when sending a body."); } if (request3.mode !== "same-origin" && request3.mode !== "cors") { @@ -13263,7 +13421,7 @@ var require_request2 = __commonJS({ } get bodyUsed() { webidl.brandCheck(this, _Request); - return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + return !!this[kState].body && util3.isDisturbed(this[kState].body.stream); } get duplex() { webidl.brandCheck(this, _Request); @@ -13287,7 +13445,7 @@ var require_request2 = __commonJS({ } const acRef = new WeakRef(ac); list.add(acRef); - util.addAbortListener( + util3.addAbortListener( ac.signal, buildAbort(acRef) ); @@ -13320,46 +13478,46 @@ var require_request2 = __commonJS({ } }; mixinBody(Request); - function makeRequest(init) { + function makeRequest(init2) { return { - method: init.method ?? "GET", - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? "", - window: init.window ?? "client", - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? "all", - initiator: init.initiator ?? "", - destination: init.destination ?? "", - priority: init.priority ?? null, - origin: init.origin ?? "client", - policyContainer: init.policyContainer ?? "client", - referrer: init.referrer ?? "client", - referrerPolicy: init.referrerPolicy ?? "", - mode: init.mode ?? "no-cors", - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? "same-origin", - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? "default", - redirect: init.redirect ?? "follow", - integrity: init.integrity ?? "", - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", - parserMetadata: init.parserMetadata ?? "", - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? "basic", - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + method: init2.method ?? "GET", + localURLsOnly: init2.localURLsOnly ?? false, + unsafeRequest: init2.unsafeRequest ?? false, + body: init2.body ?? null, + client: init2.client ?? null, + reservedClient: init2.reservedClient ?? null, + replacesClientId: init2.replacesClientId ?? "", + window: init2.window ?? "client", + keepalive: init2.keepalive ?? false, + serviceWorkers: init2.serviceWorkers ?? "all", + initiator: init2.initiator ?? "", + destination: init2.destination ?? "", + priority: init2.priority ?? null, + origin: init2.origin ?? "client", + policyContainer: init2.policyContainer ?? "client", + referrer: init2.referrer ?? "client", + referrerPolicy: init2.referrerPolicy ?? "", + mode: init2.mode ?? "no-cors", + useCORSPreflightFlag: init2.useCORSPreflightFlag ?? false, + credentials: init2.credentials ?? "same-origin", + useCredentials: init2.useCredentials ?? false, + cache: init2.cache ?? "default", + redirect: init2.redirect ?? "follow", + integrity: init2.integrity ?? "", + cryptoGraphicsNonceMetadata: init2.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init2.parserMetadata ?? "", + reloadNavigation: init2.reloadNavigation ?? false, + historyNavigation: init2.historyNavigation ?? false, + userActivation: init2.userActivation ?? false, + taintedOrigin: init2.taintedOrigin ?? false, + redirectCount: init2.redirectCount ?? 0, + responseTainting: init2.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init2.preventNoCacheCacheControlHeaderModification ?? false, + done: init2.done ?? false, + timingAllowFailed: init2.timingAllowFailed ?? false, + urlList: init2.urlList, + url: init2.urlList[0], + headersList: init2.headersList ? new HeadersList(init2.headersList) : new HeadersList() }; } function cloneRequest(request3) { @@ -13566,7 +13724,7 @@ var require_fetch = __commonJS({ subresourceSet } = require_constants3(); var EE = require("node:events"); - var { Readable: Readable2, pipeline, finished } = require("node:stream"); + var { Readable: Readable3, pipeline: pipeline2, finished } = require("node:stream"); var { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util(); var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); var { getGlobalDispatcher } = require_global2(); @@ -13608,12 +13766,12 @@ var require_fetch = __commonJS({ function handleFetchDone(response) { finalizeAndReportTiming(response, "fetch"); } - function fetch(input, init = void 0) { + function fetch(input, init2 = void 0) { webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); let p = createDeferredPromise(); let requestObject; try { - requestObject = new Request(input, init); + requestObject = new Request(input, init2); } catch (e) { p.reject(e); return p.promise; @@ -13911,13 +14069,13 @@ var require_fetch = __commonJS({ const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); - const type2 = blob.type; + const type = blob.type; if (!request3.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; response.headersList.set("content-length", serializedFullLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; const rangeHeader = request3.headersList.get("range", true); @@ -13937,7 +14095,7 @@ var require_fetch = __commonJS({ rangeEnd = fullLength - 1; } } - const slicedBlob = blob.slice(rangeStart, rangeEnd, type2); + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); const slicedBodyWithType = extractBody(slicedBlob); response.body = slicedBodyWithType[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); @@ -13945,7 +14103,7 @@ var require_fetch = __commonJS({ response.status = 206; response.statusText = "Partial Content"; response.headersList.set("content-length", serializedSlicedLength, true); - response.headersList.set("content-type", type2, true); + response.headersList.set("content-type", type, true); response.headersList.set("content-range", contentRange, true); } return Promise.resolve(response); @@ -14430,7 +14588,7 @@ var require_fetch = __commonJS({ function dispatch({ body }) { const url2 = requestCurrentURL(request3); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve13, reject) => agent.dispatch( + return new Promise((resolve14, reject) => agent.dispatch( { path: url2.pathname + url2.search, origin: url2.origin, @@ -14467,7 +14625,7 @@ var require_fetch = __commonJS({ headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } location = headersList.get("location", true); - this.body = new Readable2({ read: resume }); + this.body = new Readable3({ read: resume }); const decoders = []; const willFollow = location && request3.redirect === "follow" && redirectStatusSet.has(status); if (request3.method !== "HEAD" && request3.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { @@ -14506,11 +14664,11 @@ var require_fetch = __commonJS({ } } const onError = this.onError.bind(this); - resolve13({ + resolve14({ status, statusText, headersList, - body: decoders.length ? pipeline(this.body, ...decoders, (err) => { + body: decoders.length ? pipeline2(this.body, ...decoders, (err) => { if (err) { this.onError(err); } @@ -14552,7 +14710,7 @@ var require_fetch = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve13({ + resolve14({ status, statusText: STATUS_CODES[status], headersList, @@ -14595,10 +14753,10 @@ var require_progressevent = __commonJS({ var { webidl } = require_webidl(); var kState = /* @__PURE__ */ Symbol("ProgressEvent state"); var ProgressEvent = class _ProgressEvent extends Event { - constructor(type2, eventInitDict = {}) { - type2 = webidl.converters.DOMString(type2, "ProgressEvent constructor", "type"); + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); - super(type2, eventInitDict); + super(type, eventInitDict); this[kState] = { lengthComputable: eventInitDict.lengthComputable, loaded: eventInitDict.loaded, @@ -14956,7 +15114,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: btoa2 } = require("node:buffer"); var staticPropertyDescriptors = { @@ -14964,7 +15122,7 @@ var require_util4 = __commonJS({ writable: false, configurable: false }; - function readOperation(fr, blob, type2, encodingName) { + function readOperation(fr, blob, type, encodingName) { if (fr[kState] === "loading") { throw new DOMException("Invalid state", "InvalidStateError"); } @@ -14986,7 +15144,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(); @@ -14999,7 +15157,7 @@ var require_util4 = __commonJS({ queueMicrotask(() => { fr[kState] = "done"; try { - const result = packageData(bytes, type2, blob.type, encodingName); + const result = packageData(bytes, type, blob.type, encodingName); if (fr[kAborted]) { return; } @@ -15039,8 +15197,8 @@ var require_util4 = __commonJS({ }); reader.dispatchEvent(event); } - function packageData(bytes, type2, mimeType, encodingName) { - switch (type2) { + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { case "DataURL": { let dataURL = "data:"; const parsed = parseMIMEType(mimeType || "application/octet-stream"); @@ -15061,9 +15219,9 @@ var require_util4 = __commonJS({ encoding = getEncoding(encodingName); } if (encoding === "failure" && mimeType) { - const type3 = parseMIMEType(mimeType); - if (type3 !== "failure") { - encoding = getEncoding(type3.parameters.get("charset")); + const type2 = parseMIMEType(mimeType); + if (type2 !== "failure") { + encoding = getEncoding(type2.parameters.get("charset")); } } if (encoding === "failure") { @@ -15557,18 +15715,18 @@ var require_cache = __commonJS({ const p = Promise.all(responsePromises); const responses = await p; const operations = []; - let index = 0; + let index2 = 0; for (const response of responses) { const operation = { type: "put", // 7.3.2 - request: requestList[index], + request: requestList[index2], // 7.3.3 response // 7.3.4 }; operations.push(operation); - index++; + index2++; } const cacheJobPromise = createDeferredPromise(); let errorData = null; @@ -16155,18 +16313,52 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path28) { - for (let i = 0; i < path28.length; ++i) { - const code = path28.charCodeAt(i); + function validateCookiePath(path29) { + for (let i = 0; i < path29.length; ++i) { + const code = path29.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) - code === 127 || // DEL + code > 126 || // exclude DEL and non-ascii code === 59) { throw new Error("Invalid cookie path"); } } } + function isLetterOrDigit(code) { + return code >= 48 && code <= 57 || // 0-9 + code >= 65 && code <= 90 || // A-Z + code >= 97 && code <= 122; + } function validateCookieDomain(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) { + if (domain === " ") { + return; + } + if (domain.length > 255) { + throw new Error("Invalid cookie domain"); + } + let labelLength = 0; + for (let i = 0; i < domain.length; ++i) { + const code = domain.charCodeAt(i); + if (code === 46) { + if (labelLength === 0) { + throw new Error("Invalid cookie domain"); + } + if (domain.charCodeAt(i - 1) === 45) { + throw new Error("Invalid cookie domain"); + } + labelLength = 0; + continue; + } + if (labelLength === 0 && !isLetterOrDigit(code)) { + throw new Error("Invalid cookie domain"); + } + if (!isLetterOrDigit(code) && code !== 45) { + throw new Error("Invalid cookie domain"); + } + if (++labelLength > 63) { + throw new Error("Invalid cookie domain"); + } + } + if (labelLength === 0 || domain.charCodeAt(domain.length - 1) === 45) { throw new Error("Invalid cookie domain"); } } @@ -16249,7 +16441,11 @@ var require_util6 = __commonJS({ throw new Error("Invalid unparsed"); } const [key, ...value] = part.split("="); - out.push(`${key.trim()}=${value.join("=")}`); + const trimmedKey = key.trim(); + const joinedValue = value.join("="); + validateCookieName(trimmedKey); + validateCookieValue(joinedValue); + out.push(`${trimmedKey}=${joinedValue}`); } return out.join("; "); } @@ -16379,18 +16575,14 @@ var require_parse = __commonJS({ } else if (attributeNameLowercase === "httponly") { cookieAttributeList.httpOnly = true; } else if (attributeNameLowercase === "samesite") { - let enforcement = "Default"; const attributeValueLowercase = attributeValue.toLowerCase(); - if (attributeValueLowercase.includes("none")) { - enforcement = "None"; - } - if (attributeValueLowercase.includes("strict")) { - enforcement = "Strict"; + if (attributeValueLowercase === "none") { + cookieAttributeList.sameSite = "None"; + } else if (attributeValueLowercase === "strict") { + cookieAttributeList.sameSite = "Strict"; + } else if (attributeValueLowercase === "lax") { + cookieAttributeList.sameSite = "Lax"; } - if (attributeValueLowercase.includes("lax")) { - enforcement = "Lax"; - } - cookieAttributeList.sameSite = enforcement; } else { cookieAttributeList.unparsed ??= []; cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); @@ -16452,9 +16644,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, "setCookie"); webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify(cookie); - if (str2) { - headers.append("Set-Cookie", str2); + const str = stringify(cookie); + if (str) { + headers.append("Set-Cookie", str); } } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ @@ -16543,17 +16735,17 @@ var require_events = __commonJS({ var { MessagePort } = require("node:worker_threads"); var MessageEvent = class _MessageEvent extends Event { #eventInit; - constructor(type2, eventInitDict = {}) { - if (type2 === kConstruct) { + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { super(arguments[1], arguments[2]); webidl.util.markAsUncloneable(this); return; } const prefix = "MessageEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -16580,10 +16772,10 @@ var require_events = __commonJS({ } return this.#eventInit.ports; } - initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { webidl.brandCheck(this, _MessageEvent); webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); - return new _MessageEvent(type2, { + return new _MessageEvent(type, { bubbles, cancelable, data, @@ -16593,9 +16785,9 @@ var require_events = __commonJS({ ports }); } - static createFastMessageEvent(type2, init) { - const messageEvent = new _MessageEvent(kConstruct, type2, init); - messageEvent.#eventInit = init; + static createFastMessageEvent(type, init2) { + const messageEvent = new _MessageEvent(kConstruct, type, init2); + messageEvent.#eventInit = init2; messageEvent.#eventInit.data ??= null; messageEvent.#eventInit.origin ??= ""; messageEvent.#eventInit.lastEventId ??= ""; @@ -16608,12 +16800,12 @@ var require_events = __commonJS({ delete MessageEvent.createFastMessageEvent; var CloseEvent = class _CloseEvent extends Event { #eventInit; - constructor(type2, eventInitDict = {}) { + constructor(type, eventInitDict = {}) { const prefix = "CloseEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.CloseEventInit(eventInitDict); - super(type2, eventInitDict); + super(type, eventInitDict); this.#eventInit = eventInitDict; webidl.util.markAsUncloneable(this); } @@ -16632,12 +16824,12 @@ var require_events = __commonJS({ }; var ErrorEvent = class _ErrorEvent extends Event { #eventInit; - constructor(type2, eventInitDict) { + constructor(type, eventInitDict) { const prefix = "ErrorEvent constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - super(type2, eventInitDict); + super(type, eventInitDict); webidl.util.markAsUncloneable(this); - type2 = webidl.converters.DOMString(type2, prefix, "type"); + type = webidl.converters.DOMString(type, prefix, "type"); eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); this.#eventInit = eventInitDict; } @@ -16894,23 +17086,23 @@ var require_util7 = __commonJS({ function isClosed(ws) { return ws[kReadyState] === states.CLOSED; } - function fireEvent(e, target, eventFactory = (type2, init) => new Event(type2, init), eventInitDict = {}) { + function fireEvent(e, target, eventFactory = (type, init2) => new Event(type, init2), eventInitDict = {}) { const event = eventFactory(e, eventInitDict); target.dispatchEvent(event); } - function websocketMessageReceived(ws, type2, data) { + function websocketMessageReceived(ws, type, data) { if (ws[kReadyState] !== states.OPEN) { return; } let dataForEvent; - if (type2 === opcodes.TEXT) { + if (type === opcodes.TEXT) { try { dataForEvent = utf8Decode(data); } catch { failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); return; } - } else if (type2 === opcodes.BINARY) { + } else if (type === opcodes.BINARY) { if (ws[kBinaryType] === "blob") { dataForEvent = new Blob([data]); } else { @@ -16972,7 +17164,7 @@ var require_util7 = __commonJS({ response.socket.destroy(); } if (reason) { - fireEvent("error", ws, (type2, init) => new ErrorEvent(type2, init), { + fireEvent("error", ws, (type, init2) => new ErrorEvent(type, init2), { error: new Error(reason), message: reason }); @@ -17280,7 +17472,7 @@ var require_connection = __commonJS({ code = 1006; } ws[kReadyState] = states.CLOSED; - fireEvent("close", ws, (type2, init) => new CloseEvent(type2, init), { + fireEvent("close", ws, (type, init2) => new CloseEvent(type, init2), { wasClean, code, reason @@ -17318,27 +17510,26 @@ var require_permessage_deflate = __commonJS({ var tail = Buffer.from([0, 0, 255, 255]); var kBuffer = /* @__PURE__ */ Symbol("kBuffer"); var kLength = /* @__PURE__ */ Symbol("kLength"); - var kDefaultMaxDecompressedSize = 4 * 1024 * 1024; var PerMessageDeflate = class { /** @type {import('node:zlib').InflateRaw} */ #inflate; #options = {}; - /** @type {boolean} */ - #aborted = false; - /** @type {Function|null} */ - #currentCallback = null; + #maxPayloadSize = 0; /** * @param {Map} extensions */ - constructor(extensions) { + constructor(extensions, options) { this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ decompress(chunk, fin, callback) { - if (this.#aborted) { - callback(new MessageSizeExceededError()); - return; - } if (!this.#inflate) { let windowBits = Z_DEFAULT_WINDOWBITS; if (this.#options.serverMaxWindowBits) { @@ -17357,20 +17548,11 @@ var require_permessage_deflate = __commonJS({ this.#inflate[kBuffer] = []; this.#inflate[kLength] = 0; this.#inflate.on("data", (data) => { - if (this.#aborted) { - return; - } this.#inflate[kLength] += data.length; - if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) { - this.#aborted = true; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); this.#inflate.removeAllListeners(); - this.#inflate.destroy(); this.#inflate = null; - if (this.#currentCallback) { - const cb = this.#currentCallback; - this.#currentCallback = null; - cb(new MessageSizeExceededError()); - } return; } this.#inflate[kBuffer].push(data); @@ -17380,19 +17562,17 @@ var require_permessage_deflate = __commonJS({ callback(err); }); } - this.#currentCallback = callback; this.#inflate.write(chunk); if (fin) { this.#inflate.write(tail); } this.#inflate.flush(() => { - if (this.#aborted || !this.#inflate) { + if (!this.#inflate) { return; } const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); this.#inflate[kBuffer].length = 0; this.#inflate[kLength] = 0; - this.#currentCallback = null; callback(null, full); }); } @@ -17423,8 +17603,14 @@ var require_receiver = __commonJS({ var { WebsocketFrameSend } = require_frame(); var { closeWebSocketConnection } = require_connection(); var { PerMessageDeflate } = require_permessage_deflate(); + var { MessageSizeExceededError } = require_errors(); + function failWebsocketConnectionWithCode(ws, code, reason) { + closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason)); + failWebsocketConnection(ws, reason); + } var ByteParser = class extends Writable { #buffers = []; + #fragmentsBytes = 0; #byteOffset = 0; #loop = false; #state = parserStates.INFO; @@ -17432,16 +17618,23 @@ var require_receiver = __commonJS({ #fragments = []; /** @type {Map} */ #extensions; + /** @type {number} */ + #maxFragments; + /** @type {number} */ + #maxPayloadSize; /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions + * @param {{ maxFragments?: number, maxPayloadSize?: number }} [options] */ - constructor(ws, extensions) { + constructor(ws, extensions, options = {}) { super(); this.ws = ws; this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxFragments = options.maxFragments ?? 0; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; if (this.#extensions.has("permessage-deflate")) { - this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); + this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); } } /** @@ -17454,6 +17647,13 @@ var require_receiver = __commonJS({ this.#loop = true; this.run(callback); } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnectionWithCode(this.ws, 1009, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, @@ -17513,6 +17713,9 @@ var require_receiver = __commonJS({ if (payloadLength <= 125) { this.#info.payloadLength = payloadLength; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16; } else if (payloadLength === 127) { @@ -17533,6 +17736,9 @@ var require_receiver = __commonJS({ const buffer = this.consume(2); this.#info.payloadLength = buffer.readUInt16BE(0); this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback(); @@ -17546,6 +17752,9 @@ var require_receiver = __commonJS({ } this.#info.payloadLength = lower; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback(); @@ -17556,32 +17765,46 @@ var require_receiver = __commonJS({ this.#state = parserStates.INFO; } else { if (!this.#info.compressed) { - this.#fragments.push(body); + if (!this.writeFragments(body)) { + return; + } + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message); + return; + } if (!this.#info.fragmented && this.#info.fin) { - const fullMessage = Buffer.concat(this.#fragments); - websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); - this.#fragments.length = 0; + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error3, data) => { - if (error3) { - failWebsocketConnection(this.ws, error3.message); - return; - } - this.#fragments.push(data); - if (!this.#info.fin) { - this.#state = parserStates.INFO; + this.#extensions.get("permessage-deflate").decompress( + body, + this.#info.fin, + (error3, data) => { + if (error3) { + const code = error3 instanceof MessageSizeExceededError ? 1009 : 1007; + failWebsocketConnectionWithCode(this.ws, code, error3.message); + return; + } + if (!this.writeFragments(data)) { + return; + } + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); this.#loop = true; + this.#state = parserStates.INFO; this.run(callback); - return; } - websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)); - this.#loop = true; - this.#state = parserStates.INFO; - this.#fragments.length = 0; - this.run(callback); - }); + ); this.#loop = false; break; } @@ -17624,6 +17847,26 @@ var require_receiver = __commonJS({ this.#byteOffset -= n; return buffer; } + writeFragments(fragment) { + if (this.#maxFragments > 0 && this.#fragments.length === this.#maxFragments) { + failWebsocketConnectionWithCode(this.ws, 1008, "Too many message fragments"); + return false; + } + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + return true; + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } parseCloseBody(data) { assert(data.length !== 1); let code; @@ -17762,9 +18005,9 @@ var require_sender = __commonJS({ } async #run() { this.#running = true; - const queue = this.#queue; - while (!queue.isEmpty()) { - const node = queue.shift(); + const queue2 = this.#queue; + while (!queue2.isEmpty()) { + const node = queue2.shift(); if (node.promise !== null) { await node.promise; } @@ -17820,7 +18063,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 { @@ -17943,7 +18186,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; @@ -18048,12 +18291,12 @@ var require_websocket = __commonJS({ webidl.brandCheck(this, _WebSocket); return this[kBinaryType]; } - set binaryType(type2) { + set binaryType(type) { webidl.brandCheck(this, _WebSocket); - if (type2 !== "blob" && type2 !== "arraybuffer") { + if (type !== "blob" && type !== "arraybuffer") { this[kBinaryType] = "blob"; } else { - this[kBinaryType] = type2; + this[kBinaryType] = type; } } /** @@ -18061,7 +18304,13 @@ var require_websocket = __commonJS({ */ #onConnectionEstablished(response, parsedExtensions) { this[kResponse] = response; - const parser = new ByteParser(this, parsedExtensions); + const webSocketOptions = this[kController]?.dispatcher?.webSocketOptions; + const maxFragments = webSocketOptions?.maxFragments; + const maxPayloadSize = webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { + maxFragments, + maxPayloadSize + }); parser.on("drain", onParserDrain); parser.on("error", onParserError.bind(this)); response.socket.ws = this; @@ -18149,7 +18398,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); } } @@ -18191,8 +18440,8 @@ var require_util8 = __commonJS({ return true; } function delay2(ms) { - return new Promise((resolve13) => { - setTimeout(resolve13, ms).unref(); + return new Promise((resolve14) => { + setTimeout(resolve14, ms).unref(); }); } module2.exports = { @@ -18207,14 +18456,14 @@ var require_util8 = __commonJS({ var require_eventsource_stream = __commonJS({ "node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports2, module2) { "use strict"; - var { Transform } = require("node:stream"); + var { Transform: Transform5 } = require("node:stream"); var { isASCIINumber, isValidLastEventId } = require_util8(); var BOM = [239, 187, 191]; var LF = 10; var CR = 13; var COLON = 58; var SPACE = 32; - var EventSourceStream = class extends Transform { + var EventSourceStream = class extends Transform5 { /** * @type {eventSourceSettings} */ @@ -18437,7 +18686,7 @@ ${value}`; var require_eventsource = __commonJS({ "node_modules/undici/lib/web/eventsource/eventsource.js"(exports2, module2) { "use strict"; - var { pipeline } = require("node:stream"); + var { pipeline: pipeline2 } = require("node:stream"); var { fetching } = require_fetch(); var { makeRequest } = require_request2(); var { webidl } = require_webidl(); @@ -18595,7 +18844,7 @@ var require_eventsource = __commonJS({ )); } }); - pipeline( + pipeline2( response.body.stream, eventSourceStream, (error3) => { @@ -18739,11 +18988,11 @@ var require_undici = __commonJS({ var Pool = require_pool(); var BalancedPool = require_balanced_pool(); var Agent = require_agent(); - var ProxyAgent = require_proxy_agent(); + var ProxyAgent2 = require_proxy_agent(); var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var errors = require_errors(); - var util = require_util(); + var util3 = require_util(); var { InvalidArgumentError } = errors; var api = require_api(); var buildConnector = require_connect(); @@ -18762,7 +19011,7 @@ var require_undici = __commonJS({ module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; module2.exports.Agent = Agent; - module2.exports.ProxyAgent = ProxyAgent; + module2.exports.ProxyAgent = ProxyAgent2; module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; module2.exports.RetryAgent = RetryAgent; module2.exports.RetryHandler = RetryHandler; @@ -18778,8 +19027,8 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; module2.exports.util = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString + parseHeaders: util3.parseHeaders, + headerNameToString: util3.headerNameToString }; function makeDispatcher(fn) { return (url2, opts, handler2) => { @@ -18797,16 +19046,16 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path28 = opts.path; + let path29 = opts.path; if (!opts.path.startsWith("/")) { - path28 = `/${path28}`; + path29 = `/${path29}`; } - url2 = new URL(util.parseOrigin(url2).origin + path28); + url2 = new URL(util3.parseOrigin(url2).origin + path29); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; } - url2 = util.parseURL(url2); + url2 = util3.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -18823,9 +19072,9 @@ var require_undici = __commonJS({ module2.exports.setGlobalDispatcher = setGlobalDispatcher; module2.exports.getGlobalDispatcher = getGlobalDispatcher; var fetchImpl = require_fetch().fetch; - module2.exports.fetch = async function fetch(init, options = void 0) { + module2.exports.fetch = async function fetch(init2, options = void 0) { try { - return await fetchImpl(init, options); + return await fetchImpl(init2, options); } catch (err) { if (err && typeof err === "object") { Error.captureStackTrace(err); @@ -18915,11 +19164,11 @@ var require_lib = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18935,7 +19184,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19022,26 +19271,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve13(output.toString()); + resolve14(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve13(Buffer.concat(chunks)); + resolve14(Buffer.concat(chunks)); }); })); }); @@ -19249,14 +19498,14 @@ var require_lib = __commonJS({ */ requestRaw(info8, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve13(res); + resolve14(res); } } this.requestRawWithCallback(info8, data, callbackForResult); @@ -19366,7 +19615,7 @@ var require_lib = __commonJS({ * For headers that must always be a single string (like Content-Type), use the * specialized _getExistingOrDefaultContentTypeHeader method instead. */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys2(this.requestOptions.headers)[header]; @@ -19381,7 +19630,7 @@ var require_lib = __commonJS({ if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } /** * Specialized version of _getExistingOrDefaultHeader for Content-Type header. @@ -19390,7 +19639,7 @@ var require_lib = __commonJS({ * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { const headerValue = lowercaseKeys2(this.requestOptions.headers)[Headers.ContentType]; @@ -19417,7 +19666,7 @@ var require_lib = __commonJS({ if (clientHeader !== void 0) { return clientHeader; } - return _default2; + return _default; } _getAgent(parsedUrl) { let agent; @@ -19500,12 +19749,12 @@ var require_lib = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve13) => setTimeout(() => resolve13(), ms)); + return new Promise((resolve14) => setTimeout(() => resolve14(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve14, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -19513,7 +19762,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve13(response); + resolve14(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -19552,7 +19801,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve13(response); + resolve14(response); } })); }); @@ -19569,11 +19818,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19589,7 +19838,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19673,11 +19922,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19693,7 +19942,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19727,7 +19976,7 @@ var require_oidc_utils = __commonJS({ } static getCall(id_token_url) { return __awaiter2(this, void 0, void 0, function* () { - var _a; + var _a2; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -19736,7 +19985,7 @@ var require_oidc_utils = __commonJS({ Error Message: ${error3.message}`); }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } @@ -19771,11 +20020,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19791,7 +20040,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19824,7 +20073,7 @@ var require_summary = __commonJS({ } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.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; @@ -20104,7 +20353,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20112,7 +20361,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path28.sep); + return pth.replace(/[/\\]/g, path29.sep); } } }); @@ -20160,11 +20409,11 @@ var require_io_util = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20180,12 +20429,12 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a; + var _a2; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; exports2.readlink = readlink; @@ -20194,13 +20443,13 @@ var require_io_util = __commonJS({ exports2.isRooted = isRooted; exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; - var fs30 = __importStar2(require("fs")); - var path28 = __importStar2(require("path")); - _a = fs30.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs31 = __importStar2(require("fs")); + var path29 = __importStar2(require("path")); + _a2 = fs31.promises, exports2.chmod = _a2.chmod, exports2.copyFile = _a2.copyFile, exports2.lstat = _a2.lstat, exports2.mkdir = _a2.mkdir, exports2.open = _a2.open, exports2.readdir = _a2.readdir, exports2.rename = _a2.rename, exports2.rm = _a2.rm, exports2.rmdir = _a2.rmdir, exports2.stat = _a2.stat, exports2.symlink = _a2.symlink, exports2.unlink = _a2.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { return __awaiter2(this, void 0, void 0, function* () { - const result = yield fs30.promises.readlink(fsPath); + const result = yield fs31.promises.readlink(fsPath); if (exports2.IS_WINDOWS && !result.endsWith("\\")) { return `${result}\\`; } @@ -20208,7 +20457,7 @@ var require_io_util = __commonJS({ }); } exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs30.constants.O_RDONLY; + exports2.READONLY = fs31.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -20250,7 +20499,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path28.extname(filePath).toUpperCase(); + const upperExt = path29.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20274,11 +20523,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path28.dirname(filePath); - const upperName = path28.basename(filePath).toUpperCase(); + const directory = path29.dirname(filePath); + const upperName = path29.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path28.join(directory, actualName); + filePath = path29.join(directory, actualName); break; } } @@ -20308,8 +20557,8 @@ var require_io_util = __commonJS({ return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + var _a3; + return (_a3 = process.env["COMSPEC"]) !== null && _a3 !== void 0 ? _a3 : `cmd.exe`; } } }); @@ -20357,11 +20606,11 @@ var require_io = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20377,7 +20626,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20390,7 +20639,7 @@ var require_io = __commonJS({ exports2.which = which9; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source_1, dest_1) { return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { @@ -20399,7 +20648,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path28.join(dest, path28.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path29.join(dest, path29.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20411,7 +20660,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path28.relative(source, newDest) === "") { + if (path29.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20423,7 +20672,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path28.join(dest, path28.basename(source)); + dest = path29.join(dest, path29.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20434,7 +20683,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path28.dirname(dest)); + yield mkdirP(path29.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20493,7 +20742,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path28.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path29.delimiter)) { if (extension) { extensions.push(extension); } @@ -20506,12 +20755,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path28.sep)) { + if (tool.includes(path29.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path28.delimiter)) { + for (const p of process.env.PATH.split(path29.delimiter)) { if (p) { directories.push(p); } @@ -20519,7 +20768,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path28.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path29.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20618,11 +20867,11 @@ var require_toolrunner = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20638,7 +20887,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20649,7 +20898,7 @@ var require_toolrunner = __commonJS({ var os7 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var io9 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20736,8 +20985,8 @@ var require_toolrunner = __commonJS({ } return this.args; } - _endsWith(str2, end) { - return str2.endsWith(end); + _endsWith(str, end) { + return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); @@ -20864,10 +21113,10 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path28.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path29.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io9.which(this.toolPath, true); - return new Promise((resolve13, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve14, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -20950,7 +21199,7 @@ var require_toolrunner = __commonJS({ if (error3) { reject(error3); } else { - resolve13(exitCode); + resolve14(exitCode); } }); if (this.options.input) { @@ -21116,11 +21365,11 @@ var require_exec = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21136,7 +21385,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21160,12 +21409,12 @@ var require_exec = __commonJS({ } function getExecOutput(commandLine, args, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a, _b; + var _a2, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdoutListener = (_a2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a2 === void 0 ? void 0 : _a2.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = (data) => { stderr += stderrDecoder.write(data); @@ -21236,11 +21485,11 @@ var require_platform = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21256,7 +21505,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21282,11 +21531,11 @@ var require_platform = __commonJS({ }; }); var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; + var _a2, _b, _c, _d; const { stdout } = yield exec3.getExecOutput("sw_vers", void 0, { silent: true }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const version = (_b = (_a2 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a2 === void 0 ? void 0 : _a2[1]) !== null && _b !== void 0 ? _b : ""; const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; return { name, @@ -21365,11 +21614,11 @@ var require_core = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21385,14 +21634,14 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; - exports2.exportVariable = exportVariable15; + exports2.exportVariable = exportVariable16; exports2.setSecret = setSecret2; exports2.addPath = addPath2; exports2.getInput = getInput2; @@ -21417,14 +21666,14 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os7 = __importStar2(require("os")); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable15(name, val) { + function exportVariable16(name, val) { const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; @@ -21443,7 +21692,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path28.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path29.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21574,14 +21823,14 @@ var require_context = __commonJS({ * Hydrate the context from the environment */ constructor() { - var _a, _b, _c; + var _a2, _b, _c; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path28 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path28} does not exist${os_1.EOL}`); + const path29 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path29} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -21594,7 +21843,7 @@ var require_context = __commonJS({ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.apiUrl = (_a2 = process.env.GITHUB_API_URL) !== null && _a2 !== void 0 ? _a2 : `https://api.github.com`; this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; } @@ -21663,11 +21912,11 @@ var require_utils3 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21683,7 +21932,7 @@ var require_utils3 = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21811,13 +22060,13 @@ function removeHook(state, name, method) { if (!state.registry[name]) { return; } - const index = state.registry[name].map((registered) => { + const index2 = state.registry[name].map((registered) => { return registered.orig; }).indexOf(method); - if (index === -1) { + if (index2 === -1) { return; } - state.registry[name].splice(index, 1); + state.registry[name].splice(index2, 1); } var init_remove = __esm({ "node_modules/before-after-hook/lib/remove.js"() { @@ -21882,12 +22131,12 @@ var init_universal_user_agent2 = __esm({ }); // node_modules/@octokit/endpoint/dist-bundle/index.js -function lowercaseKeys(object) { - if (!object) { +function lowercaseKeys(object2) { + if (!object2) { return {}; } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; + return Object.keys(object2).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object2[key]; return newObj; }, {}); } @@ -21899,12 +22148,12 @@ function isPlainObject(value) { const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); +function mergeDeep(defaults3, options) { + const result = Object.assign({}, defaults3); Object.keys(options).forEach((key) => { if (isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { [key]: options[key] }); - else result[key] = mergeDeep(defaults[key], options[key]); + if (!(key in defaults3)) Object.assign(result, { [key]: options[key] }); + else result[key] = mergeDeep(defaults3[key], options[key]); } else { Object.assign(result, { [key]: options[key] }); } @@ -21919,7 +22168,7 @@ function removeUndefinedProperties(obj) { } return obj; } -function merge(defaults, route, options) { +function merge(defaults3, route, options) { if (typeof route === "string") { let [method, url2] = route.split(" "); options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); @@ -21929,10 +22178,10 @@ function merge(defaults, route, options) { options.headers = lowercaseKeys(options.headers); removeUndefinedProperties(options); removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); + const mergedOptions = mergeDeep(defaults3 || {}, options); if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + if (defaults3 && defaults3.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter( (preview) => !mergedOptions.mediaType.previews.includes(preview) ).concat(mergedOptions.mediaType.previews); } @@ -21963,25 +22212,25 @@ function extractUrlVariableNames(url2) { } return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } -function omit(object, keysToOmit) { +function omit(object2, keysToOmit) { const result = { __proto__: null }; - for (const key of Object.keys(object)) { + for (const key of Object.keys(object2)) { if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; + result[key] = object2[key]; } } return result; } -function encodeReserved(str2) { - return str2.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } return part; }).join(""); } -function encodeUnreserved(str2) { - return encodeURIComponent(str2).replace(/[!'()*]/g, function(c) { +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } @@ -22002,7 +22251,7 @@ function isKeyOperator(operator) { function getValues(context5, operator, key, modifier) { var value = context5[key], result = []; if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { value = value.toString(); if (modifier && modifier !== "*") { value = value.substring(0, parseInt(modifier, 10)); @@ -22165,8 +22414,8 @@ function parse(options) { options.request ? { request: options.request } : null ); } -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); +function endpointWithDefaults(defaults3, route, options) { + return parse(merge(defaults3, route, options)); } function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge(oldDefaults, newDefaults); @@ -22215,99 +22464,474 @@ var init_universal_user_agent3 = __esm({ } }); -// node_modules/fast-content-type-parse/index.js -var require_fast_content_type_parse = __commonJS({ - "node_modules/fast-content-type-parse/index.js"(exports2, module2) { +// node_modules/content-type/dist/index.js +var require_dist = __commonJS({ + "node_modules/content-type/dist/index.js"(exports2) { "use strict"; - var NullObject = function NullObject2() { - }; - NullObject.prototype = /* @__PURE__ */ Object.create(null); - var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu; - var quotedPairRE = /\\([\v\u0020-\u00ff])/gu; - var mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u; - var defaultContentType = { type: "", parameters: new NullObject() }; - Object.freeze(defaultContentType.parameters); - Object.freeze(defaultContentType); - function parse2(header) { - if (typeof header !== "string") { - throw new TypeError("argument header is required and must be a string"); - } - let index = header.indexOf(";"); - const type2 = index !== -1 ? header.slice(0, index).trim() : header.trim(); - if (mediaTypeRE.test(type2) === false) { - throw new TypeError("invalid media type"); - } - const result = { - type: type2.toLowerCase(), - parameters: new NullObject() - }; - if (index === -1) { - return result; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.format = format; + exports2.parse = parse3; + var TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/; + var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; + var QUOTE_REGEXP = /[\\"]/g; + var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; + var NullObject = /* @__PURE__ */ (() => { + const C = function() { + }; + C.prototype = /* @__PURE__ */ Object.create(null); + return C; + })(); + function format(obj) { + const { type, parameters } = obj; + if (!type || !TYPE_REGEXP.test(type)) { + throw new TypeError(`Invalid type: ${type}`); } - let key; - let match; - let value; - paramRE.lastIndex = index; - while (match = paramRE.exec(header)) { - if (match.index !== index) { - throw new TypeError("invalid parameter format"); + let result = type; + if (parameters) { + for (const param of Object.keys(parameters)) { + if (!TOKEN_REGEXP.test(param)) { + throw new TypeError(`Invalid parameter name: ${param}`); + } + result += `; ${param}=${qstring(parameters[param])}`; } - index += match[0].length; - key = match[1].toLowerCase(); - value = match[2]; - if (value[0] === '"') { - value = value.slice(1, value.length - 1); - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + } + return result; + } + function parse3(header, options) { + const len = header.length; + let index2 = skipOWS(header, 0, len); + const valueStart = index2; + index2 = skipValue(header, index2, len); + const valueEnd = trailingOWS(header, valueStart, index2); + const type = header.slice(valueStart, valueEnd).toLowerCase(); + const parameters = options?.parameters === false ? new NullObject() : parseParameters(header, index2, len); + return { type, parameters }; + } + var SP = 32; + var HTAB = 9; + var SEMI = 59; + var EQ = 61; + var DQUOTE = 34; + var BSLASH = 92; + function parseParameters(header, index2, len) { + const parameters = new NullObject(); + parameter: while (index2 < len) { + index2 = skipOWS(header, index2 + 1, len); + const keyStart = index2; + while (index2 < len) { + const code = header.charCodeAt(index2); + if (code === SEMI) + continue parameter; + if (code === EQ) { + const keyEnd = trailingOWS(header, keyStart, index2); + const key = header.slice(keyStart, keyEnd).toLowerCase(); + index2 = skipOWS(header, index2 + 1, len); + if (index2 < len && header.charCodeAt(index2) === DQUOTE) { + index2++; + let value = ""; + while (index2 < len) { + const code2 = header.charCodeAt(index2++); + if (code2 === DQUOTE) { + index2 = skipValue(header, index2, len); + if (parameters[key] === void 0) + parameters[key] = value; + break; + } + if (code2 === BSLASH && index2 < len) { + value += header[index2++]; + continue; + } + value += String.fromCharCode(code2); + } + continue parameter; + } + const valueStart = index2; + index2 = skipValue(header, index2, len); + if (parameters[key] === void 0) { + const valueEnd = trailingOWS(header, valueStart, index2); + parameters[key] = header.slice(valueStart, valueEnd); + } + continue parameter; + } + index2++; } - result.parameters[key] = value; } - if (index !== header.length) { - throw new TypeError("invalid parameter format"); + return parameters; + } + function skipValue(str, index2, len) { + while (index2 < len) { + const char = str.charCodeAt(index2); + if (char === SEMI) + break; + index2++; } - return result; + return index2; } - function safeParse2(header) { - if (typeof header !== "string") { - return defaultContentType; + function skipOWS(header, index2, len) { + while (index2 < len) { + const char = header.charCodeAt(index2); + if (char !== SP && char !== HTAB) + break; + index2++; } - let index = header.indexOf(";"); - const type2 = index !== -1 ? header.slice(0, index).trim() : header.trim(); - if (mediaTypeRE.test(type2) === false) { - return defaultContentType; + return index2; + } + function trailingOWS(header, start, end) { + while (end > start) { + const char = header.charCodeAt(end - 1); + if (char !== SP && char !== HTAB) + break; + end--; } - const result = { - type: type2.toLowerCase(), - parameters: new NullObject() + return end; + } + function qstring(str) { + if (TOKEN_REGEXP.test(str)) + return str; + if (TEXT_REGEXP.test(str)) + return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`; + throw new TypeError(`Invalid parameter value: ${str}`); + } + } +}); + +// node_modules/json-with-bigint/json-with-bigint.js +var intRegex, noiseValue, originalStringify, originalParse, customFormat, bigIntsStringify, noiseStringify, isUnstringifiable, isRawJSON, stringifyIteratively, JSONStringify, featureCache, isContextSourceSupported, convertMarkedBigIntsReviver, JSONParseV2, MAX_INT, MAX_DIGITS, stringsOrLargeNumbers, noiseValueWithQuotes, applyReviverIteratively, serializeBigInts, JSONParse; +var init_json_with_bigint = __esm({ + "node_modules/json-with-bigint/json-with-bigint.js"() { + intRegex = /^-?\d+$/; + noiseValue = /^-?\d+n+$/; + originalStringify = JSON.stringify; + originalParse = JSON.parse; + customFormat = /^-?\d+n$/; + bigIntsStringify = /([\[:])?"(-?\d+)n"($|\s*[,\}\]])/g; + noiseStringify = /([\[:])?("-?\d+n+)n("$|"\s*[,\}\]])/g; + isUnstringifiable = (val) => val === void 0 || typeof val === "function" || typeof val === "symbol"; + isRawJSON = (val) => val !== null && typeof val === "object" && val.constructor && val.constructor.name === "RawJSON"; + stringifyIteratively = (rootValue, replacer, spaceParam) => { + let space2 = ""; + if (typeof spaceParam === "number") { + space2 = " ".repeat(Math.min(10, Math.max(0, Math.floor(spaceParam)))); + } else if (typeof spaceParam === "string") { + space2 = spaceParam.slice(0, 10); + } + const isFunctionReplacer = typeof replacer === "function"; + const propertyList = Array.isArray(replacer) ? new Set(replacer.map(String)) : null; + const prepareVal = (parent, key, val) => { + const isObject2 = val !== null && typeof val === "object"; + const hasToJSON = isObject2 && typeof val.toJSON === "function"; + if (hasToJSON) { + val = val.toJSON(key); + } + const isNoise = typeof val === "string" && noiseValue.test(val); + if (isNoise) return val + "n"; + const isBigInt = typeof val === "bigint"; + if (isBigInt) { + const supportsRawJSON = "rawJSON" in JSON; + if (supportsRawJSON) return JSON.rawJSON(val.toString()); + return val.toString() + "n"; + } + if (isFunctionReplacer) { + val = replacer.call(parent, key, val); + } + const isPostReplacerObject = val !== null && typeof val === "object"; + if (isPostReplacerObject) { + const isPrimitiveWrapper = val instanceof Number || val instanceof String || val instanceof Boolean; + if (isPrimitiveWrapper) { + val = val.valueOf(); + } + } + return val; }; - if (index === -1) { - return result; + const rootProcessed = prepareVal({ "": rootValue }, "", rootValue); + if (isUnstringifiable(rootProcessed)) { + return void 0; } - let key; - let match; - let value; - paramRE.lastIndex = index; - while (match = paramRE.exec(header)) { - if (match.index !== index) { - return defaultContentType; + const isRootPrimitive = rootProcessed === null || typeof rootProcessed !== "object"; + const isRootNativeRawJSON = isRawJSON(rootProcessed); + if (isRootPrimitive || isRootNativeRawJSON) { + return originalStringify(rootProcessed); + } + const chunks = []; + let level = 0; + const stack = [ + { + parent: { "": rootProcessed }, + key: "", + val: rootProcessed, + isArray: Array.isArray(rootProcessed), + keys: Array.isArray(rootProcessed) ? null : Object.keys(rootProcessed), + index: 0, + first: true + } + ]; + const visited = new WeakSet([rootProcessed]); + while (stack.length > 0) { + const node = stack[stack.length - 1]; + if (node.index === 0) { + chunks.push(node.isArray ? "[" : "{"); + level++; + } + let isDone = false; + if (node.isArray) { + if (node.index < node.val.length) { + if (!node.first) chunks.push(","); + if (space2) chunks.push("\n" + space2.repeat(level)); + const childRaw = node.val[node.index]; + const childVal = prepareVal(node.val, String(node.index), childRaw); + if (isUnstringifiable(childVal)) { + chunks.push("null"); + node.first = false; + node.index++; + } else { + const isComplexObject = childVal !== null && typeof childVal === "object"; + const isNativeRaw = isRawJSON(childVal); + if (isComplexObject && !isNativeRaw) { + if (visited.has(childVal)) { + throw new TypeError("Converting circular structure to JSON"); + } + visited.add(childVal); + stack.push({ + parent: node.val, + key: String(node.index), + val: childVal, + isArray: Array.isArray(childVal), + keys: Array.isArray(childVal) ? null : Object.keys(childVal), + index: 0, + first: true + }); + node.first = false; + node.index++; + } else { + chunks.push(originalStringify(childVal)); + node.first = false; + node.index++; + } + } + } else { + isDone = true; + } + } else { + while (node.index < node.keys.length) { + const k = node.keys[node.index++]; + const isFilteredOutByArray = propertyList && !propertyList.has(k); + if (isFilteredOutByArray) continue; + const childRaw = node.val[k]; + const childVal = prepareVal(node.val, k, childRaw); + if (isUnstringifiable(childVal)) continue; + if (!node.first) chunks.push(","); + if (space2) { + chunks.push("\n" + space2.repeat(level) + originalStringify(k) + ": "); + } else { + chunks.push(originalStringify(k) + ":"); + } + const isComplexObject = childVal !== null && typeof childVal === "object"; + const isNativeRaw = isRawJSON(childVal); + if (isComplexObject && !isNativeRaw) { + if (visited.has(childVal)) { + throw new TypeError("Converting circular structure to JSON"); + } + visited.add(childVal); + stack.push({ + parent: node.val, + key: k, + val: childVal, + isArray: Array.isArray(childVal), + keys: Array.isArray(childVal) ? null : Object.keys(childVal), + index: 0, + first: true + }); + node.first = false; + break; + } else { + chunks.push(originalStringify(childVal)); + node.first = false; + } + } + const isNodeFullyProcessed = node.index >= node.keys.length && stack[stack.length - 1] === node; + if (isNodeFullyProcessed) { + isDone = true; + } } - index += match[0].length; - key = match[1].toLowerCase(); - value = match[2]; - if (value[0] === '"') { - value = value.slice(1, value.length - 1); - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + if (isDone) { + level--; + if (!node.first && space2) chunks.push("\n" + space2.repeat(level)); + chunks.push(node.isArray ? "]" : "}"); + visited.delete(node.val); + stack.pop(); } - result.parameters[key] = value; } - if (index !== header.length) { - return defaultContentType; + return chunks.join(""); + }; + JSONStringify = (value, replacer, space2) => { + try { + const supportsRawJSON = "rawJSON" in JSON; + if (supportsRawJSON) { + return originalStringify( + value, + (key, val) => { + if (typeof val === "bigint") return JSON.rawJSON(val.toString()); + const hasFunctionReplacer = typeof replacer === "function"; + if (hasFunctionReplacer) return replacer(key, val); + const isKeyInArrayReplacer = Array.isArray(replacer) && replacer.includes(key); + if (isKeyInArrayReplacer) return val; + return val; + }, + space2 + ); + } + if (!value) return originalStringify(value, replacer, space2); + const convertedToCustomJSON = originalStringify( + value, + (key, val) => { + const isNoise = typeof val === "string" && noiseValue.test(val); + if (isNoise) return val.toString() + "n"; + if (typeof val === "bigint") return val.toString() + "n"; + const hasFunctionReplacer = typeof replacer === "function"; + if (hasFunctionReplacer) return replacer(key, val); + const isKeyInArrayReplacer = Array.isArray(replacer) && replacer.includes(key); + if (isKeyInArrayReplacer) return val; + return val; + }, + space2 + ); + const processedJSON = convertedToCustomJSON.replace( + bigIntsStringify, + "$1$2$3" + ); + const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3"); + return denoisedJSON; + } catch (error3) { + if (error3 instanceof RangeError) { + const convertedJSON = stringifyIteratively(value, replacer, space2); + if (convertedJSON === void 0) return void 0; + const supportsRawJSON = "rawJSON" in JSON; + if (supportsRawJSON) return convertedJSON; + const processedJSON = convertedJSON.replace(bigIntsStringify, "$1$2$3"); + return processedJSON.replace(noiseStringify, "$1$2$3"); + } + throw error3; } - return result; - } - module2.exports.default = { parse: parse2, safeParse: safeParse2 }; - module2.exports.parse = parse2; - module2.exports.safeParse = safeParse2; - module2.exports.defaultContentType = defaultContentType; + }; + featureCache = /* @__PURE__ */ new Map(); + isContextSourceSupported = () => { + const parseFingerprint = JSON.parse.toString(); + if (featureCache.has(parseFingerprint)) { + return featureCache.get(parseFingerprint); + } + try { + const result = JSON.parse( + "1", + (_2, __, context5) => !!context5?.source && context5.source === "1" + ); + featureCache.set(parseFingerprint, result); + return result; + } catch { + featureCache.set(parseFingerprint, false); + return false; + } + }; + convertMarkedBigIntsReviver = (key, value, context5, userReviver) => { + const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value); + if (isCustomFormatBigInt) return BigInt(value.slice(0, -1)); + const isNoiseValue = typeof value === "string" && noiseValue.test(value); + if (isNoiseValue) return value.slice(0, -1); + const hasUserReviver = typeof userReviver === "function"; + if (!hasUserReviver) return value; + return userReviver(key, value, context5); + }; + JSONParseV2 = (text, reviver) => { + return JSON.parse(text, (key, value, context5) => { + const isNumber2 = typeof value === "number"; + const isOutOfBounds = value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER; + const isBigNumber = isNumber2 && isOutOfBounds; + const isInt = context5 && intRegex.test(context5.source); + const isBigInt = isBigNumber && isInt; + if (isBigInt) return BigInt(context5.source); + const hasCustomReviver = typeof reviver === "function"; + if (!hasCustomReviver) return value; + return reviver(key, value, context5); + }); + }; + MAX_INT = Number.MAX_SAFE_INTEGER.toString(); + MAX_DIGITS = MAX_INT.length; + stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; + noiseValueWithQuotes = /^"-?\d+n+"$/; + applyReviverIteratively = (parsed, userReviver) => { + const rootHolder = { "": parsed }; + const stack = [{ parent: rootHolder, key: "", visited: false }]; + while (stack.length > 0) { + const node = stack[stack.length - 1]; + if (!node.visited) { + node.visited = true; + const value = node.parent[node.key]; + const isComplexObject = value !== null && typeof value === "object"; + if (isComplexObject) { + const keys = Object.keys(value); + for (let i = keys.length - 1; i >= 0; i--) { + stack.push({ parent: value, key: keys[i], visited: false }); + } + } + } else { + const { parent, key } = node; + let value = parent[key]; + if (typeof value === "string") { + const isCustomFormatBigInt = customFormat.test(value); + if (isCustomFormatBigInt) { + value = BigInt(value.slice(0, -1)); + } else { + const isNoise = noiseValue.test(value); + if (isNoise) value = value.slice(0, -1); + } + } + const hasUserReviver = typeof userReviver === "function"; + if (hasUserReviver) { + value = userReviver.call(parent, key, value); + } + const isDeleted = value === void 0; + if (isDeleted) { + delete parent[key]; + } else { + parent[key] = value; + } + stack.pop(); + } + } + return rootHolder[""]; + }; + serializeBigInts = (text) => { + return text.replace( + stringsOrLargeNumbers, + (match2, digits, fractional, exponential) => { + const isString3 = match2[0] === '"'; + const isNoise = isString3 && noiseValueWithQuotes.test(match2); + if (isNoise) return match2.substring(0, match2.length - 1) + 'n"'; + const hasFractionalOrExponential = fractional || exponential; + const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT); + const isStandardValue = isString3 || hasFractionalOrExponential || isLessThanMaxSafeInt; + if (isStandardValue) return match2; + return '"' + match2 + 'n"'; + } + ); + }; + JSONParse = (text, reviver) => { + if (!text) return originalParse(text, reviver); + try { + if (isContextSourceSupported()) return JSONParseV2(text, reviver); + const serializedData = serializeBigInts(text); + return originalParse( + serializedData, + (key, value, context5) => convertMarkedBigIntsReviver(key, value, context5, reviver) + ); + } catch (error3) { + if (error3 instanceof RangeError) { + const serializedData = serializeBigInts(text); + const parsed = originalParse(serializedData); + return applyReviverIteratively(parsed, reviver); + } + throw error3; + } + }; } }); @@ -22373,7 +22997,7 @@ async function fetchWrapper(requestOptions) { } const log = requestOptions.request?.log || console; const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; + const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body; const requestHeaders = Object.fromEntries( Object.entries(requestOptions.headers).map(([name, value]) => [ name, @@ -22467,16 +23091,19 @@ async function getResponseData(response) { if (!contentType) { return response.text().catch(noop); } - const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType); + const mimetype = (0, import_content_type.parse)(contentType); if (isJSONResponse(mimetype)) { let text = ""; try { text = await response.text(); - return JSON.parse(text); + return JSONParse(text); } catch (err) { return text; } - } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { + } else if (mimetype.type.startsWith("text/") || // `application/octet-stream` is the canonical "arbitrary binary" type + // (RFC 2046) and must never be decoded as text, even when the response + // carries a (misleading) `charset=utf-8` parameter — see #751. + mimetype.parameters.charset?.toLowerCase() === "utf-8" && mimetype.type !== "application/octet-stream") { return response.text().catch(noop); } else { return response.arrayBuffer().catch( @@ -22495,9 +23122,10 @@ function toErrorMessage(data) { if (data instanceof ArrayBuffer) { return "Unknown error"; } - if ("message" in data) { - const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; - return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + if (typeof data === "object" && data !== null && "message" in data) { + const objectData = data; + const suffix = "documentation_url" in objectData ? ` - ${objectData.documentation_url}` : ""; + return Array.isArray(objectData.errors) ? `${objectData.message}: ${objectData.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${objectData.message}${suffix}`; } return `Unknown error: ${JSON.stringify(data)}`; } @@ -22524,14 +23152,15 @@ function withDefaults2(oldEndpoint, newDefaults) { defaults: withDefaults2.bind(null, endpoint2) }); } -var import_fast_content_type_parse, VERSION2, defaults_default, noop, request; +var import_content_type, VERSION2, defaults_default, noop, request; var init_dist_bundle2 = __esm({ "node_modules/@octokit/request/dist-bundle/index.js"() { init_dist_bundle(); init_universal_user_agent3(); - import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1); + import_content_type = __toESM(require_dist(), 1); + init_json_with_bigint(); init_dist_src(); - VERSION2 = "10.0.7"; + VERSION2 = "10.0.13"; defaults_default = { headers: { "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent3()}` @@ -22645,6 +23274,9 @@ var init_dist_bundle3 = __esm({ Error.captureStackTrace(this, this.constructor); } } + request; + headers; + response; name = "GraphqlResponseError"; errors; data; @@ -22725,7 +23357,7 @@ var init_dist_bundle4 = __esm({ var VERSION4; var init_version = __esm({ "node_modules/@octokit/core/dist-src/version.js"() { - VERSION4 = "7.0.6"; + VERSION4 = "7.0.7"; } }); @@ -22765,21 +23397,21 @@ var init_dist_src2 = __esm({ userAgentTrail = `octokit-core.js/${VERSION4} ${getUserAgent()}`; Octokit = class { static VERSION = VERSION4; - static defaults(defaults) { + static defaults(defaults3) { const OctokitWithDefaults = class extends this { constructor(...args) { const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); + if (typeof defaults3 === "function") { + super(defaults3(options)); return; } super( Object.assign( {}, - defaults, + defaults3, options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` + options.userAgent && defaults3.userAgent ? { + userAgent: `${options.userAgent} ${defaults3.userAgent}` } : null ) ); @@ -25191,8 +25823,8 @@ function endpointsToMethods(octokit) { } return newMethods; } -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); +function decorate(octokit, scope, methodName, defaults3, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults3); function withDecorations(...args) { let options = requestWithDefaults.endpoint.merge(...args); if (decorations.mapToData) { @@ -25239,14 +25871,14 @@ var init_endpoints_to_methods = __esm({ endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint2] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint2; + const [route, defaults3, decorations] = endpoint2; const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, url: url2 }, - defaults + defaults3 ); if (!endpointMethodsMap.has(scope)) { endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); @@ -25945,13 +26577,13 @@ var require_re = __commonJS({ }; var createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); - const index = R++; - debug6(name, index, value); - t[name] = index; - src[index] = value; - safeSrc[index] = safe; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); - safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + const index2 = R++; + debug6(name, index2, value); + t[name] = index2; + src[index2] = value; + safeSrc[index2] = safe; + re[index2] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index2] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); @@ -26025,13 +26657,13 @@ var require_parse_options = __commonJS({ var require_identifiers = __commonJS({ "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; @@ -26055,6 +26687,18 @@ var require_semver = __commonJS({ var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); + var isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split("."); + if (identifiers.length > prerelease.length) { + return false; + } + for (let i = 0; i < identifiers.length; i++) { + if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { + return false; + } + } + return true; + }; var SemVer = class _SemVer { constructor(version, options) { options = parseOptions(options); @@ -26215,8 +26859,8 @@ var require_semver = __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 match2 = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match2 || match2[1] !== identifier) { throw new Error(`invalid identifier: ${identifier}`); } } @@ -26301,8 +26945,9 @@ var require_semver = __commonJS({ if (identifierBase === false) { prerelease = [identifier]; } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split(".").length]; + if (isNaN(prereleaseBase)) { this.prerelease = prerelease; } } else { @@ -26330,7 +26975,7 @@ var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse2 = (version, options, throwErrors = false) => { + var parse3 = (version, options, throwErrors = false) => { if (version instanceof SemVer) { return version; } @@ -26343,7 +26988,7 @@ var require_parse2 = __commonJS({ throw er; } }; - module2.exports = parse2; + module2.exports = parse3; } }); @@ -26351,9 +26996,9 @@ var require_parse2 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var valid4 = (version, options) => { - const v = parse2(version, options); + const v = parse3(version, options); return v ? v.version : null; }; module2.exports = valid4; @@ -26364,9 +27009,9 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var clean3 = (version, options) => { - const s = parse2(version.trim().replace(/^[=v]+/, ""), options); + const s = parse3(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; module2.exports = clean3; @@ -26401,10 +27046,10 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "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; @@ -26475,9 +27120,9 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var prerelease = (version, options) => { - const parsed = parse2(version, options); + const parsed = parse3(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; module2.exports = prerelease; @@ -26593,8 +27238,8 @@ var require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports2, module2) { "use strict"; var compare3 = require_compare(); - var gte6 = (a, b, loose) => compare3(a, b, loose) >= 0; - module2.exports = gte6; + var gte7 = (a, b, loose) => compare3(a, b, loose) >= 0; + module2.exports = gte7; } }); @@ -26603,8 +27248,8 @@ var require_lte = __commonJS({ "node_modules/semver/functions/lte.js"(exports2, module2) { "use strict"; var compare3 = require_compare(); - var lte = (a, b, loose) => compare3(a, b, loose) <= 0; - module2.exports = lte; + var lte2 = (a, b, loose) => compare3(a, b, loose) <= 0; + module2.exports = lte2; } }); @@ -26615,9 +27260,9 @@ var require_cmp = __commonJS({ var eq = require_eq(); var neq = require_neq(); var gt = require_gt(); - var gte6 = require_gte(); + var gte7 = require_gte(); var lt2 = require_lt(); - var lte = require_lte(); + var lte2 = require_lte(); var cmp = (a, op, b, loose) => { switch (op) { case "===": @@ -26645,11 +27290,11 @@ var require_cmp = __commonJS({ case ">": return gt(a, b, loose); case ">=": - return gte6(a, b, loose); + return gte7(a, b, loose); case "<": return lt2(a, b, loose); case "<=": - return lte(a, b, loose); + return lte2(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } @@ -26663,7 +27308,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse2 = require_parse2(); + var parse3 = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -26676,29 +27321,29 @@ var require_coerce = __commonJS({ return null; } options = options || {}; - let match = null; + let match2 = null; if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + match2 = version.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(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + while ((next = coerceRtlRegex.exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) { + if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) { + match2 = next; } coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } coerceRtlRegex.lastIndex = -1; } - if (match === null) { + if (match2 === 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 = match2[2]; + const minor = match2[3] || "0"; + const patch = match2[4] || "0"; + const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : ""; + const build2 = options.includePrerelease && match2[6] ? `+${match2[6]}` : ""; + return parse3(`${major}.${minor}.${patch}${prerelease}${build2}`, options); }; module2.exports = coerce3; } @@ -26708,7 +27353,7 @@ var require_coerce = __commonJS({ var require_truncate = __commonJS({ "node_modules/semver/functions/truncate.js"(exports2, module2) { "use strict"; - var parse2 = require_parse2(); + var parse3 = require_parse2(); var constants = require_constants6(); var SemVer = require_semver(); var truncate = (version, truncation, options) => { @@ -26720,7 +27365,7 @@ var require_truncate = __commonJS({ }; var cloneInputVersion = (version, options) => { const versionStringToParse = version instanceof SemVer ? version.version : version; - return parse2(versionStringToParse, options); + return parse3(versionStringToParse, options); }; var doTruncation = (version, truncation) => { if (isPrerelease(truncation)) { @@ -26738,8 +27383,8 @@ var require_truncate = __commonJS({ } return version.format(); }; - var isPrerelease = (type2) => { - return type2.startsWith("pre"); + var isPrerelease = (type) => { + return type.startsWith("pre"); }; module2.exports = truncate; } @@ -26789,25 +27434,25 @@ var require_range = __commonJS({ "use strict"; var SPACE_CHARACTERS = /\s+/g; var Range2 = 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}`); @@ -26852,25 +27497,25 @@ var require_range = __commonJS({ toString() { return this.range; } - parseRange(range) { - range = range.replace(BUILDSTRIPRE, ""); + parseRange(range2) { + range2 = range2.replace(BUILDSTRIPRE, ""); 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)); - debug6("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug6("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - debug6("tilde trim", range); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - debug6("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)); + debug6("hyphen replace", range2); + range2 = range2.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug6("comparator trim", range2); + range2 = range2.replace(re[t.TILDETRIM], tildeTrimReplace); + debug6("tilde trim", range2); + range2 = range2.replace(re[t.CARETTRIM], caretTrimReplace); + debug6("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) => { debug6("loose invalid filter", comp, this.options); @@ -26893,12 +27538,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); @@ -26972,20 +27617,22 @@ var require_range = __commonJS({ return comp; }; var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p); var replaceTildes = (comp, options) => { return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }; var replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_2, M, m, p, pr) => { debug6("tilde", comp, _2, M, m, p, pr); let ret; if (isX(M)) { ret = ""; } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; } else if (isX(p)) { - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; } else if (pr) { debug6("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; @@ -27031,9 +27678,9 @@ var require_range = __commonJS({ debug6("no pr"); if (M === "0") { if (m === "0") { - ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`; } else { - ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; } } else { ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; @@ -27052,6 +27699,9 @@ var require_range = __commonJS({ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug6("xRange", comp, ret, gtlt, M, m, p, pr); + if (invalidXRangeOrder(M, m, p)) { + return comp; + } const xM = isX(M); const xm = xM || isX(m); const xp = xm || isX(p); @@ -27137,20 +27787,20 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }; - var testSet = (set2, version, options) => { - for (let i = 0; i < set2.length; i++) { - if (!set2[i].test(version)) { + var testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set2.length; i++) { - debug6(set2[i].semver); - if (set2[i].semver === Comparator.ANY) { + for (let i = 0; i < set.length; i++) { + debug6(set[i].semver); + if (set[i].semver === Comparator.ANY) { continue; } - if (set2[i].semver.prerelease.length > 0) { - const allowed = set2[i].semver; + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } @@ -27281,13 +27931,13 @@ var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports2, module2) { "use strict"; var Range2 = require_range(); - var satisfies2 = (version, range, options) => { + var satisfies2 = (version, range2, options) => { try { - range = new Range2(range, options); + range2 = new Range2(range2, options); } catch (er) { return false; } - return range.test(version); + return range2.test(version); }; module2.exports = satisfies2; } @@ -27298,7 +27948,7 @@ var require_to_comparators = __commonJS({ "node_modules/semver/ranges/to-comparators.js"(exports2, module2) { "use strict"; var Range2 = require_range(); - var toComparators = (range, options) => new Range2(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + var toComparators = (range2, options) => new Range2(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); module2.exports = toComparators; } }); @@ -27309,12 +27959,12 @@ var require_max_satisfying = __commonJS({ "use strict"; var SemVer = require_semver(); var Range2 = require_range(); - var maxSatisfying = (versions, range, options) => { + var maxSatisfying = (versions, range2, options) => { let max = null; let maxSV = null; let rangeObj = null; try { - rangeObj = new Range2(range, options); + rangeObj = new Range2(range2, options); } catch (er) { return null; } @@ -27338,12 +27988,12 @@ var require_min_satisfying = __commonJS({ "use strict"; var SemVer = require_semver(); var Range2 = require_range(); - var minSatisfying = (versions, range, options) => { + var minSatisfying = (versions, range2, options) => { let min = null; let minSV = null; let rangeObj = null; try { - rangeObj = new Range2(range, options); + rangeObj = new Range2(range2, options); } catch (er) { return null; } @@ -27368,19 +28018,19 @@ var require_min_version = __commonJS({ var SemVer = require_semver(); var Range2 = require_range(); var gt = require_gt(); - var minVersion = (range, loose) => { - range = new Range2(range, loose); + var minVersion = (range2, loose) => { + range2 = new Range2(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); @@ -27411,7 +28061,7 @@ var require_min_version = __commonJS({ minver = setMin; } } - if (minver && range.test(minver)) { + if (minver && range2.test(minver)) { return minver; } return null; @@ -27425,9 +28075,9 @@ var require_valid2 = __commonJS({ "node_modules/semver/ranges/valid.js"(exports2, module2) { "use strict"; var Range2 = require_range(); - var validRange = (range, options) => { + var validRange = (range2, options) => { try { - return new Range2(range, options).range || "*"; + return new Range2(range2, options).range || "*"; } catch (er) { return null; } @@ -27447,23 +28097,23 @@ var require_outside = __commonJS({ var satisfies2 = require_satisfies(); var gt = require_gt(); var lt2 = require_lt(); - var lte = require_lte(); - var gte6 = require_gte(); - var outside = (version, range, hilo, options) => { + var lte2 = require_lte(); + var gte7 = require_gte(); + var outside = (version, range2, hilo, options) => { version = new SemVer(version, options); - range = new Range2(range, options); + range2 = new Range2(range2, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; - ltefn = lte; + ltefn = lte2; ltfn = lt2; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt2; - ltefn = gte6; + ltefn = gte7; ltfn = gt; comp = "<"; ecomp = "<="; @@ -27471,11 +28121,11 @@ var require_outside = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies2(version, range, options)) { + if (satisfies2(version, 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) => { @@ -27510,7 +28160,7 @@ var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports2, module2) { "use strict"; var outside = require_outside(); - var gtr = (version, range, options) => outside(version, range, ">", options); + var gtr = (version, range2, options) => outside(version, range2, ">", options); module2.exports = gtr; } }); @@ -27520,7 +28170,7 @@ var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports2, module2) { "use strict"; var outside = require_outside(); - var ltr = (version, range, options) => outside(version, range, "<", options); + var ltr = (version, range2, options) => outside(version, range2, "<", options); module2.exports = ltr; } }); @@ -27545,13 +28195,13 @@ var require_simplify = __commonJS({ "use strict"; var satisfies2 = require_satisfies(); var compare3 = require_compare(); - module2.exports = (versions, range, options) => { - const set2 = []; + module2.exports = (versions, range2, options) => { + const set = []; let first = null; let prev = null; const v = versions.sort((a, b) => compare3(a, b, options)); for (const version of v) { - const included = satisfies2(version, range, options); + const included = satisfies2(version, range2, options); if (included) { prev = version; if (!first) { @@ -27559,17 +28209,17 @@ var require_simplify = __commonJS({ } } else { if (prev) { - set2.push([first, prev]); + set.push([first, prev]); } prev = null; first = null; } } if (first) { - set2.push([first, null]); + set.push([first, null]); } const ranges = []; - for (const [min, max] of set2) { + for (const [min, max] of set) { if (min === max) { ranges.push(min); } else if (!max && min === v[0]) { @@ -27583,8 +28233,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; }; } }); @@ -27759,7 +28409,7 @@ var require_semver2 = __commonJS({ var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse2 = require_parse2(); + var parse3 = require_parse2(); var valid4 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -27778,8 +28428,8 @@ var require_semver2 = __commonJS({ var lt2 = require_lt(); var eq = require_eq(); var neq = require_neq(); - var gte6 = require_gte(); - var lte = require_lte(); + var gte7 = require_gte(); + var lte2 = require_lte(); var cmp = require_cmp(); var coerce3 = require_coerce(); var truncate = require_truncate(); @@ -27798,7 +28448,7 @@ var require_semver2 = __commonJS({ var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { - parse: parse2, + parse: parse3, valid: valid4, clean: clean3, inc, @@ -27817,8 +28467,8 @@ var require_semver2 = __commonJS({ lt: lt2, eq, neq, - gte: gte6, - lte, + gte: gte7, + lte: lte2, cmp, coerce: coerce3, truncate, @@ -27859,19 +28509,19 @@ var require_light = __commonJS({ function getCjsExportFromNamespace(n) { return n && n["default"] || n; } - var load2 = function(received, defaults, onto = {}) { + var load2 = function(received, defaults3, onto = {}) { var k, ref, v; - for (k in defaults) { - v = defaults[k]; + for (k in defaults3) { + v = defaults3[k]; onto[k] = (ref = received[k]) != null ? ref : v; } return onto; }; - var overwrite = function(received, defaults, onto = {}) { + var overwrite = function(received, defaults3, onto = {}) { var k, v; for (k in received) { v = received[k]; - if (defaults[k] !== void 0) { + if (defaults3[k] !== void 0) { onto[k] = v; } } @@ -28301,8 +28951,8 @@ var require_light = __commonJS({ return this.Promise.resolve(); } yieldLoop(t = 0) { - return new this.Promise(function(resolve13, reject) { - return setTimeout(resolve13, t); + return new this.Promise(function(resolve14, reject) { + return setTimeout(resolve14, t); }); } computePenalty() { @@ -28373,7 +29023,7 @@ var require_light = __commonJS({ now = Date.now(); return this.check(weight, now); } - async __register__(index, weight, expiration) { + async __register__(index2, weight, expiration) { var now, wait; await this.yieldLoop(); now = Date.now(); @@ -28418,7 +29068,7 @@ var require_light = __commonJS({ strategy: this.storeOptions.strategy }; } - async __free__(index, weight) { + async __free__(index2, weight) { await this.yieldLoop(); this._running -= weight; this._done += weight; @@ -28513,15 +29163,15 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error3, reject, resolve13, returned, task; + var args, cb, error3, reject, resolve14, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; - ({ task, args, resolve: resolve13, reject } = this._queue.shift()); + ({ task, args, resolve: resolve14, reject } = this._queue.shift()); cb = await (async function() { try { returned = await task(...args); return function() { - return resolve13(returned); + return resolve14(returned); }; } catch (error1) { error3 = error1; @@ -28536,13 +29186,13 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise, reject, resolve13; - resolve13 = reject = null; + var promise, reject, resolve14; + resolve14 = reject = null; promise = new this.Promise(function(_resolve, _reject) { - resolve13 = _resolve; + resolve14 = _resolve; return reject = _reject; }); - this._queue.push({ task, args, resolve: resolve13, reject }); + this._queue.push({ task, args, resolve: resolve14, reject }); this._tryToRun(); return promise; } @@ -28844,19 +29494,19 @@ var require_light = __commonJS({ check(weight = 1) { return this._store.__check__(weight); } - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; + _clearGlobalState(index2) { + if (this._scheduled[index2] != null) { + clearTimeout(this._scheduled[index2].expiration); + delete this._scheduled[index2]; return true; } else { return false; } } - async _free(index, job, options, eventInfo) { + async _free(index2, job, options, eventInfo) { var e, running; try { - ({ running } = await this._store.__free__(index, options.weight)); + ({ running } = await this._store.__free__(index2, options.weight)); this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); if (running === 0 && this.empty()) { return this.Events.trigger("idle"); @@ -28866,13 +29516,13 @@ var require_light = __commonJS({ return this.Events.trigger("error", e); } } - _run(index, job, wait) { + _run(index2, job, wait) { var clearGlobalState, free, run9; job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run9 = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { + clearGlobalState = this._clearGlobalState.bind(this, index2); + run9 = this._run.bind(this, index2, job); + free = this._free.bind(this, index2, job); + return this._scheduled[index2] = { timeout: setTimeout(() => { return job.doExecute(this._limiter, clearGlobalState, run9, free); }, wait), @@ -28884,22 +29534,22 @@ var require_light = __commonJS({ } _drainOne(capacity) { return this._registerLock.schedule(() => { - var args, index, next, options, queue; + var args, index2, next, options, queue2; if (this.queued() === 0) { return this.Promise.resolve(null); } - queue = this._queues.getFirst(); - ({ options, args } = next = queue.first()); + queue2 = this._queues.getFirst(); + ({ options, args } = next = queue2.first()); if (capacity != null && options.weight > capacity) { return this.Promise.resolve(null); } this.Events.trigger("debug", `Draining ${options.id}`, { args, options }); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => { + index2 = this._randomIndex(); + return this._store.__register__(index2, options.weight, options.expiration).then(({ success, wait, reservoir }) => { var empty; this.Events.trigger("debug", `Drained ${options.id}`, { success, args, options }); if (success) { - queue.shift(); + queue2.shift(); empty = this.empty(); if (empty) { this.Events.trigger("empty"); @@ -28907,7 +29557,7 @@ var require_light = __commonJS({ if (reservoir === 0) { this.Events.trigger("depleted", empty); } - this._run(index, next, wait); + this._run(index2, next, wait); return this.Promise.resolve(options.weight); } else { return this.Promise.resolve(null); @@ -28943,20 +29593,20 @@ var require_light = __commonJS({ counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; - return new this.Promise((resolve13, reject) => { + return new this.Promise((resolve14, reject) => { if (finished()) { - return resolve13(); + return resolve14(); } else { return this.on("done", () => { if (finished()) { this.removeAllListeners("done"); - return resolve13(); + return resolve14(); } }); } }); }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { + done = options.dropWaitingJobs ? (this._run = function(index2, next) { return next.doDrop({ message: options.dropErrorMessage }); @@ -29043,9 +29693,9 @@ var require_light = __commonJS({ options = parser$5.load(options, this.jobDefaults); } task = (...args2) => { - return new this.Promise(function(resolve13, reject) { + return new this.Promise(function(resolve14, reject) { return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve13)(args3); + return (args3[0] != null ? reject : resolve14)(args3); }); }); }; @@ -29171,21 +29821,21 @@ var require_light = __commonJS({ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path28, name, argument) { - if (Array.isArray(path28)) { - this.path = path28; - this.property = path28.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema, path29, name, argument) { + if (Array.isArray(path29)) { + this.path = path29; + this.property = path29.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path28 !== void 0) { - this.property = path28; + } else if (path29 !== void 0) { + this.property = path29; } if (message) { this.message = message; } - if (schema2) { - var id = schema2.$id || schema2.id; - this.schema = id || schema2; + if (schema) { + var id = schema.$id || schema.id; + this.schema = id || schema; } if (instance !== void 0) { this.instance = instance; @@ -29194,12 +29844,12 @@ var require_helpers = __commonJS({ this.argument = argument; this.stack = this.toString(); }; - ValidationError.prototype.toString = function toString3() { + ValidationError.prototype.toString = function toString2() { return this.property + " " + this.message; }; - var ValidatorResult = exports2.ValidatorResult = function ValidatorResult2(instance, schema2, options, ctx) { + var ValidatorResult = exports2.ValidatorResult = function ValidatorResult2(instance, schema, options, ctx) { this.instance = instance; - this.schema = schema2; + this.schema = schema; this.options = options; this.path = ctx.path; this.propertyPath = ctx.propertyPath; @@ -29237,7 +29887,7 @@ var require_helpers = __commonJS({ function stringizer(v, i) { return i + ": " + v.toString() + "\n"; } - ValidatorResult.prototype.toString = function toString3(res) { + ValidatorResult.prototype.toString = function toString2(res) { return this.errors.map(stringizer).join(""); }; Object.defineProperty(ValidatorResult.prototype, "valid", { get: function() { @@ -29256,9 +29906,9 @@ var require_helpers = __commonJS({ ValidatorResultError.prototype = new Error(); ValidatorResultError.prototype.constructor = ValidatorResultError; ValidatorResultError.prototype.name = "Validation Error"; - var SchemaError = exports2.SchemaError = function SchemaError2(msg, schema2) { + var SchemaError = exports2.SchemaError = function SchemaError2(msg, schema) { this.message = msg; - this.schema = schema2; + this.schema = schema; Error.call(this, msg); if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, SchemaError2); @@ -29271,30 +29921,30 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path28, base, schemas) { - this.schema = schema2; + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema, options, path29, base, schemas) { + this.schema = schema; this.options = options; - if (Array.isArray(path28)) { - this.path = path28; - this.propertyPath = path28.reduce(function(sum, item) { + if (Array.isArray(path29)) { + this.path = path29; + this.propertyPath = path29.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path28; + this.propertyPath = path29; } this.base = base; this.schemas = schemas; }; - SchemaContext.prototype.resolve = function resolve13(target) { + SchemaContext.prototype.resolve = function resolve14(target) { return (() => resolveUrl(this.base, target))(); }; - SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path28 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); - var id = schema2.$id || schema2.id; + SchemaContext.prototype.makeChild = function makeChild(schema, propertyName) { + var path29 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var id = schema.$id || schema.id; let base = (() => resolveUrl(this.base, id || ""))(); - var ctx = new SchemaContext(schema2, this.options, path28, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema, this.options, path29, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { - ctx.schemas[base] = schema2; + ctx.schemas[base] = schema; } return ctx; }; @@ -29431,9 +30081,9 @@ var require_helpers = __commonJS({ } } function deepMerge(target, src) { - var array = Array.isArray(src); - var dst = array && [] || {}; - if (array) { + var array2 = Array.isArray(src); + var dst = array2 && [] || {}; + if (array2) { target = target || []; dst = dst.concat(target); src.forEach(deepMerger.bind(null, target, dst)); @@ -29462,13 +30112,13 @@ var require_helpers = __commonJS({ exports2.encodePath = function encodePointer(a) { return a.map(pathEncoder).join(""); }; - exports2.getDecimalPlaces = function getDecimalPlaces(number) { + exports2.getDecimalPlaces = function getDecimalPlaces(number2) { var decimalPlaces = 0; - if (isNaN(number)) return decimalPlaces; - if (typeof number !== "number") { - number = Number(number); + if (isNaN(number2)) return decimalPlaces; + if (typeof number2 !== "number") { + number2 = Number(number2); } - var parts = number.toString().split("e"); + var parts = number2.toString().split("e"); if (parts.length === 2) { if (parts[1][0] !== "-") { return decimalPlaces; @@ -29520,14 +30170,14 @@ var require_attribute = __commonJS({ "extends": true }; var validators = attribute.validators = {}; - validators.type = function validateType(instance, schema2, options, ctx) { + validators.type = function validateType(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - var types = Array.isArray(schema2.type) ? schema2.type : [schema2.type]; - if (!types.some(this.testType.bind(this, instance, schema2, options, ctx))) { - var list = types.map(function(v) { + var result = new ValidatorResult(instance, schema, options, ctx); + var types2 = Array.isArray(schema.type) ? schema.type : [schema.type]; + if (!types2.some(this.testType.bind(this, instance, schema, options, ctx))) { + var list = types2.map(function(v) { if (!v) return; var id = v.$id || v.id; return id ? "<" + id + ">" : v + ""; @@ -29540,12 +30190,12 @@ var require_attribute = __commonJS({ } return result; }; - function testSchemaNoThrow(instance, options, ctx, callback, schema2) { + function testSchemaNoThrow(instance, options, ctx, callback, schema) { var throwError2 = options.throwError; var throwAll = options.throwAll; options.throwError = false; options.throwAll = false; - var res = this.validateSchema(instance, schema2, options, ctx); + var res = this.validateSchema(instance, schema, options, ctx); options.throwError = throwError2; options.throwAll = throwAll; if (!res.valid && callback instanceof Function) { @@ -29553,16 +30203,16 @@ var require_attribute = __commonJS({ } return res.valid; } - validators.anyOf = function validateAnyOf(instance, schema2, options, ctx) { + validators.anyOf = function validateAnyOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - var inner = new ValidatorResult(instance, schema2, options, ctx); - if (!Array.isArray(schema2.anyOf)) { + var result = new ValidatorResult(instance, schema, options, ctx); + var inner = new ValidatorResult(instance, schema, options, ctx); + if (!Array.isArray(schema.anyOf)) { throw new SchemaError("anyOf must be an array"); } - if (!schema2.anyOf.some( + if (!schema.anyOf.some( testSchemaNoThrow.bind( this, instance, @@ -29573,7 +30223,7 @@ var require_attribute = __commonJS({ } ) )) { - var list = schema2.anyOf.map(function(v, i) { + var list = schema.anyOf.map(function(v, i) { var id = v.$id || v.id; if (id) return "<" + id + ">"; return v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i + "]"; @@ -29589,16 +30239,16 @@ var require_attribute = __commonJS({ } return result; }; - validators.allOf = function validateAllOf(instance, schema2, options, ctx) { + validators.allOf = function validateAllOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2.allOf)) { + if (!Array.isArray(schema.allOf)) { throw new SchemaError("allOf must be an array"); } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var self2 = this; - schema2.allOf.forEach(function(v, i) { + schema.allOf.forEach(function(v, i) { var valid4 = self2.validateSchema(instance, v, options, ctx); if (!valid4.valid) { var id = v.$id || v.id; @@ -29613,16 +30263,16 @@ var require_attribute = __commonJS({ }); return result; }; - validators.oneOf = function validateOneOf(instance, schema2, options, ctx) { + validators.oneOf = function validateOneOf(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2.oneOf)) { + if (!Array.isArray(schema.oneOf)) { throw new SchemaError("oneOf must be an array"); } - var result = new ValidatorResult(instance, schema2, options, ctx); - var inner = new ValidatorResult(instance, schema2, options, ctx); - var count = schema2.oneOf.filter( + var result = new ValidatorResult(instance, schema, options, ctx); + var inner = new ValidatorResult(instance, schema, options, ctx); + var count = schema.oneOf.filter( testSchemaNoThrow.bind( this, instance, @@ -29633,7 +30283,7 @@ var require_attribute = __commonJS({ } ) ).length; - var list = schema2.oneOf.map(function(v, i) { + var list = schema.oneOf.map(function(v, i) { var id = v.$id || v.id; return id || v.title && JSON.stringify(v.title) || v["$ref"] && "<" + v["$ref"] + ">" || "[subschema " + i + "]"; }); @@ -29649,36 +30299,36 @@ var require_attribute = __commonJS({ } return result; }; - validators.if = function validateIf(instance, schema2, options, ctx) { + validators.if = function validateIf(instance, schema, options, ctx) { if (instance === void 0) return null; - if (!helpers.isSchema(schema2.if)) throw new Error('Expected "if" keyword to be a schema'); - var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema2.if); - var result = new ValidatorResult(instance, schema2, options, ctx); + if (!helpers.isSchema(schema.if)) throw new Error('Expected "if" keyword to be a schema'); + var ifValid = testSchemaNoThrow.call(this, instance, options, ctx, null, schema.if); + var result = new ValidatorResult(instance, schema, options, ctx); var res; if (ifValid) { - if (schema2.then === void 0) return; - if (!helpers.isSchema(schema2.then)) throw new Error('Expected "then" keyword to be a schema'); - res = this.validateSchema(instance, schema2.then, options, ctx.makeChild(schema2.then)); + if (schema.then === void 0) return; + if (!helpers.isSchema(schema.then)) throw new Error('Expected "then" keyword to be a schema'); + res = this.validateSchema(instance, schema.then, options, ctx.makeChild(schema.then)); result.importErrors(res); } else { - if (schema2.else === void 0) return; - if (!helpers.isSchema(schema2.else)) throw new Error('Expected "else" keyword to be a schema'); - res = this.validateSchema(instance, schema2.else, options, ctx.makeChild(schema2.else)); + if (schema.else === void 0) return; + if (!helpers.isSchema(schema.else)) throw new Error('Expected "else" keyword to be a schema'); + res = this.validateSchema(instance, schema.else, options, ctx.makeChild(schema.else)); result.importErrors(res); } return result; }; - function getEnumerableProperty(object, key) { - if (Object.hasOwnProperty.call(object, key)) return object[key]; - if (!(key in object)) return; - while (object = Object.getPrototypeOf(object)) { - if (Object.propertyIsEnumerable.call(object, key)) return object[key]; + function getEnumerableProperty(object2, key) { + if (Object.hasOwnProperty.call(object2, key)) return object2[key]; + if (!(key in object2)) return; + while (object2 = Object.getPrototypeOf(object2)) { + if (Object.propertyIsEnumerable.call(object2, key)) return object2[key]; } } - validators.propertyNames = function validatePropertyNames(instance, schema2, options, ctx) { + validators.propertyNames = function validatePropertyNames(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var subschema = schema2.propertyNames !== void 0 ? schema2.propertyNames : {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var subschema = schema.propertyNames !== void 0 ? schema.propertyNames : {}; if (!helpers.isSchema(subschema)) throw new SchemaError('Expected "propertyNames" to be a schema (object or boolean)'); for (var property in instance) { if (getEnumerableProperty(instance, property) !== void 0) { @@ -29688,10 +30338,10 @@ var require_attribute = __commonJS({ } return result; }; - validators.properties = function validateProperties(instance, schema2, options, ctx) { + validators.properties = function validateProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var properties = schema2.properties || {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var properties = schema.properties || {}; for (var property in properties) { var subschema = properties[property]; if (subschema === void 0) { @@ -29709,19 +30359,19 @@ var require_attribute = __commonJS({ } return result; }; - function testAdditionalProperty(instance, schema2, options, ctx, property, result) { + function testAdditionalProperty(instance, schema, options, ctx, property, result) { if (!this.types.object(instance)) return; - if (schema2.properties && schema2.properties[property] !== void 0) { + if (schema.properties && schema.properties[property] !== void 0) { return; } - if (schema2.additionalProperties === false) { + if (schema.additionalProperties === false) { result.addError({ name: "additionalProperties", argument: property, message: "is not allowed to have the additional property " + JSON.stringify(property) }); } else { - var additionalProperties = schema2.additionalProperties || {}; + var additionalProperties = schema.additionalProperties || {}; if (typeof options.preValidateProperty == "function") { options.preValidateProperty(instance, property, additionalProperties, options, ctx); } @@ -29730,10 +30380,10 @@ var require_attribute = __commonJS({ result.importErrors(res); } } - validators.patternProperties = function validatePatternProperties(instance, schema2, options, ctx) { + validators.patternProperties = function validatePatternProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var patternProperties = schema2.patternProperties || {}; + var result = new ValidatorResult(instance, schema, options, ctx); + var patternProperties = schema.patternProperties || {}; for (var property in instance) { var test = true; for (var pattern in patternProperties) { @@ -29760,58 +30410,58 @@ var require_attribute = __commonJS({ result.importErrors(res); } if (test) { - testAdditionalProperty.call(this, instance, schema2, options, ctx, property, result); + testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } } return result; }; - validators.additionalProperties = function validateAdditionalProperties(instance, schema2, options, ctx) { + validators.additionalProperties = function validateAdditionalProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - if (schema2.patternProperties) { + if (schema.patternProperties) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); for (var property in instance) { - testAdditionalProperty.call(this, instance, schema2, options, ctx, property, result); + testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } return result; }; - validators.minProperties = function validateMinProperties(instance, schema2, options, ctx) { + validators.minProperties = function validateMinProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); - if (!(keys.length >= schema2.minProperties)) { + if (!(keys.length >= schema.minProperties)) { result.addError({ name: "minProperties", - argument: schema2.minProperties, - message: "does not meet minimum property length of " + schema2.minProperties + argument: schema.minProperties, + message: "does not meet minimum property length of " + schema.minProperties }); } return result; }; - validators.maxProperties = function validateMaxProperties(instance, schema2, options, ctx) { + validators.maxProperties = function validateMaxProperties(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); - if (!(keys.length <= schema2.maxProperties)) { + if (!(keys.length <= schema.maxProperties)) { result.addError({ name: "maxProperties", - argument: schema2.maxProperties, - message: "does not meet maximum property length of " + schema2.maxProperties + argument: schema.maxProperties, + message: "does not meet maximum property length of " + schema.maxProperties }); } return result; }; - validators.items = function validateItems(instance, schema2, options, ctx) { + validators.items = function validateItems(instance, schema, options, ctx) { var self2 = this; if (!this.types.array(instance)) return; - if (schema2.items === void 0) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + if (schema.items === void 0) return; + var result = new ValidatorResult(instance, schema, options, ctx); instance.every(function(value, i) { - if (Array.isArray(schema2.items)) { - var items = schema2.items[i] === void 0 ? schema2.additionalItems : schema2.items[i]; + if (Array.isArray(schema.items)) { + var items = schema.items[i] === void 0 ? schema.additionalItems : schema.items[i]; } else { - var items = schema2.items; + var items = schema.items; } if (items === void 0) { return true; @@ -29830,104 +30480,104 @@ var require_attribute = __commonJS({ }); return result; }; - validators.contains = function validateContains(instance, schema2, options, ctx) { + validators.contains = function validateContains(instance, schema, options, ctx) { var self2 = this; if (!this.types.array(instance)) return; - if (schema2.contains === void 0) return; - if (!helpers.isSchema(schema2.contains)) throw new Error('Expected "contains" keyword to be a schema'); - var result = new ValidatorResult(instance, schema2, options, ctx); + if (schema.contains === void 0) return; + if (!helpers.isSchema(schema.contains)) throw new Error('Expected "contains" keyword to be a schema'); + var result = new ValidatorResult(instance, schema, options, ctx); var count = instance.some(function(value, i) { - var res = self2.validateSchema(value, schema2.contains, options, ctx.makeChild(schema2.contains, i)); + var res = self2.validateSchema(value, schema.contains, options, ctx.makeChild(schema.contains, i)); return res.errors.length === 0; }); if (count === false) { result.addError({ name: "contains", - argument: schema2.contains, + argument: schema.contains, message: "must contain an item matching given schema" }); } return result; }; - validators.minimum = function validateMinimum(instance, schema2, options, ctx) { + validators.minimum = function validateMinimum(instance, schema, options, ctx) { if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (schema2.exclusiveMinimum && schema2.exclusiveMinimum === true) { - if (!(instance > schema2.minimum)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (schema.exclusiveMinimum && schema.exclusiveMinimum === true) { + if (!(instance > schema.minimum)) { result.addError({ name: "minimum", - argument: schema2.minimum, - message: "must be greater than " + schema2.minimum + argument: schema.minimum, + message: "must be greater than " + schema.minimum }); } } else { - if (!(instance >= schema2.minimum)) { + if (!(instance >= schema.minimum)) { result.addError({ name: "minimum", - argument: schema2.minimum, - message: "must be greater than or equal to " + schema2.minimum + argument: schema.minimum, + message: "must be greater than or equal to " + schema.minimum }); } } return result; }; - validators.maximum = function validateMaximum(instance, schema2, options, ctx) { + validators.maximum = function validateMaximum(instance, schema, options, ctx) { if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (schema2.exclusiveMaximum && schema2.exclusiveMaximum === true) { - if (!(instance < schema2.maximum)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (schema.exclusiveMaximum && schema.exclusiveMaximum === true) { + if (!(instance < schema.maximum)) { result.addError({ name: "maximum", - argument: schema2.maximum, - message: "must be less than " + schema2.maximum + argument: schema.maximum, + message: "must be less than " + schema.maximum }); } } else { - if (!(instance <= schema2.maximum)) { + if (!(instance <= schema.maximum)) { result.addError({ name: "maximum", - argument: schema2.maximum, - message: "must be less than or equal to " + schema2.maximum + argument: schema.maximum, + message: "must be less than or equal to " + schema.maximum }); } } return result; }; - validators.exclusiveMinimum = function validateExclusiveMinimum(instance, schema2, options, ctx) { - if (typeof schema2.exclusiveMinimum === "boolean") return; + validators.exclusiveMinimum = function validateExclusiveMinimum(instance, schema, options, ctx) { + if (typeof schema.exclusiveMinimum === "boolean") return; if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var valid4 = instance > schema2.exclusiveMinimum; + var result = new ValidatorResult(instance, schema, options, ctx); + var valid4 = instance > schema.exclusiveMinimum; if (!valid4) { result.addError({ name: "exclusiveMinimum", - argument: schema2.exclusiveMinimum, - message: "must be strictly greater than " + schema2.exclusiveMinimum + argument: schema.exclusiveMinimum, + message: "must be strictly greater than " + schema.exclusiveMinimum }); } return result; }; - validators.exclusiveMaximum = function validateExclusiveMaximum(instance, schema2, options, ctx) { - if (typeof schema2.exclusiveMaximum === "boolean") return; + validators.exclusiveMaximum = function validateExclusiveMaximum(instance, schema, options, ctx) { + if (typeof schema.exclusiveMaximum === "boolean") return; if (!this.types.number(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var valid4 = instance < schema2.exclusiveMaximum; + var result = new ValidatorResult(instance, schema, options, ctx); + var valid4 = instance < schema.exclusiveMaximum; if (!valid4) { result.addError({ name: "exclusiveMaximum", - argument: schema2.exclusiveMaximum, - message: "must be strictly less than " + schema2.exclusiveMaximum + argument: schema.exclusiveMaximum, + message: "must be strictly less than " + schema.exclusiveMaximum }); } return result; }; - var validateMultipleOfOrDivisbleBy = function validateMultipleOfOrDivisbleBy2(instance, schema2, options, ctx, validationType, errorMessage) { + var validateMultipleOfOrDivisbleBy = function validateMultipleOfOrDivisbleBy2(instance, schema, options, ctx, validationType, errorMessage) { if (!this.types.number(instance)) return; - var validationArgument = schema2[validationType]; + var validationArgument = schema[validationType]; if (validationArgument == 0) { throw new SchemaError(validationType + " cannot be zero"); } - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var instanceDecimals = helpers.getDecimalPlaces(instance); var divisorDecimals = helpers.getDecimalPlaces(validationArgument); var maxDecimals = Math.max(instanceDecimals, divisorDecimals); @@ -29941,21 +30591,21 @@ var require_attribute = __commonJS({ } return result; }; - validators.multipleOf = function validateMultipleOf(instance, schema2, options, ctx) { - return validateMultipleOfOrDivisbleBy.call(this, instance, schema2, options, ctx, "multipleOf", "is not a multiple of (divisible by) "); + validators.multipleOf = function validateMultipleOf(instance, schema, options, ctx) { + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "multipleOf", "is not a multiple of (divisible by) "); }; - validators.divisibleBy = function validateDivisibleBy(instance, schema2, options, ctx) { - return validateMultipleOfOrDivisbleBy.call(this, instance, schema2, options, ctx, "divisibleBy", "is not divisible by (multiple of) "); + validators.divisibleBy = function validateDivisibleBy(instance, schema, options, ctx) { + return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "divisibleBy", "is not divisible by (multiple of) "); }; - validators.required = function validateRequired(instance, schema2, options, ctx) { - var result = new ValidatorResult(instance, schema2, options, ctx); - if (instance === void 0 && schema2.required === true) { + validators.required = function validateRequired(instance, schema, options, ctx) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (instance === void 0 && schema.required === true) { result.addError({ name: "required", message: "is required" }); - } else if (this.types.object(instance) && Array.isArray(schema2.required)) { - schema2.required.forEach(function(n) { + } else if (this.types.object(instance) && Array.isArray(schema.required)) { + schema.required.forEach(function(n) { if (getEnumerableProperty(instance, n) === void 0) { result.addError({ name: "required", @@ -29967,10 +30617,10 @@ var require_attribute = __commonJS({ } return result; }; - validators.pattern = function validatePattern(instance, schema2, options, ctx) { + validators.pattern = function validatePattern(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - var pattern = schema2.pattern; + var result = new ValidatorResult(instance, schema, options, ctx); + var pattern = schema.pattern; try { var regexp = new RegExp(pattern, "u"); } catch (_e) { @@ -29979,72 +30629,72 @@ var require_attribute = __commonJS({ if (!instance.match(regexp)) { result.addError({ name: "pattern", - argument: schema2.pattern, - message: "does not match pattern " + JSON.stringify(schema2.pattern.toString()) + argument: schema.pattern, + message: "does not match pattern " + JSON.stringify(schema.pattern.toString()) }); } return result; }; - validators.format = function validateFormat(instance, schema2, options, ctx) { + validators.format = function validateFormat(instance, schema, options, ctx) { if (instance === void 0) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!result.disableFormat && !helpers.isFormat(instance, schema2.format, this)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!result.disableFormat && !helpers.isFormat(instance, schema.format, this)) { result.addError({ name: "format", - argument: schema2.format, - message: "does not conform to the " + JSON.stringify(schema2.format) + " format" + argument: schema.format, + message: "does not conform to the " + JSON.stringify(schema.format) + " format" }); } return result; }; - validators.minLength = function validateMinLength(instance, schema2, options, ctx) { + validators.minLength = function validateMinLength(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); - if (!(length >= schema2.minLength)) { + if (!(length >= schema.minLength)) { result.addError({ name: "minLength", - argument: schema2.minLength, - message: "does not meet minimum length of " + schema2.minLength + argument: schema.minLength, + message: "does not meet minimum length of " + schema.minLength }); } return result; }; - validators.maxLength = function validateMaxLength(instance, schema2, options, ctx) { + validators.maxLength = function validateMaxLength(instance, schema, options, ctx) { if (!this.types.string(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); - if (!(length <= schema2.maxLength)) { + if (!(length <= schema.maxLength)) { result.addError({ name: "maxLength", - argument: schema2.maxLength, - message: "does not meet maximum length of " + schema2.maxLength + argument: schema.maxLength, + message: "does not meet maximum length of " + schema.maxLength }); } return result; }; - validators.minItems = function validateMinItems(instance, schema2, options, ctx) { + validators.minItems = function validateMinItems(instance, schema, options, ctx) { if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!(instance.length >= schema2.minItems)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!(instance.length >= schema.minItems)) { result.addError({ name: "minItems", - argument: schema2.minItems, - message: "does not meet minimum length of " + schema2.minItems + argument: schema.minItems, + message: "does not meet minimum length of " + schema.minItems }); } return result; }; - validators.maxItems = function validateMaxItems(instance, schema2, options, ctx) { + validators.maxItems = function validateMaxItems(instance, schema, options, ctx) { if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!(instance.length <= schema2.maxItems)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!(instance.length <= schema.maxItems)) { result.addError({ name: "maxItems", - argument: schema2.maxItems, - message: "does not meet maximum length of " + schema2.maxItems + argument: schema.maxItems, + message: "does not meet maximum length of " + schema.maxItems }); } return result; @@ -30058,10 +30708,10 @@ var require_attribute = __commonJS({ } return true; } - validators.uniqueItems = function validateUniqueItems(instance, schema2, options, ctx) { - if (schema2.uniqueItems !== true) return; + validators.uniqueItems = function validateUniqueItems(instance, schema, options, ctx) { + if (schema.uniqueItems !== true) return; if (!this.types.array(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); if (!instance.every(testArrays)) { result.addError({ name: "uniqueItems", @@ -30070,14 +30720,14 @@ var require_attribute = __commonJS({ } return result; }; - validators.dependencies = function validateDependencies(instance, schema2, options, ctx) { + validators.dependencies = function validateDependencies(instance, schema, options, ctx) { if (!this.types.object(instance)) return; - var result = new ValidatorResult(instance, schema2, options, ctx); - for (var property in schema2.dependencies) { + var result = new ValidatorResult(instance, schema, options, ctx); + for (var property in schema.dependencies) { if (instance[property] === void 0) { continue; } - var dep = schema2.dependencies[property]; + var dep = schema.dependencies[property]; var childContext = ctx.makeChild(dep, property); if (typeof dep == "string") { dep = [dep]; @@ -30109,48 +30759,48 @@ var require_attribute = __commonJS({ } return result; }; - validators["enum"] = function validateEnum(instance, schema2, options, ctx) { + validators["enum"] = function validateEnum(instance, schema, options, ctx) { if (instance === void 0) { return null; } - if (!Array.isArray(schema2["enum"])) { - throw new SchemaError("enum expects an array", schema2); + if (!Array.isArray(schema["enum"])) { + throw new SchemaError("enum expects an array", schema); } - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!schema2["enum"].some(helpers.deepCompareStrict.bind(null, instance))) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!schema["enum"].some(helpers.deepCompareStrict.bind(null, instance))) { result.addError({ name: "enum", - argument: schema2["enum"], - message: "is not one of enum values: " + schema2["enum"].map(String).join(",") + argument: schema["enum"], + message: "is not one of enum values: " + schema["enum"].map(String).join(",") }); } return result; }; - validators["const"] = function validateEnum(instance, schema2, options, ctx) { + validators["const"] = function validateEnum(instance, schema, options, ctx) { if (instance === void 0) { return null; } - var result = new ValidatorResult(instance, schema2, options, ctx); - if (!helpers.deepCompareStrict(schema2["const"], instance)) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (!helpers.deepCompareStrict(schema["const"], instance)) { result.addError({ name: "const", - argument: schema2["const"], - message: "does not exactly match expected constant: " + schema2["const"] + argument: schema["const"], + message: "does not exactly match expected constant: " + schema["const"] }); } return result; }; - validators.not = validators.disallow = function validateNot(instance, schema2, options, ctx) { + validators.not = validators.disallow = function validateNot(instance, schema, options, ctx) { var self2 = this; if (instance === void 0) return null; - var result = new ValidatorResult(instance, schema2, options, ctx); - var notTypes = schema2.not || schema2.disallow; + var result = new ValidatorResult(instance, schema, options, ctx); + var notTypes = schema.not || schema.disallow; if (!notTypes) return null; if (!Array.isArray(notTypes)) notTypes = [notTypes]; - notTypes.forEach(function(type2) { - if (self2.testType(instance, schema2, options, ctx, type2)) { - var id = type2 && (type2.$id || type2.id); - var schemaId = id || type2; + notTypes.forEach(function(type) { + if (self2.testType(instance, schema, options, ctx, type)) { + var id = type && (type.$id || type.id); + var schemaId = id || type; result.addError({ name: "not", argument: schemaId, @@ -30174,43 +30824,43 @@ var require_scan = __commonJS({ this.id = found; this.ref = ref; } - module2.exports.scan = function scan(base, schema2) { - function scanSchema(baseuri, schema3) { - if (!schema3 || typeof schema3 != "object") return; - if (schema3.$ref) { - let resolvedUri = helpers.resolveUrl(baseuri, schema3.$ref); + module2.exports.scan = function scan(base, schema) { + function scanSchema(baseuri, schema2) { + if (!schema2 || typeof schema2 != "object") return; + if (schema2.$ref) { + let resolvedUri = helpers.resolveUrl(baseuri, schema2.$ref); ref[resolvedUri] = ref[resolvedUri] ? ref[resolvedUri] + 1 : 0; return; } - var id = schema3.$id || schema3.id; + var id = schema2.$id || schema2.id; let resolvedBase = helpers.resolveUrl(baseuri, id); var ourBase = id ? resolvedBase : baseuri; if (ourBase) { if (ourBase.indexOf("#") < 0) ourBase += "#"; if (found[ourBase]) { - if (!helpers.deepCompareStrict(found[ourBase], schema3)) { + if (!helpers.deepCompareStrict(found[ourBase], schema2)) { throw new Error("Schema <" + ourBase + "> already exists with different definition"); } return found[ourBase]; } - found[ourBase] = schema3; + found[ourBase] = schema2; if (ourBase[ourBase.length - 1] == "#") { - found[ourBase.substring(0, ourBase.length - 1)] = schema3; - } - } - scanArray(ourBase + "/items", Array.isArray(schema3.items) ? schema3.items : [schema3.items]); - scanArray(ourBase + "/extends", Array.isArray(schema3.extends) ? schema3.extends : [schema3.extends]); - scanSchema(ourBase + "/additionalItems", schema3.additionalItems); - scanObject(ourBase + "/properties", schema3.properties); - scanSchema(ourBase + "/additionalProperties", schema3.additionalProperties); - scanObject(ourBase + "/definitions", schema3.definitions); - scanObject(ourBase + "/patternProperties", schema3.patternProperties); - scanObject(ourBase + "/dependencies", schema3.dependencies); - scanArray(ourBase + "/disallow", schema3.disallow); - scanArray(ourBase + "/allOf", schema3.allOf); - scanArray(ourBase + "/anyOf", schema3.anyOf); - scanArray(ourBase + "/oneOf", schema3.oneOf); - scanSchema(ourBase + "/not", schema3.not); + found[ourBase.substring(0, ourBase.length - 1)] = schema2; + } + } + scanArray(ourBase + "/items", Array.isArray(schema2.items) ? schema2.items : [schema2.items]); + scanArray(ourBase + "/extends", Array.isArray(schema2.extends) ? schema2.extends : [schema2.extends]); + scanSchema(ourBase + "/additionalItems", schema2.additionalItems); + scanObject(ourBase + "/properties", schema2.properties); + scanSchema(ourBase + "/additionalProperties", schema2.additionalProperties); + scanObject(ourBase + "/definitions", schema2.definitions); + scanObject(ourBase + "/patternProperties", schema2.patternProperties); + scanObject(ourBase + "/dependencies", schema2.dependencies); + scanArray(ourBase + "/disallow", schema2.disallow); + scanArray(ourBase + "/allOf", schema2.allOf); + scanArray(ourBase + "/anyOf", schema2.anyOf); + scanArray(ourBase + "/oneOf", schema2.oneOf); + scanSchema(ourBase + "/not", schema2.not); } function scanArray(baseuri, schemas) { if (!Array.isArray(schemas)) return; @@ -30226,7 +30876,7 @@ var require_scan = __commonJS({ } var found = {}; var ref = {}; - scanSchema(base, schema2); + scanSchema(base, schema); return new SchemaScanResult(found, ref); }; } @@ -30248,7 +30898,7 @@ var require_validator = __commonJS({ this.customFormats = Object.create(Validator4.prototype.customFormats); this.schemas = {}; this.unresolvedRefs = []; - this.types = Object.create(types); + this.types = Object.create(types2); this.attributes = Object.create(attribute.validators); }; Validator3.prototype.customFormats = {}; @@ -30256,13 +30906,13 @@ var require_validator = __commonJS({ Validator3.prototype.types = null; Validator3.prototype.attributes = null; Validator3.prototype.unresolvedRefs = null; - Validator3.prototype.addSchema = function addSchema(schema2, base) { + Validator3.prototype.addSchema = function addSchema(schema, base) { var self2 = this; - if (!schema2) { + if (!schema) { return null; } - var scan = scanSchema(base || anonymousBase, schema2); - var ourUri = base || schema2.$id || schema2.id; + var scan = scanSchema(base || anonymousBase, schema); + var ourUri = base || schema.$id || schema.id; for (var uri in scan.id) { this.schemas[uri] = scan.id[uri]; } @@ -30292,32 +30942,32 @@ var require_validator = __commonJS({ Validator3.prototype.getSchema = function getSchema(urn) { return this.schemas[urn]; }; - Validator3.prototype.validate = function validate(instance, schema2, options, ctx) { - if (typeof schema2 !== "boolean" && typeof schema2 !== "object" || schema2 === null) { + Validator3.prototype.validate = function validate2(instance, schema, options, ctx) { + if (typeof schema !== "boolean" && typeof schema !== "object" || schema === null) { throw new SchemaError("Expected `schema` to be an object or boolean"); } if (!options) { options = {}; } - var id = schema2.$id || schema2.id; + var id = schema.$id || schema.id; let base = helpers.resolveUrl(options.base, id || ""); if (!ctx) { - ctx = new SchemaContext(schema2, options, [], base, Object.create(this.schemas)); + ctx = new SchemaContext(schema, options, [], base, Object.create(this.schemas)); if (!ctx.schemas[base]) { - ctx.schemas[base] = schema2; + ctx.schemas[base] = schema; } - var found = scanSchema(base, schema2); + var found = scanSchema(base, schema); for (var n in found.id) { var sch = found.id[n]; ctx.schemas[n] = sch; } } if (options.required && instance === void 0) { - var result = new ValidatorResult(instance, schema2, options, ctx); + var result = new ValidatorResult(instance, schema, options, ctx); result.addError("is required, but is undefined"); return result; } - var result = this.validateSchema(instance, schema2, options, ctx); + var result = this.validateSchema(instance, schema, options, ctx); if (!result) { throw new Error("Result undefined"); } else if (options.throwAll && result.errors.length) { @@ -30325,49 +30975,49 @@ var require_validator = __commonJS({ } return result; }; - function shouldResolve(schema2) { - var ref = typeof schema2 === "string" ? schema2 : schema2.$ref; + function shouldResolve(schema) { + var ref = typeof schema === "string" ? schema : schema.$ref; if (typeof ref == "string") return ref; return false; } - Validator3.prototype.validateSchema = function validateSchema2(instance, schema2, options, ctx) { - var result = new ValidatorResult(instance, schema2, options, ctx); - if (typeof schema2 === "boolean") { - if (schema2 === true) { - schema2 = {}; - } else if (schema2 === false) { - schema2 = { type: [] }; + Validator3.prototype.validateSchema = function validateSchema2(instance, schema, options, ctx) { + var result = new ValidatorResult(instance, schema, options, ctx); + if (typeof schema === "boolean") { + if (schema === true) { + schema = {}; + } else if (schema === false) { + schema = { type: [] }; } - } else if (!schema2) { + } else if (!schema) { throw new Error("schema is undefined"); } - if (schema2["extends"]) { - if (Array.isArray(schema2["extends"])) { - var schemaobj = { schema: schema2, ctx }; - schema2["extends"].forEach(this.schemaTraverser.bind(this, schemaobj)); - schema2 = schemaobj.schema; + if (schema["extends"]) { + if (Array.isArray(schema["extends"])) { + var schemaobj = { schema, ctx }; + schema["extends"].forEach(this.schemaTraverser.bind(this, schemaobj)); + schema = schemaobj.schema; schemaobj.schema = null; schemaobj.ctx = null; schemaobj = null; } else { - schema2 = helpers.deepMerge(schema2, this.superResolve(schema2["extends"], ctx)); + schema = helpers.deepMerge(schema, this.superResolve(schema["extends"], ctx)); } } - var switchSchema = shouldResolve(schema2); + var switchSchema = shouldResolve(schema); if (switchSchema) { - var resolved = this.resolve(schema2, switchSchema, ctx); + var resolved = this.resolve(schema, switchSchema, ctx); var subctx = new SchemaContext(resolved.subschema, options, ctx.path, resolved.switchSchema, ctx.schemas); return this.validateSchema(instance, resolved.subschema, options, subctx); } var skipAttributes = options && options.skipAttributes || []; - for (var key in schema2) { + for (var key in schema) { if (!attribute.ignoreProperties[key] && skipAttributes.indexOf(key) < 0) { var validatorErr = null; var validator = this.attributes[key]; if (validator) { - validatorErr = validator.call(this, instance, schema2, options, ctx); + validatorErr = validator.call(this, instance, schema, options, ctx); } else if (options.allowUnknownAttributes === false) { - throw new SchemaError("Unsupported attribute: " + key, schema2); + throw new SchemaError("Unsupported attribute: " + key, schema); } if (validatorErr) { result.importErrors(validatorErr); @@ -30375,7 +31025,7 @@ var require_validator = __commonJS({ } } if (typeof options.rewrite == "function") { - var value = options.rewrite.call(this, instance, schema2, options, ctx); + var value = options.rewrite.call(this, instance, schema, options, ctx); result.instance = value; } return result; @@ -30383,14 +31033,14 @@ var require_validator = __commonJS({ Validator3.prototype.schemaTraverser = function schemaTraverser(schemaobj, s) { schemaobj.schema = helpers.deepMerge(schemaobj.schema, this.superResolve(s, schemaobj.ctx)); }; - Validator3.prototype.superResolve = function superResolve(schema2, ctx) { - var ref = shouldResolve(schema2); + Validator3.prototype.superResolve = function superResolve(schema, ctx) { + var ref = shouldResolve(schema); if (ref) { - return this.resolve(schema2, ref, ctx).subschema; + return this.resolve(schema, ref, ctx).subschema; } - return schema2; + return schema; }; - Validator3.prototype.resolve = function resolve13(schema2, switchSchema, ctx) { + Validator3.prototype.resolve = function resolve14(schema, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -30399,55 +31049,55 @@ var require_validator = __commonJS({ let fragment = parsed.hash; var document2 = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length); if (!document2 || !ctx.schemas[document2]) { - throw new SchemaError("no such schema <" + switchSchema + ">", schema2); + throw new SchemaError("no such schema <" + switchSchema + ">", schema); } var subschema = helpers.objectGetPath(ctx.schemas[document2], fragment.substr(1)); if (subschema === void 0) { - throw new SchemaError("no such schema " + fragment + " located in <" + document2 + ">", schema2); + throw new SchemaError("no such schema " + fragment + " located in <" + document2 + ">", schema); } return { subschema, switchSchema }; }; - Validator3.prototype.testType = function validateType(instance, schema2, options, ctx, type2) { - if (type2 === void 0) { + Validator3.prototype.testType = function validateType(instance, schema, options, ctx, type) { + if (type === void 0) { return; - } else if (type2 === null) { + } else if (type === null) { throw new SchemaError('Unexpected null in "type" keyword'); } - if (typeof this.types[type2] == "function") { - return this.types[type2].call(this, instance); + if (typeof this.types[type] == "function") { + return this.types[type].call(this, instance); } - if (type2 && typeof type2 == "object") { - var res = this.validateSchema(instance, type2, options, ctx); + if (type && typeof type == "object") { + var res = this.validateSchema(instance, type, options, ctx); return res === void 0 || !(res && res.errors.length); } return true; }; - var types = Validator3.prototype.types = {}; - types.string = function testString(instance) { + var types2 = Validator3.prototype.types = {}; + types2.string = function testString(instance) { return typeof instance == "string"; }; - types.number = function testNumber(instance) { + types2.number = function testNumber(instance) { return typeof instance == "number" && isFinite(instance); }; - types.integer = function testInteger(instance) { + types2.integer = function testInteger(instance) { return typeof instance == "number" && instance % 1 === 0; }; - types.boolean = function testBoolean(instance) { + types2.boolean = function testBoolean(instance) { return typeof instance == "boolean"; }; - types.array = function testArray(instance) { + types2.array = function testArray(instance) { return Array.isArray(instance); }; - types["null"] = function testNull(instance) { + types2["null"] = function testNull(instance) { return instance === null; }; - types.date = function testDate(instance) { + types2.date = function testDate(instance) { return instance instanceof Date; }; - types.any = function testAny(instance) { + types2.any = function testAny(instance) { return true; }; - types.object = function testObject(instance) { + types2.object = function testObject(instance) { return instance && typeof instance === "object" && !Array.isArray(instance) && !(instance instanceof Date); }; module2.exports = Validator3; @@ -30465,9 +31115,9 @@ var require_lib2 = __commonJS({ module2.exports.SchemaError = require_helpers().SchemaError; module2.exports.SchemaScanResult = require_scan().SchemaScanResult; module2.exports.scan = require_scan().scan; - module2.exports.validate = function(instance, schema2, options) { + module2.exports.validate = function(instance, schema, options) { var v = new Validator3(); - return v.validate(instance, schema2, options); + return v.validate(instance, schema, options); }; } }); @@ -30747,21 +31397,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname5; + exports2.dirname = dirname6; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname5(p) { + function dirname6(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path28.dirname(p); + let result = path29.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -30798,7 +31448,7 @@ var require_internal_path_helper = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path28.sep; + root += path29.sep; } return root + itemPath; } @@ -30832,10 +31482,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path28.sep)) { + if (!p.endsWith(path29.sep)) { return p; } - if (p === path28.sep) { + if (p === path29.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -30905,7 +31555,7 @@ var require_internal_pattern_helper = __commonJS({ })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getSearchPaths = getSearchPaths; - exports2.match = match; + exports2.match = match2; exports2.partialMatch = partialMatch; var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); @@ -30941,7 +31591,7 @@ var require_internal_pattern_helper = __commonJS({ } return result; } - function match(patterns, itemPath) { + function match2(patterns, itemPath) { let result = internal_match_kind_1.MatchKind.None; for (const pattern of patterns) { if (pattern.negate) { @@ -30980,36 +31630,36 @@ var require_concat_map = __commonJS({ var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); + module2.exports = balanced2; + function balanced2(a, b, str) { + if (a instanceof RegExp) a = maybeMatch2(a, str); + if (b instanceof RegExp) b = maybeMatch2(b, str); + var r = range2(a, b, str); return r && { start: r[0], end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) }; } - function maybeMatch(reg, str2) { - var m = str2.match(reg); + function maybeMatch2(reg, str) { + var m = str.match(reg); return m ? m[0] : null; } - balanced.range = range; - function range(a, b, str2) { + balanced2.range = range2; + function range2(a, b, str) { var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { begs = []; - left = str2.length; + left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); - ai = str2.indexOf(a, i + 1); + ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { @@ -31018,7 +31668,7 @@ var require_balanced_match = __commonJS({ left = beg; right = bi; } - bi = str2.indexOf(b, i + 1); + bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } @@ -31035,35 +31685,37 @@ var require_balanced_match = __commonJS({ var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports2, module2) { var concatMap = require_concat_map(); - var balanced = require_balanced_match(); + var balanced2 = require_balanced_match(); module2.exports = expandTop; - 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"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) + var escSlash2 = "\0SLASH" + Math.random() + "\0"; + var escOpen2 = "\0OPEN" + Math.random() + "\0"; + var escClose2 = "\0CLOSE" + Math.random() + "\0"; + var escComma2 = "\0COMMA" + Math.random() + "\0"; + var escPeriod2 = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX2 = 1e5; + var EXPANSION_MAX_LENGTH2 = 4e6; + function numeric2(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces2(str) { + return str.split("\\\\").join(escSlash2).split("\\{").join(escOpen2).split("\\}").join(escClose2).split("\\,").join(escComma2).split("\\.").join(escPeriod2); + } + function unescapeBraces2(str) { + return str.split(escSlash2).join("\\").split(escOpen2).join("{").split(escClose2).join("}").split(escComma2).join(",").split(escPeriod2).join("."); + } + function parseCommaParts2(str) { + if (!str) return [""]; var parts = []; - var m = balanced("{", "}", str2); + var m = balanced2("{", "}", str); if (!m) - return str2.split(","); + return str.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); + var postParts = parseCommaParts2(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); @@ -31071,108 +31723,198 @@ var require_brace_expansion = __commonJS({ parts.push.apply(parts, p); return parts; } - function expandTop(str2, options) { - if (!str2) + function expandTop(str, options) { + if (!str) return []; options = options || {}; - var max = options.max == null ? Infinity : options.max; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); + var max = options.max == null ? EXPANSION_MAX2 : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH2 : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); } - return expand2(escapeBraces(str2), max, true).map(unescapeBraces); + return expand3(escapeBraces2(str), max, maxLength, true).map(unescapeBraces2); } - function embrace(str2) { - return "{" + str2 + "}"; + function embrace2(str) { + return "{" + str + "}"; } - function isPadded(el) { + function isPadded2(el) { return /^-?0\d/.test(el); } - function lte(i, y) { + function lte2(i, y) { return i <= y; } - function gte6(i, y) { + function gte7(i, y) { return i >= y; } - function expand2(str2, max, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand2(str2, max, true); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand2(n[0], max, false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand2(m.post, max, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } + function combine2(acc, base, pre, values, max, maxLength, dropEmpties, outBase) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && expansion.length === base[a]) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + outBase.push(base[a]); + length += expansion.length; } } - var pre = m.pre; - var post = m.post.length ? expand2(m.post, max, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte6; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; + return out; + } + function expandSequence2(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric2(n[0]); + var y = numeric2(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric2(n[2])), 1) : 1; + var test = lte2; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte7; + } + var pad = n.some(isPadded2); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; } } } - N.push(c); } - } else { - N = concatMap(n, function(el) { - return expand2(el, max, false); - }); + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length && expansions.length < max; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); + return N; + } + function expand3(str, max, maxLength, isTop) { + var acc = [""]; + var accBase = [0]; + var dropEmpties = false; + var firstGroup = true; + var nextBase; + for (; ; ) { + var m = balanced2("{", "}", str); + if (!m) { + return combine2(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var pre = m.pre; + if (/\$$/.test(pre)) { + return combine2(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose2 + m.post; + isTop = true; + firstGroup = true; + dropEmpties = false; + accBase = []; + for (var b = 0; b < acc.length; b++) { + accBase.push(acc[b].length); + } + continue; + } + return combine2( + acc, + accBase, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties, + [] + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; } + var values; + if (isSequence) { + values = expandSequence2(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts2(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand3(n[0], max, maxLength, false).map(embrace2); + if (n.length === 1) { + nextBase = []; + acc = combine2( + acc, + accBase, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; + continue; + } + } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d].length !== accBase[d]) { + dropsEmpties = false; + } + } + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand3(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + nextBase = []; + acc = combine2( + acc, + accBase, + pre, + values, + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; } - return expansions; + return acc; } } }); @@ -31180,9 +31922,9 @@ var require_brace_expansion = __commonJS({ // node_modules/minimatch/minimatch.js var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path28 = (function() { + module2.exports = minimatch2; + minimatch2.Minimatch = Minimatch2; + var path29 = (function() { try { return require("path"); } catch (e) { @@ -31190,9 +31932,9 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path28.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand2 = require_brace_expansion(); + minimatch2.sep = path29.sep; + var GLOBSTAR2 = minimatch2.GLOBSTAR = Minimatch2.GLOBSTAR = {}; + var expand3 = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, @@ -31200,26 +31942,26 @@ var require_minimatch = __commonJS({ "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); + var qmark3 = "[^/]"; + var star3 = qmark3 + "*?"; + var twoStarDot2 = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot2 = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials2 = charSet("().*{}+?[]^$\\!"); function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; }, {}); } var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { + minimatch2.filter = filter2; + function filter2(pattern, options) { options = options || {}; return function(p, i, list) { - return minimatch(p, pattern, options); + return minimatch2(p, pattern, options); }; } - function ext(a, b) { + function ext2(a, b) { b = b || {}; var t = {}; Object.keys(a).forEach(function(k) { @@ -31230,57 +31972,57 @@ var require_minimatch = __commonJS({ }); return t; } - minimatch.defaults = function(def) { + minimatch2.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; + return minimatch2; } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); + var orig = minimatch2; + var m = function minimatch3(p, pattern, options) { + return orig(p, pattern, ext2(def, options)); }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); + m.Minimatch = function Minimatch3(pattern, options) { + return new orig.Minimatch(pattern, ext2(def, options)); }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; + m.Minimatch.defaults = function defaults3(options) { + return orig.defaults(ext2(def, options)).Minimatch; }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); + m.filter = function filter3(pattern, options) { + return orig.filter(pattern, ext2(def, options)); }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); + m.defaults = function defaults3(options) { + return orig.defaults(ext2(def, options)); }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); + m.makeRe = function makeRe3(pattern, options) { + return orig.makeRe(pattern, ext2(def, options)); }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); + m.braceExpand = function braceExpand3(pattern, options) { + return orig.braceExpand(pattern, ext2(def, options)); }; m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); + return orig.match(list, pattern, ext2(def, options)); }; return m; }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; + Minimatch2.defaults = function(def) { + return minimatch2.defaults(def).Minimatch; }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); + function minimatch2(p, pattern, options) { + assertValidPattern2(pattern); if (!options) options = {}; if (!options.nocomment && pattern.charAt(0) === "#") { return false; } - return new Minimatch(pattern, options).match(p); + return new Minimatch2(pattern, options).match(p); } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); + function Minimatch2(pattern, options) { + if (!(this instanceof Minimatch2)) { + return new Minimatch2(pattern, options); } - assertValidPattern(pattern); + assertValidPattern2(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path28.sep !== "/") { - pattern = pattern.split(path28.sep).join("/"); + if (!options.allowWindowsEscape && path29.sep !== "/") { + pattern = pattern.split(path29.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -31293,9 +32035,9 @@ var require_minimatch = __commonJS({ this.partial = !!options.partial; this.make(); } - Minimatch.prototype.debug = function() { + Minimatch2.prototype.debug = function() { }; - Minimatch.prototype.make = make; + Minimatch2.prototype.make = make; function make() { var pattern = this.pattern; var options = this.options; @@ -31308,26 +32050,26 @@ var require_minimatch = __commonJS({ return; } this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); + var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = function debug6() { console.error.apply(console, arguments); }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { + this.debug(this.pattern, set); + set = set.filter(function(s) { return s.indexOf(false) === -1; }); - this.debug(this.pattern, set2); - this.set = set2; + this.debug(this.pattern, set); + this.set = set; } - Minimatch.prototype.parseNegate = parseNegate; + Minimatch2.prototype.parseNegate = parseNegate; function parseNegate() { var pattern = this.pattern; var negate2 = false; @@ -31341,42 +32083,42 @@ var require_minimatch = __commonJS({ if (negateOffset) this.pattern = pattern.substr(negateOffset); this.negate = negate2; } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); + minimatch2.braceExpand = function(pattern, options) { + return braceExpand2(pattern, options); }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { + Minimatch2.prototype.braceExpand = braceExpand2; + function braceExpand2(pattern, options) { if (!options) { - if (this instanceof Minimatch) { + if (this instanceof Minimatch2) { options = this.options; } else { options = {}; } } pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); + assertValidPattern2(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } - return expand2(pattern); + return expand3(pattern); } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { + var MAX_PATTERN_LENGTH2 = 1024 * 64; + var assertValidPattern2 = function(pattern) { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } - if (pattern.length > MAX_PATTERN_LENGTH) { + if (pattern.length > MAX_PATTERN_LENGTH2) { throw new TypeError("pattern is too long"); } }; - Minimatch.prototype.parse = parse2; + Minimatch2.prototype.parse = parse3; var SUBPARSE = {}; - function parse2(pattern, isSub) { - assertValidPattern(pattern); + function parse3(pattern, isSub) { + assertValidPattern2(pattern); var options = this.options; if (pattern === "**") { if (!options.noglobstar) - return GLOBSTAR; + return GLOBSTAR2; else pattern = "*"; } @@ -31396,11 +32138,11 @@ var require_minimatch = __commonJS({ if (stateChar) { switch (stateChar) { case "*": - re += star; + re += star3; hasMagic = true; break; case "?": - re += qmark; + re += qmark3; hasMagic = true; break; default: @@ -31413,7 +32155,7 @@ var require_minimatch = __commonJS({ } for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { + if (escaping && reSpecials2[c]) { re += "\\" + c; escaping = false; continue; @@ -31526,7 +32268,7 @@ var require_minimatch = __commonJS({ clearStateChar(); if (escaping) { escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { + } else if (reSpecials2[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; @@ -31548,7 +32290,7 @@ var require_minimatch = __commonJS({ return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + var t = pl.type === "*" ? star3 : pl.type === "?" ? qmark3 : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } @@ -31556,12 +32298,12 @@ var require_minimatch = __commonJS({ if (escaping) { re += "\\\\"; } - var addPatternStart = false; + var addPatternStart2 = false; switch (re.charAt(0)) { case "[": case ".": case "(": - addPatternStart = true; + addPatternStart2 = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; @@ -31586,7 +32328,7 @@ var require_minimatch = __commonJS({ if (re !== "" && hasMagic) { re = "(?=.)" + re; } - if (addPatternStart) { + if (addPatternStart2) { re = patternStart + re; } if (isSub === SUBPARSE) { @@ -31605,23 +32347,23 @@ var require_minimatch = __commonJS({ regExp._src = re; return regExp; } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); + minimatch2.makeRe = function(pattern, options) { + return new Minimatch2(pattern, options || {}).makeRe(); }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { + Minimatch2.prototype.makeRe = makeRe2; + function makeRe2() { if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { + var set = this.set; + if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var twoStar = options.noglobstar ? star3 : options.dot ? twoStarDot2 : twoStarNoDot2; var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { + var re = set.map(function(pattern) { return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + return p === GLOBSTAR2 ? twoStar : typeof p === "string" ? regExpEscape3(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; @@ -31633,9 +32375,9 @@ var require_minimatch = __commonJS({ } return this.regexp; } - minimatch.match = function(list, pattern, options) { + minimatch2.match = function(list, pattern, options) { options = options || {}; - var mm = new Minimatch(pattern, options); + var mm = new Minimatch2(pattern, options); list = list.filter(function(f) { return mm.match(f); }); @@ -31644,28 +32386,28 @@ var require_minimatch = __commonJS({ } return list; }; - Minimatch.prototype.match = function match(f, partial) { + Minimatch2.prototype.match = function match2(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path28.sep !== "/") { - f = f.split(path28.sep).join("/"); + if (path29.sep !== "/") { + f = f.split(path29.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); + var set = this.set; + this.debug(this.pattern, "set", set); var filename; var i; for (i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; + for (i = 0; i < set.length; i++) { + var pattern = set[i]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; @@ -31679,24 +32421,24 @@ var require_minimatch = __commonJS({ if (options.flipNegate) return false; return this.negate; }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { + Minimatch2.prototype.matchOne = function(file, pattern, partial) { + if (pattern.indexOf(GLOBSTAR2) !== -1) { return this._matchGlobstar(file, pattern, partial, 0, 0); } return this._matchOne(file, pattern, partial, 0, 0); }; - Minimatch.prototype._matchGlobstar = function(file, pattern, partial, fileIndex, patternIndex) { + Minimatch2.prototype._matchGlobstar = function(file, pattern, partial, fileIndex, patternIndex) { var i; var firstgs = -1; for (i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { + if (pattern[i] === GLOBSTAR2) { firstgs = i; break; } } var lastgs = -1; for (i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { + if (pattern[i] === GLOBSTAR2) { lastgs = i; break; } @@ -31745,7 +32487,7 @@ var require_minimatch = __commonJS({ var nonGsPartsSums = [0]; for (var bi = 0; bi < body.length; bi++) { var b = body[bi]; - if (b === GLOBSTAR) { + if (b === GLOBSTAR2) { nonGsPartsSums.push(nonGsParts); currentBody = [[], 0]; bodySegments.push(currentBody); @@ -31769,7 +32511,7 @@ var require_minimatch = __commonJS({ !!fileTailMatch ); }; - Minimatch.prototype._matchGlobStarBodySections = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + Minimatch2.prototype._matchGlobStarBodySections = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { var bs = bodySegments[bodyIndex]; if (!bs) { for (var i = fileIndex; i < file.length; i++) { @@ -31813,14 +32555,14 @@ var require_minimatch = __commonJS({ } return partial || null; }; - Minimatch.prototype._matchOne = function(file, pattern, partial, fileIndex, patternIndex) { + Minimatch2.prototype._matchOne = function(file, pattern, partial, fileIndex, patternIndex) { var fi, pi, fl, pl; for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug("matchOne loop"); var p = pattern[pi]; var f = file[fi]; this.debug(pattern, p, f); - if (p === false || p === GLOBSTAR) return false; + if (p === false || p === GLOBSTAR2) return false; var hit; if (typeof p === "string") { hit = f === p; @@ -31843,7 +32585,7 @@ var require_minimatch = __commonJS({ function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } - function regExpEscape(s) { + function regExpEscape3(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } } @@ -31895,7 +32637,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -31910,12 +32652,12 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path28.sep); + this.segments = itemPath.split(path29.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path28.basename(remaining); + const basename2 = path29.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -31933,7 +32675,7 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path28.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path29.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31944,12 +32686,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path28.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path29.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path28.sep; + result += path29.sep; } result += this.segments[i]; } @@ -32007,7 +32749,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os7 = __importStar2(require("os")); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -32036,7 +32778,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path28.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path29.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -32060,8 +32802,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path28.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path28.sep}`; + if (!itemPath.endsWith(path29.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path29.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -32096,9 +32838,9 @@ var require_internal_pattern = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path28.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path29.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path28.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path29.sep}`)) { homedir2 = homedir2 || os7.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -32134,26 +32876,26 @@ var require_internal_pattern = __commonJS({ } else if (c === "*" || c === "?") { return ""; } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; + let set = ""; let closed = -1; for (let i2 = i + 1; i2 < segment.length; i2++) { const c2 = segment[i2]; if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; + set += segment[++i2]; continue; } else if (c2 === "]") { closed = i2; break; } else { - set2 += c2; + set += c2; } } if (closed >= 0) { - if (set2.length > 1) { + if (set.length > 1) { return ""; } - if (set2) { - literal += set2; + if (set) { + literal += set; i = closed; continue; } @@ -32182,8 +32924,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path28, level) { - this.path = path28; + constructor(path29, level) { + this.path = path29; this.level = level; } }; @@ -32234,11 +32976,11 @@ var require_internal_globber = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -32254,7 +32996,7 @@ var require_internal_globber = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32267,14 +33009,14 @@ var require_internal_globber = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve13, reject) { - v = o[n](v), settle(resolve13, reject, v.done, v.value); + return new Promise(function(resolve14, reject) { + v = o[n](v), settle(resolve14, reject, v.done, v.value); }); }; } - function settle(resolve13, reject, d, v) { + function settle(resolve14, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve13({ value: v2, done: d }); + resolve14({ value: v2, done: d }); }, reject); } }; @@ -32325,9 +33067,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core31 = __importStar2(require_core()); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -32344,10 +33086,10 @@ var require_internal_globber = __commonJS({ } glob() { return __awaiter2(this, void 0, void 0, function* () { - var _a, e_1, _b, _c; + var _a2, e_1, _b, _c; const result = []; try { - for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a2 = _f.done, !_a2; _d = true) { _c = _f.value; _d = false; const itemPath = _c; @@ -32357,7 +33099,7 @@ var require_internal_globber = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); + if (!_d && !_a2 && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32379,7 +33121,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core31.debug(`Search path '${searchPath}'`); try { - yield __await2(fs30.promises.lstat(searchPath)); + yield __await2(fs31.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32391,9 +33133,9 @@ var require_internal_globber = __commonJS({ const traversalChain = []; while (stack.length) { const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { + const match2 = patternHelper.match(patterns, item.path); + const partialMatch = !!match2 || patternHelper.partialMatch(patterns, item.path); + if (!match2 && !partialMatch) { continue; } const stats = yield __await2( @@ -32403,19 +33145,19 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path28.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path29.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + if (match2 & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs30.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path28.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs31.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path29.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { + } else if (match2 & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); } } @@ -32448,7 +33190,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs30.promises.stat(item.path); + stats = yield fs31.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -32460,10 +33202,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs30.promises.lstat(item.path); + stats = yield fs31.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs30.promises.realpath(item.path); + const realPath = yield fs31.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -32524,11 +33266,11 @@ var require_internal_hash_files = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -32544,7 +33286,7 @@ var require_internal_hash_files = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32557,14 +33299,14 @@ var require_internal_hash_files = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve13, reject) { - v = o[n](v), settle(resolve13, reject, v.done, v.value); + return new Promise(function(resolve14, reject) { + v = o[n](v), settle(resolve14, reject, v.done, v.value); }); }; } - function settle(resolve13, reject, d, v) { + function settle(resolve14, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve13({ value: v2, done: d }); + resolve14({ value: v2, done: d }); }, reject); } }; @@ -32572,13 +33314,13 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = hashFiles2; var crypto3 = __importStar2(require("crypto")); var core31 = __importStar2(require_core()); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); - var util = __importStar2(require("util")); - var path28 = __importStar2(require("path")); + var util3 = __importStar2(require("util")); + var path29 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; + var _a2, e_1, _b, _c; var _d; const writeDelegate = verbose ? core31.info : core31.debug; let hasMatch = false; @@ -32586,22 +33328,22 @@ var require_internal_hash_files = __commonJS({ const result = crypto3.createHash("sha256"); let count = 0; try { - for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a2 = _g.done, !_a2; _e = true) { _c = _g.value; _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path28.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path29.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs30.statSync(file).isDirectory()) { + if (fs31.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto3.createHash("sha256"); - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs30.createReadStream(file), hash2); + const pipeline2 = util3.promisify(stream2.pipeline); + yield pipeline2(fs31.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -32612,7 +33354,7 @@ var require_internal_hash_files = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + if (!_e && !_a2 && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } @@ -32636,11 +33378,11 @@ var require_glob = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -32656,7 +33398,7 @@ var require_glob = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32821,8 +33563,8 @@ var require_semver3 = __commonJS({ } } var i; - exports2.parse = parse2; - function parse2(version, options) { + exports2.parse = parse3; + function parse3(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, @@ -32850,12 +33592,12 @@ var require_semver3 = __commonJS({ } exports2.valid = valid4; function valid4(version, options) { - var v = parse2(version, options); + var v = parse3(version, options); return v ? v.version : null; } exports2.clean = clean3; function clean3(version, options) { - var s = parse2(version.trim().replace(/^[=v]+/, ""), options); + var s = parse3(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } exports2.SemVer = SemVer; @@ -33091,8 +33833,8 @@ var require_semver3 = __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"; @@ -33109,10 +33851,10 @@ var require_semver3 = __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; @@ -33181,12 +33923,12 @@ var require_semver3 = __commonJS({ function neq(a, b, loose) { return compare3(a, b, loose) !== 0; } - exports2.gte = gte6; - function gte6(a, b, loose) { + exports2.gte = gte7; + function gte7(a, b, loose) { return compare3(a, b, loose) >= 0; } - exports2.lte = lte; - function lte(a, b, loose) { + exports2.lte = lte2; + function lte2(a, b, loose) { return compare3(a, b, loose) <= 0; } exports2.cmp = cmp; @@ -33213,11 +33955,11 @@ var require_semver3 = __commonJS({ case ">": return gt(a, b, loose); case ">=": - return gte6(a, b, loose); + return gte7(a, b, loose); case "<": return lt2(a, b, loose); case "<=": - return lte(a, b, loose); + return lte2(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } @@ -33319,32 +34061,32 @@ var require_semver3 = __commonJS({ return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range2; - function Range2(range, options) { + function Range2(range2, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (range instanceof Range2) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; + if (range2 instanceof Range2) { + if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) { + return range2; } else { - return new Range2(range.raw, options); + return new Range2(range2.raw, options); } } - if (range instanceof Comparator) { - return new Range2(range.value, options); + if (range2 instanceof Comparator) { + return new Range2(range2.value, options); } if (!(this instanceof Range2)) { - return new Range2(range, options); + return new Range2(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; }); @@ -33362,36 +34104,36 @@ var require_semver3 = __commonJS({ Range2.prototype.toString = function() { return this.range; }; - Range2.prototype.parseRange = function(range) { + Range2.prototype.parseRange = function(range2) { var loose = this.options.loose; var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug6("hyphen replace", range); - range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug6("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); + debug6("hyphen replace", range2); + range2 = range2.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug6("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 set2 = 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) { - set2 = set2.filter(function(comp) { + set = set.filter(function(comp) { return !!comp.match(compRe); }); } - set2 = set2.map(function(comp) { + set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); - return set2; + return set; }; - Range2.prototype.intersects = function(range, options) { - if (!(range instanceof Range2)) { + Range2.prototype.intersects = function(range2, options) { + if (!(range2 instanceof Range2)) { 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); @@ -33413,8 +34155,8 @@ var require_semver3 = __commonJS({ return result; } exports2.toComparators = toComparators; - function toComparators(range, options) { - return new Range2(range, options).set.map(function(comp) { + function toComparators(range2, options) { + return new Range2(range2, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); @@ -33612,20 +34354,20 @@ var require_semver3 = __commonJS({ } return false; }; - function testSet(set2, version, options) { - for (var i2 = 0; i2 < set2.length; i2++) { - if (!set2[i2].test(version)) { + function testSet(set, version, options) { + for (var i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { - for (i2 = 0; i2 < set2.length; i2++) { - debug6(set2[i2].semver); - if (set2[i2].semver === ANY) { + for (i2 = 0; i2 < set.length; i2++) { + debug6(set[i2].semver); + if (set[i2].semver === ANY) { continue; } - if (set2[i2].semver.prerelease.length > 0) { - var allowed = set2[i2].semver; + if (set[i2].semver.prerelease.length > 0) { + var allowed = set[i2].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } @@ -33636,20 +34378,20 @@ var require_semver3 = __commonJS({ return true; } exports2.satisfies = satisfies2; - function satisfies2(version, range, options) { + function satisfies2(version, range2, options) { try { - range = new Range2(range, options); + range2 = new Range2(range2, options); } catch (er) { return false; } - return range.test(version); + return range2.test(version); } exports2.maxSatisfying = maxSatisfying; - function maxSatisfying(versions, range, options) { + function maxSatisfying(versions, range2, options) { var max = null; var maxSV = null; try { - var rangeObj = new Range2(range, options); + var rangeObj = new Range2(range2, options); } catch (er) { return null; } @@ -33664,11 +34406,11 @@ var require_semver3 = __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 Range2(range, options); + var rangeObj = new Range2(range2, options); } catch (er) { return null; } @@ -33683,19 +34425,19 @@ var require_semver3 = __commonJS({ return min; } exports2.minVersion = minVersion; - function minVersion(range, loose) { - range = new Range2(range, loose); + function minVersion(range2, loose) { + range2 = new Range2(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) { @@ -33722,43 +34464,43 @@ var require_semver3 = __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 Range2(range, options).range || "*"; + return new Range2(range2, options).range || "*"; } catch (er) { return null; } } exports2.ltr = ltr; - function ltr(version, range, options) { - return outside(version, range, "<", options); + function ltr(version, range2, options) { + return outside(version, range2, "<", options); } exports2.gtr = gtr; - function gtr(version, range, options) { - return outside(version, range, ">", options); + function gtr(version, range2, options) { + return outside(version, range2, ">", options); } exports2.outside = outside; - function outside(version, range, hilo, options) { + function outside(version, range2, hilo, options) { version = new SemVer(version, options); - range = new Range2(range, options); + range2 = new Range2(range2, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; - ltefn = lte; + ltefn = lte2; ltfn = lt2; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt2; - ltefn = gte6; + ltefn = gte7; ltfn = gt; comp = "<"; ecomp = "<="; @@ -33766,11 +34508,11 @@ var require_semver3 = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies2(version, range, options)) { + if (satisfies2(version, 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) { @@ -33798,7 +34540,7 @@ var require_semver3 = __commonJS({ } exports2.prerelease = prerelease; function prerelease(version, options) { - var parsed = parse2(version, options); + var parsed = parse3(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } exports2.intersects = intersects; @@ -33819,23 +34561,23 @@ var require_semver3 = __commonJS({ return null; } options = options || {}; - var match = null; + var match2 = null; if (!options.rtl) { - match = version.match(safeRe[t.COERCE]); + match2 = version.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + while ((next = safeRe[t.COERCERTL].exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) { + if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) { + match2 = next; } safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } safeRe[t.COERCERTL].lastIndex = -1; } - if (match === null) { + if (match2 === null) { return null; } - return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + return parse3(match2[2] + "." + (match2[3] || "0") + "." + (match2[4] || "0"), options); } } }); @@ -33845,7 +34587,7 @@ var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CacheFileSizeLimit = exports2.ManifestFilename = exports2.TarFilename = exports2.SystemTarPathOnWindows = exports2.GnuTarPathOnWindows = exports2.SocketTimeout = exports2.DefaultRetryDelay = exports2.DefaultRetryAttempts = exports2.ArchiveToolType = exports2.CompressionMethod = exports2.CacheFilename = void 0; + exports2.CacheReadDeniedMessagePrefix = exports2.CacheFileSizeLimit = exports2.ManifestFilename = exports2.TarFilename = exports2.SystemTarPathOnWindows = exports2.GnuTarPathOnWindows = exports2.SocketTimeout = exports2.DefaultRetryDelay = exports2.DefaultRetryAttempts = exports2.ArchiveToolType = exports2.CompressionMethod = exports2.CacheFilename = void 0; var CacheFilename; (function(CacheFilename2) { CacheFilename2["Gzip"] = "cache.tgz"; @@ -33870,6 +34612,7 @@ var require_constants7 = __commonJS({ exports2.TarFilename = "cache.tar"; exports2.ManifestFilename = "manifest.txt"; exports2.CacheFileSizeLimit = 10 * Math.pow(1024, 3); + exports2.CacheReadDeniedMessagePrefix = "cache read denied:"; } }); @@ -33916,11 +34659,11 @@ var require_cacheUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -33936,7 +34679,7 @@ var require_cacheUtils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -33949,14 +34692,14 @@ var require_cacheUtils = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve13, reject) { - v = o[n](v), settle(resolve13, reject, v.done, v.value); + return new Promise(function(resolve14, reject) { + v = o[n](v), settle(resolve14, reject, v.done, v.value); }); }; } - function settle(resolve13, reject, d, v) { + function settle(resolve14, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve13({ value: v2, done: d }); + resolve14({ value: v2, done: d }); }, reject); } }; @@ -33976,10 +34719,10 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar2(require_glob()); var io9 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs30 = __importStar2(require("fs")); - var path28 = __importStar2(require("path")); + var fs31 = __importStar2(require("fs")); + var path29 = __importStar2(require("path")); var semver11 = __importStar2(require_semver3()); - var util = __importStar2(require("util")); + var util3 = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { @@ -33997,19 +34740,19 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path28.join(baseLocation, "actions", "temp"); + tempDirectory = path29.join(baseLocation, "actions", "temp"); } - const dest = path28.join(tempDirectory, crypto3.randomUUID()); + const dest = path29.join(tempDirectory, crypto3.randomUUID()); yield io9.mkdirP(dest); return dest; }); } function getArchiveFileSizeInBytes(filePath) { - return fs30.statSync(filePath).size; + return fs31.statSync(filePath).size; } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { - var _a, e_1, _b, _c; + var _a2, e_1, _b, _c; var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); @@ -34017,11 +34760,11 @@ var require_cacheUtils = __commonJS({ implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a2 = _g.done, !_a2; _e = true) { _c = _g.value; _e = false; const file = _c; - const relativeFile = path28.relative(workspace, file).replace(new RegExp(`\\${path28.sep}`, "g"), "/"); + const relativeFile = path29.relative(workspace, file).replace(new RegExp(`\\${path29.sep}`, "g"), "/"); core31.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -34033,7 +34776,7 @@ var require_cacheUtils = __commonJS({ e_1 = { error: e_1_1 }; } finally { try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + if (!_e && !_a2 && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } @@ -34043,7 +34786,7 @@ var require_cacheUtils = __commonJS({ } function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { - return util.promisify(fs30.unlink)(filePath); + return util3.promisify(fs31.unlink)(filePath); }); } function getVersion(app_1) { @@ -34085,7 +34828,7 @@ var require_cacheUtils = __commonJS({ } function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { - if (fs30.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs31.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -34238,11 +34981,11 @@ function __metadata(metadataKey, metadataValue) { } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -34258,7 +35001,7 @@ function __awaiter(thisArg, _arguments, P, generator) { } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -34449,14 +35192,14 @@ function __asyncValues(o) { }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve13, reject) { - v = o[n](v), settle(resolve13, reject, v.done, v.value); + return new Promise(function(resolve14, reject) { + v = o[n](v), settle(resolve14, reject, v.done, v.value); }); }; } - function settle(resolve13, reject, d, v) { + function settle(resolve14, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve13({ value: v2, done: d }); + resolve14({ value: v2, done: d }); }, reject); } } @@ -34548,13 +35291,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path28, preserveJsx) { - if (typeof path28 === "string" && /^\.\.?\//.test(path28)) { - return path28.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; +function __rewriteRelativeImportExtension(path29, preserveJsx) { + if (typeof path29 === "string" && /^\.\.?\//.test(path29)) { + return path29.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext2 || !cm) ? m : d + ext2 + "." + cm.toLowerCase() + "js"; }); } - return path28; + return path29; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -34810,7 +35553,7 @@ var require_debug2 = __commonJS({ destroy, log: debugObj.log, namespace, - extend: extend3 + extend }); function debug6(...args) { if (!newDebugger.enabled) { @@ -34825,14 +35568,14 @@ var require_debug2 = __commonJS({ return newDebugger; } function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); + const index2 = debuggers.indexOf(this); + if (index2 >= 0) { + debuggers.splice(index2, 1); return true; } return false; } - function extend3(namespace) { + function extend(namespace) { const newDebugger = createDebugger(`${this.namespace}:${namespace}`); newDebugger.log = this.log; return newDebugger; @@ -34957,8 +35700,8 @@ var require_httpHeaders = __commonJS({ function normalizeName(name) { return name.toLowerCase(); } - function* headerIterator(map2) { - for (const entry of map2.values()) { + function* headerIterator(map) { + for (const entry of map.values()) { yield [entry.name, entry.value]; } } @@ -35167,12 +35910,12 @@ var require_pipeline = __commonJS({ } sendRequest(httpClient, request3) { const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { + const pipeline2 = policies.reduceRight((next, policy) => { return (req) => { return policy.sendRequest(req, next); }; }, (req) => httpClient.sendRequest(req)); - return pipeline(request3); + return pipeline2(request3); } getOrderedPolicies() { if (!this._orderedPolicies) { @@ -35315,8 +36058,8 @@ var require_object = __commonJS({ "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject3; - function isObject3(input) { + exports2.isObject = isObject2; + function isObject2(input) { return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); } } @@ -35628,9 +36371,9 @@ var require_nodeHttpClient = __commonJS({ if (stream2.readable === false) { return Promise.resolve(); } - return new Promise((resolve13) => { + return new Promise((resolve14) => { const handler2 = () => { - resolve13(); + resolve14(); stream2.removeListener("close", handler2); stream2.removeListener("end", handler2); stream2.removeListener("error", handler2); @@ -35785,8 +36528,8 @@ var require_nodeHttpClient = __commonJS({ headers: request3.headers.toJSON({ preserveCase: true }), ...request3.requestOverrides }; - return new Promise((resolve13, reject) => { - const req = isInsecure ? node_http_1.default.request(options, resolve13) : node_https_1.default.request(options, resolve13); + return new Promise((resolve14, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve14) : node_https_1.default.request(options, resolve14); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request: request3 })); }); @@ -35870,7 +36613,7 @@ var require_nodeHttpClient = __commonJS({ return stream2; } function streamToText(stream2) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const buffer = []; stream2.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { @@ -35880,7 +36623,7 @@ var require_nodeHttpClient = __commonJS({ } }); stream2.on("end", () => { - resolve13(Buffer.concat(buffer).toString("utf8")); + resolve14(Buffer.concat(buffer).toString("utf8")); }); stream2.on("error", (e) => { if (e && e?.name === "AbortError") { @@ -36012,16 +36755,16 @@ var require_userAgentPlatform = __commonJS({ function getHeaderName() { return "User-Agent"; } - async function setPlatformSpecificData(map2) { + async function setPlatformSpecificData(map) { if (node_process_1.default && node_process_1.default.versions) { const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; const versions = node_process_1.default.versions; if (versions.bun) { - map2.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { - map2.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { - map2.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", `${versions.node} (${osInfo})`); } } } @@ -36158,7 +36901,7 @@ var require_helpers2 = __commonJS({ var AbortError_js_1 = require_AbortError(); var StandardAbortMessage = "The operation was aborted."; function delay2(delayInMs, value, options) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { @@ -36181,7 +36924,7 @@ var require_helpers2 = __commonJS({ } timer = setTimeout(() => { removeListeners(); - resolve13(value); + resolve14(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); @@ -36532,30 +37275,30 @@ var require_ms = __commonJS({ var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { - return parse2(val); - } else if (type2 === "number" && isFinite(val)) { + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse3(val); + } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse2(str2) { - str2 = String(str2); - if (str2.length > 100) { + function parse3(str) { + str = String(str); + if (str.length > 100) { return; } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str2 + var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str ); - if (!match) { + if (!match2) { return; } - var n = parseFloat(match[1]); - var type2 = (match[2] || "ms").toLowerCase(); - switch (type2) { + var n = parseFloat(match2[1]); + var type = (match2[2] || "ms").toLowerCase(); + switch (type) { case "years": case "year": case "yrs": @@ -36684,20 +37427,20 @@ var require_common = __commonJS({ if (typeof args[0] !== "string") { args.unshift("%O"); } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === "%%") { + let index2 = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format) => { + if (match2 === "%%") { return "%"; } - index++; + index2++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; + const val = args[index2]; + match2 = formatter.call(self2, val); + args.splice(index2, 1); + index2--; } - return match; + return match2; }); createDebug.formatArgs.call(self2, args); const logFn = self2.log || createDebug.log; @@ -36706,7 +37449,7 @@ var require_common = __commonJS({ debug6.namespace = namespace; debug6.useColors = createDebug.useColors(); debug6.color = createDebug.selectColor(namespace); - debug6.extend = extend3; + debug6.extend = extend; debug6.destroy = createDebug.destroy; Object.defineProperty(debug6, "enabled", { enumerable: true, @@ -36730,7 +37473,7 @@ var require_common = __commonJS({ } return debug6; } - function extend3(namespace, delimiter) { + function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; @@ -36930,15 +37673,15 @@ var require_browser = __commonJS({ } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); - let index = 0; + let index2 = 0; let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { + args[0].replace(/%[a-zA-Z%]/g, (match2) => { + if (match2 === "%%") { return; } - index++; - if (match === "%c") { - lastC = index; + index2++; + if (match2 === "%c") { + lastC = index2; } }); args.splice(lastC, 0, c); @@ -37103,14 +37846,14 @@ var require_supports_color = __commonJS({ var require_node = __commonJS({ "node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); - var util = require("util"); - exports2.init = init; + var util3 = require("util"); + exports2.init = init2; exports2.log = log; exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load2; exports2.useColors = useColors; - exports2.destroy = util.deprecate( + exports2.destroy = util3.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." @@ -37241,7 +37984,7 @@ var require_node = __commonJS({ return (/* @__PURE__ */ new Date()).toISOString() + " "; } function log(...args) { - return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { @@ -37253,7 +37996,7 @@ var require_node = __commonJS({ function load2() { return process.env.DEBUG; } - function init(debug6) { + function init2(debug6) { debug6.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { @@ -37264,11 +38007,11 @@ var require_node = __commonJS({ var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); + return util3.inspect(v, this.inspectOpts); }; } }); @@ -37329,23 +38072,23 @@ var require_helpers3 = __commonJS({ return Buffer.concat(chunks, length); } exports2.toBuffer = toBuffer; - async function json2(stream2) { + async function json(stream2) { const buf = await toBuffer(stream2); - const str2 = buf.toString("utf8"); + const str = buf.toString("utf8"); try { - return JSON.parse(str2); + return JSON.parse(str); } catch (_err) { const err = _err; - err.message += ` (input: ${str2})`; + err.message += ` (input: ${str})`; throw err; } } - exports2.json = json2; + exports2.json = json; function req(url2, opts = {}) { const href = typeof url2 === "string" ? url2 : url2.href; const req2 = (href.startsWith("https:") ? https3 : http).request(url2, opts); - const promise = new Promise((resolve13, reject) => { - req2.once("response", resolve13).once("error", reject).end(); + const promise = new Promise((resolve14, reject) => { + req2.once("response", resolve14).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; @@ -37355,7 +38098,7 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -37440,9 +38183,9 @@ var require_dist = __commonJS({ return; } const sockets = this.sockets[name]; - const index = sockets.indexOf(socket); - if (index !== -1) { - sockets.splice(index, 1); + const index2 = sockets.indexOf(socket); + if (index2 !== -1) { + sockets.splice(index2, 1); this.totalSocketCount--; if (sockets.length === 0) { delete this.sockets[name]; @@ -37522,7 +38265,7 @@ var require_parse_proxy_response = __commonJS({ var debug_1 = __importDefault2(require_src()); var debug6 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { let buffersLength = 0; const buffers = []; function read() { @@ -37588,7 +38331,7 @@ var require_parse_proxy_response = __commonJS({ } debug6("got proxy server response: %o %o", firstLine, headers); cleanup(); - resolve13({ + resolve14({ connect: { statusCode, statusText, @@ -37607,7 +38350,7 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist2 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -37646,7 +38389,7 @@ var require_dist2 = __commonJS({ var tls = __importStar2(require("tls")); var assert_1 = __importDefault2(require("assert")); var debug_1 = __importDefault2(require_src()); - var agent_base_1 = require_dist(); + var agent_base_1 = require_dist2(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug6 = (0, debug_1.default)("https-proxy-agent"); @@ -37757,7 +38500,7 @@ var require_dist2 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist4 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -37796,7 +38539,7 @@ var require_dist3 = __commonJS({ var tls = __importStar2(require("tls")); var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist(); + var agent_base_1 = require_dist2(); var url_1 = require("url"); var debug6 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -37895,8 +38638,8 @@ var require_proxyPolicy = __commonJS({ exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist2(); - var http_proxy_agent_1 = require_dist3(); + var https_proxy_agent_1 = require_dist3(); + var http_proxy_agent_1 = require_dist4(); var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; @@ -37966,9 +38709,9 @@ var require_proxyPolicy = __commonJS({ } } const parsedUrl = new URL(proxyUrl); - const schema2 = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; return { - host: schema2 + parsedUrl.hostname, + host: schema + parsedUrl.hostname, port: Number.parseInt(parsedUrl.port || "80"), username: parsedUrl.username, password: parsedUrl.password @@ -38299,26 +39042,26 @@ var require_createPipelineFromOptions = __commonJS({ var tlsPolicy_js_1 = require_tlsPolicy(); var multipartPolicy_js_1 = require_multipartPolicy(); function createPipelineFromOptions(options) { - const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + const pipeline2 = (0, pipeline_js_1.createEmptyPipeline)(); if (checkEnvironment_js_1.isNodeLike) { if (options.agent) { - pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + pipeline2.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); } if (options.tlsOptions) { - pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + pipeline2.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } - pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + pipeline2.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline2.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } - pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline2.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline2.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline2.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline2.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); if (checkEnvironment_js_1.isNodeLike) { - pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline2.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); } - pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; + pipeline2.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline2; } } }); @@ -38540,21 +39283,21 @@ var require_clientHelpers = __commonJS({ var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); var cachedHttpClient; function createDefaultPipeline(options = {}) { - const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); - pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const pipeline2 = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline2.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); const { credential, authSchemes, allowInsecureConnection } = options; if (credential) { if ((0, credentials_js_1.isApiKeyCredential)(credential)) { - pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + pipeline2.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isBasicCredential)(credential)) { - pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + pipeline2.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { - pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + pipeline2.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { - pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + pipeline2.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } } - return pipeline; + return pipeline2; } function getCachedDefaultHttpsClient() { if (!cachedHttpClient) { @@ -38690,11 +39433,11 @@ var require_sendRequest = __commonJS({ var clientHelpers_js_1 = require_clientHelpers(); var typeGuards_js_1 = require_typeGuards(); var multipart_js_1 = require_multipart(); - async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { + async function sendRequest(method, url2, pipeline2, options = {}, customHttpClient) { const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); const request3 = buildPipelineRequest(method, url2, options); try { - const response = await pipeline.sendRequest(httpClient, request3); + const response = await pipeline2.sendRequest(httpClient, request3); const headers = response.headers.toJSON(); const stream2 = response.readableStreamBody ?? response.browserStreamBody; const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); @@ -38957,68 +39700,68 @@ var require_getClient = __commonJS({ var urlHelpers_js_1 = require_urlHelpers(); var checkEnvironment_js_1 = require_checkEnvironment(); function getClient(endpoint2, clientOptions = {}) { - const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + const pipeline2 = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); if (clientOptions.additionalPolicies?.length) { for (const { policy, position } of clientOptions.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; - pipeline.addPolicy(policy, { + pipeline2.addPolicy(policy, { afterPhase }); } } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path28, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path28, args, { allowInsecureConnection, ...requestOptions }); + const client = (path29, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path29, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { - return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("GET", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, post: (requestOptions = {}) => { - return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("POST", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, put: (requestOptions = {}) => { - return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("PUT", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, patch: (requestOptions = {}) => { - return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("PATCH", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, delete: (requestOptions = {}) => { - return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("DELETE", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, head: (requestOptions = {}) => { - return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("HEAD", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, options: (requestOptions = {}) => { - return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); }, trace: (requestOptions = {}) => { - return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + return buildOperation("TRACE", getUrl(requestOptions), pipeline2, requestOptions, allowInsecureConnection, httpClient); } }; }; return { path: client, pathUnchecked: client, - pipeline + pipeline: pipeline2 }; } - function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { + function buildOperation(method, url2, pipeline2, options, allowInsecureConnection, httpClient) { allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; return { then: function(onFulfilled, onrejected) { - return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline2, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); }, async asBrowserStream() { if (checkEnvironment_js_1.isNodeLike) { throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { - return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline2, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } }, async asNodeStream() { if (checkEnvironment_js_1.isNodeLike) { - return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline2, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } else { throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } @@ -39444,16 +40187,16 @@ var require_userAgentPlatform2 = __commonJS({ function getHeaderName() { return "User-Agent"; } - async function setPlatformSpecificData(map2) { + async function setPlatformSpecificData(map) { if (node_process_1.default && node_process_1.default.versions) { const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; const versions = node_process_1.default.versions; if (versions.bun) { - map2.set("Bun", `${versions.bun} (${osInfo})`); + map.set("Bun", `${versions.bun} (${osInfo})`); } else if (versions.deno) { - map2.set("Deno", `${versions.deno} (${osInfo})`); + map.set("Deno", `${versions.deno} (${osInfo})`); } else if (versions.node) { - map2.set("Node", `${versions.node} (${osInfo})`); + map.set("Node", `${versions.node} (${osInfo})`); } } } @@ -39674,7 +40417,7 @@ var require_createAbortablePromise = __commonJS({ var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } @@ -39692,7 +40435,7 @@ var require_createAbortablePromise = __commonJS({ try { buildPromise((x) => { removeListeners(); - resolve13(x); + resolve14(x); }, (x) => { removeListeners(); reject(x); @@ -39719,8 +40462,8 @@ var require_delay2 = __commonJS({ function delay2(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve13) => { - token = setTimeout(resolve13, timeInMs); + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve14) => { + token = setTimeout(resolve14, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, @@ -39802,7 +40545,7 @@ var require_commonjs4 = __commonJS({ exports2.computeSha256Hmac = computeSha256Hmac; exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; exports2.isError = isError; - exports2.isObject = isObject3; + exports2.isObject = isObject2; exports2.randomUUID = randomUUID; exports2.uint8ArrayToString = uint8ArrayToString; exports2.stringToUint8Array = stringToUint8Array; @@ -39849,7 +40592,7 @@ var require_commonjs4 = __commonJS({ function isError(e) { return tspRuntime.isError(e); } - function isObject3(input) { + function isObject2(input) { return tspRuntime.isObject(input); } function randomUUID() { @@ -40508,31 +41251,31 @@ var require_createPipelineFromOptions2 = __commonJS({ var tracingPolicy_js_1 = require_tracingPolicy(); var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + const pipeline2 = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { if (options.agent) { - pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + pipeline2.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); } if (options.tlsOptions) { - pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); - } - pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); - } - pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); - pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); - pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { + pipeline2.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline2.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline2.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline2.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); + pipeline2.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline2.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline2.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); + pipeline2.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline2.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline2.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { - pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + pipeline2.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); } - pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; + pipeline2.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline2; } } }); @@ -40925,10 +41668,10 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; const paramRegex = /(\w+)="([^"]*)"/g; const parsedChallenges = []; - let match; - while ((match = challengeRegex.exec(challenges)) !== null) { - const scheme = match[1]; - const paramsString = match[2]; + let match2; + while ((match2 = challengeRegex.exec(challenges)) !== null) { + const scheme = match2[1]; + const paramsString = match2[2]; const params = {}; let paramMatch; while ((paramMatch = paramRegex.exec(paramsString)) !== null) { @@ -41446,8 +42189,8 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - function pipelineContainsDisableKeepAlivePolicy(pipeline) { - return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); + function pipelineContainsDisableKeepAlivePolicy(pipeline2) { + return pipeline2.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } } }); @@ -41644,7 +42387,7 @@ var require_serializer = __commonJS({ * * @returns A valid serialized Javascript object */ - serialize(mapper, object, objectName, options = { xml: {} }) { + serialize(mapper, object2, objectName, options = { xml: {} }) { const updatedOptions = { xml: { rootName: options.xml.rootName ?? "", @@ -41661,40 +42404,40 @@ var require_serializer = __commonJS({ payload = []; } if (mapper.isConstant) { - object = mapper.defaultValue; + object2 = mapper.defaultValue; } const { required, nullable } = mapper; - if (required && nullable && object === void 0) { + if (required && nullable && object2 === void 0) { throw new Error(`${objectName} cannot be undefined.`); } - if (required && !nullable && (object === void 0 || object === null)) { + if (required && !nullable && (object2 === void 0 || object2 === null)) { throw new Error(`${objectName} cannot be null or undefined.`); } - if (!required && nullable === false && object === null) { + if (!required && nullable === false && object2 === null) { throw new Error(`${objectName} cannot be null.`); } - if (object === void 0 || object === null) { - payload = object; + if (object2 === void 0 || object2 === null) { + payload = object2; } else { if (mapperType.match(/^any$/i) !== null) { - payload = object; + payload = object2; } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { - payload = serializeBasicTypes(mapperType, objectName, object); + payload = serializeBasicTypes(mapperType, objectName, object2); } else if (mapperType.match(/^Enum$/i) !== null) { const enumMapper = mapper; - payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object2); } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { - payload = serializeDateTypes(mapperType, object, objectName); + payload = serializeDateTypes(mapperType, object2, objectName); } else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = serializeByteArrayType(objectName, object); + payload = serializeByteArrayType(objectName, object2); } else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = serializeBase64UrlType(objectName, object); + payload = serializeBase64UrlType(objectName, object2); } else if (mapperType.match(/^Sequence$/i) !== null) { - payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + payload = serializeSequenceType(this, mapper, object2, objectName, Boolean(this.isXML), updatedOptions); } else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + payload = serializeDictionaryType(this, mapper, object2, objectName, Boolean(this.isXML), updatedOptions); } else if (mapperType.match(/^Composite$/i) !== null) { - payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + payload = serializeCompositeType(this, mapper, object2, objectName, Boolean(this.isXML), updatedOptions); } } return payload; @@ -41782,12 +42525,12 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - function trimEnd(str2, ch) { - let len = str2.length; - while (len - 1 >= 0 && str2[len - 1] === ch) { + function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { --len; } - return str2.substr(0, len); + return str.substr(0, len); } function bufferToBase64Url(buffer) { if (!buffer) { @@ -41796,18 +42539,18 @@ var require_serializer = __commonJS({ if (!(buffer instanceof Uint8Array)) { throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); } - const str2 = base64.encodeByteArray(buffer); - return trimEnd(str2, "=").replace(/\+/g, "-").replace(/\//g, "_"); + const str = base64.encodeByteArray(buffer); + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } - function base64UrlToByteArray(str2) { - if (!str2) { + function base64UrlToByteArray(str) { + if (!str) { return void 0; } - if (str2 && typeof str2.valueOf() !== "string") { + if (str && typeof str.valueOf() !== "string") { throw new Error("Please provide an input of type string for converting to Uint8Array"); } - str2 = str2.replace(/-/g, "+").replace(/_/g, "/"); - return base64.decodeString(str2); + str = str.replace(/-/g, "+").replace(/_/g, "/"); + return base64.decodeString(str); } function splitSerializeName(prop) { const classes = []; @@ -41934,8 +42677,8 @@ var require_serializer = __commonJS({ } return value; } - function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - if (!Array.isArray(object)) { + function serializeSequenceType(serializer, mapper, object2, objectName, isXml, options) { + if (!Array.isArray(object2)) { throw new Error(`${objectName} must be of type Array.`); } let elementType = mapper.type.element; @@ -41946,8 +42689,8 @@ var require_serializer = __commonJS({ elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; - for (let i = 0; i < object.length; i++) { - const serializedValue = serializer.serialize(elementType, object[i], objectName, options); + for (let i = 0; i < object2.length; i++) { + const serializedValue = serializer.serialize(elementType, object2[i], objectName, options); if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { @@ -41964,8 +42707,8 @@ var require_serializer = __commonJS({ } return tempArray; } - function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { - if (typeof object !== "object") { + function serializeDictionaryType(serializer, mapper, object2, objectName, isXml, options) { + if (typeof object2 !== "object") { throw new Error(`${objectName} must be of type object.`); } const valueType = mapper.type.value; @@ -41973,8 +42716,8 @@ var require_serializer = __commonJS({ throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${objectName}.`); } const tempDictionary = {}; - for (const key of Object.keys(object)) { - const serializedValue = serializer.serialize(valueType, object[key], objectName, options); + for (const key of Object.keys(object2)) { + const serializedValue = serializer.serialize(valueType, object2[key], objectName, options); tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); } if (isXml && mapper.xmlNamespace) { @@ -42014,11 +42757,11 @@ var require_serializer = __commonJS({ } return modelProps; } - function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + function serializeCompositeType(serializer, mapper, object2, objectName, isXml, options) { if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + mapper = getPolymorphicMapper(serializer, mapper, object2, "clientName"); } - if (object !== void 0 && object !== null) { + if (object2 !== void 0 && object2 !== null) { const payload = {}; const modelProps = resolveModelProperties(serializer, mapper, objectName); for (const key of Object.keys(modelProps)) { @@ -42039,7 +42782,7 @@ var require_serializer = __commonJS({ propName = paths.pop(); for (const pathName of paths) { const childObject = parentObject[pathName]; - if ((childObject === void 0 || childObject === null) && (object[key] !== void 0 && object[key] !== null || propertyMapper.defaultValue !== void 0)) { + if ((childObject === void 0 || childObject === null) && (object2[key] !== void 0 && object2[key] !== null || propertyMapper.defaultValue !== void 0)) { parentObject[pathName] = {}; } parentObject = parentObject[pathName]; @@ -42054,7 +42797,7 @@ var require_serializer = __commonJS({ }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; - let toSerialize = object[key]; + let toSerialize = object2[key]; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && (toSerialize === void 0 || toSerialize === null)) { toSerialize = mapper.serializedName; @@ -42076,16 +42819,16 @@ var require_serializer = __commonJS({ const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); if (additionalPropertiesMapper) { const propNames = Object.keys(modelProps); - for (const clientPropName in object) { + for (const clientPropName in object2) { const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); if (isAdditionalProperty) { - payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object2[clientPropName], objectName + '["' + clientPropName + '"]', options); } } } return payload; } - return object; + return object2; } function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { if (!isXml || !propertyMapper.xmlNamespace) { @@ -42269,7 +43012,7 @@ var require_serializer = __commonJS({ } return void 0; } - function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + function getPolymorphicMapper(serializer, mapper, object2, polymorphicPropertyName) { const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42277,7 +43020,7 @@ var require_serializer = __commonJS({ if (polymorphicPropertyName === "serializedName") { discriminatorName = discriminatorName.replace(/\\/gi, ""); } - const discriminatorValue = object[discriminatorName]; + const discriminatorValue = object2[discriminatorName]; const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); @@ -42478,7 +43221,7 @@ var require_deserializationPolicy = __commonJS({ return result; } async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { - const parsedResponse = await parse2(jsonContentTypes, xmlContentTypes, response, options, parseXML); + const parsedResponse = await parse3(jsonContentTypes, xmlContentTypes, response, options, parseXML); if (!shouldDeserializeResponse(parsedResponse)) { return parsedResponse; } @@ -42579,7 +43322,7 @@ var require_deserializationPolicy = __commonJS({ } return { error: error3, shouldReturnResponse: false }; } - async function parse2(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { + async function parse3(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; @@ -42721,13 +43464,13 @@ var require_serializationPolicy = __commonJS({ if (request3.body !== void 0 && request3.body !== null || nullable && request3.body === null || required) { const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); request3.body = operationSpec.serializer.serialize(bodyMapper, request3.body, requestBodyParameterPathString, updatedOptions); - const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; + const isStream2 = typeName === serializer_js_1.MapperTypeNames.Stream; if (operationSpec.isXML) { const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request3.body, updatedOptions); if (typeName === serializer_js_1.MapperTypeNames.Sequence) { request3.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); - } else if (!isStream) { + } else if (!isStream2) { request3.body = stringifyXML(value, { rootName: xmlName || serializedName, xmlCharKey @@ -42735,7 +43478,7 @@ var require_serializationPolicy = __commonJS({ } } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; - } else if (!isStream) { + } else if (!isStream2) { request3.body = JSON.stringify(request3.body); } } @@ -42786,18 +43529,18 @@ var require_pipeline3 = __commonJS({ var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); + const pipeline2 = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { - pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + pipeline2.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, scopes: options.credentialOptions.credentialScopes })); } - pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); - pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { + pipeline2.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); + pipeline2.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { phase: "Deserialize" }); - return pipeline; + return pipeline2; } } }); @@ -42840,15 +43583,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path28 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path28.startsWith("/")) { - path28 = path28.substring(1); + let path29 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path29.startsWith("/")) { + path29 = path29.substring(1); } - if (isAbsoluteUrl(path28)) { - requestUrl = path28; + if (isAbsoluteUrl(path29)) { + requestUrl = path29; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path28); + requestUrl = appendPath(requestUrl, path29); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -42894,9 +43637,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path28 = pathToAppend.substring(0, searchStart); + const path29 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path28; + newPath = newPath + path29; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -42958,8 +43701,8 @@ var require_urlHelpers2 = __commonJS({ return result; } queryString = queryString.slice(1); - const pairs2 = queryString.split("&"); - for (const pair of pairs2) { + const pairs = queryString.split("&"); + for (const pair of pairs) { const [name, value] = pair.split("=", 2); const existingValue = result.get(name); if (existingValue) { @@ -45392,17 +46135,17 @@ var require_xml = __commonJS({ var fast_xml_parser_1 = require_fxp(); var xml_common_js_1 = require_xml_common(); function getCommonOptions(options) { - var _a; + var _a2; return { attributesGroupName: xml_common_js_1.XML_ATTRKEY, - textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, + textNodeName: (_a2 = options.xmlCharKey) !== null && _a2 !== void 0 ? _a2 : xml_common_js_1.XML_CHARKEY, ignoreAttributes: false, suppressBooleanAttributes: false }; } function getSerializerOptions(options = {}) { - var _a, _b; - return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); + var _a2, _b; + return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a2 = options.rootName) !== null && _a2 !== void 0 ? _a2 : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); @@ -45414,16 +46157,16 @@ var require_xml = __commonJS({ const xmlData = j2x.build(node); return `${xmlData}`.replace(/\n/g, ""); } - async function parseXML(str2, opts = {}) { - if (!str2) { + async function parseXML(str, opts = {}) { + if (!str) { throw new Error("Document is empty"); } - const validation = fast_xml_parser_1.XMLValidator.validate(str2); + const validation = fast_xml_parser_1.XMLValidator.validate(str); if (validation !== true) { throw validation; } const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); - const parsedXml = parser.parse(str2); + const parsedXml = parser.parse(str); if (parsedXml["?xml"]) { delete parsedXml["?xml"]; } @@ -45812,10 +46555,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants10(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path28 = urlParsed.pathname; - path28 = path28 || "/"; - path28 = escape2(path28); - urlParsed.pathname = path28; + let path29 = urlParsed.pathname; + path29 = path29 || "/"; + path29 = escape3(path29); + urlParsed.pathname = path29; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -45895,14 +46638,14 @@ var require_utils_common = __commonJS({ return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } - function escape2(text) { + function escape3(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path28 = urlParsed.pathname; - path28 = path28 ? path28.endsWith("/") ? `${path28}${name}` : `${path28}/${name}` : name; - urlParsed.pathname = path28; + let path29 = urlParsed.pathname; + path29 = path29 ? path29.endsWith("/") ? `${path29}${name}` : `${path29}/${name}` : name; + urlParsed.pathname = path29; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -46017,7 +46760,7 @@ var require_utils_common = __commonJS({ return base64encode(res); } async function delay2(timeInMs, aborter, abortError) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -46029,7 +46772,7 @@ var require_utils_common = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve13(); + resolve14(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -47110,8 +47853,8 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + headersArray = headersArray.filter((value, index2, array2) => { + if (index2 > 0 && value.name.toLowerCase() === array2[index2 - 1].name.toLowerCase()) { return false; } return true; @@ -47129,9 +47872,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request3) { - const path28 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; + const path29 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path28}`; + canonicalizedResourceString += `/${this.factory.accountName}${path29}`; const queries = (0, utils_common_js_1.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -47570,7 +48313,7 @@ var require_BufferScheduler = __commonJS({ * */ async do() { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); @@ -47598,11 +48341,11 @@ var require_BufferScheduler = __commonJS({ if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve13).catch(reject); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve14).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { - resolve13(); + resolve14(); } } }); @@ -47870,10 +48613,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants11(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path28 = urlParsed.pathname; - path28 = path28 || "/"; - path28 = escape2(path28); - urlParsed.pathname = path28; + let path29 = urlParsed.pathname; + path29 = path29 || "/"; + path29 = escape3(path29); + urlParsed.pathname = path29; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -47953,14 +48696,14 @@ var require_utils_common2 = __commonJS({ return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } - function escape2(text) { + function escape3(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path28 = urlParsed.pathname; - path28 = path28 ? path28.endsWith("/") ? `${path28}${name}` : `${path28}/${name}` : name; - urlParsed.pathname = path28; + let path29 = urlParsed.pathname; + path29 = path29 ? path29.endsWith("/") ? `${path29}${name}` : `${path29}/${name}` : name; + urlParsed.pathname = path29; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -48075,7 +48818,7 @@ var require_utils_common2 = __commonJS({ return base64encode(res); } async function delay2(timeInMs, aborter, abortError) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -48087,7 +48830,7 @@ var require_utils_common2 = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve13(); + resolve14(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -48862,8 +49605,8 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + headersArray = headersArray.filter((value, index2, array2) => { + if (index2 > 0 && value.name.toLowerCase() === array2[index2 - 1].name.toLowerCase()) { return false; } return true; @@ -48881,9 +49624,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request3) { - const path28 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; + const path29 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path28}`; + canonicalizedResourceString += `/${this.factory.accountName}${path29}`; const queries = (0, utils_common_js_1.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -49499,8 +50242,8 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + headersArray = headersArray.filter((value, index2, array2) => { + if (index2 > 0 && value.name.toLowerCase() === array2[index2 - 1].name.toLowerCase()) { return false; } return true; @@ -49513,9 +50256,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request3) { - const path28 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; + const path29 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path28}`; + canonicalizedResourceString += `/${options.accountName}${path29}`; const queries = (0, utils_common_js_1.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -49846,8 +50589,8 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ headersArray.sort((a, b) => { return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + headersArray = headersArray.filter((value, index2, array2) => { + if (index2 > 0 && value.name.toLowerCase() === array2[index2 - 1].name.toLowerCase()) { return false; } return true; @@ -49860,9 +50603,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request3) { - const path28 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; + const path29 = (0, utils_common_js_1.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path28}`; + canonicalizedResourceString += `/${options.accountName}${path29}`; const queries = (0, utils_common_js_1.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -50015,11 +50758,11 @@ var require_Pipeline = __commonJS({ var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); - function isPipelineLike(pipeline) { - if (!pipeline || typeof pipeline !== "object") { + function isPipelineLike(pipeline2) { + if (!pipeline2 || typeof pipeline2 !== "object") { return false; } - const castPipeline = pipeline; + const castPipeline = pipeline2; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { @@ -50059,11 +50802,11 @@ var require_Pipeline = __commonJS({ if (!credential) { credential = new AnonymousCredential_js_1.AnonymousCredential(); } - const pipeline = new Pipeline([], pipelineOptions); - pipeline._credential = credential; - return pipeline; + const pipeline2 = new Pipeline([], pipelineOptions); + pipeline2._credential = credential; + return pipeline2; } - function processDownlevelPipeline(pipeline) { + function processDownlevelPipeline(pipeline2) { const knownFactoryFunctions = [ isAnonymousCredential, isStorageSharedKeyCredential, @@ -50073,8 +50816,8 @@ var require_Pipeline = __commonJS({ isStorageTelemetryPolicyFactory, isCoreHttpPolicyFactory ]; - if (pipeline.factories.length) { - const novelFactories = pipeline.factories.filter((factory) => { + if (pipeline2.factories.length) { + const novelFactories = pipeline2.factories.filter((factory) => { return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); }); if (novelFactories.length) { @@ -50087,14 +50830,14 @@ var require_Pipeline = __commonJS({ } return void 0; } - function getCoreClientOptions(pipeline) { - const { httpClient: v1Client, ...restOptions } = pipeline.options; - let httpClient = pipeline._coreHttpClient; + function getCoreClientOptions(pipeline2) { + const { httpClient: v1Client, ...restOptions } = pipeline2.options; + let httpClient = pipeline2._coreHttpClient; if (!httpClient) { httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); - pipeline._coreHttpClient = httpClient; + pipeline2._coreHttpClient = httpClient; } - let corePipeline = pipeline._corePipeline; + let corePipeline = pipeline2._corePipeline; if (!corePipeline) { const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; @@ -50135,11 +50878,11 @@ var require_Pipeline = __commonJS({ corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); - const downlevelResults = processDownlevelPipeline(pipeline); + const downlevelResults = processDownlevelPipeline(pipeline2); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } - const credential = getCredentialFromPipeline(pipeline); + const credential = getCredentialFromPipeline(pipeline2); if ((0, core_auth_1.isTokenCredential)(credential)) { corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, @@ -50152,7 +50895,7 @@ var require_Pipeline = __commonJS({ accountKey: credential.accountKey }), { phase: "Sign" }); } - pipeline._corePipeline = corePipeline; + pipeline2._corePipeline = corePipeline; } return { ...restOptions, @@ -50161,12 +50904,12 @@ var require_Pipeline = __commonJS({ pipeline: corePipeline }; } - function getCredentialFromPipeline(pipeline) { - if (pipeline._credential) { - return pipeline._credential; + function getCredentialFromPipeline(pipeline2) { + if (pipeline2._credential) { + return pipeline2._credential; } let credential = new AnonymousCredential_js_1.AnonymousCredential(); - for (const factory of pipeline.factories) { + for (const factory of pipeline2.factories) { if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { @@ -62473,8 +63216,8 @@ var require_pageBlob = __commonJS({ * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { - return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range2, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range: range2, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -63520,13 +64263,13 @@ var require_storageClient = __commonJS({ if (!options) { options = {}; } - const defaults = { + const defaults3 = { requestContentType: "application/json; charset=utf-8" }; const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; const optionsWithDefaults = { - ...defaults, + ...defaults3, ...options, userAgentOptions: { userAgentPrefix @@ -63691,13 +64434,13 @@ var require_StorageClient = __commonJS({ * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { + constructor(url2, pipeline2) { this.url = (0, utils_common_js_1.escapeURLPath)(url2); this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url2); - this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.pipeline = pipeline2; + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline2)); this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); - this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline2); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } @@ -64634,14 +65377,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64662,7 +65405,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", @@ -64681,14 +65424,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64709,7 +65452,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", @@ -64729,14 +65472,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64762,7 +65505,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -64781,14 +65524,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64818,7 +65561,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, @@ -64837,14 +65580,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64874,7 +65617,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -64894,14 +65637,14 @@ var require_BlobSASSignatureValues = __commonJS({ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } let resource = "c"; - let timestamp2 = blobSASSignatureValues.snapshotTime; + let timestamp = blobSASSignatureValues.snapshotTime; if (blobSASSignatureValues.blobName) { resource = "b"; if (blobSASSignatureValues.snapshotTime) { resource = "bs"; } else if (blobSASSignatureValues.versionId) { resource = "bv"; - timestamp2 = blobSASSignatureValues.versionId; + timestamp = blobSASSignatureValues.versionId; } } let verifiedPermissions; @@ -64935,7 +65678,7 @@ var require_BlobSASSignatureValues = __commonJS({ blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, - timestamp2, + timestamp, blobSASSignatureValues.encryptionScope, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, @@ -65884,9 +66627,9 @@ var require_AvroParser = __commonJS({ const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; - for (const pair of pairs2) { + for (const pair of pairs) { dict[pair.key] = pair.value; } return dict; @@ -65932,17 +66675,17 @@ var require_AvroParser = __commonJS({ * Determines the AvroType from the Avro Schema. */ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema2) { - if (typeof schema2 === "string") { - return _AvroType.fromStringSchema(schema2); - } else if (Array.isArray(schema2)) { - return _AvroType.fromArraySchema(schema2); + static fromSchema(schema) { + if (typeof schema === "string") { + return _AvroType.fromStringSchema(schema); + } else if (Array.isArray(schema)) { + return _AvroType.fromArraySchema(schema); } else { - return _AvroType.fromObjectSchema(schema2); + return _AvroType.fromObjectSchema(schema); } } - static fromStringSchema(schema2) { - switch (schema2) { + static fromStringSchema(schema) { + switch (schema) { case AvroPrimitive.NULL: case AvroPrimitive.BOOLEAN: case AvroPrimitive.INT: @@ -65951,55 +66694,55 @@ var require_AvroParser = __commonJS({ case AvroPrimitive.DOUBLE: case AvroPrimitive.BYTES: case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema2); + return new AvroPrimitiveType(schema); default: - throw new Error(`Unexpected Avro type ${schema2}`); + throw new Error(`Unexpected Avro type ${schema}`); } } - static fromArraySchema(schema2) { - return new AvroUnionType(schema2.map(_AvroType.fromSchema)); + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(_AvroType.fromSchema)); } - static fromObjectSchema(schema2) { - const type2 = schema2.type; + static fromObjectSchema(schema) { + const type = schema.type; try { - return _AvroType.fromStringSchema(type2); + return _AvroType.fromStringSchema(type); } catch { } - switch (type2) { + switch (type) { case AvroComplex.RECORD: - if (schema2.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema2}`); + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - if (!schema2.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema2}`); + if (!schema.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); } const fields = {}; - if (!schema2.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema2}`); + if (!schema.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); } - for (const field of schema2.fields) { + for (const field of schema.fields) { fields[field.name] = _AvroType.fromSchema(field.type); } - return new AvroRecordType(fields, schema2.name); + return new AvroRecordType(fields, schema.name); case AvroComplex.ENUM: - if (schema2.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema2}`); + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - if (!schema2.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema2}`); + if (!schema.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); } - return new AvroEnumType(schema2.symbols); + return new AvroEnumType(schema.symbols); case AvroComplex.MAP: - if (!schema2.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema2}`); + if (!schema.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); } - return new AvroMapType(_AvroType.fromSchema(schema2.values)); + return new AvroMapType(_AvroType.fromSchema(schema.values)); case AvroComplex.ARRAY: // Unused today case AvroComplex.FIXED: // Unused today default: - throw new Error(`Unexpected Avro type ${type2} in ${schema2}`); + throw new Error(`Unexpected Avro type ${type} in ${schema}`); } } }; @@ -66048,9 +66791,9 @@ var require_AvroParser = __commonJS({ }; var AvroUnionType = class extends AvroType { _types; - constructor(types) { + constructor(types2) { super(); - this._types = types; + this._types = types2; } async read(stream2, options = {}) { const typeIndex = await AvroParser.readInt(stream2, options); @@ -66170,8 +66913,8 @@ var require_AvroReader = __commonJS({ this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); - this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); + const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } @@ -66285,7 +67028,7 @@ var require_AvroReadableFromStream = __commonJS({ this._position += chunk.length; return this.toUint8Array(chunk); } else { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const cleanUp = () => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); @@ -66300,7 +67043,7 @@ var require_AvroReadableFromStream = __commonJS({ if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); - resolve13(this.toUint8Array(callbackChunk)); + resolve14(this.toUint8Array(callbackChunk)); } }; const rejectCallback = () => { @@ -66392,11 +67135,11 @@ var require_BlobQuickQueryStream = __commonJS({ break; } const obj = avroNext.value; - const schema2 = obj.$schema; - if (typeof schema2 !== "string") { + const schema = obj.$schema; + if (typeof schema !== "string") { throw Error("Missing schema in avro record."); } - switch (schema2) { + switch (schema) { case "com.microsoft.azure.storage.queryBlobContents.resultData": { const data = obj.data; @@ -66456,7 +67199,7 @@ var require_BlobQuickQueryStream = __commonJS({ } break; default: - throw Error(`Unknown schema ${schema2} in avro progress record.`); + throw Error(`Unknown schema ${schema} in avro progress record.`); } } while (!avroNext.done && !this.avroPaused); } @@ -67029,8 +67772,8 @@ var require_operation = __commonJS({ return processResult ? processResult(response, state) : response; } async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); + const { init: init2, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init2(); if (operationLocation) withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); const config = { @@ -67133,7 +67876,7 @@ var require_operation2 = __commonJS({ return rawResponse.headers["azure-asyncoperation"]; } function findResourceLocation(inputs) { - var _a; + var _a2; const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; switch (requestMethod) { case "PUT": { @@ -67143,7 +67886,7 @@ var require_operation2 = __commonJS({ return void 0; } case "PATCH": { - return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + return (_a2 = getDefault()) !== null && _a2 !== void 0 ? _a2 : requestPath; } default: { return getDefault(); @@ -67225,13 +67968,13 @@ var require_operation2 = __commonJS({ } } function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + var _a2; + const { status } = (_a2 = rawResponse.body) !== null && _a2 !== void 0 ? _a2 : {}; return transformStatus({ status, statusCode: rawResponse.statusCode }); } function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + var _a2, _b; + const { properties, provisioningState } = (_a2 = rawResponse.body) !== null && _a2 !== void 0 ? _a2 : {}; const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; return transformStatus({ status, statusCode: rawResponse.statusCode }); } @@ -67277,8 +68020,8 @@ var require_operation2 = __commonJS({ function getStatusFromInitialResponse(inputs) { const { response, state, operationLocation } = inputs; function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + var _a2; + const mode = (_a2 = state.config.metadata) === null || _a2 === void 0 ? void 0 : _a2["mode"]; switch (mode) { case void 0: return toOperationStatus(response.rawResponse.statusCode); @@ -67313,8 +68056,8 @@ var require_operation2 = __commonJS({ } exports2.initHttpOperation = initHttpOperation; function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + var _a2; + const mode = (_a2 = state.config.metadata) === null || _a2 === void 0 ? void 0 : _a2["mode"]; switch (mode) { case "OperationLocation": { return getOperationLocationPollingUrl({ @@ -67333,8 +68076,8 @@ var require_operation2 = __commonJS({ } exports2.getOperationLocation = getOperationLocation; function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + var _a2; + const mode = (_a2 = state.config.metadata) === null || _a2 === void 0 ? void 0 : _a2["mode"]; switch (mode) { case "OperationLocation": { return getStatus(rawResponse); @@ -67351,8 +68094,8 @@ var require_operation2 = __commonJS({ } exports2.getOperationStatus = getOperationStatus; function accessBodyProperty({ flatResponse, rawResponse }, prop) { - var _a, _b; - return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + var _a2, _b; + return (_a2 = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a2 !== void 0 ? _a2 : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; } function getResourceLocation(res, state) { const loc = accessBodyProperty(res, "resourceLocation"); @@ -67424,7 +68167,7 @@ var require_poller = __commonJS({ }); function buildCreatePoller(inputs) { const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { + return async ({ init: init2, poll }, options) => { const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; const stateProxy = createStateProxy(); const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { @@ -67438,7 +68181,7 @@ var require_poller = __commonJS({ }; })() : void 0; const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ - init, + init: init2, stateProxy, processResult, getOperationStatus: getStatusFromInitialResponse, @@ -67639,7 +68382,7 @@ var require_operation3 = __commonJS({ this.pollerConfig = pollerConfig; } async update(options) { - var _a; + var _a2; const stateProxy = createStateProxy(); if (!this.state.isStarted) { this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ @@ -67667,7 +68410,7 @@ var require_operation3 = __commonJS({ setErrorAsResult: this.setErrorAsResult }); } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + (_a2 = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a2 === void 0 ? void 0 : _a2.call(options, this.state); return this; } async cancel() { @@ -67780,8 +68523,8 @@ var require_poller3 = __commonJS({ this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; - this.promise = new Promise((resolve13, reject) => { - this.resolve = resolve13; + this.promise = new Promise((resolve14, reject) => { + this.resolve = resolve14; this.reject = reject; }); this.promise.catch(() => { @@ -68034,7 +68777,7 @@ var require_lroEngine = __commonJS({ * The method used by the poller to wait before attempting to update its operation. */ delay() { - return new Promise((resolve13) => setTimeout(() => resolve13(), this.config.intervalInMs)); + return new Promise((resolve14) => setTimeout(() => resolve14(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; @@ -68163,7 +68906,7 @@ var require_BlobStartCopyFromUrlPoller = __commonJS({ } return makeBlobBeginCopyFromURLPollOperation(state); }; - var toString3 = function toString4() { + var toString2 = function toString3() { return JSON.stringify({ state: this.state }, (key, value) => { if (key === "blobClient") { return void 0; @@ -68175,7 +68918,7 @@ var require_BlobStartCopyFromUrlPoller = __commonJS({ return { state: { ...state }, cancel, - toString: toString3, + toString: toString2, update }; } @@ -68280,8 +69023,8 @@ var require_Batch = __commonJS({ return Promise.resolve(); } this.parallelExecute(); - return new Promise((resolve13, reject) => { - this.emitter.on("finish", resolve13); + return new Promise((resolve14, reject) => { + this.emitter.on("finish", resolve14); this.emitter.on("error", (error3) => { this.state = BatchStates.Error; reject(error3); @@ -68342,12 +69085,12 @@ var require_utils6 = __commonJS({ async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); - resolve13(); + resolve14(); return; } let chunk = stream2.read(); @@ -68366,7 +69109,7 @@ var require_utils6 = __commonJS({ if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } - resolve13(); + resolve14(); }); stream2.on("error", (msg) => { clearTimeout(timeout); @@ -68377,7 +69120,7 @@ var require_utils6 = __commonJS({ async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { stream2.on("readable", () => { let chunk = stream2.read(); if (!chunk) { @@ -68394,25 +69137,25 @@ var require_utils6 = __commonJS({ pos += chunk.length; }); stream2.on("end", () => { - resolve13(pos); + resolve14(pos); }); stream2.on("error", reject); }); } async function streamToBuffer3(readableStream, encoding) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { - resolve13(Buffer.concat(chunks)); + resolve14(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); @@ -68420,7 +69163,7 @@ var require_utils6 = __commonJS({ ws.on("error", (err) => { reject(err); }); - ws.on("close", resolve13); + ws.on("close", resolve14); rs.pipe(ws); }); } @@ -68480,21 +69223,21 @@ var require_Clients = __commonJS({ } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; - let pipeline; + let pipeline2; let url2; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; + pipeline2 = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; @@ -68506,20 +69249,20 @@ var require_Clients = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url2, pipeline2); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); @@ -69359,7 +70102,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -69370,7 +70113,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, this.credential).toString(); - resolve13((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve14((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -69409,7 +70152,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, @@ -69417,7 +70160,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); - resolve13((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve14((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -69505,19 +70248,19 @@ var require_Clients = __commonJS({ */ appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; + let pipeline2; let url2; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; + pipeline2 = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url2 = urlOrConnectionString; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; @@ -69529,20 +70272,20 @@ var require_Clients = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url2, pipeline2); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -69778,22 +70521,22 @@ var require_Clients = __commonJS({ */ blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; + let pipeline2; let url2; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; + pipeline2 = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; @@ -69805,20 +70548,20 @@ var require_Clients = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url2, pipeline2); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -70390,19 +71133,19 @@ var require_Clients = __commonJS({ */ pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { - let pipeline; + let pipeline2; let url2; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; + pipeline2 = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url2 = urlOrConnectionString; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; @@ -70414,20 +71157,20 @@ var require_Clients = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url2, pipeline2); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -71132,8 +71875,8 @@ var require_BatchUtils = __commonJS({ buffer = buffer.slice(0, responseLength); return buffer.toString(); } - function utf8ByteLength(str2) { - return Buffer.byteLength(str2); + function utf8ByteLength(str) { + return Buffer.byteLength(str); } } }); @@ -71185,8 +71928,8 @@ var require_BatchResponseParser = __commonJS({ const deserializedSubResponses = new Array(subResponseCount); let subResponsesSucceededCount = 0; let subResponsesFailedCount = 0; - for (let index = 0; index < subResponseCount; index++) { - const subResponse = subResponses[index]; + for (let index2 = 0; index2 < subResponseCount; index2++) { + const subResponse = subResponses[index2]; const deserializedSubResponse = {}; deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); @@ -71234,7 +71977,7 @@ var require_BatchResponseParser = __commonJS({ deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index2}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -71272,14 +72015,14 @@ var require_Mutex = __commonJS({ * @param key - lock key */ static async lock(key) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; - resolve13(); + resolve14(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; - resolve13(); + resolve14(); }); } }); @@ -71290,12 +72033,12 @@ var require_Mutex = __commonJS({ * @param key - */ static async unlock(key) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; - resolve13(); + resolve14(); }); } static keys = {}; @@ -71492,10 +72235,10 @@ var require_BlobBatch = __commonJS({ accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline_js_1.Pipeline([]); - pipeline._credential = credential; - pipeline._corePipeline = corePipeline; - return pipeline; + const pipeline2 = new Pipeline_js_1.Pipeline([]); + pipeline2._credential = credential; + pipeline2._corePipeline = corePipeline; + return pipeline2; } appendSubRequestToBody(request3) { this.body += [ @@ -71517,8 +72260,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path28 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path28 || path28 === "") { + const path29 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path29 || path29 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -71587,17 +72330,17 @@ var require_BlobBatchClient = __commonJS({ var BlobBatchClient = class { serviceOrContainerContext; constructor(url2, credentialOrPipeline, options) { - let pipeline; + let pipeline2; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { - pipeline = credentialOrPipeline; + pipeline2 = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path28 = (0, utils_common_js_1.getURLPath)(url2); - if (path28 && path28 !== "/") { + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline2)); + const path29 = (0, utils_common_js_1.getURLPath)(url2); + if (path29 && path29 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -71758,18 +72501,18 @@ var require_ContainerClient = __commonJS({ return this._containerName; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { - let pipeline; + let pipeline2; let url2; options = options || {}; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; + pipeline2 = credentialOrPipelineOrContainerName; } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { url2 = urlOrConnectionString; - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { url2 = urlOrConnectionString; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); @@ -71780,20 +72523,20 @@ var require_ContainerClient = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url2, pipeline2); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -72898,7 +73641,7 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -72906,7 +73649,7 @@ var require_ContainerClient = __commonJS({ containerName: this._containerName, ...options }, this.credential).toString(); - resolve13((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve14((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -72941,12 +73684,12 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve13) => { + return new Promise((resolve14) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); - resolve13((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve14((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -73471,28 +74214,28 @@ var require_BlobServiceClient = __commonJS({ if (!options.proxyOptions) { options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); - return new _BlobServiceClient(extractedCreds.url, pipeline); + const pipeline2 = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + return new _BlobServiceClient(extractedCreds.url, pipeline2); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); - return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + const pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline2); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } constructor(url2, credentialOrPipeline, options) { - let pipeline; + let pipeline2; if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { - pipeline = credentialOrPipeline; + pipeline2 = credentialOrPipeline; } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { - pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + pipeline2 = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url2, pipeline2); this.serviceContext = this.storageClientContext.service; } /** @@ -74342,11 +75085,11 @@ var require_uploadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -74362,7 +75105,7 @@ var require_uploadUtils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -74455,10 +75198,10 @@ var require_uploadUtils = __commonJS({ exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a; + var _a2; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); + const uploadProgress = new UploadProgress((_a2 = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a2 !== void 0 ? _a2 : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, @@ -74529,11 +75272,11 @@ var require_requestUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -74549,7 +75292,7 @@ var require_requestUtils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -74589,7 +75332,7 @@ var require_requestUtils = __commonJS({ } function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => setTimeout(resolve13, milliseconds)); + return new Promise((resolve14) => setTimeout(resolve14, milliseconds)); }); } function retry2(name_1, method_1, getStatusCode_1) { @@ -74664,7 +75407,7 @@ var require_requestUtils = __commonJS({ }); // node_modules/@azure/abort-controller/dist/index.js -var require_dist4 = __commonJS({ +var require_dist5 = __commonJS({ "node_modules/@azure/abort-controller/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74719,9 +75462,9 @@ var require_dist4 = __commonJS({ throw new TypeError("Expected `this` to be an instance of AbortSignal."); } const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); + const index2 = listeners.indexOf(listener); + if (index2 > -1) { + listeners.splice(index2, 1); } } /** @@ -74850,11 +75593,11 @@ var require_downloadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -74870,7 +75613,7 @@ var require_downloadUtils = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -74884,17 +75627,17 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); - var util = __importStar2(require("util")); + var util3 = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist4(); + var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { return __awaiter2(this, void 0, void 0, function* () { - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(response.message, output); + const pipeline2 = util3.promisify(stream2.pipeline); + yield pipeline2(response.message, output); }); } var DownloadProgress = class { @@ -74995,7 +75738,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { - const writeStream = fs30.createWriteStream(archivePath); + const writeStream = fs31.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -75019,8 +75762,8 @@ var require_downloadUtils = __commonJS({ } function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a; - const archiveDescriptor = yield fs30.promises.open(archivePath, "w"); + var _a2; + const archiveDescriptor = yield fs31.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -75067,7 +75810,7 @@ var require_downloadUtils = __commonJS({ while (nextDownload = downloads.pop()) { activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); actives++; - if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) { + if (actives >= ((_a2 = options.downloadConcurrency) !== null && _a2 !== void 0 ? _a2 : 10)) { yield waitAndWrite(); } } @@ -75120,7 +75863,7 @@ var require_downloadUtils = __commonJS({ } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { - var _a; + var _a2; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -75129,14 +75872,14 @@ var require_downloadUtils = __commonJS({ } }); const properties = yield client.getProperties(); - const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; + const contentLength = (_a2 = properties.contentLength) !== null && _a2 !== void 0 ? _a2 : -1; if (contentLength < 0) { core31.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs30.openSync(archivePath, "w"); + const fd = fs31.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -75154,20 +75897,20 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs30.writeFileSync(fd, result); + fs31.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs30.closeSync(fd); + fs31.closeSync(fd); } } }); } var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; - const timeoutPromise = new Promise((resolve13) => { - timeoutHandle = setTimeout(() => resolve13("timeout"), timeoutMs); + const timeoutPromise = new Promise((resolve14) => { + timeoutHandle = setTimeout(() => resolve14("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); @@ -75297,6 +76040,9 @@ var require_config = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isGhes = isGhes; exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheMode = getCacheMode; + exports2.isCacheReadable = isCacheReadable; + exports2.isCacheWritable = isCacheWritable; exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); @@ -75311,6 +76057,20 @@ var require_config = __commonJS({ return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } + var KNOWN_CACHE_MODES = ["none", "read", "write", "write-only"]; + function getCacheMode() { + return (process.env["ACTIONS_CACHE_MODE"] || "").trim().toLowerCase(); + } + function isCacheReadable(mode) { + if (!KNOWN_CACHE_MODES.includes(mode)) + return true; + return mode === "read" || mode === "write"; + } + function isCacheWritable(mode) { + if (!KNOWN_CACHE_MODES.includes(mode)) + return true; + return mode === "write" || mode === "write-only"; + } function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -75330,7 +76090,7 @@ var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "5.0.5", + version: "5.2.0", preview: true, description: "Actions cache lib", keywords: [ @@ -75448,11 +76208,11 @@ var require_cacheHttpClient = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -75468,7 +76228,7 @@ var require_cacheHttpClient = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -75481,7 +76241,7 @@ var require_cacheHttpClient = __commonJS({ var core31 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -75489,6 +76249,7 @@ var require_cacheHttpClient = __commonJS({ var options_1 = require_options(); var requestUtils_1 = require_requestUtils(); var config_1 = require_config(); + var constants_1 = require_constants7(); var user_agent_1 = require_user_agent(); function getCacheApiUrl(resource) { const baseUrl = (0, config_1.getCacheServiceURL)(); @@ -75499,8 +76260,8 @@ var require_cacheHttpClient = __commonJS({ core31.debug(`Resource Url: ${url2}`); return url2; } - function createAcceptHeader(type2, apiVersion) { - return `${type2};api-version=${apiVersion}`; + function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } function getRequestOptions() { const requestOptions = { @@ -75517,6 +76278,7 @@ var require_cacheHttpClient = __commonJS({ } function getCacheEntry(keys, paths, options) { return __awaiter2(this, void 0, void 0, function* () { + var _a2; const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; @@ -75530,6 +76292,10 @@ var require_cacheHttpClient = __commonJS({ return null; } if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) { + const errorMessage = (_a2 = response.error) === null || _a2 === void 0 ? void 0 : _a2.message; + if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.includes(constants_1.CacheReadDeniedMessagePrefix)) { + throw new Error(errorMessage); + } throw new Error(`Cache service responded with ${response.statusCode}`); } const cacheResult = response.result; @@ -75616,7 +76382,7 @@ Other caches with similar key:`); return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs30.openSync(archivePath, "r"); + const fd = fs31.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -75630,7 +76396,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs30.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs31.createReadStream(archivePath, { fd, start, end, @@ -75641,7 +76407,7 @@ Other caches with similar key:`); } }))); } finally { - fs30.closeSync(fd); + fs31.closeSync(fd); } return; }); @@ -76583,8 +77349,8 @@ var require_binary_writer = __commonJS({ * * Generated code should compute the tag ahead of time and call `uint32()`. */ - tag(fieldNo, type2) { - return this.uint32((fieldNo << 3 | type2) >>> 0); + tag(fieldNo, type) { + return this.uint32((fieldNo << 3 | type) >>> 0); } /** * Write a chunk of raw bytes. @@ -76758,9 +77524,9 @@ var require_json_format_contract = __commonJS({ } exports2.jsonWriteOptions = jsonWriteOptions; function mergeJsonOptions(a, b) { - var _a, _b; + var _a2, _b; let c = Object.assign(Object.assign({}, a), b); - c.typeRegistry = [...(_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : [], ...(_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : []]; + c.typeRegistry = [...(_a2 = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a2 !== void 0 ? _a2 : [], ...(_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : []]; return c; } exports2.mergeJsonOptions = mergeJsonOptions; @@ -76846,8 +77612,8 @@ var require_reflection_info = __commonJS({ RepeatType2[RepeatType2["UNPACKED"] = 2] = "UNPACKED"; })(RepeatType = exports2.RepeatType || (exports2.RepeatType = {})); function normalizeFieldInfo(field) { - var _a, _b, _c, _d; - field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name); + var _a2, _b, _c, _d; + field.localName = (_a2 = field.localName) !== null && _a2 !== void 0 ? _a2 : lower_camel_case_1.lowerCamelCase(field.name); field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name); field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO; field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : field.repeat ? false : field.oneof ? false : field.kind == "message"; @@ -76855,14 +77621,14 @@ var require_reflection_info = __commonJS({ } exports2.normalizeFieldInfo = normalizeFieldInfo; function readFieldOptions(messageType, fieldName, extensionName, extensionType) { - var _a; - const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; + var _a2; + const options = (_a2 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a2 === void 0 ? void 0 : _a2.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } exports2.readFieldOptions = readFieldOptions; function readFieldOption(messageType, fieldName, extensionName, extensionType) { - var _a; - const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options; + var _a2; + const options = (_a2 = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a2 === void 0 ? void 0 : _a2.options; if (!options) { return void 0; } @@ -76958,8 +77724,8 @@ var require_reflection_type_check = __commonJS({ var oneof_1 = require_oneof(); var ReflectionTypeCheck = class { constructor(info8) { - var _a; - this.fields = (_a = info8.fields) !== null && _a !== void 0 ? _a : []; + var _a2; + this.fields = (_a2 = info8.fields) !== null && _a2 !== void 0 ? _a2 : []; } prepare() { if (this.data) @@ -77088,31 +77854,31 @@ var require_reflection_type_check = __commonJS({ } return true; } - message(arg, type2, allowExcessProperties, depth) { + message(arg, type, allowExcessProperties, depth) { if (allowExcessProperties) { - return type2.isAssignable(arg, depth); + return type.isAssignable(arg, depth); } - return type2.is(arg, depth); + return type.is(arg, depth); } - messages(arg, type2, allowExcessProperties, depth) { + messages(arg, type, allowExcessProperties, depth) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (allowExcessProperties) { for (let i = 0; i < arg.length && i < depth; i++) - if (!type2.isAssignable(arg[i], depth - 1)) + if (!type.isAssignable(arg[i], depth - 1)) return false; } else { for (let i = 0; i < arg.length && i < depth; i++) - if (!type2.is(arg[i], depth - 1)) + if (!type.is(arg[i], depth - 1)) return false; } return true; } - scalar(arg, type2, longType) { + scalar(arg, type, longType) { let argType = typeof arg; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.UINT64: case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.INT64: @@ -77139,31 +77905,31 @@ var require_reflection_type_check = __commonJS({ return argType == "number" && Number.isInteger(arg); } } - scalars(arg, type2, depth, longType) { + scalars(arg, type, depth, longType) { if (!Array.isArray(arg)) return false; if (depth < 2) return true; if (Array.isArray(arg)) { for (let i = 0; i < arg.length && i < depth; i++) - if (!this.scalar(arg[i], type2, longType)) + if (!this.scalar(arg[i], type, longType)) return false; } return true; } - mapKeys(map2, type2, depth) { - let keys = Object.keys(map2); - switch (type2) { + mapKeys(map, type, depth) { + let keys = Object.keys(map); + switch (type) { case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => parseInt(k)), type, depth); case reflection_info_1.ScalarType.BOOL: - return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type2, depth); + return this.scalars(keys.slice(0, depth).map((k) => k == "true" ? true : k == "false" ? false : k), type, depth); default: - return this.scalars(keys, type2, depth, reflection_info_1.LongType.STRING); + return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING); } } }; @@ -77178,8 +77944,8 @@ var require_reflection_long_convert = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionLongConvert = void 0; var reflection_info_1 = require_reflection_info(); - function reflectionLongConvert(long, type2) { - switch (type2) { + function reflectionLongConvert(long, type) { + switch (type) { case reflection_info_1.LongType.BIGINT: return long.toBigInt(); case reflection_info_1.LongType.NUMBER: @@ -77209,10 +77975,10 @@ var require_reflection_json_reader = __commonJS({ this.info = info8; } prepare() { - var _a; + var _a2; if (this.fMap === void 0) { this.fMap = {}; - const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; + const fieldsInput = (_a2 = this.info.fields) !== null && _a2 !== void 0 ? _a2 : []; for (const field of fieldsInput) { this.fMap[field.name] = field; this.fMap[field.jsonName] = field; @@ -77347,89 +78113,89 @@ var require_reflection_json_reader = __commonJS({ * * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`). */ - enum(type2, json2, fieldName, ignoreUnknownFields) { - if (type2[0] == "google.protobuf.NullValue") - assert_1.assert(json2 === null || json2 === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type2[0]} only accepts null.`); - if (json2 === null) + enum(type, json, fieldName, ignoreUnknownFields) { + if (type[0] == "google.protobuf.NullValue") + assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`); + if (json === null) return 0; - switch (typeof json2) { + switch (typeof json) { case "number": - assert_1.assert(Number.isInteger(json2), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json2}.`); - return json2; + assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`); + return json; case "string": - let localEnumName = json2; - if (type2[2] && json2.substring(0, type2[2].length) === type2[2]) - localEnumName = json2.substring(type2[2].length); - let enumNumber = type2[1][localEnumName]; + let localEnumName = json; + if (type[2] && json.substring(0, type[2].length) === type[2]) + localEnumName = json.substring(type[2].length); + let enumNumber = type[1][localEnumName]; if (typeof enumNumber === "undefined" && ignoreUnknownFields) { return false; } - assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type2[0]} has no value for "${json2}".`); + assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`); return enumNumber; } - assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json2}".`); + assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`); } - scalar(json2, type2, longType, fieldName) { + scalar(json, type, longType, fieldName) { let e; try { - switch (type2) { + switch (type) { // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity". // Either numbers or strings are accepted. Exponent notation is also accepted. case reflection_info_1.ScalarType.DOUBLE: case reflection_info_1.ScalarType.FLOAT: - if (json2 === null) + if (json === null) return 0; - if (json2 === "NaN") + if (json === "NaN") return Number.NaN; - if (json2 === "Infinity") + if (json === "Infinity") return Number.POSITIVE_INFINITY; - if (json2 === "-Infinity") + if (json === "-Infinity") return Number.NEGATIVE_INFINITY; - if (json2 === "") { + if (json === "") { e = "empty string"; break; } - if (typeof json2 == "string" && json2.trim().length !== json2.length) { + if (typeof json == "string" && json.trim().length !== json.length) { e = "extra whitespace"; break; } - if (typeof json2 != "string" && typeof json2 != "number") { + if (typeof json != "string" && typeof json != "number") { break; } - let float2 = Number(json2); - if (Number.isNaN(float2)) { + let float = Number(json); + if (Number.isNaN(float)) { e = "not a number"; break; } - if (!Number.isFinite(float2)) { + if (!Number.isFinite(float)) { e = "too large or small"; break; } - if (type2 == reflection_info_1.ScalarType.FLOAT) - assert_1.assertFloat32(float2); - return float2; + if (type == reflection_info_1.ScalarType.FLOAT) + assert_1.assertFloat32(float); + return float; // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.FIXED32: case reflection_info_1.ScalarType.SFIXED32: case reflection_info_1.ScalarType.SINT32: case reflection_info_1.ScalarType.UINT32: - if (json2 === null) + if (json === null) return 0; let int32; - if (typeof json2 == "number") - int32 = json2; - else if (json2 === "") + if (typeof json == "number") + int32 = json; + else if (json === "") e = "empty string"; - else if (typeof json2 == "string") { - if (json2.trim().length !== json2.length) + else if (typeof json == "string") { + if (json.trim().length !== json.length) e = "extra whitespace"; else - int32 = Number(json2); + int32 = Number(json); } if (int32 === void 0) break; - if (type2 == reflection_info_1.ScalarType.UINT32) + if (type == reflection_info_1.ScalarType.UINT32) assert_1.assertUInt32(int32); else assert_1.assertInt32(int32); @@ -77438,53 +78204,53 @@ var require_reflection_json_reader = __commonJS({ case reflection_info_1.ScalarType.INT64: case reflection_info_1.ScalarType.SFIXED64: case reflection_info_1.ScalarType.SINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType); case reflection_info_1.ScalarType.FIXED64: case reflection_info_1.ScalarType.UINT64: - if (json2 === null) + if (json === null) return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType); - if (typeof json2 != "number" && typeof json2 != "string") + if (typeof json != "number" && typeof json != "string") break; - return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json2), longType); + return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType); // bool: case reflection_info_1.ScalarType.BOOL: - if (json2 === null) + if (json === null) return false; - if (typeof json2 !== "boolean") + if (typeof json !== "boolean") break; - return json2; + return json; // string: case reflection_info_1.ScalarType.STRING: - if (json2 === null) + if (json === null) return ""; - if (typeof json2 !== "string") { + if (typeof json !== "string") { e = "extra whitespace"; break; } try { - encodeURIComponent(json2); + encodeURIComponent(json); } catch (e2) { e2 = "invalid UTF8"; break; } - return json2; + return json; // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. // Either standard or URL-safe base64 encoding with/without paddings are accepted. case reflection_info_1.ScalarType.BYTES: - if (json2 === null || json2 === "") + if (json === null || json === "") return new Uint8Array(0); - if (typeof json2 !== "string") + if (typeof json !== "string") break; - return base64_1.base64decode(json2); + return base64_1.base64decode(json); } } catch (error3) { e = error3.message; } - this.assert(false, fieldName + (e ? " - " + e : ""), json2); + this.assert(false, fieldName + (e ? " - " + e : ""), json); } }; exports2.ReflectionJsonReader = ReflectionJsonReader; @@ -77503,19 +78269,19 @@ var require_reflection_json_writer = __commonJS({ var assert_1 = require_assert(); var ReflectionJsonWriter = class { constructor(info8) { - var _a; - this.fields = (_a = info8.fields) !== null && _a !== void 0 ? _a : []; + var _a2; + this.fields = (_a2 = info8.fields) !== null && _a2 !== void 0 ? _a2 : []; } /** * Converts the message to a JSON object, based on the field descriptors. */ write(message, options) { - const json2 = {}, source = message; + const json = {}, source = message; for (const field of this.fields) { if (!field.oneof) { let jsonValue2 = this.field(field, source[field.localName], options); if (jsonValue2 !== void 0) - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue2; continue; } const group = source[field.oneof]; @@ -77524,9 +78290,9 @@ var require_reflection_json_writer = __commonJS({ const opt = field.kind == "scalar" || field.kind == "enum" ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options; let jsonValue = this.field(field, group[field.localName], opt); assert_1.assert(jsonValue !== void 0); - json2[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; + json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue; } - return json2; + return json; } field(field, value, options) { let jsonValue = void 0; @@ -77610,8 +78376,8 @@ var require_reflection_json_writer = __commonJS({ /** * Returns `null` as the default for google.protobuf.NullValue. */ - enum(type2, value, fieldName, optional2, emitDefaultValues, enumAsInteger) { - if (type2[0] == "google.protobuf.NullValue") + enum(type, value, fieldName, optional2, emitDefaultValues, enumAsInteger) { + if (type[0] == "google.protobuf.NullValue") return !emitDefaultValues && !optional2 ? void 0 : null; if (value === void 0) { assert_1.assert(optional2); @@ -77621,24 +78387,24 @@ var require_reflection_json_writer = __commonJS({ return void 0; assert_1.assert(typeof value == "number"); assert_1.assert(Number.isInteger(value)); - if (enumAsInteger || !type2[1].hasOwnProperty(value)) + if (enumAsInteger || !type[1].hasOwnProperty(value)) return value; - if (type2[2]) - return type2[2] + type2[1][value]; - return type2[1][value]; + if (type[2]) + return type[2] + type[1][value]; + return type[1][value]; } - message(type2, value, fieldName, options) { + message(type, value, fieldName, options) { if (value === void 0) return options.emitDefaultValues ? null : void 0; - return type2.internalJsonWrite(value, options); + return type.internalJsonWrite(value, options); } - scalar(type2, value, fieldName, optional2, emitDefaultValues) { + scalar(type, value, fieldName, optional2, emitDefaultValues) { if (value === void 0) { assert_1.assert(optional2); return void 0; } const ed = emitDefaultValues || optional2; - switch (type2) { + switch (type) { // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted. case reflection_info_1.ScalarType.INT32: case reflection_info_1.ScalarType.SFIXED32: @@ -77720,8 +78486,8 @@ var require_reflection_scalar_default = __commonJS({ var reflection_info_1 = require_reflection_info(); var reflection_long_convert_1 = require_reflection_long_convert(); var pb_long_1 = require_pb_long(); - function reflectionScalarDefault(type2, longType = reflection_info_1.LongType.STRING) { - switch (type2) { + function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) { + switch (type) { case reflection_info_1.ScalarType.BOOL: return false; case reflection_info_1.ScalarType.UINT64: @@ -77761,9 +78527,9 @@ var require_reflection_binary_reader = __commonJS({ this.info = info8; } prepare() { - var _a; + var _a2; if (!this.fieldNoToField) { - const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : []; + const fieldsInput = (_a2 = this.info.fields) !== null && _a2 !== void 0 ? _a2 : []; this.fieldNoToField = new Map(fieldsInput.map((field) => [field.no, field])); } } @@ -77881,8 +78647,8 @@ var require_reflection_binary_reader = __commonJS({ } return [key, val]; } - scalar(reader, type2, longType) { - switch (type2) { + scalar(reader, type, longType) { + switch (type) { case reflection_info_1.ScalarType.INT32: return reader.int32(); case reflection_info_1.ScalarType.STRING: @@ -78033,8 +78799,8 @@ var require_reflection_binary_writer = __commonJS({ /** * Write a single scalar value. */ - scalar(writer, type2, fieldNo, value, emitDefault) { - let [wireType, method, isDefault] = this.scalarInfo(type2, value); + scalar(writer, type, fieldNo, value, emitDefault) { + let [wireType, method, isDefault] = this.scalarInfo(type, value); if (!isDefault || emitDefault) { writer.tag(fieldNo, wireType); writer[method](value); @@ -78043,13 +78809,13 @@ var require_reflection_binary_writer = __commonJS({ /** * Write an array of scalar values in packed format. */ - packed(writer, type2, fieldNo, value) { + packed(writer, type, fieldNo, value) { if (!value.length) return; - assert_1.assert(type2 !== reflection_info_1.ScalarType.BYTES && type2 !== reflection_info_1.ScalarType.STRING); + assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING); writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited); writer.fork(); - let [, method] = this.scalarInfo(type2); + let [, method] = this.scalarInfo(type); for (let i = 0; i < value.length; i++) writer[method](value[i]); writer.join(); @@ -78064,12 +78830,12 @@ var require_reflection_binary_writer = __commonJS({ * * If argument `value` is omitted, [2] is always false. */ - scalarInfo(type2, value) { + scalarInfo(type, value) { let t = binary_format_contract_1.WireType.Varint; let m; let i = value === void 0; let d = value === 0; - switch (type2) { + switch (type) { case reflection_info_1.ScalarType.INT32: m = "int32"; break; @@ -78147,9 +78913,9 @@ var require_reflection_create = __commonJS({ exports2.reflectionCreate = void 0; var reflection_scalar_default_1 = require_reflection_scalar_default(); var message_type_contract_1 = require_message_type_contract(); - function reflectionCreate(type2) { - const msg = type2.messagePrototype ? Object.create(type2.messagePrototype) : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type2 }); - for (let field of type2.fields) { + function reflectionCreate(type) { + const msg = type.messagePrototype ? Object.create(type.messagePrototype) : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type }); + for (let field of type.fields) { let name = field.localName; if (field.opt) continue; @@ -78284,10 +79050,10 @@ var require_reflection_equals = __commonJS({ } exports2.reflectionEquals = reflectionEquals; var objectValues = Object.values; - function primitiveEq(type2, a, b) { + function primitiveEq(type, a, b) { if (a === b) return true; - if (type2 !== reflection_info_1.ScalarType.BYTES) + if (type !== reflection_info_1.ScalarType.BYTES) return false; let ba = a; let bb = b; @@ -78298,19 +79064,19 @@ var require_reflection_equals = __commonJS({ return false; return true; } - function repeatedPrimitiveEq(type2, a, b) { + function repeatedPrimitiveEq(type, a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) - if (!primitiveEq(type2, a[i], b[i])) + if (!primitiveEq(type, a[i], b[i])) return false; return true; } - function repeatedMsgEq(type2, a, b) { + function repeatedMsgEq(type, a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) - if (!type2.equals(a[i], b[i])) + if (!type.equals(a[i], b[i])) return false; return true; } @@ -78409,15 +79175,15 @@ var require_message_type = __commonJS({ /** * Read a new message from a JSON value. */ - fromJson(json2, options) { - return this.internalJsonRead(json2, json_format_contract_1.jsonReadOptions(options)); + fromJson(json, options) { + return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options)); } /** * Read a new message from a JSON string. * This is equivalent to `T.fromJson(JSON.parse(json))`. */ - fromJsonString(json2, options) { - let value = JSON.parse(json2); + fromJsonString(json, options) { + let value = JSON.parse(json); return this.fromJson(value, options); } /** @@ -78431,9 +79197,9 @@ var require_message_type = __commonJS({ * This is equivalent to `JSON.stringify(T.toJson(t))` */ toJsonString(message, options) { - var _a; + var _a2; let value = this.toJson(message, options); - return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0); + return JSON.stringify(value, null, (_a2 = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a2 !== void 0 ? _a2 : 0); } /** * Write the message to binary format. @@ -78450,13 +79216,13 @@ var require_message_type = __commonJS({ * according to protobuf rules. If the target is omitted, * a new instance is created first. */ - internalJsonRead(json2, options, target) { - if (json2 !== null && typeof json2 == "object" && !Array.isArray(json2)) { + internalJsonRead(json, options, target) { + if (json !== null && typeof json == "object" && !Array.isArray(json)) { let message = target !== null && target !== void 0 ? target : this.create(); - this.refJsonReader.read(json2, message, options); + this.refJsonReader.read(json, message, options); return message; } - throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json2)}.`); + throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`); } /** * This is an internal method. If you just want to write a message @@ -78548,9 +79314,9 @@ var require_enum_object = __commonJS({ if (!isEnumObject(enumObject)) throw new Error("not a typescript enum object"); let values = []; - for (let [name, number] of Object.entries(enumObject)) - if (typeof number == "number") - values.push({ name, number }); + for (let [name, number2] of Object.entries(enumObject)) + if (typeof number2 == "number") + values.push({ name, number: number2 }); return values; } exports2.listEnumValues = listEnumValues; @@ -78559,7 +79325,7 @@ var require_enum_object = __commonJS({ } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index2, arr) => arr.indexOf(num) == index2); } exports2.listEnumNumbers = listEnumNumbers; } @@ -78759,10 +79525,10 @@ var require_reflection_info2 = __commonJS({ exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { - var _a, _b, _c; + var _a2, _b, _c; let m = method; m.service = service; - m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name); + m.localName = (_a2 = m.localName) !== null && _a2 !== void 0 ? _a2 : runtime_1.lowerCamelCase(m.name); m.serverStreaming = !!m.serverStreaming; m.clientStreaming = !!m.clientStreaming; m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {}; @@ -78771,14 +79537,14 @@ var require_reflection_info2 = __commonJS({ } exports2.normalizeMethodInfo = normalizeMethodInfo; function readMethodOptions(service, methodName, extensionName, extensionType) { - var _a; - const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; + var _a2; + const options = (_a2 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a2 === void 0 ? void 0 : _a2.options; return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; } exports2.readMethodOptions = readMethodOptions; function readMethodOption(service, methodName, extensionName, extensionType) { - var _a; - const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options; + var _a2; + const options = (_a2 = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a2 === void 0 ? void 0 : _a2.options; if (!options) { return void 0; } @@ -78867,28 +79633,28 @@ var require_rpc_options = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; var runtime_1 = require_commonjs16(); - function mergeRpcOptions(defaults, options) { + function mergeRpcOptions(defaults3, options) { if (!options) - return defaults; + return defaults3; let o = {}; - copy(defaults, o); + copy(defaults3, o); copy(options, o); for (let key of Object.keys(options)) { let val = options[key]; switch (key) { case "jsonOptions": - o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); + o.jsonOptions = runtime_1.mergeJsonOptions(defaults3.jsonOptions, o.jsonOptions); break; case "binaryOptions": - o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); + o.binaryOptions = runtime_1.mergeBinaryOptions(defaults3.binaryOptions, o.binaryOptions); break; case "meta": o.meta = {}; - copy(defaults.meta, o.meta); + copy(defaults3.meta, o.meta); copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); + o.interceptors = defaults3.interceptors ? defaults3.interceptors.concat(val) : val.concat(); break; } } @@ -78938,8 +79704,8 @@ var require_deferred = __commonJS({ */ constructor(preventUnhandledRejectionWarning = true) { this._state = DeferredState.PENDING; - this._promise = new Promise((resolve13, reject) => { - this._resolve = resolve13; + this._promise = new Promise((resolve14, reject) => { + this._resolve = resolve14; this._reject = reject; }); if (preventUnhandledRejectionWarning) { @@ -79154,11 +79920,11 @@ var require_unary_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -79174,7 +79940,7 @@ var require_unary_call = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -79223,11 +79989,11 @@ var require_server_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -79243,7 +80009,7 @@ var require_server_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -79293,11 +80059,11 @@ var require_client_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -79313,7 +80079,7 @@ var require_client_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -79362,11 +80128,11 @@ var require_duplex_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -79382,7 +80148,7 @@ var require_duplex_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -79430,11 +80196,11 @@ var require_test_transport = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -79450,7 +80216,7 @@ var require_test_transport = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -79501,8 +80267,8 @@ var require_test_transport = __commonJS({ } // Creates a promise for response headers from the mock data. promiseHeaders() { - var _a; - const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : _TestTransport.defaultHeaders; + var _a2; + const headers = (_a2 = this.data.headers) !== null && _a2 !== void 0 ? _a2 : _TestTransport.defaultHeaders; return headers instanceof rpc_error_1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); } // Creates a promise for a single, valid, message from the mock data. @@ -79577,14 +80343,14 @@ var require_test_transport = __commonJS({ } // Creates a promise for response status from the mock data. promiseStatus() { - var _a; - const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : _TestTransport.defaultStatus; + var _a2; + const status = (_a2 = this.data.status) !== null && _a2 !== void 0 ? _a2 : _TestTransport.defaultStatus; return status instanceof rpc_error_1.RpcError ? Promise.reject(status) : Promise.resolve(status); } // Creates a promise for response trailers from the mock data. promiseTrailers() { - var _a; - const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : _TestTransport.defaultTrailers; + var _a2; + const trailers = (_a2 = this.data.trailers) !== null && _a2 !== void 0 ? _a2 : _TestTransport.defaultTrailers; return trailers instanceof rpc_error_1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); } maybeSuppressUncaught(...promise) { @@ -79599,8 +80365,8 @@ var require_test_transport = __commonJS({ return rpc_options_1.mergeRpcOptions({}, options); } unary(method, input, options) { - var _a; - const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + var _a2; + const requestHeaders = (_a2 = options.meta) !== null && _a2 !== void 0 ? _a2 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { }).then(delay2(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); @@ -79609,16 +80375,16 @@ var require_test_transport = __commonJS({ return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); } serverStreaming(method, input, options) { - var _a; - const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { + var _a2; + const requestHeaders = (_a2 = options.meta) !== null && _a2 !== void 0 ? _a2 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay2(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = { single: input }; return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise); } clientStreaming(method, options) { - var _a; - const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + var _a2; + const requestHeaders = (_a2 = options.meta) !== null && _a2 !== void 0 ? _a2 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { }).then(delay2(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { }).then(delay2(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); @@ -79627,8 +80393,8 @@ var require_test_transport = __commonJS({ return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise); } duplex(method, options) { - var _a; - const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { + var _a2; + const requestHeaders = (_a2 = options.meta) !== null && _a2 !== void 0 ? _a2 : {}, headersPromise = this.promiseHeaders().then(delay2(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay2(this.responseDelay, options.abort)).catch(() => { }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay2(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise.then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise.then(() => this.promiseTrailers()); this.maybeSuppressUncaught(statusPromise, trailersPromise); this.lastInput = new TestInputStream(this.data, options.abort); @@ -79647,11 +80413,11 @@ var require_test_transport = __commonJS({ responseTrailer: "test" }; function delay2(ms, abort) { - return (v) => new Promise((resolve13, reject) => { + return (v) => new Promise((resolve14, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); } else { - const id = setTimeout(() => resolve13(v), ms); + const id = setTimeout(() => resolve14(v), ms); if (abort) { abort.addEventListener("abort", (ev) => { clearTimeout(id); @@ -79704,10 +80470,10 @@ var require_rpc_interceptor = __commonJS({ exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { - var _a, _b, _c, _d; + var _a2, _b, _c, _d; if (kind == "unary") { let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt); - for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { + for (const curr of ((_a2 = options.interceptors) !== null && _a2 !== void 0 ? _a2 : []).filter((i) => i.interceptUnary).reverse()) { const next = tail; tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt); } @@ -80649,11 +81415,11 @@ var require_cacheTwirpClient = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80669,7 +81435,7 @@ var require_cacheTwirpClient = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80809,7 +81575,7 @@ var require_cacheTwirpClient = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => setTimeout(resolve13, milliseconds)); + return new Promise((resolve14) => setTimeout(resolve14, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -80874,11 +81640,11 @@ var require_tar = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80894,7 +81660,7 @@ var require_tar = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80906,7 +81672,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io9 = __importStar2(require_io()); var fs_1 = require("fs"); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; @@ -80944,21 +81710,21 @@ var require_tar = __commonJS({ }); } function getTarArgs(tarPath_1, compressionMethod_1, type_1) { - return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; const workingDirectory = getWorkingDirectory(); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - switch (type2) { + switch (type) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path28.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path29.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -80975,13 +81741,13 @@ var require_tar = __commonJS({ }); } function getCommands(compressionMethod_1, type_1) { - return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type, archivePath = "") { let args; const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); - const compressionArgs = type2 !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== "create" ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) : yield getCompressionProgram(tarPath, compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - if (BSD_TAR_ZSTD && type2 !== "create") { + if (BSD_TAR_ZSTD && type !== "create") { args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; } else { args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; @@ -80993,8 +81759,8 @@ var require_tar = __commonJS({ }); } function getWorkingDirectory() { - var _a; - return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); + var _a2; + return (_a2 = process.env["GITHUB_WORKSPACE"]) !== null && _a2 !== void 0 ? _a2 : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { return __awaiter2(this, void 0, void 0, function* () { @@ -81004,7 +81770,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path28.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path29.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81013,7 +81779,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path28.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path29.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81028,7 +81794,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81037,7 +81803,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path28.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path29.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81075,7 +81841,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path28.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path29.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -81126,11 +81892,11 @@ var require_cache4 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81146,24 +81912,25 @@ var require_cache4 = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.FinalizeCacheError = exports2.CacheReadDeniedError = exports2.CACHE_READ_DENIED_PREFIX = exports2.CacheWriteDeniedError = exports2.CACHE_WRITE_DENIED_PREFIX = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core31 = __importStar2(require_core()); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); var http_client_1 = require_lib(); + var constants_1 = require_constants7(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -81180,6 +81947,24 @@ var require_cache4 = __commonJS({ } }; exports2.ReserveCacheError = ReserveCacheError2; + exports2.CACHE_WRITE_DENIED_PREFIX = "cache write denied:"; + var CacheWriteDeniedError = class _CacheWriteDeniedError extends ReserveCacheError2 { + constructor(message) { + super(message); + this.name = "CacheWriteDeniedError"; + Object.setPrototypeOf(this, _CacheWriteDeniedError.prototype); + } + }; + exports2.CacheWriteDeniedError = CacheWriteDeniedError; + exports2.CACHE_READ_DENIED_PREFIX = constants_1.CacheReadDeniedMessagePrefix; + var CacheReadDeniedError = class _CacheReadDeniedError extends Error { + constructor(message) { + super(message); + this.name = "CacheReadDeniedError"; + Object.setPrototypeOf(this, _CacheReadDeniedError.prototype); + } + }; + exports2.CacheReadDeniedError = CacheReadDeniedError; var FinalizeCacheError = class _FinalizeCacheError extends Error { constructor(message) { super(message); @@ -81217,6 +82002,12 @@ var require_cache4 = __commonJS({ const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core31.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); + const cacheMode = (0, config_1.getCacheMode)(); + if (!(0, config_1.isCacheReadable)(cacheMode)) { + core31.info(`Cache restore skipped: the effective cache-mode '${cacheMode}' does not permit reads.`); + core31.debug(`Skipped restore for paths [${paths.join(", ")}] with primary key '${primaryKey}'.`); + return void 0; + } switch (cacheServiceVersion) { case "v2": return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); @@ -81228,6 +82019,7 @@ var require_cache4 = __commonJS({ } function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + var _a2; restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core31.debug("Resolved Keys:"); @@ -81241,10 +82033,19 @@ var require_cache4 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let archivePath = ""; try { - const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { - compressionMethod, - enableCrossOsArchive - }); + let cacheEntry; + try { + cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { + compressionMethod, + enableCrossOsArchive + }); + } catch (error3) { + const errorMessage = (_a2 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a2 !== void 0 ? _a2 : ""; + if (errorMessage.includes(exports2.CACHE_READ_DENIED_PREFIX)) { + throw new CacheReadDeniedError(errorMessage); + } + throw error3; + } if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { return void 0; } @@ -81252,7 +82053,7 @@ var require_cache4 = __commonJS({ core31.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path28.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path29.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core31.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core31.isDebug()) { @@ -81286,6 +82087,7 @@ var require_cache4 = __commonJS({ } function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + var _a2; options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -81306,7 +82108,16 @@ var require_cache4 = __commonJS({ restoreKeys, version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) }; - const response = yield twirpClient.GetCacheEntryDownloadURL(request3); + let response; + try { + response = yield twirpClient.GetCacheEntryDownloadURL(request3); + } catch (error3) { + const errorMessage = (_a2 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a2 !== void 0 ? _a2 : ""; + if (errorMessage.includes(exports2.CACHE_READ_DENIED_PREFIX)) { + throw new CacheReadDeniedError(errorMessage); + } + throw error3; + } if (!response.ok) { core31.debug(`Cache not found for version ${request3.version} of keys: ${keys.join(", ")}`); return void 0; @@ -81321,7 +82132,7 @@ var require_cache4 = __commonJS({ core31.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path28.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path29.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core31.debug(`Archive path: ${archivePath}`); core31.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -81362,6 +82173,12 @@ var require_cache4 = __commonJS({ core31.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); + const cacheMode = (0, config_1.getCacheMode)(); + if (!(0, config_1.isCacheWritable)(cacheMode)) { + core31.info(`Cache save skipped: the effective cache-mode '${cacheMode}' does not permit writes.`); + core31.debug(`Skipped save for paths [${paths.join(", ")}] with key '${key}'.`); + return -1; + } switch (cacheServiceVersion) { case "v2": return yield saveCacheV2(paths, key, options, enableCrossOsArchive); @@ -81373,7 +82190,7 @@ var require_cache4 = __commonJS({ } function saveCacheV1(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -81383,7 +82200,7 @@ var require_cache4 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path28.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path29.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core31.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -81402,12 +82219,16 @@ var require_cache4 = __commonJS({ enableCrossOsArchive, cacheSize: archiveFileSize }); - if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) { + if ((_a2 = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a2 === void 0 ? void 0 : _a2.cacheId) { cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId; } else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) { throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`); } else { - throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); + const detailMessage = (_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message; + if (detailMessage === null || detailMessage === void 0 ? void 0 : detailMessage.startsWith(exports2.CACHE_WRITE_DENIED_PREFIX)) { + throw new CacheWriteDeniedError(`Unable to reserve cache with key ${key}. More details: ${detailMessage}`); + } + throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${detailMessage}`); } core31.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); @@ -81415,6 +82236,8 @@ var require_cache4 = __commonJS({ const typedError = error3; if (typedError.name === ValidationError.name) { throw error3; + } else if (typedError.name === CacheWriteDeniedError.name) { + core31.warning(`Failed to save: ${typedError.message}`); } else if (typedError.name === ReserveCacheError2.name) { core31.info(`Failed to save: ${typedError.message}`); } else { @@ -81436,6 +82259,7 @@ var require_cache4 = __commonJS({ } function saveCacheV2(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a2; options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -81447,7 +82271,7 @@ var require_cache4 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path28.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path29.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core31.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -81467,7 +82291,7 @@ var require_cache4 = __commonJS({ try { const response = yield twirpClient.CreateCacheEntry(request3); if (!response.ok) { - if (response.message) { + if (response.message && !response.message.startsWith(exports2.CACHE_WRITE_DENIED_PREFIX)) { core31.warning(`Cache reservation failed: ${response.message}`); } throw new Error(response.message || "Response was not ok"); @@ -81475,6 +82299,10 @@ var require_cache4 = __commonJS({ signedUploadUrl = response.signedUploadUrl; } catch (error3) { core31.debug(`Failed to reserve cache: ${error3}`); + const errorMessage = (_a2 = error3 === null || error3 === void 0 ? void 0 : error3.message) !== null && _a2 !== void 0 ? _a2 : ""; + if (errorMessage.startsWith(exports2.CACHE_WRITE_DENIED_PREFIX)) { + throw new CacheWriteDeniedError(`Unable to reserve cache with key ${key}. More details: ${errorMessage}`); + } throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } core31.debug(`Attempting to upload cache located at: ${archivePath}`); @@ -81497,6 +82325,8 @@ var require_cache4 = __commonJS({ const typedError = error3; if (typedError.name === ValidationError.name) { throw error3; + } else if (typedError.name === CacheWriteDeniedError.name) { + core31.warning(`Failed to save: ${typedError.message}`); } else if (typedError.name === ReserveCacheError2.name) { core31.info(`Failed to save: ${typedError.message}`); } else if (typedError.name === FinalizeCacheError.name) { @@ -81564,11 +82394,11 @@ var require_manifest = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81584,7 +82414,7 @@ var require_manifest = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -81597,12 +82427,12 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os7 = require("os"); var cp = require("child_process"); - var fs30 = require("fs"); + var fs31 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os7.platform(); let result; - let match; + let match2; let file; for (const candidate of candidates) { const version = candidate.version; @@ -81623,13 +82453,13 @@ var require_manifest = __commonJS({ }); if (file) { (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; + match2 = candidate; break; } } } - if (match && file) { - result = Object.assign({}, match); + if (match2 && file) { + result = Object.assign({}, match2); result.files = [file]; } return result; @@ -81659,10 +82489,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs30.existsSync(lsbReleaseFile)) { - contents = fs30.readFileSync(lsbReleaseFile).toString(); - } else if (fs30.existsSync(osReleaseFile)) { - contents = fs30.readFileSync(osReleaseFile).toString(); + if (fs31.existsSync(lsbReleaseFile)) { + contents = fs31.readFileSync(lsbReleaseFile).toString(); + } else if (fs31.existsSync(osReleaseFile)) { + contents = fs31.readFileSync(osReleaseFile).toString(); } return contents; } @@ -81712,11 +82542,11 @@ var require_retry_helper = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81732,7 +82562,7 @@ var require_retry_helper = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -81777,7 +82607,7 @@ var require_retry_helper = __commonJS({ } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => setTimeout(resolve13, seconds * 1e3)); + return new Promise((resolve14) => setTimeout(resolve14, seconds * 1e3)); }); } }; @@ -81828,11 +82658,11 @@ var require_tool_cache = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81848,7 +82678,7 @@ var require_tool_cache = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -81871,14 +82701,14 @@ var require_tool_cache = __commonJS({ var core31 = __importStar2(require_core()); var io9 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os7 = __importStar2(require("os")); - var path28 = __importStar2(require("path")); + var path29 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver11 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); - var util = __importStar2(require("util")); + var util3 = __importStar2(require("util")); var assert_1 = require("assert"); var exec_1 = require_exec(); var retry_helper_1 = require_retry_helper(); @@ -81895,8 +82725,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool3(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path28.join(_getTempDirectory(), crypto3.randomUUID()); - yield io9.mkdirP(path28.dirname(dest)); + dest = dest || path29.join(_getTempDirectory(), crypto3.randomUUID()); + yield io9.mkdirP(path29.dirname(dest)); core31.debug(`Downloading ${url2}`); core31.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -81917,7 +82747,7 @@ var require_tool_cache = __commonJS({ } function downloadToolAttempt(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - if (fs30.existsSync(dest)) { + if (fs31.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent2, [], { @@ -81936,12 +82766,12 @@ var require_tool_cache = __commonJS({ core31.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } - const pipeline = util.promisify(stream2.pipeline); + const pipeline2 = util3.promisify(stream2.pipeline); const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs30.createWriteStream(dest)); + yield pipeline2(readStream, fs31.createWriteStream(dest)); core31.debug("download complete"); succeeded = true; return dest; @@ -81986,7 +82816,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path28.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path29.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -82153,12 +82983,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os7.arch(); core31.debug(`Caching tool ${tool} ${version} ${arch2}`); core31.debug(`source dir: ${sourceDir}`); - if (!fs30.statSync(sourceDir).isDirectory()) { + if (!fs31.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs30.readdirSync(sourceDir)) { - const s = path28.join(sourceDir, itemName); + for (const itemName of fs31.readdirSync(sourceDir)) { + const s = path29.join(sourceDir, itemName); yield io9.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -82171,11 +83001,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os7.arch(); core31.debug(`Caching tool ${tool} ${version} ${arch2}`); core31.debug(`source file: ${sourceFile}`); - if (!fs30.statSync(sourceFile).isFile()) { + if (!fs31.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path28.join(destFolder, targetFile); + const destPath = path29.join(destFolder, targetFile); core31.debug(`destination file ${destPath}`); yield io9.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -82192,15 +83022,15 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os7.arch(); if (!isExplicitVersion(versionSpec)) { const localVersions = findAllVersions2(toolName, arch2); - const match = evaluateVersions(localVersions, versionSpec); - versionSpec = match; + const match2 = evaluateVersions(localVersions, versionSpec); + versionSpec = match2; } let toolPath = ""; if (versionSpec) { versionSpec = semver11.clean(versionSpec) || ""; - const cachePath = path28.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path29.join(_getCacheDirectory(), toolName, versionSpec, arch2); core31.debug(`checking cache: ${cachePath}`); - if (fs30.existsSync(cachePath) && fs30.existsSync(`${cachePath}.complete`)) { + if (fs31.existsSync(cachePath) && fs31.existsSync(`${cachePath}.complete`)) { core31.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -82212,13 +83042,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os7.arch(); - const toolPath = path28.join(_getCacheDirectory(), toolName); - if (fs30.existsSync(toolPath)) { - const children = fs30.readdirSync(toolPath); + const toolPath = path29.join(_getCacheDirectory(), toolName); + if (fs31.existsSync(toolPath)) { + const children = fs31.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path28.join(toolPath, child, arch2 || ""); - if (fs30.existsSync(fullPath) && fs30.existsSync(`${fullPath}.complete`)) { + const fullPath = path29.join(toolPath, child, arch2 || ""); + if (fs31.existsSync(fullPath) && fs31.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -82253,7 +83083,7 @@ var require_tool_cache = __commonJS({ versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); - } catch (_a) { + } catch (_a2) { core31.debug("Invalid json"); } } @@ -82262,14 +83092,14 @@ var require_tool_cache = __commonJS({ } function findFromManifest(versionSpec_1, stable_1, manifest_1) { return __awaiter2(this, arguments, void 0, function* (versionSpec, stable, manifest, archFilter = os7.arch()) { - const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); - return match; + const match2 = yield mm._findMatch(versionSpec, stable, manifest, archFilter); + return match2; }); } function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path28.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path29.join(_getTempDirectory(), crypto3.randomUUID()); } yield io9.mkdirP(dest); return dest; @@ -82277,7 +83107,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path28.join(_getCacheDirectory(), tool, semver11.clean(version) || version, arch2 || ""); + const folderPath = path29.join(_getCacheDirectory(), tool, semver11.clean(version) || version, arch2 || ""); core31.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io9.rmRF(folderPath); @@ -82287,9 +83117,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path28.join(_getCacheDirectory(), tool, semver11.clean(version) || version, arch2 || ""); + const folderPath = path29.join(_getCacheDirectory(), tool, semver11.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs30.writeFileSync(markerPath, ""); + fs31.writeFileSync(markerPath, ""); core31.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -85984,10 +86814,10 @@ var require_timestamp = __commonJS({ * In JSON format, the `Timestamp` type is encoded as a string * in the RFC 3339 format. */ - internalJsonRead(json2, options, target) { - if (typeof json2 !== "string") - throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_5.typeofJsonValue)(json2) + "."); - let matches = json2.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); + internalJsonRead(json, options, target) { + if (typeof json !== "string") + throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_5.typeofJsonValue)(json) + "."); + let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); if (!matches) throw new Error("Unable to parse Timestamp from JSON. Invalid format."); let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); @@ -86083,10 +86913,10 @@ var require_wrappers = __commonJS({ /** * Decode `DoubleValue` from JSON number. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 1, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); return target; } create(value) { @@ -86147,10 +86977,10 @@ var require_wrappers = __commonJS({ /** * Decode `FloatValue` from JSON number. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 1, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); return target; } create(value) { @@ -86211,10 +87041,10 @@ var require_wrappers = __commonJS({ /** * Decode `Int64Value` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, runtime_1.ScalarType.INT64, runtime_2.LongType.STRING, "value"); + target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.INT64, runtime_2.LongType.STRING, "value"); return target; } create(value) { @@ -86275,10 +87105,10 @@ var require_wrappers = __commonJS({ /** * Decode `UInt64Value` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, runtime_1.ScalarType.UINT64, runtime_2.LongType.STRING, "value"); + target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.UINT64, runtime_2.LongType.STRING, "value"); return target; } create(value) { @@ -86339,10 +87169,10 @@ var require_wrappers = __commonJS({ /** * Decode `Int32Value` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 5, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 5, void 0, "value"); return target; } create(value) { @@ -86403,10 +87233,10 @@ var require_wrappers = __commonJS({ /** * Decode `UInt32Value` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 13, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 13, void 0, "value"); return target; } create(value) { @@ -86467,10 +87297,10 @@ var require_wrappers = __commonJS({ /** * Decode `BoolValue` from JSON bool. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 8, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 8, void 0, "value"); return target; } create(value) { @@ -86531,10 +87361,10 @@ var require_wrappers = __commonJS({ /** * Decode `StringValue` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 9, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 9, void 0, "value"); return target; } create(value) { @@ -86595,10 +87425,10 @@ var require_wrappers = __commonJS({ /** * Decode `BytesValue` from JSON string. */ - internalJsonRead(json2, options, target) { + internalJsonRead(json, options, target) { if (!target) target = this.create(); - target.value = this.refJsonReader.scalar(json2, 12, void 0, "value"); + target.value = this.refJsonReader.scalar(json, 12, void 0, "value"); return target; } create(value) { @@ -87980,13 +88810,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.validateArtifactName = validateArtifactName; - function validateFilePath(path28) { - if (!path28) { + function validateFilePath(path29) { + if (!path29) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path28.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path28}. Contains the following character: ${errorMessageForCharacter} + if (path29.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path29}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -88328,11 +89158,11 @@ var require_artifact_twirp_client2 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -88348,7 +89178,7 @@ var require_artifact_twirp_client2 = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -88475,7 +89305,7 @@ var require_artifact_twirp_client2 = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13) => setTimeout(resolve13, milliseconds)); + return new Promise((resolve14) => setTimeout(resolve14, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -88531,15 +89361,15 @@ var require_upload_zip_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadZipSpecification = exports2.validateRootDirectory = void 0; - var fs30 = __importStar2(require("fs")); + var fs31 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); function validateRootDirectory(rootDirectory) { - if (!fs30.existsSync(rootDirectory)) { + if (!fs31.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs30.statSync(rootDirectory).isDirectory()) { + if (!fs31.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } (0, core_1.info)(`Root directory input is valid!`); @@ -88550,7 +89380,7 @@ var require_upload_zip_specification = __commonJS({ rootDirectory = (0, path_1.normalize)(rootDirectory); rootDirectory = (0, path_1.resolve)(rootDirectory); for (let file of filesToZip) { - const stats = fs30.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs31.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -88616,11 +89446,11 @@ var require_blob_upload = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve13) { - resolve13(value); + return value instanceof P ? value : new P(function(resolve14) { + resolve14(value); }); } - return new (P || (P = Promise))(function(resolve13, reject) { + return new (P || (P = Promise))(function(resolve14, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -88636,7 +89466,7 @@ var require_blob_upload = __commonJS({ } } function step(result) { - result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -88655,7 +89485,7 @@ var require_blob_upload = __commonJS({ let lastProgressTime = Date.now(); const abortController = new AbortController(); const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { reject(new Error("Upload progress stalled.")); @@ -88663,7 +89493,7 @@ var require_blob_upload = __commonJS({ }, interval); abortController.signal.addEventListener("abort", () => { clearInterval(timer); - resolve13(); + resolve14(); }); }); }); @@ -88718,46 +89548,48 @@ var require_blob_upload = __commonJS({ } }); -// node_modules/readdir-glob/node_modules/minimatch/lib/path.js +// node_modules/@actions/artifact/node_modules/minimatch/lib/path.js var require_path = __commonJS({ - "node_modules/readdir-glob/node_modules/minimatch/lib/path.js"(exports2, module2) { + "node_modules/@actions/artifact/node_modules/minimatch/lib/path.js"(exports2, module2) { var isWindows = typeof process === "object" && process && process.platform === "win32"; module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; } }); -// node_modules/readdir-glob/node_modules/brace-expansion/index.js +// node_modules/@actions/artifact/node_modules/brace-expansion/index.js var require_brace_expansion2 = __commonJS({ - "node_modules/readdir-glob/node_modules/brace-expansion/index.js"(exports2, module2) { - var balanced = require_balanced_match(); + "node_modules/@actions/artifact/node_modules/brace-expansion/index.js"(exports2, module2) { + var balanced2 = require_balanced_match(); module2.exports = expandTop; - 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"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) + var escSlash2 = "\0SLASH" + Math.random() + "\0"; + var escOpen2 = "\0OPEN" + Math.random() + "\0"; + var escClose2 = "\0CLOSE" + Math.random() + "\0"; + var escComma2 = "\0COMMA" + Math.random() + "\0"; + var escPeriod2 = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX2 = 1e5; + var EXPANSION_MAX_LENGTH2 = 4e6; + function numeric2(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces2(str) { + return str.split("\\\\").join(escSlash2).split("\\{").join(escOpen2).split("\\}").join(escClose2).split("\\,").join(escComma2).split("\\.").join(escPeriod2); + } + function unescapeBraces2(str) { + return str.split(escSlash2).join("\\").split(escOpen2).join("{").split(escClose2).join("}").split(escComma2).join(",").split(escPeriod2).join("."); + } + function parseCommaParts2(str) { + if (!str) return [""]; var parts = []; - var m = balanced("{", "}", str2); + var m = balanced2("{", "}", str); if (!m) - return str2.split(","); + return str.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); + var postParts = parseCommaParts2(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); @@ -88765,135 +89597,203 @@ var require_brace_expansion2 = __commonJS({ parts.push.apply(parts, p); return parts; } - function expandTop(str2, options) { - if (!str2) + function expandTop(str, options) { + if (!str) return []; options = options || {}; - var max = options.max == null ? Infinity : options.max; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); + var max = options.max == null ? EXPANSION_MAX2 : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH2 : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); } - return expand2(escapeBraces(str2), max, true).map(unescapeBraces); + return expand3(escapeBraces2(str), max, maxLength, true).map(unescapeBraces2); } - function embrace(str2) { - return "{" + str2 + "}"; + function embrace2(str) { + return "{" + str + "}"; } - function isPadded(el) { + function isPadded2(el) { return /^-?0\d/.test(el); } - function lte(i, y) { + function lte2(i, y) { return i <= y; } - function gte6(i, y) { + function gte7(i, y) { return i >= y; } - function expand2(str2, max, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m) return [str2]; - var pre = m.pre; - var post = m.post.length ? expand2(m.post, max, false) : [""]; - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length && k < max; k++) { - var expansion = pre + "{" + m.body + "}" + post[k]; - expansions.push(expansion); + function combine2(acc, pre, values, max, maxLength, dropEmpties) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && !expansion) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + length += expansion.length; + } + } + return out; + } + function expandSequence2(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric2(n[0]); + var y = numeric2(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric2(n[2])), 1) : 1; + var test = lte2; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte7; + } + var pad = n.some(isPadded2); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; + } + return N; + } + function expand3(str, max, maxLength, isTop) { + var acc = [""]; + var dropEmpties = false; + var firstGroup = true; + for (; ; ) { + const m = balanced2("{", "}", str); + if (!m) { + return combine2(acc, str, [""], max, maxLength, dropEmpties); + } + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine2( + acc, + pre + "{" + m.body + "}", + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + firstGroup = false; + if (!m.post.length) break; + str = m.post; + continue; } - } else { var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand2(str2, max, true); + str = m.pre + "{" + m.body + escClose2 + m.post; + isTop = true; + continue; } - return [str2]; + return combine2( + acc, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; } - var n; + var values; if (isSequence) { - n = m.body.split(/\.\./); + values = expandSequence2(m.body, isAlphaSequence, max, maxLength); } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand2(n[0], max, false).map(embrace); + var n = parseCommaParts2(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand3(n[0], max, maxLength, false).map(embrace2); if (n.length === 1) { - return post.map(function(p) { - return m.pre + n[0] + p; - }); + acc = combine2( + acc, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + if (!m.post.length) break; + str = m.post; + continue; } } - } - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte6; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; } - N.push(c); - } - } else { - N = []; - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand2(n[j], max, false)); } - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length && expansions.length < max; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand3(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } } } + acc = combine2(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) break; + str = m.post; } - return expansions; + return acc; } } }); -// node_modules/readdir-glob/node_modules/minimatch/minimatch.js +// node_modules/@actions/artifact/node_modules/minimatch/minimatch.js var require_minimatch2 = __commonJS({ - "node_modules/readdir-glob/node_modules/minimatch/minimatch.js"(exports2, module2) { - var minimatch = module2.exports = (p, pattern, options = {}) => { - assertValidPattern(pattern); + "node_modules/@actions/artifact/node_modules/minimatch/minimatch.js"(exports2, module2) { + var minimatch2 = module2.exports = (p, pattern, options = {}) => { + assertValidPattern2(pattern); if (!options.nocomment && pattern.charAt(0) === "#") { return false; } - return new Minimatch(pattern, options).match(p); + return new Minimatch2(pattern, options).match(p); }; - module2.exports = minimatch; - var path28 = require_path(); - minimatch.sep = path28.sep; - var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); - minimatch.GLOBSTAR = GLOBSTAR; - var expand2 = require_brace_expansion2(); + module2.exports = minimatch2; + var path29 = require_path(); + minimatch2.sep = path29.sep; + var GLOBSTAR2 = /* @__PURE__ */ Symbol("globstar **"); + minimatch2.GLOBSTAR = GLOBSTAR2; + var expand3 = require_brace_expansion2(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, @@ -88901,64 +89801,64 @@ var require_minimatch2 = __commonJS({ "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var charSet = (s) => s.split("").reduce((set2, c) => { - set2[c] = true; - return set2; + var qmark3 = "[^/]"; + var star3 = qmark3 + "*?"; + var twoStarDot2 = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot2 = "(?:(?!(?:\\/|^)\\.).)*?"; + var charSet = (s) => s.split("").reduce((set, c) => { + set[c] = true; + return set; }, {}); - var reSpecials = charSet("().*{}+?[]^$\\!"); + var reSpecials2 = charSet("().*{}+?[]^$\\!"); var addPatternStartSet = charSet("[.("); var slashSplit = /\/+/; - minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options); - var ext = (a, b = {}) => { + minimatch2.filter = (pattern, options = {}) => (p, i, list) => minimatch2(p, pattern, options); + var ext2 = (a, b = {}) => { const t = {}; Object.keys(a).forEach((k) => t[k] = a[k]); Object.keys(b).forEach((k) => t[k] = b[k]); return t; }; - minimatch.defaults = (def) => { + minimatch2.defaults = (def) => { if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; + return minimatch2; } - const orig = minimatch; - const m = (p, pattern, options) => orig(p, pattern, ext(def, options)); + const orig = minimatch2; + const m = (p, pattern, options) => orig(p, pattern, ext2(def, options)); m.Minimatch = class Minimatch extends orig.Minimatch { constructor(pattern, options) { - super(pattern, ext(def, options)); + super(pattern, ext2(def, options)); } }; - m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch; - m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)); - m.defaults = (options) => orig.defaults(ext(def, options)); - m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)); - m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)); - m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)); + m.Minimatch.defaults = (options) => orig.defaults(ext2(def, options)).Minimatch; + m.filter = (pattern, options) => orig.filter(pattern, ext2(def, options)); + m.defaults = (options) => orig.defaults(ext2(def, options)); + m.makeRe = (pattern, options) => orig.makeRe(pattern, ext2(def, options)); + m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext2(def, options)); + m.match = (list, pattern, options) => orig.match(list, pattern, ext2(def, options)); return m; }; - minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options); - var braceExpand = (pattern, options = {}) => { - assertValidPattern(pattern); + minimatch2.braceExpand = (pattern, options) => braceExpand2(pattern, options); + var braceExpand2 = (pattern, options = {}) => { + assertValidPattern2(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } - return expand2(pattern); + return expand3(pattern); }; - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = (pattern) => { + var MAX_PATTERN_LENGTH2 = 1024 * 64; + var assertValidPattern2 = (pattern) => { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } - if (pattern.length > MAX_PATTERN_LENGTH) { + if (pattern.length > MAX_PATTERN_LENGTH2) { throw new TypeError("pattern is too long"); } }; var SUBPARSE = /* @__PURE__ */ Symbol("subparse"); - minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe(); - minimatch.match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options); + minimatch2.makeRe = (pattern, options) => new Minimatch2(pattern, options || {}).makeRe(); + minimatch2.match = (list, pattern, options = {}) => { + const mm = new Minimatch2(pattern, options); list = list.filter((f) => mm.match(f)); if (mm.options.nonull && !list.length) { list.push(pattern); @@ -88967,11 +89867,11 @@ var require_minimatch2 = __commonJS({ }; var globUnescape = (s) => s.replace(/\\(.)/g, "$1"); var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1"); - var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var regExpEscape3 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&"); - var Minimatch = class { + var Minimatch2 = class { constructor(pattern, options) { - assertValidPattern(pattern); + assertValidPattern2(pattern); if (!options) options = {}; this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -89002,16 +89902,16 @@ var require_minimatch2 = __commonJS({ return; } this.parseNegate(); - let set2 = this.globSet = this.braceExpand(); + let set = this.globSet = this.braceExpand(); if (options.debug) this.debug = (...args) => console.error(...args); - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map((s) => s.split(slashSplit)); - this.debug(this.pattern, set2); - set2 = set2.map((s, si, set3) => s.map(this.parse, this)); - this.debug(this.pattern, set2); - set2 = set2.filter((s) => s.indexOf(false) === -1); - this.debug(this.pattern, set2); - this.set = set2; + this.debug(this.pattern, set); + set = this.globParts = set.map((s) => s.split(slashSplit)); + this.debug(this.pattern, set); + set = set.map((s, si, set2) => s.map(this.parse, this)); + this.debug(this.pattern, set); + set = set.filter((s) => s.indexOf(false) === -1); + this.debug(this.pattern, set); + this.set = set; } parseNegate() { if (this.options.nonegate) return; @@ -89031,7 +89931,7 @@ var require_minimatch2 = __commonJS({ // out of pattern, then that's fine, as long as all // the parts match. matchOne(file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { + if (pattern.indexOf(GLOBSTAR2) !== -1) { return this._matchGlobstar(file, pattern, partial, 0, 0); } return this._matchOne(file, pattern, partial, 0, 0); @@ -89039,14 +89939,14 @@ var require_minimatch2 = __commonJS({ _matchGlobstar(file, pattern, partial, fileIndex, patternIndex) { let firstgs = -1; for (let i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { + if (pattern[i] === GLOBSTAR2) { firstgs = i; break; } } let lastgs = -1; for (let i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { + if (pattern[i] === GLOBSTAR2) { lastgs = i; break; } @@ -89093,7 +89993,7 @@ var require_minimatch2 = __commonJS({ let nonGsParts = 0; const nonGsPartsSums = [0]; for (const b of body) { - if (b === GLOBSTAR) { + if (b === GLOBSTAR2) { nonGsPartsSums.push(nonGsParts); currentBody = [[], 0]; bodySegments.push(currentBody); @@ -89169,7 +90069,7 @@ var require_minimatch2 = __commonJS({ const p = pattern[pi]; const f = file[fi]; this.debug(pattern, p, f); - if (p === false || p === GLOBSTAR) return false; + if (p === false || p === GLOBSTAR2) return false; let hit; if (typeof p === "string") { hit = f === p; @@ -89190,14 +90090,14 @@ var require_minimatch2 = __commonJS({ throw new Error("wtf?"); } braceExpand() { - return braceExpand(this.pattern, this.options); + return braceExpand2(this.pattern, this.options); } parse(pattern, isSub) { - assertValidPattern(pattern); + assertValidPattern2(pattern); const options = this.options; if (pattern === "**") { if (!options.noglobstar) - return GLOBSTAR; + return GLOBSTAR2; else pattern = "*"; } @@ -89222,11 +90122,11 @@ var require_minimatch2 = __commonJS({ if (stateChar) { switch (stateChar) { case "*": - re += star; + re += star3; hasMagic = true; break; case "?": - re += qmark; + re += qmark3; hasMagic = true; break; default: @@ -89243,7 +90143,7 @@ var require_minimatch2 = __commonJS({ if (c === "/") { return false; } - if (reSpecials[c]) { + if (reSpecials2[c]) { re += "\\"; } re += c; @@ -89369,7 +90269,7 @@ var require_minimatch2 = __commonJS({ continue; default: clearStateChar(); - if (reSpecials[c] && !(c === "^" && inClass)) { + if (reSpecials2[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; @@ -89393,7 +90293,7 @@ var require_minimatch2 = __commonJS({ return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); - const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + const t = pl.type === "*" ? star3 : pl.type === "?" ? qmark3 : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } @@ -89401,7 +90301,7 @@ var require_minimatch2 = __commonJS({ if (escaping) { re += "\\\\"; } - const addPatternStart = addPatternStartSet[re.charAt(0)]; + const addPatternStart2 = addPatternStartSet[re.charAt(0)]; for (let n = negativeLists.length - 1; n > -1; n--) { const nl = negativeLists[n]; const nlBefore = re.slice(0, nl.reStart); @@ -89421,7 +90321,7 @@ var require_minimatch2 = __commonJS({ if (re !== "" && hasMagic) { re = "(?=.)" + re; } - if (addPatternStart) { + if (addPatternStart2) { re = patternStart() + re; } if (isSub === SUBPARSE) { @@ -89445,25 +90345,25 @@ var require_minimatch2 = __commonJS({ } makeRe() { if (this.regexp || this.regexp === false) return this.regexp; - const set2 = this.set; - if (!set2.length) { + const set = this.set; + if (!set.length) { this.regexp = false; return this.regexp; } const options = this.options; - const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + const twoStar = options.noglobstar ? star3 : options.dot ? twoStarDot2 : twoStarNoDot2; const flags = options.nocase ? "i" : ""; - let re = set2.map((pattern) => { + let re = set.map((pattern) => { pattern = pattern.map( - (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src - ).reduce((set3, p) => { - if (!(set3[set3.length - 1] === GLOBSTAR && p === GLOBSTAR)) { - set3.push(p); + (p) => typeof p === "string" ? regExpEscape3(p) : p === GLOBSTAR2 ? GLOBSTAR2 : p._src + ).reduce((set2, p) => { + if (!(set2[set2.length - 1] === GLOBSTAR2 && p === GLOBSTAR2)) { + set2.push(p); } - return set3; + return set2; }, []); pattern.forEach((p, i) => { - if (p !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) { + if (p !== GLOBSTAR2 || pattern[i - 1] === GLOBSTAR2) { return; } if (i === 0) { @@ -89476,10 +90376,10 @@ var require_minimatch2 = __commonJS({ pattern[i - 1] += "(?:\\/|" + twoStar + ")?"; } else { pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1]; - pattern[i + 1] = GLOBSTAR; + pattern[i + 1] = GLOBSTAR2; } }); - return pattern.filter((p) => p !== GLOBSTAR).join("/"); + return pattern.filter((p) => p !== GLOBSTAR2).join("/"); }).join("|"); re = "^(?:" + re + ")$"; if (this.negate) re = "^(?!" + re + ").*$"; @@ -89496,20 +90396,20 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path28.sep !== "/") { - f = f.split(path28.sep).join("/"); + if (path29.sep !== "/") { + f = f.split(path29.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); - const set2 = this.set; - this.debug(this.pattern, "set", set2); + const set = this.set; + this.debug(this.pattern, "set", set); let filename; for (let i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } - for (let i = 0; i < set2.length; i++) { - const pattern = set2[i]; + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; let file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; @@ -89524,31 +90424,31 @@ var require_minimatch2 = __commonJS({ return this.negate; } static defaults(def) { - return minimatch.defaults(def).Minimatch; + return minimatch2.defaults(def).Minimatch; } }; - minimatch.Minimatch = Minimatch; + minimatch2.Minimatch = Minimatch2; } }); -// node_modules/readdir-glob/index.js +// node_modules/@actions/artifact/node_modules/readdir-glob/index.js var require_readdir_glob = __commonJS({ - "node_modules/readdir-glob/index.js"(exports2, module2) { - module2.exports = readdirGlob; - var fs30 = require("fs"); - var { EventEmitter } = require("events"); - var { Minimatch } = require_minimatch2(); - var { resolve: resolve13 } = require("path"); - function readdir(dir, strict) { - return new Promise((resolve14, reject) => { - fs30.readdir(dir, { withFileTypes: true }, (err, files) => { + "node_modules/@actions/artifact/node_modules/readdir-glob/index.js"(exports2, module2) { + module2.exports = readdirGlob2; + var fs31 = require("fs"); + var { EventEmitter: EventEmitter2 } = require("events"); + var { Minimatch: Minimatch2 } = require_minimatch2(); + var { resolve: resolve14 } = require("path"); + function readdir3(dir, strict) { + return new Promise((resolve15, reject) => { + fs31.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": if (strict) { reject(err); } else { - resolve14([]); + resolve15([]); } break; case "ENOTSUP": @@ -89558,7 +90458,7 @@ var require_readdir_glob = __commonJS({ case "ENAMETOOLONG": // Filename too long case "UNKNOWN": - resolve14([]); + resolve15([]); break; case "ELOOP": // Too many levels of symbolic links @@ -89567,36 +90467,36 @@ var require_readdir_glob = __commonJS({ break; } } else { - resolve14(files); + resolve15(files); } }); }); } - function stat(file, followSymlinks) { - return new Promise((resolve14, reject) => { - const statFunc = followSymlinks ? fs30.stat : fs30.lstat; + function stat2(file, followSymlinks) { + return new Promise((resolve15, reject) => { + const statFunc = followSymlinks ? fs31.stat : fs31.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { case "ENOENT": if (followSymlinks) { - resolve14(stat(file, false)); + resolve15(stat2(file, false)); } else { - resolve14(null); + resolve15(null); } break; default: - resolve14(null); + resolve15(null); break; } } else { - resolve14(stats); + resolve15(stats); } }); }); } - async function* exploreWalkAsync(dir, path28, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path28 + dir, strict); + async function* exploreWalkAsync2(dir, path29, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir3(path29 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -89605,10 +90505,10 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative3 = filename.slice(1); - const absolute = path28 + "/" + relative3; + const absolute = path29 + "/" + relative3; let stats = null; if (useStat || followSymlinks) { - stats = await stat(absolute, followSymlinks); + stats = await stat2(absolute, followSymlinks); } if (!stats && file.name !== void 0) { stats = file; @@ -89619,17 +90519,17 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative3)) { yield { relative: relative3, absolute, stats }; - yield* exploreWalkAsync(filename, path28, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync2(filename, path29, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative3, absolute, stats }; } } } - async function* explore(path28, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path28, followSymlinks, useStat, shouldSkip, true); + async function* explore2(path29, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync2("", path29, followSymlinks, useStat, shouldSkip, true); } - function readOptions(options) { + function readOptions2(options) { return { pattern: options.pattern, dot: !!options.dot, @@ -89646,19 +90546,19 @@ var require_readdir_glob = __commonJS({ absolute: !!options.absolute }; } - var ReaddirGlob = class extends EventEmitter { + var ReaddirGlob3 = class extends EventEmitter2 { constructor(cwd, options, cb) { super(); if (typeof options === "function") { cb = options; options = null; } - this.options = readOptions(options || {}); + this.options = readOptions2(options || {}); this.matchers = []; if (this.options.pattern) { const matchers = Array.isArray(this.options.pattern) ? this.options.pattern : [this.options.pattern]; this.matchers = matchers.map( - (m) => new Minimatch(m, { + (m) => new Minimatch2(m, { dot: this.options.dot, noglobstar: this.options.noglobstar, matchBase: this.options.matchBase, @@ -89670,23 +90570,23 @@ var require_readdir_glob = __commonJS({ if (this.options.ignore) { const ignorePatterns = Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]; this.ignoreMatchers = ignorePatterns.map( - (ignore) => new Minimatch(ignore, { dot: true }) + (ignore) => new Minimatch2(ignore, { dot: true }) ); } this.skipMatchers = []; if (this.options.skip) { const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]; this.skipMatchers = skipPatterns.map( - (skip) => new Minimatch(skip, { dot: true }) + (skip) => new Minimatch2(skip, { dot: true }) ); } - this.iterator = explore(resolve13(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.iterator = explore2(resolve14(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); this.paused = false; this.inactive = false; this.aborted = false; if (cb) { this._matches = []; - this.on("match", (match) => this._matches.push(this.options.absolute ? match.absolute : match.relative)); + this.on("match", (match2) => this._matches.push(this.options.absolute ? match2.absolute : match2.relative)); this.on("error", (err) => cb(err)); this.on("end", () => cb(null, this._matches)); } @@ -89746,10 +90646,10 @@ var require_readdir_glob = __commonJS({ } } }; - function readdirGlob(pattern, options, cb) { - return new ReaddirGlob(pattern, options, cb); + function readdirGlob2(pattern, options, cb) { + return new ReaddirGlob3(pattern, options, cb); } - readdirGlob.ReaddirGlob = ReaddirGlob; + readdirGlob2.ReaddirGlob = ReaddirGlob3; } }); @@ -89847,10 +90747,10 @@ var require_async = __commonJS({ if (typeof args[arity - 1] === "function") { return asyncFn.apply(this, args); } - return new Promise((resolve13, reject2) => { + return new Promise((resolve14, reject2) => { args[arity - 1] = (err, ...cbArgs) => { if (err) return reject2(err); - resolve13(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + resolve14(cbArgs.length > 1 ? cbArgs : cbArgs[0]); }; asyncFn.apply(this, args); }); @@ -89874,9 +90774,9 @@ var require_async = __commonJS({ var counter = 0; var _iteratee = wrapAsync(iteratee); return eachfn(arr, (value, _2, iterCb) => { - var index2 = counter++; + var index3 = counter++; _iteratee(value, (err, v) => { - results[index2] = v; + results[index3] = v; iterCb(err); }); }, (err) => { @@ -90053,7 +90953,7 @@ var require_async = __commonJS({ var eachOfLimit$1 = awaitify(eachOfLimit, 4); function eachOfArrayLike(coll, iteratee, callback) { callback = once(callback); - var index2 = 0, completed = 0, { length } = coll, canceled = false; + var index3 = 0, completed = 0, { length } = coll, canceled = false; if (length === 0) { callback(null); } @@ -90068,8 +90968,8 @@ var require_async = __commonJS({ callback(null); } } - for (; index2 < length; index2++) { - iteratee(coll[index2], index2, onlyOnce(iteratorCallback)); + for (; index3 < length; index3++) { + iteratee(coll[index3], index3, onlyOnce(iteratorCallback)); } } function eachOfGeneric(coll, iteratee, callback) { @@ -90080,10 +90980,10 @@ var require_async = __commonJS({ return eachOfImplementation(coll, wrapAsync(iteratee), callback); } var eachOf$1 = awaitify(eachOf, 3); - function map2(coll, iteratee, callback) { + function map(coll, iteratee, callback) { return _asyncMap(eachOf$1, coll, iteratee, callback); } - var map$1 = awaitify(map2, 3); + var map$1 = awaitify(map, 3); var applyEach = applyEach$1(map$1); function eachOfSeries(coll, iteratee, callback) { return eachOfLimit$1(coll, 1, iteratee, callback); @@ -90096,13 +90996,13 @@ var require_async = __commonJS({ var applyEachSeries = applyEach$1(mapSeries$1); const PROMISE_SYMBOL = /* @__PURE__ */ Symbol("promiseCallback"); function promiseCallback() { - let resolve13, reject2; + let resolve14, reject2; function callback(err, ...args) { if (err) return reject2(err); - resolve13(args.length > 1 ? args : args[0]); + resolve14(args.length > 1 ? args : args[0]); } callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve13 = res, reject2 = rej; + resolve14 = res, reject2 = rej; }); return callback; } @@ -90251,36 +91151,36 @@ var require_async = __commonJS({ var FN_ARG = /(=.+)?(\s*)$/; function stripComments(string2) { let stripped = ""; - let index2 = 0; + let index3 = 0; let endBlockComment = string2.indexOf("*/"); - while (index2 < string2.length) { - if (string2[index2] === "/" && string2[index2 + 1] === "/") { - let endIndex = string2.indexOf("\n", index2); - index2 = endIndex === -1 ? string2.length : endIndex; - } else if (endBlockComment !== -1 && string2[index2] === "/" && string2[index2 + 1] === "*") { - let endIndex = string2.indexOf("*/", index2); + while (index3 < string2.length) { + if (string2[index3] === "/" && string2[index3 + 1] === "/") { + let endIndex = string2.indexOf("\n", index3); + index3 = endIndex === -1 ? string2.length : endIndex; + } else if (endBlockComment !== -1 && string2[index3] === "/" && string2[index3 + 1] === "*") { + let endIndex = string2.indexOf("*/", index3); if (endIndex !== -1) { - index2 = endIndex + 2; - endBlockComment = string2.indexOf("*/", index2); + index3 = endIndex + 2; + endBlockComment = string2.indexOf("*/", index3); } else { - stripped += string2[index2]; - index2++; + stripped += string2[index3]; + index3++; } } else { - stripped += string2[index2]; - index2++; + stripped += string2[index3]; + index3++; } } return stripped; } function parseParams(func) { const src = stripComments(func.toString()); - let match = src.match(FN_ARGS); - if (!match) { - match = src.match(ARROW_FN_ARGS); + let match2 = src.match(FN_ARGS); + if (!match2) { + match2 = src.match(ARROW_FN_ARGS); } - if (!match) throw new Error("could not parse args in autoInject\nSource:\n" + src); - let [, args] = match; + if (!match2) throw new Error("could not parse args in autoInject\nSource:\n" + src); + let [, args] = match2; return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim()); } function autoInject(tasks, callback) { @@ -90449,8 +91349,8 @@ var require_async = __commonJS({ }); } if (rejectOnError || !callback) { - return new Promise((resolve13, reject2) => { - res = resolve13; + return new Promise((resolve14, reject2) => { + res = resolve14; rej = reject2; }); } @@ -90460,11 +91360,11 @@ var require_async = __commonJS({ numRunning -= 1; for (var i = 0, l = tasks.length; i < l; i++) { var task = tasks[i]; - var index2 = workersList.indexOf(task); - if (index2 === 0) { + var index3 = workersList.indexOf(task); + if (index3 === 0) { workersList.shift(); - } else if (index2 > 0) { - workersList.splice(index2, 1); + } else if (index3 > 0) { + workersList.splice(index3, 1); } task.callback(err, ...args); if (err != null) { @@ -90489,10 +91389,10 @@ var require_async = __commonJS({ } const eventMethod = (name) => (handler2) => { if (!handler2) { - return new Promise((resolve13, reject2) => { + return new Promise((resolve14, reject2) => { once2(name, (err, data) => { if (err) return reject2(err); - resolve13(data); + resolve14(data); }); }); } @@ -90642,7 +91542,7 @@ var require_async = __commonJS({ }, (err) => callback(err, memo)); } var reduce$1 = awaitify(reduce, 4); - function seq2(...functions) { + function seq(...functions) { var _functions = functions.map(wrapAsync); return function(...args) { var that = this; @@ -90666,7 +91566,7 @@ var require_async = __commonJS({ }; } function compose(...args) { - return seq2(...args.reverse()); + return seq(...args.reverse()); } function mapLimit(coll, limit, iteratee, callback) { return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback); @@ -90726,15 +91626,15 @@ var require_async = __commonJS({ }; } function detect(coll, iteratee, callback) { - return _createTester((bool2) => bool2, (res, item) => item)(eachOf$1, coll, iteratee, callback); + return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback); } var detect$1 = awaitify(detect, 3); function detectLimit(coll, limit, iteratee, callback) { - return _createTester((bool2) => bool2, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback); + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback); } var detectLimit$1 = awaitify(detectLimit, 4); function detectSeries(coll, iteratee, callback) { - return _createTester((bool2) => bool2, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback); + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback); } var detectSeries$1 = awaitify(detectSeries, 3); function consoleFunc(name) { @@ -90779,7 +91679,7 @@ var require_async = __commonJS({ }, callback); } function _withoutIndex(iteratee) { - return (value, index2, callback) => iteratee(value, callback); + return (value, index3, callback) => iteratee(value, callback); } function eachLimit$2(coll, iteratee, callback) { return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); @@ -90810,22 +91710,22 @@ var require_async = __commonJS({ }; } function every(coll, iteratee, callback) { - return _createTester((bool2) => !bool2, (res) => !res)(eachOf$1, coll, iteratee, callback); + return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback); } var every$1 = awaitify(every, 3); function everyLimit(coll, limit, iteratee, callback) { - return _createTester((bool2) => !bool2, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback); + return _createTester((bool) => !bool, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback); } var everyLimit$1 = awaitify(everyLimit, 4); function everySeries(coll, iteratee, callback) { - return _createTester((bool2) => !bool2, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); + return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); } var everySeries$1 = awaitify(everySeries, 3); function filterArray(eachfn, arr, iteratee, callback) { var truthValues = new Array(arr.length); - eachfn(arr, (x, index2, iterCb) => { + eachfn(arr, (x, index3, iterCb) => { iteratee(x, (err, v) => { - truthValues[index2] = !!v; + truthValues[index3] = !!v; iterCb(err); }); }, (err) => { @@ -90839,11 +91739,11 @@ var require_async = __commonJS({ } function filterGeneric(eachfn, coll, iteratee, callback) { var results = []; - eachfn(coll, (x, index2, iterCb) => { + eachfn(coll, (x, index3, iterCb) => { iteratee(x, (err, v) => { if (err) return iterCb(err); if (v) { - results.push({ index: index2, value: x }); + results.push({ index: index3, value: x }); } iterCb(err); }); @@ -90853,13 +91753,13 @@ var require_async = __commonJS({ }); } function _filter(eachfn, coll, iteratee, callback) { - var filter2 = isArrayLike(coll) ? filterArray : filterGeneric; - return filter2(eachfn, coll, wrapAsync(iteratee), callback); + var filter3 = isArrayLike(coll) ? filterArray : filterGeneric; + return filter3(eachfn, coll, wrapAsync(iteratee), callback); } - function filter(coll, iteratee, callback) { + function filter2(coll, iteratee, callback) { return _filter(eachOf$1, coll, iteratee, callback); } - var filter$1 = awaitify(filter, 3); + var filter$1 = awaitify(filter2, 3); function filterLimit(coll, limit, iteratee, callback) { return _filter(eachOfLimit$2(limit), coll, iteratee, callback); } @@ -90985,7 +91885,7 @@ var require_async = __commonJS({ function parallelLimit(tasks, limit, callback) { return _parallel(eachOfLimit$2(limit), tasks, callback); } - function queue(worker, concurrency) { + function queue2(worker, concurrency) { var _worker = wrapAsync(worker); return queue$1((items, cb) => { _worker(items[0], cb); @@ -91003,28 +91903,28 @@ var require_async = __commonJS({ this.heap = []; return this; } - percUp(index2) { + percUp(index3) { let p; - while (index2 > 0 && smaller(this.heap[index2], this.heap[p = parent(index2)])) { - let t = this.heap[index2]; - this.heap[index2] = this.heap[p]; + while (index3 > 0 && smaller(this.heap[index3], this.heap[p = parent(index3)])) { + let t = this.heap[index3]; + this.heap[index3] = this.heap[p]; this.heap[p] = t; - index2 = p; + index3 = p; } } - percDown(index2) { + percDown(index3) { let l; - while ((l = leftChi(index2)) < this.heap.length) { + while ((l = leftChi(index3)) < this.heap.length) { if (l + 1 < this.heap.length && smaller(this.heap[l + 1], this.heap[l])) { l = l + 1; } - if (smaller(this.heap[index2], this.heap[l])) { + if (smaller(this.heap[index3], this.heap[l])) { break; } - let t = this.heap[index2]; - this.heap[index2] = this.heap[l]; + let t = this.heap[index3]; + this.heap[index3] = this.heap[l]; this.heap[l] = t; - index2 = l; + index3 = l; } } push(node) { @@ -91079,7 +91979,7 @@ var require_async = __commonJS({ } } function priorityQueue(worker, concurrency) { - var q = queue(worker, concurrency); + var q = queue2(worker, concurrency); var { push, pushAsync @@ -91119,8 +92019,8 @@ var require_async = __commonJS({ } } var race$1 = awaitify(race, 2); - function reduceRight(array, memo, iteratee, callback) { - var reversed = [...array].reverse(); + function reduceRight(array2, memo, iteratee, callback) { + var reversed = [...array2].reverse(); return reduce$1(reversed, memo, iteratee, callback); } function reflect(fn) { @@ -91303,7 +92203,7 @@ var require_async = __commonJS({ fn(...args); }); } - function range(size) { + function range2(size) { var result = Array(size); while (size--) { result[size] = size; @@ -91312,7 +92212,7 @@ var require_async = __commonJS({ } function timesLimit(count, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(range(count), limit, _iteratee, callback); + return mapLimit$1(range2(count), limit, _iteratee, callback); } function times(n, iteratee, callback) { return timesLimit(n, Infinity, iteratee, callback); @@ -91398,7 +92298,7 @@ var require_async = __commonJS({ nextTask([]); } var waterfall$1 = awaitify(waterfall); - var index = { + var index2 = { apply, applyEach, applyEachSeries, @@ -91447,7 +92347,7 @@ var require_async = __commonJS({ parallel, parallelLimit, priorityQueue, - queue, + queue: queue2, race: race$1, reduce: reduce$1, reduceRight, @@ -91458,7 +92358,7 @@ var require_async = __commonJS({ rejectSeries: rejectSeries$1, retry: retry2, retryable, - seq: seq2, + seq, series, setImmediate: setImmediate$1, some: some$1, @@ -91523,7 +92423,7 @@ var require_async = __commonJS({ exports3.concatLimit = concatLimit$1; exports3.concatSeries = concatSeries$1; exports3.constant = constant$1; - exports3.default = index; + exports3.default = index2; exports3.detect = detect$1; exports3.detectLimit = detectLimit$1; exports3.detectSeries = detectSeries$1; @@ -91576,7 +92476,7 @@ var require_async = __commonJS({ exports3.parallel = parallel; exports3.parallelLimit = parallelLimit; exports3.priorityQueue = priorityQueue; - exports3.queue = queue; + exports3.queue = queue2; exports3.race = race$1; exports3.reduce = reduce$1; exports3.reduceRight = reduceRight; @@ -91590,7 +92490,7 @@ var require_async = __commonJS({ exports3.select = filter$1; exports3.selectLimit = filterLimit$1; exports3.selectSeries = filterSeries$1; - exports3.seq = seq2; + exports3.seq = seq; exports3.series = series; exports3.setImmediate = setImmediate$1; exports3.some = some$1; @@ -91639,54 +92539,54 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs30) { + function patch(fs31) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs30); - } - if (!fs30.lutimes) { - patchLutimes(fs30); - } - fs30.chown = chownFix(fs30.chown); - fs30.fchown = chownFix(fs30.fchown); - fs30.lchown = chownFix(fs30.lchown); - fs30.chmod = chmodFix(fs30.chmod); - fs30.fchmod = chmodFix(fs30.fchmod); - fs30.lchmod = chmodFix(fs30.lchmod); - fs30.chownSync = chownFixSync(fs30.chownSync); - fs30.fchownSync = chownFixSync(fs30.fchownSync); - fs30.lchownSync = chownFixSync(fs30.lchownSync); - fs30.chmodSync = chmodFixSync(fs30.chmodSync); - fs30.fchmodSync = chmodFixSync(fs30.fchmodSync); - fs30.lchmodSync = chmodFixSync(fs30.lchmodSync); - fs30.stat = statFix(fs30.stat); - fs30.fstat = statFix(fs30.fstat); - fs30.lstat = statFix(fs30.lstat); - fs30.statSync = statFixSync(fs30.statSync); - fs30.fstatSync = statFixSync(fs30.fstatSync); - fs30.lstatSync = statFixSync(fs30.lstatSync); - if (fs30.chmod && !fs30.lchmod) { - fs30.lchmod = function(path28, mode, cb) { + patchLchmod(fs31); + } + if (!fs31.lutimes) { + patchLutimes(fs31); + } + fs31.chown = chownFix(fs31.chown); + fs31.fchown = chownFix(fs31.fchown); + fs31.lchown = chownFix(fs31.lchown); + fs31.chmod = chmodFix(fs31.chmod); + fs31.fchmod = chmodFix(fs31.fchmod); + fs31.lchmod = chmodFix(fs31.lchmod); + fs31.chownSync = chownFixSync(fs31.chownSync); + fs31.fchownSync = chownFixSync(fs31.fchownSync); + fs31.lchownSync = chownFixSync(fs31.lchownSync); + fs31.chmodSync = chmodFixSync(fs31.chmodSync); + fs31.fchmodSync = chmodFixSync(fs31.fchmodSync); + fs31.lchmodSync = chmodFixSync(fs31.lchmodSync); + fs31.stat = statFix(fs31.stat); + fs31.fstat = statFix(fs31.fstat); + fs31.lstat = statFix(fs31.lstat); + fs31.statSync = statFixSync(fs31.statSync); + fs31.fstatSync = statFixSync(fs31.fstatSync); + fs31.lstatSync = statFixSync(fs31.lstatSync); + if (fs31.chmod && !fs31.lchmod) { + fs31.lchmod = function(path29, mode, cb) { if (cb) process.nextTick(cb); }; - fs30.lchmodSync = function() { + fs31.lchmodSync = function() { }; } - if (fs30.chown && !fs30.lchown) { - fs30.lchown = function(path28, uid, gid, cb) { + if (fs31.chown && !fs31.lchown) { + fs31.lchown = function(path29, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs30.lchownSync = function() { + fs31.lchownSync = function() { }; } if (platform2 === "win32") { - fs30.rename = typeof fs30.rename !== "function" ? fs30.rename : (function(fs$rename) { + fs31.rename = typeof fs31.rename !== "function" ? fs31.rename : (function(fs$rename) { function rename(from, to, cb) { var start = Date.now(); var backoff = 0; fs$rename(from, to, function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { setTimeout(function() { - fs30.stat(to, function(stater, st) { + fs31.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -91702,9 +92602,9 @@ var require_polyfills = __commonJS({ } if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; - })(fs30.rename); + })(fs31.rename); } - fs30.read = typeof fs30.read !== "function" ? fs30.read : (function(fs$read) { + fs31.read = typeof fs31.read !== "function" ? fs31.read : (function(fs$read) { function read(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { @@ -91712,22 +92612,22 @@ var require_polyfills = __commonJS({ callback = function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs30, fd, buffer, offset, length, position, callback); + return fs$read.call(fs31, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs30, fd, buffer, offset, length, position, callback); + return fs$read.call(fs31, fd, buffer, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; - })(fs30.read); - fs30.readSync = typeof fs30.readSync !== "function" ? fs30.readSync : /* @__PURE__ */ (function(fs$readSync) { + })(fs31.read); + fs31.readSync = typeof fs31.readSync !== "function" ? fs31.readSync : /* @__PURE__ */ (function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { - return fs$readSync.call(fs30, fd, buffer, offset, length, position); + return fs$readSync.call(fs31, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -91737,11 +92637,11 @@ var require_polyfills = __commonJS({ } } }; - })(fs30.readSync); - function patchLchmod(fs31) { - fs31.lchmod = function(path28, mode, callback) { - fs31.open( - path28, + })(fs31.readSync); + function patchLchmod(fs32) { + fs32.lchmod = function(path29, mode, callback) { + fs32.open( + path29, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -91749,80 +92649,80 @@ var require_polyfills = __commonJS({ if (callback) callback(err); return; } - fs31.fchmod(fd, mode, function(err2) { - fs31.close(fd, function(err22) { + fs32.fchmod(fd, mode, function(err2) { + fs32.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); } ); }; - fs31.lchmodSync = function(path28, mode) { - var fd = fs31.openSync(path28, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs32.lchmodSync = function(path29, mode) { + var fd = fs32.openSync(path29, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs31.fchmodSync(fd, mode); + ret = fs32.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs31.closeSync(fd); + fs32.closeSync(fd); } catch (er) { } } else { - fs31.closeSync(fd); + fs32.closeSync(fd); } } return ret; }; } - function patchLutimes(fs31) { - if (constants.hasOwnProperty("O_SYMLINK") && fs31.futimes) { - fs31.lutimes = function(path28, at, mt, cb) { - fs31.open(path28, constants.O_SYMLINK, function(er, fd) { + function patchLutimes(fs32) { + if (constants.hasOwnProperty("O_SYMLINK") && fs32.futimes) { + fs32.lutimes = function(path29, at, mt, cb) { + fs32.open(path29, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } - fs31.futimes(fd, at, mt, function(er2) { - fs31.close(fd, function(er22) { + fs32.futimes(fd, at, mt, function(er2) { + fs32.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs31.lutimesSync = function(path28, at, mt) { - var fd = fs31.openSync(path28, constants.O_SYMLINK); + fs32.lutimesSync = function(path29, at, mt) { + var fd = fs32.openSync(path29, constants.O_SYMLINK); var ret; var threw = true; try { - ret = fs31.futimesSync(fd, at, mt); + ret = fs32.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs31.closeSync(fd); + fs32.closeSync(fd); } catch (er) { } } else { - fs31.closeSync(fd); + fs32.closeSync(fd); } } return ret; }; - } else if (fs31.futimes) { - fs31.lutimes = function(_a, _b, _c, cb) { + } else if (fs32.futimes) { + fs32.lutimes = function(_a2, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs31.lutimesSync = function() { + fs32.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs30, target, mode, function(er) { + return orig.call(fs31, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -91832,7 +92732,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode) { try { - return orig.call(fs30, target, mode); + return orig.call(fs31, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } @@ -91841,7 +92741,7 @@ var require_polyfills = __commonJS({ function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs30, target, uid, gid, function(er) { + return orig.call(fs31, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -91851,7 +92751,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid) { try { - return orig.call(fs30, target, uid, gid); + return orig.call(fs31, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } @@ -91871,13 +92771,13 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs30, target, options, callback) : orig.call(fs30, target, callback); + return options ? orig.call(fs31, target, options, callback) : orig.call(fs31, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { - var stats = options ? orig.call(fs30, target, options) : orig.call(fs30, target); + var stats = options ? orig.call(fs31, target, options) : orig.call(fs31, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; @@ -91906,16 +92806,16 @@ var require_legacy_streams = __commonJS({ "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { var Stream = require("stream").Stream; module2.exports = legacy; - function legacy(fs30) { + function legacy(fs31) { return { ReadStream, WriteStream }; - function ReadStream(path28, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path28, options); + function ReadStream(path29, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path29, options); Stream.call(this); var self2 = this; - this.path = path28; + this.path = path29; this.fd = null; this.readable = true; this.paused = false; @@ -91924,8 +92824,8 @@ var require_legacy_streams = __commonJS({ this.bufferSize = 64 * 1024; options = options || {}; var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; + for (var index2 = 0, length = keys.length; index2 < length; index2++) { + var key = keys[index2]; this[key] = options[key]; } if (this.encoding) this.setEncoding(this.encoding); @@ -91949,7 +92849,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs30.open(this.path, this.flags, this.mode, function(err, fd) { + fs31.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self2.emit("error", err); self2.readable = false; @@ -91960,10 +92860,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path28, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path28, options); + function WriteStream(path29, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path29, options); Stream.call(this); - this.path = path28; + this.path = path29; this.fd = null; this.writable = true; this.flags = "w"; @@ -91972,8 +92872,8 @@ var require_legacy_streams = __commonJS({ this.bytesWritten = 0; options = options || {}; var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; + for (var index2 = 0, length = keys.length; index2 < length; index2++) { + var key = keys[index2]; this[key] = options[key]; } if (this.start !== void 0) { @@ -91988,7 +92888,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs30.open; + this._open = fs31.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -92023,11 +92923,11 @@ var require_clone = __commonJS({ // node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs30 = require("fs"); + var fs31 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); - var util = require("util"); + var util3 = require("util"); var gracefulQueue; var previousSymbol; if (typeof Symbol === "function" && typeof Symbol.for === "function") { @@ -92039,28 +92939,28 @@ var require_graceful_fs = __commonJS({ } function noop3() { } - function publishQueue(context5, queue2) { + function publishQueue(context5, queue3) { Object.defineProperty(context5, gracefulQueue, { get: function() { - return queue2; + return queue3; } }); } var debug6 = noop3; - if (util.debuglog) - debug6 = util.debuglog("gfs4"); + if (util3.debuglog) + debug6 = util3.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug6 = function() { - var m = util.format.apply(util, arguments); + var m = util3.format.apply(util3, arguments); m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs30[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs30, queue); - fs30.close = (function(fs$close) { + if (!fs31[gracefulQueue]) { + queue2 = global[gracefulQueue] || []; + publishQueue(fs31, queue2); + fs31.close = (function(fs$close) { function close(fd, cb) { - return fs$close.call(fs30, fd, function(err) { + return fs$close.call(fs31, fd, function(err) { if (!err) { resetQueue(); } @@ -92072,48 +92972,48 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - })(fs30.close); - fs30.closeSync = (function(fs$closeSync) { + })(fs31.close); + fs31.closeSync = (function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs30, arguments); + fs$closeSync.apply(fs31, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - })(fs30.closeSync); + })(fs31.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug6(fs30[gracefulQueue]); - require("assert").equal(fs30[gracefulQueue].length, 0); + debug6(fs31[gracefulQueue]); + require("assert").equal(fs31[gracefulQueue].length, 0); }); } } - var queue; + var queue2; if (!global[gracefulQueue]) { - publishQueue(global, fs30[gracefulQueue]); - } - module2.exports = patch(clone(fs30)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs30.__patched) { - module2.exports = patch(fs30); - fs30.__patched = true; - } - function patch(fs31) { - polyfills(fs31); - fs31.gracefulify = patch; - fs31.createReadStream = createReadStream3; - fs31.createWriteStream = createWriteStream3; - var fs$readFile = fs31.readFile; - fs31.readFile = readFile; - function readFile(path28, options, cb) { + publishQueue(global, fs31[gracefulQueue]); + } + module2.exports = patch(clone(fs31)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs31.__patched) { + module2.exports = patch(fs31); + fs31.__patched = true; + } + function patch(fs32) { + polyfills(fs32); + fs32.gracefulify = patch; + fs32.createReadStream = createReadStream4; + fs32.createWriteStream = createWriteStream3; + var fs$readFile = fs32.readFile; + fs32.readFile = readFile; + function readFile(path29, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path28, options, cb); - function go$readFile(path29, options2, cb2, startTime) { - return fs$readFile(path29, options2, function(err) { + return go$readFile(path29, options, cb); + function go$readFile(path30, options2, cb2, startTime) { + return fs$readFile(path30, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path29, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path30, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -92121,16 +93021,16 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs31.writeFile; - fs31.writeFile = writeFile; - function writeFile(path28, data, options, cb) { + var fs$writeFile = fs32.writeFile; + fs32.writeFile = writeFile; + function writeFile(path29, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path28, data, options, cb); - function go$writeFile(path29, data2, options2, cb2, startTime) { - return fs$writeFile(path29, data2, options2, function(err) { + return go$writeFile(path29, data, options, cb); + function go$writeFile(path30, data2, options2, cb2, startTime) { + return fs$writeFile(path30, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path29, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path30, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -92138,17 +93038,17 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs31.appendFile; + var fs$appendFile = fs32.appendFile; if (fs$appendFile) - fs31.appendFile = appendFile; - function appendFile(path28, data, options, cb) { + fs32.appendFile = appendFile; + function appendFile(path29, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path28, data, options, cb); - function go$appendFile(path29, data2, options2, cb2, startTime) { - return fs$appendFile(path29, data2, options2, function(err) { + return go$appendFile(path29, data, options, cb); + function go$appendFile(path30, data2, options2, cb2, startTime) { + return fs$appendFile(path30, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path29, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path30, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -92156,9 +93056,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs31.copyFile; + var fs$copyFile = fs32.copyFile; if (fs$copyFile) - fs31.copyFile = copyFile2; + fs32.copyFile = copyFile2; function copyFile2(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -92176,34 +93076,34 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs31.readdir; - fs31.readdir = readdir; + var fs$readdir = fs32.readdir; + fs32.readdir = readdir3; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path28, options, cb) { + function readdir3(path29, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path29, options2, cb2, startTime) { - return fs$readdir(path29, fs$readdirCallback( - path29, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path30, options2, cb2, startTime) { + return fs$readdir(path30, fs$readdirCallback( + path30, options2, cb2, startTime )); - } : function go$readdir2(path29, options2, cb2, startTime) { - return fs$readdir(path29, options2, fs$readdirCallback( - path29, + } : function go$readdir2(path30, options2, cb2, startTime) { + return fs$readdir(path30, options2, fs$readdirCallback( + path30, options2, cb2, startTime )); }; - return go$readdir(path28, options, cb); - function fs$readdirCallback(path29, options2, cb2, startTime) { + return go$readdir(path29, options, cb); + function fs$readdirCallback(path30, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path29, options2, cb2], + [path30, options2, cb2], err, startTime || Date.now(), Date.now() @@ -92218,21 +93118,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs31); + var legStreams = legacy(fs32); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs31.ReadStream; + var fs$ReadStream = fs32.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs31.WriteStream; + var fs$WriteStream = fs32.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs31, "ReadStream", { + Object.defineProperty(fs32, "ReadStream", { get: function() { return ReadStream; }, @@ -92242,7 +93142,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs31, "WriteStream", { + Object.defineProperty(fs32, "WriteStream", { get: function() { return WriteStream; }, @@ -92253,7 +93153,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs31, "FileReadStream", { + Object.defineProperty(fs32, "FileReadStream", { get: function() { return FileReadStream; }, @@ -92264,7 +93164,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs31, "FileWriteStream", { + Object.defineProperty(fs32, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -92274,7 +93174,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path28, options) { + function ReadStream(path29, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -92294,7 +93194,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path28, options) { + function WriteStream(path29, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -92312,22 +93212,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream3(path28, options) { - return new fs31.ReadStream(path28, options); + function createReadStream4(path29, options) { + return new fs32.ReadStream(path29, options); } - function createWriteStream3(path28, options) { - return new fs31.WriteStream(path28, options); + function createWriteStream3(path29, options) { + return new fs32.WriteStream(path29, options); } - var fs$open = fs31.open; - fs31.open = open; - function open(path28, flags, mode, cb) { + var fs$open = fs32.open; + fs32.open = open; + function open(path29, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path28, flags, mode, cb); - function go$open(path29, flags2, mode2, cb2, startTime) { - return fs$open(path29, flags2, mode2, function(err, fd) { + return go$open(path29, flags, mode, cb); + function go$open(path30, flags2, mode2, cb2, startTime) { + return fs$open(path30, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path29, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path30, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -92335,20 +93235,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs31; + return fs32; } function enqueue(elem) { debug6("ENQUEUE", elem[0].name, elem[1]); - fs30[gracefulQueue].push(elem); + fs31[gracefulQueue].push(elem); retry2(); } var retryTimer; function resetQueue() { var now = Date.now(); - for (var i = 0; i < fs30[gracefulQueue].length; ++i) { - if (fs30[gracefulQueue][i].length > 2) { - fs30[gracefulQueue][i][3] = now; - fs30[gracefulQueue][i][4] = now; + for (var i = 0; i < fs31[gracefulQueue].length; ++i) { + if (fs31[gracefulQueue][i].length > 2) { + fs31[gracefulQueue][i][3] = now; + fs31[gracefulQueue][i][4] = now; } } retry2(); @@ -92356,9 +93256,9 @@ var require_graceful_fs = __commonJS({ function retry2() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs30[gracefulQueue].length === 0) + if (fs31[gracefulQueue].length === 0) return; - var elem = fs30[gracefulQueue].shift(); + var elem = fs31[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; @@ -92380,7 +93280,7 @@ var require_graceful_fs = __commonJS({ debug6("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs30[gracefulQueue].push(elem); + fs31[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -92394,12 +93294,12 @@ var require_graceful_fs = __commonJS({ var require_is_stream = __commonJS({ "node_modules/archiver-utils/node_modules/is-stream/index.js"(exports2, module2) { "use strict"; - var isStream = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function"; - isStream.writable = (stream2) => isStream(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object"; - isStream.readable = (stream2) => isStream(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object"; - isStream.duplex = (stream2) => isStream.writable(stream2) && isStream.readable(stream2); - isStream.transform = (stream2) => isStream.duplex(stream2) && typeof stream2._transform === "function"; - module2.exports = isStream; + var isStream2 = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function"; + isStream2.writable = (stream2) => isStream2(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object"; + isStream2.readable = (stream2) => isStream2(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object"; + isStream2.duplex = (stream2) => isStream2.writable(stream2) && isStream2.readable(stream2); + isStream2.transform = (stream2) => isStream2.duplex(stream2) && typeof stream2._transform === "function"; + module2.exports = isStream2; } }); @@ -92451,9 +93351,9 @@ var require_process_nextick_args = __commonJS({ // node_modules/lazystream/node_modules/isarray/index.js var require_isarray = __commonJS({ "node_modules/lazystream/node_modules/isarray/index.js"(exports2, module2) { - var toString3 = {}.toString; + var toString2 = {}.toString; module2.exports = Array.isArray || function(arr) { - return toString3.call(arr) == "[object Array]"; + return toString2.call(arr) == "[object Array]"; }; } }); @@ -92536,18 +93436,18 @@ var require_util12 = __commonJS({ return typeof arg === "boolean"; } exports2.isBoolean = isBoolean2; - function isNull2(arg) { + function isNull(arg) { return arg === null; } - exports2.isNull = isNull2; + exports2.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports2.isNullOrUndefined = isNullOrUndefined; - function isNumber(arg) { + function isNumber2(arg) { return typeof arg === "number"; } - exports2.isNumber = isNumber; + exports2.isNumber = isNumber2; function isString3(arg) { return typeof arg === "string"; } @@ -92564,10 +93464,10 @@ var require_util12 = __commonJS({ return objectToString(re) === "[object RegExp]"; } exports2.isRegExp = isRegExp; - function isObject3(arg) { + function isObject2(arg) { return typeof arg === "object" && arg !== null; } - exports2.isObject = isObject3; + exports2.isObject = isObject2; function isDate(d) { return objectToString(d) === "[object Date]"; } @@ -92597,24 +93497,28 @@ var require_inherits_browser = __commonJS({ "node_modules/inherits/inherits_browser.js"(exports2, module2) { if (typeof Object.create === "function") { module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } }; } else { module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } }; } } @@ -92624,13 +93528,13 @@ var require_inherits_browser = __commonJS({ var require_inherits = __commonJS({ "node_modules/inherits/inherits.js"(exports2, module2) { try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; + util3 = require("util"); + if (typeof util3.inherits !== "function") throw ""; + module2.exports = util3.inherits; } catch (e) { module2.exports = require_inherits_browser(); } - var util; + var util3; } }); @@ -92644,7 +93548,7 @@ var require_BufferList = __commonJS({ } } var Buffer2 = require_safe_buffer().Buffer; - var util = require("util"); + var util3 = require("util"); function copyBuffer(src, target, offset) { src.copy(target, offset); } @@ -92703,9 +93607,9 @@ var require_BufferList = __commonJS({ }; return BufferList; })(); - if (util && util.inspect && util.inspect.custom) { - module2.exports.prototype[util.inspect.custom] = function() { - var obj = util.inspect({ length: this.length }); + if (util3 && util3.inspect && util3.inspect.custom) { + module2.exports.prototype[util3.inspect.custom] = function() { + var obj = util3.inspect({ length: this.length }); return this.constructor.name + " " + obj; }; } @@ -92805,8 +93709,8 @@ var require_stream_writable = __commonJS({ var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util12()); - util.inherits = require_inherits(); + var util3 = Object.create(require_util12()); + util3.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() }; @@ -92821,7 +93725,7 @@ var require_stream_writable = __commonJS({ return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } var destroyImpl = require_destroy(); - util.inherits(Writable, Stream); + util3.inherits(Writable, Stream); function nop() { } function WritableState(options, stream2) { @@ -92887,15 +93791,15 @@ var require_stream_writable = __commonJS({ if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { - value: function(object) { - if (realHasInstance.call(this, object)) return true; + value: function(object2) { + if (realHasInstance.call(this, object2)) return true; if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; + return object2 && object2._writableState instanceof WritableState; } }); } else { - realHasInstance = function(object) { - return object instanceof this; + realHasInstance = function(object2) { + return object2 instanceof this; }; } function Writable(options) { @@ -93241,11 +94145,11 @@ var require_stream_duplex = __commonJS({ return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util12()); - util.inherits = require_inherits(); - var Readable2 = require_stream_readable(); + var util3 = Object.create(require_util12()); + util3.inherits = require_inherits(); + var Readable3 = require_stream_readable(); var Writable = require_stream_writable(); - util.inherits(Duplex, Readable2); + util3.inherits(Duplex, Readable3); { keys = objectKeys(Writable.prototype); for (v = 0; v < keys.length; v++) { @@ -93258,7 +94162,7 @@ var require_stream_duplex = __commonJS({ var v; function Duplex(options) { if (!(this instanceof Duplex)) return new Duplex(options); - Readable2.call(this, options); + Readable3.call(this, options); Writable.call(this, options); if (options && options.readable === false) this.readable = false; if (options && options.writable === false) this.writable = false; @@ -93548,13 +94452,13 @@ var require_stream_readable = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { "use strict"; var pna = require_process_nextick_args(); - module2.exports = Readable2; + module2.exports = Readable3; var isArray2 = require_isarray(); var Duplex; - Readable2.ReadableState = ReadableState; + Readable3.ReadableState = ReadableState; var EE = require("events").EventEmitter; - var EElistenerCount = function(emitter, type2) { - return emitter.listeners(type2).length; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; }; var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; @@ -93566,8 +94470,8 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util12()); - util.inherits = require_inherits(); + var util3 = Object.create(require_util12()); + util3.inherits = require_inherits(); var debugUtil = require("util"); var debug6 = void 0; if (debugUtil && debugUtil.debuglog) { @@ -93579,7 +94483,7 @@ var require_stream_readable = __commonJS({ var BufferList = require_BufferList(); var destroyImpl = require_destroy(); var StringDecoder; - util.inherits(Readable2, Stream); + util3.inherits(Readable3, Stream); var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; function prependListener(emitter, event, fn) { if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); @@ -93625,9 +94529,9 @@ var require_stream_readable = __commonJS({ this.encoding = options.encoding; } } - function Readable2(options) { + function Readable3(options) { Duplex = Duplex || require_stream_duplex(); - if (!(this instanceof Readable2)) return new Readable2(options); + if (!(this instanceof Readable3)) return new Readable3(options); this._readableState = new ReadableState(options, this); this.readable = true; if (options) { @@ -93636,7 +94540,7 @@ var require_stream_readable = __commonJS({ } Stream.call(this); } - Object.defineProperty(Readable2.prototype, "destroyed", { + Object.defineProperty(Readable3.prototype, "destroyed", { get: function() { if (this._readableState === void 0) { return false; @@ -93650,13 +94554,13 @@ var require_stream_readable = __commonJS({ this._readableState.destroyed = value; } }); - Readable2.prototype.destroy = destroyImpl.destroy; - Readable2.prototype._undestroy = destroyImpl.undestroy; - Readable2.prototype._destroy = function(err, cb) { + Readable3.prototype.destroy = destroyImpl.destroy; + Readable3.prototype._undestroy = destroyImpl.undestroy; + Readable3.prototype._destroy = function(err, cb) { this.push(null); cb(err); }; - Readable2.prototype.push = function(chunk, encoding) { + Readable3.prototype.push = function(chunk, encoding) { var state = this._readableState; var skipChunkCheck; if (!state.objectMode) { @@ -93673,7 +94577,7 @@ var require_stream_readable = __commonJS({ } return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); }; - Readable2.prototype.unshift = function(chunk) { + Readable3.prototype.unshift = function(chunk) { return readableAddChunk(this, chunk, null, true, false); }; function readableAddChunk(stream2, chunk, encoding, addToFront, skipChunkCheck) { @@ -93733,10 +94637,10 @@ var require_stream_readable = __commonJS({ function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); } - Readable2.prototype.isPaused = function() { + Readable3.prototype.isPaused = function() { return this._readableState.flowing === false; }; - Readable2.prototype.setEncoding = function(enc) { + Readable3.prototype.setEncoding = function(enc) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; @@ -93772,7 +94676,7 @@ var require_stream_readable = __commonJS({ } return state.length; } - Readable2.prototype.read = function(n) { + Readable3.prototype.read = function(n) { debug6("read", n); n = parseInt(n, 10); var state = this._readableState; @@ -93867,10 +94771,10 @@ var require_stream_readable = __commonJS({ } state.readingMore = false; } - Readable2.prototype._read = function(n) { + Readable3.prototype._read = function(n) { this.emit("error", new Error("_read() is not implemented")); }; - Readable2.prototype.pipe = function(dest, pipeOpts) { + Readable3.prototype.pipe = function(dest, pipeOpts) { var src = this; var state = this._readableState; switch (state.pipesCount) { @@ -93975,7 +94879,7 @@ var require_stream_readable = __commonJS({ } }; } - Readable2.prototype.unpipe = function(dest) { + Readable3.prototype.unpipe = function(dest) { var state = this._readableState; var unpipeInfo = { hasUnpiped: false }; if (state.pipesCount === 0) return this; @@ -93999,15 +94903,15 @@ var require_stream_readable = __commonJS({ } return this; } - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); + var index2 = indexOf(state.pipes, dest); + if (index2 === -1) return this; + state.pipes.splice(index2, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; dest.emit("unpipe", this, unpipeInfo); return this; }; - Readable2.prototype.on = function(ev, fn) { + Readable3.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); if (ev === "data") { if (this._readableState.flowing !== false) this.resume(); @@ -94025,12 +94929,12 @@ var require_stream_readable = __commonJS({ } return res; }; - Readable2.prototype.addListener = Readable2.prototype.on; + Readable3.prototype.addListener = Readable3.prototype.on; function nReadingNextTick(self2) { debug6("readable nexttick read 0"); self2.read(0); } - Readable2.prototype.resume = function() { + Readable3.prototype.resume = function() { var state = this._readableState; if (!state.flowing) { debug6("resume"); @@ -94056,7 +94960,7 @@ var require_stream_readable = __commonJS({ flow(stream2); if (state.flowing && !state.reading) stream2.read(0); } - Readable2.prototype.pause = function() { + Readable3.prototype.pause = function() { debug6("call pause flowing=%j", this._readableState.flowing); if (false !== this._readableState.flowing) { debug6("pause"); @@ -94071,7 +94975,7 @@ var require_stream_readable = __commonJS({ while (state.flowing && stream2.read() !== null) { } } - Readable2.prototype.wrap = function(stream2) { + Readable3.prototype.wrap = function(stream2) { var _this = this; var state = this._readableState; var paused = false; @@ -94115,7 +95019,7 @@ var require_stream_readable = __commonJS({ }; return this; }; - Object.defineProperty(Readable2.prototype, "readableHighWaterMark", { + Object.defineProperty(Readable3.prototype, "readableHighWaterMark", { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail @@ -94124,7 +95028,7 @@ var require_stream_readable = __commonJS({ return this._readableState.highWaterMark; } }); - Readable2._fromList = fromList; + Readable3._fromList = fromList; function fromList(n, state) { if (state.length === 0) return null; var ret; @@ -94157,19 +95061,19 @@ var require_stream_readable = __commonJS({ var ret = p.data; n -= ret.length; while (p = p.next) { - var str2 = p.data; - var nb = n > str2.length ? str2.length : n; - if (nb === str2.length) ret += str2; - else ret += str2.slice(0, n); + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str; + else ret += str.slice(0, n); n -= nb; if (n === 0) { - if (nb === str2.length) { + if (nb === str.length) { ++c; if (p.next) list.head = p.next; else list.head = list.tail = null; } else { list.head = p; - p.data = str2.slice(nb); + p.data = str.slice(nb); } break; } @@ -94233,11 +95137,11 @@ var require_stream_readable = __commonJS({ var require_stream_transform = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { "use strict"; - module2.exports = Transform; + module2.exports = Transform5; var Duplex = require_stream_duplex(); - var util = Object.create(require_util12()); - util.inherits = require_inherits(); - util.inherits(Transform, Duplex); + var util3 = Object.create(require_util12()); + util3.inherits = require_inherits(); + util3.inherits(Transform5, Duplex); function afterTransform(er, data) { var ts = this._transformState; ts.transforming = false; @@ -94256,8 +95160,8 @@ var require_stream_transform = __commonJS({ this._read(rs.highWaterMark); } } - function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); + function Transform5(options) { + if (!(this instanceof Transform5)) return new Transform5(options); Duplex.call(this, options); this._transformState = { afterTransform: afterTransform.bind(this), @@ -94285,14 +95189,14 @@ var require_stream_transform = __commonJS({ done(this, null, null); } } - Transform.prototype.push = function(chunk, encoding) { + Transform5.prototype.push = function(chunk, encoding) { this._transformState.needTransform = false; return Duplex.prototype.push.call(this, chunk, encoding); }; - Transform.prototype._transform = function(chunk, encoding, cb) { + Transform5.prototype._transform = function(chunk, encoding, cb) { throw new Error("_transform() is not implemented"); }; - Transform.prototype._write = function(chunk, encoding, cb) { + Transform5.prototype._write = function(chunk, encoding, cb) { var ts = this._transformState; ts.writecb = cb; ts.writechunk = chunk; @@ -94302,7 +95206,7 @@ var require_stream_transform = __commonJS({ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); } }; - Transform.prototype._read = function(n) { + Transform5.prototype._read = function(n) { var ts = this._transformState; if (ts.writechunk !== null && ts.writecb && !ts.transforming) { ts.transforming = true; @@ -94311,7 +95215,7 @@ var require_stream_transform = __commonJS({ ts.needTransform = true; } }; - Transform.prototype._destroy = function(err, cb) { + Transform5.prototype._destroy = function(err, cb) { var _this2 = this; Duplex.prototype._destroy.call(this, err, function(err2) { cb(err2); @@ -94333,16 +95237,16 @@ var require_stream_transform = __commonJS({ var require_stream_passthrough = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { "use strict"; - module2.exports = PassThrough; - var Transform = require_stream_transform(); - var util = Object.create(require_util12()); - util.inherits = require_inherits(); - util.inherits(PassThrough, Transform); - function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); + module2.exports = PassThrough3; + var Transform5 = require_stream_transform(); + var util3 = Object.create(require_util12()); + util3.inherits = require_inherits(); + util3.inherits(PassThrough3, Transform5); + function PassThrough3(options) { + if (!(this instanceof PassThrough3)) return new PassThrough3(options); + Transform5.call(this, options); } - PassThrough.prototype._transform = function(chunk, encoding, cb) { + PassThrough3.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; } @@ -94383,14 +95287,14 @@ var require_passthrough = __commonJS({ // node_modules/lazystream/lib/lazystream.js var require_lazystream = __commonJS({ "node_modules/lazystream/lib/lazystream.js"(exports2, module2) { - var util = require("util"); - var PassThrough = require_passthrough(); + var util3 = require("util"); + var PassThrough3 = require_passthrough(); module2.exports = { - Readable: Readable2, + Readable: Readable3, Writable }; - util.inherits(Readable2, PassThrough); - util.inherits(Writable, PassThrough); + util3.inherits(Readable3, PassThrough3); + util3.inherits(Writable, PassThrough3); function beforeFirstCall(instance, method, callback) { instance[method] = function() { delete instance[method]; @@ -94398,10 +95302,10 @@ var require_lazystream = __commonJS({ return this[method].apply(this, arguments); }; } - function Readable2(fn, options) { - if (!(this instanceof Readable2)) - return new Readable2(fn, options); - PassThrough.call(this, options); + function Readable3(fn, options) { + if (!(this instanceof Readable3)) + return new Readable3(fn, options); + PassThrough3.call(this, options); beforeFirstCall(this, "_read", function() { var source = fn.call(this, options); var emit = this.emit.bind(this, "error"); @@ -94413,7 +95317,7 @@ var require_lazystream = __commonJS({ function Writable(fn, options) { if (!(this instanceof Writable)) return new Writable(fn, options); - PassThrough.call(this, options); + PassThrough3.call(this, options); beforeFirstCall(this, "_write", function() { var destination = fn.call(this, options); var emit = this.emit.bind(this, "error"); @@ -94428,22 +95332,22 @@ var require_lazystream = __commonJS({ // node_modules/normalize-path/index.js var require_normalize_path = __commonJS({ "node_modules/normalize-path/index.js"(exports2, module2) { - module2.exports = function(path28, stripTrailing) { - if (typeof path28 !== "string") { + module2.exports = function(path29, stripTrailing) { + if (typeof path29 !== "string") { throw new TypeError("expected path to be a string"); } - if (path28 === "\\" || path28 === "/") return "/"; - var len = path28.length; - if (len <= 1) return path28; + if (path29 === "\\" || path29 === "/") return "/"; + var len = path29.length; + if (len <= 1) return path29; var prefix = ""; - if (len > 4 && path28[3] === "\\") { - var ch = path28[2]; - if ((ch === "?" || ch === ".") && path28.slice(0, 2) === "\\\\") { - path28 = path28.slice(2); + if (len > 4 && path29[3] === "\\") { + var ch = path29[2]; + if ((ch === "?" || ch === ".") && path29.slice(0, 2) === "\\\\") { + path29 = path29.slice(2); prefix = "//"; } } - var segs = path28.split(/[/\\]+/); + var segs = path29.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -94490,16 +95394,16 @@ var require_overRest = __commonJS({ function overRest(func, start, transform) { start = nativeMax(start === void 0 ? func.length - 1 : start, 0); return function() { - var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); - while (++index < length) { - array[index] = args[start + index]; + var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array2 = Array(length); + while (++index2 < length) { + array2[index2] = args[start + index2]; } - index = -1; + index2 = -1; var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + while (++index2 < start) { + otherArgs[index2] = args[index2]; } - otherArgs[start] = transform(array); + otherArgs[start] = transform(array2); return apply(func, this, otherArgs); }; } @@ -94609,11 +95513,11 @@ var require_baseGetTag = __commonJS({ // node_modules/lodash/isObject.js var require_isObject = __commonJS({ "node_modules/lodash/isObject.js"(exports2, module2) { - function isObject3(value) { - var type2 = typeof value; - return value != null && (type2 == "object" || type2 == "function"); + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); } - module2.exports = isObject3; + module2.exports = isObject2; } }); @@ -94621,13 +95525,13 @@ var require_isObject = __commonJS({ var require_isFunction = __commonJS({ "node_modules/lodash/isFunction.js"(exports2, module2) { var baseGetTag = require_baseGetTag(); - var isObject3 = require_isObject(); + var isObject2 = require_isObject(); var asyncTag = "[object AsyncFunction]"; var funcTag = "[object Function]"; var genTag = "[object GeneratorFunction]"; var proxyTag = "[object Proxy]"; function isFunction(value) { - if (!isObject3(value)) { + if (!isObject2(value)) { return false; } var tag = baseGetTag(value); @@ -94688,7 +95592,7 @@ var require_baseIsNative = __commonJS({ "node_modules/lodash/_baseIsNative.js"(exports2, module2) { var isFunction = require_isFunction(); var isMasked = require_isMasked(); - var isObject3 = require_isObject(); + var isObject2 = require_isObject(); var toSource = require_toSource(); var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; @@ -94700,7 +95604,7 @@ var require_baseIsNative = __commonJS({ "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function baseIsNative(value) { - if (!isObject3(value) || isMasked(value)) { + if (!isObject2(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; @@ -94713,8 +95617,8 @@ var require_baseIsNative = __commonJS({ // node_modules/lodash/_getValue.js var require_getValue = __commonJS({ "node_modules/lodash/_getValue.js"(exports2, module2) { - function getValue(object, key) { - return object == null ? void 0 : object[key]; + function getValue(object2, key) { + return object2 == null ? void 0 : object2[key]; } module2.exports = getValue; } @@ -94725,8 +95629,8 @@ var require_getNative = __commonJS({ "node_modules/lodash/_getNative.js"(exports2, module2) { var baseIsNative = require_baseIsNative(); var getValue = require_getValue(); - function getNative(object, key) { - var value = getValue(object, key); + function getNative(object2, key) { + var value = getValue(object2, key); return baseIsNative(value) ? value : void 0; } module2.exports = getNative; @@ -94854,9 +95758,9 @@ var require_isIndex = __commonJS({ var MAX_SAFE_INTEGER = 9007199254740991; var reIsUint = /^(?:0|[1-9]\d*)$/; function isIndex(value, length) { - var type2 = typeof value; + var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } module2.exports = isIndex; } @@ -94868,14 +95772,14 @@ var require_isIterateeCall = __commonJS({ var eq = require_eq2(); var isArrayLike = require_isArrayLike(); var isIndex = require_isIndex(); - var isObject3 = require_isObject(); - function isIterateeCall(value, index, object) { - if (!isObject3(object)) { + var isObject2 = require_isObject(); + function isIterateeCall(value, index2, object2) { + if (!isObject2(object2)) { return false; } - var type2 = typeof index; - if (type2 == "number" ? isArrayLike(object) && isIndex(index, object.length) : type2 == "string" && index in object) { - return eq(object[index], value); + var type = typeof index2; + if (type == "number" ? isArrayLike(object2) && isIndex(index2, object2.length) : type == "string" && index2 in object2) { + return eq(object2[index2], value); } return false; } @@ -94887,9 +95791,9 @@ var require_isIterateeCall = __commonJS({ var require_baseTimes = __commonJS({ "node_modules/lodash/_baseTimes.js"(exports2, module2) { function baseTimes(n, iteratee) { - var index = -1, result = Array(n); - while (++index < n) { - result[index] = iteratee(index); + var index2 = -1, result = Array(n); + while (++index2 < n) { + result[index2] = iteratee(index2); } return result; } @@ -94982,11 +95886,11 @@ var require_baseIsTypedArray = __commonJS({ var dateTag = "[object Date]"; var errorTag = "[object Error]"; var funcTag = "[object Function]"; - var mapTag = "[object Map]"; + var mapTag2 = "[object Map]"; var numberTag = "[object Number]"; var objectTag = "[object Object]"; var regexpTag = "[object RegExp]"; - var setTag = "[object Set]"; + var setTag2 = "[object Set]"; var stringTag = "[object String]"; var weakMapTag = "[object WeakMap]"; var arrayBufferTag = "[object ArrayBuffer]"; @@ -95002,7 +95906,7 @@ var require_baseIsTypedArray = __commonJS({ var uint32Tag = "[object Uint32Array]"; var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag2] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } @@ -95032,9 +95936,9 @@ var require_nodeUtil = __commonJS({ var freeProcess = moduleExports && freeGlobal.process; var nodeUtil = (function() { try { - var types = freeModule && freeModule.require && freeModule.require("util").types; - if (types) { - return types; + var types2 = freeModule && freeModule.require && freeModule.require("util").types; + if (types2) { + return types2; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { @@ -95099,10 +96003,10 @@ var require_isPrototype = __commonJS({ // node_modules/lodash/_nativeKeysIn.js var require_nativeKeysIn = __commonJS({ "node_modules/lodash/_nativeKeysIn.js"(exports2, module2) { - function nativeKeysIn(object) { + function nativeKeysIn(object2) { var result = []; - if (object != null) { - for (var key in Object(object)) { + if (object2 != null) { + for (var key in Object(object2)) { result.push(key); } } @@ -95115,18 +96019,18 @@ var require_nativeKeysIn = __commonJS({ // node_modules/lodash/_baseKeysIn.js var require_baseKeysIn = __commonJS({ "node_modules/lodash/_baseKeysIn.js"(exports2, module2) { - var isObject3 = require_isObject(); + var isObject2 = require_isObject(); var isPrototype = require_isPrototype(); var nativeKeysIn = require_nativeKeysIn(); var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; - function baseKeysIn(object) { - if (!isObject3(object)) { - return nativeKeysIn(object); + function baseKeysIn(object2) { + if (!isObject2(object2)) { + return nativeKeysIn(object2); } - var isProto = isPrototype(object), result = []; - for (var key in object) { - if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + var isProto = isPrototype(object2), result = []; + for (var key in object2) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object2, key)))) { result.push(key); } } @@ -95142,8 +96046,8 @@ var require_keysIn = __commonJS({ var arrayLikeKeys = require_arrayLikeKeys(); var baseKeysIn = require_baseKeysIn(); var isArrayLike = require_isArrayLike(); - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + function keysIn(object2) { + return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2); } module2.exports = keysIn; } @@ -95158,30 +96062,30 @@ var require_defaults = __commonJS({ var keysIn = require_keysIn(); var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; - var defaults = baseRest(function(object, sources) { - object = Object(object); - var index = -1; + var defaults3 = baseRest(function(object2, sources) { + object2 = Object(object2); + var index2 = -1; var length = sources.length; var guard = length > 2 ? sources[2] : void 0; if (guard && isIterateeCall(sources[0], sources[1], guard)) { length = 1; } - while (++index < length) { - var source = sources[index]; + while (++index2 < length) { + var source = sources[index2]; var props = keysIn(source); var propsIndex = -1; var propsLength = props.length; while (++propsIndex < propsLength) { var key = props[propsIndex]; - var value = object[key]; - if (value === void 0 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { - object[key] = source[key]; + var value = object2[key]; + if (value === void 0 || eq(value, objectProto[key]) && !hasOwnProperty.call(object2, key)) { + object2[key] = source[key]; } } } - return object; + return object2; }); - module2.exports = defaults; + module2.exports = defaults3; } }); @@ -95189,7 +96093,23 @@ var require_defaults = __commonJS({ var require_primordials = __commonJS({ "node_modules/readable-stream/lib/ours/primordials.js"(exports2, module2) { "use strict"; + var AggregateError = class extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + let message = ""; + for (let i = 0; i < errors.length; i++) { + message += ` ${errors[i].stack} +`; + } + super(message); + this.name = "AggregateError"; + this.errors = errors; + } + }; module2.exports = { + AggregateError, ArrayIsArray(self2) { return Array.isArray(self2); }, @@ -95199,8 +96119,8 @@ var require_primordials = __commonJS({ ArrayPrototypeIndexOf(self2, el) { return self2.indexOf(el); }, - ArrayPrototypeJoin(self2, sep6) { - return self2.join(sep6); + ArrayPrototypeJoin(self2, sep7) { + return self2.join(sep7); }, ArrayPrototypeMap(self2, fn) { return self2.map(fn); @@ -95290,6 +96210,375 @@ var require_primordials = __commonJS({ } }); +// node_modules/readable-stream/lib/ours/util/inspect.js +var require_inspect2 = __commonJS({ + "node_modules/readable-stream/lib/ours/util/inspect.js"(exports2, module2) { + "use strict"; + module2.exports = { + format(format, ...args) { + return format.replace(/%([sdifj])/g, function(...[_unused, type]) { + const replacement = args.shift(); + if (type === "f") { + return replacement.toFixed(6); + } else if (type === "j") { + return JSON.stringify(replacement); + } else if (type === "s" && typeof replacement === "object") { + const ctor = replacement.constructor !== Object ? replacement.constructor.name : ""; + return `${ctor} {}`.trim(); + } else { + return replacement.toString(); + } + }); + }, + inspect(value) { + switch (typeof value) { + case "string": + if (value.includes("'")) { + if (!value.includes('"')) { + return `"${value}"`; + } else if (!value.includes("`") && !value.includes("${")) { + return `\`${value}\``; + } + } + return `'${value}'`; + case "number": + if (isNaN(value)) { + return "NaN"; + } else if (Object.is(value, -0)) { + return String(value); + } + return value; + case "bigint": + return `${String(value)}n`; + case "boolean": + case "undefined": + return String(value); + case "object": + return "{}"; + } + } + }; + } +}); + +// node_modules/readable-stream/lib/ours/errors.js +var require_errors4 = __commonJS({ + "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { + "use strict"; + var { format, inspect } = require_inspect2(); + var { AggregateError: CustomAggregateError } = require_primordials(); + var AggregateError = globalThis.AggregateError || CustomAggregateError; + var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); + var kTypes = [ + "string", + "function", + "number", + "object", + // Accept 'Function' and 'Object' as alternative to the lower cased version. + "Function", + "Object", + "boolean", + "bigint", + "symbol" + ]; + var classRegExp = /^([A-Z][a-z0-9]*)+$/; + var nodeInternalPrefix = "__node_internal_"; + var codes = {}; + function assert(value, message) { + if (!value) { + throw new codes.ERR_INTERNAL_ASSERTION(message); + } + } + function addNumericalSeparator(val) { + let res = ""; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}`; + } + return `${val.slice(0, i)}${res}`; + } + function getMessage(key, msg, args) { + if (typeof msg === "function") { + assert( + msg.length <= args.length, + // Default options do not count. + `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${msg.length}).` + ); + return msg(...args); + } + const expectedLength = (msg.match(/%[dfijoOs]/g) || []).length; + assert( + expectedLength === args.length, + `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).` + ); + if (args.length === 0) { + return msg; + } + return format(msg, ...args); + } + function E(code, message, Base) { + if (!Base) { + Base = Error; + } + class NodeError extends Base { + constructor(...args) { + super(getMessage(code, message, args)); + } + toString() { + return `${this.name} [${code}]: ${this.message}`; + } + } + Object.defineProperties(NodeError.prototype, { + name: { + value: Base.name, + writable: true, + enumerable: false, + configurable: true + }, + toString: { + value() { + return `${this.name} [${code}]: ${this.message}`; + }, + writable: true, + enumerable: false, + configurable: true + } + }); + NodeError.prototype.code = code; + NodeError.prototype[kIsNodeError] = true; + codes[code] = NodeError; + } + function hideStackFrames(fn) { + const hidden = nodeInternalPrefix + fn.name; + Object.defineProperty(fn, "name", { + value: hidden + }); + return fn; + } + function aggregateTwoErrors(innerError, outerError) { + if (innerError && outerError && innerError !== outerError) { + if (Array.isArray(outerError.errors)) { + outerError.errors.push(innerError); + return outerError; + } + const err = new AggregateError([outerError, innerError], outerError.message); + err.code = outerError.code; + return err; + } + return innerError || outerError; + } + var AbortError = class extends Error { + constructor(message = "The operation was aborted", options = void 0) { + if (options !== void 0 && typeof options !== "object") { + throw new codes.ERR_INVALID_ARG_TYPE("options", "Object", options); + } + super(message, options); + this.code = "ABORT_ERR"; + this.name = "AbortError"; + } + }; + E("ERR_ASSERTION", "%s", Error); + E( + "ERR_INVALID_ARG_TYPE", + (name, expected, actual) => { + assert(typeof name === "string", "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + let msg = "The "; + if (name.endsWith(" argument")) { + msg += `${name} `; + } else { + msg += `"${name}" ${name.includes(".") ? "property" : "argument"} `; + } + msg += "must be "; + const types2 = []; + const instances = []; + const other = []; + for (const value of expected) { + assert(typeof value === "string", "All expected entries have to be of type string"); + if (kTypes.includes(value)) { + types2.push(value.toLowerCase()); + } else if (classRegExp.test(value)) { + instances.push(value); + } else { + assert(value !== "object", 'The value "object" should be written as "Object"'); + other.push(value); + } + } + if (instances.length > 0) { + const pos = types2.indexOf("object"); + if (pos !== -1) { + types2.splice(types2, pos, 1); + instances.push("Object"); + } + } + if (types2.length > 0) { + switch (types2.length) { + case 1: + msg += `of type ${types2[0]}`; + break; + case 2: + msg += `one of type ${types2[0]} or ${types2[1]}`; + break; + default: { + const last = types2.pop(); + msg += `one of type ${types2.join(", ")}, or ${last}`; + } + } + if (instances.length > 0 || other.length > 0) { + msg += " or "; + } + } + if (instances.length > 0) { + switch (instances.length) { + case 1: + msg += `an instance of ${instances[0]}`; + break; + case 2: + msg += `an instance of ${instances[0]} or ${instances[1]}`; + break; + default: { + const last = instances.pop(); + msg += `an instance of ${instances.join(", ")}, or ${last}`; + } + } + if (other.length > 0) { + msg += " or "; + } + } + switch (other.length) { + case 0: + break; + case 1: + if (other[0].toLowerCase() !== other[0]) { + msg += "an "; + } + msg += `${other[0]}`; + break; + case 2: + msg += `one of ${other[0]} or ${other[1]}`; + break; + default: { + const last = other.pop(); + msg += `one of ${other.join(", ")}, or ${last}`; + } + } + if (actual == null) { + msg += `. Received ${actual}`; + } else if (typeof actual === "function" && actual.name) { + msg += `. Received function ${actual.name}`; + } else if (typeof actual === "object") { + var _actual$constructor; + if ((_actual$constructor = actual.constructor) !== null && _actual$constructor !== void 0 && _actual$constructor.name) { + msg += `. Received an instance of ${actual.constructor.name}`; + } else { + const inspected = inspect(actual, { + depth: -1 + }); + msg += `. Received ${inspected}`; + } + } else { + let inspected = inspect(actual, { + colors: false + }); + if (inspected.length > 25) { + inspected = `${inspected.slice(0, 25)}...`; + } + msg += `. Received type ${typeof actual} (${inspected})`; + } + return msg; + }, + TypeError + ); + E( + "ERR_INVALID_ARG_VALUE", + (name, value, reason = "is invalid") => { + let inspected = inspect(value); + if (inspected.length > 128) { + inspected = inspected.slice(0, 128) + "..."; + } + const type = name.includes(".") ? "property" : "argument"; + return `The ${type} '${name}' ${reason}. Received ${inspected}`; + }, + TypeError + ); + E( + "ERR_INVALID_RETURN_VALUE", + (input, name, value) => { + var _value$constructor; + const type = value !== null && value !== void 0 && (_value$constructor = value.constructor) !== null && _value$constructor !== void 0 && _value$constructor.name ? `instance of ${value.constructor.name}` : `type ${typeof value}`; + return `Expected ${input} to be returned from the "${name}" function but got ${type}.`; + }, + TypeError + ); + E( + "ERR_MISSING_ARGS", + (...args) => { + assert(args.length > 0, "At least one arg needs to be specified"); + let msg; + const len = args.length; + args = (Array.isArray(args) ? args : [args]).map((a) => `"${a}"`).join(" or "); + switch (len) { + case 1: + msg += `The ${args[0]} argument`; + break; + case 2: + msg += `The ${args[0]} and ${args[1]} arguments`; + break; + default: + { + const last = args.pop(); + msg += `The ${args.join(", ")}, and ${last} arguments`; + } + break; + } + return `${msg} must be specified`; + }, + TypeError + ); + E( + "ERR_OUT_OF_RANGE", + (str, range2, input) => { + assert(range2, 'Missing "range" argument'); + let received; + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)); + } else if (typeof input === "bigint") { + received = String(input); + const limit = BigInt(2) ** BigInt(32); + if (input > limit || input < -limit) { + received = addNumericalSeparator(received); + } + received += "n"; + } else { + received = inspect(input); + } + return `The value of "${str}" is out of range. It must be ${range2}. Received ${received}`; + }, + RangeError + ); + E("ERR_MULTIPLE_CALLBACK", "Callback called multiple times", Error); + E("ERR_METHOD_NOT_IMPLEMENTED", "The %s method is not implemented", Error); + E("ERR_STREAM_ALREADY_FINISHED", "Cannot call %s after a stream was finished", Error); + E("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable", Error); + E("ERR_STREAM_DESTROYED", "Cannot call %s after a stream was destroyed", Error); + E("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); + E("ERR_STREAM_PREMATURE_CLOSE", "Premature close", Error); + E("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF", Error); + E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event", Error); + E("ERR_STREAM_WRITE_AFTER_END", "write after end", Error); + E("ERR_UNKNOWN_ENCODING", "Unknown encoding: %s", TypeError); + module2.exports = { + AbortError, + aggregateTwoErrors: hideStackFrames(aggregateTwoErrors), + hideStackFrames, + codes + }; + } +}); + // node_modules/event-target-shim/dist/event-target-shim.js var require_event_target_shim = __commonJS({ "node_modules/event-target-shim/dist/event-target-shim.js"(exports2, module2) { @@ -95613,7 +96902,7 @@ var require_event_target_shim = __commonJS({ var CAPTURE = 1; var BUBBLE = 2; var ATTRIBUTE = 3; - function isObject3(x) { + function isObject2(x) { return x !== null && typeof x === "object"; } function getListeners(eventTarget) { @@ -95639,7 +96928,7 @@ var require_event_target_shim = __commonJS({ return null; }, set(listener) { - if (typeof listener !== "function" && !isObject3(listener)) { + if (typeof listener !== "function" && !isObject2(listener)) { listener = null; } const listeners = getListeners(this); @@ -95710,11 +96999,11 @@ var require_event_target_shim = __commonJS({ return defineCustomEventTarget(arguments[0]); } if (arguments.length > 0) { - const types = new Array(arguments.length); + const types2 = new Array(arguments.length); for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; + types2[i] = arguments[i]; } - return defineCustomEventTarget(types); + return defineCustomEventTarget(types2); } throw new TypeError("Cannot call a class as a function"); } @@ -95730,11 +97019,11 @@ var require_event_target_shim = __commonJS({ if (listener == null) { return; } - if (typeof listener !== "function" && !isObject3(listener)) { + if (typeof listener !== "function" && !isObject2(listener)) { throw new TypeError("'listener' should be a function or an object."); } const listeners = getListeners(this); - const optionsIsObj = isObject3(options); + const optionsIsObj = isObject2(options); const capture = optionsIsObj ? Boolean(options.capture) : Boolean(options); const listenerType = capture ? CAPTURE : BUBBLE; const newNode = { @@ -95771,7 +97060,7 @@ var require_event_target_shim = __commonJS({ return; } const listeners = getListeners(this); - const capture = isObject3(options) ? Boolean(options.capture) : Boolean(options); + const capture = isObject2(options) ? Boolean(options.capture) : Boolean(options); const listenerType = capture ? CAPTURE : BUBBLE; let prev = null; let node = listeners.get(eventName); @@ -95963,7 +97252,11 @@ var require_util13 = __commonJS({ "node_modules/readable-stream/lib/ours/util.js"(exports2, module2) { "use strict"; var bufferModule = require("buffer"); - var { kResistStopPropagation, SymbolDispose } = require_primordials(); + var { format, inspect } = require_inspect2(); + var { + codes: { ERR_INVALID_ARG_TYPE } + } = require_errors4(); + var { kResistStopPropagation, AggregateError, SymbolDispose } = require_primordials(); var AbortSignal2 = globalThis.AbortSignal || require_abort_controller().AbortSignal; var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var AsyncFunction = Object.getPrototypeOf(async function() { @@ -95980,21 +97273,8 @@ var require_util13 = __commonJS({ } }; var validateFunction = (value, name) => { - if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value); - }; - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - let message = ""; - for (let i = 0; i < errors.length; i++) { - message += ` ${errors[i].stack} -`; - } - super(message); - this.name = "AggregateError"; - this.errors = errors; + if (typeof value !== "function") { + throw new ERR_INVALID_ARG_TYPE(name, "Function", value); } }; module2.exports = { @@ -96011,25 +97291,25 @@ var require_util13 = __commonJS({ }; }, createDeferredPromise: function() { - let resolve13; + let resolve14; let reject; const promise = new Promise((res, rej) => { - resolve13 = res; + resolve14 = res; reject = rej; }); return { promise, - resolve: resolve13, + resolve: resolve14, reject }; }, promisify(fn) { - return new Promise((resolve13, reject) => { + return new Promise((resolve14, reject) => { fn((err, ...args) => { if (err) { return reject(err); } - return resolve13(...args); + return resolve14(...args); }); }); }, @@ -96037,48 +97317,8 @@ var require_util13 = __commonJS({ return function() { }; }, - format(format, ...args) { - return format.replace(/%([sdifj])/g, function(...[_unused, type2]) { - const replacement = args.shift(); - if (type2 === "f") { - return replacement.toFixed(6); - } else if (type2 === "j") { - return JSON.stringify(replacement); - } else if (type2 === "s" && typeof replacement === "object") { - const ctor = replacement.constructor !== Object ? replacement.constructor.name : ""; - return `${ctor} {}`.trim(); - } else { - return replacement.toString(); - } - }); - }, - inspect(value) { - switch (typeof value) { - case "string": - if (value.includes("'")) { - if (!value.includes('"')) { - return `"${value}"`; - } else if (!value.includes("`") && !value.includes("${")) { - return `\`${value}\``; - } - } - return `'${value}'`; - case "number": - if (isNaN(value)) { - return "NaN"; - } else if (Object.is(value, -0)) { - return String(value); - } - return value; - case "bigint": - return `${String(value)}n`; - case "boolean": - case "undefined": - return String(value); - case "object": - return "{}"; - } - }, + format, + inspect, types: { isAsyncFunction(fn) { return fn instanceof AsyncFunction; @@ -96146,322 +97386,6 @@ var require_util13 = __commonJS({ } }); -// node_modules/readable-stream/lib/ours/errors.js -var require_errors4 = __commonJS({ - "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { - "use strict"; - var { format, inspect, AggregateError: CustomAggregateError } = require_util13(); - var AggregateError = globalThis.AggregateError || CustomAggregateError; - var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); - var kTypes = [ - "string", - "function", - "number", - "object", - // Accept 'Function' and 'Object' as alternative to the lower cased version. - "Function", - "Object", - "boolean", - "bigint", - "symbol" - ]; - var classRegExp = /^([A-Z][a-z0-9]*)+$/; - var nodeInternalPrefix = "__node_internal_"; - var codes = {}; - function assert(value, message) { - if (!value) { - throw new codes.ERR_INTERNAL_ASSERTION(message); - } - } - function addNumericalSeparator(val) { - let res = ""; - let i = val.length; - const start = val[0] === "-" ? 1 : 0; - for (; i >= start + 4; i -= 3) { - res = `_${val.slice(i - 3, i)}${res}`; - } - return `${val.slice(0, i)}${res}`; - } - function getMessage(key, msg, args) { - if (typeof msg === "function") { - assert( - msg.length <= args.length, - // Default options do not count. - `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${msg.length}).` - ); - return msg(...args); - } - const expectedLength = (msg.match(/%[dfijoOs]/g) || []).length; - assert( - expectedLength === args.length, - `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).` - ); - if (args.length === 0) { - return msg; - } - return format(msg, ...args); - } - function E(code, message, Base) { - if (!Base) { - Base = Error; - } - class NodeError extends Base { - constructor(...args) { - super(getMessage(code, message, args)); - } - toString() { - return `${this.name} [${code}]: ${this.message}`; - } - } - Object.defineProperties(NodeError.prototype, { - name: { - value: Base.name, - writable: true, - enumerable: false, - configurable: true - }, - toString: { - value() { - return `${this.name} [${code}]: ${this.message}`; - }, - writable: true, - enumerable: false, - configurable: true - } - }); - NodeError.prototype.code = code; - NodeError.prototype[kIsNodeError] = true; - codes[code] = NodeError; - } - function hideStackFrames(fn) { - const hidden = nodeInternalPrefix + fn.name; - Object.defineProperty(fn, "name", { - value: hidden - }); - return fn; - } - function aggregateTwoErrors(innerError, outerError) { - if (innerError && outerError && innerError !== outerError) { - if (Array.isArray(outerError.errors)) { - outerError.errors.push(innerError); - return outerError; - } - const err = new AggregateError([outerError, innerError], outerError.message); - err.code = outerError.code; - return err; - } - return innerError || outerError; - } - var AbortError = class extends Error { - constructor(message = "The operation was aborted", options = void 0) { - if (options !== void 0 && typeof options !== "object") { - throw new codes.ERR_INVALID_ARG_TYPE("options", "Object", options); - } - super(message, options); - this.code = "ABORT_ERR"; - this.name = "AbortError"; - } - }; - E("ERR_ASSERTION", "%s", Error); - E( - "ERR_INVALID_ARG_TYPE", - (name, expected, actual) => { - assert(typeof name === "string", "'name' must be a string"); - if (!Array.isArray(expected)) { - expected = [expected]; - } - let msg = "The "; - if (name.endsWith(" argument")) { - msg += `${name} `; - } else { - msg += `"${name}" ${name.includes(".") ? "property" : "argument"} `; - } - msg += "must be "; - const types = []; - const instances = []; - const other = []; - for (const value of expected) { - assert(typeof value === "string", "All expected entries have to be of type string"); - if (kTypes.includes(value)) { - types.push(value.toLowerCase()); - } else if (classRegExp.test(value)) { - instances.push(value); - } else { - assert(value !== "object", 'The value "object" should be written as "Object"'); - other.push(value); - } - } - if (instances.length > 0) { - const pos = types.indexOf("object"); - if (pos !== -1) { - types.splice(types, pos, 1); - instances.push("Object"); - } - } - if (types.length > 0) { - switch (types.length) { - case 1: - msg += `of type ${types[0]}`; - break; - case 2: - msg += `one of type ${types[0]} or ${types[1]}`; - break; - default: { - const last = types.pop(); - msg += `one of type ${types.join(", ")}, or ${last}`; - } - } - if (instances.length > 0 || other.length > 0) { - msg += " or "; - } - } - if (instances.length > 0) { - switch (instances.length) { - case 1: - msg += `an instance of ${instances[0]}`; - break; - case 2: - msg += `an instance of ${instances[0]} or ${instances[1]}`; - break; - default: { - const last = instances.pop(); - msg += `an instance of ${instances.join(", ")}, or ${last}`; - } - } - if (other.length > 0) { - msg += " or "; - } - } - switch (other.length) { - case 0: - break; - case 1: - if (other[0].toLowerCase() !== other[0]) { - msg += "an "; - } - msg += `${other[0]}`; - break; - case 2: - msg += `one of ${other[0]} or ${other[1]}`; - break; - default: { - const last = other.pop(); - msg += `one of ${other.join(", ")}, or ${last}`; - } - } - if (actual == null) { - msg += `. Received ${actual}`; - } else if (typeof actual === "function" && actual.name) { - msg += `. Received function ${actual.name}`; - } else if (typeof actual === "object") { - var _actual$constructor; - if ((_actual$constructor = actual.constructor) !== null && _actual$constructor !== void 0 && _actual$constructor.name) { - msg += `. Received an instance of ${actual.constructor.name}`; - } else { - const inspected = inspect(actual, { - depth: -1 - }); - msg += `. Received ${inspected}`; - } - } else { - let inspected = inspect(actual, { - colors: false - }); - if (inspected.length > 25) { - inspected = `${inspected.slice(0, 25)}...`; - } - msg += `. Received type ${typeof actual} (${inspected})`; - } - return msg; - }, - TypeError - ); - E( - "ERR_INVALID_ARG_VALUE", - (name, value, reason = "is invalid") => { - let inspected = inspect(value); - if (inspected.length > 128) { - inspected = inspected.slice(0, 128) + "..."; - } - const type2 = name.includes(".") ? "property" : "argument"; - return `The ${type2} '${name}' ${reason}. Received ${inspected}`; - }, - TypeError - ); - E( - "ERR_INVALID_RETURN_VALUE", - (input, name, value) => { - var _value$constructor; - const type2 = value !== null && value !== void 0 && (_value$constructor = value.constructor) !== null && _value$constructor !== void 0 && _value$constructor.name ? `instance of ${value.constructor.name}` : `type ${typeof value}`; - return `Expected ${input} to be returned from the "${name}" function but got ${type2}.`; - }, - TypeError - ); - E( - "ERR_MISSING_ARGS", - (...args) => { - assert(args.length > 0, "At least one arg needs to be specified"); - let msg; - const len = args.length; - args = (Array.isArray(args) ? args : [args]).map((a) => `"${a}"`).join(" or "); - switch (len) { - case 1: - msg += `The ${args[0]} argument`; - break; - case 2: - msg += `The ${args[0]} and ${args[1]} arguments`; - break; - default: - { - const last = args.pop(); - msg += `The ${args.join(", ")}, and ${last} arguments`; - } - break; - } - return `${msg} must be specified`; - }, - TypeError - ); - E( - "ERR_OUT_OF_RANGE", - (str2, range, input) => { - assert(range, 'Missing "range" argument'); - let received; - if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { - received = addNumericalSeparator(String(input)); - } else if (typeof input === "bigint") { - received = String(input); - if (input > 2n ** 32n || input < -(2n ** 32n)) { - received = addNumericalSeparator(received); - } - received += "n"; - } else { - received = inspect(input); - } - return `The value of "${str2}" is out of range. It must be ${range}. Received ${received}`; - }, - RangeError - ); - E("ERR_MULTIPLE_CALLBACK", "Callback called multiple times", Error); - E("ERR_METHOD_NOT_IMPLEMENTED", "The %s method is not implemented", Error); - E("ERR_STREAM_ALREADY_FINISHED", "Cannot call %s after a stream was finished", Error); - E("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable", Error); - E("ERR_STREAM_DESTROYED", "Cannot call %s after a stream was destroyed", Error); - E("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); - E("ERR_STREAM_PREMATURE_CLOSE", "Premature close", Error); - E("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF", Error); - E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event", Error); - E("ERR_STREAM_WRITE_AFTER_END", "write after end", Error); - E("ERR_UNKNOWN_ENCODING", "Unknown encoding: %s", TypeError); - module2.exports = { - AbortError, - aggregateTwoErrors: hideStackFrames(aggregateTwoErrors), - hideStackFrames, - codes - }; - } -}); - // node_modules/readable-stream/lib/internal/validators.js var require_validators = __commonJS({ "node_modules/readable-stream/lib/internal/validators.js"(exports2, module2) { @@ -96484,7 +97408,7 @@ var require_validators = __commonJS({ } = require_primordials(); var { hideStackFrames, - codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } + codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } } = require_errors4(); var { normalizeEncoding } = require_util13(); var { isAsyncFunction, isArrayBufferView } = require_util13().types; @@ -96511,13 +97435,13 @@ var require_validators = __commonJS({ return value; } var validateInteger = hideStackFrames((value, name, min = NumberMIN_SAFE_INTEGER, max = NumberMAX_SAFE_INTEGER) => { - if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value); + if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE(name, "number", value); if (!NumberIsInteger(value)) throw new ERR_OUT_OF_RANGE(name, "an integer", value); if (value < min || value > max) throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value); }); var validateInt32 = hideStackFrames((value, name, min = -2147483648, max = 2147483647) => { if (typeof value !== "number") { - throw new ERR_INVALID_ARG_TYPE2(name, "number", value); + throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if (!NumberIsInteger(value)) { throw new ERR_OUT_OF_RANGE(name, "an integer", value); @@ -96528,7 +97452,7 @@ var require_validators = __commonJS({ }); var validateUint32 = hideStackFrames((value, name, positive = false) => { if (typeof value !== "number") { - throw new ERR_INVALID_ARG_TYPE2(name, "number", value); + throw new ERR_INVALID_ARG_TYPE(name, "number", value); } if (!NumberIsInteger(value)) { throw new ERR_OUT_OF_RANGE(name, "an integer", value); @@ -96540,10 +97464,10 @@ var require_validators = __commonJS({ } }); function validateString(value, name) { - if (typeof value !== "string") throw new ERR_INVALID_ARG_TYPE2(name, "string", value); + if (typeof value !== "string") throw new ERR_INVALID_ARG_TYPE(name, "string", value); } function validateNumber(value, name, min = void 0, max) { - if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value); + if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE(name, "number", value); if (min != null && value < min || max != null && value > max || (min != null || max != null) && NumberIsNaN(value)) { throw new ERR_OUT_OF_RANGE( name, @@ -96563,7 +97487,7 @@ var require_validators = __commonJS({ } }); function validateBoolean(value, name) { - if (typeof value !== "boolean") throw new ERR_INVALID_ARG_TYPE2(name, "boolean", value); + if (typeof value !== "boolean") throw new ERR_INVALID_ARG_TYPE(name, "boolean", value); } function getOwnPropertyValueOrDefault(options, key, defaultValue) { return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key]; @@ -96573,17 +97497,17 @@ var require_validators = __commonJS({ const allowFunction = getOwnPropertyValueOrDefault(options, "allowFunction", false); const nullable = getOwnPropertyValueOrDefault(options, "nullable", false); if (!nullable && value === null || !allowArray && ArrayIsArray(value) || typeof value !== "object" && (!allowFunction || typeof value !== "function")) { - throw new ERR_INVALID_ARG_TYPE2(name, "Object", value); + throw new ERR_INVALID_ARG_TYPE(name, "Object", value); } }); var validateDictionary = hideStackFrames((value, name) => { if (value != null && typeof value !== "object" && typeof value !== "function") { - throw new ERR_INVALID_ARG_TYPE2(name, "a dictionary", value); + throw new ERR_INVALID_ARG_TYPE(name, "a dictionary", value); } }); - var validateArray = hideStackFrames((value, name, minLength = 0) => { + var validateArray2 = hideStackFrames((value, name, minLength = 0) => { if (!ArrayIsArray(value)) { - throw new ERR_INVALID_ARG_TYPE2(name, "Array", value); + throw new ERR_INVALID_ARG_TYPE(name, "Array", value); } if (value.length < minLength) { const reason = `must be longer than ${minLength}`; @@ -96591,24 +97515,24 @@ var require_validators = __commonJS({ } }); function validateStringArray(value, name) { - validateArray(value, name); + validateArray2(value, name); for (let i = 0; i < value.length; i++) { validateString(value[i], `${name}[${i}]`); } } function validateBooleanArray(value, name) { - validateArray(value, name); + validateArray2(value, name); for (let i = 0; i < value.length; i++) { validateBoolean(value[i], `${name}[${i}]`); } } function validateAbortSignalArray(value, name) { - validateArray(value, name); + validateArray2(value, name); for (let i = 0; i < value.length; i++) { const signal = value[i]; const indexedName = `${name}[${i}]`; if (signal == null) { - throw new ERR_INVALID_ARG_TYPE2(indexedName, "AbortSignal", signal); + throw new ERR_INVALID_ARG_TYPE(indexedName, "AbortSignal", signal); } validateAbortSignal(signal, indexedName); } @@ -96624,7 +97548,7 @@ var require_validators = __commonJS({ } var validateBuffer = hideStackFrames((buffer, name = "buffer") => { if (!isArrayBufferView(buffer)) { - throw new ERR_INVALID_ARG_TYPE2(name, ["Buffer", "TypedArray", "DataView"], buffer); + throw new ERR_INVALID_ARG_TYPE(name, ["Buffer", "TypedArray", "DataView"], buffer); } }); function validateEncoding(data, encoding) { @@ -96642,21 +97566,21 @@ var require_validators = __commonJS({ } var validateAbortSignal = hideStackFrames((signal, name) => { if (signal !== void 0 && (signal === null || typeof signal !== "object" || !("aborted" in signal))) { - throw new ERR_INVALID_ARG_TYPE2(name, "AbortSignal", signal); + throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }); var validateFunction = hideStackFrames((value, name) => { - if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE2(name, "Function", value); + if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value); }); var validatePlainFunction = hideStackFrames((value, name) => { - if (typeof value !== "function" || isAsyncFunction(value)) throw new ERR_INVALID_ARG_TYPE2(name, "Function", value); + if (typeof value !== "function" || isAsyncFunction(value)) throw new ERR_INVALID_ARG_TYPE(name, "Function", value); }); var validateUndefined = hideStackFrames((value, name) => { - if (value !== void 0) throw new ERR_INVALID_ARG_TYPE2(name, "undefined", value); + if (value !== void 0) throw new ERR_INVALID_ARG_TYPE(name, "undefined", value); }); function validateUnion(value, name, union) { if (!ArrayPrototypeIncludes(union, value)) { - throw new ERR_INVALID_ARG_TYPE2(name, `('${ArrayPrototypeJoin(union, "|")}')`, value); + throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, "|")}')`, value); } } var linkValueRegExp = /^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/; @@ -96699,7 +97623,7 @@ var require_validators = __commonJS({ isInt32, isUint32, parseFileMode, - validateArray, + validateArray: validateArray2, validateStringArray, validateBooleanArray, validateAbortSignalArray, @@ -96945,9 +97869,10 @@ var require_utils7 = __commonJS({ // node_modules/readable-stream/lib/internal/streams/end-of-stream.js var require_end_of_stream = __commonJS({ "node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { + "use strict"; var process2 = require_process(); var { AbortError, codes } = require_errors4(); - var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; + var { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes; var { kEmptyObject, once } = require_util13(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); @@ -96990,7 +97915,7 @@ var require_end_of_stream = __commonJS({ return eosWeb(stream2, options, callback); } if (!isNodeStream(stream2)) { - throw new ERR_INVALID_ARG_TYPE2("stream", ["ReadableStream", "WritableStream", "Stream"], stream2); + throw new ERR_INVALID_ARG_TYPE("stream", ["ReadableStream", "WritableStream", "Stream"], stream2); } const readable = (_options$readable = options.readable) !== null && _options$readable !== void 0 ? _options$readable : isReadableNodeStream(stream2); const writable = (_options$writable = options.writable) !== null && _options$writable !== void 0 ? _options$writable : isWritableNodeStream(stream2); @@ -97175,7 +98100,7 @@ var require_end_of_stream = __commonJS({ validateBoolean(opts.cleanup, "cleanup"); autoCleanup = opts.cleanup; } - return new Promise2((resolve13, reject) => { + return new Promise2((resolve14, reject) => { const cleanup = eos(stream2, opts, (err) => { if (autoCleanup) { cleanup(); @@ -97183,7 +98108,7 @@ var require_end_of_stream = __commonJS({ if (err) { reject(err); } else { - resolve13(); + resolve14(); } }); }); @@ -97544,17 +98469,17 @@ var require_add_abort_signal = __commonJS({ var { AbortError, codes } = require_errors4(); var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils7(); var eos = require_end_of_stream(); - var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; + var { ERR_INVALID_ARG_TYPE } = codes; var addAbortListener; var validateAbortSignal = (signal, name) => { if (typeof signal !== "object" || !("aborted" in signal)) { - throw new ERR_INVALID_ARG_TYPE2(name, "AbortSignal", signal); + throw new ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal); } }; module2.exports.addAbortSignal = function addAbortSignal(signal, stream2) { validateAbortSignal(signal, "signal"); if (!isNodeStream(stream2) && !isWebStream(stream2)) { - throw new ERR_INVALID_ARG_TYPE2("stream", ["ReadableStream", "WritableStream", "Stream"], stream2); + throw new ERR_INVALID_ARG_TYPE("stream", ["ReadableStream", "WritableStream", "Stream"], stream2); } return module2.exports.addAbortSignalNoValidate(signal, stream2); }; @@ -97677,20 +98602,20 @@ var require_buffer_list = __commonJS({ let p = this.head; let c = 0; do { - const str2 = p.data; - if (n > str2.length) { - ret += str2; - n -= str2.length; + const str = p.data; + if (n > str.length) { + ret += str; + n -= str.length; } else { - if (n === str2.length) { - ret += str2; + if (n === str.length) { + ret += str; ++c; if (p.next) this.head = p.next; else this.head = this.tail = null; } else { - ret += StringPrototypeSlice(str2, 0, n); + ret += StringPrototypeSlice(str, 0, n); this.head = p; - p.data = StringPrototypeSlice(str2, n); + p.data = StringPrototypeSlice(str, n); } break; } @@ -97784,6 +98709,302 @@ var require_state3 = __commonJS({ } }); +// node_modules/safe-buffer/index.js +var require_safe_buffer2 = __commonJS({ + "node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer2.prototype); + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder2 = __commonJS({ + "node_modules/string_decoder/lib/string_decoder.js"(exports2) { + "use strict"; + var Buffer2 = require_safe_buffer2().Buffer; + var isEncoding = Buffer2.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports2.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer2.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; + }; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return byte >> 6 === 2 ? -1 : -2; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD"; + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD"; + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD"; + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString("utf8", i, end); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD"; + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end); + } + return r; + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString("base64", i, buf.length - n); + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; + } + } +}); + // node_modules/readable-stream/lib/internal/streams/from.js var require_from = __commonJS({ "node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { @@ -97791,11 +99012,11 @@ var require_from = __commonJS({ var process2 = require_process(); var { PromisePrototypeThen, SymbolAsyncIterator, SymbolIterator } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); - var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_NULL_VALUES } = require_errors4().codes; - function from(Readable2, iterable, opts) { + var { ERR_INVALID_ARG_TYPE, ERR_STREAM_NULL_VALUES } = require_errors4().codes; + function from(Readable3, iterable, opts) { let iterator2; if (typeof iterable === "string" || iterable instanceof Buffer2) { - return new Readable2({ + return new Readable3({ objectMode: true, ...opts, read() { @@ -97812,9 +99033,9 @@ var require_from = __commonJS({ isAsync = false; iterator2 = iterable[SymbolIterator](); } else { - throw new ERR_INVALID_ARG_TYPE2("iterable", ["Iterable"], iterable); + throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); } - const readable = new Readable2({ + const readable = new Readable3({ objectMode: true, highWaterMark: 1, // TODO(ronag): What options should be allowed? @@ -97882,6 +99103,7 @@ var require_from = __commonJS({ // node_modules/readable-stream/lib/internal/streams/readable.js var require_readable3 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/readable.js"(exports2, module2) { + "use strict"; var process2 = require_process(); var { ArrayPrototypeIndexOf, @@ -97897,8 +99119,8 @@ var require_readable3 = __commonJS({ SymbolAsyncIterator, Symbol: Symbol2 } = require_primordials(); - module2.exports = Readable2; - Readable2.ReadableState = ReadableState; + module2.exports = Readable3; + Readable3.ReadableState = ReadableState; var { EventEmitter: EE } = require("events"); var { Stream, prependListener } = require_legacy(); var { Buffer: Buffer2 } = require("buffer"); @@ -97913,7 +99135,7 @@ var require_readable3 = __commonJS({ var { aggregateTwoErrors, codes: { - ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, + ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED, ERR_OUT_OF_RANGE, ERR_STREAM_PUSH_AFTER_EOF, @@ -97923,10 +99145,10 @@ var require_readable3 = __commonJS({ } = require_errors4(); var { validateObject } = require_validators(); var kPaused = Symbol2("kPaused"); - var { StringDecoder } = require("string_decoder"); + var { StringDecoder } = require_string_decoder2(); var from = require_from(); - ObjectSetPrototypeOf(Readable2.prototype, Stream.prototype); - ObjectSetPrototypeOf(Readable2, Stream); + ObjectSetPrototypeOf(Readable3.prototype, Stream.prototype); + ObjectSetPrototypeOf(Readable3, Stream); var nop = () => { }; var { errorOrDestroy } = destroyImpl; @@ -98021,8 +99243,8 @@ var require_readable3 = __commonJS({ this.encoding = options.encoding; } } - function Readable2(options) { - if (!(this instanceof Readable2)) return new Readable2(options); + function Readable3(options) { + if (!(this instanceof Readable3)) return new Readable3(options); const isDuplex = this instanceof require_duplex(); this._readableState = new ReadableState(options, this, isDuplex); if (options) { @@ -98038,26 +99260,26 @@ var require_readable3 = __commonJS({ } }); } - Readable2.prototype.destroy = destroyImpl.destroy; - Readable2.prototype._undestroy = destroyImpl.undestroy; - Readable2.prototype._destroy = function(err, cb) { + Readable3.prototype.destroy = destroyImpl.destroy; + Readable3.prototype._undestroy = destroyImpl.undestroy; + Readable3.prototype._destroy = function(err, cb) { cb(err); }; - Readable2.prototype[EE.captureRejectionSymbol] = function(err) { + Readable3.prototype[EE.captureRejectionSymbol] = function(err) { this.destroy(err); }; - Readable2.prototype[SymbolAsyncDispose] = function() { + Readable3.prototype[SymbolAsyncDispose] = function() { let error3; if (!this.destroyed) { error3 = this.readableEnded ? null : new AbortError(); this.destroy(error3); } - return new Promise2((resolve13, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve13(null))); + return new Promise2((resolve14, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve14(null))); }; - Readable2.prototype.push = function(chunk, encoding) { + Readable3.prototype.push = function(chunk, encoding) { return readableAddChunk(this, chunk, encoding, false); }; - Readable2.prototype.unshift = function(chunk, encoding) { + Readable3.prototype.unshift = function(chunk, encoding) { return readableAddChunk(this, chunk, encoding, true); }; function readableAddChunk(stream2, chunk, encoding, addToFront) { @@ -98081,7 +99303,7 @@ var require_readable3 = __commonJS({ chunk = Stream._uint8ArrayToBuffer(chunk); encoding = ""; } else if (chunk != null) { - err = new ERR_INVALID_ARG_TYPE2("chunk", ["string", "Buffer", "Uint8Array"], chunk); + err = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); } } if (err) { @@ -98131,11 +99353,11 @@ var require_readable3 = __commonJS({ } maybeReadMore(stream2, state); } - Readable2.prototype.isPaused = function() { + Readable3.prototype.isPaused = function() { const state = this._readableState; return state[kPaused] === true || state.flowing === false; }; - Readable2.prototype.setEncoding = function(enc) { + Readable3.prototype.setEncoding = function(enc) { const decoder = new StringDecoder(enc); this._readableState.decoder = decoder; this._readableState.encoding = this._readableState.decoder.encoding; @@ -98174,7 +99396,7 @@ var require_readable3 = __commonJS({ if (n <= state.length) return n; return state.ended ? state.length : 0; } - Readable2.prototype.read = function(n) { + Readable3.prototype.read = function(n) { debug6("read", n); if (n === void 0) { n = NaN; @@ -98296,10 +99518,10 @@ var require_readable3 = __commonJS({ } state.readingMore = false; } - Readable2.prototype._read = function(n) { + Readable3.prototype._read = function(n) { throw new ERR_METHOD_NOT_IMPLEMENTED("_read()"); }; - Readable2.prototype.pipe = function(dest, pipeOpts) { + Readable3.prototype.pipe = function(dest, pipeOpts) { const src = this; const state = this._readableState; if (state.pipes.length === 1) { @@ -98424,7 +99646,7 @@ var require_readable3 = __commonJS({ } }; } - Readable2.prototype.unpipe = function(dest) { + Readable3.prototype.unpipe = function(dest) { const state = this._readableState; const unpipeInfo = { hasUnpiped: false @@ -98440,14 +99662,14 @@ var require_readable3 = __commonJS({ }); return this; } - const index = ArrayPrototypeIndexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); + const index2 = ArrayPrototypeIndexOf(state.pipes, dest); + if (index2 === -1) return this; + state.pipes.splice(index2, 1); if (state.pipes.length === 0) this.pause(); dest.emit("unpipe", this, unpipeInfo); return this; }; - Readable2.prototype.on = function(ev, fn) { + Readable3.prototype.on = function(ev, fn) { const res = Stream.prototype.on.call(this, ev, fn); const state = this._readableState; if (ev === "data") { @@ -98468,16 +99690,16 @@ var require_readable3 = __commonJS({ } return res; }; - Readable2.prototype.addListener = Readable2.prototype.on; - Readable2.prototype.removeListener = function(ev, fn) { + Readable3.prototype.addListener = Readable3.prototype.on; + Readable3.prototype.removeListener = function(ev, fn) { const res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { process2.nextTick(updateReadableListening, this); } return res; }; - Readable2.prototype.off = Readable2.prototype.removeListener; - Readable2.prototype.removeAllListeners = function(ev) { + Readable3.prototype.off = Readable3.prototype.removeListener; + Readable3.prototype.removeAllListeners = function(ev) { const res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { process2.nextTick(updateReadableListening, this); @@ -98499,7 +99721,7 @@ var require_readable3 = __commonJS({ debug6("readable nexttick read 0"); self2.read(0); } - Readable2.prototype.resume = function() { + Readable3.prototype.resume = function() { const state = this._readableState; if (!state.flowing) { debug6("resume"); @@ -98525,7 +99747,7 @@ var require_readable3 = __commonJS({ flow(stream2); if (state.flowing && !state.reading) stream2.read(0); } - Readable2.prototype.pause = function() { + Readable3.prototype.pause = function() { debug6("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { debug6("pause"); @@ -98540,7 +99762,7 @@ var require_readable3 = __commonJS({ debug6("flow", state.flowing); while (state.flowing && stream2.read() !== null) ; } - Readable2.prototype.wrap = function(stream2) { + Readable3.prototype.wrap = function(stream2) { let paused = false; stream2.on("data", (chunk) => { if (!this.push(chunk) && stream2.pause) { @@ -98575,10 +99797,10 @@ var require_readable3 = __commonJS({ } return this; }; - Readable2.prototype[SymbolAsyncIterator] = function() { + Readable3.prototype[SymbolAsyncIterator] = function() { return streamToAsyncIterator(this); }; - Readable2.prototype.iterator = function(options) { + Readable3.prototype.iterator = function(options) { if (options !== void 0) { validateObject(options, "options"); } @@ -98586,7 +99808,7 @@ var require_readable3 = __commonJS({ }; function streamToAsyncIterator(stream2, options) { if (typeof stream2.read !== "function") { - stream2 = Readable2.wrap(stream2, { + stream2 = Readable3.wrap(stream2, { objectMode: true }); } @@ -98596,12 +99818,12 @@ var require_readable3 = __commonJS({ } async function* createAsyncIterator(stream2, options) { let callback = nop; - function next(resolve13) { + function next(resolve14) { if (this === stream2) { callback(); callback = nop; } else { - callback = resolve13; + callback = resolve14; } } stream2.on("readable", next); @@ -98642,7 +99864,7 @@ var require_readable3 = __commonJS({ } } } - ObjectDefineProperties(Readable2.prototype, { + ObjectDefineProperties(Readable3.prototype, { readable: { __proto__: null, get() { @@ -98769,7 +99991,7 @@ var require_readable3 = __commonJS({ } } }); - Readable2._fromList = fromList; + Readable3._fromList = fromList; function fromList(n, state) { if (state.length === 0) return null; let ret; @@ -98816,23 +100038,23 @@ var require_readable3 = __commonJS({ stream2.end(); } } - Readable2.from = function(iterable, opts) { - return from(Readable2, iterable, opts); + Readable3.from = function(iterable, opts) { + return from(Readable3, iterable, opts); }; var webStreamsAdapters; function lazyWebStreams() { if (webStreamsAdapters === void 0) webStreamsAdapters = {}; return webStreamsAdapters; } - Readable2.fromWeb = function(readableStream, options) { + Readable3.fromWeb = function(readableStream, options) { return lazyWebStreams().newStreamReadableFromReadableStream(readableStream, options); }; - Readable2.toWeb = function(streamReadable, options) { + Readable3.toWeb = function(streamReadable, options) { return lazyWebStreams().newReadableStreamFromStreamReadable(streamReadable, options); }; - Readable2.wrap = function(src, options) { + Readable3.wrap = function(src, options) { var _ref, _src$readableObjectMo; - return new Readable2({ + return new Readable3({ objectMode: (_ref = (_src$readableObjectMo = src.readableObjectMode) !== null && _src$readableObjectMo !== void 0 ? _src$readableObjectMo : src.objectMode) !== null && _ref !== void 0 ? _ref : true, ...options, destroy(err, callback) { @@ -98847,6 +100069,7 @@ var require_readable3 = __commonJS({ // node_modules/readable-stream/lib/internal/streams/writable.js var require_writable = __commonJS({ "node_modules/readable-stream/lib/internal/streams/writable.js"(exports2, module2) { + "use strict"; var process2 = require_process(); var { ArrayPrototypeSlice, @@ -98868,7 +100091,7 @@ var require_writable = __commonJS({ var { addAbortSignal } = require_add_abort_signal(); var { getHighWaterMark, getDefaultHighWaterMark } = require_state3(); var { - ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, + ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK, ERR_STREAM_CANNOT_PIPE, @@ -98957,10 +100180,10 @@ var require_writable = __commonJS({ } ObjectDefineProperty(Writable, SymbolHasInstance, { __proto__: null, - value: function(object) { - if (FunctionPrototypeSymbolHasInstance(this, object)) return true; + value: function(object2) { + if (FunctionPrototypeSymbolHasInstance(this, object2)) return true; if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; + return object2 && object2._writableState instanceof WritableState; } }); Writable.prototype.pipe = function() { @@ -98990,7 +100213,7 @@ var require_writable = __commonJS({ chunk = Stream._uint8ArrayToBuffer(chunk); encoding = "buffer"; } else { - throw new ERR_INVALID_ARG_TYPE2("chunk", ["string", "Buffer", "Uint8Array"], chunk); + throw new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); } } let err; @@ -99483,11 +100706,11 @@ var require_duplexify = __commonJS({ var eos = require_end_of_stream(); var { AbortError, - codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_RETURN_VALUE } + codes: { ERR_INVALID_ARG_TYPE, ERR_INVALID_RETURN_VALUE } } = require_errors4(); var { destroyer } = require_destroy2(); var Duplex = require_duplex(); - var Readable2 = require_readable3(); + var Readable3 = require_readable3(); var Writable = require_writable(); var { createDeferredPromise } = require_util13(); var from = require_from(); @@ -99537,7 +100760,7 @@ var require_duplexify = __commonJS({ } if (isReadableStream(body)) { return _duplexify({ - readable: Readable2.fromWeb(body) + readable: Readable3.fromWeb(body) }); } if (isWritableStream(body)) { @@ -99635,7 +100858,7 @@ var require_duplexify = __commonJS({ } }); } - throw new ERR_INVALID_ARG_TYPE2( + throw new ERR_INVALID_ARG_TYPE( name, [ "Blob", @@ -99652,7 +100875,7 @@ var require_duplexify = __commonJS({ ); }; function fromAsyncGen(fn) { - let { promise, resolve: resolve13 } = createDeferredPromise(); + let { promise, resolve: resolve14 } = createDeferredPromise(); const ac = new AbortController2(); const signal = ac.signal; const value = fn( @@ -99667,7 +100890,7 @@ var require_duplexify = __commonJS({ throw new AbortError(void 0, { cause: signal.reason }); - ({ promise, resolve: resolve13 } = createDeferredPromise()); + ({ promise, resolve: resolve14 } = createDeferredPromise()); yield chunk; } })(), @@ -99678,8 +100901,8 @@ var require_duplexify = __commonJS({ return { value, write(chunk, encoding, cb) { - const _resolve = resolve13; - resolve13 = null; + const _resolve = resolve14; + resolve14 = null; _resolve({ chunk, done: false, @@ -99687,8 +100910,8 @@ var require_duplexify = __commonJS({ }); }, final(cb) { - const _resolve = resolve13; - resolve13 = null; + const _resolve = resolve14; + resolve14 = null; _resolve({ done: true, cb @@ -99701,7 +100924,7 @@ var require_duplexify = __commonJS({ }; } function _duplexify(pair) { - const r = pair.readable && typeof pair.readable.read !== "function" ? Readable2.wrap(pair.readable) : pair.readable; + const r = pair.readable && typeof pair.readable.read !== "function" ? Readable3.wrap(pair.readable) : pair.readable; const w = pair.writable; let readable = !!isReadable(r); let writable = !!isWritable(w); @@ -99822,10 +101045,10 @@ var require_duplex = __commonJS({ ObjectSetPrototypeOf } = require_primordials(); module2.exports = Duplex; - var Readable2 = require_readable3(); + var Readable3 = require_readable3(); var Writable = require_writable(); - ObjectSetPrototypeOf(Duplex.prototype, Readable2.prototype); - ObjectSetPrototypeOf(Duplex, Readable2); + ObjectSetPrototypeOf(Duplex.prototype, Readable3.prototype); + ObjectSetPrototypeOf(Duplex, Readable3); { const keys = ObjectKeys(Writable.prototype); for (let i = 0; i < keys.length; i++) { @@ -99835,7 +101058,7 @@ var require_duplex = __commonJS({ } function Duplex(options) { if (!(this instanceof Duplex)) return new Duplex(options); - Readable2.call(this, options); + Readable3.call(this, options); Writable.call(this, options); if (options) { this.allowHalfOpen = options.allowHalfOpen !== false; @@ -99933,15 +101156,15 @@ var require_transform = __commonJS({ "node_modules/readable-stream/lib/internal/streams/transform.js"(exports2, module2) { "use strict"; var { ObjectSetPrototypeOf, Symbol: Symbol2 } = require_primordials(); - module2.exports = Transform; + module2.exports = Transform5; var { ERR_METHOD_NOT_IMPLEMENTED } = require_errors4().codes; var Duplex = require_duplex(); var { getHighWaterMark } = require_state3(); - ObjectSetPrototypeOf(Transform.prototype, Duplex.prototype); - ObjectSetPrototypeOf(Transform, Duplex); + ObjectSetPrototypeOf(Transform5.prototype, Duplex.prototype); + ObjectSetPrototypeOf(Transform5, Duplex); var kCallback = Symbol2("kCallback"); - function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); + function Transform5(options) { + if (!(this instanceof Transform5)) return new Transform5(options); const readableHighWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", true) : null; if (readableHighWaterMark === 0) { options = { @@ -99995,11 +101218,11 @@ var require_transform = __commonJS({ final.call(this); } } - Transform.prototype._final = final; - Transform.prototype._transform = function(chunk, encoding, callback) { + Transform5.prototype._final = final; + Transform5.prototype._transform = function(chunk, encoding, callback) { throw new ERR_METHOD_NOT_IMPLEMENTED("_transform()"); }; - Transform.prototype._write = function(chunk, encoding, callback) { + Transform5.prototype._write = function(chunk, encoding, callback) { const rState = this._readableState; const wState = this._writableState; const length = rState.length; @@ -100020,7 +101243,7 @@ var require_transform = __commonJS({ } }); }; - Transform.prototype._read = function() { + Transform5.prototype._read = function() { if (this[kCallback]) { const callback = this[kCallback]; this[kCallback] = null; @@ -100035,15 +101258,15 @@ var require_passthrough2 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/passthrough.js"(exports2, module2) { "use strict"; var { ObjectSetPrototypeOf } = require_primordials(); - module2.exports = PassThrough; - var Transform = require_transform(); - ObjectSetPrototypeOf(PassThrough.prototype, Transform.prototype); - ObjectSetPrototypeOf(PassThrough, Transform); - function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); - } - PassThrough.prototype._transform = function(chunk, encoding, cb) { + module2.exports = PassThrough3; + var Transform5 = require_transform(); + ObjectSetPrototypeOf(PassThrough3.prototype, Transform5.prototype); + ObjectSetPrototypeOf(PassThrough3, Transform5); + function PassThrough3(options) { + if (!(this instanceof PassThrough3)) return new PassThrough3(options); + Transform5.call(this, options); + } + PassThrough3.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; } @@ -100061,7 +101284,7 @@ var require_pipeline4 = __commonJS({ var { aggregateTwoErrors, codes: { - ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, + ERR_INVALID_ARG_TYPE, ERR_INVALID_RETURN_VALUE, ERR_MISSING_ARGS, ERR_STREAM_DESTROYED, @@ -100081,8 +101304,8 @@ var require_pipeline4 = __commonJS({ isReadableFinished } = require_utils7(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; - var PassThrough; - var Readable2; + var PassThrough3; + var Readable3; var addAbortListener; function destroyer(stream2, reading, writing) { let finished = false; @@ -100118,13 +101341,13 @@ var require_pipeline4 = __commonJS({ } else if (isReadableNodeStream(val)) { return fromReadable(val); } - throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); + throw new ERR_INVALID_ARG_TYPE("val", ["Readable", "Iterable", "AsyncIterable"], val); } async function* fromReadable(val) { - if (!Readable2) { - Readable2 = require_readable3(); + if (!Readable3) { + Readable3 = require_readable3(); } - yield* Readable2.prototype[SymbolAsyncIterator].call(val); + yield* Readable3.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { let error3; @@ -100139,7 +101362,7 @@ var require_pipeline4 = __commonJS({ callback(); } }; - const wait = () => new Promise2((resolve13, reject) => { + const wait = () => new Promise2((resolve14, reject) => { if (error3) { reject(error3); } else { @@ -100147,7 +101370,7 @@ var require_pipeline4 = __commonJS({ if (error3) { reject(error3); } else { - resolve13(); + resolve14(); } }; } @@ -100206,7 +101429,7 @@ var require_pipeline4 = __commonJS({ } } } - function pipeline(...streams) { + function pipeline2(...streams) { return pipelineImpl(streams, once(popCallback(streams))); } function pipelineImpl(streams, callback, opts) { @@ -100314,10 +101537,10 @@ var require_pipeline4 = __commonJS({ } } else { var _ret2; - if (!PassThrough) { - PassThrough = require_passthrough2(); + if (!PassThrough3) { + PassThrough3 = require_passthrough2(); } - const pt = new PassThrough({ + const pt = new PassThrough3({ objectMode: true }); const then = (_ret2 = ret) === null || _ret2 === void 0 ? void 0 : _ret2.then; @@ -100382,7 +101605,7 @@ var require_pipeline4 = __commonJS({ end }); } else { - throw new ERR_INVALID_ARG_TYPE2( + throw new ERR_INVALID_ARG_TYPE( "val", ["Readable", "Iterable", "AsyncIterable", "ReadableStream", "TransformStream"], ret @@ -100406,7 +101629,7 @@ var require_pipeline4 = __commonJS({ end }); } else { - throw new ERR_INVALID_ARG_TYPE2( + throw new ERR_INVALID_ARG_TYPE( "val", ["Readable", "Iterable", "AsyncIterable", "ReadableStream", "TransformStream"], ret @@ -100472,7 +101695,7 @@ var require_pipeline4 = __commonJS({ } module2.exports = { pipelineImpl, - pipeline + pipeline: pipeline2 }; } }); @@ -100481,7 +101704,7 @@ var require_pipeline4 = __commonJS({ var require_compose = __commonJS({ "node_modules/readable-stream/lib/internal/streams/compose.js"(exports2, module2) { "use strict"; - var { pipeline } = require_pipeline4(); + var { pipeline: pipeline2 } = require_pipeline4(); var Duplex = require_duplex(); var { destroyer } = require_destroy2(); var { @@ -100541,7 +101764,7 @@ var require_compose = __commonJS({ } } const head = streams[0]; - const tail = pipeline(streams, onfinished); + const tail = pipeline2(streams, onfinished); const writable = !!(isWritable(head) || isWritableStream(head) || isTransformStream(head)); const readable = !!(isReadable(tail) || isReadableStream(tail) || isTransformStream(tail)); d = new Duplex({ @@ -100676,7 +101899,7 @@ var require_operators = __commonJS({ "use strict"; var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var { - codes: { ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE }, + codes: { ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_TYPE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE }, AbortError } = require_errors4(); var { validateAbortSignal, validateInteger, validateObject } = require_validators(); @@ -100717,9 +101940,9 @@ var require_operators = __commonJS({ } return composedStream; } - function map2(fn, options) { + function map(fn, options) { if (typeof fn !== "function") { - throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); + throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } if (options != null) { validateObject(options, "options"); @@ -100738,12 +101961,12 @@ var require_operators = __commonJS({ validateInteger(concurrency, "options.concurrency", 1); validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; - return async function* map3() { + return async function* map2() { const signal = require_util13().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); const stream2 = this; - const queue = []; + const queue2 = []; const signalOpt = { signal }; @@ -100760,7 +101983,7 @@ var require_operators = __commonJS({ maybeResume(); } function maybeResume() { - if (resume && !done && cnt < concurrency && queue.length < highWaterMark) { + if (resume && !done && cnt < concurrency && queue2.length < highWaterMark) { resume(); resume = null; } @@ -100785,22 +102008,22 @@ var require_operators = __commonJS({ } cnt += 1; PromisePrototypeThen(val, afterItemProcessed, onCatch); - queue.push(val); + queue2.push(val); if (next) { next(); next = null; } - if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) { - await new Promise2((resolve13) => { - resume = resolve13; + if (!done && (queue2.length >= highWaterMark || cnt >= concurrency)) { + await new Promise2((resolve14) => { + resume = resolve14; }); } } - queue.push(kEof); + queue2.push(kEof); } catch (err) { const val = PromiseReject(err); PromisePrototypeThen(val, afterItemProcessed, onCatch); - queue.push(val); + queue2.push(val); } finally { done = true; if (next) { @@ -100812,8 +102035,8 @@ var require_operators = __commonJS({ pump(); try { while (true) { - while (queue.length > 0) { - const val = await queue[0]; + while (queue2.length > 0) { + const val = await queue2[0]; if (val === kEof) { return; } @@ -100823,11 +102046,11 @@ var require_operators = __commonJS({ if (val !== kEmpty) { yield val; } - queue.shift(); + queue2.shift(); maybeResume(); } - await new Promise2((resolve13) => { - next = resolve13; + await new Promise2((resolve14) => { + next = resolve14; }); } } finally { @@ -100847,7 +102070,7 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } return async function* asIndexedPairs2() { - let index = 0; + let index2 = 0; for await (const val of this) { var _options$signal; if (options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted) { @@ -100855,19 +102078,19 @@ var require_operators = __commonJS({ cause: options.signal.reason }); } - yield [index++, val]; + yield [index2++, val]; } }.call(this); } async function some(fn, options = void 0) { - for await (const unused of filter.call(this, fn, options)) { + for await (const unused of filter2.call(this, fn, options)) { return true; } return false; } async function every(fn, options = void 0) { if (typeof fn !== "function") { - throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); + throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } return !await some.call( this, @@ -100878,24 +102101,24 @@ var require_operators = __commonJS({ ); } async function find3(fn, options) { - for await (const result of filter.call(this, fn, options)) { + for await (const result of filter2.call(this, fn, options)) { return result; } return void 0; } async function forEach(fn, options) { if (typeof fn !== "function") { - throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); + throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } async function forEachFn(value, options2) { await fn(value, options2); return kEmpty; } - for await (const unused of map2.call(this, forEachFn, options)) ; + for await (const unused of map.call(this, forEachFn, options)) ; } - function filter(fn, options) { + function filter2(fn, options) { if (typeof fn !== "function") { - throw new ERR_INVALID_ARG_TYPE2("fn", ["Function", "AsyncFunction"], fn); + throw new ERR_INVALID_ARG_TYPE("fn", ["Function", "AsyncFunction"], fn); } async function filterFn(value, options2) { if (await fn(value, options2)) { @@ -100903,7 +102126,7 @@ var require_operators = __commonJS({ } return kEmpty; } - return map2.call(this, filterFn, options); + return map.call(this, filterFn, options); } var ReduceAwareErrMissingArgs = class extends ERR_MISSING_ARGS { constructor() { @@ -100914,7 +102137,7 @@ var require_operators = __commonJS({ async function reduce(reducer, initialValue, options) { var _options$signal2; if (typeof reducer !== "function") { - throw new ERR_INVALID_ARG_TYPE2("reducer", ["Function", "AsyncFunction"], reducer); + throw new ERR_INVALID_ARG_TYPE("reducer", ["Function", "AsyncFunction"], reducer); } if (options != null) { validateObject(options, "options"); @@ -100967,7 +102190,7 @@ var require_operators = __commonJS({ } return initialValue; } - async function toArray2(options) { + async function toArray(options) { if (options != null) { validateObject(options, "options"); } @@ -100987,31 +102210,31 @@ var require_operators = __commonJS({ return result; } function flatMap(fn, options) { - const values = map2.call(this, fn, options); + const values = map.call(this, fn, options); return async function* flatMap2() { for await (const val of values) { yield* val; } }.call(this); } - function toIntegerOrInfinity(number) { - number = Number2(number); - if (NumberIsNaN(number)) { + function toIntegerOrInfinity(number2) { + number2 = Number2(number2); + if (NumberIsNaN(number2)) { return 0; } - if (number < 0) { - throw new ERR_OUT_OF_RANGE("number", ">= 0", number); + if (number2 < 0) { + throw new ERR_OUT_OF_RANGE("number", ">= 0", number2); } - return number; + return number2; } - function drop(number, options = void 0) { + function drop(number2, options = void 0) { if (options != null) { validateObject(options, "options"); } if ((options === null || options === void 0 ? void 0 : options.signal) != null) { validateAbortSignal(options.signal, "options.signal"); } - number = toIntegerOrInfinity(number); + number2 = toIntegerOrInfinity(number2); return async function* drop2() { var _options$signal5; if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { @@ -101022,20 +102245,20 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted) { throw new AbortError(); } - if (number-- <= 0) { + if (number2-- <= 0) { yield val; } } }.call(this); } - function take(number, options = void 0) { + function take(number2, options = void 0) { if (options != null) { validateObject(options, "options"); } if ((options === null || options === void 0 ? void 0 : options.signal) != null) { validateAbortSignal(options.signal, "options.signal"); } - number = toIntegerOrInfinity(number); + number2 = toIntegerOrInfinity(number2); return async function* take2() { var _options$signal7; if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { @@ -101046,10 +102269,10 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted) { throw new AbortError(); } - if (number-- > 0) { + if (number2-- > 0) { yield val; } - if (number <= 0) { + if (number2 <= 0) { return; } } @@ -101058,9 +102281,9 @@ var require_operators = __commonJS({ module2.exports.streamReturningOperators = { asIndexedPairs: deprecate(asIndexedPairs, "readable.asIndexedPairs will be removed in a future version."), drop, - filter, + filter: filter2, flatMap, - map: map2, + map, take, compose }; @@ -101068,7 +102291,7 @@ var require_operators = __commonJS({ every, forEach, reduce, - toArray: toArray2, + toArray, some, find: find3 }; @@ -101084,8 +102307,8 @@ var require_promises = __commonJS({ var { pipelineImpl: pl } = require_pipeline4(); var { finished } = require_end_of_stream(); require_stream2(); - function pipeline(...streams) { - return new Promise2((resolve13, reject) => { + function pipeline2(...streams) { + return new Promise2((resolve14, reject) => { let signal; let end; const lastArg = streams[streams.length - 1]; @@ -101100,7 +102323,7 @@ var require_promises = __commonJS({ if (err) { reject(err); } else { - resolve13(value); + resolve14(value); } }, { @@ -101112,7 +102335,7 @@ var require_promises = __commonJS({ } module2.exports = { finished, - pipeline + pipeline: pipeline2 }; } }); @@ -101120,6 +102343,7 @@ var require_promises = __commonJS({ // node_modules/readable-stream/lib/stream.js var require_stream2 = __commonJS({ "node_modules/readable-stream/lib/stream.js"(exports2, module2) { + "use strict"; var { Buffer: Buffer2 } = require("buffer"); var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { @@ -101131,7 +102355,7 @@ var require_stream2 = __commonJS({ } = require_errors4(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state3(); - var { pipeline } = require_pipeline4(); + var { pipeline: pipeline2 } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises6 = require_promises(); @@ -101144,62 +102368,58 @@ var require_stream2 = __commonJS({ Stream.isWritable = utils.isWritable; Stream.Readable = require_readable3(); for (const key of ObjectKeys(streamReturningOperators)) { - let fn2 = function(...args) { + let fn = function(...args) { if (new.target) { throw ERR_ILLEGAL_CONSTRUCTOR(); } return Stream.Readable.from(ReflectApply(op, this, args)); }; - fn = fn2; const op = streamReturningOperators[key]; - ObjectDefineProperty(fn2, "name", { + ObjectDefineProperty(fn, "name", { __proto__: null, value: op.name }); - ObjectDefineProperty(fn2, "length", { + ObjectDefineProperty(fn, "length", { __proto__: null, value: op.length }); ObjectDefineProperty(Stream.Readable.prototype, key, { __proto__: null, - value: fn2, + value: fn, enumerable: false, configurable: true, writable: true }); } - var fn; for (const key of ObjectKeys(promiseReturningOperators)) { - let fn2 = function(...args) { + let fn = function(...args) { if (new.target) { throw ERR_ILLEGAL_CONSTRUCTOR(); } return ReflectApply(op, this, args); }; - fn = fn2; const op = promiseReturningOperators[key]; - ObjectDefineProperty(fn2, "name", { + ObjectDefineProperty(fn, "name", { __proto__: null, value: op.name }); - ObjectDefineProperty(fn2, "length", { + ObjectDefineProperty(fn, "length", { __proto__: null, value: op.length }); ObjectDefineProperty(Stream.Readable.prototype, key, { __proto__: null, - value: fn2, + value: fn, enumerable: false, configurable: true, writable: true }); } - var fn; Stream.Writable = require_writable(); Stream.Duplex = require_duplex(); Stream.Transform = require_transform(); Stream.PassThrough = require_passthrough2(); - Stream.pipeline = pipeline; + Stream.pipeline = pipeline2; var { addAbortSignal } = require_add_abort_signal(); Stream.addAbortSignal = addAbortSignal; Stream.finished = eos; @@ -101215,7 +102435,7 @@ var require_stream2 = __commonJS({ return promises6; } }); - ObjectDefineProperty(pipeline, customPromisify, { + ObjectDefineProperty(pipeline2, customPromisify, { __proto__: null, enumerable: true, get() { @@ -101306,12 +102526,12 @@ var require_ours = __commonJS({ // node_modules/lodash/_arrayPush.js var require_arrayPush = __commonJS({ "node_modules/lodash/_arrayPush.js"(exports2, module2) { - function arrayPush(array, values) { - var index = -1, length = values.length, offset = array.length; - while (++index < length) { - array[offset + index] = values[index]; + function arrayPush(array2, values) { + var index2 = -1, length = values.length, offset = array2.length; + while (++index2 < length) { + array2[offset + index2] = values[index2]; } - return array; + return array2; } module2.exports = arrayPush; } @@ -101336,12 +102556,12 @@ var require_baseFlatten = __commonJS({ "node_modules/lodash/_baseFlatten.js"(exports2, module2) { var arrayPush = require_arrayPush(); var isFlattenable = require_isFlattenable(); - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, length = array.length; + function baseFlatten(array2, depth, predicate, isStrict, result) { + var index2 = -1, length = array2.length; predicate || (predicate = isFlattenable); result || (result = []); - while (++index < length) { - var value = array[index]; + while (++index2 < length) { + var value = array2[index2]; if (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten(value, depth - 1, predicate, isStrict, result); @@ -101362,9 +102582,9 @@ var require_baseFlatten = __commonJS({ var require_flatten = __commonJS({ "node_modules/lodash/flatten.js"(exports2, module2) { var baseFlatten = require_baseFlatten(); - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; + function flatten(array2) { + var length = array2 == null ? 0 : array2.length; + return length ? baseFlatten(array2, 1) : []; } module2.exports = flatten; } @@ -101460,10 +102680,10 @@ var require_Hash = __commonJS({ var hashHas = require_hashHas(); var hashSet = require_hashSet(); function Hash(entries) { - var index = -1, length = entries == null ? 0 : entries.length; + var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); - while (++index < length) { - var entry = entries[index]; + while (++index2 < length) { + var entry = entries[index2]; this.set(entry[0], entry[1]); } } @@ -101491,10 +102711,10 @@ var require_listCacheClear = __commonJS({ var require_assocIndexOf = __commonJS({ "node_modules/lodash/_assocIndexOf.js"(exports2, module2) { var eq = require_eq2(); - function assocIndexOf(array, key) { - var length = array.length; + function assocIndexOf(array2, key) { + var length = array2.length; while (length--) { - if (eq(array[length][0], key)) { + if (eq(array2[length][0], key)) { return length; } } @@ -101511,15 +102731,15 @@ var require_listCacheDelete = __commonJS({ var arrayProto = Array.prototype; var splice = arrayProto.splice; function listCacheDelete(key) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { + var data = this.__data__, index2 = assocIndexOf(data, key); + if (index2 < 0) { return false; } var lastIndex = data.length - 1; - if (index == lastIndex) { + if (index2 == lastIndex) { data.pop(); } else { - splice.call(data, index, 1); + splice.call(data, index2, 1); } --this.size; return true; @@ -101533,8 +102753,8 @@ var require_listCacheGet = __commonJS({ "node_modules/lodash/_listCacheGet.js"(exports2, module2) { var assocIndexOf = require_assocIndexOf(); function listCacheGet(key) { - var data = this.__data__, index = assocIndexOf(data, key); - return index < 0 ? void 0 : data[index][1]; + var data = this.__data__, index2 = assocIndexOf(data, key); + return index2 < 0 ? void 0 : data[index2][1]; } module2.exports = listCacheGet; } @@ -101556,12 +102776,12 @@ var require_listCacheSet = __commonJS({ "node_modules/lodash/_listCacheSet.js"(exports2, module2) { var assocIndexOf = require_assocIndexOf(); function listCacheSet(key, value) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { + var data = this.__data__, index2 = assocIndexOf(data, key); + if (index2 < 0) { ++this.size; data.push([key, value]); } else { - data[index][1] = value; + data[index2][1] = value; } return this; } @@ -101578,10 +102798,10 @@ var require_ListCache = __commonJS({ var listCacheHas = require_listCacheHas(); var listCacheSet = require_listCacheSet(); function ListCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; + var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); - while (++index < length) { - var entry = entries[index]; + while (++index2 < length) { + var entry = entries[index2]; this.set(entry[0], entry[1]); } } @@ -101626,8 +102846,8 @@ var require_mapCacheClear = __commonJS({ var require_isKeyable = __commonJS({ "node_modules/lodash/_isKeyable.js"(exports2, module2) { function isKeyable(value) { - var type2 = typeof value; - return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null; + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } module2.exports = isKeyable; } @@ -101637,8 +102857,8 @@ var require_isKeyable = __commonJS({ var require_getMapData = __commonJS({ "node_modules/lodash/_getMapData.js"(exports2, module2) { var isKeyable = require_isKeyable(); - function getMapData(map2, key) { - var data = map2.__data__; + function getMapData(map, key) { + var data = map.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } module2.exports = getMapData; @@ -101703,10 +102923,10 @@ var require_MapCache = __commonJS({ var mapCacheHas = require_mapCacheHas(); var mapCacheSet = require_mapCacheSet(); function MapCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; + var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); - while (++index < length) { - var entry = entries[index]; + while (++index2 < length) { + var entry = entries[index2]; this.set(entry[0], entry[1]); } } @@ -101748,10 +102968,10 @@ var require_SetCache = __commonJS({ var setCacheAdd = require_setCacheAdd(); var setCacheHas = require_setCacheHas(); function SetCache(values) { - var index = -1, length = values == null ? 0 : values.length; + var index2 = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache(); - while (++index < length) { - this.add(values[index]); + while (++index2 < length) { + this.add(values[index2]); } } SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; @@ -101763,11 +102983,11 @@ var require_SetCache = __commonJS({ // node_modules/lodash/_baseFindIndex.js var require_baseFindIndex = __commonJS({ "node_modules/lodash/_baseFindIndex.js"(exports2, module2) { - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, index = fromIndex + (fromRight ? 1 : -1); - while (fromRight ? index-- : ++index < length) { - if (predicate(array[index], index, array)) { - return index; + function baseFindIndex(array2, predicate, fromIndex, fromRight) { + var length = array2.length, index2 = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index2-- : ++index2 < length) { + if (predicate(array2[index2], index2, array2)) { + return index2; } } return -1; @@ -101789,11 +103009,11 @@ var require_baseIsNaN = __commonJS({ // node_modules/lodash/_strictIndexOf.js var require_strictIndexOf = __commonJS({ "node_modules/lodash/_strictIndexOf.js"(exports2, module2) { - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; + function strictIndexOf(array2, value, fromIndex) { + var index2 = fromIndex - 1, length = array2.length; + while (++index2 < length) { + if (array2[index2] === value) { + return index2; } } return -1; @@ -101808,8 +103028,8 @@ var require_baseIndexOf = __commonJS({ var baseFindIndex = require_baseFindIndex(); var baseIsNaN = require_baseIsNaN(); var strictIndexOf = require_strictIndexOf(); - function baseIndexOf(array, value, fromIndex) { - return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + function baseIndexOf(array2, value, fromIndex) { + return value === value ? strictIndexOf(array2, value, fromIndex) : baseFindIndex(array2, baseIsNaN, fromIndex); } module2.exports = baseIndexOf; } @@ -101819,9 +103039,9 @@ var require_baseIndexOf = __commonJS({ var require_arrayIncludes = __commonJS({ "node_modules/lodash/_arrayIncludes.js"(exports2, module2) { var baseIndexOf = require_baseIndexOf(); - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; + function arrayIncludes(array2, value) { + var length = array2 == null ? 0 : array2.length; + return !!length && baseIndexOf(array2, value, 0) > -1; } module2.exports = arrayIncludes; } @@ -101830,10 +103050,10 @@ var require_arrayIncludes = __commonJS({ // node_modules/lodash/_arrayIncludesWith.js var require_arrayIncludesWith = __commonJS({ "node_modules/lodash/_arrayIncludesWith.js"(exports2, module2) { - function arrayIncludesWith(array, value, comparator) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (comparator(value, array[index])) { + function arrayIncludesWith(array2, value, comparator) { + var index2 = -1, length = array2 == null ? 0 : array2.length; + while (++index2 < length) { + if (comparator(value, array2[index2])) { return true; } } @@ -101846,10 +103066,10 @@ var require_arrayIncludesWith = __commonJS({ // node_modules/lodash/_arrayMap.js var require_arrayMap = __commonJS({ "node_modules/lodash/_arrayMap.js"(exports2, module2) { - function arrayMap(array, iteratee) { - var index = -1, length = array == null ? 0 : array.length, result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); + function arrayMap(array2, iteratee) { + var index2 = -1, length = array2 == null ? 0 : array2.length, result = Array(length); + while (++index2 < length) { + result[index2] = iteratee(array2[index2], index2, array2); } return result; } @@ -101877,8 +103097,8 @@ var require_baseDifference = __commonJS({ var baseUnary = require_baseUnary(); var cacheHas = require_cacheHas(); var LARGE_ARRAY_SIZE = 200; - function baseDifference(array, values, iteratee, comparator) { - var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; + function baseDifference(array2, values, iteratee, comparator) { + var index2 = -1, includes = arrayIncludes, isCommon = true, length = array2.length, result = [], valuesLength = values.length; if (!length) { return result; } @@ -101894,8 +103114,8 @@ var require_baseDifference = __commonJS({ values = new SetCache(values); } outer: - while (++index < length) { - var value = array[index], computed = iteratee == null ? value : iteratee(value); + while (++index2 < length) { + var value = array2[index2], computed = iteratee == null ? value : iteratee(value); value = comparator || value !== 0 ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; @@ -101934,8 +103154,8 @@ var require_difference = __commonJS({ var baseFlatten = require_baseFlatten(); var baseRest = require_baseRest(); var isArrayLikeObject = require_isArrayLikeObject(); - var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; + var difference = baseRest(function(array2, values) { + return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); module2.exports = difference; } @@ -101963,10 +103183,10 @@ var require_noop = __commonJS({ // node_modules/lodash/_setToArray.js var require_setToArray = __commonJS({ "node_modules/lodash/_setToArray.js"(exports2, module2) { - function setToArray(set2) { - var index = -1, result = Array(set2.size); - set2.forEach(function(value) { - result[++index] = value; + function setToArray(set) { + var index2 = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index2] = value; }); return result; } @@ -101998,15 +103218,15 @@ var require_baseUniq = __commonJS({ var createSet = require_createSet(); var setToArray = require_setToArray(); var LARGE_ARRAY_SIZE = 200; - function baseUniq(array, iteratee, comparator) { - var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + function baseUniq(array2, iteratee, comparator) { + var index2 = -1, includes = arrayIncludes, length = array2.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { - var set2 = iteratee ? null : createSet(array); - if (set2) { - return setToArray(set2); + var set = iteratee ? null : createSet(array2); + if (set) { + return setToArray(set); } isCommon = false; includes = cacheHas; @@ -102015,8 +103235,8 @@ var require_baseUniq = __commonJS({ seen = iteratee ? [] : result; } outer: - while (++index < length) { - var value = array[index], computed = iteratee ? iteratee(value) : value; + while (++index2 < length) { + var value = array2[index2], computed = iteratee ? iteratee(value) : value; value = comparator || value !== 0 ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; @@ -102089,7 +103309,7 @@ var require_isPlainObject = __commonJS({ var funcToString = funcProto.toString; var hasOwnProperty = objectProto.hasOwnProperty; var objectCtorString = funcToString.call(Object); - function isPlainObject3(value) { + function isPlainObject4(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } @@ -102100,14235 +103320,10136 @@ var require_isPlainObject = __commonJS({ var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } - module2.exports = isPlainObject3; + module2.exports = isPlainObject4; } }); -// node_modules/glob/node_modules/balanced-match/dist/commonjs/index.js -var require_commonjs18 = __commonJS({ - "node_modules/glob/node_modules/balanced-match/dist/commonjs/index.js"(exports2) { +// node_modules/glob/dist/commonjs/index.min.js +var require_index_min = __commonJS({ + "node_modules/glob/dist/commonjs/index.min.js"(exports2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.range = exports2.balanced = void 0; - var balanced = (a, b, str2) => { - const ma = a instanceof RegExp ? maybeMatch(a, str2) : a; - const mb = b instanceof RegExp ? maybeMatch(b, str2) : b; - const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + ma.length, r[1]), - post: str2.slice(r[1] + mb.length) - }; - }; - exports2.balanced = balanced; - var maybeMatch = (reg, str2) => { - const m = str2.match(reg); - return m ? m[0] : null; - }; - var range = (a, b, str2) => { - let begs, beg, left, right = void 0, result; - let ai = str2.indexOf(a); - let bi = str2.indexOf(b, ai + 1); - let i = ai; - if (ai >= 0 && bi > 0) { - if (a === b) { - return [ai, bi]; + var R = (n, t) => () => (t || n((t = { exports: {} }).exports, t), t.exports); + var Ge = R((Y) => { + "use strict"; + Object.defineProperty(Y, "__esModule", { value: true }); + Y.range = Y.balanced = void 0; + var Gs = (n, t, e) => { + let s = n instanceof RegExp ? Ie(n, e) : n, i = t instanceof RegExp ? Ie(t, e) : t, r = s !== null && i != null && (0, Y.range)(s, i, e); + return r && { start: r[0], end: r[1], pre: e.slice(0, r[0]), body: e.slice(r[0] + s.length, r[1]), post: e.slice(r[1] + i.length) }; + }; + Y.balanced = Gs; + var Ie = (n, t) => { + let e = t.match(n); + return e ? e[0] : null; + }, zs = (n, t, e) => { + let s, i, r, h, o, a = e.indexOf(n), l = e.indexOf(t, a + 1), f = a; + if (a >= 0 && l > 0) { + if (n === t) return [a, l]; + for (s = [], r = e.length; f >= 0 && !o; ) { + if (f === a) s.push(f), a = e.indexOf(n, f + 1); + else if (s.length === 1) { + let c = s.pop(); + c !== void 0 && (o = [c, l]); + } else i = s.pop(), i !== void 0 && i < r && (r = i, h = l), l = e.indexOf(t, f + 1); + f = a < l && a >= 0 ? a : l; + } + s.length && h !== void 0 && (o = [r, h]); + } + return o; + }; + Y.range = zs; + }); + var Ke = R((it) => { + "use strict"; + Object.defineProperty(it, "__esModule", { value: true }); + it.EXPANSION_MAX = void 0; + it.expand = ei; + var ze = Ge(), Ue = "\0SLASH" + Math.random() + "\0", $e = "\0OPEN" + Math.random() + "\0", ue = "\0CLOSE" + Math.random() + "\0", qe = "\0COMMA" + Math.random() + "\0", He = "\0PERIOD" + Math.random() + "\0", Us = new RegExp(Ue, "g"), $s = new RegExp($e, "g"), qs = new RegExp(ue, "g"), Hs = new RegExp(qe, "g"), Vs = new RegExp(He, "g"), Ks = /\\\\/g, Xs = /\\{/g, Ys = /\\}/g, Js = /\\,/g, Zs = /\\./g; + it.EXPANSION_MAX = 1e5; + function ce(n) { + return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10); + } + function Qs(n) { + return n.replace(Ks, Ue).replace(Xs, $e).replace(Ys, ue).replace(Js, qe).replace(Zs, He); + } + function ti(n) { + return n.replace(Us, "\\").replace($s, "{").replace(qs, "}").replace(Hs, ",").replace(Vs, "."); + } + function Ve(n) { + if (!n) return [""]; + let t = [], e = (0, ze.balanced)("{", "}", n); + if (!e) return n.split(","); + let { pre: s, body: i, post: r } = e, h = s.split(","); + h[h.length - 1] += "{" + i + "}"; + let o = Ve(r); + return r.length && (h[h.length - 1] += o.shift(), h.push.apply(h, o)), t.push.apply(t, h), t; + } + function ei(n, t = {}) { + if (!n) return []; + let { max: e = it.EXPANSION_MAX } = t; + return n.slice(0, 2) === "{}" && (n = "\\{\\}" + n.slice(2)), ht(Qs(n), e, true).map(ti); + } + function si(n) { + return "{" + n + "}"; + } + function ii(n) { + return /^-?0\d/.test(n); + } + function ri(n, t) { + return n <= t; + } + function ni(n, t) { + return n >= t; + } + function ht(n, t, e) { + let s = [], i = (0, ze.balanced)("{", "}", n); + if (!i) return [n]; + let r = i.pre, h = i.post.length ? ht(i.post, t, false) : [""]; + if (/\$$/.test(i.pre)) for (let o = 0; o < h.length && o < t; o++) { + let a = r + "{" + i.body + "}" + h[o]; + s.push(a); } - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i === ai) { - begs.push(i); - ai = str2.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; + else { + let o = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = o || a, f = i.body.indexOf(",") >= 0; + if (!l && !f) return i.post.match(/,(?!,).*\}/) ? (n = i.pre + "{" + i.body + ue + i.post, ht(n, t, true)) : [n]; + let c; + if (l) c = i.body.split(/\.\./); + else if (c = Ve(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(si), c.length === 1)) return h.map((u) => i.pre + c[0] + u); + let d; + if (l && c[0] !== void 0 && c[1] !== void 0) { + let u = ce(c[0]), m = ce(c[1]), p = Math.max(c[0].length, c[1].length), b = c.length === 3 && c[2] !== void 0 ? Math.abs(ce(c[2])) : 1, w = ri; + m < u && (b *= -1, w = ni); + let E = c.some(ii); + d = []; + for (let y = u; w(y, m); y += b) { + let S; + if (a) S = String.fromCharCode(y), S === "\\" && (S = ""); + else if (S = String(y), E) { + let B = p - S.length; + if (B > 0) { + let U = new Array(B + 1).join("0"); + y < 0 ? S = "-" + U + S.slice(1) : S = U + S; + } + } + d.push(S); } - bi = str2.indexOf(b, i + 1); + } else { + d = []; + for (let u = 0; u < c.length; u++) d.push.apply(d, ht(c[u], t, false)); + } + for (let u = 0; u < d.length; u++) for (let m = 0; m < h.length && s.length < t; m++) { + let p = r + d[u] + h[m]; + (!e || l || p) && s.push(p); } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length && right !== void 0) { - result = [left, right]; } + return s; } - return result; - }; - exports2.range = range; - } -}); - -// node_modules/glob/node_modules/brace-expansion/dist/commonjs/index.js -var require_commonjs19 = __commonJS({ - "node_modules/glob/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.EXPANSION_MAX = void 0; - exports2.expand = expand2; - var balanced_match_1 = require_commonjs18(); - 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; - exports2.EXPANSION_MAX = 1e5; - function numeric(str2) { - return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod); - } - function unescapeBraces(str2) { - return str2.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, "."); - } - function parseCommaParts(str2) { - if (!str2) { - return [""]; - } - const parts = []; - const m = (0, balanced_match_1.balanced)("{", "}", str2); - if (!m) { - return str2.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 expand2(str2, options = {}) { - if (!str2) { - return []; - } - const { max = exports2.EXPANSION_MAX } = options; - if (str2.slice(0, 2) === "{}") { - str2 = "\\{\\}" + str2.slice(2); - } - return expand_(escapeBraces(str2), max, true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte6(i, y) { - return i >= y; - } - function expand_(str2, max, isTop) { - const expansions = []; - const m = (0, balanced_match_1.balanced)("{", "}", str2); - if (!m) - return [str2]; - 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(/,(?!,).*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand_(str2, max, true); + }); + var Xe = R((Ct) => { + "use strict"; + Object.defineProperty(Ct, "__esModule", { value: true }); + Ct.assertValidPattern = void 0; + var hi = 1024 * 64, oi = (n) => { + if (typeof n != "string") throw new TypeError("invalid pattern"); + if (n.length > hi) throw new TypeError("pattern is too long"); + }; + Ct.assertValidPattern = oi; + }); + var Je = R((Rt) => { + "use strict"; + Object.defineProperty(Rt, "__esModule", { value: true }); + Rt.parseClass = void 0; + var ai = { "[: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] }, ot = (n) => n.replace(/[[\]\\-]/g, "\\$&"), li = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Ye = (n) => n.join(""), ci = (n, t) => { + let e = t; + if (n.charAt(e) !== "[") throw new Error("not in a brace expression"); + let s = [], i = [], r = e + 1, h = false, o = false, a = false, l = false, f = e, c = ""; + t: for (; r < n.length; ) { + let p = n.charAt(r); + if ((p === "!" || p === "^") && r === e + 1) { + l = true, r++; + continue; } - return [str2]; - } - 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 = lte; - const reverse = y < x; - if (reverse) { - incr *= -1; - test = gte6; - } - const pad = n.some(isPadded); - N = []; - for (let i = x; test(i, y) && N.length < max; 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); + if (p === "]" && h && !a) { + f = r + 1; + break; } - } else { - N = []; - for (let j = 0; j < n.length; j++) { - N.push.apply(N, expand_(n[j], max, false)); + if (h = true, p === "\\" && !a) { + a = true, r++; + continue; } - } - 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); + if (p === "[" && !a) { + for (let [b, [w, v, E]] of Object.entries(ai)) if (n.startsWith(b, r)) { + if (c) return ["$.", false, n.length - e, true]; + r += b.length, E ? i.push(w) : s.push(w), o = o || v; + continue t; } } - } - } - return expansions; - } - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js -var require_assert_valid_pattern = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.assertValidPattern = void 0; - 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"); - } - }; - exports2.assertValidPattern = assertValidPattern; - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js -var require_brace_expressions = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parseClass = void 0; - 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 = (glob2, position) => { - const pos = position; - if (glob2.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 negate2 = false; - let endPos = pos; - let rangeStart = ""; - WHILE: while (i < glob2.length) { - const c = glob2.charAt(i); - if ((c === "!" || c === "^") && i === pos + 1) { - negate2 = true; - i++; - continue; - } - if (c === "]" && sawStart && !escaping) { - endPos = i + 1; - break; - } - sawStart = true; - if (c === "\\") { - if (!escaping) { - escaping = true; - i++; + if (a = false, c) { + p > c ? s.push(ot(c) + "-" + ot(p)) : p === c && s.push(ot(p)), c = "", r++; continue; } - } - if (c === "[" && !escaping) { - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { - if (glob2.startsWith(cls, i)) { - if (rangeStart) { - return ["$.", false, glob2.length - pos, true]; - } - i += cls.length; - if (neg) - negs.push(unip); - else - ranges.push(unip); - uflag = uflag || u; - continue WHILE; - } + if (n.startsWith("-]", r + 1)) { + s.push(ot(p + "-")), r += 2; + continue; } - } - escaping = false; - if (rangeStart) { - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)); - } else if (c === rangeStart) { - ranges.push(braceEscape(c)); + if (n.startsWith("-", r + 1)) { + c = p, r += 2; + continue; } - rangeStart = ""; - i++; - continue; - } - if (glob2.startsWith("-]", i + 1)) { - ranges.push(braceEscape(c + "-")); - i += 2; - continue; + s.push(ot(p)), r++; } - if (glob2.startsWith("-", i + 1)) { - rangeStart = c; - i += 2; - continue; + if (f < r) return ["", false, 0, false]; + if (!s.length && !i.length) return ["$.", false, n.length - e, true]; + if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) { + let p = s[0].length === 2 ? s[0].slice(-1) : s[0]; + return [li(p), false, f - e, false]; } - ranges.push(braceEscape(c)); - i++; - } - if (endPos < i) { - return ["", false, 0, false]; - } - if (!ranges.length && !negs.length) { - return ["$.", false, glob2.length - pos, true]; - } - if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate2) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = "[" + (negate2 ? "^" : "") + rangesToString(ranges) + "]"; - const snegs = "[" + (negate2 ? "" : "^") + rangesToString(negs) + "]"; - const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs; - return [comb, uflag, endPos - pos, true]; - }; - exports2.parseClass = parseClass; - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js -var require_unescape = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.unescape = void 0; - var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => { - if (magicalBraces) { - return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"); - } - return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1"); - }; - exports2.unescape = unescape2; - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js -var require_ast = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AST = void 0; - var brace_expressions_js_1 = require_brace_expressions(); - var unescape_js_1 = require_unescape(); - 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(type2, parent, options = {}) { - this.type = type2; - if (type2) - 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 (type2 === "!" && !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; + let d = "[" + (l ? "^" : "") + Ye(s) + "]", u = "[" + (l ? "" : "^") + Ye(i) + "]"; + return [s.length && i.length ? "(" + d + "|" + u + ")" : s.length ? d : u, o, f - e, true]; + }; + Rt.parseClass = ci; + }); + var kt = R((At) => { + "use strict"; + Object.defineProperty(At, "__esModule", { value: true }); + At.unescape = void 0; + var ui = (n, { windowsPathsNoEscape: t = false, magicalBraces: e = true } = {}) => e ? t ? n.replace(/\[([^\/\\])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n.replace(/\[([^\/\\{}])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1"); + At.unescape = ui; + }); + var pe = R((Dt) => { + "use strict"; + Object.defineProperty(Dt, "__esModule", { value: true }); + Dt.AST = void 0; + var fi = Je(), Mt = kt(), di = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), Ze = (n) => di.has(n), pi = "(?!(?:^|/)\\.\\.?(?:$|/))", Pt = "(?!\\.)", mi = /* @__PURE__ */ new Set(["[", "."]), gi = /* @__PURE__ */ new Set(["..", "."]), wi = new Set("().*{}+?[]^$\\!"), bi = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), de = "[^/]", Qe = de + "*?", ts = de + "+?", fe = class n { + type; + #t; + #s; + #n = false; + #r = []; + #h; + #S; + #w; + #c = false; + #o; + #f; + #u = false; + constructor(t, e, s = {}) { + this.type = t, t && (this.#s = true), this.#h = e, this.#t = this.#h ? this.#h.#t : this, this.#o = this.#t === this ? s : this.#t.#o, this.#w = this.#t === this ? [] : this.#t.#w, t === "!" && !this.#t.#c && this.#w.push(this), this.#S = this.#h ? this.#h.#r.length : 0; + } + get hasMagic() { + if (this.#s !== void 0) return this.#s; + for (let t of this.#r) if (typeof t != "string" && (t.type || t.hasMagic)) return this.#s = true; + return this.#s; } - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== void 0) - return this.#toString; - if (!this.type) { - return this.#toString = this.#parts.map((p) => String(p)).join(""); - } else { - return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")"; + toString() { + return this.#f !== void 0 ? this.#f : this.type ? this.#f = this.type + "(" + this.#r.map((t) => String(t)).join("|") + ")" : this.#f = this.#r.map((t) => String(t)).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]); + #a() { + if (this !== this.#t) throw new Error("should only call on root"); + if (this.#c) return this; + this.toString(), this.#c = true; + let t; + for (; t = this.#w.pop(); ) { + if (t.type !== "!") continue; + let e = t, s = e.#h; + for (; s; ) { + for (let i = e.#S + 1; !s.type && i < s.#r.length; i++) for (let r of t.#r) { + if (typeof r == "string") throw new Error("string part in extglob AST??"); + r.copyIn(s.#r[i]); } + e = s, s = e.#h; } - p = pp; - pp = p.#parent; } + return this; } - 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); + push(...t) { + for (let e of t) if (e !== "") { + if (typeof e != "string" && !(e instanceof n && e.#h === this)) throw new Error("invalid part: " + e); + this.#r.push(e); } - 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({}); + toJSON() { + let t = this.type === null ? this.#r.slice().map((e) => typeof e == "string" ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())]; + return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === this.#t || this.#t.#c && this.#h?.type === "!") && t.push({}), t; } - 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; + isStart() { + if (this.#t === this) return true; + if (!this.#h?.isStart()) return false; + if (this.#S === 0) return true; + let t = this.#h; + for (let e = 0; e < this.#S; e++) { + let s = t.#r[e]; + if (!(s instanceof n && s.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(str2, 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 < str2.length) { - const c = str2.charAt(i2++); - if (escaping || c === "\\") { - escaping = !escaping; - acc2 += c; + isEnd() { + if (this.#t === this || this.#h?.type === "!") return true; + if (!this.#h?.isEnd()) return false; + if (!this.type) return this.#h?.isEnd(); + let t = this.#h ? this.#h.#r.length : 0; + return this.#S === t - 1; + } + copyIn(t) { + typeof t == "string" ? this.push(t) : this.push(t.clone(this)); + } + clone(t) { + let e = new n(this.type, t); + for (let s of this.#r) e.copyIn(s); + return e; + } + static #i(t, e, s, i) { + let r = false, h = false, o = -1, a = false; + if (e.type === null) { + let u = s, m = ""; + for (; u < t.length; ) { + let p = t.charAt(u++); + if (r || p === "\\") { + r = !r, m += p; + continue; + } + if (h) { + u === o + 1 ? (p === "^" || p === "!") && (a = true) : p === "]" && !(u === o + 2 && a) && (h = false), m += p; + continue; + } else if (p === "[") { + h = true, o = u, a = false, m += p; + continue; + } + if (!i.noext && Ze(p) && t.charAt(u) === "(") { + e.push(m), m = ""; + let b = new n(p, e); + u = n.#i(t, b, u, i), e.push(b); + continue; + } + m += p; + } + return e.push(m), u; + } + let l = s + 1, f = new n(null, e), c = [], d = ""; + for (; l < t.length; ) { + let u = t.charAt(l++); + if (r || u === "\\") { + r = !r, d += u; continue; } - if (inBrace) { - if (i2 === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; - } - } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc2 += c; + if (h) { + l === o + 1 ? (u === "^" || u === "!") && (a = true) : u === "]" && !(l === o + 2 && a) && (h = false), d += u; continue; - } else if (c === "[") { - inBrace = true; - braceStart = i2; - braceNeg = false; - acc2 += c; + } else if (u === "[") { + h = true, o = l, a = false, d += u; continue; } - const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i2) === "(" && extDepth <= maxDepth; - if (doRecurse) { - ast.push(acc2); - acc2 = ""; - const ext = new _a(c, ast); - i2 = _a.#parseAST(str2, ext, i2, opt, extDepth + 1); - ast.push(ext); + if (Ze(u) && t.charAt(l) === "(") { + f.push(d), d = ""; + let m = new n(u, f); + f.push(m), l = n.#i(t, m, l, i); continue; } - acc2 += c; - } - ast.push(acc2); - return i2; - } - let i = pos + 1; - let part = new _a(null, ast); - const parts = []; - let acc = ""; - while (i < str2.length) { - const c = str2.charAt(i++); - if (escaping || c === "\\") { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; + if (u === "|") { + f.push(d), d = "", c.push(f), f = new n(null, e); + continue; + } + if (u === ")") return d === "" && e.#r.length === 0 && (e.#u = true), f.push(d), d = "", e.push(...c, f), l; + d += u; + } + return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l; + } + static fromGlob(t, e = {}) { + let s = new n(null, void 0, e); + return n.#i(t, s, 0, e), s; + } + toMMPattern() { + if (this !== this.#t) return this.#t.toMMPattern(); + let t = this.toString(), [e, s, i, r] = this.toRegExpSource(); + if (!(i || this.#s || this.#o.nocase && !this.#o.nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase())) return s; + let o = (this.#o.nocase ? "i" : "") + (r ? "u" : ""); + return Object.assign(new RegExp(`^${e}$`, o), { _src: e, _glob: t }); + } + get options() { + return this.#o; + } + toRegExpSource(t) { + let e = t ?? !!this.#o.dot; + if (this.#t === this && this.#a(), !this.type) { + let a = this.isStart() && this.isEnd() && !this.#r.some((u) => typeof u != "string"), l = this.#r.map((u) => { + let [m, p, b, w] = typeof u == "string" ? n.#v(u, this.#s, a) : u.toRegExpSource(t); + return this.#s = this.#s || b, this.#n = this.#n || w, m; + }).join(""), f = ""; + if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && gi.has(this.#r[0]))) { + let m = mi, p = e && m.has(l.charAt(0)) || l.startsWith("\\.") && m.has(l.charAt(2)) || l.startsWith("\\.\\.") && m.has(l.charAt(4)), b = !e && !t && m.has(l.charAt(0)); + f = p ? pi : b ? Pt : ""; + } + let c = ""; + return this.isEnd() && this.#t.#c && this.#h?.type === "!" && (c = "(?:$|\\/)"), [f + l + c, (0, Mt.unescape)(l), this.#s = !!this.#s, this.#n]; + } + let s = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e); + if (this.isStart() && this.isEnd() && !r && this.type !== "!") { + let a = this.toString(); + return this.#r = [a], this.type = null, this.#s = void 0, [a, (0, Mt.unescape)(this.toString()), false, false]; + } + let h = !s || t || e || !Pt ? "" : this.#d(true); + h === r && (h = ""), h && (r = `(?:${r})(?:${h})*?`); + let o = ""; + if (this.type === "!" && this.#u) o = (this.isStart() && !e ? Pt : "") + ts; + else { + let a = this.type === "!" ? "))" + (this.isStart() && !e && !t ? Pt : "") + Qe + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && h ? ")" : this.type === "*" && h ? ")?" : `)${this.type}`; + o = i + r + a; + } + return [o, (0, Mt.unescape)(r), this.#s = !!this.#s, this.#n]; + } + #d(t) { + return this.#r.map((e) => { + if (typeof e == "string") throw new Error("string type in extglob ast??"); + let [s, i, r, h] = e.toRegExpSource(t); + return this.#n = this.#n || h, s; + }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|"); + } + static #v(t, e, s = false) { + let i = false, r = "", h = false, o = false; + for (let a = 0; a < t.length; a++) { + let l = t.charAt(a); + if (i) { + i = false, r += (wi.has(l) ? "\\" : "") + l; + continue; + } + if (l === "*") { + if (o) continue; + o = true, r += s && /^[*]+$/.test(t) ? ts : Qe, e = true; + continue; + } else o = false; + if (l === "\\") { + a === t.length - 1 ? r += "\\\\" : i = true; + continue; + } + if (l === "[") { + let [f, c, d, u] = (0, fi.parseClass)(t, a); + if (d) { + r += f, h = h || c, a += d - 1, e = e || u; + continue; } - } 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) && str2.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 ext = new _a(c, part); - part.push(ext); - i = _a.#parseAST(str2, ext, 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; + if (l === "?") { + r += de, e = true; + continue; } - part.push(acc); - acc = ""; - ast.push(...parts, part); - return i; + r += bi(l); } - acc += c; - } - ast.type = null; - ast.#hasMagic = void 0; - ast.#parts = [str2.substring(pos - 1)]; - return i; - } - #canAdoptWithSpace(child) { - return this.#canAdopt(child, adoptionWithSpaceMap); - } - #canAdopt(child, map2 = adoptionMap) { - if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) { - return false; - } - const gc = child.#parts[0]; - if (!gc || typeof gc !== "object" || gc.type === null) { - return false; - } - return this.#canAdoptType(gc.type, map2); - } - #canAdoptType(c, map2 = adoptionAnyMap) { - return !!map2.get(this.type)?.includes(c); - } - #adoptWithSpace(child, index) { - const gc = child.#parts[0]; - const blank = new _a(null, gc, this.options); - blank.#parts.push(""); - gc.push(blank); - this.#adopt(child, index); - } - #adopt(child, index) { - const gc = child.#parts[0]; - this.#parts.splice(index, 1, ...gc.#parts); - for (const p of gc.#parts) { - if (typeof p === "object") - p.#parent = this; + return [r, (0, Mt.unescape)(t), !!e, h]; } - this.#toString = void 0; - } - #canUsurpType(c) { - const m = usurpMap.get(this.type); - return !!m?.has(c); - } - #canUsurp(child) { - if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) { + }; + Dt.AST = fe; + }); + var me = R((Ft) => { + "use strict"; + Object.defineProperty(Ft, "__esModule", { value: true }); + Ft.escape = void 0; + var yi = (n, { windowsPathsNoEscape: t = false, magicalBraces: e = false } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&"); + Ft.escape = yi; + }); + var H = R((g) => { + "use strict"; + Object.defineProperty(g, "__esModule", { value: true }); + g.unescape = g.escape = g.AST = g.Minimatch = g.match = g.makeRe = g.braceExpand = g.defaults = g.filter = g.GLOBSTAR = g.sep = g.minimatch = void 0; + var Si = Ke(), jt = Xe(), is = pe(), vi = me(), Ei = kt(), _i = (n, t, e = {}) => ((0, jt.assertValidPattern)(t), !e.nocomment && t.charAt(0) === "#" ? false : new J(t, e).match(n)); + g.minimatch = _i; + var Oi = /^\*+([^+@!?\*\[\(]*)$/, xi = (n) => (t) => !t.startsWith(".") && t.endsWith(n), Ti = (n) => (t) => t.endsWith(n), Ci = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n)), Ri = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n)), Ai = /^\*+\.\*+$/, ki = (n) => !n.startsWith(".") && n.includes("."), Mi = (n) => n !== "." && n !== ".." && n.includes("."), Pi = /^\.\*+$/, Di = (n) => n !== "." && n !== ".." && n.startsWith("."), Fi = /^\*+$/, ji = (n) => n.length !== 0 && !n.startsWith("."), Ni = (n) => n.length !== 0 && n !== "." && n !== "..", Li = /^\?+([^+@!?\*\[\(]*)?$/, Wi = ([n, t = ""]) => { + let e = rs([n]); + return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e; + }, Bi = ([n, t = ""]) => { + let e = ns([n]); + return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e; + }, Ii = ([n, t = ""]) => { + let e = ns([n]); + return t ? (s) => e(s) && s.endsWith(t) : e; + }, Gi = ([n, t = ""]) => { + let e = rs([n]); + return t ? (s) => e(s) && s.endsWith(t) : e; + }, rs = ([n]) => { + let t = n.length; + return (e) => e.length === t && !e.startsWith("."); + }, ns = ([n]) => { + let t = n.length; + return (e) => e.length === t && e !== "." && e !== ".."; + }, hs = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", es = { win32: { sep: "\\" }, posix: { sep: "/" } }; + g.sep = hs === "win32" ? es.win32.sep : es.posix.sep; + g.minimatch.sep = g.sep; + g.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); + g.minimatch.GLOBSTAR = g.GLOBSTAR; + var zi = "[^/]", Ui = zi + "*?", $i = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", qi = "(?:(?!(?:\\/|^)\\.).)*?", Hi = (n, t = {}) => (e) => (0, g.minimatch)(e, n, t); + g.filter = Hi; + g.minimatch.filter = g.filter; + var F = (n, t = {}) => Object.assign({}, n, t), Vi = (n) => { + if (!n || typeof n != "object" || !Object.keys(n).length) return g.minimatch; + let t = g.minimatch; + return Object.assign((s, i, r = {}) => t(s, i, F(n, r)), { Minimatch: class extends t.Minimatch { + constructor(i, r = {}) { + super(i, F(n, r)); + } + static defaults(i) { + return t.defaults(F(n, i)).Minimatch; + } + }, AST: class extends t.AST { + constructor(i, r, h = {}) { + super(i, r, F(n, h)); + } + static fromGlob(i, r = {}) { + return t.AST.fromGlob(i, F(n, r)); + } + }, unescape: (s, i = {}) => t.unescape(s, F(n, i)), escape: (s, i = {}) => t.escape(s, F(n, i)), filter: (s, i = {}) => t.filter(s, F(n, i)), defaults: (s) => t.defaults(F(n, s)), makeRe: (s, i = {}) => t.makeRe(s, F(n, i)), braceExpand: (s, i = {}) => t.braceExpand(s, F(n, i)), match: (s, i, r = {}) => t.match(s, i, F(n, r)), sep: t.sep, GLOBSTAR: g.GLOBSTAR }); + }; + g.defaults = Vi; + g.minimatch.defaults = g.defaults; + var Ki = (n, t = {}) => ((0, jt.assertValidPattern)(n), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) ? [n] : (0, Si.expand)(n, { max: t.braceExpandMax })); + g.braceExpand = Ki; + g.minimatch.braceExpand = g.braceExpand; + var Xi = (n, t = {}) => new J(n, t).makeRe(); + g.makeRe = Xi; + g.minimatch.makeRe = g.makeRe; + var Yi = (n, t, e = {}) => { + let s = new J(t, e); + return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n; + }; + g.match = Yi; + g.minimatch.match = g.match; + var ss = /[?*]|[+@!]\(.*?\)|\[|\]/, Ji = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), J = class { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(t, e = {}) { + (0, jt.assertValidPattern)(t), e = e || {}, this.options = e, this.pattern = t, this.platform = e.platform || hs, this.isWindows = this.platform === "win32"; + let s = "allowWindowsEscape"; + this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e[s] === false, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = false, this.nonegate = !!e.nonegate, this.comment = false, this.empty = false, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.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 (let t of this.set) for (let e of t) if (typeof e != "string") return true; return false; } - const gc = child.#parts[0]; - if (!gc || typeof gc !== "object" || gc.type === null) { - return false; + debug(...t) { } - return this.#canUsurpType(gc.type); - } - #usurp(child) { - const m = usurpMap.get(this.type); - const gc = child.#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; + make() { + let t = this.pattern, e = this.options; + if (!e.nocomment && t.charAt(0) === "#") { + this.comment = true; + return; } + if (!t) { + this.empty = true; + return; + } + this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...r) => console.error(...r)), this.debug(this.pattern, this.globSet); + let s = this.globSet.map((r) => this.slashSplit(r)); + this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts); + let i = this.globParts.map((r, h, o) => { + if (this.isWindows && this.windowsNoMagicRoot) { + let a = r[0] === "" && r[1] === "" && (r[2] === "?" || !ss.test(r[2])) && !ss.test(r[3]), l = /^[a-z]:/i.test(r[0]); + if (a) return [...r.slice(0, 4), ...r.slice(4).map((f) => this.parse(f))]; + if (l) return [r[0], ...r.slice(1).map((f) => this.parse(f))]; + } + return r.map((a) => this.parse(a)); + }); + if (this.debug(this.pattern, i), this.set = i.filter((r) => r.indexOf(false) === -1), this.isWindows) for (let r = 0; r < this.set.length; r++) { + let h = this.set[r]; + h[0] === "" && h[1] === "" && this.globParts[r][2] === "?" && typeof h[3] == "string" && /^[a-z]:$/i.test(h[3]) && (h[2] = "?"); + } + this.debug(this.pattern, this.set); + } + preprocess(t) { + if (this.options.noglobstar) for (let s = 0; s < t.length; s++) for (let i = 0; i < t[s].length; i++) t[s][i] === "**" && (t[s][i] = "*"); + let { optimizationLevel: e = 1 } = this.options; + return e >= 2 ? (t = this.firstPhasePreProcess(t), t = this.secondPhasePreProcess(t)) : e >= 1 ? t = this.levelOneOptimize(t) : t = this.adjascentGlobstarOptimize(t), t; + } + adjascentGlobstarOptimize(t) { + return t.map((e) => { + let s = -1; + for (; (s = e.indexOf("**", s + 1)) !== -1; ) { + let i = s; + for (; e[i + 1] === "**"; ) i++; + i !== s && e.splice(s, i - s); + } + return e; + }); } - 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 glob2 = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob2.toUpperCase() !== glob2.toLowerCase(); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : ""); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob2 - }); - } - get options() { - return this.#options; - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource(allowDot) { - const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) { - this.#flatten(); - this.#fillNegs(); - } - if (!isExtglobAST(this)) { - const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string"); - const src = this.#parts.map((p) => { - const [re, _2, hasMagic, uflag] = typeof p === "string" ? _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(src.charAt(0)) || // the pattern starts with \., and then [ or . - src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or . - src.startsWith("\\.\\.") && aps.has(src.charAt(4)) - ); - const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ""; + levelOneOptimize(t) { + return t.map((e) => (e = e.reduce((s, i) => { + let r = s[s.length - 1]; + return i === "**" && r === "**" ? s : i === ".." && r && r !== ".." && r !== "." && r !== "**" ? (s.pop(), s) : (s.push(i), s); + }, []), e.length === 0 ? [""] : e)); + } + levelTwoFileOptimize(t) { + Array.isArray(t) || (t = this.slashSplit(t)); + let e = false; + do { + if (e = false, !this.preserveMultipleSlashes) { + for (let i = 1; i < t.length - 1; i++) { + let r = t[i]; + i === 1 && r === "" && t[0] === "" || (r === "." || r === "") && (e = true, t.splice(i, 1), i--); } + t[0] === "." && t.length === 2 && (t[1] === "." || t[1] === "") && (e = true, t.pop()); } - } - let end = ""; - if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") { - end = "(?:$|\\/)"; - } - const final2 = start2 + src + end; - return [ - final2, - (0, unescape_js_1.unescape)(src), - 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, (0, unescape_js_1.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, - (0, unescape_js_1.unescape)(body), - this.#hasMagic = !!this.#hasMagic, - this.#uflag - ]; - } - #flatten() { - if (!isExtglobAST(this)) { - for (const p of this.#parts) { - if (typeof p === "object") { - p.#flatten(); + let s = 0; + for (; (s = t.indexOf("..", s + 1)) !== -1; ) { + let i = t[s - 1]; + i && i !== "." && i !== ".." && i !== "**" && (e = true, t.splice(s - 1, 2), s -= 2); } - } - } else { - let iterations = 0; - let done = false; + } while (e); + return t.length === 0 ? [""] : t; + } + firstPhasePreProcess(t) { + let e = 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); + e = false; + for (let s of t) { + let i = -1; + for (; (i = s.indexOf("**", i + 1)) !== -1; ) { + let h = i; + for (; s[h + 1] === "**"; ) h++; + h > i && s.splice(i + 1, h - i); + let o = s[i + 1], a = s[i + 2], l = s[i + 3]; + if (o !== ".." || !a || a === "." || a === ".." || !l || l === "." || l === "..") continue; + e = true, s.splice(i, 1); + let f = s.slice(0); + f[i] = "**", t.push(f), i--; + } + if (!this.preserveMultipleSlashes) { + for (let h = 1; h < s.length - 1; h++) { + let o = s[h]; + h === 1 && o === "" && s[0] === "" || (o === "." || o === "") && (e = true, s.splice(h, 1), h--); + } + s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = true, s.pop()); + } + let r = 0; + for (; (r = s.indexOf("..", r + 1)) !== -1; ) { + let h = s[r - 1]; + if (h && h !== "." && h !== ".." && h !== "**") { + e = true; + let a = r === 1 && s[r + 1] === "**" ? ["."] : []; + s.splice(r - 1, 2, ...a), s.length === 0 && s.push(""), r -= 2; } } } - } while (!done && ++iterations < 10); + } while (e); + return t; } - this.#toString = void 0; - } - #partsToRegExp(dot) { - return this.#parts.map((p) => { - if (typeof p === "string") { - throw new Error("string type in extglob ast??"); - } - const [re, _2, _hasMagic, uflag] = p.toRegExpSource(dot); - this.#uflag = this.#uflag || uflag; - return re; - }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); - } - static #parseGlob(glob2, hasMagic, noEmpty = false) { - let escaping = false; - let re = ""; - let uflag = false; - let inStar = false; - for (let i = 0; i < glob2.length; i++) { - const c = glob2.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? "\\" : "") + c; - continue; - } - if (c === "*") { - if (inStar) - continue; - inStar = true; - re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star; - hasMagic = true; - continue; - } else { - inStar = false; - } - if (c === "\\") { - if (i === glob2.length - 1) { - re += "\\\\"; - } else { - escaping = true; + secondPhasePreProcess(t) { + for (let e = 0; e < t.length - 1; e++) for (let s = e + 1; s < t.length; s++) { + let i = this.partsMatch(t[e], t[s], !this.preserveMultipleSlashes); + if (i) { + t[e] = [], t[s] = i; + break; } - continue; } - if (c === "[") { - const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob2, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; + return t.filter((e) => e.length); + } + partsMatch(t, e, s = false) { + let i = 0, r = 0, h = [], o = ""; + for (; i < t.length && r < e.length; ) if (t[i] === e[r]) h.push(o === "b" ? e[r] : t[i]), i++, r++; + else if (s && t[i] === "**" && e[r] === t[i + 1]) h.push(t[i]), i++; + else if (s && e[r] === "**" && t[i] === e[r + 1]) h.push(e[r]), r++; + else if (t[i] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") { + if (o === "b") return false; + o = "a", h.push(t[i]), i++, r++; + } else if (e[r] === "*" && t[i] && (this.options.dot || !t[i].startsWith(".")) && t[i] !== "**") { + if (o === "a") return false; + o = "b", h.push(e[r]), i++, r++; + } else return false; + return t.length === e.length && h; + } + parseNegate() { + if (this.nonegate) return; + let t = this.pattern, e = false, s = 0; + for (let i = 0; i < t.length && t.charAt(i) === "!"; i++) e = !e, s++; + s && (this.pattern = t.slice(s)), this.negate = e; + } + matchOne(t, e, s = false) { + let i = this.options; + if (this.isWindows) { + let p = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), b = !p && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), w = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), v = !w && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), E = b ? 3 : p ? 0 : void 0, y = v ? 3 : w ? 0 : void 0; + if (typeof E == "number" && typeof y == "number") { + let [S, B] = [t[E], e[y]]; + S.toLowerCase() === B.toLowerCase() && (e[y] = S, y > E ? e = e.slice(y) : E > y && (t = t.slice(E))); + } + } + let { optimizationLevel: r = 1 } = this.options; + r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length); + for (var h = 0, o = 0, a = t.length, l = e.length; h < a && o < l; h++, o++) { + this.debug("matchOne loop"); + var f = e[o], c = t[h]; + if (this.debug(e, f, c), f === false) return false; + if (f === g.GLOBSTAR) { + this.debug("GLOBSTAR", [e, f, c]); + var d = h, u = o + 1; + if (u === l) { + for (this.debug("** at the end"); h < a; h++) if (t[h] === "." || t[h] === ".." || !i.dot && t[h].charAt(0) === ".") return false; + return true; + } + for (; d < a; ) { + var m = t[d]; + if (this.debug(` +globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) return this.debug("globstar found match!", d, a, m), true; + if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") { + this.debug("dot detected!", t, d, e, u); + break; + } + this.debug("globstar swallow a segment, and continue"), d++; + } + return !!(s && (this.debug(` +>>> no match, partial?`, t, d, e, u), d === a)); } + let p; + if (typeof f == "string" ? (p = c === f, this.debug("string match", f, c, p)) : (p = f.test(c), this.debug("pattern match", f, c, p)), !p) return false; } - if (c === "?") { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); + if (h === a && o === l) return true; + if (h === a) return s; + if (o === l) return h === a - 1 && t[h] === ""; + throw new Error("wtf?"); } - return [re, (0, unescape_js_1.unescape)(glob2), !!hasMagic, uflag]; - } - }; - exports2.AST = AST; - _a = AST; - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js -var require_escape = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.escape = void 0; - var escape2 = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => { - if (magicalBraces) { - return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&"); - } - return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"); - }; - exports2.escape = escape2; - } -}); - -// node_modules/glob/node_modules/minimatch/dist/commonjs/index.js -var require_commonjs20 = __commonJS({ - "node_modules/glob/node_modules/minimatch/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = require_commonjs19(); - var assert_valid_pattern_js_1 = require_assert_valid_pattern(); - var ast_js_1 = require_ast(); - var escape_js_1 = require_escape(); - var unescape_js_1 = require_unescape(); - var minimatch = (p, pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - }; - exports2.minimatch = minimatch; - 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 path28 = { - win32: { sep: "\\" }, - posix: { sep: "/" } - }; - exports2.sep = defaultPlatform === "win32" ? path28.win32.sep : path28.posix.sep; - exports2.minimatch.sep = exports2.sep; - exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); - exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var filter = (pattern, options = {}) => (p) => (0, exports2.minimatch)(p, pattern, options); - exports2.filter = filter; - exports2.minimatch.filter = exports2.filter; - var ext = (a, b = {}) => Object.assign({}, a, b); - var defaults = (def) => { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return exports2.minimatch; - } - const orig = exports2.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(type2, parent, options = {}) { - super(type2, parent, ext(def, options)); + braceExpand() { + return (0, g.braceExpand)(this.pattern, this.options); + } + parse(t) { + (0, jt.assertValidPattern)(t); + let e = this.options; + if (t === "**") return g.GLOBSTAR; + if (t === "") return ""; + let s, i = null; + (s = t.match(Fi)) ? i = e.dot ? Ni : ji : (s = t.match(Oi)) ? i = (e.nocase ? e.dot ? Ri : Ci : e.dot ? Ti : xi)(s[1]) : (s = t.match(Li)) ? i = (e.nocase ? e.dot ? Bi : Wi : e.dot ? Ii : Gi)(s) : (s = t.match(Ai)) ? i = e.dot ? Mi : ki : (s = t.match(Pi)) && (i = Di); + let r = is.AST.fromGlob(t, this.options).toMMPattern(); + return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r; + } + makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + let t = this.set; + if (!t.length) return this.regexp = false, this.regexp; + let e = this.options, s = e.noglobstar ? Ui : e.dot ? $i : qi, i = new Set(e.nocase ? ["i"] : []), r = t.map((a) => { + let l = a.map((c) => { + if (c instanceof RegExp) for (let d of c.flags.split("")) i.add(d); + return typeof c == "string" ? Ji(c) : c === g.GLOBSTAR ? g.GLOBSTAR : c._src; + }); + l.forEach((c, d) => { + let u = l[d + 1], m = l[d - 1]; + c !== g.GLOBSTAR || m === g.GLOBSTAR || (m === void 0 ? u !== void 0 && u !== g.GLOBSTAR ? l[d + 1] = "(?:\\/|" + s + "\\/)?" + u : l[d] = s : u === void 0 ? l[d - 1] = m + "(?:\\/|\\/" + s + ")?" : u !== g.GLOBSTAR && (l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + u, l[d + 1] = g.GLOBSTAR)); + }); + let f = l.filter((c) => c !== g.GLOBSTAR); + if (this.partial && f.length >= 1) { + let c = []; + for (let d = 1; d <= f.length; d++) c.push(f.slice(0, d).join("/")); + return "(?:" + c.join("|") + ")"; + } + return f.join("/"); + }).join("|"), [h, o] = t.length > 1 ? ["(?:", ")"] : ["", ""]; + r = "^" + h + r + o + "$", this.partial && (r = "^(?:\\/|" + h + r.slice(1, -1) + o + ")$"), this.negate && (r = "^(?!" + r + ").+$"); + try { + this.regexp = new RegExp(r, [...i].join("")); + } catch { + this.regexp = false; } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); + return this.regexp; + } + slashSplit(t) { + return this.preserveMultipleSlashes ? t.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t) ? ["", ...t.split(/\/+/)] : t.split(/\/+/); + } + match(t, e = this.partial) { + if (this.debug("match", t, this.pattern), this.comment) return false; + if (this.empty) return t === ""; + if (t === "/" && e) return true; + let s = this.options; + this.isWindows && (t = t.split("\\").join("/")); + let i = this.slashSplit(t); + this.debug(this.pattern, "split", i); + let r = this.set; + this.debug(this.pattern, "set", r); + let h = i[i.length - 1]; + if (!h) for (let o = i.length - 2; !h && o >= 0; o--) h = i[o]; + for (let o = 0; o < r.length; o++) { + let a = r[o], l = i; + if (s.matchBase && a.length === 1 && (l = [h]), this.matchOne(l, a, e)) return s.flipNegate ? true : !this.negate; + } + return s.flipNegate ? false : this.negate; + } + static defaults(t) { + return g.minimatch.defaults(t).Minimatch; + } + }; + g.Minimatch = J; + var Zi = pe(); + Object.defineProperty(g, "AST", { enumerable: true, get: function() { + return Zi.AST; + } }); + var Qi = me(); + Object.defineProperty(g, "escape", { enumerable: true, get: function() { + return Qi.escape; + } }); + var tr = kt(); + Object.defineProperty(g, "unescape", { enumerable: true, get: function() { + return tr.unescape; + } }); + g.minimatch.AST = is.AST; + g.minimatch.Minimatch = J; + g.minimatch.escape = vi.escape; + g.minimatch.unescape = Ei.unescape; + }); + var fs31 = R((Wt) => { + "use strict"; + Object.defineProperty(Wt, "__esModule", { value: true }); + Wt.LRUCache = void 0; + var er = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, as = /* @__PURE__ */ new Set(), ge = typeof process == "object" && process ? process : {}, ls = (n, t, e, s) => { + typeof ge.emitWarning == "function" ? ge.emitWarning(n, t, e, s) : console.error(`[${e}] ${t}: ${n}`); + }, Lt = globalThis.AbortController, os7 = globalThis.AbortSignal; + if (typeof Lt > "u") { + os7 = class { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(e, s) { + this._onabort.push(s); + } + }, Lt = class { + constructor() { + t(); + } + signal = new os7(); + abort(e) { + if (!this.signal.aborted) { + this.signal.reason = e, this.signal.aborted = true; + for (let s of this.signal._onabort) s(e); + this.signal.onabort?.(e); + } } - }, - 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: exports2.GLOBSTAR - }); - }; - exports2.defaults = defaults; - exports2.minimatch.defaults = exports2.defaults; - var braceExpand = (pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax }); - }; - exports2.braceExpand = braceExpand; - exports2.minimatch.braceExpand = exports2.braceExpand; - var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); - exports2.makeRe = makeRe; - exports2.minimatch.makeRe = exports2.makeRe; - var match = (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); + }; + let n = ge.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => { + n && (n = false, ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t)); + }; } - return list; - }; - exports2.match = match; - exports2.minimatch.match = exports2.match; - var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; - var regExpEscape = (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 = {}) { - (0, assert_valid_pattern_js_1.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, "/"); + var sr = (n) => !as.has(n), V = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n), cs = (n) => V(n) ? n <= Math.pow(2, 8) ? Uint8Array : n <= Math.pow(2, 16) ? Uint16Array : n <= Math.pow(2, 32) ? Uint32Array : n <= Number.MAX_SAFE_INTEGER ? Nt : null : null, Nt = class extends Array { + constructor(n) { + super(n), this.fill(0); } - 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; + }, ir = class at { + heap; + length; + static #t = false; + static create(t) { + let e = cs(t); + if (!e) return []; + at.#t = true; + let s = new at(t, e); + return at.#t = false, s; } - for (const pattern of this.set) { - for (const part of pattern) { - if (typeof part !== "string") - return true; - } + constructor(t, e) { + if (!at.#t) throw new TypeError("instantiate Stack using Stack.create(n)"); + this.heap = new e(t), this.length = 0; } - return false; - } - debug(..._2) { - } - make() { - const pattern = this.pattern; - const options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; + push(t) { + this.heap[this.length++] = t; } - if (!pattern) { - this.empty = true; - return; + pop() { + return this.heap[--this.length]; + } + }, rr = class us { + #t; + #s; + #n; + #r; + #h; + #S; + #w; + #c; + get perf() { + return this.#c; + } + ttl; + ttlResolution; + ttlAutopurge; + updateAgeOnGet; + updateAgeOnHas; + allowStale; + noDisposeOnSet; + noUpdateTTL; + maxEntrySize; + sizeCalculation; + noDeleteOnFetchRejection; + noDeleteOnStaleGet; + allowStaleOnFetchAbort; + allowStaleOnFetchRejection; + ignoreFetchAbort; + #o; + #f; + #u; + #a; + #i; + #d; + #v; + #y; + #p; + #R; + #m; + #O; + #x; + #g; + #b; + #E; + #T; + #e; + #F; + static unsafeExposeInternals(t) { + return { starts: t.#x, ttls: t.#g, autopurgeTimers: t.#b, sizes: t.#O, keyMap: t.#u, keyList: t.#a, valList: t.#i, next: t.#d, prev: t.#v, get head() { + return t.#y; + }, get tail() { + return t.#p; + }, free: t.#R, isBackgroundFetch: (e) => t.#l(e), backgroundFetch: (e, s, i, r) => t.#z(e, s, i, r), moveToTail: (e) => t.#N(e), indexes: (e) => t.#k(e), rindexes: (e) => t.#M(e), isStale: (e) => t.#_(e) }; + } + get max() { + return this.#t; + } + get maxSize() { + return this.#s; + } + get calculatedSize() { + return this.#f; } - this.parseNegate(); - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - const rawGlobParts = this.globSet.map((s) => this.slashSplit(s)); - this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); - let set2 = this.globParts.map((s, _2, __) => { - if (this.isWindows && this.windowsNoMagicRoot) { - const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); - 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, set2); - this.set = set2.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] = "?"; + get size() { + return this.#o; + } + get fetchMethod() { + return this.#S; + } + get memoMethod() { + return this.#w; + } + get dispose() { + return this.#n; + } + get onInsert() { + return this.#r; + } + get disposeAfter() { + return this.#h; + } + constructor(t) { + let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: h, updateAgeOnHas: o, allowStale: a, dispose: l, onInsert: f, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: u, maxSize: m = 0, maxEntrySize: p = 0, sizeCalculation: b, fetchMethod: w, memoMethod: v, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: S, allowStaleOnFetchAbort: B, ignoreFetchAbort: U, perf: et } = t; + if (et !== void 0 && typeof et?.now != "function") throw new TypeError("perf option must have a now() method if specified"); + if (this.#c = et ?? er, e !== 0 && !V(e)) throw new TypeError("max option must be a nonnegative integer"); + let st = e ? cs(e) : Array; + if (!st) throw new Error("invalid max value: " + e); + if (this.#t = e, this.#s = m, this.maxEntrySize = p || this.#s, this.sizeCalculation = b, this.sizeCalculation) { + if (!this.#s && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize"); + if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function"); + } + if (v !== void 0 && typeof v != "function") throw new TypeError("memoMethod must be a function if defined"); + if (this.#w = v, w !== void 0 && typeof w != "function") throw new TypeError("fetchMethod must be a function if specified"); + if (this.#S = w, this.#T = !!w, this.#u = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new st(e), this.#v = new st(e), this.#y = 0, this.#p = 0, this.#R = ir.create(e), this.#o = 0, this.#f = 0, typeof l == "function" && (this.#n = l), typeof f == "function" && (this.#r = f), typeof c == "function" ? (this.#h = c, this.#m = []) : (this.#h = void 0, this.#m = void 0), this.#E = !!this.#n, this.#F = !!this.#r, this.#e = !!this.#h, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!u, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!S, this.allowStaleOnFetchAbort = !!B, this.ignoreFetchAbort = !!U, this.maxEntrySize !== 0) { + if (this.#s !== 0 && !V(this.#s)) throw new TypeError("maxSize must be a positive integer if specified"); + if (!V(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified"); + this.#$(); + } + if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!h, this.updateAgeOnHas = !!o, this.ttlResolution = V(i) || i === 0 ? i : 1, this.ttlAutopurge = !!r, this.ttl = s || 0, this.ttl) { + if (!V(this.ttl)) throw new TypeError("ttl must be a positive integer if specified"); + this.#P(); + } + if (this.#t === 0 && this.ttl === 0 && this.#s === 0) throw new TypeError("At least one of max, maxSize, or ttl is required"); + if (!this.ttlAutopurge && !this.#t && !this.#s) { + let le = "LRU_CACHE_UNBOUNDED"; + sr(le) && (as.add(le), ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", le, us)); + } + } + getRemainingTTL(t) { + return this.#u.has(t) ? 1 / 0 : 0; + } + #P() { + let t = new Nt(this.#t), e = new Nt(this.#t); + this.#g = t, this.#x = e; + let s = this.ttlAutopurge ? new Array(this.#t) : void 0; + this.#b = s, this.#W = (h, o, a = this.#c.now()) => { + if (e[h] = o !== 0 ? a : 0, t[h] = o, s?.[h] && (clearTimeout(s[h]), s[h] = void 0), o !== 0 && s) { + let l = setTimeout(() => { + this.#_(h) && this.#A(this.#a[h], "expire"); + }, o + 1); + l.unref && l.unref(), s[h] = l; + } + }, this.#C = (h) => { + e[h] = t[h] !== 0 ? this.#c.now() : 0; + }, this.#D = (h, o) => { + if (t[o]) { + let a = t[o], l = e[o]; + if (!a || !l) return; + h.ttl = a, h.start = l, h.now = i || r(); + let f = h.now - l; + h.remainingTTL = a - f; } - } + }; + let i = 0, r = () => { + let h = this.#c.now(); + if (this.ttlResolution > 0) { + i = h; + let o = setTimeout(() => i = 0, this.ttlResolution); + o.unref && o.unref(); + } + return h; + }; + this.getRemainingTTL = (h) => { + let o = this.#u.get(h); + if (o === void 0) return 0; + let a = t[o], l = e[o]; + if (!a || !l) return 1 / 0; + let f = (i || r()) - l; + return a - f; + }, this.#_ = (h) => { + let o = e[h], a = t[h]; + return !!a && !!o && (i || r()) - o > a; + }; } - 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 (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === "**") { - globParts[i][j] = "*"; - } + #C = () => { + }; + #D = () => { + }; + #W = () => { + }; + #_ = () => false; + #$() { + let t = new Nt(this.#t); + this.#f = 0, this.#O = t, this.#L = (e) => { + this.#f -= t[e], t[e] = 0; + }, this.#B = (e, s, i, r) => { + if (this.#l(s)) return 0; + if (!V(i)) if (r) { + if (typeof r != "function") throw new TypeError("sizeCalculation must be a function"); + if (i = r(s, e), !V(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)"); + } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set."); + return i; + }, this.#j = (e, s, i) => { + if (t[e] = s, this.#s) { + let r = this.#s - t[e]; + for (; this.#f > r; ) this.#G(true); } - } + this.#f += t[e], i && (i.entrySize = s, i.totalCalculatedSize = this.#f); + }; } - 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); + #L = (t) => { + }; + #j = (t, e, s) => { + }; + #B = (t, e, s, i) => { + if (s || i) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache"); + return 0; + }; + *#k({ allowStale: t = this.allowStale } = {}) { + if (this.#o) for (let e = this.#p; !(!this.#I(e) || ((t || !this.#_(e)) && (yield e), e === this.#y)); ) e = this.#v[e]; } - 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((set2, part) => { - const prev = set2[set2.length - 1]; - if (part === "**" && prev === "**") { - return set2; - } - if (part === "..") { - if (prev && prev !== ".." && prev !== "." && prev !== "**") { - set2.pop(); - return set2; - } - } - set2.push(part); - return set2; - }, []); - return parts.length === 0 ? [""] : parts; - }); - } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); + *#M({ allowStale: t = this.allowStale } = {}) { + if (this.#o) for (let e = this.#y; !(!this.#I(e) || ((t || !this.#_(e)) && (yield e), e === this.#p)); ) e = this.#d[e]; } - 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(); - } + #I(t) { + return t !== void 0 && this.#u.get(this.#a[t]) === t; + } + *entries() { + for (let t of this.#k()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]); + } + *rentries() { + for (let t of this.#M()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]); + } + *keys() { + for (let t of this.#k()) { + let e = this.#a[t]; + e !== void 0 && !this.#l(this.#i[t]) && (yield e); } - let dd = 0; - while (-1 !== (dd = parts.indexOf("..", dd + 1))) { - const p = parts[dd - 1]; - if (p && p !== "." && p !== ".." && p !== "**") { - didSomething = true; - parts.splice(dd - 1, 2); - dd -= 2; - } + } + *rkeys() { + for (let t of this.#M()) { + let e = this.#a[t]; + e !== void 0 && !this.#l(this.#i[t]) && (yield e); } - } 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;
-              }
-            }
+        }
+        *values() {
+          for (let t of this.#k()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
+        }
+        *rvalues() {
+          for (let t of this.#M()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
+        }
+        [Symbol.iterator]() {
+          return this.entries();
+        }
+        [Symbol.toStringTag] = "LRUCache";
+        find(t, e = {}) {
+          for (let s of this.#k()) {
+            let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
+            if (r !== void 0 && t(r, this.#a[s], this)) return this.get(this.#a[s], e);
           }
-        } 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;
-            }
+        }
+        forEach(t, e = this) {
+          for (let s of this.#k()) {
+            let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
+            r !== void 0 && t.call(e, r, this.#a[s], this);
           }
         }
-        return globParts.filter((gs) => gs.length);
-      }
-      partsMatch(a, b, emptyGSMatch = false) {
-        let ai = 0;
-        let bi = 0;
-        let result = [];
-        let which9 = "";
-        while (ai < a.length && bi < b.length) {
-          if (a[ai] === b[bi]) {
-            result.push(which9 === "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 (which9 === "b")
-              return false;
-            which9 = "a";
-            result.push(a[ai]);
-            ai++;
-            bi++;
-          } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
-            if (which9 === "a")
-              return false;
-            which9 = "b";
-            result.push(b[bi]);
-            ai++;
-            bi++;
-          } else {
-            return false;
+        rforEach(t, e = this) {
+          for (let s of this.#M()) {
+            let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
+            r !== void 0 && t.call(e, r, this.#a[s], this);
           }
         }
-        return a.length === b.length && result;
-      }
-      parseNegate() {
-        if (this.nonegate)
-          return;
-        const pattern = this.pattern;
-        let negate2 = false;
-        let negateOffset = 0;
-        for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
-          negate2 = !negate2;
-          negateOffset++;
+        purgeStale() {
+          let t = false;
+          for (let e of this.#M({ allowStale: true })) this.#_(e) && (this.#A(this.#a[e], "expire"), t = true);
+          return t;
         }
-        if (negateOffset)
-          this.pattern = pattern.slice(negateOffset);
-        this.negate = negate2;
-      }
-      // set partial to true to test if, for example,
-      // "/a/b" matches the start of "/*/b/*/d"
-      // Partial means, if you run out of file before you run
-      // out of pattern, then that's fine, as long as all
-      // the parts match.
-      matchOne(file, pattern, partial = false) {
-        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;
+        info(t) {
+          let e = this.#u.get(t);
+          if (e === void 0) return;
+          let s = this.#i[e], i = this.#l(s) ? s.__staleWhileFetching : s;
+          if (i === void 0) return;
+          let r = { value: i };
+          if (this.#g && this.#x) {
+            let h = this.#g[e], o = this.#x[e];
+            if (h && o) {
+              let a = h - (this.#c.now() - o);
+              r.ttl = a, r.start = Date.now();
             }
           }
+          return this.#O && (r.size = this.#O[e]), r;
         }
-        const { optimizationLevel = 1 } = this.options;
-        if (optimizationLevel >= 2) {
-          file = this.levelTwoFileOptimize(file);
+        dump() {
+          let t = [];
+          for (let e of this.#k({ allowStale: true })) {
+            let s = this.#a[e], i = this.#i[e], r = this.#l(i) ? i.__staleWhileFetching : i;
+            if (r === void 0 || s === void 0) continue;
+            let h = { value: r };
+            if (this.#g && this.#x) {
+              h.ttl = this.#g[e];
+              let o = this.#c.now() - this.#x[e];
+              h.start = Math.floor(Date.now() - o);
+            }
+            this.#O && (h.size = this.#O[e]), t.unshift([s, h]);
+          }
+          return t;
         }
-        if (pattern.includes(exports2.GLOBSTAR)) {
-          return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
+        load(t) {
+          this.clear();
+          for (let [e, s] of t) {
+            if (s.start) {
+              let i = Date.now() - s.start;
+              s.start = this.#c.now() - i;
+            }
+            this.set(e, s.value, s);
+          }
         }
-        return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
-      }
-      #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
-        const firstgs = pattern.indexOf(exports2.GLOBSTAR, patternIndex);
-        const lastgs = pattern.lastIndexOf(exports2.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;
+        set(t, e, s = {}) {
+          if (e === void 0) return this.delete(t), this;
+          let { ttl: i = this.ttl, start: r, noDisposeOnSet: h = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, f = this.#B(t, e, s.size || 0, o);
+          if (this.maxEntrySize && f > this.maxEntrySize) return a && (a.set = "miss", a.maxEntrySizeExceeded = true), this.#A(t, "set"), this;
+          let c = this.#o === 0 ? void 0 : this.#u.get(t);
+          if (c === void 0) c = this.#o === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#o === this.#t ? this.#G(false) : this.#o, this.#a[c] = t, this.#i[c] = e, this.#u.set(t, c), this.#d[this.#p] = c, this.#v[c] = this.#p, this.#p = c, this.#o++, this.#j(c, f, a), a && (a.set = "add"), l = false, this.#F && this.#r?.(e, t, "add");
+          else {
+            this.#N(c);
+            let d = this.#i[c];
+            if (e !== d) {
+              if (this.#T && this.#l(d)) {
+                d.__abortController.abort(new Error("replaced"));
+                let { __staleWhileFetching: u } = d;
+                u !== void 0 && !h && (this.#E && this.#n?.(u, t, "set"), this.#e && this.#m?.push([u, t, "set"]));
+              } else h || (this.#E && this.#n?.(d, t, "set"), this.#e && this.#m?.push([d, t, "set"]));
+              if (this.#L(c), this.#j(c, f, a), this.#i[c] = e, a) {
+                a.set = "replace";
+                let u = d && this.#l(d) ? d.__staleWhileFetching : d;
+                u !== void 0 && (a.oldValue = u);
+              }
+            } else a && (a.set = "update");
+            this.#F && this.onInsert?.(e, t, e === d ? "update" : "replace");
+          }
+          if (i !== 0 && !this.#g && this.#P(), this.#g && (l || this.#W(c, i, r), a && this.#D(a, c)), !h && this.#e && this.#m) {
+            let d = this.#m, u;
+            for (; u = d?.shift(); ) this.#h?.(...u);
           }
-          fileIndex += head.length;
-          patternIndex += head.length;
+          return this;
         }
-        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;
+        pop() {
+          try {
+            for (; this.#o; ) {
+              let t = this.#i[this.#y];
+              if (this.#G(true), this.#l(t)) {
+                if (t.__staleWhileFetching) return t.__staleWhileFetching;
+              } else if (t !== void 0) return t;
             }
-            tailStart--;
-            if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
-              return false;
+          } finally {
+            if (this.#e && this.#m) {
+              let t = this.#m, e;
+              for (; e = t?.shift(); ) this.#h?.(...e);
             }
-            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;
+        #G(t) {
+          let e = this.#y, s = this.#a[e], i = this.#i[e];
+          return this.#T && this.#l(i) ? i.__abortController.abort(new Error("evicted")) : (this.#E || this.#e) && (this.#E && this.#n?.(i, s, "evict"), this.#e && this.#m?.push([i, s, "evict"])), this.#L(e), this.#b?.[e] && (clearTimeout(this.#b[e]), this.#b[e] = void 0), t && (this.#a[e] = void 0, this.#i[e] = void 0, this.#R.push(e)), this.#o === 1 ? (this.#y = this.#p = 0, this.#R.length = 0) : this.#y = this.#d[e], this.#u.delete(s), this.#o--, e;
         }
-        const bodySegments = [[[], 0]];
-        let currentBody = bodySegments[0];
-        let nonGsParts = 0;
-        const nonGsPartsSums = [0];
-        for (const b of body) {
-          if (b === exports2.GLOBSTAR) {
-            nonGsPartsSums.push(nonGsParts);
-            currentBody = [[], 0];
-            bodySegments.push(currentBody);
+        has(t, e = {}) {
+          let { updateAgeOnHas: s = this.updateAgeOnHas, status: i } = e, r = this.#u.get(t);
+          if (r !== void 0) {
+            let h = this.#i[r];
+            if (this.#l(h) && h.__staleWhileFetching === void 0) return false;
+            if (this.#_(r)) i && (i.has = "stale", this.#D(i, r));
+            else return s && this.#C(r), i && (i.has = "hit", this.#D(i, r)), true;
+          } else i && (i.has = "miss");
+          return false;
+        }
+        peek(t, e = {}) {
+          let { allowStale: s = this.allowStale } = e, i = this.#u.get(t);
+          if (i === void 0 || !s && this.#_(i)) return;
+          let r = this.#i[i];
+          return this.#l(r) ? r.__staleWhileFetching : r;
+        }
+        #z(t, e, s, i) {
+          let r = e === void 0 ? void 0 : this.#i[e];
+          if (this.#l(r)) return r;
+          let h = new Lt(), { signal: o } = s;
+          o?.addEventListener("abort", () => h.abort(o.reason), { signal: h.signal });
+          let a = { signal: h.signal, options: s, context: i }, l = (p, b = false) => {
+            let { aborted: w } = h.signal, v = s.ignoreFetchAbort && p !== void 0, E = s.ignoreFetchAbort || !!(s.allowStaleOnFetchAbort && p !== void 0);
+            if (s.status && (w && !b ? (s.status.fetchAborted = true, s.status.fetchError = h.signal.reason, v && (s.status.fetchAbortIgnored = true)) : s.status.fetchResolved = true), w && !v && !b) return c(h.signal.reason, E);
+            let y = u, S = this.#i[e];
+            return (S === u || v && b && S === void 0) && (p === void 0 ? y.__staleWhileFetching !== void 0 ? this.#i[e] = y.__staleWhileFetching : this.#A(t, "fetch") : (s.status && (s.status.fetchUpdated = true), this.set(t, p, a.options))), p;
+          }, f = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, b) => {
+            let { aborted: w } = h.signal, v = w && s.allowStaleOnFetchAbort, E = v || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, S = u;
+            if (this.#i[e] === u && (!y || !b && S.__staleWhileFetching === void 0 ? this.#A(t, "fetch") : v || (this.#i[e] = S.__staleWhileFetching)), E) return s.status && S.__staleWhileFetching !== void 0 && (s.status.returnedStale = true), S.__staleWhileFetching;
+            if (S.__returned === S) throw p;
+          }, d = (p, b) => {
+            let w = this.#S?.(t, r, a);
+            w && w instanceof Promise && w.then((v) => p(v === void 0 ? void 0 : v), b), h.signal.addEventListener("abort", () => {
+              (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && (p(void 0), s.allowStaleOnFetchAbort && (p = (v) => l(v, true)));
+            });
+          };
+          s.status && (s.status.fetchDispatched = true);
+          let u = new Promise(d).then(l, f), m = Object.assign(u, { __abortController: h, __staleWhileFetching: r, __returned: void 0 });
+          return e === void 0 ? (this.set(t, m, { ...a.options, status: void 0 }), e = this.#u.get(t)) : this.#i[e] = m, m;
+        }
+        #l(t) {
+          if (!this.#T) return false;
+          let e = t;
+          return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof Lt;
+        }
+        async fetch(t, e = {}) {
+          let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: h = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: f = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p, forceRefresh: b = false, status: w, signal: v } = e;
+          if (!this.#T) return w && (w.fetch = "get"), this.get(t, { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, status: w });
+          let E = { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: h, noDisposeOnSet: o, size: a, sizeCalculation: l, noUpdateTTL: f, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: m, ignoreFetchAbort: u, status: w, signal: v }, y = this.#u.get(t);
+          if (y === void 0) {
+            w && (w.fetch = "miss");
+            let S = this.#z(t, y, E, p);
+            return S.__returned = S;
           } else {
-            currentBody[0].push(b);
-            nonGsParts++;
+            let S = this.#i[y];
+            if (this.#l(S)) {
+              let st = s && S.__staleWhileFetching !== void 0;
+              return w && (w.fetch = "inflight", st && (w.returnedStale = true)), st ? S.__staleWhileFetching : S.__returned = S;
+            }
+            let B = this.#_(y);
+            if (!b && !B) return w && (w.fetch = "hit"), this.#N(y), i && this.#C(y), w && this.#D(w, y), S;
+            let U = this.#z(t, y, E, p), et = U.__staleWhileFetching !== void 0 && s;
+            return w && (w.fetch = B ? "stale" : "refresh", et && B && (w.returnedStale = true)), et ? U.__staleWhileFetching : U.__returned = U;
           }
         }
-        let i = bodySegments.length - 1;
-        const fileLength = file.length - fileTailMatch;
-        for (const b of bodySegments) {
-          b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
+        async forceFetch(t, e = {}) {
+          let s = await this.fetch(t, e);
+          if (s === void 0) throw new Error("fetch() returned undefined");
+          return s;
         }
-        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;
+        memo(t, e = {}) {
+          let s = this.#w;
+          if (!s) throw new Error("no memoMethod provided to constructor");
+          let { context: i, forceRefresh: r, ...h } = e, o = this.get(t, h);
+          if (!r && o !== void 0) return o;
+          let a = s(t, o, { options: h, context: i });
+          return this.set(t, a, h), a;
+        }
+        get(t, e = {}) {
+          let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, status: h } = e, o = this.#u.get(t);
+          if (o !== void 0) {
+            let a = this.#i[o], l = this.#l(a);
+            return h && this.#D(h, o), this.#_(o) ? (h && (h.get = "stale"), l ? (h && s && a.__staleWhileFetching !== void 0 && (h.returnedStale = true), s ? a.__staleWhileFetching : void 0) : (r || this.#A(t, "expire"), h && s && (h.returnedStale = true), s ? a : void 0)) : (h && (h.get = "hit"), l ? a.__staleWhileFetching : (this.#N(o), i && this.#C(o), a));
+          } else h && (h.get = "miss");
+        }
+        #U(t, e) {
+          this.#v[e] = t, this.#d[t] = e;
+        }
+        #N(t) {
+          t !== this.#p && (t === this.#y ? this.#y = this.#d[t] : this.#U(this.#v[t], this.#d[t]), this.#U(this.#p, t), this.#p = t);
+        }
+        delete(t) {
+          return this.#A(t, "delete");
+        }
+        #A(t, e) {
+          let s = false;
+          if (this.#o !== 0) {
+            let i = this.#u.get(t);
+            if (i !== void 0) if (this.#b?.[i] && (clearTimeout(this.#b?.[i]), this.#b[i] = void 0), s = true, this.#o === 1) this.#q(e);
+            else {
+              this.#L(i);
+              let r = this.#i[i];
+              if (this.#l(r) ? r.__abortController.abort(new Error("deleted")) : (this.#E || this.#e) && (this.#E && this.#n?.(r, t, e), this.#e && this.#m?.push([r, t, e])), this.#u.delete(t), this.#a[i] = void 0, this.#i[i] = void 0, i === this.#p) this.#p = this.#v[i];
+              else if (i === this.#y) this.#y = this.#d[i];
+              else {
+                let h = this.#v[i];
+                this.#d[h] = this.#d[i];
+                let o = this.#d[i];
+                this.#v[o] = this.#v[i];
+              }
+              this.#o--, this.#R.push(i);
             }
           }
-          return sawTail;
+          if (this.#e && this.#m?.length) {
+            let i = this.#m, r;
+            for (; r = i?.shift(); ) this.#h?.(...r);
+          }
+          return s;
         }
-        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;
+        clear() {
+          return this.#q("delete");
+        }
+        #q(t) {
+          for (let e of this.#M({ allowStale: true })) {
+            let s = this.#i[e];
+            if (this.#l(s)) s.__abortController.abort(new Error("deleted"));
+            else {
+              let i = this.#a[e];
+              this.#E && this.#n?.(s, i, t), this.#e && this.#m?.push([s, i, t]);
             }
           }
-          const f = file[fileIndex];
-          if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
-            return false;
+          if (this.#u.clear(), this.#i.fill(void 0), this.#a.fill(void 0), this.#g && this.#x) {
+            this.#g.fill(0), this.#x.fill(0);
+            for (let e of this.#b ?? []) e !== void 0 && clearTimeout(e);
+            this.#b?.fill(void 0);
           }
-          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 === exports2.GLOBSTAR) {
-            return false;
+          if (this.#O && this.#O.fill(0), this.#y = 0, this.#p = 0, this.#R.length = 0, this.#f = 0, this.#o = 0, this.#e && this.#m) {
+            let e = this.#m, s;
+            for (; s = e?.shift(); ) this.#h?.(...s);
           }
-          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);
+        }
+      };
+      Wt.LRUCache = rr;
+    });
+    var Oe = R((P) => {
+      "use strict";
+      var nr = P && P.__importDefault || function(n) {
+        return n && n.__esModule ? n : { default: n };
+      };
+      Object.defineProperty(P, "__esModule", { value: true });
+      P.Minipass = P.isWritable = P.isReadable = P.isStream = void 0;
+      var ds = typeof process == "object" && process ? process : { stdout: null, stderr: null }, _e = require("node:events"), ws = nr(require("node:stream")), hr = require("node:string_decoder"), or2 = (n) => !!n && typeof n == "object" && (n instanceof qt || n instanceof ws.default || (0, P.isReadable)(n) || (0, P.isWritable)(n));
+      P.isStream = or2;
+      var ar = (n) => !!n && typeof n == "object" && n instanceof _e.EventEmitter && typeof n.pipe == "function" && n.pipe !== ws.default.Writable.prototype.pipe;
+      P.isReadable = ar;
+      var lr = (n) => !!n && typeof n == "object" && n instanceof _e.EventEmitter && typeof n.write == "function" && typeof n.end == "function";
+      P.isWritable = lr;
+      var $ = /* @__PURE__ */ Symbol("EOF"), q = /* @__PURE__ */ Symbol("maybeEmitEnd"), K = /* @__PURE__ */ Symbol("emittedEnd"), Bt = /* @__PURE__ */ Symbol("emittingEnd"), lt2 = /* @__PURE__ */ Symbol("emittedError"), It = /* @__PURE__ */ Symbol("closed"), ps = /* @__PURE__ */ Symbol("read"), Gt = /* @__PURE__ */ Symbol("flush"), ms = /* @__PURE__ */ Symbol("flushChunk"), L = /* @__PURE__ */ Symbol("encoding"), rt = /* @__PURE__ */ Symbol("decoder"), x = /* @__PURE__ */ Symbol("flowing"), ct = /* @__PURE__ */ Symbol("paused"), nt = /* @__PURE__ */ Symbol("resume"), T = /* @__PURE__ */ Symbol("buffer"), M = /* @__PURE__ */ Symbol("pipes"), C = /* @__PURE__ */ Symbol("bufferLength"), we = /* @__PURE__ */ Symbol("bufferPush"), zt = /* @__PURE__ */ Symbol("bufferShift"), k = /* @__PURE__ */ Symbol("objectMode"), O = /* @__PURE__ */ Symbol("destroyed"), be = /* @__PURE__ */ Symbol("error"), ye = /* @__PURE__ */ Symbol("emitData"), gs = /* @__PURE__ */ Symbol("emitEnd"), Se = /* @__PURE__ */ Symbol("emitEnd2"), I = /* @__PURE__ */ Symbol("async"), ve = /* @__PURE__ */ Symbol("abort"), Ut = /* @__PURE__ */ Symbol("aborted"), ut = /* @__PURE__ */ Symbol("signal"), Z = /* @__PURE__ */ Symbol("dataListeners"), D = /* @__PURE__ */ Symbol("discarded"), ft = (n) => Promise.resolve().then(n), cr2 = (n) => n(), ur = (n) => n === "end" || n === "finish" || n === "prefinish", fr = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0, dr = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n), $t = class {
+        src;
+        dest;
+        opts;
+        ondrain;
+        constructor(t, e, s) {
+          this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[nt](), this.dest.on("drain", this.ondrain);
+        }
+        unpipe() {
+          this.dest.removeListener("drain", this.ondrain);
+        }
+        proxyErrors(t) {
+        }
+        end() {
+          this.unpipe(), this.opts.end && this.dest.end();
+        }
+      }, Ee = class extends $t {
+        unpipe() {
+          this.src.removeListener("error", this.proxyErrors), super.unpipe();
+        }
+        constructor(t, e, s) {
+          super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
+        }
+      }, pr = (n) => !!n.objectMode, mr = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer", qt = class extends _e.EventEmitter {
+        [x] = false;
+        [ct] = false;
+        [M] = [];
+        [T] = [];
+        [k];
+        [L];
+        [I];
+        [rt];
+        [$] = false;
+        [K] = false;
+        [Bt] = false;
+        [It] = false;
+        [lt2] = null;
+        [C] = 0;
+        [O] = false;
+        [ut];
+        [Ut] = false;
+        [Z] = 0;
+        [D] = false;
+        writable = true;
+        readable = true;
+        constructor(...t) {
+          let e = t[0] || {};
+          if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
+          pr(e) ? (this[k] = true, this[L] = null) : mr(e) ? (this[L] = e.encoding, this[k] = false) : (this[k] = false, this[L] = null), this[I] = !!e.async, this[rt] = this[L] ? new hr.StringDecoder(this[L]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[T] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[M] });
+          let { signal: s } = e;
+          s && (this[ut] = s, s.aborted ? this[ve]() : s.addEventListener("abort", () => this[ve]()));
+        }
+        get bufferLength() {
+          return this[C];
+        }
+        get encoding() {
+          return this[L];
+        }
+        set encoding(t) {
+          throw new Error("Encoding must be set at instantiation time");
+        }
+        setEncoding(t) {
+          throw new Error("Encoding must be set at instantiation time");
+        }
+        get objectMode() {
+          return this[k];
+        }
+        set objectMode(t) {
+          throw new Error("objectMode must be set at instantiation time");
+        }
+        get async() {
+          return this[I];
+        }
+        set async(t) {
+          this[I] = this[I] || !!t;
+        }
+        [ve]() {
+          this[Ut] = true, this.emit("abort", this[ut]?.reason), this.destroy(this[ut]?.reason);
+        }
+        get aborted() {
+          return this[Ut];
+        }
+        set aborted(t) {
+        }
+        write(t, e, s) {
+          if (this[Ut]) return false;
+          if (this[$]) throw new Error("write after end");
+          if (this[O]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
+          typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
+          let i = this[I] ? ft : cr2;
+          if (!this[k] && !Buffer.isBuffer(t)) {
+            if (dr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
+            else if (fr(t)) t = Buffer.from(t);
+            else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
+          }
+          return this[k] ? (this[x] && this[C] !== 0 && this[Gt](true), this[x] ? this.emit("data", t) : this[we](t), this[C] !== 0 && this.emit("readable"), s && i(s), this[x]) : t.length ? (typeof t == "string" && !(e === this[L] && !this[rt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[L] && (t = this[rt].write(t)), this[x] && this[C] !== 0 && this[Gt](true), this[x] ? this.emit("data", t) : this[we](t), this[C] !== 0 && this.emit("readable"), s && i(s), this[x]) : (this[C] !== 0 && this.emit("readable"), s && i(s), this[x]);
+        }
+        read(t) {
+          if (this[O]) return null;
+          if (this[D] = false, this[C] === 0 || t === 0 || t && t > this[C]) return this[q](), null;
+          this[k] && (t = null), this[T].length > 1 && !this[k] && (this[T] = [this[L] ? this[T].join("") : Buffer.concat(this[T], this[C])]);
+          let e = this[ps](t || null, this[T][0]);
+          return this[q](), e;
+        }
+        [ps](t, e) {
+          if (this[k]) this[zt]();
+          else {
+            let s = e;
+            t === s.length || t === null ? this[zt]() : typeof s == "string" ? (this[T][0] = s.slice(t), e = s.slice(0, t), this[C] -= t) : (this[T][0] = s.subarray(t), e = s.subarray(0, t), this[C] -= t);
           }
-          if (!hit)
-            return false;
+          return this.emit("data", e), !this[T].length && !this[$] && this.emit("drain"), e;
         }
-        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?");
+        end(t, e, s) {
+          return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[$] = true, this.writable = false, (this[x] || !this[ct]) && this[q](), this;
         }
-      }
-      braceExpand() {
-        return (0, exports2.braceExpand)(this.pattern, this.options);
-      }
-      parse(pattern) {
-        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
-        const options = this.options;
-        if (pattern === "**")
-          return exports2.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_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
-        if (fastTest && typeof re === "object") {
-          Reflect.defineProperty(re, "test", { value: fastTest });
+        [nt]() {
+          this[O] || (!this[Z] && !this[M].length && (this[D] = true), this[ct] = false, this[x] = true, this.emit("resume"), this[T].length ? this[Gt]() : this[$] ? this[q]() : this.emit("drain"));
         }
-        return re;
-      }
-      makeRe() {
-        if (this.regexp || this.regexp === false)
-          return this.regexp;
-        const set2 = this.set;
-        if (!set2.length) {
-          this.regexp = false;
-          return this.regexp;
+        resume() {
+          return this[nt]();
         }
-        const options = this.options;
-        const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
-        const flags = new Set(options.nocase ? ["i"] : []);
-        let re = set2.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" ? regExpEscape(p) : p === exports2.GLOBSTAR ? exports2.GLOBSTAR : p._src;
-          });
-          pp.forEach((p, i) => {
-            const next = pp[i + 1];
-            const prev = pp[i - 1];
-            if (p !== exports2.GLOBSTAR || prev === exports2.GLOBSTAR) {
-              return;
-            }
-            if (prev === void 0) {
-              if (next !== void 0 && next !== exports2.GLOBSTAR) {
-                pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
-              } else {
-                pp[i] = twoStar;
-              }
-            } else if (next === void 0) {
-              pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
-            } else if (next !== exports2.GLOBSTAR) {
-              pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
-              pp[i + 1] = exports2.GLOBSTAR;
-            }
-          });
-          const filtered = pp.filter((p) => p !== exports2.GLOBSTAR);
-          if (this.partial && filtered.length >= 1) {
-            const prefixes = [];
-            for (let i = 1; i <= filtered.length; i++) {
-              prefixes.push(filtered.slice(0, i).join("/"));
-            }
-            return "(?:" + prefixes.join("|") + ")";
-          }
-          return filtered.join("/");
-        }).join("|");
-        const [open, close] = set2.length > 1 ? ["(?:", ")"] : ["", ""];
-        re = "^" + open + re + close + "$";
-        if (this.partial) {
-          re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
+        pause() {
+          this[x] = false, this[ct] = true, this[D] = false;
         }
-        if (this.negate)
-          re = "^(?!" + re + ").+$";
-        try {
-          this.regexp = new RegExp(re, [...flags].join(""));
-        } catch (ex) {
-          this.regexp = false;
+        get destroyed() {
+          return this[O];
         }
-        return this.regexp;
-      }
-      slashSplit(p) {
-        if (this.preserveMultipleSlashes) {
-          return p.split("/");
-        } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
-          return ["", ...p.split(/\/+/)];
-        } else {
-          return p.split(/\/+/);
+        get flowing() {
+          return this[x];
         }
-      }
-      match(f, partial = this.partial) {
-        this.debug("match", f, this.pattern);
-        if (this.comment) {
-          return false;
+        get paused() {
+          return this[ct];
         }
-        if (this.empty) {
-          return f === "";
+        [we](t) {
+          this[k] ? this[C] += 1 : this[C] += t.length, this[T].push(t);
         }
-        if (f === "/" && partial) {
-          return true;
+        [zt]() {
+          return this[k] ? this[C] -= 1 : this[C] -= this[T][0].length, this[T].shift();
         }
-        const options = this.options;
-        if (this.isWindows) {
-          f = f.split("\\").join("/");
-        }
-        const ff = this.slashSplit(f);
-        this.debug(this.pattern, "split", ff);
-        const set2 = this.set;
-        this.debug(this.pattern, "set", set2);
-        let filename = ff[ff.length - 1];
-        if (!filename) {
-          for (let i = ff.length - 2; !filename && i >= 0; i--) {
-            filename = ff[i];
-          }
-        }
-        for (let i = 0; i < set2.length; i++) {
-          const pattern = set2[i];
-          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;
-          }
+        [Gt](t = false) {
+          do
+            ;
+          while (this[ms](this[zt]()) && this[T].length);
+          !t && !this[T].length && !this[$] && this.emit("drain");
         }
-        if (options.flipNegate) {
-          return false;
+        [ms](t) {
+          return this.emit("data", t), this[x];
         }
-        return this.negate;
-      }
-      static defaults(def) {
-        return exports2.minimatch.defaults(def).Minimatch;
-      }
-    };
-    exports2.Minimatch = Minimatch;
-    var ast_js_2 = require_ast();
-    Object.defineProperty(exports2, "AST", { enumerable: true, get: function() {
-      return ast_js_2.AST;
-    } });
-    var escape_js_2 = require_escape();
-    Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
-      return escape_js_2.escape;
-    } });
-    var unescape_js_2 = require_unescape();
-    Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() {
-      return unescape_js_2.unescape;
-    } });
-    exports2.minimatch.AST = ast_js_1.AST;
-    exports2.minimatch.Minimatch = Minimatch;
-    exports2.minimatch.escape = escape_js_1.escape;
-    exports2.minimatch.unescape = unescape_js_1.unescape;
-  }
-});
-
-// node_modules/lru-cache/dist/commonjs/index.js
-var require_commonjs21 = __commonJS({
-  "node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.LRUCache = void 0;
-    var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
-    var warned = /* @__PURE__ */ new Set();
-    var PROCESS = typeof process === "object" && !!process ? process : {};
-    var emitWarning = (msg, type2, code, fn) => {
-      typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type2, code, fn) : console.error(`[${code}] ${type2}: ${msg}`);
-    };
-    var AC = globalThis.AbortController;
-    var AS = globalThis.AbortSignal;
-    if (typeof AC === "undefined") {
-      AS = class AbortSignal {
-        onabort;
-        _onabort = [];
-        reason;
-        aborted = false;
-        addEventListener(_2, fn) {
-          this._onabort.push(fn);
+        pipe(t, e) {
+          if (this[O]) return t;
+          this[D] = false;
+          let s = this[K];
+          return e = e || {}, t === ds.stdout || t === ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[M].push(e.proxyErrors ? new Ee(this, t, e) : new $t(this, t, e)), this[I] ? ft(() => this[nt]()) : this[nt]()), t;
         }
-      };
-      AC = class AbortController {
-        constructor() {
-          warnACPolyfill();
+        unpipe(t) {
+          let e = this[M].find((s) => s.dest === t);
+          e && (this[M].length === 1 ? (this[x] && this[Z] === 0 && (this[x] = false), this[M] = []) : this[M].splice(this[M].indexOf(e), 1), e.unpipe());
         }
-        signal = new AS();
-        abort(reason) {
-          if (this.signal.aborted)
-            return;
-          this.signal.reason = reason;
-          this.signal.aborted = true;
-          for (const fn of this.signal._onabort) {
-            fn(reason);
+        addListener(t, e) {
+          return this.on(t, e);
+        }
+        on(t, e) {
+          let s = super.on(t, e);
+          if (t === "data") this[D] = false, this[Z]++, !this[M].length && !this[x] && this[nt]();
+          else if (t === "readable" && this[C] !== 0) super.emit("readable");
+          else if (ur(t) && this[K]) super.emit(t), this.removeAllListeners(t);
+          else if (t === "error" && this[lt2]) {
+            let i = e;
+            this[I] ? ft(() => i.call(this, this[lt2])) : i.call(this, this[lt2]);
           }
-          this.signal.onabort?.(reason);
+          return s;
         }
-      };
-      let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
-      const warnACPolyfill = () => {
-        if (!printACPolyfillWarning)
-          return;
-        printACPolyfillWarning = false;
-        emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
-      };
-    }
-    var shouldWarn = (code) => !warned.has(code);
-    var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
-    var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
-    var ZeroArray = class extends Array {
-      constructor(size) {
-        super(size);
-        this.fill(0);
-      }
-    };
-    var Stack = class _Stack {
-      heap;
-      length;
-      // private constructor
-      static #constructing = false;
-      static create(max) {
-        const HeapCls = getUintArray(max);
-        if (!HeapCls)
-          return [];
-        _Stack.#constructing = true;
-        const s = new _Stack(max, HeapCls);
-        _Stack.#constructing = false;
-        return s;
-      }
-      constructor(max, HeapCls) {
-        if (!_Stack.#constructing) {
-          throw new TypeError("instantiate Stack using Stack.create(n)");
+        removeListener(t, e) {
+          return this.off(t, e);
+        }
+        off(t, e) {
+          let s = super.off(t, e);
+          return t === "data" && (this[Z] = this.listeners("data").length, this[Z] === 0 && !this[D] && !this[M].length && (this[x] = false)), s;
+        }
+        removeAllListeners(t) {
+          let e = super.removeAllListeners(t);
+          return (t === "data" || t === void 0) && (this[Z] = 0, !this[D] && !this[M].length && (this[x] = false)), e;
+        }
+        get emittedEnd() {
+          return this[K];
+        }
+        [q]() {
+          !this[Bt] && !this[K] && !this[O] && this[T].length === 0 && this[$] && (this[Bt] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[It] && this.emit("close"), this[Bt] = false);
+        }
+        emit(t, ...e) {
+          let s = e[0];
+          if (t !== "error" && t !== "close" && t !== O && this[O]) return false;
+          if (t === "data") return !this[k] && !s ? false : this[I] ? (ft(() => this[ye](s)), true) : this[ye](s);
+          if (t === "end") return this[gs]();
+          if (t === "close") {
+            if (this[It] = true, !this[K] && !this[O]) return false;
+            let r = super.emit("close");
+            return this.removeAllListeners("close"), r;
+          } else if (t === "error") {
+            this[lt2] = s, super.emit(be, s);
+            let r = !this[ut] || this.listeners("error").length ? super.emit("error", s) : false;
+            return this[q](), r;
+          } else if (t === "resume") {
+            let r = super.emit("resume");
+            return this[q](), r;
+          } else if (t === "finish" || t === "prefinish") {
+            let r = super.emit(t);
+            return this.removeAllListeners(t), r;
+          }
+          let i = super.emit(t, ...e);
+          return this[q](), i;
+        }
+        [ye](t) {
+          for (let s of this[M]) s.dest.write(t) === false && this.pause();
+          let e = this[D] ? false : super.emit("data", t);
+          return this[q](), e;
+        }
+        [gs]() {
+          return this[K] ? false : (this[K] = true, this.readable = false, this[I] ? (ft(() => this[Se]()), true) : this[Se]());
+        }
+        [Se]() {
+          if (this[rt]) {
+            let e = this[rt].end();
+            if (e) {
+              for (let s of this[M]) s.dest.write(e);
+              this[D] || super.emit("data", e);
+            }
+          }
+          for (let e of this[M]) e.end();
+          let t = super.emit("end");
+          return this.removeAllListeners("end"), t;
+        }
+        async collect() {
+          let t = Object.assign([], { dataLength: 0 });
+          this[k] || (t.dataLength = 0);
+          let e = this.promise();
+          return this.on("data", (s) => {
+            t.push(s), this[k] || (t.dataLength += s.length);
+          }), await e, t;
+        }
+        async concat() {
+          if (this[k]) throw new Error("cannot concat in objectMode");
+          let t = await this.collect();
+          return this[L] ? t.join("") : Buffer.concat(t, t.dataLength);
+        }
+        async promise() {
+          return new Promise((t, e) => {
+            this.on(O, () => e(new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
+          });
+        }
+        [Symbol.asyncIterator]() {
+          this[D] = false;
+          let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
+          return { next: () => {
+            if (t) return e();
+            let i = this.read();
+            if (i !== null) return Promise.resolve({ done: false, value: i });
+            if (this[$]) return e();
+            let r, h, o = (c) => {
+              this.off("data", a), this.off("end", l), this.off(O, f), e(), h(c);
+            }, a = (c) => {
+              this.off("error", o), this.off("end", l), this.off(O, f), this.pause(), r({ value: c, done: !!this[$] });
+            }, l = () => {
+              this.off("error", o), this.off("data", a), this.off(O, f), e(), r({ done: true, value: void 0 });
+            }, f = () => o(new Error("stream destroyed"));
+            return new Promise((c, d) => {
+              h = d, r = c, this.once(O, f), this.once("error", o), this.once("end", l), this.once("data", a);
+            });
+          }, throw: e, return: e, [Symbol.asyncIterator]() {
+            return this;
+          }, [Symbol.asyncDispose]: async () => {
+          } };
+        }
+        [Symbol.iterator]() {
+          this[D] = false;
+          let t = false, e = () => (this.pause(), this.off(be, e), this.off(O, e), this.off("end", e), t = true, { done: true, value: void 0 }), s = () => {
+            if (t) return e();
+            let i = this.read();
+            return i === null ? e() : { done: false, value: i };
+          };
+          return this.once("end", e), this.once(be, e), this.once(O, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
+            return this;
+          }, [Symbol.dispose]: () => {
+          } };
+        }
+        destroy(t) {
+          if (this[O]) return t ? this.emit("error", t) : this.emit(O), this;
+          this[O] = true, this[D] = true, this[T].length = 0, this[C] = 0;
+          let e = this;
+          return typeof e.close == "function" && !this[It] && e.close(), t ? this.emit("error", t) : this.emit(O), this;
+        }
+        static get isStream() {
+          return P.isStream;
         }
-        this.heap = new HeapCls(max);
-        this.length = 0;
-      }
-      push(n) {
-        this.heap[this.length++] = n;
-      }
-      pop() {
-        return this.heap[--this.length];
-      }
-    };
-    var LRUCache = class _LRUCache {
-      // options that cannot be changed without disaster
-      #max;
-      #maxSize;
-      #dispose;
-      #onInsert;
-      #disposeAfter;
-      #fetchMethod;
-      #memoMethod;
-      /**
-       * {@link LRUCache.OptionsBase.ttl}
-       */
-      ttl;
-      /**
-       * {@link LRUCache.OptionsBase.ttlResolution}
-       */
-      ttlResolution;
-      /**
-       * {@link LRUCache.OptionsBase.ttlAutopurge}
-       */
-      ttlAutopurge;
-      /**
-       * {@link LRUCache.OptionsBase.updateAgeOnGet}
-       */
-      updateAgeOnGet;
-      /**
-       * {@link LRUCache.OptionsBase.updateAgeOnHas}
-       */
-      updateAgeOnHas;
-      /**
-       * {@link LRUCache.OptionsBase.allowStale}
-       */
-      allowStale;
-      /**
-       * {@link LRUCache.OptionsBase.noDisposeOnSet}
-       */
-      noDisposeOnSet;
-      /**
-       * {@link LRUCache.OptionsBase.noUpdateTTL}
-       */
-      noUpdateTTL;
-      /**
-       * {@link LRUCache.OptionsBase.maxEntrySize}
-       */
-      maxEntrySize;
-      /**
-       * {@link LRUCache.OptionsBase.sizeCalculation}
-       */
-      sizeCalculation;
-      /**
-       * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
-       */
-      noDeleteOnFetchRejection;
-      /**
-       * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
-       */
-      noDeleteOnStaleGet;
-      /**
-       * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
-       */
-      allowStaleOnFetchAbort;
-      /**
-       * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
-       */
-      allowStaleOnFetchRejection;
-      /**
-       * {@link LRUCache.OptionsBase.ignoreFetchAbort}
-       */
-      ignoreFetchAbort;
-      // computed properties
-      #size;
-      #calculatedSize;
-      #keyMap;
-      #keyList;
-      #valList;
-      #next;
-      #prev;
-      #head;
-      #tail;
-      #free;
-      #disposed;
-      #sizes;
-      #starts;
-      #ttls;
-      #hasDispose;
-      #hasFetchMethod;
-      #hasDisposeAfter;
-      #hasOnInsert;
-      /**
-       * Do not call this method unless you need to inspect the
-       * inner workings of the cache.  If anything returned by this
-       * object is modified in any way, strange breakage may occur.
-       *
-       * These fields are private for a reason!
-       *
-       * @internal
-       */
-      static unsafeExposeInternals(c) {
-        return {
-          // properties
-          starts: c.#starts,
-          ttls: c.#ttls,
-          sizes: c.#sizes,
-          keyMap: c.#keyMap,
-          keyList: c.#keyList,
-          valList: c.#valList,
-          next: c.#next,
-          prev: c.#prev,
-          get head() {
-            return c.#head;
-          },
-          get tail() {
-            return c.#tail;
-          },
-          free: c.#free,
-          // methods
-          isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
-          backgroundFetch: (k, index, options, context5) => c.#backgroundFetch(k, index, options, context5),
-          moveToTail: (index) => c.#moveToTail(index),
-          indexes: (options) => c.#indexes(options),
-          rindexes: (options) => c.#rindexes(options),
-          isStale: (index) => c.#isStale(index)
-        };
-      }
-      // Protected read-only members
-      /**
-       * {@link LRUCache.OptionsBase.max} (read-only)
-       */
-      get max() {
-        return this.#max;
-      }
-      /**
-       * {@link LRUCache.OptionsBase.maxSize} (read-only)
-       */
-      get maxSize() {
-        return this.#maxSize;
-      }
-      /**
-       * The total computed size of items in the cache (read-only)
-       */
-      get calculatedSize() {
-        return this.#calculatedSize;
-      }
-      /**
-       * The number of items stored in the cache (read-only)
-       */
-      get size() {
-        return this.#size;
-      }
-      /**
-       * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
-       */
-      get fetchMethod() {
-        return this.#fetchMethod;
-      }
-      get memoMethod() {
-        return this.#memoMethod;
-      }
-      /**
-       * {@link LRUCache.OptionsBase.dispose} (read-only)
-       */
-      get dispose() {
-        return this.#dispose;
-      }
-      /**
-       * {@link LRUCache.OptionsBase.onInsert} (read-only)
-       */
-      get onInsert() {
-        return this.#onInsert;
-      }
-      /**
-       * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
-       */
-      get disposeAfter() {
-        return this.#disposeAfter;
-      }
-      constructor(options) {
-        const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
-        if (max !== 0 && !isPosInt(max)) {
-          throw new TypeError("max option must be a nonnegative integer");
-        }
-        const UintArray = max ? getUintArray(max) : Array;
-        if (!UintArray) {
-          throw new Error("invalid max value: " + max);
-        }
-        this.#max = max;
-        this.#maxSize = maxSize;
-        this.maxEntrySize = maxEntrySize || this.#maxSize;
-        this.sizeCalculation = sizeCalculation;
-        if (this.sizeCalculation) {
-          if (!this.#maxSize && !this.maxEntrySize) {
-            throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
-          }
-          if (typeof this.sizeCalculation !== "function") {
-            throw new TypeError("sizeCalculation set to non-function");
-          }
-        }
-        if (memoMethod !== void 0 && typeof memoMethod !== "function") {
-          throw new TypeError("memoMethod must be a function if defined");
-        }
-        this.#memoMethod = memoMethod;
-        if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
-          throw new TypeError("fetchMethod must be a function if specified");
-        }
-        this.#fetchMethod = fetchMethod;
-        this.#hasFetchMethod = !!fetchMethod;
-        this.#keyMap = /* @__PURE__ */ new Map();
-        this.#keyList = new Array(max).fill(void 0);
-        this.#valList = new Array(max).fill(void 0);
-        this.#next = new UintArray(max);
-        this.#prev = new UintArray(max);
-        this.#head = 0;
-        this.#tail = 0;
-        this.#free = Stack.create(max);
-        this.#size = 0;
-        this.#calculatedSize = 0;
-        if (typeof dispose === "function") {
-          this.#dispose = dispose;
-        }
-        if (typeof onInsert === "function") {
-          this.#onInsert = onInsert;
-        }
-        if (typeof disposeAfter === "function") {
-          this.#disposeAfter = disposeAfter;
-          this.#disposed = [];
-        } else {
-          this.#disposeAfter = void 0;
-          this.#disposed = void 0;
-        }
-        this.#hasDispose = !!this.#dispose;
-        this.#hasOnInsert = !!this.#onInsert;
-        this.#hasDisposeAfter = !!this.#disposeAfter;
-        this.noDisposeOnSet = !!noDisposeOnSet;
-        this.noUpdateTTL = !!noUpdateTTL;
-        this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
-        this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
-        this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
-        this.ignoreFetchAbort = !!ignoreFetchAbort;
-        if (this.maxEntrySize !== 0) {
-          if (this.#maxSize !== 0) {
-            if (!isPosInt(this.#maxSize)) {
-              throw new TypeError("maxSize must be a positive integer if specified");
-            }
-          }
-          if (!isPosInt(this.maxEntrySize)) {
-            throw new TypeError("maxEntrySize must be a positive integer if specified");
-          }
-          this.#initializeSizeTracking();
-        }
-        this.allowStale = !!allowStale;
-        this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
-        this.updateAgeOnGet = !!updateAgeOnGet;
-        this.updateAgeOnHas = !!updateAgeOnHas;
-        this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
-        this.ttlAutopurge = !!ttlAutopurge;
-        this.ttl = ttl || 0;
-        if (this.ttl) {
-          if (!isPosInt(this.ttl)) {
-            throw new TypeError("ttl must be a positive integer if specified");
-          }
-          this.#initializeTTLTracking();
-        }
-        if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
-          throw new TypeError("At least one of max, maxSize, or ttl is required");
-        }
-        if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
-          const code = "LRU_CACHE_UNBOUNDED";
-          if (shouldWarn(code)) {
-            warned.add(code);
-            const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
-            emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
-          }
-        }
-      }
-      /**
-       * Return the number of ms left in the item's TTL. If item is not in cache,
-       * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
-       */
-      getRemainingTTL(key) {
-        return this.#keyMap.has(key) ? Infinity : 0;
-      }
-      #initializeTTLTracking() {
-        const ttls = new ZeroArray(this.#max);
-        const starts = new ZeroArray(this.#max);
-        this.#ttls = ttls;
-        this.#starts = starts;
-        this.#setItemTTL = (index, ttl, start = perf.now()) => {
-          starts[index] = ttl !== 0 ? start : 0;
-          ttls[index] = ttl;
-          if (ttl !== 0 && this.ttlAutopurge) {
-            const t = setTimeout(() => {
-              if (this.#isStale(index)) {
-                this.#delete(this.#keyList[index], "expire");
-              }
-            }, ttl + 1);
-            if (t.unref) {
-              t.unref();
-            }
-          }
-        };
-        this.#updateItemAge = (index) => {
-          starts[index] = ttls[index] !== 0 ? perf.now() : 0;
-        };
-        this.#statusTTL = (status, index) => {
-          if (ttls[index]) {
-            const ttl = ttls[index];
-            const start = starts[index];
-            if (!ttl || !start)
-              return;
-            status.ttl = ttl;
-            status.start = start;
-            status.now = cachedNow || getNow();
-            const age = status.now - start;
-            status.remainingTTL = ttl - age;
-          }
-        };
-        let cachedNow = 0;
-        const getNow = () => {
-          const n = perf.now();
-          if (this.ttlResolution > 0) {
-            cachedNow = n;
-            const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
-            if (t.unref) {
-              t.unref();
-            }
-          }
-          return n;
-        };
-        this.getRemainingTTL = (key) => {
-          const index = this.#keyMap.get(key);
-          if (index === void 0) {
-            return 0;
-          }
-          const ttl = ttls[index];
-          const start = starts[index];
-          if (!ttl || !start) {
-            return Infinity;
-          }
-          const age = (cachedNow || getNow()) - start;
-          return ttl - age;
-        };
-        this.#isStale = (index) => {
-          const s = starts[index];
-          const t = ttls[index];
-          return !!t && !!s && (cachedNow || getNow()) - s > t;
-        };
-      }
-      // conditionally set private methods related to TTL
-      #updateItemAge = () => {
       };
-      #statusTTL = () => {
+      P.Minipass = qt;
+    });
+    var Ms = R((_2) => {
+      "use strict";
+      var gr = _2 && _2.__createBinding || (Object.create ? (function(n, t, e, s) {
+        s === void 0 && (s = e);
+        var i = Object.getOwnPropertyDescriptor(t, e);
+        (!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = { enumerable: true, get: function() {
+          return t[e];
+        } }), Object.defineProperty(n, s, i);
+      }) : (function(n, t, e, s) {
+        s === void 0 && (s = e), n[s] = t[e];
+      })), wr = _2 && _2.__setModuleDefault || (Object.create ? (function(n, t) {
+        Object.defineProperty(n, "default", { enumerable: true, value: t });
+      }) : function(n, t) {
+        n.default = t;
+      }), br = _2 && _2.__importStar || function(n) {
+        if (n && n.__esModule) return n;
+        var t = {};
+        if (n != null) for (var e in n) e !== "default" && Object.prototype.hasOwnProperty.call(n, e) && gr(t, n, e);
+        return wr(t, n), t;
+      };
+      Object.defineProperty(_2, "__esModule", { value: true });
+      _2.PathScurry = _2.Path = _2.PathScurryDarwin = _2.PathScurryPosix = _2.PathScurryWin32 = _2.PathScurryBase = _2.PathPosix = _2.PathWin32 = _2.PathBase = _2.ChildrenCache = _2.ResolveCache = void 0;
+      var Qt = fs31(), Yt = require("node:path"), yr = require("node:url"), pt = require("fs"), Sr = br(require("node:fs")), vr = pt.realpathSync.native, Ht = require("node:fs/promises"), bs = Oe(), mt = { lstatSync: pt.lstatSync, readdir: pt.readdir, readdirSync: pt.readdirSync, readlinkSync: pt.readlinkSync, realpathSync: vr, promises: { lstat: Ht.lstat, readdir: Ht.readdir, readlink: Ht.readlink, realpath: Ht.realpath } }, _s = (n) => !n || n === mt || n === Sr ? mt : { ...mt, ...n, promises: { ...mt.promises, ...n.promises || {} } }, Os = /^\\\\\?\\([a-z]:)\\?$/i, Er = (n) => n.replace(/\//g, "\\").replace(Os, "$1\\"), _r = /[\\\/]/, N = 0, xs = 1, Ts = 2, G = 4, Cs = 6, Rs = 8, Q = 10, As = 12, j = 15, dt = ~j, xe = 16, ys = 32, gt = 64, W = 128, Vt = 256, Xt = 512, Ss = gt | W | Xt, Or = 1023, Te = (n) => n.isFile() ? Rs : n.isDirectory() ? G : n.isSymbolicLink() ? Q : n.isCharacterDevice() ? Ts : n.isBlockDevice() ? Cs : n.isSocket() ? As : n.isFIFO() ? xs : N, vs = new Qt.LRUCache({ max: 2 ** 12 }), wt = (n) => {
+        let t = vs.get(n);
+        if (t) return t;
+        let e = n.normalize("NFKD");
+        return vs.set(n, e), e;
+      }, Es = new Qt.LRUCache({ max: 2 ** 12 }), Kt = (n) => {
+        let t = Es.get(n);
+        if (t) return t;
+        let e = wt(n.toLowerCase());
+        return Es.set(n, e), e;
+      }, bt = class extends Qt.LRUCache {
+        constructor() {
+          super({ max: 256 });
+        }
       };
-      #setItemTTL = () => {
+      _2.ResolveCache = bt;
+      var Jt = class extends Qt.LRUCache {
+        constructor(t = 16 * 1024) {
+          super({ maxSize: t, sizeCalculation: (e) => e.length + 1 });
+        }
       };
-      /* c8 ignore stop */
-      #isStale = () => false;
-      #initializeSizeTracking() {
-        const sizes = new ZeroArray(this.#max);
-        this.#calculatedSize = 0;
-        this.#sizes = sizes;
-        this.#removeItemSize = (index) => {
-          this.#calculatedSize -= sizes[index];
-          sizes[index] = 0;
-        };
-        this.#requireSize = (k, v, size, sizeCalculation) => {
-          if (this.#isBackgroundFetch(v)) {
-            return 0;
-          }
-          if (!isPosInt(size)) {
-            if (sizeCalculation) {
-              if (typeof sizeCalculation !== "function") {
-                throw new TypeError("sizeCalculation must be a function");
-              }
-              size = sizeCalculation(v, k);
-              if (!isPosInt(size)) {
-                throw new TypeError("sizeCalculation return invalid (expect positive integer)");
-              }
-            } else {
-              throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
-            }
-          }
-          return size;
-        };
-        this.#addItemSize = (index, size, status) => {
-          sizes[index] = size;
-          if (this.#maxSize) {
-            const maxSize = this.#maxSize - sizes[index];
-            while (this.#calculatedSize > maxSize) {
-              this.#evict(true);
-            }
-          }
-          this.#calculatedSize += sizes[index];
-          if (status) {
-            status.entrySize = size;
-            status.totalCalculatedSize = this.#calculatedSize;
+      _2.ChildrenCache = Jt;
+      var ks = /* @__PURE__ */ Symbol("PathScurry setAsCwd"), A = class {
+        name;
+        root;
+        roots;
+        parent;
+        nocase;
+        isCWD = false;
+        #t;
+        #s;
+        get dev() {
+          return this.#s;
+        }
+        #n;
+        get mode() {
+          return this.#n;
+        }
+        #r;
+        get nlink() {
+          return this.#r;
+        }
+        #h;
+        get uid() {
+          return this.#h;
+        }
+        #S;
+        get gid() {
+          return this.#S;
+        }
+        #w;
+        get rdev() {
+          return this.#w;
+        }
+        #c;
+        get blksize() {
+          return this.#c;
+        }
+        #o;
+        get ino() {
+          return this.#o;
+        }
+        #f;
+        get size() {
+          return this.#f;
+        }
+        #u;
+        get blocks() {
+          return this.#u;
+        }
+        #a;
+        get atimeMs() {
+          return this.#a;
+        }
+        #i;
+        get mtimeMs() {
+          return this.#i;
+        }
+        #d;
+        get ctimeMs() {
+          return this.#d;
+        }
+        #v;
+        get birthtimeMs() {
+          return this.#v;
+        }
+        #y;
+        get atime() {
+          return this.#y;
+        }
+        #p;
+        get mtime() {
+          return this.#p;
+        }
+        #R;
+        get ctime() {
+          return this.#R;
+        }
+        #m;
+        get birthtime() {
+          return this.#m;
+        }
+        #O;
+        #x;
+        #g;
+        #b;
+        #E;
+        #T;
+        #e;
+        #F;
+        #P;
+        #C;
+        get parentPath() {
+          return (this.parent || this).fullpath();
+        }
+        get path() {
+          return this.parentPath;
+        }
+        constructor(t, e = N, s, i, r, h, o) {
+          this.name = t, this.#O = r ? Kt(t) : wt(t), this.#e = e & Or, this.nocase = r, this.roots = i, this.root = s || this, this.#F = h, this.#g = o.fullpath, this.#E = o.relative, this.#T = o.relativePosix, this.parent = o.parent, this.parent ? this.#t = this.parent.#t : this.#t = _s(o.fs);
+        }
+        depth() {
+          return this.#x !== void 0 ? this.#x : this.parent ? this.#x = this.parent.depth() + 1 : this.#x = 0;
+        }
+        childrenCache() {
+          return this.#F;
+        }
+        resolve(t) {
+          if (!t) return this;
+          let e = this.getRootString(t), i = t.substring(e.length).split(this.splitSep);
+          return e ? this.getRoot(e).#D(i) : this.#D(i);
+        }
+        #D(t) {
+          let e = this;
+          for (let s of t) e = e.child(s);
+          return e;
+        }
+        children() {
+          let t = this.#F.get(this);
+          if (t) return t;
+          let e = Object.assign([], { provisional: 0 });
+          return this.#F.set(this, e), this.#e &= ~xe, e;
+        }
+        child(t, e) {
+          if (t === "" || t === ".") return this;
+          if (t === "..") return this.parent || this;
+          let s = this.children(), i = this.nocase ? Kt(t) : wt(t);
+          for (let a of s) if (a.#O === i) return a;
+          let r = this.parent ? this.sep : "", h = this.#g ? this.#g + r + t : void 0, o = this.newChild(t, N, { ...e, parent: this, fullpath: h });
+          return this.canReaddir() || (o.#e |= W), s.push(o), o;
+        }
+        relative() {
+          if (this.isCWD) return "";
+          if (this.#E !== void 0) return this.#E;
+          let t = this.name, e = this.parent;
+          if (!e) return this.#E = this.name;
+          let s = e.relative();
+          return s + (!s || !e.parent ? "" : this.sep) + t;
+        }
+        relativePosix() {
+          if (this.sep === "/") return this.relative();
+          if (this.isCWD) return "";
+          if (this.#T !== void 0) return this.#T;
+          let t = this.name, e = this.parent;
+          if (!e) return this.#T = this.fullpathPosix();
+          let s = e.relativePosix();
+          return s + (!s || !e.parent ? "" : "/") + t;
+        }
+        fullpath() {
+          if (this.#g !== void 0) return this.#g;
+          let t = this.name, e = this.parent;
+          if (!e) return this.#g = this.name;
+          let i = e.fullpath() + (e.parent ? this.sep : "") + t;
+          return this.#g = i;
+        }
+        fullpathPosix() {
+          if (this.#b !== void 0) return this.#b;
+          if (this.sep === "/") return this.#b = this.fullpath();
+          if (!this.parent) {
+            let i = this.fullpath().replace(/\\/g, "/");
+            return /^[a-z]:\//i.test(i) ? this.#b = `//?/${i}` : this.#b = i;
+          }
+          let t = this.parent, e = t.fullpathPosix(), s = e + (!e || !t.parent ? "" : "/") + this.name;
+          return this.#b = s;
+        }
+        isUnknown() {
+          return (this.#e & j) === N;
+        }
+        isType(t) {
+          return this[`is${t}`]();
+        }
+        getType() {
+          return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
+        }
+        isFile() {
+          return (this.#e & j) === Rs;
+        }
+        isDirectory() {
+          return (this.#e & j) === G;
+        }
+        isCharacterDevice() {
+          return (this.#e & j) === Ts;
+        }
+        isBlockDevice() {
+          return (this.#e & j) === Cs;
+        }
+        isFIFO() {
+          return (this.#e & j) === xs;
+        }
+        isSocket() {
+          return (this.#e & j) === As;
+        }
+        isSymbolicLink() {
+          return (this.#e & Q) === Q;
+        }
+        lstatCached() {
+          return this.#e & ys ? this : void 0;
+        }
+        readlinkCached() {
+          return this.#P;
+        }
+        realpathCached() {
+          return this.#C;
+        }
+        readdirCached() {
+          let t = this.children();
+          return t.slice(0, t.provisional);
+        }
+        canReadlink() {
+          if (this.#P) return true;
+          if (!this.parent) return false;
+          let t = this.#e & j;
+          return !(t !== N && t !== Q || this.#e & Vt || this.#e & W);
+        }
+        calledReaddir() {
+          return !!(this.#e & xe);
+        }
+        isENOENT() {
+          return !!(this.#e & W);
+        }
+        isNamed(t) {
+          return this.nocase ? this.#O === Kt(t) : this.#O === wt(t);
+        }
+        async readlink() {
+          let t = this.#P;
+          if (t) return t;
+          if (this.canReadlink() && this.parent) try {
+            let e = await this.#t.promises.readlink(this.fullpath()), s = (await this.parent.realpath())?.resolve(e);
+            if (s) return this.#P = s;
+          } catch (e) {
+            this.#M(e.code);
+            return;
           }
-        };
-      }
-      #removeItemSize = (_i) => {
-      };
-      #addItemSize = (_i, _s, _st) => {
-      };
-      #requireSize = (_k, _v, size, sizeCalculation) => {
-        if (size || sizeCalculation) {
-          throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
         }
-        return 0;
-      };
-      *#indexes({ allowStale = this.allowStale } = {}) {
-        if (this.#size) {
-          for (let i = this.#tail; true; ) {
-            if (!this.#isValidIndex(i)) {
-              break;
-            }
-            if (allowStale || !this.#isStale(i)) {
-              yield i;
-            }
-            if (i === this.#head) {
-              break;
-            } else {
-              i = this.#prev[i];
-            }
+        readlinkSync() {
+          let t = this.#P;
+          if (t) return t;
+          if (this.canReadlink() && this.parent) try {
+            let e = this.#t.readlinkSync(this.fullpath()), s = this.parent.realpathSync()?.resolve(e);
+            if (s) return this.#P = s;
+          } catch (e) {
+            this.#M(e.code);
+            return;
           }
         }
-      }
-      *#rindexes({ allowStale = this.allowStale } = {}) {
-        if (this.#size) {
-          for (let i = this.#head; true; ) {
-            if (!this.#isValidIndex(i)) {
-              break;
-            }
-            if (allowStale || !this.#isStale(i)) {
-              yield i;
-            }
-            if (i === this.#tail) {
-              break;
-            } else {
-              i = this.#next[i];
-            }
+        #W(t) {
+          this.#e |= xe;
+          for (let e = t.provisional; e < t.length; e++) {
+            let s = t[e];
+            s && s.#_();
           }
         }
-      }
-      #isValidIndex(index) {
-        return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index;
-      }
-      /**
-       * Return a generator yielding `[key, value]` pairs,
-       * in order from most recently used to least recently used.
-       */
-      *entries() {
-        for (const i of this.#indexes()) {
-          if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield [this.#keyList[i], this.#valList[i]];
+        #_() {
+          this.#e & W || (this.#e = (this.#e | W) & dt, this.#$());
+        }
+        #$() {
+          let t = this.children();
+          t.provisional = 0;
+          for (let e of t) e.#_();
+        }
+        #L() {
+          this.#e |= Xt, this.#j();
+        }
+        #j() {
+          if (this.#e & gt) return;
+          let t = this.#e;
+          (t & j) === G && (t &= dt), this.#e = t | gt, this.#$();
+        }
+        #B(t = "") {
+          t === "ENOTDIR" || t === "EPERM" ? this.#j() : t === "ENOENT" ? this.#_() : this.children().provisional = 0;
+        }
+        #k(t = "") {
+          t === "ENOTDIR" ? this.parent.#j() : t === "ENOENT" && this.#_();
+        }
+        #M(t = "") {
+          let e = this.#e;
+          e |= Vt, t === "ENOENT" && (e |= W), (t === "EINVAL" || t === "UNKNOWN") && (e &= dt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#j();
+        }
+        #I(t, e) {
+          return this.#z(t, e) || this.#G(t, e);
+        }
+        #G(t, e) {
+          let s = Te(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & j;
+          return r !== G && r !== Q && r !== N && (i.#e |= gt), e.unshift(i), e.provisional++, i;
+        }
+        #z(t, e) {
+          for (let s = e.provisional; s < e.length; s++) {
+            let i = e[s];
+            if ((this.nocase ? Kt(t.name) : wt(t.name)) === i.#O) return this.#l(t, i, s, e);
           }
         }
-      }
-      /**
-       * Inverse order version of {@link LRUCache.entries}
-       *
-       * Return a generator yielding `[key, value]` pairs,
-       * in order from least recently used to most recently used.
-       */
-      *rentries() {
-        for (const i of this.#rindexes()) {
-          if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield [this.#keyList[i], this.#valList[i]];
+        #l(t, e, s, i) {
+          let r = e.name;
+          return e.#e = e.#e & dt | Te(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
+        }
+        async lstat() {
+          if ((this.#e & W) === 0) try {
+            return this.#U(await this.#t.promises.lstat(this.fullpath())), this;
+          } catch (t) {
+            this.#k(t.code);
           }
         }
-      }
-      /**
-       * Return a generator yielding the keys in the cache,
-       * in order from most recently used to least recently used.
-       */
-      *keys() {
-        for (const i of this.#indexes()) {
-          const k = this.#keyList[i];
-          if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield k;
+        lstatSync() {
+          if ((this.#e & W) === 0) try {
+            return this.#U(this.#t.lstatSync(this.fullpath())), this;
+          } catch (t) {
+            this.#k(t.code);
           }
         }
-      }
-      /**
-       * Inverse order version of {@link LRUCache.keys}
-       *
-       * Return a generator yielding the keys in the cache,
-       * in order from least recently used to most recently used.
-       */
-      *rkeys() {
-        for (const i of this.#rindexes()) {
-          const k = this.#keyList[i];
-          if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield k;
+        #U(t) {
+          let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: h, blocks: o, ctime: a, ctimeMs: l, dev: f, gid: c, ino: d, mode: u, mtime: m, mtimeMs: p, nlink: b, rdev: w, size: v, uid: E } = t;
+          this.#y = e, this.#a = s, this.#m = i, this.#v = r, this.#c = h, this.#u = o, this.#R = a, this.#d = l, this.#s = f, this.#S = c, this.#o = d, this.#n = u, this.#p = m, this.#i = p, this.#r = b, this.#w = w, this.#f = v, this.#h = E;
+          let y = Te(t);
+          this.#e = this.#e & dt | y | ys, y !== N && y !== G && y !== Q && (this.#e |= gt);
+        }
+        #N = [];
+        #A = false;
+        #q(t) {
+          this.#A = false;
+          let e = this.#N.slice();
+          this.#N.length = 0, e.forEach((s) => s(null, t));
+        }
+        readdirCB(t, e = false) {
+          if (!this.canReaddir()) {
+            e ? t(null, []) : queueMicrotask(() => t(null, []));
+            return;
+          }
+          let s = this.children();
+          if (this.calledReaddir()) {
+            let r = s.slice(0, s.provisional);
+            e ? t(null, r) : queueMicrotask(() => t(null, r));
+            return;
           }
+          if (this.#N.push(t), this.#A) return;
+          this.#A = true;
+          let i = this.fullpath();
+          this.#t.readdir(i, { withFileTypes: true }, (r, h) => {
+            if (r) this.#B(r.code), s.provisional = 0;
+            else {
+              for (let o of h) this.#I(o, s);
+              this.#W(s);
+            }
+            this.#q(s.slice(0, s.provisional));
+          });
         }
-      }
-      /**
-       * Return a generator yielding the values in the cache,
-       * in order from most recently used to least recently used.
-       */
-      *values() {
-        for (const i of this.#indexes()) {
-          const v = this.#valList[i];
-          if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield this.#valList[i];
+        #H;
+        async readdir() {
+          if (!this.canReaddir()) return [];
+          let t = this.children();
+          if (this.calledReaddir()) return t.slice(0, t.provisional);
+          let e = this.fullpath();
+          if (this.#H) await this.#H;
+          else {
+            let s = () => {
+            };
+            this.#H = new Promise((i) => s = i);
+            try {
+              for (let i of await this.#t.promises.readdir(e, { withFileTypes: true })) this.#I(i, t);
+              this.#W(t);
+            } catch (i) {
+              this.#B(i.code), t.provisional = 0;
+            }
+            this.#H = void 0, s();
           }
+          return t.slice(0, t.provisional);
         }
-      }
-      /**
-       * Inverse order version of {@link LRUCache.values}
-       *
-       * Return a generator yielding the values in the cache,
-       * in order from least recently used to most recently used.
-       */
-      *rvalues() {
-        for (const i of this.#rindexes()) {
-          const v = this.#valList[i];
-          if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
-            yield this.#valList[i];
+        readdirSync() {
+          if (!this.canReaddir()) return [];
+          let t = this.children();
+          if (this.calledReaddir()) return t.slice(0, t.provisional);
+          let e = this.fullpath();
+          try {
+            for (let s of this.#t.readdirSync(e, { withFileTypes: true })) this.#I(s, t);
+            this.#W(t);
+          } catch (s) {
+            this.#B(s.code), t.provisional = 0;
+          }
+          return t.slice(0, t.provisional);
+        }
+        canReaddir() {
+          if (this.#e & Ss) return false;
+          let t = j & this.#e;
+          return t === N || t === G || t === Q;
+        }
+        shouldWalk(t, e) {
+          return (this.#e & G) === G && !(this.#e & Ss) && !t.has(this) && (!e || e(this));
+        }
+        async realpath() {
+          if (this.#C) return this.#C;
+          if (!((Xt | Vt | W) & this.#e)) try {
+            let t = await this.#t.promises.realpath(this.fullpath());
+            return this.#C = this.resolve(t);
+          } catch {
+            this.#L();
           }
         }
-      }
-      /**
-       * Iterating over the cache itself yields the same results as
-       * {@link LRUCache.entries}
-       */
-      [Symbol.iterator]() {
-        return this.entries();
-      }
-      /**
-       * A String value that is used in the creation of the default string
-       * description of an object. Called by the built-in method
-       * `Object.prototype.toString`.
-       */
-      [Symbol.toStringTag] = "LRUCache";
-      /**
-       * Find a value for which the supplied fn method returns a truthy value,
-       * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
-       */
-      find(fn, getOptions = {}) {
-        for (const i of this.#indexes()) {
-          const v = this.#valList[i];
-          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-          if (value === void 0)
-            continue;
-          if (fn(value, this.#keyList[i], this)) {
-            return this.get(this.#keyList[i], getOptions);
+        realpathSync() {
+          if (this.#C) return this.#C;
+          if (!((Xt | Vt | W) & this.#e)) try {
+            let t = this.#t.realpathSync(this.fullpath());
+            return this.#C = this.resolve(t);
+          } catch {
+            this.#L();
           }
         }
-      }
-      /**
-       * Call the supplied function on each item in the cache, in order from most
-       * recently used to least recently used.
-       *
-       * `fn` is called as `fn(value, key, cache)`.
-       *
-       * If `thisp` is provided, function will be called in the `this`-context of
-       * the provided object, or the cache if no `thisp` object is provided.
-       *
-       * Does not update age or recenty of use, or iterate over stale values.
-       */
-      forEach(fn, thisp = this) {
-        for (const i of this.#indexes()) {
-          const v = this.#valList[i];
-          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-          if (value === void 0)
-            continue;
-          fn.call(thisp, value, this.#keyList[i], this);
+        [ks](t) {
+          if (t === this) return;
+          t.isCWD = false, this.isCWD = true;
+          let e = /* @__PURE__ */ new Set([]), s = [], i = this;
+          for (; i && i.parent; ) e.add(i), i.#E = s.join(this.sep), i.#T = s.join("/"), i = i.parent, s.push("..");
+          for (i = t; i && i.parent && !e.has(i); ) i.#E = void 0, i.#T = void 0, i = i.parent;
         }
-      }
-      /**
-       * The same as {@link LRUCache.forEach} but items are iterated over in
-       * reverse order.  (ie, less recently used items are iterated over first.)
-       */
-      rforEach(fn, thisp = this) {
-        for (const i of this.#rindexes()) {
-          const v = this.#valList[i];
-          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-          if (value === void 0)
-            continue;
-          fn.call(thisp, value, this.#keyList[i], this);
+      };
+      _2.PathBase = A;
+      var yt = class n extends A {
+        sep = "\\";
+        splitSep = _r;
+        constructor(t, e = N, s, i, r, h, o) {
+          super(t, e, s, i, r, h, o);
         }
-      }
-      /**
-       * Delete any stale entries. Returns true if anything was removed,
-       * false otherwise.
-       */
-      purgeStale() {
-        let deleted = false;
-        for (const i of this.#rindexes({ allowStale: true })) {
-          if (this.#isStale(i)) {
-            this.#delete(this.#keyList[i], "expire");
-            deleted = true;
-          }
+        newChild(t, e = N, s = {}) {
+          return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
         }
-        return deleted;
-      }
-      /**
-       * Get the extended info about a given entry, to get its value, size, and
-       * TTL info simultaneously. Returns `undefined` if the key is not present.
-       *
-       * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
-       * serialization, the `start` value is always the current timestamp, and the
-       * `ttl` is a calculated remaining time to live (negative if expired).
-       *
-       * Always returns stale values, if their info is found in the cache, so be
-       * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
-       * if relevant.
-       */
-      info(key) {
-        const i = this.#keyMap.get(key);
-        if (i === void 0)
-          return void 0;
-        const v = this.#valList[i];
-        const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-        if (value === void 0)
-          return void 0;
-        const entry = { value };
-        if (this.#ttls && this.#starts) {
-          const ttl = this.#ttls[i];
-          const start = this.#starts[i];
-          if (ttl && start) {
-            const remain = ttl - (perf.now() - start);
-            entry.ttl = remain;
-            entry.start = Date.now();
-          }
+        getRootString(t) {
+          return Yt.win32.parse(t).root;
         }
-        if (this.#sizes) {
-          entry.size = this.#sizes[i];
+        getRoot(t) {
+          if (t = Er(t.toUpperCase()), t === this.root.name) return this.root;
+          for (let [e, s] of Object.entries(this.roots)) if (this.sameRoot(t, e)) return this.roots[t] = s;
+          return this.roots[t] = new Et(t, this).root;
         }
-        return entry;
-      }
-      /**
-       * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
-       * passed to {@link LRUCache#load}.
-       *
-       * The `start` fields are calculated relative to a portable `Date.now()`
-       * timestamp, even if `performance.now()` is available.
-       *
-       * Stale entries are always included in the `dump`, even if
-       * {@link LRUCache.OptionsBase.allowStale} is false.
-       *
-       * Note: this returns an actual array, not a generator, so it can be more
-       * easily passed around.
-       */
-      dump() {
-        const arr = [];
-        for (const i of this.#indexes({ allowStale: true })) {
-          const key = this.#keyList[i];
-          const v = this.#valList[i];
-          const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-          if (value === void 0 || key === void 0)
-            continue;
-          const entry = { value };
-          if (this.#ttls && this.#starts) {
-            entry.ttl = this.#ttls[i];
-            const age = perf.now() - this.#starts[i];
-            entry.start = Math.floor(Date.now() - age);
-          }
-          if (this.#sizes) {
-            entry.size = this.#sizes[i];
-          }
-          arr.unshift([key, entry]);
+        sameRoot(t, e = this.root.name) {
+          return t = t.toUpperCase().replace(/\//g, "\\").replace(Os, "$1\\"), t === e;
         }
-        return arr;
-      }
-      /**
-       * Reset the cache and load in the items in entries in the order listed.
-       *
-       * The shape of the resulting cache may be different if the same options are
-       * not used in both caches.
-       *
-       * The `start` fields are assumed to be calculated relative to a portable
-       * `Date.now()` timestamp, even if `performance.now()` is available.
-       */
-      load(arr) {
-        this.clear();
-        for (const [key, entry] of arr) {
-          if (entry.start) {
-            const age = Date.now() - entry.start;
-            entry.start = perf.now() - age;
-          }
-          this.set(key, entry.value, entry);
+      };
+      _2.PathWin32 = yt;
+      var St = class n extends A {
+        splitSep = "/";
+        sep = "/";
+        constructor(t, e = N, s, i, r, h, o) {
+          super(t, e, s, i, r, h, o);
         }
-      }
-      /**
-       * Add a value to the cache.
-       *
-       * Note: if `undefined` is specified as a value, this is an alias for
-       * {@link LRUCache#delete}
-       *
-       * Fields on the {@link LRUCache.SetOptions} options param will override
-       * their corresponding values in the constructor options for the scope
-       * of this single `set()` operation.
-       *
-       * If `start` is provided, then that will set the effective start
-       * time for the TTL calculation. Note that this must be a previous
-       * value of `performance.now()` if supported, or a previous value of
-       * `Date.now()` if not.
-       *
-       * Options object may also include `size`, which will prevent
-       * calling the `sizeCalculation` function and just use the specified
-       * number if it is a positive integer, and `noDisposeOnSet` which
-       * will prevent calling a `dispose` function in the case of
-       * overwrites.
-       *
-       * If the `size` (or return value of `sizeCalculation`) for a given
-       * entry is greater than `maxEntrySize`, then the item will not be
-       * added to the cache.
-       *
-       * Will update the recency of the entry.
-       *
-       * If the value is `undefined`, then this is an alias for
-       * `cache.delete(key)`. `undefined` is never stored in the cache.
-       */
-      set(k, v, setOptions = {}) {
-        if (v === void 0) {
-          this.delete(k);
-          return this;
+        getRootString(t) {
+          return t.startsWith("/") ? "/" : "";
         }
-        const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
-        let { noUpdateTTL = this.noUpdateTTL } = setOptions;
-        const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
-        if (this.maxEntrySize && size > this.maxEntrySize) {
-          if (status) {
-            status.set = "miss";
-            status.maxEntrySizeExceeded = true;
-          }
-          this.#delete(k, "set");
-          return this;
+        getRoot(t) {
+          return this.root;
         }
-        let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
-        if (index === void 0) {
-          index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
-          this.#keyList[index] = k;
-          this.#valList[index] = v;
-          this.#keyMap.set(k, index);
-          this.#next[this.#tail] = index;
-          this.#prev[index] = this.#tail;
-          this.#tail = index;
-          this.#size++;
-          this.#addItemSize(index, size, status);
-          if (status)
-            status.set = "add";
-          noUpdateTTL = false;
-          if (this.#hasOnInsert) {
-            this.#onInsert?.(v, k, "add");
-          }
-        } else {
-          this.#moveToTail(index);
-          const oldVal = this.#valList[index];
-          if (v !== oldVal) {
-            if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
-              oldVal.__abortController.abort(new Error("replaced"));
-              const { __staleWhileFetching: s } = oldVal;
-              if (s !== void 0 && !noDisposeOnSet) {
-                if (this.#hasDispose) {
-                  this.#dispose?.(s, k, "set");
+        newChild(t, e = N, s = {}) {
+          return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
+        }
+      };
+      _2.PathPosix = St;
+      var vt = class {
+        root;
+        rootPath;
+        roots;
+        cwd;
+        #t;
+        #s;
+        #n;
+        nocase;
+        #r;
+        constructor(t = process.cwd(), e, s, { nocase: i, childrenCacheSize: r = 16 * 1024, fs: h = mt } = {}) {
+          this.#r = _s(h), (t instanceof URL || t.startsWith("file://")) && (t = (0, yr.fileURLToPath)(t));
+          let o = e.resolve(t);
+          this.roots = /* @__PURE__ */ Object.create(null), this.rootPath = this.parseRootPath(o), this.#t = new bt(), this.#s = new bt(), this.#n = new Jt(r);
+          let a = o.substring(this.rootPath.length).split(s);
+          if (a.length === 1 && !a[0] && a.pop(), i === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
+          this.nocase = i, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
+          let l = this.root, f = a.length - 1, c = e.sep, d = this.rootPath, u = false;
+          for (let m of a) {
+            let p = f--;
+            l = l.child(m, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d += (u ? "" : c) + m }), u = true;
+          }
+          this.cwd = l;
+        }
+        depth(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.depth();
+        }
+        childrenCache() {
+          return this.#n;
+        }
+        resolve(...t) {
+          let e = "";
+          for (let r = t.length - 1; r >= 0; r--) {
+            let h = t[r];
+            if (!(!h || h === ".") && (e = e ? `${h}/${e}` : h, this.isAbsolute(h))) break;
+          }
+          let s = this.#t.get(e);
+          if (s !== void 0) return s;
+          let i = this.cwd.resolve(e).fullpath();
+          return this.#t.set(e, i), i;
+        }
+        resolvePosix(...t) {
+          let e = "";
+          for (let r = t.length - 1; r >= 0; r--) {
+            let h = t[r];
+            if (!(!h || h === ".") && (e = e ? `${h}/${e}` : h, this.isAbsolute(h))) break;
+          }
+          let s = this.#s.get(e);
+          if (s !== void 0) return s;
+          let i = this.cwd.resolve(e).fullpathPosix();
+          return this.#s.set(e, i), i;
+        }
+        relative(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.relative();
+        }
+        relativePosix(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.relativePosix();
+        }
+        basename(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.name;
+        }
+        dirname(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
+        }
+        async readdir(t = this.cwd, e = { withFileTypes: true }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s } = e;
+          if (t.canReaddir()) {
+            let i = await t.readdir();
+            return s ? i : i.map((r) => r.name);
+          } else return [];
+        }
+        readdirSync(t = this.cwd, e = { withFileTypes: true }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true } = e;
+          return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
+        }
+        async lstat(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstat();
+        }
+        lstatSync(t = this.cwd) {
+          return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
+        }
+        async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
+          let s = await t.readlink();
+          return e ? s : s?.fullpath();
+        }
+        readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
+          let s = t.readlinkSync();
+          return e ? s : s?.fullpath();
+        }
+        async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
+          let s = await t.realpath();
+          return e ? s : s?.fullpath();
+        }
+        realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t.withFileTypes, t = this.cwd);
+          let s = t.realpathSync();
+          return e ? s : s?.fullpath();
+        }
+        async walk(t = this.cwd, e = {}) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: h } = e, o = [];
+          (!r || r(t)) && o.push(s ? t : t.fullpath());
+          let a = /* @__PURE__ */ new Set(), l = (c, d) => {
+            a.add(c), c.readdirCB((u, m) => {
+              if (u) return d(u);
+              let p = m.length;
+              if (!p) return d();
+              let b = () => {
+                --p === 0 && d();
+              };
+              for (let w of m) (!r || r(w)) && o.push(s ? w : w.fullpath()), i && w.isSymbolicLink() ? w.realpath().then((v) => v?.isUnknown() ? v.lstat() : v).then((v) => v?.shouldWalk(a, h) ? l(v, b) : b()) : w.shouldWalk(a, h) ? l(w, b) : b();
+            }, true);
+          }, f = t;
+          return new Promise((c, d) => {
+            l(f, (u) => {
+              if (u) return d(u);
+              c(o);
+            });
+          });
+        }
+        walkSync(t = this.cwd, e = {}) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: h } = e, o = [];
+          (!r || r(t)) && o.push(s ? t : t.fullpath());
+          let a = /* @__PURE__ */ new Set([t]);
+          for (let l of a) {
+            let f = l.readdirSync();
+            for (let c of f) {
+              (!r || r(c)) && o.push(s ? c : c.fullpath());
+              let d = c;
+              if (c.isSymbolicLink()) {
+                if (!(i && (d = c.realpathSync()))) continue;
+                d.isUnknown() && d.lstatSync();
+              }
+              d.shouldWalk(a, h) && a.add(d);
+            }
+          }
+          return o;
+        }
+        [Symbol.asyncIterator]() {
+          return this.iterate();
+        }
+        iterate(t = this.cwd, e = {}) {
+          return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
+        }
+        [Symbol.iterator]() {
+          return this.iterateSync();
+        }
+        *iterateSync(t = this.cwd, e = {}) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: h } = e;
+          (!r || r(t)) && (yield s ? t : t.fullpath());
+          let o = /* @__PURE__ */ new Set([t]);
+          for (let a of o) {
+            let l = a.readdirSync();
+            for (let f of l) {
+              (!r || r(f)) && (yield s ? f : f.fullpath());
+              let c = f;
+              if (f.isSymbolicLink()) {
+                if (!(i && (c = f.realpathSync()))) continue;
+                c.isUnknown() && c.lstatSync();
+              }
+              c.shouldWalk(o, h) && o.add(c);
+            }
+          }
+        }
+        stream(t = this.cwd, e = {}) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: h } = e, o = new bs.Minipass({ objectMode: true });
+          (!r || r(t)) && o.write(s ? t : t.fullpath());
+          let a = /* @__PURE__ */ new Set(), l = [t], f = 0, c = () => {
+            let d = false;
+            for (; !d; ) {
+              let u = l.shift();
+              if (!u) {
+                f === 0 && o.end();
+                return;
+              }
+              f++, a.add(u);
+              let m = (b, w, v = false) => {
+                if (b) return o.emit("error", b);
+                if (i && !v) {
+                  let E = [];
+                  for (let y of w) y.isSymbolicLink() && E.push(y.realpath().then((S) => S?.isUnknown() ? S.lstat() : S));
+                  if (E.length) {
+                    Promise.all(E).then(() => m(null, w, true));
+                    return;
+                  }
                 }
-                if (this.#hasDisposeAfter) {
-                  this.#disposed?.push([s, k, "set"]);
+                for (let E of w) E && (!r || r(E)) && (o.write(s ? E : E.fullpath()) || (d = true));
+                f--;
+                for (let E of w) {
+                  let y = E.realpathCached() || E;
+                  y.shouldWalk(a, h) && l.push(y);
                 }
+                d && !o.flowing ? o.once("drain", c) : p || c();
+              }, p = true;
+              u.readdirCB(m, true), p = false;
+            }
+          };
+          return c(), o;
+        }
+        streamSync(t = this.cwd, e = {}) {
+          typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof A || (e = t, t = this.cwd);
+          let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: h } = e, o = new bs.Minipass({ objectMode: true }), a = /* @__PURE__ */ new Set();
+          (!r || r(t)) && o.write(s ? t : t.fullpath());
+          let l = [t], f = 0, c = () => {
+            let d = false;
+            for (; !d; ) {
+              let u = l.shift();
+              if (!u) {
+                f === 0 && o.end();
+                return;
               }
-            } else if (!noDisposeOnSet) {
-              if (this.#hasDispose) {
-                this.#dispose?.(oldVal, k, "set");
-              }
-              if (this.#hasDisposeAfter) {
-                this.#disposed?.push([oldVal, k, "set"]);
+              f++, a.add(u);
+              let m = u.readdirSync();
+              for (let p of m) (!r || r(p)) && (o.write(s ? p : p.fullpath()) || (d = true));
+              f--;
+              for (let p of m) {
+                let b = p;
+                if (p.isSymbolicLink()) {
+                  if (!(i && (b = p.realpathSync()))) continue;
+                  b.isUnknown() && b.lstatSync();
+                }
+                b.shouldWalk(a, h) && l.push(b);
               }
             }
-            this.#removeItemSize(index);
-            this.#addItemSize(index, size, status);
-            this.#valList[index] = v;
-            if (status) {
-              status.set = "replace";
-              const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
-              if (oldValue !== void 0)
-                status.oldValue = oldValue;
-            }
-          } else if (status) {
-            status.set = "update";
-          }
-          if (this.#hasOnInsert) {
-            this.onInsert?.(v, k, v === oldVal ? "update" : "replace");
-          }
+            d && !o.flowing && o.once("drain", c);
+          };
+          return c(), o;
         }
-        if (ttl !== 0 && !this.#ttls) {
-          this.#initializeTTLTracking();
+        chdir(t = this.cwd) {
+          let e = this.cwd;
+          this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[ks](e);
         }
-        if (this.#ttls) {
-          if (!noUpdateTTL) {
-            this.#setItemTTL(index, ttl, start);
-          }
-          if (status)
-            this.#statusTTL(status, index);
+      };
+      _2.PathScurryBase = vt;
+      var Et = class extends vt {
+        sep = "\\";
+        constructor(t = process.cwd(), e = {}) {
+          let { nocase: s = true } = e;
+          super(t, Yt.win32, "\\", { ...e, nocase: s }), this.nocase = s;
+          for (let i = this.cwd; i; i = i.parent) i.nocase = this.nocase;
         }
-        if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
-          const dt = this.#disposed;
-          let task;
-          while (task = dt?.shift()) {
-            this.#disposeAfter?.(...task);
-          }
+        parseRootPath(t) {
+          return Yt.win32.parse(t).root.toUpperCase();
         }
-        return this;
-      }
-      /**
-       * Evict the least recently used item, returning its value or
-       * `undefined` if cache is empty.
-       */
-      pop() {
-        try {
-          while (this.#size) {
-            const val = this.#valList[this.#head];
-            this.#evict(true);
-            if (this.#isBackgroundFetch(val)) {
-              if (val.__staleWhileFetching) {
-                return val.__staleWhileFetching;
-              }
-            } else if (val !== void 0) {
-              return val;
+        newRoot(t) {
+          return new yt(this.rootPath, G, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
+        }
+        isAbsolute(t) {
+          return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
+        }
+      };
+      _2.PathScurryWin32 = Et;
+      var _t = class extends vt {
+        sep = "/";
+        constructor(t = process.cwd(), e = {}) {
+          let { nocase: s = false } = e;
+          super(t, Yt.posix, "/", { ...e, nocase: s }), this.nocase = s;
+        }
+        parseRootPath(t) {
+          return "/";
+        }
+        newRoot(t) {
+          return new St(this.rootPath, G, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
+        }
+        isAbsolute(t) {
+          return t.startsWith("/");
+        }
+      };
+      _2.PathScurryPosix = _t;
+      var Zt = class extends _t {
+        constructor(t = process.cwd(), e = {}) {
+          let { nocase: s = true } = e;
+          super(t, { ...e, nocase: s });
+        }
+      };
+      _2.PathScurryDarwin = Zt;
+      _2.Path = process.platform === "win32" ? yt : St;
+      _2.PathScurry = process.platform === "win32" ? Et : process.platform === "darwin" ? Zt : _t;
+    });
+    var Re = R((te) => {
+      "use strict";
+      Object.defineProperty(te, "__esModule", { value: true });
+      te.Pattern = void 0;
+      var xr = H(), Tr = (n) => n.length >= 1, Cr = (n) => n.length >= 1, Rr = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), Ce = class n {
+        #t;
+        #s;
+        #n;
+        length;
+        #r;
+        #h;
+        #S;
+        #w;
+        #c;
+        #o;
+        #f = true;
+        constructor(t, e, s, i) {
+          if (!Tr(t)) throw new TypeError("empty pattern list");
+          if (!Cr(e)) throw new TypeError("empty glob list");
+          if (e.length !== t.length) throw new TypeError("mismatched pattern list and glob list lengths");
+          if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
+          if (this.#t = t, this.#s = e, this.#n = s, this.#r = i, this.#n === 0) {
+            if (this.isUNC()) {
+              let [r, h, o, a, ...l] = this.#t, [f, c, d, u, ...m] = this.#s;
+              l[0] === "" && (l.shift(), m.shift());
+              let p = [r, h, o, a, ""].join("/"), b = [f, c, d, u, ""].join("/");
+              this.#t = [p, ...l], this.#s = [b, ...m], this.length = this.#t.length;
+            } else if (this.isDrive() || this.isAbsolute()) {
+              let [r, ...h] = this.#t, [o, ...a] = this.#s;
+              h[0] === "" && (h.shift(), a.shift());
+              let l = r + "/", f = o + "/";
+              this.#t = [l, ...h], this.#s = [f, ...a], this.length = this.#t.length;
+            }
+          }
+        }
+        [Rr]() {
+          return "Pattern <" + this.#s.slice(this.#n).join("/") + ">";
+        }
+        pattern() {
+          return this.#t[this.#n];
+        }
+        isString() {
+          return typeof this.#t[this.#n] == "string";
+        }
+        isGlobstar() {
+          return this.#t[this.#n] === xr.GLOBSTAR;
+        }
+        isRegExp() {
+          return this.#t[this.#n] instanceof RegExp;
+        }
+        globString() {
+          return this.#S = this.#S || (this.#n === 0 ? this.isAbsolute() ? this.#s[0] + this.#s.slice(1).join("/") : this.#s.join("/") : this.#s.slice(this.#n).join("/"));
+        }
+        hasMore() {
+          return this.length > this.#n + 1;
+        }
+        rest() {
+          return this.#h !== void 0 ? this.#h : this.hasMore() ? (this.#h = new n(this.#t, this.#s, this.#n + 1, this.#r), this.#h.#o = this.#o, this.#h.#c = this.#c, this.#h.#w = this.#w, this.#h) : this.#h = null;
+        }
+        isUNC() {
+          let t = this.#t;
+          return this.#c !== void 0 ? this.#c : this.#c = this.#r === "win32" && this.#n === 0 && t[0] === "" && t[1] === "" && typeof t[2] == "string" && !!t[2] && typeof t[3] == "string" && !!t[3];
+        }
+        isDrive() {
+          let t = this.#t;
+          return this.#w !== void 0 ? this.#w : this.#w = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]);
+        }
+        isAbsolute() {
+          let t = this.#t;
+          return this.#o !== void 0 ? this.#o : this.#o = t[0] === "" && t.length > 1 || this.isDrive() || this.isUNC();
+        }
+        root() {
+          let t = this.#t[0];
+          return typeof t == "string" && this.isAbsolute() && this.#n === 0 ? t : "";
+        }
+        checkFollowGlobstar() {
+          return !(this.#n === 0 || !this.isGlobstar() || !this.#f);
+        }
+        markFollowGlobstar() {
+          return this.#n === 0 || !this.isGlobstar() || !this.#f ? false : (this.#f = false, true);
+        }
+      };
+      te.Pattern = Ce;
+    });
+    var ke = R((ee) => {
+      "use strict";
+      Object.defineProperty(ee, "__esModule", { value: true });
+      ee.Ignore = void 0;
+      var Ps = H(), Ar = Re(), kr = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", Ae = class {
+        relative;
+        relativeChildren;
+        absolute;
+        absoluteChildren;
+        platform;
+        mmopts;
+        constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: h = kr }) {
+          this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = h, this.mmopts = { dot: true, nobrace: e, nocase: s, noext: i, noglobstar: r, optimizationLevel: 2, platform: h, nocomment: true, nonegate: true };
+          for (let o of t) this.add(o);
+        }
+        add(t) {
+          let e = new Ps.Minimatch(t, this.mmopts);
+          for (let s = 0; s < e.set.length; s++) {
+            let i = e.set[s], r = e.globParts[s];
+            if (!i || !r) throw new Error("invalid pattern object");
+            for (; i[0] === "." && r[0] === "."; ) i.shift(), r.shift();
+            let h = new Ar.Pattern(i, r, 0, this.platform), o = new Ps.Minimatch(h.globString(), this.mmopts), a = r[r.length - 1] === "**", l = h.isAbsolute();
+            l ? this.absolute.push(o) : this.relative.push(o), a && (l ? this.absoluteChildren.push(o) : this.relativeChildren.push(o));
+          }
+        }
+        ignored(t) {
+          let e = t.fullpath(), s = `${e}/`, i = t.relative() || ".", r = `${i}/`;
+          for (let h of this.relative) if (h.match(i) || h.match(r)) return true;
+          for (let h of this.absolute) if (h.match(e) || h.match(s)) return true;
+          return false;
+        }
+        childrenIgnored(t) {
+          let e = t.fullpath() + "/", s = (t.relative() || ".") + "/";
+          for (let i of this.relativeChildren) if (i.match(s)) return true;
+          for (let i of this.absoluteChildren) if (i.match(e)) return true;
+          return false;
+        }
+      };
+      ee.Ignore = Ae;
+    });
+    var Fs = R((z) => {
+      "use strict";
+      Object.defineProperty(z, "__esModule", { value: true });
+      z.Processor = z.SubWalks = z.MatchRecord = z.HasWalkedCache = void 0;
+      var Ds = H(), se = class n {
+        store;
+        constructor(t = /* @__PURE__ */ new Map()) {
+          this.store = t;
+        }
+        copy() {
+          return new n(new Map(this.store));
+        }
+        hasWalked(t, e) {
+          return this.store.get(t.fullpath())?.has(e.globString());
+        }
+        storeWalked(t, e) {
+          let s = t.fullpath(), i = this.store.get(s);
+          i ? i.add(e.globString()) : this.store.set(s, /* @__PURE__ */ new Set([e.globString()]));
+        }
+      };
+      z.HasWalkedCache = se;
+      var ie = class {
+        store = /* @__PURE__ */ new Map();
+        add(t, e, s) {
+          let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
+          this.store.set(t, r === void 0 ? i : i & r);
+        }
+        entries() {
+          return [...this.store.entries()].map(([t, e]) => [t, !!(e & 2), !!(e & 1)]);
+        }
+      };
+      z.MatchRecord = ie;
+      var re = class {
+        store = /* @__PURE__ */ new Map();
+        add(t, e) {
+          if (!t.canReaddir()) return;
+          let s = this.store.get(t);
+          s ? s.find((i) => i.globString() === e.globString()) || s.push(e) : this.store.set(t, [e]);
+        }
+        get(t) {
+          let e = this.store.get(t);
+          if (!e) throw new Error("attempting to walk unknown path");
+          return e;
+        }
+        entries() {
+          return this.keys().map((t) => [t, this.store.get(t)]);
+        }
+        keys() {
+          return [...this.store.keys()].filter((t) => t.canReaddir());
+        }
+      };
+      z.SubWalks = re;
+      var Me = class n {
+        hasWalkedCache;
+        matches = new ie();
+        subwalks = new re();
+        patterns;
+        follow;
+        dot;
+        opts;
+        constructor(t, e) {
+          this.opts = t, this.follow = !!t.follow, this.dot = !!t.dot, this.hasWalkedCache = e ? e.copy() : new se();
+        }
+        processPatterns(t, e) {
+          this.patterns = e;
+          let s = e.map((i) => [t, i]);
+          for (let [i, r] of s) {
+            this.hasWalkedCache.storeWalked(i, r);
+            let h = r.root(), o = r.isAbsolute() && this.opts.absolute !== false;
+            if (h) {
+              i = i.resolve(h === "/" && this.opts.root !== void 0 ? this.opts.root : h);
+              let c = r.rest();
+              if (c) r = c;
+              else {
+                this.matches.add(i, true, false);
+                continue;
+              }
             }
-          }
-        } finally {
-          if (this.#hasDisposeAfter && this.#disposed) {
-            const dt = this.#disposed;
-            let task;
-            while (task = dt?.shift()) {
-              this.#disposeAfter?.(...task);
+            if (i.isENOENT()) continue;
+            let a, l, f = false;
+            for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) i = i.resolve(a), r = l, f = true;
+            if (a = r.pattern(), l = r.rest(), f) {
+              if (this.hasWalkedCache.hasWalked(i, r)) continue;
+              this.hasWalkedCache.storeWalked(i, r);
             }
+            if (typeof a == "string") {
+              let c = a === ".." || a === "" || a === ".";
+              this.matches.add(i.resolve(a), o, c);
+              continue;
+            } else if (a === Ds.GLOBSTAR) {
+              (!i.isSymbolicLink() || this.follow || r.checkFollowGlobstar()) && this.subwalks.add(i, r);
+              let c = l?.pattern(), d = l?.rest();
+              if (!l || (c === "" || c === ".") && !d) this.matches.add(i, o, c === "" || c === ".");
+              else if (c === "..") {
+                let u = i.parent || i;
+                d ? this.hasWalkedCache.hasWalked(u, d) || this.subwalks.add(u, d) : this.matches.add(u, o, true);
+              }
+            } else a instanceof RegExp && this.subwalks.add(i, r);
           }
+          return this;
         }
-      }
-      #evict(free) {
-        const head = this.#head;
-        const k = this.#keyList[head];
-        const v = this.#valList[head];
-        if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
-          v.__abortController.abort(new Error("evicted"));
-        } else if (this.#hasDispose || this.#hasDisposeAfter) {
-          if (this.#hasDispose) {
-            this.#dispose?.(v, k, "evict");
+        subwalkTargets() {
+          return this.subwalks.keys();
+        }
+        child() {
+          return new n(this.opts, this.hasWalkedCache);
+        }
+        filterEntries(t, e) {
+          let s = this.subwalks.get(t), i = this.child();
+          for (let r of e) for (let h of s) {
+            let o = h.isAbsolute(), a = h.pattern(), l = h.rest();
+            a === Ds.GLOBSTAR ? i.testGlobstar(r, h, l, o) : a instanceof RegExp ? i.testRegExp(r, a, l, o) : i.testString(r, a, l, o);
           }
-          if (this.#hasDisposeAfter) {
-            this.#disposed?.push([v, k, "evict"]);
+          return i;
+        }
+        testGlobstar(t, e, s, i) {
+          if ((this.dot || !t.name.startsWith(".")) && (e.hasMore() || this.matches.add(t, i, false), t.canReaddir() && (this.follow || !t.isSymbolicLink() ? this.subwalks.add(t, e) : t.isSymbolicLink() && (s && e.checkFollowGlobstar() ? this.subwalks.add(t, s) : e.markFollowGlobstar() && this.subwalks.add(t, e)))), s) {
+            let r = s.pattern();
+            if (typeof r == "string" && r !== ".." && r !== "" && r !== ".") this.testString(t, r, s.rest(), i);
+            else if (r === "..") {
+              let h = t.parent || t;
+              this.subwalks.add(h, s);
+            } else r instanceof RegExp && this.testRegExp(t, r, s.rest(), i);
           }
         }
-        this.#removeItemSize(head);
-        if (free) {
-          this.#keyList[head] = void 0;
-          this.#valList[head] = void 0;
-          this.#free.push(head);
+        testRegExp(t, e, s, i) {
+          e.test(t.name) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
         }
-        if (this.#size === 1) {
-          this.#head = this.#tail = 0;
-          this.#free.length = 0;
-        } else {
-          this.#head = this.#next[head];
+        testString(t, e, s, i) {
+          t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
         }
-        this.#keyMap.delete(k);
-        this.#size--;
-        return head;
-      }
-      /**
-       * Check if a key is in the cache, without updating the recency of use.
-       * Will return false if the item is stale, even though it is technically
-       * in the cache.
-       *
-       * Check if a key is in the cache, without updating the recency of
-       * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
-       * to `true` in either the options or the constructor.
-       *
-       * Will return `false` if the item is stale, even though it is technically in
-       * the cache. The difference can be determined (if it matters) by using a
-       * `status` argument, and inspecting the `has` field.
-       *
-       * Will not update item age unless
-       * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
-       */
-      has(k, hasOptions = {}) {
-        const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
-        const index = this.#keyMap.get(k);
-        if (index !== void 0) {
-          const v = this.#valList[index];
-          if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) {
-            return false;
-          }
-          if (!this.#isStale(index)) {
-            if (updateAgeOnHas) {
-              this.#updateItemAge(index);
-            }
-            if (status) {
-              status.has = "hit";
-              this.#statusTTL(status, index);
-            }
-            return true;
-          } else if (status) {
-            status.has = "stale";
-            this.#statusTTL(status, index);
+      };
+      z.Processor = Me;
+    });
+    var Ls = R((X) => {
+      "use strict";
+      Object.defineProperty(X, "__esModule", { value: true });
+      X.GlobStream = X.GlobWalker = X.GlobUtil = void 0;
+      var Mr = Oe(), js = ke(), Ns = Fs(), Pr = (n, t) => typeof n == "string" ? new js.Ignore([n], t) : Array.isArray(n) ? new js.Ignore(n, t) : n, Ot = class {
+        path;
+        patterns;
+        opts;
+        seen = /* @__PURE__ */ new Set();
+        paused = false;
+        aborted = false;
+        #t = [];
+        #s;
+        #n;
+        signal;
+        maxDepth;
+        includeChildMatches;
+        constructor(t, e, s) {
+          if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== false, (s.ignore || !this.includeChildMatches) && (this.#s = Pr(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) {
+            let i = "cannot ignore child matches, ignore lacks add() method.";
+            throw new Error(i);
+          }
+          this.maxDepth = s.maxDepth || 1 / 0, s.signal && (this.signal = s.signal, this.signal.addEventListener("abort", () => {
+            this.#t.length = 0;
+          }));
+        }
+        #r(t) {
+          return this.seen.has(t) || !!this.#s?.ignored?.(t);
+        }
+        #h(t) {
+          return !!this.#s?.childrenIgnored?.(t);
+        }
+        pause() {
+          this.paused = true;
+        }
+        resume() {
+          if (this.signal?.aborted) return;
+          this.paused = false;
+          let t;
+          for (; !this.paused && (t = this.#t.shift()); ) t();
+        }
+        onResume(t) {
+          this.signal?.aborted || (this.paused ? this.#t.push(t) : t());
+        }
+        async matchCheck(t, e) {
+          if (e && this.opts.nodir) return;
+          let s;
+          if (this.opts.realpath) {
+            if (s = t.realpathCached() || await t.realpath(), !s) return;
+            t = s;
+          }
+          let r = t.isUnknown() || this.opts.stat ? await t.lstat() : t;
+          if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
+            let h = await r.realpath();
+            h && (h.isUnknown() || this.opts.stat) && await h.lstat();
+          }
+          return this.matchCheckTest(r, e);
+        }
+        matchCheckTest(t, e) {
+          return t && (this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) && (!e || t.canReaddir()) && (!this.opts.nodir || !t.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t.isSymbolicLink() || !t.realpathCached()?.isDirectory()) && !this.#r(t) ? t : void 0;
+        }
+        matchCheckSync(t, e) {
+          if (e && this.opts.nodir) return;
+          let s;
+          if (this.opts.realpath) {
+            if (s = t.realpathCached() || t.realpathSync(), !s) return;
+            t = s;
+          }
+          let r = t.isUnknown() || this.opts.stat ? t.lstatSync() : t;
+          if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
+            let h = r.realpathSync();
+            h && (h?.isUnknown() || this.opts.stat) && h.lstatSync();
+          }
+          return this.matchCheckTest(r, e);
+        }
+        matchFinish(t, e) {
+          if (this.#r(t)) return;
+          if (!this.includeChildMatches && this.#s?.add) {
+            let r = `${t.relativePosix()}/**`;
+            this.#s.add(r);
+          }
+          let s = this.opts.absolute === void 0 ? e : this.opts.absolute;
+          this.seen.add(t);
+          let i = this.opts.mark && t.isDirectory() ? this.#n : "";
+          if (this.opts.withFileTypes) this.matchEmit(t);
+          else if (s) {
+            let r = this.opts.posix ? t.fullpathPosix() : t.fullpath();
+            this.matchEmit(r + i);
+          } else {
+            let r = this.opts.posix ? t.relativePosix() : t.relative(), h = this.opts.dotRelative && !r.startsWith(".." + this.#n) ? "." + this.#n : "";
+            this.matchEmit(r ? h + r + i : "." + i);
           }
-        } else if (status) {
-          status.has = "miss";
         }
-        return false;
-      }
-      /**
-       * Like {@link LRUCache#get} but doesn't update recency or delete stale
-       * items.
-       *
-       * Returns `undefined` if the item is stale, unless
-       * {@link LRUCache.OptionsBase.allowStale} is set.
-       */
-      peek(k, peekOptions = {}) {
-        const { allowStale = this.allowStale } = peekOptions;
-        const index = this.#keyMap.get(k);
-        if (index === void 0 || !allowStale && this.#isStale(index)) {
-          return;
+        async match(t, e, s) {
+          let i = await this.matchCheck(t, s);
+          i && this.matchFinish(i, e);
         }
-        const v = this.#valList[index];
-        return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
-      }
-      #backgroundFetch(k, index, options, context5) {
-        const v = index === void 0 ? void 0 : this.#valList[index];
-        if (this.#isBackgroundFetch(v)) {
-          return v;
+        matchSync(t, e, s) {
+          let i = this.matchCheckSync(t, s);
+          i && this.matchFinish(i, e);
         }
-        const ac = new AC();
-        const { signal } = options;
-        signal?.addEventListener("abort", () => ac.abort(signal.reason), {
-          signal: ac.signal
-        });
-        const fetchOpts = {
-          signal: ac.signal,
-          options,
-          context: context5
-        };
-        const cb = (v2, updateCache = false) => {
-          const { aborted } = ac.signal;
-          const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
-          if (options.status) {
-            if (aborted && !updateCache) {
-              options.status.fetchAborted = true;
-              options.status.fetchError = ac.signal.reason;
-              if (ignoreAbort)
-                options.status.fetchAbortIgnored = true;
-            } else {
-              options.status.fetchResolved = true;
-            }
-          }
-          if (aborted && !ignoreAbort && !updateCache) {
-            return fetchFail(ac.signal.reason);
-          }
-          const bf2 = p;
-          if (this.#valList[index] === p) {
-            if (v2 === void 0) {
-              if (bf2.__staleWhileFetching) {
-                this.#valList[index] = bf2.__staleWhileFetching;
-              } else {
-                this.#delete(k, "fetch");
-              }
-            } else {
-              if (options.status)
-                options.status.fetchUpdated = true;
-              this.set(k, v2, fetchOpts.options);
-            }
-          }
-          return v2;
-        };
-        const eb = (er) => {
-          if (options.status) {
-            options.status.fetchRejected = true;
-            options.status.fetchError = er;
-          }
-          return fetchFail(er);
-        };
-        const fetchFail = (er) => {
-          const { aborted } = ac.signal;
-          const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
-          const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
-          const noDelete = allowStale || options.noDeleteOnFetchRejection;
-          const bf2 = p;
-          if (this.#valList[index] === p) {
-            const del = !noDelete || bf2.__staleWhileFetching === void 0;
-            if (del) {
-              this.#delete(k, "fetch");
-            } else if (!allowStaleAborted) {
-              this.#valList[index] = bf2.__staleWhileFetching;
-            }
-          }
-          if (allowStale) {
-            if (options.status && bf2.__staleWhileFetching !== void 0) {
-              options.status.returnedStale = true;
-            }
-            return bf2.__staleWhileFetching;
-          } else if (bf2.__returned === bf2) {
-            throw er;
-          }
-        };
-        const pcall = (res, rej) => {
-          const fmp = this.#fetchMethod?.(k, v, fetchOpts);
-          if (fmp && fmp instanceof Promise) {
-            fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
+        walkCB(t, e, s) {
+          this.signal?.aborted && s(), this.walkCB2(t, e, new Ns.Processor(this.opts), s);
+        }
+        walkCB2(t, e, s, i) {
+          if (this.#h(t)) return i();
+          if (this.signal?.aborted && i(), this.paused) {
+            this.onResume(() => this.walkCB2(t, e, s, i));
+            return;
           }
-          ac.signal.addEventListener("abort", () => {
-            if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
-              res(void 0);
-              if (options.allowStaleOnFetchAbort) {
-                res = (v2) => cb(v2, true);
-              }
-            }
-          });
-        };
-        if (options.status)
-          options.status.fetchDispatched = true;
-        const p = new Promise(pcall).then(cb, eb);
-        const bf = Object.assign(p, {
-          __abortController: ac,
-          __staleWhileFetching: v,
-          __returned: void 0
-        });
-        if (index === void 0) {
-          this.set(k, bf, { ...fetchOpts.options, status: void 0 });
-          index = this.#keyMap.get(k);
-        } else {
-          this.#valList[index] = bf;
+          s.processPatterns(t, e);
+          let r = 1, h = () => {
+            --r === 0 && i();
+          };
+          for (let [o, a, l] of s.matches.entries()) this.#r(o) || (r++, this.match(o, a, l).then(() => h()));
+          for (let o of s.subwalkTargets()) {
+            if (this.maxDepth !== 1 / 0 && o.depth() >= this.maxDepth) continue;
+            r++;
+            let a = o.readdirCached();
+            o.calledReaddir() ? this.walkCB3(o, a, s, h) : o.readdirCB((l, f) => this.walkCB3(o, f, s, h), true);
+          }
+          h();
+        }
+        walkCB3(t, e, s, i) {
+          s = s.filterEntries(t, e);
+          let r = 1, h = () => {
+            --r === 0 && i();
+          };
+          for (let [o, a, l] of s.matches.entries()) this.#r(o) || (r++, this.match(o, a, l).then(() => h()));
+          for (let [o, a] of s.subwalks.entries()) r++, this.walkCB2(o, a, s.child(), h);
+          h();
         }
-        return bf;
-      }
-      #isBackgroundFetch(p) {
-        if (!this.#hasFetchMethod)
-          return false;
-        const b = p;
-        return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
-      }
-      async fetch(k, fetchOptions = {}) {
-        const {
-          // get options
-          allowStale = this.allowStale,
-          updateAgeOnGet = this.updateAgeOnGet,
-          noDeleteOnStaleGet = this.noDeleteOnStaleGet,
-          // set options
-          ttl = this.ttl,
-          noDisposeOnSet = this.noDisposeOnSet,
-          size = 0,
-          sizeCalculation = this.sizeCalculation,
-          noUpdateTTL = this.noUpdateTTL,
-          // fetch exclusive options
-          noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,
-          allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
-          ignoreFetchAbort = this.ignoreFetchAbort,
-          allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
-          context: context5,
-          forceRefresh = false,
-          status,
-          signal
-        } = fetchOptions;
-        if (!this.#hasFetchMethod) {
-          if (status)
-            status.fetch = "get";
-          return this.get(k, {
-            allowStale,
-            updateAgeOnGet,
-            noDeleteOnStaleGet,
-            status
-          });
+        walkCBSync(t, e, s) {
+          this.signal?.aborted && s(), this.walkCB2Sync(t, e, new Ns.Processor(this.opts), s);
         }
-        const options = {
-          allowStale,
-          updateAgeOnGet,
-          noDeleteOnStaleGet,
-          ttl,
-          noDisposeOnSet,
-          size,
-          sizeCalculation,
-          noUpdateTTL,
-          noDeleteOnFetchRejection,
-          allowStaleOnFetchRejection,
-          allowStaleOnFetchAbort,
-          ignoreFetchAbort,
-          status,
-          signal
-        };
-        let index = this.#keyMap.get(k);
-        if (index === void 0) {
-          if (status)
-            status.fetch = "miss";
-          const p = this.#backgroundFetch(k, index, options, context5);
-          return p.__returned = p;
-        } else {
-          const v = this.#valList[index];
-          if (this.#isBackgroundFetch(v)) {
-            const stale = allowStale && v.__staleWhileFetching !== void 0;
-            if (status) {
-              status.fetch = "inflight";
-              if (stale)
-                status.returnedStale = true;
-            }
-            return stale ? v.__staleWhileFetching : v.__returned = v;
-          }
-          const isStale = this.#isStale(index);
-          if (!forceRefresh && !isStale) {
-            if (status)
-              status.fetch = "hit";
-            this.#moveToTail(index);
-            if (updateAgeOnGet) {
-              this.#updateItemAge(index);
-            }
-            if (status)
-              this.#statusTTL(status, index);
-            return v;
-          }
-          const p = this.#backgroundFetch(k, index, options, context5);
-          const hasStale = p.__staleWhileFetching !== void 0;
-          const staleVal = hasStale && allowStale;
-          if (status) {
-            status.fetch = isStale ? "stale" : "refresh";
-            if (staleVal && isStale)
-              status.returnedStale = true;
-          }
-          return staleVal ? p.__staleWhileFetching : p.__returned = p;
-        }
-      }
-      async forceFetch(k, fetchOptions = {}) {
-        const v = await this.fetch(k, fetchOptions);
-        if (v === void 0)
-          throw new Error("fetch() returned undefined");
-        return v;
-      }
-      memo(k, memoOptions = {}) {
-        const memoMethod = this.#memoMethod;
-        if (!memoMethod) {
-          throw new Error("no memoMethod provided to constructor");
-        }
-        const { context: context5, forceRefresh, ...options } = memoOptions;
-        const v = this.get(k, options);
-        if (!forceRefresh && v !== void 0)
-          return v;
-        const vv = memoMethod(k, v, {
-          options,
-          context: context5
-        });
-        this.set(k, vv, options);
-        return vv;
-      }
-      /**
-       * Return a value from the cache. Will update the recency of the cache
-       * entry found.
-       *
-       * If the key is not found, get() will return `undefined`.
-       */
-      get(k, getOptions = {}) {
-        const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
-        const index = this.#keyMap.get(k);
-        if (index !== void 0) {
-          const value = this.#valList[index];
-          const fetching = this.#isBackgroundFetch(value);
-          if (status)
-            this.#statusTTL(status, index);
-          if (this.#isStale(index)) {
-            if (status)
-              status.get = "stale";
-            if (!fetching) {
-              if (!noDeleteOnStaleGet) {
-                this.#delete(k, "expire");
-              }
-              if (status && allowStale)
-                status.returnedStale = true;
-              return allowStale ? value : void 0;
-            } else {
-              if (status && allowStale && value.__staleWhileFetching !== void 0) {
-                status.returnedStale = true;
-              }
-              return allowStale ? value.__staleWhileFetching : void 0;
-            }
-          } else {
-            if (status)
-              status.get = "hit";
-            if (fetching) {
-              return value.__staleWhileFetching;
-            }
-            this.#moveToTail(index);
-            if (updateAgeOnGet) {
-              this.#updateItemAge(index);
-            }
-            return value;
+        walkCB2Sync(t, e, s, i) {
+          if (this.#h(t)) return i();
+          if (this.signal?.aborted && i(), this.paused) {
+            this.onResume(() => this.walkCB2Sync(t, e, s, i));
+            return;
           }
-        } else if (status) {
-          status.get = "miss";
+          s.processPatterns(t, e);
+          let r = 1, h = () => {
+            --r === 0 && i();
+          };
+          for (let [o, a, l] of s.matches.entries()) this.#r(o) || this.matchSync(o, a, l);
+          for (let o of s.subwalkTargets()) {
+            if (this.maxDepth !== 1 / 0 && o.depth() >= this.maxDepth) continue;
+            r++;
+            let a = o.readdirSync();
+            this.walkCB3Sync(o, a, s, h);
+          }
+          h();
+        }
+        walkCB3Sync(t, e, s, i) {
+          s = s.filterEntries(t, e);
+          let r = 1, h = () => {
+            --r === 0 && i();
+          };
+          for (let [o, a, l] of s.matches.entries()) this.#r(o) || this.matchSync(o, a, l);
+          for (let [o, a] of s.subwalks.entries()) r++, this.walkCB2Sync(o, a, s.child(), h);
+          h();
         }
-      }
-      #connect(p, n) {
-        this.#prev[n] = p;
-        this.#next[p] = n;
-      }
-      #moveToTail(index) {
-        if (index !== this.#tail) {
-          if (index === this.#head) {
-            this.#head = this.#next[index];
-          } else {
-            this.#connect(this.#prev[index], this.#next[index]);
-          }
-          this.#connect(this.#tail, index);
-          this.#tail = index;
+      };
+      X.GlobUtil = Ot;
+      var Pe = class extends Ot {
+        matches = /* @__PURE__ */ new Set();
+        constructor(t, e, s) {
+          super(t, e, s);
         }
-      }
-      /**
-       * Deletes a key out of the cache.
-       *
-       * Returns true if the key was deleted, false otherwise.
-       */
-      delete(k) {
-        return this.#delete(k, "delete");
-      }
-      #delete(k, reason) {
-        let deleted = false;
-        if (this.#size !== 0) {
-          const index = this.#keyMap.get(k);
-          if (index !== void 0) {
-            deleted = true;
-            if (this.#size === 1) {
-              this.#clear(reason);
-            } else {
-              this.#removeItemSize(index);
-              const v = this.#valList[index];
-              if (this.#isBackgroundFetch(v)) {
-                v.__abortController.abort(new Error("deleted"));
-              } else if (this.#hasDispose || this.#hasDisposeAfter) {
-                if (this.#hasDispose) {
-                  this.#dispose?.(v, k, reason);
-                }
-                if (this.#hasDisposeAfter) {
-                  this.#disposed?.push([v, k, reason]);
-                }
-              }
-              this.#keyMap.delete(k);
-              this.#keyList[index] = void 0;
-              this.#valList[index] = void 0;
-              if (index === this.#tail) {
-                this.#tail = this.#prev[index];
-              } else if (index === this.#head) {
-                this.#head = this.#next[index];
-              } else {
-                const pi = this.#prev[index];
-                this.#next[pi] = this.#next[index];
-                const ni = this.#next[index];
-                this.#prev[ni] = this.#prev[index];
-              }
-              this.#size--;
-              this.#free.push(index);
-            }
-          }
+        matchEmit(t) {
+          this.matches.add(t);
         }
-        if (this.#hasDisposeAfter && this.#disposed?.length) {
-          const dt = this.#disposed;
-          let task;
-          while (task = dt?.shift()) {
-            this.#disposeAfter?.(...task);
-          }
+        async walk() {
+          if (this.signal?.aborted) throw this.signal.reason;
+          return this.path.isUnknown() && await this.path.lstat(), await new Promise((t, e) => {
+            this.walkCB(this.path, this.patterns, () => {
+              this.signal?.aborted ? e(this.signal.reason) : t(this.matches);
+            });
+          }), this.matches;
         }
-        return deleted;
-      }
-      /**
-       * Clear the cache entirely, throwing away all values.
-       */
-      clear() {
-        return this.#clear("delete");
-      }
-      #clear(reason) {
-        for (const index of this.#rindexes({ allowStale: true })) {
-          const v = this.#valList[index];
-          if (this.#isBackgroundFetch(v)) {
-            v.__abortController.abort(new Error("deleted"));
+        walkSync() {
+          if (this.signal?.aborted) throw this.signal.reason;
+          return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => {
+            if (this.signal?.aborted) throw this.signal.reason;
+          }), this.matches;
+        }
+      };
+      X.GlobWalker = Pe;
+      var De = class extends Ot {
+        results;
+        constructor(t, e, s) {
+          super(t, e, s), this.results = new Mr.Minipass({ signal: this.signal, objectMode: true }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
+        }
+        matchEmit(t) {
+          this.results.write(t), this.results.flowing || this.pause();
+        }
+        stream() {
+          let t = this.path;
+          return t.isUnknown() ? t.lstat().then(() => {
+            this.walkCB(t, this.patterns, () => this.results.end());
+          }) : this.walkCB(t, this.patterns, () => this.results.end()), this.results;
+        }
+        streamSync() {
+          return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
+        }
+      };
+      X.GlobStream = De;
+    });
+    var je = R((oe) => {
+      "use strict";
+      Object.defineProperty(oe, "__esModule", { value: true });
+      oe.Glob = void 0;
+      var Dr = H(), Fr = require("node:url"), ne = Ms(), jr = Re(), he = Ls(), Nr = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", Fe = class {
+        absolute;
+        cwd;
+        root;
+        dot;
+        dotRelative;
+        follow;
+        ignore;
+        magicalBraces;
+        mark;
+        matchBase;
+        maxDepth;
+        nobrace;
+        nocase;
+        nodir;
+        noext;
+        noglobstar;
+        pattern;
+        platform;
+        realpath;
+        scurry;
+        stat;
+        signal;
+        windowsPathsNoEscape;
+        withFileTypes;
+        includeChildMatches;
+        opts;
+        patterns;
+        constructor(t, e) {
+          if (!e) throw new TypeError("glob options required");
+          if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = (0, Fr.fileURLToPath)(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== false, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth : 1 / 0, this.stat = !!e.stat, this.ignore = e.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true");
+          if (typeof t == "string" && (t = [t]), this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === false, this.windowsPathsNoEscape && (t = t.map((a) => a.replace(/\\/g, "/"))), this.matchBase) {
+            if (e.noglobstar) throw new TypeError("base matching requires globstar");
+            t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
+          }
+          if (this.pattern = t, this.platform = e.platform || Nr, this.opts = { ...e, platform: this.platform }, e.scurry) {
+            if (this.scurry = e.scurry, e.nocase !== void 0 && e.nocase !== e.scurry.nocase) throw new Error("nocase option contradicts provided scurry option");
           } else {
-            const k = this.#keyList[index];
-            if (this.#hasDispose) {
-              this.#dispose?.(v, k, reason);
-            }
-            if (this.#hasDisposeAfter) {
-              this.#disposed?.push([v, k, reason]);
-            }
-          }
+            let a = e.platform === "win32" ? ne.PathScurryWin32 : e.platform === "darwin" ? ne.PathScurryDarwin : e.platform ? ne.PathScurryPosix : ne.PathScurry;
+            this.scurry = new a(this.cwd, { nocase: e.nocase, fs: e.fs });
+          }
+          this.nocase = this.scurry.nocase;
+          let s = this.platform === "darwin" || this.platform === "win32", i = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a) => new Dr.Minimatch(a, i)), [h, o] = r.reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
+          this.patterns = h.map((a, l) => {
+            let f = o[l];
+            if (!f) throw new Error("invalid pattern object");
+            return new jr.Pattern(a, f, 0, this.platform);
+          });
         }
-        this.#keyMap.clear();
-        this.#valList.fill(void 0);
-        this.#keyList.fill(void 0);
-        if (this.#ttls && this.#starts) {
-          this.#ttls.fill(0);
-          this.#starts.fill(0);
+        async walk() {
+          return [...await new he.GlobWalker(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).walk()];
         }
-        if (this.#sizes) {
-          this.#sizes.fill(0);
+        walkSync() {
+          return [...new he.GlobWalker(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).walkSync()];
         }
-        this.#head = 0;
-        this.#tail = 0;
-        this.#free.length = 0;
-        this.#calculatedSize = 0;
-        this.#size = 0;
-        if (this.#hasDisposeAfter && this.#disposed) {
-          const dt = this.#disposed;
-          let task;
-          while (task = dt?.shift()) {
-            this.#disposeAfter?.(...task);
-          }
+        stream() {
+          return new he.GlobStream(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).stream();
         }
-      }
-    };
-    exports2.LRUCache = LRUCache;
+        streamSync() {
+          return new he.GlobStream(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).streamSync();
+        }
+        iterateSync() {
+          return this.streamSync()[Symbol.iterator]();
+        }
+        [Symbol.iterator]() {
+          return this.iterateSync();
+        }
+        iterate() {
+          return this.stream()[Symbol.asyncIterator]();
+        }
+        [Symbol.asyncIterator]() {
+          return this.iterate();
+        }
+      };
+      oe.Glob = Fe;
+    });
+    var Ne = R((ae) => {
+      "use strict";
+      Object.defineProperty(ae, "__esModule", { value: true });
+      ae.hasMagic = void 0;
+      var Lr = H(), Wr = (n, t = {}) => {
+        Array.isArray(n) || (n = [n]);
+        for (let e of n) if (new Lr.Minimatch(e, t).hasMagic()) return true;
+        return false;
+      };
+      ae.hasMagic = Wr;
+    });
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
+    exports2.globStreamSync = xt;
+    exports2.globStream = Le;
+    exports2.globSync = We;
+    exports2.globIterateSync = Tt;
+    exports2.globIterate = Be;
+    var Ws = H();
+    var tt = je();
+    var Br = Ne();
+    var Is = H();
+    Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
+      return Is.escape;
+    } });
+    Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() {
+      return Is.unescape;
+    } });
+    var Ir = je();
+    Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() {
+      return Ir.Glob;
+    } });
+    var Gr = Ne();
+    Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() {
+      return Gr.hasMagic;
+    } });
+    var zr = ke();
+    Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() {
+      return zr.Ignore;
+    } });
+    function xt(n, t = {}) {
+      return new tt.Glob(n, t).streamSync();
+    }
+    function Le(n, t = {}) {
+      return new tt.Glob(n, t).stream();
+    }
+    function We(n, t = {}) {
+      return new tt.Glob(n, t).walkSync();
+    }
+    async function Bs(n, t = {}) {
+      return new tt.Glob(n, t).walk();
+    }
+    function Tt(n, t = {}) {
+      return new tt.Glob(n, t).iterateSync();
+    }
+    function Be(n, t = {}) {
+      return new tt.Glob(n, t).iterate();
+    }
+    exports2.streamSync = xt;
+    exports2.stream = Object.assign(Le, { sync: xt });
+    exports2.iterateSync = Tt;
+    exports2.iterate = Object.assign(Be, { sync: Tt });
+    exports2.sync = Object.assign(We, { stream: xt, iterate: Tt });
+    exports2.glob = Object.assign(Bs, { glob: Bs, globSync: We, sync: exports2.sync, globStream: Le, stream: exports2.stream, globStreamSync: xt, streamSync: exports2.streamSync, globIterate: Be, iterate: exports2.iterate, globIterateSync: Tt, iterateSync: exports2.iterateSync, Glob: tt.Glob, hasMagic: Br.hasMagic, escape: Ws.escape, unescape: Ws.unescape });
+    exports2.glob.glob = exports2.glob;
   }
 });
 
-// node_modules/minipass/dist/commonjs/index.js
-var require_commonjs22 = __commonJS({
-  "node_modules/minipass/dist/commonjs/index.js"(exports2) {
-    "use strict";
-    var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
-      return mod && mod.__esModule ? mod : { "default": mod };
+// node_modules/archiver-utils/file.js
+var require_file3 = __commonJS({
+  "node_modules/archiver-utils/file.js"(exports2, module2) {
+    var fs31 = require_graceful_fs();
+    var path29 = require("path");
+    var flatten = require_flatten();
+    var difference = require_difference();
+    var union = require_union();
+    var isPlainObject4 = require_isPlainObject();
+    var glob2 = require_index_min();
+    var file = module2.exports = {};
+    var pathSeparatorRe = /[\/\\]/g;
+    var processPatterns = function(patterns, fn) {
+      var result = [];
+      flatten(patterns).forEach(function(pattern) {
+        var exclusion = pattern.indexOf("!") === 0;
+        if (exclusion) {
+          pattern = pattern.slice(1);
+        }
+        var matches = fn(pattern);
+        if (exclusion) {
+          result = difference(result, matches);
+        } else {
+          result = union(result, matches);
+        }
+      });
+      return result;
     };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Minipass = exports2.isWritable = exports2.isReadable = exports2.isStream = void 0;
-    var proc = typeof process === "object" && process ? process : {
-      stdout: null,
-      stderr: null
-    };
-    var node_events_1 = require("node:events");
-    var node_stream_1 = __importDefault2(require("node:stream"));
-    var node_string_decoder_1 = require("node:string_decoder");
-    var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s));
-    exports2.isStream = isStream;
-    var isReadable = (s) => !!s && typeof s === "object" && s instanceof node_events_1.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws
-    s.pipe !== node_stream_1.default.Writable.prototype.pipe;
-    exports2.isReadable = isReadable;
-    var isWritable = (s) => !!s && typeof s === "object" && s instanceof node_events_1.EventEmitter && typeof s.write === "function" && typeof s.end === "function";
-    exports2.isWritable = isWritable;
-    var EOF2 = /* @__PURE__ */ Symbol("EOF");
-    var MAYBE_EMIT_END = /* @__PURE__ */ Symbol("maybeEmitEnd");
-    var EMITTED_END = /* @__PURE__ */ Symbol("emittedEnd");
-    var EMITTING_END = /* @__PURE__ */ Symbol("emittingEnd");
-    var EMITTED_ERROR = /* @__PURE__ */ Symbol("emittedError");
-    var CLOSED = /* @__PURE__ */ Symbol("closed");
-    var READ = /* @__PURE__ */ Symbol("read");
-    var FLUSH = /* @__PURE__ */ Symbol("flush");
-    var FLUSHCHUNK = /* @__PURE__ */ Symbol("flushChunk");
-    var ENCODING = /* @__PURE__ */ Symbol("encoding");
-    var DECODER = /* @__PURE__ */ Symbol("decoder");
-    var FLOWING = /* @__PURE__ */ Symbol("flowing");
-    var PAUSED = /* @__PURE__ */ Symbol("paused");
-    var RESUME = /* @__PURE__ */ Symbol("resume");
-    var BUFFER = /* @__PURE__ */ Symbol("buffer");
-    var PIPES = /* @__PURE__ */ Symbol("pipes");
-    var BUFFERLENGTH = /* @__PURE__ */ Symbol("bufferLength");
-    var BUFFERPUSH = /* @__PURE__ */ Symbol("bufferPush");
-    var BUFFERSHIFT = /* @__PURE__ */ Symbol("bufferShift");
-    var OBJECTMODE = /* @__PURE__ */ Symbol("objectMode");
-    var DESTROYED = /* @__PURE__ */ Symbol("destroyed");
-    var ERROR = /* @__PURE__ */ Symbol("error");
-    var EMITDATA = /* @__PURE__ */ Symbol("emitData");
-    var EMITEND = /* @__PURE__ */ Symbol("emitEnd");
-    var EMITEND2 = /* @__PURE__ */ Symbol("emitEnd2");
-    var ASYNC = /* @__PURE__ */ Symbol("async");
-    var ABORT = /* @__PURE__ */ Symbol("abort");
-    var ABORTED = /* @__PURE__ */ Symbol("aborted");
-    var SIGNAL = /* @__PURE__ */ Symbol("signal");
-    var DATALISTENERS = /* @__PURE__ */ Symbol("dataListeners");
-    var DISCARDED = /* @__PURE__ */ Symbol("discarded");
-    var defer = (fn) => Promise.resolve().then(fn);
-    var nodefer = (fn) => fn();
-    var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
-    var isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0;
-    var isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
-    var Pipe = class {
-      src;
-      dest;
-      opts;
-      ondrain;
-      constructor(src, dest, opts) {
-        this.src = src;
-        this.dest = dest;
-        this.opts = opts;
-        this.ondrain = () => src[RESUME]();
-        this.dest.on("drain", this.ondrain);
-      }
-      unpipe() {
-        this.dest.removeListener("drain", this.ondrain);
-      }
-      // only here for the prototype
-      /* c8 ignore start */
-      proxyErrors(_er) {
+    file.exists = function() {
+      var filepath = path29.join.apply(path29, arguments);
+      return fs31.existsSync(filepath);
+    };
+    file.expand = function(...args) {
+      var options = isPlainObject4(args[0]) ? args.shift() : {};
+      var patterns = Array.isArray(args[0]) ? args[0] : args;
+      if (patterns.length === 0) {
+        return [];
       }
-      /* c8 ignore stop */
-      end() {
-        this.unpipe();
-        if (this.opts.end)
-          this.dest.end();
-      }
-    };
-    var PipeProxyErrors = class extends Pipe {
-      unpipe() {
-        this.src.removeListener("error", this.proxyErrors);
-        super.unpipe();
-      }
-      constructor(src, dest, opts) {
-        super(src, dest, opts);
-        this.proxyErrors = (er) => dest.emit("error", er);
-        src.on("error", this.proxyErrors);
-      }
-    };
-    var isObjectModeOptions = (o) => !!o.objectMode;
-    var isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer";
-    var Minipass = class extends node_events_1.EventEmitter {
-      [FLOWING] = false;
-      [PAUSED] = false;
-      [PIPES] = [];
-      [BUFFER] = [];
-      [OBJECTMODE];
-      [ENCODING];
-      [ASYNC];
-      [DECODER];
-      [EOF2] = false;
-      [EMITTED_END] = false;
-      [EMITTING_END] = false;
-      [CLOSED] = false;
-      [EMITTED_ERROR] = null;
-      [BUFFERLENGTH] = 0;
-      [DESTROYED] = false;
-      [SIGNAL];
-      [ABORTED] = false;
-      [DATALISTENERS] = 0;
-      [DISCARDED] = false;
-      /**
-       * true if the stream can be written
-       */
-      writable = true;
-      /**
-       * true if the stream can be read
-       */
-      readable = true;
-      /**
-       * If `RType` is Buffer, then options do not need to be provided.
-       * Otherwise, an options object must be provided to specify either
-       * {@link Minipass.SharedOptions.objectMode} or
-       * {@link Minipass.SharedOptions.encoding}, as appropriate.
-       */
-      constructor(...args) {
-        const options = args[0] || {};
-        super();
-        if (options.objectMode && typeof options.encoding === "string") {
-          throw new TypeError("Encoding and objectMode may not be used together");
-        }
-        if (isObjectModeOptions(options)) {
-          this[OBJECTMODE] = true;
-          this[ENCODING] = null;
-        } else if (isEncodingOptions(options)) {
-          this[ENCODING] = options.encoding;
-          this[OBJECTMODE] = false;
-        } else {
-          this[OBJECTMODE] = false;
-          this[ENCODING] = null;
+      var matches = processPatterns(patterns, function(pattern) {
+        return glob2.sync(pattern, options);
+      });
+      if (options.filter) {
+        matches = matches.filter(function(filepath) {
+          filepath = path29.join(options.cwd || "", filepath);
+          try {
+            if (typeof options.filter === "function") {
+              return options.filter(filepath);
+            } else {
+              return fs31.statSync(filepath)[options.filter]();
+            }
+          } catch (e) {
+            return false;
+          }
+        });
+      }
+      return matches;
+    };
+    file.expandMapping = function(patterns, destBase, options) {
+      options = Object.assign({
+        rename: function(destBase2, destPath) {
+          return path29.join(destBase2 || "", destPath);
         }
-        this[ASYNC] = !!options.async;
-        this[DECODER] = this[ENCODING] ? new node_string_decoder_1.StringDecoder(this[ENCODING]) : null;
-        if (options && options.debugExposeBuffer === true) {
-          Object.defineProperty(this, "buffer", { get: () => this[BUFFER] });
+      }, options);
+      var files = [];
+      var fileByDest = {};
+      file.expand(options, patterns).forEach(function(src) {
+        var destPath = src;
+        if (options.flatten) {
+          destPath = path29.basename(destPath);
         }
-        if (options && options.debugExposePipes === true) {
-          Object.defineProperty(this, "pipes", { get: () => this[PIPES] });
+        if (options.ext) {
+          destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
         }
-        const { signal } = options;
-        if (signal) {
-          this[SIGNAL] = signal;
-          if (signal.aborted) {
-            this[ABORT]();
-          } else {
-            signal.addEventListener("abort", () => this[ABORT]());
-          }
+        var dest = options.rename(destBase, destPath, options);
+        if (options.cwd) {
+          src = path29.join(options.cwd, src);
         }
-      }
-      /**
-       * The amount of data stored in the buffer waiting to be read.
-       *
-       * For Buffer strings, this will be the total byte length.
-       * For string encoding streams, this will be the string character length,
-       * according to JavaScript's `string.length` logic.
-       * For objectMode streams, this is a count of the items waiting to be
-       * emitted.
-       */
-      get bufferLength() {
-        return this[BUFFERLENGTH];
-      }
-      /**
-       * The `BufferEncoding` currently in use, or `null`
-       */
-      get encoding() {
-        return this[ENCODING];
-      }
-      /**
-       * @deprecated - This is a read only property
-       */
-      set encoding(_enc) {
-        throw new Error("Encoding must be set at instantiation time");
-      }
-      /**
-       * @deprecated - Encoding may only be set at instantiation time
-       */
-      setEncoding(_enc) {
-        throw new Error("Encoding must be set at instantiation time");
-      }
-      /**
-       * True if this is an objectMode stream
-       */
-      get objectMode() {
-        return this[OBJECTMODE];
-      }
-      /**
-       * @deprecated - This is a read-only property
-       */
-      set objectMode(_om) {
-        throw new Error("objectMode must be set at instantiation time");
-      }
-      /**
-       * true if this is an async stream
-       */
-      get ["async"]() {
-        return this[ASYNC];
-      }
-      /**
-       * Set to true to make this stream async.
-       *
-       * Once set, it cannot be unset, as this would potentially cause incorrect
-       * behavior.  Ie, a sync stream can be made async, but an async stream
-       * cannot be safely made sync.
-       */
-      set ["async"](a) {
-        this[ASYNC] = this[ASYNC] || !!a;
-      }
-      // drop everything and get out of the flow completely
-      [ABORT]() {
-        this[ABORTED] = true;
-        this.emit("abort", this[SIGNAL]?.reason);
-        this.destroy(this[SIGNAL]?.reason);
-      }
-      /**
-       * True if the stream has been aborted.
-       */
-      get aborted() {
-        return this[ABORTED];
-      }
-      /**
-       * No-op setter. Stream aborted status is set via the AbortSignal provided
-       * in the constructor options.
-       */
-      set aborted(_2) {
-      }
-      write(chunk, encoding, cb) {
-        if (this[ABORTED])
-          return false;
-        if (this[EOF2])
-          throw new Error("write after end");
-        if (this[DESTROYED]) {
-          this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
-          return true;
+        dest = dest.replace(pathSeparatorRe, "/");
+        src = src.replace(pathSeparatorRe, "/");
+        if (fileByDest[dest]) {
+          fileByDest[dest].src.push(src);
+        } else {
+          files.push({
+            src: [src],
+            dest
+          });
+          fileByDest[dest] = files[files.length - 1];
         }
-        if (typeof encoding === "function") {
-          cb = encoding;
-          encoding = "utf8";
-        }
-        if (!encoding)
-          encoding = "utf8";
-        const fn = this[ASYNC] ? defer : nodefer;
-        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-          if (isArrayBufferView(chunk)) {
-            chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
-          } else if (isArrayBufferLike(chunk)) {
-            chunk = Buffer.from(chunk);
-          } else if (typeof chunk !== "string") {
-            throw new Error("Non-contiguous data written to non-objectMode stream");
-          }
-        }
-        if (this[OBJECTMODE]) {
-          if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-            this[FLUSH](true);
-          if (this[FLOWING])
-            this.emit("data", chunk);
-          else
-            this[BUFFERPUSH](chunk);
-          if (this[BUFFERLENGTH] !== 0)
-            this.emit("readable");
-          if (cb)
-            fn(cb);
-          return this[FLOWING];
-        }
-        if (!chunk.length) {
-          if (this[BUFFERLENGTH] !== 0)
-            this.emit("readable");
-          if (cb)
-            fn(cb);
-          return this[FLOWING];
-        }
-        if (typeof chunk === "string" && // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
-          chunk = Buffer.from(chunk, encoding);
-        }
-        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
-          chunk = this[DECODER].write(chunk);
-        }
-        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-          this[FLUSH](true);
-        if (this[FLOWING])
-          this.emit("data", chunk);
-        else
-          this[BUFFERPUSH](chunk);
-        if (this[BUFFERLENGTH] !== 0)
-          this.emit("readable");
-        if (cb)
-          fn(cb);
-        return this[FLOWING];
+      });
+      return files;
+    };
+    file.normalizeFilesArray = function(data) {
+      var files = [];
+      data.forEach(function(obj) {
+        var prop;
+        if ("src" in obj || "dest" in obj) {
+          files.push(obj);
+        }
+      });
+      if (files.length === 0) {
+        return [];
       }
-      /**
-       * Low-level explicit read method.
-       *
-       * In objectMode, the argument is ignored, and one item is returned if
-       * available.
-       *
-       * `n` is the number of bytes (or in the case of encoding streams,
-       * characters) to consume. If `n` is not provided, then the entire buffer
-       * is returned, or `null` is returned if no data is available.
-       *
-       * If `n` is greater that the amount of data in the internal buffer,
-       * then `null` is returned.
-       */
-      read(n) {
-        if (this[DESTROYED])
-          return null;
-        this[DISCARDED] = false;
-        if (this[BUFFERLENGTH] === 0 || n === 0 || n && n > this[BUFFERLENGTH]) {
-          this[MAYBE_EMIT_END]();
-          return null;
+      files = _(files).chain().forEach(function(obj) {
+        if (!("src" in obj) || !obj.src) {
+          return;
         }
-        if (this[OBJECTMODE])
-          n = null;
-        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
-          this[BUFFER] = [
-            this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])
-          ];
+        if (Array.isArray(obj.src)) {
+          obj.src = flatten(obj.src);
+        } else {
+          obj.src = [obj.src];
         }
-        const ret = this[READ](n || null, this[BUFFER][0]);
-        this[MAYBE_EMIT_END]();
-        return ret;
+      }).map(function(obj) {
+        var expandOptions = Object.assign({}, obj);
+        delete expandOptions.src;
+        delete expandOptions.dest;
+        if (obj.expand) {
+          return file.expandMapping(obj.src, obj.dest, expandOptions).map(function(mapObj) {
+            var result2 = Object.assign({}, obj);
+            result2.orig = Object.assign({}, obj);
+            result2.src = mapObj.src;
+            result2.dest = mapObj.dest;
+            ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) {
+              delete result2[prop];
+            });
+            return result2;
+          });
+        }
+        var result = Object.assign({}, obj);
+        result.orig = Object.assign({}, obj);
+        if ("src" in result) {
+          Object.defineProperty(result, "src", {
+            enumerable: true,
+            get: function fn() {
+              var src;
+              if (!("result" in fn)) {
+                src = obj.src;
+                src = Array.isArray(src) ? flatten(src) : [src];
+                fn.result = file.expand(expandOptions, src);
+              }
+              return fn.result;
+            }
+          });
+        }
+        if ("dest" in result) {
+          result.dest = obj.dest;
+        }
+        return result;
+      }).flatten().value();
+      return files;
+    };
+  }
+});
+
+// node_modules/archiver-utils/index.js
+var require_archiver_utils = __commonJS({
+  "node_modules/archiver-utils/index.js"(exports2, module2) {
+    var fs31 = require_graceful_fs();
+    var path29 = require("path");
+    var isStream2 = require_is_stream();
+    var lazystream = require_lazystream();
+    var normalizePath4 = require_normalize_path();
+    var defaults3 = require_defaults();
+    var Stream = require("stream").Stream;
+    var PassThrough3 = require_ours().PassThrough;
+    var utils = module2.exports = {};
+    utils.file = require_file3();
+    utils.collectStream = function(source, callback) {
+      var collection = [];
+      var size = 0;
+      source.on("error", callback);
+      source.on("data", function(chunk) {
+        collection.push(chunk);
+        size += chunk.length;
+      });
+      source.on("end", function() {
+        var buf = Buffer.alloc(size);
+        var offset = 0;
+        collection.forEach(function(data) {
+          data.copy(buf, offset);
+          offset += data.length;
+        });
+        callback(null, buf);
+      });
+    };
+    utils.dateify = function(dateish) {
+      dateish = dateish || /* @__PURE__ */ new Date();
+      if (dateish instanceof Date) {
+        dateish = dateish;
+      } else if (typeof dateish === "string") {
+        dateish = new Date(dateish);
+      } else {
+        dateish = /* @__PURE__ */ new Date();
       }
-      [READ](n, chunk) {
-        if (this[OBJECTMODE])
-          this[BUFFERSHIFT]();
-        else {
-          const c = chunk;
-          if (n === c.length || n === null)
-            this[BUFFERSHIFT]();
-          else if (typeof c === "string") {
-            this[BUFFER][0] = c.slice(n);
-            chunk = c.slice(0, n);
-            this[BUFFERLENGTH] -= n;
-          } else {
-            this[BUFFER][0] = c.subarray(n);
-            chunk = c.subarray(0, n);
-            this[BUFFERLENGTH] -= n;
-          }
-        }
-        this.emit("data", chunk);
-        if (!this[BUFFER].length && !this[EOF2])
-          this.emit("drain");
-        return chunk;
-      }
-      end(chunk, encoding, cb) {
-        if (typeof chunk === "function") {
-          cb = chunk;
-          chunk = void 0;
-        }
-        if (typeof encoding === "function") {
-          cb = encoding;
-          encoding = "utf8";
-        }
-        if (chunk !== void 0)
-          this.write(chunk, encoding);
-        if (cb)
-          this.once("end", cb);
-        this[EOF2] = true;
-        this.writable = false;
-        if (this[FLOWING] || !this[PAUSED])
-          this[MAYBE_EMIT_END]();
-        return this;
+      return dateish;
+    };
+    utils.defaults = function(object2, source, guard) {
+      var args = arguments;
+      args[0] = args[0] || {};
+      return defaults3(...args);
+    };
+    utils.isStream = function(source) {
+      return isStream2(source);
+    };
+    utils.lazyReadStream = function(filepath) {
+      return new lazystream.Readable(function() {
+        return fs31.createReadStream(filepath);
+      });
+    };
+    utils.normalizeInputSource = function(source) {
+      if (source === null) {
+        return Buffer.alloc(0);
+      } else if (typeof source === "string") {
+        return Buffer.from(source);
+      } else if (utils.isStream(source)) {
+        return source.pipe(new PassThrough3());
       }
-      // don't let the internal resume be overwritten
-      [RESUME]() {
-        if (this[DESTROYED])
-          return;
-        if (!this[DATALISTENERS] && !this[PIPES].length) {
-          this[DISCARDED] = true;
-        }
-        this[PAUSED] = false;
-        this[FLOWING] = true;
-        this.emit("resume");
-        if (this[BUFFER].length)
-          this[FLUSH]();
-        else if (this[EOF2])
-          this[MAYBE_EMIT_END]();
-        else
-          this.emit("drain");
+      return source;
+    };
+    utils.sanitizePath = function(filepath) {
+      return normalizePath4(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
+    };
+    utils.trailingSlashIt = function(str) {
+      return str.slice(-1) !== "/" ? str + "/" : str;
+    };
+    utils.unixifyPath = function(filepath) {
+      return normalizePath4(filepath, false).replace(/^\w+:/, "");
+    };
+    utils.walkdir = function(dirpath, base, callback) {
+      var results = [];
+      if (typeof base === "function") {
+        callback = base;
+        base = dirpath;
       }
-      /**
-       * Resume the stream if it is currently in a paused state
-       *
-       * If called when there are no pipe destinations or `data` event listeners,
-       * this will place the stream in a "discarded" state, where all data will
-       * be thrown away. The discarded state is removed if a pipe destination or
-       * data handler is added, if pause() is called, or if any synchronous or
-       * asynchronous iteration is started.
-       */
-      resume() {
-        return this[RESUME]();
+      fs31.readdir(dirpath, function(err, list) {
+        var i = 0;
+        var file;
+        var filepath;
+        if (err) {
+          return callback(err);
+        }
+        (function next() {
+          file = list[i++];
+          if (!file) {
+            return callback(null, results);
+          }
+          filepath = path29.join(dirpath, file);
+          fs31.stat(filepath, function(err2, stats) {
+            results.push({
+              path: filepath,
+              relative: path29.relative(base, filepath).replace(/\\/g, "/"),
+              stats
+            });
+            if (stats && stats.isDirectory()) {
+              utils.walkdir(filepath, base, function(err3, res) {
+                if (err3) {
+                  return callback(err3);
+                }
+                res.forEach(function(dirEntry) {
+                  results.push(dirEntry);
+                });
+                next();
+              });
+            } else {
+              next();
+            }
+          });
+        })();
+      });
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/archiver/lib/error.js
+var require_error3 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/lib/error.js"(exports2, module2) {
+    var util3 = require("util");
+    var ERROR_CODES2 = {
+      "ABORTED": "archive was aborted",
+      "DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value",
+      "DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function",
+      "ENTRYNAMEREQUIRED": "entry name must be a non-empty string value",
+      "FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value",
+      "FINALIZING": "archive already finalizing",
+      "QUEUECLOSED": "queue closed",
+      "NOENDMETHOD": "no suitable finalize/end method defined by module",
+      "DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module",
+      "FORMATSET": "archive format already set",
+      "INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance",
+      "MODULESET": "module already set",
+      "SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module",
+      "SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value",
+      "SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value",
+      "ENTRYNOTSUPPORTED": "entry not supported"
+    };
+    function ArchiverError2(code, data) {
+      Error.captureStackTrace(this, this.constructor);
+      this.message = ERROR_CODES2[code] || code;
+      this.code = code;
+      this.data = data;
+    }
+    util3.inherits(ArchiverError2, Error);
+    exports2 = module2.exports = ArchiverError2;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/archiver/lib/core.js
+var require_core2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/lib/core.js"(exports2, module2) {
+    var fs31 = require("fs");
+    var glob2 = require_readdir_glob();
+    var async = require_async();
+    var path29 = require("path");
+    var util3 = require_archiver_utils();
+    var inherits = require("util").inherits;
+    var ArchiverError2 = require_error3();
+    var Transform5 = require_ours().Transform;
+    var win322 = process.platform === "win32";
+    var Archiver2 = function(format, options) {
+      if (!(this instanceof Archiver2)) {
+        return new Archiver2(format, options);
       }
-      /**
-       * Pause the stream
-       */
-      pause() {
-        this[FLOWING] = false;
-        this[PAUSED] = true;
-        this[DISCARDED] = false;
+      if (typeof format !== "string") {
+        options = format;
+        format = "zip";
       }
-      /**
-       * true if the stream has been forcibly destroyed
-       */
-      get destroyed() {
-        return this[DESTROYED];
+      options = this.options = util3.defaults(options, {
+        highWaterMark: 1024 * 1024,
+        statConcurrency: 4
+      });
+      Transform5.call(this, options);
+      this._format = false;
+      this._module = false;
+      this._pending = 0;
+      this._pointer = 0;
+      this._entriesCount = 0;
+      this._entriesProcessedCount = 0;
+      this._fsEntriesTotalBytes = 0;
+      this._fsEntriesProcessedBytes = 0;
+      this._queue = async.queue(this._onQueueTask.bind(this), 1);
+      this._queue.drain(this._onQueueDrain.bind(this));
+      this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency);
+      this._statQueue.drain(this._onQueueDrain.bind(this));
+      this._state = {
+        aborted: false,
+        finalize: false,
+        finalizing: false,
+        finalized: false,
+        modulePiped: false
+      };
+      this._streams = [];
+    };
+    inherits(Archiver2, Transform5);
+    Archiver2.prototype._abort = function() {
+      this._state.aborted = true;
+      this._queue.kill();
+      this._statQueue.kill();
+      if (this._queue.idle()) {
+        this._shutdown();
       }
-      /**
-       * true if the stream is currently in a flowing state, meaning that
-       * any writes will be immediately emitted.
-       */
-      get flowing() {
-        return this[FLOWING];
+    };
+    Archiver2.prototype._append = function(filepath, data) {
+      data = data || {};
+      var task = {
+        source: null,
+        filepath
+      };
+      if (!data.name) {
+        data.name = filepath;
       }
-      /**
-       * true if the stream is currently in a paused state
-       */
-      get paused() {
-        return this[PAUSED];
+      data.sourcePath = filepath;
+      task.data = data;
+      this._entriesCount++;
+      if (data.stats && data.stats instanceof fs31.Stats) {
+        task = this._updateQueueTaskWithStats(task, data.stats);
+        if (task) {
+          if (data.stats.size) {
+            this._fsEntriesTotalBytes += data.stats.size;
+          }
+          this._queue.push(task);
+        }
+      } else {
+        this._statQueue.push(task);
       }
-      [BUFFERPUSH](chunk) {
-        if (this[OBJECTMODE])
-          this[BUFFERLENGTH] += 1;
-        else
-          this[BUFFERLENGTH] += chunk.length;
-        this[BUFFER].push(chunk);
+    };
+    Archiver2.prototype._finalize = function() {
+      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+        return;
       }
-      [BUFFERSHIFT]() {
-        if (this[OBJECTMODE])
-          this[BUFFERLENGTH] -= 1;
-        else
-          this[BUFFERLENGTH] -= this[BUFFER][0].length;
-        return this[BUFFER].shift();
+      this._state.finalizing = true;
+      this._moduleFinalize();
+      this._state.finalizing = false;
+      this._state.finalized = true;
+    };
+    Archiver2.prototype._maybeFinalize = function() {
+      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+        return false;
       }
-      [FLUSH](noDrain = false) {
-        do {
-        } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
-        if (!noDrain && !this[BUFFER].length && !this[EOF2])
-          this.emit("drain");
+      if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+        this._finalize();
+        return true;
       }
-      [FLUSHCHUNK](chunk) {
-        this.emit("data", chunk);
-        return this[FLOWING];
+      return false;
+    };
+    Archiver2.prototype._moduleAppend = function(source, data, callback) {
+      if (this._state.aborted) {
+        callback();
+        return;
       }
-      /**
-       * Pipe all data emitted by this stream into the destination provided.
-       *
-       * Triggers the flow of data.
-       */
-      pipe(dest, opts) {
-        if (this[DESTROYED])
-          return dest;
-        this[DISCARDED] = false;
-        const ended = this[EMITTED_END];
-        opts = opts || {};
-        if (dest === proc.stdout || dest === proc.stderr)
-          opts.end = false;
-        else
-          opts.end = opts.end !== false;
-        opts.proxyErrors = !!opts.proxyErrors;
-        if (ended) {
-          if (opts.end)
-            dest.end();
-        } else {
-          this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
-          if (this[ASYNC])
-            defer(() => this[RESUME]());
-          else
-            this[RESUME]();
+      this._module.append(source, data, function(err) {
+        this._task = null;
+        if (this._state.aborted) {
+          this._shutdown();
+          return;
         }
-        return dest;
-      }
-      /**
-       * Fully unhook a piped destination stream.
-       *
-       * If the destination stream was the only consumer of this stream (ie,
-       * there are no other piped destinations or `'data'` event listeners)
-       * then the flow of data will stop until there is another consumer or
-       * {@link Minipass#resume} is explicitly called.
-       */
-      unpipe(dest) {
-        const p = this[PIPES].find((p2) => p2.dest === dest);
-        if (p) {
-          if (this[PIPES].length === 1) {
-            if (this[FLOWING] && this[DATALISTENERS] === 0) {
-              this[FLOWING] = false;
-            }
-            this[PIPES] = [];
-          } else
-            this[PIPES].splice(this[PIPES].indexOf(p), 1);
-          p.unpipe();
+        if (err) {
+          this.emit("error", err);
+          setImmediate(callback);
+          return;
         }
-      }
-      /**
-       * Alias for {@link Minipass#on}
-       */
-      addListener(ev, handler2) {
-        return this.on(ev, handler2);
-      }
-      /**
-       * Mostly identical to `EventEmitter.on`, with the following
-       * behavior differences to prevent data loss and unnecessary hangs:
-       *
-       * - Adding a 'data' event handler will trigger the flow of data
-       *
-       * - Adding a 'readable' event handler when there is data waiting to be read
-       *   will cause 'readable' to be emitted immediately.
-       *
-       * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
-       *   already passed will cause the event to be emitted immediately and all
-       *   handlers removed.
-       *
-       * - Adding an 'error' event handler after an error has been emitted will
-       *   cause the event to be re-emitted immediately with the error previously
-       *   raised.
-       */
-      on(ev, handler2) {
-        const ret = super.on(ev, handler2);
-        if (ev === "data") {
-          this[DISCARDED] = false;
-          this[DATALISTENERS]++;
-          if (!this[PIPES].length && !this[FLOWING]) {
-            this[RESUME]();
-          }
-        } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) {
-          super.emit("readable");
-        } else if (isEndish(ev) && this[EMITTED_END]) {
-          super.emit(ev);
-          this.removeAllListeners(ev);
-        } else if (ev === "error" && this[EMITTED_ERROR]) {
-          const h = handler2;
-          if (this[ASYNC])
-            defer(() => h.call(this, this[EMITTED_ERROR]));
-          else
-            h.call(this, this[EMITTED_ERROR]);
+        this.emit("entry", data);
+        this._entriesProcessedCount++;
+        if (data.stats && data.stats.size) {
+          this._fsEntriesProcessedBytes += data.stats.size;
         }
-        return ret;
-      }
-      /**
-       * Alias for {@link Minipass#off}
-       */
-      removeListener(ev, handler2) {
-        return this.off(ev, handler2);
-      }
-      /**
-       * Mostly identical to `EventEmitter.off`
-       *
-       * If a 'data' event handler is removed, and it was the last consumer
-       * (ie, there are no pipe destinations or other 'data' event listeners),
-       * then the flow of data will stop until there is another consumer or
-       * {@link Minipass#resume} is explicitly called.
-       */
-      off(ev, handler2) {
-        const ret = super.off(ev, handler2);
-        if (ev === "data") {
-          this[DATALISTENERS] = this.listeners("data").length;
-          if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) {
-            this[FLOWING] = false;
+        this.emit("progress", {
+          entries: {
+            total: this._entriesCount,
+            processed: this._entriesProcessedCount
+          },
+          fs: {
+            totalBytes: this._fsEntriesTotalBytes,
+            processedBytes: this._fsEntriesProcessedBytes
           }
-        }
-        return ret;
+        });
+        setImmediate(callback);
+      }.bind(this));
+    };
+    Archiver2.prototype._moduleFinalize = function() {
+      if (typeof this._module.finalize === "function") {
+        this._module.finalize();
+      } else if (typeof this._module.end === "function") {
+        this._module.end();
+      } else {
+        this.emit("error", new ArchiverError2("NOENDMETHOD"));
       }
-      /**
-       * Mostly identical to `EventEmitter.removeAllListeners`
-       *
-       * If all 'data' event handlers are removed, and they were the last consumer
-       * (ie, there are no pipe destinations), then the flow of data will stop
-       * until there is another consumer or {@link Minipass#resume} is explicitly
-       * called.
-       */
-      removeAllListeners(ev) {
-        const ret = super.removeAllListeners(ev);
-        if (ev === "data" || ev === void 0) {
-          this[DATALISTENERS] = 0;
-          if (!this[DISCARDED] && !this[PIPES].length) {
-            this[FLOWING] = false;
-          }
-        }
-        return ret;
+    };
+    Archiver2.prototype._modulePipe = function() {
+      this._module.on("error", this._onModuleError.bind(this));
+      this._module.pipe(this);
+      this._state.modulePiped = true;
+    };
+    Archiver2.prototype._moduleSupports = function(key) {
+      if (!this._module.supports || !this._module.supports[key]) {
+        return false;
       }
-      /**
-       * true if the 'end' event has been emitted
-       */
-      get emittedEnd() {
-        return this[EMITTED_END];
+      return this._module.supports[key];
+    };
+    Archiver2.prototype._moduleUnpipe = function() {
+      this._module.unpipe(this);
+      this._state.modulePiped = false;
+    };
+    Archiver2.prototype._normalizeEntryData = function(data, stats) {
+      data = util3.defaults(data, {
+        type: "file",
+        name: null,
+        date: null,
+        mode: null,
+        prefix: null,
+        sourcePath: null,
+        stats: false
+      });
+      if (stats && data.stats === false) {
+        data.stats = stats;
       }
-      [MAYBE_EMIT_END]() {
-        if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this[BUFFER].length === 0 && this[EOF2]) {
-          this[EMITTING_END] = true;
-          this.emit("end");
-          this.emit("prefinish");
-          this.emit("finish");
-          if (this[CLOSED])
-            this.emit("close");
-          this[EMITTING_END] = false;
+      var isDir = data.type === "directory";
+      if (data.name) {
+        if (typeof data.prefix === "string" && "" !== data.prefix) {
+          data.name = data.prefix + "/" + data.name;
+          data.prefix = null;
         }
-      }
-      /**
-       * Mostly identical to `EventEmitter.emit`, with the following
-       * behavior differences to prevent data loss and unnecessary hangs:
-       *
-       * If the stream has been destroyed, and the event is something other
-       * than 'close' or 'error', then `false` is returned and no handlers
-       * are called.
-       *
-       * If the event is 'end', and has already been emitted, then the event
-       * is ignored. If the stream is in a paused or non-flowing state, then
-       * the event will be deferred until data flow resumes. If the stream is
-       * async, then handlers will be called on the next tick rather than
-       * immediately.
-       *
-       * If the event is 'close', and 'end' has not yet been emitted, then
-       * the event will be deferred until after 'end' is emitted.
-       *
-       * If the event is 'error', and an AbortSignal was provided for the stream,
-       * and there are no listeners, then the event is ignored, matching the
-       * behavior of node core streams in the presense of an AbortSignal.
-       *
-       * If the event is 'finish' or 'prefinish', then all listeners will be
-       * removed after emitting the event, to prevent double-firing.
-       */
-      emit(ev, ...args) {
-        const data = args[0];
-        if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) {
-          return false;
-        } else if (ev === "data") {
-          return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer(() => this[EMITDATA](data)), true) : this[EMITDATA](data);
-        } else if (ev === "end") {
-          return this[EMITEND]();
-        } else if (ev === "close") {
-          this[CLOSED] = true;
-          if (!this[EMITTED_END] && !this[DESTROYED])
-            return false;
-          const ret2 = super.emit("close");
-          this.removeAllListeners("close");
-          return ret2;
-        } else if (ev === "error") {
-          this[EMITTED_ERROR] = data;
-          super.emit(ERROR, data);
-          const ret2 = !this[SIGNAL] || this.listeners("error").length ? super.emit("error", data) : false;
-          this[MAYBE_EMIT_END]();
-          return ret2;
-        } else if (ev === "resume") {
-          const ret2 = super.emit("resume");
-          this[MAYBE_EMIT_END]();
-          return ret2;
-        } else if (ev === "finish" || ev === "prefinish") {
-          const ret2 = super.emit(ev);
-          this.removeAllListeners(ev);
-          return ret2;
-        }
-        const ret = super.emit(ev, ...args);
-        this[MAYBE_EMIT_END]();
-        return ret;
-      }
-      [EMITDATA](data) {
-        for (const p of this[PIPES]) {
-          if (p.dest.write(data) === false)
-            this.pause();
+        data.name = util3.sanitizePath(data.name);
+        if (data.type !== "symlink" && data.name.slice(-1) === "/") {
+          isDir = true;
+          data.type = "directory";
+        } else if (isDir) {
+          data.name += "/";
         }
-        const ret = this[DISCARDED] ? false : super.emit("data", data);
-        this[MAYBE_EMIT_END]();
-        return ret;
       }
-      [EMITEND]() {
-        if (this[EMITTED_END])
-          return false;
-        this[EMITTED_END] = true;
-        this.readable = false;
-        return this[ASYNC] ? (defer(() => this[EMITEND2]()), true) : this[EMITEND2]();
-      }
-      [EMITEND2]() {
-        if (this[DECODER]) {
-          const data = this[DECODER].end();
-          if (data) {
-            for (const p of this[PIPES]) {
-              p.dest.write(data);
-            }
-            if (!this[DISCARDED])
-              super.emit("data", data);
-          }
+      if (typeof data.mode === "number") {
+        if (win322) {
+          data.mode &= 511;
+        } else {
+          data.mode &= 4095;
         }
-        for (const p of this[PIPES]) {
-          p.end();
+      } else if (data.stats && data.mode === null) {
+        if (win322) {
+          data.mode = data.stats.mode & 511;
+        } else {
+          data.mode = data.stats.mode & 4095;
         }
-        const ret = super.emit("end");
-        this.removeAllListeners("end");
-        return ret;
-      }
-      /**
-       * Return a Promise that resolves to an array of all emitted data once
-       * the stream ends.
-       */
-      async collect() {
-        const buf = Object.assign([], {
-          dataLength: 0
-        });
-        if (!this[OBJECTMODE])
-          buf.dataLength = 0;
-        const p = this.promise();
-        this.on("data", (c) => {
-          buf.push(c);
-          if (!this[OBJECTMODE])
-            buf.dataLength += c.length;
-        });
-        await p;
-        return buf;
-      }
-      /**
-       * Return a Promise that resolves to the concatenation of all emitted data
-       * once the stream ends.
-       *
-       * Not allowed on objectMode streams.
-       */
-      async concat() {
-        if (this[OBJECTMODE]) {
-          throw new Error("cannot concat in objectMode");
+        if (win322 && isDir) {
+          data.mode = 493;
         }
-        const buf = await this.collect();
-        return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
+      } else if (data.mode === null) {
+        data.mode = isDir ? 493 : 420;
       }
-      /**
-       * Return a void Promise that resolves once the stream ends.
-       */
-      async promise() {
-        return new Promise((resolve13, reject) => {
-          this.on(DESTROYED, () => reject(new Error("stream destroyed")));
-          this.on("error", (er) => reject(er));
-          this.on("end", () => resolve13());
-        });
+      if (data.stats && data.date === null) {
+        data.date = data.stats.mtime;
+      } else {
+        data.date = util3.dateify(data.date);
       }
-      /**
-       * Asynchronous `for await of` iteration.
-       *
-       * This will continue emitting all chunks until the stream terminates.
-       */
-      [Symbol.asyncIterator]() {
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = async () => {
-          this.pause();
-          stopped = true;
-          return { value: void 0, done: true };
-        };
-        const next = () => {
-          if (stopped)
-            return stop();
-          const res = this.read();
-          if (res !== null)
-            return Promise.resolve({ done: false, value: res });
-          if (this[EOF2])
-            return stop();
-          let resolve13;
-          let reject;
-          const onerr = (er) => {
-            this.off("data", ondata);
-            this.off("end", onend);
-            this.off(DESTROYED, ondestroy);
-            stop();
-            reject(er);
-          };
-          const ondata = (value) => {
-            this.off("error", onerr);
-            this.off("end", onend);
-            this.off(DESTROYED, ondestroy);
-            this.pause();
-            resolve13({ value, done: !!this[EOF2] });
-          };
-          const onend = () => {
-            this.off("error", onerr);
-            this.off("data", ondata);
-            this.off(DESTROYED, ondestroy);
-            stop();
-            resolve13({ done: true, value: void 0 });
-          };
-          const ondestroy = () => onerr(new Error("stream destroyed"));
-          return new Promise((res2, rej) => {
-            reject = rej;
-            resolve13 = res2;
-            this.once(DESTROYED, ondestroy);
-            this.once("error", onerr);
-            this.once("end", onend);
-            this.once("data", ondata);
-          });
-        };
-        return {
-          next,
-          throw: stop,
-          return: stop,
-          [Symbol.asyncIterator]() {
-            return this;
-          }
-        };
+      return data;
+    };
+    Archiver2.prototype._onModuleError = function(err) {
+      this.emit("error", err);
+    };
+    Archiver2.prototype._onQueueDrain = function() {
+      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+        return;
       }
-      /**
-       * Synchronous `for of` iteration.
-       *
-       * The iteration will terminate when the internal buffer runs out, even
-       * if the stream has not yet terminated.
-       */
-      [Symbol.iterator]() {
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = () => {
-          this.pause();
-          this.off(ERROR, stop);
-          this.off(DESTROYED, stop);
-          this.off("end", stop);
-          stopped = true;
-          return { done: true, value: void 0 };
-        };
-        const next = () => {
-          if (stopped)
-            return stop();
-          const value = this.read();
-          return value === null ? stop() : { done: false, value };
-        };
-        this.once("end", stop);
-        this.once(ERROR, stop);
-        this.once(DESTROYED, stop);
-        return {
-          next,
-          throw: stop,
-          return: stop,
-          [Symbol.iterator]() {
-            return this;
-          }
-        };
+      if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+        this._finalize();
       }
-      /**
-       * Destroy a stream, preventing it from being used for any further purpose.
-       *
-       * If the stream has a `close()` method, then it will be called on
-       * destruction.
-       *
-       * After destruction, any attempt to write data, read data, or emit most
-       * events will be ignored.
-       *
-       * If an error argument is provided, then it will be emitted in an
-       * 'error' event.
-       */
-      destroy(er) {
-        if (this[DESTROYED]) {
-          if (er)
-            this.emit("error", er);
-          else
-            this.emit(DESTROYED);
-          return this;
+    };
+    Archiver2.prototype._onQueueTask = function(task, callback) {
+      var fullCallback = () => {
+        if (task.data.callback) {
+          task.data.callback();
         }
-        this[DESTROYED] = true;
-        this[DISCARDED] = true;
-        this[BUFFER].length = 0;
-        this[BUFFERLENGTH] = 0;
-        const wc = this;
-        if (typeof wc.close === "function" && !this[CLOSED])
-          wc.close();
-        if (er)
-          this.emit("error", er);
-        else
-          this.emit(DESTROYED);
-        return this;
-      }
-      /**
-       * Alias for {@link isStream}
-       *
-       * Former export location, maintained for backwards compatibility.
-       *
-       * @deprecated
-       */
-      static get isStream() {
-        return exports2.isStream;
+        callback();
+      };
+      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+        fullCallback();
+        return;
       }
+      this._task = task;
+      this._moduleAppend(task.source, task.data, fullCallback);
     };
-    exports2.Minipass = Minipass;
-  }
-});
-
-// node_modules/path-scurry/dist/commonjs/index.js
-var require_commonjs23 = __commonJS({
-  "node_modules/path-scurry/dist/commonjs/index.js"(exports2) {
-    "use strict";
-    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      var desc = Object.getOwnPropertyDescriptor(m, k);
-      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-        desc = { enumerable: true, get: function() {
-          return m[k];
-        } };
-      }
-      Object.defineProperty(o, k2, desc);
-    }) : (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      o[k2] = m[k];
-    }));
-    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
-      Object.defineProperty(o, "default", { enumerable: true, value: v });
-    }) : function(o, v) {
-      o["default"] = v;
-    });
-    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
-      if (mod && mod.__esModule) return mod;
-      var result = {};
-      if (mod != null) {
-        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
+    Archiver2.prototype._onStatQueueTask = function(task, callback) {
+      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+        callback();
+        return;
       }
-      __setModuleDefault2(result, mod);
-      return result;
+      fs31.lstat(task.filepath, function(err, stats) {
+        if (this._state.aborted) {
+          setImmediate(callback);
+          return;
+        }
+        if (err) {
+          this._entriesCount--;
+          this.emit("warning", err);
+          setImmediate(callback);
+          return;
+        }
+        task = this._updateQueueTaskWithStats(task, stats);
+        if (task) {
+          if (stats.size) {
+            this._fsEntriesTotalBytes += stats.size;
+          }
+          this._queue.push(task);
+        }
+        setImmediate(callback);
+      }.bind(this));
     };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0;
-    var lru_cache_1 = require_commonjs21();
-    var node_path_1 = require("node:path");
-    var node_url_1 = require("node:url");
-    var fs_1 = require("fs");
-    var actualFS = __importStar2(require("node:fs"));
-    var realpathSync = fs_1.realpathSync.native;
-    var promises_1 = require("node:fs/promises");
-    var minipass_1 = require_commonjs22();
-    var defaultFS = {
-      lstatSync: fs_1.lstatSync,
-      readdir: fs_1.readdir,
-      readdirSync: fs_1.readdirSync,
-      readlinkSync: fs_1.readlinkSync,
-      realpathSync,
-      promises: {
-        lstat: promises_1.lstat,
-        readdir: promises_1.readdir,
-        readlink: promises_1.readlink,
-        realpath: promises_1.realpath
-      }
-    };
-    var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ? defaultFS : {
-      ...defaultFS,
-      ...fsOption,
-      promises: {
-        ...defaultFS.promises,
-        ...fsOption.promises || {}
-      }
-    };
-    var uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
-    var uncToDrive = (rootPath) => rootPath.replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
-    var eitherSep = /[\\\/]/;
-    var UNKNOWN = 0;
-    var IFIFO = 1;
-    var IFCHR = 2;
-    var IFDIR = 4;
-    var IFBLK = 6;
-    var IFREG = 8;
-    var IFLNK = 10;
-    var IFSOCK = 12;
-    var IFMT = 15;
-    var IFMT_UNKNOWN = ~IFMT;
-    var READDIR_CALLED = 16;
-    var LSTAT_CALLED = 32;
-    var ENOTDIR = 64;
-    var ENOENT = 128;
-    var ENOREADLINK = 256;
-    var ENOREALPATH = 512;
-    var ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
-    var TYPEMASK = 1023;
-    var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
-    var normalizeCache = /* @__PURE__ */ new Map();
-    var normalize3 = (s) => {
-      const c = normalizeCache.get(s);
-      if (c)
-        return c;
-      const n = s.normalize("NFKD");
-      normalizeCache.set(s, n);
-      return n;
+    Archiver2.prototype._shutdown = function() {
+      this._moduleUnpipe();
+      this.end();
     };
-    var normalizeNocaseCache = /* @__PURE__ */ new Map();
-    var normalizeNocase = (s) => {
-      const c = normalizeNocaseCache.get(s);
-      if (c)
-        return c;
-      const n = normalize3(s.toLowerCase());
-      normalizeNocaseCache.set(s, n);
-      return n;
+    Archiver2.prototype._transform = function(chunk, encoding, callback) {
+      if (chunk) {
+        this._pointer += chunk.length;
+      }
+      callback(null, chunk);
     };
-    var ResolveCache = class extends lru_cache_1.LRUCache {
-      constructor() {
-        super({ max: 256 });
+    Archiver2.prototype._updateQueueTaskWithStats = function(task, stats) {
+      if (stats.isFile()) {
+        task.data.type = "file";
+        task.data.sourceType = "stream";
+        task.source = util3.lazyReadStream(task.filepath);
+      } else if (stats.isDirectory() && this._moduleSupports("directory")) {
+        task.data.name = util3.trailingSlashIt(task.data.name);
+        task.data.type = "directory";
+        task.data.sourcePath = util3.trailingSlashIt(task.filepath);
+        task.data.sourceType = "buffer";
+        task.source = Buffer.concat([]);
+      } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
+        var linkPath = fs31.readlinkSync(task.filepath);
+        var dirName = path29.dirname(task.filepath);
+        task.data.type = "symlink";
+        task.data.linkname = path29.relative(dirName, path29.resolve(dirName, linkPath));
+        task.data.sourceType = "buffer";
+        task.source = Buffer.concat([]);
+      } else {
+        if (stats.isDirectory()) {
+          this.emit("warning", new ArchiverError2("DIRECTORYNOTSUPPORTED", task.data));
+        } else if (stats.isSymbolicLink()) {
+          this.emit("warning", new ArchiverError2("SYMLINKNOTSUPPORTED", task.data));
+        } else {
+          this.emit("warning", new ArchiverError2("ENTRYNOTSUPPORTED", task.data));
+        }
+        return null;
       }
+      task.data = this._normalizeEntryData(task.data, stats);
+      return task;
     };
-    exports2.ResolveCache = ResolveCache;
-    var ChildrenCache = class extends lru_cache_1.LRUCache {
-      constructor(maxSize = 16 * 1024) {
-        super({
-          maxSize,
-          // parent + children
-          sizeCalculation: (a) => a.length + 1
-        });
+    Archiver2.prototype.abort = function() {
+      if (this._state.aborted || this._state.finalized) {
+        return this;
       }
+      this._abort();
+      return this;
     };
-    exports2.ChildrenCache = ChildrenCache;
-    var setAsCwd = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
-    var PathBase = class {
-      /**
-       * the basename of this path
-       *
-       * **Important**: *always* test the path name against any test string
-       * usingthe {@link isNamed} method, and not by directly comparing this
-       * string. Otherwise, unicode path strings that the system sees as identical
-       * will not be properly treated as the same path, leading to incorrect
-       * behavior and possible security issues.
-       */
-      name;
-      /**
-       * the Path entry corresponding to the path root.
-       *
-       * @internal
-       */
-      root;
-      /**
-       * All roots found within the current PathScurry family
-       *
-       * @internal
-       */
-      roots;
-      /**
-       * a reference to the parent path, or undefined in the case of root entries
-       *
-       * @internal
-       */
-      parent;
-      /**
-       * boolean indicating whether paths are compared case-insensitively
-       * @internal
-       */
-      nocase;
-      /**
-       * boolean indicating that this path is the current working directory
-       * of the PathScurry collection that contains it.
-       */
-      isCWD = false;
-      // potential default fs override
-      #fs;
-      // Stats fields
-      #dev;
-      get dev() {
-        return this.#dev;
+    Archiver2.prototype.append = function(source, data) {
+      if (this._state.finalize || this._state.aborted) {
+        this.emit("error", new ArchiverError2("QUEUECLOSED"));
+        return this;
       }
-      #mode;
-      get mode() {
-        return this.#mode;
+      data = this._normalizeEntryData(data);
+      if (typeof data.name !== "string" || data.name.length === 0) {
+        this.emit("error", new ArchiverError2("ENTRYNAMEREQUIRED"));
+        return this;
       }
-      #nlink;
-      get nlink() {
-        return this.#nlink;
+      if (data.type === "directory" && !this._moduleSupports("directory")) {
+        this.emit("error", new ArchiverError2("DIRECTORYNOTSUPPORTED", { name: data.name }));
+        return this;
       }
-      #uid;
-      get uid() {
-        return this.#uid;
+      source = util3.normalizeInputSource(source);
+      if (Buffer.isBuffer(source)) {
+        data.sourceType = "buffer";
+      } else if (util3.isStream(source)) {
+        data.sourceType = "stream";
+      } else {
+        this.emit("error", new ArchiverError2("INPUTSTEAMBUFFERREQUIRED", { name: data.name }));
+        return this;
       }
-      #gid;
-      get gid() {
-        return this.#gid;
+      this._entriesCount++;
+      this._queue.push({
+        data,
+        source
+      });
+      return this;
+    };
+    Archiver2.prototype.directory = function(dirpath, destpath, data) {
+      if (this._state.finalize || this._state.aborted) {
+        this.emit("error", new ArchiverError2("QUEUECLOSED"));
+        return this;
       }
-      #rdev;
-      get rdev() {
-        return this.#rdev;
+      if (typeof dirpath !== "string" || dirpath.length === 0) {
+        this.emit("error", new ArchiverError2("DIRECTORYDIRPATHREQUIRED"));
+        return this;
       }
-      #blksize;
-      get blksize() {
-        return this.#blksize;
+      this._pending++;
+      if (destpath === false) {
+        destpath = "";
+      } else if (typeof destpath !== "string") {
+        destpath = dirpath;
       }
-      #ino;
-      get ino() {
-        return this.#ino;
+      var dataFunction = false;
+      if (typeof data === "function") {
+        dataFunction = data;
+        data = {};
+      } else if (typeof data !== "object") {
+        data = {};
       }
-      #size;
-      get size() {
-        return this.#size;
+      var globOptions = {
+        stat: true,
+        dot: true
+      };
+      function onGlobEnd() {
+        this._pending--;
+        this._maybeFinalize();
       }
-      #blocks;
-      get blocks() {
-        return this.#blocks;
+      function onGlobError(err) {
+        this.emit("error", err);
       }
-      #atimeMs;
-      get atimeMs() {
-        return this.#atimeMs;
+      function onGlobMatch(match2) {
+        globber.pause();
+        var ignoreMatch = false;
+        var entryData = Object.assign({}, data);
+        entryData.name = match2.relative;
+        entryData.prefix = destpath;
+        entryData.stats = match2.stat;
+        entryData.callback = globber.resume.bind(globber);
+        try {
+          if (dataFunction) {
+            entryData = dataFunction(entryData);
+            if (entryData === false) {
+              ignoreMatch = true;
+            } else if (typeof entryData !== "object") {
+              throw new ArchiverError2("DIRECTORYFUNCTIONINVALIDDATA", { dirpath });
+            }
+          }
+        } catch (e) {
+          this.emit("error", e);
+          return;
+        }
+        if (ignoreMatch) {
+          globber.resume();
+          return;
+        }
+        this._append(match2.absolute, entryData);
       }
-      #mtimeMs;
-      get mtimeMs() {
-        return this.#mtimeMs;
+      var globber = glob2(dirpath, globOptions);
+      globber.on("error", onGlobError.bind(this));
+      globber.on("match", onGlobMatch.bind(this));
+      globber.on("end", onGlobEnd.bind(this));
+      return this;
+    };
+    Archiver2.prototype.file = function(filepath, data) {
+      if (this._state.finalize || this._state.aborted) {
+        this.emit("error", new ArchiverError2("QUEUECLOSED"));
+        return this;
       }
-      #ctimeMs;
-      get ctimeMs() {
-        return this.#ctimeMs;
+      if (typeof filepath !== "string" || filepath.length === 0) {
+        this.emit("error", new ArchiverError2("FILEFILEPATHREQUIRED"));
+        return this;
       }
-      #birthtimeMs;
-      get birthtimeMs() {
-        return this.#birthtimeMs;
+      this._append(filepath, data);
+      return this;
+    };
+    Archiver2.prototype.glob = function(pattern, options, data) {
+      this._pending++;
+      options = util3.defaults(options, {
+        stat: true,
+        pattern
+      });
+      function onGlobEnd() {
+        this._pending--;
+        this._maybeFinalize();
       }
-      #atime;
-      get atime() {
-        return this.#atime;
+      function onGlobError(err) {
+        this.emit("error", err);
       }
-      #mtime;
-      get mtime() {
-        return this.#mtime;
+      function onGlobMatch(match2) {
+        globber.pause();
+        var entryData = Object.assign({}, data);
+        entryData.callback = globber.resume.bind(globber);
+        entryData.stats = match2.stat;
+        entryData.name = match2.relative;
+        this._append(match2.absolute, entryData);
       }
-      #ctime;
-      get ctime() {
-        return this.#ctime;
+      var globber = glob2(options.cwd || ".", options);
+      globber.on("error", onGlobError.bind(this));
+      globber.on("match", onGlobMatch.bind(this));
+      globber.on("end", onGlobEnd.bind(this));
+      return this;
+    };
+    Archiver2.prototype.finalize = function() {
+      if (this._state.aborted) {
+        var abortedError = new ArchiverError2("ABORTED");
+        this.emit("error", abortedError);
+        return Promise.reject(abortedError);
       }
-      #birthtime;
-      get birthtime() {
-        return this.#birthtime;
+      if (this._state.finalize) {
+        var finalizingError = new ArchiverError2("FINALIZING");
+        this.emit("error", finalizingError);
+        return Promise.reject(finalizingError);
       }
-      #matchName;
-      #depth;
-      #fullpath;
-      #fullpathPosix;
-      #relative;
-      #relativePosix;
-      #type;
-      #children;
-      #linkTarget;
-      #realpath;
-      /**
-       * This property is for compatibility with the Dirent class as of
-       * Node v20, where Dirent['parentPath'] refers to the path of the
-       * directory that was passed to readdir. For root entries, it's the path
-       * to the entry itself.
-       */
-      get parentPath() {
-        return (this.parent || this).fullpath();
+      this._state.finalize = true;
+      if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+        this._finalize();
       }
-      /**
-       * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
-       * this property refers to the *parent* path, not the path object itself.
-       *
-       * @deprecated
-       */
-      get path() {
-        return this.parentPath;
+      var self2 = this;
+      return new Promise(function(resolve14, reject) {
+        var errored;
+        self2._module.on("end", function() {
+          if (!errored) {
+            resolve14();
+          }
+        });
+        self2._module.on("error", function(err) {
+          errored = true;
+          reject(err);
+        });
+      });
+    };
+    Archiver2.prototype.setFormat = function(format) {
+      if (this._format) {
+        this.emit("error", new ArchiverError2("FORMATSET"));
+        return this;
       }
-      /**
-       * Do not create new Path objects directly.  They should always be accessed
-       * via the PathScurry class or other methods on the Path class.
-       *
-       * @internal
-       */
-      constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) {
-        this.name = name;
-        this.#matchName = nocase ? normalizeNocase(name) : normalize3(name);
-        this.#type = type2 & TYPEMASK;
-        this.nocase = nocase;
-        this.roots = roots;
-        this.root = root || this;
-        this.#children = children;
-        this.#fullpath = opts.fullpath;
-        this.#relative = opts.relative;
-        this.#relativePosix = opts.relativePosix;
-        this.parent = opts.parent;
-        if (this.parent) {
-          this.#fs = this.parent.#fs;
-        } else {
-          this.#fs = fsFromOption(opts.fs);
-        }
+      this._format = format;
+      return this;
+    };
+    Archiver2.prototype.setModule = function(module3) {
+      if (this._state.aborted) {
+        this.emit("error", new ArchiverError2("ABORTED"));
+        return this;
       }
-      /**
-       * Returns the depth of the Path object from its root.
-       *
-       * For example, a path at `/foo/bar` would have a depth of 2.
-       */
-      depth() {
-        if (this.#depth !== void 0)
-          return this.#depth;
-        if (!this.parent)
-          return this.#depth = 0;
-        return this.#depth = this.parent.depth() + 1;
+      if (this._state.module) {
+        this.emit("error", new ArchiverError2("MODULESET"));
+        return this;
       }
-      /**
-       * @internal
-       */
-      childrenCache() {
-        return this.#children;
+      this._module = module3;
+      this._modulePipe();
+      return this;
+    };
+    Archiver2.prototype.symlink = function(filepath, target, mode) {
+      if (this._state.finalize || this._state.aborted) {
+        this.emit("error", new ArchiverError2("QUEUECLOSED"));
+        return this;
       }
-      /**
-       * Get the Path object referenced by the string path, resolved from this Path
-       */
-      resolve(path28) {
-        if (!path28) {
-          return this;
-        }
-        const rootPath = this.getRootString(path28);
-        const dir = path28.substring(rootPath.length);
-        const dirParts = dir.split(this.splitSep);
-        const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
-        return result;
+      if (typeof filepath !== "string" || filepath.length === 0) {
+        this.emit("error", new ArchiverError2("SYMLINKFILEPATHREQUIRED"));
+        return this;
       }
-      #resolveParts(dirParts) {
-        let p = this;
-        for (const part of dirParts) {
-          p = p.child(part);
-        }
-        return p;
+      if (typeof target !== "string" || target.length === 0) {
+        this.emit("error", new ArchiverError2("SYMLINKTARGETREQUIRED", { filepath }));
+        return this;
       }
-      /**
-       * Returns the cached children Path objects, if still available.  If they
-       * have fallen out of the cache, then returns an empty array, and resets the
-       * READDIR_CALLED bit, so that future calls to readdir() will require an fs
-       * lookup.
-       *
-       * @internal
-       */
-      children() {
-        const cached = this.#children.get(this);
-        if (cached) {
-          return cached;
-        }
-        const children = Object.assign([], { provisional: 0 });
-        this.#children.set(this, children);
-        this.#type &= ~READDIR_CALLED;
-        return children;
+      if (!this._moduleSupports("symlink")) {
+        this.emit("error", new ArchiverError2("SYMLINKNOTSUPPORTED", { filepath }));
+        return this;
       }
-      /**
-       * Resolves a path portion and returns or creates the child Path.
-       *
-       * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
-       * `'..'`.
-       *
-       * This should not be called directly.  If `pathPart` contains any path
-       * separators, it will lead to unsafe undefined behavior.
-       *
-       * Use `Path.resolve()` instead.
-       *
-       * @internal
-       */
-      child(pathPart, opts) {
-        if (pathPart === "" || pathPart === ".") {
-          return this;
-        }
-        if (pathPart === "..") {
-          return this.parent || this;
-        }
-        const children = this.children();
-        const name = this.nocase ? normalizeNocase(pathPart) : normalize3(pathPart);
-        for (const p of children) {
-          if (p.#matchName === name) {
-            return p;
-          }
-        }
-        const s = this.parent ? this.sep : "";
-        const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : void 0;
-        const pchild = this.newChild(pathPart, UNKNOWN, {
-          ...opts,
-          parent: this,
-          fullpath
-        });
-        if (!this.canReaddir()) {
-          pchild.#type |= ENOENT;
-        }
-        children.push(pchild);
-        return pchild;
-      }
-      /**
-       * The relative path from the cwd. If it does not share an ancestor with
-       * the cwd, then this ends up being equivalent to the fullpath()
-       */
-      relative() {
-        if (this.isCWD)
-          return "";
-        if (this.#relative !== void 0) {
-          return this.#relative;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-          return this.#relative = this.name;
-        }
-        const pv = p.relative();
-        return pv + (!pv || !p.parent ? "" : this.sep) + name;
-      }
-      /**
-       * The relative path from the cwd, using / as the path separator.
-       * If it does not share an ancestor with
-       * the cwd, then this ends up being equivalent to the fullpathPosix()
-       * On posix systems, this is identical to relative().
-       */
-      relativePosix() {
-        if (this.sep === "/")
-          return this.relative();
-        if (this.isCWD)
-          return "";
-        if (this.#relativePosix !== void 0)
-          return this.#relativePosix;
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-          return this.#relativePosix = this.fullpathPosix();
-        }
-        const pv = p.relativePosix();
-        return pv + (!pv || !p.parent ? "" : "/") + name;
+      var data = {};
+      data.type = "symlink";
+      data.name = filepath.replace(/\\/g, "/");
+      data.linkname = target.replace(/\\/g, "/");
+      data.sourceType = "buffer";
+      if (typeof mode === "number") {
+        data.mode = mode;
       }
-      /**
-       * The fully resolved path string for this Path entry
-       */
-      fullpath() {
-        if (this.#fullpath !== void 0) {
-          return this.#fullpath;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-          return this.#fullpath = this.name;
-        }
-        const pv = p.fullpath();
-        const fp = pv + (!p.parent ? "" : this.sep) + name;
-        return this.#fullpath = fp;
+      this._entriesCount++;
+      this._queue.push({
+        data,
+        source: Buffer.concat([])
+      });
+      return this;
+    };
+    Archiver2.prototype.pointer = function() {
+      return this._pointer;
+    };
+    Archiver2.prototype.use = function(plugin) {
+      this._streams.push(plugin);
+      return this;
+    };
+    module2.exports = Archiver2;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/archive-entry.js
+var require_archive_entry = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/archive-entry.js"(exports2, module2) {
+    var ArchiveEntry2 = module2.exports = function() {
+    };
+    ArchiveEntry2.prototype.getName = function() {
+    };
+    ArchiveEntry2.prototype.getSize = function() {
+    };
+    ArchiveEntry2.prototype.getLastModifiedDate = function() {
+    };
+    ArchiveEntry2.prototype.isDirectory = function() {
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/util.js
+var require_util14 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) {
+    var util3 = module2.exports = {};
+    util3.dateToDos = function(d, forceLocalTime) {
+      forceLocalTime = forceLocalTime || false;
+      var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear();
+      if (year < 1980) {
+        return 2162688;
+      } else if (year >= 2044) {
+        return 2141175677;
       }
-      /**
-       * On platforms other than windows, this is identical to fullpath.
-       *
-       * On windows, this is overridden to return the forward-slash form of the
-       * full UNC path.
-       */
-      fullpathPosix() {
-        if (this.#fullpathPosix !== void 0)
-          return this.#fullpathPosix;
-        if (this.sep === "/")
-          return this.#fullpathPosix = this.fullpath();
-        if (!this.parent) {
-          const p2 = this.fullpath().replace(/\\/g, "/");
-          if (/^[a-z]:\//i.test(p2)) {
-            return this.#fullpathPosix = `//?/${p2}`;
-          } else {
-            return this.#fullpathPosix = p2;
-          }
-        }
-        const p = this.parent;
-        const pfpp = p.fullpathPosix();
-        const fpp = pfpp + (!pfpp || !p.parent ? "" : "/") + this.name;
-        return this.#fullpathPosix = fpp;
+      var val = {
+        year,
+        month: forceLocalTime ? d.getMonth() : d.getUTCMonth(),
+        date: forceLocalTime ? d.getDate() : d.getUTCDate(),
+        hours: forceLocalTime ? d.getHours() : d.getUTCHours(),
+        minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(),
+        seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds()
+      };
+      return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2;
+    };
+    util3.dosToDate = function(dos) {
+      return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1);
+    };
+    util3.fromDosTime = function(buf) {
+      return util3.dosToDate(buf.readUInt32LE(0));
+    };
+    util3.getEightBytes = function(v) {
+      var buf = Buffer.alloc(8);
+      buf.writeUInt32LE(v % 4294967296, 0);
+      buf.writeUInt32LE(v / 4294967296 | 0, 4);
+      return buf;
+    };
+    util3.getShortBytes = function(v) {
+      var buf = Buffer.alloc(2);
+      buf.writeUInt16LE((v & 65535) >>> 0, 0);
+      return buf;
+    };
+    util3.getShortBytesValue = function(buf, offset) {
+      return buf.readUInt16LE(offset);
+    };
+    util3.getLongBytes = function(v) {
+      var buf = Buffer.alloc(4);
+      buf.writeUInt32LE((v & 4294967295) >>> 0, 0);
+      return buf;
+    };
+    util3.getLongBytesValue = function(buf, offset) {
+      return buf.readUInt32LE(offset);
+    };
+    util3.toDosTime = function(d) {
+      return util3.getLongBytes(util3.dateToDos(d));
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
+var require_general_purpose_bit = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) {
+    var zipUtil = require_util14();
+    var DATA_DESCRIPTOR_FLAG2 = 1 << 3;
+    var ENCRYPTION_FLAG2 = 1 << 0;
+    var NUMBER_OF_SHANNON_FANO_TREES_FLAG2 = 1 << 2;
+    var SLIDING_DICTIONARY_SIZE_FLAG2 = 1 << 1;
+    var STRONG_ENCRYPTION_FLAG2 = 1 << 6;
+    var UFT8_NAMES_FLAG2 = 1 << 11;
+    var GeneralPurposeBit2 = module2.exports = function() {
+      if (!(this instanceof GeneralPurposeBit2)) {
+        return new GeneralPurposeBit2();
       }
+      this.descriptor = false;
+      this.encryption = false;
+      this.utf8 = false;
+      this.numberOfShannonFanoTrees = 0;
+      this.strongEncryption = false;
+      this.slidingDictionarySize = 0;
+      return this;
+    };
+    GeneralPurposeBit2.prototype.encode = function() {
+      return zipUtil.getShortBytes(
+        (this.descriptor ? DATA_DESCRIPTOR_FLAG2 : 0) | (this.utf8 ? UFT8_NAMES_FLAG2 : 0) | (this.encryption ? ENCRYPTION_FLAG2 : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG2 : 0)
+      );
+    };
+    GeneralPurposeBit2.prototype.parse = function(buf, offset) {
+      var flag = zipUtil.getShortBytesValue(buf, offset);
+      var gbp = new GeneralPurposeBit2();
+      gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG2) !== 0);
+      gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG2) !== 0);
+      gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG2) !== 0);
+      gbp.useEncryption((flag & ENCRYPTION_FLAG2) !== 0);
+      gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG2) !== 0 ? 8192 : 4096);
+      gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG2) !== 0 ? 3 : 2);
+      return gbp;
+    };
+    GeneralPurposeBit2.prototype.setNumberOfShannonFanoTrees = function(n) {
+      this.numberOfShannonFanoTrees = n;
+    };
+    GeneralPurposeBit2.prototype.getNumberOfShannonFanoTrees = function() {
+      return this.numberOfShannonFanoTrees;
+    };
+    GeneralPurposeBit2.prototype.setSlidingDictionarySize = function(n) {
+      this.slidingDictionarySize = n;
+    };
+    GeneralPurposeBit2.prototype.getSlidingDictionarySize = function() {
+      return this.slidingDictionarySize;
+    };
+    GeneralPurposeBit2.prototype.useDataDescriptor = function(b) {
+      this.descriptor = b;
+    };
+    GeneralPurposeBit2.prototype.usesDataDescriptor = function() {
+      return this.descriptor;
+    };
+    GeneralPurposeBit2.prototype.useEncryption = function(b) {
+      this.encryption = b;
+    };
+    GeneralPurposeBit2.prototype.usesEncryption = function() {
+      return this.encryption;
+    };
+    GeneralPurposeBit2.prototype.useStrongEncryption = function(b) {
+      this.strongEncryption = b;
+    };
+    GeneralPurposeBit2.prototype.usesStrongEncryption = function() {
+      return this.strongEncryption;
+    };
+    GeneralPurposeBit2.prototype.useUTF8ForNames = function(b) {
+      this.utf8 = b;
+    };
+    GeneralPurposeBit2.prototype.usesUTF8ForNames = function() {
+      return this.utf8;
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/unix-stat.js
+var require_unix_stat = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/unix-stat.js"(exports2, module2) {
+    module2.exports = {
       /**
-       * Is the Path of an unknown type?
-       *
-       * Note that we might know *something* about it if there has been a previous
-       * filesystem operation, for example that it does not exist, or is not a
-       * link, or whether it has child entries.
+       * Bits used for permissions (and sticky bit)
        */
-      isUnknown() {
-        return (this.#type & IFMT) === UNKNOWN;
-      }
-      isType(type2) {
-        return this[`is${type2}`]();
-      }
-      getType() {
-        return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : (
-          /* c8 ignore start */
-          this.isSocket() ? "Socket" : "Unknown"
-        );
-      }
+      PERM_MASK: 4095,
+      // 07777
       /**
-       * Is the Path a regular file?
+       * Bits used to indicate the filesystem object type.
        */
-      isFile() {
-        return (this.#type & IFMT) === IFREG;
-      }
+      FILE_TYPE_FLAG: 61440,
+      // 0170000
       /**
-       * Is the Path a directory?
+       * Indicates symbolic links.
        */
-      isDirectory() {
-        return (this.#type & IFMT) === IFDIR;
-      }
+      LINK_FLAG: 40960,
+      // 0120000
       /**
-       * Is the path a character device?
+       * Indicates plain files.
        */
-      isCharacterDevice() {
-        return (this.#type & IFMT) === IFCHR;
-      }
+      FILE_FLAG: 32768,
+      // 0100000
       /**
-       * Is the path a block device?
+       * Indicates directories.
        */
-      isBlockDevice() {
-        return (this.#type & IFMT) === IFBLK;
-      }
+      DIR_FLAG: 16384,
+      // 040000
+      // ----------------------------------------------------------
+      // somewhat arbitrary choices that are quite common for shared
+      // installations
+      // -----------------------------------------------------------
       /**
-       * Is the path a FIFO pipe?
+       * Default permissions for symbolic links.
        */
-      isFIFO() {
-        return (this.#type & IFMT) === IFIFO;
-      }
+      DEFAULT_LINK_PERM: 511,
+      // 0777
       /**
-       * Is the path a socket?
+       * Default permissions for directories.
        */
-      isSocket() {
-        return (this.#type & IFMT) === IFSOCK;
-      }
+      DEFAULT_DIR_PERM: 493,
+      // 0755
       /**
-       * Is the path a symbolic link?
+       * Default permissions for plain files.
        */
-      isSymbolicLink() {
-        return (this.#type & IFLNK) === IFLNK;
+      DEFAULT_FILE_PERM: 420
+      // 0644
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/constants.js
+var require_constants13 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) {
+    module2.exports = {
+      WORD: 4,
+      DWORD: 8,
+      EMPTY: Buffer.alloc(0),
+      SHORT: 2,
+      SHORT_MASK: 65535,
+      SHORT_SHIFT: 16,
+      SHORT_ZERO: Buffer.from(Array(2)),
+      LONG: 4,
+      LONG_ZERO: Buffer.from(Array(4)),
+      MIN_VERSION_INITIAL: 10,
+      MIN_VERSION_DATA_DESCRIPTOR: 20,
+      MIN_VERSION_ZIP64: 45,
+      VERSION_MADEBY: 45,
+      METHOD_STORED: 0,
+      METHOD_DEFLATED: 8,
+      PLATFORM_UNIX: 3,
+      PLATFORM_FAT: 0,
+      SIG_LFH: 67324752,
+      SIG_DD: 134695760,
+      SIG_CFH: 33639248,
+      SIG_EOCD: 101010256,
+      SIG_ZIP64_EOCD: 101075792,
+      SIG_ZIP64_EOCD_LOC: 117853008,
+      ZIP64_MAGIC_SHORT: 65535,
+      ZIP64_MAGIC: 4294967295,
+      ZIP64_EXTRA_ID: 1,
+      ZLIB_NO_COMPRESSION: 0,
+      ZLIB_BEST_SPEED: 1,
+      ZLIB_BEST_COMPRESSION: 9,
+      ZLIB_DEFAULT_COMPRESSION: -1,
+      MODE_MASK: 4095,
+      DEFAULT_FILE_MODE: 33188,
+      // 010644 = -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+      DEFAULT_DIR_MODE: 16877,
+      // 040755 = drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+      EXT_FILE_ATTR_DIR: 1106051088,
+      // 010173200020 = drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D)
+      EXT_FILE_ATTR_FILE: 2175008800,
+      // 020151000040 = -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0
+      // Unix file types
+      S_IFMT: 61440,
+      // 0170000 type of file mask
+      S_IFIFO: 4096,
+      // 010000 named pipe (fifo)
+      S_IFCHR: 8192,
+      // 020000 character special
+      S_IFDIR: 16384,
+      // 040000 directory
+      S_IFBLK: 24576,
+      // 060000 block special
+      S_IFREG: 32768,
+      // 0100000 regular
+      S_IFLNK: 40960,
+      // 0120000 symbolic link
+      S_IFSOCK: 49152,
+      // 0140000 socket
+      // DOS file type flags
+      S_DOS_A: 32,
+      // 040 Archive
+      S_DOS_D: 16,
+      // 020 Directory
+      S_DOS_V: 8,
+      // 010 Volume
+      S_DOS_S: 4,
+      // 04 System
+      S_DOS_H: 2,
+      // 02 Hidden
+      S_DOS_R: 1
+      // 01 Read Only
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
+var require_zip_archive_entry = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js"(exports2, module2) {
+    var inherits = require("util").inherits;
+    var normalizePath4 = require_normalize_path();
+    var ArchiveEntry2 = require_archive_entry();
+    var GeneralPurposeBit2 = require_general_purpose_bit();
+    var UnixStat = require_unix_stat();
+    var constants = require_constants13();
+    var zipUtil = require_util14();
+    var ZipArchiveEntry2 = module2.exports = function(name) {
+      if (!(this instanceof ZipArchiveEntry2)) {
+        return new ZipArchiveEntry2(name);
       }
-      /**
-       * Return the entry if it has been subject of a successful lstat, or
-       * undefined otherwise.
-       *
-       * Does not read the filesystem, so an undefined result *could* simply
-       * mean that we haven't called lstat on it.
-       */
-      lstatCached() {
-        return this.#type & LSTAT_CALLED ? this : void 0;
+      ArchiveEntry2.call(this);
+      this.platform = constants.PLATFORM_FAT;
+      this.method = -1;
+      this.name = null;
+      this.size = 0;
+      this.csize = 0;
+      this.gpb = new GeneralPurposeBit2();
+      this.crc = 0;
+      this.time = -1;
+      this.minver = constants.MIN_VERSION_INITIAL;
+      this.mode = -1;
+      this.extra = null;
+      this.exattr = 0;
+      this.inattr = 0;
+      this.comment = null;
+      if (name) {
+        this.setName(name);
       }
-      /**
-       * Return the cached link target if the entry has been the subject of a
-       * successful readlink, or undefined otherwise.
-       *
-       * Does not read the filesystem, so an undefined result *could* just mean we
-       * don't have any cached data. Only use it if you are very sure that a
-       * readlink() has been called at some point.
-       */
-      readlinkCached() {
-        return this.#linkTarget;
+    };
+    inherits(ZipArchiveEntry2, ArchiveEntry2);
+    ZipArchiveEntry2.prototype.getCentralDirectoryExtra = function() {
+      return this.getExtra();
+    };
+    ZipArchiveEntry2.prototype.getComment = function() {
+      return this.comment !== null ? this.comment : "";
+    };
+    ZipArchiveEntry2.prototype.getCompressedSize = function() {
+      return this.csize;
+    };
+    ZipArchiveEntry2.prototype.getCrc = function() {
+      return this.crc;
+    };
+    ZipArchiveEntry2.prototype.getExternalAttributes = function() {
+      return this.exattr;
+    };
+    ZipArchiveEntry2.prototype.getExtra = function() {
+      return this.extra !== null ? this.extra : constants.EMPTY;
+    };
+    ZipArchiveEntry2.prototype.getGeneralPurposeBit = function() {
+      return this.gpb;
+    };
+    ZipArchiveEntry2.prototype.getInternalAttributes = function() {
+      return this.inattr;
+    };
+    ZipArchiveEntry2.prototype.getLastModifiedDate = function() {
+      return this.getTime();
+    };
+    ZipArchiveEntry2.prototype.getLocalFileDataExtra = function() {
+      return this.getExtra();
+    };
+    ZipArchiveEntry2.prototype.getMethod = function() {
+      return this.method;
+    };
+    ZipArchiveEntry2.prototype.getName = function() {
+      return this.name;
+    };
+    ZipArchiveEntry2.prototype.getPlatform = function() {
+      return this.platform;
+    };
+    ZipArchiveEntry2.prototype.getSize = function() {
+      return this.size;
+    };
+    ZipArchiveEntry2.prototype.getTime = function() {
+      return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
+    };
+    ZipArchiveEntry2.prototype.getTimeDos = function() {
+      return this.time !== -1 ? this.time : 0;
+    };
+    ZipArchiveEntry2.prototype.getUnixMode = function() {
+      return this.platform !== constants.PLATFORM_UNIX ? 0 : this.getExternalAttributes() >> constants.SHORT_SHIFT & constants.SHORT_MASK;
+    };
+    ZipArchiveEntry2.prototype.getVersionNeededToExtract = function() {
+      return this.minver;
+    };
+    ZipArchiveEntry2.prototype.setComment = function(comment) {
+      if (Buffer.byteLength(comment) !== comment.length) {
+        this.getGeneralPurposeBit().useUTF8ForNames(true);
       }
-      /**
-       * Returns the cached realpath target if the entry has been the subject
-       * of a successful realpath, or undefined otherwise.
-       *
-       * Does not read the filesystem, so an undefined result *could* just mean we
-       * don't have any cached data. Only use it if you are very sure that a
-       * realpath() has been called at some point.
-       */
-      realpathCached() {
-        return this.#realpath;
+      this.comment = comment;
+    };
+    ZipArchiveEntry2.prototype.setCompressedSize = function(size) {
+      if (size < 0) {
+        throw new Error("invalid entry compressed size");
       }
-      /**
-       * Returns the cached child Path entries array if the entry has been the
-       * subject of a successful readdir(), or [] otherwise.
-       *
-       * Does not read the filesystem, so an empty array *could* just mean we
-       * don't have any cached data. Only use it if you are very sure that a
-       * readdir() has been called recently enough to still be valid.
-       */
-      readdirCached() {
-        const children = this.children();
-        return children.slice(0, children.provisional);
+      this.csize = size;
+    };
+    ZipArchiveEntry2.prototype.setCrc = function(crc) {
+      if (crc < 0) {
+        throw new Error("invalid entry crc32");
       }
-      /**
-       * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
-       * any indication that readlink will definitely fail.
-       *
-       * Returns false if the path is known to not be a symlink, if a previous
-       * readlink failed, or if the entry does not exist.
-       */
-      canReadlink() {
-        if (this.#linkTarget)
-          return true;
-        if (!this.parent)
-          return false;
-        const ifmt = this.#type & IFMT;
-        return !(ifmt !== UNKNOWN && ifmt !== IFLNK || this.#type & ENOREADLINK || this.#type & ENOENT);
+      this.crc = crc;
+    };
+    ZipArchiveEntry2.prototype.setExternalAttributes = function(attr) {
+      this.exattr = attr >>> 0;
+    };
+    ZipArchiveEntry2.prototype.setExtra = function(extra) {
+      this.extra = extra;
+    };
+    ZipArchiveEntry2.prototype.setGeneralPurposeBit = function(gpb) {
+      if (!(gpb instanceof GeneralPurposeBit2)) {
+        throw new Error("invalid entry GeneralPurposeBit");
       }
-      /**
-       * Return true if readdir has previously been successfully called on this
-       * path, indicating that cachedReaddir() is likely valid.
-       */
-      calledReaddir() {
-        return !!(this.#type & READDIR_CALLED);
+      this.gpb = gpb;
+    };
+    ZipArchiveEntry2.prototype.setInternalAttributes = function(attr) {
+      this.inattr = attr;
+    };
+    ZipArchiveEntry2.prototype.setMethod = function(method) {
+      if (method < 0) {
+        throw new Error("invalid entry compression method");
       }
-      /**
-       * Returns true if the path is known to not exist. That is, a previous lstat
-       * or readdir failed to verify its existence when that would have been
-       * expected, or a parent entry was marked either enoent or enotdir.
-       */
-      isENOENT() {
-        return !!(this.#type & ENOENT);
+      this.method = method;
+    };
+    ZipArchiveEntry2.prototype.setName = function(name, prependSlash = false) {
+      name = normalizePath4(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
+      if (prependSlash) {
+        name = `/${name}`;
       }
-      /**
-       * Return true if the path is a match for the given path name.  This handles
-       * case sensitivity and unicode normalization.
-       *
-       * Note: even on case-sensitive systems, it is **not** safe to test the
-       * equality of the `.name` property to determine whether a given pathname
-       * matches, due to unicode normalization mismatches.
-       *
-       * Always use this method instead of testing the `path.name` property
-       * directly.
-       */
-      isNamed(n) {
-        return !this.nocase ? this.#matchName === normalize3(n) : this.#matchName === normalizeNocase(n);
+      if (Buffer.byteLength(name) !== name.length) {
+        this.getGeneralPurposeBit().useUTF8ForNames(true);
       }
-      /**
-       * Return the Path object corresponding to the target of a symbolic link.
-       *
-       * If the Path is not a symbolic link, or if the readlink call fails for any
-       * reason, `undefined` is returned.
-       *
-       * Result is cached, and thus may be outdated if the filesystem is mutated.
-       */
-      async readlink() {
-        const target = this.#linkTarget;
-        if (target) {
-          return target;
-        }
-        if (!this.canReadlink()) {
-          return void 0;
-        }
-        if (!this.parent) {
-          return void 0;
-        }
-        try {
-          const read = await this.#fs.promises.readlink(this.fullpath());
-          const linkTarget = (await this.parent.realpath())?.resolve(read);
-          if (linkTarget) {
-            return this.#linkTarget = linkTarget;
-          }
-        } catch (er) {
-          this.#readlinkFail(er.code);
-          return void 0;
-        }
+      this.name = name;
+    };
+    ZipArchiveEntry2.prototype.setPlatform = function(platform2) {
+      this.platform = platform2;
+    };
+    ZipArchiveEntry2.prototype.setSize = function(size) {
+      if (size < 0) {
+        throw new Error("invalid entry size");
       }
-      /**
-       * Synchronous {@link PathBase.readlink}
-       */
-      readlinkSync() {
-        const target = this.#linkTarget;
-        if (target) {
-          return target;
-        }
-        if (!this.canReadlink()) {
-          return void 0;
-        }
-        if (!this.parent) {
-          return void 0;
-        }
-        try {
-          const read = this.#fs.readlinkSync(this.fullpath());
-          const linkTarget = this.parent.realpathSync()?.resolve(read);
-          if (linkTarget) {
-            return this.#linkTarget = linkTarget;
-          }
-        } catch (er) {
-          this.#readlinkFail(er.code);
-          return void 0;
-        }
+      this.size = size;
+    };
+    ZipArchiveEntry2.prototype.setTime = function(time, forceLocalTime) {
+      if (!(time instanceof Date)) {
+        throw new Error("invalid entry time");
       }
-      #readdirSuccess(children) {
-        this.#type |= READDIR_CALLED;
-        for (let p = children.provisional; p < children.length; p++) {
-          const c = children[p];
-          if (c)
-            c.#markENOENT();
-        }
+      this.time = zipUtil.dateToDos(time, forceLocalTime);
+    };
+    ZipArchiveEntry2.prototype.setUnixMode = function(mode) {
+      mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
+      var extattr = 0;
+      extattr |= mode << constants.SHORT_SHIFT | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A);
+      this.setExternalAttributes(extattr);
+      this.mode = mode & constants.MODE_MASK;
+      this.platform = constants.PLATFORM_UNIX;
+    };
+    ZipArchiveEntry2.prototype.setVersionNeededToExtract = function(minver) {
+      this.minver = minver;
+    };
+    ZipArchiveEntry2.prototype.isDirectory = function() {
+      return this.getName().slice(-1) === "/";
+    };
+    ZipArchiveEntry2.prototype.isUnixSymlink = function() {
+      return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG;
+    };
+    ZipArchiveEntry2.prototype.isZip64 = function() {
+      return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/is-stream/index.js
+var require_is_stream2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/is-stream/index.js"(exports2, module2) {
+    "use strict";
+    var isStream2 = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function";
+    isStream2.writable = (stream2) => isStream2(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object";
+    isStream2.readable = (stream2) => isStream2(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object";
+    isStream2.duplex = (stream2) => isStream2.writable(stream2) && isStream2.readable(stream2);
+    isStream2.transform = (stream2) => isStream2.duplex(stream2) && typeof stream2._transform === "function";
+    module2.exports = isStream2;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/util/index.js
+var require_util15 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/util/index.js"(exports2, module2) {
+    var Stream = require("stream").Stream;
+    var PassThrough3 = require_ours().PassThrough;
+    var isStream2 = require_is_stream2();
+    var util3 = module2.exports = {};
+    util3.normalizeInputSource = function(source) {
+      if (source === null) {
+        return Buffer.alloc(0);
+      } else if (typeof source === "string") {
+        return Buffer.from(source);
+      } else if (isStream2(source) && !source._readableState) {
+        var normalized = new PassThrough3();
+        source.pipe(normalized);
+        return normalized;
       }
-      #markENOENT() {
-        if (this.#type & ENOENT)
-          return;
-        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
-        this.#markChildrenENOENT();
+      return source;
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/archive-output-stream.js
+var require_archive_output_stream = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/archive-output-stream.js"(exports2, module2) {
+    var inherits = require("util").inherits;
+    var isStream2 = require_is_stream2();
+    var Transform5 = require_ours().Transform;
+    var ArchiveEntry2 = require_archive_entry();
+    var util3 = require_util15();
+    var ArchiveOutputStream2 = module2.exports = function(options) {
+      if (!(this instanceof ArchiveOutputStream2)) {
+        return new ArchiveOutputStream2(options);
+      }
+      Transform5.call(this, options);
+      this.offset = 0;
+      this._archive = {
+        finish: false,
+        finished: false,
+        processing: false
+      };
+    };
+    inherits(ArchiveOutputStream2, Transform5);
+    ArchiveOutputStream2.prototype._appendBuffer = function(zae, source, callback) {
+    };
+    ArchiveOutputStream2.prototype._appendStream = function(zae, source, callback) {
+    };
+    ArchiveOutputStream2.prototype._emitErrorCallback = function(err) {
+      if (err) {
+        this.emit("error", err);
       }
-      #markChildrenENOENT() {
-        const children = this.children();
-        children.provisional = 0;
-        for (const p of children) {
-          p.#markENOENT();
-        }
+    };
+    ArchiveOutputStream2.prototype._finish = function(ae) {
+    };
+    ArchiveOutputStream2.prototype._normalizeEntry = function(ae) {
+    };
+    ArchiveOutputStream2.prototype._transform = function(chunk, encoding, callback) {
+      callback(null, chunk);
+    };
+    ArchiveOutputStream2.prototype.entry = function(ae, source, callback) {
+      source = source || null;
+      if (typeof callback !== "function") {
+        callback = this._emitErrorCallback.bind(this);
       }
-      #markENOREALPATH() {
-        this.#type |= ENOREALPATH;
-        this.#markENOTDIR();
+      if (!(ae instanceof ArchiveEntry2)) {
+        callback(new Error("not a valid instance of ArchiveEntry"));
+        return;
       }
-      // save the information when we know the entry is not a dir
-      #markENOTDIR() {
-        if (this.#type & ENOTDIR)
-          return;
-        let t = this.#type;
-        if ((t & IFMT) === IFDIR)
-          t &= IFMT_UNKNOWN;
-        this.#type = t | ENOTDIR;
-        this.#markChildrenENOENT();
-      }
-      #readdirFail(code = "") {
-        if (code === "ENOTDIR" || code === "EPERM") {
-          this.#markENOTDIR();
-        } else if (code === "ENOENT") {
-          this.#markENOENT();
-        } else {
-          this.children().provisional = 0;
-        }
+      if (this._archive.finish || this._archive.finished) {
+        callback(new Error("unacceptable entry after finish"));
+        return;
       }
-      #lstatFail(code = "") {
-        if (code === "ENOTDIR") {
-          const p = this.parent;
-          p.#markENOTDIR();
-        } else if (code === "ENOENT") {
-          this.#markENOENT();
-        }
+      if (this._archive.processing) {
+        callback(new Error("already processing an entry"));
+        return;
       }
-      #readlinkFail(code = "") {
-        let ter = this.#type;
-        ter |= ENOREADLINK;
-        if (code === "ENOENT")
-          ter |= ENOENT;
-        if (code === "EINVAL" || code === "UNKNOWN") {
-          ter &= IFMT_UNKNOWN;
-        }
-        this.#type = ter;
-        if (code === "ENOTDIR" && this.parent) {
-          this.parent.#markENOTDIR();
-        }
+      this._archive.processing = true;
+      this._normalizeEntry(ae);
+      this._entry = ae;
+      source = util3.normalizeInputSource(source);
+      if (Buffer.isBuffer(source)) {
+        this._appendBuffer(ae, source, callback);
+      } else if (isStream2(source)) {
+        this._appendStream(ae, source, callback);
+      } else {
+        this._archive.processing = false;
+        callback(new Error("input source must be valid Stream or Buffer instance"));
+        return;
       }
-      #readdirAddChild(e, c) {
-        return this.#readdirMaybePromoteChild(e, c) || this.#readdirAddNewChild(e, c);
+      return this;
+    };
+    ArchiveOutputStream2.prototype.finish = function() {
+      if (this._archive.processing) {
+        this._archive.finish = true;
+        return;
       }
-      #readdirAddNewChild(e, c) {
-        const type2 = entToType(e);
-        const child = this.newChild(e.name, type2, { parent: this });
-        const ifmt = child.#type & IFMT;
-        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
-          child.#type |= ENOTDIR;
-        }
-        c.unshift(child);
-        c.provisional++;
-        return child;
+      this._finish();
+    };
+    ArchiveOutputStream2.prototype.getBytesWritten = function() {
+      return this.offset;
+    };
+    ArchiveOutputStream2.prototype.write = function(chunk, cb) {
+      if (chunk) {
+        this.offset += chunk.length;
       }
-      #readdirMaybePromoteChild(e, c) {
-        for (let p = c.provisional; p < c.length; p++) {
-          const pchild = c[p];
-          const name = this.nocase ? normalizeNocase(e.name) : normalize3(e.name);
-          if (name !== pchild.#matchName) {
-            continue;
-          }
-          return this.#readdirPromoteChild(e, pchild, p, c);
+      return Transform5.prototype.write.call(this, chunk, cb);
+    };
+  }
+});
+
+// node_modules/crc-32/crc32.js
+var require_crc32 = __commonJS({
+  "node_modules/crc-32/crc32.js"(exports2) {
+    var CRC32;
+    (function(factory) {
+      if (typeof DO_NOT_EXPORT_CRC === "undefined") {
+        if ("object" === typeof exports2) {
+          factory(exports2);
+        } else if ("function" === typeof define && define.amd) {
+          define(function() {
+            var module3 = {};
+            factory(module3);
+            return module3;
+          });
+        } else {
+          factory(CRC32 = {});
         }
+      } else {
+        factory(CRC32 = {});
       }
-      #readdirPromoteChild(e, p, index, c) {
-        const v = p.name;
-        p.#type = p.#type & IFMT_UNKNOWN | entToType(e);
-        if (v !== e.name)
-          p.name = e.name;
-        if (index !== c.provisional) {
-          if (index === c.length - 1)
-            c.pop();
-          else
-            c.splice(index, 1);
-          c.unshift(p);
+    })(function(CRC322) {
+      CRC322.version = "1.2.2";
+      function signed_crc_table() {
+        var c = 0, table = new Array(256);
+        for (var n = 0; n != 256; ++n) {
+          c = n;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
+          table[n] = c;
         }
-        c.provisional++;
-        return p;
+        return typeof Int32Array !== "undefined" ? new Int32Array(table) : table;
       }
-      /**
-       * Call lstat() on this Path, and update all known information that can be
-       * determined.
-       *
-       * Note that unlike `fs.lstat()`, the returned value does not contain some
-       * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-       * information is required, you will need to call `fs.lstat` yourself.
-       *
-       * If the Path refers to a nonexistent file, or if the lstat call fails for
-       * any reason, `undefined` is returned.  Otherwise the updated Path object is
-       * returned.
-       *
-       * Results are cached, and thus may be out of date if the filesystem is
-       * mutated.
-       */
-      async lstat() {
-        if ((this.#type & ENOENT) === 0) {
-          try {
-            this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
-            return this;
-          } catch (er) {
-            this.#lstatFail(er.code);
-          }
+      var T0 = signed_crc_table();
+      function slice_by_16_tables(T) {
+        var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096);
+        for (n = 0; n != 256; ++n) table[n] = T[n];
+        for (n = 0; n != 256; ++n) {
+          v = T[n];
+          for (c = 256 + n; c < 4096; c += 256) v = table[c] = v >>> 8 ^ T[v & 255];
         }
+        var out = [];
+        for (n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);
+        return out;
       }
-      /**
-       * synchronous {@link PathBase.lstat}
-       */
-      lstatSync() {
-        if ((this.#type & ENOENT) === 0) {
-          try {
-            this.#applyStat(this.#fs.lstatSync(this.fullpath()));
-            return this;
-          } catch (er) {
-            this.#lstatFail(er.code);
-          }
-        }
-      }
-      #applyStat(st) {
-        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid } = st;
-        this.#atime = atime;
-        this.#atimeMs = atimeMs;
-        this.#birthtime = birthtime;
-        this.#birthtimeMs = birthtimeMs;
-        this.#blksize = blksize;
-        this.#blocks = blocks;
-        this.#ctime = ctime;
-        this.#ctimeMs = ctimeMs;
-        this.#dev = dev;
-        this.#gid = gid;
-        this.#ino = ino;
-        this.#mode = mode;
-        this.#mtime = mtime;
-        this.#mtimeMs = mtimeMs;
-        this.#nlink = nlink;
-        this.#rdev = rdev;
-        this.#size = size;
-        this.#uid = uid;
-        const ifmt = entToType(st);
-        this.#type = this.#type & IFMT_UNKNOWN | ifmt | LSTAT_CALLED;
-        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
-          this.#type |= ENOTDIR;
-        }
-      }
-      #onReaddirCB = [];
-      #readdirCBInFlight = false;
-      #callOnReaddirCB(children) {
-        this.#readdirCBInFlight = false;
-        const cbs = this.#onReaddirCB.slice();
-        this.#onReaddirCB.length = 0;
-        cbs.forEach((cb) => cb(null, children));
-      }
-      /**
-       * Standard node-style callback interface to get list of directory entries.
-       *
-       * If the Path cannot or does not contain any children, then an empty array
-       * is returned.
-       *
-       * Results are cached, and thus may be out of date if the filesystem is
-       * mutated.
-       *
-       * @param cb The callback called with (er, entries).  Note that the `er`
-       * param is somewhat extraneous, as all readdir() errors are handled and
-       * simply result in an empty set of entries being returned.
-       * @param allowZalgo Boolean indicating that immediately known results should
-       * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
-       * zalgo at your peril, the dark pony lord is devious and unforgiving.
-       */
-      readdirCB(cb, allowZalgo = false) {
-        if (!this.canReaddir()) {
-          if (allowZalgo)
-            cb(null, []);
-          else
-            queueMicrotask(() => cb(null, []));
-          return;
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-          const c = children.slice(0, children.provisional);
-          if (allowZalgo)
-            cb(null, c);
-          else
-            queueMicrotask(() => cb(null, c));
-          return;
-        }
-        this.#onReaddirCB.push(cb);
-        if (this.#readdirCBInFlight) {
-          return;
-        }
-        this.#readdirCBInFlight = true;
-        const fullpath = this.fullpath();
-        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
-          if (er) {
-            this.#readdirFail(er.code);
-            children.provisional = 0;
-          } else {
-            for (const e of entries) {
-              this.#readdirAddChild(e, children);
-            }
-            this.#readdirSuccess(children);
-          }
-          this.#callOnReaddirCB(children.slice(0, children.provisional));
-          return;
-        });
+      var TT = slice_by_16_tables(T0);
+      var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];
+      var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];
+      var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];
+      function crc32_bstr(bstr, seed) {
+        var C = seed ^ -1;
+        for (var i = 0, L = bstr.length; i < L; ) C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255];
+        return ~C;
       }
-      #asyncReaddirInFlight;
-      /**
-       * Return an array of known child entries.
-       *
-       * If the Path cannot or does not contain any children, then an empty array
-       * is returned.
-       *
-       * Results are cached, and thus may be out of date if the filesystem is
-       * mutated.
-       */
-      async readdir() {
-        if (!this.canReaddir()) {
-          return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-          return children.slice(0, children.provisional);
-        }
-        const fullpath = this.fullpath();
-        if (this.#asyncReaddirInFlight) {
-          await this.#asyncReaddirInFlight;
-        } else {
-          let resolve13 = () => {
-          };
-          this.#asyncReaddirInFlight = new Promise((res) => resolve13 = res);
-          try {
-            for (const e of await this.#fs.promises.readdir(fullpath, {
-              withFileTypes: true
-            })) {
-              this.#readdirAddChild(e, children);
-            }
-            this.#readdirSuccess(children);
-          } catch (er) {
-            this.#readdirFail(er.code);
-            children.provisional = 0;
-          }
-          this.#asyncReaddirInFlight = void 0;
-          resolve13();
-        }
-        return children.slice(0, children.provisional);
+      function crc32_buf(B, seed) {
+        var C = seed ^ -1, L = B.length - 15, i = 0;
+        for (; i < L; ) C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];
+        L += 15;
+        while (i < L) C = C >>> 8 ^ T0[(C ^ B[i++]) & 255];
+        return ~C;
       }
-      /**
-       * synchronous {@link PathBase.readdir}
-       */
-      readdirSync() {
-        if (!this.canReaddir()) {
-          return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-          return children.slice(0, children.provisional);
-        }
-        const fullpath = this.fullpath();
-        try {
-          for (const e of this.#fs.readdirSync(fullpath, {
-            withFileTypes: true
-          })) {
-            this.#readdirAddChild(e, children);
+      function crc32_str(str, seed) {
+        var C = seed ^ -1;
+        for (var i = 0, L = str.length, c = 0, d = 0; i < L; ) {
+          c = str.charCodeAt(i++);
+          if (c < 128) {
+            C = C >>> 8 ^ T0[(C ^ c) & 255];
+          } else if (c < 2048) {
+            C = C >>> 8 ^ T0[(C ^ (192 | c >> 6 & 31)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255];
+          } else if (c >= 55296 && c < 57344) {
+            c = (c & 1023) + 64;
+            d = str.charCodeAt(i++) & 1023;
+            C = C >>> 8 ^ T0[(C ^ (240 | c >> 8 & 7)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | c >> 2 & 63)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | d & 63)) & 255];
+          } else {
+            C = C >>> 8 ^ T0[(C ^ (224 | c >> 12 & 15)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | c >> 6 & 63)) & 255];
+            C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255];
           }
-          this.#readdirSuccess(children);
-        } catch (er) {
-          this.#readdirFail(er.code);
-          children.provisional = 0;
-        }
-        return children.slice(0, children.provisional);
-      }
-      canReaddir() {
-        if (this.#type & ENOCHILD)
-          return false;
-        const ifmt = IFMT & this.#type;
-        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
-          return false;
-        }
-        return true;
-      }
-      shouldWalk(dirs, walkFilter) {
-        return (this.#type & IFDIR) === IFDIR && !(this.#type & ENOCHILD) && !dirs.has(this) && (!walkFilter || walkFilter(this));
-      }
-      /**
-       * Return the Path object corresponding to path as resolved
-       * by realpath(3).
-       *
-       * If the realpath call fails for any reason, `undefined` is returned.
-       *
-       * Result is cached, and thus may be outdated if the filesystem is mutated.
-       * On success, returns a Path object.
-       */
-      async realpath() {
-        if (this.#realpath)
-          return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-          return void 0;
-        try {
-          const rp = await this.#fs.promises.realpath(this.fullpath());
-          return this.#realpath = this.resolve(rp);
-        } catch (_2) {
-          this.#markENOREALPATH();
         }
+        return ~C;
       }
-      /**
-       * Synchronous {@link realpath}
-       */
-      realpathSync() {
-        if (this.#realpath)
-          return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-          return void 0;
-        try {
-          const rp = this.#fs.realpathSync(this.fullpath());
-          return this.#realpath = this.resolve(rp);
-        } catch (_2) {
-          this.#markENOREALPATH();
-        }
+      CRC322.table = T0;
+      CRC322.bstr = crc32_bstr;
+      CRC322.buf = crc32_buf;
+      CRC322.str = crc32_str;
+    });
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/crc32-stream/lib/crc32-stream.js
+var require_crc32_stream = __commonJS({
+  "node_modules/@actions/artifact/node_modules/crc32-stream/lib/crc32-stream.js"(exports2, module2) {
+    "use strict";
+    var { Transform: Transform5 } = require_ours();
+    var crc325 = require_crc32();
+    var CRC32Stream2 = class extends Transform5 {
+      constructor(options) {
+        super(options);
+        this.checksum = Buffer.allocUnsafe(4);
+        this.checksum.writeInt32BE(0, 0);
+        this.rawSize = 0;
       }
-      /**
-       * Internal method to mark this Path object as the scurry cwd,
-       * called by {@link PathScurry#chdir}
-       *
-       * @internal
-       */
-      [setAsCwd](oldCwd) {
-        if (oldCwd === this)
-          return;
-        oldCwd.isCWD = false;
-        this.isCWD = true;
-        const changed = /* @__PURE__ */ new Set([]);
-        let rp = [];
-        let p = this;
-        while (p && p.parent) {
-          changed.add(p);
-          p.#relative = rp.join(this.sep);
-          p.#relativePosix = rp.join("/");
-          p = p.parent;
-          rp.push("..");
-        }
-        p = oldCwd;
-        while (p && p.parent && !changed.has(p)) {
-          p.#relative = void 0;
-          p.#relativePosix = void 0;
-          p = p.parent;
+      _transform(chunk, encoding, callback) {
+        if (chunk) {
+          this.checksum = crc325.buf(chunk, this.checksum) >>> 0;
+          this.rawSize += chunk.length;
         }
+        callback(null, chunk);
       }
-    };
-    exports2.PathBase = PathBase;
-    var PathWin32 = class _PathWin32 extends PathBase {
-      /**
-       * Separator for generating path strings.
-       */
-      sep = "\\";
-      /**
-       * Separator for parsing path strings.
-       */
-      splitSep = eitherSep;
-      /**
-       * Do not create new Path objects directly.  They should always be accessed
-       * via the PathScurry class or other methods on the Path class.
-       *
-       * @internal
-       */
-      constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type2, root, roots, nocase, children, opts);
-      }
-      /**
-       * @internal
-       */
-      newChild(name, type2 = UNKNOWN, opts = {}) {
-        return new _PathWin32(name, type2, this.root, this.roots, this.nocase, this.childrenCache(), opts);
-      }
-      /**
-       * @internal
-       */
-      getRootString(path28) {
-        return node_path_1.win32.parse(path28).root;
+      digest(encoding) {
+        const checksum = Buffer.allocUnsafe(4);
+        checksum.writeUInt32BE(this.checksum >>> 0, 0);
+        return encoding ? checksum.toString(encoding) : checksum;
       }
-      /**
-       * @internal
-       */
-      getRoot(rootPath) {
-        rootPath = uncToDrive(rootPath.toUpperCase());
-        if (rootPath === this.root.name) {
-          return this.root;
-        }
-        for (const [compare3, root] of Object.entries(this.roots)) {
-          if (this.sameRoot(rootPath, compare3)) {
-            return this.roots[rootPath] = root;
-          }
-        }
-        return this.roots[rootPath] = new PathScurryWin32(rootPath, this).root;
+      hex() {
+        return this.digest("hex").toUpperCase();
       }
-      /**
-       * @internal
-       */
-      sameRoot(rootPath, compare3 = this.root.name) {
-        rootPath = rootPath.toUpperCase().replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
-        return rootPath === compare3;
+      size() {
+        return this.rawSize;
       }
     };
-    exports2.PathWin32 = PathWin32;
-    var PathPosix = class _PathPosix extends PathBase {
-      /**
-       * separator for parsing path strings
-       */
-      splitSep = "/";
-      /**
-       * separator for generating path strings
-       */
-      sep = "/";
-      /**
-       * Do not create new Path objects directly.  They should always be accessed
-       * via the PathScurry class or other methods on the Path class.
-       *
-       * @internal
-       */
-      constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type2, root, roots, nocase, children, opts);
-      }
-      /**
-       * @internal
-       */
-      getRootString(path28) {
-        return path28.startsWith("/") ? "/" : "";
-      }
-      /**
-       * @internal
-       */
-      getRoot(_rootPath) {
-        return this.root;
-      }
-      /**
-       * @internal
-       */
-      newChild(name, type2 = UNKNOWN, opts = {}) {
-        return new _PathPosix(name, type2, this.root, this.roots, this.nocase, this.childrenCache(), opts);
+    module2.exports = CRC32Stream2;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/crc32-stream/lib/deflate-crc32-stream.js
+var require_deflate_crc32_stream = __commonJS({
+  "node_modules/@actions/artifact/node_modules/crc32-stream/lib/deflate-crc32-stream.js"(exports2, module2) {
+    "use strict";
+    var { DeflateRaw: DeflateRaw2 } = require("zlib");
+    var crc325 = require_crc32();
+    var DeflateCRC32Stream2 = class extends DeflateRaw2 {
+      constructor(options) {
+        super(options);
+        this.checksum = Buffer.allocUnsafe(4);
+        this.checksum.writeInt32BE(0, 0);
+        this.rawSize = 0;
+        this.compressedSize = 0;
       }
-    };
-    exports2.PathPosix = PathPosix;
-    var PathScurryBase = class {
-      /**
-       * The root Path entry for the current working directory of this Scurry
-       */
-      root;
-      /**
-       * The string path for the root of this Scurry's current working directory
-       */
-      rootPath;
-      /**
-       * A collection of all roots encountered, referenced by rootPath
-       */
-      roots;
-      /**
-       * The Path entry corresponding to this PathScurry's current working directory.
-       */
-      cwd;
-      #resolveCache;
-      #resolvePosixCache;
-      #children;
-      /**
-       * Perform path comparisons case-insensitively.
-       *
-       * Defaults true on Darwin and Windows systems, false elsewhere.
-       */
-      nocase;
-      #fs;
-      /**
-       * This class should not be instantiated directly.
-       *
-       * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
-       *
-       * @internal
-       */
-      constructor(cwd = process.cwd(), pathImpl, sep6, { nocase, childrenCacheSize = 16 * 1024, fs: fs30 = defaultFS } = {}) {
-        this.#fs = fsFromOption(fs30);
-        if (cwd instanceof URL || cwd.startsWith("file://")) {
-          cwd = (0, node_url_1.fileURLToPath)(cwd);
-        }
-        const cwdPath = pathImpl.resolve(cwd);
-        this.roots = /* @__PURE__ */ Object.create(null);
-        this.rootPath = this.parseRootPath(cwdPath);
-        this.#resolveCache = new ResolveCache();
-        this.#resolvePosixCache = new ResolveCache();
-        this.#children = new ChildrenCache(childrenCacheSize);
-        const split = cwdPath.substring(this.rootPath.length).split(sep6);
-        if (split.length === 1 && !split[0]) {
-          split.pop();
-        }
-        if (nocase === void 0) {
-          throw new TypeError("must provide nocase setting to PathScurryBase ctor");
-        }
-        this.nocase = nocase;
-        this.root = this.newRoot(this.#fs);
-        this.roots[this.rootPath] = this.root;
-        let prev = this.root;
-        let len = split.length - 1;
-        const joinSep = pathImpl.sep;
-        let abs = this.rootPath;
-        let sawFirst = false;
-        for (const part of split) {
-          const l = len--;
-          prev = prev.child(part, {
-            relative: new Array(l).fill("..").join(joinSep),
-            relativePosix: new Array(l).fill("..").join("/"),
-            fullpath: abs += (sawFirst ? "" : joinSep) + part
-          });
-          sawFirst = true;
+      push(chunk, encoding) {
+        if (chunk) {
+          this.compressedSize += chunk.length;
         }
-        this.cwd = prev;
+        return super.push(chunk, encoding);
       }
-      /**
-       * Get the depth of a provided path, string, or the cwd
-       */
-      depth(path28 = this.cwd) {
-        if (typeof path28 === "string") {
-          path28 = this.cwd.resolve(path28);
+      _transform(chunk, encoding, callback) {
+        if (chunk) {
+          this.checksum = crc325.buf(chunk, this.checksum) >>> 0;
+          this.rawSize += chunk.length;
         }
-        return path28.depth();
-      }
-      /**
-       * Return the cache of child entries.  Exposed so subclasses can create
-       * child Path objects in a platform-specific way.
-       *
-       * @internal
-       */
-      childrenCache() {
-        return this.#children;
+        super._transform(chunk, encoding, callback);
       }
-      /**
-       * Resolve one or more path strings to a resolved string
-       *
-       * Same interface as require('path').resolve.
-       *
-       * Much faster than path.resolve() when called multiple times for the same
-       * path, because the resolved Path objects are cached.  Much slower
-       * otherwise.
-       */
-      resolve(...paths) {
-        let r = "";
-        for (let i = paths.length - 1; i >= 0; i--) {
-          const p = paths[i];
-          if (!p || p === ".")
-            continue;
-          r = r ? `${p}/${r}` : p;
-          if (this.isAbsolute(p)) {
-            break;
-          }
-        }
-        const cached = this.#resolveCache.get(r);
-        if (cached !== void 0) {
-          return cached;
-        }
-        const result = this.cwd.resolve(r).fullpath();
-        this.#resolveCache.set(r, result);
-        return result;
+      digest(encoding) {
+        const checksum = Buffer.allocUnsafe(4);
+        checksum.writeUInt32BE(this.checksum >>> 0, 0);
+        return encoding ? checksum.toString(encoding) : checksum;
       }
-      /**
-       * Resolve one or more path strings to a resolved string, returning
-       * the posix path.  Identical to .resolve() on posix systems, but on
-       * windows will return a forward-slash separated UNC path.
-       *
-       * Same interface as require('path').resolve.
-       *
-       * Much faster than path.resolve() when called multiple times for the same
-       * path, because the resolved Path objects are cached.  Much slower
-       * otherwise.
-       */
-      resolvePosix(...paths) {
-        let r = "";
-        for (let i = paths.length - 1; i >= 0; i--) {
-          const p = paths[i];
-          if (!p || p === ".")
-            continue;
-          r = r ? `${p}/${r}` : p;
-          if (this.isAbsolute(p)) {
-            break;
-          }
-        }
-        const cached = this.#resolvePosixCache.get(r);
-        if (cached !== void 0) {
-          return cached;
-        }
-        const result = this.cwd.resolve(r).fullpathPosix();
-        this.#resolvePosixCache.set(r, result);
-        return result;
+      hex() {
+        return this.digest("hex").toUpperCase();
       }
-      /**
-       * find the relative path from the cwd to the supplied path string or entry
-       */
-      relative(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
+      size(compressed = false) {
+        if (compressed) {
+          return this.compressedSize;
+        } else {
+          return this.rawSize;
         }
-        return entry.relative();
       }
-      /**
-       * find the relative path from the cwd to the supplied path string or
-       * entry, using / as the path delimiter, even on Windows.
-       */
-      relativePosix(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        }
-        return entry.relativePosix();
+    };
+    module2.exports = DeflateCRC32Stream2;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/crc32-stream/lib/index.js
+var require_lib3 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/crc32-stream/lib/index.js"(exports2, module2) {
+    "use strict";
+    module2.exports = {
+      CRC32Stream: require_crc32_stream(),
+      DeflateCRC32Stream: require_deflate_crc32_stream()
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
+var require_zip_archive_output_stream = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) {
+    var inherits = require("util").inherits;
+    var crc325 = require_crc32();
+    var { CRC32Stream: CRC32Stream2 } = require_lib3();
+    var { DeflateCRC32Stream: DeflateCRC32Stream2 } = require_lib3();
+    var ArchiveOutputStream2 = require_archive_output_stream();
+    var ZipArchiveEntry2 = require_zip_archive_entry();
+    var GeneralPurposeBit2 = require_general_purpose_bit();
+    var constants = require_constants13();
+    var util3 = require_util15();
+    var zipUtil = require_util14();
+    var ZipArchiveOutputStream2 = module2.exports = function(options) {
+      if (!(this instanceof ZipArchiveOutputStream2)) {
+        return new ZipArchiveOutputStream2(options);
       }
-      /**
-       * Return the basename for the provided string or Path object
-       */
-      basename(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        }
-        return entry.name;
+      options = this.options = this._defaults(options);
+      ArchiveOutputStream2.call(this, options);
+      this._entry = null;
+      this._entries = [];
+      this._archive = {
+        centralLength: 0,
+        centralOffset: 0,
+        comment: "",
+        finish: false,
+        finished: false,
+        processing: false,
+        forceZip64: options.forceZip64,
+        forceLocalTime: options.forceLocalTime
+      };
+    };
+    inherits(ZipArchiveOutputStream2, ArchiveOutputStream2);
+    ZipArchiveOutputStream2.prototype._afterAppend = function(ae) {
+      this._entries.push(ae);
+      if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
+        this._writeDataDescriptor(ae);
       }
-      /**
-       * Return the dirname for the provided string or Path object
-       */
-      dirname(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        }
-        return (entry.parent || entry).fullpath();
+      this._archive.processing = false;
+      this._entry = null;
+      if (this._archive.finish && !this._archive.finished) {
+        this._finish();
       }
-      async readdir(entry = this.cwd, opts = {
-        withFileTypes: true
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes } = opts;
-        if (!entry.canReaddir()) {
-          return [];
-        } else {
-          const p = await entry.readdir();
-          return withFileTypes ? p : p.map((e) => e.name);
-        }
+    };
+    ZipArchiveOutputStream2.prototype._appendBuffer = function(ae, source, callback) {
+      if (source.length === 0) {
+        ae.setMethod(constants.METHOD_STORED);
       }
-      readdirSync(entry = this.cwd, opts = {
-        withFileTypes: true
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true } = opts;
-        if (!entry.canReaddir()) {
-          return [];
-        } else if (withFileTypes) {
-          return entry.readdirSync();
-        } else {
-          return entry.readdirSync().map((e) => e.name);
-        }
+      var method = ae.getMethod();
+      if (method === constants.METHOD_STORED) {
+        ae.setSize(source.length);
+        ae.setCompressedSize(source.length);
+        ae.setCrc(crc325.buf(source) >>> 0);
       }
-      /**
-       * Call lstat() on the string or Path object, and update all known
-       * information that can be determined.
-       *
-       * Note that unlike `fs.lstat()`, the returned value does not contain some
-       * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-       * information is required, you will need to call `fs.lstat` yourself.
-       *
-       * If the Path refers to a nonexistent file, or if the lstat call fails for
-       * any reason, `undefined` is returned.  Otherwise the updated Path object is
-       * returned.
-       *
-       * Results are cached, and thus may be out of date if the filesystem is
-       * mutated.
-       */
-      async lstat(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        }
-        return entry.lstat();
+      this._writeLocalFileHeader(ae);
+      if (method === constants.METHOD_STORED) {
+        this.write(source);
+        this._afterAppend(ae);
+        callback(null, ae);
+        return;
+      } else if (method === constants.METHOD_DEFLATED) {
+        this._smartStream(ae, callback).end(source);
+        return;
+      } else {
+        callback(new Error("compression method " + method + " not implemented"));
+        return;
       }
-      /**
-       * synchronous {@link PathScurryBase.lstat}
-       */
-      lstatSync(entry = this.cwd) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        }
-        return entry.lstatSync();
+    };
+    ZipArchiveOutputStream2.prototype._appendStream = function(ae, source, callback) {
+      ae.getGeneralPurposeBit().useDataDescriptor(true);
+      ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
+      this._writeLocalFileHeader(ae);
+      var smart = this._smartStream(ae, callback);
+      source.once("error", function(err) {
+        smart.emit("error", err);
+        smart.end();
+      });
+      source.pipe(smart);
+    };
+    ZipArchiveOutputStream2.prototype._defaults = function(o) {
+      if (typeof o !== "object") {
+        o = {};
       }
-      async readlink(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          withFileTypes = entry.withFileTypes;
-          entry = this.cwd;
-        }
-        const e = await entry.readlink();
-        return withFileTypes ? e : e?.fullpath();
+      if (typeof o.zlib !== "object") {
+        o.zlib = {};
       }
-      readlinkSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          withFileTypes = entry.withFileTypes;
-          entry = this.cwd;
-        }
-        const e = entry.readlinkSync();
-        return withFileTypes ? e : e?.fullpath();
+      if (typeof o.zlib.level !== "number") {
+        o.zlib.level = constants.ZLIB_BEST_SPEED;
       }
-      async realpath(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          withFileTypes = entry.withFileTypes;
-          entry = this.cwd;
-        }
-        const e = await entry.realpath();
-        return withFileTypes ? e : e?.fullpath();
+      o.forceZip64 = !!o.forceZip64;
+      o.forceLocalTime = !!o.forceLocalTime;
+      return o;
+    };
+    ZipArchiveOutputStream2.prototype._finish = function() {
+      this._archive.centralOffset = this.offset;
+      this._entries.forEach(function(ae) {
+        this._writeCentralFileHeader(ae);
+      }.bind(this));
+      this._archive.centralLength = this.offset - this._archive.centralOffset;
+      if (this.isZip64()) {
+        this._writeCentralDirectoryZip64();
       }
-      realpathSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false
-      }) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          withFileTypes = entry.withFileTypes;
-          entry = this.cwd;
-        }
-        const e = entry.realpathSync();
-        return withFileTypes ? e : e?.fullpath();
-      }
-      async walk(entry = this.cwd, opts = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-          results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = /* @__PURE__ */ new Set();
-        const walk = (dir, cb) => {
-          dirs.add(dir);
-          dir.readdirCB((er, entries) => {
-            if (er) {
-              return cb(er);
-            }
-            let len = entries.length;
-            if (!len)
-              return cb();
-            const next = () => {
-              if (--len === 0) {
-                cb();
-              }
-            };
-            for (const e of entries) {
-              if (!filter || filter(e)) {
-                results.push(withFileTypes ? e : e.fullpath());
-              }
-              if (follow && e.isSymbolicLink()) {
-                e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r).then((r) => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
-              } else {
-                if (e.shouldWalk(dirs, walkFilter)) {
-                  walk(e, next);
-                } else {
-                  next();
-                }
-              }
-            }
-          }, true);
-        };
-        const start = entry;
-        return new Promise((res, rej) => {
-          walk(start, (er) => {
-            if (er)
-              return rej(er);
-            res(results);
-          });
-        });
+      this._writeCentralDirectoryEnd();
+      this._archive.processing = false;
+      this._archive.finish = true;
+      this._archive.finished = true;
+      this.end();
+    };
+    ZipArchiveOutputStream2.prototype._normalizeEntry = function(ae) {
+      if (ae.getMethod() === -1) {
+        ae.setMethod(constants.METHOD_DEFLATED);
       }
-      walkSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-          results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = /* @__PURE__ */ new Set([entry]);
-        for (const dir of dirs) {
-          const entries = dir.readdirSync();
-          for (const e of entries) {
-            if (!filter || filter(e)) {
-              results.push(withFileTypes ? e : e.fullpath());
-            }
-            let r = e;
-            if (e.isSymbolicLink()) {
-              if (!(follow && (r = e.realpathSync())))
-                continue;
-              if (r.isUnknown())
-                r.lstatSync();
-            }
-            if (r.shouldWalk(dirs, walkFilter)) {
-              dirs.add(r);
-            }
-          }
-        }
-        return results;
+      if (ae.getMethod() === constants.METHOD_DEFLATED) {
+        ae.getGeneralPurposeBit().useDataDescriptor(true);
+        ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
       }
-      /**
-       * Support for `for await`
-       *
-       * Alias for {@link PathScurryBase.iterate}
-       *
-       * Note: As of Node 19, this is very slow, compared to other methods of
-       * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
-       * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
-       */
-      [Symbol.asyncIterator]() {
-        return this.iterate();
+      if (ae.getTime() === -1) {
+        ae.setTime(/* @__PURE__ */ new Date(), this._archive.forceLocalTime);
       }
-      iterate(entry = this.cwd, options = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          options = entry;
-          entry = this.cwd;
-        }
-        return this.stream(entry, options)[Symbol.asyncIterator]();
+      ae._offsets = {
+        file: 0,
+        data: 0,
+        contents: 0
+      };
+    };
+    ZipArchiveOutputStream2.prototype._smartStream = function(ae, callback) {
+      var deflate = ae.getMethod() === constants.METHOD_DEFLATED;
+      var process2 = deflate ? new DeflateCRC32Stream2(this.options.zlib) : new CRC32Stream2();
+      var error3 = null;
+      function handleStuff() {
+        var digest = process2.digest().readUInt32BE(0);
+        ae.setCrc(digest);
+        ae.setSize(process2.size());
+        ae.setCompressedSize(process2.size(true));
+        this._afterAppend(ae);
+        callback(error3, ae);
       }
-      /**
-       * Iterating over a PathScurry performs a synchronous walk.
-       *
-       * Alias for {@link PathScurryBase.iterateSync}
-       */
-      [Symbol.iterator]() {
-        return this.iterateSync();
-      }
-      *iterateSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
-        if (!filter || filter(entry)) {
-          yield withFileTypes ? entry : entry.fullpath();
-        }
-        const dirs = /* @__PURE__ */ new Set([entry]);
-        for (const dir of dirs) {
-          const entries = dir.readdirSync();
-          for (const e of entries) {
-            if (!filter || filter(e)) {
-              yield withFileTypes ? e : e.fullpath();
-            }
-            let r = e;
-            if (e.isSymbolicLink()) {
-              if (!(follow && (r = e.realpathSync())))
-                continue;
-              if (r.isUnknown())
-                r.lstatSync();
-            }
-            if (r.shouldWalk(dirs, walkFilter)) {
-              dirs.add(r);
-            }
-          }
-        }
-      }
-      stream(entry = this.cwd, opts = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
-        const results = new minipass_1.Minipass({ objectMode: true });
-        if (!filter || filter(entry)) {
-          results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = /* @__PURE__ */ new Set();
-        const queue = [entry];
-        let processing = 0;
-        const process2 = () => {
-          let paused = false;
-          while (!paused) {
-            const dir = queue.shift();
-            if (!dir) {
-              if (processing === 0)
-                results.end();
-              return;
-            }
-            processing++;
-            dirs.add(dir);
-            const onReaddir = (er, entries, didRealpaths = false) => {
-              if (er)
-                return results.emit("error", er);
-              if (follow && !didRealpaths) {
-                const promises6 = [];
-                for (const e of entries) {
-                  if (e.isSymbolicLink()) {
-                    promises6.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
-                  }
-                }
-                if (promises6.length) {
-                  Promise.all(promises6).then(() => onReaddir(null, entries, true));
-                  return;
-                }
-              }
-              for (const e of entries) {
-                if (e && (!filter || filter(e))) {
-                  if (!results.write(withFileTypes ? e : e.fullpath())) {
-                    paused = true;
-                  }
-                }
-              }
-              processing--;
-              for (const e of entries) {
-                const r = e.realpathCached() || e;
-                if (r.shouldWalk(dirs, walkFilter)) {
-                  queue.push(r);
-                }
-              }
-              if (paused && !results.flowing) {
-                results.once("drain", process2);
-              } else if (!sync) {
-                process2();
-              }
-            };
-            let sync = true;
-            dir.readdirCB(onReaddir, true);
-            sync = false;
-          }
-        };
-        process2();
-        return results;
-      }
-      streamSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === "string") {
-          entry = this.cwd.resolve(entry);
-        } else if (!(entry instanceof PathBase)) {
-          opts = entry;
-          entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter } = opts;
-        const results = new minipass_1.Minipass({ objectMode: true });
-        const dirs = /* @__PURE__ */ new Set();
-        if (!filter || filter(entry)) {
-          results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const queue = [entry];
-        let processing = 0;
-        const process2 = () => {
-          let paused = false;
-          while (!paused) {
-            const dir = queue.shift();
-            if (!dir) {
-              if (processing === 0)
-                results.end();
-              return;
-            }
-            processing++;
-            dirs.add(dir);
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-              if (!filter || filter(e)) {
-                if (!results.write(withFileTypes ? e : e.fullpath())) {
-                  paused = true;
-                }
-              }
-            }
-            processing--;
-            for (const e of entries) {
-              let r = e;
-              if (e.isSymbolicLink()) {
-                if (!(follow && (r = e.realpathSync())))
-                  continue;
-                if (r.isUnknown())
-                  r.lstatSync();
-              }
-              if (r.shouldWalk(dirs, walkFilter)) {
-                queue.push(r);
-              }
-            }
-          }
-          if (paused && !results.flowing)
-            results.once("drain", process2);
-        };
-        process2();
-        return results;
-      }
-      chdir(path28 = this.cwd) {
-        const oldCwd = this.cwd;
-        this.cwd = typeof path28 === "string" ? this.cwd.resolve(path28) : path28;
-        this.cwd[setAsCwd](oldCwd);
+      process2.once("end", handleStuff.bind(this));
+      process2.once("error", function(err) {
+        error3 = err;
+      });
+      process2.pipe(this, { end: false });
+      return process2;
+    };
+    ZipArchiveOutputStream2.prototype._writeCentralDirectoryEnd = function() {
+      var records = this._entries.length;
+      var size = this._archive.centralLength;
+      var offset = this._archive.centralOffset;
+      if (this.isZip64()) {
+        records = constants.ZIP64_MAGIC_SHORT;
+        size = constants.ZIP64_MAGIC;
+        offset = constants.ZIP64_MAGIC;
       }
+      this.write(zipUtil.getLongBytes(constants.SIG_EOCD));
+      this.write(constants.SHORT_ZERO);
+      this.write(constants.SHORT_ZERO);
+      this.write(zipUtil.getShortBytes(records));
+      this.write(zipUtil.getShortBytes(records));
+      this.write(zipUtil.getLongBytes(size));
+      this.write(zipUtil.getLongBytes(offset));
+      var comment = this.getComment();
+      var commentLength = Buffer.byteLength(comment);
+      this.write(zipUtil.getShortBytes(commentLength));
+      this.write(comment);
     };
-    exports2.PathScurryBase = PathScurryBase;
-    var PathScurryWin32 = class extends PathScurryBase {
-      /**
-       * separator for generating path strings
-       */
-      sep = "\\";
-      constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, node_path_1.win32, "\\", { ...opts, nocase });
-        this.nocase = nocase;
-        for (let p = this.cwd; p; p = p.parent) {
-          p.nocase = this.nocase;
-        }
-      }
-      /**
-       * @internal
-       */
-      parseRootPath(dir) {
-        return node_path_1.win32.parse(dir).root.toUpperCase();
-      }
-      /**
-       * @internal
-       */
-      newRoot(fs30) {
-        return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs30 });
+    ZipArchiveOutputStream2.prototype._writeCentralDirectoryZip64 = function() {
+      this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD));
+      this.write(zipUtil.getEightBytes(44));
+      this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
+      this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
+      this.write(constants.LONG_ZERO);
+      this.write(constants.LONG_ZERO);
+      this.write(zipUtil.getEightBytes(this._entries.length));
+      this.write(zipUtil.getEightBytes(this._entries.length));
+      this.write(zipUtil.getEightBytes(this._archive.centralLength));
+      this.write(zipUtil.getEightBytes(this._archive.centralOffset));
+      this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC));
+      this.write(constants.LONG_ZERO);
+      this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength));
+      this.write(zipUtil.getLongBytes(1));
+    };
+    ZipArchiveOutputStream2.prototype._writeCentralFileHeader = function(ae) {
+      var gpb = ae.getGeneralPurposeBit();
+      var method = ae.getMethod();
+      var fileOffset = ae._offsets.file;
+      var size = ae.getSize();
+      var compressedSize = ae.getCompressedSize();
+      if (ae.isZip64() || fileOffset > constants.ZIP64_MAGIC) {
+        size = constants.ZIP64_MAGIC;
+        compressedSize = constants.ZIP64_MAGIC;
+        fileOffset = constants.ZIP64_MAGIC;
+        ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
+        var extraBuf = Buffer.concat([
+          zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID),
+          zipUtil.getShortBytes(24),
+          zipUtil.getEightBytes(ae.getSize()),
+          zipUtil.getEightBytes(ae.getCompressedSize()),
+          zipUtil.getEightBytes(ae._offsets.file)
+        ], 28);
+        ae.setExtra(extraBuf);
       }
-      /**
-       * Return true if the provided path string is an absolute path
-       */
-      isAbsolute(p) {
-        return p.startsWith("/") || p.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(p);
+      this.write(zipUtil.getLongBytes(constants.SIG_CFH));
+      this.write(zipUtil.getShortBytes(ae.getPlatform() << 8 | constants.VERSION_MADEBY));
+      this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
+      this.write(gpb.encode());
+      this.write(zipUtil.getShortBytes(method));
+      this.write(zipUtil.getLongBytes(ae.getTimeDos()));
+      this.write(zipUtil.getLongBytes(ae.getCrc()));
+      this.write(zipUtil.getLongBytes(compressedSize));
+      this.write(zipUtil.getLongBytes(size));
+      var name = ae.getName();
+      var comment = ae.getComment();
+      var extra = ae.getCentralDirectoryExtra();
+      if (gpb.usesUTF8ForNames()) {
+        name = Buffer.from(name);
+        comment = Buffer.from(comment);
       }
+      this.write(zipUtil.getShortBytes(name.length));
+      this.write(zipUtil.getShortBytes(extra.length));
+      this.write(zipUtil.getShortBytes(comment.length));
+      this.write(constants.SHORT_ZERO);
+      this.write(zipUtil.getShortBytes(ae.getInternalAttributes()));
+      this.write(zipUtil.getLongBytes(ae.getExternalAttributes()));
+      this.write(zipUtil.getLongBytes(fileOffset));
+      this.write(name);
+      this.write(extra);
+      this.write(comment);
     };
-    exports2.PathScurryWin32 = PathScurryWin32;
-    var PathScurryPosix = class extends PathScurryBase {
-      /**
-       * separator for generating path strings
-       */
-      sep = "/";
-      constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = false } = opts;
-        super(cwd, node_path_1.posix, "/", { ...opts, nocase });
-        this.nocase = nocase;
+    ZipArchiveOutputStream2.prototype._writeDataDescriptor = function(ae) {
+      this.write(zipUtil.getLongBytes(constants.SIG_DD));
+      this.write(zipUtil.getLongBytes(ae.getCrc()));
+      if (ae.isZip64()) {
+        this.write(zipUtil.getEightBytes(ae.getCompressedSize()));
+        this.write(zipUtil.getEightBytes(ae.getSize()));
+      } else {
+        this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
+        this.write(zipUtil.getLongBytes(ae.getSize()));
       }
-      /**
-       * @internal
-       */
-      parseRootPath(_dir) {
-        return "/";
+    };
+    ZipArchiveOutputStream2.prototype._writeLocalFileHeader = function(ae) {
+      var gpb = ae.getGeneralPurposeBit();
+      var method = ae.getMethod();
+      var name = ae.getName();
+      var extra = ae.getLocalFileDataExtra();
+      if (ae.isZip64()) {
+        gpb.useDataDescriptor(true);
+        ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
       }
-      /**
-       * @internal
-       */
-      newRoot(fs30) {
-        return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs30 });
+      if (gpb.usesUTF8ForNames()) {
+        name = Buffer.from(name);
       }
-      /**
-       * Return true if the provided path string is an absolute path
-       */
-      isAbsolute(p) {
-        return p.startsWith("/");
+      ae._offsets.file = this.offset;
+      this.write(zipUtil.getLongBytes(constants.SIG_LFH));
+      this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
+      this.write(gpb.encode());
+      this.write(zipUtil.getShortBytes(method));
+      this.write(zipUtil.getLongBytes(ae.getTimeDos()));
+      ae._offsets.data = this.offset;
+      if (gpb.usesDataDescriptor()) {
+        this.write(constants.LONG_ZERO);
+        this.write(constants.LONG_ZERO);
+        this.write(constants.LONG_ZERO);
+      } else {
+        this.write(zipUtil.getLongBytes(ae.getCrc()));
+        this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
+        this.write(zipUtil.getLongBytes(ae.getSize()));
       }
+      this.write(zipUtil.getShortBytes(name.length));
+      this.write(zipUtil.getShortBytes(extra.length));
+      this.write(name);
+      this.write(extra);
+      ae._offsets.contents = this.offset;
     };
-    exports2.PathScurryPosix = PathScurryPosix;
-    var PathScurryDarwin = class extends PathScurryPosix {
-      constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, { ...opts, nocase });
-      }
+    ZipArchiveOutputStream2.prototype.getComment = function(comment) {
+      return this._archive.comment !== null ? this._archive.comment : "";
+    };
+    ZipArchiveOutputStream2.prototype.isZip64 = function() {
+      return this._archive.forceZip64 || this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC;
+    };
+    ZipArchiveOutputStream2.prototype.setComment = function(comment) {
+      this._archive.comment = comment;
     };
-    exports2.PathScurryDarwin = PathScurryDarwin;
-    exports2.Path = process.platform === "win32" ? PathWin32 : PathPosix;
-    exports2.PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
   }
 });
 
-// node_modules/glob/dist/commonjs/pattern.js
-var require_pattern = __commonJS({
-  "node_modules/glob/dist/commonjs/pattern.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Pattern = void 0;
-    var minimatch_1 = require_commonjs20();
-    var isPatternList = (pl) => pl.length >= 1;
-    var isGlobList = (gl) => gl.length >= 1;
-    var Pattern = class _Pattern {
-      #patternList;
-      #globList;
-      #index;
-      length;
-      #platform;
-      #rest;
-      #globString;
-      #isDrive;
-      #isUNC;
-      #isAbsolute;
-      #followGlobstar = true;
-      constructor(patternList, globList, index, platform2) {
-        if (!isPatternList(patternList)) {
-          throw new TypeError("empty pattern list");
-        }
-        if (!isGlobList(globList)) {
-          throw new TypeError("empty glob list");
-        }
-        if (globList.length !== patternList.length) {
-          throw new TypeError("mismatched pattern list and glob list lengths");
-        }
-        this.length = patternList.length;
-        if (index < 0 || index >= this.length) {
-          throw new TypeError("index out of range");
-        }
-        this.#patternList = patternList;
-        this.#globList = globList;
-        this.#index = index;
-        this.#platform = platform2;
-        if (this.#index === 0) {
-          if (this.isUNC()) {
-            const [p0, p1, p2, p3, ...prest] = this.#patternList;
-            const [g0, g1, g2, g3, ...grest] = this.#globList;
-            if (prest[0] === "") {
-              prest.shift();
-              grest.shift();
-            }
-            const p = [p0, p1, p2, p3, ""].join("/");
-            const g = [g0, g1, g2, g3, ""].join("/");
-            this.#patternList = [p, ...prest];
-            this.#globList = [g, ...grest];
-            this.length = this.#patternList.length;
-          } else if (this.isDrive() || this.isAbsolute()) {
-            const [p1, ...prest] = this.#patternList;
-            const [g1, ...grest] = this.#globList;
-            if (prest[0] === "") {
-              prest.shift();
-              grest.shift();
-            }
-            const p = p1 + "/";
-            const g = g1 + "/";
-            this.#patternList = [p, ...prest];
-            this.#globList = [g, ...grest];
-            this.length = this.#patternList.length;
-          }
-        }
+// node_modules/@actions/artifact/node_modules/compress-commons/lib/compress-commons.js
+var require_compress_commons = __commonJS({
+  "node_modules/@actions/artifact/node_modules/compress-commons/lib/compress-commons.js"(exports2, module2) {
+    module2.exports = {
+      ArchiveEntry: require_archive_entry(),
+      ZipArchiveEntry: require_zip_archive_entry(),
+      ArchiveOutputStream: require_archive_output_stream(),
+      ZipArchiveOutputStream: require_zip_archive_output_stream()
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/zip-stream/index.js
+var require_zip_stream = __commonJS({
+  "node_modules/@actions/artifact/node_modules/zip-stream/index.js"(exports2, module2) {
+    var inherits = require("util").inherits;
+    var ZipArchiveOutputStream2 = require_compress_commons().ZipArchiveOutputStream;
+    var ZipArchiveEntry2 = require_compress_commons().ZipArchiveEntry;
+    var util3 = require_archiver_utils();
+    var ZipStream2 = module2.exports = function(options) {
+      if (!(this instanceof ZipStream2)) {
+        return new ZipStream2(options);
       }
-      /**
-       * The first entry in the parsed list of patterns
-       */
-      pattern() {
-        return this.#patternList[this.#index];
+      options = this.options = options || {};
+      options.zlib = options.zlib || {};
+      ZipArchiveOutputStream2.call(this, options);
+      if (typeof options.level === "number" && options.level >= 0) {
+        options.zlib.level = options.level;
+        delete options.level;
       }
-      /**
-       * true of if pattern() returns a string
-       */
-      isString() {
-        return typeof this.#patternList[this.#index] === "string";
+      if (!options.forceZip64 && typeof options.zlib.level === "number" && options.zlib.level === 0) {
+        options.store = true;
       }
-      /**
-       * true of if pattern() returns GLOBSTAR
-       */
-      isGlobstar() {
-        return this.#patternList[this.#index] === minimatch_1.GLOBSTAR;
+      options.namePrependSlash = options.namePrependSlash || false;
+      if (options.comment && options.comment.length > 0) {
+        this.setComment(options.comment);
       }
-      /**
-       * true if pattern() returns a regexp
-       */
-      isRegExp() {
-        return this.#patternList[this.#index] instanceof RegExp;
+    };
+    inherits(ZipStream2, ZipArchiveOutputStream2);
+    ZipStream2.prototype._normalizeFileData = function(data) {
+      data = util3.defaults(data, {
+        type: "file",
+        name: null,
+        namePrependSlash: this.options.namePrependSlash,
+        linkname: null,
+        date: null,
+        mode: null,
+        store: this.options.store,
+        comment: ""
+      });
+      var isDir = data.type === "directory";
+      var isSymlink = data.type === "symlink";
+      if (data.name) {
+        data.name = util3.sanitizePath(data.name);
+        if (!isSymlink && data.name.slice(-1) === "/") {
+          isDir = true;
+          data.type = "directory";
+        } else if (isDir) {
+          data.name += "/";
+        }
       }
-      /**
-       * The /-joined set of glob parts that make up this pattern
-       */
-      globString() {
-        return this.#globString = this.#globString || (this.#index === 0 ? this.isAbsolute() ? this.#globList[0] + this.#globList.slice(1).join("/") : this.#globList.join("/") : this.#globList.slice(this.#index).join("/"));
+      if (isDir || isSymlink) {
+        data.store = true;
       }
-      /**
-       * true if there are more pattern parts after this one
-       */
-      hasMore() {
-        return this.length > this.#index + 1;
+      data.date = util3.dateify(data.date);
+      return data;
+    };
+    ZipStream2.prototype.entry = function(source, data, callback) {
+      if (typeof callback !== "function") {
+        callback = this._emitErrorCallback.bind(this);
       }
-      /**
-       * The rest of the pattern after this part, or null if this is the end
-       */
-      rest() {
-        if (this.#rest !== void 0)
-          return this.#rest;
-        if (!this.hasMore())
-          return this.#rest = null;
-        this.#rest = new _Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
-        this.#rest.#isAbsolute = this.#isAbsolute;
-        this.#rest.#isUNC = this.#isUNC;
-        this.#rest.#isDrive = this.#isDrive;
-        return this.#rest;
+      data = this._normalizeFileData(data);
+      if (data.type !== "file" && data.type !== "directory" && data.type !== "symlink") {
+        callback(new Error(data.type + " entries not currently supported"));
+        return;
       }
-      /**
-       * true if the pattern represents a //unc/path/ on windows
-       */
-      isUNC() {
-        const pl = this.#patternList;
-        return this.#isUNC !== void 0 ? this.#isUNC : this.#isUNC = this.#platform === "win32" && this.#index === 0 && pl[0] === "" && pl[1] === "" && typeof pl[2] === "string" && !!pl[2] && typeof pl[3] === "string" && !!pl[3];
+      if (typeof data.name !== "string" || data.name.length === 0) {
+        callback(new Error("entry name must be a non-empty string value"));
+        return;
       }
-      // pattern like C:/...
-      // split = ['C:', ...]
-      // XXX: would be nice to handle patterns like `c:*` to test the cwd
-      // in c: for *, but I don't know of a way to even figure out what that
-      // cwd is without actually chdir'ing into it?
-      /**
-       * True if the pattern starts with a drive letter on Windows
-       */
-      isDrive() {
-        const pl = this.#patternList;
-        return this.#isDrive !== void 0 ? this.#isDrive : this.#isDrive = this.#platform === "win32" && this.#index === 0 && this.length > 1 && typeof pl[0] === "string" && /^[a-z]:$/i.test(pl[0]);
+      if (data.type === "symlink" && typeof data.linkname !== "string") {
+        callback(new Error("entry linkname must be a non-empty string value when type equals symlink"));
+        return;
       }
-      // pattern = '/' or '/...' or '/x/...'
-      // split = ['', ''] or ['', ...] or ['', 'x', ...]
-      // Drive and UNC both considered absolute on windows
-      /**
-       * True if the pattern is rooted on an absolute path
-       */
-      isAbsolute() {
-        const pl = this.#patternList;
-        return this.#isAbsolute !== void 0 ? this.#isAbsolute : this.#isAbsolute = pl[0] === "" && pl.length > 1 || this.isDrive() || this.isUNC();
+      var entry = new ZipArchiveEntry2(data.name);
+      entry.setTime(data.date, this.options.forceLocalTime);
+      if (data.namePrependSlash) {
+        entry.setName(data.name, true);
       }
-      /**
-       * consume the root of the pattern, and return it
-       */
-      root() {
-        const p = this.#patternList[0];
-        return typeof p === "string" && this.isAbsolute() && this.#index === 0 ? p : "";
+      if (data.store) {
+        entry.setMethod(0);
       }
-      /**
-       * Check to see if the current globstar pattern is allowed to follow
-       * a symbolic link.
-       */
-      checkFollowGlobstar() {
-        return !(this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar);
+      if (data.comment.length > 0) {
+        entry.setComment(data.comment);
       }
-      /**
-       * Mark that the current globstar pattern is following a symbolic link
-       */
-      markFollowGlobstar() {
-        if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
-          return false;
-        this.#followGlobstar = false;
-        return true;
+      if (data.type === "symlink" && typeof data.mode !== "number") {
+        data.mode = 40960;
+      }
+      if (typeof data.mode === "number") {
+        if (data.type === "symlink") {
+          data.mode |= 40960;
+        }
+        entry.setUnixMode(data.mode);
+      }
+      if (data.type === "symlink" && typeof data.linkname === "string") {
+        source = Buffer.from(data.linkname);
       }
+      return ZipArchiveOutputStream2.prototype.entry.call(this, entry, source, callback);
+    };
+    ZipStream2.prototype.finalize = function() {
+      this.finish();
     };
-    exports2.Pattern = Pattern;
   }
 });
 
-// node_modules/glob/dist/commonjs/ignore.js
-var require_ignore = __commonJS({
-  "node_modules/glob/dist/commonjs/ignore.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Ignore = void 0;
-    var minimatch_1 = require_commonjs20();
-    var pattern_js_1 = require_pattern();
-    var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
-    var Ignore = class {
-      relative;
-      relativeChildren;
-      absolute;
-      absoluteChildren;
-      platform;
-      mmopts;
-      constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform2 = defaultPlatform }) {
-        this.relative = [];
-        this.absolute = [];
-        this.relativeChildren = [];
-        this.absoluteChildren = [];
-        this.platform = platform2;
-        this.mmopts = {
-          dot: true,
-          nobrace,
-          nocase,
-          noext,
-          noglobstar,
-          optimizationLevel: 2,
-          platform: platform2,
-          nocomment: true,
-          nonegate: true
-        };
-        for (const ign of ignored)
-          this.add(ign);
-      }
-      add(ign) {
-        const mm = new minimatch_1.Minimatch(ign, this.mmopts);
-        for (let i = 0; i < mm.set.length; i++) {
-          const parsed = mm.set[i];
-          const globParts = mm.globParts[i];
-          if (!parsed || !globParts) {
-            throw new Error("invalid pattern object");
-          }
-          while (parsed[0] === "." && globParts[0] === ".") {
-            parsed.shift();
-            globParts.shift();
-          }
-          const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform);
-          const m = new minimatch_1.Minimatch(p.globString(), this.mmopts);
-          const children = globParts[globParts.length - 1] === "**";
-          const absolute = p.isAbsolute();
-          if (absolute)
-            this.absolute.push(m);
-          else
-            this.relative.push(m);
-          if (children) {
-            if (absolute)
-              this.absoluteChildren.push(m);
-            else
-              this.relativeChildren.push(m);
-          }
-        }
-      }
-      ignored(p) {
-        const fullpath = p.fullpath();
-        const fullpaths = `${fullpath}/`;
-        const relative3 = p.relative() || ".";
-        const relatives = `${relative3}/`;
-        for (const m of this.relative) {
-          if (m.match(relative3) || m.match(relatives))
-            return true;
-        }
-        for (const m of this.absolute) {
-          if (m.match(fullpath) || m.match(fullpaths))
-            return true;
-        }
-        return false;
-      }
-      childrenIgnored(p) {
-        const fullpath = p.fullpath() + "/";
-        const relative3 = (p.relative() || ".") + "/";
-        for (const m of this.relativeChildren) {
-          if (m.match(relative3))
-            return true;
-        }
-        for (const m of this.absoluteChildren) {
-          if (m.match(fullpath))
-            return true;
-        }
-        return false;
-      }
+// node_modules/@actions/artifact/node_modules/archiver/lib/plugins/zip.js
+var require_zip = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/lib/plugins/zip.js"(exports2, module2) {
+    var engine2 = require_zip_stream();
+    var util3 = require_archiver_utils();
+    var Zip2 = function(options) {
+      if (!(this instanceof Zip2)) {
+        return new Zip2(options);
+      }
+      options = this.options = util3.defaults(options, {
+        comment: "",
+        forceUTC: false,
+        namePrependSlash: false,
+        store: false
+      });
+      this.supports = {
+        directory: true,
+        symlink: true
+      };
+      this.engine = new engine2(options);
+    };
+    Zip2.prototype.append = function(source, data, callback) {
+      this.engine.entry(source, data, callback);
+    };
+    Zip2.prototype.finalize = function() {
+      this.engine.finalize();
+    };
+    Zip2.prototype.on = function() {
+      return this.engine.on.apply(this.engine, arguments);
     };
-    exports2.Ignore = Ignore;
+    Zip2.prototype.pipe = function() {
+      return this.engine.pipe.apply(this.engine, arguments);
+    };
+    Zip2.prototype.unpipe = function() {
+      return this.engine.unpipe.apply(this.engine, arguments);
+    };
+    module2.exports = Zip2;
   }
 });
 
-// node_modules/glob/dist/commonjs/processor.js
-var require_processor = __commonJS({
-  "node_modules/glob/dist/commonjs/processor.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0;
-    var minimatch_1 = require_commonjs20();
-    var HasWalkedCache = class _HasWalkedCache {
-      store;
-      constructor(store = /* @__PURE__ */ new Map()) {
-        this.store = store;
-      }
-      copy() {
-        return new _HasWalkedCache(new Map(this.store));
-      }
-      hasWalked(target, pattern) {
-        return this.store.get(target.fullpath())?.has(pattern.globString());
-      }
-      storeWalked(target, pattern) {
-        const fullpath = target.fullpath();
-        const cached = this.store.get(fullpath);
-        if (cached)
-          cached.add(pattern.globString());
-        else
-          this.store.set(fullpath, /* @__PURE__ */ new Set([pattern.globString()]));
-      }
-    };
-    exports2.HasWalkedCache = HasWalkedCache;
-    var MatchRecord = class {
-      store = /* @__PURE__ */ new Map();
-      add(target, absolute, ifDir) {
-        const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
-        const current = this.store.get(target);
-        this.store.set(target, current === void 0 ? n : n & current);
-      }
-      // match, absolute, ifdir
-      entries() {
-        return [...this.store.entries()].map(([path28, n]) => [
-          path28,
-          !!(n & 2),
-          !!(n & 1)
-        ]);
+// node_modules/queue-tick/queue-microtask.js
+var require_queue_microtask = __commonJS({
+  "node_modules/queue-tick/queue-microtask.js"(exports2, module2) {
+    module2.exports = typeof queueMicrotask === "function" ? queueMicrotask : (fn) => Promise.resolve().then(fn);
+  }
+});
+
+// node_modules/queue-tick/process-next-tick.js
+var require_process_next_tick = __commonJS({
+  "node_modules/queue-tick/process-next-tick.js"(exports2, module2) {
+    module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask();
+  }
+});
+
+// node_modules/fast-fifo/fixed-size.js
+var require_fixed_size = __commonJS({
+  "node_modules/fast-fifo/fixed-size.js"(exports2, module2) {
+    module2.exports = class FixedFIFO {
+      constructor(hwm) {
+        if (!(hwm > 0) || (hwm - 1 & hwm) !== 0) throw new Error("Max size for a FixedFIFO should be a power of two");
+        this.buffer = new Array(hwm);
+        this.mask = hwm - 1;
+        this.top = 0;
+        this.btm = 0;
+        this.next = null;
       }
-    };
-    exports2.MatchRecord = MatchRecord;
-    var SubWalks = class {
-      store = /* @__PURE__ */ new Map();
-      add(target, pattern) {
-        if (!target.canReaddir()) {
-          return;
-        }
-        const subs = this.store.get(target);
-        if (subs) {
-          if (!subs.find((p) => p.globString() === pattern.globString())) {
-            subs.push(pattern);
-          }
-        } else
-          this.store.set(target, [pattern]);
-      }
-      get(target) {
-        const subs = this.store.get(target);
-        if (!subs) {
-          throw new Error("attempting to walk unknown path");
-        }
-        return subs;
-      }
-      entries() {
-        return this.keys().map((k) => [k, this.store.get(k)]);
-      }
-      keys() {
-        return [...this.store.keys()].filter((t) => t.canReaddir());
-      }
-    };
-    exports2.SubWalks = SubWalks;
-    var Processor = class _Processor {
-      hasWalkedCache;
-      matches = new MatchRecord();
-      subwalks = new SubWalks();
-      patterns;
-      follow;
-      dot;
-      opts;
-      constructor(opts, hasWalkedCache) {
-        this.opts = opts;
-        this.follow = !!opts.follow;
-        this.dot = !!opts.dot;
-        this.hasWalkedCache = hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache();
-      }
-      processPatterns(target, patterns) {
-        this.patterns = patterns;
-        const processingSet = patterns.map((p) => [target, p]);
-        for (let [t, pattern] of processingSet) {
-          this.hasWalkedCache.storeWalked(t, pattern);
-          const root = pattern.root();
-          const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
-          if (root) {
-            t = t.resolve(root === "/" && this.opts.root !== void 0 ? this.opts.root : root);
-            const rest2 = pattern.rest();
-            if (!rest2) {
-              this.matches.add(t, true, false);
-              continue;
-            } else {
-              pattern = rest2;
-            }
-          }
-          if (t.isENOENT())
-            continue;
-          let p;
-          let rest;
-          let changed = false;
-          while (typeof (p = pattern.pattern()) === "string" && (rest = pattern.rest())) {
-            const c = t.resolve(p);
-            t = c;
-            pattern = rest;
-            changed = true;
-          }
-          p = pattern.pattern();
-          rest = pattern.rest();
-          if (changed) {
-            if (this.hasWalkedCache.hasWalked(t, pattern))
-              continue;
-            this.hasWalkedCache.storeWalked(t, pattern);
-          }
-          if (typeof p === "string") {
-            const ifDir = p === ".." || p === "" || p === ".";
-            this.matches.add(t.resolve(p), absolute, ifDir);
-            continue;
-          } else if (p === minimatch_1.GLOBSTAR) {
-            if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
-              this.subwalks.add(t, pattern);
-            }
-            const rp = rest?.pattern();
-            const rrest = rest?.rest();
-            if (!rest || (rp === "" || rp === ".") && !rrest) {
-              this.matches.add(t, absolute, rp === "" || rp === ".");
-            } else {
-              if (rp === "..") {
-                const tp = t.parent || t;
-                if (!rrest)
-                  this.matches.add(tp, absolute, true);
-                else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
-                  this.subwalks.add(tp, rrest);
-                }
-              }
-            }
-          } else if (p instanceof RegExp) {
-            this.subwalks.add(t, pattern);
-          }
-        }
-        return this;
+      clear() {
+        this.top = this.btm = 0;
+        this.next = null;
+        this.buffer.fill(void 0);
       }
-      subwalkTargets() {
-        return this.subwalks.keys();
-      }
-      child() {
-        return new _Processor(this.opts, this.hasWalkedCache);
-      }
-      // return a new Processor containing the subwalks for each
-      // child entry, and a set of matches, and
-      // a hasWalkedCache that's a copy of this one
-      // then we're going to call
-      filterEntries(parent, entries) {
-        const patterns = this.subwalks.get(parent);
-        const results = this.child();
-        for (const e of entries) {
-          for (const pattern of patterns) {
-            const absolute = pattern.isAbsolute();
-            const p = pattern.pattern();
-            const rest = pattern.rest();
-            if (p === minimatch_1.GLOBSTAR) {
-              results.testGlobstar(e, pattern, rest, absolute);
-            } else if (p instanceof RegExp) {
-              results.testRegExp(e, p, rest, absolute);
-            } else {
-              results.testString(e, p, rest, absolute);
-            }
-          }
-        }
-        return results;
+      push(data) {
+        if (this.buffer[this.top] !== void 0) return false;
+        this.buffer[this.top] = data;
+        this.top = this.top + 1 & this.mask;
+        return true;
       }
-      testGlobstar(e, pattern, rest, absolute) {
-        if (this.dot || !e.name.startsWith(".")) {
-          if (!pattern.hasMore()) {
-            this.matches.add(e, absolute, false);
-          }
-          if (e.canReaddir()) {
-            if (this.follow || !e.isSymbolicLink()) {
-              this.subwalks.add(e, pattern);
-            } else if (e.isSymbolicLink()) {
-              if (rest && pattern.checkFollowGlobstar()) {
-                this.subwalks.add(e, rest);
-              } else if (pattern.markFollowGlobstar()) {
-                this.subwalks.add(e, pattern);
-              }
-            }
-          }
-        }
-        if (rest) {
-          const rp = rest.pattern();
-          if (typeof rp === "string" && // dots and empty were handled already
-          rp !== ".." && rp !== "" && rp !== ".") {
-            this.testString(e, rp, rest.rest(), absolute);
-          } else if (rp === "..") {
-            const ep = e.parent || e;
-            this.subwalks.add(ep, rest);
-          } else if (rp instanceof RegExp) {
-            this.testRegExp(e, rp, rest.rest(), absolute);
-          }
-        }
+      shift() {
+        const last = this.buffer[this.btm];
+        if (last === void 0) return void 0;
+        this.buffer[this.btm] = void 0;
+        this.btm = this.btm + 1 & this.mask;
+        return last;
       }
-      testRegExp(e, p, rest, absolute) {
-        if (!p.test(e.name))
-          return;
-        if (!rest) {
-          this.matches.add(e, absolute, false);
-        } else {
-          this.subwalks.add(e, rest);
-        }
+      peek() {
+        return this.buffer[this.btm];
       }
-      testString(e, p, rest, absolute) {
-        if (!e.isNamed(p))
-          return;
-        if (!rest) {
-          this.matches.add(e, absolute, false);
-        } else {
-          this.subwalks.add(e, rest);
-        }
+      isEmpty() {
+        return this.buffer[this.btm] === void 0;
       }
     };
-    exports2.Processor = Processor;
   }
 });
 
-// node_modules/glob/dist/commonjs/walker.js
-var require_walker = __commonJS({
-  "node_modules/glob/dist/commonjs/walker.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0;
-    var minipass_1 = require_commonjs22();
-    var ignore_js_1 = require_ignore();
-    var processor_js_1 = require_processor();
-    var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore;
-    var GlobUtil = class {
-      path;
-      patterns;
-      opts;
-      seen = /* @__PURE__ */ new Set();
-      paused = false;
-      aborted = false;
-      #onResume = [];
-      #ignore;
-      #sep;
-      signal;
-      maxDepth;
-      includeChildMatches;
-      constructor(patterns, path28, opts) {
-        this.patterns = patterns;
-        this.path = path28;
-        this.opts = opts;
-        this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
-        this.includeChildMatches = opts.includeChildMatches !== false;
-        if (opts.ignore || !this.includeChildMatches) {
-          this.#ignore = makeIgnore(opts.ignore ?? [], opts);
-          if (!this.includeChildMatches && typeof this.#ignore.add !== "function") {
-            const m = "cannot ignore child matches, ignore lacks add() method.";
-            throw new Error(m);
-          }
-        }
-        this.maxDepth = opts.maxDepth || Infinity;
-        if (opts.signal) {
-          this.signal = opts.signal;
-          this.signal.addEventListener("abort", () => {
-            this.#onResume.length = 0;
-          });
-        }
-      }
-      #ignored(path28) {
-        return this.seen.has(path28) || !!this.#ignore?.ignored?.(path28);
-      }
-      #childrenIgnored(path28) {
-        return !!this.#ignore?.childrenIgnored?.(path28);
+// node_modules/fast-fifo/index.js
+var require_fast_fifo = __commonJS({
+  "node_modules/fast-fifo/index.js"(exports2, module2) {
+    var FixedFIFO = require_fixed_size();
+    module2.exports = class FastFIFO {
+      constructor(hwm) {
+        this.hwm = hwm || 16;
+        this.head = new FixedFIFO(this.hwm);
+        this.tail = this.head;
+        this.length = 0;
       }
-      // backpressure mechanism
-      pause() {
-        this.paused = true;
+      clear() {
+        this.head = this.tail;
+        this.head.clear();
+        this.length = 0;
       }
-      resume() {
-        if (this.signal?.aborted)
-          return;
-        this.paused = false;
-        let fn = void 0;
-        while (!this.paused && (fn = this.#onResume.shift())) {
-          fn();
+      push(val) {
+        this.length++;
+        if (!this.head.push(val)) {
+          const prev = this.head;
+          this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length);
+          this.head.push(val);
         }
       }
-      onResume(fn) {
-        if (this.signal?.aborted)
-          return;
-        if (!this.paused) {
-          fn();
-        } else {
-          this.#onResume.push(fn);
+      shift() {
+        if (this.length !== 0) this.length--;
+        const val = this.tail.shift();
+        if (val === void 0 && this.tail.next) {
+          const next = this.tail.next;
+          this.tail.next = null;
+          this.tail = next;
+          return this.tail.shift();
         }
+        return val;
       }
-      // do the requisite realpath/stat checking, and return the path
-      // to add or undefined to filter it out.
-      async matchCheck(e, ifDir) {
-        if (ifDir && this.opts.nodir)
-          return void 0;
-        let rpc;
-        if (this.opts.realpath) {
-          rpc = e.realpathCached() || await e.realpath();
-          if (!rpc)
-            return void 0;
-          e = rpc;
-        }
-        const needStat = e.isUnknown() || this.opts.stat;
-        const s = needStat ? await e.lstat() : e;
-        if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
-          const target = await s.realpath();
-          if (target && (target.isUnknown() || this.opts.stat)) {
-            await target.lstat();
-          }
-        }
-        return this.matchCheckTest(s, ifDir);
+      peek() {
+        const val = this.tail.peek();
+        if (val === void 0 && this.tail.next) return this.tail.next.peek();
+        return val;
       }
-      matchCheckTest(e, ifDir) {
-        return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !e.realpathCached()?.isDirectory()) && !this.#ignored(e) ? e : void 0;
+      isEmpty() {
+        return this.length === 0;
       }
-      matchCheckSync(e, ifDir) {
-        if (ifDir && this.opts.nodir)
-          return void 0;
-        let rpc;
-        if (this.opts.realpath) {
-          rpc = e.realpathCached() || e.realpathSync();
-          if (!rpc)
-            return void 0;
-          e = rpc;
-        }
-        const needStat = e.isUnknown() || this.opts.stat;
-        const s = needStat ? e.lstatSync() : e;
-        if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
-          const target = s.realpathSync();
-          if (target && (target?.isUnknown() || this.opts.stat)) {
-            target.lstatSync();
-          }
-        }
-        return this.matchCheckTest(s, ifDir);
+    };
+  }
+});
+
+// node_modules/b4a/index.js
+var require_b4a = __commonJS({
+  "node_modules/b4a/index.js"(exports2, module2) {
+    function isBuffer(value) {
+      return Buffer.isBuffer(value) || value instanceof Uint8Array;
+    }
+    function isEncoding(encoding) {
+      return Buffer.isEncoding(encoding);
+    }
+    function alloc(size, fill2, encoding) {
+      return Buffer.alloc(size, fill2, encoding);
+    }
+    function allocUnsafe(size) {
+      return Buffer.allocUnsafe(size);
+    }
+    function allocUnsafeSlow(size) {
+      return Buffer.allocUnsafeSlow(size);
+    }
+    function byteLength(string2, encoding) {
+      return Buffer.byteLength(string2, encoding);
+    }
+    function compare3(a, b) {
+      return Buffer.compare(a, b);
+    }
+    function concat(buffers, totalLength) {
+      return Buffer.concat(buffers, totalLength);
+    }
+    function copy(source, target, targetStart, start, end) {
+      return toBuffer(source).copy(target, targetStart, start, end);
+    }
+    function equals2(a, b) {
+      return toBuffer(a).equals(b);
+    }
+    function fill(buffer, value, offset, end, encoding) {
+      return toBuffer(buffer).fill(value, offset, end, encoding);
+    }
+    function from(value, encodingOrOffset, length) {
+      return Buffer.from(value, encodingOrOffset, length);
+    }
+    function includes(buffer, value, byteOffset, encoding) {
+      return toBuffer(buffer).includes(value, byteOffset, encoding);
+    }
+    function indexOf(buffer, value, byfeOffset, encoding) {
+      return toBuffer(buffer).indexOf(value, byfeOffset, encoding);
+    }
+    function lastIndexOf(buffer, value, byteOffset, encoding) {
+      return toBuffer(buffer).lastIndexOf(value, byteOffset, encoding);
+    }
+    function swap16(buffer) {
+      return toBuffer(buffer).swap16();
+    }
+    function swap32(buffer) {
+      return toBuffer(buffer).swap32();
+    }
+    function swap64(buffer) {
+      return toBuffer(buffer).swap64();
+    }
+    function toBuffer(buffer) {
+      if (Buffer.isBuffer(buffer)) return buffer;
+      return Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
+    }
+    function toString2(buffer, encoding, start, end) {
+      return toBuffer(buffer).toString(encoding, start, end);
+    }
+    function write(buffer, string2, offset, length, encoding) {
+      return toBuffer(buffer).write(string2, offset, length, encoding);
+    }
+    function writeDoubleLE(buffer, value, offset) {
+      return toBuffer(buffer).writeDoubleLE(value, offset);
+    }
+    function writeFloatLE(buffer, value, offset) {
+      return toBuffer(buffer).writeFloatLE(value, offset);
+    }
+    function writeUInt32LE(buffer, value, offset) {
+      return toBuffer(buffer).writeUInt32LE(value, offset);
+    }
+    function writeInt32LE(buffer, value, offset) {
+      return toBuffer(buffer).writeInt32LE(value, offset);
+    }
+    function readDoubleLE(buffer, offset) {
+      return toBuffer(buffer).readDoubleLE(offset);
+    }
+    function readFloatLE(buffer, offset) {
+      return toBuffer(buffer).readFloatLE(offset);
+    }
+    function readUInt32LE(buffer, offset) {
+      return toBuffer(buffer).readUInt32LE(offset);
+    }
+    function readInt32LE(buffer, offset) {
+      return toBuffer(buffer).readInt32LE(offset);
+    }
+    function writeDoubleBE(buffer, value, offset) {
+      return toBuffer(buffer).writeDoubleBE(value, offset);
+    }
+    function writeFloatBE(buffer, value, offset) {
+      return toBuffer(buffer).writeFloatBE(value, offset);
+    }
+    function writeUInt32BE(buffer, value, offset) {
+      return toBuffer(buffer).writeUInt32BE(value, offset);
+    }
+    function writeInt32BE(buffer, value, offset) {
+      return toBuffer(buffer).writeInt32BE(value, offset);
+    }
+    function readDoubleBE(buffer, offset) {
+      return toBuffer(buffer).readDoubleBE(offset);
+    }
+    function readFloatBE(buffer, offset) {
+      return toBuffer(buffer).readFloatBE(offset);
+    }
+    function readUInt32BE(buffer, offset) {
+      return toBuffer(buffer).readUInt32BE(offset);
+    }
+    function readInt32BE(buffer, offset) {
+      return toBuffer(buffer).readInt32BE(offset);
+    }
+    module2.exports = {
+      isBuffer,
+      isEncoding,
+      alloc,
+      allocUnsafe,
+      allocUnsafeSlow,
+      byteLength,
+      compare: compare3,
+      concat,
+      copy,
+      equals: equals2,
+      fill,
+      from,
+      includes,
+      indexOf,
+      lastIndexOf,
+      swap16,
+      swap32,
+      swap64,
+      toBuffer,
+      toString: toString2,
+      write,
+      writeDoubleLE,
+      writeFloatLE,
+      writeUInt32LE,
+      writeInt32LE,
+      readDoubleLE,
+      readFloatLE,
+      readUInt32LE,
+      readInt32LE,
+      writeDoubleBE,
+      writeFloatBE,
+      writeUInt32BE,
+      writeInt32BE,
+      readDoubleBE,
+      readFloatBE,
+      readUInt32BE,
+      readInt32BE
+    };
+  }
+});
+
+// node_modules/text-decoder/lib/pass-through-decoder.js
+var require_pass_through_decoder = __commonJS({
+  "node_modules/text-decoder/lib/pass-through-decoder.js"(exports2, module2) {
+    var b4a = require_b4a();
+    module2.exports = class PassThroughDecoder {
+      constructor(encoding) {
+        this.encoding = encoding;
       }
-      matchFinish(e, absolute) {
-        if (this.#ignored(e))
-          return;
-        if (!this.includeChildMatches && this.#ignore?.add) {
-          const ign = `${e.relativePosix()}/**`;
-          this.#ignore.add(ign);
-        }
-        const abs = this.opts.absolute === void 0 ? absolute : this.opts.absolute;
-        this.seen.add(e);
-        const mark = this.opts.mark && e.isDirectory() ? this.#sep : "";
-        if (this.opts.withFileTypes) {
-          this.matchEmit(e);
-        } else if (abs) {
-          const abs2 = this.opts.posix ? e.fullpathPosix() : e.fullpath();
-          this.matchEmit(abs2 + mark);
-        } else {
-          const rel = this.opts.posix ? e.relativePosix() : e.relative();
-          const pre = this.opts.dotRelative && !rel.startsWith(".." + this.#sep) ? "." + this.#sep : "";
-          this.matchEmit(!rel ? "." + mark : pre + rel + mark);
-        }
+      get remaining() {
+        return 0;
       }
-      async match(e, absolute, ifDir) {
-        const p = await this.matchCheck(e, ifDir);
-        if (p)
-          this.matchFinish(p, absolute);
+      decode(tail) {
+        return b4a.toString(tail, this.encoding);
       }
-      matchSync(e, absolute, ifDir) {
-        const p = this.matchCheckSync(e, ifDir);
-        if (p)
-          this.matchFinish(p, absolute);
+      flush() {
+        return "";
       }
-      walkCB(target, patterns, cb) {
-        if (this.signal?.aborted)
-          cb();
-        this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb);
+    };
+  }
+});
+
+// node_modules/text-decoder/lib/utf8-decoder.js
+var require_utf8_decoder = __commonJS({
+  "node_modules/text-decoder/lib/utf8-decoder.js"(exports2, module2) {
+    var b4a = require_b4a();
+    module2.exports = class UTF8Decoder {
+      constructor() {
+        this.codePoint = 0;
+        this.bytesSeen = 0;
+        this.bytesNeeded = 0;
+        this.lowerBoundary = 128;
+        this.upperBoundary = 191;
       }
-      walkCB2(target, patterns, processor, cb) {
-        if (this.#childrenIgnored(target))
-          return cb();
-        if (this.signal?.aborted)
-          cb();
-        if (this.paused) {
-          this.onResume(() => this.walkCB2(target, patterns, processor, cb));
-          return;
-        }
-        processor.processPatterns(target, patterns);
-        let tasks = 1;
-        const next = () => {
-          if (--tasks === 0)
-            cb();
-        };
-        for (const [m, absolute, ifDir] of processor.matches.entries()) {
-          if (this.#ignored(m))
-            continue;
-          tasks++;
-          this.match(m, absolute, ifDir).then(() => next());
+      get remaining() {
+        return this.bytesSeen;
+      }
+      decode(data) {
+        if (this.bytesNeeded === 0) {
+          let isBoundary = true;
+          for (let i = Math.max(0, data.byteLength - 4), n = data.byteLength; i < n && isBoundary; i++) {
+            isBoundary = data[i] <= 127;
+          }
+          if (isBoundary) return b4a.toString(data, "utf8");
         }
-        for (const t of processor.subwalkTargets()) {
-          if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
+        let result = "";
+        for (let i = 0, n = data.byteLength; i < n; i++) {
+          const byte = data[i];
+          if (this.bytesNeeded === 0) {
+            if (byte <= 127) {
+              result += String.fromCharCode(byte);
+            } else {
+              this.bytesSeen = 1;
+              if (byte >= 194 && byte <= 223) {
+                this.bytesNeeded = 2;
+                this.codePoint = byte & 31;
+              } else if (byte >= 224 && byte <= 239) {
+                if (byte === 224) this.lowerBoundary = 160;
+                else if (byte === 237) this.upperBoundary = 159;
+                this.bytesNeeded = 3;
+                this.codePoint = byte & 15;
+              } else if (byte >= 240 && byte <= 244) {
+                if (byte === 240) this.lowerBoundary = 144;
+                if (byte === 244) this.upperBoundary = 143;
+                this.bytesNeeded = 4;
+                this.codePoint = byte & 7;
+              } else {
+                result += "\uFFFD";
+              }
+            }
             continue;
           }
-          tasks++;
-          const childrenCached = t.readdirCached();
-          if (t.calledReaddir())
-            this.walkCB3(t, childrenCached, processor, next);
-          else {
-            t.readdirCB((_2, entries) => this.walkCB3(t, entries, processor, next), true);
+          if (byte < this.lowerBoundary || byte > this.upperBoundary) {
+            this.codePoint = 0;
+            this.bytesNeeded = 0;
+            this.bytesSeen = 0;
+            this.lowerBoundary = 128;
+            this.upperBoundary = 191;
+            result += "\uFFFD";
+            continue;
           }
+          this.lowerBoundary = 128;
+          this.upperBoundary = 191;
+          this.codePoint = this.codePoint << 6 | byte & 63;
+          this.bytesSeen++;
+          if (this.bytesSeen !== this.bytesNeeded) continue;
+          result += String.fromCodePoint(this.codePoint);
+          this.codePoint = 0;
+          this.bytesNeeded = 0;
+          this.bytesSeen = 0;
         }
-        next();
+        return result;
       }
-      walkCB3(target, entries, processor, cb) {
-        processor = processor.filterEntries(target, entries);
-        let tasks = 1;
-        const next = () => {
-          if (--tasks === 0)
-            cb();
-        };
-        for (const [m, absolute, ifDir] of processor.matches.entries()) {
-          if (this.#ignored(m))
-            continue;
-          tasks++;
-          this.match(m, absolute, ifDir).then(() => next());
-        }
-        for (const [target2, patterns] of processor.subwalks.entries()) {
-          tasks++;
-          this.walkCB2(target2, patterns, processor.child(), next);
+      flush() {
+        const result = this.bytesNeeded > 0 ? "\uFFFD" : "";
+        this.codePoint = 0;
+        this.bytesNeeded = 0;
+        this.bytesSeen = 0;
+        this.lowerBoundary = 128;
+        this.upperBoundary = 191;
+        return result;
+      }
+    };
+  }
+});
+
+// node_modules/text-decoder/index.js
+var require_text_decoder = __commonJS({
+  "node_modules/text-decoder/index.js"(exports2, module2) {
+    var PassThroughDecoder = require_pass_through_decoder();
+    var UTF8Decoder = require_utf8_decoder();
+    module2.exports = class TextDecoder {
+      constructor(encoding = "utf8") {
+        this.encoding = normalizeEncoding(encoding);
+        switch (this.encoding) {
+          case "utf8":
+            this.decoder = new UTF8Decoder();
+            break;
+          case "utf16le":
+          case "base64":
+            throw new Error("Unsupported encoding: " + this.encoding);
+          default:
+            this.decoder = new PassThroughDecoder(this.encoding);
         }
-        next();
       }
-      walkCBSync(target, patterns, cb) {
-        if (this.signal?.aborted)
-          cb();
-        this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb);
+      get remaining() {
+        return this.decoder.remaining;
       }
-      walkCB2Sync(target, patterns, processor, cb) {
-        if (this.#childrenIgnored(target))
-          return cb();
-        if (this.signal?.aborted)
-          cb();
-        if (this.paused) {
-          this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
-          return;
-        }
-        processor.processPatterns(target, patterns);
-        let tasks = 1;
-        const next = () => {
-          if (--tasks === 0)
-            cb();
-        };
-        for (const [m, absolute, ifDir] of processor.matches.entries()) {
-          if (this.#ignored(m))
-            continue;
-          this.matchSync(m, absolute, ifDir);
-        }
-        for (const t of processor.subwalkTargets()) {
-          if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
-            continue;
-          }
-          tasks++;
-          const children = t.readdirSync();
-          this.walkCB3Sync(t, children, processor, next);
-        }
-        next();
+      push(data) {
+        if (typeof data === "string") return data;
+        return this.decoder.decode(data);
       }
-      walkCB3Sync(target, entries, processor, cb) {
-        processor = processor.filterEntries(target, entries);
-        let tasks = 1;
-        const next = () => {
-          if (--tasks === 0)
-            cb();
-        };
-        for (const [m, absolute, ifDir] of processor.matches.entries()) {
-          if (this.#ignored(m))
-            continue;
-          this.matchSync(m, absolute, ifDir);
-        }
-        for (const [target2, patterns] of processor.subwalks.entries()) {
-          tasks++;
-          this.walkCB2Sync(target2, patterns, processor.child(), next);
-        }
-        next();
+      // For Node.js compatibility
+      write(data) {
+        return this.push(data);
+      }
+      end(data) {
+        let result = "";
+        if (data) result = this.push(data);
+        result += this.decoder.flush();
+        return result;
       }
     };
-    exports2.GlobUtil = GlobUtil;
-    var GlobWalker = class extends GlobUtil {
-      matches = /* @__PURE__ */ new Set();
-      constructor(patterns, path28, opts) {
-        super(patterns, path28, opts);
+    function normalizeEncoding(encoding) {
+      encoding = encoding.toLowerCase();
+      switch (encoding) {
+        case "utf8":
+        case "utf-8":
+          return "utf8";
+        case "ucs2":
+        case "ucs-2":
+        case "utf16le":
+        case "utf-16le":
+          return "utf16le";
+        case "latin1":
+        case "binary":
+          return "latin1";
+        case "base64":
+        case "ascii":
+        case "hex":
+          return encoding;
+        default:
+          throw new Error("Unknown encoding: " + encoding);
       }
-      matchEmit(e) {
-        this.matches.add(e);
+    }
+  }
+});
+
+// node_modules/streamx/index.js
+var require_streamx = __commonJS({
+  "node_modules/streamx/index.js"(exports2, module2) {
+    var { EventEmitter: EventEmitter2 } = require("events");
+    var STREAM_DESTROYED = new Error("Stream was destroyed");
+    var PREMATURE_CLOSE = new Error("Premature close");
+    var queueTick = require_process_next_tick();
+    var FIFO = require_fast_fifo();
+    var TextDecoder2 = require_text_decoder();
+    var MAX = (1 << 29) - 1;
+    var OPENING = 1;
+    var PREDESTROYING = 2;
+    var DESTROYING = 4;
+    var DESTROYED = 8;
+    var NOT_OPENING = MAX ^ OPENING;
+    var NOT_PREDESTROYING = MAX ^ PREDESTROYING;
+    var READ_ACTIVE = 1 << 4;
+    var READ_UPDATING = 2 << 4;
+    var READ_PRIMARY = 4 << 4;
+    var READ_QUEUED = 8 << 4;
+    var READ_RESUMED = 16 << 4;
+    var READ_PIPE_DRAINED = 32 << 4;
+    var READ_ENDING = 64 << 4;
+    var READ_EMIT_DATA = 128 << 4;
+    var READ_EMIT_READABLE = 256 << 4;
+    var READ_EMITTED_READABLE = 512 << 4;
+    var READ_DONE = 1024 << 4;
+    var READ_NEXT_TICK = 2048 << 4;
+    var READ_NEEDS_PUSH = 4096 << 4;
+    var READ_READ_AHEAD = 8192 << 4;
+    var READ_FLOWING = READ_RESUMED | READ_PIPE_DRAINED;
+    var READ_ACTIVE_AND_NEEDS_PUSH = READ_ACTIVE | READ_NEEDS_PUSH;
+    var READ_PRIMARY_AND_ACTIVE = READ_PRIMARY | READ_ACTIVE;
+    var READ_EMIT_READABLE_AND_QUEUED = READ_EMIT_READABLE | READ_QUEUED;
+    var READ_RESUMED_READ_AHEAD = READ_RESUMED | READ_READ_AHEAD;
+    var READ_NOT_ACTIVE = MAX ^ READ_ACTIVE;
+    var READ_NON_PRIMARY = MAX ^ READ_PRIMARY;
+    var READ_NON_PRIMARY_AND_PUSHED = MAX ^ (READ_PRIMARY | READ_NEEDS_PUSH);
+    var READ_PUSHED = MAX ^ READ_NEEDS_PUSH;
+    var READ_PAUSED = MAX ^ READ_RESUMED;
+    var READ_NOT_QUEUED = MAX ^ (READ_QUEUED | READ_EMITTED_READABLE);
+    var READ_NOT_ENDING = MAX ^ READ_ENDING;
+    var READ_PIPE_NOT_DRAINED = MAX ^ READ_FLOWING;
+    var READ_NOT_NEXT_TICK = MAX ^ READ_NEXT_TICK;
+    var READ_NOT_UPDATING = MAX ^ READ_UPDATING;
+    var READ_NO_READ_AHEAD = MAX ^ READ_READ_AHEAD;
+    var READ_PAUSED_NO_READ_AHEAD = MAX ^ READ_RESUMED_READ_AHEAD;
+    var WRITE_ACTIVE = 1 << 18;
+    var WRITE_UPDATING = 2 << 18;
+    var WRITE_PRIMARY = 4 << 18;
+    var WRITE_QUEUED = 8 << 18;
+    var WRITE_UNDRAINED = 16 << 18;
+    var WRITE_DONE = 32 << 18;
+    var WRITE_EMIT_DRAIN = 64 << 18;
+    var WRITE_NEXT_TICK = 128 << 18;
+    var WRITE_WRITING = 256 << 18;
+    var WRITE_FINISHING = 512 << 18;
+    var WRITE_CORKED = 1024 << 18;
+    var WRITE_NOT_ACTIVE = MAX ^ (WRITE_ACTIVE | WRITE_WRITING);
+    var WRITE_NON_PRIMARY = MAX ^ WRITE_PRIMARY;
+    var WRITE_NOT_FINISHING = MAX ^ WRITE_FINISHING;
+    var WRITE_DRAINED = MAX ^ WRITE_UNDRAINED;
+    var WRITE_NOT_QUEUED = MAX ^ WRITE_QUEUED;
+    var WRITE_NOT_NEXT_TICK = MAX ^ WRITE_NEXT_TICK;
+    var WRITE_NOT_UPDATING = MAX ^ WRITE_UPDATING;
+    var WRITE_NOT_CORKED = MAX ^ WRITE_CORKED;
+    var ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
+    var NOT_ACTIVE = MAX ^ ACTIVE;
+    var DONE = READ_DONE | WRITE_DONE;
+    var DESTROY_STATUS = DESTROYING | DESTROYED | PREDESTROYING;
+    var OPEN_STATUS = DESTROY_STATUS | OPENING;
+    var AUTO_DESTROY = DESTROY_STATUS | DONE;
+    var NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
+    var ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
+    var TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
+    var IS_OPENING = OPEN_STATUS | TICKING;
+    var READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE;
+    var READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED;
+    var READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED;
+    var READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE;
+    var SHOULD_NOT_READ = OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH | READ_READ_AHEAD;
+    var READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE;
+    var READ_UPDATE_SYNC_STATUS = READ_UPDATING | OPEN_STATUS | READ_NEXT_TICK | READ_PRIMARY;
+    var WRITE_PRIMARY_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_DONE;
+    var WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
+    var WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
+    var WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE;
+    var WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED;
+    var WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
+    var WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
+    var WRITE_FINISHING_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_QUEUED_AND_ACTIVE | WRITE_DONE;
+    var WRITE_BACKPRESSURE_STATUS = WRITE_UNDRAINED | DESTROY_STATUS | WRITE_FINISHING | WRITE_DONE;
+    var WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY;
+    var asyncIterator = Symbol.asyncIterator || /* @__PURE__ */ Symbol("asyncIterator");
+    var WritableState = class {
+      constructor(stream2, { highWaterMark = 16384, map = null, mapWritable, byteLength, byteLengthWritable } = {}) {
+        this.stream = stream2;
+        this.queue = new FIFO();
+        this.highWaterMark = highWaterMark;
+        this.buffered = 0;
+        this.error = null;
+        this.pipeline = null;
+        this.drains = null;
+        this.byteLength = byteLengthWritable || byteLength || defaultByteLength;
+        this.map = mapWritable || map;
+        this.afterWrite = afterWrite.bind(this);
+        this.afterUpdateNextTick = updateWriteNT.bind(this);
       }
-      async walk() {
-        if (this.signal?.aborted)
-          throw this.signal.reason;
-        if (this.path.isUnknown()) {
-          await this.path.lstat();
-        }
-        await new Promise((res, rej) => {
-          this.walkCB(this.path, this.patterns, () => {
-            if (this.signal?.aborted) {
-              rej(this.signal.reason);
-            } else {
-              res(this.matches);
-            }
-          });
-        });
-        return this.matches;
+      get ended() {
+        return (this.stream._duplexState & WRITE_DONE) !== 0;
       }
-      walkSync() {
-        if (this.signal?.aborted)
-          throw this.signal.reason;
-        if (this.path.isUnknown()) {
-          this.path.lstatSync();
+      push(data) {
+        if (this.map !== null) data = this.map(data);
+        this.buffered += this.byteLength(data);
+        this.queue.push(data);
+        if (this.buffered < this.highWaterMark) {
+          this.stream._duplexState |= WRITE_QUEUED;
+          return true;
         }
-        this.walkCBSync(this.path, this.patterns, () => {
-          if (this.signal?.aborted)
-            throw this.signal.reason;
-        });
-        return this.matches;
+        this.stream._duplexState |= WRITE_QUEUED_AND_UNDRAINED;
+        return false;
       }
-    };
-    exports2.GlobWalker = GlobWalker;
-    var GlobStream = class extends GlobUtil {
-      results;
-      constructor(patterns, path28, opts) {
-        super(patterns, path28, opts);
-        this.results = new minipass_1.Minipass({
-          signal: this.signal,
-          objectMode: true
-        });
-        this.results.on("drain", () => this.resume());
-        this.results.on("resume", () => this.resume());
+      shift() {
+        const data = this.queue.shift();
+        this.buffered -= this.byteLength(data);
+        if (this.buffered === 0) this.stream._duplexState &= WRITE_NOT_QUEUED;
+        return data;
       }
-      matchEmit(e) {
-        this.results.write(e);
-        if (!this.results.flowing)
-          this.pause();
+      end(data) {
+        if (typeof data === "function") this.stream.once("finish", data);
+        else if (data !== void 0 && data !== null) this.push(data);
+        this.stream._duplexState = (this.stream._duplexState | WRITE_FINISHING) & WRITE_NON_PRIMARY;
       }
-      stream() {
-        const target = this.path;
-        if (target.isUnknown()) {
-          target.lstat().then(() => {
-            this.walkCB(target, this.patterns, () => this.results.end());
-          });
-        } else {
-          this.walkCB(target, this.patterns, () => this.results.end());
+      autoBatch(data, cb) {
+        const buffer = [];
+        const stream2 = this.stream;
+        buffer.push(data);
+        while ((stream2._duplexState & WRITE_STATUS) === WRITE_QUEUED_AND_ACTIVE) {
+          buffer.push(stream2._writableState.shift());
         }
-        return this.results;
+        if ((stream2._duplexState & OPEN_STATUS) !== 0) return cb(null);
+        stream2._writev(buffer, cb);
       }
-      streamSync() {
-        if (this.path.isUnknown()) {
-          this.path.lstatSync();
-        }
-        this.walkCBSync(this.path, this.patterns, () => this.results.end());
-        return this.results;
+      update() {
+        const stream2 = this.stream;
+        stream2._duplexState |= WRITE_UPDATING;
+        do {
+          while ((stream2._duplexState & WRITE_STATUS) === WRITE_QUEUED) {
+            const data = this.shift();
+            stream2._duplexState |= WRITE_ACTIVE_AND_WRITING;
+            stream2._write(data, this.afterWrite);
+          }
+          if ((stream2._duplexState & WRITE_PRIMARY_AND_ACTIVE) === 0) this.updateNonPrimary();
+        } while (this.continueUpdate() === true);
+        stream2._duplexState &= WRITE_NOT_UPDATING;
       }
-    };
-    exports2.GlobStream = GlobStream;
-  }
-});
-
-// node_modules/glob/dist/commonjs/glob.js
-var require_glob2 = __commonJS({
-  "node_modules/glob/dist/commonjs/glob.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Glob = void 0;
-    var minimatch_1 = require_commonjs20();
-    var node_url_1 = require("node:url");
-    var path_scurry_1 = require_commonjs23();
-    var pattern_js_1 = require_pattern();
-    var walker_js_1 = require_walker();
-    var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
-    var Glob = class {
-      absolute;
-      cwd;
-      root;
-      dot;
-      dotRelative;
-      follow;
-      ignore;
-      magicalBraces;
-      mark;
-      matchBase;
-      maxDepth;
-      nobrace;
-      nocase;
-      nodir;
-      noext;
-      noglobstar;
-      pattern;
-      platform;
-      realpath;
-      scurry;
-      stat;
-      signal;
-      windowsPathsNoEscape;
-      withFileTypes;
-      includeChildMatches;
-      /**
-       * The options provided to the constructor.
-       */
-      opts;
-      /**
-       * An array of parsed immutable {@link Pattern} objects.
-       */
-      patterns;
-      /**
-       * All options are stored as properties on the `Glob` object.
-       *
-       * See {@link GlobOptions} for full options descriptions.
-       *
-       * Note that a previous `Glob` object can be passed as the
-       * `GlobOptions` to another `Glob` instantiation to re-use settings
-       * and caches with a new pattern.
-       *
-       * Traversal functions can be called multiple times to run the walk
-       * again.
-       */
-      constructor(pattern, opts) {
-        if (!opts)
-          throw new TypeError("glob options required");
-        this.withFileTypes = !!opts.withFileTypes;
-        this.signal = opts.signal;
-        this.follow = !!opts.follow;
-        this.dot = !!opts.dot;
-        this.dotRelative = !!opts.dotRelative;
-        this.nodir = !!opts.nodir;
-        this.mark = !!opts.mark;
-        if (!opts.cwd) {
-          this.cwd = "";
-        } else if (opts.cwd instanceof URL || opts.cwd.startsWith("file://")) {
-          opts.cwd = (0, node_url_1.fileURLToPath)(opts.cwd);
-        }
-        this.cwd = opts.cwd || "";
-        this.root = opts.root;
-        this.magicalBraces = !!opts.magicalBraces;
-        this.nobrace = !!opts.nobrace;
-        this.noext = !!opts.noext;
-        this.realpath = !!opts.realpath;
-        this.absolute = opts.absolute;
-        this.includeChildMatches = opts.includeChildMatches !== false;
-        this.noglobstar = !!opts.noglobstar;
-        this.matchBase = !!opts.matchBase;
-        this.maxDepth = typeof opts.maxDepth === "number" ? opts.maxDepth : Infinity;
-        this.stat = !!opts.stat;
-        this.ignore = opts.ignore;
-        if (this.withFileTypes && this.absolute !== void 0) {
-          throw new Error("cannot set absolute and withFileTypes:true");
-        }
-        if (typeof pattern === "string") {
-          pattern = [pattern];
-        }
-        this.windowsPathsNoEscape = !!opts.windowsPathsNoEscape || opts.allowWindowsEscape === false;
-        if (this.windowsPathsNoEscape) {
-          pattern = pattern.map((p) => p.replace(/\\/g, "/"));
+      updateNonPrimary() {
+        const stream2 = this.stream;
+        if ((stream2._duplexState & WRITE_FINISHING_STATUS) === WRITE_FINISHING) {
+          stream2._duplexState = (stream2._duplexState | WRITE_ACTIVE) & WRITE_NOT_FINISHING;
+          stream2._final(afterFinal.bind(this));
+          return;
         }
-        if (this.matchBase) {
-          if (opts.noglobstar) {
-            throw new TypeError("base matching requires globstar");
+        if ((stream2._duplexState & DESTROY_STATUS) === DESTROYING) {
+          if ((stream2._duplexState & ACTIVE_OR_TICKING) === 0) {
+            stream2._duplexState |= ACTIVE;
+            stream2._destroy(afterDestroy.bind(this));
           }
-          pattern = pattern.map((p) => p.includes("/") ? p : `./**/${p}`);
+          return;
         }
-        this.pattern = pattern;
-        this.platform = opts.platform || defaultPlatform;
-        this.opts = { ...opts, platform: this.platform };
-        if (opts.scurry) {
-          this.scurry = opts.scurry;
-          if (opts.nocase !== void 0 && opts.nocase !== opts.scurry.nocase) {
-            throw new Error("nocase option contradicts provided scurry option");
-          }
-        } else {
-          const Scurry = opts.platform === "win32" ? path_scurry_1.PathScurryWin32 : opts.platform === "darwin" ? path_scurry_1.PathScurryDarwin : opts.platform ? path_scurry_1.PathScurryPosix : path_scurry_1.PathScurry;
-          this.scurry = new Scurry(this.cwd, {
-            nocase: opts.nocase,
-            fs: opts.fs
-          });
+        if ((stream2._duplexState & IS_OPENING) === OPENING) {
+          stream2._duplexState = (stream2._duplexState | ACTIVE) & NOT_OPENING;
+          stream2._open(afterOpen.bind(this));
         }
-        this.nocase = this.scurry.nocase;
-        const nocaseMagicOnly = this.platform === "darwin" || this.platform === "win32";
-        const mmo = {
-          // default nocase based on platform
-          ...opts,
-          dot: this.dot,
-          matchBase: this.matchBase,
-          nobrace: this.nobrace,
-          nocase: this.nocase,
-          nocaseMagicOnly,
-          nocomment: true,
-          noext: this.noext,
-          nonegate: true,
-          optimizationLevel: 2,
-          platform: this.platform,
-          windowsPathsNoEscape: this.windowsPathsNoEscape,
-          debug: !!this.opts.debug
-        };
-        const mms = this.pattern.map((p) => new minimatch_1.Minimatch(p, mmo));
-        const [matchSet, globParts] = mms.reduce((set2, m) => {
-          set2[0].push(...m.set);
-          set2[1].push(...m.globParts);
-          return set2;
-        }, [[], []]);
-        this.patterns = matchSet.map((set2, i) => {
-          const g = globParts[i];
-          if (!g)
-            throw new Error("invalid pattern object");
-          return new pattern_js_1.Pattern(set2, g, 0, this.platform);
-        });
-      }
-      async walk() {
-        return [
-          ...await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
-            ...this.opts,
-            maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
-            platform: this.platform,
-            nocase: this.nocase,
-            includeChildMatches: this.includeChildMatches
-          }).walk()
-        ];
       }
-      walkSync() {
-        return [
-          ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
-            ...this.opts,
-            maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
-            platform: this.platform,
-            nocase: this.nocase,
-            includeChildMatches: this.includeChildMatches
-          }).walkSync()
-        ];
-      }
-      stream() {
-        return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
-          ...this.opts,
-          maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
-          platform: this.platform,
-          nocase: this.nocase,
-          includeChildMatches: this.includeChildMatches
-        }).stream();
-      }
-      streamSync() {
-        return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
-          ...this.opts,
-          maxDepth: this.maxDepth !== Infinity ? this.maxDepth + this.scurry.cwd.depth() : Infinity,
-          platform: this.platform,
-          nocase: this.nocase,
-          includeChildMatches: this.includeChildMatches
-        }).streamSync();
-      }
-      /**
-       * Default sync iteration function. Returns a Generator that
-       * iterates over the results.
-       */
-      iterateSync() {
-        return this.streamSync()[Symbol.iterator]();
-      }
-      [Symbol.iterator]() {
-        return this.iterateSync();
+      continueUpdate() {
+        if ((this.stream._duplexState & WRITE_NEXT_TICK) === 0) return false;
+        this.stream._duplexState &= WRITE_NOT_NEXT_TICK;
+        return true;
       }
-      /**
-       * Default async iteration function. Returns an AsyncGenerator that
-       * iterates over the results.
-       */
-      iterate() {
-        return this.stream()[Symbol.asyncIterator]();
+      updateCallback() {
+        if ((this.stream._duplexState & WRITE_UPDATE_SYNC_STATUS) === WRITE_PRIMARY) this.update();
+        else this.updateNextTick();
       }
-      [Symbol.asyncIterator]() {
-        return this.iterate();
+      updateNextTick() {
+        if ((this.stream._duplexState & WRITE_NEXT_TICK) !== 0) return;
+        this.stream._duplexState |= WRITE_NEXT_TICK;
+        if ((this.stream._duplexState & WRITE_UPDATING) === 0) queueTick(this.afterUpdateNextTick);
       }
     };
-    exports2.Glob = Glob;
-  }
-});
-
-// node_modules/glob/dist/commonjs/has-magic.js
-var require_has_magic = __commonJS({
-  "node_modules/glob/dist/commonjs/has-magic.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.hasMagic = void 0;
-    var minimatch_1 = require_commonjs20();
-    var hasMagic = (pattern, options = {}) => {
-      if (!Array.isArray(pattern)) {
-        pattern = [pattern];
-      }
-      for (const p of pattern) {
-        if (new minimatch_1.Minimatch(p, options).hasMagic())
-          return true;
+    var ReadableState = class {
+      constructor(stream2, { highWaterMark = 16384, map = null, mapReadable, byteLength, byteLengthReadable } = {}) {
+        this.stream = stream2;
+        this.queue = new FIFO();
+        this.highWaterMark = highWaterMark === 0 ? 1 : highWaterMark;
+        this.buffered = 0;
+        this.readAhead = highWaterMark > 0;
+        this.error = null;
+        this.pipeline = null;
+        this.byteLength = byteLengthReadable || byteLength || defaultByteLength;
+        this.map = mapReadable || map;
+        this.pipeTo = null;
+        this.afterRead = afterRead.bind(this);
+        this.afterUpdateNextTick = updateReadNT.bind(this);
       }
-      return false;
-    };
-    exports2.hasMagic = hasMagic;
-  }
-});
-
-// node_modules/glob/dist/commonjs/index.js
-var require_commonjs24 = __commonJS({
-  "node_modules/glob/dist/commonjs/index.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
-    exports2.globStreamSync = globStreamSync;
-    exports2.globStream = globStream;
-    exports2.globSync = globSync;
-    exports2.globIterateSync = globIterateSync;
-    exports2.globIterate = globIterate;
-    var minimatch_1 = require_commonjs20();
-    var glob_js_1 = require_glob2();
-    var has_magic_js_1 = require_has_magic();
-    var minimatch_2 = require_commonjs20();
-    Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
-      return minimatch_2.escape;
-    } });
-    Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() {
-      return minimatch_2.unescape;
-    } });
-    var glob_js_2 = require_glob2();
-    Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() {
-      return glob_js_2.Glob;
-    } });
-    var has_magic_js_2 = require_has_magic();
-    Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() {
-      return has_magic_js_2.hasMagic;
-    } });
-    var ignore_js_1 = require_ignore();
-    Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() {
-      return ignore_js_1.Ignore;
-    } });
-    function globStreamSync(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).streamSync();
-    }
-    function globStream(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).stream();
-    }
-    function globSync(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).walkSync();
-    }
-    async function glob_(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).walk();
-    }
-    function globIterateSync(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).iterateSync();
-    }
-    function globIterate(pattern, options = {}) {
-      return new glob_js_1.Glob(pattern, options).iterate();
-    }
-    exports2.streamSync = globStreamSync;
-    exports2.stream = Object.assign(globStream, { sync: globStreamSync });
-    exports2.iterateSync = globIterateSync;
-    exports2.iterate = Object.assign(globIterate, {
-      sync: globIterateSync
-    });
-    exports2.sync = Object.assign(globSync, {
-      stream: globStreamSync,
-      iterate: globIterateSync
-    });
-    exports2.glob = Object.assign(glob_, {
-      glob: glob_,
-      globSync,
-      sync: exports2.sync,
-      globStream,
-      stream: exports2.stream,
-      globStreamSync,
-      streamSync: exports2.streamSync,
-      globIterate,
-      iterate: exports2.iterate,
-      globIterateSync,
-      iterateSync: exports2.iterateSync,
-      Glob: glob_js_1.Glob,
-      hasMagic: has_magic_js_1.hasMagic,
-      escape: minimatch_1.escape,
-      unescape: minimatch_1.unescape
-    });
-    exports2.glob.glob = exports2.glob;
-  }
-});
-
-// node_modules/archiver-utils/file.js
-var require_file3 = __commonJS({
-  "node_modules/archiver-utils/file.js"(exports2, module2) {
-    var fs30 = require_graceful_fs();
-    var path28 = require("path");
-    var flatten = require_flatten();
-    var difference = require_difference();
-    var union = require_union();
-    var isPlainObject3 = require_isPlainObject();
-    var glob2 = require_commonjs24();
-    var file = module2.exports = {};
-    var pathSeparatorRe = /[\/\\]/g;
-    var processPatterns = function(patterns, fn) {
-      var result = [];
-      flatten(patterns).forEach(function(pattern) {
-        var exclusion = pattern.indexOf("!") === 0;
-        if (exclusion) {
-          pattern = pattern.slice(1);
-        }
-        var matches = fn(pattern);
-        if (exclusion) {
-          result = difference(result, matches);
+      get ended() {
+        return (this.stream._duplexState & READ_DONE) !== 0;
+      }
+      pipe(pipeTo, cb) {
+        if (this.pipeTo !== null) throw new Error("Can only pipe to one destination");
+        if (typeof cb !== "function") cb = null;
+        this.stream._duplexState |= READ_PIPE_DRAINED;
+        this.pipeTo = pipeTo;
+        this.pipeline = new Pipeline(this.stream, pipeTo, cb);
+        if (cb) this.stream.on("error", noop3);
+        if (isStreamx(pipeTo)) {
+          pipeTo._writableState.pipeline = this.pipeline;
+          if (cb) pipeTo.on("error", noop3);
+          pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline));
         } else {
-          result = union(result, matches);
+          const onerror = this.pipeline.done.bind(this.pipeline, pipeTo);
+          const onclose = this.pipeline.done.bind(this.pipeline, pipeTo, null);
+          pipeTo.on("error", onerror);
+          pipeTo.on("close", onclose);
+          pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline));
         }
-      });
-      return result;
-    };
-    file.exists = function() {
-      var filepath = path28.join.apply(path28, arguments);
-      return fs30.existsSync(filepath);
-    };
-    file.expand = function(...args) {
-      var options = isPlainObject3(args[0]) ? args.shift() : {};
-      var patterns = Array.isArray(args[0]) ? args[0] : args;
-      if (patterns.length === 0) {
-        return [];
-      }
-      var matches = processPatterns(patterns, function(pattern) {
-        return glob2.sync(pattern, options);
-      });
-      if (options.filter) {
-        matches = matches.filter(function(filepath) {
-          filepath = path28.join(options.cwd || "", filepath);
-          try {
-            if (typeof options.filter === "function") {
-              return options.filter(filepath);
-            } else {
-              return fs30.statSync(filepath)[options.filter]();
-            }
-          } catch (e) {
-            return false;
-          }
-        });
+        pipeTo.on("drain", afterDrain.bind(this));
+        this.stream.emit("piping", pipeTo);
+        pipeTo.emit("pipe", this.stream);
       }
-      return matches;
-    };
-    file.expandMapping = function(patterns, destBase, options) {
-      options = Object.assign({
-        rename: function(destBase2, destPath) {
-          return path28.join(destBase2 || "", destPath);
-        }
-      }, options);
-      var files = [];
-      var fileByDest = {};
-      file.expand(options, patterns).forEach(function(src) {
-        var destPath = src;
-        if (options.flatten) {
-          destPath = path28.basename(destPath);
+      push(data) {
+        const stream2 = this.stream;
+        if (data === null) {
+          this.highWaterMark = 0;
+          stream2._duplexState = (stream2._duplexState | READ_ENDING) & READ_NON_PRIMARY_AND_PUSHED;
+          return false;
         }
-        if (options.ext) {
-          destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
+        if (this.map !== null) {
+          data = this.map(data);
+          if (data === null) {
+            stream2._duplexState &= READ_PUSHED;
+            return this.buffered < this.highWaterMark;
+          }
         }
-        var dest = options.rename(destBase, destPath, options);
-        if (options.cwd) {
-          src = path28.join(options.cwd, src);
+        this.buffered += this.byteLength(data);
+        this.queue.push(data);
+        stream2._duplexState = (stream2._duplexState | READ_QUEUED) & READ_PUSHED;
+        return this.buffered < this.highWaterMark;
+      }
+      shift() {
+        const data = this.queue.shift();
+        this.buffered -= this.byteLength(data);
+        if (this.buffered === 0) this.stream._duplexState &= READ_NOT_QUEUED;
+        return data;
+      }
+      unshift(data) {
+        const pending = [this.map !== null ? this.map(data) : data];
+        while (this.buffered > 0) pending.push(this.shift());
+        for (let i = 0; i < pending.length - 1; i++) {
+          const data2 = pending[i];
+          this.buffered += this.byteLength(data2);
+          this.queue.push(data2);
         }
-        dest = dest.replace(pathSeparatorRe, "/");
-        src = src.replace(pathSeparatorRe, "/");
-        if (fileByDest[dest]) {
-          fileByDest[dest].src.push(src);
-        } else {
-          files.push({
-            src: [src],
-            dest
-          });
-          fileByDest[dest] = files[files.length - 1];
+        this.push(pending[pending.length - 1]);
+      }
+      read() {
+        const stream2 = this.stream;
+        if ((stream2._duplexState & READ_STATUS) === READ_QUEUED) {
+          const data = this.shift();
+          if (this.pipeTo !== null && this.pipeTo.write(data) === false) stream2._duplexState &= READ_PIPE_NOT_DRAINED;
+          if ((stream2._duplexState & READ_EMIT_DATA) !== 0) stream2.emit("data", data);
+          return data;
         }
-      });
-      return files;
-    };
-    file.normalizeFilesArray = function(data) {
-      var files = [];
-      data.forEach(function(obj) {
-        var prop;
-        if ("src" in obj || "dest" in obj) {
-          files.push(obj);
+        if (this.readAhead === false) {
+          stream2._duplexState |= READ_READ_AHEAD;
+          this.updateNextTick();
         }
-      });
-      if (files.length === 0) {
-        return [];
+        return null;
       }
-      files = _(files).chain().forEach(function(obj) {
-        if (!("src" in obj) || !obj.src) {
-          return;
-        }
-        if (Array.isArray(obj.src)) {
-          obj.src = flatten(obj.src);
-        } else {
-          obj.src = [obj.src];
+      drain() {
+        const stream2 = this.stream;
+        while ((stream2._duplexState & READ_STATUS) === READ_QUEUED && (stream2._duplexState & READ_FLOWING) !== 0) {
+          const data = this.shift();
+          if (this.pipeTo !== null && this.pipeTo.write(data) === false) stream2._duplexState &= READ_PIPE_NOT_DRAINED;
+          if ((stream2._duplexState & READ_EMIT_DATA) !== 0) stream2.emit("data", data);
         }
-      }).map(function(obj) {
-        var expandOptions = Object.assign({}, obj);
-        delete expandOptions.src;
-        delete expandOptions.dest;
-        if (obj.expand) {
-          return file.expandMapping(obj.src, obj.dest, expandOptions).map(function(mapObj) {
-            var result2 = Object.assign({}, obj);
-            result2.orig = Object.assign({}, obj);
-            result2.src = mapObj.src;
-            result2.dest = mapObj.dest;
-            ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) {
-              delete result2[prop];
-            });
-            return result2;
-          });
+      }
+      update() {
+        const stream2 = this.stream;
+        stream2._duplexState |= READ_UPDATING;
+        do {
+          this.drain();
+          while (this.buffered < this.highWaterMark && (stream2._duplexState & SHOULD_NOT_READ) === READ_READ_AHEAD) {
+            stream2._duplexState |= READ_ACTIVE_AND_NEEDS_PUSH;
+            stream2._read(this.afterRead);
+            this.drain();
+          }
+          if ((stream2._duplexState & READ_READABLE_STATUS) === READ_EMIT_READABLE_AND_QUEUED) {
+            stream2._duplexState |= READ_EMITTED_READABLE;
+            stream2.emit("readable");
+          }
+          if ((stream2._duplexState & READ_PRIMARY_AND_ACTIVE) === 0) this.updateNonPrimary();
+        } while (this.continueUpdate() === true);
+        stream2._duplexState &= READ_NOT_UPDATING;
+      }
+      updateNonPrimary() {
+        const stream2 = this.stream;
+        if ((stream2._duplexState & READ_ENDING_STATUS) === READ_ENDING) {
+          stream2._duplexState = (stream2._duplexState | READ_DONE) & READ_NOT_ENDING;
+          stream2.emit("end");
+          if ((stream2._duplexState & AUTO_DESTROY) === DONE) stream2._duplexState |= DESTROYING;
+          if (this.pipeTo !== null) this.pipeTo.end();
         }
-        var result = Object.assign({}, obj);
-        result.orig = Object.assign({}, obj);
-        if ("src" in result) {
-          Object.defineProperty(result, "src", {
-            enumerable: true,
-            get: function fn() {
-              var src;
-              if (!("result" in fn)) {
-                src = obj.src;
-                src = Array.isArray(src) ? flatten(src) : [src];
-                fn.result = file.expand(expandOptions, src);
-              }
-              return fn.result;
-            }
-          });
+        if ((stream2._duplexState & DESTROY_STATUS) === DESTROYING) {
+          if ((stream2._duplexState & ACTIVE_OR_TICKING) === 0) {
+            stream2._duplexState |= ACTIVE;
+            stream2._destroy(afterDestroy.bind(this));
+          }
+          return;
         }
-        if ("dest" in result) {
-          result.dest = obj.dest;
+        if ((stream2._duplexState & IS_OPENING) === OPENING) {
+          stream2._duplexState = (stream2._duplexState | ACTIVE) & NOT_OPENING;
+          stream2._open(afterOpen.bind(this));
         }
-        return result;
-      }).flatten().value();
-      return files;
-    };
-  }
-});
-
-// node_modules/archiver-utils/index.js
-var require_archiver_utils = __commonJS({
-  "node_modules/archiver-utils/index.js"(exports2, module2) {
-    var fs30 = require_graceful_fs();
-    var path28 = require("path");
-    var isStream = require_is_stream();
-    var lazystream = require_lazystream();
-    var normalizePath = require_normalize_path();
-    var defaults = require_defaults();
-    var Stream = require("stream").Stream;
-    var PassThrough = require_ours().PassThrough;
-    var utils = module2.exports = {};
-    utils.file = require_file3();
-    utils.collectStream = function(source, callback) {
-      var collection = [];
-      var size = 0;
-      source.on("error", callback);
-      source.on("data", function(chunk) {
-        collection.push(chunk);
-        size += chunk.length;
-      });
-      source.on("end", function() {
-        var buf = Buffer.alloc(size);
-        var offset = 0;
-        collection.forEach(function(data) {
-          data.copy(buf, offset);
-          offset += data.length;
-        });
-        callback(null, buf);
-      });
-    };
-    utils.dateify = function(dateish) {
-      dateish = dateish || /* @__PURE__ */ new Date();
-      if (dateish instanceof Date) {
-        dateish = dateish;
-      } else if (typeof dateish === "string") {
-        dateish = new Date(dateish);
-      } else {
-        dateish = /* @__PURE__ */ new Date();
-      }
-      return dateish;
-    };
-    utils.defaults = function(object, source, guard) {
-      var args = arguments;
-      args[0] = args[0] || {};
-      return defaults(...args);
-    };
-    utils.isStream = function(source) {
-      return isStream(source);
-    };
-    utils.lazyReadStream = function(filepath) {
-      return new lazystream.Readable(function() {
-        return fs30.createReadStream(filepath);
-      });
-    };
-    utils.normalizeInputSource = function(source) {
-      if (source === null) {
-        return Buffer.alloc(0);
-      } else if (typeof source === "string") {
-        return Buffer.from(source);
-      } else if (utils.isStream(source)) {
-        return source.pipe(new PassThrough());
       }
-      return source;
-    };
-    utils.sanitizePath = function(filepath) {
-      return normalizePath(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
-    };
-    utils.trailingSlashIt = function(str2) {
-      return str2.slice(-1) !== "/" ? str2 + "/" : str2;
-    };
-    utils.unixifyPath = function(filepath) {
-      return normalizePath(filepath, false).replace(/^\w+:/, "");
-    };
-    utils.walkdir = function(dirpath, base, callback) {
-      var results = [];
-      if (typeof base === "function") {
-        callback = base;
-        base = dirpath;
+      continueUpdate() {
+        if ((this.stream._duplexState & READ_NEXT_TICK) === 0) return false;
+        this.stream._duplexState &= READ_NOT_NEXT_TICK;
+        return true;
       }
-      fs30.readdir(dirpath, function(err, list) {
-        var i = 0;
-        var file;
-        var filepath;
-        if (err) {
-          return callback(err);
-        }
-        (function next() {
-          file = list[i++];
-          if (!file) {
-            return callback(null, results);
-          }
-          filepath = path28.join(dirpath, file);
-          fs30.stat(filepath, function(err2, stats) {
-            results.push({
-              path: filepath,
-              relative: path28.relative(base, filepath).replace(/\\/g, "/"),
-              stats
-            });
-            if (stats && stats.isDirectory()) {
-              utils.walkdir(filepath, base, function(err3, res) {
-                if (err3) {
-                  return callback(err3);
-                }
-                res.forEach(function(dirEntry) {
-                  results.push(dirEntry);
-                });
-                next();
-              });
-            } else {
-              next();
-            }
-          });
-        })();
-      });
-    };
-  }
-});
-
-// node_modules/archiver/lib/error.js
-var require_error3 = __commonJS({
-  "node_modules/archiver/lib/error.js"(exports2, module2) {
-    var util = require("util");
-    var ERROR_CODES = {
-      "ABORTED": "archive was aborted",
-      "DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value",
-      "DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function",
-      "ENTRYNAMEREQUIRED": "entry name must be a non-empty string value",
-      "FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value",
-      "FINALIZING": "archive already finalizing",
-      "QUEUECLOSED": "queue closed",
-      "NOENDMETHOD": "no suitable finalize/end method defined by module",
-      "DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module",
-      "FORMATSET": "archive format already set",
-      "INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance",
-      "MODULESET": "module already set",
-      "SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module",
-      "SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value",
-      "SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value",
-      "ENTRYNOTSUPPORTED": "entry not supported"
-    };
-    function ArchiverError(code, data) {
-      Error.captureStackTrace(this, this.constructor);
-      this.message = ERROR_CODES[code] || code;
-      this.code = code;
-      this.data = data;
-    }
-    util.inherits(ArchiverError, Error);
-    exports2 = module2.exports = ArchiverError;
-  }
-});
-
-// node_modules/archiver/lib/core.js
-var require_core2 = __commonJS({
-  "node_modules/archiver/lib/core.js"(exports2, module2) {
-    var fs30 = require("fs");
-    var glob2 = require_readdir_glob();
-    var async = require_async();
-    var path28 = require("path");
-    var util = require_archiver_utils();
-    var inherits = require("util").inherits;
-    var ArchiverError = require_error3();
-    var Transform = require_ours().Transform;
-    var win32 = process.platform === "win32";
-    var Archiver = function(format, options) {
-      if (!(this instanceof Archiver)) {
-        return new Archiver(format, options);
+      updateCallback() {
+        if ((this.stream._duplexState & READ_UPDATE_SYNC_STATUS) === READ_PRIMARY) this.update();
+        else this.updateNextTick();
       }
-      if (typeof format !== "string") {
-        options = format;
-        format = "zip";
+      updateNextTick() {
+        if ((this.stream._duplexState & READ_NEXT_TICK) !== 0) return;
+        this.stream._duplexState |= READ_NEXT_TICK;
+        if ((this.stream._duplexState & READ_UPDATING) === 0) queueTick(this.afterUpdateNextTick);
       }
-      options = this.options = util.defaults(options, {
-        highWaterMark: 1024 * 1024,
-        statConcurrency: 4
-      });
-      Transform.call(this, options);
-      this._format = false;
-      this._module = false;
-      this._pending = 0;
-      this._pointer = 0;
-      this._entriesCount = 0;
-      this._entriesProcessedCount = 0;
-      this._fsEntriesTotalBytes = 0;
-      this._fsEntriesProcessedBytes = 0;
-      this._queue = async.queue(this._onQueueTask.bind(this), 1);
-      this._queue.drain(this._onQueueDrain.bind(this));
-      this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency);
-      this._statQueue.drain(this._onQueueDrain.bind(this));
-      this._state = {
-        aborted: false,
-        finalize: false,
-        finalizing: false,
-        finalized: false,
-        modulePiped: false
-      };
-      this._streams = [];
     };
-    inherits(Archiver, Transform);
-    Archiver.prototype._abort = function() {
-      this._state.aborted = true;
-      this._queue.kill();
-      this._statQueue.kill();
-      if (this._queue.idle()) {
-        this._shutdown();
+    var TransformState = class {
+      constructor(stream2) {
+        this.data = null;
+        this.afterTransform = afterTransform.bind(stream2);
+        this.afterFinal = null;
       }
     };
-    Archiver.prototype._append = function(filepath, data) {
-      data = data || {};
-      var task = {
-        source: null,
-        filepath
-      };
-      if (!data.name) {
-        data.name = filepath;
+    var Pipeline = class {
+      constructor(src, dst, cb) {
+        this.from = src;
+        this.to = dst;
+        this.afterPipe = cb;
+        this.error = null;
+        this.pipeToFinished = false;
       }
-      data.sourcePath = filepath;
-      task.data = data;
-      this._entriesCount++;
-      if (data.stats && data.stats instanceof fs30.Stats) {
-        task = this._updateQueueTaskWithStats(task, data.stats);
-        if (task) {
-          if (data.stats.size) {
-            this._fsEntriesTotalBytes += data.stats.size;
+      finished() {
+        this.pipeToFinished = true;
+      }
+      done(stream2, err) {
+        if (err) this.error = err;
+        if (stream2 === this.to) {
+          this.to = null;
+          if (this.from !== null) {
+            if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) {
+              this.from.destroy(this.error || new Error("Writable stream closed prematurely"));
+            }
+            return;
           }
-          this._queue.push(task);
         }
-      } else {
-        this._statQueue.push(task);
-      }
-    };
-    Archiver.prototype._finalize = function() {
-      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
-        return;
+        if (stream2 === this.from) {
+          this.from = null;
+          if (this.to !== null) {
+            if ((stream2._duplexState & READ_DONE) === 0) {
+              this.to.destroy(this.error || new Error("Readable stream closed before ending"));
+            }
+            return;
+          }
+        }
+        if (this.afterPipe !== null) this.afterPipe(this.error);
+        this.to = this.from = this.afterPipe = null;
       }
-      this._state.finalizing = true;
-      this._moduleFinalize();
-      this._state.finalizing = false;
-      this._state.finalized = true;
     };
-    Archiver.prototype._maybeFinalize = function() {
-      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
-        return false;
+    function afterDrain() {
+      this.stream._duplexState |= READ_PIPE_DRAINED;
+      this.updateCallback();
+    }
+    function afterFinal(err) {
+      const stream2 = this.stream;
+      if (err) stream2.destroy(err);
+      if ((stream2._duplexState & DESTROY_STATUS) === 0) {
+        stream2._duplexState |= WRITE_DONE;
+        stream2.emit("finish");
       }
-      if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
-        this._finalize();
-        return true;
+      if ((stream2._duplexState & AUTO_DESTROY) === DONE) {
+        stream2._duplexState |= DESTROYING;
       }
-      return false;
-    };
-    Archiver.prototype._moduleAppend = function(source, data, callback) {
-      if (this._state.aborted) {
-        callback();
-        return;
+      stream2._duplexState &= WRITE_NOT_ACTIVE;
+      if ((stream2._duplexState & WRITE_UPDATING) === 0) this.update();
+      else this.updateNextTick();
+    }
+    function afterDestroy(err) {
+      const stream2 = this.stream;
+      if (!err && this.error !== STREAM_DESTROYED) err = this.error;
+      if (err) stream2.emit("error", err);
+      stream2._duplexState |= DESTROYED;
+      stream2.emit("close");
+      const rs = stream2._readableState;
+      const ws = stream2._writableState;
+      if (rs !== null && rs.pipeline !== null) rs.pipeline.done(stream2, err);
+      if (ws !== null) {
+        while (ws.drains !== null && ws.drains.length > 0) ws.drains.shift().resolve(false);
+        if (ws.pipeline !== null) ws.pipeline.done(stream2, err);
       }
-      this._module.append(source, data, function(err) {
-        this._task = null;
-        if (this._state.aborted) {
-          this._shutdown();
-          return;
-        }
-        if (err) {
-          this.emit("error", err);
-          setImmediate(callback);
-          return;
+    }
+    function afterWrite(err) {
+      const stream2 = this.stream;
+      if (err) stream2.destroy(err);
+      stream2._duplexState &= WRITE_NOT_ACTIVE;
+      if (this.drains !== null) tickDrains(this.drains);
+      if ((stream2._duplexState & WRITE_DRAIN_STATUS) === WRITE_UNDRAINED) {
+        stream2._duplexState &= WRITE_DRAINED;
+        if ((stream2._duplexState & WRITE_EMIT_DRAIN) === WRITE_EMIT_DRAIN) {
+          stream2.emit("drain");
         }
-        this.emit("entry", data);
-        this._entriesProcessedCount++;
-        if (data.stats && data.stats.size) {
-          this._fsEntriesProcessedBytes += data.stats.size;
+      }
+      this.updateCallback();
+    }
+    function afterRead(err) {
+      if (err) this.stream.destroy(err);
+      this.stream._duplexState &= READ_NOT_ACTIVE;
+      if (this.readAhead === false && (this.stream._duplexState & READ_RESUMED) === 0) this.stream._duplexState &= READ_NO_READ_AHEAD;
+      this.updateCallback();
+    }
+    function updateReadNT() {
+      if ((this.stream._duplexState & READ_UPDATING) === 0) {
+        this.stream._duplexState &= READ_NOT_NEXT_TICK;
+        this.update();
+      }
+    }
+    function updateWriteNT() {
+      if ((this.stream._duplexState & WRITE_UPDATING) === 0) {
+        this.stream._duplexState &= WRITE_NOT_NEXT_TICK;
+        this.update();
+      }
+    }
+    function tickDrains(drains) {
+      for (let i = 0; i < drains.length; i++) {
+        if (--drains[i].writes === 0) {
+          drains.shift().resolve(true);
+          i--;
         }
-        this.emit("progress", {
-          entries: {
-            total: this._entriesCount,
-            processed: this._entriesProcessedCount
-          },
-          fs: {
-            totalBytes: this._fsEntriesTotalBytes,
-            processedBytes: this._fsEntriesProcessedBytes
-          }
-        });
-        setImmediate(callback);
-      }.bind(this));
-    };
-    Archiver.prototype._moduleFinalize = function() {
-      if (typeof this._module.finalize === "function") {
-        this._module.finalize();
-      } else if (typeof this._module.end === "function") {
-        this._module.end();
-      } else {
-        this.emit("error", new ArchiverError("NOENDMETHOD"));
       }
-    };
-    Archiver.prototype._modulePipe = function() {
-      this._module.on("error", this._onModuleError.bind(this));
-      this._module.pipe(this);
-      this._state.modulePiped = true;
-    };
-    Archiver.prototype._moduleSupports = function(key) {
-      if (!this._module.supports || !this._module.supports[key]) {
-        return false;
+    }
+    function afterOpen(err) {
+      const stream2 = this.stream;
+      if (err) stream2.destroy(err);
+      if ((stream2._duplexState & DESTROYING) === 0) {
+        if ((stream2._duplexState & READ_PRIMARY_STATUS) === 0) stream2._duplexState |= READ_PRIMARY;
+        if ((stream2._duplexState & WRITE_PRIMARY_STATUS) === 0) stream2._duplexState |= WRITE_PRIMARY;
+        stream2.emit("open");
       }
-      return this._module.supports[key];
-    };
-    Archiver.prototype._moduleUnpipe = function() {
-      this._module.unpipe(this);
-      this._state.modulePiped = false;
-    };
-    Archiver.prototype._normalizeEntryData = function(data, stats) {
-      data = util.defaults(data, {
-        type: "file",
-        name: null,
-        date: null,
-        mode: null,
-        prefix: null,
-        sourcePath: null,
-        stats: false
-      });
-      if (stats && data.stats === false) {
-        data.stats = stats;
+      stream2._duplexState &= NOT_ACTIVE;
+      if (stream2._writableState !== null) {
+        stream2._writableState.updateCallback();
       }
-      var isDir = data.type === "directory";
-      if (data.name) {
-        if (typeof data.prefix === "string" && "" !== data.prefix) {
-          data.name = data.prefix + "/" + data.name;
-          data.prefix = null;
+      if (stream2._readableState !== null) {
+        stream2._readableState.updateCallback();
+      }
+    }
+    function afterTransform(err, data) {
+      if (data !== void 0 && data !== null) this.push(data);
+      this._writableState.afterWrite(err);
+    }
+    function newListener(name) {
+      if (this._readableState !== null) {
+        if (name === "data") {
+          this._duplexState |= READ_EMIT_DATA | READ_RESUMED_READ_AHEAD;
+          this._readableState.updateNextTick();
         }
-        data.name = util.sanitizePath(data.name);
-        if (data.type !== "symlink" && data.name.slice(-1) === "/") {
-          isDir = true;
-          data.type = "directory";
-        } else if (isDir) {
-          data.name += "/";
+        if (name === "readable") {
+          this._duplexState |= READ_EMIT_READABLE;
+          this._readableState.updateNextTick();
         }
       }
-      if (typeof data.mode === "number") {
-        if (win32) {
-          data.mode &= 511;
-        } else {
-          data.mode &= 4095;
-        }
-      } else if (data.stats && data.mode === null) {
-        if (win32) {
-          data.mode = data.stats.mode & 511;
-        } else {
-          data.mode = data.stats.mode & 4095;
+      if (this._writableState !== null) {
+        if (name === "drain") {
+          this._duplexState |= WRITE_EMIT_DRAIN;
+          this._writableState.updateNextTick();
         }
-        if (win32 && isDir) {
-          data.mode = 493;
+      }
+    }
+    var Stream = class extends EventEmitter2 {
+      constructor(opts) {
+        super();
+        this._duplexState = 0;
+        this._readableState = null;
+        this._writableState = null;
+        if (opts) {
+          if (opts.open) this._open = opts.open;
+          if (opts.destroy) this._destroy = opts.destroy;
+          if (opts.predestroy) this._predestroy = opts.predestroy;
+          if (opts.signal) {
+            opts.signal.addEventListener("abort", abort.bind(this));
+          }
         }
-      } else if (data.mode === null) {
-        data.mode = isDir ? 493 : 420;
+        this.on("newListener", newListener);
       }
-      if (data.stats && data.date === null) {
-        data.date = data.stats.mtime;
-      } else {
-        data.date = util.dateify(data.date);
+      _open(cb) {
+        cb(null);
       }
-      return data;
-    };
-    Archiver.prototype._onModuleError = function(err) {
-      this.emit("error", err);
-    };
-    Archiver.prototype._onQueueDrain = function() {
-      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
-        return;
+      _destroy(cb) {
+        cb(null);
       }
-      if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
-        this._finalize();
+      _predestroy() {
       }
-    };
-    Archiver.prototype._onQueueTask = function(task, callback) {
-      var fullCallback = () => {
-        if (task.data.callback) {
-          task.data.callback();
-        }
-        callback();
-      };
-      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
-        fullCallback();
-        return;
+      get readable() {
+        return this._readableState !== null ? true : void 0;
       }
-      this._task = task;
-      this._moduleAppend(task.source, task.data, fullCallback);
-    };
-    Archiver.prototype._onStatQueueTask = function(task, callback) {
-      if (this._state.finalizing || this._state.finalized || this._state.aborted) {
-        callback();
-        return;
+      get writable() {
+        return this._writableState !== null ? true : void 0;
       }
-      fs30.lstat(task.filepath, function(err, stats) {
-        if (this._state.aborted) {
-          setImmediate(callback);
-          return;
-        }
-        if (err) {
-          this._entriesCount--;
-          this.emit("warning", err);
-          setImmediate(callback);
-          return;
-        }
-        task = this._updateQueueTaskWithStats(task, stats);
-        if (task) {
-          if (stats.size) {
-            this._fsEntriesTotalBytes += stats.size;
+      get destroyed() {
+        return (this._duplexState & DESTROYED) !== 0;
+      }
+      get destroying() {
+        return (this._duplexState & DESTROY_STATUS) !== 0;
+      }
+      destroy(err) {
+        if ((this._duplexState & DESTROY_STATUS) === 0) {
+          if (!err) err = STREAM_DESTROYED;
+          this._duplexState = (this._duplexState | DESTROYING) & NON_PRIMARY;
+          if (this._readableState !== null) {
+            this._readableState.highWaterMark = 0;
+            this._readableState.error = err;
           }
-          this._queue.push(task);
+          if (this._writableState !== null) {
+            this._writableState.highWaterMark = 0;
+            this._writableState.error = err;
+          }
+          this._duplexState |= PREDESTROYING;
+          this._predestroy();
+          this._duplexState &= NOT_PREDESTROYING;
+          if (this._readableState !== null) this._readableState.updateNextTick();
+          if (this._writableState !== null) this._writableState.updateNextTick();
         }
-        setImmediate(callback);
-      }.bind(this));
-    };
-    Archiver.prototype._shutdown = function() {
-      this._moduleUnpipe();
-      this.end();
-    };
-    Archiver.prototype._transform = function(chunk, encoding, callback) {
-      if (chunk) {
-        this._pointer += chunk.length;
       }
-      callback(null, chunk);
     };
-    Archiver.prototype._updateQueueTaskWithStats = function(task, stats) {
-      if (stats.isFile()) {
-        task.data.type = "file";
-        task.data.sourceType = "stream";
-        task.source = util.lazyReadStream(task.filepath);
-      } else if (stats.isDirectory() && this._moduleSupports("directory")) {
-        task.data.name = util.trailingSlashIt(task.data.name);
-        task.data.type = "directory";
-        task.data.sourcePath = util.trailingSlashIt(task.filepath);
-        task.data.sourceType = "buffer";
-        task.source = Buffer.concat([]);
-      } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
-        var linkPath = fs30.readlinkSync(task.filepath);
-        var dirName = path28.dirname(task.filepath);
-        task.data.type = "symlink";
-        task.data.linkname = path28.relative(dirName, path28.resolve(dirName, linkPath));
-        task.data.sourceType = "buffer";
-        task.source = Buffer.concat([]);
-      } else {
-        if (stats.isDirectory()) {
-          this.emit("warning", new ArchiverError("DIRECTORYNOTSUPPORTED", task.data));
-        } else if (stats.isSymbolicLink()) {
-          this.emit("warning", new ArchiverError("SYMLINKNOTSUPPORTED", task.data));
-        } else {
-          this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data));
+    var Readable3 = class _Readable extends Stream {
+      constructor(opts) {
+        super(opts);
+        this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD;
+        this._readableState = new ReadableState(this, opts);
+        if (opts) {
+          if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
+          if (opts.read) this._read = opts.read;
+          if (opts.eagerOpen) this._readableState.updateNextTick();
+          if (opts.encoding) this.setEncoding(opts.encoding);
         }
-        return null;
       }
-      task.data = this._normalizeEntryData(task.data, stats);
-      return task;
-    };
-    Archiver.prototype.abort = function() {
-      if (this._state.aborted || this._state.finalized) {
+      setEncoding(encoding) {
+        const dec = new TextDecoder2(encoding);
+        const map = this._readableState.map || echo;
+        this._readableState.map = mapOrSkip;
         return this;
+        function mapOrSkip(data) {
+          const next = dec.push(data);
+          return next === "" && (data.byteLength !== 0 || dec.remaining > 0) ? null : map(next);
+        }
       }
-      this._abort();
-      return this;
-    };
-    Archiver.prototype.append = function(source, data) {
-      if (this._state.finalize || this._state.aborted) {
-        this.emit("error", new ArchiverError("QUEUECLOSED"));
-        return this;
+      _read(cb) {
+        cb(null);
       }
-      data = this._normalizeEntryData(data);
-      if (typeof data.name !== "string" || data.name.length === 0) {
-        this.emit("error", new ArchiverError("ENTRYNAMEREQUIRED"));
-        return this;
+      pipe(dest, cb) {
+        this._readableState.updateNextTick();
+        this._readableState.pipe(dest, cb);
+        return dest;
       }
-      if (data.type === "directory" && !this._moduleSupports("directory")) {
-        this.emit("error", new ArchiverError("DIRECTORYNOTSUPPORTED", { name: data.name }));
-        return this;
+      read() {
+        this._readableState.updateNextTick();
+        return this._readableState.read();
       }
-      source = util.normalizeInputSource(source);
-      if (Buffer.isBuffer(source)) {
-        data.sourceType = "buffer";
-      } else if (util.isStream(source)) {
-        data.sourceType = "stream";
-      } else {
-        this.emit("error", new ArchiverError("INPUTSTEAMBUFFERREQUIRED", { name: data.name }));
-        return this;
+      push(data) {
+        this._readableState.updateNextTick();
+        return this._readableState.push(data);
       }
-      this._entriesCount++;
-      this._queue.push({
-        data,
-        source
-      });
-      return this;
-    };
-    Archiver.prototype.directory = function(dirpath, destpath, data) {
-      if (this._state.finalize || this._state.aborted) {
-        this.emit("error", new ArchiverError("QUEUECLOSED"));
+      unshift(data) {
+        this._readableState.updateNextTick();
+        return this._readableState.unshift(data);
+      }
+      resume() {
+        this._duplexState |= READ_RESUMED_READ_AHEAD;
+        this._readableState.updateNextTick();
         return this;
       }
-      if (typeof dirpath !== "string" || dirpath.length === 0) {
-        this.emit("error", new ArchiverError("DIRECTORYDIRPATHREQUIRED"));
+      pause() {
+        this._duplexState &= this._readableState.readAhead === false ? READ_PAUSED_NO_READ_AHEAD : READ_PAUSED;
         return this;
       }
-      this._pending++;
-      if (destpath === false) {
-        destpath = "";
-      } else if (typeof destpath !== "string") {
-        destpath = dirpath;
+      static _fromAsyncIterator(ite, opts) {
+        let destroy;
+        const rs = new _Readable({
+          ...opts,
+          read(cb) {
+            ite.next().then(push).then(cb.bind(null, null)).catch(cb);
+          },
+          predestroy() {
+            destroy = ite.return();
+          },
+          destroy(cb) {
+            if (!destroy) return cb(null);
+            destroy.then(cb.bind(null, null)).catch(cb);
+          }
+        });
+        return rs;
+        function push(data) {
+          if (data.done) rs.push(null);
+          else rs.push(data.value);
+        }
       }
-      var dataFunction = false;
-      if (typeof data === "function") {
-        dataFunction = data;
-        data = {};
-      } else if (typeof data !== "object") {
-        data = {};
+      static from(data, opts) {
+        if (isReadStreamx(data)) return data;
+        if (data[asyncIterator]) return this._fromAsyncIterator(data[asyncIterator](), opts);
+        if (!Array.isArray(data)) data = data === void 0 ? [] : [data];
+        let i = 0;
+        return new _Readable({
+          ...opts,
+          read(cb) {
+            this.push(i === data.length ? null : data[i++]);
+            cb(null);
+          }
+        });
       }
-      var globOptions = {
-        stat: true,
-        dot: true
-      };
-      function onGlobEnd() {
-        this._pending--;
-        this._maybeFinalize();
+      static isBackpressured(rs) {
+        return (rs._duplexState & READ_BACKPRESSURE_STATUS) !== 0 || rs._readableState.buffered >= rs._readableState.highWaterMark;
       }
-      function onGlobError(err) {
-        this.emit("error", err);
+      static isPaused(rs) {
+        return (rs._duplexState & READ_RESUMED) === 0;
       }
-      function onGlobMatch(match) {
-        globber.pause();
-        var ignoreMatch = false;
-        var entryData = Object.assign({}, data);
-        entryData.name = match.relative;
-        entryData.prefix = destpath;
-        entryData.stats = match.stat;
-        entryData.callback = globber.resume.bind(globber);
-        try {
-          if (dataFunction) {
-            entryData = dataFunction(entryData);
-            if (entryData === false) {
-              ignoreMatch = true;
-            } else if (typeof entryData !== "object") {
-              throw new ArchiverError("DIRECTORYFUNCTIONINVALIDDATA", { dirpath });
-            }
+      [asyncIterator]() {
+        const stream2 = this;
+        let error3 = null;
+        let promiseResolve = null;
+        let promiseReject = null;
+        this.on("error", (err) => {
+          error3 = err;
+        });
+        this.on("readable", onreadable);
+        this.on("close", onclose);
+        return {
+          [asyncIterator]() {
+            return this;
+          },
+          next() {
+            return new Promise(function(resolve14, reject) {
+              promiseResolve = resolve14;
+              promiseReject = reject;
+              const data = stream2.read();
+              if (data !== null) ondata(data);
+              else if ((stream2._duplexState & DESTROYED) !== 0) ondata(null);
+            });
+          },
+          return() {
+            return destroy(null);
+          },
+          throw(err) {
+            return destroy(err);
           }
-        } catch (e) {
-          this.emit("error", e);
-          return;
+        };
+        function onreadable() {
+          if (promiseResolve !== null) ondata(stream2.read());
         }
-        if (ignoreMatch) {
-          globber.resume();
-          return;
+        function onclose() {
+          if (promiseResolve !== null) ondata(null);
+        }
+        function ondata(data) {
+          if (promiseReject === null) return;
+          if (error3) promiseReject(error3);
+          else if (data === null && (stream2._duplexState & READ_DONE) === 0) promiseReject(STREAM_DESTROYED);
+          else promiseResolve({ value: data, done: data === null });
+          promiseReject = promiseResolve = null;
+        }
+        function destroy(err) {
+          stream2.destroy(err);
+          return new Promise((resolve14, reject) => {
+            if (stream2._duplexState & DESTROYED) return resolve14({ value: void 0, done: true });
+            stream2.once("close", function() {
+              if (err) reject(err);
+              else resolve14({ value: void 0, done: true });
+            });
+          });
         }
-        this._append(match.absolute, entryData);
       }
-      var globber = glob2(dirpath, globOptions);
-      globber.on("error", onGlobError.bind(this));
-      globber.on("match", onGlobMatch.bind(this));
-      globber.on("end", onGlobEnd.bind(this));
-      return this;
     };
-    Archiver.prototype.file = function(filepath, data) {
-      if (this._state.finalize || this._state.aborted) {
-        this.emit("error", new ArchiverError("QUEUECLOSED"));
-        return this;
+    var Writable = class extends Stream {
+      constructor(opts) {
+        super(opts);
+        this._duplexState |= OPENING | READ_DONE;
+        this._writableState = new WritableState(this, opts);
+        if (opts) {
+          if (opts.writev) this._writev = opts.writev;
+          if (opts.write) this._write = opts.write;
+          if (opts.final) this._final = opts.final;
+          if (opts.eagerOpen) this._writableState.updateNextTick();
+        }
       }
-      if (typeof filepath !== "string" || filepath.length === 0) {
-        this.emit("error", new ArchiverError("FILEFILEPATHREQUIRED"));
-        return this;
+      cork() {
+        this._duplexState |= WRITE_CORKED;
       }
-      this._append(filepath, data);
-      return this;
-    };
-    Archiver.prototype.glob = function(pattern, options, data) {
-      this._pending++;
-      options = util.defaults(options, {
-        stat: true,
-        pattern
-      });
-      function onGlobEnd() {
-        this._pending--;
-        this._maybeFinalize();
+      uncork() {
+        this._duplexState &= WRITE_NOT_CORKED;
+        this._writableState.updateNextTick();
       }
-      function onGlobError(err) {
-        this.emit("error", err);
-      }
-      function onGlobMatch(match) {
-        globber.pause();
-        var entryData = Object.assign({}, data);
-        entryData.callback = globber.resume.bind(globber);
-        entryData.stats = match.stat;
-        entryData.name = match.relative;
-        this._append(match.absolute, entryData);
+      _writev(batch, cb) {
+        cb(null);
       }
-      var globber = glob2(options.cwd || ".", options);
-      globber.on("error", onGlobError.bind(this));
-      globber.on("match", onGlobMatch.bind(this));
-      globber.on("end", onGlobEnd.bind(this));
-      return this;
-    };
-    Archiver.prototype.finalize = function() {
-      if (this._state.aborted) {
-        var abortedError = new ArchiverError("ABORTED");
-        this.emit("error", abortedError);
-        return Promise.reject(abortedError);
+      _write(data, cb) {
+        this._writableState.autoBatch(data, cb);
       }
-      if (this._state.finalize) {
-        var finalizingError = new ArchiverError("FINALIZING");
-        this.emit("error", finalizingError);
-        return Promise.reject(finalizingError);
+      _final(cb) {
+        cb(null);
       }
-      this._state.finalize = true;
-      if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
-        this._finalize();
+      static isBackpressured(ws) {
+        return (ws._duplexState & WRITE_BACKPRESSURE_STATUS) !== 0;
       }
-      var self2 = this;
-      return new Promise(function(resolve13, reject) {
-        var errored;
-        self2._module.on("end", function() {
-          if (!errored) {
-            resolve13();
-          }
-        });
-        self2._module.on("error", function(err) {
-          errored = true;
-          reject(err);
+      static drained(ws) {
+        if (ws.destroyed) return Promise.resolve(false);
+        const state = ws._writableState;
+        const pending = isWritev(ws) ? Math.min(1, state.queue.length) : state.queue.length;
+        const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0);
+        if (writes === 0) return Promise.resolve(true);
+        if (state.drains === null) state.drains = [];
+        return new Promise((resolve14) => {
+          state.drains.push({ writes, resolve: resolve14 });
         });
-      });
-    };
-    Archiver.prototype.setFormat = function(format) {
-      if (this._format) {
-        this.emit("error", new ArchiverError("FORMATSET"));
-        return this;
       }
-      this._format = format;
-      return this;
-    };
-    Archiver.prototype.setModule = function(module3) {
-      if (this._state.aborted) {
-        this.emit("error", new ArchiverError("ABORTED"));
-        return this;
+      write(data) {
+        this._writableState.updateNextTick();
+        return this._writableState.push(data);
       }
-      if (this._state.module) {
-        this.emit("error", new ArchiverError("MODULESET"));
+      end(data) {
+        this._writableState.updateNextTick();
+        this._writableState.end(data);
         return this;
       }
-      this._module = module3;
-      this._modulePipe();
-      return this;
     };
-    Archiver.prototype.symlink = function(filepath, target, mode) {
-      if (this._state.finalize || this._state.aborted) {
-        this.emit("error", new ArchiverError("QUEUECLOSED"));
-        return this;
-      }
-      if (typeof filepath !== "string" || filepath.length === 0) {
-        this.emit("error", new ArchiverError("SYMLINKFILEPATHREQUIRED"));
-        return this;
+    var Duplex = class extends Readable3 {
+      // and Writable
+      constructor(opts) {
+        super(opts);
+        this._duplexState = OPENING | this._duplexState & READ_READ_AHEAD;
+        this._writableState = new WritableState(this, opts);
+        if (opts) {
+          if (opts.writev) this._writev = opts.writev;
+          if (opts.write) this._write = opts.write;
+          if (opts.final) this._final = opts.final;
+        }
       }
-      if (typeof target !== "string" || target.length === 0) {
-        this.emit("error", new ArchiverError("SYMLINKTARGETREQUIRED", { filepath }));
-        return this;
+      cork() {
+        this._duplexState |= WRITE_CORKED;
       }
-      if (!this._moduleSupports("symlink")) {
-        this.emit("error", new ArchiverError("SYMLINKNOTSUPPORTED", { filepath }));
-        return this;
+      uncork() {
+        this._duplexState &= WRITE_NOT_CORKED;
+        this._writableState.updateNextTick();
       }
-      var data = {};
-      data.type = "symlink";
-      data.name = filepath.replace(/\\/g, "/");
-      data.linkname = target.replace(/\\/g, "/");
-      data.sourceType = "buffer";
-      if (typeof mode === "number") {
-        data.mode = mode;
+      _writev(batch, cb) {
+        cb(null);
       }
-      this._entriesCount++;
-      this._queue.push({
-        data,
-        source: Buffer.concat([])
-      });
-      return this;
-    };
-    Archiver.prototype.pointer = function() {
-      return this._pointer;
-    };
-    Archiver.prototype.use = function(plugin) {
-      this._streams.push(plugin);
-      return this;
-    };
-    module2.exports = Archiver;
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/archive-entry.js
-var require_archive_entry = __commonJS({
-  "node_modules/compress-commons/lib/archivers/archive-entry.js"(exports2, module2) {
-    var ArchiveEntry = module2.exports = function() {
-    };
-    ArchiveEntry.prototype.getName = function() {
-    };
-    ArchiveEntry.prototype.getSize = function() {
-    };
-    ArchiveEntry.prototype.getLastModifiedDate = function() {
-    };
-    ArchiveEntry.prototype.isDirectory = function() {
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/util.js
-var require_util14 = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) {
-    var util = module2.exports = {};
-    util.dateToDos = function(d, forceLocalTime) {
-      forceLocalTime = forceLocalTime || false;
-      var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear();
-      if (year < 1980) {
-        return 2162688;
-      } else if (year >= 2044) {
-        return 2141175677;
+      _write(data, cb) {
+        this._writableState.autoBatch(data, cb);
       }
-      var val = {
-        year,
-        month: forceLocalTime ? d.getMonth() : d.getUTCMonth(),
-        date: forceLocalTime ? d.getDate() : d.getUTCDate(),
-        hours: forceLocalTime ? d.getHours() : d.getUTCHours(),
-        minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(),
-        seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds()
-      };
-      return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2;
-    };
-    util.dosToDate = function(dos) {
-      return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1);
-    };
-    util.fromDosTime = function(buf) {
-      return util.dosToDate(buf.readUInt32LE(0));
-    };
-    util.getEightBytes = function(v) {
-      var buf = Buffer.alloc(8);
-      buf.writeUInt32LE(v % 4294967296, 0);
-      buf.writeUInt32LE(v / 4294967296 | 0, 4);
-      return buf;
-    };
-    util.getShortBytes = function(v) {
-      var buf = Buffer.alloc(2);
-      buf.writeUInt16LE((v & 65535) >>> 0, 0);
-      return buf;
-    };
-    util.getShortBytesValue = function(buf, offset) {
-      return buf.readUInt16LE(offset);
-    };
-    util.getLongBytes = function(v) {
-      var buf = Buffer.alloc(4);
-      buf.writeUInt32LE((v & 4294967295) >>> 0, 0);
-      return buf;
-    };
-    util.getLongBytesValue = function(buf, offset) {
-      return buf.readUInt32LE(offset);
-    };
-    util.toDosTime = function(d) {
-      return util.getLongBytes(util.dateToDos(d));
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
-var require_general_purpose_bit = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) {
-    var zipUtil = require_util14();
-    var DATA_DESCRIPTOR_FLAG = 1 << 3;
-    var ENCRYPTION_FLAG = 1 << 0;
-    var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2;
-    var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1;
-    var STRONG_ENCRYPTION_FLAG = 1 << 6;
-    var UFT8_NAMES_FLAG = 1 << 11;
-    var GeneralPurposeBit = module2.exports = function() {
-      if (!(this instanceof GeneralPurposeBit)) {
-        return new GeneralPurposeBit();
+      _final(cb) {
+        cb(null);
       }
-      this.descriptor = false;
-      this.encryption = false;
-      this.utf8 = false;
-      this.numberOfShannonFanoTrees = 0;
-      this.strongEncryption = false;
-      this.slidingDictionarySize = 0;
-      return this;
-    };
-    GeneralPurposeBit.prototype.encode = function() {
-      return zipUtil.getShortBytes(
-        (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) | (this.utf8 ? UFT8_NAMES_FLAG : 0) | (this.encryption ? ENCRYPTION_FLAG : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
-      );
-    };
-    GeneralPurposeBit.prototype.parse = function(buf, offset) {
-      var flag = zipUtil.getShortBytesValue(buf, offset);
-      var gbp = new GeneralPurposeBit();
-      gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0);
-      gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0);
-      gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0);
-      gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0);
-      gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096);
-      gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2);
-      return gbp;
-    };
-    GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) {
-      this.numberOfShannonFanoTrees = n;
-    };
-    GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() {
-      return this.numberOfShannonFanoTrees;
-    };
-    GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) {
-      this.slidingDictionarySize = n;
-    };
-    GeneralPurposeBit.prototype.getSlidingDictionarySize = function() {
-      return this.slidingDictionarySize;
-    };
-    GeneralPurposeBit.prototype.useDataDescriptor = function(b) {
-      this.descriptor = b;
-    };
-    GeneralPurposeBit.prototype.usesDataDescriptor = function() {
-      return this.descriptor;
-    };
-    GeneralPurposeBit.prototype.useEncryption = function(b) {
-      this.encryption = b;
-    };
-    GeneralPurposeBit.prototype.usesEncryption = function() {
-      return this.encryption;
-    };
-    GeneralPurposeBit.prototype.useStrongEncryption = function(b) {
-      this.strongEncryption = b;
-    };
-    GeneralPurposeBit.prototype.usesStrongEncryption = function() {
-      return this.strongEncryption;
-    };
-    GeneralPurposeBit.prototype.useUTF8ForNames = function(b) {
-      this.utf8 = b;
-    };
-    GeneralPurposeBit.prototype.usesUTF8ForNames = function() {
-      return this.utf8;
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/unix-stat.js
-var require_unix_stat = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/unix-stat.js"(exports2, module2) {
-    module2.exports = {
-      /**
-       * Bits used for permissions (and sticky bit)
-       */
-      PERM_MASK: 4095,
-      // 07777
-      /**
-       * Bits used to indicate the filesystem object type.
-       */
-      FILE_TYPE_FLAG: 61440,
-      // 0170000
-      /**
-       * Indicates symbolic links.
-       */
-      LINK_FLAG: 40960,
-      // 0120000
-      /**
-       * Indicates plain files.
-       */
-      FILE_FLAG: 32768,
-      // 0100000
-      /**
-       * Indicates directories.
-       */
-      DIR_FLAG: 16384,
-      // 040000
-      // ----------------------------------------------------------
-      // somewhat arbitrary choices that are quite common for shared
-      // installations
-      // -----------------------------------------------------------
-      /**
-       * Default permissions for symbolic links.
-       */
-      DEFAULT_LINK_PERM: 511,
-      // 0777
-      /**
-       * Default permissions for directories.
-       */
-      DEFAULT_DIR_PERM: 493,
-      // 0755
-      /**
-       * Default permissions for plain files.
-       */
-      DEFAULT_FILE_PERM: 420
-      // 0644
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/constants.js
-var require_constants13 = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) {
-    module2.exports = {
-      WORD: 4,
-      DWORD: 8,
-      EMPTY: Buffer.alloc(0),
-      SHORT: 2,
-      SHORT_MASK: 65535,
-      SHORT_SHIFT: 16,
-      SHORT_ZERO: Buffer.from(Array(2)),
-      LONG: 4,
-      LONG_ZERO: Buffer.from(Array(4)),
-      MIN_VERSION_INITIAL: 10,
-      MIN_VERSION_DATA_DESCRIPTOR: 20,
-      MIN_VERSION_ZIP64: 45,
-      VERSION_MADEBY: 45,
-      METHOD_STORED: 0,
-      METHOD_DEFLATED: 8,
-      PLATFORM_UNIX: 3,
-      PLATFORM_FAT: 0,
-      SIG_LFH: 67324752,
-      SIG_DD: 134695760,
-      SIG_CFH: 33639248,
-      SIG_EOCD: 101010256,
-      SIG_ZIP64_EOCD: 101075792,
-      SIG_ZIP64_EOCD_LOC: 117853008,
-      ZIP64_MAGIC_SHORT: 65535,
-      ZIP64_MAGIC: 4294967295,
-      ZIP64_EXTRA_ID: 1,
-      ZLIB_NO_COMPRESSION: 0,
-      ZLIB_BEST_SPEED: 1,
-      ZLIB_BEST_COMPRESSION: 9,
-      ZLIB_DEFAULT_COMPRESSION: -1,
-      MODE_MASK: 4095,
-      DEFAULT_FILE_MODE: 33188,
-      // 010644 = -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-      DEFAULT_DIR_MODE: 16877,
-      // 040755 = drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
-      EXT_FILE_ATTR_DIR: 1106051088,
-      // 010173200020 = drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D)
-      EXT_FILE_ATTR_FILE: 2175008800,
-      // 020151000040 = -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0
-      // Unix file types
-      S_IFMT: 61440,
-      // 0170000 type of file mask
-      S_IFIFO: 4096,
-      // 010000 named pipe (fifo)
-      S_IFCHR: 8192,
-      // 020000 character special
-      S_IFDIR: 16384,
-      // 040000 directory
-      S_IFBLK: 24576,
-      // 060000 block special
-      S_IFREG: 32768,
-      // 0100000 regular
-      S_IFLNK: 40960,
-      // 0120000 symbolic link
-      S_IFSOCK: 49152,
-      // 0140000 socket
-      // DOS file type flags
-      S_DOS_A: 32,
-      // 040 Archive
-      S_DOS_D: 16,
-      // 020 Directory
-      S_DOS_V: 8,
-      // 010 Volume
-      S_DOS_S: 4,
-      // 04 System
-      S_DOS_H: 2,
-      // 02 Hidden
-      S_DOS_R: 1
-      // 01 Read Only
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
-var require_zip_archive_entry = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js"(exports2, module2) {
-    var inherits = require("util").inherits;
-    var normalizePath = require_normalize_path();
-    var ArchiveEntry = require_archive_entry();
-    var GeneralPurposeBit = require_general_purpose_bit();
-    var UnixStat = require_unix_stat();
-    var constants = require_constants13();
-    var zipUtil = require_util14();
-    var ZipArchiveEntry = module2.exports = function(name) {
-      if (!(this instanceof ZipArchiveEntry)) {
-        return new ZipArchiveEntry(name);
+      write(data) {
+        this._writableState.updateNextTick();
+        return this._writableState.push(data);
       }
-      ArchiveEntry.call(this);
-      this.platform = constants.PLATFORM_FAT;
-      this.method = -1;
-      this.name = null;
-      this.size = 0;
-      this.csize = 0;
-      this.gpb = new GeneralPurposeBit();
-      this.crc = 0;
-      this.time = -1;
-      this.minver = constants.MIN_VERSION_INITIAL;
-      this.mode = -1;
-      this.extra = null;
-      this.exattr = 0;
-      this.inattr = 0;
-      this.comment = null;
-      if (name) {
-        this.setName(name);
+      end(data) {
+        this._writableState.updateNextTick();
+        this._writableState.end(data);
+        return this;
       }
     };
-    inherits(ZipArchiveEntry, ArchiveEntry);
-    ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() {
-      return this.getExtra();
-    };
-    ZipArchiveEntry.prototype.getComment = function() {
-      return this.comment !== null ? this.comment : "";
-    };
-    ZipArchiveEntry.prototype.getCompressedSize = function() {
-      return this.csize;
-    };
-    ZipArchiveEntry.prototype.getCrc = function() {
-      return this.crc;
-    };
-    ZipArchiveEntry.prototype.getExternalAttributes = function() {
-      return this.exattr;
-    };
-    ZipArchiveEntry.prototype.getExtra = function() {
-      return this.extra !== null ? this.extra : constants.EMPTY;
-    };
-    ZipArchiveEntry.prototype.getGeneralPurposeBit = function() {
-      return this.gpb;
-    };
-    ZipArchiveEntry.prototype.getInternalAttributes = function() {
-      return this.inattr;
-    };
-    ZipArchiveEntry.prototype.getLastModifiedDate = function() {
-      return this.getTime();
-    };
-    ZipArchiveEntry.prototype.getLocalFileDataExtra = function() {
-      return this.getExtra();
-    };
-    ZipArchiveEntry.prototype.getMethod = function() {
-      return this.method;
-    };
-    ZipArchiveEntry.prototype.getName = function() {
-      return this.name;
-    };
-    ZipArchiveEntry.prototype.getPlatform = function() {
-      return this.platform;
-    };
-    ZipArchiveEntry.prototype.getSize = function() {
-      return this.size;
-    };
-    ZipArchiveEntry.prototype.getTime = function() {
-      return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
-    };
-    ZipArchiveEntry.prototype.getTimeDos = function() {
-      return this.time !== -1 ? this.time : 0;
-    };
-    ZipArchiveEntry.prototype.getUnixMode = function() {
-      return this.platform !== constants.PLATFORM_UNIX ? 0 : this.getExternalAttributes() >> constants.SHORT_SHIFT & constants.SHORT_MASK;
-    };
-    ZipArchiveEntry.prototype.getVersionNeededToExtract = function() {
-      return this.minver;
-    };
-    ZipArchiveEntry.prototype.setComment = function(comment) {
-      if (Buffer.byteLength(comment) !== comment.length) {
-        this.getGeneralPurposeBit().useUTF8ForNames(true);
+    var Transform5 = class extends Duplex {
+      constructor(opts) {
+        super(opts);
+        this._transformState = new TransformState(this);
+        if (opts) {
+          if (opts.transform) this._transform = opts.transform;
+          if (opts.flush) this._flush = opts.flush;
+        }
       }
-      this.comment = comment;
-    };
-    ZipArchiveEntry.prototype.setCompressedSize = function(size) {
-      if (size < 0) {
-        throw new Error("invalid entry compressed size");
+      _write(data, cb) {
+        if (this._readableState.buffered >= this._readableState.highWaterMark) {
+          this._transformState.data = data;
+        } else {
+          this._transform(data, this._transformState.afterTransform);
+        }
       }
-      this.csize = size;
-    };
-    ZipArchiveEntry.prototype.setCrc = function(crc) {
-      if (crc < 0) {
-        throw new Error("invalid entry crc32");
+      _read(cb) {
+        if (this._transformState.data !== null) {
+          const data = this._transformState.data;
+          this._transformState.data = null;
+          cb(null);
+          this._transform(data, this._transformState.afterTransform);
+        } else {
+          cb(null);
+        }
       }
-      this.crc = crc;
-    };
-    ZipArchiveEntry.prototype.setExternalAttributes = function(attr) {
-      this.exattr = attr >>> 0;
-    };
-    ZipArchiveEntry.prototype.setExtra = function(extra) {
-      this.extra = extra;
-    };
-    ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
-      if (!(gpb instanceof GeneralPurposeBit)) {
-        throw new Error("invalid entry GeneralPurposeBit");
+      destroy(err) {
+        super.destroy(err);
+        if (this._transformState.data !== null) {
+          this._transformState.data = null;
+          this._transformState.afterTransform();
+        }
       }
-      this.gpb = gpb;
-    };
-    ZipArchiveEntry.prototype.setInternalAttributes = function(attr) {
-      this.inattr = attr;
-    };
-    ZipArchiveEntry.prototype.setMethod = function(method) {
-      if (method < 0) {
-        throw new Error("invalid entry compression method");
+      _transform(data, cb) {
+        cb(null, data);
       }
-      this.method = method;
-    };
-    ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) {
-      name = normalizePath(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
-      if (prependSlash) {
-        name = `/${name}`;
+      _flush(cb) {
+        cb(null);
       }
-      if (Buffer.byteLength(name) !== name.length) {
-        this.getGeneralPurposeBit().useUTF8ForNames(true);
+      _final(cb) {
+        this._transformState.afterFinal = cb;
+        this._flush(transformAfterFlush.bind(this));
       }
-      this.name = name;
     };
-    ZipArchiveEntry.prototype.setPlatform = function(platform2) {
-      this.platform = platform2;
+    var PassThrough3 = class extends Transform5 {
     };
-    ZipArchiveEntry.prototype.setSize = function(size) {
-      if (size < 0) {
-        throw new Error("invalid entry size");
+    function transformAfterFlush(err, data) {
+      const cb = this._transformState.afterFinal;
+      if (err) return cb(err);
+      if (data !== null && data !== void 0) this.push(data);
+      this.push(null);
+      cb(null);
+    }
+    function pipelinePromise(...streams) {
+      return new Promise((resolve14, reject) => {
+        return pipeline2(...streams, (err) => {
+          if (err) return reject(err);
+          resolve14();
+        });
+      });
+    }
+    function pipeline2(stream2, ...streams) {
+      const all = Array.isArray(stream2) ? [...stream2, ...streams] : [stream2, ...streams];
+      const done = all.length && typeof all[all.length - 1] === "function" ? all.pop() : null;
+      if (all.length < 2) throw new Error("Pipeline requires at least 2 streams");
+      let src = all[0];
+      let dest = null;
+      let error3 = null;
+      for (let i = 1; i < all.length; i++) {
+        dest = all[i];
+        if (isStreamx(src)) {
+          src.pipe(dest, onerror);
+        } else {
+          errorHandle(src, true, i > 1, onerror);
+          src.pipe(dest);
+        }
+        src = dest;
       }
-      this.size = size;
-    };
-    ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) {
-      if (!(time instanceof Date)) {
-        throw new Error("invalid entry time");
+      if (done) {
+        let fin = false;
+        const autoDestroy = isStreamx(dest) || !!(dest._writableState && dest._writableState.autoDestroy);
+        dest.on("error", (err) => {
+          if (error3 === null) error3 = err;
+        });
+        dest.on("finish", () => {
+          fin = true;
+          if (!autoDestroy) done(error3);
+        });
+        if (autoDestroy) {
+          dest.on("close", () => done(error3 || (fin ? null : PREMATURE_CLOSE)));
+        }
       }
-      this.time = zipUtil.dateToDos(time, forceLocalTime);
-    };
-    ZipArchiveEntry.prototype.setUnixMode = function(mode) {
-      mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
-      var extattr = 0;
-      extattr |= mode << constants.SHORT_SHIFT | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A);
-      this.setExternalAttributes(extattr);
-      this.mode = mode & constants.MODE_MASK;
-      this.platform = constants.PLATFORM_UNIX;
-    };
-    ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) {
-      this.minver = minver;
-    };
-    ZipArchiveEntry.prototype.isDirectory = function() {
-      return this.getName().slice(-1) === "/";
-    };
-    ZipArchiveEntry.prototype.isUnixSymlink = function() {
-      return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG;
-    };
-    ZipArchiveEntry.prototype.isZip64 = function() {
-      return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
-    };
-  }
-});
-
-// node_modules/compress-commons/node_modules/is-stream/index.js
-var require_is_stream2 = __commonJS({
-  "node_modules/compress-commons/node_modules/is-stream/index.js"(exports2, module2) {
-    "use strict";
-    var isStream = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function";
-    isStream.writable = (stream2) => isStream(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object";
-    isStream.readable = (stream2) => isStream(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object";
-    isStream.duplex = (stream2) => isStream.writable(stream2) && isStream.readable(stream2);
-    isStream.transform = (stream2) => isStream.duplex(stream2) && typeof stream2._transform === "function";
-    module2.exports = isStream;
-  }
-});
-
-// node_modules/compress-commons/lib/util/index.js
-var require_util15 = __commonJS({
-  "node_modules/compress-commons/lib/util/index.js"(exports2, module2) {
-    var Stream = require("stream").Stream;
-    var PassThrough = require_ours().PassThrough;
-    var isStream = require_is_stream2();
-    var util = module2.exports = {};
-    util.normalizeInputSource = function(source) {
-      if (source === null) {
-        return Buffer.alloc(0);
-      } else if (typeof source === "string") {
-        return Buffer.from(source);
-      } else if (isStream(source) && !source._readableState) {
-        var normalized = new PassThrough();
-        source.pipe(normalized);
-        return normalized;
+      return dest;
+      function errorHandle(s, rd, wr, onerror2) {
+        s.on("error", onerror2);
+        s.on("close", onclose);
+        function onclose() {
+          if (rd && s._readableState && !s._readableState.ended) return onerror2(PREMATURE_CLOSE);
+          if (wr && s._writableState && !s._writableState.ended) return onerror2(PREMATURE_CLOSE);
+        }
       }
-      return source;
+      function onerror(err) {
+        if (!err || error3) return;
+        error3 = err;
+        for (const s of all) {
+          s.destroy(err);
+        }
+      }
+    }
+    function echo(s) {
+      return s;
+    }
+    function isStream2(stream2) {
+      return !!stream2._readableState || !!stream2._writableState;
+    }
+    function isStreamx(stream2) {
+      return typeof stream2._duplexState === "number" && isStream2(stream2);
+    }
+    function isEnded(stream2) {
+      return !!stream2._readableState && stream2._readableState.ended;
+    }
+    function isFinished(stream2) {
+      return !!stream2._writableState && stream2._writableState.ended;
+    }
+    function getStreamError(stream2, opts = {}) {
+      const err = stream2._readableState && stream2._readableState.error || stream2._writableState && stream2._writableState.error;
+      return !opts.all && err === STREAM_DESTROYED ? null : err;
+    }
+    function isReadStreamx(stream2) {
+      return isStreamx(stream2) && stream2.readable;
+    }
+    function isTypedArray(data) {
+      return typeof data === "object" && data !== null && typeof data.byteLength === "number";
+    }
+    function defaultByteLength(data) {
+      return isTypedArray(data) ? data.byteLength : 1024;
+    }
+    function noop3() {
+    }
+    function abort() {
+      this.destroy(new Error("Stream aborted."));
+    }
+    function isWritev(s) {
+      return s._writev !== Writable.prototype._writev && s._writev !== Duplex.prototype._writev;
+    }
+    module2.exports = {
+      pipeline: pipeline2,
+      pipelinePromise,
+      isStream: isStream2,
+      isStreamx,
+      isEnded,
+      isFinished,
+      getStreamError,
+      Stream,
+      Writable,
+      Readable: Readable3,
+      Duplex,
+      Transform: Transform5,
+      // Export PassThrough for compatibility with Node.js core's stream module
+      PassThrough: PassThrough3
     };
   }
 });
 
-// node_modules/compress-commons/lib/archivers/archive-output-stream.js
-var require_archive_output_stream = __commonJS({
-  "node_modules/compress-commons/lib/archivers/archive-output-stream.js"(exports2, module2) {
-    var inherits = require("util").inherits;
-    var isStream = require_is_stream2();
-    var Transform = require_ours().Transform;
-    var ArchiveEntry = require_archive_entry();
-    var util = require_util15();
-    var ArchiveOutputStream = module2.exports = function(options) {
-      if (!(this instanceof ArchiveOutputStream)) {
-        return new ArchiveOutputStream(options);
-      }
-      Transform.call(this, options);
-      this.offset = 0;
-      this._archive = {
-        finish: false,
-        finished: false,
-        processing: false
-      };
-    };
-    inherits(ArchiveOutputStream, Transform);
-    ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) {
-    };
-    ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) {
+// node_modules/tar-stream/headers.js
+var require_headers2 = __commonJS({
+  "node_modules/tar-stream/headers.js"(exports2) {
+    var b4a = require_b4a();
+    var ZEROS = "0000000000000000000";
+    var SEVENS = "7777777777777777777";
+    var ZERO_OFFSET = "0".charCodeAt(0);
+    var USTAR_MAGIC = b4a.from([117, 115, 116, 97, 114, 0]);
+    var USTAR_VER = b4a.from([ZERO_OFFSET, ZERO_OFFSET]);
+    var GNU_MAGIC = b4a.from([117, 115, 116, 97, 114, 32]);
+    var GNU_VER = b4a.from([32, 0]);
+    var MASK = 4095;
+    var MAGIC_OFFSET = 257;
+    var VERSION_OFFSET = 263;
+    exports2.decodeLongPath = function decodeLongPath(buf, encoding) {
+      return decodeStr(buf, 0, buf.length, encoding);
     };
-    ArchiveOutputStream.prototype._emitErrorCallback = function(err) {
-      if (err) {
-        this.emit("error", err);
+    exports2.encodePax = function encodePax(opts) {
+      let result = "";
+      if (opts.name) result += addLength(" path=" + opts.name + "\n");
+      if (opts.linkname) result += addLength(" linkpath=" + opts.linkname + "\n");
+      const pax = opts.pax;
+      if (pax) {
+        for (const key in pax) {
+          result += addLength(" " + key + "=" + pax[key] + "\n");
+        }
       }
+      return b4a.from(result);
     };
-    ArchiveOutputStream.prototype._finish = function(ae) {
+    exports2.decodePax = function decodePax(buf) {
+      const result = {};
+      while (buf.length) {
+        let i = 0;
+        while (i < buf.length && buf[i] !== 32) i++;
+        const len = parseInt(b4a.toString(buf.subarray(0, i)), 10);
+        if (!len) return result;
+        const b = b4a.toString(buf.subarray(i + 1, len - 1));
+        const keyIndex = b.indexOf("=");
+        if (keyIndex === -1) return result;
+        result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1);
+        buf = buf.subarray(len);
+      }
+      return result;
     };
-    ArchiveOutputStream.prototype._normalizeEntry = function(ae) {
+    exports2.encode = function encode(opts) {
+      const buf = b4a.alloc(512);
+      let name = opts.name;
+      let prefix = "";
+      if (opts.typeflag === 5 && name[name.length - 1] !== "/") name += "/";
+      if (b4a.byteLength(name) !== name.length) return null;
+      while (b4a.byteLength(name) > 100) {
+        const i = name.indexOf("/");
+        if (i === -1) return null;
+        prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i);
+        name = name.slice(i + 1);
+      }
+      if (b4a.byteLength(name) > 100 || b4a.byteLength(prefix) > 155) return null;
+      if (opts.linkname && b4a.byteLength(opts.linkname) > 100) return null;
+      b4a.write(buf, name);
+      b4a.write(buf, encodeOct(opts.mode & MASK, 6), 100);
+      b4a.write(buf, encodeOct(opts.uid, 6), 108);
+      b4a.write(buf, encodeOct(opts.gid, 6), 116);
+      encodeSize(opts.size, buf, 124);
+      b4a.write(buf, encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136);
+      buf[156] = ZERO_OFFSET + toTypeflag(opts.type);
+      if (opts.linkname) b4a.write(buf, opts.linkname, 157);
+      b4a.copy(USTAR_MAGIC, buf, MAGIC_OFFSET);
+      b4a.copy(USTAR_VER, buf, VERSION_OFFSET);
+      if (opts.uname) b4a.write(buf, opts.uname, 265);
+      if (opts.gname) b4a.write(buf, opts.gname, 297);
+      b4a.write(buf, encodeOct(opts.devmajor || 0, 6), 329);
+      b4a.write(buf, encodeOct(opts.devminor || 0, 6), 337);
+      if (prefix) b4a.write(buf, prefix, 345);
+      b4a.write(buf, encodeOct(cksum(buf), 6), 148);
+      return buf;
     };
-    ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) {
-      callback(null, chunk);
+    exports2.decode = function decode(buf, filenameEncoding, allowUnknownFormat) {
+      let typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET;
+      let name = decodeStr(buf, 0, 100, filenameEncoding);
+      const mode = decodeOct(buf, 100, 8);
+      const uid = decodeOct(buf, 108, 8);
+      const gid = decodeOct(buf, 116, 8);
+      const size = decodeOct(buf, 124, 12);
+      const mtime = decodeOct(buf, 136, 12);
+      const type = toType(typeflag);
+      const linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding);
+      const uname = decodeStr(buf, 265, 32);
+      const gname = decodeStr(buf, 297, 32);
+      const devmajor = decodeOct(buf, 329, 8);
+      const devminor = decodeOct(buf, 337, 8);
+      const c = cksum(buf);
+      if (c === 8 * 32) return null;
+      if (c !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");
+      if (isUSTAR(buf)) {
+        if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name;
+      } else if (isGNU(buf)) {
+      } else {
+        if (!allowUnknownFormat) {
+          throw new Error("Invalid tar header: unknown format.");
+        }
+      }
+      if (typeflag === 0 && name && name[name.length - 1] === "/") typeflag = 5;
+      return {
+        name,
+        mode,
+        uid,
+        gid,
+        size,
+        mtime: new Date(1e3 * mtime),
+        type,
+        linkname,
+        uname,
+        gname,
+        devmajor,
+        devminor,
+        pax: null
+      };
     };
-    ArchiveOutputStream.prototype.entry = function(ae, source, callback) {
-      source = source || null;
-      if (typeof callback !== "function") {
-        callback = this._emitErrorCallback.bind(this);
+    function isUSTAR(buf) {
+      return b4a.equals(USTAR_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6));
+    }
+    function isGNU(buf) {
+      return b4a.equals(GNU_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6)) && b4a.equals(GNU_VER, buf.subarray(VERSION_OFFSET, VERSION_OFFSET + 2));
+    }
+    function clamp(index2, len, defaultValue) {
+      if (typeof index2 !== "number") return defaultValue;
+      index2 = ~~index2;
+      if (index2 >= len) return len;
+      if (index2 >= 0) return index2;
+      index2 += len;
+      if (index2 >= 0) return index2;
+      return 0;
+    }
+    function toType(flag) {
+      switch (flag) {
+        case 0:
+          return "file";
+        case 1:
+          return "link";
+        case 2:
+          return "symlink";
+        case 3:
+          return "character-device";
+        case 4:
+          return "block-device";
+        case 5:
+          return "directory";
+        case 6:
+          return "fifo";
+        case 7:
+          return "contiguous-file";
+        case 72:
+          return "pax-header";
+        case 55:
+          return "pax-global-header";
+        case 27:
+          return "gnu-long-link-path";
+        case 28:
+        case 30:
+          return "gnu-long-path";
       }
-      if (!(ae instanceof ArchiveEntry)) {
-        callback(new Error("not a valid instance of ArchiveEntry"));
-        return;
+      return null;
+    }
+    function toTypeflag(flag) {
+      switch (flag) {
+        case "file":
+          return 0;
+        case "link":
+          return 1;
+        case "symlink":
+          return 2;
+        case "character-device":
+          return 3;
+        case "block-device":
+          return 4;
+        case "directory":
+          return 5;
+        case "fifo":
+          return 6;
+        case "contiguous-file":
+          return 7;
+        case "pax-header":
+          return 72;
       }
-      if (this._archive.finish || this._archive.finished) {
-        callback(new Error("unacceptable entry after finish"));
-        return;
+      return 0;
+    }
+    function indexOf(block, num, offset, end) {
+      for (; offset < end; offset++) {
+        if (block[offset] === num) return offset;
       }
-      if (this._archive.processing) {
-        callback(new Error("already processing an entry"));
-        return;
+      return end;
+    }
+    function cksum(block) {
+      let sum = 8 * 32;
+      for (let i = 0; i < 148; i++) sum += block[i];
+      for (let j = 156; j < 512; j++) sum += block[j];
+      return sum;
+    }
+    function encodeOct(val, n) {
+      val = val.toString(8);
+      if (val.length > n) return SEVENS.slice(0, n) + " ";
+      return ZEROS.slice(0, n - val.length) + val + " ";
+    }
+    function encodeSizeBin(num, buf, off) {
+      buf[off] = 128;
+      for (let i = 11; i > 0; i--) {
+        buf[off + i] = num & 255;
+        num = Math.floor(num / 256);
       }
-      this._archive.processing = true;
-      this._normalizeEntry(ae);
-      this._entry = ae;
-      source = util.normalizeInputSource(source);
-      if (Buffer.isBuffer(source)) {
-        this._appendBuffer(ae, source, callback);
-      } else if (isStream(source)) {
-        this._appendStream(ae, source, callback);
+    }
+    function encodeSize(num, buf, off) {
+      if (num.toString(8).length > 11) {
+        encodeSizeBin(num, buf, off);
       } else {
-        this._archive.processing = false;
-        callback(new Error("input source must be valid Stream or Buffer instance"));
-        return;
+        b4a.write(buf, encodeOct(num, 11), off);
       }
-      return this;
-    };
-    ArchiveOutputStream.prototype.finish = function() {
-      if (this._archive.processing) {
-        this._archive.finish = true;
-        return;
+    }
+    function parse256(buf) {
+      let positive;
+      if (buf[0] === 128) positive = true;
+      else if (buf[0] === 255) positive = false;
+      else return null;
+      const tuple = [];
+      let i;
+      for (i = buf.length - 1; i > 0; i--) {
+        const byte = buf[i];
+        if (positive) tuple.push(byte);
+        else tuple.push(255 - byte);
       }
-      this._finish();
-    };
-    ArchiveOutputStream.prototype.getBytesWritten = function() {
-      return this.offset;
-    };
-    ArchiveOutputStream.prototype.write = function(chunk, cb) {
-      if (chunk) {
-        this.offset += chunk.length;
+      let sum = 0;
+      const l = tuple.length;
+      for (i = 0; i < l; i++) {
+        sum += tuple[i] * Math.pow(256, i);
       }
-      return Transform.prototype.write.call(this, chunk, cb);
-    };
+      return positive ? sum : -1 * sum;
+    }
+    function decodeOct(val, offset, length) {
+      val = val.subarray(offset, offset + length);
+      offset = 0;
+      if (val[offset] & 128) {
+        return parse256(val);
+      } else {
+        while (offset < val.length && val[offset] === 32) offset++;
+        const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length);
+        while (offset < end && val[offset] === 0) offset++;
+        if (end === offset) return 0;
+        return parseInt(b4a.toString(val.subarray(offset, end)), 8);
+      }
+    }
+    function decodeStr(val, offset, length, encoding) {
+      return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding);
+    }
+    function addLength(str) {
+      const len = b4a.byteLength(str);
+      let digits = Math.floor(Math.log(len) / Math.log(10)) + 1;
+      if (len + digits >= Math.pow(10, digits)) digits++;
+      return len + digits + str;
+    }
   }
 });
 
-// node_modules/crc-32/crc32.js
-var require_crc32 = __commonJS({
-  "node_modules/crc-32/crc32.js"(exports2) {
-    var CRC32;
-    (function(factory) {
-      if (typeof DO_NOT_EXPORT_CRC === "undefined") {
-        if ("object" === typeof exports2) {
-          factory(exports2);
-        } else if ("function" === typeof define && define.amd) {
-          define(function() {
-            var module3 = {};
-            factory(module3);
-            return module3;
-          });
-        } else {
-          factory(CRC32 = {});
-        }
-      } else {
-        factory(CRC32 = {});
+// node_modules/tar-stream/extract.js
+var require_extract = __commonJS({
+  "node_modules/tar-stream/extract.js"(exports2, module2) {
+    var { Writable, Readable: Readable3, getStreamError } = require_streamx();
+    var FIFO = require_fast_fifo();
+    var b4a = require_b4a();
+    var headers = require_headers2();
+    var EMPTY2 = b4a.alloc(0);
+    var BufferList = class {
+      constructor() {
+        this.buffered = 0;
+        this.shifted = 0;
+        this.queue = new FIFO();
+        this._offset = 0;
       }
-    })(function(CRC322) {
-      CRC322.version = "1.2.2";
-      function signed_crc_table() {
-        var c = 0, table = new Array(256);
-        for (var n = 0; n != 256; ++n) {
-          c = n;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
-          table[n] = c;
-        }
-        return typeof Int32Array !== "undefined" ? new Int32Array(table) : table;
+      push(buffer) {
+        this.buffered += buffer.byteLength;
+        this.queue.push(buffer);
       }
-      var T0 = signed_crc_table();
-      function slice_by_16_tables(T) {
-        var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096);
-        for (n = 0; n != 256; ++n) table[n] = T[n];
-        for (n = 0; n != 256; ++n) {
-          v = T[n];
-          for (c = 256 + n; c < 4096; c += 256) v = table[c] = v >>> 8 ^ T[v & 255];
+      shiftFirst(size) {
+        return this._buffered === 0 ? null : this._next(size);
+      }
+      shift(size) {
+        if (size > this.buffered) return null;
+        if (size === 0) return EMPTY2;
+        let chunk = this._next(size);
+        if (size === chunk.byteLength) return chunk;
+        const chunks = [chunk];
+        while ((size -= chunk.byteLength) > 0) {
+          chunk = this._next(size);
+          chunks.push(chunk);
         }
-        var out = [];
-        for (n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);
-        return out;
+        return b4a.concat(chunks);
       }
-      var TT = slice_by_16_tables(T0);
-      var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];
-      var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];
-      var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];
-      function crc32_bstr(bstr, seed) {
-        var C = seed ^ -1;
-        for (var i = 0, L = bstr.length; i < L; ) C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255];
-        return ~C;
+      _next(size) {
+        const buf = this.queue.peek();
+        const rem = buf.byteLength - this._offset;
+        if (size >= rem) {
+          const sub = this._offset ? buf.subarray(this._offset, buf.byteLength) : buf;
+          this.queue.shift();
+          this._offset = 0;
+          this.buffered -= rem;
+          this.shifted += rem;
+          return sub;
+        }
+        this.buffered -= size;
+        this.shifted += size;
+        return buf.subarray(this._offset, this._offset += size);
       }
-      function crc32_buf(B, seed) {
-        var C = seed ^ -1, L = B.length - 15, i = 0;
-        for (; i < L; ) C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];
-        L += 15;
-        while (i < L) C = C >>> 8 ^ T0[(C ^ B[i++]) & 255];
-        return ~C;
+    };
+    var Source = class extends Readable3 {
+      constructor(self2, header, offset) {
+        super();
+        this.header = header;
+        this.offset = offset;
+        this._parent = self2;
       }
-      function crc32_str(str2, seed) {
-        var C = seed ^ -1;
-        for (var i = 0, L = str2.length, c = 0, d = 0; i < L; ) {
-          c = str2.charCodeAt(i++);
-          if (c < 128) {
-            C = C >>> 8 ^ T0[(C ^ c) & 255];
-          } else if (c < 2048) {
-            C = C >>> 8 ^ T0[(C ^ (192 | c >> 6 & 31)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255];
-          } else if (c >= 55296 && c < 57344) {
-            c = (c & 1023) + 64;
-            d = str2.charCodeAt(i++) & 1023;
-            C = C >>> 8 ^ T0[(C ^ (240 | c >> 8 & 7)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | c >> 2 & 63)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | d & 63)) & 255];
-          } else {
-            C = C >>> 8 ^ T0[(C ^ (224 | c >> 12 & 15)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | c >> 6 & 63)) & 255];
-            C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255];
-          }
+      _read(cb) {
+        if (this.header.size === 0) {
+          this.push(null);
         }
-        return ~C;
+        if (this._parent._stream === this) {
+          this._parent._update();
+        }
+        cb(null);
       }
-      CRC322.table = T0;
-      CRC322.bstr = crc32_bstr;
-      CRC322.buf = crc32_buf;
-      CRC322.str = crc32_str;
-    });
-  }
-});
-
-// node_modules/crc32-stream/lib/crc32-stream.js
-var require_crc32_stream = __commonJS({
-  "node_modules/crc32-stream/lib/crc32-stream.js"(exports2, module2) {
-    "use strict";
-    var { Transform } = require_ours();
-    var crc32 = require_crc32();
-    var CRC32Stream = class extends Transform {
-      constructor(options) {
-        super(options);
-        this.checksum = Buffer.allocUnsafe(4);
-        this.checksum.writeInt32BE(0, 0);
-        this.rawSize = 0;
+      _predestroy() {
+        this._parent.destroy(getStreamError(this));
       }
-      _transform(chunk, encoding, callback) {
-        if (chunk) {
-          this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
-          this.rawSize += chunk.length;
+      _detach() {
+        if (this._parent._stream === this) {
+          this._parent._stream = null;
+          this._parent._missing = overflow(this.header.size);
+          this._parent._update();
         }
-        callback(null, chunk);
-      }
-      digest(encoding) {
-        const checksum = Buffer.allocUnsafe(4);
-        checksum.writeUInt32BE(this.checksum >>> 0, 0);
-        return encoding ? checksum.toString(encoding) : checksum;
-      }
-      hex() {
-        return this.digest("hex").toUpperCase();
       }
-      size() {
-        return this.rawSize;
+      _destroy(cb) {
+        this._detach();
+        cb(null);
       }
     };
-    module2.exports = CRC32Stream;
-  }
-});
-
-// node_modules/crc32-stream/lib/deflate-crc32-stream.js
-var require_deflate_crc32_stream = __commonJS({
-  "node_modules/crc32-stream/lib/deflate-crc32-stream.js"(exports2, module2) {
-    "use strict";
-    var { DeflateRaw } = require("zlib");
-    var crc32 = require_crc32();
-    var DeflateCRC32Stream = class extends DeflateRaw {
-      constructor(options) {
-        super(options);
-        this.checksum = Buffer.allocUnsafe(4);
-        this.checksum.writeInt32BE(0, 0);
-        this.rawSize = 0;
-        this.compressedSize = 0;
+    var Extract = class extends Writable {
+      constructor(opts) {
+        super(opts);
+        if (!opts) opts = {};
+        this._buffer = new BufferList();
+        this._offset = 0;
+        this._header = null;
+        this._stream = null;
+        this._missing = 0;
+        this._longHeader = false;
+        this._callback = noop3;
+        this._locked = false;
+        this._finished = false;
+        this._pax = null;
+        this._paxGlobal = null;
+        this._gnuLongPath = null;
+        this._gnuLongLinkPath = null;
+        this._filenameEncoding = opts.filenameEncoding || "utf-8";
+        this._allowUnknownFormat = !!opts.allowUnknownFormat;
+        this._unlockBound = this._unlock.bind(this);
       }
-      push(chunk, encoding) {
-        if (chunk) {
-          this.compressedSize += chunk.length;
+      _unlock(err) {
+        this._locked = false;
+        if (err) {
+          this.destroy(err);
+          this._continueWrite(err);
+          return;
         }
-        return super.push(chunk, encoding);
+        this._update();
       }
-      _transform(chunk, encoding, callback) {
-        if (chunk) {
-          this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
-          this.rawSize += chunk.length;
+      _consumeHeader() {
+        if (this._locked) return false;
+        this._offset = this._buffer.shifted;
+        try {
+          this._header = headers.decode(this._buffer.shift(512), this._filenameEncoding, this._allowUnknownFormat);
+        } catch (err) {
+          this._continueWrite(err);
+          return false;
         }
-        super._transform(chunk, encoding, callback);
-      }
-      digest(encoding) {
-        const checksum = Buffer.allocUnsafe(4);
-        checksum.writeUInt32BE(this.checksum >>> 0, 0);
-        return encoding ? checksum.toString(encoding) : checksum;
-      }
-      hex() {
-        return this.digest("hex").toUpperCase();
-      }
-      size(compressed = false) {
-        if (compressed) {
-          return this.compressedSize;
-        } else {
-          return this.rawSize;
+        if (!this._header) return true;
+        switch (this._header.type) {
+          case "gnu-long-path":
+          case "gnu-long-link-path":
+          case "pax-global-header":
+          case "pax-header":
+            this._longHeader = true;
+            this._missing = this._header.size;
+            return true;
         }
+        this._locked = true;
+        this._applyLongHeaders();
+        if (this._header.size === 0 || this._header.type === "directory") {
+          this.emit("entry", this._header, this._createStream(), this._unlockBound);
+          return true;
+        }
+        this._stream = this._createStream();
+        this._missing = this._header.size;
+        this.emit("entry", this._header, this._stream, this._unlockBound);
+        return true;
       }
-    };
-    module2.exports = DeflateCRC32Stream;
-  }
-});
-
-// node_modules/crc32-stream/lib/index.js
-var require_lib3 = __commonJS({
-  "node_modules/crc32-stream/lib/index.js"(exports2, module2) {
-    "use strict";
-    module2.exports = {
-      CRC32Stream: require_crc32_stream(),
-      DeflateCRC32Stream: require_deflate_crc32_stream()
-    };
-  }
-});
-
-// node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
-var require_zip_archive_output_stream = __commonJS({
-  "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) {
-    var inherits = require("util").inherits;
-    var crc32 = require_crc32();
-    var { CRC32Stream } = require_lib3();
-    var { DeflateCRC32Stream } = require_lib3();
-    var ArchiveOutputStream = require_archive_output_stream();
-    var ZipArchiveEntry = require_zip_archive_entry();
-    var GeneralPurposeBit = require_general_purpose_bit();
-    var constants = require_constants13();
-    var util = require_util15();
-    var zipUtil = require_util14();
-    var ZipArchiveOutputStream = module2.exports = function(options) {
-      if (!(this instanceof ZipArchiveOutputStream)) {
-        return new ZipArchiveOutputStream(options);
-      }
-      options = this.options = this._defaults(options);
-      ArchiveOutputStream.call(this, options);
-      this._entry = null;
-      this._entries = [];
-      this._archive = {
-        centralLength: 0,
-        centralOffset: 0,
-        comment: "",
-        finish: false,
-        finished: false,
-        processing: false,
-        forceZip64: options.forceZip64,
-        forceLocalTime: options.forceLocalTime
-      };
-    };
-    inherits(ZipArchiveOutputStream, ArchiveOutputStream);
-    ZipArchiveOutputStream.prototype._afterAppend = function(ae) {
-      this._entries.push(ae);
-      if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
-        this._writeDataDescriptor(ae);
-      }
-      this._archive.processing = false;
-      this._entry = null;
-      if (this._archive.finish && !this._archive.finished) {
-        this._finish();
-      }
-    };
-    ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) {
-      if (source.length === 0) {
-        ae.setMethod(constants.METHOD_STORED);
-      }
-      var method = ae.getMethod();
-      if (method === constants.METHOD_STORED) {
-        ae.setSize(source.length);
-        ae.setCompressedSize(source.length);
-        ae.setCrc(crc32.buf(source) >>> 0);
-      }
-      this._writeLocalFileHeader(ae);
-      if (method === constants.METHOD_STORED) {
-        this.write(source);
-        this._afterAppend(ae);
-        callback(null, ae);
-        return;
-      } else if (method === constants.METHOD_DEFLATED) {
-        this._smartStream(ae, callback).end(source);
-        return;
-      } else {
-        callback(new Error("compression method " + method + " not implemented"));
-        return;
-      }
-    };
-    ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) {
-      ae.getGeneralPurposeBit().useDataDescriptor(true);
-      ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
-      this._writeLocalFileHeader(ae);
-      var smart = this._smartStream(ae, callback);
-      source.once("error", function(err) {
-        smart.emit("error", err);
-        smart.end();
-      });
-      source.pipe(smart);
-    };
-    ZipArchiveOutputStream.prototype._defaults = function(o) {
-      if (typeof o !== "object") {
-        o = {};
-      }
-      if (typeof o.zlib !== "object") {
-        o.zlib = {};
-      }
-      if (typeof o.zlib.level !== "number") {
-        o.zlib.level = constants.ZLIB_BEST_SPEED;
-      }
-      o.forceZip64 = !!o.forceZip64;
-      o.forceLocalTime = !!o.forceLocalTime;
-      return o;
-    };
-    ZipArchiveOutputStream.prototype._finish = function() {
-      this._archive.centralOffset = this.offset;
-      this._entries.forEach(function(ae) {
-        this._writeCentralFileHeader(ae);
-      }.bind(this));
-      this._archive.centralLength = this.offset - this._archive.centralOffset;
-      if (this.isZip64()) {
-        this._writeCentralDirectoryZip64();
+      _applyLongHeaders() {
+        if (this._gnuLongPath) {
+          this._header.name = this._gnuLongPath;
+          this._gnuLongPath = null;
+        }
+        if (this._gnuLongLinkPath) {
+          this._header.linkname = this._gnuLongLinkPath;
+          this._gnuLongLinkPath = null;
+        }
+        if (this._pax) {
+          if (this._pax.path) this._header.name = this._pax.path;
+          if (this._pax.linkpath) this._header.linkname = this._pax.linkpath;
+          if (this._pax.size) this._header.size = parseInt(this._pax.size, 10);
+          this._header.pax = this._pax;
+          this._pax = null;
+        }
       }
-      this._writeCentralDirectoryEnd();
-      this._archive.processing = false;
-      this._archive.finish = true;
-      this._archive.finished = true;
-      this.end();
-    };
-    ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) {
-      if (ae.getMethod() === -1) {
-        ae.setMethod(constants.METHOD_DEFLATED);
+      _decodeLongHeader(buf) {
+        switch (this._header.type) {
+          case "gnu-long-path":
+            this._gnuLongPath = headers.decodeLongPath(buf, this._filenameEncoding);
+            break;
+          case "gnu-long-link-path":
+            this._gnuLongLinkPath = headers.decodeLongPath(buf, this._filenameEncoding);
+            break;
+          case "pax-global-header":
+            this._paxGlobal = headers.decodePax(buf);
+            break;
+          case "pax-header":
+            this._pax = this._paxGlobal === null ? headers.decodePax(buf) : Object.assign({}, this._paxGlobal, headers.decodePax(buf));
+            break;
+        }
       }
-      if (ae.getMethod() === constants.METHOD_DEFLATED) {
-        ae.getGeneralPurposeBit().useDataDescriptor(true);
-        ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
+      _consumeLongHeader() {
+        this._longHeader = false;
+        this._missing = overflow(this._header.size);
+        const buf = this._buffer.shift(this._header.size);
+        try {
+          this._decodeLongHeader(buf);
+        } catch (err) {
+          this._continueWrite(err);
+          return false;
+        }
+        return true;
       }
-      if (ae.getTime() === -1) {
-        ae.setTime(/* @__PURE__ */ new Date(), this._archive.forceLocalTime);
+      _consumeStream() {
+        const buf = this._buffer.shiftFirst(this._missing);
+        if (buf === null) return false;
+        this._missing -= buf.byteLength;
+        const drained = this._stream.push(buf);
+        if (this._missing === 0) {
+          this._stream.push(null);
+          if (drained) this._stream._detach();
+          return drained && this._locked === false;
+        }
+        return drained;
       }
-      ae._offsets = {
-        file: 0,
-        data: 0,
-        contents: 0
-      };
-    };
-    ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) {
-      var deflate = ae.getMethod() === constants.METHOD_DEFLATED;
-      var process2 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream();
-      var error3 = null;
-      function handleStuff() {
-        var digest = process2.digest().readUInt32BE(0);
-        ae.setCrc(digest);
-        ae.setSize(process2.size());
-        ae.setCompressedSize(process2.size(true));
-        this._afterAppend(ae);
-        callback(error3, ae);
+      _createStream() {
+        return new Source(this, this._header, this._offset);
       }
-      process2.once("end", handleStuff.bind(this));
-      process2.once("error", function(err) {
-        error3 = err;
-      });
-      process2.pipe(this, { end: false });
-      return process2;
-    };
-    ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() {
-      var records = this._entries.length;
-      var size = this._archive.centralLength;
-      var offset = this._archive.centralOffset;
-      if (this.isZip64()) {
-        records = constants.ZIP64_MAGIC_SHORT;
-        size = constants.ZIP64_MAGIC;
-        offset = constants.ZIP64_MAGIC;
+      _update() {
+        while (this._buffer.buffered > 0 && !this.destroying) {
+          if (this._missing > 0) {
+            if (this._stream !== null) {
+              if (this._consumeStream() === false) return;
+              continue;
+            }
+            if (this._longHeader === true) {
+              if (this._missing > this._buffer.buffered) break;
+              if (this._consumeLongHeader() === false) return false;
+              continue;
+            }
+            const ignore = this._buffer.shiftFirst(this._missing);
+            if (ignore !== null) this._missing -= ignore.byteLength;
+            continue;
+          }
+          if (this._buffer.buffered < 512) break;
+          if (this._stream !== null || this._consumeHeader() === false) return;
+        }
+        this._continueWrite(null);
       }
-      this.write(zipUtil.getLongBytes(constants.SIG_EOCD));
-      this.write(constants.SHORT_ZERO);
-      this.write(constants.SHORT_ZERO);
-      this.write(zipUtil.getShortBytes(records));
-      this.write(zipUtil.getShortBytes(records));
-      this.write(zipUtil.getLongBytes(size));
-      this.write(zipUtil.getLongBytes(offset));
-      var comment = this.getComment();
-      var commentLength = Buffer.byteLength(comment);
-      this.write(zipUtil.getShortBytes(commentLength));
-      this.write(comment);
-    };
-    ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() {
-      this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD));
-      this.write(zipUtil.getEightBytes(44));
-      this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-      this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-      this.write(constants.LONG_ZERO);
-      this.write(constants.LONG_ZERO);
-      this.write(zipUtil.getEightBytes(this._entries.length));
-      this.write(zipUtil.getEightBytes(this._entries.length));
-      this.write(zipUtil.getEightBytes(this._archive.centralLength));
-      this.write(zipUtil.getEightBytes(this._archive.centralOffset));
-      this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC));
-      this.write(constants.LONG_ZERO);
-      this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength));
-      this.write(zipUtil.getLongBytes(1));
-    };
-    ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) {
-      var gpb = ae.getGeneralPurposeBit();
-      var method = ae.getMethod();
-      var fileOffset = ae._offsets.file;
-      var size = ae.getSize();
-      var compressedSize = ae.getCompressedSize();
-      if (ae.isZip64() || fileOffset > constants.ZIP64_MAGIC) {
-        size = constants.ZIP64_MAGIC;
-        compressedSize = constants.ZIP64_MAGIC;
-        fileOffset = constants.ZIP64_MAGIC;
-        ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
-        var extraBuf = Buffer.concat([
-          zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID),
-          zipUtil.getShortBytes(24),
-          zipUtil.getEightBytes(ae.getSize()),
-          zipUtil.getEightBytes(ae.getCompressedSize()),
-          zipUtil.getEightBytes(ae._offsets.file)
-        ], 28);
-        ae.setExtra(extraBuf);
+      _continueWrite(err) {
+        const cb = this._callback;
+        this._callback = noop3;
+        cb(err);
       }
-      this.write(zipUtil.getLongBytes(constants.SIG_CFH));
-      this.write(zipUtil.getShortBytes(ae.getPlatform() << 8 | constants.VERSION_MADEBY));
-      this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
-      this.write(gpb.encode());
-      this.write(zipUtil.getShortBytes(method));
-      this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-      this.write(zipUtil.getLongBytes(ae.getCrc()));
-      this.write(zipUtil.getLongBytes(compressedSize));
-      this.write(zipUtil.getLongBytes(size));
-      var name = ae.getName();
-      var comment = ae.getComment();
-      var extra = ae.getCentralDirectoryExtra();
-      if (gpb.usesUTF8ForNames()) {
-        name = Buffer.from(name);
-        comment = Buffer.from(comment);
+      _write(data, cb) {
+        this._callback = cb;
+        this._buffer.push(data);
+        this._update();
       }
-      this.write(zipUtil.getShortBytes(name.length));
-      this.write(zipUtil.getShortBytes(extra.length));
-      this.write(zipUtil.getShortBytes(comment.length));
-      this.write(constants.SHORT_ZERO);
-      this.write(zipUtil.getShortBytes(ae.getInternalAttributes()));
-      this.write(zipUtil.getLongBytes(ae.getExternalAttributes()));
-      this.write(zipUtil.getLongBytes(fileOffset));
-      this.write(name);
-      this.write(extra);
-      this.write(comment);
-    };
-    ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) {
-      this.write(zipUtil.getLongBytes(constants.SIG_DD));
-      this.write(zipUtil.getLongBytes(ae.getCrc()));
-      if (ae.isZip64()) {
-        this.write(zipUtil.getEightBytes(ae.getCompressedSize()));
-        this.write(zipUtil.getEightBytes(ae.getSize()));
-      } else {
-        this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
-        this.write(zipUtil.getLongBytes(ae.getSize()));
+      _final(cb) {
+        this._finished = this._missing === 0 && this._buffer.buffered === 0;
+        cb(this._finished ? null : new Error("Unexpected end of data"));
       }
-    };
-    ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) {
-      var gpb = ae.getGeneralPurposeBit();
-      var method = ae.getMethod();
-      var name = ae.getName();
-      var extra = ae.getLocalFileDataExtra();
-      if (ae.isZip64()) {
-        gpb.useDataDescriptor(true);
-        ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
+      _predestroy() {
+        this._continueWrite(null);
       }
-      if (gpb.usesUTF8ForNames()) {
-        name = Buffer.from(name);
+      _destroy(cb) {
+        if (this._stream) this._stream.destroy(getStreamError(this));
+        cb(null);
       }
-      ae._offsets.file = this.offset;
-      this.write(zipUtil.getLongBytes(constants.SIG_LFH));
-      this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
-      this.write(gpb.encode());
-      this.write(zipUtil.getShortBytes(method));
-      this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-      ae._offsets.data = this.offset;
-      if (gpb.usesDataDescriptor()) {
-        this.write(constants.LONG_ZERO);
-        this.write(constants.LONG_ZERO);
-        this.write(constants.LONG_ZERO);
-      } else {
-        this.write(zipUtil.getLongBytes(ae.getCrc()));
-        this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
-        this.write(zipUtil.getLongBytes(ae.getSize()));
+      [Symbol.asyncIterator]() {
+        let error3 = null;
+        let promiseResolve = null;
+        let promiseReject = null;
+        let entryStream = null;
+        let entryCallback = null;
+        const extract2 = this;
+        this.on("entry", onentry);
+        this.on("error", (err) => {
+          error3 = err;
+        });
+        this.on("close", onclose);
+        return {
+          [Symbol.asyncIterator]() {
+            return this;
+          },
+          next() {
+            return new Promise(onnext);
+          },
+          return() {
+            return destroy(null);
+          },
+          throw(err) {
+            return destroy(err);
+          }
+        };
+        function consumeCallback(err) {
+          if (!entryCallback) return;
+          const cb = entryCallback;
+          entryCallback = null;
+          cb(err);
+        }
+        function onnext(resolve14, reject) {
+          if (error3) {
+            return reject(error3);
+          }
+          if (entryStream) {
+            resolve14({ value: entryStream, done: false });
+            entryStream = null;
+            return;
+          }
+          promiseResolve = resolve14;
+          promiseReject = reject;
+          consumeCallback(null);
+          if (extract2._finished && promiseResolve) {
+            promiseResolve({ value: void 0, done: true });
+            promiseResolve = promiseReject = null;
+          }
+        }
+        function onentry(header, stream2, callback) {
+          entryCallback = callback;
+          stream2.on("error", noop3);
+          if (promiseResolve) {
+            promiseResolve({ value: stream2, done: false });
+            promiseResolve = promiseReject = null;
+          } else {
+            entryStream = stream2;
+          }
+        }
+        function onclose() {
+          consumeCallback(error3);
+          if (!promiseResolve) return;
+          if (error3) promiseReject(error3);
+          else promiseResolve({ value: void 0, done: true });
+          promiseResolve = promiseReject = null;
+        }
+        function destroy(err) {
+          extract2.destroy(err);
+          consumeCallback(err);
+          return new Promise((resolve14, reject) => {
+            if (extract2.destroyed) return resolve14({ value: void 0, done: true });
+            extract2.once("close", function() {
+              if (err) reject(err);
+              else resolve14({ value: void 0, done: true });
+            });
+          });
+        }
       }
-      this.write(zipUtil.getShortBytes(name.length));
-      this.write(zipUtil.getShortBytes(extra.length));
-      this.write(name);
-      this.write(extra);
-      ae._offsets.contents = this.offset;
-    };
-    ZipArchiveOutputStream.prototype.getComment = function(comment) {
-      return this._archive.comment !== null ? this._archive.comment : "";
-    };
-    ZipArchiveOutputStream.prototype.isZip64 = function() {
-      return this._archive.forceZip64 || this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC;
     };
-    ZipArchiveOutputStream.prototype.setComment = function(comment) {
-      this._archive.comment = comment;
+    module2.exports = function extract2(opts) {
+      return new Extract(opts);
     };
+    function noop3() {
+    }
+    function overflow(size) {
+      size &= 511;
+      return size && 512 - size;
+    }
   }
 });
 
-// node_modules/compress-commons/lib/compress-commons.js
-var require_compress_commons = __commonJS({
-  "node_modules/compress-commons/lib/compress-commons.js"(exports2, module2) {
-    module2.exports = {
-      ArchiveEntry: require_archive_entry(),
-      ZipArchiveEntry: require_zip_archive_entry(),
-      ArchiveOutputStream: require_archive_output_stream(),
-      ZipArchiveOutputStream: require_zip_archive_output_stream()
+// node_modules/tar-stream/constants.js
+var require_constants14 = __commonJS({
+  "node_modules/tar-stream/constants.js"(exports2, module2) {
+    var constants = {
+      // just for envs without fs
+      S_IFMT: 61440,
+      S_IFDIR: 16384,
+      S_IFCHR: 8192,
+      S_IFBLK: 24576,
+      S_IFIFO: 4096,
+      S_IFLNK: 40960
     };
+    try {
+      module2.exports = require("fs").constants || constants;
+    } catch {
+      module2.exports = constants;
+    }
   }
 });
 
-// node_modules/zip-stream/index.js
-var require_zip_stream = __commonJS({
-  "node_modules/zip-stream/index.js"(exports2, module2) {
-    var inherits = require("util").inherits;
-    var ZipArchiveOutputStream = require_compress_commons().ZipArchiveOutputStream;
-    var ZipArchiveEntry = require_compress_commons().ZipArchiveEntry;
-    var util = require_archiver_utils();
-    var ZipStream = module2.exports = function(options) {
-      if (!(this instanceof ZipStream)) {
-        return new ZipStream(options);
+// node_modules/tar-stream/pack.js
+var require_pack = __commonJS({
+  "node_modules/tar-stream/pack.js"(exports2, module2) {
+    var { Readable: Readable3, Writable, getStreamError } = require_streamx();
+    var b4a = require_b4a();
+    var constants = require_constants14();
+    var headers = require_headers2();
+    var DMODE = 493;
+    var FMODE = 420;
+    var END_OF_TAR = b4a.alloc(1024);
+    var Sink = class extends Writable {
+      constructor(pack, header, callback) {
+        super({ mapWritable, eagerOpen: true });
+        this.written = 0;
+        this.header = header;
+        this._callback = callback;
+        this._linkname = null;
+        this._isLinkname = header.type === "symlink" && !header.linkname;
+        this._isVoid = header.type !== "file" && header.type !== "contiguous-file";
+        this._finished = false;
+        this._pack = pack;
+        this._openCallback = null;
+        if (this._pack._stream === null) this._pack._stream = this;
+        else this._pack._pending.push(this);
       }
-      options = this.options = options || {};
-      options.zlib = options.zlib || {};
-      ZipArchiveOutputStream.call(this, options);
-      if (typeof options.level === "number" && options.level >= 0) {
-        options.zlib.level = options.level;
-        delete options.level;
+      _open(cb) {
+        this._openCallback = cb;
+        if (this._pack._stream === this) this._continueOpen();
       }
-      if (!options.forceZip64 && typeof options.zlib.level === "number" && options.zlib.level === 0) {
-        options.store = true;
+      _continuePack(err) {
+        if (this._callback === null) return;
+        const callback = this._callback;
+        this._callback = null;
+        callback(err);
       }
-      options.namePrependSlash = options.namePrependSlash || false;
-      if (options.comment && options.comment.length > 0) {
-        this.setComment(options.comment);
+      _continueOpen() {
+        if (this._pack._stream === null) this._pack._stream = this;
+        const cb = this._openCallback;
+        this._openCallback = null;
+        if (cb === null) return;
+        if (this._pack.destroying) return cb(new Error("pack stream destroyed"));
+        if (this._pack._finalized) return cb(new Error("pack stream is already finalized"));
+        this._pack._stream = this;
+        if (!this._isLinkname) {
+          this._pack._encode(this.header);
+        }
+        if (this._isVoid) {
+          this._finish();
+          this._continuePack(null);
+        }
+        cb(null);
       }
-    };
-    inherits(ZipStream, ZipArchiveOutputStream);
-    ZipStream.prototype._normalizeFileData = function(data) {
-      data = util.defaults(data, {
-        type: "file",
-        name: null,
-        namePrependSlash: this.options.namePrependSlash,
-        linkname: null,
-        date: null,
-        mode: null,
-        store: this.options.store,
-        comment: ""
-      });
-      var isDir = data.type === "directory";
-      var isSymlink = data.type === "symlink";
-      if (data.name) {
-        data.name = util.sanitizePath(data.name);
-        if (!isSymlink && data.name.slice(-1) === "/") {
-          isDir = true;
-          data.type = "directory";
-        } else if (isDir) {
-          data.name += "/";
+      _write(data, cb) {
+        if (this._isLinkname) {
+          this._linkname = this._linkname ? b4a.concat([this._linkname, data]) : data;
+          return cb(null);
+        }
+        if (this._isVoid) {
+          if (data.byteLength > 0) {
+            return cb(new Error("No body allowed for this entry"));
+          }
+          return cb();
         }
+        this.written += data.byteLength;
+        if (this._pack.push(data)) return cb();
+        this._pack._drain = cb;
       }
-      if (isDir || isSymlink) {
-        data.store = true;
+      _finish() {
+        if (this._finished) return;
+        this._finished = true;
+        if (this._isLinkname) {
+          this.header.linkname = this._linkname ? b4a.toString(this._linkname, "utf-8") : "";
+          this._pack._encode(this.header);
+        }
+        overflow(this._pack, this.header.size);
+        this._pack._done(this);
       }
-      data.date = util.dateify(data.date);
-      return data;
-    };
-    ZipStream.prototype.entry = function(source, data, callback) {
-      if (typeof callback !== "function") {
-        callback = this._emitErrorCallback.bind(this);
+      _final(cb) {
+        if (this.written !== this.header.size) {
+          return cb(new Error("Size mismatch"));
+        }
+        this._finish();
+        cb(null);
       }
-      data = this._normalizeFileData(data);
-      if (data.type !== "file" && data.type !== "directory" && data.type !== "symlink") {
-        callback(new Error(data.type + " entries not currently supported"));
-        return;
+      _getError() {
+        return getStreamError(this) || new Error("tar entry destroyed");
       }
-      if (typeof data.name !== "string" || data.name.length === 0) {
-        callback(new Error("entry name must be a non-empty string value"));
-        return;
+      _predestroy() {
+        this._pack.destroy(this._getError());
       }
-      if (data.type === "symlink" && typeof data.linkname !== "string") {
-        callback(new Error("entry linkname must be a non-empty string value when type equals symlink"));
-        return;
+      _destroy(cb) {
+        this._pack._done(this);
+        this._continuePack(this._finished ? null : this._getError());
+        cb();
       }
-      var entry = new ZipArchiveEntry(data.name);
-      entry.setTime(data.date, this.options.forceLocalTime);
-      if (data.namePrependSlash) {
-        entry.setName(data.name, true);
+    };
+    var Pack = class extends Readable3 {
+      constructor(opts) {
+        super(opts);
+        this._drain = noop3;
+        this._finalized = false;
+        this._finalizing = false;
+        this._pending = [];
+        this._stream = null;
       }
-      if (data.store) {
-        entry.setMethod(0);
+      entry(header, buffer, callback) {
+        if (this._finalized || this.destroying) throw new Error("already finalized or destroyed");
+        if (typeof buffer === "function") {
+          callback = buffer;
+          buffer = null;
+        }
+        if (!callback) callback = noop3;
+        if (!header.size || header.type === "symlink") header.size = 0;
+        if (!header.type) header.type = modeToType(header.mode);
+        if (!header.mode) header.mode = header.type === "directory" ? DMODE : FMODE;
+        if (!header.uid) header.uid = 0;
+        if (!header.gid) header.gid = 0;
+        if (!header.mtime) header.mtime = /* @__PURE__ */ new Date();
+        if (typeof buffer === "string") buffer = b4a.from(buffer);
+        const sink = new Sink(this, header, callback);
+        if (b4a.isBuffer(buffer)) {
+          header.size = buffer.byteLength;
+          sink.write(buffer);
+          sink.end();
+          return sink;
+        }
+        if (sink._isVoid) {
+          return sink;
+        }
+        return sink;
       }
-      if (data.comment.length > 0) {
-        entry.setComment(data.comment);
+      finalize() {
+        if (this._stream || this._pending.length > 0) {
+          this._finalizing = true;
+          return;
+        }
+        if (this._finalized) return;
+        this._finalized = true;
+        this.push(END_OF_TAR);
+        this.push(null);
       }
-      if (data.type === "symlink" && typeof data.mode !== "number") {
-        data.mode = 40960;
+      _done(stream2) {
+        if (stream2 !== this._stream) return;
+        this._stream = null;
+        if (this._finalizing) this.finalize();
+        if (this._pending.length) this._pending.shift()._continueOpen();
       }
-      if (typeof data.mode === "number") {
-        if (data.type === "symlink") {
-          data.mode |= 40960;
+      _encode(header) {
+        if (!header.pax) {
+          const buf = headers.encode(header);
+          if (buf) {
+            this.push(buf);
+            return;
+          }
         }
-        entry.setUnixMode(data.mode);
+        this._encodePax(header);
       }
-      if (data.type === "symlink" && typeof data.linkname === "string") {
-        source = Buffer.from(data.linkname);
+      _encodePax(header) {
+        const paxHeader = headers.encodePax({
+          name: header.name,
+          linkname: header.linkname,
+          pax: header.pax
+        });
+        const newHeader = {
+          name: "PaxHeader",
+          mode: header.mode,
+          uid: header.uid,
+          gid: header.gid,
+          size: paxHeader.byteLength,
+          mtime: header.mtime,
+          type: "pax-header",
+          linkname: header.linkname && "PaxHeader",
+          uname: header.uname,
+          gname: header.gname,
+          devmajor: header.devmajor,
+          devminor: header.devminor
+        };
+        this.push(headers.encode(newHeader));
+        this.push(paxHeader);
+        overflow(this, paxHeader.byteLength);
+        newHeader.size = header.size;
+        newHeader.type = header.type;
+        this.push(headers.encode(newHeader));
+      }
+      _doDrain() {
+        const drain = this._drain;
+        this._drain = noop3;
+        drain();
+      }
+      _predestroy() {
+        const err = getStreamError(this);
+        if (this._stream) this._stream.destroy(err);
+        while (this._pending.length) {
+          const stream2 = this._pending.shift();
+          stream2.destroy(err);
+          stream2._continueOpen();
+        }
+        this._doDrain();
+      }
+      _read(cb) {
+        this._doDrain();
+        cb();
       }
-      return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback);
     };
-    ZipStream.prototype.finalize = function() {
-      this.finish();
+    module2.exports = function pack(opts) {
+      return new Pack(opts);
     };
+    function modeToType(mode) {
+      switch (mode & constants.S_IFMT) {
+        case constants.S_IFBLK:
+          return "block-device";
+        case constants.S_IFCHR:
+          return "character-device";
+        case constants.S_IFDIR:
+          return "directory";
+        case constants.S_IFIFO:
+          return "fifo";
+        case constants.S_IFLNK:
+          return "symlink";
+      }
+      return "file";
+    }
+    function noop3() {
+    }
+    function overflow(self2, size) {
+      size &= 511;
+      if (size) self2.push(END_OF_TAR.subarray(0, 512 - size));
+    }
+    function mapWritable(buf) {
+      return b4a.isBuffer(buf) ? buf : b4a.from(buf);
+    }
   }
 });
 
-// node_modules/archiver/lib/plugins/zip.js
-var require_zip = __commonJS({
-  "node_modules/archiver/lib/plugins/zip.js"(exports2, module2) {
-    var engine = require_zip_stream();
-    var util = require_archiver_utils();
-    var Zip = function(options) {
-      if (!(this instanceof Zip)) {
-        return new Zip(options);
-      }
-      options = this.options = util.defaults(options, {
-        comment: "",
-        forceUTC: false,
-        namePrependSlash: false,
-        store: false
+// node_modules/tar-stream/index.js
+var require_tar_stream = __commonJS({
+  "node_modules/tar-stream/index.js"(exports2) {
+    exports2.extract = require_extract();
+    exports2.pack = require_pack();
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/archiver/lib/plugins/tar.js
+var require_tar2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/lib/plugins/tar.js"(exports2, module2) {
+    var zlib3 = require("zlib");
+    var engine2 = require_tar_stream();
+    var util3 = require_archiver_utils();
+    var Tar2 = function(options) {
+      if (!(this instanceof Tar2)) {
+        return new Tar2(options);
+      }
+      options = this.options = util3.defaults(options, {
+        gzip: false
       });
+      if (typeof options.gzipOptions !== "object") {
+        options.gzipOptions = {};
+      }
       this.supports = {
         directory: true,
         symlink: true
       };
-      this.engine = new engine(options);
+      this.engine = engine2.pack(options);
+      this.compressor = false;
+      if (options.gzip) {
+        this.compressor = zlib3.createGzip(options.gzipOptions);
+        this.compressor.on("error", this._onCompressorError.bind(this));
+      }
     };
-    Zip.prototype.append = function(source, data, callback) {
-      this.engine.entry(source, data, callback);
+    Tar2.prototype._onCompressorError = function(err) {
+      this.engine.emit("error", err);
+    };
+    Tar2.prototype.append = function(source, data, callback) {
+      var self2 = this;
+      data.mtime = data.date;
+      function append(err, sourceBuffer) {
+        if (err) {
+          callback(err);
+          return;
+        }
+        self2.engine.entry(data, sourceBuffer, function(err2) {
+          callback(err2, data);
+        });
+      }
+      if (data.sourceType === "buffer") {
+        append(null, source);
+      } else if (data.sourceType === "stream" && data.stats) {
+        data.size = data.stats.size;
+        var entry = self2.engine.entry(data, function(err) {
+          callback(err, data);
+        });
+        source.pipe(entry);
+      } else if (data.sourceType === "stream") {
+        util3.collectStream(source, append);
+      }
     };
-    Zip.prototype.finalize = function() {
+    Tar2.prototype.finalize = function() {
       this.engine.finalize();
     };
-    Zip.prototype.on = function() {
+    Tar2.prototype.on = function() {
       return this.engine.on.apply(this.engine, arguments);
     };
-    Zip.prototype.pipe = function() {
-      return this.engine.pipe.apply(this.engine, arguments);
-    };
-    Zip.prototype.unpipe = function() {
-      return this.engine.unpipe.apply(this.engine, arguments);
-    };
-    module2.exports = Zip;
-  }
-});
-
-// node_modules/queue-tick/queue-microtask.js
-var require_queue_microtask = __commonJS({
-  "node_modules/queue-tick/queue-microtask.js"(exports2, module2) {
-    module2.exports = typeof queueMicrotask === "function" ? queueMicrotask : (fn) => Promise.resolve().then(fn);
-  }
-});
-
-// node_modules/queue-tick/process-next-tick.js
-var require_process_next_tick = __commonJS({
-  "node_modules/queue-tick/process-next-tick.js"(exports2, module2) {
-    module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask();
-  }
-});
-
-// node_modules/fast-fifo/fixed-size.js
-var require_fixed_size = __commonJS({
-  "node_modules/fast-fifo/fixed-size.js"(exports2, module2) {
-    module2.exports = class FixedFIFO {
-      constructor(hwm) {
-        if (!(hwm > 0) || (hwm - 1 & hwm) !== 0) throw new Error("Max size for a FixedFIFO should be a power of two");
-        this.buffer = new Array(hwm);
-        this.mask = hwm - 1;
-        this.top = 0;
-        this.btm = 0;
-        this.next = null;
-      }
-      clear() {
-        this.top = this.btm = 0;
-        this.next = null;
-        this.buffer.fill(void 0);
-      }
-      push(data) {
-        if (this.buffer[this.top] !== void 0) return false;
-        this.buffer[this.top] = data;
-        this.top = this.top + 1 & this.mask;
-        return true;
-      }
-      shift() {
-        const last = this.buffer[this.btm];
-        if (last === void 0) return void 0;
-        this.buffer[this.btm] = void 0;
-        this.btm = this.btm + 1 & this.mask;
-        return last;
-      }
-      peek() {
-        return this.buffer[this.btm];
-      }
-      isEmpty() {
-        return this.buffer[this.btm] === void 0;
+    Tar2.prototype.pipe = function(destination, options) {
+      if (this.compressor) {
+        return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options);
+      } else {
+        return this.engine.pipe.apply(this.engine, arguments);
       }
     };
-  }
-});
-
-// node_modules/fast-fifo/index.js
-var require_fast_fifo = __commonJS({
-  "node_modules/fast-fifo/index.js"(exports2, module2) {
-    var FixedFIFO = require_fixed_size();
-    module2.exports = class FastFIFO {
-      constructor(hwm) {
-        this.hwm = hwm || 16;
-        this.head = new FixedFIFO(this.hwm);
-        this.tail = this.head;
-        this.length = 0;
-      }
-      clear() {
-        this.head = this.tail;
-        this.head.clear();
-        this.length = 0;
-      }
-      push(val) {
-        this.length++;
-        if (!this.head.push(val)) {
-          const prev = this.head;
-          this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length);
-          this.head.push(val);
-        }
-      }
-      shift() {
-        if (this.length !== 0) this.length--;
-        const val = this.tail.shift();
-        if (val === void 0 && this.tail.next) {
-          const next = this.tail.next;
-          this.tail.next = null;
-          this.tail = next;
-          return this.tail.shift();
-        }
-        return val;
-      }
-      peek() {
-        const val = this.tail.peek();
-        if (val === void 0 && this.tail.next) return this.tail.next.peek();
-        return val;
-      }
-      isEmpty() {
-        return this.length === 0;
+    Tar2.prototype.unpipe = function() {
+      if (this.compressor) {
+        return this.compressor.unpipe.apply(this.compressor, arguments);
+      } else {
+        return this.engine.unpipe.apply(this.engine, arguments);
       }
     };
+    module2.exports = Tar2;
   }
 });
 
-// node_modules/b4a/index.js
-var require_b4a = __commonJS({
-  "node_modules/b4a/index.js"(exports2, module2) {
-    function isBuffer(value) {
-      return Buffer.isBuffer(value) || value instanceof Uint8Array;
-    }
-    function isEncoding(encoding) {
-      return Buffer.isEncoding(encoding);
-    }
-    function alloc(size, fill2, encoding) {
-      return Buffer.alloc(size, fill2, encoding);
-    }
-    function allocUnsafe(size) {
-      return Buffer.allocUnsafe(size);
-    }
-    function allocUnsafeSlow(size) {
-      return Buffer.allocUnsafeSlow(size);
-    }
-    function byteLength(string2, encoding) {
-      return Buffer.byteLength(string2, encoding);
+// node_modules/buffer-crc32/dist/index.cjs
+var require_dist6 = __commonJS({
+  "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) {
+    "use strict";
+    function getDefaultExportFromCjs(x) {
+      return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
     }
-    function compare3(a, b) {
-      return Buffer.compare(a, b);
-    }
-    function concat(buffers, totalLength) {
-      return Buffer.concat(buffers, totalLength);
-    }
-    function copy(source, target, targetStart, start, end) {
-      return toBuffer(source).copy(target, targetStart, start, end);
-    }
-    function equals2(a, b) {
-      return toBuffer(a).equals(b);
-    }
-    function fill(buffer, value, offset, end, encoding) {
-      return toBuffer(buffer).fill(value, offset, end, encoding);
-    }
-    function from(value, encodingOrOffset, length) {
-      return Buffer.from(value, encodingOrOffset, length);
-    }
-    function includes(buffer, value, byteOffset, encoding) {
-      return toBuffer(buffer).includes(value, byteOffset, encoding);
-    }
-    function indexOf(buffer, value, byfeOffset, encoding) {
-      return toBuffer(buffer).indexOf(value, byfeOffset, encoding);
-    }
-    function lastIndexOf(buffer, value, byteOffset, encoding) {
-      return toBuffer(buffer).lastIndexOf(value, byteOffset, encoding);
-    }
-    function swap16(buffer) {
-      return toBuffer(buffer).swap16();
-    }
-    function swap32(buffer) {
-      return toBuffer(buffer).swap32();
-    }
-    function swap64(buffer) {
-      return toBuffer(buffer).swap64();
-    }
-    function toBuffer(buffer) {
-      if (Buffer.isBuffer(buffer)) return buffer;
-      return Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
-    }
-    function toString3(buffer, encoding, start, end) {
-      return toBuffer(buffer).toString(encoding, start, end);
-    }
-    function write(buffer, string2, offset, length, encoding) {
-      return toBuffer(buffer).write(string2, offset, length, encoding);
-    }
-    function writeDoubleLE(buffer, value, offset) {
-      return toBuffer(buffer).writeDoubleLE(value, offset);
-    }
-    function writeFloatLE(buffer, value, offset) {
-      return toBuffer(buffer).writeFloatLE(value, offset);
-    }
-    function writeUInt32LE(buffer, value, offset) {
-      return toBuffer(buffer).writeUInt32LE(value, offset);
-    }
-    function writeInt32LE(buffer, value, offset) {
-      return toBuffer(buffer).writeInt32LE(value, offset);
-    }
-    function readDoubleLE(buffer, offset) {
-      return toBuffer(buffer).readDoubleLE(offset);
-    }
-    function readFloatLE(buffer, offset) {
-      return toBuffer(buffer).readFloatLE(offset);
-    }
-    function readUInt32LE(buffer, offset) {
-      return toBuffer(buffer).readUInt32LE(offset);
-    }
-    function readInt32LE(buffer, offset) {
-      return toBuffer(buffer).readInt32LE(offset);
-    }
-    function writeDoubleBE(buffer, value, offset) {
-      return toBuffer(buffer).writeDoubleBE(value, offset);
-    }
-    function writeFloatBE(buffer, value, offset) {
-      return toBuffer(buffer).writeFloatBE(value, offset);
-    }
-    function writeUInt32BE(buffer, value, offset) {
-      return toBuffer(buffer).writeUInt32BE(value, offset);
-    }
-    function writeInt32BE(buffer, value, offset) {
-      return toBuffer(buffer).writeInt32BE(value, offset);
-    }
-    function readDoubleBE(buffer, offset) {
-      return toBuffer(buffer).readDoubleBE(offset);
+    var CRC_TABLE2 = new Int32Array([
+      0,
+      1996959894,
+      3993919788,
+      2567524794,
+      124634137,
+      1886057615,
+      3915621685,
+      2657392035,
+      249268274,
+      2044508324,
+      3772115230,
+      2547177864,
+      162941995,
+      2125561021,
+      3887607047,
+      2428444049,
+      498536548,
+      1789927666,
+      4089016648,
+      2227061214,
+      450548861,
+      1843258603,
+      4107580753,
+      2211677639,
+      325883990,
+      1684777152,
+      4251122042,
+      2321926636,
+      335633487,
+      1661365465,
+      4195302755,
+      2366115317,
+      997073096,
+      1281953886,
+      3579855332,
+      2724688242,
+      1006888145,
+      1258607687,
+      3524101629,
+      2768942443,
+      901097722,
+      1119000684,
+      3686517206,
+      2898065728,
+      853044451,
+      1172266101,
+      3705015759,
+      2882616665,
+      651767980,
+      1373503546,
+      3369554304,
+      3218104598,
+      565507253,
+      1454621731,
+      3485111705,
+      3099436303,
+      671266974,
+      1594198024,
+      3322730930,
+      2970347812,
+      795835527,
+      1483230225,
+      3244367275,
+      3060149565,
+      1994146192,
+      31158534,
+      2563907772,
+      4023717930,
+      1907459465,
+      112637215,
+      2680153253,
+      3904427059,
+      2013776290,
+      251722036,
+      2517215374,
+      3775830040,
+      2137656763,
+      141376813,
+      2439277719,
+      3865271297,
+      1802195444,
+      476864866,
+      2238001368,
+      4066508878,
+      1812370925,
+      453092731,
+      2181625025,
+      4111451223,
+      1706088902,
+      314042704,
+      2344532202,
+      4240017532,
+      1658658271,
+      366619977,
+      2362670323,
+      4224994405,
+      1303535960,
+      984961486,
+      2747007092,
+      3569037538,
+      1256170817,
+      1037604311,
+      2765210733,
+      3554079995,
+      1131014506,
+      879679996,
+      2909243462,
+      3663771856,
+      1141124467,
+      855842277,
+      2852801631,
+      3708648649,
+      1342533948,
+      654459306,
+      3188396048,
+      3373015174,
+      1466479909,
+      544179635,
+      3110523913,
+      3462522015,
+      1591671054,
+      702138776,
+      2966460450,
+      3352799412,
+      1504918807,
+      783551873,
+      3082640443,
+      3233442989,
+      3988292384,
+      2596254646,
+      62317068,
+      1957810842,
+      3939845945,
+      2647816111,
+      81470997,
+      1943803523,
+      3814918930,
+      2489596804,
+      225274430,
+      2053790376,
+      3826175755,
+      2466906013,
+      167816743,
+      2097651377,
+      4027552580,
+      2265490386,
+      503444072,
+      1762050814,
+      4150417245,
+      2154129355,
+      426522225,
+      1852507879,
+      4275313526,
+      2312317920,
+      282753626,
+      1742555852,
+      4189708143,
+      2394877945,
+      397917763,
+      1622183637,
+      3604390888,
+      2714866558,
+      953729732,
+      1340076626,
+      3518719985,
+      2797360999,
+      1068828381,
+      1219638859,
+      3624741850,
+      2936675148,
+      906185462,
+      1090812512,
+      3747672003,
+      2825379669,
+      829329135,
+      1181335161,
+      3412177804,
+      3160834842,
+      628085408,
+      1382605366,
+      3423369109,
+      3138078467,
+      570562233,
+      1426400815,
+      3317316542,
+      2998733608,
+      733239954,
+      1555261956,
+      3268935591,
+      3050360625,
+      752459403,
+      1541320221,
+      2607071920,
+      3965973030,
+      1969922972,
+      40735498,
+      2617837225,
+      3943577151,
+      1913087877,
+      83908371,
+      2512341634,
+      3803740692,
+      2075208622,
+      213261112,
+      2463272603,
+      3855990285,
+      2094854071,
+      198958881,
+      2262029012,
+      4057260610,
+      1759359992,
+      534414190,
+      2176718541,
+      4139329115,
+      1873836001,
+      414664567,
+      2282248934,
+      4279200368,
+      1711684554,
+      285281116,
+      2405801727,
+      4167216745,
+      1634467795,
+      376229701,
+      2685067896,
+      3608007406,
+      1308918612,
+      956543938,
+      2808555105,
+      3495958263,
+      1231636301,
+      1047427035,
+      2932959818,
+      3654703836,
+      1088359270,
+      936918e3,
+      2847714899,
+      3736837829,
+      1202900863,
+      817233897,
+      3183342108,
+      3401237130,
+      1404277552,
+      615818150,
+      3134207493,
+      3453421203,
+      1423857449,
+      601450431,
+      3009837614,
+      3294710456,
+      1567103746,
+      711928724,
+      3020668471,
+      3272380065,
+      1510334235,
+      755167117
+    ]);
+    function ensureBuffer2(input) {
+      if (Buffer.isBuffer(input)) {
+        return input;
+      }
+      if (typeof input === "number") {
+        return Buffer.alloc(input);
+      } else if (typeof input === "string") {
+        return Buffer.from(input);
+      } else {
+        throw new Error("input must be buffer, number, or string, received " + typeof input);
+      }
     }
-    function readFloatBE(buffer, offset) {
-      return toBuffer(buffer).readFloatBE(offset);
+    function bufferizeInt2(num) {
+      const tmp = ensureBuffer2(4);
+      tmp.writeInt32BE(num, 0);
+      return tmp;
     }
-    function readUInt32BE(buffer, offset) {
-      return toBuffer(buffer).readUInt32BE(offset);
+    function _crc322(buf, previous) {
+      buf = ensureBuffer2(buf);
+      if (Buffer.isBuffer(previous)) {
+        previous = previous.readUInt32BE(0);
+      }
+      let crc = ~~previous ^ -1;
+      for (var n = 0; n < buf.length; n++) {
+        crc = CRC_TABLE2[(crc ^ buf[n]) & 255] ^ crc >>> 8;
+      }
+      return crc ^ -1;
     }
-    function readInt32BE(buffer, offset) {
-      return toBuffer(buffer).readInt32BE(offset);
+    function crc325() {
+      return bufferizeInt2(_crc322.apply(null, arguments));
     }
-    module2.exports = {
-      isBuffer,
-      isEncoding,
-      alloc,
-      allocUnsafe,
-      allocUnsafeSlow,
-      byteLength,
-      compare: compare3,
-      concat,
-      copy,
-      equals: equals2,
-      fill,
-      from,
-      includes,
-      indexOf,
-      lastIndexOf,
-      swap16,
-      swap32,
-      swap64,
-      toBuffer,
-      toString: toString3,
-      write,
-      writeDoubleLE,
-      writeFloatLE,
-      writeUInt32LE,
-      writeInt32LE,
-      readDoubleLE,
-      readFloatLE,
-      readUInt32LE,
-      readInt32LE,
-      writeDoubleBE,
-      writeFloatBE,
-      writeUInt32BE,
-      writeInt32BE,
-      readDoubleBE,
-      readFloatBE,
-      readUInt32BE,
-      readInt32BE
+    crc325.signed = function() {
+      return _crc322.apply(null, arguments);
     };
-  }
-});
-
-// node_modules/text-decoder/lib/pass-through-decoder.js
-var require_pass_through_decoder = __commonJS({
-  "node_modules/text-decoder/lib/pass-through-decoder.js"(exports2, module2) {
-    var b4a = require_b4a();
-    module2.exports = class PassThroughDecoder {
-      constructor(encoding) {
-        this.encoding = encoding;
-      }
-      get remaining() {
-        return 0;
-      }
-      decode(tail) {
-        return b4a.toString(tail, this.encoding);
-      }
-      flush() {
-        return "";
-      }
+    crc325.unsigned = function() {
+      return _crc322.apply(null, arguments) >>> 0;
     };
+    var bufferCrc32 = crc325;
+    var index2 = /* @__PURE__ */ getDefaultExportFromCjs(bufferCrc32);
+    module2.exports = index2;
   }
 });
 
-// node_modules/text-decoder/lib/utf8-decoder.js
-var require_utf8_decoder = __commonJS({
-  "node_modules/text-decoder/lib/utf8-decoder.js"(exports2, module2) {
-    var b4a = require_b4a();
-    module2.exports = class UTF8Decoder {
-      constructor() {
-        this.codePoint = 0;
-        this.bytesSeen = 0;
-        this.bytesNeeded = 0;
-        this.lowerBoundary = 128;
-        this.upperBoundary = 191;
-      }
-      get remaining() {
-        return this.bytesSeen;
-      }
-      decode(data) {
-        if (this.bytesNeeded === 0) {
-          let isBoundary = true;
-          for (let i = Math.max(0, data.byteLength - 4), n = data.byteLength; i < n && isBoundary; i++) {
-            isBoundary = data[i] <= 127;
-          }
-          if (isBoundary) return b4a.toString(data, "utf8");
-        }
-        let result = "";
-        for (let i = 0, n = data.byteLength; i < n; i++) {
-          const byte = data[i];
-          if (this.bytesNeeded === 0) {
-            if (byte <= 127) {
-              result += String.fromCharCode(byte);
-            } else {
-              this.bytesSeen = 1;
-              if (byte >= 194 && byte <= 223) {
-                this.bytesNeeded = 2;
-                this.codePoint = byte & 31;
-              } else if (byte >= 224 && byte <= 239) {
-                if (byte === 224) this.lowerBoundary = 160;
-                else if (byte === 237) this.upperBoundary = 159;
-                this.bytesNeeded = 3;
-                this.codePoint = byte & 15;
-              } else if (byte >= 240 && byte <= 244) {
-                if (byte === 240) this.lowerBoundary = 144;
-                if (byte === 244) this.upperBoundary = 143;
-                this.bytesNeeded = 4;
-                this.codePoint = byte & 7;
-              } else {
-                result += "\uFFFD";
-              }
-            }
-            continue;
-          }
-          if (byte < this.lowerBoundary || byte > this.upperBoundary) {
-            this.codePoint = 0;
-            this.bytesNeeded = 0;
-            this.bytesSeen = 0;
-            this.lowerBoundary = 128;
-            this.upperBoundary = 191;
-            result += "\uFFFD";
-            continue;
-          }
-          this.lowerBoundary = 128;
-          this.upperBoundary = 191;
-          this.codePoint = this.codePoint << 6 | byte & 63;
-          this.bytesSeen++;
-          if (this.bytesSeen !== this.bytesNeeded) continue;
-          result += String.fromCodePoint(this.codePoint);
-          this.codePoint = 0;
-          this.bytesNeeded = 0;
-          this.bytesSeen = 0;
+// node_modules/@actions/artifact/node_modules/archiver/lib/plugins/json.js
+var require_json = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/lib/plugins/json.js"(exports2, module2) {
+    var inherits = require("util").inherits;
+    var Transform5 = require_ours().Transform;
+    var crc325 = require_dist6();
+    var util3 = require_archiver_utils();
+    var Json2 = function(options) {
+      if (!(this instanceof Json2)) {
+        return new Json2(options);
+      }
+      options = this.options = util3.defaults(options, {});
+      Transform5.call(this, options);
+      this.supports = {
+        directory: true,
+        symlink: true
+      };
+      this.files = [];
+    };
+    inherits(Json2, Transform5);
+    Json2.prototype._transform = function(chunk, encoding, callback) {
+      callback(null, chunk);
+    };
+    Json2.prototype._writeStringified = function() {
+      var fileString = JSON.stringify(this.files);
+      this.write(fileString);
+    };
+    Json2.prototype.append = function(source, data, callback) {
+      var self2 = this;
+      data.crc32 = 0;
+      function onend(err, sourceBuffer) {
+        if (err) {
+          callback(err);
+          return;
         }
-        return result;
+        data.size = sourceBuffer.length || 0;
+        data.crc32 = crc325.unsigned(sourceBuffer);
+        self2.files.push(data);
+        callback(null, data);
       }
-      flush() {
-        const result = this.bytesNeeded > 0 ? "\uFFFD" : "";
-        this.codePoint = 0;
-        this.bytesNeeded = 0;
-        this.bytesSeen = 0;
-        this.lowerBoundary = 128;
-        this.upperBoundary = 191;
-        return result;
+      if (data.sourceType === "buffer") {
+        onend(null, source);
+      } else if (data.sourceType === "stream") {
+        util3.collectStream(source, onend);
       }
     };
+    Json2.prototype.finalize = function() {
+      this._writeStringified();
+      this.end();
+    };
+    module2.exports = Json2;
   }
 });
 
-// node_modules/text-decoder/index.js
-var require_text_decoder = __commonJS({
-  "node_modules/text-decoder/index.js"(exports2, module2) {
-    var PassThroughDecoder = require_pass_through_decoder();
-    var UTF8Decoder = require_utf8_decoder();
-    module2.exports = class TextDecoder {
-      constructor(encoding = "utf8") {
-        this.encoding = normalizeEncoding(encoding);
-        switch (this.encoding) {
-          case "utf8":
-            this.decoder = new UTF8Decoder();
-            break;
-          case "utf16le":
-          case "base64":
-            throw new Error("Unsupported encoding: " + this.encoding);
-          default:
-            this.decoder = new PassThroughDecoder(this.encoding);
-        }
-      }
-      get remaining() {
-        return this.decoder.remaining;
+// node_modules/@actions/artifact/node_modules/archiver/index.js
+var require_archiver = __commonJS({
+  "node_modules/@actions/artifact/node_modules/archiver/index.js"(exports2, module2) {
+    var Archiver2 = require_core2();
+    var formats = {};
+    var vending = function(format, options) {
+      return vending.create(format, options);
+    };
+    vending.create = function(format, options) {
+      if (formats[format]) {
+        var instance = new Archiver2(format, options);
+        instance.setFormat(format);
+        instance.setModule(new formats[format](options));
+        return instance;
+      } else {
+        throw new Error("create(" + format + "): format not registered");
       }
-      push(data) {
-        if (typeof data === "string") return data;
-        return this.decoder.decode(data);
+    };
+    vending.registerFormat = function(format, module3) {
+      if (formats[format]) {
+        throw new Error("register(" + format + "): format already registered");
       }
-      // For Node.js compatibility
-      write(data) {
-        return this.push(data);
+      if (typeof module3 !== "function") {
+        throw new Error("register(" + format + "): format module invalid");
       }
-      end(data) {
-        let result = "";
-        if (data) result = this.push(data);
-        result += this.decoder.flush();
-        return result;
+      if (typeof module3.prototype.append !== "function" || typeof module3.prototype.finalize !== "function") {
+        throw new Error("register(" + format + "): format module missing methods");
       }
+      formats[format] = module3;
     };
-    function normalizeEncoding(encoding) {
-      encoding = encoding.toLowerCase();
-      switch (encoding) {
-        case "utf8":
-        case "utf-8":
-          return "utf8";
-        case "ucs2":
-        case "ucs-2":
-        case "utf16le":
-        case "utf-16le":
-          return "utf16le";
-        case "latin1":
-        case "binary":
-          return "latin1";
-        case "base64":
-        case "ascii":
-        case "hex":
-          return encoding;
-        default:
-          throw new Error("Unknown encoding: " + encoding);
+    vending.isRegisteredFormat = function(format) {
+      if (formats[format]) {
+        return true;
       }
-    }
+      return false;
+    };
+    vending.registerFormat("zip", require_zip());
+    vending.registerFormat("tar", require_tar2());
+    vending.registerFormat("json", require_json());
+    module2.exports = vending;
   }
 });
 
-// node_modules/streamx/index.js
-var require_streamx = __commonJS({
-  "node_modules/streamx/index.js"(exports2, module2) {
-    var { EventEmitter } = require("events");
-    var STREAM_DESTROYED = new Error("Stream was destroyed");
-    var PREMATURE_CLOSE = new Error("Premature close");
-    var queueTick = require_process_next_tick();
-    var FIFO = require_fast_fifo();
-    var TextDecoder2 = require_text_decoder();
-    var MAX = (1 << 29) - 1;
-    var OPENING = 1;
-    var PREDESTROYING = 2;
-    var DESTROYING = 4;
-    var DESTROYED = 8;
-    var NOT_OPENING = MAX ^ OPENING;
-    var NOT_PREDESTROYING = MAX ^ PREDESTROYING;
-    var READ_ACTIVE = 1 << 4;
-    var READ_UPDATING = 2 << 4;
-    var READ_PRIMARY = 4 << 4;
-    var READ_QUEUED = 8 << 4;
-    var READ_RESUMED = 16 << 4;
-    var READ_PIPE_DRAINED = 32 << 4;
-    var READ_ENDING = 64 << 4;
-    var READ_EMIT_DATA = 128 << 4;
-    var READ_EMIT_READABLE = 256 << 4;
-    var READ_EMITTED_READABLE = 512 << 4;
-    var READ_DONE = 1024 << 4;
-    var READ_NEXT_TICK = 2048 << 4;
-    var READ_NEEDS_PUSH = 4096 << 4;
-    var READ_READ_AHEAD = 8192 << 4;
-    var READ_FLOWING = READ_RESUMED | READ_PIPE_DRAINED;
-    var READ_ACTIVE_AND_NEEDS_PUSH = READ_ACTIVE | READ_NEEDS_PUSH;
-    var READ_PRIMARY_AND_ACTIVE = READ_PRIMARY | READ_ACTIVE;
-    var READ_EMIT_READABLE_AND_QUEUED = READ_EMIT_READABLE | READ_QUEUED;
-    var READ_RESUMED_READ_AHEAD = READ_RESUMED | READ_READ_AHEAD;
-    var READ_NOT_ACTIVE = MAX ^ READ_ACTIVE;
-    var READ_NON_PRIMARY = MAX ^ READ_PRIMARY;
-    var READ_NON_PRIMARY_AND_PUSHED = MAX ^ (READ_PRIMARY | READ_NEEDS_PUSH);
-    var READ_PUSHED = MAX ^ READ_NEEDS_PUSH;
-    var READ_PAUSED = MAX ^ READ_RESUMED;
-    var READ_NOT_QUEUED = MAX ^ (READ_QUEUED | READ_EMITTED_READABLE);
-    var READ_NOT_ENDING = MAX ^ READ_ENDING;
-    var READ_PIPE_NOT_DRAINED = MAX ^ READ_FLOWING;
-    var READ_NOT_NEXT_TICK = MAX ^ READ_NEXT_TICK;
-    var READ_NOT_UPDATING = MAX ^ READ_UPDATING;
-    var READ_NO_READ_AHEAD = MAX ^ READ_READ_AHEAD;
-    var READ_PAUSED_NO_READ_AHEAD = MAX ^ READ_RESUMED_READ_AHEAD;
-    var WRITE_ACTIVE = 1 << 18;
-    var WRITE_UPDATING = 2 << 18;
-    var WRITE_PRIMARY = 4 << 18;
-    var WRITE_QUEUED = 8 << 18;
-    var WRITE_UNDRAINED = 16 << 18;
-    var WRITE_DONE = 32 << 18;
-    var WRITE_EMIT_DRAIN = 64 << 18;
-    var WRITE_NEXT_TICK = 128 << 18;
-    var WRITE_WRITING = 256 << 18;
-    var WRITE_FINISHING = 512 << 18;
-    var WRITE_CORKED = 1024 << 18;
-    var WRITE_NOT_ACTIVE = MAX ^ (WRITE_ACTIVE | WRITE_WRITING);
-    var WRITE_NON_PRIMARY = MAX ^ WRITE_PRIMARY;
-    var WRITE_NOT_FINISHING = MAX ^ WRITE_FINISHING;
-    var WRITE_DRAINED = MAX ^ WRITE_UNDRAINED;
-    var WRITE_NOT_QUEUED = MAX ^ WRITE_QUEUED;
-    var WRITE_NOT_NEXT_TICK = MAX ^ WRITE_NEXT_TICK;
-    var WRITE_NOT_UPDATING = MAX ^ WRITE_UPDATING;
-    var WRITE_NOT_CORKED = MAX ^ WRITE_CORKED;
-    var ACTIVE = READ_ACTIVE | WRITE_ACTIVE;
-    var NOT_ACTIVE = MAX ^ ACTIVE;
-    var DONE = READ_DONE | WRITE_DONE;
-    var DESTROY_STATUS = DESTROYING | DESTROYED | PREDESTROYING;
-    var OPEN_STATUS = DESTROY_STATUS | OPENING;
-    var AUTO_DESTROY = DESTROY_STATUS | DONE;
-    var NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY;
-    var ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK;
-    var TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE;
-    var IS_OPENING = OPEN_STATUS | TICKING;
-    var READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE;
-    var READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED;
-    var READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED;
-    var READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE;
-    var SHOULD_NOT_READ = OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH | READ_READ_AHEAD;
-    var READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE;
-    var READ_UPDATE_SYNC_STATUS = READ_UPDATING | OPEN_STATUS | READ_NEXT_TICK | READ_PRIMARY;
-    var WRITE_PRIMARY_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_DONE;
-    var WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED;
-    var WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE;
-    var WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE;
-    var WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED;
-    var WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE;
-    var WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING;
-    var WRITE_FINISHING_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_QUEUED_AND_ACTIVE | WRITE_DONE;
-    var WRITE_BACKPRESSURE_STATUS = WRITE_UNDRAINED | DESTROY_STATUS | WRITE_FINISHING | WRITE_DONE;
-    var WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY;
-    var asyncIterator = Symbol.asyncIterator || /* @__PURE__ */ Symbol("asyncIterator");
-    var WritableState = class {
-      constructor(stream2, { highWaterMark = 16384, map: map2 = null, mapWritable, byteLength, byteLengthWritable } = {}) {
-        this.stream = stream2;
-        this.queue = new FIFO();
-        this.highWaterMark = highWaterMark;
-        this.buffered = 0;
-        this.error = null;
-        this.pipeline = null;
-        this.drains = null;
-        this.byteLength = byteLengthWritable || byteLength || defaultByteLength;
-        this.map = mapWritable || map2;
-        this.afterWrite = afterWrite.bind(this);
-        this.afterUpdateNextTick = updateWriteNT.bind(this);
-      }
-      get ended() {
-        return (this.stream._duplexState & WRITE_DONE) !== 0;
-      }
-      push(data) {
-        if (this.map !== null) data = this.map(data);
-        this.buffered += this.byteLength(data);
-        this.queue.push(data);
-        if (this.buffered < this.highWaterMark) {
-          this.stream._duplexState |= WRITE_QUEUED;
-          return true;
-        }
-        this.stream._duplexState |= WRITE_QUEUED_AND_UNDRAINED;
-        return false;
-      }
-      shift() {
-        const data = this.queue.shift();
-        this.buffered -= this.byteLength(data);
-        if (this.buffered === 0) this.stream._duplexState &= WRITE_NOT_QUEUED;
-        return data;
+// node_modules/@actions/artifact/lib/internal/upload/zip.js
+var require_zip2 = __commonJS({
+  "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) {
+    "use strict";
+    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      var desc = Object.getOwnPropertyDescriptor(m, k);
+      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() {
+          return m[k];
+        } };
       }
-      end(data) {
-        if (typeof data === "function") this.stream.once("finish", data);
-        else if (data !== void 0 && data !== null) this.push(data);
-        this.stream._duplexState = (this.stream._duplexState | WRITE_FINISHING) & WRITE_NON_PRIMARY;
+      Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      o[k2] = m[k];
+    }));
+    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
+      Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+      o["default"] = v;
+    });
+    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
+      if (mod && mod.__esModule) return mod;
+      var result = {};
+      if (mod != null) {
+        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
       }
-      autoBatch(data, cb) {
-        const buffer = [];
-        const stream2 = this.stream;
-        buffer.push(data);
-        while ((stream2._duplexState & WRITE_STATUS) === WRITE_QUEUED_AND_ACTIVE) {
-          buffer.push(stream2._writableState.shift());
-        }
-        if ((stream2._duplexState & OPEN_STATUS) !== 0) return cb(null);
-        stream2._writev(buffer, cb);
+      __setModuleDefault2(result, mod);
+      return result;
+    };
+    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
+      function adopt(value) {
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
+        });
       }
-      update() {
-        const stream2 = this.stream;
-        stream2._duplexState |= WRITE_UPDATING;
-        do {
-          while ((stream2._duplexState & WRITE_STATUS) === WRITE_QUEUED) {
-            const data = this.shift();
-            stream2._duplexState |= WRITE_ACTIVE_AND_WRITING;
-            stream2._write(data, this.afterWrite);
+      return new (P || (P = Promise))(function(resolve14, reject) {
+        function fulfilled(value) {
+          try {
+            step(generator.next(value));
+          } catch (e) {
+            reject(e);
           }
-          if ((stream2._duplexState & WRITE_PRIMARY_AND_ACTIVE) === 0) this.updateNonPrimary();
-        } while (this.continueUpdate() === true);
-        stream2._duplexState &= WRITE_NOT_UPDATING;
-      }
-      updateNonPrimary() {
-        const stream2 = this.stream;
-        if ((stream2._duplexState & WRITE_FINISHING_STATUS) === WRITE_FINISHING) {
-          stream2._duplexState = (stream2._duplexState | WRITE_ACTIVE) & WRITE_NOT_FINISHING;
-          stream2._final(afterFinal.bind(this));
-          return;
         }
-        if ((stream2._duplexState & DESTROY_STATUS) === DESTROYING) {
-          if ((stream2._duplexState & ACTIVE_OR_TICKING) === 0) {
-            stream2._duplexState |= ACTIVE;
-            stream2._destroy(afterDestroy.bind(this));
+        function rejected(value) {
+          try {
+            step(generator["throw"](value));
+          } catch (e) {
+            reject(e);
           }
-          return;
         }
-        if ((stream2._duplexState & IS_OPENING) === OPENING) {
-          stream2._duplexState = (stream2._duplexState | ACTIVE) & NOT_OPENING;
-          stream2._open(afterOpen.bind(this));
+        function step(result) {
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+      });
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.createZipUploadStream = exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0;
+    var stream2 = __importStar2(require("stream"));
+    var promises_1 = require("fs/promises");
+    var archiver = __importStar2(require_archiver());
+    var core31 = __importStar2(require_core());
+    var config_1 = require_config2();
+    exports2.DEFAULT_COMPRESSION_LEVEL = 6;
+    var ZipUploadStream = class extends stream2.Transform {
+      constructor(bufferSize) {
+        super({
+          highWaterMark: bufferSize
+        });
       }
-      continueUpdate() {
-        if ((this.stream._duplexState & WRITE_NEXT_TICK) === 0) return false;
-        this.stream._duplexState &= WRITE_NOT_NEXT_TICK;
-        return true;
-      }
-      updateCallback() {
-        if ((this.stream._duplexState & WRITE_UPDATE_SYNC_STATUS) === WRITE_PRIMARY) this.update();
-        else this.updateNextTick();
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      _transform(chunk, enc, cb) {
+        cb(null, chunk);
       }
-      updateNextTick() {
-        if ((this.stream._duplexState & WRITE_NEXT_TICK) !== 0) return;
-        this.stream._duplexState |= WRITE_NEXT_TICK;
-        if ((this.stream._duplexState & WRITE_UPDATING) === 0) queueTick(this.afterUpdateNextTick);
+    };
+    exports2.ZipUploadStream = ZipUploadStream;
+    function createZipUploadStream(uploadSpecification_1) {
+      return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) {
+        core31.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`);
+        const zip = archiver.create("zip", {
+          highWaterMark: (0, config_1.getUploadChunkSize)(),
+          zlib: { level: compressionLevel }
+        });
+        zip.on("error", zipErrorCallback);
+        zip.on("warning", zipWarningCallback);
+        zip.on("finish", zipFinishCallback);
+        zip.on("end", zipEndCallback);
+        for (const file of uploadSpecification) {
+          if (file.sourcePath !== null) {
+            let sourcePath = file.sourcePath;
+            if (file.stats.isSymbolicLink()) {
+              sourcePath = yield (0, promises_1.realpath)(file.sourcePath);
+            }
+            zip.file(sourcePath, {
+              name: file.destinationPath
+            });
+          } else {
+            zip.append("", { name: file.destinationPath });
+          }
+        }
+        const bufferSize = (0, config_1.getUploadChunkSize)();
+        const zipUploadStream = new ZipUploadStream(bufferSize);
+        core31.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`);
+        core31.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`);
+        zip.pipe(zipUploadStream);
+        zip.finalize();
+        return zipUploadStream;
+      });
+    }
+    exports2.createZipUploadStream = createZipUploadStream;
+    var zipErrorCallback = (error3) => {
+      core31.error("An error has occurred while creating the zip file for upload");
+      core31.info(error3);
+      throw new Error("An error has occurred during zip creation for the artifact");
+    };
+    var zipWarningCallback = (error3) => {
+      if (error3.code === "ENOENT") {
+        core31.warning("ENOENT warning during artifact zip creation. No such file or directory");
+        core31.info(error3);
+      } else {
+        core31.warning(`A non-blocking warning has occurred during artifact zip creation: ${error3.code}`);
+        core31.info(error3);
       }
     };
-    var ReadableState = class {
-      constructor(stream2, { highWaterMark = 16384, map: map2 = null, mapReadable, byteLength, byteLengthReadable } = {}) {
-        this.stream = stream2;
-        this.queue = new FIFO();
-        this.highWaterMark = highWaterMark === 0 ? 1 : highWaterMark;
-        this.buffered = 0;
-        this.readAhead = highWaterMark > 0;
-        this.error = null;
-        this.pipeline = null;
-        this.byteLength = byteLengthReadable || byteLength || defaultByteLength;
-        this.map = mapReadable || map2;
-        this.pipeTo = null;
-        this.afterRead = afterRead.bind(this);
-        this.afterUpdateNextTick = updateReadNT.bind(this);
+    var zipFinishCallback = () => {
+      core31.debug("Zip stream for upload has finished.");
+    };
+    var zipEndCallback = () => {
+      core31.debug("Zip stream for upload has ended.");
+    };
+  }
+});
+
+// node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js
+var require_upload_artifact = __commonJS({
+  "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) {
+    "use strict";
+    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      var desc = Object.getOwnPropertyDescriptor(m, k);
+      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() {
+          return m[k];
+        } };
       }
-      get ended() {
-        return (this.stream._duplexState & READ_DONE) !== 0;
+      Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      o[k2] = m[k];
+    }));
+    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
+      Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+      o["default"] = v;
+    });
+    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
+      if (mod && mod.__esModule) return mod;
+      var result = {};
+      if (mod != null) {
+        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
       }
-      pipe(pipeTo, cb) {
-        if (this.pipeTo !== null) throw new Error("Can only pipe to one destination");
-        if (typeof cb !== "function") cb = null;
-        this.stream._duplexState |= READ_PIPE_DRAINED;
-        this.pipeTo = pipeTo;
-        this.pipeline = new Pipeline(this.stream, pipeTo, cb);
-        if (cb) this.stream.on("error", noop3);
-        if (isStreamx(pipeTo)) {
-          pipeTo._writableState.pipeline = this.pipeline;
-          if (cb) pipeTo.on("error", noop3);
-          pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline));
-        } else {
-          const onerror = this.pipeline.done.bind(this.pipeline, pipeTo);
-          const onclose = this.pipeline.done.bind(this.pipeline, pipeTo, null);
-          pipeTo.on("error", onerror);
-          pipeTo.on("close", onclose);
-          pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline));
-        }
-        pipeTo.on("drain", afterDrain.bind(this));
-        this.stream.emit("piping", pipeTo);
-        pipeTo.emit("pipe", this.stream);
+      __setModuleDefault2(result, mod);
+      return result;
+    };
+    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
+      function adopt(value) {
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
+        });
       }
-      push(data) {
-        const stream2 = this.stream;
-        if (data === null) {
-          this.highWaterMark = 0;
-          stream2._duplexState = (stream2._duplexState | READ_ENDING) & READ_NON_PRIMARY_AND_PUSHED;
-          return false;
-        }
-        if (this.map !== null) {
-          data = this.map(data);
-          if (data === null) {
-            stream2._duplexState &= READ_PUSHED;
-            return this.buffered < this.highWaterMark;
+      return new (P || (P = Promise))(function(resolve14, reject) {
+        function fulfilled(value) {
+          try {
+            step(generator.next(value));
+          } catch (e) {
+            reject(e);
           }
         }
-        this.buffered += this.byteLength(data);
-        this.queue.push(data);
-        stream2._duplexState = (stream2._duplexState | READ_QUEUED) & READ_PUSHED;
-        return this.buffered < this.highWaterMark;
-      }
-      shift() {
-        const data = this.queue.shift();
-        this.buffered -= this.byteLength(data);
-        if (this.buffered === 0) this.stream._duplexState &= READ_NOT_QUEUED;
-        return data;
-      }
-      unshift(data) {
-        const pending = [this.map !== null ? this.map(data) : data];
-        while (this.buffered > 0) pending.push(this.shift());
-        for (let i = 0; i < pending.length - 1; i++) {
-          const data2 = pending[i];
-          this.buffered += this.byteLength(data2);
-          this.queue.push(data2);
-        }
-        this.push(pending[pending.length - 1]);
-      }
-      read() {
-        const stream2 = this.stream;
-        if ((stream2._duplexState & READ_STATUS) === READ_QUEUED) {
-          const data = this.shift();
-          if (this.pipeTo !== null && this.pipeTo.write(data) === false) stream2._duplexState &= READ_PIPE_NOT_DRAINED;
-          if ((stream2._duplexState & READ_EMIT_DATA) !== 0) stream2.emit("data", data);
-          return data;
+        function rejected(value) {
+          try {
+            step(generator["throw"](value));
+          } catch (e) {
+            reject(e);
+          }
         }
-        if (this.readAhead === false) {
-          stream2._duplexState |= READ_READ_AHEAD;
-          this.updateNextTick();
+        function step(result) {
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
-        return null;
-      }
-      drain() {
-        const stream2 = this.stream;
-        while ((stream2._duplexState & READ_STATUS) === READ_QUEUED && (stream2._duplexState & READ_FLOWING) !== 0) {
-          const data = this.shift();
-          if (this.pipeTo !== null && this.pipeTo.write(data) === false) stream2._duplexState &= READ_PIPE_NOT_DRAINED;
-          if ((stream2._duplexState & READ_EMIT_DATA) !== 0) stream2.emit("data", data);
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+      });
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.uploadArtifact = void 0;
+    var core31 = __importStar2(require_core());
+    var retention_1 = require_retention();
+    var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation();
+    var artifact_twirp_client_1 = require_artifact_twirp_client2();
+    var upload_zip_specification_1 = require_upload_zip_specification();
+    var util_1 = require_util11();
+    var blob_upload_1 = require_blob_upload();
+    var zip_1 = require_zip2();
+    var generated_1 = require_generated();
+    var errors_1 = require_errors3();
+    function uploadArtifact(name, files, rootDirectory, options) {
+      return __awaiter2(this, void 0, void 0, function* () {
+        (0, path_and_artifact_name_validation_1.validateArtifactName)(name);
+        (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory);
+        const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory);
+        if (zipSpecification.length === 0) {
+          throw new errors_1.FilesNotFoundError(zipSpecification.flatMap((s) => s.sourcePath ? [s.sourcePath] : []));
         }
-      }
-      update() {
-        const stream2 = this.stream;
-        stream2._duplexState |= READ_UPDATING;
-        do {
-          this.drain();
-          while (this.buffered < this.highWaterMark && (stream2._duplexState & SHOULD_NOT_READ) === READ_READ_AHEAD) {
-            stream2._duplexState |= READ_ACTIVE_AND_NEEDS_PUSH;
-            stream2._read(this.afterRead);
-            this.drain();
-          }
-          if ((stream2._duplexState & READ_READABLE_STATUS) === READ_EMIT_READABLE_AND_QUEUED) {
-            stream2._duplexState |= READ_EMITTED_READABLE;
-            stream2.emit("readable");
-          }
-          if ((stream2._duplexState & READ_PRIMARY_AND_ACTIVE) === 0) this.updateNonPrimary();
-        } while (this.continueUpdate() === true);
-        stream2._duplexState &= READ_NOT_UPDATING;
-      }
-      updateNonPrimary() {
-        const stream2 = this.stream;
-        if ((stream2._duplexState & READ_ENDING_STATUS) === READ_ENDING) {
-          stream2._duplexState = (stream2._duplexState | READ_DONE) & READ_NOT_ENDING;
-          stream2.emit("end");
-          if ((stream2._duplexState & AUTO_DESTROY) === DONE) stream2._duplexState |= DESTROYING;
-          if (this.pipeTo !== null) this.pipeTo.end();
+        const backendIds = (0, util_1.getBackendIdsFromToken)();
+        const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
+        const createArtifactReq = {
+          workflowRunBackendId: backendIds.workflowRunBackendId,
+          workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
+          name,
+          version: 4
+        };
+        const expiresAt = (0, retention_1.getExpiration)(options === null || options === void 0 ? void 0 : options.retentionDays);
+        if (expiresAt) {
+          createArtifactReq.expiresAt = expiresAt;
         }
-        if ((stream2._duplexState & DESTROY_STATUS) === DESTROYING) {
-          if ((stream2._duplexState & ACTIVE_OR_TICKING) === 0) {
-            stream2._duplexState |= ACTIVE;
-            stream2._destroy(afterDestroy.bind(this));
-          }
-          return;
+        const createArtifactResp = yield artifactClient.CreateArtifact(createArtifactReq);
+        if (!createArtifactResp.ok) {
+          throw new errors_1.InvalidResponseError("CreateArtifact: response from backend was not ok");
         }
-        if ((stream2._duplexState & IS_OPENING) === OPENING) {
-          stream2._duplexState = (stream2._duplexState | ACTIVE) & NOT_OPENING;
-          stream2._open(afterOpen.bind(this));
+        const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel);
+        const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream);
+        const finalizeArtifactReq = {
+          workflowRunBackendId: backendIds.workflowRunBackendId,
+          workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
+          name,
+          size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : "0"
+        };
+        if (uploadResult.sha256Hash) {
+          finalizeArtifactReq.hash = generated_1.StringValue.create({
+            value: `sha256:${uploadResult.sha256Hash}`
+          });
         }
+        core31.info(`Finalizing artifact upload`);
+        const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq);
+        if (!finalizeArtifactResp.ok) {
+          throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok");
+        }
+        const artifactId = BigInt(finalizeArtifactResp.artifactId);
+        core31.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
+        return {
+          size: uploadResult.uploadSize,
+          digest: uploadResult.sha256Hash,
+          id: Number(artifactId)
+        };
+      });
+    }
+    exports2.uploadArtifact = uploadArtifact;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@actions/github/lib/context.js
+var require_context2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@actions/github/lib/context.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.Context = void 0;
+    var fs_1 = require("fs");
+    var os_1 = require("os");
+    var Context = class {
+      /**
+       * Hydrate the context from the environment
+       */
+      constructor() {
+        var _a2, _b, _c;
+        this.payload = {};
+        if (process.env.GITHUB_EVENT_PATH) {
+          if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {
+            this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" }));
+          } else {
+            const path29 = process.env.GITHUB_EVENT_PATH;
+            process.stdout.write(`GITHUB_EVENT_PATH ${path29} does not exist${os_1.EOL}`);
+          }
+        }
+        this.eventName = process.env.GITHUB_EVENT_NAME;
+        this.sha = process.env.GITHUB_SHA;
+        this.ref = process.env.GITHUB_REF;
+        this.workflow = process.env.GITHUB_WORKFLOW;
+        this.action = process.env.GITHUB_ACTION;
+        this.actor = process.env.GITHUB_ACTOR;
+        this.job = process.env.GITHUB_JOB;
+        this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
+        this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
+        this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
+        this.apiUrl = (_a2 = process.env.GITHUB_API_URL) !== null && _a2 !== void 0 ? _a2 : `https://api.github.com`;
+        this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
+        this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
       }
-      continueUpdate() {
-        if ((this.stream._duplexState & READ_NEXT_TICK) === 0) return false;
-        this.stream._duplexState &= READ_NOT_NEXT_TICK;
-        return true;
-      }
-      updateCallback() {
-        if ((this.stream._duplexState & READ_UPDATE_SYNC_STATUS) === READ_PRIMARY) this.update();
-        else this.updateNextTick();
-      }
-      updateNextTick() {
-        if ((this.stream._duplexState & READ_NEXT_TICK) !== 0) return;
-        this.stream._duplexState |= READ_NEXT_TICK;
-        if ((this.stream._duplexState & READ_UPDATING) === 0) queueTick(this.afterUpdateNextTick);
+      get issue() {
+        const payload = this.payload;
+        return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
       }
-    };
-    var TransformState = class {
-      constructor(stream2) {
-        this.data = null;
-        this.afterTransform = afterTransform.bind(stream2);
-        this.afterFinal = null;
+      get repo() {
+        if (process.env.GITHUB_REPOSITORY) {
+          const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
+          return { owner, repo };
+        }
+        if (this.payload.repository) {
+          return {
+            owner: this.payload.repository.owner.login,
+            repo: this.payload.repository.name
+          };
+        }
+        throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
       }
     };
-    var Pipeline = class {
-      constructor(src, dst, cb) {
-        this.from = src;
-        this.to = dst;
-        this.afterPipe = cb;
-        this.error = null;
-        this.pipeToFinished = false;
-      }
-      finished() {
-        this.pipeToFinished = true;
+    exports2.Context = Context;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js
+var require_proxy2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.checkBypass = exports2.getProxyUrl = void 0;
+    function getProxyUrl(reqUrl) {
+      const usingSsl = reqUrl.protocol === "https:";
+      if (checkBypass(reqUrl)) {
+        return void 0;
       }
-      done(stream2, err) {
-        if (err) this.error = err;
-        if (stream2 === this.to) {
-          this.to = null;
-          if (this.from !== null) {
-            if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) {
-              this.from.destroy(this.error || new Error("Writable stream closed prematurely"));
-            }
-            return;
-          }
+      const proxyVar = (() => {
+        if (usingSsl) {
+          return process.env["https_proxy"] || process.env["HTTPS_PROXY"];
+        } else {
+          return process.env["http_proxy"] || process.env["HTTP_PROXY"];
         }
-        if (stream2 === this.from) {
-          this.from = null;
-          if (this.to !== null) {
-            if ((stream2._duplexState & READ_DONE) === 0) {
-              this.to.destroy(this.error || new Error("Readable stream closed before ending"));
-            }
-            return;
-          }
+      })();
+      if (proxyVar) {
+        try {
+          return new DecodedURL(proxyVar);
+        } catch (_a2) {
+          if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
+            return new DecodedURL(`http://${proxyVar}`);
         }
-        if (this.afterPipe !== null) this.afterPipe(this.error);
-        this.to = this.from = this.afterPipe = null;
+      } else {
+        return void 0;
       }
-    };
-    function afterDrain() {
-      this.stream._duplexState |= READ_PIPE_DRAINED;
-      this.updateCallback();
     }
-    function afterFinal(err) {
-      const stream2 = this.stream;
-      if (err) stream2.destroy(err);
-      if ((stream2._duplexState & DESTROY_STATUS) === 0) {
-        stream2._duplexState |= WRITE_DONE;
-        stream2.emit("finish");
+    exports2.getProxyUrl = getProxyUrl;
+    function checkBypass(reqUrl) {
+      if (!reqUrl.hostname) {
+        return false;
       }
-      if ((stream2._duplexState & AUTO_DESTROY) === DONE) {
-        stream2._duplexState |= DESTROYING;
+      const reqHost = reqUrl.hostname;
+      if (isLoopbackAddress(reqHost)) {
+        return true;
       }
-      stream2._duplexState &= WRITE_NOT_ACTIVE;
-      if ((stream2._duplexState & WRITE_UPDATING) === 0) this.update();
-      else this.updateNextTick();
-    }
-    function afterDestroy(err) {
-      const stream2 = this.stream;
-      if (!err && this.error !== STREAM_DESTROYED) err = this.error;
-      if (err) stream2.emit("error", err);
-      stream2._duplexState |= DESTROYED;
-      stream2.emit("close");
-      const rs = stream2._readableState;
-      const ws = stream2._writableState;
-      if (rs !== null && rs.pipeline !== null) rs.pipeline.done(stream2, err);
-      if (ws !== null) {
-        while (ws.drains !== null && ws.drains.length > 0) ws.drains.shift().resolve(false);
-        if (ws.pipeline !== null) ws.pipeline.done(stream2, err);
+      const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || "";
+      if (!noProxy) {
+        return false;
       }
-    }
-    function afterWrite(err) {
-      const stream2 = this.stream;
-      if (err) stream2.destroy(err);
-      stream2._duplexState &= WRITE_NOT_ACTIVE;
-      if (this.drains !== null) tickDrains(this.drains);
-      if ((stream2._duplexState & WRITE_DRAIN_STATUS) === WRITE_UNDRAINED) {
-        stream2._duplexState &= WRITE_DRAINED;
-        if ((stream2._duplexState & WRITE_EMIT_DRAIN) === WRITE_EMIT_DRAIN) {
-          stream2.emit("drain");
+      let reqPort;
+      if (reqUrl.port) {
+        reqPort = Number(reqUrl.port);
+      } else if (reqUrl.protocol === "http:") {
+        reqPort = 80;
+      } else if (reqUrl.protocol === "https:") {
+        reqPort = 443;
+      }
+      const upperReqHosts = [reqUrl.hostname.toUpperCase()];
+      if (typeof reqPort === "number") {
+        upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
+      }
+      for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) {
+        if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) {
+          return true;
         }
       }
-      this.updateCallback();
+      return false;
     }
-    function afterRead(err) {
-      if (err) this.stream.destroy(err);
-      this.stream._duplexState &= READ_NOT_ACTIVE;
-      if (this.readAhead === false && (this.stream._duplexState & READ_RESUMED) === 0) this.stream._duplexState &= READ_NO_READ_AHEAD;
-      this.updateCallback();
+    exports2.checkBypass = checkBypass;
+    function isLoopbackAddress(host) {
+      const hostLower = host.toLowerCase();
+      return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
     }
-    function updateReadNT() {
-      if ((this.stream._duplexState & READ_UPDATING) === 0) {
-        this.stream._duplexState &= READ_NOT_NEXT_TICK;
-        this.update();
+    var DecodedURL = class extends URL {
+      constructor(url2, base) {
+        super(url2, base);
+        this._decodedUsername = decodeURIComponent(super.username);
+        this._decodedPassword = decodeURIComponent(super.password);
       }
-    }
-    function updateWriteNT() {
-      if ((this.stream._duplexState & WRITE_UPDATING) === 0) {
-        this.stream._duplexState &= WRITE_NOT_NEXT_TICK;
-        this.update();
+      get username() {
+        return this._decodedUsername;
       }
-    }
-    function tickDrains(drains) {
-      for (let i = 0; i < drains.length; i++) {
-        if (--drains[i].writes === 0) {
-          drains.shift().resolve(true);
-          i--;
-        }
+      get password() {
+        return this._decodedPassword;
       }
-    }
-    function afterOpen(err) {
-      const stream2 = this.stream;
-      if (err) stream2.destroy(err);
-      if ((stream2._duplexState & DESTROYING) === 0) {
-        if ((stream2._duplexState & READ_PRIMARY_STATUS) === 0) stream2._duplexState |= READ_PRIMARY;
-        if ((stream2._duplexState & WRITE_PRIMARY_STATUS) === 0) stream2._duplexState |= WRITE_PRIMARY;
-        stream2.emit("open");
+    };
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js
+var require_lib4 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) {
+    "use strict";
+    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      var desc = Object.getOwnPropertyDescriptor(m, k);
+      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() {
+          return m[k];
+        } };
       }
-      stream2._duplexState &= NOT_ACTIVE;
-      if (stream2._writableState !== null) {
-        stream2._writableState.updateCallback();
+      Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      o[k2] = m[k];
+    }));
+    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
+      Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+      o["default"] = v;
+    });
+    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
+      if (mod && mod.__esModule) return mod;
+      var result = {};
+      if (mod != null) {
+        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
       }
-      if (stream2._readableState !== null) {
-        stream2._readableState.updateCallback();
+      __setModuleDefault2(result, mod);
+      return result;
+    };
+    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
+      function adopt(value) {
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
+        });
       }
-    }
-    function afterTransform(err, data) {
-      if (data !== void 0 && data !== null) this.push(data);
-      this._writableState.afterWrite(err);
-    }
-    function newListener(name) {
-      if (this._readableState !== null) {
-        if (name === "data") {
-          this._duplexState |= READ_EMIT_DATA | READ_RESUMED_READ_AHEAD;
-          this._readableState.updateNextTick();
+      return new (P || (P = Promise))(function(resolve14, reject) {
+        function fulfilled(value) {
+          try {
+            step(generator.next(value));
+          } catch (e) {
+            reject(e);
+          }
         }
-        if (name === "readable") {
-          this._duplexState |= READ_EMIT_READABLE;
-          this._readableState.updateNextTick();
+        function rejected(value) {
+          try {
+            step(generator["throw"](value));
+          } catch (e) {
+            reject(e);
+          }
         }
-      }
-      if (this._writableState !== null) {
-        if (name === "drain") {
-          this._duplexState |= WRITE_EMIT_DRAIN;
-          this._writableState.updateNextTick();
+        function step(result) {
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
-      }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+      });
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0;
+    var http = __importStar2(require("http"));
+    var https3 = __importStar2(require("https"));
+    var pm = __importStar2(require_proxy2());
+    var tunnel = __importStar2(require_tunnel2());
+    var undici_1 = require_undici();
+    var HttpCodes;
+    (function(HttpCodes2) {
+      HttpCodes2[HttpCodes2["OK"] = 200] = "OK";
+      HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices";
+      HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently";
+      HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved";
+      HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther";
+      HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified";
+      HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy";
+      HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy";
+      HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
+      HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect";
+      HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest";
+      HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized";
+      HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired";
+      HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden";
+      HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound";
+      HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
+      HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable";
+      HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
+      HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout";
+      HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict";
+      HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone";
+      HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests";
+      HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError";
+      HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented";
+      HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
+      HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
+      HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
+    })(HttpCodes || (exports2.HttpCodes = HttpCodes = {}));
+    var Headers;
+    (function(Headers2) {
+      Headers2["Accept"] = "accept";
+      Headers2["ContentType"] = "content-type";
+    })(Headers || (exports2.Headers = Headers = {}));
+    var MediaTypes;
+    (function(MediaTypes2) {
+      MediaTypes2["ApplicationJson"] = "application/json";
+    })(MediaTypes || (exports2.MediaTypes = MediaTypes = {}));
+    function getProxyUrl(serverUrl) {
+      const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
+      return proxyUrl ? proxyUrl.href : "";
     }
-    var Stream = class extends EventEmitter {
-      constructor(opts) {
-        super();
-        this._duplexState = 0;
-        this._readableState = null;
-        this._writableState = null;
-        if (opts) {
-          if (opts.open) this._open = opts.open;
-          if (opts.destroy) this._destroy = opts.destroy;
-          if (opts.predestroy) this._predestroy = opts.predestroy;
-          if (opts.signal) {
-            opts.signal.addEventListener("abort", abort.bind(this));
-          }
-        }
-        this.on("newListener", newListener);
-      }
-      _open(cb) {
-        cb(null);
-      }
-      _destroy(cb) {
-        cb(null);
-      }
-      _predestroy() {
-      }
-      get readable() {
-        return this._readableState !== null ? true : void 0;
+    exports2.getProxyUrl = getProxyUrl;
+    var HttpRedirectCodes = [
+      HttpCodes.MovedPermanently,
+      HttpCodes.ResourceMoved,
+      HttpCodes.SeeOther,
+      HttpCodes.TemporaryRedirect,
+      HttpCodes.PermanentRedirect
+    ];
+    var HttpResponseRetryCodes = [
+      HttpCodes.BadGateway,
+      HttpCodes.ServiceUnavailable,
+      HttpCodes.GatewayTimeout
+    ];
+    var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"];
+    var ExponentialBackoffCeiling = 10;
+    var ExponentialBackoffTimeSlice = 5;
+    var HttpClientError = class _HttpClientError extends Error {
+      constructor(message, statusCode) {
+        super(message);
+        this.name = "HttpClientError";
+        this.statusCode = statusCode;
+        Object.setPrototypeOf(this, _HttpClientError.prototype);
       }
-      get writable() {
-        return this._writableState !== null ? true : void 0;
+    };
+    exports2.HttpClientError = HttpClientError;
+    var HttpClientResponse = class {
+      constructor(message) {
+        this.message = message;
       }
-      get destroyed() {
-        return (this._duplexState & DESTROYED) !== 0;
+      readBody() {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () {
+            let output = Buffer.alloc(0);
+            this.message.on("data", (chunk) => {
+              output = Buffer.concat([output, chunk]);
+            });
+            this.message.on("end", () => {
+              resolve14(output.toString());
+            });
+          }));
+        });
       }
-      get destroying() {
-        return (this._duplexState & DESTROY_STATUS) !== 0;
+      readBodyBuffer() {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () {
+            const chunks = [];
+            this.message.on("data", (chunk) => {
+              chunks.push(chunk);
+            });
+            this.message.on("end", () => {
+              resolve14(Buffer.concat(chunks));
+            });
+          }));
+        });
       }
-      destroy(err) {
-        if ((this._duplexState & DESTROY_STATUS) === 0) {
-          if (!err) err = STREAM_DESTROYED;
-          this._duplexState = (this._duplexState | DESTROYING) & NON_PRIMARY;
-          if (this._readableState !== null) {
-            this._readableState.highWaterMark = 0;
-            this._readableState.error = err;
+    };
+    exports2.HttpClientResponse = HttpClientResponse;
+    function isHttps(requestUrl) {
+      const parsedUrl = new URL(requestUrl);
+      return parsedUrl.protocol === "https:";
+    }
+    exports2.isHttps = isHttps;
+    var HttpClient2 = class {
+      constructor(userAgent2, handlers, requestOptions) {
+        this._ignoreSslError = false;
+        this._allowRedirects = true;
+        this._allowRedirectDowngrade = false;
+        this._maxRedirects = 50;
+        this._allowRetries = false;
+        this._maxRetries = 1;
+        this._keepAlive = false;
+        this._disposed = false;
+        this.userAgent = userAgent2;
+        this.handlers = handlers || [];
+        this.requestOptions = requestOptions;
+        if (requestOptions) {
+          if (requestOptions.ignoreSslError != null) {
+            this._ignoreSslError = requestOptions.ignoreSslError;
           }
-          if (this._writableState !== null) {
-            this._writableState.highWaterMark = 0;
-            this._writableState.error = err;
+          this._socketTimeout = requestOptions.socketTimeout;
+          if (requestOptions.allowRedirects != null) {
+            this._allowRedirects = requestOptions.allowRedirects;
+          }
+          if (requestOptions.allowRedirectDowngrade != null) {
+            this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
+          }
+          if (requestOptions.maxRedirects != null) {
+            this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
+          }
+          if (requestOptions.keepAlive != null) {
+            this._keepAlive = requestOptions.keepAlive;
+          }
+          if (requestOptions.allowRetries != null) {
+            this._allowRetries = requestOptions.allowRetries;
+          }
+          if (requestOptions.maxRetries != null) {
+            this._maxRetries = requestOptions.maxRetries;
           }
-          this._duplexState |= PREDESTROYING;
-          this._predestroy();
-          this._duplexState &= NOT_PREDESTROYING;
-          if (this._readableState !== null) this._readableState.updateNextTick();
-          if (this._writableState !== null) this._writableState.updateNextTick();
         }
       }
-    };
-    var Readable2 = class _Readable extends Stream {
-      constructor(opts) {
-        super(opts);
-        this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD;
-        this._readableState = new ReadableState(this, opts);
-        if (opts) {
-          if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD;
-          if (opts.read) this._read = opts.read;
-          if (opts.eagerOpen) this._readableState.updateNextTick();
-          if (opts.encoding) this.setEncoding(opts.encoding);
-        }
+      options(requestUrl, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("OPTIONS", requestUrl, null, additionalHeaders || {});
+        });
       }
-      setEncoding(encoding) {
-        const dec = new TextDecoder2(encoding);
-        const map2 = this._readableState.map || echo;
-        this._readableState.map = mapOrSkip;
-        return this;
-        function mapOrSkip(data) {
-          const next = dec.push(data);
-          return next === "" && (data.byteLength !== 0 || dec.remaining > 0) ? null : map2(next);
-        }
+      get(requestUrl, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("GET", requestUrl, null, additionalHeaders || {});
+        });
       }
-      _read(cb) {
-        cb(null);
+      del(requestUrl, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("DELETE", requestUrl, null, additionalHeaders || {});
+        });
       }
-      pipe(dest, cb) {
-        this._readableState.updateNextTick();
-        this._readableState.pipe(dest, cb);
-        return dest;
+      post(requestUrl, data, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("POST", requestUrl, data, additionalHeaders || {});
+        });
       }
-      read() {
-        this._readableState.updateNextTick();
-        return this._readableState.read();
+      patch(requestUrl, data, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("PATCH", requestUrl, data, additionalHeaders || {});
+        });
       }
-      push(data) {
-        this._readableState.updateNextTick();
-        return this._readableState.push(data);
+      put(requestUrl, data, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("PUT", requestUrl, data, additionalHeaders || {});
+        });
       }
-      unshift(data) {
-        this._readableState.updateNextTick();
-        return this._readableState.unshift(data);
+      head(requestUrl, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request("HEAD", requestUrl, null, additionalHeaders || {});
+        });
       }
-      resume() {
-        this._duplexState |= READ_RESUMED_READ_AHEAD;
-        this._readableState.updateNextTick();
-        return this;
+      sendStream(verb, requestUrl, stream2, additionalHeaders) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return this.request(verb, requestUrl, stream2, additionalHeaders);
+        });
       }
-      pause() {
-        this._duplexState &= this._readableState.readAhead === false ? READ_PAUSED_NO_READ_AHEAD : READ_PAUSED;
-        return this;
+      /**
+       * Gets a typed object from an endpoint
+       * Be aware that not found returns a null.  Other errors (4xx, 5xx) reject the promise
+       */
+      getJson(requestUrl, additionalHeaders = {}) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+          const res = yield this.get(requestUrl, additionalHeaders);
+          return this._processResponse(res, this.requestOptions);
+        });
       }
-      static _fromAsyncIterator(ite, opts) {
-        let destroy;
-        const rs = new _Readable({
-          ...opts,
-          read(cb) {
-            ite.next().then(push).then(cb.bind(null, null)).catch(cb);
-          },
-          predestroy() {
-            destroy = ite.return();
-          },
-          destroy(cb) {
-            if (!destroy) return cb(null);
-            destroy.then(cb.bind(null, null)).catch(cb);
-          }
+      postJson(requestUrl, obj, additionalHeaders = {}) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          const data = JSON.stringify(obj, null, 2);
+          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
+          const res = yield this.post(requestUrl, data, additionalHeaders);
+          return this._processResponse(res, this.requestOptions);
         });
-        return rs;
-        function push(data) {
-          if (data.done) rs.push(null);
-          else rs.push(data.value);
-        }
       }
-      static from(data, opts) {
-        if (isReadStreamx(data)) return data;
-        if (data[asyncIterator]) return this._fromAsyncIterator(data[asyncIterator](), opts);
-        if (!Array.isArray(data)) data = data === void 0 ? [] : [data];
-        let i = 0;
-        return new _Readable({
-          ...opts,
-          read(cb) {
-            this.push(i === data.length ? null : data[i++]);
-            cb(null);
-          }
+      putJson(requestUrl, obj, additionalHeaders = {}) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          const data = JSON.stringify(obj, null, 2);
+          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
+          const res = yield this.put(requestUrl, data, additionalHeaders);
+          return this._processResponse(res, this.requestOptions);
         });
       }
-      static isBackpressured(rs) {
-        return (rs._duplexState & READ_BACKPRESSURE_STATUS) !== 0 || rs._readableState.buffered >= rs._readableState.highWaterMark;
+      patchJson(requestUrl, obj, additionalHeaders = {}) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          const data = JSON.stringify(obj, null, 2);
+          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
+          const res = yield this.patch(requestUrl, data, additionalHeaders);
+          return this._processResponse(res, this.requestOptions);
+        });
       }
-      static isPaused(rs) {
-        return (rs._duplexState & READ_RESUMED) === 0;
+      /**
+       * Makes a raw http request.
+       * All other methods such as get, post, patch, and request ultimately call this.
+       * Prefer get, del, post and patch
+       */
+      request(verb, requestUrl, data, headers) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          if (this._disposed) {
+            throw new Error("Client has already been disposed.");
+          }
+          const parsedUrl = new URL(requestUrl);
+          let info8 = this._prepareRequest(verb, parsedUrl, headers);
+          const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1;
+          let numTries = 0;
+          let response;
+          do {
+            response = yield this.requestRaw(info8, data);
+            if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
+              let authenticationHandler;
+              for (const handler2 of this.handlers) {
+                if (handler2.canHandleAuthentication(response)) {
+                  authenticationHandler = handler2;
+                  break;
+                }
+              }
+              if (authenticationHandler) {
+                return authenticationHandler.handleAuthentication(this, info8, data);
+              } else {
+                return response;
+              }
+            }
+            let redirectsRemaining = this._maxRedirects;
+            while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) {
+              const redirectUrl = response.message.headers["location"];
+              if (!redirectUrl) {
+                break;
+              }
+              const parsedRedirectUrl = new URL(redirectUrl);
+              if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
+                throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
+              }
+              yield response.readBody();
+              if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
+                for (const header in headers) {
+                  if (header.toLowerCase() === "authorization") {
+                    delete headers[header];
+                  }
+                }
+              }
+              info8 = this._prepareRequest(verb, parsedRedirectUrl, headers);
+              response = yield this.requestRaw(info8, data);
+              redirectsRemaining--;
+            }
+            if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) {
+              return response;
+            }
+            numTries += 1;
+            if (numTries < maxTries) {
+              yield response.readBody();
+              yield this._performExponentialBackoff(numTries);
+            }
+          } while (numTries < maxTries);
+          return response;
+        });
       }
-      [asyncIterator]() {
-        const stream2 = this;
-        let error3 = null;
-        let promiseResolve = null;
-        let promiseReject = null;
-        this.on("error", (err) => {
-          error3 = err;
+      /**
+       * Needs to be called if keepAlive is set to true in request options.
+       */
+      dispose() {
+        if (this._agent) {
+          this._agent.destroy();
+        }
+        this._disposed = true;
+      }
+      /**
+       * Raw request.
+       * @param info
+       * @param data
+       */
+      requestRaw(info8, data) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14, reject) => {
+            function callbackForResult(err, res) {
+              if (err) {
+                reject(err);
+              } else if (!res) {
+                reject(new Error("Unknown error"));
+              } else {
+                resolve14(res);
+              }
+            }
+            this.requestRawWithCallback(info8, data, callbackForResult);
+          });
         });
-        this.on("readable", onreadable);
-        this.on("close", onclose);
-        return {
-          [asyncIterator]() {
-            return this;
-          },
-          next() {
-            return new Promise(function(resolve13, reject) {
-              promiseResolve = resolve13;
-              promiseReject = reject;
-              const data = stream2.read();
-              if (data !== null) ondata(data);
-              else if ((stream2._duplexState & DESTROYED) !== 0) ondata(null);
-            });
-          },
-          return() {
-            return destroy(null);
-          },
-          throw(err) {
-            return destroy(err);
+      }
+      /**
+       * Raw request with callback.
+       * @param info
+       * @param data
+       * @param onResult
+       */
+      requestRawWithCallback(info8, data, onResult) {
+        if (typeof data === "string") {
+          if (!info8.options.headers) {
+            info8.options.headers = {};
           }
-        };
-        function onreadable() {
-          if (promiseResolve !== null) ondata(stream2.read());
+          info8.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8");
         }
-        function onclose() {
-          if (promiseResolve !== null) ondata(null);
+        let callbackCalled = false;
+        function handleResult(err, res) {
+          if (!callbackCalled) {
+            callbackCalled = true;
+            onResult(err, res);
+          }
         }
-        function ondata(data) {
-          if (promiseReject === null) return;
-          if (error3) promiseReject(error3);
-          else if (data === null && (stream2._duplexState & READ_DONE) === 0) promiseReject(STREAM_DESTROYED);
-          else promiseResolve({ value: data, done: data === null });
-          promiseReject = promiseResolve = null;
+        const req = info8.httpModule.request(info8.options, (msg) => {
+          const res = new HttpClientResponse(msg);
+          handleResult(void 0, res);
+        });
+        let socket;
+        req.on("socket", (sock) => {
+          socket = sock;
+        });
+        req.setTimeout(this._socketTimeout || 3 * 6e4, () => {
+          if (socket) {
+            socket.end();
+          }
+          handleResult(new Error(`Request timeout: ${info8.options.path}`));
+        });
+        req.on("error", function(err) {
+          handleResult(err);
+        });
+        if (data && typeof data === "string") {
+          req.write(data, "utf8");
         }
-        function destroy(err) {
-          stream2.destroy(err);
-          return new Promise((resolve13, reject) => {
-            if (stream2._duplexState & DESTROYED) return resolve13({ value: void 0, done: true });
-            stream2.once("close", function() {
-              if (err) reject(err);
-              else resolve13({ value: void 0, done: true });
-            });
+        if (data && typeof data !== "string") {
+          data.on("close", function() {
+            req.end();
           });
+          data.pipe(req);
+        } else {
+          req.end();
         }
       }
-    };
-    var Writable = class extends Stream {
-      constructor(opts) {
-        super(opts);
-        this._duplexState |= OPENING | READ_DONE;
-        this._writableState = new WritableState(this, opts);
-        if (opts) {
-          if (opts.writev) this._writev = opts.writev;
-          if (opts.write) this._write = opts.write;
-          if (opts.final) this._final = opts.final;
-          if (opts.eagerOpen) this._writableState.updateNextTick();
-        }
-      }
-      cork() {
-        this._duplexState |= WRITE_CORKED;
-      }
-      uncork() {
-        this._duplexState &= WRITE_NOT_CORKED;
-        this._writableState.updateNextTick();
-      }
-      _writev(batch, cb) {
-        cb(null);
-      }
-      _write(data, cb) {
-        this._writableState.autoBatch(data, cb);
-      }
-      _final(cb) {
-        cb(null);
-      }
-      static isBackpressured(ws) {
-        return (ws._duplexState & WRITE_BACKPRESSURE_STATUS) !== 0;
-      }
-      static drained(ws) {
-        if (ws.destroyed) return Promise.resolve(false);
-        const state = ws._writableState;
-        const pending = isWritev(ws) ? Math.min(1, state.queue.length) : state.queue.length;
-        const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0);
-        if (writes === 0) return Promise.resolve(true);
-        if (state.drains === null) state.drains = [];
-        return new Promise((resolve13) => {
-          state.drains.push({ writes, resolve: resolve13 });
-        });
-      }
-      write(data) {
-        this._writableState.updateNextTick();
-        return this._writableState.push(data);
-      }
-      end(data) {
-        this._writableState.updateNextTick();
-        this._writableState.end(data);
-        return this;
+      /**
+       * Gets an http agent. This function is useful when you need an http agent that handles
+       * routing through a proxy server - depending upon the url and proxy environment variables.
+       * @param serverUrl  The server URL where the request will be sent. For example, https://api.github.com
+       */
+      getAgent(serverUrl) {
+        const parsedUrl = new URL(serverUrl);
+        return this._getAgent(parsedUrl);
       }
-    };
-    var Duplex = class extends Readable2 {
-      // and Writable
-      constructor(opts) {
-        super(opts);
-        this._duplexState = OPENING | this._duplexState & READ_READ_AHEAD;
-        this._writableState = new WritableState(this, opts);
-        if (opts) {
-          if (opts.writev) this._writev = opts.writev;
-          if (opts.write) this._write = opts.write;
-          if (opts.final) this._final = opts.final;
+      getAgentDispatcher(serverUrl) {
+        const parsedUrl = new URL(serverUrl);
+        const proxyUrl = pm.getProxyUrl(parsedUrl);
+        const useProxy = proxyUrl && proxyUrl.hostname;
+        if (!useProxy) {
+          return;
         }
+        return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
       }
-      cork() {
-        this._duplexState |= WRITE_CORKED;
+      _prepareRequest(method, requestUrl, headers) {
+        const info8 = {};
+        info8.parsedUrl = requestUrl;
+        const usingSsl = info8.parsedUrl.protocol === "https:";
+        info8.httpModule = usingSsl ? https3 : http;
+        const defaultPort = usingSsl ? 443 : 80;
+        info8.options = {};
+        info8.options.host = info8.parsedUrl.hostname;
+        info8.options.port = info8.parsedUrl.port ? parseInt(info8.parsedUrl.port) : defaultPort;
+        info8.options.path = (info8.parsedUrl.pathname || "") + (info8.parsedUrl.search || "");
+        info8.options.method = method;
+        info8.options.headers = this._mergeHeaders(headers);
+        if (this.userAgent != null) {
+          info8.options.headers["user-agent"] = this.userAgent;
+        }
+        info8.options.agent = this._getAgent(info8.parsedUrl);
+        if (this.handlers) {
+          for (const handler2 of this.handlers) {
+            handler2.prepareRequest(info8.options);
+          }
+        }
+        return info8;
       }
-      uncork() {
-        this._duplexState &= WRITE_NOT_CORKED;
-        this._writableState.updateNextTick();
+      _mergeHeaders(headers) {
+        if (this.requestOptions && this.requestOptions.headers) {
+          return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {}));
+        }
+        return lowercaseKeys2(headers || {});
       }
-      _writev(batch, cb) {
-        cb(null);
+      _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
+        let clientHeader;
+        if (this.requestOptions && this.requestOptions.headers) {
+          clientHeader = lowercaseKeys2(this.requestOptions.headers)[header];
+        }
+        return additionalHeaders[header] || clientHeader || _default;
       }
-      _write(data, cb) {
-        this._writableState.autoBatch(data, cb);
-      }
-      _final(cb) {
-        cb(null);
-      }
-      write(data) {
-        this._writableState.updateNextTick();
-        return this._writableState.push(data);
-      }
-      end(data) {
-        this._writableState.updateNextTick();
-        this._writableState.end(data);
-        return this;
-      }
-    };
-    var Transform = class extends Duplex {
-      constructor(opts) {
-        super(opts);
-        this._transformState = new TransformState(this);
-        if (opts) {
-          if (opts.transform) this._transform = opts.transform;
-          if (opts.flush) this._flush = opts.flush;
+      _getAgent(parsedUrl) {
+        let agent;
+        const proxyUrl = pm.getProxyUrl(parsedUrl);
+        const useProxy = proxyUrl && proxyUrl.hostname;
+        if (this._keepAlive && useProxy) {
+          agent = this._proxyAgent;
         }
-      }
-      _write(data, cb) {
-        if (this._readableState.buffered >= this._readableState.highWaterMark) {
-          this._transformState.data = data;
-        } else {
-          this._transform(data, this._transformState.afterTransform);
+        if (!useProxy) {
+          agent = this._agent;
         }
-      }
-      _read(cb) {
-        if (this._transformState.data !== null) {
-          const data = this._transformState.data;
-          this._transformState.data = null;
-          cb(null);
-          this._transform(data, this._transformState.afterTransform);
-        } else {
-          cb(null);
+        if (agent) {
+          return agent;
         }
-      }
-      destroy(err) {
-        super.destroy(err);
-        if (this._transformState.data !== null) {
-          this._transformState.data = null;
-          this._transformState.afterTransform();
+        const usingSsl = parsedUrl.protocol === "https:";
+        let maxSockets = 100;
+        if (this.requestOptions) {
+          maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
+        }
+        if (proxyUrl && proxyUrl.hostname) {
+          const agentOptions = {
+            maxSockets,
+            keepAlive: this._keepAlive,
+            proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && {
+              proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
+            }), { host: proxyUrl.hostname, port: proxyUrl.port })
+          };
+          let tunnelAgent;
+          const overHttps = proxyUrl.protocol === "https:";
+          if (usingSsl) {
+            tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
+          } else {
+            tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
+          }
+          agent = tunnelAgent(agentOptions);
+          this._proxyAgent = agent;
+        }
+        if (!agent) {
+          const options = { keepAlive: this._keepAlive, maxSockets };
+          agent = usingSsl ? new https3.Agent(options) : new http.Agent(options);
+          this._agent = agent;
+        }
+        if (usingSsl && this._ignoreSslError) {
+          agent.options = Object.assign(agent.options || {}, {
+            rejectUnauthorized: false
+          });
         }
+        return agent;
       }
-      _transform(data, cb) {
-        cb(null, data);
+      _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
+        let proxyAgent;
+        if (this._keepAlive) {
+          proxyAgent = this._proxyAgentDispatcher;
+        }
+        if (proxyAgent) {
+          return proxyAgent;
+        }
+        const usingSsl = parsedUrl.protocol === "https:";
+        proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && {
+          token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}`
+        }));
+        this._proxyAgentDispatcher = proxyAgent;
+        if (usingSsl && this._ignoreSslError) {
+          proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
+            rejectUnauthorized: false
+          });
+        }
+        return proxyAgent;
       }
-      _flush(cb) {
-        cb(null);
+      _performExponentialBackoff(retryNumber) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
+          const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
+          return new Promise((resolve14) => setTimeout(() => resolve14(), ms));
+        });
       }
-      _final(cb) {
-        this._transformState.afterFinal = cb;
-        this._flush(transformAfterFlush.bind(this));
+      _processResponse(res, options) {
+        return __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14, reject) => __awaiter2(this, void 0, void 0, function* () {
+            const statusCode = res.message.statusCode || 0;
+            const response = {
+              statusCode,
+              result: null,
+              headers: {}
+            };
+            if (statusCode === HttpCodes.NotFound) {
+              resolve14(response);
+            }
+            function dateTimeDeserializer(key, value) {
+              if (typeof value === "string") {
+                const a = new Date(value);
+                if (!isNaN(a.valueOf())) {
+                  return a;
+                }
+              }
+              return value;
+            }
+            let obj;
+            let contents;
+            try {
+              contents = yield res.readBody();
+              if (contents && contents.length > 0) {
+                if (options && options.deserializeDates) {
+                  obj = JSON.parse(contents, dateTimeDeserializer);
+                } else {
+                  obj = JSON.parse(contents);
+                }
+                response.result = obj;
+              }
+              response.headers = res.message.headers;
+            } catch (err) {
+            }
+            if (statusCode > 299) {
+              let msg;
+              if (obj && obj.message) {
+                msg = obj.message;
+              } else if (contents && contents.length > 0) {
+                msg = contents;
+              } else {
+                msg = `Failed request: (${statusCode})`;
+              }
+              const err = new HttpClientError(msg, statusCode);
+              err.result = response.result;
+              reject(err);
+            } else {
+              resolve14(response);
+            }
+          }));
+        });
       }
     };
-    var PassThrough = class extends Transform {
+    exports2.HttpClient = HttpClient2;
+    var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js
+var require_utils8 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js"(exports2) {
+    "use strict";
+    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      var desc = Object.getOwnPropertyDescriptor(m, k);
+      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+        desc = { enumerable: true, get: function() {
+          return m[k];
+        } };
+      }
+      Object.defineProperty(o, k2, desc);
+    }) : (function(o, m, k, k2) {
+      if (k2 === void 0) k2 = k;
+      o[k2] = m[k];
+    }));
+    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
+      Object.defineProperty(o, "default", { enumerable: true, value: v });
+    }) : function(o, v) {
+      o["default"] = v;
+    });
+    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
+      if (mod && mod.__esModule) return mod;
+      var result = {};
+      if (mod != null) {
+        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
+      }
+      __setModuleDefault2(result, mod);
+      return result;
     };
-    function transformAfterFlush(err, data) {
-      const cb = this._transformState.afterFinal;
-      if (err) return cb(err);
-      if (data !== null && data !== void 0) this.push(data);
-      this.push(null);
-      cb(null);
-    }
-    function pipelinePromise(...streams) {
-      return new Promise((resolve13, reject) => {
-        return pipeline(...streams, (err) => {
-          if (err) return reject(err);
-          resolve13();
+    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
+      function adopt(value) {
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
-      });
-    }
-    function pipeline(stream2, ...streams) {
-      const all = Array.isArray(stream2) ? [...stream2, ...streams] : [stream2, ...streams];
-      const done = all.length && typeof all[all.length - 1] === "function" ? all.pop() : null;
-      if (all.length < 2) throw new Error("Pipeline requires at least 2 streams");
-      let src = all[0];
-      let dest = null;
-      let error3 = null;
-      for (let i = 1; i < all.length; i++) {
-        dest = all[i];
-        if (isStreamx(src)) {
-          src.pipe(dest, onerror);
-        } else {
-          errorHandle(src, true, i > 1, onerror);
-          src.pipe(dest);
-        }
-        src = dest;
       }
-      if (done) {
-        let fin = false;
-        const autoDestroy = isStreamx(dest) || !!(dest._writableState && dest._writableState.autoDestroy);
-        dest.on("error", (err) => {
-          if (error3 === null) error3 = err;
-        });
-        dest.on("finish", () => {
-          fin = true;
-          if (!autoDestroy) done(error3);
-        });
-        if (autoDestroy) {
-          dest.on("close", () => done(error3 || (fin ? null : PREMATURE_CLOSE)));
+      return new (P || (P = Promise))(function(resolve14, reject) {
+        function fulfilled(value) {
+          try {
+            step(generator.next(value));
+          } catch (e) {
+            reject(e);
+          }
         }
-      }
-      return dest;
-      function errorHandle(s, rd, wr, onerror2) {
-        s.on("error", onerror2);
-        s.on("close", onclose);
-        function onclose() {
-          if (rd && s._readableState && !s._readableState.ended) return onerror2(PREMATURE_CLOSE);
-          if (wr && s._writableState && !s._writableState.ended) return onerror2(PREMATURE_CLOSE);
+        function rejected(value) {
+          try {
+            step(generator["throw"](value));
+          } catch (e) {
+            reject(e);
+          }
         }
-      }
-      function onerror(err) {
-        if (!err || error3) return;
-        error3 = err;
-        for (const s of all) {
-          s.destroy(err);
+        function step(result) {
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+      });
+    };
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0;
+    var httpClient = __importStar2(require_lib4());
+    var undici_1 = require_undici();
+    function getAuthString(token, options) {
+      if (!token && !options.auth) {
+        throw new Error("Parameter token or opts.auth is required");
+      } else if (token && options.auth) {
+        throw new Error("Parameters token and opts.auth may not both be specified");
       }
+      return typeof options.auth === "string" ? options.auth : `token ${token}`;
     }
-    function echo(s) {
-      return s;
+    exports2.getAuthString = getAuthString;
+    function getProxyAgent(destinationUrl) {
+      const hc = new httpClient.HttpClient();
+      return hc.getAgent(destinationUrl);
     }
-    function isStream(stream2) {
-      return !!stream2._readableState || !!stream2._writableState;
+    exports2.getProxyAgent = getProxyAgent;
+    function getProxyAgentDispatcher(destinationUrl) {
+      const hc = new httpClient.HttpClient();
+      return hc.getAgentDispatcher(destinationUrl);
     }
-    function isStreamx(stream2) {
-      return typeof stream2._duplexState === "number" && isStream(stream2);
+    exports2.getProxyAgentDispatcher = getProxyAgentDispatcher;
+    function getProxyFetch(destinationUrl) {
+      const httpDispatcher = getProxyAgentDispatcher(destinationUrl);
+      const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () {
+        return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));
+      });
+      return proxyFetch;
     }
-    function isEnded(stream2) {
-      return !!stream2._readableState && stream2._readableState.ended;
+    exports2.getProxyFetch = getProxyFetch;
+    function getApiBaseUrl() {
+      return process.env["GITHUB_API_URL"] || "https://api.github.com";
     }
-    function isFinished(stream2) {
-      return !!stream2._writableState && stream2._writableState.ended;
+    exports2.getApiBaseUrl = getApiBaseUrl;
+  }
+});
+
+// node_modules/universal-user-agent/dist-node/index.js
+var require_dist_node = __commonJS({
+  "node_modules/universal-user-agent/dist-node/index.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    function getUserAgent5() {
+      if (typeof navigator === "object" && "userAgent" in navigator) {
+        return navigator.userAgent;
+      }
+      if (typeof process === "object" && "version" in process) {
+        return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
+      }
+      return "";
     }
-    function getStreamError(stream2, opts = {}) {
-      const err = stream2._readableState && stream2._readableState.error || stream2._writableState && stream2._writableState.error;
-      return !opts.all && err === STREAM_DESTROYED ? null : err;
+    exports2.getUserAgent = getUserAgent5;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/before-after-hook/lib/register.js
+var require_register = __commonJS({
+  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/register.js"(exports2, module2) {
+    module2.exports = register2;
+    function register2(state, name, method, options) {
+      if (typeof method !== "function") {
+        throw new Error("method for before hook must be a function");
+      }
+      if (!options) {
+        options = {};
+      }
+      if (Array.isArray(name)) {
+        return name.reverse().reduce(function(callback, name2) {
+          return register2.bind(null, state, name2, callback, options);
+        }, method)();
+      }
+      return Promise.resolve().then(function() {
+        if (!state.registry[name]) {
+          return method(options);
+        }
+        return state.registry[name].reduce(function(method2, registered) {
+          return registered.hook.bind(null, method2, options);
+        }, method)();
+      });
     }
-    function isReadStreamx(stream2) {
-      return isStreamx(stream2) && stream2.readable;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/before-after-hook/lib/add.js
+var require_add = __commonJS({
+  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/add.js"(exports2, module2) {
+    module2.exports = addHook2;
+    function addHook2(state, kind, name, hook2) {
+      var orig = hook2;
+      if (!state.registry[name]) {
+        state.registry[name] = [];
+      }
+      if (kind === "before") {
+        hook2 = function(method, options) {
+          return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options));
+        };
+      }
+      if (kind === "after") {
+        hook2 = function(method, options) {
+          var result;
+          return Promise.resolve().then(method.bind(null, options)).then(function(result_) {
+            result = result_;
+            return orig(result, options);
+          }).then(function() {
+            return result;
+          });
+        };
+      }
+      if (kind === "error") {
+        hook2 = function(method, options) {
+          return Promise.resolve().then(method.bind(null, options)).catch(function(error3) {
+            return orig(error3, options);
+          });
+        };
+      }
+      state.registry[name].push({
+        hook: hook2,
+        orig
+      });
     }
-    function isTypedArray(data) {
-      return typeof data === "object" && data !== null && typeof data.byteLength === "number";
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/before-after-hook/lib/remove.js
+var require_remove = __commonJS({
+  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/remove.js"(exports2, module2) {
+    module2.exports = removeHook2;
+    function removeHook2(state, name, method) {
+      if (!state.registry[name]) {
+        return;
+      }
+      var index2 = state.registry[name].map(function(registered) {
+        return registered.orig;
+      }).indexOf(method);
+      if (index2 === -1) {
+        return;
+      }
+      state.registry[name].splice(index2, 1);
     }
-    function defaultByteLength(data) {
-      return isTypedArray(data) ? data.byteLength : 1024;
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/before-after-hook/index.js
+var require_before_after_hook = __commonJS({
+  "node_modules/@actions/artifact/node_modules/before-after-hook/index.js"(exports2, module2) {
+    var register2 = require_register();
+    var addHook2 = require_add();
+    var removeHook2 = require_remove();
+    var bind2 = Function.bind;
+    var bindable2 = bind2.bind(bind2);
+    function bindApi2(hook2, state, name) {
+      var removeHookRef = bindable2(removeHook2, null).apply(
+        null,
+        name ? [state, name] : [state]
+      );
+      hook2.api = { remove: removeHookRef };
+      hook2.remove = removeHookRef;
+      ["before", "error", "after", "wrap"].forEach(function(kind) {
+        var args = name ? [state, kind, name] : [state, kind];
+        hook2[kind] = hook2.api[kind] = bindable2(addHook2, null).apply(null, args);
+      });
     }
-    function noop3() {
+    function HookSingular() {
+      var singularHookName = "h";
+      var singularHookState = {
+        registry: {}
+      };
+      var singularHook = register2.bind(null, singularHookState, singularHookName);
+      bindApi2(singularHook, singularHookState, singularHookName);
+      return singularHook;
     }
-    function abort() {
-      this.destroy(new Error("Stream aborted."));
+    function HookCollection() {
+      var state = {
+        registry: {}
+      };
+      var hook2 = register2.bind(null, state);
+      bindApi2(hook2, state);
+      return hook2;
     }
-    function isWritev(s) {
-      return s._writev !== Writable.prototype._writev && s._writev !== Duplex.prototype._writev;
+    var collectionHookDeprecationMessageDisplayed = false;
+    function Hook() {
+      if (!collectionHookDeprecationMessageDisplayed) {
+        console.warn(
+          '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'
+        );
+        collectionHookDeprecationMessageDisplayed = true;
+      }
+      return HookCollection();
     }
-    module2.exports = {
-      pipeline,
-      pipelinePromise,
-      isStream,
-      isStreamx,
-      isEnded,
-      isFinished,
-      getStreamError,
-      Stream,
-      Writable,
-      Readable: Readable2,
-      Duplex,
-      Transform,
-      // Export PassThrough for compatibility with Node.js core's stream module
-      PassThrough
-    };
+    Hook.Singular = HookSingular.bind();
+    Hook.Collection = HookCollection.bind();
+    module2.exports = Hook;
+    module2.exports.Hook = Hook;
+    module2.exports.Singular = Hook.Singular;
+    module2.exports.Collection = Hook.Collection;
   }
 });
 
-// node_modules/tar-stream/headers.js
-var require_headers2 = __commonJS({
-  "node_modules/tar-stream/headers.js"(exports2) {
-    var b4a = require_b4a();
-    var ZEROS = "0000000000000000000";
-    var SEVENS = "7777777777777777777";
-    var ZERO_OFFSET = "0".charCodeAt(0);
-    var USTAR_MAGIC = b4a.from([117, 115, 116, 97, 114, 0]);
-    var USTAR_VER = b4a.from([ZERO_OFFSET, ZERO_OFFSET]);
-    var GNU_MAGIC = b4a.from([117, 115, 116, 97, 114, 32]);
-    var GNU_VER = b4a.from([32, 0]);
-    var MASK = 4095;
-    var MAGIC_OFFSET = 257;
-    var VERSION_OFFSET = 263;
-    exports2.decodeLongPath = function decodeLongPath(buf, encoding) {
-      return decodeStr(buf, 0, buf.length, encoding);
+// node_modules/@actions/artifact/node_modules/@octokit/endpoint/dist-node/index.js
+var require_dist_node2 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
+    "use strict";
+    var __defProp2 = Object.defineProperty;
+    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+    var __getOwnPropNames2 = Object.getOwnPropertyNames;
+    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+    var __export2 = (target, all) => {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
     };
-    exports2.encodePax = function encodePax(opts) {
-      let result = "";
-      if (opts.name) result += addLength(" path=" + opts.name + "\n");
-      if (opts.linkname) result += addLength(" linkpath=" + opts.linkname + "\n");
-      const pax = opts.pax;
-      if (pax) {
-        for (const key in pax) {
-          result += addLength(" " + key + "=" + pax[key] + "\n");
-        }
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
       }
-      return b4a.from(result);
+      return to;
     };
-    exports2.decodePax = function decodePax(buf) {
-      const result = {};
-      while (buf.length) {
-        let i = 0;
-        while (i < buf.length && buf[i] !== 32) i++;
-        const len = parseInt(b4a.toString(buf.subarray(0, i)), 10);
-        if (!len) return result;
-        const b = b4a.toString(buf.subarray(i + 1, len - 1));
-        const keyIndex = b.indexOf("=");
-        if (keyIndex === -1) return result;
-        result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1);
-        buf = buf.subarray(len);
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var dist_src_exports3 = {};
+    __export2(dist_src_exports3, {
+      endpoint: () => endpoint2
+    });
+    module2.exports = __toCommonJS2(dist_src_exports3);
+    var import_universal_user_agent5 = require_dist_node();
+    var VERSION8 = "9.0.6";
+    var userAgent2 = `octokit-endpoint.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`;
+    var DEFAULTS2 = {
+      method: "GET",
+      baseUrl: "https://api.github.com",
+      headers: {
+        accept: "application/vnd.github.v3+json",
+        "user-agent": userAgent2
+      },
+      mediaType: {
+        format: ""
       }
-      return result;
     };
-    exports2.encode = function encode(opts) {
-      const buf = b4a.alloc(512);
-      let name = opts.name;
-      let prefix = "";
-      if (opts.typeflag === 5 && name[name.length - 1] !== "/") name += "/";
-      if (b4a.byteLength(name) !== name.length) return null;
-      while (b4a.byteLength(name) > 100) {
-        const i = name.indexOf("/");
-        if (i === -1) return null;
-        prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i);
-        name = name.slice(i + 1);
+    function lowercaseKeys2(object2) {
+      if (!object2) {
+        return {};
       }
-      if (b4a.byteLength(name) > 100 || b4a.byteLength(prefix) > 155) return null;
-      if (opts.linkname && b4a.byteLength(opts.linkname) > 100) return null;
-      b4a.write(buf, name);
-      b4a.write(buf, encodeOct(opts.mode & MASK, 6), 100);
-      b4a.write(buf, encodeOct(opts.uid, 6), 108);
-      b4a.write(buf, encodeOct(opts.gid, 6), 116);
-      encodeSize(opts.size, buf, 124);
-      b4a.write(buf, encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136);
-      buf[156] = ZERO_OFFSET + toTypeflag(opts.type);
-      if (opts.linkname) b4a.write(buf, opts.linkname, 157);
-      b4a.copy(USTAR_MAGIC, buf, MAGIC_OFFSET);
-      b4a.copy(USTAR_VER, buf, VERSION_OFFSET);
-      if (opts.uname) b4a.write(buf, opts.uname, 265);
-      if (opts.gname) b4a.write(buf, opts.gname, 297);
-      b4a.write(buf, encodeOct(opts.devmajor || 0, 6), 329);
-      b4a.write(buf, encodeOct(opts.devminor || 0, 6), 337);
-      if (prefix) b4a.write(buf, prefix, 345);
-      b4a.write(buf, encodeOct(cksum(buf), 6), 148);
-      return buf;
-    };
-    exports2.decode = function decode(buf, filenameEncoding, allowUnknownFormat) {
-      let typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET;
-      let name = decodeStr(buf, 0, 100, filenameEncoding);
-      const mode = decodeOct(buf, 100, 8);
-      const uid = decodeOct(buf, 108, 8);
-      const gid = decodeOct(buf, 116, 8);
-      const size = decodeOct(buf, 124, 12);
-      const mtime = decodeOct(buf, 136, 12);
-      const type2 = toType(typeflag);
-      const linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding);
-      const uname = decodeStr(buf, 265, 32);
-      const gname = decodeStr(buf, 297, 32);
-      const devmajor = decodeOct(buf, 329, 8);
-      const devminor = decodeOct(buf, 337, 8);
-      const c = cksum(buf);
-      if (c === 8 * 32) return null;
-      if (c !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");
-      if (isUSTAR(buf)) {
-        if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name;
-      } else if (isGNU(buf)) {
+      return Object.keys(object2).reduce((newObj, key) => {
+        newObj[key.toLowerCase()] = object2[key];
+        return newObj;
+      }, {});
+    }
+    function isPlainObject4(value) {
+      if (typeof value !== "object" || value === null)
+        return false;
+      if (Object.prototype.toString.call(value) !== "[object Object]")
+        return false;
+      const proto = Object.getPrototypeOf(value);
+      if (proto === null)
+        return true;
+      const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+      return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+    }
+    function mergeDeep2(defaults3, options) {
+      const result = Object.assign({}, defaults3);
+      Object.keys(options).forEach((key) => {
+        if (isPlainObject4(options[key])) {
+          if (!(key in defaults3))
+            Object.assign(result, { [key]: options[key] });
+          else
+            result[key] = mergeDeep2(defaults3[key], options[key]);
+        } else {
+          Object.assign(result, { [key]: options[key] });
+        }
+      });
+      return result;
+    }
+    function removeUndefinedProperties2(obj) {
+      for (const key in obj) {
+        if (obj[key] === void 0) {
+          delete obj[key];
+        }
+      }
+      return obj;
+    }
+    function merge2(defaults3, route, options) {
+      if (typeof route === "string") {
+        let [method, url2] = route.split(" ");
+        options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options);
       } else {
-        if (!allowUnknownFormat) {
-          throw new Error("Invalid tar header: unknown format.");
+        options = Object.assign({}, route);
+      }
+      options.headers = lowercaseKeys2(options.headers);
+      removeUndefinedProperties2(options);
+      removeUndefinedProperties2(options.headers);
+      const mergedOptions = mergeDeep2(defaults3 || {}, options);
+      if (options.url === "/graphql") {
+        if (defaults3 && defaults3.mediaType.previews?.length) {
+          mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter(
+            (preview) => !mergedOptions.mediaType.previews.includes(preview)
+          ).concat(mergedOptions.mediaType.previews);
         }
+        mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
       }
-      if (typeflag === 0 && name && name[name.length - 1] === "/") typeflag = 5;
-      return {
-        name,
-        mode,
-        uid,
-        gid,
-        size,
-        mtime: new Date(1e3 * mtime),
-        type: type2,
-        linkname,
-        uname,
-        gname,
-        devmajor,
-        devminor,
-        pax: null
-      };
-    };
-    function isUSTAR(buf) {
-      return b4a.equals(USTAR_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6));
+      return mergedOptions;
     }
-    function isGNU(buf) {
-      return b4a.equals(GNU_MAGIC, buf.subarray(MAGIC_OFFSET, MAGIC_OFFSET + 6)) && b4a.equals(GNU_VER, buf.subarray(VERSION_OFFSET, VERSION_OFFSET + 2));
+    function addQueryParameters2(url2, parameters) {
+      const separator = /\?/.test(url2) ? "&" : "?";
+      const names = Object.keys(parameters);
+      if (names.length === 0) {
+        return url2;
+      }
+      return url2 + separator + names.map((name) => {
+        if (name === "q") {
+          return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+        }
+        return `${name}=${encodeURIComponent(parameters[name])}`;
+      }).join("&");
     }
-    function clamp(index, len, defaultValue) {
-      if (typeof index !== "number") return defaultValue;
-      index = ~~index;
-      if (index >= len) return len;
-      if (index >= 0) return index;
-      index += len;
-      if (index >= 0) return index;
-      return 0;
+    var urlVariableRegex2 = /\{[^{}}]+\}/g;
+    function removeNonChars2(variableName) {
+      return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []);
     }
-    function toTypeflag(flag) {
-      switch (flag) {
-        case "file":
-          return 0;
-        case "link":
-          return 1;
-        case "symlink":
-          return 2;
-        case "character-device":
-          return 3;
-        case "block-device":
-          return 4;
-        case "directory":
-          return 5;
-        case "fifo":
-          return 6;
-        case "contiguous-file":
-          return 7;
-        case "pax-header":
-          return 72;
+    function omit2(object2, keysToOmit) {
+      const result = { __proto__: null };
+      for (const key of Object.keys(object2)) {
+        if (keysToOmit.indexOf(key) === -1) {
+          result[key] = object2[key];
+        }
       }
-      return 0;
+      return result;
     }
-    function indexOf(block, num, offset, end) {
-      for (; offset < end; offset++) {
-        if (block[offset] === num) return offset;
+    function encodeReserved2(str) {
+      return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+        if (!/%[0-9A-Fa-f]/.test(part)) {
+          part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+        }
+        return part;
+      }).join("");
+    }
+    function encodeUnreserved2(str) {
+      return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+        return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+      });
+    }
+    function encodeValue2(operator, value, key) {
+      value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
+      if (key) {
+        return encodeUnreserved2(key) + "=" + value;
+      } else {
+        return value;
       }
-      return end;
     }
-    function cksum(block) {
-      let sum = 8 * 32;
-      for (let i = 0; i < 148; i++) sum += block[i];
-      for (let j = 156; j < 512; j++) sum += block[j];
-      return sum;
+    function isDefined3(value) {
+      return value !== void 0 && value !== null;
     }
-    function encodeOct(val, n) {
-      val = val.toString(8);
-      if (val.length > n) return SEVENS.slice(0, n) + " ";
-      return ZEROS.slice(0, n - val.length) + val + " ";
+    function isKeyOperator2(operator) {
+      return operator === ";" || operator === "&" || operator === "?";
     }
-    function encodeSizeBin(num, buf, off) {
-      buf[off] = 128;
-      for (let i = 11; i > 0; i--) {
-        buf[off + i] = num & 255;
-        num = Math.floor(num / 256);
+    function getValues2(context5, operator, key, modifier) {
+      var value = context5[key], result = [];
+      if (isDefined3(value) && value !== "") {
+        if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+          value = value.toString();
+          if (modifier && modifier !== "*") {
+            value = value.substring(0, parseInt(modifier, 10));
+          }
+          result.push(
+            encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
+          );
+        } else {
+          if (modifier === "*") {
+            if (Array.isArray(value)) {
+              value.filter(isDefined3).forEach(function(value2) {
+                result.push(
+                  encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
+                );
+              });
+            } else {
+              Object.keys(value).forEach(function(k) {
+                if (isDefined3(value[k])) {
+                  result.push(encodeValue2(operator, value[k], k));
+                }
+              });
+            }
+          } else {
+            const tmp = [];
+            if (Array.isArray(value)) {
+              value.filter(isDefined3).forEach(function(value2) {
+                tmp.push(encodeValue2(operator, value2));
+              });
+            } else {
+              Object.keys(value).forEach(function(k) {
+                if (isDefined3(value[k])) {
+                  tmp.push(encodeUnreserved2(k));
+                  tmp.push(encodeValue2(operator, value[k].toString()));
+                }
+              });
+            }
+            if (isKeyOperator2(operator)) {
+              result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
+            } else if (tmp.length !== 0) {
+              result.push(tmp.join(","));
+            }
+          }
+        }
+      } else {
+        if (operator === ";") {
+          if (isDefined3(value)) {
+            result.push(encodeUnreserved2(key));
+          }
+        } else if (value === "" && (operator === "&" || operator === "?")) {
+          result.push(encodeUnreserved2(key) + "=");
+        } else if (value === "") {
+          result.push("");
+        }
       }
+      return result;
     }
-    function encodeSize(num, buf, off) {
-      if (num.toString(8).length > 11) {
-        encodeSizeBin(num, buf, off);
+    function parseUrl2(template) {
+      return {
+        expand: expand3.bind(null, template)
+      };
+    }
+    function expand3(template, context5) {
+      var operators = ["+", "#", ".", "/", ";", "?", "&"];
+      template = template.replace(
+        /\{([^\{\}]+)\}|([^\{\}]+)/g,
+        function(_2, expression, literal) {
+          if (expression) {
+            let operator = "";
+            const values = [];
+            if (operators.indexOf(expression.charAt(0)) !== -1) {
+              operator = expression.charAt(0);
+              expression = expression.substr(1);
+            }
+            expression.split(/,/g).forEach(function(variable) {
+              var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+              values.push(getValues2(context5, operator, tmp[1], tmp[2] || tmp[3]));
+            });
+            if (operator && operator !== "+") {
+              var separator = ",";
+              if (operator === "?") {
+                separator = "&";
+              } else if (operator !== "#") {
+                separator = operator;
+              }
+              return (values.length !== 0 ? operator : "") + values.join(separator);
+            } else {
+              return values.join(",");
+            }
+          } else {
+            return encodeReserved2(literal);
+          }
+        }
+      );
+      if (template === "/") {
+        return template;
       } else {
-        b4a.write(buf, encodeOct(num, 11), off);
+        return template.replace(/\/$/, "");
       }
     }
-    function parse256(buf) {
-      let positive;
-      if (buf[0] === 128) positive = true;
-      else if (buf[0] === 255) positive = false;
-      else return null;
-      const tuple = [];
-      let i;
-      for (i = buf.length - 1; i > 0; i--) {
-        const byte = buf[i];
-        if (positive) tuple.push(byte);
-        else tuple.push(255 - byte);
+    function parse3(options) {
+      let method = options.method.toUpperCase();
+      let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+      let headers = Object.assign({}, options.headers);
+      let body;
+      let parameters = omit2(options, [
+        "method",
+        "baseUrl",
+        "url",
+        "headers",
+        "request",
+        "mediaType"
+      ]);
+      const urlVariableNames = extractUrlVariableNames2(url2);
+      url2 = parseUrl2(url2).expand(parameters);
+      if (!/^http/.test(url2)) {
+        url2 = options.baseUrl + url2;
       }
-      let sum = 0;
-      const l = tuple.length;
-      for (i = 0; i < l; i++) {
-        sum += tuple[i] * Math.pow(256, i);
+      const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+      const remainingParameters = omit2(parameters, omittedParameters);
+      const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+      if (!isBinaryRequest) {
+        if (options.mediaType.format) {
+          headers.accept = headers.accept.split(/,/).map(
+            (format) => format.replace(
+              /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+              `application/vnd$1$2.${options.mediaType.format}`
+            )
+          ).join(",");
+        }
+        if (url2.endsWith("/graphql")) {
+          if (options.mediaType.previews?.length) {
+            const previewsFromAcceptHeader = headers.accept.match(/(? {
+              const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
+              return `application/vnd.github.${preview}-preview${format}`;
+            }).join(",");
+          }
+        }
       }
-      return positive ? sum : -1 * sum;
-    }
-    function decodeOct(val, offset, length) {
-      val = val.subarray(offset, offset + length);
-      offset = 0;
-      if (val[offset] & 128) {
-        return parse256(val);
+      if (["GET", "HEAD"].includes(method)) {
+        url2 = addQueryParameters2(url2, remainingParameters);
       } else {
-        while (offset < val.length && val[offset] === 32) offset++;
-        const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length);
-        while (offset < end && val[offset] === 0) offset++;
-        if (end === offset) return 0;
-        return parseInt(b4a.toString(val.subarray(offset, end)), 8);
+        if ("data" in remainingParameters) {
+          body = remainingParameters.data;
+        } else {
+          if (Object.keys(remainingParameters).length) {
+            body = remainingParameters;
+          }
+        }
+      }
+      if (!headers["content-type"] && typeof body !== "undefined") {
+        headers["content-type"] = "application/json; charset=utf-8";
+      }
+      if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+        body = "";
       }
+      return Object.assign(
+        { method, url: url2, headers },
+        typeof body !== "undefined" ? { body } : null,
+        options.request ? { request: options.request } : null
+      );
     }
-    function decodeStr(val, offset, length, encoding) {
-      return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding);
+    function endpointWithDefaults2(defaults3, route, options) {
+      return parse3(merge2(defaults3, route, options));
     }
-    function addLength(str2) {
-      const len = b4a.byteLength(str2);
-      let digits = Math.floor(Math.log(len) / Math.log(10)) + 1;
-      if (len + digits >= Math.pow(10, digits)) digits++;
-      return len + digits + str2;
+    function withDefaults4(oldDefaults, newDefaults) {
+      const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+      const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+      return Object.assign(endpoint22, {
+        DEFAULTS: DEFAULTS22,
+        defaults: withDefaults4.bind(null, DEFAULTS22),
+        merge: merge2.bind(null, DEFAULTS22),
+        parse: parse3
+      });
     }
+    var endpoint2 = withDefaults4(null, DEFAULTS2);
   }
 });
 
-// node_modules/tar-stream/extract.js
-var require_extract = __commonJS({
-  "node_modules/tar-stream/extract.js"(exports2, module2) {
-    var { Writable, Readable: Readable2, getStreamError } = require_streamx();
-    var FIFO = require_fast_fifo();
-    var b4a = require_b4a();
-    var headers = require_headers2();
-    var EMPTY = b4a.alloc(0);
-    var BufferList = class {
-      constructor() {
-        this.buffered = 0;
-        this.shifted = 0;
-        this.queue = new FIFO();
-        this._offset = 0;
-      }
-      push(buffer) {
-        this.buffered += buffer.byteLength;
-        this.queue.push(buffer);
-      }
-      shiftFirst(size) {
-        return this._buffered === 0 ? null : this._next(size);
-      }
-      shift(size) {
-        if (size > this.buffered) return null;
-        if (size === 0) return EMPTY;
-        let chunk = this._next(size);
-        if (size === chunk.byteLength) return chunk;
-        const chunks = [chunk];
-        while ((size -= chunk.byteLength) > 0) {
-          chunk = this._next(size);
-          chunks.push(chunk);
+// node_modules/deprecation/dist-node/index.js
+var require_dist_node3 = __commonJS({
+  "node_modules/deprecation/dist-node/index.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    var Deprecation = class extends Error {
+      constructor(message) {
+        super(message);
+        if (Error.captureStackTrace) {
+          Error.captureStackTrace(this, this.constructor);
         }
-        return b4a.concat(chunks);
+        this.name = "Deprecation";
       }
-      _next(size) {
-        const buf = this.queue.peek();
-        const rem = buf.byteLength - this._offset;
-        if (size >= rem) {
-          const sub = this._offset ? buf.subarray(this._offset, buf.byteLength) : buf;
-          this.queue.shift();
-          this._offset = 0;
-          this.buffered -= rem;
-          this.shifted += rem;
-          return sub;
+    };
+    exports2.Deprecation = Deprecation;
+  }
+});
+
+// node_modules/wrappy/wrappy.js
+var require_wrappy = __commonJS({
+  "node_modules/wrappy/wrappy.js"(exports2, module2) {
+    module2.exports = wrappy;
+    function wrappy(fn, cb) {
+      if (fn && cb) return wrappy(fn)(cb);
+      if (typeof fn !== "function")
+        throw new TypeError("need wrapper function");
+      Object.keys(fn).forEach(function(k) {
+        wrapper[k] = fn[k];
+      });
+      return wrapper;
+      function wrapper() {
+        var args = new Array(arguments.length);
+        for (var i = 0; i < args.length; i++) {
+          args[i] = arguments[i];
         }
-        this.buffered -= size;
-        this.shifted += size;
-        return buf.subarray(this._offset, this._offset += size);
+        var ret = fn.apply(this, args);
+        var cb2 = args[args.length - 1];
+        if (typeof ret === "function" && ret !== cb2) {
+          Object.keys(cb2).forEach(function(k) {
+            ret[k] = cb2[k];
+          });
+        }
+        return ret;
       }
+    }
+  }
+});
+
+// node_modules/once/once.js
+var require_once = __commonJS({
+  "node_modules/once/once.js"(exports2, module2) {
+    var wrappy = require_wrappy();
+    module2.exports = wrappy(once);
+    module2.exports.strict = wrappy(onceStrict);
+    once.proto = once(function() {
+      Object.defineProperty(Function.prototype, "once", {
+        value: function() {
+          return once(this);
+        },
+        configurable: true
+      });
+      Object.defineProperty(Function.prototype, "onceStrict", {
+        value: function() {
+          return onceStrict(this);
+        },
+        configurable: true
+      });
+    });
+    function once(fn) {
+      var f = function() {
+        if (f.called) return f.value;
+        f.called = true;
+        return f.value = fn.apply(this, arguments);
+      };
+      f.called = false;
+      return f;
+    }
+    function onceStrict(fn) {
+      var f = function() {
+        if (f.called)
+          throw new Error(f.onceError);
+        f.called = true;
+        return f.value = fn.apply(this, arguments);
+      };
+      var name = fn.name || "Function wrapped with `once`";
+      f.onceError = name + " shouldn't be called more than once";
+      f.called = false;
+      return f;
+    }
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@octokit/request-error/dist-node/index.js
+var require_dist_node4 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) {
+    "use strict";
+    var __create2 = Object.create;
+    var __defProp2 = Object.defineProperty;
+    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+    var __getOwnPropNames2 = Object.getOwnPropertyNames;
+    var __getProtoOf2 = Object.getPrototypeOf;
+    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+    var __export2 = (target, all) => {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
     };
-    var Source = class extends Readable2 {
-      constructor(self2, header, offset) {
-        super();
-        this.header = header;
-        this.offset = offset;
-        this._parent = self2;
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
       }
-      _read(cb) {
-        if (this.header.size === 0) {
-          this.push(null);
+      return to;
+    };
+    var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
+      // If the importer is in node compatibility mode or this is not an ESM
+      // file that has been converted to a CommonJS file using a Babel-
+      // compatible transform (i.e. "__esModule" has not been set), then set
+      // "default" to the CommonJS "module.exports" for node compatibility.
+      isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
+      mod
+    ));
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var dist_src_exports3 = {};
+    __export2(dist_src_exports3, {
+      RequestError: () => RequestError2
+    });
+    module2.exports = __toCommonJS2(dist_src_exports3);
+    var import_deprecation = require_dist_node3();
+    var import_once = __toESM2(require_once());
+    var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
+    var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
+    var RequestError2 = class extends Error {
+      constructor(message, statusCode, options) {
+        super(message);
+        if (Error.captureStackTrace) {
+          Error.captureStackTrace(this, this.constructor);
         }
-        if (this._parent._stream === this) {
-          this._parent._update();
+        this.name = "HttpError";
+        this.status = statusCode;
+        let headers;
+        if ("headers" in options && typeof options.headers !== "undefined") {
+          headers = options.headers;
         }
-        cb(null);
-      }
-      _predestroy() {
-        this._parent.destroy(getStreamError(this));
-      }
-      _detach() {
-        if (this._parent._stream === this) {
-          this._parent._stream = null;
-          this._parent._missing = overflow(this.header.size);
-          this._parent._update();
+        if ("response" in options) {
+          this.response = options.response;
+          headers = options.response.headers;
+        }
+        const requestCopy = Object.assign({}, options.request);
+        if (options.request.headers.authorization) {
+          requestCopy.headers = Object.assign({}, options.request.headers, {
+            authorization: options.request.headers.authorization.replace(
+              /(? {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
+    };
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
       }
+      return to;
     };
-    var Extract = class extends Writable {
-      constructor(opts) {
-        super(opts);
-        if (!opts) opts = {};
-        this._buffer = new BufferList();
-        this._offset = 0;
-        this._header = null;
-        this._stream = null;
-        this._missing = 0;
-        this._longHeader = false;
-        this._callback = noop3;
-        this._locked = false;
-        this._finished = false;
-        this._pax = null;
-        this._paxGlobal = null;
-        this._gnuLongPath = null;
-        this._gnuLongLinkPath = null;
-        this._filenameEncoding = opts.filenameEncoding || "utf-8";
-        this._allowUnknownFormat = !!opts.allowUnknownFormat;
-        this._unlockBound = this._unlock.bind(this);
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var dist_src_exports3 = {};
+    __export2(dist_src_exports3, {
+      request: () => request3
+    });
+    module2.exports = __toCommonJS2(dist_src_exports3);
+    var import_endpoint2 = require_dist_node2();
+    var import_universal_user_agent5 = require_dist_node();
+    var VERSION8 = "8.4.1";
+    function isPlainObject4(value) {
+      if (typeof value !== "object" || value === null)
+        return false;
+      if (Object.prototype.toString.call(value) !== "[object Object]")
+        return false;
+      const proto = Object.getPrototypeOf(value);
+      if (proto === null)
+        return true;
+      const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+      return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+    }
+    var import_request_error3 = require_dist_node4();
+    function getBufferResponse(response) {
+      return response.arrayBuffer();
+    }
+    function fetchWrapper2(requestOptions) {
+      var _a2, _b, _c, _d;
+      const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+      const parseSuccessResponseBody = ((_a2 = requestOptions.request) == null ? void 0 : _a2.parseSuccessResponseBody) !== false;
+      if (isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body)) {
+        requestOptions.body = JSON.stringify(requestOptions.body);
       }
-      _unlock(err) {
-        this._locked = false;
-        if (err) {
-          this.destroy(err);
-          this._continueWrite(err);
-          return;
-        }
-        this._update();
+      let headers = {};
+      let status;
+      let url2;
+      let { fetch } = globalThis;
+      if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
+        fetch = requestOptions.request.fetch;
       }
-      _consumeHeader() {
-        if (this._locked) return false;
-        this._offset = this._buffer.shifted;
-        try {
-          this._header = headers.decode(this._buffer.shift(512), this._filenameEncoding, this._allowUnknownFormat);
-        } catch (err) {
-          this._continueWrite(err);
-          return false;
-        }
-        if (!this._header) return true;
-        switch (this._header.type) {
-          case "gnu-long-path":
-          case "gnu-long-link-path":
-          case "pax-global-header":
-          case "pax-header":
-            this._longHeader = true;
-            this._missing = this._header.size;
-            return true;
-        }
-        this._locked = true;
-        this._applyLongHeaders();
-        if (this._header.size === 0 || this._header.type === "directory") {
-          this.emit("entry", this._header, this._createStream(), this._unlockBound);
-          return true;
-        }
-        this._stream = this._createStream();
-        this._missing = this._header.size;
-        this.emit("entry", this._header, this._stream, this._unlockBound);
-        return true;
+      if (!fetch) {
+        throw new Error(
+          "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+        );
       }
-      _applyLongHeaders() {
-        if (this._gnuLongPath) {
-          this._header.name = this._gnuLongPath;
-          this._gnuLongPath = null;
+      return fetch(requestOptions.url, {
+        method: requestOptions.method,
+        body: requestOptions.body,
+        redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
+        headers: requestOptions.headers,
+        signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,
+        // duplex must be set if request.body is ReadableStream or Async Iterables.
+        // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
+        ...requestOptions.body && { duplex: "half" }
+      }).then(async (response) => {
+        url2 = response.url;
+        status = response.status;
+        for (const keyAndValue of response.headers) {
+          headers[keyAndValue[0]] = keyAndValue[1];
         }
-        if (this._gnuLongLinkPath) {
-          this._header.linkname = this._gnuLongLinkPath;
-          this._gnuLongLinkPath = null;
+        if ("deprecation" in headers) {
+          const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
+          const deprecationLink = matches && matches.pop();
+          log.warn(
+            `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
+          );
         }
-        if (this._pax) {
-          if (this._pax.path) this._header.name = this._pax.path;
-          if (this._pax.linkpath) this._header.linkname = this._pax.linkpath;
-          if (this._pax.size) this._header.size = parseInt(this._pax.size, 10);
-          this._header.pax = this._pax;
-          this._pax = null;
+        if (status === 204 || status === 205) {
+          return;
         }
-      }
-      _decodeLongHeader(buf) {
-        switch (this._header.type) {
-          case "gnu-long-path":
-            this._gnuLongPath = headers.decodeLongPath(buf, this._filenameEncoding);
-            break;
-          case "gnu-long-link-path":
-            this._gnuLongLinkPath = headers.decodeLongPath(buf, this._filenameEncoding);
-            break;
-          case "pax-global-header":
-            this._paxGlobal = headers.decodePax(buf);
-            break;
-          case "pax-header":
-            this._pax = this._paxGlobal === null ? headers.decodePax(buf) : Object.assign({}, this._paxGlobal, headers.decodePax(buf));
-            break;
+        if (requestOptions.method === "HEAD") {
+          if (status < 400) {
+            return;
+          }
+          throw new import_request_error3.RequestError(response.statusText, status, {
+            response: {
+              url: url2,
+              status,
+              headers,
+              data: void 0
+            },
+            request: requestOptions
+          });
         }
-      }
-      _consumeLongHeader() {
-        this._longHeader = false;
-        this._missing = overflow(this._header.size);
-        const buf = this._buffer.shift(this._header.size);
-        try {
-          this._decodeLongHeader(buf);
-        } catch (err) {
-          this._continueWrite(err);
-          return false;
+        if (status === 304) {
+          throw new import_request_error3.RequestError("Not modified", status, {
+            response: {
+              url: url2,
+              status,
+              headers,
+              data: await getResponseData2(response)
+            },
+            request: requestOptions
+          });
         }
-        return true;
-      }
-      _consumeStream() {
-        const buf = this._buffer.shiftFirst(this._missing);
-        if (buf === null) return false;
-        this._missing -= buf.byteLength;
-        const drained = this._stream.push(buf);
-        if (this._missing === 0) {
-          this._stream.push(null);
-          if (drained) this._stream._detach();
-          return drained && this._locked === false;
+        if (status >= 400) {
+          const data = await getResponseData2(response);
+          const error3 = new import_request_error3.RequestError(toErrorMessage2(data), status, {
+            response: {
+              url: url2,
+              status,
+              headers,
+              data
+            },
+            request: requestOptions
+          });
+          throw error3;
         }
-        return drained;
-      }
-      _createStream() {
-        return new Source(this, this._header, this._offset);
-      }
-      _update() {
-        while (this._buffer.buffered > 0 && !this.destroying) {
-          if (this._missing > 0) {
-            if (this._stream !== null) {
-              if (this._consumeStream() === false) return;
-              continue;
-            }
-            if (this._longHeader === true) {
-              if (this._missing > this._buffer.buffered) break;
-              if (this._consumeLongHeader() === false) return false;
-              continue;
-            }
-            const ignore = this._buffer.shiftFirst(this._missing);
-            if (ignore !== null) this._missing -= ignore.byteLength;
-            continue;
+        return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
+      }).then((data) => {
+        return {
+          status,
+          url: url2,
+          headers,
+          data
+        };
+      }).catch((error3) => {
+        if (error3 instanceof import_request_error3.RequestError)
+          throw error3;
+        else if (error3.name === "AbortError")
+          throw error3;
+        let message = error3.message;
+        if (error3.name === "TypeError" && "cause" in error3) {
+          if (error3.cause instanceof Error) {
+            message = error3.cause.message;
+          } else if (typeof error3.cause === "string") {
+            message = error3.cause;
           }
-          if (this._buffer.buffered < 512) break;
-          if (this._stream !== null || this._consumeHeader() === false) return;
         }
-        this._continueWrite(null);
+        throw new import_request_error3.RequestError(message, 500, {
+          request: requestOptions
+        });
+      });
+    }
+    async function getResponseData2(response) {
+      const contentType = response.headers.get("content-type");
+      if (/application\/json/.test(contentType)) {
+        return response.json().catch(() => response.text()).catch(() => "");
       }
-      _continueWrite(err) {
-        const cb = this._callback;
-        this._callback = noop3;
-        cb(err);
+      if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+        return response.text();
       }
-      _write(data, cb) {
-        this._callback = cb;
-        this._buffer.push(data);
-        this._update();
+      return getBufferResponse(response);
+    }
+    function toErrorMessage2(data) {
+      if (typeof data === "string")
+        return data;
+      let suffix;
+      if ("documentation_url" in data) {
+        suffix = ` - ${data.documentation_url}`;
+      } else {
+        suffix = "";
       }
-      _final(cb) {
-        this._finished = this._missing === 0 && this._buffer.buffered === 0;
-        cb(this._finished ? null : new Error("Unexpected end of data"));
+      if ("message" in data) {
+        if (Array.isArray(data.errors)) {
+          return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
+        }
+        return `${data.message}${suffix}`;
       }
-      _predestroy() {
-        this._continueWrite(null);
+      return `Unknown error: ${JSON.stringify(data)}`;
+    }
+    function withDefaults4(oldEndpoint, newDefaults) {
+      const endpoint2 = oldEndpoint.defaults(newDefaults);
+      const newApi = function(route, parameters) {
+        const endpointOptions = endpoint2.merge(route, parameters);
+        if (!endpointOptions.request || !endpointOptions.request.hook) {
+          return fetchWrapper2(endpoint2.parse(endpointOptions));
+        }
+        const request22 = (route2, parameters2) => {
+          return fetchWrapper2(
+            endpoint2.parse(endpoint2.merge(route2, parameters2))
+          );
+        };
+        Object.assign(request22, {
+          endpoint: endpoint2,
+          defaults: withDefaults4.bind(null, endpoint2)
+        });
+        return endpointOptions.request.hook(request22, endpointOptions);
+      };
+      return Object.assign(newApi, {
+        endpoint: endpoint2,
+        defaults: withDefaults4.bind(null, endpoint2)
+      });
+    }
+    var request3 = withDefaults4(import_endpoint2.endpoint, {
+      headers: {
+        "user-agent": `octokit-request.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`
       }
-      _destroy(cb) {
-        if (this._stream) this._stream.destroy(getStreamError(this));
-        cb(null);
+    });
+  }
+});
+
+// node_modules/@actions/artifact/node_modules/@octokit/graphql/dist-node/index.js
+var require_dist_node6 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@octokit/graphql/dist-node/index.js"(exports2, module2) {
+    "use strict";
+    var __defProp2 = Object.defineProperty;
+    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+    var __getOwnPropNames2 = Object.getOwnPropertyNames;
+    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+    var __export2 = (target, all) => {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
+    };
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
       }
-      [Symbol.asyncIterator]() {
-        let error3 = null;
-        let promiseResolve = null;
-        let promiseReject = null;
-        let entryStream = null;
-        let entryCallback = null;
-        const extract2 = this;
-        this.on("entry", onentry);
-        this.on("error", (err) => {
-          error3 = err;
-        });
-        this.on("close", onclose);
-        return {
-          [Symbol.asyncIterator]() {
-            return this;
-          },
-          next() {
-            return new Promise(onnext);
-          },
-          return() {
-            return destroy(null);
-          },
-          throw(err) {
-            return destroy(err);
-          }
-        };
-        function consumeCallback(err) {
-          if (!entryCallback) return;
-          const cb = entryCallback;
-          entryCallback = null;
-          cb(err);
+      return to;
+    };
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var index_exports = {};
+    __export2(index_exports, {
+      GraphqlResponseError: () => GraphqlResponseError2,
+      graphql: () => graphql22,
+      withCustomRequest: () => withCustomRequest2
+    });
+    module2.exports = __toCommonJS2(index_exports);
+    var import_request3 = require_dist_node5();
+    var import_universal_user_agent5 = require_dist_node();
+    var VERSION8 = "7.1.1";
+    var import_request22 = require_dist_node5();
+    var import_request4 = require_dist_node5();
+    function _buildMessageForResponseErrors2(data) {
+      return `Request failed due to following response errors:
+` + data.errors.map((e) => ` - ${e.message}`).join("\n");
+    }
+    var GraphqlResponseError2 = class extends Error {
+      constructor(request22, headers, response) {
+        super(_buildMessageForResponseErrors2(response));
+        this.request = request22;
+        this.headers = headers;
+        this.response = response;
+        this.name = "GraphqlResponseError";
+        this.errors = response.errors;
+        this.data = response.data;
+        if (Error.captureStackTrace) {
+          Error.captureStackTrace(this, this.constructor);
         }
-        function onnext(resolve13, reject) {
-          if (error3) {
-            return reject(error3);
-          }
-          if (entryStream) {
-            resolve13({ value: entryStream, done: false });
-            entryStream = null;
-            return;
-          }
-          promiseResolve = resolve13;
-          promiseReject = reject;
-          consumeCallback(null);
-          if (extract2._finished && promiseResolve) {
-            promiseResolve({ value: void 0, done: true });
-            promiseResolve = promiseReject = null;
-          }
+      }
+    };
+    var NON_VARIABLE_OPTIONS2 = [
+      "method",
+      "baseUrl",
+      "url",
+      "headers",
+      "request",
+      "query",
+      "mediaType"
+    ];
+    var FORBIDDEN_VARIABLE_OPTIONS2 = ["query", "method", "url"];
+    var GHES_V3_SUFFIX_REGEX2 = /\/api\/v3\/?$/;
+    function graphql3(request22, query, options) {
+      if (options) {
+        if (typeof query === "string" && "query" in options) {
+          return Promise.reject(
+            new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
+          );
         }
-        function onentry(header, stream2, callback) {
-          entryCallback = callback;
-          stream2.on("error", noop3);
-          if (promiseResolve) {
-            promiseResolve({ value: stream2, done: false });
-            promiseResolve = promiseReject = null;
-          } else {
-            entryStream = stream2;
-          }
+        for (const key in options) {
+          if (!FORBIDDEN_VARIABLE_OPTIONS2.includes(key)) continue;
+          return Promise.reject(
+            new Error(
+              `[@octokit/graphql] "${key}" cannot be used as variable name`
+            )
+          );
         }
-        function onclose() {
-          consumeCallback(error3);
-          if (!promiseResolve) return;
-          if (error3) promiseReject(error3);
-          else promiseResolve({ value: void 0, done: true });
-          promiseResolve = promiseReject = null;
+      }
+      const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
+      const requestOptions = Object.keys(
+        parsedOptions
+      ).reduce((result, key) => {
+        if (NON_VARIABLE_OPTIONS2.includes(key)) {
+          result[key] = parsedOptions[key];
+          return result;
         }
-        function destroy(err) {
-          extract2.destroy(err);
-          consumeCallback(err);
-          return new Promise((resolve13, reject) => {
-            if (extract2.destroyed) return resolve13({ value: void 0, done: true });
-            extract2.once("close", function() {
-              if (err) reject(err);
-              else resolve13({ value: void 0, done: true });
-            });
-          });
+        if (!result.variables) {
+          result.variables = {};
         }
+        result.variables[key] = parsedOptions[key];
+        return result;
+      }, {});
+      const baseUrl = parsedOptions.baseUrl || request22.endpoint.DEFAULTS.baseUrl;
+      if (GHES_V3_SUFFIX_REGEX2.test(baseUrl)) {
+        requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX2, "/api/graphql");
       }
-    };
-    module2.exports = function extract2(opts) {
-      return new Extract(opts);
-    };
-    function noop3() {
+      return request22(requestOptions).then((response) => {
+        if (response.data.errors) {
+          const headers = {};
+          for (const key of Object.keys(response.headers)) {
+            headers[key] = response.headers[key];
+          }
+          throw new GraphqlResponseError2(
+            requestOptions,
+            headers,
+            response.data
+          );
+        }
+        return response.data.data;
+      });
     }
-    function overflow(size) {
-      size &= 511;
-      return size && 512 - size;
+    function withDefaults4(request22, newDefaults) {
+      const newRequest = request22.defaults(newDefaults);
+      const newApi = (query, options) => {
+        return graphql3(newRequest, query, options);
+      };
+      return Object.assign(newApi, {
+        defaults: withDefaults4.bind(null, newRequest),
+        endpoint: newRequest.endpoint
+      });
+    }
+    var graphql22 = withDefaults4(import_request3.request, {
+      headers: {
+        "user-agent": `octokit-graphql.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`
+      },
+      method: "POST",
+      url: "/graphql"
+    });
+    function withCustomRequest2(customRequest) {
+      return withDefaults4(customRequest, {
+        method: "POST",
+        url: "/graphql"
+      });
     }
   }
 });
 
-// node_modules/tar-stream/constants.js
-var require_constants14 = __commonJS({
-  "node_modules/tar-stream/constants.js"(exports2, module2) {
-    var constants = {
-      // just for envs without fs
-      S_IFMT: 61440,
-      S_IFDIR: 16384,
-      S_IFCHR: 8192,
-      S_IFBLK: 24576,
-      S_IFIFO: 4096,
-      S_IFLNK: 40960
+// node_modules/@actions/artifact/node_modules/@octokit/auth-token/dist-node/index.js
+var require_dist_node7 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) {
+    "use strict";
+    var __defProp2 = Object.defineProperty;
+    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+    var __getOwnPropNames2 = Object.getOwnPropertyNames;
+    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+    var __export2 = (target, all) => {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
     };
-    try {
-      module2.exports = require("fs").constants || constants;
-    } catch {
-      module2.exports = constants;
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+      }
+      return to;
+    };
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var dist_src_exports3 = {};
+    __export2(dist_src_exports3, {
+      createTokenAuth: () => createTokenAuth3
+    });
+    module2.exports = __toCommonJS2(dist_src_exports3);
+    var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
+    var REGEX_IS_INSTALLATION = /^ghs_/;
+    var REGEX_IS_USER_TO_SERVER = /^ghu_/;
+    async function auth2(token) {
+      const isApp = token.split(/\./).length === 3;
+      const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
+      const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
+      const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
+      return {
+        type: "token",
+        token,
+        tokenType
+      };
+    }
+    function withAuthorizationPrefix2(token) {
+      if (token.split(/\./).length === 3) {
+        return `bearer ${token}`;
+      }
+      return `token ${token}`;
     }
+    async function hook2(token, request3, route, parameters) {
+      const endpoint2 = request3.endpoint.merge(
+        route,
+        parameters
+      );
+      endpoint2.headers.authorization = withAuthorizationPrefix2(token);
+      return request3(endpoint2);
+    }
+    var createTokenAuth3 = function createTokenAuth22(token) {
+      if (!token) {
+        throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
+      }
+      if (typeof token !== "string") {
+        throw new Error(
+          "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
+        );
+      }
+      token = token.replace(/^(token|bearer) +/i, "");
+      return Object.assign(auth2.bind(null, token), {
+        hook: hook2.bind(null, token)
+      });
+    };
   }
 });
 
-// node_modules/tar-stream/pack.js
-var require_pack = __commonJS({
-  "node_modules/tar-stream/pack.js"(exports2, module2) {
-    var { Readable: Readable2, Writable, getStreamError } = require_streamx();
-    var b4a = require_b4a();
-    var constants = require_constants14();
-    var headers = require_headers2();
-    var DMODE = 493;
-    var FMODE = 420;
-    var END_OF_TAR = b4a.alloc(1024);
-    var Sink = class extends Writable {
-      constructor(pack, header, callback) {
-        super({ mapWritable, eagerOpen: true });
-        this.written = 0;
-        this.header = header;
-        this._callback = callback;
-        this._linkname = null;
-        this._isLinkname = header.type === "symlink" && !header.linkname;
-        this._isVoid = header.type !== "file" && header.type !== "contiguous-file";
-        this._finished = false;
-        this._pack = pack;
-        this._openCallback = null;
-        if (this._pack._stream === null) this._pack._stream = this;
-        else this._pack._pending.push(this);
-      }
-      _open(cb) {
-        this._openCallback = cb;
-        if (this._pack._stream === this) this._continueOpen();
-      }
-      _continuePack(err) {
-        if (this._callback === null) return;
-        const callback = this._callback;
-        this._callback = null;
-        callback(err);
+// node_modules/@actions/artifact/node_modules/@octokit/core/dist-node/index.js
+var require_dist_node8 = __commonJS({
+  "node_modules/@actions/artifact/node_modules/@octokit/core/dist-node/index.js"(exports2, module2) {
+    "use strict";
+    var __defProp2 = Object.defineProperty;
+    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+    var __getOwnPropNames2 = Object.getOwnPropertyNames;
+    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+    var __export2 = (target, all) => {
+      for (var name in all)
+        __defProp2(target, name, { get: all[name], enumerable: true });
+    };
+    var __copyProps2 = (to, from, except, desc) => {
+      if (from && typeof from === "object" || typeof from === "function") {
+        for (let key of __getOwnPropNames2(from))
+          if (!__hasOwnProp2.call(to, key) && key !== except)
+            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
       }
-      _continueOpen() {
-        if (this._pack._stream === null) this._pack._stream = this;
-        const cb = this._openCallback;
-        this._openCallback = null;
-        if (cb === null) return;
-        if (this._pack.destroying) return cb(new Error("pack stream destroyed"));
-        if (this._pack._finalized) return cb(new Error("pack stream is already finalized"));
-        this._pack._stream = this;
-        if (!this._isLinkname) {
-          this._pack._encode(this.header);
-        }
-        if (this._isVoid) {
-          this._finish();
-          this._continuePack(null);
-        }
-        cb(null);
+      return to;
+    };
+    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+    var index_exports = {};
+    __export2(index_exports, {
+      Octokit: () => Octokit2
+    });
+    module2.exports = __toCommonJS2(index_exports);
+    var import_universal_user_agent5 = require_dist_node();
+    var import_before_after_hook2 = require_before_after_hook();
+    var import_request3 = require_dist_node5();
+    var import_graphql2 = require_dist_node6();
+    var import_auth_token2 = require_dist_node7();
+    var VERSION8 = "5.2.2";
+    var noop3 = () => {
+    };
+    var consoleWarn2 = console.warn.bind(console);
+    var consoleError2 = console.error.bind(console);
+    function createLogger2(logger = {}) {
+      if (typeof logger.debug !== "function") {
+        logger.debug = noop3;
       }
-      _write(data, cb) {
-        if (this._isLinkname) {
-          this._linkname = this._linkname ? b4a.concat([this._linkname, data]) : data;
-          return cb(null);
-        }
-        if (this._isVoid) {
-          if (data.byteLength > 0) {
-            return cb(new Error("No body allowed for this entry"));
-          }
-          return cb();
-        }
-        this.written += data.byteLength;
-        if (this._pack.push(data)) return cb();
-        this._pack._drain = cb;
+      if (typeof logger.info !== "function") {
+        logger.info = noop3;
       }
-      _finish() {
-        if (this._finished) return;
-        this._finished = true;
-        if (this._isLinkname) {
-          this.header.linkname = this._linkname ? b4a.toString(this._linkname, "utf-8") : "";
-          this._pack._encode(this.header);
-        }
-        overflow(this._pack, this.header.size);
-        this._pack._done(this);
+      if (typeof logger.warn !== "function") {
+        logger.warn = consoleWarn2;
       }
-      _final(cb) {
-        if (this.written !== this.header.size) {
-          return cb(new Error("Size mismatch"));
-        }
-        this._finish();
-        cb(null);
+      if (typeof logger.error !== "function") {
+        logger.error = consoleError2;
       }
-      _getError() {
-        return getStreamError(this) || new Error("tar entry destroyed");
+      return logger;
+    }
+    var userAgentTrail2 = `octokit-core.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`;
+    var Octokit2 = class {
+      static {
+        this.VERSION = VERSION8;
       }
-      _predestroy() {
-        this._pack.destroy(this._getError());
+      static defaults(defaults3) {
+        const OctokitWithDefaults = class extends this {
+          constructor(...args) {
+            const options = args[0] || {};
+            if (typeof defaults3 === "function") {
+              super(defaults3(options));
+              return;
+            }
+            super(
+              Object.assign(
+                {},
+                defaults3,
+                options,
+                options.userAgent && defaults3.userAgent ? {
+                  userAgent: `${options.userAgent} ${defaults3.userAgent}`
+                } : null
+              )
+            );
+          }
+        };
+        return OctokitWithDefaults;
       }
-      _destroy(cb) {
-        this._pack._done(this);
-        this._continuePack(this._finished ? null : this._getError());
-        cb();
+      static {
+        this.plugins = [];
       }
-    };
-    var Pack = class extends Readable2 {
-      constructor(opts) {
-        super(opts);
-        this._drain = noop3;
-        this._finalized = false;
-        this._finalizing = false;
-        this._pending = [];
-        this._stream = null;
+      /**
+       * Attach a plugin (or many) to your Octokit instance.
+       *
+       * @example
+       * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
+       */
+      static plugin(...newPlugins) {
+        const currentPlugins = this.plugins;
+        const NewOctokit = class extends this {
+          static {
+            this.plugins = currentPlugins.concat(
+              newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
+            );
+          }
+        };
+        return NewOctokit;
       }
-      entry(header, buffer, callback) {
-        if (this._finalized || this.destroying) throw new Error("already finalized or destroyed");
-        if (typeof buffer === "function") {
-          callback = buffer;
-          buffer = null;
-        }
-        if (!callback) callback = noop3;
-        if (!header.size || header.type === "symlink") header.size = 0;
-        if (!header.type) header.type = modeToType(header.mode);
-        if (!header.mode) header.mode = header.type === "directory" ? DMODE : FMODE;
-        if (!header.uid) header.uid = 0;
-        if (!header.gid) header.gid = 0;
-        if (!header.mtime) header.mtime = /* @__PURE__ */ new Date();
-        if (typeof buffer === "string") buffer = b4a.from(buffer);
-        const sink = new Sink(this, header, callback);
-        if (b4a.isBuffer(buffer)) {
-          header.size = buffer.byteLength;
-          sink.write(buffer);
-          sink.end();
-          return sink;
+      constructor(options = {}) {
+        const hook2 = new import_before_after_hook2.Collection();
+        const requestDefaults = {
+          baseUrl: import_request3.request.endpoint.DEFAULTS.baseUrl,
+          headers: {},
+          request: Object.assign({}, options.request, {
+            // @ts-ignore internal usage only, no need to type
+            hook: hook2.bind(null, "request")
+          }),
+          mediaType: {
+            previews: [],
+            format: ""
+          }
+        };
+        requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail2}` : userAgentTrail2;
+        if (options.baseUrl) {
+          requestDefaults.baseUrl = options.baseUrl;
         }
-        if (sink._isVoid) {
-          return sink;
-        }
-        return sink;
-      }
-      finalize() {
-        if (this._stream || this._pending.length > 0) {
-          this._finalizing = true;
-          return;
-        }
-        if (this._finalized) return;
-        this._finalized = true;
-        this.push(END_OF_TAR);
-        this.push(null);
-      }
-      _done(stream2) {
-        if (stream2 !== this._stream) return;
-        this._stream = null;
-        if (this._finalizing) this.finalize();
-        if (this._pending.length) this._pending.shift()._continueOpen();
-      }
-      _encode(header) {
-        if (!header.pax) {
-          const buf = headers.encode(header);
-          if (buf) {
-            this.push(buf);
-            return;
-          }
-        }
-        this._encodePax(header);
-      }
-      _encodePax(header) {
-        const paxHeader = headers.encodePax({
-          name: header.name,
-          linkname: header.linkname,
-          pax: header.pax
-        });
-        const newHeader = {
-          name: "PaxHeader",
-          mode: header.mode,
-          uid: header.uid,
-          gid: header.gid,
-          size: paxHeader.byteLength,
-          mtime: header.mtime,
-          type: "pax-header",
-          linkname: header.linkname && "PaxHeader",
-          uname: header.uname,
-          gname: header.gname,
-          devmajor: header.devmajor,
-          devminor: header.devminor
-        };
-        this.push(headers.encode(newHeader));
-        this.push(paxHeader);
-        overflow(this, paxHeader.byteLength);
-        newHeader.size = header.size;
-        newHeader.type = header.type;
-        this.push(headers.encode(newHeader));
-      }
-      _doDrain() {
-        const drain = this._drain;
-        this._drain = noop3;
-        drain();
-      }
-      _predestroy() {
-        const err = getStreamError(this);
-        if (this._stream) this._stream.destroy(err);
-        while (this._pending.length) {
-          const stream2 = this._pending.shift();
-          stream2.destroy(err);
-          stream2._continueOpen();
-        }
-        this._doDrain();
-      }
-      _read(cb) {
-        this._doDrain();
-        cb();
-      }
-    };
-    module2.exports = function pack(opts) {
-      return new Pack(opts);
-    };
-    function modeToType(mode) {
-      switch (mode & constants.S_IFMT) {
-        case constants.S_IFBLK:
-          return "block-device";
-        case constants.S_IFCHR:
-          return "character-device";
-        case constants.S_IFDIR:
-          return "directory";
-        case constants.S_IFIFO:
-          return "fifo";
-        case constants.S_IFLNK:
-          return "symlink";
-      }
-      return "file";
-    }
-    function noop3() {
-    }
-    function overflow(self2, size) {
-      size &= 511;
-      if (size) self2.push(END_OF_TAR.subarray(0, 512 - size));
-    }
-    function mapWritable(buf) {
-      return b4a.isBuffer(buf) ? buf : b4a.from(buf);
-    }
-  }
-});
-
-// node_modules/tar-stream/index.js
-var require_tar_stream = __commonJS({
-  "node_modules/tar-stream/index.js"(exports2) {
-    exports2.extract = require_extract();
-    exports2.pack = require_pack();
-  }
-});
-
-// node_modules/archiver/lib/plugins/tar.js
-var require_tar2 = __commonJS({
-  "node_modules/archiver/lib/plugins/tar.js"(exports2, module2) {
-    var zlib3 = require("zlib");
-    var engine = require_tar_stream();
-    var util = require_archiver_utils();
-    var Tar = function(options) {
-      if (!(this instanceof Tar)) {
-        return new Tar(options);
-      }
-      options = this.options = util.defaults(options, {
-        gzip: false
-      });
-      if (typeof options.gzipOptions !== "object") {
-        options.gzipOptions = {};
-      }
-      this.supports = {
-        directory: true,
-        symlink: true
-      };
-      this.engine = engine.pack(options);
-      this.compressor = false;
-      if (options.gzip) {
-        this.compressor = zlib3.createGzip(options.gzipOptions);
-        this.compressor.on("error", this._onCompressorError.bind(this));
-      }
-    };
-    Tar.prototype._onCompressorError = function(err) {
-      this.engine.emit("error", err);
-    };
-    Tar.prototype.append = function(source, data, callback) {
-      var self2 = this;
-      data.mtime = data.date;
-      function append(err, sourceBuffer) {
-        if (err) {
-          callback(err);
-          return;
-        }
-        self2.engine.entry(data, sourceBuffer, function(err2) {
-          callback(err2, data);
-        });
-      }
-      if (data.sourceType === "buffer") {
-        append(null, source);
-      } else if (data.sourceType === "stream" && data.stats) {
-        data.size = data.stats.size;
-        var entry = self2.engine.entry(data, function(err) {
-          callback(err, data);
-        });
-        source.pipe(entry);
-      } else if (data.sourceType === "stream") {
-        util.collectStream(source, append);
-      }
-    };
-    Tar.prototype.finalize = function() {
-      this.engine.finalize();
-    };
-    Tar.prototype.on = function() {
-      return this.engine.on.apply(this.engine, arguments);
-    };
-    Tar.prototype.pipe = function(destination, options) {
-      if (this.compressor) {
-        return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options);
-      } else {
-        return this.engine.pipe.apply(this.engine, arguments);
-      }
-    };
-    Tar.prototype.unpipe = function() {
-      if (this.compressor) {
-        return this.compressor.unpipe.apply(this.compressor, arguments);
-      } else {
-        return this.engine.unpipe.apply(this.engine, arguments);
-      }
-    };
-    module2.exports = Tar;
-  }
-});
-
-// node_modules/buffer-crc32/dist/index.cjs
-var require_dist5 = __commonJS({
-  "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) {
-    "use strict";
-    function getDefaultExportFromCjs(x) {
-      return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
-    }
-    var CRC_TABLE = new Int32Array([
-      0,
-      1996959894,
-      3993919788,
-      2567524794,
-      124634137,
-      1886057615,
-      3915621685,
-      2657392035,
-      249268274,
-      2044508324,
-      3772115230,
-      2547177864,
-      162941995,
-      2125561021,
-      3887607047,
-      2428444049,
-      498536548,
-      1789927666,
-      4089016648,
-      2227061214,
-      450548861,
-      1843258603,
-      4107580753,
-      2211677639,
-      325883990,
-      1684777152,
-      4251122042,
-      2321926636,
-      335633487,
-      1661365465,
-      4195302755,
-      2366115317,
-      997073096,
-      1281953886,
-      3579855332,
-      2724688242,
-      1006888145,
-      1258607687,
-      3524101629,
-      2768942443,
-      901097722,
-      1119000684,
-      3686517206,
-      2898065728,
-      853044451,
-      1172266101,
-      3705015759,
-      2882616665,
-      651767980,
-      1373503546,
-      3369554304,
-      3218104598,
-      565507253,
-      1454621731,
-      3485111705,
-      3099436303,
-      671266974,
-      1594198024,
-      3322730930,
-      2970347812,
-      795835527,
-      1483230225,
-      3244367275,
-      3060149565,
-      1994146192,
-      31158534,
-      2563907772,
-      4023717930,
-      1907459465,
-      112637215,
-      2680153253,
-      3904427059,
-      2013776290,
-      251722036,
-      2517215374,
-      3775830040,
-      2137656763,
-      141376813,
-      2439277719,
-      3865271297,
-      1802195444,
-      476864866,
-      2238001368,
-      4066508878,
-      1812370925,
-      453092731,
-      2181625025,
-      4111451223,
-      1706088902,
-      314042704,
-      2344532202,
-      4240017532,
-      1658658271,
-      366619977,
-      2362670323,
-      4224994405,
-      1303535960,
-      984961486,
-      2747007092,
-      3569037538,
-      1256170817,
-      1037604311,
-      2765210733,
-      3554079995,
-      1131014506,
-      879679996,
-      2909243462,
-      3663771856,
-      1141124467,
-      855842277,
-      2852801631,
-      3708648649,
-      1342533948,
-      654459306,
-      3188396048,
-      3373015174,
-      1466479909,
-      544179635,
-      3110523913,
-      3462522015,
-      1591671054,
-      702138776,
-      2966460450,
-      3352799412,
-      1504918807,
-      783551873,
-      3082640443,
-      3233442989,
-      3988292384,
-      2596254646,
-      62317068,
-      1957810842,
-      3939845945,
-      2647816111,
-      81470997,
-      1943803523,
-      3814918930,
-      2489596804,
-      225274430,
-      2053790376,
-      3826175755,
-      2466906013,
-      167816743,
-      2097651377,
-      4027552580,
-      2265490386,
-      503444072,
-      1762050814,
-      4150417245,
-      2154129355,
-      426522225,
-      1852507879,
-      4275313526,
-      2312317920,
-      282753626,
-      1742555852,
-      4189708143,
-      2394877945,
-      397917763,
-      1622183637,
-      3604390888,
-      2714866558,
-      953729732,
-      1340076626,
-      3518719985,
-      2797360999,
-      1068828381,
-      1219638859,
-      3624741850,
-      2936675148,
-      906185462,
-      1090812512,
-      3747672003,
-      2825379669,
-      829329135,
-      1181335161,
-      3412177804,
-      3160834842,
-      628085408,
-      1382605366,
-      3423369109,
-      3138078467,
-      570562233,
-      1426400815,
-      3317316542,
-      2998733608,
-      733239954,
-      1555261956,
-      3268935591,
-      3050360625,
-      752459403,
-      1541320221,
-      2607071920,
-      3965973030,
-      1969922972,
-      40735498,
-      2617837225,
-      3943577151,
-      1913087877,
-      83908371,
-      2512341634,
-      3803740692,
-      2075208622,
-      213261112,
-      2463272603,
-      3855990285,
-      2094854071,
-      198958881,
-      2262029012,
-      4057260610,
-      1759359992,
-      534414190,
-      2176718541,
-      4139329115,
-      1873836001,
-      414664567,
-      2282248934,
-      4279200368,
-      1711684554,
-      285281116,
-      2405801727,
-      4167216745,
-      1634467795,
-      376229701,
-      2685067896,
-      3608007406,
-      1308918612,
-      956543938,
-      2808555105,
-      3495958263,
-      1231636301,
-      1047427035,
-      2932959818,
-      3654703836,
-      1088359270,
-      936918e3,
-      2847714899,
-      3736837829,
-      1202900863,
-      817233897,
-      3183342108,
-      3401237130,
-      1404277552,
-      615818150,
-      3134207493,
-      3453421203,
-      1423857449,
-      601450431,
-      3009837614,
-      3294710456,
-      1567103746,
-      711928724,
-      3020668471,
-      3272380065,
-      1510334235,
-      755167117
-    ]);
-    function ensureBuffer(input) {
-      if (Buffer.isBuffer(input)) {
-        return input;
-      }
-      if (typeof input === "number") {
-        return Buffer.alloc(input);
-      } else if (typeof input === "string") {
-        return Buffer.from(input);
-      } else {
-        throw new Error("input must be buffer, number, or string, received " + typeof input);
-      }
-    }
-    function bufferizeInt(num) {
-      const tmp = ensureBuffer(4);
-      tmp.writeInt32BE(num, 0);
-      return tmp;
-    }
-    function _crc32(buf, previous) {
-      buf = ensureBuffer(buf);
-      if (Buffer.isBuffer(previous)) {
-        previous = previous.readUInt32BE(0);
-      }
-      let crc = ~~previous ^ -1;
-      for (var n = 0; n < buf.length; n++) {
-        crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
-      }
-      return crc ^ -1;
-    }
-    function crc32() {
-      return bufferizeInt(_crc32.apply(null, arguments));
-    }
-    crc32.signed = function() {
-      return _crc32.apply(null, arguments);
-    };
-    crc32.unsigned = function() {
-      return _crc32.apply(null, arguments) >>> 0;
-    };
-    var bufferCrc32 = crc32;
-    var index = /* @__PURE__ */ getDefaultExportFromCjs(bufferCrc32);
-    module2.exports = index;
-  }
-});
-
-// node_modules/archiver/lib/plugins/json.js
-var require_json = __commonJS({
-  "node_modules/archiver/lib/plugins/json.js"(exports2, module2) {
-    var inherits = require("util").inherits;
-    var Transform = require_ours().Transform;
-    var crc32 = require_dist5();
-    var util = require_archiver_utils();
-    var Json = function(options) {
-      if (!(this instanceof Json)) {
-        return new Json(options);
-      }
-      options = this.options = util.defaults(options, {});
-      Transform.call(this, options);
-      this.supports = {
-        directory: true,
-        symlink: true
-      };
-      this.files = [];
-    };
-    inherits(Json, Transform);
-    Json.prototype._transform = function(chunk, encoding, callback) {
-      callback(null, chunk);
-    };
-    Json.prototype._writeStringified = function() {
-      var fileString = JSON.stringify(this.files);
-      this.write(fileString);
-    };
-    Json.prototype.append = function(source, data, callback) {
-      var self2 = this;
-      data.crc32 = 0;
-      function onend(err, sourceBuffer) {
-        if (err) {
-          callback(err);
-          return;
-        }
-        data.size = sourceBuffer.length || 0;
-        data.crc32 = crc32.unsigned(sourceBuffer);
-        self2.files.push(data);
-        callback(null, data);
-      }
-      if (data.sourceType === "buffer") {
-        onend(null, source);
-      } else if (data.sourceType === "stream") {
-        util.collectStream(source, onend);
-      }
-    };
-    Json.prototype.finalize = function() {
-      this._writeStringified();
-      this.end();
-    };
-    module2.exports = Json;
-  }
-});
-
-// node_modules/archiver/index.js
-var require_archiver = __commonJS({
-  "node_modules/archiver/index.js"(exports2, module2) {
-    var Archiver = require_core2();
-    var formats = {};
-    var vending = function(format, options) {
-      return vending.create(format, options);
-    };
-    vending.create = function(format, options) {
-      if (formats[format]) {
-        var instance = new Archiver(format, options);
-        instance.setFormat(format);
-        instance.setModule(new formats[format](options));
-        return instance;
-      } else {
-        throw new Error("create(" + format + "): format not registered");
-      }
-    };
-    vending.registerFormat = function(format, module3) {
-      if (formats[format]) {
-        throw new Error("register(" + format + "): format already registered");
-      }
-      if (typeof module3 !== "function") {
-        throw new Error("register(" + format + "): format module invalid");
-      }
-      if (typeof module3.prototype.append !== "function" || typeof module3.prototype.finalize !== "function") {
-        throw new Error("register(" + format + "): format module missing methods");
-      }
-      formats[format] = module3;
-    };
-    vending.isRegisteredFormat = function(format) {
-      if (formats[format]) {
-        return true;
-      }
-      return false;
-    };
-    vending.registerFormat("zip", require_zip());
-    vending.registerFormat("tar", require_tar2());
-    vending.registerFormat("json", require_json());
-    module2.exports = vending;
-  }
-});
-
-// node_modules/@actions/artifact/lib/internal/upload/zip.js
-var require_zip2 = __commonJS({
-  "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) {
-    "use strict";
-    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      var desc = Object.getOwnPropertyDescriptor(m, k);
-      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-        desc = { enumerable: true, get: function() {
-          return m[k];
-        } };
-      }
-      Object.defineProperty(o, k2, desc);
-    }) : (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      o[k2] = m[k];
-    }));
-    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
-      Object.defineProperty(o, "default", { enumerable: true, value: v });
-    }) : function(o, v) {
-      o["default"] = v;
-    });
-    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
-      if (mod && mod.__esModule) return mod;
-      var result = {};
-      if (mod != null) {
-        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
-      }
-      __setModuleDefault2(result, mod);
-      return result;
-    };
-    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
-      function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
-        });
-      }
-      return new (P || (P = Promise))(function(resolve13, 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 ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
-        }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-      });
-    };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.createZipUploadStream = exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0;
-    var stream2 = __importStar2(require("stream"));
-    var promises_1 = require("fs/promises");
-    var archiver2 = __importStar2(require_archiver());
-    var core31 = __importStar2(require_core());
-    var config_1 = require_config2();
-    exports2.DEFAULT_COMPRESSION_LEVEL = 6;
-    var ZipUploadStream = class extends stream2.Transform {
-      constructor(bufferSize) {
-        super({
-          highWaterMark: bufferSize
-        });
-      }
-      // eslint-disable-next-line @typescript-eslint/no-explicit-any
-      _transform(chunk, enc, cb) {
-        cb(null, chunk);
-      }
-    };
-    exports2.ZipUploadStream = ZipUploadStream;
-    function createZipUploadStream(uploadSpecification_1) {
-      return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) {
-        core31.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`);
-        const zip = archiver2.create("zip", {
-          highWaterMark: (0, config_1.getUploadChunkSize)(),
-          zlib: { level: compressionLevel }
-        });
-        zip.on("error", zipErrorCallback);
-        zip.on("warning", zipWarningCallback);
-        zip.on("finish", zipFinishCallback);
-        zip.on("end", zipEndCallback);
-        for (const file of uploadSpecification) {
-          if (file.sourcePath !== null) {
-            let sourcePath = file.sourcePath;
-            if (file.stats.isSymbolicLink()) {
-              sourcePath = yield (0, promises_1.realpath)(file.sourcePath);
-            }
-            zip.file(sourcePath, {
-              name: file.destinationPath
-            });
-          } else {
-            zip.append("", { name: file.destinationPath });
-          }
-        }
-        const bufferSize = (0, config_1.getUploadChunkSize)();
-        const zipUploadStream = new ZipUploadStream(bufferSize);
-        core31.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`);
-        core31.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`);
-        zip.pipe(zipUploadStream);
-        zip.finalize();
-        return zipUploadStream;
-      });
-    }
-    exports2.createZipUploadStream = createZipUploadStream;
-    var zipErrorCallback = (error3) => {
-      core31.error("An error has occurred while creating the zip file for upload");
-      core31.info(error3);
-      throw new Error("An error has occurred during zip creation for the artifact");
-    };
-    var zipWarningCallback = (error3) => {
-      if (error3.code === "ENOENT") {
-        core31.warning("ENOENT warning during artifact zip creation. No such file or directory");
-        core31.info(error3);
-      } else {
-        core31.warning(`A non-blocking warning has occurred during artifact zip creation: ${error3.code}`);
-        core31.info(error3);
-      }
-    };
-    var zipFinishCallback = () => {
-      core31.debug("Zip stream for upload has finished.");
-    };
-    var zipEndCallback = () => {
-      core31.debug("Zip stream for upload has ended.");
-    };
-  }
-});
-
-// node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js
-var require_upload_artifact = __commonJS({
-  "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) {
-    "use strict";
-    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      var desc = Object.getOwnPropertyDescriptor(m, k);
-      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-        desc = { enumerable: true, get: function() {
-          return m[k];
-        } };
-      }
-      Object.defineProperty(o, k2, desc);
-    }) : (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      o[k2] = m[k];
-    }));
-    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
-      Object.defineProperty(o, "default", { enumerable: true, value: v });
-    }) : function(o, v) {
-      o["default"] = v;
-    });
-    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
-      if (mod && mod.__esModule) return mod;
-      var result = {};
-      if (mod != null) {
-        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
-      }
-      __setModuleDefault2(result, mod);
-      return result;
-    };
-    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
-      function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
-        });
-      }
-      return new (P || (P = Promise))(function(resolve13, 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 ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
-        }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-      });
-    };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.uploadArtifact = void 0;
-    var core31 = __importStar2(require_core());
-    var retention_1 = require_retention();
-    var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation();
-    var artifact_twirp_client_1 = require_artifact_twirp_client2();
-    var upload_zip_specification_1 = require_upload_zip_specification();
-    var util_1 = require_util11();
-    var blob_upload_1 = require_blob_upload();
-    var zip_1 = require_zip2();
-    var generated_1 = require_generated();
-    var errors_1 = require_errors3();
-    function uploadArtifact(name, files, rootDirectory, options) {
-      return __awaiter2(this, void 0, void 0, function* () {
-        (0, path_and_artifact_name_validation_1.validateArtifactName)(name);
-        (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory);
-        const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory);
-        if (zipSpecification.length === 0) {
-          throw new errors_1.FilesNotFoundError(zipSpecification.flatMap((s) => s.sourcePath ? [s.sourcePath] : []));
-        }
-        const backendIds = (0, util_1.getBackendIdsFromToken)();
-        const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
-        const createArtifactReq = {
-          workflowRunBackendId: backendIds.workflowRunBackendId,
-          workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
-          name,
-          version: 4
-        };
-        const expiresAt = (0, retention_1.getExpiration)(options === null || options === void 0 ? void 0 : options.retentionDays);
-        if (expiresAt) {
-          createArtifactReq.expiresAt = expiresAt;
-        }
-        const createArtifactResp = yield artifactClient.CreateArtifact(createArtifactReq);
-        if (!createArtifactResp.ok) {
-          throw new errors_1.InvalidResponseError("CreateArtifact: response from backend was not ok");
-        }
-        const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel);
-        const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream);
-        const finalizeArtifactReq = {
-          workflowRunBackendId: backendIds.workflowRunBackendId,
-          workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
-          name,
-          size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : "0"
-        };
-        if (uploadResult.sha256Hash) {
-          finalizeArtifactReq.hash = generated_1.StringValue.create({
-            value: `sha256:${uploadResult.sha256Hash}`
-          });
-        }
-        core31.info(`Finalizing artifact upload`);
-        const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq);
-        if (!finalizeArtifactResp.ok) {
-          throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok");
-        }
-        const artifactId = BigInt(finalizeArtifactResp.artifactId);
-        core31.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
-        return {
-          size: uploadResult.uploadSize,
-          digest: uploadResult.sha256Hash,
-          id: Number(artifactId)
-        };
-      });
-    }
-    exports2.uploadArtifact = uploadArtifact;
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@actions/github/lib/context.js
-var require_context2 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@actions/github/lib/context.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.Context = void 0;
-    var fs_1 = require("fs");
-    var os_1 = require("os");
-    var Context = class {
-      /**
-       * Hydrate the context from the environment
-       */
-      constructor() {
-        var _a, _b, _c;
-        this.payload = {};
-        if (process.env.GITHUB_EVENT_PATH) {
-          if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {
-            this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" }));
-          } else {
-            const path28 = process.env.GITHUB_EVENT_PATH;
-            process.stdout.write(`GITHUB_EVENT_PATH ${path28} does not exist${os_1.EOL}`);
-          }
-        }
-        this.eventName = process.env.GITHUB_EVENT_NAME;
-        this.sha = process.env.GITHUB_SHA;
-        this.ref = process.env.GITHUB_REF;
-        this.workflow = process.env.GITHUB_WORKFLOW;
-        this.action = process.env.GITHUB_ACTION;
-        this.actor = process.env.GITHUB_ACTOR;
-        this.job = process.env.GITHUB_JOB;
-        this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
-        this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
-        this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
-        this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
-        this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
-        this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
-      }
-      get issue() {
-        const payload = this.payload;
-        return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
-      }
-      get repo() {
-        if (process.env.GITHUB_REPOSITORY) {
-          const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
-          return { owner, repo };
-        }
-        if (this.payload.repository) {
-          return {
-            owner: this.payload.repository.owner.login,
-            repo: this.payload.repository.name
-          };
-        }
-        throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
-      }
-    };
-    exports2.Context = Context;
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js
-var require_proxy2 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.checkBypass = exports2.getProxyUrl = void 0;
-    function getProxyUrl(reqUrl) {
-      const usingSsl = reqUrl.protocol === "https:";
-      if (checkBypass(reqUrl)) {
-        return void 0;
-      }
-      const proxyVar = (() => {
-        if (usingSsl) {
-          return process.env["https_proxy"] || process.env["HTTPS_PROXY"];
-        } else {
-          return process.env["http_proxy"] || process.env["HTTP_PROXY"];
-        }
-      })();
-      if (proxyVar) {
-        try {
-          return new DecodedURL(proxyVar);
-        } catch (_a) {
-          if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
-            return new DecodedURL(`http://${proxyVar}`);
-        }
-      } else {
-        return void 0;
-      }
-    }
-    exports2.getProxyUrl = getProxyUrl;
-    function checkBypass(reqUrl) {
-      if (!reqUrl.hostname) {
-        return false;
-      }
-      const reqHost = reqUrl.hostname;
-      if (isLoopbackAddress(reqHost)) {
-        return true;
-      }
-      const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || "";
-      if (!noProxy) {
-        return false;
-      }
-      let reqPort;
-      if (reqUrl.port) {
-        reqPort = Number(reqUrl.port);
-      } else if (reqUrl.protocol === "http:") {
-        reqPort = 80;
-      } else if (reqUrl.protocol === "https:") {
-        reqPort = 443;
-      }
-      const upperReqHosts = [reqUrl.hostname.toUpperCase()];
-      if (typeof reqPort === "number") {
-        upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
-      }
-      for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) {
-        if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) {
-          return true;
-        }
-      }
-      return false;
-    }
-    exports2.checkBypass = checkBypass;
-    function isLoopbackAddress(host) {
-      const hostLower = host.toLowerCase();
-      return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
-    }
-    var DecodedURL = class extends URL {
-      constructor(url2, base) {
-        super(url2, base);
-        this._decodedUsername = decodeURIComponent(super.username);
-        this._decodedPassword = decodeURIComponent(super.password);
-      }
-      get username() {
-        return this._decodedUsername;
-      }
-      get password() {
-        return this._decodedPassword;
-      }
-    };
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js
-var require_lib4 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) {
-    "use strict";
-    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      var desc = Object.getOwnPropertyDescriptor(m, k);
-      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-        desc = { enumerable: true, get: function() {
-          return m[k];
-        } };
-      }
-      Object.defineProperty(o, k2, desc);
-    }) : (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      o[k2] = m[k];
-    }));
-    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
-      Object.defineProperty(o, "default", { enumerable: true, value: v });
-    }) : function(o, v) {
-      o["default"] = v;
-    });
-    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
-      if (mod && mod.__esModule) return mod;
-      var result = {};
-      if (mod != null) {
-        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
-      }
-      __setModuleDefault2(result, mod);
-      return result;
-    };
-    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
-      function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
-        });
-      }
-      return new (P || (P = Promise))(function(resolve13, 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 ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
-        }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-      });
-    };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0;
-    var http = __importStar2(require("http"));
-    var https3 = __importStar2(require("https"));
-    var pm = __importStar2(require_proxy2());
-    var tunnel = __importStar2(require_tunnel2());
-    var undici_1 = require_undici();
-    var HttpCodes;
-    (function(HttpCodes2) {
-      HttpCodes2[HttpCodes2["OK"] = 200] = "OK";
-      HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices";
-      HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently";
-      HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved";
-      HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther";
-      HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified";
-      HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy";
-      HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy";
-      HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
-      HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect";
-      HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest";
-      HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized";
-      HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired";
-      HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden";
-      HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound";
-      HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
-      HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable";
-      HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
-      HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout";
-      HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict";
-      HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone";
-      HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests";
-      HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError";
-      HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented";
-      HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
-      HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
-      HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
-    })(HttpCodes || (exports2.HttpCodes = HttpCodes = {}));
-    var Headers;
-    (function(Headers2) {
-      Headers2["Accept"] = "accept";
-      Headers2["ContentType"] = "content-type";
-    })(Headers || (exports2.Headers = Headers = {}));
-    var MediaTypes;
-    (function(MediaTypes2) {
-      MediaTypes2["ApplicationJson"] = "application/json";
-    })(MediaTypes || (exports2.MediaTypes = MediaTypes = {}));
-    function getProxyUrl(serverUrl) {
-      const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
-      return proxyUrl ? proxyUrl.href : "";
-    }
-    exports2.getProxyUrl = getProxyUrl;
-    var HttpRedirectCodes = [
-      HttpCodes.MovedPermanently,
-      HttpCodes.ResourceMoved,
-      HttpCodes.SeeOther,
-      HttpCodes.TemporaryRedirect,
-      HttpCodes.PermanentRedirect
-    ];
-    var HttpResponseRetryCodes = [
-      HttpCodes.BadGateway,
-      HttpCodes.ServiceUnavailable,
-      HttpCodes.GatewayTimeout
-    ];
-    var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"];
-    var ExponentialBackoffCeiling = 10;
-    var ExponentialBackoffTimeSlice = 5;
-    var HttpClientError = class _HttpClientError extends Error {
-      constructor(message, statusCode) {
-        super(message);
-        this.name = "HttpClientError";
-        this.statusCode = statusCode;
-        Object.setPrototypeOf(this, _HttpClientError.prototype);
-      }
-    };
-    exports2.HttpClientError = HttpClientError;
-    var HttpClientResponse = class {
-      constructor(message) {
-        this.message = message;
-      }
-      readBody() {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () {
-            let output = Buffer.alloc(0);
-            this.message.on("data", (chunk) => {
-              output = Buffer.concat([output, chunk]);
-            });
-            this.message.on("end", () => {
-              resolve13(output.toString());
-            });
-          }));
-        });
-      }
-      readBodyBuffer() {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () {
-            const chunks = [];
-            this.message.on("data", (chunk) => {
-              chunks.push(chunk);
-            });
-            this.message.on("end", () => {
-              resolve13(Buffer.concat(chunks));
-            });
-          }));
-        });
-      }
-    };
-    exports2.HttpClientResponse = HttpClientResponse;
-    function isHttps(requestUrl) {
-      const parsedUrl = new URL(requestUrl);
-      return parsedUrl.protocol === "https:";
-    }
-    exports2.isHttps = isHttps;
-    var HttpClient2 = class {
-      constructor(userAgent2, handlers, requestOptions) {
-        this._ignoreSslError = false;
-        this._allowRedirects = true;
-        this._allowRedirectDowngrade = false;
-        this._maxRedirects = 50;
-        this._allowRetries = false;
-        this._maxRetries = 1;
-        this._keepAlive = false;
-        this._disposed = false;
-        this.userAgent = userAgent2;
-        this.handlers = handlers || [];
-        this.requestOptions = requestOptions;
-        if (requestOptions) {
-          if (requestOptions.ignoreSslError != null) {
-            this._ignoreSslError = requestOptions.ignoreSslError;
-          }
-          this._socketTimeout = requestOptions.socketTimeout;
-          if (requestOptions.allowRedirects != null) {
-            this._allowRedirects = requestOptions.allowRedirects;
-          }
-          if (requestOptions.allowRedirectDowngrade != null) {
-            this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
-          }
-          if (requestOptions.maxRedirects != null) {
-            this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
-          }
-          if (requestOptions.keepAlive != null) {
-            this._keepAlive = requestOptions.keepAlive;
-          }
-          if (requestOptions.allowRetries != null) {
-            this._allowRetries = requestOptions.allowRetries;
-          }
-          if (requestOptions.maxRetries != null) {
-            this._maxRetries = requestOptions.maxRetries;
-          }
-        }
-      }
-      options(requestUrl, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("OPTIONS", requestUrl, null, additionalHeaders || {});
-        });
-      }
-      get(requestUrl, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("GET", requestUrl, null, additionalHeaders || {});
-        });
-      }
-      del(requestUrl, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("DELETE", requestUrl, null, additionalHeaders || {});
-        });
-      }
-      post(requestUrl, data, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("POST", requestUrl, data, additionalHeaders || {});
-        });
-      }
-      patch(requestUrl, data, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("PATCH", requestUrl, data, additionalHeaders || {});
-        });
-      }
-      put(requestUrl, data, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("PUT", requestUrl, data, additionalHeaders || {});
-        });
-      }
-      head(requestUrl, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request("HEAD", requestUrl, null, additionalHeaders || {});
-        });
-      }
-      sendStream(verb, requestUrl, stream2, additionalHeaders) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return this.request(verb, requestUrl, stream2, additionalHeaders);
-        });
-      }
-      /**
-       * Gets a typed object from an endpoint
-       * Be aware that not found returns a null.  Other errors (4xx, 5xx) reject the promise
-       */
-      getJson(requestUrl, additionalHeaders = {}) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
-          const res = yield this.get(requestUrl, additionalHeaders);
-          return this._processResponse(res, this.requestOptions);
-        });
-      }
-      postJson(requestUrl, obj, additionalHeaders = {}) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          const data = JSON.stringify(obj, null, 2);
-          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
-          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
-          const res = yield this.post(requestUrl, data, additionalHeaders);
-          return this._processResponse(res, this.requestOptions);
-        });
-      }
-      putJson(requestUrl, obj, additionalHeaders = {}) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          const data = JSON.stringify(obj, null, 2);
-          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
-          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
-          const res = yield this.put(requestUrl, data, additionalHeaders);
-          return this._processResponse(res, this.requestOptions);
-        });
-      }
-      patchJson(requestUrl, obj, additionalHeaders = {}) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          const data = JSON.stringify(obj, null, 2);
-          additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
-          additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
-          const res = yield this.patch(requestUrl, data, additionalHeaders);
-          return this._processResponse(res, this.requestOptions);
-        });
-      }
-      /**
-       * Makes a raw http request.
-       * All other methods such as get, post, patch, and request ultimately call this.
-       * Prefer get, del, post and patch
-       */
-      request(verb, requestUrl, data, headers) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          if (this._disposed) {
-            throw new Error("Client has already been disposed.");
-          }
-          const parsedUrl = new URL(requestUrl);
-          let info8 = this._prepareRequest(verb, parsedUrl, headers);
-          const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1;
-          let numTries = 0;
-          let response;
-          do {
-            response = yield this.requestRaw(info8, data);
-            if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
-              let authenticationHandler;
-              for (const handler2 of this.handlers) {
-                if (handler2.canHandleAuthentication(response)) {
-                  authenticationHandler = handler2;
-                  break;
-                }
-              }
-              if (authenticationHandler) {
-                return authenticationHandler.handleAuthentication(this, info8, data);
-              } else {
-                return response;
-              }
-            }
-            let redirectsRemaining = this._maxRedirects;
-            while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) {
-              const redirectUrl = response.message.headers["location"];
-              if (!redirectUrl) {
-                break;
-              }
-              const parsedRedirectUrl = new URL(redirectUrl);
-              if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
-                throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
-              }
-              yield response.readBody();
-              if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
-                for (const header in headers) {
-                  if (header.toLowerCase() === "authorization") {
-                    delete headers[header];
-                  }
-                }
-              }
-              info8 = this._prepareRequest(verb, parsedRedirectUrl, headers);
-              response = yield this.requestRaw(info8, data);
-              redirectsRemaining--;
-            }
-            if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) {
-              return response;
-            }
-            numTries += 1;
-            if (numTries < maxTries) {
-              yield response.readBody();
-              yield this._performExponentialBackoff(numTries);
-            }
-          } while (numTries < maxTries);
-          return response;
-        });
-      }
-      /**
-       * Needs to be called if keepAlive is set to true in request options.
-       */
-      dispose() {
-        if (this._agent) {
-          this._agent.destroy();
-        }
-        this._disposed = true;
-      }
-      /**
-       * Raw request.
-       * @param info
-       * @param data
-       */
-      requestRaw(info8, data) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13, reject) => {
-            function callbackForResult(err, res) {
-              if (err) {
-                reject(err);
-              } else if (!res) {
-                reject(new Error("Unknown error"));
-              } else {
-                resolve13(res);
-              }
-            }
-            this.requestRawWithCallback(info8, data, callbackForResult);
-          });
-        });
-      }
-      /**
-       * Raw request with callback.
-       * @param info
-       * @param data
-       * @param onResult
-       */
-      requestRawWithCallback(info8, data, onResult) {
-        if (typeof data === "string") {
-          if (!info8.options.headers) {
-            info8.options.headers = {};
-          }
-          info8.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8");
-        }
-        let callbackCalled = false;
-        function handleResult(err, res) {
-          if (!callbackCalled) {
-            callbackCalled = true;
-            onResult(err, res);
-          }
-        }
-        const req = info8.httpModule.request(info8.options, (msg) => {
-          const res = new HttpClientResponse(msg);
-          handleResult(void 0, res);
-        });
-        let socket;
-        req.on("socket", (sock) => {
-          socket = sock;
-        });
-        req.setTimeout(this._socketTimeout || 3 * 6e4, () => {
-          if (socket) {
-            socket.end();
-          }
-          handleResult(new Error(`Request timeout: ${info8.options.path}`));
-        });
-        req.on("error", function(err) {
-          handleResult(err);
-        });
-        if (data && typeof data === "string") {
-          req.write(data, "utf8");
-        }
-        if (data && typeof data !== "string") {
-          data.on("close", function() {
-            req.end();
-          });
-          data.pipe(req);
-        } else {
-          req.end();
-        }
-      }
-      /**
-       * Gets an http agent. This function is useful when you need an http agent that handles
-       * routing through a proxy server - depending upon the url and proxy environment variables.
-       * @param serverUrl  The server URL where the request will be sent. For example, https://api.github.com
-       */
-      getAgent(serverUrl) {
-        const parsedUrl = new URL(serverUrl);
-        return this._getAgent(parsedUrl);
-      }
-      getAgentDispatcher(serverUrl) {
-        const parsedUrl = new URL(serverUrl);
-        const proxyUrl = pm.getProxyUrl(parsedUrl);
-        const useProxy = proxyUrl && proxyUrl.hostname;
-        if (!useProxy) {
-          return;
-        }
-        return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
-      }
-      _prepareRequest(method, requestUrl, headers) {
-        const info8 = {};
-        info8.parsedUrl = requestUrl;
-        const usingSsl = info8.parsedUrl.protocol === "https:";
-        info8.httpModule = usingSsl ? https3 : http;
-        const defaultPort = usingSsl ? 443 : 80;
-        info8.options = {};
-        info8.options.host = info8.parsedUrl.hostname;
-        info8.options.port = info8.parsedUrl.port ? parseInt(info8.parsedUrl.port) : defaultPort;
-        info8.options.path = (info8.parsedUrl.pathname || "") + (info8.parsedUrl.search || "");
-        info8.options.method = method;
-        info8.options.headers = this._mergeHeaders(headers);
-        if (this.userAgent != null) {
-          info8.options.headers["user-agent"] = this.userAgent;
-        }
-        info8.options.agent = this._getAgent(info8.parsedUrl);
-        if (this.handlers) {
-          for (const handler2 of this.handlers) {
-            handler2.prepareRequest(info8.options);
-          }
-        }
-        return info8;
-      }
-      _mergeHeaders(headers) {
-        if (this.requestOptions && this.requestOptions.headers) {
-          return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {}));
-        }
-        return lowercaseKeys2(headers || {});
-      }
-      _getExistingOrDefaultHeader(additionalHeaders, header, _default2) {
-        let clientHeader;
-        if (this.requestOptions && this.requestOptions.headers) {
-          clientHeader = lowercaseKeys2(this.requestOptions.headers)[header];
-        }
-        return additionalHeaders[header] || clientHeader || _default2;
-      }
-      _getAgent(parsedUrl) {
-        let agent;
-        const proxyUrl = pm.getProxyUrl(parsedUrl);
-        const useProxy = proxyUrl && proxyUrl.hostname;
-        if (this._keepAlive && useProxy) {
-          agent = this._proxyAgent;
-        }
-        if (!useProxy) {
-          agent = this._agent;
-        }
-        if (agent) {
-          return agent;
-        }
-        const usingSsl = parsedUrl.protocol === "https:";
-        let maxSockets = 100;
-        if (this.requestOptions) {
-          maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
-        }
-        if (proxyUrl && proxyUrl.hostname) {
-          const agentOptions = {
-            maxSockets,
-            keepAlive: this._keepAlive,
-            proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && {
-              proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
-            }), { host: proxyUrl.hostname, port: proxyUrl.port })
-          };
-          let tunnelAgent;
-          const overHttps = proxyUrl.protocol === "https:";
-          if (usingSsl) {
-            tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
-          } else {
-            tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
-          }
-          agent = tunnelAgent(agentOptions);
-          this._proxyAgent = agent;
-        }
-        if (!agent) {
-          const options = { keepAlive: this._keepAlive, maxSockets };
-          agent = usingSsl ? new https3.Agent(options) : new http.Agent(options);
-          this._agent = agent;
-        }
-        if (usingSsl && this._ignoreSslError) {
-          agent.options = Object.assign(agent.options || {}, {
-            rejectUnauthorized: false
-          });
-        }
-        return agent;
-      }
-      _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
-        let proxyAgent;
-        if (this._keepAlive) {
-          proxyAgent = this._proxyAgentDispatcher;
-        }
-        if (proxyAgent) {
-          return proxyAgent;
-        }
-        const usingSsl = parsedUrl.protocol === "https:";
-        proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && {
-          token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}`
-        }));
-        this._proxyAgentDispatcher = proxyAgent;
-        if (usingSsl && this._ignoreSslError) {
-          proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
-            rejectUnauthorized: false
-          });
-        }
-        return proxyAgent;
-      }
-      _performExponentialBackoff(retryNumber) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
-          const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
-          return new Promise((resolve13) => setTimeout(() => resolve13(), ms));
-        });
-      }
-      _processResponse(res, options) {
-        return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13, reject) => __awaiter2(this, void 0, void 0, function* () {
-            const statusCode = res.message.statusCode || 0;
-            const response = {
-              statusCode,
-              result: null,
-              headers: {}
-            };
-            if (statusCode === HttpCodes.NotFound) {
-              resolve13(response);
-            }
-            function dateTimeDeserializer(key, value) {
-              if (typeof value === "string") {
-                const a = new Date(value);
-                if (!isNaN(a.valueOf())) {
-                  return a;
-                }
-              }
-              return value;
-            }
-            let obj;
-            let contents;
-            try {
-              contents = yield res.readBody();
-              if (contents && contents.length > 0) {
-                if (options && options.deserializeDates) {
-                  obj = JSON.parse(contents, dateTimeDeserializer);
-                } else {
-                  obj = JSON.parse(contents);
-                }
-                response.result = obj;
-              }
-              response.headers = res.message.headers;
-            } catch (err) {
-            }
-            if (statusCode > 299) {
-              let msg;
-              if (obj && obj.message) {
-                msg = obj.message;
-              } else if (contents && contents.length > 0) {
-                msg = contents;
-              } else {
-                msg = `Failed request: (${statusCode})`;
-              }
-              const err = new HttpClientError(msg, statusCode);
-              err.result = response.result;
-              reject(err);
-            } else {
-              resolve13(response);
-            }
-          }));
-        });
-      }
-    };
-    exports2.HttpClient = HttpClient2;
-    var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js
-var require_utils8 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js"(exports2) {
-    "use strict";
-    var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      var desc = Object.getOwnPropertyDescriptor(m, k);
-      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-        desc = { enumerable: true, get: function() {
-          return m[k];
-        } };
-      }
-      Object.defineProperty(o, k2, desc);
-    }) : (function(o, m, k, k2) {
-      if (k2 === void 0) k2 = k;
-      o[k2] = m[k];
-    }));
-    var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
-      Object.defineProperty(o, "default", { enumerable: true, value: v });
-    }) : function(o, v) {
-      o["default"] = v;
-    });
-    var __importStar2 = exports2 && exports2.__importStar || function(mod) {
-      if (mod && mod.__esModule) return mod;
-      var result = {};
-      if (mod != null) {
-        for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
-      }
-      __setModuleDefault2(result, mod);
-      return result;
-    };
-    var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
-      function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
-        });
-      }
-      return new (P || (P = Promise))(function(resolve13, 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 ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
-        }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-      });
-    };
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0;
-    var httpClient = __importStar2(require_lib4());
-    var undici_1 = require_undici();
-    function getAuthString(token, options) {
-      if (!token && !options.auth) {
-        throw new Error("Parameter token or opts.auth is required");
-      } else if (token && options.auth) {
-        throw new Error("Parameters token and opts.auth may not both be specified");
-      }
-      return typeof options.auth === "string" ? options.auth : `token ${token}`;
-    }
-    exports2.getAuthString = getAuthString;
-    function getProxyAgent(destinationUrl) {
-      const hc = new httpClient.HttpClient();
-      return hc.getAgent(destinationUrl);
-    }
-    exports2.getProxyAgent = getProxyAgent;
-    function getProxyAgentDispatcher(destinationUrl) {
-      const hc = new httpClient.HttpClient();
-      return hc.getAgentDispatcher(destinationUrl);
-    }
-    exports2.getProxyAgentDispatcher = getProxyAgentDispatcher;
-    function getProxyFetch(destinationUrl) {
-      const httpDispatcher = getProxyAgentDispatcher(destinationUrl);
-      const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () {
-        return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));
-      });
-      return proxyFetch;
-    }
-    exports2.getProxyFetch = getProxyFetch;
-    function getApiBaseUrl() {
-      return process.env["GITHUB_API_URL"] || "https://api.github.com";
-    }
-    exports2.getApiBaseUrl = getApiBaseUrl;
-  }
-});
-
-// node_modules/universal-user-agent/dist-node/index.js
-var require_dist_node = __commonJS({
-  "node_modules/universal-user-agent/dist-node/index.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    function getUserAgent5() {
-      if (typeof navigator === "object" && "userAgent" in navigator) {
-        return navigator.userAgent;
-      }
-      if (typeof process === "object" && "version" in process) {
-        return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
-      }
-      return "";
-    }
-    exports2.getUserAgent = getUserAgent5;
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/before-after-hook/lib/register.js
-var require_register = __commonJS({
-  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/register.js"(exports2, module2) {
-    module2.exports = register2;
-    function register2(state, name, method, options) {
-      if (typeof method !== "function") {
-        throw new Error("method for before hook must be a function");
-      }
-      if (!options) {
-        options = {};
-      }
-      if (Array.isArray(name)) {
-        return name.reverse().reduce(function(callback, name2) {
-          return register2.bind(null, state, name2, callback, options);
-        }, method)();
-      }
-      return Promise.resolve().then(function() {
-        if (!state.registry[name]) {
-          return method(options);
-        }
-        return state.registry[name].reduce(function(method2, registered) {
-          return registered.hook.bind(null, method2, options);
-        }, method)();
-      });
-    }
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/before-after-hook/lib/add.js
-var require_add = __commonJS({
-  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/add.js"(exports2, module2) {
-    module2.exports = addHook2;
-    function addHook2(state, kind, name, hook2) {
-      var orig = hook2;
-      if (!state.registry[name]) {
-        state.registry[name] = [];
-      }
-      if (kind === "before") {
-        hook2 = function(method, options) {
-          return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options));
-        };
-      }
-      if (kind === "after") {
-        hook2 = function(method, options) {
-          var result;
-          return Promise.resolve().then(method.bind(null, options)).then(function(result_) {
-            result = result_;
-            return orig(result, options);
-          }).then(function() {
-            return result;
-          });
-        };
-      }
-      if (kind === "error") {
-        hook2 = function(method, options) {
-          return Promise.resolve().then(method.bind(null, options)).catch(function(error3) {
-            return orig(error3, options);
-          });
-        };
-      }
-      state.registry[name].push({
-        hook: hook2,
-        orig
-      });
-    }
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/before-after-hook/lib/remove.js
-var require_remove = __commonJS({
-  "node_modules/@actions/artifact/node_modules/before-after-hook/lib/remove.js"(exports2, module2) {
-    module2.exports = removeHook2;
-    function removeHook2(state, name, method) {
-      if (!state.registry[name]) {
-        return;
-      }
-      var index = state.registry[name].map(function(registered) {
-        return registered.orig;
-      }).indexOf(method);
-      if (index === -1) {
-        return;
-      }
-      state.registry[name].splice(index, 1);
-    }
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/before-after-hook/index.js
-var require_before_after_hook = __commonJS({
-  "node_modules/@actions/artifact/node_modules/before-after-hook/index.js"(exports2, module2) {
-    var register2 = require_register();
-    var addHook2 = require_add();
-    var removeHook2 = require_remove();
-    var bind2 = Function.bind;
-    var bindable2 = bind2.bind(bind2);
-    function bindApi2(hook2, state, name) {
-      var removeHookRef = bindable2(removeHook2, null).apply(
-        null,
-        name ? [state, name] : [state]
-      );
-      hook2.api = { remove: removeHookRef };
-      hook2.remove = removeHookRef;
-      ["before", "error", "after", "wrap"].forEach(function(kind) {
-        var args = name ? [state, kind, name] : [state, kind];
-        hook2[kind] = hook2.api[kind] = bindable2(addHook2, null).apply(null, args);
-      });
-    }
-    function HookSingular() {
-      var singularHookName = "h";
-      var singularHookState = {
-        registry: {}
-      };
-      var singularHook = register2.bind(null, singularHookState, singularHookName);
-      bindApi2(singularHook, singularHookState, singularHookName);
-      return singularHook;
-    }
-    function HookCollection() {
-      var state = {
-        registry: {}
-      };
-      var hook2 = register2.bind(null, state);
-      bindApi2(hook2, state);
-      return hook2;
-    }
-    var collectionHookDeprecationMessageDisplayed = false;
-    function Hook() {
-      if (!collectionHookDeprecationMessageDisplayed) {
-        console.warn(
-          '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'
-        );
-        collectionHookDeprecationMessageDisplayed = true;
-      }
-      return HookCollection();
-    }
-    Hook.Singular = HookSingular.bind();
-    Hook.Collection = HookCollection.bind();
-    module2.exports = Hook;
-    module2.exports.Hook = Hook;
-    module2.exports.Singular = Hook.Singular;
-    module2.exports.Collection = Hook.Collection;
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@octokit/endpoint/dist-node/index.js
-var require_dist_node2 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
-    "use strict";
-    var __defProp2 = Object.defineProperty;
-    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
-    var __getOwnPropNames2 = Object.getOwnPropertyNames;
-    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
-    var __export2 = (target, all) => {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var dist_src_exports3 = {};
-    __export2(dist_src_exports3, {
-      endpoint: () => endpoint2
-    });
-    module2.exports = __toCommonJS2(dist_src_exports3);
-    var import_universal_user_agent5 = require_dist_node();
-    var VERSION8 = "9.0.6";
-    var userAgent2 = `octokit-endpoint.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`;
-    var DEFAULTS2 = {
-      method: "GET",
-      baseUrl: "https://api.github.com",
-      headers: {
-        accept: "application/vnd.github.v3+json",
-        "user-agent": userAgent2
-      },
-      mediaType: {
-        format: ""
-      }
-    };
-    function lowercaseKeys2(object) {
-      if (!object) {
-        return {};
-      }
-      return Object.keys(object).reduce((newObj, key) => {
-        newObj[key.toLowerCase()] = object[key];
-        return newObj;
-      }, {});
-    }
-    function isPlainObject3(value) {
-      if (typeof value !== "object" || value === null)
-        return false;
-      if (Object.prototype.toString.call(value) !== "[object Object]")
-        return false;
-      const proto = Object.getPrototypeOf(value);
-      if (proto === null)
-        return true;
-      const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
-      return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
-    }
-    function mergeDeep2(defaults, options) {
-      const result = Object.assign({}, defaults);
-      Object.keys(options).forEach((key) => {
-        if (isPlainObject3(options[key])) {
-          if (!(key in defaults))
-            Object.assign(result, { [key]: options[key] });
-          else
-            result[key] = mergeDeep2(defaults[key], options[key]);
-        } else {
-          Object.assign(result, { [key]: options[key] });
-        }
-      });
-      return result;
-    }
-    function removeUndefinedProperties2(obj) {
-      for (const key in obj) {
-        if (obj[key] === void 0) {
-          delete obj[key];
-        }
-      }
-      return obj;
-    }
-    function merge3(defaults, route, options) {
-      if (typeof route === "string") {
-        let [method, url2] = route.split(" ");
-        options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options);
-      } else {
-        options = Object.assign({}, route);
-      }
-      options.headers = lowercaseKeys2(options.headers);
-      removeUndefinedProperties2(options);
-      removeUndefinedProperties2(options.headers);
-      const mergedOptions = mergeDeep2(defaults || {}, options);
-      if (options.url === "/graphql") {
-        if (defaults && defaults.mediaType.previews?.length) {
-          mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
-            (preview) => !mergedOptions.mediaType.previews.includes(preview)
-          ).concat(mergedOptions.mediaType.previews);
-        }
-        mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
-      }
-      return mergedOptions;
-    }
-    function addQueryParameters2(url2, parameters) {
-      const separator = /\?/.test(url2) ? "&" : "?";
-      const names = Object.keys(parameters);
-      if (names.length === 0) {
-        return url2;
-      }
-      return url2 + separator + names.map((name) => {
-        if (name === "q") {
-          return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
-        }
-        return `${name}=${encodeURIComponent(parameters[name])}`;
-      }).join("&");
-    }
-    var urlVariableRegex2 = /\{[^{}}]+\}/g;
-    function removeNonChars2(variableName) {
-      return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []);
-    }
-    function omit2(object, keysToOmit) {
-      const result = { __proto__: null };
-      for (const key of Object.keys(object)) {
-        if (keysToOmit.indexOf(key) === -1) {
-          result[key] = object[key];
-        }
-      }
-      return result;
-    }
-    function encodeReserved2(str2) {
-      return str2.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
-        if (!/%[0-9A-Fa-f]/.test(part)) {
-          part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
-        }
-        return part;
-      }).join("");
-    }
-    function encodeUnreserved2(str2) {
-      return encodeURIComponent(str2).replace(/[!'()*]/g, function(c) {
-        return "%" + c.charCodeAt(0).toString(16).toUpperCase();
-      });
-    }
-    function encodeValue2(operator, value, key) {
-      value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
-      if (key) {
-        return encodeUnreserved2(key) + "=" + value;
-      } else {
-        return value;
-      }
-    }
-    function isDefined3(value) {
-      return value !== void 0 && value !== null;
-    }
-    function isKeyOperator2(operator) {
-      return operator === ";" || operator === "&" || operator === "?";
-    }
-    function getValues2(context5, operator, key, modifier) {
-      var value = context5[key], result = [];
-      if (isDefined3(value) && value !== "") {
-        if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
-          value = value.toString();
-          if (modifier && modifier !== "*") {
-            value = value.substring(0, parseInt(modifier, 10));
-          }
-          result.push(
-            encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
-          );
-        } else {
-          if (modifier === "*") {
-            if (Array.isArray(value)) {
-              value.filter(isDefined3).forEach(function(value2) {
-                result.push(
-                  encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
-                );
-              });
-            } else {
-              Object.keys(value).forEach(function(k) {
-                if (isDefined3(value[k])) {
-                  result.push(encodeValue2(operator, value[k], k));
-                }
-              });
-            }
-          } else {
-            const tmp = [];
-            if (Array.isArray(value)) {
-              value.filter(isDefined3).forEach(function(value2) {
-                tmp.push(encodeValue2(operator, value2));
-              });
-            } else {
-              Object.keys(value).forEach(function(k) {
-                if (isDefined3(value[k])) {
-                  tmp.push(encodeUnreserved2(k));
-                  tmp.push(encodeValue2(operator, value[k].toString()));
-                }
-              });
-            }
-            if (isKeyOperator2(operator)) {
-              result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
-            } else if (tmp.length !== 0) {
-              result.push(tmp.join(","));
-            }
-          }
-        }
-      } else {
-        if (operator === ";") {
-          if (isDefined3(value)) {
-            result.push(encodeUnreserved2(key));
-          }
-        } else if (value === "" && (operator === "&" || operator === "?")) {
-          result.push(encodeUnreserved2(key) + "=");
-        } else if (value === "") {
-          result.push("");
-        }
-      }
-      return result;
-    }
-    function parseUrl2(template) {
-      return {
-        expand: expand2.bind(null, template)
-      };
-    }
-    function expand2(template, context5) {
-      var operators = ["+", "#", ".", "/", ";", "?", "&"];
-      template = template.replace(
-        /\{([^\{\}]+)\}|([^\{\}]+)/g,
-        function(_2, expression, literal) {
-          if (expression) {
-            let operator = "";
-            const values = [];
-            if (operators.indexOf(expression.charAt(0)) !== -1) {
-              operator = expression.charAt(0);
-              expression = expression.substr(1);
-            }
-            expression.split(/,/g).forEach(function(variable) {
-              var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
-              values.push(getValues2(context5, operator, tmp[1], tmp[2] || tmp[3]));
-            });
-            if (operator && operator !== "+") {
-              var separator = ",";
-              if (operator === "?") {
-                separator = "&";
-              } else if (operator !== "#") {
-                separator = operator;
-              }
-              return (values.length !== 0 ? operator : "") + values.join(separator);
-            } else {
-              return values.join(",");
-            }
-          } else {
-            return encodeReserved2(literal);
-          }
-        }
-      );
-      if (template === "/") {
-        return template;
-      } else {
-        return template.replace(/\/$/, "");
-      }
-    }
-    function parse2(options) {
-      let method = options.method.toUpperCase();
-      let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
-      let headers = Object.assign({}, options.headers);
-      let body;
-      let parameters = omit2(options, [
-        "method",
-        "baseUrl",
-        "url",
-        "headers",
-        "request",
-        "mediaType"
-      ]);
-      const urlVariableNames = extractUrlVariableNames2(url2);
-      url2 = parseUrl2(url2).expand(parameters);
-      if (!/^http/.test(url2)) {
-        url2 = options.baseUrl + url2;
-      }
-      const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
-      const remainingParameters = omit2(parameters, omittedParameters);
-      const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
-      if (!isBinaryRequest) {
-        if (options.mediaType.format) {
-          headers.accept = headers.accept.split(/,/).map(
-            (format) => format.replace(
-              /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
-              `application/vnd$1$2.${options.mediaType.format}`
-            )
-          ).join(",");
-        }
-        if (url2.endsWith("/graphql")) {
-          if (options.mediaType.previews?.length) {
-            const previewsFromAcceptHeader = headers.accept.match(/(? {
-              const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
-              return `application/vnd.github.${preview}-preview${format}`;
-            }).join(",");
-          }
-        }
-      }
-      if (["GET", "HEAD"].includes(method)) {
-        url2 = addQueryParameters2(url2, remainingParameters);
-      } else {
-        if ("data" in remainingParameters) {
-          body = remainingParameters.data;
-        } else {
-          if (Object.keys(remainingParameters).length) {
-            body = remainingParameters;
-          }
-        }
-      }
-      if (!headers["content-type"] && typeof body !== "undefined") {
-        headers["content-type"] = "application/json; charset=utf-8";
-      }
-      if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
-        body = "";
-      }
-      return Object.assign(
-        { method, url: url2, headers },
-        typeof body !== "undefined" ? { body } : null,
-        options.request ? { request: options.request } : null
-      );
-    }
-    function endpointWithDefaults2(defaults, route, options) {
-      return parse2(merge3(defaults, route, options));
-    }
-    function withDefaults4(oldDefaults, newDefaults) {
-      const DEFAULTS22 = merge3(oldDefaults, newDefaults);
-      const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
-      return Object.assign(endpoint22, {
-        DEFAULTS: DEFAULTS22,
-        defaults: withDefaults4.bind(null, DEFAULTS22),
-        merge: merge3.bind(null, DEFAULTS22),
-        parse: parse2
-      });
-    }
-    var endpoint2 = withDefaults4(null, DEFAULTS2);
-  }
-});
-
-// node_modules/deprecation/dist-node/index.js
-var require_dist_node3 = __commonJS({
-  "node_modules/deprecation/dist-node/index.js"(exports2) {
-    "use strict";
-    Object.defineProperty(exports2, "__esModule", { value: true });
-    var Deprecation = class extends Error {
-      constructor(message) {
-        super(message);
-        if (Error.captureStackTrace) {
-          Error.captureStackTrace(this, this.constructor);
-        }
-        this.name = "Deprecation";
-      }
-    };
-    exports2.Deprecation = Deprecation;
-  }
-});
-
-// node_modules/wrappy/wrappy.js
-var require_wrappy = __commonJS({
-  "node_modules/wrappy/wrappy.js"(exports2, module2) {
-    module2.exports = wrappy;
-    function wrappy(fn, cb) {
-      if (fn && cb) return wrappy(fn)(cb);
-      if (typeof fn !== "function")
-        throw new TypeError("need wrapper function");
-      Object.keys(fn).forEach(function(k) {
-        wrapper[k] = fn[k];
-      });
-      return wrapper;
-      function wrapper() {
-        var args = new Array(arguments.length);
-        for (var i = 0; i < args.length; i++) {
-          args[i] = arguments[i];
-        }
-        var ret = fn.apply(this, args);
-        var cb2 = args[args.length - 1];
-        if (typeof ret === "function" && ret !== cb2) {
-          Object.keys(cb2).forEach(function(k) {
-            ret[k] = cb2[k];
-          });
-        }
-        return ret;
-      }
-    }
-  }
-});
-
-// node_modules/once/once.js
-var require_once = __commonJS({
-  "node_modules/once/once.js"(exports2, module2) {
-    var wrappy = require_wrappy();
-    module2.exports = wrappy(once);
-    module2.exports.strict = wrappy(onceStrict);
-    once.proto = once(function() {
-      Object.defineProperty(Function.prototype, "once", {
-        value: function() {
-          return once(this);
-        },
-        configurable: true
-      });
-      Object.defineProperty(Function.prototype, "onceStrict", {
-        value: function() {
-          return onceStrict(this);
-        },
-        configurable: true
-      });
-    });
-    function once(fn) {
-      var f = function() {
-        if (f.called) return f.value;
-        f.called = true;
-        return f.value = fn.apply(this, arguments);
-      };
-      f.called = false;
-      return f;
-    }
-    function onceStrict(fn) {
-      var f = function() {
-        if (f.called)
-          throw new Error(f.onceError);
-        f.called = true;
-        return f.value = fn.apply(this, arguments);
-      };
-      var name = fn.name || "Function wrapped with `once`";
-      f.onceError = name + " shouldn't be called more than once";
-      f.called = false;
-      return f;
-    }
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@octokit/request-error/dist-node/index.js
-var require_dist_node4 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) {
-    "use strict";
-    var __create2 = Object.create;
-    var __defProp2 = Object.defineProperty;
-    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
-    var __getOwnPropNames2 = Object.getOwnPropertyNames;
-    var __getProtoOf2 = Object.getPrototypeOf;
-    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
-    var __export2 = (target, all) => {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
-      // If the importer is in node compatibility mode or this is not an ESM
-      // file that has been converted to a CommonJS file using a Babel-
-      // compatible transform (i.e. "__esModule" has not been set), then set
-      // "default" to the CommonJS "module.exports" for node compatibility.
-      isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
-      mod
-    ));
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var dist_src_exports3 = {};
-    __export2(dist_src_exports3, {
-      RequestError: () => RequestError2
-    });
-    module2.exports = __toCommonJS2(dist_src_exports3);
-    var import_deprecation = require_dist_node3();
-    var import_once = __toESM2(require_once());
-    var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
-    var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
-    var RequestError2 = class extends Error {
-      constructor(message, statusCode, options) {
-        super(message);
-        if (Error.captureStackTrace) {
-          Error.captureStackTrace(this, this.constructor);
-        }
-        this.name = "HttpError";
-        this.status = statusCode;
-        let headers;
-        if ("headers" in options && typeof options.headers !== "undefined") {
-          headers = options.headers;
-        }
-        if ("response" in options) {
-          this.response = options.response;
-          headers = options.response.headers;
-        }
-        const requestCopy = Object.assign({}, options.request);
-        if (options.request.headers.authorization) {
-          requestCopy.headers = Object.assign({}, options.request.headers, {
-            authorization: options.request.headers.authorization.replace(
-              /(? {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var dist_src_exports3 = {};
-    __export2(dist_src_exports3, {
-      request: () => request3
-    });
-    module2.exports = __toCommonJS2(dist_src_exports3);
-    var import_endpoint2 = require_dist_node2();
-    var import_universal_user_agent5 = require_dist_node();
-    var VERSION8 = "8.4.1";
-    function isPlainObject3(value) {
-      if (typeof value !== "object" || value === null)
-        return false;
-      if (Object.prototype.toString.call(value) !== "[object Object]")
-        return false;
-      const proto = Object.getPrototypeOf(value);
-      if (proto === null)
-        return true;
-      const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
-      return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
-    }
-    var import_request_error3 = require_dist_node4();
-    function getBufferResponse(response) {
-      return response.arrayBuffer();
-    }
-    function fetchWrapper2(requestOptions) {
-      var _a, _b, _c, _d;
-      const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
-      const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
-      if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
-        requestOptions.body = JSON.stringify(requestOptions.body);
-      }
-      let headers = {};
-      let status;
-      let url2;
-      let { fetch } = globalThis;
-      if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
-        fetch = requestOptions.request.fetch;
-      }
-      if (!fetch) {
-        throw new Error(
-          "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
-        );
-      }
-      return fetch(requestOptions.url, {
-        method: requestOptions.method,
-        body: requestOptions.body,
-        redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
-        headers: requestOptions.headers,
-        signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,
-        // duplex must be set if request.body is ReadableStream or Async Iterables.
-        // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
-        ...requestOptions.body && { duplex: "half" }
-      }).then(async (response) => {
-        url2 = response.url;
-        status = response.status;
-        for (const keyAndValue of response.headers) {
-          headers[keyAndValue[0]] = keyAndValue[1];
-        }
-        if ("deprecation" in headers) {
-          const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
-          const deprecationLink = matches && matches.pop();
-          log.warn(
-            `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
-          );
-        }
-        if (status === 204 || status === 205) {
-          return;
-        }
-        if (requestOptions.method === "HEAD") {
-          if (status < 400) {
-            return;
-          }
-          throw new import_request_error3.RequestError(response.statusText, status, {
-            response: {
-              url: url2,
-              status,
-              headers,
-              data: void 0
-            },
-            request: requestOptions
-          });
-        }
-        if (status === 304) {
-          throw new import_request_error3.RequestError("Not modified", status, {
-            response: {
-              url: url2,
-              status,
-              headers,
-              data: await getResponseData2(response)
-            },
-            request: requestOptions
-          });
-        }
-        if (status >= 400) {
-          const data = await getResponseData2(response);
-          const error3 = new import_request_error3.RequestError(toErrorMessage2(data), status, {
-            response: {
-              url: url2,
-              status,
-              headers,
-              data
-            },
-            request: requestOptions
-          });
-          throw error3;
-        }
-        return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
-      }).then((data) => {
-        return {
-          status,
-          url: url2,
-          headers,
-          data
-        };
-      }).catch((error3) => {
-        if (error3 instanceof import_request_error3.RequestError)
-          throw error3;
-        else if (error3.name === "AbortError")
-          throw error3;
-        let message = error3.message;
-        if (error3.name === "TypeError" && "cause" in error3) {
-          if (error3.cause instanceof Error) {
-            message = error3.cause.message;
-          } else if (typeof error3.cause === "string") {
-            message = error3.cause;
-          }
-        }
-        throw new import_request_error3.RequestError(message, 500, {
-          request: requestOptions
-        });
-      });
-    }
-    async function getResponseData2(response) {
-      const contentType = response.headers.get("content-type");
-      if (/application\/json/.test(contentType)) {
-        return response.json().catch(() => response.text()).catch(() => "");
-      }
-      if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
-        return response.text();
-      }
-      return getBufferResponse(response);
-    }
-    function toErrorMessage2(data) {
-      if (typeof data === "string")
-        return data;
-      let suffix;
-      if ("documentation_url" in data) {
-        suffix = ` - ${data.documentation_url}`;
-      } else {
-        suffix = "";
-      }
-      if ("message" in data) {
-        if (Array.isArray(data.errors)) {
-          return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
-        }
-        return `${data.message}${suffix}`;
-      }
-      return `Unknown error: ${JSON.stringify(data)}`;
-    }
-    function withDefaults4(oldEndpoint, newDefaults) {
-      const endpoint2 = oldEndpoint.defaults(newDefaults);
-      const newApi = function(route, parameters) {
-        const endpointOptions = endpoint2.merge(route, parameters);
-        if (!endpointOptions.request || !endpointOptions.request.hook) {
-          return fetchWrapper2(endpoint2.parse(endpointOptions));
-        }
-        const request22 = (route2, parameters2) => {
-          return fetchWrapper2(
-            endpoint2.parse(endpoint2.merge(route2, parameters2))
-          );
-        };
-        Object.assign(request22, {
-          endpoint: endpoint2,
-          defaults: withDefaults4.bind(null, endpoint2)
-        });
-        return endpointOptions.request.hook(request22, endpointOptions);
-      };
-      return Object.assign(newApi, {
-        endpoint: endpoint2,
-        defaults: withDefaults4.bind(null, endpoint2)
-      });
-    }
-    var request3 = withDefaults4(import_endpoint2.endpoint, {
-      headers: {
-        "user-agent": `octokit-request.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`
-      }
-    });
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@octokit/graphql/dist-node/index.js
-var require_dist_node6 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@octokit/graphql/dist-node/index.js"(exports2, module2) {
-    "use strict";
-    var __defProp2 = Object.defineProperty;
-    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
-    var __getOwnPropNames2 = Object.getOwnPropertyNames;
-    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
-    var __export2 = (target, all) => {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var index_exports = {};
-    __export2(index_exports, {
-      GraphqlResponseError: () => GraphqlResponseError2,
-      graphql: () => graphql22,
-      withCustomRequest: () => withCustomRequest2
-    });
-    module2.exports = __toCommonJS2(index_exports);
-    var import_request3 = require_dist_node5();
-    var import_universal_user_agent5 = require_dist_node();
-    var VERSION8 = "7.1.1";
-    var import_request22 = require_dist_node5();
-    var import_request4 = require_dist_node5();
-    function _buildMessageForResponseErrors2(data) {
-      return `Request failed due to following response errors:
-` + data.errors.map((e) => ` - ${e.message}`).join("\n");
-    }
-    var GraphqlResponseError2 = class extends Error {
-      constructor(request22, headers, response) {
-        super(_buildMessageForResponseErrors2(response));
-        this.request = request22;
-        this.headers = headers;
-        this.response = response;
-        this.name = "GraphqlResponseError";
-        this.errors = response.errors;
-        this.data = response.data;
-        if (Error.captureStackTrace) {
-          Error.captureStackTrace(this, this.constructor);
-        }
-      }
-    };
-    var NON_VARIABLE_OPTIONS2 = [
-      "method",
-      "baseUrl",
-      "url",
-      "headers",
-      "request",
-      "query",
-      "mediaType"
-    ];
-    var FORBIDDEN_VARIABLE_OPTIONS2 = ["query", "method", "url"];
-    var GHES_V3_SUFFIX_REGEX2 = /\/api\/v3\/?$/;
-    function graphql3(request22, query, options) {
-      if (options) {
-        if (typeof query === "string" && "query" in options) {
-          return Promise.reject(
-            new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
-          );
-        }
-        for (const key in options) {
-          if (!FORBIDDEN_VARIABLE_OPTIONS2.includes(key)) continue;
-          return Promise.reject(
-            new Error(
-              `[@octokit/graphql] "${key}" cannot be used as variable name`
-            )
-          );
-        }
-      }
-      const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
-      const requestOptions = Object.keys(
-        parsedOptions
-      ).reduce((result, key) => {
-        if (NON_VARIABLE_OPTIONS2.includes(key)) {
-          result[key] = parsedOptions[key];
-          return result;
-        }
-        if (!result.variables) {
-          result.variables = {};
-        }
-        result.variables[key] = parsedOptions[key];
-        return result;
-      }, {});
-      const baseUrl = parsedOptions.baseUrl || request22.endpoint.DEFAULTS.baseUrl;
-      if (GHES_V3_SUFFIX_REGEX2.test(baseUrl)) {
-        requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX2, "/api/graphql");
-      }
-      return request22(requestOptions).then((response) => {
-        if (response.data.errors) {
-          const headers = {};
-          for (const key of Object.keys(response.headers)) {
-            headers[key] = response.headers[key];
-          }
-          throw new GraphqlResponseError2(
-            requestOptions,
-            headers,
-            response.data
-          );
-        }
-        return response.data.data;
-      });
-    }
-    function withDefaults4(request22, newDefaults) {
-      const newRequest = request22.defaults(newDefaults);
-      const newApi = (query, options) => {
-        return graphql3(newRequest, query, options);
-      };
-      return Object.assign(newApi, {
-        defaults: withDefaults4.bind(null, newRequest),
-        endpoint: newRequest.endpoint
-      });
-    }
-    var graphql22 = withDefaults4(import_request3.request, {
-      headers: {
-        "user-agent": `octokit-graphql.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`
-      },
-      method: "POST",
-      url: "/graphql"
-    });
-    function withCustomRequest2(customRequest) {
-      return withDefaults4(customRequest, {
-        method: "POST",
-        url: "/graphql"
-      });
-    }
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@octokit/auth-token/dist-node/index.js
-var require_dist_node7 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) {
-    "use strict";
-    var __defProp2 = Object.defineProperty;
-    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
-    var __getOwnPropNames2 = Object.getOwnPropertyNames;
-    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
-    var __export2 = (target, all) => {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var dist_src_exports3 = {};
-    __export2(dist_src_exports3, {
-      createTokenAuth: () => createTokenAuth3
-    });
-    module2.exports = __toCommonJS2(dist_src_exports3);
-    var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
-    var REGEX_IS_INSTALLATION = /^ghs_/;
-    var REGEX_IS_USER_TO_SERVER = /^ghu_/;
-    async function auth2(token) {
-      const isApp = token.split(/\./).length === 3;
-      const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
-      const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
-      const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
-      return {
-        type: "token",
-        token,
-        tokenType
-      };
-    }
-    function withAuthorizationPrefix2(token) {
-      if (token.split(/\./).length === 3) {
-        return `bearer ${token}`;
-      }
-      return `token ${token}`;
-    }
-    async function hook2(token, request3, route, parameters) {
-      const endpoint2 = request3.endpoint.merge(
-        route,
-        parameters
-      );
-      endpoint2.headers.authorization = withAuthorizationPrefix2(token);
-      return request3(endpoint2);
-    }
-    var createTokenAuth3 = function createTokenAuth22(token) {
-      if (!token) {
-        throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
-      }
-      if (typeof token !== "string") {
-        throw new Error(
-          "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
-        );
-      }
-      token = token.replace(/^(token|bearer) +/i, "");
-      return Object.assign(auth2.bind(null, token), {
-        hook: hook2.bind(null, token)
-      });
-    };
-  }
-});
-
-// node_modules/@actions/artifact/node_modules/@octokit/core/dist-node/index.js
-var require_dist_node8 = __commonJS({
-  "node_modules/@actions/artifact/node_modules/@octokit/core/dist-node/index.js"(exports2, module2) {
-    "use strict";
-    var __defProp2 = Object.defineProperty;
-    var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
-    var __getOwnPropNames2 = Object.getOwnPropertyNames;
-    var __hasOwnProp2 = Object.prototype.hasOwnProperty;
-    var __export2 = (target, all) => {
-      for (var name in all)
-        __defProp2(target, name, { get: all[name], enumerable: true });
-    };
-    var __copyProps2 = (to, from, except, desc) => {
-      if (from && typeof from === "object" || typeof from === "function") {
-        for (let key of __getOwnPropNames2(from))
-          if (!__hasOwnProp2.call(to, key) && key !== except)
-            __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
-      }
-      return to;
-    };
-    var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
-    var index_exports = {};
-    __export2(index_exports, {
-      Octokit: () => Octokit2
-    });
-    module2.exports = __toCommonJS2(index_exports);
-    var import_universal_user_agent5 = require_dist_node();
-    var import_before_after_hook2 = require_before_after_hook();
-    var import_request3 = require_dist_node5();
-    var import_graphql2 = require_dist_node6();
-    var import_auth_token2 = require_dist_node7();
-    var VERSION8 = "5.2.2";
-    var noop3 = () => {
-    };
-    var consoleWarn2 = console.warn.bind(console);
-    var consoleError2 = console.error.bind(console);
-    function createLogger2(logger = {}) {
-      if (typeof logger.debug !== "function") {
-        logger.debug = noop3;
-      }
-      if (typeof logger.info !== "function") {
-        logger.info = noop3;
-      }
-      if (typeof logger.warn !== "function") {
-        logger.warn = consoleWarn2;
-      }
-      if (typeof logger.error !== "function") {
-        logger.error = consoleError2;
-      }
-      return logger;
-    }
-    var userAgentTrail2 = `octokit-core.js/${VERSION8} ${(0, import_universal_user_agent5.getUserAgent)()}`;
-    var Octokit2 = class {
-      static {
-        this.VERSION = VERSION8;
-      }
-      static defaults(defaults) {
-        const OctokitWithDefaults = class extends this {
-          constructor(...args) {
-            const options = args[0] || {};
-            if (typeof defaults === "function") {
-              super(defaults(options));
-              return;
-            }
-            super(
-              Object.assign(
-                {},
-                defaults,
-                options,
-                options.userAgent && defaults.userAgent ? {
-                  userAgent: `${options.userAgent} ${defaults.userAgent}`
-                } : null
-              )
-            );
-          }
-        };
-        return OctokitWithDefaults;
-      }
-      static {
-        this.plugins = [];
-      }
-      /**
-       * Attach a plugin (or many) to your Octokit instance.
-       *
-       * @example
-       * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
-       */
-      static plugin(...newPlugins) {
-        const currentPlugins = this.plugins;
-        const NewOctokit = class extends this {
-          static {
-            this.plugins = currentPlugins.concat(
-              newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
-            );
-          }
-        };
-        return NewOctokit;
-      }
-      constructor(options = {}) {
-        const hook2 = new import_before_after_hook2.Collection();
-        const requestDefaults = {
-          baseUrl: import_request3.request.endpoint.DEFAULTS.baseUrl,
-          headers: {},
-          request: Object.assign({}, options.request, {
-            // @ts-ignore internal usage only, no need to type
-            hook: hook2.bind(null, "request")
-          }),
-          mediaType: {
-            previews: [],
-            format: ""
-          }
-        };
-        requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail2}` : userAgentTrail2;
-        if (options.baseUrl) {
-          requestDefaults.baseUrl = options.baseUrl;
-        }
-        if (options.previews) {
-          requestDefaults.mediaType.previews = options.previews;
+        if (options.previews) {
+          requestDefaults.mediaType.previews = options.previews;
         }
         if (options.timeZone) {
           requestDefaults.headers["time-zone"] = options.timeZone;
@@ -118397,14 +115518,14 @@ var require_dist_node9 = __commonJS({
     var endpointMethodsMap2 = /* @__PURE__ */ new Map();
     for (const [scope, endpoints] of Object.entries(endpoints_default2)) {
       for (const [methodName, endpoint2] of Object.entries(endpoints)) {
-        const [route, defaults, decorations] = endpoint2;
+        const [route, defaults3, decorations] = endpoint2;
         const [method, url2] = route.split(/ /);
         const endpointDefaults = Object.assign(
           {
             method,
             url: url2
           },
-          defaults
+          defaults3
         );
         if (!endpointMethodsMap2.has(scope)) {
           endpointMethodsMap2.set(scope, /* @__PURE__ */ new Map());
@@ -118474,8 +115595,8 @@ var require_dist_node9 = __commonJS({
       }
       return newMethods;
     }
-    function decorate2(octokit, scope, methodName, defaults, decorations) {
-      const requestWithDefaults = octokit.request.defaults(defaults);
+    function decorate2(octokit, scope, methodName, defaults3, decorations) {
+      const requestWithDefaults = octokit.request.defaults(defaults3);
       function withDecorations(...args) {
         let options = requestWithDefaults.endpoint.merge(...args);
         if (decorations.mapToData) {
@@ -119053,9 +116174,9 @@ var require_traverse = __commonJS({
       this.value = walk(this.value, cb, false);
       return this.value;
     };
-    Traverse.prototype.reduce = function(cb, init) {
+    Traverse.prototype.reduce = function(cb, init2) {
       var skip = arguments.length === 1;
-      var acc = skip ? this.value : init;
+      var acc = skip ? this.value : init2;
       this.forEach(function(x) {
         if (!this.isRoot || !skip) {
           acc = cb.call(this, acc, x);
@@ -119162,7 +116283,7 @@ var require_traverse = __commonJS({
       })(this.value);
     };
     function walk(root, cb, immutable) {
-      var path28 = [];
+      var path29 = [];
       var parents = [];
       var alive = true;
       return (function walker(node_) {
@@ -119171,11 +116292,11 @@ var require_traverse = __commonJS({
         var state = {
           node,
           node_,
-          path: [].concat(path28),
+          path: [].concat(path29),
           parent: parents.slice(-1)[0],
-          key: path28.slice(-1)[0],
-          isRoot: path28.length === 0,
-          level: path28.length,
+          key: path29.slice(-1)[0],
+          isRoot: path29.length === 0,
+          level: path29.length,
           circular: null,
           update: function(x) {
             if (!state.isRoot) {
@@ -119230,7 +116351,7 @@ var require_traverse = __commonJS({
           parents.push(state);
           var keys = Object.keys(state.node);
           keys.forEach(function(key, i2) {
-            path28.push(key);
+            path29.push(key);
             if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);
             var child = walker(state.node[key]);
             if (immutable && Object.hasOwnProperty.call(state.node, key)) {
@@ -119239,7 +116360,7 @@ var require_traverse = __commonJS({
             child.isLast = i2 == keys.length - 1;
             child.isFirst = i2 == 0;
             if (modifiers.post) modifiers.post.call(state, child);
-            path28.pop();
+            path29.pop();
           });
           parents.pop();
         }
@@ -119283,7 +116404,7 @@ var require_traverse = __commonJS({
 var require_chainsaw = __commonJS({
   "node_modules/chainsaw/index.js"(exports2, module2) {
     var Traverse = require_traverse();
-    var EventEmitter = require("events").EventEmitter;
+    var EventEmitter2 = require("events").EventEmitter;
     module2.exports = Chainsaw;
     function Chainsaw(builder) {
       var saw = Chainsaw.saw(builder, {});
@@ -119299,7 +116420,7 @@ var require_chainsaw = __commonJS({
       return saw.chain();
     };
     Chainsaw.saw = function(builder, handlers) {
-      var saw = new EventEmitter();
+      var saw = new EventEmitter2();
       saw.handlers = handlers;
       saw.actions = [];
       saw.chain = function() {
@@ -119441,12 +116562,12 @@ var require_buffers = __commonJS({
     };
     Buffers.prototype.splice = function(i, howMany) {
       var buffers = this.buffers;
-      var index = i >= 0 ? i : this.length - i;
+      var index2 = i >= 0 ? i : this.length - i;
       var reps = [].slice.call(arguments, 2);
       if (howMany === void 0) {
-        howMany = this.length - index;
-      } else if (howMany > this.length - index) {
-        howMany = this.length - index;
+        howMany = this.length - index2;
+      } else if (howMany > this.length - index2) {
+        howMany = this.length - index2;
       }
       for (var i = 0; i < reps.length; i++) {
         this.length += reps[i].length;
@@ -119454,11 +116575,11 @@ var require_buffers = __commonJS({
       var removed = new Buffers();
       var bytes = 0;
       var startBytes = 0;
-      for (var ii = 0; ii < buffers.length && startBytes + buffers[ii].length < index; ii++) {
+      for (var ii = 0; ii < buffers.length && startBytes + buffers[ii].length < index2; ii++) {
         startBytes += buffers[ii].length;
       }
-      if (index - startBytes > 0) {
-        var start = index - startBytes;
+      if (index2 - startBytes > 0) {
+        var start = index2 - startBytes;
         if (start + howMany < buffers[ii].length) {
           removed.push(buffers[ii].slice(start, start + howMany));
           var orig = buffers[ii];
@@ -119543,7 +116664,7 @@ var require_buffers = __commonJS({
       var pos = this.pos(i);
       return this.buffers[pos.buf].get(pos.offset);
     };
-    Buffers.prototype.set = function set2(i, b) {
+    Buffers.prototype.set = function set(i, b) {
       var pos = this.pos(i);
       return this.buffers[pos.buf].set(pos.offset, b);
     };
@@ -119560,7 +116681,7 @@ var require_buffers = __commonJS({
       if (!this.length) {
         return -1;
       }
-      var i = 0, j = 0, match = 0, mstart, pos = 0;
+      var i = 0, j = 0, match2 = 0, mstart, pos = 0;
       if (offset) {
         var p = this.pos(offset);
         i = p.buf;
@@ -119576,23 +116697,23 @@ var require_buffers = __commonJS({
           }
         }
         var char = this.buffers[i][j];
-        if (char == needle[match]) {
-          if (match == 0) {
+        if (char == needle[match2]) {
+          if (match2 == 0) {
             mstart = {
               i,
               j,
               pos
             };
           }
-          match++;
-          if (match == needle.length) {
+          match2++;
+          if (match2 == needle.length) {
             return mstart.pos;
           }
-        } else if (match != 0) {
+        } else if (match2 != 0) {
           i = mstart.i;
           j = mstart.j;
           pos = mstart.pos;
-          match = 0;
+          match2 = 0;
         }
         j++;
         pos++;
@@ -119643,7 +116764,7 @@ var require_vars = __commonJS({
 var require_binary = __commonJS({
   "node_modules/binary/index.js"(exports2, module2) {
     var Chainsaw = require_chainsaw();
-    var EventEmitter = require("events").EventEmitter;
+    var EventEmitter2 = require("events").EventEmitter;
     var Buffers = require_buffers();
     var Vars = require_vars();
     var Stream = require("stream").Stream;
@@ -119829,12 +116950,12 @@ var require_binary = __commonJS({
         caughtEnd = true;
       };
       stream2.pipe = Stream.prototype.pipe;
-      Object.getOwnPropertyNames(EventEmitter.prototype).forEach(function(name) {
-        stream2[name] = EventEmitter.prototype[name];
+      Object.getOwnPropertyNames(EventEmitter2.prototype).forEach(function(name) {
+        stream2[name] = EventEmitter2.prototype[name];
       });
       return stream2;
     };
-    exports2.parse = function parse2(buffer) {
+    exports2.parse = function parse3(buffer) {
       var self2 = words(function(bytes, cb) {
         return function(name) {
           if (offset + bytes <= buffer.length) {
@@ -119967,13 +117088,13 @@ var require_binary = __commonJS({
 // node_modules/unzip-stream/lib/matcher-stream.js
 var require_matcher_stream = __commonJS({
   "node_modules/unzip-stream/lib/matcher-stream.js"(exports2, module2) {
-    var Transform = require("stream").Transform;
-    var util = require("util");
+    var Transform5 = require("stream").Transform;
+    var util3 = require("util");
     function MatcherStream(patternDesc, matchFn) {
       if (!(this instanceof MatcherStream)) {
         return new MatcherStream();
       }
-      Transform.call(this);
+      Transform5.call(this);
       var p = typeof patternDesc === "object" ? patternDesc.pattern : patternDesc;
       this.pattern = Buffer.isBuffer(p) ? p : Buffer.from(p);
       this.requiredLength = this.pattern.length;
@@ -119982,7 +117103,7 @@ var require_matcher_stream = __commonJS({
       this.bytesSoFar = 0;
       this.matchFn = matchFn;
     }
-    util.inherits(MatcherStream, Transform);
+    util3.inherits(MatcherStream, Transform5);
     MatcherStream.prototype.checkDataChunk = function(ignoreMatchZero) {
       var enoughData = this.data.length >= this.requiredLength;
       if (!enoughData) {
@@ -120073,9 +117194,9 @@ var require_entry = __commonJS({
 var require_unzip_stream = __commonJS({
   "node_modules/unzip-stream/lib/unzip-stream.js"(exports2, module2) {
     "use strict";
-    var binary2 = require_binary();
+    var binary = require_binary();
     var stream2 = require("stream");
-    var util = require("util");
+    var util3 = require("util");
     var zlib3 = require("zlib");
     var MatcherStream = require_matcher_stream();
     var Entry = require_entry();
@@ -120116,7 +117237,7 @@ var require_unzip_stream = __commonJS({
       this.parsedEntity = null;
       this.outStreamInfo = {};
     }
-    util.inherits(UnzipStream, stream2.Transform);
+    util3.inherits(UnzipStream, stream2.Transform);
     UnzipStream.prototype.processDataChunk = function(chunk) {
       var requiredLength;
       switch (this.state) {
@@ -120260,11 +117381,11 @@ var require_unzip_stream = __commonJS({
           return requiredLength;
         case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:
           var isUtf8 = (this.parsedEntity.flags & 2048) !== 0;
-          var path28 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8);
+          var path29 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8);
           var extraDataBuffer = chunk.slice(this.parsedEntity.fileNameLength, this.parsedEntity.fileNameLength + this.parsedEntity.extraFieldLength);
           var extra = this._readExtraFields(extraDataBuffer);
           if (extra && extra.parsed && extra.parsed.path && !isUtf8) {
-            path28 = extra.parsed.path;
+            path29 = extra.parsed.path;
           }
           this.parsedEntity.extra = extra.parsed;
           var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3;
@@ -120276,7 +117397,7 @@ var require_unzip_stream = __commonJS({
           }
           if (this.options.debug) {
             const debugObj = Object.assign({}, this.parsedEntity, {
-              path: path28,
+              path: path29,
               flags: "0x" + this.parsedEntity.flags.toString(16),
               unixAttrs: unixAttrs && "0" + unixAttrs.toString(8),
               isSymlink,
@@ -120398,7 +117519,7 @@ var require_unzip_stream = __commonJS({
       }
     };
     UnzipStream.prototype._readFile = function(data) {
-      var vars = binary2.parse(data).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;
+      var vars = binary.parse(data).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;
       return vars;
     };
     UnzipStream.prototype._readExtraFields = function(data) {
@@ -120407,15 +117528,15 @@ var require_unzip_stream = __commonJS({
       if (this.options.debug) {
         result.debug = [];
       }
-      var index = 0;
-      while (index < data.length) {
-        var vars = binary2.parse(data).skip(index).word16lu("extraId").word16lu("extraSize").vars;
-        index += 4;
+      var index2 = 0;
+      while (index2 < data.length) {
+        var vars = binary.parse(data).skip(index2).word16lu("extraId").word16lu("extraSize").vars;
+        index2 += 4;
         var fieldType = void 0;
         switch (vars.extraId) {
           case 1:
             fieldType = "Zip64 extended information extra field";
-            var z64vars = binary2.parse(data.slice(index, index + vars.extraSize)).word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offsetToLocalHeader").word32lu("diskStartNumber").vars;
+            var z64vars = binary.parse(data.slice(index2, index2 + vars.extraSize)).word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offsetToLocalHeader").word32lu("diskStartNumber").vars;
             if (z64vars.uncompressedSize !== null) {
               extra.uncompressedSize = z64vars.uncompressedSize;
             }
@@ -120429,28 +117550,28 @@ var require_unzip_stream = __commonJS({
             break;
           case 21589:
             fieldType = "extended timestamp";
-            var timestampFields = data.readUInt8(index);
+            var timestampFields = data.readUInt8(index2);
             var offset = 1;
             if (vars.extraSize >= offset + 4 && timestampFields & 1) {
-              extra.mtime = new Date(data.readUInt32LE(index + offset) * 1e3);
+              extra.mtime = new Date(data.readUInt32LE(index2 + offset) * 1e3);
               offset += 4;
             }
             if (vars.extraSize >= offset + 4 && timestampFields & 2) {
-              extra.atime = new Date(data.readUInt32LE(index + offset) * 1e3);
+              extra.atime = new Date(data.readUInt32LE(index2 + offset) * 1e3);
               offset += 4;
             }
             if (vars.extraSize >= offset + 4 && timestampFields & 4) {
-              extra.ctime = new Date(data.readUInt32LE(index + offset) * 1e3);
+              extra.ctime = new Date(data.readUInt32LE(index2 + offset) * 1e3);
             }
             break;
           case 28789:
             fieldType = "Info-ZIP Unicode Path Extra Field";
-            var fieldVer = data.readUInt8(index);
+            var fieldVer = data.readUInt8(index2);
             if (fieldVer === 1) {
               var offset = 1;
-              var nameCrc32 = data.readUInt32LE(index + offset);
+              var nameCrc32 = data.readUInt32LE(index2 + offset);
               offset += 4;
-              var pathBuffer = data.slice(index + offset);
+              var pathBuffer = data.slice(index2 + offset);
               extra.path = pathBuffer.toString();
             }
             break;
@@ -120459,16 +117580,16 @@ var require_unzip_stream = __commonJS({
             fieldType = vars.extraId === 13 ? "PKWARE Unix" : "Info-ZIP UNIX (type 1)";
             var offset = 0;
             if (vars.extraSize >= 8) {
-              var atime = new Date(data.readUInt32LE(index + offset) * 1e3);
+              var atime = new Date(data.readUInt32LE(index2 + offset) * 1e3);
               offset += 4;
-              var mtime = new Date(data.readUInt32LE(index + offset) * 1e3);
+              var mtime = new Date(data.readUInt32LE(index2 + offset) * 1e3);
               offset += 4;
               extra.atime = atime;
               extra.mtime = mtime;
               if (vars.extraSize >= 12) {
-                var uid = data.readUInt16LE(index + offset);
+                var uid = data.readUInt16LE(index2 + offset);
                 offset += 2;
-                var gid = data.readUInt16LE(index + offset);
+                var gid = data.readUInt16LE(index2 + offset);
                 offset += 2;
                 extra.uid = uid;
                 extra.gid = gid;
@@ -120479,9 +117600,9 @@ var require_unzip_stream = __commonJS({
             fieldType = "Info-ZIP UNIX (type 2)";
             var offset = 0;
             if (vars.extraSize >= 4) {
-              var uid = data.readUInt16LE(index + offset);
+              var uid = data.readUInt16LE(index2 + offset);
               offset += 2;
-              var gid = data.readUInt16LE(index + offset);
+              var gid = data.readUInt16LE(index2 + offset);
               offset += 2;
               extra.uid = uid;
               extra.gid = gid;
@@ -120490,19 +117611,19 @@ var require_unzip_stream = __commonJS({
           case 30837:
             fieldType = "Info-ZIP New Unix";
             var offset = 0;
-            var extraVer = data.readUInt8(index);
+            var extraVer = data.readUInt8(index2);
             offset += 1;
             if (extraVer === 1) {
-              var uidSize = data.readUInt8(index + offset);
+              var uidSize = data.readUInt8(index2 + offset);
               offset += 1;
               if (uidSize <= 6) {
-                extra.uid = data.readUIntLE(index + offset, uidSize);
+                extra.uid = data.readUIntLE(index2 + offset, uidSize);
               }
               offset += uidSize;
-              var gidSize = data.readUInt8(index + offset);
+              var gidSize = data.readUInt8(index2 + offset);
               offset += 1;
               if (gidSize <= 6) {
-                extra.gid = data.readUIntLE(index + offset, gidSize);
+                extra.gid = data.readUIntLE(index2 + offset, gidSize);
               }
             }
             break;
@@ -120510,22 +117631,22 @@ var require_unzip_stream = __commonJS({
             fieldType = "ASi Unix";
             var offset = 0;
             if (vars.extraSize >= 14) {
-              var crc = data.readUInt32LE(index + offset);
+              var crc = data.readUInt32LE(index2 + offset);
               offset += 4;
-              var mode = data.readUInt16LE(index + offset);
+              var mode = data.readUInt16LE(index2 + offset);
               offset += 2;
-              var sizdev = data.readUInt32LE(index + offset);
+              var sizdev = data.readUInt32LE(index2 + offset);
               offset += 4;
-              var uid = data.readUInt16LE(index + offset);
+              var uid = data.readUInt16LE(index2 + offset);
               offset += 2;
-              var gid = data.readUInt16LE(index + offset);
+              var gid = data.readUInt16LE(index2 + offset);
               offset += 2;
               extra.mode = mode;
               extra.uid = uid;
               extra.gid = gid;
               if (vars.extraSize > 14) {
-                var start = index + offset;
-                var end = index + vars.extraSize - 14;
+                var start = index2 + offset;
+                var end = index2 + vars.extraSize - 14;
                 var symlinkName = this._decodeString(data.slice(start, end));
                 extra.symlink = symlinkName;
               }
@@ -120536,31 +117657,31 @@ var require_unzip_stream = __commonJS({
           result.debug.push({
             extraId: "0x" + vars.extraId.toString(16),
             description: fieldType,
-            data: data.slice(index, index + vars.extraSize).inspect()
+            data: data.slice(index2, index2 + vars.extraSize).inspect()
           });
         }
-        index += vars.extraSize;
+        index2 += vars.extraSize;
       }
       return result;
     };
     UnzipStream.prototype._readDataDescriptor = function(data, zip64Mode) {
       if (zip64Mode) {
-        var vars = binary2.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word64lu("compressedSize").word64lu("uncompressedSize").vars;
+        var vars = binary.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word64lu("compressedSize").word64lu("uncompressedSize").vars;
         return vars;
       }
-      var vars = binary2.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;
+      var vars = binary.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;
       return vars;
     };
     UnzipStream.prototype._readCentralDirectoryEntry = function(data) {
-      var vars = binary2.parse(data).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;
+      var vars = binary.parse(data).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;
       return vars;
     };
     UnzipStream.prototype._readEndOfCentralDirectory64 = function(data) {
-      var vars = binary2.parse(data).word64lu("centralDirectoryRecordSize").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskNumberWithCentralDirectoryStart").word64lu("centralDirectoryEntries").word64lu("totalCentralDirectoryEntries").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;
+      var vars = binary.parse(data).word64lu("centralDirectoryRecordSize").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskNumberWithCentralDirectoryStart").word64lu("centralDirectoryEntries").word64lu("totalCentralDirectoryEntries").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;
       return vars;
     };
     UnzipStream.prototype._readEndOfCentralDirectory = function(data) {
-      var vars = binary2.parse(data).word16lu("diskNumber").word16lu("diskStart").word16lu("centralDirectoryEntries").word16lu("totalCentralDirectoryEntries").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;
+      var vars = binary.parse(data).word16lu("diskNumber").word16lu("diskStart").word16lu("centralDirectoryEntries").word16lu("totalCentralDirectoryEntries").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;
       return vars;
     };
     var cp437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ";
@@ -120662,15 +117783,15 @@ var require_unzip_stream = __commonJS({
 // node_modules/unzip-stream/lib/parser-stream.js
 var require_parser_stream = __commonJS({
   "node_modules/unzip-stream/lib/parser-stream.js"(exports2, module2) {
-    var Transform = require("stream").Transform;
-    var util = require("util");
+    var Transform5 = require("stream").Transform;
+    var util3 = require("util");
     var UnzipStream = require_unzip_stream();
     function ParserStream(opts) {
       if (!(this instanceof ParserStream)) {
         return new ParserStream(opts);
       }
       var transformOpts = opts || {};
-      Transform.call(this, { readableObjectMode: true });
+      Transform5.call(this, { readableObjectMode: true });
       this.opts = opts || {};
       this.unzipStream = new UnzipStream(this.opts);
       var self2 = this;
@@ -120681,7 +117802,7 @@ var require_parser_stream = __commonJS({
         self2.emit("error", error3);
       });
     }
-    util.inherits(ParserStream, Transform);
+    util3.inherits(ParserStream, Transform5);
     ParserStream.prototype._transform = function(chunk, encoding, cb) {
       this.unzipStream.write(chunk, encoding, cb);
     };
@@ -120696,13 +117817,13 @@ var require_parser_stream = __commonJS({
     };
     ParserStream.prototype.on = function(eventName, fn) {
       if (eventName === "entry") {
-        return Transform.prototype.on.call(this, "data", fn);
+        return Transform5.prototype.on.call(this, "data", fn);
       }
-      return Transform.prototype.on.call(this, eventName, fn);
+      return Transform5.prototype.on.call(this, eventName, fn);
     };
     ParserStream.prototype.drainAll = function() {
       this.unzipStream.drainAll();
-      return this.pipe(new Transform({ objectMode: true, transform: function(d, e, cb) {
+      return this.pipe(new Transform5({ objectMode: true, transform: function(d, e, cb) {
         cb();
       } }));
     };
@@ -120713,8 +117834,8 @@ var require_parser_stream = __commonJS({
 // node_modules/mkdirp/index.js
 var require_mkdirp = __commonJS({
   "node_modules/mkdirp/index.js"(exports2, module2) {
-    var path28 = require("path");
-    var fs30 = require("fs");
+    var path29 = require("path");
+    var fs31 = require("fs");
     var _0777 = parseInt("0777", 8);
     module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
     function mkdirP(p, opts, f, made) {
@@ -120725,7 +117846,7 @@ var require_mkdirp = __commonJS({
         opts = { mode: opts };
       }
       var mode = opts.mode;
-      var xfs = opts.fs || fs30;
+      var xfs = opts.fs || fs31;
       if (mode === void 0) {
         mode = _0777;
       }
@@ -120733,7 +117854,7 @@ var require_mkdirp = __commonJS({
       var cb = f || /* istanbul ignore next */
       function() {
       };
-      p = path28.resolve(p);
+      p = path29.resolve(p);
       xfs.mkdir(p, mode, function(er) {
         if (!er) {
           made = made || p;
@@ -120741,8 +117862,8 @@ var require_mkdirp = __commonJS({
         }
         switch (er.code) {
           case "ENOENT":
-            if (path28.dirname(p) === p) return cb(er);
-            mkdirP(path28.dirname(p), opts, function(er2, made2) {
+            if (path29.dirname(p) === p) return cb(er);
+            mkdirP(path29.dirname(p), opts, function(er2, made2) {
               if (er2) cb(er2, made2);
               else mkdirP(p, opts, cb, made2);
             });
@@ -120751,8 +117872,8 @@ var require_mkdirp = __commonJS({
           // there already.  If so, then hooray!  If not, then something
           // is borked.
           default:
-            xfs.stat(p, function(er2, stat) {
-              if (er2 || !stat.isDirectory()) cb(er, made);
+            xfs.stat(p, function(er2, stat2) {
+              if (er2 || !stat2.isDirectory()) cb(er, made);
               else cb(null, made);
             });
             break;
@@ -120764,32 +117885,32 @@ var require_mkdirp = __commonJS({
         opts = { mode: opts };
       }
       var mode = opts.mode;
-      var xfs = opts.fs || fs30;
+      var xfs = opts.fs || fs31;
       if (mode === void 0) {
         mode = _0777;
       }
       if (!made) made = null;
-      p = path28.resolve(p);
+      p = path29.resolve(p);
       try {
         xfs.mkdirSync(p, mode);
         made = made || p;
       } catch (err0) {
         switch (err0.code) {
           case "ENOENT":
-            made = sync(path28.dirname(p), opts, made);
+            made = sync(path29.dirname(p), opts, made);
             sync(p, opts, made);
             break;
           // In the case of any other error, just see if there's a dir
           // there already.  If so, then hooray!  If not, then something
           // is borked.
           default:
-            var stat;
+            var stat2;
             try {
-              stat = xfs.statSync(p);
+              stat2 = xfs.statSync(p);
             } catch (err1) {
               throw err0;
             }
-            if (!stat.isDirectory()) throw err0;
+            if (!stat2.isDirectory()) throw err0;
             break;
         }
       }
@@ -120801,16 +117922,16 @@ var require_mkdirp = __commonJS({
 // node_modules/unzip-stream/lib/extract.js
 var require_extract2 = __commonJS({
   "node_modules/unzip-stream/lib/extract.js"(exports2, module2) {
-    var fs30 = require("fs");
-    var path28 = require("path");
-    var util = require("util");
+    var fs31 = require("fs");
+    var path29 = require("path");
+    var util3 = require("util");
     var mkdirp = require_mkdirp();
-    var Transform = require("stream").Transform;
+    var Transform5 = require("stream").Transform;
     var UnzipStream = require_unzip_stream();
     function Extract(opts) {
       if (!(this instanceof Extract))
         return new Extract(opts);
-      Transform.call(this);
+      Transform5.call(this);
       this.opts = opts || {};
       this.unzipStream = new UnzipStream(this.opts);
       this.unfinishedEntries = 0;
@@ -120822,7 +117943,7 @@ var require_extract2 = __commonJS({
         self2.emit("error", error3);
       });
     }
-    util.inherits(Extract, Transform);
+    util3.inherits(Extract, Transform5);
     Extract.prototype._transform = function(chunk, encoding, cb) {
       this.unzipStream.write(chunk, encoding, cb);
     };
@@ -120844,11 +117965,11 @@ var require_extract2 = __commonJS({
     };
     Extract.prototype._processEntry = function(entry) {
       var self2 = this;
-      var destPath = path28.join(this.opts.path, entry.path);
-      var directory = entry.isDirectory ? destPath : path28.dirname(destPath);
+      var destPath = path29.join(this.opts.path, entry.path);
+      var directory = entry.isDirectory ? destPath : path29.dirname(destPath);
       this.unfinishedEntries++;
       var writeFileFn = function() {
-        var pipedStream = fs30.createWriteStream(destPath);
+        var pipedStream = fs31.createWriteStream(destPath);
         pipedStream.on("close", function() {
           self2.unfinishedEntries--;
           self2._notifyAwaiter();
@@ -120924,11 +118045,11 @@ var require_download_artifact = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -120944,7 +118065,7 @@ var require_download_artifact = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -120972,10 +118093,10 @@ var require_download_artifact = __commonJS({
       parsed.search = "";
       return parsed.toString();
     };
-    function exists(path28) {
+    function exists(path29) {
       return __awaiter2(this, void 0, void 0, function* () {
         try {
-          yield promises_1.default.access(path28);
+          yield promises_1.default.access(path29);
           return true;
         } catch (error3) {
           if (error3.code === "ENOENT") {
@@ -120995,7 +118116,7 @@ var require_download_artifact = __commonJS({
           } catch (error3) {
             retryCount++;
             core31.debug(`Failed to download artifact after ${retryCount} retries due to ${error3.message}. Retrying in 5 seconds...`);
-            yield new Promise((resolve13) => setTimeout(resolve13, 5e3));
+            yield new Promise((resolve14) => setTimeout(resolve14, 5e3));
           }
         }
         throw new Error(`Artifact download failed after ${retryCount} retries.`);
@@ -121009,7 +118130,7 @@ var require_download_artifact = __commonJS({
           throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
         }
         let sha256Digest = void 0;
-        return new Promise((resolve13, reject) => {
+        return new Promise((resolve14, reject) => {
           const timerFn = () => {
             const timeoutError = new Error(`Blob storage chunk did not respond in ${opts.timeout}ms`);
             response.message.destroy(timeoutError);
@@ -121034,7 +118155,7 @@ var require_download_artifact = __commonJS({
               sha256Digest = hashStream.read();
               core31.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`);
             }
-            resolve13({ sha256Digest: `sha256:${sha256Digest}` });
+            resolve14({ sha256Digest: `sha256:${sha256Digest}` });
           }).on("error", (error3) => {
             reject(error3);
           });
@@ -121178,7 +118299,7 @@ var require_retry_options = __commonJS({
     var defaultMaxRetryNumber = 5;
     var defaultExemptStatusCodes = [400, 401, 403, 404, 422];
     function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) {
-      var _a;
+      var _a2;
       if (retries <= 0) {
         return [{ enabled: false }, defaultOptions.request];
       }
@@ -121189,7 +118310,7 @@ var require_retry_options = __commonJS({
         retryOptions.doNotRetry = exemptStatusCodes;
       }
       const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries });
-      core31.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`);
+      core31.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a2 = retryOptions.doNotRetry) !== null && _a2 !== void 0 ? _a2 : "octokit default: [400, 401, 403, 404, 422]"})`);
       return [retryOptions, requestOptions];
     }
     exports2.getRetryOptions = getRetryOptions;
@@ -121207,12 +118328,12 @@ var require_dist_node11 = __commonJS({
         octokit.log.debug("request", options);
         const start = Date.now();
         const requestOptions = octokit.request.endpoint.parse(options);
-        const path28 = requestOptions.url.replace(options.baseUrl, "");
+        const path29 = requestOptions.url.replace(options.baseUrl, "");
         return request3(options).then((response) => {
-          octokit.log.info(`${requestOptions.method} ${path28} - ${response.status} in ${Date.now() - start}ms`);
+          octokit.log.info(`${requestOptions.method} ${path29} - ${response.status} in ${Date.now() - start}ms`);
           return response;
         }).catch((error3) => {
-          octokit.log.info(`${requestOptions.method} ${path28} - ${error3.status} in ${Date.now() - start}ms`);
+          octokit.log.info(`${requestOptions.method} ${path29} - ${error3.status} in ${Date.now() - start}ms`);
           throw error3;
         });
       });
@@ -121317,11 +118438,11 @@ var require_get_artifact = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -121337,7 +118458,7 @@ var require_get_artifact = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -121357,7 +118478,7 @@ var require_get_artifact = __commonJS({
     var errors_1 = require_errors3();
     function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) {
       return __awaiter2(this, void 0, void 0, function* () {
-        var _a;
+        var _a2;
         const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
         const opts = {
           log: void 0,
@@ -121374,7 +118495,7 @@ var require_get_artifact = __commonJS({
           name: artifactName
         });
         if (getArtifactResp.status !== 200) {
-          throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a === void 0 ? void 0 : _a["x-github-request-id"]})`);
+          throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a2 = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a2 === void 0 ? void 0 : _a2["x-github-request-id"]})`);
         }
         if (getArtifactResp.data.artifacts.length === 0) {
           throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}
@@ -121400,7 +118521,7 @@ var require_get_artifact = __commonJS({
     exports2.getArtifactPublic = getArtifactPublic;
     function getArtifactInternal(artifactName) {
       return __awaiter2(this, void 0, void 0, function* () {
-        var _a;
+        var _a2;
         const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
         const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
         const req = {
@@ -121425,7 +118546,7 @@ var require_get_artifact = __commonJS({
             id: Number(artifact2.databaseId),
             size: Number(artifact2.size),
             createdAt: artifact2.createdAt ? generated_1.Timestamp.toDate(artifact2.createdAt) : void 0,
-            digest: (_a = artifact2.digest) === null || _a === void 0 ? void 0 : _a.value
+            digest: (_a2 = artifact2.digest) === null || _a2 === void 0 ? void 0 : _a2.value
           }
         };
       });
@@ -121440,11 +118561,11 @@ var require_delete_artifact = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -121460,7 +118581,7 @@ var require_delete_artifact = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -121481,7 +118602,7 @@ var require_delete_artifact = __commonJS({
     var errors_1 = require_errors3();
     function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) {
       return __awaiter2(this, void 0, void 0, function* () {
-        var _a;
+        var _a2;
         const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
         const opts = {
           log: void 0,
@@ -121498,7 +118619,7 @@ var require_delete_artifact = __commonJS({
           artifact_id: getArtifactResp.artifact.id
         });
         if (deleteArtifactResp.status !== 204) {
-          throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${deleteArtifactResp.status} (${(_a = deleteArtifactResp === null || deleteArtifactResp === void 0 ? void 0 : deleteArtifactResp.headers) === null || _a === void 0 ? void 0 : _a["x-github-request-id"]})`);
+          throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${deleteArtifactResp.status} (${(_a2 = deleteArtifactResp === null || deleteArtifactResp === void 0 ? void 0 : deleteArtifactResp.headers) === null || _a2 === void 0 ? void 0 : _a2["x-github-request-id"]})`);
         }
         return {
           id: getArtifactResp.artifact.id
@@ -121546,11 +118667,11 @@ var require_list_artifacts = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -121566,7 +118687,7 @@ var require_list_artifacts = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -121663,13 +118784,13 @@ var require_list_artifacts = __commonJS({
         };
         const res = yield artifactClient.ListArtifacts(req);
         let artifacts = res.artifacts.map((artifact2) => {
-          var _a;
+          var _a2;
           return {
             name: artifact2.name,
             id: Number(artifact2.databaseId),
             size: Number(artifact2.size),
             createdAt: artifact2.createdAt ? generated_1.Timestamp.toDate(artifact2.createdAt) : void 0,
-            digest: (_a = artifact2.digest) === null || _a === void 0 ? void 0 : _a.value
+            digest: (_a2 = artifact2.digest) === null || _a2 === void 0 ? void 0 : _a2.value
           };
         });
         if (latest) {
@@ -121703,11 +118824,11 @@ var require_client2 = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -121723,7 +118844,7 @@ var require_client2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -122046,7 +119167,7 @@ var require_file_command2 = __commonJS({
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
     var crypto3 = __importStar2(require("crypto"));
-    var fs30 = __importStar2(require("fs"));
+    var fs31 = __importStar2(require("fs"));
     var os7 = __importStar2(require("os"));
     var utils_1 = require_utils10();
     function issueFileCommand(command, message) {
@@ -122054,10 +119175,10 @@ var require_file_command2 = __commonJS({
       if (!filePath) {
         throw new Error(`Unable to find environment variable for file command ${command}`);
       }
-      if (!fs30.existsSync(filePath)) {
+      if (!fs31.existsSync(filePath)) {
         throw new Error(`Missing file at path: ${filePath}`);
       }
-      fs30.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, {
+      fs31.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, {
         encoding: "utf8"
       });
     }
@@ -122098,7 +119219,7 @@ var require_proxy3 = __commonJS({
       if (proxyVar) {
         try {
           return new DecodedURL(proxyVar);
-        } catch (_a) {
+        } catch (_a2) {
           if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
             return new DecodedURL(`http://${proxyVar}`);
         }
@@ -122192,11 +119313,11 @@ var require_lib5 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -122212,7 +119333,7 @@ var require_lib5 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -122298,26 +119419,26 @@ var require_lib5 = __commonJS({
       }
       readBody() {
         return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () {
             let output = Buffer.alloc(0);
             this.message.on("data", (chunk) => {
               output = Buffer.concat([output, chunk]);
             });
             this.message.on("end", () => {
-              resolve13(output.toString());
+              resolve14(output.toString());
             });
           }));
         });
       }
       readBodyBuffer() {
         return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () {
             const chunks = [];
             this.message.on("data", (chunk) => {
               chunks.push(chunk);
             });
             this.message.on("end", () => {
-              resolve13(Buffer.concat(chunks));
+              resolve14(Buffer.concat(chunks));
             });
           }));
         });
@@ -122526,14 +119647,14 @@ var require_lib5 = __commonJS({
        */
       requestRaw(info8, data) {
         return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13, reject) => {
+          return new Promise((resolve14, reject) => {
             function callbackForResult(err, res) {
               if (err) {
                 reject(err);
               } else if (!res) {
                 reject(new Error("Unknown error"));
               } else {
-                resolve13(res);
+                resolve14(res);
               }
             }
             this.requestRawWithCallback(info8, data, callbackForResult);
@@ -122636,12 +119757,12 @@ var require_lib5 = __commonJS({
         }
         return lowercaseKeys2(headers || {});
       }
-      _getExistingOrDefaultHeader(additionalHeaders, header, _default2) {
+      _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
         let clientHeader;
         if (this.requestOptions && this.requestOptions.headers) {
           clientHeader = lowercaseKeys2(this.requestOptions.headers)[header];
         }
-        return additionalHeaders[header] || clientHeader || _default2;
+        return additionalHeaders[header] || clientHeader || _default;
       }
       _getAgent(parsedUrl) {
         let agent;
@@ -122715,12 +119836,12 @@ var require_lib5 = __commonJS({
         return __awaiter2(this, void 0, void 0, function* () {
           retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
           const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
-          return new Promise((resolve13) => setTimeout(() => resolve13(), ms));
+          return new Promise((resolve14) => setTimeout(() => resolve14(), ms));
         });
       }
       _processResponse(res, options) {
         return __awaiter2(this, void 0, void 0, function* () {
-          return new Promise((resolve13, reject) => __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14, reject) => __awaiter2(this, void 0, void 0, function* () {
             const statusCode = res.message.statusCode || 0;
             const response = {
               statusCode,
@@ -122728,7 +119849,7 @@ var require_lib5 = __commonJS({
               headers: {}
             };
             if (statusCode === HttpCodes.NotFound) {
-              resolve13(response);
+              resolve14(response);
             }
             function dateTimeDeserializer(key, value) {
               if (typeof value === "string") {
@@ -122767,7 +119888,7 @@ var require_lib5 = __commonJS({
               err.result = response.result;
               reject(err);
             } else {
-              resolve13(response);
+              resolve14(response);
             }
           }));
         });
@@ -122784,11 +119905,11 @@ var require_auth2 = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -122804,7 +119925,7 @@ var require_auth2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -122888,11 +120009,11 @@ var require_oidc_utils2 = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -122908,7 +120029,7 @@ var require_oidc_utils2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -122941,7 +120062,7 @@ var require_oidc_utils2 = __commonJS({
         return runtimeUrl;
       }
       static getCall(id_token_url) {
-        var _a;
+        var _a2;
         return __awaiter2(this, void 0, void 0, function* () {
           const httpclient = _OidcClient.createHttpClient();
           const res = yield httpclient.getJson(id_token_url).catch((error3) => {
@@ -122951,7 +120072,7 @@ var require_oidc_utils2 = __commonJS({
  
         Error Message: ${error3.message}`);
           });
-          const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
+          const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value;
           if (!id_token) {
             throw new Error("Response json body do not have ID Token field");
           }
@@ -122986,11 +120107,11 @@ var require_summary2 = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -123006,7 +120127,7 @@ var require_summary2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -123039,7 +120160,7 @@ var require_summary2 = __commonJS({
           }
           try {
             yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.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;
@@ -123307,7 +120428,7 @@ var require_path_utils2 = __commonJS({
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0;
-    var path28 = __importStar2(require("path"));
+    var path29 = __importStar2(require("path"));
     function toPosixPath(pth) {
       return pth.replace(/[\\]/g, "/");
     }
@@ -123317,7 +120438,7 @@ var require_path_utils2 = __commonJS({
     }
     exports2.toWin32Path = toWin32Path;
     function toPlatformPath(pth) {
-      return pth.replace(/[/\\]/g, path28.sep);
+      return pth.replace(/[/\\]/g, path29.sep);
     }
     exports2.toPlatformPath = toPlatformPath;
   }
@@ -123352,11 +120473,11 @@ var require_io_util2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -123372,20 +120493,20 @@ var require_io_util2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
     };
-    var _a;
+    var _a2;
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0;
-    var fs30 = __importStar2(require("fs"));
-    var path28 = __importStar2(require("path"));
-    _a = fs30.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink;
+    var fs31 = __importStar2(require("fs"));
+    var path29 = __importStar2(require("path"));
+    _a2 = fs31.promises, exports2.chmod = _a2.chmod, exports2.copyFile = _a2.copyFile, exports2.lstat = _a2.lstat, exports2.mkdir = _a2.mkdir, exports2.open = _a2.open, exports2.readdir = _a2.readdir, exports2.readlink = _a2.readlink, exports2.rename = _a2.rename, exports2.rm = _a2.rm, exports2.rmdir = _a2.rmdir, exports2.stat = _a2.stat, exports2.symlink = _a2.symlink, exports2.unlink = _a2.unlink;
     exports2.IS_WINDOWS = process.platform === "win32";
     exports2.UV_FS_O_EXLOCK = 268435456;
-    exports2.READONLY = fs30.constants.O_RDONLY;
+    exports2.READONLY = fs31.constants.O_RDONLY;
     function exists(fsPath) {
       return __awaiter2(this, void 0, void 0, function* () {
         try {
@@ -123430,7 +120551,7 @@ var require_io_util2 = __commonJS({
         }
         if (stats && stats.isFile()) {
           if (exports2.IS_WINDOWS) {
-            const upperExt = path28.extname(filePath).toUpperCase();
+            const upperExt = path29.extname(filePath).toUpperCase();
             if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) {
               return filePath;
             }
@@ -123454,11 +120575,11 @@ var require_io_util2 = __commonJS({
           if (stats && stats.isFile()) {
             if (exports2.IS_WINDOWS) {
               try {
-                const directory = path28.dirname(filePath);
-                const upperName = path28.basename(filePath).toUpperCase();
+                const directory = path29.dirname(filePath);
+                const upperName = path29.basename(filePath).toUpperCase();
                 for (const actualName of yield exports2.readdir(directory)) {
                   if (upperName === actualName.toUpperCase()) {
-                    filePath = path28.join(directory, actualName);
+                    filePath = path29.join(directory, actualName);
                     break;
                   }
                 }
@@ -123489,8 +120610,8 @@ var require_io_util2 = __commonJS({
       return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid();
     }
     function getCmdPath() {
-      var _a2;
-      return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`;
+      var _a3;
+      return (_a3 = process.env["COMSPEC"]) !== null && _a3 !== void 0 ? _a3 : `cmd.exe`;
     }
     exports2.getCmdPath = getCmdPath;
   }
@@ -123525,11 +120646,11 @@ var require_io2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -123545,7 +120666,7 @@ var require_io2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -123553,7 +120674,7 @@ var require_io2 = __commonJS({
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0;
     var assert_1 = require("assert");
-    var path28 = __importStar2(require("path"));
+    var path29 = __importStar2(require("path"));
     var ioUtil = __importStar2(require_io_util2());
     function cp(source, dest, options = {}) {
       return __awaiter2(this, void 0, void 0, function* () {
@@ -123562,7 +120683,7 @@ var require_io2 = __commonJS({
         if (destStat && destStat.isFile() && !force) {
           return;
         }
-        const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path28.join(dest, path28.basename(source)) : dest;
+        const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path29.join(dest, path29.basename(source)) : dest;
         if (!(yield ioUtil.exists(source))) {
           throw new Error(`no such file or directory: ${source}`);
         }
@@ -123574,7 +120695,7 @@ var require_io2 = __commonJS({
             yield cpDirRecursive(source, newDest, 0, force);
           }
         } else {
-          if (path28.relative(source, newDest) === "") {
+          if (path29.relative(source, newDest) === "") {
             throw new Error(`'${newDest}' and '${source}' are the same file`);
           }
           yield copyFile2(source, newDest, force);
@@ -123587,7 +120708,7 @@ var require_io2 = __commonJS({
         if (yield ioUtil.exists(dest)) {
           let destExists = true;
           if (yield ioUtil.isDirectory(dest)) {
-            dest = path28.join(dest, path28.basename(source));
+            dest = path29.join(dest, path29.basename(source));
             destExists = yield ioUtil.exists(dest);
           }
           if (destExists) {
@@ -123598,7 +120719,7 @@ var require_io2 = __commonJS({
             }
           }
         }
-        yield mkdirP(path28.dirname(dest));
+        yield mkdirP(path29.dirname(dest));
         yield ioUtil.rename(source, dest);
       });
     }
@@ -123661,7 +120782,7 @@ var require_io2 = __commonJS({
         }
         const extensions = [];
         if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) {
-          for (const extension of process.env["PATHEXT"].split(path28.delimiter)) {
+          for (const extension of process.env["PATHEXT"].split(path29.delimiter)) {
             if (extension) {
               extensions.push(extension);
             }
@@ -123674,12 +120795,12 @@ var require_io2 = __commonJS({
           }
           return [];
         }
-        if (tool.includes(path28.sep)) {
+        if (tool.includes(path29.sep)) {
           return [];
         }
         const directories = [];
         if (process.env.PATH) {
-          for (const p of process.env.PATH.split(path28.delimiter)) {
+          for (const p of process.env.PATH.split(path29.delimiter)) {
             if (p) {
               directories.push(p);
             }
@@ -123687,7 +120808,7 @@ var require_io2 = __commonJS({
         }
         const matches = [];
         for (const directory of directories) {
-          const filePath = yield ioUtil.tryGetExecutablePath(path28.join(directory, tool), extensions);
+          const filePath = yield ioUtil.tryGetExecutablePath(path29.join(directory, tool), extensions);
           if (filePath) {
             matches.push(filePath);
           }
@@ -123773,11 +120894,11 @@ var require_toolrunner2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -123793,7 +120914,7 @@ var require_toolrunner2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -123803,7 +120924,7 @@ var require_toolrunner2 = __commonJS({
     var os7 = __importStar2(require("os"));
     var events = __importStar2(require("events"));
     var child = __importStar2(require("child_process"));
-    var path28 = __importStar2(require("path"));
+    var path29 = __importStar2(require("path"));
     var io9 = __importStar2(require_io2());
     var ioUtil = __importStar2(require_io_util2());
     var timers_1 = require("timers");
@@ -123890,8 +121011,8 @@ var require_toolrunner2 = __commonJS({
         }
         return this.args;
       }
-      _endsWith(str2, end) {
-        return str2.endsWith(end);
+      _endsWith(str, end) {
+        return str.endsWith(end);
       }
       _isCmdFile() {
         const upperToolPath = this.toolPath.toUpperCase();
@@ -124018,10 +121139,10 @@ var require_toolrunner2 = __commonJS({
       exec() {
         return __awaiter2(this, void 0, void 0, function* () {
           if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) {
-            this.toolPath = path28.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
+            this.toolPath = path29.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
           }
           this.toolPath = yield io9.which(this.toolPath, true);
-          return new Promise((resolve13, reject) => __awaiter2(this, void 0, void 0, function* () {
+          return new Promise((resolve14, reject) => __awaiter2(this, void 0, void 0, function* () {
             this._debug(`exec tool: ${this.toolPath}`);
             this._debug("arguments:");
             for (const arg of this.args) {
@@ -124104,7 +121225,7 @@ var require_toolrunner2 = __commonJS({
               if (error3) {
                 reject(error3);
               } else {
-                resolve13(exitCode);
+                resolve14(exitCode);
               }
             });
             if (this.options.input) {
@@ -124257,11 +121378,11 @@ var require_exec2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -124277,7 +121398,7 @@ var require_exec2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -124300,13 +121421,13 @@ var require_exec2 = __commonJS({
     }
     exports2.exec = exec3;
     function getExecOutput(commandLine, args, options) {
-      var _a, _b;
+      var _a2, _b;
       return __awaiter2(this, void 0, void 0, function* () {
         let stdout = "";
         let stderr = "";
         const stdoutDecoder = new string_decoder_1.StringDecoder("utf8");
         const stderrDecoder = new string_decoder_1.StringDecoder("utf8");
-        const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
+        const originalStdoutListener = (_a2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a2 === void 0 ? void 0 : _a2.stdout;
         const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
         const stdErrListener = (data) => {
           stderr += stderrDecoder.write(data);
@@ -124368,11 +121489,11 @@ var require_platform2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -124388,7 +121509,7 @@ var require_platform2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -124413,11 +121534,11 @@ var require_platform2 = __commonJS({
       };
     });
     var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () {
-      var _a, _b, _c, _d;
+      var _a2, _b, _c, _d;
       const { stdout } = yield exec3.getExecOutput("sw_vers", void 0, {
         silent: true
       });
-      const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
+      const version = (_b = (_a2 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a2 === void 0 ? void 0 : _a2[1]) !== null && _b !== void 0 ? _b : "";
       const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : "";
       return {
         name,
@@ -124487,11 +121608,11 @@ var require_core3 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -124507,7 +121628,7 @@ var require_core3 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -124518,14 +121639,14 @@ var require_core3 = __commonJS({
     var file_command_1 = require_file_command2();
     var utils_1 = require_utils10();
     var os7 = __importStar2(require("os"));
-    var path28 = __importStar2(require("path"));
+    var path29 = __importStar2(require("path"));
     var oidc_utils_1 = require_oidc_utils2();
     var ExitCode;
     (function(ExitCode2) {
       ExitCode2[ExitCode2["Success"] = 0] = "Success";
       ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
     })(ExitCode || (exports2.ExitCode = ExitCode = {}));
-    function exportVariable15(name, val) {
+    function exportVariable16(name, val) {
       const convertedVal = (0, utils_1.toCommandValue)(val);
       process.env[name] = convertedVal;
       const filePath = process.env["GITHUB_ENV"] || "";
@@ -124534,7 +121655,7 @@ var require_core3 = __commonJS({
       }
       (0, command_1.issueCommand)("set-env", { name }, convertedVal);
     }
-    exports2.exportVariable = exportVariable15;
+    exports2.exportVariable = exportVariable16;
     function setSecret2(secret) {
       (0, command_1.issueCommand)("add-mask", {}, secret);
     }
@@ -124546,7 +121667,7 @@ var require_core3 = __commonJS({
       } else {
         (0, command_1.issueCommand)("add-path", {}, inputPath);
       }
-      process.env["PATH"] = `${inputPath}${path28.delimiter}${process.env["PATH"]}`;
+      process.env["PATH"] = `${inputPath}${path29.delimiter}${process.env["PATH"]}`;
     }
     exports2.addPath = addPath2;
     function getInput2(name, options) {
@@ -124722,13 +121843,13 @@ These characters are not allowed in the artifact name due to limitations with ce
       (0, core_1.info)(`Artifact name is valid!`);
     }
     exports2.checkArtifactName = checkArtifactName;
-    function checkArtifactFilePath(path28) {
-      if (!path28) {
-        throw new Error(`Artifact path: ${path28}, is incorrectly provided`);
+    function checkArtifactFilePath(path29) {
+      if (!path29) {
+        throw new Error(`Artifact path: ${path29}, is incorrectly provided`);
       }
       for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) {
-        if (path28.includes(invalidCharacterKey)) {
-          throw new Error(`Artifact path is not valid: ${path28}. Contains the following character: ${errorMessageForCharacter}
+        if (path29.includes(invalidCharacterKey)) {
+          throw new Error(`Artifact path is not valid: ${path29}. Contains the following character: ${errorMessageForCharacter}
           
 Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()}
           
@@ -124774,25 +121895,25 @@ var require_upload_specification = __commonJS({
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.getUploadSpecification = void 0;
-    var fs30 = __importStar2(require("fs"));
+    var fs31 = __importStar2(require("fs"));
     var core_1 = require_core3();
     var path_1 = require("path");
     var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2();
     function getUploadSpecification(artifactName, rootDirectory, artifactFiles) {
       const specifications = [];
-      if (!fs30.existsSync(rootDirectory)) {
+      if (!fs31.existsSync(rootDirectory)) {
         throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`);
       }
-      if (!fs30.statSync(rootDirectory).isDirectory()) {
+      if (!fs31.statSync(rootDirectory).isDirectory()) {
         throw new Error(`Provided rootDirectory ${rootDirectory} is not a valid directory`);
       }
       rootDirectory = (0, path_1.normalize)(rootDirectory);
       rootDirectory = (0, path_1.resolve)(rootDirectory);
       for (let file of artifactFiles) {
-        if (!fs30.existsSync(file)) {
+        if (!fs31.existsSync(file)) {
           throw new Error(`File ${file} does not exist`);
         }
-        if (!fs30.statSync(file).isDirectory()) {
+        if (!fs31.statSync(file).isDirectory()) {
           file = (0, path_1.normalize)(file);
           file = (0, path_1.resolve)(file);
           if (!file.startsWith(rootDirectory)) {
@@ -124817,11 +121938,11 @@ var require_upload_specification = __commonJS({
 // node_modules/tmp/lib/tmp.js
 var require_tmp = __commonJS({
   "node_modules/tmp/lib/tmp.js"(exports2, module2) {
-    var fs30 = require("fs");
+    var fs31 = require("fs");
     var os7 = require("os");
-    var path28 = require("path");
+    var path29 = require("path");
     var crypto3 = require("crypto");
-    var _c = { fs: fs30.constants, os: os7.constants };
+    var _c = { fs: fs31.constants, os: os7.constants };
     var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     var TEMPLATE_PATTERN = /XXXXXX/;
     var DEFAULT_TRIES = 3;
@@ -124833,13 +121954,13 @@ var require_tmp = __commonJS({
     var FILE_MODE = 384;
     var EXIT = "exit";
     var _removeObjects = [];
-    var FN_RMDIR_SYNC = fs30.rmdirSync.bind(fs30);
+    var FN_RMDIR_SYNC = fs31.rmdirSync.bind(fs31);
     var _gracefulCleanup = false;
     function rimraf(dirPath, callback) {
-      return fs30.rm(dirPath, { recursive: true }, callback);
+      return fs31.rm(dirPath, { recursive: true }, callback);
     }
     function FN_RIMRAF_SYNC(dirPath) {
-      return fs30.rmSync(dirPath, { recursive: true });
+      return fs31.rmSync(dirPath, { recursive: true });
     }
     function tmpName(options, callback) {
       const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
@@ -124849,7 +121970,7 @@ var require_tmp = __commonJS({
         (function _getUniqueName() {
           try {
             const name = _generateTmpName(sanitizedOptions);
-            fs30.stat(name, function(err2) {
+            fs31.stat(name, function(err2) {
               if (!err2) {
                 if (tries-- > 0) return _getUniqueName();
                 return cb(new Error("Could not get a unique tmp filename, max tries reached " + name));
@@ -124869,7 +121990,7 @@ var require_tmp = __commonJS({
       do {
         const name = _generateTmpName(sanitizedOptions);
         try {
-          fs30.statSync(name);
+          fs31.statSync(name);
         } catch (e) {
           return name;
         }
@@ -124880,10 +122001,10 @@ var require_tmp = __commonJS({
       const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
       tmpName(opts, function _tmpNameCreated(err, name) {
         if (err) return cb(err);
-        fs30.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
+        fs31.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
           if (err2) return cb(err2);
           if (opts.discardDescriptor) {
-            return fs30.close(fd, function _discardCallback(possibleErr) {
+            return fs31.close(fd, function _discardCallback(possibleErr) {
               return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false));
             });
           } else {
@@ -124897,9 +122018,9 @@ var require_tmp = __commonJS({
       const args = _parseArguments(options), opts = args[0];
       const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
       const name = tmpNameSync(opts);
-      let fd = fs30.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
+      let fd = fs31.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
       if (opts.discardDescriptor) {
-        fs30.closeSync(fd);
+        fs31.closeSync(fd);
         fd = void 0;
       }
       return {
@@ -124912,7 +122033,7 @@ var require_tmp = __commonJS({
       const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
       tmpName(opts, function _tmpNameCreated(err, name) {
         if (err) return cb(err);
-        fs30.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
+        fs31.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
           if (err2) return cb(err2);
           cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false));
         });
@@ -124921,7 +122042,7 @@ var require_tmp = __commonJS({
     function dirSync(options) {
       const args = _parseArguments(options), opts = args[0];
       const name = tmpNameSync(opts);
-      fs30.mkdirSync(name, opts.mode || DIR_MODE);
+      fs31.mkdirSync(name, opts.mode || DIR_MODE);
       return {
         name,
         removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)
@@ -124935,20 +122056,20 @@ var require_tmp = __commonJS({
         next();
       };
       if (0 <= fdPath[0])
-        fs30.close(fdPath[0], function() {
-          fs30.unlink(fdPath[1], _handler);
+        fs31.close(fdPath[0], function() {
+          fs31.unlink(fdPath[1], _handler);
         });
-      else fs30.unlink(fdPath[1], _handler);
+      else fs31.unlink(fdPath[1], _handler);
     }
     function _removeFileSync(fdPath) {
       let rethrownException = null;
       try {
-        if (0 <= fdPath[0]) fs30.closeSync(fdPath[0]);
+        if (0 <= fdPath[0]) fs31.closeSync(fdPath[0]);
       } catch (e) {
         if (!_isEBADF(e) && !_isENOENT(e)) throw e;
       } finally {
         try {
-          fs30.unlinkSync(fdPath[1]);
+          fs31.unlinkSync(fdPath[1]);
         } catch (e) {
           if (!_isENOENT(e)) rethrownException = e;
         }
@@ -124964,7 +122085,7 @@ var require_tmp = __commonJS({
       return sync ? removeCallbackSync : removeCallback;
     }
     function _prepareTmpDirRemoveCallback(name, opts, sync) {
-      const removeFunction = opts.unsafeCleanup ? rimraf : fs30.rmdir.bind(fs30);
+      const removeFunction = opts.unsafeCleanup ? rimraf : fs31.rmdir.bind(fs31);
       const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;
       const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);
       const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);
@@ -124976,8 +122097,8 @@ var require_tmp = __commonJS({
       return function _cleanupCallback(next) {
         if (!called) {
           const toRemove = cleanupCallbackSync || _cleanupCallback;
-          const index = _removeObjects.indexOf(toRemove);
-          if (index >= 0) _removeObjects.splice(index, 1);
+          const index2 = _removeObjects.indexOf(toRemove);
+          if (index2 >= 0) _removeObjects.splice(index2, 1);
           called = true;
           if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {
             return removeFunction(fileOrDirName);
@@ -125026,35 +122147,35 @@ var require_tmp = __commonJS({
       return [actualOptions, callback];
     }
     function _resolvePath(name, tmpDir, cb) {
-      const pathToResolve = path28.isAbsolute(name) ? name : path28.join(tmpDir, name);
-      fs30.stat(pathToResolve, function(err) {
+      const pathToResolve = path29.isAbsolute(name) ? name : path29.join(tmpDir, name);
+      fs31.stat(pathToResolve, function(err) {
         if (err) {
-          fs30.realpath(path28.dirname(pathToResolve), function(err2, parentDir) {
+          fs31.realpath(path29.dirname(pathToResolve), function(err2, parentDir) {
             if (err2) return cb(err2);
-            cb(null, path28.join(parentDir, path28.basename(pathToResolve)));
+            cb(null, path29.join(parentDir, path29.basename(pathToResolve)));
           });
         } else {
-          fs30.realpath(pathToResolve, cb);
+          fs31.realpath(pathToResolve, cb);
         }
       });
     }
     function _resolvePathSync(name, tmpDir) {
-      const pathToResolve = path28.isAbsolute(name) ? name : path28.join(tmpDir, name);
+      const pathToResolve = path29.isAbsolute(name) ? name : path29.join(tmpDir, name);
       try {
-        fs30.statSync(pathToResolve);
-        return fs30.realpathSync(pathToResolve);
+        fs31.statSync(pathToResolve);
+        return fs31.realpathSync(pathToResolve);
       } catch (_err) {
-        const parentDir = fs30.realpathSync(path28.dirname(pathToResolve));
-        return path28.join(parentDir, path28.basename(pathToResolve));
+        const parentDir = fs31.realpathSync(path29.dirname(pathToResolve));
+        return path29.join(parentDir, path29.basename(pathToResolve));
       }
     }
     function _generateTmpName(opts) {
       const tmpDir = opts.tmpdir;
       if (!_isUndefined(opts.name)) {
-        return path28.join(tmpDir, opts.dir, opts.name);
+        return path29.join(tmpDir, opts.dir, opts.name);
       }
       if (!_isUndefined(opts.template)) {
-        return path28.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
+        return path29.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
       }
       const name = [
         opts.prefix ? opts.prefix : "tmp",
@@ -125064,7 +122185,7 @@ var require_tmp = __commonJS({
         _randomChars(12),
         opts.postfix ? "-" + opts.postfix : ""
       ].join("");
-      return path28.join(tmpDir, opts.dir, name);
+      return path29.join(tmpDir, opts.dir, name);
     }
     function _assertPath(option, value) {
       if (typeof value !== "string") {
@@ -125078,8 +122199,8 @@ var require_tmp = __commonJS({
     function _assertOptionsBase(options) {
       if (!_isUndefined(options.name)) {
         const name = options.name;
-        if (path28.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`);
-        const basename2 = path28.basename(name);
+        if (path29.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`);
+        const basename2 = path29.basename(name);
         if (basename2 === ".." || basename2 === "." || basename2 !== name) {
           throw new Error(`name option must not contain a path, found "${name}".`);
         }
@@ -125108,21 +122229,21 @@ var require_tmp = __commonJS({
       if (_isUndefined(name)) return cb(null);
       _resolvePath(name, tmpDir, function(err, resolvedPath) {
         if (err) return cb(err);
-        const relativePath = path28.relative(tmpDir, resolvedPath);
-        if (relativePath.startsWith("..") || path28.isAbsolute(relativePath)) {
-          return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
+        const relativePath2 = path29.relative(tmpDir, resolvedPath);
+        if (relativePath2.startsWith("..") || path29.isAbsolute(relativePath2)) {
+          return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath2}".`));
         }
-        cb(null, relativePath);
+        cb(null, relativePath2);
       });
     }
     function _getRelativePathSync(option, name, tmpDir) {
       if (_isUndefined(name)) return;
       const resolvedPath = _resolvePathSync(name, tmpDir);
-      const relativePath = path28.relative(tmpDir, resolvedPath);
-      if (relativePath.startsWith("..") || path28.isAbsolute(relativePath)) {
-        throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
+      const relativePath2 = path29.relative(tmpDir, resolvedPath);
+      if (relativePath2.startsWith("..") || path29.isAbsolute(relativePath2)) {
+        throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath2}".`);
       }
-      return relativePath;
+      return relativePath2;
     }
     function _assertAndSanitizeOptions(options, cb) {
       _getTmpDir(options, function(err, tmpDir) {
@@ -125165,10 +122286,10 @@ var require_tmp = __commonJS({
       _gracefulCleanup = true;
     }
     function _getTmpDir(options, cb) {
-      return fs30.realpath(options && options.tmpdir || os7.tmpdir(), cb);
+      return fs31.realpath(options && options.tmpdir || os7.tmpdir(), cb);
     }
     function _getTmpDirSync(options) {
-      return fs30.realpathSync(options && options.tmpdir || os7.tmpdir());
+      return fs31.realpathSync(options && options.tmpdir || os7.tmpdir());
     }
     process.addListener(EXIT, _garbageCollector);
     Object.defineProperty(module2.exports, "tmpdir", {
@@ -125198,14 +122319,14 @@ var require_tmp_promise = __commonJS({
     var fileWithOptions = promisify(
       (options, cb) => tmp.file(
         options,
-        (err, path28, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path28, fd, cleanup: promisify(cleanup) })
+        (err, path29, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path29, fd, cleanup: promisify(cleanup) })
       )
     );
     module2.exports.file = async (options) => fileWithOptions(options);
     module2.exports.withFile = async function withFile(fn, options) {
-      const { path: path28, fd, cleanup } = await module2.exports.file(options);
+      const { path: path29, fd, cleanup } = await module2.exports.file(options);
       try {
-        return await fn({ path: path28, fd });
+        return await fn({ path: path29, fd });
       } finally {
         await cleanup();
       }
@@ -125214,14 +122335,14 @@ var require_tmp_promise = __commonJS({
     var dirWithOptions = promisify(
       (options, cb) => tmp.dir(
         options,
-        (err, path28, cleanup) => err ? cb(err) : cb(void 0, { path: path28, cleanup: promisify(cleanup) })
+        (err, path29, cleanup) => err ? cb(err) : cb(void 0, { path: path29, cleanup: promisify(cleanup) })
       )
     );
     module2.exports.dir = async (options) => dirWithOptions(options);
     module2.exports.withDir = async function withDir(fn, options) {
-      const { path: path28, cleanup } = await module2.exports.dir(options);
+      const { path: path29, cleanup } = await module2.exports.dir(options);
       try {
-        return await fn({ path: path28 });
+        return await fn({ path: path29 });
       } finally {
         await cleanup();
       }
@@ -125610,11 +122731,11 @@ var require_utils11 = __commonJS({
     "use strict";
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -125630,7 +122751,7 @@ var require_utils11 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -125840,19 +122961,19 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)}
     exports2.getProperRetention = getProperRetention;
     function sleep(milliseconds) {
       return __awaiter2(this, void 0, void 0, function* () {
-        return new Promise((resolve13) => setTimeout(resolve13, milliseconds));
+        return new Promise((resolve14) => setTimeout(resolve14, milliseconds));
       });
     }
     exports2.sleep = sleep;
     function digestForStream(stream2) {
       return __awaiter2(this, void 0, void 0, function* () {
-        return new Promise((resolve13, reject) => {
+        return new Promise((resolve14, reject) => {
           const crc64 = new crc64_1.default();
           const md5 = crypto_1.default.createHash("md5");
           stream2.on("data", (data) => {
             crc64.update(data);
             md5.update(data);
-          }).on("end", () => resolve13({
+          }).on("end", () => resolve14({
             crc64: crc64.digest("base64"),
             md5: md5.digest("base64")
           })).on("error", reject);
@@ -125924,18 +123045,18 @@ var require_http_manager = __commonJS({
         this.userAgent = userAgent2;
         this.clients = new Array(clientCount).fill((0, utils_1.createHttpClient)(userAgent2));
       }
-      getClient(index) {
-        return this.clients[index];
+      getClient(index2) {
+        return this.clients[index2];
       }
       // client disposal is necessary if a keep-alive connection is used to properly close the connection
       // for more information see: https://github.com/actions/http-client/blob/04e5ad73cd3fd1f5610a32116b0759eddf6570d2/index.ts#L292
-      disposeAndReplaceClient(index) {
-        this.clients[index].dispose();
-        this.clients[index] = (0, utils_1.createHttpClient)(this.userAgent);
+      disposeAndReplaceClient(index2) {
+        this.clients[index2].dispose();
+        this.clients[index2] = (0, utils_1.createHttpClient)(this.userAgent);
       }
       disposeAndReplaceAllClients() {
-        for (const [index] of this.clients.entries()) {
-          this.disposeAndReplaceClient(index);
+        for (const [index2] of this.clients.entries()) {
+          this.disposeAndReplaceClient(index2);
         }
       }
     };
@@ -125976,11 +123097,11 @@ var require_upload_gzip = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -125996,7 +123117,7 @@ var require_upload_gzip = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -126009,23 +123130,23 @@ var require_upload_gzip = __commonJS({
       }, i);
       function verb(n) {
         i[n] = o[n] && function(v) {
-          return new Promise(function(resolve13, reject) {
-            v = o[n](v), settle(resolve13, reject, v.done, v.value);
+          return new Promise(function(resolve14, reject) {
+            v = o[n](v), settle(resolve14, reject, v.done, v.value);
           });
         };
       }
-      function settle(resolve13, reject, d, v) {
+      function settle(resolve14, reject, d, v) {
         Promise.resolve(v).then(function(v2) {
-          resolve13({ value: v2, done: d });
+          resolve14({ value: v2, done: d });
         }, reject);
       }
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0;
-    var fs30 = __importStar2(require("fs"));
+    var fs31 = __importStar2(require("fs"));
     var zlib3 = __importStar2(require("zlib"));
     var util_1 = require("util");
-    var stat = (0, util_1.promisify)(fs30.stat);
+    var stat2 = (0, util_1.promisify)(fs31.stat);
     var gzipExemptFileExtensions = [
       ".gz",
       ".gzip",
@@ -126057,14 +123178,14 @@ var require_upload_gzip = __commonJS({
             return Number.MAX_SAFE_INTEGER;
           }
         }
-        return new Promise((resolve13, reject) => {
-          const inputStream = fs30.createReadStream(originalFilePath);
+        return new Promise((resolve14, reject) => {
+          const inputStream = fs31.createReadStream(originalFilePath);
           const gzip = zlib3.createGzip();
-          const outputStream = fs30.createWriteStream(tempFilePath);
+          const outputStream = fs31.createWriteStream(tempFilePath);
           inputStream.pipe(gzip).pipe(outputStream);
           outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () {
-            const size = (yield stat(tempFilePath)).size;
-            resolve13(size);
+            const size = (yield stat2(tempFilePath)).size;
+            resolve14(size);
           }));
           outputStream.on("error", (error3) => {
             console.log(error3);
@@ -126076,14 +123197,14 @@ var require_upload_gzip = __commonJS({
     exports2.createGZipFileOnDisk = createGZipFileOnDisk;
     function createGZipFileInBuffer(originalFilePath) {
       return __awaiter2(this, void 0, void 0, function* () {
-        return new Promise((resolve13) => __awaiter2(this, void 0, void 0, function* () {
-          var _a, e_1, _b, _c;
-          const inputStream = fs30.createReadStream(originalFilePath);
+        return new Promise((resolve14) => __awaiter2(this, void 0, void 0, function* () {
+          var _a2, e_1, _b, _c;
+          const inputStream = fs31.createReadStream(originalFilePath);
           const gzip = zlib3.createGzip();
           inputStream.pipe(gzip);
           const chunks = [];
           try {
-            for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) {
+            for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a2 = gzip_1_1.done, !_a2; ) {
               _c = gzip_1_1.value;
               _d = false;
               try {
@@ -126097,12 +123218,12 @@ var require_upload_gzip = __commonJS({
             e_1 = { error: e_1_1 };
           } finally {
             try {
-              if (!_d && !_a && (_b = gzip_1.return)) yield _b.call(gzip_1);
+              if (!_d && !_a2 && (_b = gzip_1.return)) yield _b.call(gzip_1);
             } finally {
               if (e_1) throw e_1.error;
             }
           }
-          resolve13(Buffer.concat(chunks));
+          resolve14(Buffer.concat(chunks));
         }));
       });
     }
@@ -126143,11 +123264,11 @@ var require_requestUtils2 = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -126163,7 +123284,7 @@ var require_requestUtils2 = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -126260,11 +123381,11 @@ var require_upload_http_client = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -126280,14 +123401,14 @@ var require_upload_http_client = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.UploadHttpClient = void 0;
-    var fs30 = __importStar2(require("fs"));
+    var fs31 = __importStar2(require("fs"));
     var core31 = __importStar2(require_core3());
     var tmp = __importStar2(require_tmp_promise());
     var stream2 = __importStar2(require("stream"));
@@ -126301,7 +123422,7 @@ var require_upload_http_client = __commonJS({
     var http_manager_1 = require_http_manager();
     var upload_gzip_1 = require_upload_gzip();
     var requestUtils_1 = require_requestUtils2();
-    var stat = (0, util_1.promisify)(fs30.stat);
+    var stat2 = (0, util_1.promisify)(fs31.stat);
     var UploadHttpClient = class {
       constructor() {
         this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload");
@@ -126380,7 +123501,7 @@ var require_upload_http_client = __commonJS({
           let abortPendingFileUploads = false;
           this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length);
           this.statusReporter.start();
-          yield Promise.all(parallelUploads.map((index) => __awaiter2(this, void 0, void 0, function* () {
+          yield Promise.all(parallelUploads.map((index2) => __awaiter2(this, void 0, void 0, function* () {
             while (currentFile < filesToUpload.length) {
               const currentFileParameters = parameters[currentFile];
               currentFile += 1;
@@ -126389,7 +123510,7 @@ var require_upload_http_client = __commonJS({
                 continue;
               }
               const startTime = perf_hooks_1.performance.now();
-              const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters);
+              const uploadFileResult = yield this.uploadFileAsync(index2, currentFileParameters);
               if (core31.isDebug()) {
                 core31.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`);
               }
@@ -126424,7 +123545,7 @@ var require_upload_http_client = __commonJS({
        */
       uploadFileAsync(httpClientIndex, parameters) {
         return __awaiter2(this, void 0, void 0, function* () {
-          const fileStat = yield stat(parameters.file);
+          const fileStat = yield stat2(parameters.file);
           const totalFileSize = fileStat.size;
           const isFIFO = fileStat.isFIFO();
           let offset = 0;
@@ -126438,7 +123559,7 @@ var require_upload_http_client = __commonJS({
             let openUploadStream;
             if (totalFileSize < buffer.byteLength) {
               core31.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`);
-              openUploadStream = () => fs30.createReadStream(parameters.file);
+              openUploadStream = () => fs31.createReadStream(parameters.file);
               isGzip = false;
               uploadFileSize = totalFileSize;
             } else {
@@ -126484,7 +123605,7 @@ var require_upload_http_client = __commonJS({
                 failedChunkSizes += chunkSize;
                 continue;
               }
-              const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs30.createReadStream(uploadFilePath, {
+              const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs31.createReadStream(uploadFilePath, {
                 start: startChunkIndex,
                 end: endChunkIndex,
                 autoClose: false
@@ -126652,11 +123773,11 @@ var require_download_http_client = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -126672,14 +123793,14 @@ var require_download_http_client = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.DownloadHttpClient = void 0;
-    var fs30 = __importStar2(require("fs"));
+    var fs31 = __importStar2(require("fs"));
     var core31 = __importStar2(require_core3());
     var zlib3 = __importStar2(require("zlib"));
     var utils_1 = require_utils11();
@@ -126741,12 +123862,12 @@ var require_download_http_client = __commonJS({
           core31.info(`Total number of files that will be downloaded: ${downloadItems.length}`);
           this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length);
           this.statusReporter.start();
-          yield Promise.all(parallelDownloads.map((index) => __awaiter2(this, void 0, void 0, function* () {
+          yield Promise.all(parallelDownloads.map((index2) => __awaiter2(this, void 0, void 0, function* () {
             while (currentFile < downloadItems.length) {
               const currentFileToDownload = downloadItems[currentFile];
               currentFile += 1;
               const startTime = perf_hooks_1.performance.now();
-              yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath);
+              yield this.downloadIndividualFile(index2, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath);
               if (core31.isDebug()) {
                 core31.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`);
               }
@@ -126770,7 +123891,7 @@ var require_download_http_client = __commonJS({
         return __awaiter2(this, void 0, void 0, function* () {
           let retryCount = 0;
           const retryLimit = (0, config_variables_1.getRetryLimit)();
-          let destinationStream = fs30.createWriteStream(downloadPath);
+          let destinationStream = fs31.createWriteStream(downloadPath);
           const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true);
           const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () {
             const client = this.downloadHttpManager.getClient(httpClientIndex);
@@ -126805,14 +123926,14 @@ var require_download_http_client = __commonJS({
           };
           const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () {
             destinationStream.close();
-            yield new Promise((resolve13) => {
-              destinationStream.on("close", resolve13);
+            yield new Promise((resolve14) => {
+              destinationStream.on("close", resolve14);
               if (destinationStream.writableFinished) {
-                resolve13();
+                resolve14();
               }
             });
             yield (0, utils_1.rmFile)(fileDownloadPath);
-            destinationStream = fs30.createWriteStream(fileDownloadPath);
+            destinationStream = fs31.createWriteStream(fileDownloadPath);
           });
           while (retryCount <= retryLimit) {
             let response;
@@ -126857,7 +123978,7 @@ var require_download_http_client = __commonJS({
        */
       pipeResponseToFile(response, destinationStream, isGzip) {
         return __awaiter2(this, void 0, void 0, function* () {
-          yield new Promise((resolve13, reject) => {
+          yield new Promise((resolve14, reject) => {
             if (isGzip) {
               const gunzip = zlib3.createGunzip();
               response.message.on("error", (error3) => {
@@ -126870,7 +123991,7 @@ var require_download_http_client = __commonJS({
                 destinationStream.close();
                 reject(error3);
               }).pipe(destinationStream).on("close", () => {
-                resolve13();
+                resolve14();
               }).on("error", (error3) => {
                 core31.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
                 reject(error3);
@@ -126881,7 +124002,7 @@ var require_download_http_client = __commonJS({
                 destinationStream.close();
                 reject(error3);
               }).pipe(destinationStream).on("close", () => {
-                resolve13();
+                resolve14();
               }).on("error", (error3) => {
                 core31.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
                 reject(error3);
@@ -126929,21 +124050,21 @@ var require_download_specification = __commonJS({
     };
     Object.defineProperty(exports2, "__esModule", { value: true });
     exports2.getDownloadSpecification = void 0;
-    var path28 = __importStar2(require("path"));
+    var path29 = __importStar2(require("path"));
     function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) {
       const directories = /* @__PURE__ */ new Set();
       const specifications = {
-        rootDownloadLocation: includeRootDirectory ? path28.join(downloadPath, artifactName) : downloadPath,
+        rootDownloadLocation: includeRootDirectory ? path29.join(downloadPath, artifactName) : downloadPath,
         directoryStructure: [],
         emptyFilesToCreate: [],
         filesToDownload: []
       };
       for (const entry of artifactEntries) {
         if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) {
-          const normalizedPathEntry = path28.normalize(entry.path);
-          const filePath = path28.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, ""));
+          const normalizedPathEntry = path29.normalize(entry.path);
+          const filePath = path29.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, ""));
           if (entry.itemType === "file") {
-            directories.add(path28.dirname(filePath));
+            directories.add(path29.dirname(filePath));
             if (entry.fileLength === 0) {
               specifications.emptyFilesToCreate.push(filePath);
             } else {
@@ -126995,11 +124116,11 @@ var require_artifact_client = __commonJS({
     };
     var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
       function adopt(value) {
-        return value instanceof P ? value : new P(function(resolve13) {
-          resolve13(value);
+        return value instanceof P ? value : new P(function(resolve14) {
+          resolve14(value);
         });
       }
-      return new (P || (P = Promise))(function(resolve13, reject) {
+      return new (P || (P = Promise))(function(resolve14, reject) {
         function fulfilled(value) {
           try {
             step(generator.next(value));
@@ -127015,7 +124136,7 @@ var require_artifact_client = __commonJS({
           }
         }
         function step(result) {
-          result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
+          result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
         }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
       });
@@ -127085,7 +124206,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz
           return uploadResponse;
         });
       }
-      downloadArtifact(name, path28, options) {
+      downloadArtifact(name, path29, options) {
         return __awaiter2(this, void 0, void 0, function* () {
           const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
           const artifacts = yield downloadHttpClient.listArtifacts();
@@ -127099,12 +124220,12 @@ Note: The size of downloaded zips can differ significantly from the reported siz
             throw new Error(`Unable to find an artifact with the name: ${name}`);
           }
           const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
-          if (!path28) {
-            path28 = (0, config_variables_1.getWorkSpaceDirectory)();
+          if (!path29) {
+            path29 = (0, config_variables_1.getWorkSpaceDirectory)();
           }
-          path28 = (0, path_1.normalize)(path28);
-          path28 = (0, path_1.resolve)(path28);
-          const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path28, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
+          path29 = (0, path_1.normalize)(path29);
+          path29 = (0, path_1.resolve)(path29);
+          const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path29, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
           if (downloadSpecification.filesToDownload.length === 0) {
             core31.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
           } else {
@@ -127119,7 +124240,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz
           };
         });
       }
-      downloadAllArtifacts(path28) {
+      downloadAllArtifacts(path29) {
         return __awaiter2(this, void 0, void 0, function* () {
           const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
           const response = [];
@@ -127128,18 +124249,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz
             core31.info("Unable to find any artifacts for the associated workflow");
             return response;
           }
-          if (!path28) {
-            path28 = (0, config_variables_1.getWorkSpaceDirectory)();
+          if (!path29) {
+            path29 = (0, config_variables_1.getWorkSpaceDirectory)();
           }
-          path28 = (0, path_1.normalize)(path28);
-          path28 = (0, path_1.resolve)(path28);
+          path29 = (0, path_1.normalize)(path29);
+          path29 = (0, path_1.resolve)(path29);
           let downloadedArtifacts = 0;
           while (downloadedArtifacts < artifacts.count) {
             const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
             downloadedArtifacts += 1;
             core31.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`);
             const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);
-            const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path28, true);
+            const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path29, true);
             if (downloadSpecification.filesToDownload.length === 0) {
               core31.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
             } else {
@@ -127305,27 +124426,27 @@ var require_util16 = __commonJS({
   "node_modules/node-forge/lib/util.js"(exports2, module2) {
     var forge = require_forge();
     var baseN = require_baseN();
-    var util = module2.exports = forge.util = forge.util || {};
+    var util3 = module2.exports = forge.util = forge.util || {};
     (function() {
       if (typeof process !== "undefined" && process.nextTick && !process.browser) {
-        util.nextTick = process.nextTick;
+        util3.nextTick = process.nextTick;
         if (typeof setImmediate === "function") {
-          util.setImmediate = setImmediate;
+          util3.setImmediate = setImmediate;
         } else {
-          util.setImmediate = util.nextTick;
+          util3.setImmediate = util3.nextTick;
         }
         return;
       }
       if (typeof setImmediate === "function") {
-        util.setImmediate = function() {
+        util3.setImmediate = function() {
           return setImmediate.apply(void 0, arguments);
         };
-        util.nextTick = function(callback) {
+        util3.nextTick = function(callback) {
           return setImmediate(callback);
         };
         return;
       }
-      util.setImmediate = function(callback) {
+      util3.setImmediate = function(callback) {
         setTimeout(callback, 0);
       };
       if (typeof window !== "undefined" && typeof window.postMessage === "function") {
@@ -127342,7 +124463,7 @@ var require_util16 = __commonJS({
         var handler2 = handler3;
         var msg = "forge.setImmediate";
         var callbacks = [];
-        util.setImmediate = function(callback) {
+        util3.setImmediate = function(callback) {
           callbacks.push(callback);
           if (callbacks.length === 1) {
             window.postMessage(msg, "*");
@@ -127362,8 +124483,8 @@ var require_util16 = __commonJS({
             callback();
           });
         }).observe(div, { attributes: true });
-        var oldSetImmediate = util.setImmediate;
-        util.setImmediate = function(callback) {
+        var oldSetImmediate = util3.setImmediate;
+        util3.setImmediate = function(callback) {
           if (Date.now() - now > 15) {
             now = Date.now();
             oldSetImmediate(callback);
@@ -127375,36 +124496,36 @@ var require_util16 = __commonJS({
           }
         };
       }
-      util.nextTick = util.setImmediate;
+      util3.nextTick = util3.setImmediate;
     })();
-    util.isNodejs = typeof process !== "undefined" && process.versions && process.versions.node;
-    util.globalScope = (function() {
-      if (util.isNodejs) {
+    util3.isNodejs = typeof process !== "undefined" && process.versions && process.versions.node;
+    util3.globalScope = (function() {
+      if (util3.isNodejs) {
         return global;
       }
       return typeof self === "undefined" ? window : self;
     })();
-    util.isArray = Array.isArray || function(x) {
+    util3.isArray = Array.isArray || function(x) {
       return Object.prototype.toString.call(x) === "[object Array]";
     };
-    util.isArrayBuffer = function(x) {
+    util3.isArrayBuffer = function(x) {
       return typeof ArrayBuffer !== "undefined" && x instanceof ArrayBuffer;
     };
-    util.isArrayBufferView = function(x) {
-      return x && util.isArrayBuffer(x.buffer) && x.byteLength !== void 0;
+    util3.isArrayBufferView = function(x) {
+      return x && util3.isArrayBuffer(x.buffer) && x.byteLength !== void 0;
     };
     function _checkBitsParam(n) {
       if (!(n === 8 || n === 16 || n === 24 || n === 32)) {
         throw new Error("Only 8, 16, 24, or 32 bits supported: " + n);
       }
     }
-    util.ByteBuffer = ByteStringBuffer;
+    util3.ByteBuffer = ByteStringBuffer;
     function ByteStringBuffer(b) {
       this.data = "";
       this.read = 0;
       if (typeof b === "string") {
         this.data = b;
-      } else if (util.isArrayBuffer(b) || util.isArrayBufferView(b)) {
+      } else if (util3.isArrayBuffer(b) || util3.isArrayBufferView(b)) {
         if (typeof Buffer !== "undefined" && b instanceof Buffer) {
           this.data = b.toString("binary");
         } else {
@@ -127423,25 +124544,25 @@ var require_util16 = __commonJS({
       }
       this._constructedStringLength = 0;
     }
-    util.ByteStringBuffer = ByteStringBuffer;
+    util3.ByteStringBuffer = ByteStringBuffer;
     var _MAX_CONSTRUCTED_STRING_LENGTH = 4096;
-    util.ByteStringBuffer.prototype._optimizeConstructedString = function(x) {
+    util3.ByteStringBuffer.prototype._optimizeConstructedString = function(x) {
       this._constructedStringLength += x;
       if (this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) {
         this.data.substr(0, 1);
         this._constructedStringLength = 0;
       }
     };
-    util.ByteStringBuffer.prototype.length = function() {
+    util3.ByteStringBuffer.prototype.length = function() {
       return this.data.length - this.read;
     };
-    util.ByteStringBuffer.prototype.isEmpty = function() {
+    util3.ByteStringBuffer.prototype.isEmpty = function() {
       return this.length() <= 0;
     };
-    util.ByteStringBuffer.prototype.putByte = function(b) {
+    util3.ByteStringBuffer.prototype.putByte = function(b) {
       return this.putBytes(String.fromCharCode(b));
     };
-    util.ByteStringBuffer.prototype.fillWithByte = function(b, n) {
+    util3.ByteStringBuffer.prototype.fillWithByte = function(b, n) {
       b = String.fromCharCode(b);
       var d = this.data;
       while (n > 0) {
@@ -127457,45 +124578,45 @@ var require_util16 = __commonJS({
       this._optimizeConstructedString(n);
       return this;
     };
-    util.ByteStringBuffer.prototype.putBytes = function(bytes) {
+    util3.ByteStringBuffer.prototype.putBytes = function(bytes) {
       this.data += bytes;
       this._optimizeConstructedString(bytes.length);
       return this;
     };
-    util.ByteStringBuffer.prototype.putString = function(str2) {
-      return this.putBytes(util.encodeUtf8(str2));
+    util3.ByteStringBuffer.prototype.putString = function(str) {
+      return this.putBytes(util3.encodeUtf8(str));
     };
-    util.ByteStringBuffer.prototype.putInt16 = function(i) {
+    util3.ByteStringBuffer.prototype.putInt16 = function(i) {
       return this.putBytes(
         String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt24 = function(i) {
+    util3.ByteStringBuffer.prototype.putInt24 = function(i) {
       return this.putBytes(
         String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt32 = function(i) {
+    util3.ByteStringBuffer.prototype.putInt32 = function(i) {
       return this.putBytes(
         String.fromCharCode(i >> 24 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt16Le = function(i) {
+    util3.ByteStringBuffer.prototype.putInt16Le = function(i) {
       return this.putBytes(
         String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt24Le = function(i) {
+    util3.ByteStringBuffer.prototype.putInt24Le = function(i) {
       return this.putBytes(
         String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i >> 16 & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt32Le = function(i) {
+    util3.ByteStringBuffer.prototype.putInt32Le = function(i) {
       return this.putBytes(
         String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 24 & 255)
       );
     };
-    util.ByteStringBuffer.prototype.putInt = function(i, n) {
+    util3.ByteStringBuffer.prototype.putInt = function(i, n) {
       _checkBitsParam(n);
       var bytes = "";
       do {
@@ -127504,49 +124625,49 @@ var require_util16 = __commonJS({
       } while (n > 0);
       return this.putBytes(bytes);
     };
-    util.ByteStringBuffer.prototype.putSignedInt = function(i, n) {
+    util3.ByteStringBuffer.prototype.putSignedInt = function(i, n) {
       if (i < 0) {
         i += 2 << n - 1;
       }
       return this.putInt(i, n);
     };
-    util.ByteStringBuffer.prototype.putBuffer = function(buffer) {
+    util3.ByteStringBuffer.prototype.putBuffer = function(buffer) {
       return this.putBytes(buffer.getBytes());
     };
-    util.ByteStringBuffer.prototype.getByte = function() {
+    util3.ByteStringBuffer.prototype.getByte = function() {
       return this.data.charCodeAt(this.read++);
     };
-    util.ByteStringBuffer.prototype.getInt16 = function() {
+    util3.ByteStringBuffer.prototype.getInt16 = function() {
       var rval = this.data.charCodeAt(this.read) << 8 ^ this.data.charCodeAt(this.read + 1);
       this.read += 2;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt24 = function() {
+    util3.ByteStringBuffer.prototype.getInt24 = function() {
       var rval = this.data.charCodeAt(this.read) << 16 ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2);
       this.read += 3;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt32 = function() {
+    util3.ByteStringBuffer.prototype.getInt32 = function() {
       var rval = this.data.charCodeAt(this.read) << 24 ^ this.data.charCodeAt(this.read + 1) << 16 ^ this.data.charCodeAt(this.read + 2) << 8 ^ this.data.charCodeAt(this.read + 3);
       this.read += 4;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt16Le = function() {
+    util3.ByteStringBuffer.prototype.getInt16Le = function() {
       var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8;
       this.read += 2;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt24Le = function() {
+    util3.ByteStringBuffer.prototype.getInt24Le = function() {
       var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16;
       this.read += 3;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt32Le = function() {
+    util3.ByteStringBuffer.prototype.getInt32Le = function() {
       var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16 ^ this.data.charCodeAt(this.read + 3) << 24;
       this.read += 4;
       return rval;
     };
-    util.ByteStringBuffer.prototype.getInt = function(n) {
+    util3.ByteStringBuffer.prototype.getInt = function(n) {
       _checkBitsParam(n);
       var rval = 0;
       do {
@@ -127555,7 +124676,7 @@ var require_util16 = __commonJS({
       } while (n > 0);
       return rval;
     };
-    util.ByteStringBuffer.prototype.getSignedInt = function(n) {
+    util3.ByteStringBuffer.prototype.getSignedInt = function(n) {
       var x = this.getInt(n);
       var max = 2 << n - 2;
       if (x >= max) {
@@ -127563,7 +124684,7 @@ var require_util16 = __commonJS({
       }
       return x;
     };
-    util.ByteStringBuffer.prototype.getBytes = function(count) {
+    util3.ByteStringBuffer.prototype.getBytes = function(count) {
       var rval;
       if (count) {
         count = Math.min(this.length(), count);
@@ -127577,43 +124698,43 @@ var require_util16 = __commonJS({
       }
       return rval;
     };
-    util.ByteStringBuffer.prototype.bytes = function(count) {
+    util3.ByteStringBuffer.prototype.bytes = function(count) {
       return typeof count === "undefined" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + count);
     };
-    util.ByteStringBuffer.prototype.at = function(i) {
+    util3.ByteStringBuffer.prototype.at = function(i) {
       return this.data.charCodeAt(this.read + i);
     };
-    util.ByteStringBuffer.prototype.setAt = function(i, b) {
+    util3.ByteStringBuffer.prototype.setAt = function(i, b) {
       this.data = this.data.substr(0, this.read + i) + String.fromCharCode(b) + this.data.substr(this.read + i + 1);
       return this;
     };
-    util.ByteStringBuffer.prototype.last = function() {
+    util3.ByteStringBuffer.prototype.last = function() {
       return this.data.charCodeAt(this.data.length - 1);
     };
-    util.ByteStringBuffer.prototype.copy = function() {
-      var c = util.createBuffer(this.data);
+    util3.ByteStringBuffer.prototype.copy = function() {
+      var c = util3.createBuffer(this.data);
       c.read = this.read;
       return c;
     };
-    util.ByteStringBuffer.prototype.compact = function() {
+    util3.ByteStringBuffer.prototype.compact = function() {
       if (this.read > 0) {
         this.data = this.data.slice(this.read);
         this.read = 0;
       }
       return this;
     };
-    util.ByteStringBuffer.prototype.clear = function() {
+    util3.ByteStringBuffer.prototype.clear = function() {
       this.data = "";
       this.read = 0;
       return this;
     };
-    util.ByteStringBuffer.prototype.truncate = function(count) {
+    util3.ByteStringBuffer.prototype.truncate = function(count) {
       var len = Math.max(0, this.length() - count);
       this.data = this.data.substr(this.read, len);
       this.read = 0;
       return this;
     };
-    util.ByteStringBuffer.prototype.toHex = function() {
+    util3.ByteStringBuffer.prototype.toHex = function() {
       var rval = "";
       for (var i = this.read; i < this.data.length; ++i) {
         var b = this.data.charCodeAt(i);
@@ -127624,15 +124745,15 @@ var require_util16 = __commonJS({
       }
       return rval;
     };
-    util.ByteStringBuffer.prototype.toString = function() {
-      return util.decodeUtf8(this.bytes());
+    util3.ByteStringBuffer.prototype.toString = function() {
+      return util3.decodeUtf8(this.bytes());
     };
     function DataBuffer(b, options) {
       options = options || {};
       this.read = options.readOffset || 0;
       this.growSize = options.growSize || 1024;
-      var isArrayBuffer = util.isArrayBuffer(b);
-      var isArrayBufferView = util.isArrayBufferView(b);
+      var isArrayBuffer = util3.isArrayBuffer(b);
+      var isArrayBufferView = util3.isArrayBufferView(b);
       if (isArrayBuffer || isArrayBufferView) {
         if (isArrayBuffer) {
           this.data = new DataView(b);
@@ -127651,14 +124772,14 @@ var require_util16 = __commonJS({
         this.write = options.writeOffset;
       }
     }
-    util.DataBuffer = DataBuffer;
-    util.DataBuffer.prototype.length = function() {
+    util3.DataBuffer = DataBuffer;
+    util3.DataBuffer.prototype.length = function() {
       return this.write - this.read;
     };
-    util.DataBuffer.prototype.isEmpty = function() {
+    util3.DataBuffer.prototype.isEmpty = function() {
       return this.length() <= 0;
     };
-    util.DataBuffer.prototype.accommodate = function(amount, growSize) {
+    util3.DataBuffer.prototype.accommodate = function(amount, growSize) {
       if (this.length() >= amount) {
         return this;
       }
@@ -127673,20 +124794,20 @@ var require_util16 = __commonJS({
       this.data = new DataView(dst.buffer);
       return this;
     };
-    util.DataBuffer.prototype.putByte = function(b) {
+    util3.DataBuffer.prototype.putByte = function(b) {
       this.accommodate(1);
       this.data.setUint8(this.write++, b);
       return this;
     };
-    util.DataBuffer.prototype.fillWithByte = function(b, n) {
+    util3.DataBuffer.prototype.fillWithByte = function(b, n) {
       this.accommodate(n);
       for (var i = 0; i < n; ++i) {
         this.data.setUint8(b);
       }
       return this;
     };
-    util.DataBuffer.prototype.putBytes = function(bytes, encoding) {
-      if (util.isArrayBufferView(bytes)) {
+    util3.DataBuffer.prototype.putBytes = function(bytes, encoding) {
+      if (util3.isArrayBufferView(bytes)) {
         var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
         var len = src.byteLength - src.byteOffset;
         this.accommodate(len);
@@ -127695,7 +124816,7 @@ var require_util16 = __commonJS({
         this.write += len;
         return this;
       }
-      if (util.isArrayBuffer(bytes)) {
+      if (util3.isArrayBuffer(bytes)) {
         var src = new Uint8Array(bytes);
         this.accommodate(src.byteLength);
         var dst = new Uint8Array(this.data.buffer);
@@ -127703,7 +124824,7 @@ var require_util16 = __commonJS({
         this.write += src.byteLength;
         return this;
       }
-      if (bytes instanceof util.DataBuffer || typeof bytes === "object" && typeof bytes.read === "number" && typeof bytes.write === "number" && util.isArrayBufferView(bytes.data)) {
+      if (bytes instanceof util3.DataBuffer || typeof bytes === "object" && typeof bytes.read === "number" && typeof bytes.write === "number" && util3.isArrayBufferView(bytes.data)) {
         var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length());
         this.accommodate(src.byteLength);
         var dst = new Uint8Array(bytes.data.byteLength, this.write);
@@ -127711,7 +124832,7 @@ var require_util16 = __commonJS({
         this.write += src.byteLength;
         return this;
       }
-      if (bytes instanceof util.ByteStringBuffer) {
+      if (bytes instanceof util3.ByteStringBuffer) {
         bytes = bytes.data;
         encoding = "binary";
       }
@@ -127721,82 +124842,82 @@ var require_util16 = __commonJS({
         if (encoding === "hex") {
           this.accommodate(Math.ceil(bytes.length / 2));
           view = new Uint8Array(this.data.buffer, this.write);
-          this.write += util.binary.hex.decode(bytes, view, this.write);
+          this.write += util3.binary.hex.decode(bytes, view, this.write);
           return this;
         }
         if (encoding === "base64") {
           this.accommodate(Math.ceil(bytes.length / 4) * 3);
           view = new Uint8Array(this.data.buffer, this.write);
-          this.write += util.binary.base64.decode(bytes, view, this.write);
+          this.write += util3.binary.base64.decode(bytes, view, this.write);
           return this;
         }
         if (encoding === "utf8") {
-          bytes = util.encodeUtf8(bytes);
+          bytes = util3.encodeUtf8(bytes);
           encoding = "binary";
         }
         if (encoding === "binary" || encoding === "raw") {
           this.accommodate(bytes.length);
           view = new Uint8Array(this.data.buffer, this.write);
-          this.write += util.binary.raw.decode(view);
+          this.write += util3.binary.raw.decode(view);
           return this;
         }
         if (encoding === "utf16") {
           this.accommodate(bytes.length * 2);
           view = new Uint16Array(this.data.buffer, this.write);
-          this.write += util.text.utf16.encode(view);
+          this.write += util3.text.utf16.encode(view);
           return this;
         }
         throw new Error("Invalid encoding: " + encoding);
       }
       throw Error("Invalid parameter: " + bytes);
     };
-    util.DataBuffer.prototype.putBuffer = function(buffer) {
+    util3.DataBuffer.prototype.putBuffer = function(buffer) {
       this.putBytes(buffer);
       buffer.clear();
       return this;
     };
-    util.DataBuffer.prototype.putString = function(str2) {
-      return this.putBytes(str2, "utf16");
+    util3.DataBuffer.prototype.putString = function(str) {
+      return this.putBytes(str, "utf16");
     };
-    util.DataBuffer.prototype.putInt16 = function(i) {
+    util3.DataBuffer.prototype.putInt16 = function(i) {
       this.accommodate(2);
       this.data.setInt16(this.write, i);
       this.write += 2;
       return this;
     };
-    util.DataBuffer.prototype.putInt24 = function(i) {
+    util3.DataBuffer.prototype.putInt24 = function(i) {
       this.accommodate(3);
       this.data.setInt16(this.write, i >> 8 & 65535);
       this.data.setInt8(this.write, i >> 16 & 255);
       this.write += 3;
       return this;
     };
-    util.DataBuffer.prototype.putInt32 = function(i) {
+    util3.DataBuffer.prototype.putInt32 = function(i) {
       this.accommodate(4);
       this.data.setInt32(this.write, i);
       this.write += 4;
       return this;
     };
-    util.DataBuffer.prototype.putInt16Le = function(i) {
+    util3.DataBuffer.prototype.putInt16Le = function(i) {
       this.accommodate(2);
       this.data.setInt16(this.write, i, true);
       this.write += 2;
       return this;
     };
-    util.DataBuffer.prototype.putInt24Le = function(i) {
+    util3.DataBuffer.prototype.putInt24Le = function(i) {
       this.accommodate(3);
       this.data.setInt8(this.write, i >> 16 & 255);
       this.data.setInt16(this.write, i >> 8 & 65535, true);
       this.write += 3;
       return this;
     };
-    util.DataBuffer.prototype.putInt32Le = function(i) {
+    util3.DataBuffer.prototype.putInt32Le = function(i) {
       this.accommodate(4);
       this.data.setInt32(this.write, i, true);
       this.write += 4;
       return this;
     };
-    util.DataBuffer.prototype.putInt = function(i, n) {
+    util3.DataBuffer.prototype.putInt = function(i, n) {
       _checkBitsParam(n);
       this.accommodate(n / 8);
       do {
@@ -127805,7 +124926,7 @@ var require_util16 = __commonJS({
       } while (n > 0);
       return this;
     };
-    util.DataBuffer.prototype.putSignedInt = function(i, n) {
+    util3.DataBuffer.prototype.putSignedInt = function(i, n) {
       _checkBitsParam(n);
       this.accommodate(n / 8);
       if (i < 0) {
@@ -127813,40 +124934,40 @@ var require_util16 = __commonJS({
       }
       return this.putInt(i, n);
     };
-    util.DataBuffer.prototype.getByte = function() {
+    util3.DataBuffer.prototype.getByte = function() {
       return this.data.getInt8(this.read++);
     };
-    util.DataBuffer.prototype.getInt16 = function() {
+    util3.DataBuffer.prototype.getInt16 = function() {
       var rval = this.data.getInt16(this.read);
       this.read += 2;
       return rval;
     };
-    util.DataBuffer.prototype.getInt24 = function() {
+    util3.DataBuffer.prototype.getInt24 = function() {
       var rval = this.data.getInt16(this.read) << 8 ^ this.data.getInt8(this.read + 2);
       this.read += 3;
       return rval;
     };
-    util.DataBuffer.prototype.getInt32 = function() {
+    util3.DataBuffer.prototype.getInt32 = function() {
       var rval = this.data.getInt32(this.read);
       this.read += 4;
       return rval;
     };
-    util.DataBuffer.prototype.getInt16Le = function() {
+    util3.DataBuffer.prototype.getInt16Le = function() {
       var rval = this.data.getInt16(this.read, true);
       this.read += 2;
       return rval;
     };
-    util.DataBuffer.prototype.getInt24Le = function() {
+    util3.DataBuffer.prototype.getInt24Le = function() {
       var rval = this.data.getInt8(this.read) ^ this.data.getInt16(this.read + 1, true) << 8;
       this.read += 3;
       return rval;
     };
-    util.DataBuffer.prototype.getInt32Le = function() {
+    util3.DataBuffer.prototype.getInt32Le = function() {
       var rval = this.data.getInt32(this.read, true);
       this.read += 4;
       return rval;
     };
-    util.DataBuffer.prototype.getInt = function(n) {
+    util3.DataBuffer.prototype.getInt = function(n) {
       _checkBitsParam(n);
       var rval = 0;
       do {
@@ -127855,7 +124976,7 @@ var require_util16 = __commonJS({
       } while (n > 0);
       return rval;
     };
-    util.DataBuffer.prototype.getSignedInt = function(n) {
+    util3.DataBuffer.prototype.getSignedInt = function(n) {
       var x = this.getInt(n);
       var max = 2 << n - 2;
       if (x >= max) {
@@ -127863,7 +124984,7 @@ var require_util16 = __commonJS({
       }
       return x;
     };
-    util.DataBuffer.prototype.getBytes = function(count) {
+    util3.DataBuffer.prototype.getBytes = function(count) {
       var rval;
       if (count) {
         count = Math.min(this.length(), count);
@@ -127877,23 +124998,23 @@ var require_util16 = __commonJS({
       }
       return rval;
     };
-    util.DataBuffer.prototype.bytes = function(count) {
+    util3.DataBuffer.prototype.bytes = function(count) {
       return typeof count === "undefined" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + count);
     };
-    util.DataBuffer.prototype.at = function(i) {
+    util3.DataBuffer.prototype.at = function(i) {
       return this.data.getUint8(this.read + i);
     };
-    util.DataBuffer.prototype.setAt = function(i, b) {
+    util3.DataBuffer.prototype.setAt = function(i, b) {
       this.data.setUint8(i, b);
       return this;
     };
-    util.DataBuffer.prototype.last = function() {
+    util3.DataBuffer.prototype.last = function() {
       return this.data.getUint8(this.write - 1);
     };
-    util.DataBuffer.prototype.copy = function() {
-      return new util.DataBuffer(this);
+    util3.DataBuffer.prototype.copy = function() {
+      return new util3.DataBuffer(this);
     };
-    util.DataBuffer.prototype.compact = function() {
+    util3.DataBuffer.prototype.compact = function() {
       if (this.read > 0) {
         var src = new Uint8Array(this.data.buffer, this.read);
         var dst = new Uint8Array(src.byteLength);
@@ -127904,17 +125025,17 @@ var require_util16 = __commonJS({
       }
       return this;
     };
-    util.DataBuffer.prototype.clear = function() {
+    util3.DataBuffer.prototype.clear = function() {
       this.data = new DataView(new ArrayBuffer(0));
       this.read = this.write = 0;
       return this;
     };
-    util.DataBuffer.prototype.truncate = function(count) {
+    util3.DataBuffer.prototype.truncate = function(count) {
       this.write = Math.max(0, this.length() - count);
       this.read = Math.min(this.read, this.write);
       return this;
     };
-    util.DataBuffer.prototype.toHex = function() {
+    util3.DataBuffer.prototype.toHex = function() {
       var rval = "";
       for (var i = this.read; i < this.data.byteLength; ++i) {
         var b = this.data.getUint8(i);
@@ -127925,34 +125046,34 @@ var require_util16 = __commonJS({
       }
       return rval;
     };
-    util.DataBuffer.prototype.toString = function(encoding) {
+    util3.DataBuffer.prototype.toString = function(encoding) {
       var view = new Uint8Array(this.data, this.read, this.length());
       encoding = encoding || "utf8";
       if (encoding === "binary" || encoding === "raw") {
-        return util.binary.raw.encode(view);
+        return util3.binary.raw.encode(view);
       }
       if (encoding === "hex") {
-        return util.binary.hex.encode(view);
+        return util3.binary.hex.encode(view);
       }
       if (encoding === "base64") {
-        return util.binary.base64.encode(view);
+        return util3.binary.base64.encode(view);
       }
       if (encoding === "utf8") {
-        return util.text.utf8.decode(view);
+        return util3.text.utf8.decode(view);
       }
       if (encoding === "utf16") {
-        return util.text.utf16.decode(view);
+        return util3.text.utf16.decode(view);
       }
       throw new Error("Invalid encoding: " + encoding);
     };
-    util.createBuffer = function(input, encoding) {
+    util3.createBuffer = function(input, encoding) {
       encoding = encoding || "raw";
       if (input !== void 0 && encoding === "utf8") {
-        input = util.encodeUtf8(input);
+        input = util3.encodeUtf8(input);
       }
-      return new util.ByteBuffer(input);
+      return new util3.ByteBuffer(input);
     };
-    util.fillString = function(c, n) {
+    util3.fillString = function(c, n) {
       var s = "";
       while (n > 0) {
         if (n & 1) {
@@ -127965,7 +125086,7 @@ var require_util16 = __commonJS({
       }
       return s;
     };
-    util.xorBytes = function(s1, s2, n) {
+    util3.xorBytes = function(s1, s2, n) {
       var s3 = "";
       var b = "";
       var t = "";
@@ -127984,7 +125105,7 @@ var require_util16 = __commonJS({
       s3 += t;
       return s3;
     };
-    util.hexToBytes = function(hex) {
+    util3.hexToBytes = function(hex) {
       var rval = "";
       var i = 0;
       if (hex.length & true) {
@@ -127996,10 +125117,10 @@ var require_util16 = __commonJS({
       }
       return rval;
     };
-    util.bytesToHex = function(bytes) {
-      return util.createBuffer(bytes).toHex();
+    util3.bytesToHex = function(bytes) {
+      return util3.createBuffer(bytes).toHex();
     };
-    util.int32ToBytes = function(i) {
+    util3.int32ToBytes = function(i) {
       return String.fromCharCode(i >> 24 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255);
     };
     var _base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
@@ -128098,7 +125219,7 @@ var require_util16 = __commonJS({
       51
     ];
     var _base58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
-    util.encode64 = function(input, maxline) {
+    util3.encode64 = function(input, maxline) {
       var line = "";
       var output = "";
       var chr1, chr2, chr3;
@@ -128123,7 +125244,7 @@ var require_util16 = __commonJS({
       output += line;
       return output;
     };
-    util.decode64 = function(input) {
+    util3.decode64 = function(input) {
       input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
       var output = "";
       var enc1, enc2, enc3, enc4;
@@ -128143,13 +125264,13 @@ var require_util16 = __commonJS({
       }
       return output;
     };
-    util.encodeUtf8 = function(str2) {
-      return unescape(encodeURIComponent(str2));
+    util3.encodeUtf8 = function(str) {
+      return unescape(encodeURIComponent(str));
     };
-    util.decodeUtf8 = function(str2) {
-      return decodeURIComponent(escape(str2));
+    util3.decodeUtf8 = function(str) {
+      return decodeURIComponent(escape(str));
     };
-    util.binary = {
+    util3.binary = {
       raw: {},
       hex: {},
       base64: {},
@@ -128159,23 +125280,23 @@ var require_util16 = __commonJS({
         decode: baseN.decode
       }
     };
-    util.binary.raw.encode = function(bytes) {
+    util3.binary.raw.encode = function(bytes) {
       return String.fromCharCode.apply(null, bytes);
     };
-    util.binary.raw.decode = function(str2, output, offset) {
+    util3.binary.raw.decode = function(str, output, offset) {
       var out = output;
       if (!out) {
-        out = new Uint8Array(str2.length);
+        out = new Uint8Array(str.length);
       }
       offset = offset || 0;
       var j = offset;
-      for (var i = 0; i < str2.length; ++i) {
-        out[j++] = str2.charCodeAt(i);
+      for (var i = 0; i < str.length; ++i) {
+        out[j++] = str.charCodeAt(i);
       }
       return output ? j - offset : out;
     };
-    util.binary.hex.encode = util.bytesToHex;
-    util.binary.hex.decode = function(hex, output, offset) {
+    util3.binary.hex.encode = util3.bytesToHex;
+    util3.binary.hex.decode = function(hex, output, offset) {
       var out = output;
       if (!out) {
         out = new Uint8Array(Math.ceil(hex.length / 2));
@@ -128191,7 +125312,7 @@ var require_util16 = __commonJS({
       }
       return output ? j - offset : out;
     };
-    util.binary.base64.encode = function(input, maxline) {
+    util3.binary.base64.encode = function(input, maxline) {
       var line = "";
       var output = "";
       var chr1, chr2, chr3;
@@ -128216,7 +125337,7 @@ var require_util16 = __commonJS({
       output += line;
       return output;
     };
-    util.binary.base64.decode = function(input, output, offset) {
+    util3.binary.base64.decode = function(input, output, offset) {
       var out = output;
       if (!out) {
         out = new Uint8Array(Math.ceil(input.length / 4) * 3);
@@ -128240,52 +125361,52 @@ var require_util16 = __commonJS({
       }
       return output ? j - offset : out.subarray(0, j);
     };
-    util.binary.base58.encode = function(input, maxline) {
-      return util.binary.baseN.encode(input, _base58, maxline);
+    util3.binary.base58.encode = function(input, maxline) {
+      return util3.binary.baseN.encode(input, _base58, maxline);
     };
-    util.binary.base58.decode = function(input, maxline) {
-      return util.binary.baseN.decode(input, _base58, maxline);
+    util3.binary.base58.decode = function(input, maxline) {
+      return util3.binary.baseN.decode(input, _base58, maxline);
     };
-    util.text = {
+    util3.text = {
       utf8: {},
       utf16: {}
     };
-    util.text.utf8.encode = function(str2, output, offset) {
-      str2 = util.encodeUtf8(str2);
+    util3.text.utf8.encode = function(str, output, offset) {
+      str = util3.encodeUtf8(str);
       var out = output;
       if (!out) {
-        out = new Uint8Array(str2.length);
+        out = new Uint8Array(str.length);
       }
       offset = offset || 0;
       var j = offset;
-      for (var i = 0; i < str2.length; ++i) {
-        out[j++] = str2.charCodeAt(i);
+      for (var i = 0; i < str.length; ++i) {
+        out[j++] = str.charCodeAt(i);
       }
       return output ? j - offset : out;
     };
-    util.text.utf8.decode = function(bytes) {
-      return util.decodeUtf8(String.fromCharCode.apply(null, bytes));
+    util3.text.utf8.decode = function(bytes) {
+      return util3.decodeUtf8(String.fromCharCode.apply(null, bytes));
     };
-    util.text.utf16.encode = function(str2, output, offset) {
+    util3.text.utf16.encode = function(str, output, offset) {
       var out = output;
       if (!out) {
-        out = new Uint8Array(str2.length * 2);
+        out = new Uint8Array(str.length * 2);
       }
       var view = new Uint16Array(out.buffer);
       offset = offset || 0;
       var j = offset;
       var k = offset;
-      for (var i = 0; i < str2.length; ++i) {
-        view[k++] = str2.charCodeAt(i);
+      for (var i = 0; i < str.length; ++i) {
+        view[k++] = str.charCodeAt(i);
         j += 2;
       }
       return output ? j - offset : out;
     };
-    util.text.utf16.decode = function(bytes) {
+    util3.text.utf16.decode = function(bytes) {
       return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer));
     };
-    util.deflate = function(api, bytes, raw) {
-      bytes = util.decode64(api.deflate(util.encode64(bytes)).rval);
+    util3.deflate = function(api, bytes, raw) {
+      bytes = util3.decode64(api.deflate(util3.encode64(bytes)).rval);
       if (raw) {
         var start = 2;
         var flg = bytes.charCodeAt(1);
@@ -128296,9 +125417,9 @@ var require_util16 = __commonJS({
       }
       return bytes;
     };
-    util.inflate = function(api, bytes, raw) {
-      var rval = api.inflate(util.encode64(bytes)).rval;
-      return rval === null ? null : util.decode64(rval);
+    util3.inflate = function(api, bytes, raw) {
+      var rval = api.inflate(util3.encode64(bytes)).rval;
+      return rval === null ? null : util3.decode64(rval);
     };
     var _setStorageObject = function(api, id, obj) {
       if (!api) {
@@ -128308,7 +125429,7 @@ var require_util16 = __commonJS({
       if (obj === null) {
         rval = api.removeItem(id);
       } else {
-        obj = util.encode64(JSON.stringify(obj));
+        obj = util3.encode64(JSON.stringify(obj));
         rval = api.setItem(id, obj);
       }
       if (typeof rval !== "undefined" && rval.rval !== true) {
@@ -128337,7 +125458,7 @@ var require_util16 = __commonJS({
         }
       }
       if (rval !== null) {
-        rval = JSON.parse(util.decode64(rval));
+        rval = JSON.parse(util3.decode64(rval));
       }
       return rval;
     };
@@ -128379,49 +125500,49 @@ var require_util16 = __commonJS({
       if (typeof location === "undefined") {
         location = ["web", "flash"];
       }
-      var type2;
+      var type;
       var done = false;
-      var exception2 = null;
+      var exception = null;
       for (var idx in location) {
-        type2 = location[idx];
+        type = location[idx];
         try {
-          if (type2 === "flash" || type2 === "both") {
+          if (type === "flash" || type === "both") {
             if (args[0] === null) {
               throw new Error("Flash local storage not available.");
             }
             rval = func.apply(this, args);
-            done = type2 === "flash";
+            done = type === "flash";
           }
-          if (type2 === "web" || type2 === "both") {
+          if (type === "web" || type === "both") {
             args[0] = localStorage;
             rval = func.apply(this, args);
             done = true;
           }
         } catch (ex) {
-          exception2 = ex;
+          exception = ex;
         }
         if (done) {
           break;
         }
       }
       if (!done) {
-        throw exception2;
+        throw exception;
       }
       return rval;
     };
-    util.setItem = function(api, id, key, data, location) {
+    util3.setItem = function(api, id, key, data, location) {
       _callStorageFunction(_setItem, arguments, location);
     };
-    util.getItem = function(api, id, key, location) {
+    util3.getItem = function(api, id, key, location) {
       return _callStorageFunction(_getItem, arguments, location);
     };
-    util.removeItem = function(api, id, key, location) {
+    util3.removeItem = function(api, id, key, location) {
       _callStorageFunction(_removeItem, arguments, location);
     };
-    util.clearItems = function(api, id, location) {
+    util3.clearItems = function(api, id, location) {
       _callStorageFunction(_clearItems, arguments, location);
     };
-    util.isEmpty = function(obj) {
+    util3.isEmpty = function(obj) {
       for (var prop in obj) {
         if (obj.hasOwnProperty(prop)) {
           return false;
@@ -128429,20 +125550,20 @@ var require_util16 = __commonJS({
       }
       return true;
     };
-    util.format = function(format) {
+    util3.format = function(format) {
       var re = /%./g;
-      var match;
+      var match2;
       var part;
       var argi = 0;
       var parts = [];
       var last = 0;
-      while (match = re.exec(format)) {
+      while (match2 = re.exec(format)) {
         part = format.substring(last, re.lastIndex - 2);
         if (part.length > 0) {
           parts.push(part);
         }
         last = re.lastIndex;
-        var code = match[0][1];
+        var code = match2[0][1];
         switch (code) {
           case "s":
           case "o":
@@ -128465,41 +125586,41 @@ var require_util16 = __commonJS({
       parts.push(format.substring(last));
       return parts.join("");
     };
-    util.formatNumber = function(number, decimals, dec_point, thousands_sep) {
-      var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
+    util3.formatNumber = function(number2, decimals, dec_point, thousands_sep) {
+      var n = number2, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
       var d = dec_point === void 0 ? "," : dec_point;
       var t = thousands_sep === void 0 ? "." : thousands_sep, s = n < 0 ? "-" : "";
       var i = parseInt(n = Math.abs(+n || 0).toFixed(c), 10) + "";
       var j = i.length > 3 ? i.length % 3 : 0;
       return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
     };
-    util.formatSize = function(size) {
+    util3.formatSize = function(size) {
       if (size >= 1073741824) {
-        size = util.formatNumber(size / 1073741824, 2, ".", "") + " GiB";
+        size = util3.formatNumber(size / 1073741824, 2, ".", "") + " GiB";
       } else if (size >= 1048576) {
-        size = util.formatNumber(size / 1048576, 2, ".", "") + " MiB";
+        size = util3.formatNumber(size / 1048576, 2, ".", "") + " MiB";
       } else if (size >= 1024) {
-        size = util.formatNumber(size / 1024, 0) + " KiB";
+        size = util3.formatNumber(size / 1024, 0) + " KiB";
       } else {
-        size = util.formatNumber(size, 0) + " bytes";
+        size = util3.formatNumber(size, 0) + " bytes";
       }
       return size;
     };
-    util.bytesFromIP = function(ip) {
+    util3.bytesFromIP = function(ip) {
       if (ip.indexOf(".") !== -1) {
-        return util.bytesFromIPv4(ip);
+        return util3.bytesFromIPv4(ip);
       }
       if (ip.indexOf(":") !== -1) {
-        return util.bytesFromIPv6(ip);
+        return util3.bytesFromIPv6(ip);
       }
       return null;
     };
-    util.bytesFromIPv4 = function(ip) {
+    util3.bytesFromIPv4 = function(ip) {
       ip = ip.split(".");
       if (ip.length !== 4) {
         return null;
       }
-      var b = util.createBuffer();
+      var b = util3.createBuffer();
       for (var i = 0; i < ip.length; ++i) {
         var num = parseInt(ip[i], 10);
         if (isNaN(num)) {
@@ -128509,21 +125630,21 @@ var require_util16 = __commonJS({
       }
       return b.getBytes();
     };
-    util.bytesFromIPv6 = function(ip) {
+    util3.bytesFromIPv6 = function(ip) {
       var blanks = 0;
       ip = ip.split(":").filter(function(e) {
         if (e.length === 0) ++blanks;
         return true;
       });
       var zeros = (8 - ip.length + blanks) * 2;
-      var b = util.createBuffer();
+      var b = util3.createBuffer();
       for (var i = 0; i < 8; ++i) {
         if (!ip[i] || ip[i].length === 0) {
           b.fillWithByte(0, zeros);
           zeros = 0;
           continue;
         }
-        var bytes = util.hexToBytes(ip[i]);
+        var bytes = util3.hexToBytes(ip[i]);
         if (bytes.length < 2) {
           b.putByte(0);
         }
@@ -128531,16 +125652,16 @@ var require_util16 = __commonJS({
       }
       return b.getBytes();
     };
-    util.bytesToIP = function(bytes) {
+    util3.bytesToIP = function(bytes) {
       if (bytes.length === 4) {
-        return util.bytesToIPv4(bytes);
+        return util3.bytesToIPv4(bytes);
       }
       if (bytes.length === 16) {
-        return util.bytesToIPv6(bytes);
+        return util3.bytesToIPv6(bytes);
       }
       return null;
     };
-    util.bytesToIPv4 = function(bytes) {
+    util3.bytesToIPv4 = function(bytes) {
       if (bytes.length !== 4) {
         return null;
       }
@@ -128550,7 +125671,7 @@ var require_util16 = __commonJS({
       }
       return ip.join(".");
     };
-    util.bytesToIPv6 = function(bytes) {
+    util3.bytesToIPv6 = function(bytes) {
       if (bytes.length !== 16) {
         return null;
       }
@@ -128558,7 +125679,7 @@ var require_util16 = __commonJS({
       var zeroGroups = [];
       var zeroMaxGroup = 0;
       for (var i = 0; i < bytes.length; i += 2) {
-        var hex = util.bytesToHex(bytes[i] + bytes[i + 1]);
+        var hex = util3.bytesToHex(bytes[i] + bytes[i + 1]);
         while (hex[0] === "0" && hex !== "0") {
           hex = hex.substr(1);
         }
@@ -128590,26 +125711,26 @@ var require_util16 = __commonJS({
       }
       return ip.join(":");
     };
-    util.estimateCores = function(options, callback) {
+    util3.estimateCores = function(options, callback) {
       if (typeof options === "function") {
         callback = options;
         options = {};
       }
       options = options || {};
-      if ("cores" in util && !options.update) {
-        return callback(null, util.cores);
+      if ("cores" in util3 && !options.update) {
+        return callback(null, util3.cores);
       }
       if (typeof navigator !== "undefined" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency > 0) {
-        util.cores = navigator.hardwareConcurrency;
-        return callback(null, util.cores);
+        util3.cores = navigator.hardwareConcurrency;
+        return callback(null, util3.cores);
       }
       if (typeof Worker === "undefined") {
-        util.cores = 1;
-        return callback(null, util.cores);
+        util3.cores = 1;
+        return callback(null, util3.cores);
       }
       if (typeof Blob === "undefined") {
-        util.cores = 2;
-        return callback(null, util.cores);
+        util3.cores = 2;
+        return callback(null, util3.cores);
       }
       var blobUrl = URL.createObjectURL(new Blob([
         "(",
@@ -128629,16 +125750,16 @@ var require_util16 = __commonJS({
           var avg = Math.floor(max.reduce(function(avg2, x) {
             return avg2 + x;
           }, 0) / max.length);
-          util.cores = Math.max(1, avg);
+          util3.cores = Math.max(1, avg);
           URL.revokeObjectURL(blobUrl);
-          return callback(null, util.cores);
+          return callback(null, util3.cores);
         }
-        map2(numWorkers, function(err, results) {
+        map(numWorkers, function(err, results) {
           max.push(reduce(numWorkers, results));
           sample(max, samples - 1, numWorkers);
         });
       }
-      function map2(numWorkers, callback2) {
+      function map(numWorkers, callback2) {
         var workers = [];
         var results = [];
         for (var i = 0; i < numWorkers; ++i) {
@@ -129493,7 +126614,7 @@ var require_aes = __commonJS({
       });
     };
     forge.aes.Algorithm = function(name, mode) {
-      if (!init) {
+      if (!init2) {
         initialize();
       }
       var self2 = this;
@@ -129546,7 +126667,7 @@ var require_aes = __commonJS({
       this._init = true;
     };
     forge.aes._expandKey = function(key, decrypt) {
-      if (!init) {
+      if (!init2) {
         initialize();
       }
       return _expandKey(key, decrypt);
@@ -129564,7 +126685,7 @@ var require_aes = __commonJS({
       };
       forge.cipher.registerAlgorithm(name, factory);
     }
-    var init = false;
+    var init2 = false;
     var Nb = 4;
     var sbox;
     var isbox;
@@ -129572,7 +126693,7 @@ var require_aes = __commonJS({
     var mix;
     var imix;
     function initialize() {
-      init = true;
+      init2 = true;
       rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
       var xtime = new Array(256);
       for (var i = 0; i < 128; ++i) {
@@ -129905,7 +127026,7 @@ var require_asn1 = __commonJS({
       BMPSTRING: 30
     };
     asn1.maxDepth = 256;
-    asn1.create = function(tagClass, type2, constructed, value, options) {
+    asn1.create = function(tagClass, type, constructed, value, options) {
       if (forge.util.isArray(value)) {
         var tmp = [];
         for (var i = 0; i < value.length; ++i) {
@@ -129917,7 +127038,7 @@ var require_asn1 = __commonJS({
       }
       var obj = {
         tagClass,
-        type: type2,
+        type,
         constructed,
         composed: constructed || forge.util.isArray(value),
         value
@@ -130071,7 +127192,7 @@ var require_asn1 = __commonJS({
       var b1 = bytes.getByte();
       remaining--;
       var tagClass = b1 & 192;
-      var type2 = b1 & 31;
+      var type = b1 & 31;
       start = bytes.length();
       var length = _getValueLength(bytes, remaining);
       remaining -= start - bytes.length();
@@ -130111,16 +127232,16 @@ var require_asn1 = __commonJS({
           }
         }
       }
-      if (value === void 0 && tagClass === asn1.Class.UNIVERSAL && type2 === asn1.Type.BITSTRING) {
+      if (value === void 0 && tagClass === asn1.Class.UNIVERSAL && type === asn1.Type.BITSTRING) {
         bitStringContents = bytes.bytes(length);
       }
       if (value === void 0 && options.decodeBitStrings && tagClass === asn1.Class.UNIVERSAL && // FIXME: OCTET STRINGs not yet supported here
       // .. other parts of forge expect to decode OCTET STRINGs manually
-      type2 === asn1.Type.BITSTRING && length > 1) {
+      type === asn1.Type.BITSTRING && length > 1) {
         var savedRead = bytes.read;
         var savedRemaining = remaining;
         var unused = 0;
-        if (type2 === asn1.Type.BITSTRING) {
+        if (type === asn1.Type.BITSTRING) {
           _checkBufferLength(bytes, remaining, 1);
           unused = bytes.getByte();
           remaining--;
@@ -130136,7 +127257,7 @@ var require_asn1 = __commonJS({
             var composed = _fromDer(bytes, remaining, depth + 1, subOptions);
             var used = start - bytes.length();
             remaining -= used;
-            if (type2 == asn1.Type.BITSTRING) {
+            if (type == asn1.Type.BITSTRING) {
               used++;
             }
             var tc = composed.tagClass;
@@ -130158,7 +127279,7 @@ var require_asn1 = __commonJS({
           }
           length = remaining;
         }
-        if (type2 === asn1.Type.BMPSTRING) {
+        if (type === asn1.Type.BMPSTRING) {
           value = "";
           for (; length > 0; length -= 2) {
             _checkBufferLength(bytes, remaining, 2);
@@ -130173,7 +127294,7 @@ var require_asn1 = __commonJS({
       var asn1Options = bitStringContents === void 0 ? null : {
         bitStringContents
       };
-      return asn1.create(tagClass, type2, constructed, value, asn1Options);
+      return asn1.create(tagClass, type, constructed, value, asn1Options);
     }
     asn1.toDer = function(obj) {
       var bytes = forge.util.createBuffer();
@@ -131110,36 +128231,36 @@ var require_pem = __commonJS({
       rval += "-----END " + msg.type + "-----\r\n";
       return rval;
     };
-    pem.decode = function(str2) {
+    pem.decode = function(str) {
       var rval = [];
       var rMessage = /\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g;
       var rHeader = /([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/;
       var rCRLF = /\r?\n/;
-      var match;
+      var match2;
       while (true) {
-        match = rMessage.exec(str2);
-        if (!match) {
+        match2 = rMessage.exec(str);
+        if (!match2) {
           break;
         }
-        var type2 = match[1];
-        if (type2 === "NEW CERTIFICATE REQUEST") {
-          type2 = "CERTIFICATE REQUEST";
+        var type = match2[1];
+        if (type === "NEW CERTIFICATE REQUEST") {
+          type = "CERTIFICATE REQUEST";
         }
         var msg = {
-          type: type2,
+          type,
           procType: null,
           contentDomain: null,
           dekInfo: null,
           headers: [],
-          body: forge.util.decode64(match[3])
+          body: forge.util.decode64(match2[3])
         };
         rval.push(msg);
-        if (!match[2]) {
+        if (!match2[2]) {
           continue;
         }
-        var lines = match[2].split(rCRLF);
+        var lines = match2[2].split(rCRLF);
         var li = 0;
-        while (match && li < lines.length) {
+        while (match2 && li < lines.length) {
           var line = lines[li].replace(/\s+$/, "");
           for (var nl = li + 1; nl < lines.length; ++nl) {
             var next = lines[nl];
@@ -131149,10 +128270,10 @@ var require_pem = __commonJS({
             line += next;
             li = nl;
           }
-          match = line.match(rHeader);
-          if (match) {
-            var header = { name: match[1], values: [] };
-            var values = match[2].split(",");
+          match2 = line.match(rHeader);
+          if (match2) {
+            var header = { name: match2[1], values: [] };
+            var values = match2[2].split(",");
             for (var vi = 0; vi < values.length; ++vi) {
               header.values.push(ltrim(values[vi]));
             }
@@ -131188,7 +128309,7 @@ var require_pem = __commonJS({
     function foldHeader(header) {
       var rval = header.name + ": ";
       var values = [];
-      var insertSpace = function(match, $1) {
+      var insertSpace = function(match2, $1) {
         return " " + $1;
       };
       for (var i = 0; i < header.values.length; ++i) {
@@ -131215,8 +128336,8 @@ var require_pem = __commonJS({
       }
       return rval;
     }
-    function ltrim(str2) {
-      return str2.replace(/^\s+/, "");
+    function ltrim(str) {
+      return str.replace(/^\s+/, "");
     }
   }
 });
@@ -134116,19 +131237,19 @@ var require_pkcs1 = __commonJS({
         error3 |= lHash.charAt(i) !== lHashPrime.charAt(i);
       }
       var in_ps = 1;
-      var index = md2.digestLength;
+      var index2 = md2.digestLength;
       for (var j = md2.digestLength; j < db.length; j++) {
         var code = db.charCodeAt(j);
         var is_0 = code & 1 ^ 1;
         var error_mask = in_ps ? 65534 : 0;
         error3 |= code & error_mask;
         in_ps = in_ps & is_0;
-        index += in_ps;
+        index2 += in_ps;
       }
-      if (error3 || db.charCodeAt(index) !== 1) {
+      if (error3 || db.charCodeAt(index2) !== 1) {
         throw new Error("Invalid RSAES-OAEP padding.");
       }
-      return db.substring(index + 1);
+      return db.substring(index2 + 1);
     };
     function rsa_mgf1(seed, maskLength, hash2) {
       if (!hash2) {
@@ -134239,7 +131360,7 @@ var require_prime = __commonJS({
         var num = generateRandom(bits, rng2);
         var numWorkers = options.workers;
         var workLoad = options.workLoad || 100;
-        var range = workLoad * 30 / 8;
+        var range2 = workLoad * 30 / 8;
         var workerScript = options.workerScript || "forge/prime.worker.js";
         if (numWorkers === -1) {
           return forge.util.estimateCores(function(err, cores) {
@@ -134283,7 +131404,7 @@ var require_prime = __commonJS({
               hex,
               workLoad
             });
-            num.dAddOffset(range, 0);
+            num.dAddOffset(range2, 0);
           }
         }
       }
@@ -134331,7 +131452,7 @@ var require_rsa = __commonJS({
     var BigInteger;
     var _crypto = forge.util.isNodejs ? require("crypto") : null;
     var asn1 = forge.asn1;
-    var util = forge.util;
+    var util3 = forge.util;
     forge.pki = forge.pki || {};
     module2.exports = forge.pki.rsa = forge.rsa = forge.rsa || {};
     var pki2 = forge.pki;
@@ -134871,13 +131992,13 @@ var require_rsa = __commonJS({
             });
           }
           if (_detectSubtleCrypto("generateKey") && _detectSubtleCrypto("exportKey")) {
-            return util.globalScope.crypto.subtle.generateKey({
+            return util3.globalScope.crypto.subtle.generateKey({
               name: "RSASSA-PKCS1-v1_5",
               modulusLength: bits,
               publicExponent: _intToUint8Array(e),
               hash: { name: "SHA-256" }
             }, true, ["sign", "verify"]).then(function(pair) {
-              return util.globalScope.crypto.subtle.exportKey(
+              return util3.globalScope.crypto.subtle.exportKey(
                 "pkcs8",
                 pair.privateKey
               );
@@ -134896,7 +132017,7 @@ var require_rsa = __commonJS({
             });
           }
           if (_detectSubtleMsCrypto("generateKey") && _detectSubtleMsCrypto("exportKey")) {
-            var genOp = util.globalScope.msCrypto.subtle.generateKey({
+            var genOp = util3.globalScope.msCrypto.subtle.generateKey({
               name: "RSASSA-PKCS1-v1_5",
               modulusLength: bits,
               publicExponent: _intToUint8Array(e),
@@ -134904,7 +132025,7 @@ var require_rsa = __commonJS({
             }, true, ["sign", "verify"]);
             genOp.oncomplete = function(e2) {
               var pair = e2.target.result;
-              var exportOp = util.globalScope.msCrypto.subtle.exportKey(
+              var exportOp = util3.globalScope.msCrypto.subtle.exportKey(
                 "pkcs8",
                 pair.privateKey
               );
@@ -135499,10 +132620,10 @@ var require_rsa = __commonJS({
       return forge.util.isNodejs && typeof _crypto[fn] === "function";
     }
     function _detectSubtleCrypto(fn) {
-      return typeof util.globalScope !== "undefined" && typeof util.globalScope.crypto === "object" && typeof util.globalScope.crypto.subtle === "object" && typeof util.globalScope.crypto.subtle[fn] === "function";
+      return typeof util3.globalScope !== "undefined" && typeof util3.globalScope.crypto === "object" && typeof util3.globalScope.crypto.subtle === "object" && typeof util3.globalScope.crypto.subtle[fn] === "function";
     }
     function _detectSubtleMsCrypto(fn) {
-      return typeof util.globalScope !== "undefined" && typeof util.globalScope.msCrypto === "object" && typeof util.globalScope.msCrypto.subtle === "object" && typeof util.globalScope.msCrypto.subtle[fn] === "function";
+      return typeof util3.globalScope !== "undefined" && typeof util3.globalScope.msCrypto === "object" && typeof util3.globalScope.msCrypto.subtle === "object" && typeof util3.globalScope.msCrypto.subtle[fn] === "function";
     }
     function _intToUint8Array(x) {
       var bytes = forge.util.hexToBytes(x.toString(16));
@@ -137145,12 +134266,12 @@ var require_x509 = __commonJS({
     };
     pki2.RDNAttributesAsArray = function(rdn, md2) {
       var rval = [];
-      var set2, attr, obj;
+      var set, attr, obj;
       for (var si = 0; si < rdn.value.length; ++si) {
-        set2 = rdn.value[si];
-        for (var i = 0; i < set2.value.length; ++i) {
+        set = rdn.value[si];
+        for (var i = 0; i < set.value.length; ++i) {
           obj = {};
-          attr = set2.value[i];
+          attr = set.value[i];
           obj.type = asn1.derToOid(attr.value[0].value);
           obj.value = attr.value[1].value;
           obj.valueTagClass = attr.value[1].type;
@@ -137172,12 +134293,12 @@ var require_x509 = __commonJS({
     pki2.CRIAttributesAsArray = function(attributes) {
       var rval = [];
       for (var si = 0; si < attributes.length; ++si) {
-        var seq2 = attributes[si];
-        var type2 = asn1.derToOid(seq2.value[0].value);
-        var values = seq2.value[1].value;
+        var seq = attributes[si];
+        var type = asn1.derToOid(seq.value[0].value);
+        var values = seq.value[1].value;
         for (var vi = 0; vi < values.length; ++vi) {
           var obj = {};
-          obj.type = type2;
+          obj.type = type;
           obj.value = values[vi].value;
           obj.valueTagClass = values[vi].type;
           if (obj.type in oids) {
@@ -137379,9 +134500,9 @@ var require_x509 = __commonJS({
     pki2.getPublicKeyFingerprint = function(key, options) {
       options = options || {};
       var md2 = options.md || forge.md.sha1.create();
-      var type2 = options.type || "RSAPublicKey";
+      var type = options.type || "RSAPublicKey";
       var bytes;
-      switch (type2) {
+      switch (type) {
         case "RSAPublicKey":
           bytes = asn1.toDer(pki2.publicKeyToRSAPublicKey(key)).getBytes();
           break;
@@ -137490,13 +134611,13 @@ var require_x509 = __commonJS({
           options = { name: options };
         }
         var rval = null;
-        var ext;
+        var ext2;
         for (var i = 0; rval === null && i < cert.extensions.length; ++i) {
-          ext = cert.extensions[i];
-          if (options.id && ext.id === options.id) {
-            rval = ext;
-          } else if (options.name && ext.name === options.name) {
-            rval = ext;
+          ext2 = cert.extensions[i];
+          if (options.id && ext2.id === options.id) {
+            rval = ext2;
+          } else if (options.name && ext2.name === options.name) {
+            rval = ext2;
           }
         }
         return rval;
@@ -137574,10 +134695,10 @@ var require_x509 = __commonJS({
       cert.verifySubjectKeyIdentifier = function() {
         var oid = oids["subjectKeyIdentifier"];
         for (var i = 0; i < cert.extensions.length; ++i) {
-          var ext = cert.extensions[i];
-          if (ext.id === oid) {
+          var ext2 = cert.extensions[i];
+          if (ext2.id === oid) {
             var ski = cert.generateSubjectKeyIdentifier().getBytes();
-            return forge.util.hexToBytes(ext.subjectKeyIdentifier) === ski;
+            return forge.util.hexToBytes(ext2.subjectKeyIdentifier) === ski;
           }
         }
         return false;
@@ -137695,15 +134816,15 @@ var require_x509 = __commonJS({
       }
       return rval;
     };
-    pki2.certificateExtensionFromAsn1 = function(ext) {
+    pki2.certificateExtensionFromAsn1 = function(ext2) {
       var e = {};
-      e.id = asn1.derToOid(ext.value[0].value);
+      e.id = asn1.derToOid(ext2.value[0].value);
       e.critical = false;
-      if (ext.value[1].type === asn1.Type.BOOLEAN) {
-        e.critical = ext.value[1].value.charCodeAt(0) !== 0;
-        e.value = ext.value[2].value;
+      if (ext2.value[1].type === asn1.Type.BOOLEAN) {
+        e.critical = ext2.value[1].value.charCodeAt(0) !== 0;
+        e.value = ext2.value[2].value;
       } else {
-        e.value = ext.value[1].value;
+        e.value = ext2.value[1].value;
       }
       if (e.id in oids) {
         e.name = oids[e.id];
@@ -137943,7 +135064,7 @@ var require_x509 = __commonJS({
         true,
         []
       );
-      var attr, set2;
+      var attr, set;
       var attrs = obj.attributes;
       for (var i = 0; i < attrs.length; ++i) {
         attr = attrs[i];
@@ -137955,7 +135076,7 @@ var require_x509 = __commonJS({
             value = forge.util.encodeUtf8(value);
           }
         }
-        set2 = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [
+        set = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SET, true, [
           asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
             // AttributeType
             asn1.create(
@@ -137968,7 +135089,7 @@ var require_x509 = __commonJS({
             asn1.create(asn1.Class.UNIVERSAL, valueTagClass, false, value)
           ])
         ]);
-        rval.value.push(set2);
+        rval.value.push(set);
       }
       return rval;
     }
@@ -138117,20 +135238,20 @@ var require_x509 = __commonJS({
           true,
           []
         );
-        var seq2 = e.value.value;
+        var seq = e.value.value;
         for (var key in e) {
           if (e[key] !== true) {
             continue;
           }
           if (key in oids) {
-            seq2.push(asn1.create(
+            seq.push(asn1.create(
               asn1.Class.UNIVERSAL,
               asn1.Type.OID,
               false,
               asn1.oidToDer(oids[key]).getBytes()
             ));
           } else if (key.indexOf(".") !== -1) {
-            seq2.push(asn1.create(
+            seq.push(asn1.create(
               asn1.Class.UNIVERSAL,
               asn1.Type.OID,
               false,
@@ -138233,10 +135354,10 @@ var require_x509 = __commonJS({
         );
       } else if (e.name === "authorityKeyIdentifier" && options.cert) {
         e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
-        var seq2 = e.value.value;
+        var seq = e.value.value;
         if (e.keyIdentifier) {
           var keyIdentifier = e.keyIdentifier === true ? options.cert.generateSubjectKeyIdentifier().getBytes() : e.keyIdentifier;
-          seq2.push(
+          seq.push(
             asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, false, keyIdentifier)
           );
         }
@@ -138246,19 +135367,19 @@ var require_x509 = __commonJS({
               _dnToAsn1(e.authorityCertIssuer === true ? options.cert.issuer : e.authorityCertIssuer)
             ])
           ];
-          seq2.push(
+          seq.push(
             asn1.create(asn1.Class.CONTEXT_SPECIFIC, 1, true, authorityCertIssuer)
           );
         }
         if (e.serialNumber) {
           var serialNumber = forge.util.hexToBytes(e.serialNumber === true ? options.cert.serialNumber : e.serialNumber);
-          seq2.push(
+          seq.push(
             asn1.create(asn1.Class.CONTEXT_SPECIFIC, 2, false, serialNumber)
           );
         }
       } else if (e.name === "cRLDistributionPoints") {
         e.value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
-        var seq2 = e.value.value;
+        var seq = e.value.value;
         var subSeq = asn1.create(
           asn1.Class.UNIVERSAL,
           asn1.Type.SEQUENCE,
@@ -138304,7 +135425,7 @@ var require_x509 = __commonJS({
           true,
           [fullNameGeneralNames]
         ));
-        seq2.push(subSeq);
+        seq.push(subSeq);
       }
       if (typeof e.value === "undefined") {
         var error3 = new Error("Extension value not specified.");
@@ -138386,7 +135507,7 @@ var require_x509 = __commonJS({
         if ("valueConstructed" in attr) {
           valueConstructed = attr.valueConstructed;
         }
-        var seq2 = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
+        var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
           // AttributeType
           asn1.create(
             asn1.Class.UNIVERSAL,
@@ -138404,7 +135525,7 @@ var require_x509 = __commonJS({
             )
           ])
         ]);
-        rval.value.push(seq2);
+        rval.value.push(seq);
       }
       return rval;
     }
@@ -138555,22 +135676,22 @@ var require_x509 = __commonJS({
     };
     pki2.certificateExtensionsToAsn1 = function(exts) {
       var rval = asn1.create(asn1.Class.CONTEXT_SPECIFIC, 3, true, []);
-      var seq2 = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
-      rval.value.push(seq2);
+      var seq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
+      rval.value.push(seq);
       for (var i = 0; i < exts.length; ++i) {
-        seq2.value.push(pki2.certificateExtensionToAsn1(exts[i]));
+        seq.value.push(pki2.certificateExtensionToAsn1(exts[i]));
       }
       return rval;
     };
-    pki2.certificateExtensionToAsn1 = function(ext) {
+    pki2.certificateExtensionToAsn1 = function(ext2) {
       var extseq = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
       extseq.value.push(asn1.create(
         asn1.Class.UNIVERSAL,
         asn1.Type.OID,
         false,
-        asn1.oidToDer(ext.id).getBytes()
+        asn1.oidToDer(ext2.id).getBytes()
       ));
-      if (ext.critical) {
+      if (ext2.critical) {
         extseq.value.push(asn1.create(
           asn1.Class.UNIVERSAL,
           asn1.Type.BOOLEAN,
@@ -138578,8 +135699,8 @@ var require_x509 = __commonJS({
           String.fromCharCode(255)
         ));
       }
-      var value = ext.value;
-      if (typeof ext.value !== "string") {
+      var value = ext2.value;
+      if (typeof ext2.value !== "string") {
         value = asn1.toDer(value).getBytes();
       }
       extseq.value.push(asn1.create(
@@ -138647,16 +135768,16 @@ var require_x509 = __commonJS({
         if (typeof cert2 === "string") {
           cert2 = forge.pki.certificateFromPem(cert2);
         }
-        var match = getBySubject(cert2.subject);
-        if (!match) {
+        var match2 = getBySubject(cert2.subject);
+        if (!match2) {
           return false;
         }
-        if (!forge.util.isArray(match)) {
-          match = [match];
+        if (!forge.util.isArray(match2)) {
+          match2 = [match2];
         }
         var der1 = asn1.toDer(pki2.certificateToAsn1(cert2)).getBytes();
-        for (var i2 = 0; i2 < match.length; ++i2) {
-          var der2 = asn1.toDer(pki2.certificateToAsn1(match[i2])).getBytes();
+        for (var i2 = 0; i2 < match2.length; ++i2) {
+          var der2 = asn1.toDer(pki2.certificateToAsn1(match2[i2])).getBytes();
           if (der1 === der2) {
             return true;
           }
@@ -138688,21 +135809,21 @@ var require_x509 = __commonJS({
         if (!caStore.hasCertificate(cert2)) {
           return null;
         }
-        var match = getBySubject(cert2.subject);
-        if (!forge.util.isArray(match)) {
+        var match2 = getBySubject(cert2.subject);
+        if (!forge.util.isArray(match2)) {
           result = caStore.certs[cert2.subject.hash];
           delete caStore.certs[cert2.subject.hash];
           return result;
         }
         var der1 = asn1.toDer(pki2.certificateToAsn1(cert2)).getBytes();
-        for (var i2 = 0; i2 < match.length; ++i2) {
-          var der2 = asn1.toDer(pki2.certificateToAsn1(match[i2])).getBytes();
+        for (var i2 = 0; i2 < match2.length; ++i2) {
+          var der2 = asn1.toDer(pki2.certificateToAsn1(match2[i2])).getBytes();
           if (der1 === der2) {
-            result = match[i2];
-            match.splice(i2, 1);
+            result = match2[i2];
+            match2.splice(i2, 1);
           }
         }
-        if (match.length === 0) {
+        if (match2.length === 0) {
           delete caStore.certs[cert2.subject.hash];
         }
         return result;
@@ -138812,8 +135933,8 @@ var require_x509 = __commonJS({
             basicConstraints: true
           };
           for (var i = 0; error3 === null && i < cert.extensions.length; ++i) {
-            var ext = cert.extensions[i];
-            if (ext.critical && !(ext.name in se)) {
+            var ext2 = cert.extensions[i];
+            if (ext2.critical && !(ext2.name in se)) {
               error3 = {
                 message: "Certificate has an unsupported critical extension.",
                 error: pki2.certificateError.unsupported_certificate
@@ -139111,20 +136232,20 @@ var require_pkcs12 = __commonJS({
          *           attribute was given but a bag type, the map key will be the
          *           bag type.
          */
-        getBags: function(filter) {
+        getBags: function(filter2) {
           var rval = {};
           var localKeyId;
-          if ("localKeyId" in filter) {
-            localKeyId = filter.localKeyId;
-          } else if ("localKeyIdHex" in filter) {
-            localKeyId = forge.util.hexToBytes(filter.localKeyIdHex);
+          if ("localKeyId" in filter2) {
+            localKeyId = filter2.localKeyId;
+          } else if ("localKeyIdHex" in filter2) {
+            localKeyId = forge.util.hexToBytes(filter2.localKeyIdHex);
           }
-          if (localKeyId === void 0 && !("friendlyName" in filter) && "bagType" in filter) {
-            rval[filter.bagType] = _getBagsByAttribute(
+          if (localKeyId === void 0 && !("friendlyName" in filter2) && "bagType" in filter2) {
+            rval[filter2.bagType] = _getBagsByAttribute(
               pfx.safeContents,
               null,
               null,
-              filter.bagType
+              filter2.bagType
             );
           }
           if (localKeyId !== void 0) {
@@ -139132,15 +136253,15 @@ var require_pkcs12 = __commonJS({
               pfx.safeContents,
               "localKeyId",
               localKeyId,
-              filter.bagType
+              filter2.bagType
             );
           }
-          if ("friendlyName" in filter) {
+          if ("friendlyName" in filter2) {
             rval.friendlyName = _getBagsByAttribute(
               pfx.safeContents,
               "friendlyName",
-              filter.friendlyName,
-              filter.bagType
+              filter2.friendlyName,
+              filter2.bagType
             );
           }
           return rval;
@@ -140086,9 +137207,9 @@ var require_tls = __commonJS({
           }
           if (!client) {
             for (var i = 0; i < msg.extensions.length; ++i) {
-              var ext = msg.extensions[i];
-              if (ext.type[0] === 0 && ext.type[1] === 0) {
-                var snl = readVector(ext.data, 2);
+              var ext2 = msg.extensions[i];
+              if (ext2.type[0] === 0 && ext2.type[1] === 0) {
+                var snl = readVector(ext2.data, 2);
                 while (snl.length() > 0) {
                   var snType = snl.getByte();
                   if (snType !== 0) {
@@ -140720,7 +137841,7 @@ var require_tls = __commonJS({
     };
     tls.handleHandshake = function(c, record) {
       var b = record.fragment;
-      var type2 = b.getByte();
+      var type = b.getByte();
       var length = b.getInt24();
       if (length > b.length()) {
         c.fragmented = record;
@@ -140732,7 +137853,7 @@ var require_tls = __commonJS({
       b.read -= 4;
       var bytes = b.bytes(length + 4);
       b.read += 4;
-      if (type2 in hsTable[c.entity][c.expect]) {
+      if (type in hsTable[c.entity][c.expect]) {
         if (c.entity === tls.ConnectionEnd.server && !c.open && !c.fail) {
           c.handshaking = true;
           c.session = {
@@ -140750,11 +137871,11 @@ var require_tls = __commonJS({
             sha1: forge.md.sha1.create()
           };
         }
-        if (type2 !== tls.HandshakeType.hello_request && type2 !== tls.HandshakeType.certificate_verify && type2 !== tls.HandshakeType.finished) {
+        if (type !== tls.HandshakeType.hello_request && type !== tls.HandshakeType.certificate_verify && type !== tls.HandshakeType.finished) {
           c.session.md5.update(bytes);
           c.session.sha1.update(bytes);
         }
-        hsTable[c.entity][c.expect][type2](c, record, length);
+        hsTable[c.entity][c.expect][type](c, record, length);
       } else {
         tls.handleUnexpected(c, record);
       }
@@ -140766,10 +137887,10 @@ var require_tls = __commonJS({
     };
     tls.handleHeartbeat = function(c, record) {
       var b = record.fragment;
-      var type2 = b.getByte();
+      var type = b.getByte();
       var length = b.getInt16();
       var payload = b.getBytes(length);
-      if (type2 === tls.HeartbeatMessageType.heartbeat_request) {
+      if (type === tls.HeartbeatMessageType.heartbeat_request) {
         if (c.handshaking || length > payload.length) {
           return c.process();
         }
@@ -140781,7 +137902,7 @@ var require_tls = __commonJS({
           )
         }));
         tls.flush(c);
-      } else if (type2 === tls.HeartbeatMessageType.heartbeat_response) {
+      } else if (type === tls.HeartbeatMessageType.heartbeat_response) {
         if (payload !== c.expectedHeartbeatPayload) {
           return c.process();
         }
@@ -141084,16 +138205,16 @@ var require_tls = __commonJS({
       var cMethods = compressionMethods.length();
       var extensions = forge.util.createBuffer();
       if (c.virtualHost) {
-        var ext = forge.util.createBuffer();
-        ext.putByte(0);
-        ext.putByte(0);
+        var ext2 = forge.util.createBuffer();
+        ext2.putByte(0);
+        ext2.putByte(0);
         var serverName = forge.util.createBuffer();
         serverName.putByte(0);
         writeVector(serverName, 2, forge.util.createBuffer(c.virtualHost));
         var snList = forge.util.createBuffer();
         writeVector(snList, 2, serverName);
-        writeVector(ext, 2, snList);
-        extensions.putBuffer(ext);
+        writeVector(ext2, 2, snList);
+        extensions.putBuffer(ext2);
       }
       var extLength = extensions.length();
       if (extLength > 0) {
@@ -141321,12 +138442,12 @@ var require_tls = __commonJS({
       rval.putBuffer(b);
       return rval;
     };
-    tls.createHeartbeat = function(type2, payload, payloadLength) {
+    tls.createHeartbeat = function(type, payload, payloadLength) {
       if (typeof payloadLength === "undefined") {
         payloadLength = payload.length;
       }
       var rval = forge.util.createBuffer();
-      rval.putByte(type2);
+      rval.putByte(type);
       rval.putInt16(payloadLength);
       rval.putBytes(payload);
       var plaintextLength = rval.length();
@@ -143162,11 +140283,11 @@ var require_ed25519 = __commonJS({
         q[i] ^= t;
       }
     }
-    function gf(init) {
+    function gf(init2) {
       var i, r = new Float64Array(16);
-      if (init) {
-        for (i = 0; i < init.length; ++i) {
-          r[i] = init[i];
+      if (init2) {
+        for (i = 0; i < init2.length; ++i) {
+          r[i] = init2[i];
         }
       }
       return r;
@@ -144379,14 +141500,14 @@ var require_pkcs7 = __commonJS({
             if (rAttr.length !== sAttr.length) {
               continue;
             }
-            var match = true;
+            var match2 = true;
             for (var j = 0; j < sAttr.length; ++j) {
               if (rAttr[j].type !== sAttr[j].type || rAttr[j].value !== sAttr[j].value) {
-                match = false;
+                match2 = false;
                 break;
               }
             }
-            if (match) {
+            if (match2) {
               return r;
             }
           }
@@ -144677,9 +141798,9 @@ var require_pkcs7 = __commonJS({
         var jan_1_2050 = /* @__PURE__ */ new Date("2050-01-01T00:00:00Z");
         var date = attr.value;
         if (typeof date === "string") {
-          var timestamp2 = Date.parse(date);
-          if (!isNaN(timestamp2)) {
-            date = new Date(timestamp2);
+          var timestamp = Date.parse(date);
+          if (!isNaN(timestamp)) {
+            date = new Date(timestamp);
           } else if (date.length === 13) {
             date = asn1.utcTimeToDate(date);
           } else {
@@ -144901,13 +142022,13 @@ var require_ssh = __commonJS({
       return ppk;
     };
     ssh.publicKeyToOpenSSH = function(key, comment) {
-      var type2 = "ssh-rsa";
+      var type = "ssh-rsa";
       comment = comment || "";
       var buffer = forge.util.createBuffer();
-      _addStringToBuffer(buffer, type2);
+      _addStringToBuffer(buffer, type);
       _addBigIntegerToBuffer(buffer, key.e);
       _addBigIntegerToBuffer(buffer, key.n);
-      return type2 + " " + forge.util.encode64(buffer.bytes()) + " " + comment;
+      return type + " " + forge.util.encode64(buffer.bytes()) + " " + comment;
     };
     ssh.privateKeyToOpenSSH = function(privateKey, passphrase) {
       if (!passphrase) {
@@ -144922,9 +142043,9 @@ var require_ssh = __commonJS({
     ssh.getPublicKeyFingerprint = function(key, options) {
       options = options || {};
       var md2 = options.md || forge.md.md5.create();
-      var type2 = "ssh-rsa";
+      var type = "ssh-rsa";
       var buffer = forge.util.createBuffer();
-      _addStringToBuffer(buffer, type2);
+      _addStringToBuffer(buffer, type);
       _addBigIntegerToBuffer(buffer, key.e);
       _addBigIntegerToBuffer(buffer, key.n);
       md2.start();
@@ -145023,20 +142144,86 @@ var import_path4 = __toESM(require("path"));
 var import_perf_hooks4 = require("perf_hooks");
 var core16 = __toESM(require_core());
 
+// src/action-common.ts
+var core8 = __toESM(require_core());
+
 // src/actions-util.ts
 var fs2 = __toESM(require("fs"));
 var path2 = __toESM(require("path"));
-var core4 = __toESM(require_core());
+var core3 = __toESM(require_core());
 var toolrunner = __toESM(require_toolrunner());
 var github = __toESM(require_github());
 var io2 = __toESM(require_io());
 
+// src/environment.ts
+function getRequiredEnvVar(env, paramName) {
+  const value = env[paramName];
+  if (value === void 0 || value.length === 0) {
+    throw new Error(`${paramName} environment variable must be set`);
+  }
+  return value;
+}
+function getRequiredEnvParam(paramName) {
+  return getRequiredEnvVar(process.env, paramName);
+}
+function getOptionalEnvVarFrom(env, paramName) {
+  const value = env[paramName];
+  if (value?.trim().length === 0) {
+    return void 0;
+  }
+  return value;
+}
+function getOptionalEnvVar(paramName) {
+  return getOptionalEnvVarFrom(process.env, paramName);
+}
+var ReadOnlyEnv = class {
+  constructor(vars) {
+    this.vars = vars;
+  }
+  vars;
+  /** Clones the object while detaching the underlying environment from the original. */
+  clone() {
+    return Object.create(this, { vars: { value: { ...this.vars } } });
+  }
+  /** Gets a copy of the underlying environment. */
+  get() {
+    return { ...this.vars };
+  }
+  /** Tries to get the value for `name` and throws if there isn't one. */
+  getRequired(name) {
+    return getRequiredEnvVar(this.vars, name);
+  }
+  /** Gets the value for `name`, or `undefined` if it isn't set or empty. */
+  getOptional(name) {
+    return getOptionalEnvVarFrom(this.vars, name);
+  }
+  /** Gets the entries of the underlying `ProcessEnv`. */
+  entries() {
+    return Object.entries(this.vars);
+  }
+};
+var Env = class extends ReadOnlyEnv {
+  changed = false;
+  /** Sets an environment variable. */
+  set(name, value) {
+    this.vars[name] = value;
+    this.changed = true;
+  }
+  /** Gets a value indicating whether `set` was called at least once. */
+  hasChanged() {
+    return this.changed;
+  }
+};
+function getEnv(env = process.env) {
+  return new Env(env);
+}
+
 // src/util.ts
 var fs = __toESM(require("fs"));
 var fsPromises = __toESM(require("fs/promises"));
 var os = __toESM(require("os"));
 var path = __toESM(require("path"));
-var core3 = __toESM(require_core());
+var core2 = __toESM(require_core());
 var io = __toESM(require_io());
 
 // node_modules/get-folder-size/index.js
@@ -145047,21 +142234,21 @@ async function getFolderSize(itemPath, options) {
 getFolderSize.loose = async (itemPath, options) => await core(itemPath, options);
 getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true });
 async function core(rootItemPath, options = {}, returnType = {}) {
-  const fs30 = options.fs || await import("node:fs/promises");
+  const fs31 = options.fs || await import("node:fs/promises");
   let folderSize = 0n;
   const foundInos = /* @__PURE__ */ new Set();
   const errors = [];
   await processItem(rootItemPath);
   async function processItem(itemPath) {
     if (options.ignore?.test(itemPath)) return;
-    const stats = returnType.strict ? await fs30.lstat(itemPath, { bigint: true }) : await fs30.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3));
+    const stats = returnType.strict ? await fs31.lstat(itemPath, { bigint: true }) : await fs31.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3));
     if (typeof stats !== "object") return;
     if (!foundInos.has(stats.ino)) {
       foundInos.add(stats.ino);
       folderSize += stats.size;
     }
     if (stats.isDirectory()) {
-      const directoryItems = returnType.strict ? await fs30.readdir(itemPath) : await fs30.readdir(itemPath).catch((error3) => errors.push(error3));
+      const directoryItems = returnType.strict ? await fs31.readdir(itemPath) : await fs31.readdir(itemPath).catch((error3) => errors.push(error3));
       if (typeof directoryItems !== "object") return;
       await Promise.all(
         directoryItems.map(
@@ -145095,86 +142282,765 @@ async function core(rootItemPath, options = {}, returnType = {}) {
 }
 
 // node_modules/js-yaml/dist/js-yaml.mjs
-function isNothing(subject) {
-  return typeof subject === "undefined" || subject === null;
+var NOT_RESOLVED = /* @__PURE__ */ Symbol("NOT_RESOLVED");
+var MERGE_KEY = /* @__PURE__ */ Symbol("MERGE_KEY");
+function defineScalarTag(tagName, options) {
+  return {
+    tagName,
+    nodeKind: "scalar",
+    implicit: options.implicit ?? false,
+    matchByTagPrefix: options.matchByTagPrefix ?? false,
+    implicitFirstChars: options.implicitFirstChars ?? null,
+    resolve: options.resolve,
+    identify: options.identify ?? null,
+    represent: options.represent ?? ((data) => String(data)),
+    representTagName: options.representTagName ?? null
+  };
 }
-function isObject(subject) {
-  return typeof subject === "object" && subject !== null;
+function defineSequenceTag(tagName, options) {
+  const carrierIsResult = options.finalize === void 0;
+  return {
+    tagName,
+    nodeKind: "sequence",
+    implicit: false,
+    matchByTagPrefix: options.matchByTagPrefix ?? false,
+    create: options.create,
+    addItem: options.addItem,
+    finalize: options.finalize ?? ((carrier) => carrier),
+    carrierIsResult,
+    identify: options.identify ?? null,
+    represent: options.represent ?? ((data) => data),
+    representTagName: options.representTagName ?? null
+  };
 }
-function toArray(sequence) {
-  if (Array.isArray(sequence)) return sequence;
-  else if (isNothing(sequence)) return [];
-  return [sequence];
+function defineMappingTag(tagName, options) {
+  const carrierIsResult = options.finalize === void 0;
+  return {
+    tagName,
+    nodeKind: "mapping",
+    implicit: false,
+    matchByTagPrefix: options.matchByTagPrefix ?? false,
+    create: options.create,
+    addPair: options.addPair,
+    has: options.has,
+    keys: options.keys,
+    get: options.get,
+    finalize: options.finalize ?? ((carrier) => carrier),
+    carrierIsResult,
+    identify: options.identify ?? null,
+    represent: options.represent ?? ((data) => data),
+    representTagName: options.representTagName ?? null
+  };
 }
-function extend(target, source) {
-  var index, length, key, sourceKeys;
-  if (source) {
-    sourceKeys = Object.keys(source);
-    for (index = 0, length = sourceKeys.length; index < length; index += 1) {
-      key = sourceKeys[index];
-      target[key] = source[key];
-    }
+var strTag = defineScalarTag("tag:yaml.org,2002:str", {
+  resolve: (source) => source,
+  identify: (data) => typeof data === "string"
+});
+var NULL_VALUES$1 = [
+  "",
+  "~",
+  "null",
+  "Null",
+  "NULL"
+];
+var nullCoreTag = defineScalarTag("tag:yaml.org,2002:null", {
+  implicit: true,
+  implicitFirstChars: [
+    "",
+    "~",
+    "n",
+    "N"
+  ],
+  resolve: (source) => {
+    if (NULL_VALUES$1.indexOf(source) !== -1) return null;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => object2 === null,
+  represent: () => "null"
+});
+var nullJsonTag = defineScalarTag("tag:yaml.org,2002:null", {
+  implicit: true,
+  implicitFirstChars: ["n"],
+  resolve: (source, isExplicit) => {
+    if (source === "null" || isExplicit && source === "") return null;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => object2 === null,
+  represent: () => "null"
+});
+var NULL_VALUES = [
+  "",
+  "~",
+  "null",
+  "Null",
+  "NULL"
+];
+var nullYaml11Tag = defineScalarTag("tag:yaml.org,2002:null", {
+  implicit: true,
+  implicitFirstChars: [
+    "",
+    "~",
+    "n",
+    "N"
+  ],
+  resolve: (source) => {
+    if (NULL_VALUES.indexOf(source) !== -1) return null;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => object2 === null,
+  represent: () => "null"
+});
+var TRUE_VALUES$2 = [
+  "true",
+  "True",
+  "TRUE"
+];
+var FALSE_VALUES$2 = [
+  "false",
+  "False",
+  "FALSE"
+];
+var boolCoreTag = defineScalarTag("tag:yaml.org,2002:bool", {
+  implicit: true,
+  implicitFirstChars: [
+    "t",
+    "T",
+    "f",
+    "F"
+  ],
+  resolve: (source) => {
+    if (TRUE_VALUES$2.indexOf(source) !== -1) return true;
+    if (FALSE_VALUES$2.indexOf(source) !== -1) return false;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => Object.prototype.toString.call(object2) === "[object Boolean]",
+  represent: (object2) => object2 ? "true" : "false"
+});
+var TRUE_VALUES$1 = ["true"];
+var FALSE_VALUES$1 = ["false"];
+var boolJsonTag = defineScalarTag("tag:yaml.org,2002:bool", {
+  implicit: true,
+  implicitFirstChars: ["t", "f"],
+  resolve: (source) => {
+    if (TRUE_VALUES$1.indexOf(source) !== -1) return true;
+    if (FALSE_VALUES$1.indexOf(source) !== -1) return false;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => Object.prototype.toString.call(object2) === "[object Boolean]",
+  represent: (object2) => object2 ? "true" : "false"
+});
+var TRUE_VALUES = [
+  "true",
+  "True",
+  "TRUE",
+  "y",
+  "Y",
+  "yes",
+  "Yes",
+  "YES",
+  "on",
+  "On",
+  "ON"
+];
+var FALSE_VALUES = [
+  "false",
+  "False",
+  "FALSE",
+  "n",
+  "N",
+  "no",
+  "No",
+  "NO",
+  "off",
+  "Off",
+  "OFF"
+];
+var boolYaml11Tag = defineScalarTag("tag:yaml.org,2002:bool", {
+  implicit: true,
+  implicitFirstChars: [
+    "y",
+    "Y",
+    "n",
+    "N",
+    "t",
+    "T",
+    "f",
+    "F",
+    "o",
+    "O"
+  ],
+  resolve: (source) => {
+    if (TRUE_VALUES.indexOf(source) !== -1) return true;
+    if (FALSE_VALUES.indexOf(source) !== -1) return false;
+    return NOT_RESOLVED;
+  },
+  identify: (object2) => Object.prototype.toString.call(object2) === "[object Boolean]",
+  represent: (object2) => object2 ? "true" : "false"
+});
+var YAML_INTEGER_IMPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
+var YAML_INTEGER_EXPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
+function parseYamlInteger$2(source) {
+  let value = source;
+  let sign = 1;
+  if (value[0] === "-" || value[0] === "+") {
+    if (value[0] === "-") sign = -1;
+    value = value.slice(1);
   }
-  return target;
+  if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2);
+  if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8);
+  if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16);
+  return sign * parseInt(value, 10);
 }
-function repeat(string2, count) {
-  var result = "", cycle;
-  for (cycle = 0; cycle < count; cycle += 1) {
-    result += string2;
+function resolveYamlInteger$2(source, isExplicit) {
+  if (isExplicit) {
+    if (!YAML_INTEGER_EXPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED;
+  } else if (!YAML_INTEGER_IMPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED;
+  const result = parseYamlInteger$2(source);
+  return Number.isFinite(result) ? result : NOT_RESOLVED;
+}
+var intCoreTag = defineScalarTag("tag:yaml.org,2002:int", {
+  implicit: true,
+  implicitFirstChars: [
+    "-",
+    "+",
+    ..."0123456789"
+  ],
+  resolve: resolveYamlInteger$2,
+  identify: (object2) => Number.isInteger(object2) && !Object.is(object2, -0) && object2.toString(10).indexOf("e") < 0,
+  represent: (object2) => object2.toString(10)
+});
+var YAML_INTEGER_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$");
+var YAML_INTEGER_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
+function parseYamlInteger$1(source) {
+  let value = source;
+  let sign = 1;
+  if (value[0] === "-" || value[0] === "+") {
+    if (value[0] === "-") sign = -1;
+    value = value.slice(1);
   }
+  if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2);
+  if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8);
+  if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16);
+  return sign * parseInt(value, 10);
+}
+function resolveYamlInteger$1(source, isExplicit) {
+  if (isExplicit) {
+    if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED;
+  } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED;
+  const result = parseYamlInteger$1(source);
+  return Number.isFinite(result) ? result : NOT_RESOLVED;
+}
+var intJsonTag = defineScalarTag("tag:yaml.org,2002:int", {
+  implicit: true,
+  implicitFirstChars: ["-", ..."0123456789"],
+  resolve: resolveYamlInteger$1,
+  identify: (object2) => Number.isInteger(object2) && !Object.is(object2, -0) && object2.toString(10).indexOf("e") < 0,
+  represent: (object2) => object2.toString(10)
+});
+var YAML_INTEGER_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");
+function parseYamlInteger(source) {
+  let value = source.replace(/_/g, "");
+  let sign = 1;
+  if (value[0] === "-" || value[0] === "+") {
+    if (value[0] === "-") sign = -1;
+    value = value.slice(1);
+  }
+  if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2);
+  if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16);
+  if (value.includes(":")) {
+    let result = 0;
+    for (const part of value.split(":")) result = result * 60 + Number(part);
+    return sign * result;
+  }
+  if (value !== "0" && value[0] === "0") return sign * parseInt(value, 8);
+  return sign * parseInt(value, 10);
+}
+function resolveYamlInteger(source) {
+  if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED;
+  const result = parseYamlInteger(source);
+  return Number.isFinite(result) ? result : NOT_RESOLVED;
+}
+var intYaml11Tag = defineScalarTag("tag:yaml.org,2002:int", {
+  implicit: true,
+  implicitFirstChars: [
+    "-",
+    "+",
+    ..."0123456789"
+  ],
+  resolve: resolveYamlInteger,
+  identify: (object2) => Number.isInteger(object2) && !Object.is(object2, -0) && object2.toString(10).indexOf("e") < 0,
+  represent: (object2) => object2.toString(10)
+});
+var YAML_FLOAT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
+var YAML_FLOAT_SPECIAL_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
+function resolveYamlFloat$2(source) {
+  if (!YAML_FLOAT_PATTERN$1.test(source)) return NOT_RESOLVED;
+  let value = source.toLowerCase();
+  const sign = value[0] === "-" ? -1 : 1;
+  if ("+-".includes(value[0])) value = value.slice(1);
+  if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+  if (value === ".nan") return NaN;
+  const result = sign * parseFloat(value);
+  if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN$1.test(source)) return result;
+  return NOT_RESOLVED;
+}
+function representYamlFloat$2(object2) {
+  if (isNaN(object2)) return ".nan";
+  if (object2 === Number.POSITIVE_INFINITY) return ".inf";
+  if (object2 === Number.NEGATIVE_INFINITY) return "-.inf";
+  if (Object.is(object2, -0)) return "-0.0";
+  const result = object2.toString(10);
+  return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result;
+}
+var floatCoreTag = defineScalarTag("tag:yaml.org,2002:float", {
+  implicit: true,
+  implicitFirstChars: [
+    "-",
+    "+",
+    ".",
+    ..."0123456789"
+  ],
+  resolve: resolveYamlFloat$2,
+  identify: (object2) => typeof object2 === "number" && (!Number.isInteger(object2) || Object.is(object2, -0) || object2.toString(10).indexOf("e") >= 0),
+  represent: representYamlFloat$2
+});
+var YAML_FLOAT_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$");
+var YAML_FLOAT_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
+function resolveYamlFloat$1(source, isExplicit) {
+  if (isExplicit) {
+    if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED;
+    let value = source.toLowerCase();
+    const sign = value[0] === "-" ? -1 : 1;
+    if ("+-".includes(value[0])) value = value.slice(1);
+    if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+    if (value === ".nan") return NaN;
+    const result2 = sign * parseFloat(value);
+    return Number.isFinite(result2) ? result2 : NOT_RESOLVED;
+  }
+  if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED;
+  const result = Number(source);
+  if (Number.isFinite(result)) return result;
+  return NOT_RESOLVED;
+}
+function representYamlFloat$1(object2) {
+  if (isNaN(object2)) return ".nan";
+  if (object2 === Number.POSITIVE_INFINITY) return ".inf";
+  if (object2 === Number.NEGATIVE_INFINITY) return "-.inf";
+  if (Object.is(object2, -0)) return "-0.0";
+  const result = object2.toString(10);
+  return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result;
+}
+var floatJsonTag = defineScalarTag("tag:yaml.org,2002:float", {
+  implicit: true,
+  implicitFirstChars: ["-", ..."0123456789"],
+  resolve: resolveYamlFloat$1,
+  identify: (object2) => typeof object2 === "number" && (!Number.isInteger(object2) || Object.is(object2, -0) || object2.toString(10).indexOf("e") >= 0),
+  represent: representYamlFloat$1
+});
+var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
+var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
+function resolveYamlFloat(source) {
+  if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED;
+  let value = source.toLowerCase().replace(/_/g, "");
+  const sign = value[0] === "-" ? -1 : 1;
+  if ("+-".includes(value[0])) value = value.slice(1);
+  if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+  if (value === ".nan") return NaN;
+  let result = 0;
+  if (value.includes(":")) {
+    for (const part of value.split(":")) result = result * 60 + Number(part);
+    result *= sign;
+  } else result = sign * parseFloat(value);
+  if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result;
+  return NOT_RESOLVED;
+}
+function representYamlFloat(object2) {
+  if (isNaN(object2)) return ".nan";
+  if (object2 === Number.POSITIVE_INFINITY) return ".inf";
+  if (object2 === Number.NEGATIVE_INFINITY) return "-.inf";
+  if (Object.is(object2, -0)) return "-0.0";
+  const result = object2.toString(10);
+  return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result;
+}
+var floatYaml11Tag = defineScalarTag("tag:yaml.org,2002:float", {
+  implicit: true,
+  implicitFirstChars: [
+    "-",
+    "+",
+    ".",
+    ..."0123456789"
+  ],
+  resolve: resolveYamlFloat,
+  identify: (object2) => typeof object2 === "number" && (!Number.isInteger(object2) || Object.is(object2, -0) || object2.toString(10).indexOf("e") >= 0),
+  represent: representYamlFloat
+});
+var mergeTag = defineScalarTag("tag:yaml.org,2002:merge", {
+  implicit: true,
+  implicitFirstChars: ["<"],
+  resolve: (source, isExplicit) => {
+    if (source === "<<" || isExplicit && source === "") return MERGE_KEY;
+    return NOT_RESOLVED;
+  }
+});
+var BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/;
+function resolveYamlBinary(source) {
+  const input = source.replace(/\s/g, "");
+  if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED;
+  const binary = atob(input);
+  const result = new Uint8Array(binary.length);
+  for (let index2 = 0; index2 < binary.length; index2++) result[index2] = binary.charCodeAt(index2);
   return result;
 }
-function isNegativeZero(number) {
-  return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
-}
-var isNothing_1 = isNothing;
-var isObject_1 = isObject;
-var toArray_1 = toArray;
-var repeat_1 = repeat;
-var isNegativeZero_1 = isNegativeZero;
-var extend_1 = extend;
-var common = {
-  isNothing: isNothing_1,
-  isObject: isObject_1,
-  toArray: toArray_1,
-  repeat: repeat_1,
-  isNegativeZero: isNegativeZero_1,
-  extend: extend_1
-};
-function formatError(exception2, compact) {
-  var where = "", message = exception2.reason || "(unknown reason)";
-  if (!exception2.mark) return message;
-  if (exception2.mark.name) {
-    where += 'in "' + exception2.mark.name + '" ';
-  }
-  where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
-  if (!compact && exception2.mark.snippet) {
-    where += "\n\n" + exception2.mark.snippet;
-  }
-  return message + " " + where;
-}
-function YAMLException$1(reason, mark) {
-  Error.call(this);
-  this.name = "YAMLException";
-  this.reason = reason;
-  this.mark = mark;
-  this.message = formatError(this, false);
-  if (Error.captureStackTrace) {
-    Error.captureStackTrace(this, this.constructor);
-  } else {
-    this.stack = new Error().stack || "";
+function representYamlBinary(object2) {
+  let binary = "";
+  for (let index2 = 0; index2 < object2.length; index2++) binary += String.fromCharCode(object2[index2]);
+  return btoa(binary);
+}
+var binaryTag = defineScalarTag("tag:yaml.org,2002:binary", {
+  resolve: resolveYamlBinary,
+  identify: (object2) => Object.prototype.toString.call(object2) === "[object Uint8Array]",
+  represent: representYamlBinary
+});
+var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
+var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
+function makeUtcDate(year, month, day, hour = 0, minute = 0, second = 0, fraction = 0) {
+  const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
+  date.setUTCFullYear(year, month, day);
+  return date;
+}
+function resolveYamlTimestamp(source) {
+  let match2 = YAML_DATE_REGEXP.exec(source);
+  if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(source);
+  if (match2 === null) return NOT_RESOLVED;
+  const year = +match2[1];
+  const month = +match2[2] - 1;
+  const day = +match2[3];
+  if (!match2[4]) {
+    const date2 = makeUtcDate(year, month, day);
+    if (date2.getUTCFullYear() !== year || date2.getUTCMonth() !== month || date2.getUTCDate() !== day) return NOT_RESOLVED;
+    return date2;
+  }
+  const hour = +match2[4];
+  const minute = +match2[5];
+  const second = +match2[6];
+  let fraction = 0;
+  if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED;
+  if (match2[7]) {
+    let value = match2[7].slice(0, 3);
+    while (value.length < 3) value += "0";
+    fraction = +value;
+  }
+  const date = makeUtcDate(year, month, day, hour, minute, second, fraction);
+  if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) return NOT_RESOLVED;
+  if (match2[9]) {
+    const offsetHour = +match2[10];
+    const offsetMinute = +(match2[11] || 0);
+    if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED;
+    const offset = (offsetHour * 60 + offsetMinute) * 6e4;
+    date.setTime(date.getTime() - (match2[9] === "-" ? -offset : offset));
+  }
+  return date;
+}
+var timestampTag = defineScalarTag("tag:yaml.org,2002:timestamp", {
+  implicit: true,
+  implicitFirstChars: [..."0123456789"],
+  resolve: resolveYamlTimestamp,
+  identify: (object2) => object2 instanceof Date,
+  represent: (object2) => object2.toISOString()
+});
+var seqTag = defineSequenceTag("tag:yaml.org,2002:seq", {
+  create: () => [],
+  addItem: (container, item) => {
+    container.push(item);
+  },
+  identify: Array.isArray
+});
+function isPlainObject3(data) {
+  if (data === null || typeof data !== "object" || Array.isArray(data)) return false;
+  const prototype = Object.getPrototypeOf(data);
+  return prototype === null || prototype === Object.prototype;
+}
+function pick(object2, keys) {
+  const result = {};
+  for (const key of keys) if (object2[key] !== void 0) result[key] = object2[key];
+  return result;
+}
+var omapTag = defineSequenceTag("tag:yaml.org,2002:omap", {
+  create: () => ({
+    list: [],
+    seen: /* @__PURE__ */ new Set()
+  }),
+  addItem: (carrier, item) => {
+    let key;
+    if (item instanceof Map) {
+      if (item.size !== 1) return "cannot resolve an ordered map item";
+      key = item.keys().next().value;
+    } else if (isPlainObject3(item)) {
+      const itemKeys = Object.keys(item);
+      if (itemKeys.length !== 1) return "cannot resolve an ordered map item";
+      key = itemKeys[0];
+    } else return "cannot resolve an ordered map item";
+    if (carrier.seen.has(key)) return "duplicate key in ordered map";
+    carrier.seen.add(key);
+    carrier.list.push(item);
+    return "";
+  },
+  finalize: (carrier) => carrier.list
+});
+var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", {
+  create: () => [],
+  addItem: (container, item) => {
+    if (item instanceof Map) {
+      if (item.size !== 1) return "cannot resolve a pairs item";
+      container.push(item.entries().next().value);
+      return "";
+    }
+    if (Object.prototype.toString.call(item) !== "[object Object]") return "cannot resolve a pairs item";
+    const object2 = item;
+    const keys = Object.keys(object2);
+    if (keys.length !== 1) return "cannot resolve a pairs item";
+    container.push([keys[0], object2[keys[0]]]);
+    return "";
+  }
+});
+var mapTag = defineMappingTag("tag:yaml.org,2002:map", {
+  create: () => ({}),
+  identify: isPlainObject3,
+  represent: (o) => {
+    const map = /* @__PURE__ */ new Map();
+    for (const key of Object.keys(o)) map.set(key, o[key]);
+    return map;
+  },
+  addPair: (container, key, value) => {
+    if (key !== null && typeof key === "object") return "object-based map does not support complex keys";
+    const normalizedKey = String(key);
+    if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, {
+      value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+    else container[normalizedKey] = value;
+    return "";
+  },
+  has: (container, key) => {
+    if (key !== null && typeof key === "object") return false;
+    return Object.prototype.hasOwnProperty.call(container, String(key));
+  },
+  keys: (container) => Object.keys(container),
+  get: (container, key) => {
+    const normalizedKey = String(key);
+    if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null;
+    return container[normalizedKey];
+  }
+});
+var setTag = defineMappingTag("tag:yaml.org,2002:set", {
+  create: () => /* @__PURE__ */ new Set(),
+  identify: (data) => data instanceof Set,
+  represent: (data) => {
+    const map = /* @__PURE__ */ new Map();
+    for (const key of data) map.set(key, null);
+    return map;
+  },
+  addPair: (container, key, value) => {
+    if (value !== null) return "cannot resolve a set item";
+    container.add(key);
+    return "";
+  },
+  has: (container, key) => container.has(key),
+  keys: (container) => container.keys(),
+  get: () => null
+});
+function createTagDefinitionMap() {
+  return {
+    scalar: /* @__PURE__ */ Object.create(null),
+    sequence: /* @__PURE__ */ Object.create(null),
+    mapping: /* @__PURE__ */ Object.create(null)
+  };
+}
+function createTagDefinitionListMap() {
+  return {
+    scalar: [],
+    sequence: [],
+    mapping: []
+  };
+}
+function compileTags(tags) {
+  const result = [];
+  for (const tag of tags) {
+    let index2 = result.length;
+    for (let previousIndex = 0; previousIndex < result.length; previousIndex++) {
+      const previous = result[previousIndex];
+      if (previous.nodeKind === tag.nodeKind && previous.tagName === tag.tagName && previous.matchByTagPrefix === tag.matchByTagPrefix) {
+        index2 = previousIndex;
+        break;
+      }
+    }
+    result[index2] = tag;
   }
+  return result;
 }
-YAMLException$1.prototype = Object.create(Error.prototype);
-YAMLException$1.prototype.constructor = YAMLException$1;
-YAMLException$1.prototype.toString = function toString(compact) {
-  return this.name + ": " + formatError(this, compact);
+var Schema = class Schema2 {
+  tags;
+  implicitScalarTags;
+  implicitScalarByFirstChar;
+  implicitScalarAnyFirstChar;
+  defaultScalarTag;
+  defaultSequenceTag;
+  defaultMappingTag;
+  exact;
+  prefix;
+  constructor(tags) {
+    const compiledTags = compileTags(tags);
+    const implicitScalarTags = [];
+    const exact = createTagDefinitionMap();
+    const prefix = createTagDefinitionListMap();
+    for (const tag of compiledTags) {
+      if (tag.nodeKind === "scalar" && tag.implicit) {
+        if (tag.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
+        implicitScalarTags.push(tag);
+      }
+      switch (tag.nodeKind) {
+        case "scalar":
+          if (tag.matchByTagPrefix) prefix.scalar.push(tag);
+          else exact.scalar[tag.tagName] = tag;
+          break;
+        case "sequence":
+          if (tag.matchByTagPrefix) prefix.sequence.push(tag);
+          else exact.sequence[tag.tagName] = tag;
+          break;
+        case "mapping":
+          if (tag.matchByTagPrefix) prefix.mapping.push(tag);
+          else exact.mapping[tag.tagName] = tag;
+          break;
+      }
+    }
+    const implicitScalarAnyFirstChar = implicitScalarTags.filter((tag) => tag.implicitFirstChars === null);
+    const keys = /* @__PURE__ */ new Set();
+    for (const tag of implicitScalarTags) if (tag.implicitFirstChars !== null) for (const key of tag.implicitFirstChars) keys.add(key);
+    const implicitScalarByFirstChar = /* @__PURE__ */ new Map();
+    for (const key of keys) implicitScalarByFirstChar.set(key, implicitScalarTags.filter((tag) => tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1));
+    const defaultScalarTag = exact.scalar["tag:yaml.org,2002:str"];
+    if (!defaultScalarTag) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
+    this.tags = compiledTags;
+    this.implicitScalarTags = implicitScalarTags;
+    this.implicitScalarByFirstChar = implicitScalarByFirstChar;
+    this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar;
+    this.defaultScalarTag = defaultScalarTag;
+    this.defaultSequenceTag = exact.sequence["tag:yaml.org,2002:seq"];
+    this.defaultMappingTag = exact.mapping["tag:yaml.org,2002:map"];
+    this.exact = exact;
+    this.prefix = prefix;
+  }
+  withTags(...tags) {
+    let flatTags = [];
+    for (const tag of tags) flatTags = flatTags.concat(tag);
+    return new Schema2([...this.tags, ...flatTags]);
+  }
+};
+var FAILSAFE_SCHEMA = new Schema([
+  strTag,
+  seqTag,
+  mapTag
+]);
+var JSON_SCHEMA = new Schema([
+  ...FAILSAFE_SCHEMA.tags,
+  nullJsonTag,
+  boolJsonTag,
+  intJsonTag,
+  floatJsonTag
+]);
+var CORE_SCHEMA = new Schema([
+  ...FAILSAFE_SCHEMA.tags,
+  nullCoreTag,
+  boolCoreTag,
+  intCoreTag,
+  floatCoreTag
+]);
+var YAML11_SCHEMA = new Schema([
+  ...FAILSAFE_SCHEMA.tags,
+  nullYaml11Tag,
+  boolYaml11Tag,
+  intYaml11Tag,
+  floatYaml11Tag,
+  timestampTag,
+  mergeTag,
+  binaryTag,
+  omapTag,
+  pairsTag,
+  setTag
+]);
+var realMapTag = defineMappingTag("tag:yaml.org,2002:map", {
+  create: () => /* @__PURE__ */ new Map(),
+  addPair: (container, key, value) => {
+    container.set(key, value);
+    return "";
+  },
+  has: (container, key) => container.has(key),
+  keys: (container) => container.keys(),
+  get: (container, key) => container.get(key),
+  identify: (data) => data instanceof Map || isPlainObject3(data),
+  represent: (data) => {
+    if (data instanceof Map) return data;
+    const map = /* @__PURE__ */ new Map();
+    const obj = data;
+    for (const key of Object.keys(obj)) map.set(key, obj[key]);
+    return map;
+  }
+});
+function normalizeKey(key) {
+  if (Array.isArray(key)) {
+    const array2 = Array.prototype.slice.call(key);
+    for (let index2 = 0; index2 < array2.length; index2++) {
+      if (Array.isArray(array2[index2])) return null;
+      if (typeof array2[index2] === "object" && Object.prototype.toString.call(array2[index2]) === "[object Object]") array2[index2] = "[object Object]";
+    }
+    return String(array2);
+  }
+  if (typeof key === "object" && Object.prototype.toString.call(key) === "[object Object]") return "[object Object]";
+  return String(key);
+}
+var legacyMapTag = defineMappingTag("tag:yaml.org,2002:map", {
+  create: () => ({}),
+  identify: isPlainObject3,
+  represent: (o) => {
+    const map = /* @__PURE__ */ new Map();
+    for (const key of Object.keys(o)) map.set(key, o[key]);
+    return map;
+  },
+  addPair: (container, key, value) => {
+    const normalizedKey = normalizeKey(key);
+    if (normalizedKey === null) return "nested arrays are not supported inside keys";
+    if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, {
+      value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+    else container[normalizedKey] = value;
+    return "";
+  },
+  has: (container, key) => {
+    const normalizedKey = normalizeKey(key);
+    return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey);
+  },
+  keys: (container) => Object.keys(container),
+  get: (container, key) => {
+    const normalizedKey = String(key);
+    if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null;
+    return container[normalizedKey];
+  }
+});
+var DEFAULT_SNIPPET_OPTIONS = {
+  maxLength: 79,
+  indent: 1,
+  linesBefore: 3,
+  linesAfter: 2
 };
-var exception = YAMLException$1;
 function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
-  var head = "";
-  var tail = "";
-  var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
+  let head = "";
+  let tail = "";
+  const maxHalfLength = Math.floor(maxLineLength / 2) - 1;
   if (position - lineStart > maxHalfLength) {
     head = " ... ";
     lineStart = position - maxHalfLength + head.length;
@@ -145186,1868 +143052,1608 @@ function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
   return {
     str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
     pos: position - lineStart + head.length
-    // relative position
   };
 }
 function padStart(string2, max) {
-  return common.repeat(" ", max - string2.length) + string2;
+  return " ".repeat(Math.max(max - string2.length, 0)) + string2;
 }
 function makeSnippet(mark, options) {
-  options = Object.create(options || null);
   if (!mark.buffer) return null;
-  if (!options.maxLength) options.maxLength = 79;
-  if (typeof options.indent !== "number") options.indent = 1;
-  if (typeof options.linesBefore !== "number") options.linesBefore = 3;
-  if (typeof options.linesAfter !== "number") options.linesAfter = 2;
-  var re = /\r?\n|\r|\0/g;
-  var lineStarts = [0];
-  var lineEnds = [];
-  var match;
-  var foundLineNo = -1;
-  while (match = re.exec(mark.buffer)) {
-    lineEnds.push(match.index);
-    lineStarts.push(match.index + match[0].length);
-    if (mark.position <= match.index && foundLineNo < 0) {
-      foundLineNo = lineStarts.length - 2;
-    }
+  const opts = {
+    ...DEFAULT_SNIPPET_OPTIONS,
+    ...options
+  };
+  const re = /\r?\n|\r|\0/g;
+  const lineStarts = [0];
+  const lineEnds = [];
+  let match2;
+  let foundLineNo = -1;
+  while (match2 = re.exec(mark.buffer)) {
+    lineEnds.push(match2.index);
+    lineStarts.push(match2.index + match2[0].length);
+    if (mark.position <= match2.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2;
   }
   if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
-  var result = "", i, line;
-  var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
-  var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
-  for (i = 1; i <= options.linesBefore; i++) {
+  let result = "";
+  const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length;
+  const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3);
+  for (let i = 1; i <= opts.linesBefore; i++) {
     if (foundLineNo - i < 0) break;
-    line = getLine(
-      mark.buffer,
-      lineStarts[foundLineNo - i],
-      lineEnds[foundLineNo - i],
-      mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
-      maxLineLength
-    );
-    result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
+    const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
+    result = `${" ".repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line2.str}
+${result}`;
   }
-  line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
-  result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
-  result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
-  for (i = 1; i <= options.linesAfter; i++) {
+  const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
+  result += `${" ".repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}
+`;
+  result += `${"-".repeat(opts.indent + lineNoLength + 3 + line.pos)}^
+`;
+  for (let i = 1; i <= opts.linesAfter; i++) {
     if (foundLineNo + i >= lineEnds.length) break;
-    line = getLine(
-      mark.buffer,
-      lineStarts[foundLineNo + i],
-      lineEnds[foundLineNo + i],
-      mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
-      maxLineLength
-    );
-    result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n";
+    const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
+    result += `${" ".repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line2.str}
+`;
   }
   return result.replace(/\n$/, "");
 }
-var snippet = makeSnippet;
-var TYPE_CONSTRUCTOR_OPTIONS = [
-  "kind",
-  "multi",
-  "resolve",
-  "construct",
-  "instanceOf",
-  "predicate",
-  "represent",
-  "representName",
-  "defaultStyle",
-  "styleAliases"
-];
-var YAML_NODE_KINDS = [
-  "scalar",
-  "sequence",
-  "mapping"
-];
-function compileStyleAliases(map2) {
-  var result = {};
-  if (map2 !== null) {
-    Object.keys(map2).forEach(function(style) {
-      map2[style].forEach(function(alias) {
-        result[String(alias)] = style;
-      });
-    });
-  }
-  return result;
+function formatError(exception, compact) {
+  let where = "";
+  if (!exception.mark) return exception.reason;
+  if (exception.mark.name) where += `in "${exception.mark.name}" `;
+  where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`;
+  if (!compact && exception.mark.snippet) where += `
+
+${exception.mark.snippet}`;
+  return `${exception.reason} ${where}`;
 }
-function Type$1(tag, options) {
-  options = options || {};
-  Object.keys(options).forEach(function(name) {
-    if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
-      throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
-    }
-  });
-  this.options = options;
-  this.tag = tag;
-  this.kind = options["kind"] || null;
-  this.resolve = options["resolve"] || function() {
-    return true;
+var YAMLException = class extends Error {
+  reason;
+  mark;
+  constructor(reason, mark) {
+    super();
+    this.name = "YAMLException";
+    this.reason = reason;
+    this.mark = mark;
+    this.message = formatError(this, false);
+    if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
+  }
+  toString(compact) {
+    return `${this.name}: ${formatError(this, compact)}`;
+  }
+};
+function throwErrorAt(source, position, message, filename = "") {
+  let line = 0;
+  let lineStart = 0;
+  for (let index2 = 0; index2 < position; index2++) {
+    const ch = source.charCodeAt(index2);
+    if (ch === 10) {
+      line++;
+      lineStart = index2 + 1;
+    } else if (ch === 13) {
+      line++;
+      if (source.charCodeAt(index2 + 1) === 10) index2++;
+      lineStart = index2 + 1;
+    }
+  }
+  const mark = {
+    name: filename,
+    buffer: source,
+    position,
+    line,
+    column: position - lineStart
   };
-  this.construct = options["construct"] || function(data) {
-    return data;
+  mark.snippet = makeSnippet(mark);
+  throw new YAMLException(message, mark);
+}
+var NO_RANGE$3 = -1;
+function simpleEscapeSequence(c) {
+  switch (c) {
+    case 48:
+      return "\0";
+    case 97:
+      return "\x07";
+    case 98:
+      return "\b";
+    case 116:
+      return "	";
+    case 9:
+      return "	";
+    case 110:
+      return "\n";
+    case 118:
+      return "\v";
+    case 102:
+      return "\f";
+    case 114:
+      return "\r";
+    case 101:
+      return "\x1B";
+    case 32:
+      return " ";
+    case 34:
+      return '"';
+    case 47:
+      return "/";
+    case 92:
+      return "\\";
+    case 78:
+      return "\x85";
+    case 95:
+      return "\xA0";
+    case 76:
+      return "\u2028";
+    case 80:
+      return "\u2029";
+    default:
+      return "";
+  }
+}
+var simpleEscapeCheck = new Array(256);
+var simpleEscapeMap = new Array(256);
+for (let i = 0; i < 256; i++) {
+  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
+  simpleEscapeMap[i] = simpleEscapeSequence(i);
+}
+function charFromCodepoint(c) {
+  if (c <= 65535) return String.fromCharCode(c);
+  return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
+}
+function fromHexCode$1(c) {
+  if (c >= 48 && c <= 57) return c - 48;
+  return (c | 32) - 97 + 10;
+}
+function escapedHexLen$1(c) {
+  if (c === 120) return 2;
+  if (c === 117) return 4;
+  return 8;
+}
+function skipFoldedBreaks(input, position, end) {
+  let breaks = 0;
+  while (position < end) {
+    const ch = input.charCodeAt(position);
+    if (ch === 10) {
+      breaks++;
+      position++;
+    } else if (ch === 13) {
+      breaks++;
+      position++;
+      if (input.charCodeAt(position) === 10) position++;
+    } else if (ch === 32 || ch === 9) position++;
+    else break;
+  }
+  return {
+    position,
+    breaks
   };
-  this.instanceOf = options["instanceOf"] || null;
-  this.predicate = options["predicate"] || null;
-  this.represent = options["represent"] || null;
-  this.representName = options["representName"] || null;
-  this.defaultStyle = options["defaultStyle"] || null;
-  this.multi = options["multi"] || false;
-  this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
-  if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
-    throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
-  }
-}
-var type = Type$1;
-function compileList(schema2, name) {
-  var result = [];
-  schema2[name].forEach(function(currentType) {
-    var newIndex = result.length;
-    result.forEach(function(previousType, previousIndex) {
-      if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
-        newIndex = previousIndex;
-      }
-    });
-    result[newIndex] = currentType;
-  });
-  return result;
 }
-function compileMap() {
-  var result = {
-    scalar: {},
-    sequence: {},
-    mapping: {},
-    fallback: {},
-    multi: {
-      scalar: [],
-      sequence: [],
-      mapping: [],
-      fallback: []
-    }
-  }, index, length;
-  function collectType(type2) {
-    if (type2.multi) {
-      result.multi[type2.kind].push(type2);
-      result.multi["fallback"].push(type2);
+function foldedBreaks(count) {
+  if (count === 1) return " ";
+  return "\n".repeat(count - 1);
+}
+function getPlainValue(input, start, end) {
+  let result = "";
+  let position = start;
+  let captureStart = start;
+  let captureEnd = start;
+  while (position < end) {
+    const ch = input.charCodeAt(position);
+    if (ch === 10 || ch === 13) {
+      result += input.slice(captureStart, captureEnd);
+      const fold = skipFoldedBreaks(input, position, end);
+      result += foldedBreaks(fold.breaks);
+      position = captureStart = captureEnd = fold.position;
     } else {
-      result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2;
+      position++;
+      if (ch !== 32 && ch !== 9) captureEnd = position;
     }
   }
-  for (index = 0, length = arguments.length; index < length; index += 1) {
-    arguments[index].forEach(collectType);
-  }
-  return result;
+  return result + input.slice(captureStart, captureEnd);
 }
-function Schema$1(definition) {
-  return this.extend(definition);
-}
-Schema$1.prototype.extend = function extend2(definition) {
-  var implicit = [];
-  var explicit = [];
-  if (definition instanceof type) {
-    explicit.push(definition);
-  } else if (Array.isArray(definition)) {
-    explicit = explicit.concat(definition);
-  } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
-    if (definition.implicit) implicit = implicit.concat(definition.implicit);
-    if (definition.explicit) explicit = explicit.concat(definition.explicit);
-  } else {
-    throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
-  }
-  implicit.forEach(function(type$1) {
-    if (!(type$1 instanceof type)) {
-      throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
-    }
-    if (type$1.loadKind && type$1.loadKind !== "scalar") {
-      throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
-    }
-    if (type$1.multi) {
-      throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
-    }
-  });
-  explicit.forEach(function(type$1) {
-    if (!(type$1 instanceof type)) {
-      throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
+function getSingleQuotedValue(input, start, end) {
+  let result = "";
+  let position = start;
+  let captureStart = start;
+  let captureEnd = start;
+  while (position < end) {
+    const ch = input.charCodeAt(position);
+    if (ch === 39) {
+      result += input.slice(captureStart, position) + "'";
+      position += 2;
+      captureStart = captureEnd = position;
+    } else if (ch === 10 || ch === 13) {
+      result += input.slice(captureStart, captureEnd);
+      const fold = skipFoldedBreaks(input, position, end);
+      result += foldedBreaks(fold.breaks);
+      position = captureStart = captureEnd = fold.position;
+    } else {
+      position++;
+      if (ch !== 32 && ch !== 9) captureEnd = position;
+    }
+  }
+  return result + input.slice(captureStart, end);
+}
+function getDoubleQuotedValue(input, start, end) {
+  let result = "";
+  let position = start;
+  let captureStart = start;
+  let captureEnd = start;
+  while (position < end) {
+    const ch = input.charCodeAt(position);
+    if (ch === 92) {
+      result += input.slice(captureStart, position);
+      position++;
+      const escaped = input.charCodeAt(position);
+      if (escaped === 10 || escaped === 13) position = skipFoldedBreaks(input, position, end).position;
+      else if (escaped < 256 && simpleEscapeCheck[escaped]) {
+        result += simpleEscapeMap[escaped];
+        position++;
+      } else {
+        let hexLength = escapedHexLen$1(escaped);
+        let hexResult = 0;
+        for (; hexLength > 0; hexLength--) {
+          position++;
+          const digit = fromHexCode$1(input.charCodeAt(position));
+          hexResult = (hexResult << 4) + digit;
+        }
+        result += charFromCodepoint(hexResult);
+        position++;
+      }
+      captureStart = captureEnd = position;
+    } else if (ch === 10 || ch === 13) {
+      result += input.slice(captureStart, captureEnd);
+      const fold = skipFoldedBreaks(input, position, end);
+      result += foldedBreaks(fold.breaks);
+      position = captureStart = captureEnd = fold.position;
+    } else {
+      position++;
+      if (ch !== 32 && ch !== 9) captureEnd = position;
+    }
+  }
+  return result + input.slice(captureStart, end);
+}
+function getBlockValue(input, start, end, indent, chomping, folded) {
+  const textIndent = indent < 0 ? 0 : indent;
+  const region = input.slice(start, end).replace(/\r\n?/g, "\n");
+  const lines = region === "" ? [] : (region.endsWith("\n") ? region.slice(0, -1) : region).split("\n");
+  let result = "";
+  let didReadContent = false;
+  let emptyLines = 0;
+  let atMoreIndented = false;
+  for (const line of lines) {
+    let column = 0;
+    while (column < textIndent && line.charCodeAt(column) === 32) column++;
+    if (indent < 0 || column >= line.length) {
+      emptyLines++;
+      continue;
     }
-  });
-  var result = Object.create(Schema$1.prototype);
-  result.implicit = (this.implicit || []).concat(implicit);
-  result.explicit = (this.explicit || []).concat(explicit);
-  result.compiledImplicit = compileList(result, "implicit");
-  result.compiledExplicit = compileList(result, "explicit");
-  result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
-  return result;
-};
-var schema = Schema$1;
-var str = new type("tag:yaml.org,2002:str", {
-  kind: "scalar",
-  construct: function(data) {
-    return data !== null ? data : "";
-  }
-});
-var seq = new type("tag:yaml.org,2002:seq", {
-  kind: "sequence",
-  construct: function(data) {
-    return data !== null ? data : [];
+    const content = line.slice(textIndent);
+    const first = content.charCodeAt(0);
+    if (folded) if (first === 32 || first === 9) {
+      atMoreIndented = true;
+      result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
+    } else if (atMoreIndented) {
+      atMoreIndented = false;
+      result += "\n".repeat(emptyLines + 1);
+    } else if (emptyLines === 0) {
+      if (didReadContent) result += " ";
+    } else result += "\n".repeat(emptyLines);
+    else result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
+    result += content;
+    didReadContent = true;
+    emptyLines = 0;
   }
-});
-var map = new type("tag:yaml.org,2002:map", {
-  kind: "mapping",
-  construct: function(data) {
-    return data !== null ? data : {};
+  if (chomping === 3) result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
+  else if (chomping !== 2) {
+    if (didReadContent) result += "\n";
   }
-});
-var failsafe = new schema({
-  explicit: [
-    str,
-    seq,
-    map
-  ]
-});
-function resolveYamlNull(data) {
-  if (data === null) return true;
-  var max = data.length;
-  return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
+  return result;
 }
-function constructYamlNull() {
-  return null;
+function getScalarValue(input, scalar) {
+  if (scalar.valueStart === NO_RANGE$3) return "";
+  const { valueStart, valueEnd } = scalar;
+  if (scalar.fast) return input.slice(valueStart, valueEnd);
+  switch (scalar.style) {
+    case 2:
+      return getSingleQuotedValue(input, valueStart, valueEnd);
+    case 3:
+      return getDoubleQuotedValue(input, valueStart, valueEnd);
+    case 4:
+      return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false);
+    case 5:
+      return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true);
+    default:
+      return getPlainValue(input, valueStart, valueEnd);
+  }
+}
+var DEFAULT_TAG_HANDLERS = Object.assign(/* @__PURE__ */ Object.create(null), {
+  "!": "!",
+  "!!": "tag:yaml.org,2002:"
+});
+function tagPercentEncode(source) {
+  return encodeURI(source).replace(/!/g, "%21");
+}
+function tagNameFull(rawTag, tagHandlers) {
+  if (rawTag.startsWith("!<") && rawTag.endsWith(">")) return decodeURIComponent(rawTag.slice(2, -1));
+  const handleEnd = rawTag.indexOf("!", 1);
+  const handle = handleEnd === -1 ? "!" : rawTag.slice(0, handleEnd + 1);
+  const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle;
+  return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length));
+}
+function tagNameShort(fullTag) {
+  let tag = fullTag;
+  if (tag.charCodeAt(0) === 33) {
+    tag = tag.slice(1);
+    return `!${tagPercentEncode(tag)}`;
+  }
+  if (tag.slice(0, 18) === "tag:yaml.org,2002:") return `!!${tagPercentEncode(tag.slice(18))}`;
+  return `!<${tagPercentEncode(tag)}>`;
+}
+var NO_RANGE$2 = -1;
+var DEFAULT_CONSTRUCTOR_OPTIONS = {
+  filename: "",
+  schema: CORE_SCHEMA,
+  json: false,
+  maxTotalMergeKeys: 1e4,
+  maxAliases: -1
+};
+function eventPosition$1(event) {
+  if ("tagStart" in event && event.tagStart !== NO_RANGE$2) return event.tagStart;
+  if ("anchorStart" in event && event.anchorStart !== NO_RANGE$2) return event.anchorStart;
+  if ("valueStart" in event && event.valueStart !== NO_RANGE$2) return event.valueStart;
+  if ("start" in event) return event.start;
+  return 0;
 }
-function isNull(object) {
-  return object === null;
-}
-var _null = new type("tag:yaml.org,2002:null", {
-  kind: "scalar",
-  resolve: resolveYamlNull,
-  construct: constructYamlNull,
-  predicate: isNull,
-  represent: {
-    canonical: function() {
-      return "~";
-    },
-    lowercase: function() {
-      return "null";
-    },
-    uppercase: function() {
-      return "NULL";
-    },
-    camelcase: function() {
-      return "Null";
-    },
-    empty: function() {
-      return "";
-    }
-  },
-  defaultStyle: "lowercase"
-});
-function resolveYamlBoolean(data) {
-  if (data === null) return false;
-  var max = data.length;
-  return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
-}
-function constructYamlBoolean(data) {
-  return data === "true" || data === "True" || data === "TRUE";
-}
-function isBoolean(object) {
-  return Object.prototype.toString.call(object) === "[object Boolean]";
-}
-var bool = new type("tag:yaml.org,2002:bool", {
-  kind: "scalar",
-  resolve: resolveYamlBoolean,
-  construct: constructYamlBoolean,
-  predicate: isBoolean,
-  represent: {
-    lowercase: function(object) {
-      return object ? "true" : "false";
-    },
-    uppercase: function(object) {
-      return object ? "TRUE" : "FALSE";
-    },
-    camelcase: function(object) {
-      return object ? "True" : "False";
+function throwError$1(state, message) {
+  throwErrorAt(state.source, state.position, message, state.filename);
+}
+function finalizeCollection(state, position, tag, carrier) {
+  try {
+    return tag.finalize(carrier);
+  } catch (error3) {
+    if (error3 instanceof YAMLException) throw error3;
+    throwErrorAt(state.source, position, error3 instanceof Error ? error3.message : String(error3), state.filename);
+  }
+}
+function lookupTag(exact, prefix, tagName) {
+  const exactTag = exact[tagName];
+  if (exactTag) return exactTag;
+  for (const tag of prefix) if (tagName.startsWith(tag.tagName)) return tag;
+}
+function findExplicitTag(state, exact, prefix, tagName, nodeKind) {
+  const tag = lookupTag(exact, prefix, tagName);
+  if (tag) return tag;
+  throwError$1(state, `unknown ${nodeKind} tag !<${tagName}>`);
+}
+function constructScalar(state, event) {
+  const source = getScalarValue(state.source, event);
+  const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd);
+  const strTag2 = state.schema.defaultScalarTag;
+  if (rawTag !== "") {
+    if (rawTag === "!") return {
+      value: source,
+      tag: strTag2
+    };
+    const tagName = tagNameFull(rawTag, state.tagHandlers);
+    const scalarTag = lookupTag(state.schema.exact.scalar, state.schema.prefix.scalar, tagName);
+    if (scalarTag) {
+      const result = scalarTag.resolve(source, true, tagName);
+      if (result === NOT_RESOLVED) throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`);
+      return {
+        value: result,
+        tag: scalarTag
+      };
     }
-  },
-  defaultStyle: "lowercase"
-});
-function isHexCode(c) {
-  return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
-}
-function isOctCode(c) {
-  return 48 <= c && c <= 55;
-}
-function isDecCode(c) {
-  return 48 <= c && c <= 57;
-}
-function resolveYamlInteger(data) {
-  if (data === null) return false;
-  var max = data.length, index = 0, hasDigits = false, ch;
-  if (!max) return false;
-  ch = data[index];
-  if (ch === "-" || ch === "+") {
-    ch = data[++index];
-  }
-  if (ch === "0") {
-    if (index + 1 === max) return true;
-    ch = data[++index];
-    if (ch === "b") {
-      index++;
-      for (; index < max; index++) {
-        ch = data[index];
-        if (ch === "_") continue;
-        if (ch !== "0" && ch !== "1") return false;
-        hasDigits = true;
-      }
-      return hasDigits && ch !== "_";
-    }
-    if (ch === "x") {
-      index++;
-      for (; index < max; index++) {
-        ch = data[index];
-        if (ch === "_") continue;
-        if (!isHexCode(data.charCodeAt(index))) return false;
-        hasDigits = true;
-      }
-      return hasDigits && ch !== "_";
-    }
-    if (ch === "o") {
-      index++;
-      for (; index < max; index++) {
-        ch = data[index];
-        if (ch === "_") continue;
-        if (!isOctCode(data.charCodeAt(index))) return false;
-        hasDigits = true;
-      }
-      return hasDigits && ch !== "_";
-    }
-  }
-  if (ch === "_") return false;
-  for (; index < max; index++) {
-    ch = data[index];
-    if (ch === "_") continue;
-    if (!isDecCode(data.charCodeAt(index))) {
-      return false;
+    const collectionTagDef = lookupTag(state.schema.exact.mapping, state.schema.prefix.mapping, tagName) ?? lookupTag(state.schema.exact.sequence, state.schema.prefix.sequence, tagName);
+    if (collectionTagDef) {
+      if (source !== "") throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`);
+      const carrier = collectionTagDef.create(tagName);
+      return {
+        value: collectionTagDef.carrierIsResult ? carrier : finalizeCollection(state, state.position, collectionTagDef, carrier),
+        tag: collectionTagDef
+      };
     }
-    hasDigits = true;
+    throwError$1(state, `unknown scalar tag !<${tagName}>`);
   }
-  if (!hasDigits || ch === "_") return false;
-  return true;
-}
-function constructYamlInteger(data) {
-  var value = data, sign = 1, ch;
-  if (value.indexOf("_") !== -1) {
-    value = value.replace(/_/g, "");
-  }
-  ch = value[0];
-  if (ch === "-" || ch === "+") {
-    if (ch === "-") sign = -1;
-    value = value.slice(1);
-    ch = value[0];
-  }
-  if (value === "0") return 0;
-  if (ch === "0") {
-    if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
-    if (value[1] === "x") return sign * parseInt(value.slice(2), 16);
-    if (value[1] === "o") return sign * parseInt(value.slice(2), 8);
-  }
-  return sign * parseInt(value, 10);
-}
-function isInteger(object) {
-  return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
-}
-var int = new type("tag:yaml.org,2002:int", {
-  kind: "scalar",
-  resolve: resolveYamlInteger,
-  construct: constructYamlInteger,
-  predicate: isInteger,
-  represent: {
-    binary: function(obj) {
-      return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
-    },
-    octal: function(obj) {
-      return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
-    },
-    decimal: function(obj) {
-      return obj.toString(10);
-    },
-    /* eslint-disable max-len */
-    hexadecimal: function(obj) {
-      return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
+  if (event.style === 1) {
+    const candidates = state.schema.implicitScalarByFirstChar.get(source.charAt(0)) ?? state.schema.implicitScalarAnyFirstChar;
+    for (const tag of candidates) {
+      const result = tag.resolve(source, false, tag.tagName);
+      if (result !== NOT_RESOLVED) return {
+        value: result,
+        tag
+      };
     }
-  },
-  defaultStyle: "decimal",
-  styleAliases: {
-    binary: [2, "bin"],
-    octal: [8, "oct"],
-    decimal: [10, "dec"],
-    hexadecimal: [16, "hex"]
-  }
-});
-var YAML_FLOAT_PATTERN = new RegExp(
-  // 2.5e4, 2.5 and integers
-  "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
-);
-function resolveYamlFloat(data) {
-  if (data === null) return false;
-  if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
-  // Probably should update regexp & check speed
-  data[data.length - 1] === "_") {
-    return false;
-  }
-  return true;
-}
-function constructYamlFloat(data) {
-  var value, sign;
-  value = data.replace(/_/g, "").toLowerCase();
-  sign = value[0] === "-" ? -1 : 1;
-  if ("+-".indexOf(value[0]) >= 0) {
-    value = value.slice(1);
   }
-  if (value === ".inf") {
-    return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
-  } else if (value === ".nan") {
-    return NaN;
-  }
-  return sign * parseFloat(value, 10);
-}
-var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
-function representYamlFloat(object, style) {
-  var res;
-  if (isNaN(object)) {
-    switch (style) {
-      case "lowercase":
-        return ".nan";
-      case "uppercase":
-        return ".NAN";
-      case "camelcase":
-        return ".NaN";
-    }
-  } else if (Number.POSITIVE_INFINITY === object) {
-    switch (style) {
-      case "lowercase":
-        return ".inf";
-      case "uppercase":
-        return ".INF";
-      case "camelcase":
-        return ".Inf";
-    }
-  } else if (Number.NEGATIVE_INFINITY === object) {
-    switch (style) {
-      case "lowercase":
-        return "-.inf";
-      case "uppercase":
-        return "-.INF";
-      case "camelcase":
-        return "-.Inf";
-    }
-  } else if (common.isNegativeZero(object)) {
-    return "-0.0";
-  }
-  res = object.toString(10);
-  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
-}
-function isFloat(object) {
-  return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
-}
-var float = new type("tag:yaml.org,2002:float", {
-  kind: "scalar",
-  resolve: resolveYamlFloat,
-  construct: constructYamlFloat,
-  predicate: isFloat,
-  represent: representYamlFloat,
-  defaultStyle: "lowercase"
-});
-var json = failsafe.extend({
-  implicit: [
-    _null,
-    bool,
-    int,
-    float
-  ]
-});
-var core2 = json;
-var YAML_DATE_REGEXP = new RegExp(
-  "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
-);
-var YAML_TIMESTAMP_REGEXP = new RegExp(
-  "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
-);
-function resolveYamlTimestamp(data) {
-  if (data === null) return false;
-  if (YAML_DATE_REGEXP.exec(data) !== null) return true;
-  if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
-  return false;
+  return {
+    value: strTag2.resolve(source, false, strTag2.tagName),
+    tag: strTag2
+  };
 }
-function constructYamlTimestamp(data) {
-  var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
-  match = YAML_DATE_REGEXP.exec(data);
-  if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
-  if (match === null) throw new Error("Date resolve error");
-  year = +match[1];
-  month = +match[2] - 1;
-  day = +match[3];
-  if (!match[4]) {
-    return new Date(Date.UTC(year, month, day));
-  }
-  hour = +match[4];
-  minute = +match[5];
-  second = +match[6];
-  if (match[7]) {
-    fraction = match[7].slice(0, 3);
-    while (fraction.length < 3) {
-      fraction += "0";
-    }
-    fraction = +fraction;
-  }
-  if (match[9]) {
-    tz_hour = +match[10];
-    tz_minute = +(match[11] || 0);
-    delta = (tz_hour * 60 + tz_minute) * 6e4;
-    if (match[9] === "-") delta = -delta;
-  }
-  date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
-  if (delta) date.setTime(date.getTime() - delta);
-  return date;
+function collectionTag(state, event, exact, prefix, defaultTagName, nodeKind) {
+  const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd);
+  const tagName = rawTag === "" || rawTag === "!" ? defaultTagName : tagNameFull(rawTag, state.tagHandlers);
+  return {
+    tagName,
+    tag: findExplicitTag(state, exact, prefix, tagName, nodeKind)
+  };
 }
-function representYamlTimestamp(object) {
-  return object.toISOString();
+function isMappingTag(tag) {
+  return tag.nodeKind === "mapping";
 }
-var timestamp = new type("tag:yaml.org,2002:timestamp", {
-  kind: "scalar",
-  resolve: resolveYamlTimestamp,
-  construct: constructYamlTimestamp,
-  instanceOf: Date,
-  represent: representYamlTimestamp
-});
-function resolveYamlMerge(data) {
-  return data === "<<" || data === null;
-}
-var merge2 = new type("tag:yaml.org,2002:merge", {
-  kind: "scalar",
-  resolve: resolveYamlMerge
-});
-var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
-function resolveYamlBinary(data) {
-  if (data === null) return false;
-  var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP;
-  for (idx = 0; idx < max; idx++) {
-    code = map2.indexOf(data.charAt(idx));
-    if (code > 64) continue;
-    if (code < 0) return false;
-    bitlen += 6;
-  }
-  return bitlen % 8 === 0;
-}
-function constructYamlBinary(data) {
-  var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = [];
-  for (idx = 0; idx < max; idx++) {
-    if (idx % 4 === 0 && idx) {
-      result.push(bits >> 16 & 255);
-      result.push(bits >> 8 & 255);
-      result.push(bits & 255);
-    }
-    bits = bits << 6 | map2.indexOf(input.charAt(idx));
-  }
-  tailbits = max % 4 * 6;
-  if (tailbits === 0) {
-    result.push(bits >> 16 & 255);
-    result.push(bits >> 8 & 255);
-    result.push(bits & 255);
-  } else if (tailbits === 18) {
-    result.push(bits >> 10 & 255);
-    result.push(bits >> 2 & 255);
-  } else if (tailbits === 12) {
-    result.push(bits >> 4 & 255);
-  }
-  return new Uint8Array(result);
-}
-function representYamlBinary(object) {
-  var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP;
-  for (idx = 0; idx < max; idx++) {
-    if (idx % 3 === 0 && idx) {
-      result += map2[bits >> 18 & 63];
-      result += map2[bits >> 12 & 63];
-      result += map2[bits >> 6 & 63];
-      result += map2[bits & 63];
-    }
-    bits = (bits << 8) + object[idx];
-  }
-  tail = max % 3;
-  if (tail === 0) {
-    result += map2[bits >> 18 & 63];
-    result += map2[bits >> 12 & 63];
-    result += map2[bits >> 6 & 63];
-    result += map2[bits & 63];
-  } else if (tail === 2) {
-    result += map2[bits >> 10 & 63];
-    result += map2[bits >> 4 & 63];
-    result += map2[bits << 2 & 63];
-    result += map2[64];
-  } else if (tail === 1) {
-    result += map2[bits >> 2 & 63];
-    result += map2[bits << 4 & 63];
-    result += map2[64];
-    result += map2[64];
+function mergeKeys(state, frame, source, sourceTag) {
+  for (const sourceKey of sourceTag.keys(source)) {
+    if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`);
+    if (frame.tag.has(frame.value, sourceKey)) continue;
+    const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey));
+    if (err) throwError$1(state, err);
+    (frame.overridable ??= /* @__PURE__ */ new Set()).add(sourceKey);
   }
-  return result;
 }
-function isBinary(obj) {
-  return Object.prototype.toString.call(obj) === "[object Uint8Array]";
+function mergeSource(state, frame, source, sourceTag) {
+  state.position = frame.keyPosition;
+  if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag);
+  else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) for (const element of source) mergeKeys(state, frame, element, frame.tag);
+  else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
 }
-var binary = new type("tag:yaml.org,2002:binary", {
-  kind: "scalar",
-  resolve: resolveYamlBinary,
-  construct: constructYamlBinary,
-  predicate: isBinary,
-  represent: representYamlBinary
-});
-var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
-var _toString$2 = Object.prototype.toString;
-function resolveYamlOmap(data) {
-  if (data === null) return true;
-  var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
-  for (index = 0, length = object.length; index < length; index += 1) {
-    pair = object[index];
-    pairHasKey = false;
-    if (_toString$2.call(pair) !== "[object Object]") return false;
-    for (pairKey in pair) {
-      if (_hasOwnProperty$3.call(pair, pairKey)) {
-        if (!pairHasKey) pairHasKey = true;
-        else return false;
-      }
-    }
-    if (!pairHasKey) return false;
-    if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
-    else return false;
+function addMappingValue(state, frame, key, value, tag) {
+  state.position = frame.keyPosition;
+  if (key === MERGE_KEY) {
+    mergeSource(state, frame, value, tag);
+    return;
   }
-  return true;
-}
-function constructYamlOmap(data) {
-  return data !== null ? data : [];
-}
-var omap = new type("tag:yaml.org,2002:omap", {
-  kind: "sequence",
-  resolve: resolveYamlOmap,
-  construct: constructYamlOmap
-});
-var _toString$1 = Object.prototype.toString;
-function resolveYamlPairs(data) {
-  if (data === null) return true;
-  var index, length, pair, keys, result, object = data;
-  result = new Array(object.length);
-  for (index = 0, length = object.length; index < length; index += 1) {
-    pair = object[index];
-    if (_toString$1.call(pair) !== "[object Object]") return false;
-    keys = Object.keys(pair);
-    if (keys.length !== 1) return false;
-    result[index] = [keys[0], pair[keys[0]]];
+  if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) throwError$1(state, "duplicated mapping key");
+  const err = frame.tag.addPair(frame.value, key, value);
+  if (err) throwError$1(state, err);
+  frame.overridable?.delete(key);
+}
+function addValue(state, value, tag) {
+  const frame = state.frames[state.frames.length - 1];
+  if (frame.kind === "document") {
+    frame.value = value;
+    frame.hasValue = true;
+  } else if (frame.kind === "sequence") {
+    if (frame.merge) {
+      if (!isMappingTag(tag)) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
+    }
+    const err = frame.tag.addItem(frame.value, value, frame.index++);
+    if (err) throwError$1(state, err);
+  } else if (frame.hasKey) {
+    const key = frame.key;
+    frame.key = void 0;
+    frame.hasKey = false;
+    addMappingValue(state, frame, key, value, tag);
+  } else {
+    frame.key = value;
+    frame.keyPosition = state.position;
+    frame.hasKey = true;
   }
-  return true;
 }
-function constructYamlPairs(data) {
-  if (data === null) return [];
-  var index, length, pair, keys, result, object = data;
-  result = new Array(object.length);
-  for (index = 0, length = object.length; index < length; index += 1) {
-    pair = object[index];
-    keys = Object.keys(pair);
-    result[index] = [keys[0], pair[keys[0]]];
+function storeAnchor(state, event, value, tag, isValueFinal) {
+  if (event.anchorStart !== NO_RANGE$2) {
+    const anchor = {
+      value,
+      tag,
+      isValueFinal
+    };
+    state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor);
+    return anchor;
   }
-  return result;
+  return null;
 }
-var pairs = new type("tag:yaml.org,2002:pairs", {
-  kind: "sequence",
-  resolve: resolveYamlPairs,
-  construct: constructYamlPairs
-});
-var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-function resolveYamlSet(data) {
-  if (data === null) return true;
-  var key, object = data;
-  for (key in object) {
-    if (_hasOwnProperty$2.call(object, key)) {
-      if (object[key] !== null) return false;
+function constructFromEvents(events, options) {
+  const state = {
+    ...DEFAULT_CONSTRUCTOR_OPTIONS,
+    ...options,
+    events,
+    documents: [],
+    eventIndex: 0,
+    position: 0,
+    frames: [],
+    anchors: /* @__PURE__ */ new Map(),
+    tagHandlers: /* @__PURE__ */ Object.create(null),
+    totalMergeKeys: 0,
+    aliasCount: 0
+  };
+  while (state.eventIndex < state.events.length) {
+    const event = state.events[state.eventIndex++];
+    state.position = eventPosition$1(event);
+    switch (event.type) {
+      case 1:
+        state.anchors = /* @__PURE__ */ new Map();
+        state.aliasCount = 0;
+        state.tagHandlers = /* @__PURE__ */ Object.create(null);
+        for (const directive of event.directives) if (directive.kind === "tag") state.tagHandlers[directive.handle] = directive.prefix;
+        state.frames.push({
+          kind: "document",
+          position: state.position,
+          value: void 0,
+          hasValue: false
+        });
+        break;
+      case 4: {
+        const { value, tag } = constructScalar(state, event);
+        storeAnchor(state, event, value, tag, true);
+        addValue(state, value, tag);
+        break;
+      }
+      case 2: {
+        const definition = collectionTag(state, event, state.schema.exact.sequence, state.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence");
+        const value = definition.tag.create(definition.tagName);
+        const anchor = storeAnchor(state, event, value, definition.tag, definition.tag.carrierIsResult);
+        const parent = state.frames[state.frames.length - 1];
+        const merge2 = parent !== void 0 && parent.kind === "mapping" && parent.hasKey && parent.key === MERGE_KEY;
+        state.frames.push({
+          kind: "sequence",
+          position: state.position,
+          value,
+          tag: definition.tag,
+          anchor,
+          index: 0,
+          merge: merge2
+        });
+        break;
+      }
+      case 3: {
+        const definition = collectionTag(state, event, state.schema.exact.mapping, state.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping");
+        const value = definition.tag.create(definition.tagName);
+        const anchor = storeAnchor(state, event, value, definition.tag, definition.tag.carrierIsResult);
+        state.frames.push({
+          kind: "mapping",
+          position: state.position,
+          value,
+          tag: definition.tag,
+          anchor,
+          key: void 0,
+          keyPosition: state.position,
+          hasKey: false,
+          overridable: null
+        });
+        break;
+      }
+      case 5: {
+        if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) throwError$1(state, `aliases exceeded maxAliases (${state.maxAliases})`);
+        const name = state.source.slice(event.anchorStart, event.anchorEnd);
+        const anchor = state.anchors.get(name);
+        if (!anchor) throwError$1(state, `unidentified alias "${name}"`);
+        if (!anchor.isValueFinal) throwError$1(state, `recursive alias "${name}" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`);
+        addValue(state, anchor.value, anchor.tag);
+        break;
+      }
+      case 6: {
+        const frame = state.frames.pop();
+        if (frame.kind === "mapping" && frame.hasKey) {
+          state.position = frame.keyPosition;
+          throwError$1(state, "incomplete mapping pair in event stream");
+        }
+        if (frame.kind === "document") state.documents.push(frame.value);
+        else {
+          const value = frame.tag.carrierIsResult ? frame.value : finalizeCollection(state, frame.position, frame.tag, frame.value);
+          if (frame.anchor) {
+            frame.anchor.value = value;
+            frame.anchor.isValueFinal = true;
+          }
+          addValue(state, value, frame.tag);
+        }
+        break;
+      }
     }
   }
-  return true;
-}
-function constructYamlSet(data) {
-  return data !== null ? data : {};
+  return state.documents;
 }
-var set = new type("tag:yaml.org,2002:set", {
-  kind: "mapping",
-  resolve: resolveYamlSet,
-  construct: constructYamlSet
-});
-var _default = core2.extend({
-  implicit: [
-    timestamp,
-    merge2
-  ],
-  explicit: [
-    binary,
-    omap,
-    pairs,
-    set
-  ]
-});
-var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
+var NO_RANGE$1 = -1;
+var HAS_OWN = Object.prototype.hasOwnProperty;
 var CONTEXT_FLOW_IN = 1;
 var CONTEXT_FLOW_OUT = 2;
 var CONTEXT_BLOCK_IN = 3;
 var CONTEXT_BLOCK_OUT = 4;
-var CHOMPING_CLIP = 1;
-var CHOMPING_STRIP = 2;
-var CHOMPING_KEEP = 3;
 var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
-var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
-var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
-var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
-var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
-function _class(obj) {
-  return Object.prototype.toString.call(obj);
-}
-function is_EOL(c) {
-  return c === 10 || c === 13;
-}
-function is_WHITE_SPACE(c) {
-  return c === 9 || c === 32;
-}
-function is_WS_OR_EOL(c) {
-  return c === 9 || c === 32 || c === 10 || c === 13;
+var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
+var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
+var NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`;
+var NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`;
+var PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`);
+var PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`);
+var PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`);
+var DEFAULT_PARSER_OPTIONS = {
+  filename: "",
+  maxDepth: 100
+};
+function addDocumentEvent(state, explicitStart, explicitEnd) {
+  state.events.push({
+    type: 1,
+    explicitStart,
+    explicitEnd,
+    directives: state.directives
+  });
 }
-function is_FLOW_INDICATOR(c) {
-  return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
+function addSequenceEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) {
+  state.events.push({
+    type: 2,
+    start,
+    anchorStart,
+    anchorEnd,
+    tagStart,
+    tagEnd,
+    style
+  });
 }
-function fromHexCode(c) {
-  var lc;
-  if (48 <= c && c <= 57) {
-    return c - 48;
-  }
-  lc = c | 32;
-  if (97 <= lc && lc <= 102) {
-    return lc - 97 + 10;
-  }
-  return -1;
+function addMappingEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) {
+  state.events.push({
+    type: 3,
+    start,
+    anchorStart,
+    anchorEnd,
+    tagStart,
+    tagEnd,
+    style
+  });
 }
-function escapedHexLen(c) {
-  if (c === 120) {
-    return 2;
-  }
-  if (c === 117) {
-    return 4;
-  }
-  if (c === 85) {
-    return 8;
-  }
-  return 0;
+function insertFlowPairMappingEvent(state, snapshot) {
+  state.events.splice(snapshot.eventsLength, 0, {
+    type: 3,
+    start: snapshot.position,
+    anchorStart: NO_RANGE$1,
+    anchorEnd: NO_RANGE$1,
+    tagStart: NO_RANGE$1,
+    tagEnd: NO_RANGE$1,
+    style: 2
+  });
 }
-function fromDecimalCode(c) {
-  if (48 <= c && c <= 57) {
-    return c - 48;
-  }
-  return -1;
+function addScalarEvent(state, valueStart, valueEnd, anchorStart, anchorEnd, tagStart, tagEnd, style, chomping = 1, indent = -1, fast = false) {
+  state.events.push({
+    type: 4,
+    valueStart,
+    valueEnd,
+    anchorStart,
+    anchorEnd,
+    tagStart,
+    tagEnd,
+    style,
+    chomping,
+    indent,
+    fast
+  });
 }
-function simpleEscapeSequence(c) {
-  return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? "	" : c === 9 ? "	" : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
+function addAliasEvent(state, anchorStart, anchorEnd) {
+  state.events.push({
+    type: 5,
+    anchorStart,
+    anchorEnd
+  });
 }
-function charFromCodepoint(c) {
-  if (c <= 65535) {
-    return String.fromCharCode(c);
-  }
-  return String.fromCharCode(
-    (c - 65536 >> 10) + 55296,
-    (c - 65536 & 1023) + 56320
-  );
+function addPopEvent(state) {
+  state.events.push({ type: 6 });
 }
-function setProperty(object, key, value) {
-  if (key === "__proto__") {
-    Object.defineProperty(object, key, {
-      configurable: true,
-      enumerable: true,
-      writable: true,
-      value
-    });
-  } else {
-    object[key] = value;
-  }
+function addEmptyScalarEvent(state) {
+  addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, 1);
 }
-var simpleEscapeCheck = new Array(256);
-var simpleEscapeMap = new Array(256);
-for (i = 0; i < 256; i++) {
-  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
-  simpleEscapeMap[i] = simpleEscapeSequence(i);
+function emptyProperties() {
+  return {
+    anchorStart: NO_RANGE$1,
+    anchorEnd: NO_RANGE$1,
+    tagStart: NO_RANGE$1,
+    tagEnd: NO_RANGE$1
+  };
 }
-var i;
-function State$1(input, options) {
-  this.input = input;
-  this.filename = options["filename"] || null;
-  this.schema = options["schema"] || _default;
-  this.onWarning = options["onWarning"] || null;
-  this.legacy = options["legacy"] || false;
-  this.json = options["json"] || false;
-  this.listener = options["listener"] || null;
-  this.implicitTypes = this.schema.compiledImplicit;
-  this.typeMap = this.schema.compiledTypeMap;
-  this.length = input.length;
-  this.position = 0;
-  this.line = 0;
-  this.lineStart = 0;
-  this.lineIndent = 0;
-  this.firstTabInLine = -1;
-  this.documents = [];
-}
-function generateError(state, message) {
-  var mark = {
-    name: state.filename,
-    buffer: state.input.slice(0, -1),
-    // omit trailing \0
+function snapshotState(state) {
+  return {
     position: state.position,
     line: state.line,
-    column: state.position - state.lineStart
+    lineStart: state.lineStart,
+    lineIndent: state.lineIndent,
+    firstTabInLine: state.firstTabInLine,
+    eventsLength: state.events.length
   };
-  mark.snippet = snippet(mark);
-  return new exception(message, mark);
+}
+function restoreState(state, snapshot) {
+  state.position = snapshot.position;
+  state.line = snapshot.line;
+  state.lineStart = snapshot.lineStart;
+  state.lineIndent = snapshot.lineIndent;
+  state.firstTabInLine = snapshot.firstTabInLine;
+  state.events.length = snapshot.eventsLength;
 }
 function throwError(state, message) {
-  throw generateError(state, message);
+  throwErrorAt(state.input.slice(0, state.length), state.position, message, state.filename);
 }
-function throwWarning(state, message) {
-  if (state.onWarning) {
-    state.onWarning.call(null, generateError(state, message));
-  }
+function isEol(c) {
+  return c === 10 || c === 13;
 }
-var directiveHandlers = {
-  YAML: function handleYamlDirective(state, name, args) {
-    var match, major, minor;
-    if (state.version !== null) {
-      throwError(state, "duplication of %YAML directive");
-    }
-    if (args.length !== 1) {
-      throwError(state, "YAML directive accepts exactly one argument");
-    }
-    match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
-    if (match === null) {
-      throwError(state, "ill-formed argument of the YAML directive");
-    }
-    major = parseInt(match[1], 10);
-    minor = parseInt(match[2], 10);
-    if (major !== 1) {
-      throwError(state, "unacceptable YAML version of the document");
-    }
-    state.version = args[0];
-    state.checkLineBreaks = minor < 2;
-    if (minor !== 1 && minor !== 2) {
-      throwWarning(state, "unsupported YAML version of the document");
-    }
-  },
-  TAG: function handleTagDirective(state, name, args) {
-    var handle, prefix;
-    if (args.length !== 2) {
-      throwError(state, "TAG directive accepts exactly two arguments");
-    }
-    handle = args[0];
-    prefix = args[1];
-    if (!PATTERN_TAG_HANDLE.test(handle)) {
-      throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
-    }
-    if (_hasOwnProperty$1.call(state.tagMap, handle)) {
-      throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
-    }
-    if (!PATTERN_TAG_URI.test(prefix)) {
-      throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
-    }
-    try {
-      prefix = decodeURIComponent(prefix);
-    } catch (err) {
-      throwError(state, "tag prefix is malformed: " + prefix);
-    }
-    state.tagMap[handle] = prefix;
-  }
-};
-function captureSegment(state, start, end, checkJson) {
-  var _position, _length, _character, _result;
-  if (start < end) {
-    _result = state.input.slice(start, end);
-    if (checkJson) {
-      for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
-        _character = _result.charCodeAt(_position);
-        if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
-          throwError(state, "expected valid JSON character");
-        }
-      }
-    } else if (PATTERN_NON_PRINTABLE.test(_result)) {
-      throwError(state, "the stream contains non-printable characters");
-    }
-    state.result += _result;
-  }
+function isWhiteSpace(c) {
+  return c === 9 || c === 32;
 }
-function mergeMappings(state, destination, source, overridableKeys) {
-  var sourceKeys, key, index, quantity;
-  if (!common.isObject(source)) {
-    throwError(state, "cannot merge mappings; the provided source object is unacceptable");
-  }
-  sourceKeys = Object.keys(source);
-  for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
-    key = sourceKeys[index];
-    if (!_hasOwnProperty$1.call(destination, key)) {
-      setProperty(destination, key, source[key]);
-      overridableKeys[key] = true;
-    }
-  }
+function isWsOrEol(c) {
+  return isWhiteSpace(c) || isEol(c);
 }
-function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
-  var index, quantity;
-  if (Array.isArray(keyNode)) {
-    keyNode = Array.prototype.slice.call(keyNode);
-    for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
-      if (Array.isArray(keyNode[index])) {
-        throwError(state, "nested arrays are not supported inside keys");
-      }
-      if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
-        keyNode[index] = "[object Object]";
-      }
-    }
-  }
-  if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
-    keyNode = "[object Object]";
-  }
-  keyNode = String(keyNode);
-  if (_result === null) {
-    _result = {};
-  }
-  if (keyTag === "tag:yaml.org,2002:merge") {
-    if (Array.isArray(valueNode)) {
-      for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
-        mergeMappings(state, _result, valueNode[index], overridableKeys);
-      }
-    } else {
-      mergeMappings(state, _result, valueNode, overridableKeys);
-    }
-  } else {
-    if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) {
-      state.line = startLine || state.line;
-      state.lineStart = startLineStart || state.lineStart;
-      state.position = startPos || state.position;
-      throwError(state, "duplicated mapping key");
-    }
-    setProperty(_result, keyNode, valueNode);
-    delete overridableKeys[keyNode];
-  }
-  return _result;
+function isWsOrEolOrEnd(c) {
+  return c === 0 || isWsOrEol(c);
 }
-function readLineBreak(state) {
-  var ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch === 10) {
-    state.position++;
-  } else if (ch === 13) {
+function isFlowIndicator(c) {
+  return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
+}
+function fromDecimalCode(c) {
+  return c >= 48 && c <= 57 ? c - 48 : -1;
+}
+function fromHexCode(c) {
+  if (c >= 48 && c <= 57) return c - 48;
+  const lc = c | 32;
+  if (lc >= 97 && lc <= 102) return lc - 97 + 10;
+  return -1;
+}
+function escapedHexLen(c) {
+  if (c === 120) return 2;
+  if (c === 117) return 4;
+  if (c === 85) return 8;
+  return 0;
+}
+function isSimpleEscape(c) {
+  return c === 48 || c === 97 || c === 98 || c === 116 || c === 9 || c === 110 || c === 118 || c === 102 || c === 114 || c === 101 || c === 32 || c === 34 || c === 47 || c === 92 || c === 78 || c === 95 || c === 76 || c === 80;
+}
+function consumeLineBreak(state) {
+  if (state.input.charCodeAt(state.position) === 10) state.position++;
+  else {
     state.position++;
-    if (state.input.charCodeAt(state.position) === 10) {
-      state.position++;
-    }
-  } else {
-    throwError(state, "a line break is expected");
+    if (state.input.charCodeAt(state.position) === 10) state.position++;
   }
-  state.line += 1;
+  state.line++;
   state.lineStart = state.position;
+  state.lineIndent = 0;
   state.firstTabInLine = -1;
 }
-function skipSeparationSpace(state, allowComments, checkIndent) {
-  var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
+function skipSeparationSpace(state, allowComments) {
+  let lineBreaks = 0;
+  let ch = state.input.charCodeAt(state.position);
+  let hasSeparation = state.position === state.lineStart || isWsOrEol(state.input.charCodeAt(state.position - 1));
   while (ch !== 0) {
-    while (is_WHITE_SPACE(ch)) {
-      if (ch === 9 && state.firstTabInLine === -1) {
-        state.firstTabInLine = state.position;
-      }
+    while (isWhiteSpace(ch)) {
+      hasSeparation = true;
+      if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position;
       ch = state.input.charCodeAt(++state.position);
     }
-    if (allowComments && ch === 35) {
-      do {
-        ch = state.input.charCodeAt(++state.position);
-      } while (ch !== 10 && ch !== 13 && ch !== 0);
-    }
-    if (is_EOL(ch)) {
-      readLineBreak(state);
-      ch = state.input.charCodeAt(state.position);
-      lineBreaks++;
-      state.lineIndent = 0;
-      while (ch === 32) {
-        state.lineIndent++;
-        ch = state.input.charCodeAt(++state.position);
-      }
-    } else {
-      break;
+    if (allowComments && hasSeparation && ch === 35) do
+      ch = state.input.charCodeAt(++state.position);
+    while (!isEol(ch) && ch !== 0);
+    if (!isEol(ch)) break;
+    consumeLineBreak(state);
+    lineBreaks++;
+    hasSeparation = true;
+    ch = state.input.charCodeAt(state.position);
+    while (ch === 32) {
+      state.lineIndent++;
+      ch = state.input.charCodeAt(++state.position);
     }
   }
-  if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
-    throwWarning(state, "deficient indentation");
-  }
   return lineBreaks;
 }
-function testDocumentSeparator(state) {
-  var _position = state.position, ch;
-  ch = state.input.charCodeAt(_position);
-  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
-    _position += 3;
-    ch = state.input.charCodeAt(_position);
-    if (ch === 0 || is_WS_OR_EOL(ch)) {
-      return true;
-    }
+function testDocumentSeparator(state, position = state.position) {
+  const ch = state.input.charCodeAt(position);
+  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(position + 1) && ch === state.input.charCodeAt(position + 2)) {
+    const following = state.input.charCodeAt(position + 3);
+    return following === 0 || isWsOrEol(following);
   }
   return false;
 }
-function writeFoldedLines(state, count) {
-  if (count === 1) {
-    state.result += " ";
-  } else if (count > 1) {
-    state.result += common.repeat("\n", count - 1);
-  }
-}
-function readPlainScalar(state, nodeIndent, withinFlowCollection) {
-  var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
-    return false;
-  }
-  if (ch === 63 || ch === 45) {
-    following = state.input.charCodeAt(state.position + 1);
-    if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
-      return false;
-    }
-  }
-  state.kind = "scalar";
-  state.result = "";
-  captureStart = captureEnd = state.position;
-  hasPendingContent = false;
-  while (ch !== 0) {
-    if (ch === 58) {
-      following = state.input.charCodeAt(state.position + 1);
-      if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
-        break;
-      }
-    } else if (ch === 35) {
-      preceding = state.input.charCodeAt(state.position - 1);
-      if (is_WS_OR_EOL(preceding)) {
-        break;
-      }
-    } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
-      break;
-    } else if (is_EOL(ch)) {
-      _line = state.line;
-      _lineStart = state.lineStart;
-      _lineIndent = state.lineIndent;
-      skipSeparationSpace(state, false, -1);
-      if (state.lineIndent >= nodeIndent) {
-        hasPendingContent = true;
-        ch = state.input.charCodeAt(state.position);
-        continue;
-      } else {
-        state.position = captureEnd;
-        state.line = _line;
-        state.lineStart = _lineStart;
-        state.lineIndent = _lineIndent;
-        break;
-      }
-    }
-    if (hasPendingContent) {
-      captureSegment(state, captureStart, captureEnd, false);
-      writeFoldedLines(state, state.line - _line);
-      captureStart = captureEnd = state.position;
-      hasPendingContent = false;
-    }
-    if (!is_WHITE_SPACE(ch)) {
-      captureEnd = state.position + 1;
-    }
+function skipUntilLineEnd(state) {
+  let ch = state.input.charCodeAt(state.position);
+  while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position);
+}
+function checkPrintable(state, start, end) {
+  if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) throwError(state, "the stream contains non-printable characters");
+}
+function readTagProperty(state, props, inFlow) {
+  if (state.input.charCodeAt(state.position) !== 33) return false;
+  if (props.tagStart !== NO_RANGE$1) throwError(state, "duplication of a tag property");
+  const start = state.position;
+  let isVerbatim = false;
+  let isNamed = false;
+  let tagHandle = "!";
+  let ch = state.input.charCodeAt(++state.position);
+  if (ch === 60) {
+    isVerbatim = true;
+    ch = state.input.charCodeAt(++state.position);
+  } else if (ch === 33) {
+    isNamed = true;
+    tagHandle = "!!";
     ch = state.input.charCodeAt(++state.position);
   }
-  captureSegment(state, captureStart, captureEnd, false);
-  if (state.result) {
-    return true;
+  let suffixStart = state.position;
+  let tagName;
+  if (isVerbatim) {
+    while (ch !== 0 && ch !== 62) ch = state.input.charCodeAt(++state.position);
+    if (ch !== 62) throwError(state, "unexpected end of the stream within a verbatim tag");
+    tagName = state.input.slice(suffixStart, state.position);
+    state.position++;
+  } else {
+    while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {
+      if (ch === 33) if (!isNamed) {
+        tagHandle = state.input.slice(suffixStart - 1, state.position + 1);
+        if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters");
+        isNamed = true;
+        suffixStart = state.position + 1;
+      } else throwError(state, "tag suffix cannot contain exclamation marks");
+      ch = state.input.charCodeAt(++state.position);
+    }
+    tagName = state.input.slice(suffixStart, state.position);
+    if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters");
   }
-  state.kind = _kind;
-  state.result = _result;
-  return false;
+  if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) throwError(state, `tag name cannot contain such characters: ${tagName}`);
+  if (!isVerbatim && tagHandle !== "!" && tagHandle !== "!!" && !HAS_OWN.call(state.tagHandlers, tagHandle)) throwError(state, `undeclared tag handle "${tagHandle}"`);
+  props.tagStart = start;
+  props.tagEnd = state.position;
+  return true;
 }
-function readSingleQuotedScalar(state, nodeIndent) {
-  var ch, captureStart, captureEnd;
-  ch = state.input.charCodeAt(state.position);
-  if (ch !== 39) {
-    return false;
-  }
-  state.kind = "scalar";
-  state.result = "";
+function readAnchorProperty(state, props) {
+  if (state.input.charCodeAt(state.position) !== 38) return false;
+  if (props.anchorStart !== NO_RANGE$1) throwError(state, "duplication of an anchor property");
+  state.position++;
+  const start = state.position;
+  while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++;
+  if (state.position === start) throwError(state, "name of an anchor node must contain at least one character");
+  props.anchorStart = start;
+  props.anchorEnd = state.position;
+  return true;
+}
+function readAlias(state, props) {
+  if (state.input.charCodeAt(state.position) !== 42) return false;
+  if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) throwError(state, "alias node should not have any properties");
+  state.position++;
+  const start = state.position;
+  while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++;
+  if (state.position === start) throwError(state, "name of an alias node must contain at least one character");
+  addAliasEvent(state, start, state.position);
+  return true;
+}
+function readFlowScalarBreak(state, nodeIndent) {
+  skipSeparationSpace(state, false);
+  if (state.lineIndent < nodeIndent) throwError(state, "deficient indentation");
+}
+function readSingleQuotedScalar(state, nodeIndent, props) {
+  if (state.input.charCodeAt(state.position) !== 39) return false;
   state.position++;
-  captureStart = captureEnd = state.position;
-  while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+  const start = state.position;
+  let simple = true;
+  while (state.input.charCodeAt(state.position) !== 0) {
+    const ch = state.input.charCodeAt(state.position);
     if (ch === 39) {
-      captureSegment(state, captureStart, state.position, true);
-      ch = state.input.charCodeAt(++state.position);
-      if (ch === 39) {
-        captureStart = state.position;
-        state.position++;
-        captureEnd = state.position;
-      } else {
-        return true;
+      if (state.input.charCodeAt(state.position + 1) === 39) {
+        simple = false;
+        state.position += 2;
+        continue;
       }
-    } else if (is_EOL(ch)) {
-      captureSegment(state, captureStart, captureEnd, true);
-      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
-      captureStart = captureEnd = state.position;
-    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
-      throwError(state, "unexpected end of the document within a single quoted scalar");
-    } else {
+      const end = state.position;
       state.position++;
-      captureEnd = state.position;
+      addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 2, 1, -1, simple);
+      return true;
     }
+    if (isEol(ch)) {
+      simple = false;
+      readFlowScalarBreak(state, nodeIndent);
+    } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar");
+    else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character");
+    else state.position++;
   }
   throwError(state, "unexpected end of the stream within a single quoted scalar");
 }
-function readDoubleQuotedScalar(state, nodeIndent) {
-  var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch !== 34) {
-    return false;
-  }
-  state.kind = "scalar";
-  state.result = "";
+function readDoubleQuotedScalar(state, nodeIndent, props) {
+  if (state.input.charCodeAt(state.position) !== 34) return false;
   state.position++;
-  captureStart = captureEnd = state.position;
-  while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+  const start = state.position;
+  let simple = true;
+  while (state.input.charCodeAt(state.position) !== 0) {
+    const ch = state.input.charCodeAt(state.position);
     if (ch === 34) {
-      captureSegment(state, captureStart, state.position, true);
+      const end = state.position;
       state.position++;
+      addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 3, 1, -1, simple);
       return true;
-    } else if (ch === 92) {
-      captureSegment(state, captureStart, state.position, true);
-      ch = state.input.charCodeAt(++state.position);
-      if (is_EOL(ch)) {
-        skipSeparationSpace(state, false, nodeIndent);
-      } else if (ch < 256 && simpleEscapeCheck[ch]) {
-        state.result += simpleEscapeMap[ch];
-        state.position++;
-      } else if ((tmp = escapedHexLen(ch)) > 0) {
-        hexLength = tmp;
-        hexResult = 0;
-        for (; hexLength > 0; hexLength--) {
-          ch = state.input.charCodeAt(++state.position);
-          if ((tmp = fromHexCode(ch)) >= 0) {
-            hexResult = (hexResult << 4) + tmp;
-          } else {
-            throwError(state, "expected hexadecimal character");
-          }
+    }
+    if (ch === 92) {
+      simple = false;
+      const escaped = state.input.charCodeAt(++state.position);
+      if (isEol(escaped)) readFlowScalarBreak(state, nodeIndent);
+      else if (isSimpleEscape(escaped)) state.position++;
+      else {
+        let hexLength = escapedHexLen(escaped);
+        if (hexLength === 0) throwError(state, "unknown escape sequence");
+        while (hexLength-- > 0) {
+          state.position++;
+          if (fromHexCode(state.input.charCodeAt(state.position)) < 0) throwError(state, "expected hexadecimal character");
         }
-        state.result += charFromCodepoint(hexResult);
         state.position++;
-      } else {
-        throwError(state, "unknown escape sequence");
-      }
-      captureStart = captureEnd = state.position;
-    } else if (is_EOL(ch)) {
-      captureSegment(state, captureStart, captureEnd, true);
-      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
-      captureStart = captureEnd = state.position;
-    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
-      throwError(state, "unexpected end of the document within a double quoted scalar");
-    } else {
-      state.position++;
-      captureEnd = state.position;
-    }
+      }
+    } else if (isEol(ch)) {
+      simple = false;
+      readFlowScalarBreak(state, nodeIndent);
+    } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar");
+    else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character");
+    else state.position++;
   }
   throwError(state, "unexpected end of the stream within a double quoted scalar");
 }
-function readFlowCollection(state, nodeIndent) {
-  var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch === 91) {
-    terminator = 93;
-    isMapping = false;
-    _result = [];
-  } else if (ch === 123) {
-    terminator = 125;
-    isMapping = true;
-    _result = {};
-  } else {
-    return false;
-  }
-  if (state.anchor !== null) {
-    state.anchorMap[state.anchor] = _result;
-  }
-  ch = state.input.charCodeAt(++state.position);
-  while (ch !== 0) {
-    skipSeparationSpace(state, true, nodeIndent);
-    ch = state.input.charCodeAt(state.position);
-    if (ch === terminator) {
+function readBlockScalar(state, parentIndent, props) {
+  const ch = state.input.charCodeAt(state.position);
+  let chomping = 1;
+  let indent = -1;
+  let detectedIndent = false;
+  if (ch !== 124 && ch !== 62) return false;
+  const style = ch === 124 ? 4 : 5;
+  state.position++;
+  while (state.input.charCodeAt(state.position) !== 0) {
+    const current = state.input.charCodeAt(state.position);
+    const digit = fromDecimalCode(current);
+    if (current === 43 || current === 45) {
+      if (chomping !== 1) throwError(state, "repeat of a chomping mode identifier");
+      chomping = current === 43 ? 3 : 2;
       state.position++;
-      state.tag = _tag;
-      state.anchor = _anchor;
-      state.kind = isMapping ? "mapping" : "sequence";
-      state.result = _result;
-      return true;
-    } else if (!readNext) {
-      throwError(state, "missed comma between flow collection entries");
-    } else if (ch === 44) {
-      throwError(state, "expected the node content, but found ','");
-    }
-    keyTag = keyNode = valueNode = null;
-    isPair = isExplicitPair = false;
-    if (ch === 63) {
-      following = state.input.charCodeAt(state.position + 1);
-      if (is_WS_OR_EOL(following)) {
-        isPair = isExplicitPair = true;
-        state.position++;
-        skipSeparationSpace(state, true, nodeIndent);
-      }
-    }
-    _line = state.line;
-    _lineStart = state.lineStart;
-    _pos = state.position;
-    composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
-    keyTag = state.tag;
-    keyNode = state.result;
-    skipSeparationSpace(state, true, nodeIndent);
-    ch = state.input.charCodeAt(state.position);
-    if ((isExplicitPair || state.line === _line) && ch === 58) {
-      isPair = true;
-      ch = state.input.charCodeAt(++state.position);
-      skipSeparationSpace(state, true, nodeIndent);
-      composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
-      valueNode = state.result;
-    }
-    if (isMapping) {
-      storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
-    } else if (isPair) {
-      _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
-    } else {
-      _result.push(keyNode);
-    }
-    skipSeparationSpace(state, true, nodeIndent);
-    ch = state.input.charCodeAt(state.position);
-    if (ch === 44) {
-      readNext = true;
-      ch = state.input.charCodeAt(++state.position);
-    } else {
-      readNext = false;
-    }
+    } else if (digit >= 0) {
+      if (digit === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
+      if (detectedIndent) throwError(state, "repeat of an indentation width identifier");
+      indent = parentIndent + digit - 1;
+      detectedIndent = true;
+      state.position++;
+    } else break;
   }
-  throwError(state, "unexpected end of the stream within a flow collection");
-}
-function readBlockScalar(state, nodeIndent) {
-  var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch === 124) {
-    folding = false;
-  } else if (ch === 62) {
-    folding = true;
-  } else {
-    return false;
+  let hadWhitespace = false;
+  while (isWhiteSpace(state.input.charCodeAt(state.position))) {
+    hadWhitespace = true;
+    state.position++;
   }
-  state.kind = "scalar";
-  state.result = "";
-  while (ch !== 0) {
-    ch = state.input.charCodeAt(++state.position);
-    if (ch === 43 || ch === 45) {
-      if (CHOMPING_CLIP === chomping) {
-        chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
-      } else {
-        throwError(state, "repeat of a chomping mode identifier");
-      }
-    } else if ((tmp = fromDecimalCode(ch)) >= 0) {
-      if (tmp === 0) {
-        throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
-      } else if (!detectedIndent) {
-        textIndent = nodeIndent + tmp - 1;
-        detectedIndent = true;
-      } else {
-        throwError(state, "repeat of an indentation width identifier");
-      }
-    } else {
+  if (hadWhitespace && state.input.charCodeAt(state.position) === 35) skipUntilLineEnd(state);
+  if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state);
+  else if (state.input.charCodeAt(state.position) !== 0) throwError(state, "a line break is expected");
+  let contentIndent = detectedIndent ? indent : -1;
+  let maxLeadingIndent = 0;
+  const valueStart = state.position;
+  let valueEnd = state.position;
+  while (state.input.charCodeAt(state.position) !== 0) {
+    const linePosition = state.position;
+    let column = 0;
+    while (state.input.charCodeAt(linePosition + column) === 32) column++;
+    const first = state.input.charCodeAt(linePosition + column);
+    if (first === 0) {
+      if (contentIndent >= 0) {
+        if (column > contentIndent) valueEnd = linePosition + column;
+      } else if (column > 0) valueEnd = linePosition + column;
       break;
     }
-  }
-  if (is_WHITE_SPACE(ch)) {
-    do {
-      ch = state.input.charCodeAt(++state.position);
-    } while (is_WHITE_SPACE(ch));
-    if (ch === 35) {
-      do {
-        ch = state.input.charCodeAt(++state.position);
-      } while (!is_EOL(ch) && ch !== 0);
-    }
-  }
-  while (ch !== 0) {
-    readLineBreak(state);
-    state.lineIndent = 0;
-    ch = state.input.charCodeAt(state.position);
-    while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
-      state.lineIndent++;
-      ch = state.input.charCodeAt(++state.position);
-    }
-    if (!detectedIndent && state.lineIndent > textIndent) {
-      textIndent = state.lineIndent;
-    }
-    if (is_EOL(ch)) {
-      emptyLines++;
-      continue;
-    }
-    if (state.lineIndent < textIndent) {
-      if (chomping === CHOMPING_KEEP) {
-        state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
-      } else if (chomping === CHOMPING_CLIP) {
-        if (didReadContent) {
-          state.result += "\n";
-        }
+    if (linePosition === state.lineStart && testDocumentSeparator(state, linePosition)) break;
+    if (!detectedIndent && contentIndent === -1 && isEol(first)) maxLeadingIndent = Math.max(maxLeadingIndent, column);
+    if (!detectedIndent && contentIndent === -1 && !isEol(first)) {
+      if (first === 9 && column < parentIndent) {
+        state.position = linePosition + column;
+        throwError(state, "tab characters must not be used in indentation");
       }
+      if (column < maxLeadingIndent) {
+        state.position = linePosition + column;
+        throwError(state, "bad indentation of a mapping entry");
+      }
+    }
+    if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) {
+      state.lineIndent = column;
+      state.position = linePosition + column;
       break;
     }
-    if (folding) {
-      if (is_WHITE_SPACE(ch)) {
-        atMoreIndented = true;
-        state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
-      } else if (atMoreIndented) {
-        atMoreIndented = false;
-        state.result += common.repeat("\n", emptyLines + 1);
-      } else if (emptyLines === 0) {
-        if (didReadContent) {
-          state.result += " ";
-        }
-      } else {
-        state.result += common.repeat("\n", emptyLines);
-      }
-    } else {
-      state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
+    if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) contentIndent = column;
+    const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent;
+    if (first !== 0 && !isEol(first) && column < requiredIndent) {
+      state.lineIndent = column;
+      state.position = linePosition + column;
+      break;
     }
-    didReadContent = true;
-    detectedIndent = true;
-    emptyLines = 0;
-    captureStart = state.position;
-    while (!is_EOL(ch) && ch !== 0) {
-      ch = state.input.charCodeAt(++state.position);
+    skipUntilLineEnd(state);
+    valueEnd = state.position;
+    if (isEol(state.input.charCodeAt(state.position))) {
+      consumeLineBreak(state);
+      valueEnd = state.position;
     }
-    captureSegment(state, captureStart, state.position, false);
   }
+  checkPrintable(state, valueStart, valueEnd);
+  addScalarEvent(state, valueStart, valueEnd, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, style, chomping, contentIndent);
   return true;
 }
-function readBlockSequence(state, nodeIndent) {
-  var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
-  if (state.firstTabInLine !== -1) return false;
-  if (state.anchor !== null) {
-    state.anchorMap[state.anchor] = _result;
+function canStartPlainScalar(state, nodeContext) {
+  const ch = state.input.charCodeAt(state.position);
+  const inFlow = nodeContext === CONTEXT_FLOW_IN;
+  if (ch === 0 || isWsOrEol(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96 || inFlow && isFlowIndicator(ch)) return false;
+  if (ch === 63 || ch === 45) {
+    const following = state.input.charCodeAt(state.position + 1);
+    if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) return false;
   }
-  ch = state.input.charCodeAt(state.position);
+  return true;
+}
+function readPlainScalar(state, nodeIndent, nodeContext, props) {
+  if (!canStartPlainScalar(state, nodeContext)) return false;
+  const start = state.position;
+  let end = state.position;
+  let ch = state.input.charCodeAt(state.position);
+  const inFlow = nodeContext === CONTEXT_FLOW_IN;
+  let multiline = false;
   while (ch !== 0) {
-    if (state.firstTabInLine !== -1) {
-      state.position = state.firstTabInLine;
-      throwError(state, "tab characters must not be used in indentation");
-    }
-    if (ch !== 45) {
-      break;
-    }
-    following = state.input.charCodeAt(state.position + 1);
-    if (!is_WS_OR_EOL(following)) {
-      break;
-    }
-    detected = true;
-    state.position++;
-    if (skipSeparationSpace(state, true, -1)) {
-      if (state.lineIndent <= nodeIndent) {
-        _result.push(null);
+    if (state.position === state.lineStart && testDocumentSeparator(state)) break;
+    if (ch === 58) {
+      const following = state.input.charCodeAt(state.position + 1);
+      if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) break;
+    } else if (ch === 35) {
+      if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break;
+    } else if (inFlow && isFlowIndicator(ch)) break;
+    else if (isEol(ch)) {
+      const savedPosition = state.position;
+      const savedLine = state.line;
+      const savedLineStart = state.lineStart;
+      const savedLineIndent = state.lineIndent;
+      skipSeparationSpace(state, false);
+      if (state.lineIndent >= nodeIndent) {
+        multiline = true;
         ch = state.input.charCodeAt(state.position);
         continue;
       }
-    }
-    _line = state.line;
-    composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
-    _result.push(state.result);
-    skipSeparationSpace(state, true, -1);
-    ch = state.input.charCodeAt(state.position);
-    if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
-      throwError(state, "bad indentation of a sequence entry");
-    } else if (state.lineIndent < nodeIndent) {
+      state.position = savedPosition;
+      state.line = savedLine;
+      state.lineStart = savedLineStart;
+      state.lineIndent = savedLineIndent;
       break;
     }
+    if (!isWhiteSpace(ch)) end = state.position + 1;
+    ch = state.input.charCodeAt(++state.position);
   }
-  if (detected) {
-    state.tag = _tag;
-    state.anchor = _anchor;
-    state.kind = "sequence";
-    state.result = _result;
-    return true;
+  if (end === start) return false;
+  checkPrintable(state, start, end);
+  addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 1, 1, -1, !multiline);
+  return true;
+}
+function skipFlowSeparationSpace(state, nodeIndent) {
+  const startLine = state.line;
+  skipSeparationSpace(state, true);
+  if (state.line > startLine && state.lineIndent < nodeIndent || state.firstTabInLine !== -1 && state.lineIndent < nodeIndent) throwError(state, "deficient indentation");
+}
+function readFlowCollection(state, nodeIndent, props) {
+  const ch = state.input.charCodeAt(state.position);
+  const isMapping = ch === 123;
+  const start = state.position;
+  let readNext = true;
+  if (ch !== 91 && ch !== 123) return false;
+  const terminator = isMapping ? 125 : 93;
+  if (isMapping) addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 2);
+  else addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 2);
+  state.position++;
+  while (state.input.charCodeAt(state.position) !== 0) {
+    skipFlowSeparationSpace(state, nodeIndent);
+    let ch2 = state.input.charCodeAt(state.position);
+    if (ch2 === terminator) {
+      state.position++;
+      addPopEvent(state);
+      return true;
+    } else if (!readNext) throwError(state, "missed comma between flow collection entries");
+    else if (ch2 === 44) throwError(state, "expected the node content, but found ','");
+    let isPair = false;
+    let isExplicitPair = false;
+    if (ch2 === 63 && isWsOrEol(state.input.charCodeAt(state.position + 1))) {
+      isPair = isExplicitPair = true;
+      state.position += 1;
+      skipFlowSeparationSpace(state, nodeIndent);
+    }
+    const entryLine = state.line;
+    const entryStart = snapshotState(state);
+    const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+    skipFlowSeparationSpace(state, nodeIndent);
+    ch2 = state.input.charCodeAt(state.position);
+    if ((isMapping || isExplicitPair || state.line === entryLine) && ch2 === 58) {
+      isPair = true;
+      state.position++;
+      skipFlowSeparationSpace(state, nodeIndent);
+      if (!isMapping) {
+        insertFlowPairMappingEvent(state, entryStart);
+        if (!keyWasRead) addEmptyScalarEvent(state);
+      } else if (!keyWasRead) addEmptyScalarEvent(state);
+      if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) addEmptyScalarEvent(state);
+      skipFlowSeparationSpace(state, nodeIndent);
+      if (!isMapping) addPopEvent(state);
+    } else if (isMapping && isPair) {
+      if (!keyWasRead) addEmptyScalarEvent(state);
+      addEmptyScalarEvent(state);
+    } else if (isMapping) addEmptyScalarEvent(state);
+    else if (isPair) {
+      insertFlowPairMappingEvent(state, entryStart);
+      if (!keyWasRead) addEmptyScalarEvent(state);
+      addEmptyScalarEvent(state);
+      addPopEvent(state);
+    }
+    ch2 = state.input.charCodeAt(state.position);
+    if (ch2 === 44) {
+      readNext = true;
+      state.position++;
+    } else readNext = false;
   }
-  return false;
+  throwError(state, "unexpected end of the stream within a flow collection");
+}
+function readBlockSequence(state, nodeIndent, props) {
+  if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 45 || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) return false;
+  addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 1);
+  while (state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {
+    if (state.firstTabInLine !== -1) {
+      state.position = state.firstTabInLine;
+      throwError(state, "tab characters must not be used in indentation");
+    }
+    const entryLine = state.line;
+    state.position++;
+    const hadBreak = skipSeparationSpace(state, true) > 0;
+    if (state.firstTabInLine !== -1 && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry");
+    if (hadBreak && state.lineIndent <= nodeIndent) addEmptyScalarEvent(state);
+    else parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
+    skipSeparationSpace(state, true);
+    if (state.lineIndent < nodeIndent || state.position >= state.length) break;
+    if (state.lineIndent > nodeIndent) throwError(state, "bad indentation of a sequence entry");
+    if (state.line === entryLine && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry");
+  }
+  addPopEvent(state);
+  return true;
 }
-function readBlockMapping(state, nodeIndent, flowIndent) {
-  var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
+function readBlockMapping(state, nodeIndent, flowIndent, props) {
+  let atExplicitKey = false;
+  let detected = false;
+  let mappingOpened = false;
+  let pendingExplicitKey = false;
   if (state.firstTabInLine !== -1) return false;
-  if (state.anchor !== null) {
-    state.anchorMap[state.anchor] = _result;
-  }
-  ch = state.input.charCodeAt(state.position);
+  let ch = state.input.charCodeAt(state.position);
   while (ch !== 0) {
     if (!atExplicitKey && state.firstTabInLine !== -1) {
       state.position = state.firstTabInLine;
       throwError(state, "tab characters must not be used in indentation");
     }
-    following = state.input.charCodeAt(state.position + 1);
-    _line = state.line;
-    if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
+    const following = state.input.charCodeAt(state.position + 1);
+    const entryLine = state.line;
+    if ((ch === 63 || ch === 58) && isWsOrEolOrEnd(following)) {
+      if (!mappingOpened) {
+        addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 1);
+        mappingOpened = true;
+      }
       if (ch === 63) {
-        if (atExplicitKey) {
-          storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
-          keyTag = keyNode = valueNode = null;
-        }
+        if (atExplicitKey) addEmptyScalarEvent(state);
         detected = true;
         atExplicitKey = true;
-        allowCompact = true;
-      } else if (atExplicitKey) {
+      } else if (atExplicitKey) atExplicitKey = false;
+      else {
+        addEmptyScalarEvent(state);
+        detected = true;
         atExplicitKey = false;
-        allowCompact = true;
-      } else {
-        throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
       }
       state.position += 1;
-      ch = following;
+      pendingExplicitKey = true;
     } else {
-      _keyLine = state.line;
-      _keyLineStart = state.lineStart;
-      _keyPos = state.position;
-      if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
-        break;
+      if (atExplicitKey) {
+        addEmptyScalarEvent(state);
+        atExplicitKey = false;
       }
-      if (state.line === _line) {
+      const beforeKey = snapshotState(state);
+      if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break;
+      if (state.line === entryLine) {
         ch = state.input.charCodeAt(state.position);
-        while (is_WHITE_SPACE(ch)) {
-          ch = state.input.charCodeAt(++state.position);
-        }
+        while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position);
         if (ch === 58) {
           ch = state.input.charCodeAt(++state.position);
-          if (!is_WS_OR_EOL(ch)) {
-            throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
-          }
-          if (atExplicitKey) {
-            storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
-            keyTag = keyNode = valueNode = null;
+          if (!isWsOrEolOrEnd(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
+          if (!mappingOpened) {
+            restoreState(state, beforeKey);
+            addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 1);
+            mappingOpened = true;
+            parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true);
+            ch = state.input.charCodeAt(state.position);
+            while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position);
+            state.position++;
           }
           detected = true;
           atExplicitKey = false;
-          allowCompact = false;
-          keyTag = state.tag;
-          keyNode = state.result;
-        } else if (detected) {
-          throwError(state, "can not read an implicit mapping pair; a colon is missed");
-        } else {
-          state.tag = _tag;
-          state.anchor = _anchor;
+          pendingExplicitKey = false;
+        } else if (detected) throwError(state, "expected ':' after a mapping key");
+        else {
+          if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) {
+            restoreState(state, beforeKey);
+            return false;
+          }
           return true;
         }
-      } else if (detected) {
-        throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
-      } else {
-        state.tag = _tag;
-        state.anchor = _anchor;
-        return true;
-      }
-    }
-    if (state.line === _line || state.lineIndent > nodeIndent) {
-      if (atExplicitKey) {
-        _keyLine = state.line;
-        _keyLineStart = state.lineStart;
-        _keyPos = state.position;
-      }
-      if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
-        if (atExplicitKey) {
-          keyNode = state.result;
-        } else {
-          valueNode = state.result;
+      } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
+      else {
+        if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) {
+          restoreState(state, beforeKey);
+          return false;
         }
+        return true;
       }
-      if (!atExplicitKey) {
-        storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
-        keyTag = keyNode = valueNode = null;
-      }
-      skipSeparationSpace(state, true, -1);
-      ch = state.input.charCodeAt(state.position);
-    }
-    if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
-      throwError(state, "bad indentation of a mapping entry");
-    } else if (state.lineIndent < nodeIndent) {
-      break;
-    }
-  }
-  if (atExplicitKey) {
-    storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
-  }
-  if (detected) {
-    state.tag = _tag;
-    state.anchor = _anchor;
-    state.kind = "mapping";
-    state.result = _result;
-  }
-  return detected;
-}
-function readTagProperty(state) {
-  var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch !== 33) return false;
-  if (state.tag !== null) {
-    throwError(state, "duplication of a tag property");
-  }
-  ch = state.input.charCodeAt(++state.position);
-  if (ch === 60) {
-    isVerbatim = true;
-    ch = state.input.charCodeAt(++state.position);
-  } else if (ch === 33) {
-    isNamed = true;
-    tagHandle = "!!";
-    ch = state.input.charCodeAt(++state.position);
-  } else {
-    tagHandle = "!";
-  }
-  _position = state.position;
-  if (isVerbatim) {
-    do {
-      ch = state.input.charCodeAt(++state.position);
-    } while (ch !== 0 && ch !== 62);
-    if (state.position < state.length) {
-      tagName = state.input.slice(_position, state.position);
-      ch = state.input.charCodeAt(++state.position);
-    } else {
-      throwError(state, "unexpected end of the stream within a verbatim tag");
     }
-  } else {
-    while (ch !== 0 && !is_WS_OR_EOL(ch)) {
-      if (ch === 33) {
-        if (!isNamed) {
-          tagHandle = state.input.slice(_position - 1, state.position + 1);
-          if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
-            throwError(state, "named tag handle cannot contain such characters");
-          }
-          isNamed = true;
-          _position = state.position + 1;
-        } else {
-          throwError(state, "tag suffix cannot contain exclamation marks");
-        }
+    if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) pendingExplicitKey = false;
+    if (!atExplicitKey) {
+      if (pendingExplicitKey) {
+        addEmptyScalarEvent(state);
+        pendingExplicitKey = false;
       }
-      ch = state.input.charCodeAt(++state.position);
-    }
-    tagName = state.input.slice(_position, state.position);
-    if (PATTERN_FLOW_INDICATORS.test(tagName)) {
-      throwError(state, "tag suffix cannot contain flow indicator characters");
     }
+    skipSeparationSpace(state, true);
+    ch = state.input.charCodeAt(state.position);
+    if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a mapping entry");
+    else if (state.lineIndent < nodeIndent) break;
   }
-  if (tagName && !PATTERN_TAG_URI.test(tagName)) {
-    throwError(state, "tag name cannot contain such characters: " + tagName);
-  }
-  try {
-    tagName = decodeURIComponent(tagName);
-  } catch (err) {
-    throwError(state, "tag name is malformed: " + tagName);
-  }
-  if (isVerbatim) {
-    state.tag = tagName;
-  } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
-    state.tag = state.tagMap[tagHandle] + tagName;
-  } else if (tagHandle === "!") {
-    state.tag = "!" + tagName;
-  } else if (tagHandle === "!!") {
-    state.tag = "tag:yaml.org,2002:" + tagName;
-  } else {
-    throwError(state, 'undeclared tag handle "' + tagHandle + '"');
-  }
-  return true;
-}
-function readAnchorProperty(state) {
-  var _position, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch !== 38) return false;
-  if (state.anchor !== null) {
-    throwError(state, "duplication of an anchor property");
-  }
-  ch = state.input.charCodeAt(++state.position);
-  _position = state.position;
-  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
-    ch = state.input.charCodeAt(++state.position);
-  }
-  if (state.position === _position) {
-    throwError(state, "name of an anchor node must contain at least one character");
-  }
-  state.anchor = state.input.slice(_position, state.position);
-  return true;
-}
-function readAlias(state) {
-  var _position, alias, ch;
-  ch = state.input.charCodeAt(state.position);
-  if (ch !== 42) return false;
-  ch = state.input.charCodeAt(++state.position);
-  _position = state.position;
-  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
-    ch = state.input.charCodeAt(++state.position);
-  }
-  if (state.position === _position) {
-    throwError(state, "name of an alias node must contain at least one character");
-  }
-  alias = state.input.slice(_position, state.position);
-  if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
-    throwError(state, 'unidentified alias "' + alias + '"');
-  }
-  state.result = state.anchorMap[alias];
-  skipSeparationSpace(state, true, -1);
+  if (!detected) return false;
+  if (atExplicitKey) addEmptyScalarEvent(state);
+  if (mappingOpened) addPopEvent(state);
   return true;
 }
-function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
-  var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent;
-  if (state.listener !== null) {
-    state.listener("open", state);
-  }
-  state.tag = null;
-  state.anchor = null;
-  state.kind = null;
-  state.result = null;
-  allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
-  if (allowToSeek) {
-    if (skipSeparationSpace(state, true, -1)) {
-      atNewLine = true;
-      if (state.lineIndent > parentIndent) {
-        indentStatus = 1;
-      } else if (state.lineIndent === parentIndent) {
-        indentStatus = 0;
-      } else if (state.lineIndent < parentIndent) {
-        indentStatus = -1;
-      }
-    }
-  }
-  if (indentStatus === 1) {
-    while (readTagProperty(state) || readAnchorProperty(state)) {
-      if (skipSeparationSpace(state, true, -1)) {
-        atNewLine = true;
-        allowBlockCollections = allowBlockStyles;
-        if (state.lineIndent > parentIndent) {
-          indentStatus = 1;
-        } else if (state.lineIndent === parentIndent) {
-          indentStatus = 0;
-        } else if (state.lineIndent < parentIndent) {
-          indentStatus = -1;
-        }
-      } else {
-        allowBlockCollections = false;
+function parseNode(state, parentIndent, nodeContext, allowToSeek, allowCompact, allowPropertyMapping = true) {
+  if (state.depth >= state.maxDepth) throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`);
+  state.depth++;
+  let indentStatus = 1;
+  let atNewLine = false;
+  let hasContent = false;
+  let propertyStart = null;
+  const props = emptyProperties();
+  let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN;
+  let allowBlockCollections = allowBlockScalars;
+  const allowBlockStyles = allowBlockScalars;
+  if (allowToSeek && skipSeparationSpace(state, true)) {
+    atNewLine = true;
+    if (state.lineIndent > parentIndent) indentStatus = 1;
+    else if (state.lineIndent === parentIndent) indentStatus = 0;
+    else indentStatus = -1;
+  }
+  if (indentStatus === 1) while (true) {
+    const ch = state.input.charCodeAt(state.position);
+    const propertyState = snapshotState(state);
+    if (atNewLine && indentStatus !== 1 && (ch === 33 || ch === 38)) break;
+    if (atNewLine && allowBlockStyles && (props.tagStart !== NO_RANGE$1 || props.anchorStart !== NO_RANGE$1) && (ch === 33 || ch === 38)) {
+      const fallbackState = snapshotState(state);
+      const flowIndent = parentIndent + 1;
+      if (readBlockMapping(state, state.position - state.lineStart, flowIndent, props) && state.events[fallbackState.eventsLength]?.type === 3) {
+        state.depth--;
+        return true;
       }
+      restoreState(state, fallbackState);
     }
-  }
-  if (allowBlockCollections) {
-    allowBlockCollections = atNewLine || allowCompact;
-  }
-  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
-    if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
-      flowIndent = parentIndent;
-    } else {
-      flowIndent = parentIndent + 1;
-    }
-    blockIndent = state.position - state.lineStart;
-    if (indentStatus === 1) {
-      if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
-        hasContent = true;
-      } else {
-        if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
-          hasContent = true;
-        } else if (readAlias(state)) {
-          hasContent = true;
-          if (state.tag !== null || state.anchor !== null) {
-            throwError(state, "alias node should not have any properties");
-          }
-        } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
-          hasContent = true;
-          if (state.tag === null) {
-            state.tag = "?";
-          }
-        }
-        if (state.anchor !== null) {
-          state.anchorMap[state.anchor] = state.result;
-        }
+    if (atNewLine && (ch === 33 && props.tagStart !== NO_RANGE$1 || ch === 38 && props.anchorStart !== NO_RANGE$1)) break;
+    if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) break;
+    if (propertyStart === null) propertyStart = propertyState;
+    if (skipSeparationSpace(state, true)) {
+      atNewLine = true;
+      allowBlockCollections = allowBlockStyles;
+      if (state.lineIndent > parentIndent) indentStatus = 1;
+      else if (state.lineIndent === parentIndent) indentStatus = 0;
+      else indentStatus = -1;
+    } else allowBlockCollections = false;
+  }
+  if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact;
+  if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {
+    const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT ? parentIndent : parentIndent + 1;
+    const blockIndent = state.position - state.lineStart;
+    if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent, props) || readBlockMapping(state, blockIndent, flowIndent, props)) || readFlowCollection(state, flowIndent, props)) hasContent = true;
+    else {
+      const ch = state.input.charCodeAt(state.position);
+      if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62) {
+        const fallbackState = snapshotState(state);
+        const propertyIndent = propertyStart.position - propertyStart.lineStart;
+        restoreState(state, propertyStart);
+        if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) && state.events[fallbackState.eventsLength]?.type === 3) hasContent = true;
+        else restoreState(state, fallbackState);
       }
-    } else if (indentStatus === 0) {
-      hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
+      if (!hasContent && (allowBlockScalars && readBlockScalar(state, flowIndent, props) || readSingleQuotedScalar(state, flowIndent, props) || readDoubleQuotedScalar(state, flowIndent, props) || readAlias(state, props) || readPlainScalar(state, flowIndent, nodeContext, props))) hasContent = true;
     }
+    else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props);
   }
-  if (state.tag === null) {
-    if (state.anchor !== null) {
-      state.anchorMap[state.anchor] = state.result;
-    }
-  } else if (state.tag === "?") {
-    if (state.result !== null && state.kind !== "scalar") {
-      throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"');
-    }
-    for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
-      type2 = state.implicitTypes[typeIndex];
-      if (type2.resolve(state.result)) {
-        state.result = type2.construct(state.result);
-        state.tag = type2.tag;
-        if (state.anchor !== null) {
-          state.anchorMap[state.anchor] = state.result;
-        }
-        break;
-      }
-    }
-  } else if (state.tag !== "!") {
-    if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) {
-      type2 = state.typeMap[state.kind || "fallback"][state.tag];
-    } else {
-      type2 = null;
-      typeList = state.typeMap.multi[state.kind || "fallback"];
-      for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
-        if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
-          type2 = typeList[typeIndex];
-          break;
-        }
-      }
-    }
-    if (!type2) {
-      throwError(state, "unknown tag !<" + state.tag + ">");
-    }
-    if (state.result !== null && type2.kind !== state.kind) {
-      throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"');
-    }
-    if (!type2.resolve(state.result, state.tag)) {
-      throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
-    } else {
-      state.result = type2.construct(state.result, state.tag);
-      if (state.anchor !== null) {
-        state.anchorMap[state.anchor] = state.result;
-      }
-    }
+  allowBlockScalars = allowBlockScalars && !hasContent;
+  if (!hasContent && (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1 || allowBlockScalars)) {
+    addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, 1);
+    hasContent = true;
   }
-  if (state.listener !== null) {
-    state.listener("close", state);
+  state.depth--;
+  return hasContent || props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1;
+}
+function readDirective(state) {
+  if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 37) return false;
+  state.position++;
+  const nameStart = state.position;
+  while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++;
+  const name = state.input.slice(nameStart, state.position);
+  const args = [];
+  if (name.length === 0) throwError(state, "directive name must not be less than one character in length");
+  while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) {
+    while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++;
+    if (state.input.charCodeAt(state.position) === 35 || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break;
+    const start = state.position;
+    while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++;
+    args.push(state.input.slice(start, state.position));
+  }
+  if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state);
+  if (name === "YAML") {
+    if (state.directives.some((directive) => directive.kind === "yaml")) throwError(state, "duplication of %YAML directive");
+    if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument");
+    const match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
+    if (match2 === null) throwError(state, "ill-formed argument of the YAML directive");
+    if (parseInt(match2[1], 10) !== 1) throwError(state, "unacceptable YAML version of the document");
+    state.directives.push({
+      kind: "yaml",
+      version: args[0]
+    });
+  } else if (name === "TAG") {
+    if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments");
+    const [handle, prefix] = args;
+    if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
+    if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for "${handle}" tag handle`);
+    if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
+    state.tagHandlers[handle] = prefix;
+    state.directives.push({
+      kind: "tag",
+      handle,
+      prefix
+    });
   }
-  return state.tag !== null || state.anchor !== null || hasContent;
+  return true;
 }
 function readDocument(state) {
-  var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
-  state.version = null;
-  state.checkLineBreaks = state.legacy;
-  state.tagMap = /* @__PURE__ */ Object.create(null);
-  state.anchorMap = /* @__PURE__ */ Object.create(null);
-  while ((ch = state.input.charCodeAt(state.position)) !== 0) {
-    skipSeparationSpace(state, true, -1);
-    ch = state.input.charCodeAt(state.position);
-    if (state.lineIndent > 0 || ch !== 37) {
-      break;
-    }
+  state.directives = [];
+  state.tagHandlers = /* @__PURE__ */ Object.create(null);
+  let hasDirectives = false;
+  skipSeparationSpace(state, true);
+  while (readDirective(state)) {
     hasDirectives = true;
-    ch = state.input.charCodeAt(++state.position);
-    _position = state.position;
-    while (ch !== 0 && !is_WS_OR_EOL(ch)) {
-      ch = state.input.charCodeAt(++state.position);
-    }
-    directiveName = state.input.slice(_position, state.position);
-    directiveArgs = [];
-    if (directiveName.length < 1) {
-      throwError(state, "directive name must not be less than one character in length");
-    }
-    while (ch !== 0) {
-      while (is_WHITE_SPACE(ch)) {
-        ch = state.input.charCodeAt(++state.position);
-      }
-      if (ch === 35) {
-        do {
-          ch = state.input.charCodeAt(++state.position);
-        } while (ch !== 0 && !is_EOL(ch));
-        break;
-      }
-      if (is_EOL(ch)) break;
-      _position = state.position;
-      while (ch !== 0 && !is_WS_OR_EOL(ch)) {
-        ch = state.input.charCodeAt(++state.position);
-      }
-      directiveArgs.push(state.input.slice(_position, state.position));
-    }
-    if (ch !== 0) readLineBreak(state);
-    if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
-      directiveHandlers[directiveName](state, directiveName, directiveArgs);
-    } else {
-      throwWarning(state, 'unknown document directive "' + directiveName + '"');
-    }
-  }
-  skipSeparationSpace(state, true, -1);
-  if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
+    skipSeparationSpace(state, true);
+  }
+  let explicitStart = false;
+  let explicitEnd = false;
+  let allowCompact = true;
+  if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) {
+    explicitStart = true;
+    const markerLine = state.line;
     state.position += 3;
-    skipSeparationSpace(state, true, -1);
-  } else if (hasDirectives) {
-    throwError(state, "directives end mark is expected");
-  }
-  composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
-  skipSeparationSpace(state, true, -1);
-  if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
-    throwWarning(state, "non-ASCII line breaks are interpreted as content");
+    skipSeparationSpace(state, true);
+    allowCompact = state.line > markerLine;
+  } else if (hasDirectives) throwError(state, "directives end mark is expected");
+  const documentEventIndex = state.events.length;
+  if (!explicitStart && state.position === state.lineStart && state.input.charCodeAt(state.position) === 46 && testDocumentSeparator(state)) {
+    state.position += 3;
+    skipSeparationSpace(state, true);
+    return;
   }
-  state.documents.push(state.result);
+  addDocumentEvent(state, explicitStart, false);
+  if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) addEmptyScalarEvent(state);
+  skipSeparationSpace(state, true);
   if (state.position === state.lineStart && testDocumentSeparator(state)) {
-    if (state.input.charCodeAt(state.position) === 46) {
+    explicitEnd = state.input.charCodeAt(state.position) === 46;
+    if (explicitEnd) {
+      const markerLine = state.line;
       state.position += 3;
-      skipSeparationSpace(state, true, -1);
+      skipSeparationSpace(state, true);
+      if (state.line === markerLine && state.position < state.length) throwError(state, "end of the stream or a document separator is expected");
     }
-    return;
   }
-  if (state.position < state.length - 1) {
-    throwError(state, "end of the stream or a document separator is expected");
-  } else {
-    return;
+  const documentEvent = state.events[documentEventIndex];
+  if (documentEvent?.type === 1) documentEvent.explicitEnd = explicitEnd;
+  addPopEvent(state);
+  if (!explicitEnd && state.position < state.length && !(state.position === state.lineStart && testDocumentSeparator(state))) throwError(state, "end of the stream or a document separator is expected");
+}
+function parseEvents(input, options) {
+  const length = input.length;
+  const state = {
+    ...DEFAULT_PARSER_OPTIONS,
+    ...options,
+    input: `${input}\0`,
+    length,
+    position: 0,
+    line: 0,
+    lineStart: 0,
+    lineIndent: 0,
+    firstTabInLine: -1,
+    depth: 0,
+    directives: [],
+    tagHandlers: /* @__PURE__ */ Object.create(null),
+    events: []
+  };
+  const nullpos = input.indexOf("\0");
+  if (nullpos !== -1) throwErrorAt(input, nullpos, "null byte is not allowed in input", state.filename);
+  if (state.input.charCodeAt(state.position) === 65279) state.position++;
+  while (state.position < state.length) {
+    skipSeparationSpace(state, true);
+    if (state.position >= state.length) break;
+    const documentStart = state.position;
+    readDocument(state);
+    if (state.position === documentStart)
+      throwError(state, "can not read a document");
   }
+  return state.events;
 }
-function loadDocuments(input, options) {
-  input = String(input);
-  options = options || {};
-  if (input.length !== 0) {
-    if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
-      input += "\n";
-    }
-    if (input.charCodeAt(0) === 65279) {
-      input = input.slice(1);
+var DEFAULT_LOAD_OPTIONS = {
+  ...DEFAULT_PARSER_OPTIONS,
+  ...DEFAULT_CONSTRUCTOR_OPTIONS
+};
+function loadDocuments(input, options = {}) {
+  const opts = {
+    ...DEFAULT_LOAD_OPTIONS,
+    ...options
+  };
+  const source = String(input);
+  const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS);
+  const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS);
+  return constructFromEvents(parseEvents(source, pick(opts, PARSER_OPT_KEYS)), {
+    ...pick(opts, CONSTRUCTOR_OPT_KEYS),
+    source
+  });
+}
+function load(input, options) {
+  const documents = loadDocuments(input, options);
+  if (documents.length === 0) throw new YAMLException("expected a document, but the input is empty");
+  if (documents.length === 1) return documents[0];
+  throw new YAMLException("expected a single document in the stream, but found more");
+}
+var Style = class {
+  tagged = false;
+  flow = false;
+  singleQuoted = false;
+  doubleQuoted = false;
+  literal = false;
+  folded = false;
+};
+var INVALID = /* @__PURE__ */ Symbol("INVALID");
+function buildRepresentTypes(schema) {
+  const defaultTags = new Set([
+    schema.defaultScalarTag,
+    schema.defaultSequenceTag,
+    schema.defaultMappingTag
+  ].filter((t) => t !== void 0));
+  const implicitScalars = schema.implicitScalarTags;
+  const explicitTags = schema.tags.filter((t) => !(t.nodeKind === "scalar" && t.implicit) && !defaultTags.has(t));
+  const defaultTagsLast = schema.tags.filter((t) => defaultTags.has(t));
+  return [
+    ...implicitScalars.map((tag) => ({
+      tag,
+      implicitTag: true
+    })),
+    ...explicitTags.map((tag) => ({
+      tag,
+      implicitTag: false
+    })),
+    ...defaultTagsLast.map((tag) => ({
+      tag,
+      implicitTag: true
+    }))
+  ];
+}
+function matchTag(state, object2) {
+  for (let index2 = 0, length = state.representTypes.length; index2 < length; index2 += 1) {
+    const { tag, implicitTag } = state.representTypes[index2];
+    if (tag.identify && tag.identify(object2)) {
+      let tagName;
+      if (tag.matchByTagPrefix && tag.representTagName) tagName = tag.representTagName(object2);
+      else tagName = tag.tagName;
+      return {
+        tag,
+        tagName,
+        implicitTag
+      };
     }
   }
-  var state = new State$1(input, options);
-  var nullpos = input.indexOf("\0");
-  if (nullpos !== -1) {
-    state.position = nullpos;
-    throwError(state, "null byte is not allowed in input");
-  }
-  state.input += "\0";
-  while (state.input.charCodeAt(state.position) === 32) {
-    state.lineIndent += 1;
-    state.position += 1;
-  }
-  while (state.position < state.length - 1) {
-    readDocument(state);
-  }
-  return state.documents;
+  return null;
 }
-function loadAll$1(input, iterator2, options) {
-  if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") {
-    options = iterator2;
-    iterator2 = null;
+function build(state, object2) {
+  if (!state.noRefs && object2 !== null && typeof object2 === "object") {
+    const existing = state.refs.get(object2);
+    if (existing) {
+      if (existing.anchor === void 0) existing.anchor = `ref_${state.refCounter++}`;
+      return {
+        kind: "alias",
+        tag: "",
+        style: new Style(),
+        anchor: existing.anchor
+      };
+    }
   }
-  var documents = loadDocuments(input, options);
-  if (typeof iterator2 !== "function") {
-    return documents;
+  const matched = matchTag(state, object2);
+  if (!matched) {
+    if (object2 === void 0) return INVALID;
+    if (state.skipInvalid) return INVALID;
+    throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object2)}`);
   }
-  for (var index = 0, length = documents.length; index < length; index += 1) {
-    iterator2(documents[index]);
+  const { tag, tagName, implicitTag } = matched;
+  const nodeTagName = implicitTag ? tagName : tagNameShort(tagName);
+  if (tag.nodeKind === "scalar") {
+    const style2 = new Style();
+    style2.tagged = !implicitTag;
+    return {
+      kind: "scalar",
+      tag: nodeTagName,
+      style: style2,
+      value: tag.represent(object2)
+    };
+  }
+  if (tag.nodeKind === "sequence") {
+    const container = tag.represent(object2);
+    const style2 = new Style();
+    style2.tagged = !implicitTag;
+    const node2 = {
+      kind: "sequence",
+      tag: nodeTagName,
+      style: style2,
+      items: []
+    };
+    if (!state.noRefs) state.refs.set(object2, node2);
+    for (let index2 = 0, length = container.length; index2 < length; index2 += 1) {
+      let item = build(state, container[index2]);
+      if (item === INVALID && container[index2] === void 0) item = build(state, null);
+      if (item === INVALID) continue;
+      node2.items.push(item);
+    }
+    return node2;
+  }
+  const map = tag.represent(object2);
+  const style = new Style();
+  style.tagged = !implicitTag;
+  const node = {
+    kind: "mapping",
+    tag: nodeTagName,
+    style,
+    items: []
+  };
+  if (!state.noRefs) state.refs.set(object2, node);
+  for (const [objectKey, objectValue] of map) {
+    const key = build(state, objectKey);
+    if (key === INVALID) continue;
+    const value = build(state, objectValue);
+    if (value === INVALID) continue;
+    node.items.push({
+      key,
+      value
+    });
   }
-}
-function load$1(input, options) {
-  var documents = loadDocuments(input, options);
-  if (documents.length === 0) {
-    return void 0;
-  } else if (documents.length === 1) {
-    return documents[0];
+  return node;
+}
+function jsToAst(input, schema, options = {}) {
+  const root = build({
+    representTypes: buildRepresentTypes(schema),
+    noRefs: options.noRefs ?? false,
+    skipInvalid: options.skipInvalid ?? false,
+    refs: /* @__PURE__ */ new Map(),
+    refCounter: 0
+  }, input);
+  return [{
+    contents: root === INVALID ? null : root,
+    directives: []
+  }];
+}
+var VISIT_BREAK = /* @__PURE__ */ Symbol("visit:break");
+var VISIT_SKIP = /* @__PURE__ */ Symbol("visit:skip");
+function visitNode(node, visitor, ctx) {
+  const control = visitor(node, ctx);
+  if (control === VISIT_BREAK) return true;
+  if (control === VISIT_SKIP) return false;
+  const depth = ctx.depth + 1;
+  switch (node.kind) {
+    case "sequence":
+      for (const item of node.items) if (visitNode(item, visitor, {
+        depth,
+        parent: node,
+        isKey: false
+      })) return true;
+      break;
+    case "mapping":
+      for (const { key, value } of node.items) {
+        if (visitNode(key, visitor, {
+          depth,
+          parent: node,
+          isKey: true
+        })) return true;
+        if (visitNode(value, visitor, {
+          depth,
+          parent: node,
+          isKey: false
+        })) return true;
+      }
+      break;
   }
-  throw new exception("expected a single document in the stream, but found more");
+  return false;
+}
+function visit(documents, visitor) {
+  for (const doc of documents) if (doc.contents && visitNode(doc.contents, visitor, {
+    depth: 0,
+    parent: null,
+    isKey: false
+  })) return;
 }
-var loadAll_1 = loadAll$1;
-var load_1 = load$1;
-var loader = {
-  loadAll: loadAll_1,
-  load: load_1
-};
-var _toString = Object.prototype.toString;
-var _hasOwnProperty = Object.prototype.hasOwnProperty;
 var CHAR_BOM = 65279;
 var CHAR_TAB = 9;
 var CHAR_LINE_FEED = 10;
@@ -147089,89 +144695,48 @@ ESCAPE_SEQUENCES[133] = "\\N";
 ESCAPE_SEQUENCES[160] = "\\_";
 ESCAPE_SEQUENCES[8232] = "\\L";
 ESCAPE_SEQUENCES[8233] = "\\P";
-var DEPRECATED_BOOLEANS_SYNTAX = [
-  "y",
-  "Y",
-  "yes",
-  "Yes",
-  "YES",
-  "on",
-  "On",
-  "ON",
-  "n",
-  "N",
-  "no",
-  "No",
-  "NO",
-  "off",
-  "Off",
-  "OFF"
-];
-var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
-function compileStyleMap(schema2, map2) {
-  var result, keys, index, length, tag, style, type2;
-  if (map2 === null) return {};
-  result = {};
-  keys = Object.keys(map2);
-  for (index = 0, length = keys.length; index < length; index += 1) {
-    tag = keys[index];
-    style = String(map2[tag]);
-    if (tag.slice(0, 2) === "!!") {
-      tag = "tag:yaml.org,2002:" + tag.slice(2);
-    }
-    type2 = schema2.compiledTypeMap["fallback"][tag];
-    if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
-      style = type2.styleAliases[style];
-    }
-    result[tag] = style;
-  }
-  return result;
+var DEFAULT_PRESENTER_OPTIONS = {
+  indent: 2,
+  seqNoIndent: false,
+  seqInlineFirst: true,
+  sortKeys: false,
+  lineWidth: 80,
+  flowBracketPadding: false,
+  flowSkipCommaSpace: false,
+  flowSkipColonSpace: false,
+  quoteFlowKeys: false,
+  quoteStyle: "single",
+  forceQuotes: false,
+  tagBeforeAnchor: false
+};
+function nodeTagShort(node) {
+  return node.style.tagged ? node.tag : tagNameShort(node.tag);
 }
-function encodeHex(character) {
-  var string2, handle, length;
-  string2 = character.toString(16).toUpperCase();
-  if (character <= 255) {
-    handle = "x";
-    length = 2;
-  } else if (character <= 65535) {
-    handle = "u";
-    length = 4;
-  } else if (character <= 4294967295) {
-    handle = "U";
-    length = 8;
-  } else {
-    throw new exception("code point within a string may not be greater than 0xFFFFFFFF");
-  }
-  return "\\" + handle + common.repeat("0", length - string2.length) + string2;
-}
-var QUOTING_TYPE_SINGLE = 1;
-var QUOTING_TYPE_DOUBLE = 2;
-function State(options) {
-  this.schema = options["schema"] || _default;
-  this.indent = Math.max(1, options["indent"] || 2);
-  this.noArrayIndent = options["noArrayIndent"] || false;
-  this.skipInvalid = options["skipInvalid"] || false;
-  this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
-  this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
-  this.sortKeys = options["sortKeys"] || false;
-  this.lineWidth = options["lineWidth"] || 80;
-  this.noRefs = options["noRefs"] || false;
-  this.noCompatMode = options["noCompatMode"] || false;
-  this.condenseFlow = options["condenseFlow"] || false;
-  this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
-  this.forceQuotes = options["forceQuotes"] || false;
-  this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null;
-  this.implicitTypes = this.schema.compiledImplicit;
-  this.explicitTypes = this.schema.compiledExplicit;
-  this.tag = null;
-  this.result = "";
-  this.duplicates = [];
-  this.usedDuplicates = null;
+function createPresenterState(options) {
+  const opts = {
+    ...DEFAULT_PRESENTER_OPTIONS,
+    ...options
+  };
+  return {
+    ...opts,
+    defaultScalarTagName: opts.schema.defaultScalarTag.tagName,
+    implicitResolvers: opts.schema.implicitScalarTags
+  };
+}
+function encodeNonPrintable(character) {
+  const string2 = character.toString(16).toUpperCase();
+  const handle = character <= 255 ? "x" : "u";
+  const length = character <= 255 ? 2 : 4;
+  return `\\${handle}${"0".repeat(length - string2.length)}${string2}`;
 }
 function indentString(string2, spaces) {
-  var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string2.length;
+  const ind = " ".repeat(spaces);
+  let position = 0;
+  let result = "";
+  const length = string2.length;
   while (position < length) {
-    next = string2.indexOf("\n", position);
+    let line;
+    const next = string2.indexOf("\n", position);
     if (next === -1) {
       line = string2.slice(position);
       position = length;
@@ -147185,514 +144750,483 @@ function indentString(string2, spaces) {
   return result;
 }
 function generateNextLine(state, level) {
-  return "\n" + common.repeat(" ", state.indent * level);
+  return `
+${" ".repeat(state.indent * level)}`;
 }
-function testImplicitResolving(state, str2) {
-  var index, length, type2;
-  for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
-    type2 = state.implicitTypes[index];
-    if (type2.resolve(str2)) {
-      return true;
-    }
+function scalarLayout(state, level) {
+  const indent = state.indent * Math.max(1, level);
+  return {
+    indent,
+    blockIndent: level === 0 ? state.indent + 1 : state.indent,
+    lineWidth: state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent)
+  };
+}
+function resolveImplicitTag(state, str) {
+  for (let index2 = 0, length = state.implicitResolvers.length; index2 < length; index2 += 1) {
+    const tagDefinition = state.implicitResolvers[index2];
+    if (tagDefinition.resolve(str, false, tagDefinition.tagName) !== NOT_RESOLVED) return tagDefinition.tagName;
   }
-  return false;
+  return state.defaultScalarTagName;
 }
 function isWhitespace(c) {
   return c === CHAR_SPACE || c === CHAR_TAB;
 }
+function startsWithDocumentSeparator(string2) {
+  const marker = string2.charCodeAt(0);
+  if (marker !== CHAR_MINUS && marker !== 46 || string2.charCodeAt(1) !== marker || string2.charCodeAt(2) !== marker) return false;
+  if (string2.length === 3) return true;
+  const following = string2.charCodeAt(3);
+  return isWhitespace(following) || following === CHAR_CARRIAGE_RETURN || following === CHAR_LINE_FEED;
+}
 function isPrintable(c) {
-  return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
+  return c >= 32 && c <= 126 || c >= 161 && c <= 55295 && c !== 8232 && c !== 8233 || c >= 57344 && c <= 65533 && c !== CHAR_BOM || c >= 65536 && c <= 1114111;
 }
 function isNsCharOrWhitespace(c) {
   return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
 }
 function isPlainSafe(c, prev, inblock) {
-  var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
-  var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
-  return (
-    // ns-plain-safe
-    (inblock ? (
-      // c = flow-in
-      cIsNsCharOrWhitespace
-    ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar
-  );
+  const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
+  const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
+  return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar && (inblock || c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET);
 }
 function isPlainSafeFirst(c) {
   return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
 }
+function isPlainSafeAtStart(string2, inblock) {
+  const first = codePointAt(string2, 0);
+  if (isPlainSafeFirst(first)) return true;
+  if (string2.length > 1 && (first === CHAR_MINUS || first === CHAR_QUESTION || first === CHAR_COLON)) {
+    const second = codePointAt(string2, 1);
+    return !isWhitespace(second) && isPlainSafe(second, first, inblock);
+  }
+  return false;
+}
 function isPlainSafeLast(c) {
   return !isWhitespace(c) && c !== CHAR_COLON;
 }
 function codePointAt(string2, pos) {
-  var first = string2.charCodeAt(pos), second;
+  const first = string2.charCodeAt(pos);
+  let second;
   if (first >= 55296 && first <= 56319 && pos + 1 < string2.length) {
     second = string2.charCodeAt(pos + 1);
-    if (second >= 56320 && second <= 57343) {
-      return (first - 55296) * 1024 + second - 56320 + 65536;
-    }
+    if (second >= 56320 && second <= 57343) return (first - 55296) * 1024 + second - 56320 + 65536;
   }
   return first;
 }
 function needIndentIndicator(string2) {
-  var leadingSpaceRe = /^\n* /;
-  return leadingSpaceRe.test(string2);
+  return /^\n* /.test(string2);
 }
 var STYLE_PLAIN = 1;
 var STYLE_SINGLE = 2;
 var STYLE_LITERAL = 3;
 var STYLE_FOLDED = 4;
 var STYLE_DOUBLE = 5;
-function chooseScalarStyle(string2, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
-  var i;
-  var char = 0;
-  var prevChar = null;
-  var hasLineBreak = false;
-  var hasFoldableLine = false;
-  var shouldTrackWidth = lineWidth !== -1;
-  var previousLineBreak = -1;
-  var plain = isPlainSafeFirst(codePointAt(string2, 0)) && isPlainSafeLast(codePointAt(string2, string2.length - 1));
-  if (singleLineOnly || forceQuotes) {
-    for (i = 0; i < string2.length; char >= 65536 ? i += 2 : i++) {
-      char = codePointAt(string2, i);
-      if (!isPrintable(char)) {
-        return STYLE_DOUBLE;
-      }
-      plain = plain && isPlainSafe(char, prevChar, inblock);
-      prevChar = char;
-    }
-  } else {
+function chooseScalarStyle(state, string2, layout, singleLineOnly, forceQuote, inblock) {
+  const { blockIndent, lineWidth } = layout;
+  let i;
+  let char = 0;
+  let prevChar = -1;
+  let hasLineBreak = false;
+  let hasFoldableLine = false;
+  const shouldTrackWidth = lineWidth !== -1;
+  let previousLineBreak = -1;
+  let plain = !startsWithDocumentSeparator(string2) && isPlainSafeAtStart(string2, inblock) && isPlainSafeLast(codePointAt(string2, string2.length - 1));
+  if (singleLineOnly || forceQuote) for (i = 0; i < string2.length; char >= 65536 ? i += 2 : i++) {
+    char = codePointAt(string2, i);
+    if (!isPrintable(char)) return STYLE_DOUBLE;
+    plain = plain && isPlainSafe(char, prevChar, inblock);
+    prevChar = char;
+  }
+  else {
     for (i = 0; i < string2.length; char >= 65536 ? i += 2 : i++) {
       char = codePointAt(string2, i);
       if (char === CHAR_LINE_FEED) {
         hasLineBreak = true;
         if (shouldTrackWidth) {
-          hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented.
-          i - previousLineBreak - 1 > lineWidth && string2[previousLineBreak + 1] !== " ";
+          hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && !isMoreIndented(string2[previousLineBreak + 1]);
           previousLineBreak = i;
         }
-      } else if (!isPrintable(char)) {
-        return STYLE_DOUBLE;
-      }
+      } else if (!isPrintable(char)) return STYLE_DOUBLE;
       plain = plain && isPlainSafe(char, prevChar, inblock);
       prevChar = char;
     }
-    hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string2[previousLineBreak + 1] !== " ");
+    hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && !isMoreIndented(string2[previousLineBreak + 1]);
   }
   if (!hasLineBreak && !hasFoldableLine) {
-    if (plain && !forceQuotes && !testAmbiguousType(string2)) {
-      return STYLE_PLAIN;
-    }
-    return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
-  }
-  if (indentPerLevel > 9 && needIndentIndicator(string2)) {
-    return STYLE_DOUBLE;
-  }
-  if (!forceQuotes) {
-    return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
-  }
-  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
-}
-function writeScalar(state, string2, level, iskey, inblock) {
-  state.dump = (function() {
-    if (string2.length === 0) {
-      return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
-    }
-    if (!state.noCompatMode) {
-      if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string2) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string2)) {
-        return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string2 + '"' : "'" + string2 + "'";
-      }
-    }
-    var indent = state.indent * Math.max(1, level);
-    var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
-    var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
-    function testAmbiguity(string3) {
-      return testImplicitResolving(state, string3);
-    }
-    switch (chooseScalarStyle(
-      string2,
-      singleLineOnly,
-      state.indent,
-      lineWidth,
-      testAmbiguity,
-      state.quotingType,
-      state.forceQuotes && !iskey,
-      inblock
-    )) {
-      case STYLE_PLAIN:
-        return string2;
-      case STYLE_SINGLE:
-        return "'" + string2.replace(/'/g, "''") + "'";
-      case STYLE_LITERAL:
-        return "|" + blockHeader(string2, state.indent) + dropEndingNewline(indentString(string2, indent));
-      case STYLE_FOLDED:
-        return ">" + blockHeader(string2, state.indent) + dropEndingNewline(indentString(foldString(string2, lineWidth), indent));
-      case STYLE_DOUBLE:
-        return '"' + escapeString(string2) + '"';
-      default:
-        throw new exception("impossible error: invalid scalar style");
-    }
-  })();
+    if (plain && !forceQuote) return STYLE_PLAIN;
+    return state.quoteStyle === "double" ? STYLE_DOUBLE : STYLE_SINGLE;
+  }
+  if (blockIndent > 9 && needIndentIndicator(string2)) return STYLE_DOUBLE;
+  return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
+}
+function renderScalarStyle(string2, style, layout) {
+  const { indent, blockIndent, lineWidth } = layout;
+  switch (style) {
+    case STYLE_PLAIN:
+      return encodeFlowBreaks(string2, indent);
+    case STYLE_SINGLE:
+      return `'${encodeFlowBreaks(string2, indent).replace(/'/g, "''")}'`;
+    case STYLE_LITERAL:
+      return "|" + blockHeader(string2, blockIndent) + dropEndingNewline(indentString(string2, indent));
+    case STYLE_FOLDED:
+      return ">" + blockHeader(string2, blockIndent) + dropEndingNewline(indentString(foldBlockScalar(string2, lineWidth), indent));
+    case STYLE_DOUBLE:
+      return `"${escapeString(string2)}"`;
+  }
+}
+function resolveScalarStyle(state, node, layout, iskey, inblock) {
+  const singleLineOnly = iskey || !inblock;
+  if (node.style.singleQuoted) return STYLE_SINGLE;
+  if (node.style.doubleQuoted) return STYLE_DOUBLE;
+  if (!singleLineOnly) {
+    if (node.style.literal) return STYLE_LITERAL;
+    if (node.style.folded) return STYLE_FOLDED;
+  }
+  const string2 = node.value;
+  if (string2.length === 0) {
+    if (node.style.tagged || resolveImplicitTag(state, string2) === node.tag) return STYLE_PLAIN;
+    return state.quoteStyle === "double" ? STYLE_DOUBLE : STYLE_SINGLE;
+  }
+  const style = chooseScalarStyle(state, string2, layout, singleLineOnly, state.forceQuotes && !iskey, inblock);
+  if (style === STYLE_PLAIN && !node.style.tagged && resolveImplicitTag(state, string2) !== node.tag) return state.quoteStyle === "double" ? STYLE_DOUBLE : STYLE_SINGLE;
+  return style;
 }
 function blockHeader(string2, indentPerLevel) {
-  var indentIndicator = needIndentIndicator(string2) ? String(indentPerLevel) : "";
-  var clip = string2[string2.length - 1] === "\n";
-  var keep = clip && (string2[string2.length - 2] === "\n" || string2 === "\n");
-  var chomp = keep ? "+" : clip ? "" : "-";
-  return indentIndicator + chomp + "\n";
+  const indentIndicator = needIndentIndicator(string2) ? String(indentPerLevel) : "";
+  const clip = string2[string2.length - 1] === "\n";
+  return `${indentIndicator}${clip && (string2[string2.length - 2] === "\n" || string2 === "\n") ? "+" : clip ? "" : "-"}
+`;
+}
+function encodeFlowBreaks(string2, indent) {
+  let nextLF = string2.indexOf("\n");
+  if (nextLF === -1) return string2;
+  const pad = " ".repeat(indent);
+  let result = string2.slice(0, nextLF);
+  const lineRe = /(\n+)([^\n]*)/g;
+  lineRe.lastIndex = nextLF;
+  let match2;
+  while (match2 = lineRe.exec(string2)) {
+    const breaks = match2[1].length;
+    const line = match2[2];
+    result += "\n".repeat(breaks + 1) + pad + line;
+  }
+  return result;
 }
 function dropEndingNewline(string2) {
   return string2[string2.length - 1] === "\n" ? string2.slice(0, -1) : string2;
 }
-function foldString(string2, width) {
-  var lineRe = /(\n+)([^\n]*)/g;
-  var result = (function() {
-    var nextLF = string2.indexOf("\n");
-    nextLF = nextLF !== -1 ? nextLF : string2.length;
-    lineRe.lastIndex = nextLF;
-    return foldLine(string2.slice(0, nextLF), width);
-  })();
-  var prevMoreIndented = string2[0] === "\n" || string2[0] === " ";
-  var moreIndented;
-  var match;
-  while (match = lineRe.exec(string2)) {
-    var prefix = match[1], line = match[2];
-    moreIndented = line[0] === " ";
+function isMoreIndented(char) {
+  return char === " " || char === "	";
+}
+function foldBlockScalar(string2, width) {
+  const lineRe = /(\n+)([^\n]*)/g;
+  let nextLF = string2.indexOf("\n");
+  if (nextLF === -1) nextLF = string2.length;
+  lineRe.lastIndex = nextLF;
+  let result = foldLine(string2.slice(0, nextLF), width);
+  let prevMoreIndented = string2[0] === "\n" || isMoreIndented(string2[0]);
+  let moreIndented;
+  let match2;
+  while (match2 = lineRe.exec(string2)) {
+    const prefix = match2[1];
+    const line = match2[2];
+    moreIndented = line !== "" && isMoreIndented(line[0]);
     result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
     prevMoreIndented = moreIndented;
   }
   return result;
 }
 function foldLine(line, width) {
-  if (line === "" || line[0] === " ") return line;
-  var breakRe = / [^ ]/g;
-  var match;
-  var start = 0, end, curr = 0, next = 0;
-  var result = "";
-  while (match = breakRe.exec(line)) {
-    next = match.index;
+  if (line === "" || isMoreIndented(line[0])) return line;
+  const breakRe = / [^ \t]/g;
+  let match2;
+  let start = 0;
+  let end;
+  let curr = 0;
+  let next = 0;
+  let result = "";
+  while (match2 = breakRe.exec(line)) {
+    next = match2.index;
     if (next - start > width) {
       end = curr > start ? curr : next;
-      result += "\n" + line.slice(start, end);
+      result += `
+${line.slice(start, end)}`;
       start = end + 1;
     }
     curr = next;
   }
   result += "\n";
-  if (line.length - start > width && curr > start) {
-    result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
-  } else {
-    result += line.slice(start);
-  }
+  if (line.length - start > width && curr > start) result += `${line.slice(start, curr)}
+${line.slice(curr + 1)}`;
+  else result += line.slice(start);
   return result.slice(1);
 }
 function escapeString(string2) {
-  var result = "";
-  var char = 0;
-  var escapeSeq;
-  for (var i = 0; i < string2.length; char >= 65536 ? i += 2 : i++) {
+  let result = "";
+  let char = 0;
+  for (let i = 0; i < string2.length; char >= 65536 ? i += 2 : i++) {
     char = codePointAt(string2, i);
-    escapeSeq = ESCAPE_SEQUENCES[char];
-    if (!escapeSeq && isPrintable(char)) {
+    const escapeSeq = ESCAPE_SEQUENCES[char];
+    if (escapeSeq) {
+      result += escapeSeq;
+      continue;
+    }
+    if (isPrintable(char)) {
       result += string2[i];
       if (char >= 65536) result += string2[i + 1];
-    } else {
-      result += escapeSeq || encodeHex(char);
+      continue;
     }
+    result += encodeNonPrintable(char);
   }
   return result;
 }
-function writeFlowSequence(state, level, object) {
-  var _result = "", _tag = state.tag, index, length, value;
-  for (index = 0, length = object.length; index < length; index += 1) {
-    value = object[index];
-    if (state.replacer) {
-      value = state.replacer.call(object, String(index), value);
-    }
-    if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
-      if (_result !== "") _result += "," + (!state.condenseFlow ? " " : "");
-      _result += state.dump;
-    }
+function writeFlowSequence(state, level, node) {
+  let result = "";
+  for (let index2 = 0, length = node.items.length; index2 < length; index2 += 1) {
+    const item = writeNode(state, level, node.items[index2], {});
+    if (result !== "") result += `,${!state.flowSkipCommaSpace ? " " : ""}`;
+    result += item;
+  }
+  const pad = state.flowBracketPadding && result !== "" ? " " : "";
+  return `[${pad}${result}${pad}]`;
+}
+function writeBlockSequence(state, level, node, compact) {
+  let result = "";
+  for (let index2 = 0, length = node.items.length; index2 < length; index2 += 1) {
+    const item = writeNode(state, level + 1, node.items[index2], {
+      block: true,
+      compact: state.seqInlineFirst,
+      isblockseq: true
+    });
+    if (!compact || result !== "") result += generateNextLine(state, level);
+    if (item === "" || CHAR_LINE_FEED === item.charCodeAt(0)) result += "-";
+    else result += "- ";
+    result += item;
   }
-  state.tag = _tag;
-  state.dump = "[" + _result + "]";
+  return result;
 }
-function writeBlockSequence(state, level, object, compact) {
-  var _result = "", _tag = state.tag, index, length, value;
-  for (index = 0, length = object.length; index < length; index += 1) {
-    value = object[index];
-    if (state.replacer) {
-      value = state.replacer.call(object, String(index), value);
-    }
-    if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
-      if (!compact || _result !== "") {
-        _result += generateNextLine(state, level);
-      }
-      if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
-        _result += "-";
-      } else {
-        _result += "- ";
-      }
-      _result += state.dump;
-    }
+function writeFlowMapping(state, level, node) {
+  let result = "";
+  const items = sortMappingItems(state, node.items);
+  for (const { key, value } of items) {
+    let pairBuffer = "";
+    if (result !== "") pairBuffer += `,${!state.flowSkipCommaSpace ? " " : ""}`;
+    const keyText = writeNode(state, level, key, { iskey: true });
+    const explicitPair = keyText.length > 1024;
+    if (explicitPair) pairBuffer += "? ";
+    else if (state.quoteFlowKeys) pairBuffer += '"';
+    const valueText = writeNode(state, level, value, {});
+    const sep7 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
+    pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep7}${valueText}`;
+    result += pairBuffer;
+  }
+  const pad = state.flowBracketPadding && result !== "" ? " " : "";
+  return `{${pad}${result}${pad}}`;
+}
+function sortKeyValue(key) {
+  return key.kind === "scalar" ? key.value : key;
+}
+function sortMappingItems(state, items) {
+  if (!state.sortKeys) return items;
+  const copy = items.slice();
+  if (state.sortKeys === true) copy.sort((a, b) => {
+    const x = sortKeyValue(a.key);
+    const y = sortKeyValue(b.key);
+    if (x < y) return -1;
+    if (x > y) return 1;
+    return 0;
+  });
+  else {
+    const fn = state.sortKeys;
+    copy.sort((a, b) => fn(sortKeyValue(a.key), sortKeyValue(b.key)));
+  }
+  return copy;
+}
+function writeBlockMapping(state, level, node, compact) {
+  let result = "";
+  const items = sortMappingItems(state, node.items);
+  for (let index2 = 0, length = items.length; index2 < length; index2 += 1) {
+    let pairBuffer = "";
+    if (!compact || result !== "") pairBuffer += generateNextLine(state, level);
+    const { key, value } = items[index2];
+    const keyIsBlock = (key.kind === "mapping" || key.kind === "sequence") && !key.style.flow && key.items.length !== 0 || key.kind === "scalar" && (key.style.literal || key.style.folded);
+    const keyText = keyIsBlock ? writeNode(state, level + 1, key, {
+      block: true,
+      compact: true,
+      isblockseq: !cannotBeCompact(state, key, level + 1)
+    }) : writeNode(state, level + 1, key, {
+      block: true,
+      compact: true,
+      iskey: true
+    });
+    const keyHasLineBreak = key.kind === "scalar" && key.value.indexOf("\n") !== -1;
+    const explicitPair = keyIsBlock || keyHasLineBreak || keyText.length > 1024;
+    if (explicitPair) if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) pairBuffer += "?";
+    else pairBuffer += "? ";
+    pairBuffer += keyText;
+    if (explicitPair) pairBuffer += generateNextLine(state, level);
+    const valueText = writeNode(state, level + 1, value, {
+      block: true,
+      compact: explicitPair,
+      isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1)
+    });
+    const keyIsBareProps = key.kind === "scalar" && key.value === "" && keyText !== "" && keyText.charCodeAt(keyText.length - 1) !== CHAR_SINGLE_QUOTE && keyText.charCodeAt(keyText.length - 1) !== CHAR_DOUBLE_QUOTE;
+    const keyColonSep = !explicitPair && (key.kind === "alias" || keyIsBareProps) ? " " : "";
+    if (valueText === "" || CHAR_LINE_FEED === valueText.charCodeAt(0)) pairBuffer += `${keyColonSep}:`;
+    else pairBuffer += `${keyColonSep}: `;
+    pairBuffer += valueText;
+    result += pairBuffer;
   }
-  state.tag = _tag;
-  state.dump = _result || "[]";
+  return result;
 }
-function writeFlowMapping(state, level, object) {
-  var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
-  for (index = 0, length = objectKeyList.length; index < length; index += 1) {
-    pairBuffer = "";
-    if (_result !== "") pairBuffer += ", ";
-    if (state.condenseFlow) pairBuffer += '"';
-    objectKey = objectKeyList[index];
-    objectValue = object[objectKey];
-    if (state.replacer) {
-      objectValue = state.replacer.call(object, objectKey, objectValue);
-    }
-    if (!writeNode(state, level, objectKey, false, false)) {
-      continue;
-    }
-    if (state.dump.length > 1024) pairBuffer += "? ";
-    pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
-    if (!writeNode(state, level, objectValue, false, false)) {
-      continue;
-    }
-    pairBuffer += state.dump;
-    _result += pairBuffer;
-  }
-  state.tag = _tag;
-  state.dump = "{" + _result + "}";
+function cannotBeCompact(state, node, level) {
+  return node.style.tagged || node.anchor !== void 0 || state.indent < 2 && level > 0;
 }
-function writeBlockMapping(state, level, object, compact) {
-  var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
-  if (state.sortKeys === true) {
-    objectKeyList.sort();
-  } else if (typeof state.sortKeys === "function") {
-    objectKeyList.sort(state.sortKeys);
-  } else if (state.sortKeys) {
-    throw new exception("sortKeys must be a boolean or a function");
-  }
-  for (index = 0, length = objectKeyList.length; index < length; index += 1) {
-    pairBuffer = "";
-    if (!compact || _result !== "") {
-      pairBuffer += generateNextLine(state, level);
-    }
-    objectKey = objectKeyList[index];
-    objectValue = object[objectKey];
-    if (state.replacer) {
-      objectValue = state.replacer.call(object, objectKey, objectValue);
-    }
-    if (!writeNode(state, level + 1, objectKey, true, true, true)) {
-      continue;
-    }
-    explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
-    if (explicitPair) {
-      if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
-        pairBuffer += "?";
-      } else {
-        pairBuffer += "? ";
-      }
-    }
-    pairBuffer += state.dump;
-    if (explicitPair) {
-      pairBuffer += generateNextLine(state, level);
-    }
-    if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
-      continue;
-    }
-    if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
-      pairBuffer += ":";
+function writeNode(state, level, node, ctx) {
+  if (node.kind === "alias") return `*${node.anchor}`;
+  const { block = false, iskey = false, isblockseq = false } = ctx;
+  let compact = ctx.compact ?? false;
+  const hasAnchor = node.anchor !== void 0;
+  if (cannotBeCompact(state, node, level)) compact = false;
+  let body;
+  let shouldPrintTag = node.style.tagged;
+  const useBlockCollection = block && (node.kind === "mapping" || node.kind === "sequence") && !node.style.flow && node.items.length !== 0;
+  if (node.kind === "mapping") if (useBlockCollection) body = writeBlockMapping(state, level, node, compact);
+  else body = writeFlowMapping(state, level, node);
+  else if (node.kind === "sequence") if (useBlockCollection) if (state.seqNoIndent && !isblockseq && level > 0) body = writeBlockSequence(state, level - 1, node, compact);
+  else body = writeBlockSequence(state, level, node, compact);
+  else body = writeFlowSequence(state, level, node);
+  else {
+    const layout = scalarLayout(state, level);
+    const style = resolveScalarStyle(state, node, layout, iskey, block);
+    body = renderScalarStyle(node.value, style, layout);
+    shouldPrintTag = node.style.tagged || style !== STYLE_PLAIN && node.tag !== state.defaultScalarTagName;
+  }
+  if (useBlockCollection && compact && level > 0 && state.indent > 2) body = `${" ".repeat(state.indent - 2)}${body}`;
+  if (shouldPrintTag || hasAnchor) {
+    const props = [];
+    const tag = shouldPrintTag ? nodeTagShort(node) : null;
+    const anchor = hasAnchor ? `&${node.anchor}` : null;
+    if (state.tagBeforeAnchor) {
+      if (tag !== null) props.push(tag);
+      if (anchor !== null) props.push(anchor);
     } else {
-      pairBuffer += ": ";
-    }
-    pairBuffer += state.dump;
-    _result += pairBuffer;
-  }
-  state.tag = _tag;
-  state.dump = _result || "{}";
-}
-function detectType(state, object, explicit) {
-  var _result, typeList, index, length, type2, style;
-  typeList = explicit ? state.explicitTypes : state.implicitTypes;
-  for (index = 0, length = typeList.length; index < length; index += 1) {
-    type2 = typeList[index];
-    if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) {
-      if (explicit) {
-        if (type2.multi && type2.representName) {
-          state.tag = type2.representName(object);
-        } else {
-          state.tag = type2.tag;
-        }
-      } else {
-        state.tag = "?";
-      }
-      if (type2.represent) {
-        style = state.styleMap[type2.tag] || type2.defaultStyle;
-        if (_toString.call(type2.represent) === "[object Function]") {
-          _result = type2.represent(object, style);
-        } else if (_hasOwnProperty.call(type2.represent, style)) {
-          _result = type2.represent[style](object, style);
-        } else {
-          throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style');
-        }
-        state.dump = _result;
-      }
-      return true;
+      if (anchor !== null) props.push(anchor);
+      if (tag !== null) props.push(tag);
     }
+    const sep7 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
+    body = `${props.join(" ")}${sep7}${body}`;
   }
-  return false;
+  return body;
 }
-function writeNode(state, level, object, block, compact, iskey, isblockseq) {
-  state.tag = null;
-  state.dump = object;
-  if (!detectType(state, object, false)) {
-    detectType(state, object, true);
-  }
-  var type2 = _toString.call(state.dump);
-  var inblock = block;
-  var tagStr;
-  if (block) {
-    block = state.flowLevel < 0 || state.flowLevel > level;
-  }
-  var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate;
-  if (objectOrArray) {
-    duplicateIndex = state.duplicates.indexOf(object);
-    duplicate = duplicateIndex !== -1;
-  }
-  if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
-    compact = false;
-  }
-  if (duplicate && state.usedDuplicates[duplicateIndex]) {
-    state.dump = "*ref_" + duplicateIndex;
-  } else {
-    if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
-      state.usedDuplicates[duplicateIndex] = true;
-    }
-    if (type2 === "[object Object]") {
-      if (block && Object.keys(state.dump).length !== 0) {
-        writeBlockMapping(state, level, state.dump, compact);
-        if (duplicate) {
-          state.dump = "&ref_" + duplicateIndex + state.dump;
-        }
-      } else {
-        writeFlowMapping(state, level, state.dump);
-        if (duplicate) {
-          state.dump = "&ref_" + duplicateIndex + " " + state.dump;
-        }
-      }
-    } else if (type2 === "[object Array]") {
-      if (block && state.dump.length !== 0) {
-        if (state.noArrayIndent && !isblockseq && level > 0) {
-          writeBlockSequence(state, level - 1, state.dump, compact);
-        } else {
-          writeBlockSequence(state, level, state.dump, compact);
-        }
-        if (duplicate) {
-          state.dump = "&ref_" + duplicateIndex + state.dump;
-        }
-      } else {
-        writeFlowSequence(state, level, state.dump);
-        if (duplicate) {
-          state.dump = "&ref_" + duplicateIndex + " " + state.dump;
-        }
-      }
-    } else if (type2 === "[object String]") {
-      if (state.tag !== "?") {
-        writeScalar(state, state.dump, level, iskey, inblock);
-      }
-    } else if (type2 === "[object Undefined]") {
-      return false;
-    } else {
-      if (state.skipInvalid) return false;
-      throw new exception("unacceptable kind of an object to dump " + type2);
-    }
-    if (state.tag !== null && state.tag !== "?") {
-      tagStr = encodeURI(
-        state.tag[0] === "!" ? state.tag.slice(1) : state.tag
-      ).replace(/!/g, "%21");
-      if (state.tag[0] === "!") {
-        tagStr = "!" + tagStr;
-      } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
-        tagStr = "!!" + tagStr.slice(18);
-      } else {
-        tagStr = "!<" + tagStr + ">";
-      }
-      state.dump = tagStr + " " + state.dump;
-    }
-  }
-  return true;
+function rootStartsOwnLine(node) {
+  return (node.kind === "sequence" || node.kind === "mapping") && !node.style.flow && node.items.length !== 0 && !node.style.tagged && node.anchor === void 0;
 }
-function getDuplicateReferences(object, state) {
-  var objects = [], duplicatesIndexes = [], index, length;
-  inspectNode(object, objects, duplicatesIndexes);
-  for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
-    state.duplicates.push(objects[duplicatesIndexes[index]]);
-  }
-  state.usedDuplicates = new Array(length);
+function isOpenEnded(node) {
+  let leaf = node;
+  while ((leaf.kind === "sequence" || leaf.kind === "mapping") && !leaf.style.flow && leaf.items.length !== 0) leaf = leaf.kind === "sequence" ? leaf.items[leaf.items.length - 1] : leaf.items[leaf.items.length - 1].value;
+  if (leaf.kind !== "scalar" || !(leaf.style.literal || leaf.style.folded)) return false;
+  const { value } = leaf;
+  return value.endsWith("\n\n") || value === "\n";
 }
-function inspectNode(object, objects, duplicatesIndexes) {
-  var objectKeyList, index, length;
-  if (object !== null && typeof object === "object") {
-    index = objects.indexOf(object);
-    if (index !== -1) {
-      if (duplicatesIndexes.indexOf(index) === -1) {
-        duplicatesIndexes.push(index);
-      }
-    } else {
-      objects.push(object);
-      if (Array.isArray(object)) {
-        for (index = 0, length = object.length; index < length; index += 1) {
-          inspectNode(object[index], objects, duplicatesIndexes);
-        }
-      } else {
-        objectKeyList = Object.keys(object);
-        for (index = 0, length = objectKeyList.length; index < length; index += 1) {
-          inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
-        }
-      }
+function writeDocumentDirectives(doc) {
+  let result = "";
+  for (const directive of doc.directives) {
+    if (directive.kind === "yaml") {
+      result += `%YAML ${directive.version}
+`;
+      continue;
     }
+    const { handle, prefix } = directive;
+    result += `%TAG ${handle} ${prefix}
+`;
   }
+  return result;
 }
-function dump$1(input, options) {
-  options = options || {};
-  var state = new State(options);
-  if (!state.noRefs) getDuplicateReferences(input, state);
-  var value = input;
-  if (state.replacer) {
-    value = state.replacer.call({ "": value }, "", value);
+function present(documents, options) {
+  const state = createPresenterState(options);
+  let result = "";
+  let previousEnded = false;
+  for (let index2 = 0; index2 < documents.length; index2 += 1) {
+    const doc = documents[index2];
+    const directives = writeDocumentDirectives(doc);
+    const hasDirectives = directives !== "";
+    const marker = doc.explicitStart || hasDirectives || index2 > 0 && !previousEnded;
+    result += directives;
+    if (doc.contents === null) {
+      if (marker) result += "---\n";
+    } else if (marker) {
+      const body = writeNode(state, 0, doc.contents, {
+        block: true,
+        compact: true
+      });
+      const sep7 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
+      result += `---${sep7}${body}
+`;
+    } else result += writeNode(state, 0, doc.contents, {
+      block: true,
+      compact: true
+    }) + "\n";
+    previousEnded = doc.explicitEnd || doc.contents !== null && isOpenEnded(doc.contents);
+    if (previousEnded) result += "...\n";
   }
-  if (writeNode(state, 0, value, true, true)) return state.dump + "\n";
-  return "";
+  return result;
 }
-var dump_1 = dump$1;
-var dumper = {
-  dump: dump_1
+var DEFAULT_DUMP_SCHEMA = YAML11_SCHEMA.withTags({
+  ...intYaml11Tag,
+  resolve: (source, isExplicit, tagName) => {
+    const result = intYaml11Tag.resolve(source, isExplicit, tagName);
+    return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result;
+  }
+}, {
+  ...floatYaml11Tag,
+  resolve: (source, isExplicit, tagName) => {
+    const result = floatYaml11Tag.resolve(source, isExplicit, tagName);
+    return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result;
+  }
+});
+var DEFAULT_DUMP_OPTIONS = {
+  ...DEFAULT_PRESENTER_OPTIONS,
+  schema: DEFAULT_DUMP_SCHEMA,
+  skipInvalid: false,
+  noRefs: false,
+  flowLevel: -1,
+  transform: () => {
+  }
 };
-function renamed(from, to) {
-  return function() {
-    throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
+function dump(input, options = {}) {
+  const opts = {
+    ...DEFAULT_DUMP_OPTIONS,
+    ...options
   };
+  const documents = jsToAst(input, opts.schema, {
+    noRefs: opts.noRefs,
+    skipInvalid: opts.skipInvalid
+  });
+  if (opts.flowLevel >= 0) visit(documents, (node, ctx) => {
+    if (ctx.depth < opts.flowLevel) return;
+    node.style.flow = true;
+    return VISIT_SKIP;
+  });
+  opts.transform(documents);
+  return present(documents, {
+    ...pick(opts, Object.keys(DEFAULT_PRESENTER_OPTIONS)),
+    schema: opts.schema
+  });
 }
-var load = loader.load;
-var loadAll = loader.loadAll;
-var dump = dumper.dump;
-var YAMLException = exception;
-var safeLoad = renamed("safeLoad", "load");
-var safeLoadAll = renamed("safeLoadAll", "loadAll");
-var safeDump = renamed("safeDump", "dump");
 
 // src/util.ts
 var semver = __toESM(require_semver2());
 
 // src/api-compatibility.json
 var maximumVersion = "3.22";
-var minimumVersion = "3.16";
+var minimumVersion = "3.17";
 
 // src/json/index.ts
 function parseString(data) {
   return JSON.parse(data);
 }
-function isObject2(value) {
+function isObject(value) {
   return typeof value === "object" && value !== null && !Array.isArray(value);
 }
 function isArray(value) {
@@ -147701,35 +145235,173 @@ function isArray(value) {
 function isString(value) {
   return typeof value === "string";
 }
+function isNumber(value) {
+  return typeof value === "number";
+}
+function isBoolean(value) {
+  return typeof value === "boolean";
+}
 function isStringOrUndefined(value) {
   return value === void 0 || isString(value);
 }
-var string = {
-  validate: isString,
-  required: true
-};
-function optional(validator) {
+function defaultCheck(validate2) {
+  return (arg) => ({ unknownKeys: [], invalidKeys: [], valid: validate2(arg) });
+}
+function makeValidator(validate2) {
+  return {
+    validate: validate2,
+    check: defaultCheck(validate2),
+    required: true
+  };
+}
+var string = makeValidator(isString);
+var number = makeValidator(isNumber);
+var boolean = makeValidator(isBoolean);
+function array(validator) {
+  const validate2 = (val) => {
+    return isArray(val) && val.every((e) => validator.validate(e));
+  };
+  return {
+    validate: validate2,
+    check: (val, opts, path29) => {
+      const result = successfulCheckSchema();
+      if (!isArray(val)) {
+        result.valid = false;
+        return result;
+      }
+      let index2 = 0;
+      for (const e of val) {
+        const elementPath = `${path29}[${index2}]`;
+        const eResult = validator.check(e, opts, `${elementPath}`);
+        result.invalidKeys.push(...eResult.invalidKeys);
+        result.unknownKeys.push(...eResult.unknownKeys);
+        index2++;
+        if (!eResult.valid) {
+          result.valid = false;
+          if (eResult.invalidKeys.length === 0) {
+            result.invalidKeys.push(elementPath);
+          }
+          if (opts.failFast) {
+            return result;
+          }
+          continue;
+        }
+      }
+      return result;
+    },
+    required: true
+  };
+}
+function object(schema) {
+  return {
+    validate: (val) => {
+      return isObject(val) && validateSchema(schema, val);
+    },
+    check: (val, opts, path29) => {
+      if (!isObject(val)) {
+        return invalidCheckSchema();
+      }
+      return checkSchema(schema, val, opts, path29);
+    },
+    required: true
+  };
+}
+function optionalOrNull(validator) {
   return {
     validate: (val) => {
       return val === void 0 || val === null || validator.validate(val);
     },
+    check: (val, opts, path29) => {
+      if (val === void 0 || val === null) {
+        return successfulCheckSchema();
+      }
+      return validator.check(val, opts, path29);
+    },
     required: false
   };
 }
-function validateSchema(schema2, obj) {
-  for (const [key, validator] of Object.entries(schema2)) {
+function optional(validator) {
+  return {
+    validate: (val) => {
+      return val === void 0 || validator.validate(val);
+    },
+    check: (val, opts, path29) => {
+      if (val === void 0) {
+        return successfulCheckSchema();
+      }
+      return validator.check(val, opts, path29);
+    },
+    required: false
+  };
+}
+function validateSchema(schema, obj) {
+  const result = checkSchema(schema, obj, { failFast: true });
+  return result.valid;
+}
+function validateArray(elementSchema, arr) {
+  const elementValidator = object(elementSchema);
+  return array(elementValidator).validate(arr);
+}
+function successfulCheckSchema() {
+  return {
+    valid: true,
+    unknownKeys: [],
+    invalidKeys: []
+  };
+}
+function invalidCheckSchema() {
+  return {
+    valid: false,
+    unknownKeys: [],
+    invalidKeys: []
+  };
+}
+function checkSchema(schema, obj, options = {}, path29 = "") {
+  const result = successfulCheckSchema();
+  const inputKeys = new Set(Object.keys(obj));
+  const invalidKeys = /* @__PURE__ */ new Set();
+  for (const [key, validator] of Object.entries(schema)) {
     const hasKey = key in obj;
+    inputKeys.delete(key);
+    invalidKeys.add(key);
     if (validator.required && !hasKey) {
-      return false;
+      result.valid = false;
+      if (options.failFast) {
+        break;
+      }
+      continue;
     }
     if (validator.required && (obj[key] === void 0 || obj[key] === null)) {
-      return false;
+      result.valid = false;
+      if (options.failFast) {
+        break;
+      }
+      continue;
     }
-    if (hasKey && !validator.validate(obj[key])) {
-      return false;
+    if (hasKey) {
+      const checkResult = validator.check(obj[key], options, `${path29}.${key}`);
+      result.unknownKeys.push(...checkResult.unknownKeys);
+      result.invalidKeys.push(...checkResult.invalidKeys);
+      if (checkResult.invalidKeys.length > 0) {
+        invalidKeys.delete(key);
+      }
+      if (!checkResult.valid) {
+        result.valid = false;
+        if (options.failFast) {
+          break;
+        }
+        continue;
+      }
     }
+    invalidKeys.delete(key);
   }
-  return true;
+  for (const remainingKey of inputKeys) {
+    result.unknownKeys.push(`${path29}.${remainingKey}`);
+  }
+  for (const invalidKey of invalidKeys) {
+    result.invalidKeys.push(`${path29}.${invalidKey}`);
+  }
+  return result;
 }
 
 // src/util.ts
@@ -148001,7 +145673,7 @@ function checkGitHubVersionInRange(version, logger) {
     );
   }
   hasBeenWarnedAboutVersion = true;
-  core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true);
+  core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true);
 }
 function apiVersionInRange(version, minimumVersion2, maximumVersion2) {
   if (!semver.satisfies(version, `>=${minimumVersion2}`)) {
@@ -148023,25 +145695,11 @@ function assertNever(value) {
   throw new ExhaustivityCheckingError(value);
 }
 function initializeEnvironment(version) {
-  core3.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false");
-  core3.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false");
-  core3.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true");
-  core3.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true");
-  core3.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version);
-}
-function getRequiredEnvParam(paramName) {
-  const value = process.env[paramName];
-  if (value === void 0 || value.length === 0) {
-    throw new Error(`${paramName} environment variable must be set`);
-  }
-  return value;
-}
-function getOptionalEnvVar(paramName) {
-  const value = process.env[paramName];
-  if (value?.trim().length === 0) {
-    return void 0;
-  }
-  return value;
+  core2.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false");
+  core2.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false");
+  core2.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true");
+  core2.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true");
+  core2.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version);
 }
 var HTTPError = class extends Error {
   status;
@@ -148053,7 +145711,7 @@ var HTTPError = class extends Error {
 var ConfigurationError = class extends Error {
 };
 function asHTTPError(arg) {
-  if (!isObject2(arg) || !isString(arg.message)) {
+  if (!isObject(arg) || !isString(arg.message)) {
     return void 0;
   }
   if (Number.isInteger(arg.status)) {
@@ -148078,7 +145736,7 @@ function cacheCodeQlVersion(cmd, version) {
     throw new Error("cacheCodeQlVersion() should be called only once");
   }
   cachedCodeQlVersion = version;
-  core3.exportVariable(
+  core2.exportVariable(
     "CODEQL_ACTION_CLI_VERSION_INFO" /* CODEQL_VERSION_INFO */,
     JSON.stringify({ cmd, version })
   );
@@ -148135,8 +145793,8 @@ async function bundleDb(config, language, codeql, dbName, { includeDiagnostics }
 }
 async function delay(milliseconds, opts) {
   const { allowProcessExit } = opts || {};
-  return new Promise((resolve13) => {
-    const timer = setTimeout(resolve13, milliseconds);
+  return new Promise((resolve14) => {
+    const timer = setTimeout(resolve14, milliseconds);
     if (allowProcessExit) {
       timer.unref();
     }
@@ -148213,7 +145871,7 @@ async function waitForResultWithTimeLimit(timeoutMs, promise, onTimeout) {
 }
 async function checkForTimeout() {
   if (hadTimeout === true) {
-    core3.info(
+    core2.info(
       "A timeout occurred, force exiting the process after 30 seconds to prevent hanging."
     );
     await delay(3e4, { allowProcessExit: true });
@@ -148258,7 +145916,7 @@ async function checkDiskUsage(logger) {
       } else {
         logger.debug(message);
       }
-      core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true");
+      core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true");
     }
     return {
       numAvailableBytes: diskUsage.bavail * blockSizeInBytes,
@@ -148278,20 +145936,20 @@ function checkActionVersion(version, githubVersion) {
       semver.coerce(githubVersion.version) ?? "0.0.0",
       ">=3.20"
     )) {
-      core3.warning(
+      core2.warning(
         "CodeQL Action v3 will be deprecated in December 2026. Please update all occurrences of the CodeQL Action in your workflow files to v4. For more information, see https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/"
       );
-      core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true");
+      core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true");
     }
   }
 }
-function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) {
+function satisfiesGHESVersion(ghesVersion, range2, defaultIfInvalid) {
   const semverVersion = semver.coerce(ghesVersion);
   if (semverVersion === null) {
     return defaultIfInvalid;
   }
   semverVersion.prerelease = [];
-  return semver.satisfies(semverVersion, range);
+  return semver.satisfies(semverVersion, range2);
 }
 var BuildMode = /* @__PURE__ */ ((BuildMode3) => {
   BuildMode3["None"] = "none";
@@ -148313,38 +145971,38 @@ async function cleanUpPath(file, name, logger) {
     logger.warning(`Failed to clean up ${name}: ${e}.`);
   }
 }
-async function isBinaryAccessible(binary2, logger) {
+async function isBinaryAccessible(binary, logger) {
   try {
-    await io.which(binary2, true);
-    logger.debug(`Found ${binary2}.`);
+    await io.which(binary, true);
+    logger.debug(`Found ${binary}.`);
     return true;
   } catch (e) {
-    logger.debug(`Could not find ${binary2}: ${e}`);
+    logger.debug(`Could not find ${binary}: ${e}`);
     return false;
   }
 }
-async function asyncFilter(array, predicate) {
-  const results = await Promise.all(array.map(predicate));
-  return array.filter((_2, index) => results[index]);
+async function asyncFilter(array2, predicate) {
+  const results = await Promise.all(array2.map(predicate));
+  return array2.filter((_2, index2) => results[index2]);
 }
-async function asyncSome(array, predicate) {
-  const results = await Promise.all(array.map(predicate));
+async function asyncSome(array2, predicate) {
+  const results = await Promise.all(array2.map(predicate));
   return results.some((result) => result);
 }
 function isDefined2(value) {
   return value !== void 0 && value !== null;
 }
-function unsafeEntriesInvariant(object) {
-  return Object.entries(object).filter(
+function unsafeEntriesInvariant(object2) {
+  return Object.entries(object2).filter(
     ([_2, val]) => val !== void 0
   );
 }
-function joinAtMost(array, separator, limit) {
-  if (limit > 0 && array.length > limit) {
-    array = array.slice(0, limit);
-    array.push("...");
+function joinAtMost(array2, separator, limit) {
+  if (limit > 0 && array2.length > limit) {
+    array2 = array2.slice(0, limit);
+    array2.push("...");
   }
-  return array.join(separator);
+  return array2.join(separator);
 }
 var Success = class {
   constructor(value) {
@@ -148378,42 +146036,48 @@ var Failure = class {
 };
 
 // src/actions-util.ts
+function getActionsEnv() {
+  return {
+    getRequiredInput,
+    getOptionalInput,
+    exportVariable: core3.exportVariable
+  };
+}
 var getRequiredInput = function(name) {
-  const value = core4.getInput(name);
+  const value = core3.getInput(name);
   if (!value) {
     throw new ConfigurationError(`Input required and not supplied: ${name}`);
   }
   return value;
 };
 var getOptionalInput = function(name) {
-  const value = core4.getInput(name);
+  const value = core3.getInput(name);
   return value.length > 0 ? value : void 0;
 };
-function getTemporaryDirectory() {
-  const value = process.env["CODEQL_ACTION_TEMP"];
-  return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP");
+function getTemporaryDirectory(env = getEnv()) {
+  return env.getOptional("CODEQL_ACTION_TEMP" /* TEMP */) ?? env.getRequired("RUNNER_TEMP" /* RUNNER_TEMP */);
 }
 var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json";
-function getDiffRangesJsonFilePath() {
-  return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME);
+function getDiffRangesJsonFilePath(env = getEnv()) {
+  return path2.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME);
 }
 function getActionVersion() {
-  return "4.36.2";
+  return "4.37.7";
 }
-function getWorkflowEventName() {
-  return getRequiredEnvParam("GITHUB_EVENT_NAME");
+function getWorkflowEventName(env = getEnv()) {
+  return env.getRequired("GITHUB_EVENT_NAME" /* GITHUB_EVENT_NAME */);
 }
-function isRunningLocalAction() {
-  const relativeScriptPath = getRelativeScriptPath();
+function isRunningLocalAction(env = getEnv()) {
+  const relativeScriptPath = getRelativeScriptPath(env);
   return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath);
 }
-function getRelativeScriptPath() {
-  const runnerTemp = getRequiredEnvParam("RUNNER_TEMP");
+function getRelativeScriptPath(env) {
+  const runnerTemp = env.getRequired("RUNNER_TEMP" /* RUNNER_TEMP */);
   const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions");
   return path2.relative(actionsDirectory, __filename);
 }
-function getWorkflowEvent() {
-  const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH");
+function getWorkflowEvent(env = getEnv()) {
+  const eventJsonFile = env.getRequired("GITHUB_EVENT_PATH" /* GITHUB_EVENT_PATH */);
   try {
     return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8"));
   } catch (e) {
@@ -148427,22 +146091,22 @@ async function printDebugLogs(config) {
     const databaseDirectory = getCodeQLDatabasePath(config, language);
     const logsDirectory = path2.join(databaseDirectory, "log");
     if (!doesDirectoryExist(logsDirectory)) {
-      core4.info(`Directory ${logsDirectory} does not exist.`);
+      core3.info(`Directory ${logsDirectory} does not exist.`);
       continue;
     }
     const walkLogFiles = (dir) => {
       const entries = fs2.readdirSync(dir, { withFileTypes: true });
       if (entries.length === 0) {
-        core4.info(`No debug logs found at directory ${logsDirectory}.`);
+        core3.info(`No debug logs found at directory ${logsDirectory}.`);
       }
       for (const entry of entries) {
         if (entry.isFile()) {
           const absolutePath = path2.resolve(dir, entry.name);
-          core4.startGroup(
+          core3.startGroup(
             `CodeQL Debug Logs - ${language} - ${entry.name} from file at path ${absolutePath}`
           );
           process.stdout.write(fs2.readFileSync(absolutePath));
-          core4.endGroup();
+          core3.endGroup();
         } else if (entry.isDirectory()) {
           walkLogFiles(path2.resolve(dir, entry.name));
         }
@@ -148463,38 +146127,40 @@ function getUploadValue(input) {
     case "never":
       return "never";
     default:
-      core4.warning(
+      core3.warning(
         `Unrecognized 'upload' input to 'analyze' Action: ${input}. Defaulting to 'always'.`
       );
       return "always";
   }
 }
-function getWorkflowRunID() {
-  const workflowRunIdString = getRequiredEnvParam("GITHUB_RUN_ID");
+function getWorkflowRunID(env = getEnv()) {
+  const workflowRunIdString = env.getRequired("GITHUB_RUN_ID" /* GITHUB_RUN_ID */);
   const workflowRunID = parseInt(workflowRunIdString, 10);
   if (Number.isNaN(workflowRunID)) {
     throw new Error(
-      `GITHUB_RUN_ID must define a non NaN workflow run ID. Current value is ${workflowRunIdString}`
+      `${"GITHUB_RUN_ID" /* GITHUB_RUN_ID */} must define a non NaN workflow run ID. Current value is ${workflowRunIdString}`
     );
   }
   if (workflowRunID < 0) {
     throw new Error(
-      `GITHUB_RUN_ID must be a non-negative integer. Current value is ${workflowRunIdString}`
+      `${"GITHUB_RUN_ID" /* GITHUB_RUN_ID */} must be a non-negative integer. Current value is ${workflowRunIdString}`
     );
   }
   return workflowRunID;
 }
-function getWorkflowRunAttempt() {
-  const workflowRunAttemptString = getRequiredEnvParam("GITHUB_RUN_ATTEMPT");
+function getWorkflowRunAttempt(env = getEnv()) {
+  const workflowRunAttemptString = env.getRequired(
+    "GITHUB_RUN_ATTEMPT" /* GITHUB_RUN_ATTEMPT */
+  );
   const workflowRunAttempt = parseInt(workflowRunAttemptString, 10);
   if (Number.isNaN(workflowRunAttempt)) {
     throw new Error(
-      `GITHUB_RUN_ATTEMPT must define a non NaN workflow run attempt. Current value is ${workflowRunAttemptString}`
+      `${"GITHUB_RUN_ATTEMPT" /* GITHUB_RUN_ATTEMPT */} must define a non NaN workflow run attempt. Current value is ${workflowRunAttemptString}`
     );
   }
   if (workflowRunAttempt <= 0) {
     throw new Error(
-      `GITHUB_RUN_ATTEMPT must be a positive integer. Current value is ${workflowRunAttemptString}`
+      `${"GITHUB_RUN_ATTEMPT" /* GITHUB_RUN_ATTEMPT */} must be a positive integer. Current value is ${workflowRunAttemptString}`
     );
   }
   return workflowRunAttempt;
@@ -148530,20 +146196,20 @@ var getFileType = async (filePath) => {
     }).exec();
     return stdout.trim();
   } catch (e) {
-    core4.info(
+    core3.info(
       `Could not determine type of ${filePath} from ${stdout}. ${stderr}`
     );
     throw e;
   }
 };
-function isSelfHostedRunner() {
-  return process.env.RUNNER_ENVIRONMENT === "self-hosted";
+function isSelfHostedRunner(env = getEnv()) {
+  return env.getOptional("RUNNER_ENVIRONMENT" /* RUNNER_ENVIRONMENT */) === "self-hosted";
 }
-function isDynamicWorkflow() {
-  return getWorkflowEventName() === "dynamic";
+function isDynamicWorkflow(env = getEnv()) {
+  return getWorkflowEventName(env) === "dynamic";
 }
-function isDefaultSetup() {
-  return isDynamicWorkflow();
+function isDefaultSetup(env = getEnv()) {
+  return isDynamicWorkflow(env);
 }
 function prettyPrintInvocation(cmd, args) {
   return [cmd, ...args].map((x) => x.includes(" ") ? `'${x}'` : x).join(" ");
@@ -148607,21 +146273,22 @@ async function runTool(cmd, args = [], opts = {}) {
   return stdout;
 }
 var persistedInputsKey = "persisted_inputs";
-var persistInputs = function() {
-  const inputEnvironmentVariables = Object.entries(process.env).filter(
+var persistInputs = function(env = getEnv()) {
+  const entries = env.entries();
+  const inputEnvironmentVariables = entries.filter(
     ([name]) => name.startsWith("INPUT_")
   );
-  core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
+  core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
 };
 var restoreInputs = function() {
-  const persistedInputs = core4.getState(persistedInputsKey);
+  const persistedInputs = core3.getState(persistedInputsKey);
   if (persistedInputs) {
     for (const [name, value] of JSON.parse(persistedInputs)) {
       process.env[name] = value;
     }
   }
 };
-function getPullRequestBranches() {
+function getPullRequestBranches(env = getEnv()) {
   const pullRequest = github.context.payload.pull_request;
   if (pullRequest) {
     return {
@@ -148632,8 +146299,10 @@ function getPullRequestBranches() {
       head: pullRequest.head.label
     };
   }
-  const codeScanningRef = process.env.CODE_SCANNING_REF;
-  const codeScanningBaseBranch = process.env.CODE_SCANNING_BASE_BRANCH;
+  const codeScanningRef = env.getOptional("CODE_SCANNING_REF" /* CODE_SCANNING_REF */);
+  const codeScanningBaseBranch = env.getOptional(
+    "CODE_SCANNING_BASE_BRANCH" /* CODE_SCANNING_BASE_BRANCH */
+  );
   if (codeScanningRef && codeScanningBaseBranch) {
     return {
       base: codeScanningBaseBranch,
@@ -148644,8 +146313,8 @@ function getPullRequestBranches() {
   }
   return void 0;
 }
-function isAnalyzingPullRequest() {
-  return getPullRequestBranches() !== void 0;
+function isAnalyzingPullRequest(env = getEnv()) {
+  return getPullRequestBranches(env) !== void 0;
 }
 var qualityCategoryMapping = {
   "c#": "csharp",
@@ -148657,8 +146326,8 @@ var qualityCategoryMapping = {
   typescript: "javascript-typescript",
   kotlin: "java-kotlin"
 };
-function fixCodeQualityCategory(logger, category) {
-  if (category !== void 0 && isDefaultSetup() && category.startsWith("/language:")) {
+function fixCodeQualityCategory(logger, category, env = getEnv()) {
+  if (category !== void 0 && isDefaultSetup(env) && category.startsWith("/language:")) {
     const language = category.substring("/language:".length);
     const mappedLanguage = qualityCategoryMapping[language];
     if (mappedLanguage) {
@@ -148672,10 +146341,103 @@ function fixCodeQualityCategory(logger, category) {
   return category;
 }
 
-// src/feature-flags.ts
-var fs5 = __toESM(require("fs"));
-var path5 = __toESM(require("path"));
-var semver4 = __toESM(require_semver2());
+// src/logging.ts
+var core4 = __toESM(require_core());
+function getActionsLogger() {
+  return {
+    debug: core4.debug,
+    info: core4.info,
+    warning: core4.warning,
+    error: core4.error,
+    isDebug: core4.isDebug,
+    startGroup: core4.startGroup,
+    endGroup: core4.endGroup
+  };
+}
+function withGroup(groupName, f) {
+  core4.startGroup(groupName);
+  try {
+    return f();
+  } finally {
+    core4.endGroup();
+  }
+}
+async function withGroupAsync(groupName, f) {
+  core4.startGroup(groupName);
+  try {
+    return await f();
+  } finally {
+    core4.endGroup();
+  }
+}
+function formatDuration(durationMs) {
+  if (durationMs < 1e3) {
+    return `${durationMs}ms`;
+  }
+  if (durationMs < 60 * 1e3) {
+    return `${(durationMs / 1e3).toFixed(1)}s`;
+  }
+  const minutes = Math.floor(durationMs / (60 * 1e3));
+  const seconds = Math.floor(durationMs % (60 * 1e3) / 1e3);
+  return `${minutes}m${seconds}s`;
+}
+
+// src/status-report.ts
+var os3 = __toESM(require("os"));
+var core7 = __toESM(require_core());
+
+// node_modules/uuid/dist-node/regex.js
+var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
+
+// node_modules/uuid/dist-node/validate.js
+function validate(uuid) {
+  return typeof uuid === "string" && regex_default.test(uuid);
+}
+var validate_default = validate;
+
+// node_modules/uuid/dist-node/stringify.js
+var byteToHex = [];
+for (let i = 0; i < 256; ++i) {
+  byteToHex.push((i + 256).toString(16).slice(1));
+}
+function unsafeStringify(arr, offset = 0) {
+  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+}
+
+// node_modules/uuid/dist-node/rng.js
+var rnds8 = new Uint8Array(16);
+function rng() {
+  return crypto.getRandomValues(rnds8);
+}
+
+// node_modules/uuid/dist-node/v4.js
+function v4(options, buf, offset) {
+  if (!buf && !options && crypto.randomUUID) {
+    return crypto.randomUUID();
+  }
+  return _v4(options, buf, offset);
+}
+function _v4(options, buf, offset) {
+  options = options || {};
+  const rnds = options.random ?? options.rng?.() ?? rng();
+  if (rnds.length < 16) {
+    throw new Error("Random bytes length must be >= 16");
+  }
+  rnds[6] = rnds[6] & 15 | 64;
+  rnds[8] = rnds[8] & 63 | 128;
+  if (buf) {
+    offset = offset || 0;
+    if (offset < 0 || offset + 16 > buf.length) {
+      throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
+    }
+    for (let i = 0; i < 16; ++i) {
+      buf[offset + i] = rnds[i];
+    }
+    return buf;
+  }
+  return unsafeStringify(rnds);
+}
+var v4_default = v4;
 
 // src/api-client.ts
 var core5 = __toESM(require_core());
@@ -148756,6 +146518,9 @@ function retry(octokit, octokitOptions) {
 }
 retry.VERSION = VERSION7;
 
+// src/api-client.ts
+var import_undici = __toESM(require_undici());
+
 // src/repository.ts
 function getRepositoryNwo() {
   return getRepositoryNwoFromEnv("GITHUB_REPOSITORY");
@@ -148783,9 +146548,44 @@ function parseRepositoryNwo(input) {
 // src/api-client.ts
 var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
 var DO_NOT_RETRY_STATUSES = [400, 410, 422, 451];
-function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
+function getRegistryProxyConfig(action) {
+  return {
+    host: action.env.getOptional("CODEQL_PROXY_HOST" /* PROXY_HOST */),
+    port: action.env.getOptional("CODEQL_PROXY_PORT" /* PROXY_PORT */),
+    ca: action.env.getOptional("CODEQL_PROXY_CA_CERTIFICATE" /* PROXY_CA_CERTIFICATE */)
+  };
+}
+function getRegistryProxy(action) {
+  const { host, port, ca } = getRegistryProxyConfig(action);
+  if (host && port) {
+    const uri = `http://${host}:${port}`;
+    action.logger.debug(
+      `Using private registry proxy at '${uri}' for API client.`
+    );
+    return new import_undici.ProxyAgent({
+      uri,
+      keepAliveTimeout: 10,
+      keepAliveMaxTimeout: 10,
+      requestTls: ca ? { ca } : void 0
+    });
+  }
+  return void 0;
+}
+function makeProxyRequestOptions(dispatcher) {
+  if (dispatcher === void 0) {
+    return githubUtils.defaults.request;
+  }
+  return {
+    ...githubUtils.defaults.request,
+    fetch: (req, init2) => {
+      return (0, import_undici.fetch)(req, { ...init2, dispatcher });
+    }
+  };
+}
+function createApiClientWithDetails(apiDetails, { allowExternal = false, proxy = void 0 } = {}) {
   const auth2 = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
   const retryingOctokit = githubUtils.GitHub.plugin(retry);
+  const requestOptions = makeProxyRequestOptions(proxy);
   return new retryingOctokit(
     githubUtils.getOctokitOptions(auth2, {
       baseUrl: apiDetails.apiURL,
@@ -148796,24 +146596,25 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
         warn: core5.warning,
         error: core5.error
       },
+      request: requestOptions,
       retry: {
         doNotRetry: DO_NOT_RETRY_STATUSES
       }
     })
   );
 }
-function getApiDetails() {
+function getApiDetails(env = getEnv()) {
   return {
     auth: getRequiredInput("token"),
-    url: getRequiredEnvParam("GITHUB_SERVER_URL"),
-    apiURL: getRequiredEnvParam("GITHUB_API_URL")
+    url: env.getRequired("GITHUB_SERVER_URL" /* GITHUB_SERVER_URL */),
+    apiURL: env.getRequired("GITHUB_API_URL" /* GITHUB_API_URL */)
   };
 }
-function getApiClient() {
-  return createApiClientWithDetails(getApiDetails());
+function getApiClient(env = getEnv()) {
+  return createApiClientWithDetails(getApiDetails(env));
 }
-function getApiClientWithExternalAuth(apiDetails) {
-  return createApiClientWithDetails(apiDetails, { allowExternal: true });
+function getApiClientWithExternalAuth(apiDetails, proxy) {
+  return createApiClientWithDetails(apiDetails, { allowExternal: true, proxy });
 }
 function getAuthorizationHeaderFor(logger, apiDetails, url2) {
   if (url2.startsWith(`${apiDetails.url}/`) || apiDetails.apiURL && url2.startsWith(`${apiDetails.apiURL}/`)) {
@@ -148927,7 +146728,8 @@ function isEnablementError(msg) {
   return [
     /Code Security must be enabled/i,
     /Advanced Security must be enabled/i,
-    /Code Scanning is not enabled/i
+    /Code Scanning is not enabled/i,
+    /Code Quality is not enabled/i
   ].some((pattern) => pattern.test(msg));
 }
 function getFeatureEnablementError(message) {
@@ -148961,13 +146763,22 @@ function wrapApiConfigurationError(e) {
   return e;
 }
 
-// src/defaults.json
-var bundleVersion = "codeql-bundle-v2.25.6";
-var cliVersion = "2.25.6";
-
-// src/overlay/index.ts
-var fs4 = __toESM(require("fs"));
-var path4 = __toESM(require("path"));
+// src/config/pack-registries.ts
+function parseRegistries(registriesInput) {
+  try {
+    return registriesInput ? load(registriesInput) : void 0;
+  } catch {
+    throw new ConfigurationError(
+      "Invalid registries input. Must be a YAML string."
+    );
+  }
+}
+function parseRegistriesWithoutCredentials(registriesInput) {
+  return parseRegistries(registriesInput)?.map((r) => {
+    const { url: url2, packages, kind } = r;
+    return { url: url2, packages, kind };
+  });
+}
 
 // src/git-utils.ts
 var fs3 = __toESM(require("fs"));
@@ -148995,9 +146806,9 @@ async function getGitVersionOrThrow() {
     ["--version"],
     "Failed to get git version."
   );
-  const match = stdout.trim().match(/^git version ((\d+\.\d+\.\d+).*)$/);
-  if (match?.[1] && match?.[2]) {
-    return new GitVersionInfo(match[2], match[1]);
+  const match2 = stdout.trim().match(/^git version ((\d+\.\d+\.\d+).*)$/);
+  if (match2?.[1] && match2?.[2]) {
+    return new GitVersionInfo(match2[2], match2[1]);
   }
   throw new Error(`Could not parse Git version from output: ${stdout.trim()}`);
 }
@@ -149080,8 +146891,8 @@ var decodeGitFilePath = function(filePath) {
     filePath = filePath.substring(1, filePath.length - 1);
     return filePath.replace(
       /\\([abfnrtv\\"]|[0-7]{1,3})/g,
-      (_match, seq2) => {
-        switch (seq2[0]) {
+      (_match, seq) => {
+        switch (seq[0]) {
           case "a":
             return "\x07";
           case "b":
@@ -149101,7 +146912,7 @@ var decodeGitFilePath = function(filePath) {
           case '"':
             return '"';
           default:
-            return String.fromCharCode(parseInt(seq2, 8));
+            return String.fromCharCode(parseInt(seq, 8));
         }
       }
     );
@@ -149136,10 +146947,10 @@ var getFileOidsUnderPath = async function(basePath) {
   const regex = /^[0-9]+ ([0-9a-f]{40}|[0-9a-f]{64}) [0-9]+\t(.+)$/;
   for (const line of stdout.split("\n")) {
     if (line) {
-      const match = line.match(regex);
-      if (match) {
-        const oid = match[1];
-        const filePath = decodeGitFilePath(match[2]);
+      const match2 = line.match(regex);
+      if (match2) {
+        const oid = match2[1];
+        const filePath = decodeGitFilePath(match2[2]);
         fileOidMap[filePath] = oid;
       } else {
         throw new Error(`Unexpected "git ls-files" output: ${line}`);
@@ -149231,15 +147042,520 @@ async function getGeneratedFiles(workingDirectory) {
   const generatedFiles = [];
   const regex = /^([^:]+): linguist-generated: true$/;
   for (const result of stdout.split(os2.EOL)) {
-    const match = result.match(regex);
-    if (match && match[1].trim().length > 0) {
-      generatedFiles.push(match[1].trim());
+    const match2 = result.match(regex);
+    if (match2 && match2[1].trim().length > 0) {
+      generatedFiles.push(match2[1].trim());
+    }
+  }
+  return generatedFiles;
+}
+
+// src/start-proxy/types.ts
+var usernameSchema = {
+  /** The username needed to authenticate to the package registry, if any. */
+  username: optionalOrNull(string)
+};
+function hasUsername(config) {
+  return "username" in config;
+}
+var usernamePasswordSchema = {
+  /** The password needed to authenticate to the package registry, if any. */
+  password: optionalOrNull(string),
+  ...usernameSchema
+};
+function hasUsernameAndPassword(config) {
+  return hasUsername(config) && "password" in config;
+}
+var tokenSchema = {
+  /** The token needed to authenticate to the package registry, if any. */
+  token: optionalOrNull(string),
+  ...usernameSchema
+};
+function hasToken(config) {
+  return "token" in config;
+}
+function isToken(config) {
+  return "token" in config && validateSchema(tokenSchema, config);
+}
+var azureConfigSchema = {
+  "tenant-id": string,
+  "client-id": string
+};
+function isAzureConfig(config) {
+  return validateSchema(azureConfigSchema, config);
+}
+var awsConfigSchema = {
+  "aws-region": string,
+  "account-id": string,
+  "role-name": string,
+  domain: string,
+  "domain-owner": string,
+  audience: optionalOrNull(string)
+};
+function isAWSConfig(config) {
+  return validateSchema(awsConfigSchema, config);
+}
+var jfrogConfigSchema = {
+  "jfrog-oidc-provider-name": string,
+  audience: optionalOrNull(string),
+  "identity-mapping-name": optionalOrNull(string)
+};
+function isJFrogConfig(config) {
+  return validateSchema(jfrogConfigSchema, config);
+}
+var cloudsmithConfigSchema = {
+  namespace: string,
+  "service-slug": string,
+  "api-host": string
+};
+function isCloudsmithConfig(config) {
+  return validateSchema(cloudsmithConfigSchema, config);
+}
+var gcpConfigSchema = {
+  "workload-identity-provider": string,
+  "service-account": optionalOrNull(string),
+  audience: optionalOrNull(string)
+};
+function isGCPConfig(config) {
+  return validateSchema(gcpConfigSchema, config);
+}
+var oidcSchemas = [
+  { schema: azureConfigSchema, name: "Azure" },
+  { schema: awsConfigSchema, name: "AWS" },
+  { schema: jfrogConfigSchema, name: "JFrog" },
+  { schema: cloudsmithConfigSchema, name: "Cloudsmith" },
+  { schema: gcpConfigSchema, name: "GCP" }
+];
+function credentialToStr(credential) {
+  let result = `Type: ${credential.type};`;
+  const appendIfDefined = (name, val) => {
+    if (isDefined2(val)) {
+      result += ` ${name}: ${val};`;
+    }
+  };
+  appendIfDefined("Url", credential.url);
+  appendIfDefined("Host", credential.host);
+  if (hasUsername(credential)) {
+    appendIfDefined("Username", credential.username);
+  }
+  if ("password" in credential) {
+    appendIfDefined(
+      "Password",
+      isDefined2(credential.password) ? "***" : void 0
+    );
+  }
+  if (hasToken(credential)) {
+    appendIfDefined("Token", isDefined2(credential.token) ? "***" : void 0);
+  }
+  if (isAzureConfig(credential)) {
+    appendIfDefined("Tenant", credential["tenant-id"]);
+    appendIfDefined("Client", credential["client-id"]);
+  } else if (isAWSConfig(credential)) {
+    appendIfDefined("AWS Region", credential["aws-region"]);
+    appendIfDefined("AWS Account", credential["account-id"]);
+    appendIfDefined("AWS Role", credential["role-name"]);
+    appendIfDefined("AWS Domain", credential.domain);
+    appendIfDefined("AWS Domain Owner", credential["domain-owner"]);
+    appendIfDefined("AWS Audience", credential.audience);
+  } else if (isJFrogConfig(credential)) {
+    appendIfDefined("JFrog Provider", credential["jfrog-oidc-provider-name"]);
+    appendIfDefined(
+      "JFrog Identity Mapping",
+      credential["identity-mapping-name"]
+    );
+    appendIfDefined("JFrog Audience", credential.audience);
+  } else if (isCloudsmithConfig(credential)) {
+    appendIfDefined("Cloudsmith Namespace", credential.namespace);
+    appendIfDefined("Cloudsmith Service Slug", credential["service-slug"]);
+    appendIfDefined("Cloudsmith API Host", credential["api-host"]);
+  } else if (isGCPConfig(credential)) {
+    appendIfDefined(
+      "GCP Workload Identity Provider",
+      credential["workload-identity-provider"]
+    );
+    appendIfDefined("GCP Service Account", credential["service-account"]);
+    appendIfDefined("GCP Audience", credential.audience);
+  }
+  return result;
+}
+var registryBaseSchema = {
+  /** The type of the package registry. */
+  type: string,
+  /** Whether the registry replaces the base registry for the ecosystem. */
+  "replaces-base": optional(boolean)
+};
+function getAddressString(address) {
+  if (address.url === void 0) {
+    return address.host;
+  } else {
+    return address.url;
+  }
+}
+
+// src/status-report.ts
+function getDisplayActionName(actionName) {
+  if (actionName === "finish" /* Analyze */) {
+    return "analyze";
+  }
+  return actionName;
+}
+function getJobUUID(action) {
+  const existingJobRunUuid = action.env.getOptional("CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */);
+  if (existingJobRunUuid !== void 0 && validate_default(existingJobRunUuid)) {
+    action.logger.info(`Existing job run UUID is ${existingJobRunUuid}.`);
+    return existingJobRunUuid;
+  }
+  const jobRunUuid = v4_default();
+  action.logger.info(`Job run UUID is ${jobRunUuid}.`);
+  action.actions.exportVariable("CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid);
+  return jobRunUuid;
+}
+function isFirstPartyAnalysis(actionName) {
+  if (actionName !== "upload-sarif" /* UploadSarif */) {
+    return true;
+  }
+  return process.env["CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */] === "true";
+}
+function isThirdPartyAnalysis(actionName) {
+  return !isFirstPartyAnalysis(actionName);
+}
+var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
+  JobStatus2["UnknownStatus"] = "JOB_STATUS_UNKNOWN";
+  JobStatus2["SuccessStatus"] = "JOB_STATUS_SUCCESS";
+  JobStatus2["FailureStatus"] = "JOB_STATUS_FAILURE";
+  JobStatus2["ConfigErrorStatus"] = "JOB_STATUS_CONFIGURATION_ERROR";
+  return JobStatus2;
+})(JobStatus || {});
+function getActionsStatus(error3, otherFailureCause) {
+  if (error3 || otherFailureCause) {
+    return error3 instanceof ConfigurationError ? "user-error" : "failure";
+  } else {
+    return "success";
+  }
+}
+function getJobStatusDisplayName(status) {
+  switch (status) {
+    case "JOB_STATUS_SUCCESS" /* SuccessStatus */:
+      return "success";
+    case "JOB_STATUS_FAILURE" /* FailureStatus */:
+      return "failure";
+    case "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */:
+      return "configuration error";
+    case "JOB_STATUS_UNKNOWN" /* UnknownStatus */:
+      return "unknown";
+    default:
+      assertNever(status);
+  }
+}
+function setJobStatusIfUnsuccessful(actionStatus) {
+  if (actionStatus === "user-error") {
+    core7.exportVariable(
+      "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */,
+      process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */
+    );
+  } else if (actionStatus === "failure" || actionStatus === "aborted") {
+    core7.exportVariable(
+      "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */,
+      process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */
+    );
+  }
+}
+function getRegistryTypesFromEnv(logger, env = getEnv()) {
+  const value = env.getOptional("CODEQL_PROXY_URLS" /* PROXY_URLS */);
+  if (value === void 0) {
+    return void 0;
+  }
+  try {
+    const data = JSON.parse(value);
+    if (!isArray(data)) {
+      logger.debug(
+        `Expected '${"CODEQL_PROXY_URLS" /* PROXY_URLS */}' to contain a JSON array, but got '${typeof data}'.`
+      );
+      return void 0;
+    }
+    if (!validateArray(registryBaseSchema, data)) {
+      logger.debug(
+        `Expected '${"CODEQL_PROXY_URLS" /* PROXY_URLS */}' to contain a JSON array of registry objects, but got something else.`
+      );
+      return void 0;
     }
+    const types2 = new Set(data.map((r) => r.type));
+    return Array.from(types2).sort().join(",");
+  } catch (err) {
+    logger.debug(
+      `Failed to parse '${"CODEQL_PROXY_URLS" /* PROXY_URLS */}': ${getErrorMessage(err)}.`
+    );
+    return void 0;
+  }
+}
+async function createStatusReportBase(actionName, status, actionStartedAt, config, diskInfo, logger, cause, exception) {
+  try {
+    const commitOid = getOptionalInput("sha") || process.env["GITHUB_SHA"] || "";
+    const ref = await getRef();
+    const jobRunUUID = process.env["CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */] || "";
+    const workflowRunID = getWorkflowRunID();
+    const workflowRunAttempt = getWorkflowRunAttempt();
+    const workflowName = process.env["GITHUB_WORKFLOW"] || "";
+    const jobName = process.env["GITHUB_JOB"] || "";
+    const analysis_key = await getAnalysisKey();
+    let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */];
+    if (workflowStartedAt === void 0) {
+      workflowStartedAt = actionStartedAt.toISOString();
+      core7.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt);
+    }
+    const runnerOs = getRequiredEnvParam("RUNNER_OS");
+    const codeQlCliVersion = getCachedCodeQlVersion();
+    const actionRef = process.env["GITHUB_ACTION_REF"] || "";
+    const testingEnvironment = getTestingEnvironment();
+    if (testingEnvironment) {
+      core7.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment);
+    }
+    const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true";
+    const statusReport = {
+      action_name: actionName,
+      action_oid: "unknown",
+      // TODO decide if it's possible to fill this in
+      action_ref: actionRef,
+      action_started_at: actionStartedAt.toISOString(),
+      action_version: getActionVersion(),
+      analysis_kinds: config?.analysisKinds?.join(","),
+      analysis_key,
+      build_mode: config?.buildMode,
+      commit_oid: commitOid,
+      computed_inputs: {},
+      first_party_analysis: isFirstPartyAnalysis(actionName),
+      job_name: jobName,
+      job_run_uuid: jobRunUUID,
+      ref,
+      registry_types: getRegistryTypesFromEnv(logger),
+      runner_os: runnerOs,
+      started_at: workflowStartedAt,
+      status,
+      steady_state_default_setup: isSteadyStateDefaultSetupRun,
+      testing_environment: testingEnvironment || "",
+      workflow_name: workflowName,
+      workflow_run_attempt: workflowRunAttempt,
+      workflow_run_id: workflowRunID
+    };
+    try {
+      statusReport.actions_event_name = getWorkflowEventName();
+    } catch (e) {
+      logger.warning(
+        `Could not determine the workflow event name: ${getErrorMessage(e)}.`
+      );
+    }
+    if (config) {
+      statusReport.languages = config.languages?.join(",");
+    }
+    if (diskInfo) {
+      statusReport.runner_available_disk_space_bytes = diskInfo.numAvailableBytes;
+      statusReport.runner_total_disk_space_bytes = diskInfo.numTotalBytes;
+    }
+    if (cause) {
+      statusReport.cause = cause;
+    }
+    if (exception) {
+      statusReport.exception = exception;
+    }
+    if (status === "success" || status === "failure" || status === "aborted" || status === "user-error") {
+      statusReport.completed_at = (/* @__PURE__ */ new Date()).toISOString();
+    }
+    const matrix = getRequiredInput("matrix");
+    if (matrix) {
+      statusReport.matrix_vars = matrix;
+    }
+    if ("RUNNER_ARCH" in process.env) {
+      statusReport.runner_arch = process.env["RUNNER_ARCH"];
+    }
+    if (!(runnerOs === "Linux" && isSelfHostedRunner())) {
+      statusReport.runner_os_release = os3.release();
+    }
+    if (codeQlCliVersion !== void 0) {
+      statusReport.codeql_version = codeQlCliVersion.version;
+    }
+    const imageVersion = process.env["ImageVersion"];
+    if (imageVersion) {
+      statusReport.runner_image_version = imageVersion;
+    }
+    return statusReport;
+  } catch (e) {
+    logger.warning(
+      `Failed to gather information for telemetry: ${getErrorMessage(e)}. Will skip sending status report.`
+    );
+    if (isInTestMode()) {
+      throw e;
+    }
+    return void 0;
+  }
+}
+var OUT_OF_DATE_MSG = "CodeQL Action is out-of-date. Please upgrade to the latest version of `codeql-action`.";
+var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the API endpoint. Please update to a compatible version of `codeql-action`.";
+async function sendStatusReport(statusReport) {
+  setJobStatusIfUnsuccessful(statusReport.status);
+  const statusReportJSON = JSON.stringify(statusReport);
+  core7.debug(`Sending status report: ${statusReportJSON}`);
+  if (isInTestMode()) {
+    core7.debug("In test mode. Status reports are not uploaded.");
+    return;
+  }
+  const nwo = getRepositoryNwo();
+  const client = getApiClient();
+  try {
+    await client.request(
+      "PUT /repos/:owner/:repo/code-scanning/analysis/status",
+      {
+        owner: nwo.owner,
+        repo: nwo.repo,
+        data: statusReportJSON
+      }
+    );
+  } catch (e) {
+    const httpError = asHTTPError(e);
+    if (httpError !== void 0) {
+      switch (httpError.status) {
+        case 403:
+          if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") {
+            core7.warning(
+              `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading CodeQL results requires write access. To use CodeQL with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.`
+            );
+          } else {
+            core7.warning(
+              `This run of the CodeQL Action does not have permission to access the CodeQL Action API endpoints. This could be because the Action is running on a pull request from a fork. If not, please ensure the workflow has at least the 'security-events: read' permission. Details: ${httpError.message}`
+            );
+          }
+          return;
+        case 404:
+          core7.warning(httpError.message);
+          return;
+        case 422:
+          if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) {
+            core7.debug(INCOMPATIBLE_MSG);
+          } else {
+            core7.debug(OUT_OF_DATE_MSG);
+          }
+          return;
+      }
+    }
+    core7.warning(
+      `An unexpected error occurred when sending a status report: ${getErrorMessage(
+        e
+      )}`
+    );
+  }
+}
+async function createInitWithConfigStatusReport(config, initStatusReport, configFile, totalCacheSize, overlayBaseDatabaseStats, dependencyCachingResults) {
+  const languages = config.languages.join(",");
+  const paths = (config.originalUserInput.paths || []).join(",");
+  const pathsIgnore = (config.originalUserInput["paths-ignore"] || []).join(
+    ","
+  );
+  const disableDefaultQueries = config.originalUserInput["disable-default-queries"] ? languages : "";
+  const queries = [];
+  let queriesInput = getOptionalInput("queries")?.trim();
+  if (queriesInput === void 0 || queriesInput.startsWith("+")) {
+    queries.push(
+      ...(config.originalUserInput.queries || []).map((q) => q.uses)
+    );
+  }
+  if (queriesInput !== void 0) {
+    queriesInput = queriesInput.startsWith("+") ? queriesInput.slice(1) : queriesInput;
+    queries.push(...queriesInput.split(","));
+  }
+  let packs = {};
+  if (Array.isArray(config.computedConfig.packs)) {
+    packs[config.languages[0]] = config.computedConfig.packs;
+  } else if (config.computedConfig.packs !== void 0) {
+    packs = config.computedConfig.packs;
+  }
+  return {
+    ...initStatusReport,
+    config_file: configFile ?? "",
+    disable_default_queries: disableDefaultQueries,
+    paths,
+    paths_ignore: pathsIgnore,
+    queries: queries.join(","),
+    packs: JSON.stringify(packs),
+    trap_cache_languages: Object.keys(config.trapCaches).join(","),
+    trap_cache_download_size_bytes: totalCacheSize,
+    trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
+    overlay_base_database_download_size_bytes: overlayBaseDatabaseStats?.databaseSizeBytes,
+    overlay_base_database_download_duration_ms: overlayBaseDatabaseStats?.databaseDownloadDurationMs,
+    dependency_caching_restore_results: dependencyCachingResults,
+    query_filters: JSON.stringify(
+      config.originalUserInput["query-filters"] ?? []
+    ),
+    registries: JSON.stringify(
+      parseRegistriesWithoutCredentials(getOptionalInput("registries")) ?? []
+    )
+  };
+}
+async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error3, logger) {
+  try {
+    const statusReport = await createStatusReportBase(
+      actionName,
+      "failure",
+      actionStartedAt,
+      void 0,
+      void 0,
+      logger,
+      `Unhandled CodeQL Action error: ${getErrorMessage(error3)}`,
+      error3 instanceof Error ? error3.stack : void 0
+    );
+    if (statusReport !== void 0) {
+      await sendStatusReport(statusReport);
+    }
+  } catch (e) {
+    logger.warning(
+      `Failed to send the unhandled error status report: ${getErrorMessage(e)}.`
+    );
+    if (isInTestMode()) {
+      throw e;
+    }
+  }
+}
+
+// src/action-common.ts
+async function runInActions(action) {
+  const startedAt = /* @__PURE__ */ new Date();
+  const logger = getActionsLogger();
+  const env = getEnv();
+  const actionsEnv = getActionsEnv();
+  try {
+    const actionState = {
+      name: action.name,
+      startedAt,
+      logger,
+      env,
+      actions: actionsEnv
+    };
+    getJobUUID(actionState);
+    await action.run(actionState);
+  } catch (error3) {
+    core8.setFailed(
+      `${getDisplayActionName(action.name)} action failed: ${getErrorMessage(error3)}`
+    );
+    const statusReportError = action.transformTelemetryError !== void 0 ? action.transformTelemetryError(wrapError(error3)) : error3;
+    await sendUnhandledErrorStatusReport(
+      action.name,
+      startedAt,
+      statusReportError,
+      logger
+    );
   }
-  return generatedFiles;
 }
 
+// src/feature-flags.ts
+var fs5 = __toESM(require("fs"));
+var path5 = __toESM(require("path"));
+var semver4 = __toESM(require_semver2());
+
+// src/defaults.json
+var bundleVersion = "codeql-bundle-v2.26.3";
+var cliVersion = "2.26.3";
+
 // src/overlay/index.ts
+var fs4 = __toESM(require("fs"));
+var path4 = __toESM(require("path"));
 var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8";
 var CODEQL_OVERLAY_MINIMUM_VERSION_CPP = "2.25.0";
 var CODEQL_OVERLAY_MINIMUM_VERSION_CSHARP = "2.24.1";
@@ -149369,14 +147685,14 @@ var LINKED_CODEQL_VERSION = {
   tagName: bundleVersion
 };
 var featureConfig = {
-  ["allow_multiple_analysis_kinds" /* AllowMultipleAnalysisKinds */]: {
+  ["allow_merge_config_files" /* AllowMergeConfigFiles */]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_ALLOW_MULTIPLE_ANALYSIS_KINDS",
+    envVar: "CODEQL_ACTION_ALLOW_MERGE_CONFIG_FILES",
     minimumVersion: void 0
   },
-  ["allow_toolcache_input" /* AllowToolcacheInput */]: {
+  ["allow_multiple_analysis_kinds" /* AllowMultipleAnalysisKinds */]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
+    envVar: "CODEQL_ACTION_ALLOW_MULTIPLE_ANALYSIS_KINDS",
     minimumVersion: void 0
   },
   ["cleanup_trap_caches" /* CleanupTrapCaches */]: {
@@ -149384,6 +147700,11 @@ var featureConfig = {
     envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
     minimumVersion: void 0
   },
+  ["config_file_repository_property" /* ConfigFileRepositoryProperty */]: {
+    defaultValue: false,
+    envVar: "CODEQL_ACTION_CONFIG_FILE_REPOSITORY_PROPERTY",
+    minimumVersion: void 0
+  },
   ["cpp_dependency_installation_enabled" /* CppDependencyInstallation */]: {
     defaultValue: false,
     envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
@@ -149542,11 +147863,6 @@ var featureConfig = {
     envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_MATCH_CODEQL_VERSION_DRY_RUN",
     minimumVersion: void 0
   },
-  ["overlay_analysis_resource_checks_v2" /* OverlayAnalysisResourceChecksV2 */]: {
-    defaultValue: false,
-    envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_RESOURCE_CHECKS_V2",
-    minimumVersion: void 0
-  },
   ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: {
     defaultValue: false,
     envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK",
@@ -149568,20 +147884,25 @@ var featureConfig = {
     legacyApi: true,
     minimumVersion: void 0
   },
+  ["proxy_api_requests" /* ProxyApiRequests */]: {
+    defaultValue: false,
+    envVar: "CODEQL_ACTION_PROXY_API_REQUESTS",
+    minimumVersion: void 0
+  },
   ["skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */]: {
     defaultValue: false,
     envVar: "CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS",
     minimumVersion: void 0,
     toolsFeature: "suppressesMissingFileBaselineWarning" /* SuppressesMissingFileBaselineWarning */
   },
-  ["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
+  ["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
+    envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
     minimumVersion: void 0
   },
-  ["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
+  ["tools_repository_property" /* ToolsRepositoryProperty */]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
+    envVar: "CODEQL_ACTION_TOOLS_REPOSITORY_PROPERTY",
     minimumVersion: void 0
   },
   ["upload_overlay_db_to_api" /* UploadOverlayDbToApi */]: {
@@ -150076,12 +148397,12 @@ var import_perf_hooks3 = require("perf_hooks");
 var io5 = __toESM(require_io());
 
 // src/autobuild.ts
-var core12 = __toESM(require_core());
+var core13 = __toESM(require_core());
 
 // src/codeql.ts
 var fs15 = __toESM(require("fs"));
 var path14 = __toESM(require("path"));
-var core11 = __toESM(require_core());
+var core12 = __toESM(require_core());
 var toolrunner3 = __toESM(require_toolrunner());
 
 // src/cli-errors.ts
@@ -150120,12 +148441,12 @@ function extractFatalErrors(error3) {
   const fatalErrorRegex = /.*fatal (internal )?error occurr?ed(. Details)?:/gi;
   let fatalErrors = [];
   let lastFatalErrorIndex;
-  let match;
-  while ((match = fatalErrorRegex.exec(error3)) !== null) {
+  let match2;
+  while ((match2 = fatalErrorRegex.exec(error3)) !== null) {
     if (lastFatalErrorIndex !== void 0) {
-      fatalErrors.push(error3.slice(lastFatalErrorIndex, match.index).trim());
+      fatalErrors.push(error3.slice(lastFatalErrorIndex, match2.index).trim());
     }
-    lastFatalErrorIndex = match.index;
+    lastFatalErrorIndex = match2.index;
   }
   if (lastFatalErrorIndex !== void 0) {
     const lastError = error3.slice(lastFatalErrorIndex).trim();
@@ -150146,7 +148467,7 @@ function extractFatalErrors(error3) {
 }
 function extractAutobuildErrors(error3) {
   const pattern = /.*\[autobuild\] \[ERROR\] (.*)/gi;
-  let errorLines = [...error3.matchAll(pattern)].map((match) => match[1]);
+  let errorLines = [...error3.matchAll(pattern)].map((match2) => match2[1]);
   if (errorLines.length > 10) {
     errorLines = errorLines.slice(0, 10);
     errorLines.push("(truncated)");
@@ -150304,7795 +148625,11964 @@ function getCliConfigCategoryIfExists(cliError) {
       }
     }
   }
-  return void 0;
+  return void 0;
+}
+function isUnsupportedPlatform() {
+  return !SUPPORTED_PLATFORMS.some(
+    ([platform2, arch2]) => platform2 === process.platform && arch2 === process.arch
+  );
+}
+function getUnsupportedPlatformError(cliError) {
+  return new ConfigurationError(
+    `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}`
+  );
+}
+function wrapCliConfigurationError(cliError) {
+  if (isUnsupportedPlatform()) {
+    return getUnsupportedPlatformError(cliError);
+  }
+  const cliConfigErrorCategory = getCliConfigCategoryIfExists(cliError);
+  if (cliConfigErrorCategory === void 0) {
+    return cliError;
+  }
+  let errorMessageBuilder = cliError.message;
+  const additionalErrorMessageToAppend = cliErrorsConfig[cliConfigErrorCategory].additionalErrorMessageToAppend;
+  if (additionalErrorMessageToAppend !== void 0) {
+    errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`;
+  }
+  return new ConfigurationError(errorMessageBuilder);
+}
+
+// src/config-utils.ts
+var fs9 = __toESM(require("fs"));
+var path10 = __toESM(require("path"));
+var import_perf_hooks = require("perf_hooks");
+var core10 = __toESM(require_core());
+
+// src/caching-utils.ts
+var crypto2 = __toESM(require("crypto"));
+var core9 = __toESM(require_core());
+async function getTotalCacheSize(paths, logger, quiet = false) {
+  const sizes = await Promise.all(
+    paths.map((cacheDir2) => tryGetFolderBytes(cacheDir2, logger, quiet))
+  );
+  return sizes.map((a) => a || 0).reduce((a, b) => a + b, 0);
+}
+function shouldStoreCache(kind) {
+  return kind === "full" /* Full */ || kind === "store" /* Store */;
+}
+function shouldRestoreCache(kind) {
+  return kind === "full" /* Full */ || kind === "restore" /* Restore */;
+}
+function getCachingKind(input) {
+  switch (input) {
+    case void 0:
+    case "none":
+    case "off":
+    case "false":
+      return "none" /* None */;
+    case "full":
+    case "on":
+    case "true":
+      return "full" /* Full */;
+    case "store":
+      return "store" /* Store */;
+    case "restore":
+      return "restore" /* Restore */;
+    default:
+      core9.warning(
+        `Unrecognized 'dependency-caching' input: ${input}. Defaulting to 'none'.`
+      );
+      return "none" /* None */;
+  }
+}
+var cacheKeyHashLength = 16;
+function createCacheKeyHash(components) {
+  const componentsJson = JSON.stringify(components);
+  return crypto2.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength);
+}
+function getDependencyCachingEnabled() {
+  const dependencyCaching = getOptionalInput("dependency-caching") || process.env["CODEQL_ACTION_DEPENDENCY_CACHING" /* DEPENDENCY_CACHING */];
+  if (dependencyCaching !== void 0) return getCachingKind(dependencyCaching);
+  if (!isHostedRunner()) return "none" /* None */;
+  if (!isDefaultSetup()) return "none" /* None */;
+  return "none" /* None */;
+}
+
+// src/config/db-config.ts
+var path7 = __toESM(require("path"));
+var jsonschema = __toESM(require_lib2());
+var semver5 = __toESM(require_semver2());
+
+// src/diagnostics.ts
+var import_fs = require("fs");
+var import_path = __toESM(require("path"));
+var unwrittenDiagnostics = [];
+var unwrittenDefaultLanguageDiagnostics = [];
+var diagnosticCounter = 0;
+function makeDiagnostic(id, name, data = void 0) {
+  return {
+    ...data,
+    timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
+    source: { ...data?.source, id, name }
+  };
+}
+function addDiagnostic(config, language, diagnostic) {
+  const logger = getActionsLogger();
+  const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
+  if ((0, import_fs.existsSync)(databasePath)) {
+    writeDiagnostic(config, language, diagnostic);
+  } else {
+    logger.debug(
+      `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.`
+    );
+    unwrittenDiagnostics.push({ diagnostic, language });
+  }
+}
+function addNoLanguageDiagnostic(config, diagnostic) {
+  if (config !== void 0) {
+    addDiagnostic(
+      config,
+      // Arbitrarily choose the first language. We could also choose all languages, but that
+      // increases the risk of misinterpreting the data.
+      config.languages[0],
+      diagnostic
+    );
+  } else {
+    unwrittenDefaultLanguageDiagnostics.push(diagnostic);
+  }
+}
+function writeDiagnostic(config, language, diagnostic) {
+  const logger = getActionsLogger();
+  const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
+  const diagnosticsPath = import_path.default.resolve(
+    databasePath,
+    "diagnostic",
+    "codeql-action"
+  );
+  try {
+    (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true });
+    const uniqueSuffix = (diagnosticCounter++).toString();
+    const sanitizedTimestamp = diagnostic.timestamp.replace(
+      /[^a-zA-Z0-9.-]/g,
+      ""
+    );
+    const jsonPath = import_path.default.resolve(
+      diagnosticsPath,
+      `codeql-action-${sanitizedTimestamp}-${uniqueSuffix}.json`
+    );
+    (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic));
+  } catch (err) {
+    logger.warning(`Unable to write diagnostic message to database: ${err}`);
+    logger.debug(JSON.stringify(diagnostic));
+  }
+}
+function logUnwrittenDiagnostics() {
+  const logger = getActionsLogger();
+  const num = unwrittenDiagnostics.length;
+  if (num > 0) {
+    logger.warning(
+      `${num} diagnostic(s) could not be written to the database and will not appear on the Tool Status Page.`
+    );
+    for (const unwritten of unwrittenDiagnostics) {
+      logger.debug(JSON.stringify(unwritten.diagnostic));
+    }
+  }
+}
+function flushDiagnostics(config) {
+  const logger = getActionsLogger();
+  const diagnosticsCount = unwrittenDiagnostics.length + unwrittenDefaultLanguageDiagnostics.length;
+  logger.debug(`Writing ${diagnosticsCount} diagnostic(s) to database.`);
+  for (const unwritten of unwrittenDiagnostics) {
+    writeDiagnostic(config, unwritten.language, unwritten.diagnostic);
+  }
+  for (const unwritten of unwrittenDefaultLanguageDiagnostics) {
+    addNoLanguageDiagnostic(config, unwritten);
+  }
+  unwrittenDiagnostics = [];
+  unwrittenDefaultLanguageDiagnostics = [];
+}
+function makeTelemetryDiagnostic(id, name, attributes, tags) {
+  return makeDiagnostic(id, name, {
+    attributes,
+    visibility: {
+      cliSummaryTable: false,
+      statusPage: false,
+      telemetry: true
+    },
+    source: {
+      tags
+    }
+  });
+}
+
+// src/error-messages.ts
+var PACKS_PROPERTY = "packs";
+function getConfigFileOutsideWorkspaceErrorMessage(configFile) {
+  return `The configuration file "${configFile}" is outside of the workspace`;
+}
+function getConfigFileDoesNotExistErrorMessage(configFile) {
+  return `The configuration file "${configFile}" does not exist`;
+}
+function getConfigFileParseErrorMessage(configFile, message) {
+  return `Cannot parse "${configFile}": ${message}`;
+}
+function getInvalidConfigFileMessage(configFile, messages) {
+  const andMore = messages.length > 10 ? `, and ${messages.length - 10} more.` : ".";
+  return `The configuration file "${configFile}" is invalid: ${messages.slice(0, 10).join(", ")}${andMore}`;
+}
+function getConfigFileRepoFormatInvalidMessage(configFile) {
+  let error3 = `The configuration file "${configFile}" is not a supported remote file reference.`;
+  error3 += " Expected format [/][@][:]";
+  return error3;
+}
+function getConfigFileFormatInvalidMessage(configFile) {
+  return `The configuration file "${configFile}" could not be read`;
+}
+function getConfigFileDirectoryGivenMessage(configFile) {
+  return `The configuration file "${configFile}" looks like a directory, not a file`;
+}
+function getEmptyCombinesError() {
+  return `A '+' was used to specify that you want to add extra arguments to the configuration, but no extra arguments were specified. Please either remove the '+' or specify some extra arguments.`;
+}
+function getConfigFilePropertyError(configFile, property, error3) {
+  if (configFile === void 0) {
+    return `The workflow property "${property}" is invalid: ${error3}`;
+  } else {
+    return `The configuration file "${configFile}" is invalid: property "${property}" ${error3}`;
+  }
+}
+function getRepoPropertyError(propertyName, error3) {
+  return `The repository property "${propertyName}" is invalid: ${error3}`;
+}
+function getPacksStrInvalid(packStr, configFile) {
+  return configFile ? getConfigFilePropertyError(
+    configFile,
+    PACKS_PROPERTY,
+    `"${packStr}" is not a valid pack`
+  ) : `"${packStr}" is not a valid pack`;
+}
+function getNoLanguagesError() {
+  return "Did not detect any languages to analyze. Please update input in workflow or check that GitHub detects the correct languages in your repository.";
+}
+function getUnknownLanguagesError(languages) {
+  return `Did not recognize the following languages: ${languages.join(", ")}`;
+}
+
+// src/feature-flags/properties.ts
+var github2 = __toESM(require_github());
+var GITHUB_CODEQL_PROPERTY_PREFIX = "github-codeql-";
+var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
+  RepositoryPropertyName2["CONFIG_FILE"] = "github-codeql-config-file";
+  RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
+  RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
+  RepositoryPropertyName2["FILE_COVERAGE_ON_PRS"] = "github-codeql-file-coverage-on-prs";
+  RepositoryPropertyName2["TOOLS"] = "github-codeql-tools";
+  return RepositoryPropertyName2;
+})(RepositoryPropertyName || {});
+function isString2(value) {
+  return typeof value === "string";
+}
+var stringProperty = {
+  validate: isString2,
+  parse: parseStringRepositoryProperty
+};
+var booleanProperty = {
+  // The value from the API should come as a string, which we then parse into a boolean.
+  validate: isString2,
+  parse: parseBooleanRepositoryProperty
+};
+var repositoryPropertyParsers = {
+  ["github-codeql-config-file" /* CONFIG_FILE */]: stringProperty,
+  ["github-codeql-disable-overlay" /* DISABLE_OVERLAY */]: booleanProperty,
+  ["github-codeql-extra-queries" /* EXTRA_QUERIES */]: stringProperty,
+  ["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */]: booleanProperty,
+  ["github-codeql-tools" /* TOOLS */]: stringProperty
+};
+async function loadPropertiesFromApi(logger, repositoryNwo) {
+  try {
+    const response = await getRepositoryProperties(repositoryNwo);
+    const remoteProperties = response.data;
+    if (!Array.isArray(remoteProperties)) {
+      throw new Error(
+        `Expected repository properties API to return an array, but got: ${JSON.stringify(response.data)}`
+      );
+    }
+    logger.debug(
+      `Retrieved ${remoteProperties.length} repository properties: ${remoteProperties.map((p) => p.property_name).join(", ")}`
+    );
+    const properties = {};
+    const unrecognisedProperties = [];
+    for (const property of remoteProperties) {
+      if (property.property_name === void 0) {
+        throw new Error(
+          `Expected repository property object to have a 'property_name', but got: ${JSON.stringify(property)}`
+        );
+      }
+      if (isKnownPropertyName(property.property_name)) {
+        setProperty(properties, property.property_name, property.value, logger);
+      } else if (property.property_name.startsWith(GITHUB_CODEQL_PROPERTY_PREFIX) && !isDynamicWorkflow()) {
+        unrecognisedProperties.push(property.property_name);
+      }
+    }
+    if (Object.keys(properties).length === 0) {
+      logger.debug("No known repository properties were found.");
+    } else {
+      logger.debug(
+        "Loaded the following values for the repository properties:"
+      );
+      for (const [property, value] of Object.entries(properties).sort(
+        ([nameA], [nameB]) => nameA.localeCompare(nameB)
+      )) {
+        logger.debug(`  ${property}: ${value}`);
+      }
+    }
+    if (unrecognisedProperties.length > 0) {
+      const unrecognisedPropertyList = unrecognisedProperties.map((name) => `'${name}'`).join(", ");
+      logger.warning(
+        `Found repository properties (${unrecognisedPropertyList}), which look like CodeQL Action repository properties, but which are not understood by this version of the CodeQL Action. Do you need to update to a newer version?`
+      );
+    }
+    return properties;
+  } catch (e) {
+    throw new Error(
+      `Encountered an error while trying to determine repository properties: ${e}`
+    );
+  }
+}
+function setProperty(properties, name, value, logger) {
+  const propertyOptions = repositoryPropertyParsers[name];
+  if (propertyOptions.validate(value)) {
+    properties[name] = propertyOptions.parse(name, value, logger);
+  } else {
+    throw new Error(
+      `Unexpected value for repository property '${name}' (${typeof value}), got: ${JSON.stringify(value)}`
+    );
+  }
+}
+function parseBooleanRepositoryProperty(name, value, logger) {
+  if (value !== "true" && value !== "false") {
+    logger.warning(
+      `Repository property '${name}' has unexpected value '${value}'. Expected 'true' or 'false'. Defaulting to false.`
+    );
+  }
+  return value === "true";
+}
+function parseStringRepositoryProperty(_name, value) {
+  return value;
+}
+var KNOWN_REPOSITORY_PROPERTY_NAMES = new Set(
+  Object.values(RepositoryPropertyName)
+);
+function isKnownPropertyName(name) {
+  return KNOWN_REPOSITORY_PROPERTY_NAMES.has(name);
+}
+async function loadRepositoryProperties(repositoryNwo, logger) {
+  const repositoryOwnerType = github2.context.payload.repository?.owner.type;
+  logger.debug(
+    `Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
+  );
+  if (repositoryOwnerType === "User") {
+    logger.debug(
+      "Skipping loading repository properties because the repository is owned by a user and therefore cannot have repository properties."
+    );
+    return new Success({});
+  }
+  try {
+    return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
+  } catch (error3) {
+    logger.warning(
+      `Failed to load repository properties: ${getErrorMessage(error3)}`
+    );
+    return new Failure(error3);
+  }
+}
+
+// src/config/db-config.ts
+var ORG_SCHEMA = {
+  /** An array of model pack names. */
+  "model-packs": optional(array(string))
+};
+var DEFAULT_SETUP_SCHEMA = {
+  org: optional(object(ORG_SCHEMA))
+};
+var DEFAULT_SETUP_CONFIG_SCHEMA = {
+  "threat-models": optional(array(string)),
+  "default-setup": optional(
+    object(DEFAULT_SETUP_SCHEMA)
+  )
+};
+function mergeDefaultSetupAndUserConfigs(logger, fromConfigInput, fromConfigFile) {
+  logger.debug(
+    "Combining configuration files from 'config' and 'config-file' inputs"
+  );
+  const schemaCheckResult = checkSchema(
+    DEFAULT_SETUP_CONFIG_SCHEMA,
+    fromConfigInput
+  );
+  if (schemaCheckResult.invalidKeys.length > 0) {
+    logger.warning(
+      `Invalid keys in Default Setup configuration: ${schemaCheckResult.invalidKeys.join(", ")}`
+    );
+    addNoLanguageDiagnostic(
+      void 0,
+      makeTelemetryDiagnostic(
+        "codeql-action/invalid-default-setup-config-keys",
+        "Invalid Default Setup configuration keys",
+        {
+          invalidKeys: schemaCheckResult.invalidKeys
+        },
+        ["internal-error"]
+      )
+    );
+  }
+  if (schemaCheckResult.unknownKeys.length > 0) {
+    logger.warning(
+      `Unrecognised keys in Default Setup configuration: ${schemaCheckResult.unknownKeys.join(", ")}`
+    );
+    addNoLanguageDiagnostic(
+      void 0,
+      makeTelemetryDiagnostic(
+        "codeql-action/unrecognised-default-setup-config-keys",
+        "Unrecognised Default Setup configuration keys",
+        {
+          unrecognisedKeys: schemaCheckResult.unknownKeys
+        },
+        ["internal-error"]
+      )
+    );
+  }
+  const threatModels = new Set(fromConfigInput["threat-models"] || []);
+  for (const configFileThreatModel of fromConfigFile["threat-models"] || []) {
+    threatModels.add(configFileThreatModel);
+  }
+  if (fromConfigFile["default-setup"]) {
+    logger.warning(
+      `The 'default-setup' configuration key is not supported in user-supplied configuration files and will be ignored.`
+    );
+  }
+  const result = { ...fromConfigFile };
+  delete result["threat-models"];
+  delete result["default-setup"];
+  if (fromConfigInput["default-setup"]?.org?.["model-packs"]) {
+    result["default-setup"] = {
+      org: {
+        "model-packs": fromConfigInput["default-setup"].org["model-packs"]
+      }
+    };
+  }
+  if (threatModels.size > 0) {
+    result["threat-models"] = Array.from(threatModels);
+  }
+  return result;
+}
+function shouldCombine(inputValue) {
+  return !!inputValue?.trim().startsWith("+");
+}
+var PACK_IDENTIFIER_PATTERN = (function() {
+  const alphaNumeric = "[a-z0-9]";
+  const alphaNumericDash = "[a-z0-9-]";
+  const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
+  return new RegExp(`^${component}/${component}$`);
+})();
+function parsePacksSpecification(packStr) {
+  if (typeof packStr !== "string") {
+    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  }
+  packStr = packStr.trim();
+  const atIndex = packStr.indexOf("@");
+  const colonIndex = packStr.indexOf(":", atIndex);
+  const packStart = 0;
+  const versionStart = atIndex + 1 || void 0;
+  const pathStart = colonIndex + 1 || void 0;
+  const packEnd = Math.min(
+    atIndex > 0 ? atIndex : Infinity,
+    colonIndex > 0 ? colonIndex : Infinity,
+    packStr.length
+  );
+  const versionEnd = versionStart ? Math.min(colonIndex > 0 ? colonIndex : Infinity, packStr.length) : void 0;
+  const pathEnd = pathStart ? packStr.length : void 0;
+  const packName = packStr.slice(packStart, packEnd).trim();
+  const version = versionStart ? packStr.slice(versionStart, versionEnd).trim() : void 0;
+  const packPath = pathStart ? packStr.slice(pathStart, pathEnd).trim() : void 0;
+  if (!PACK_IDENTIFIER_PATTERN.test(packName)) {
+    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  }
+  if (version) {
+    try {
+      new semver5.Range(version);
+    } catch {
+      throw new ConfigurationError(getPacksStrInvalid(packStr));
+    }
+  }
+  if (packPath && (path7.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows
+  // Use `x.split(y).join(z)` as a polyfill for `x.replaceAll(y, z)` since
+  // if we used a regex we'd need to escape the path separator on Windows
+  // which seems more awkward.
+  path7.normalize(packPath).split(path7.sep).join("/") !== packPath.split(path7.sep).join("/"))) {
+    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  }
+  if (!packPath && pathStart) {
+    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  }
+  return {
+    name: packName,
+    version,
+    path: packPath
+  };
+}
+function validatePackSpecification(pack) {
+  return prettyPrintPack(parsePacksSpecification(pack));
+}
+function parsePacksFromInput(rawPacksInput, languages, packsInputCombines) {
+  if (!rawPacksInput?.trim()) {
+    return void 0;
+  }
+  if (languages.length > 1) {
+    throw new ConfigurationError(
+      "Cannot specify a 'packs' input in a multi-language analysis. Use a codeql-config.yml file instead and specify packs by language."
+    );
+  } else if (languages.length === 0) {
+    throw new ConfigurationError(
+      "No languages specified. Cannot process the packs input."
+    );
+  }
+  rawPacksInput = rawPacksInput.trim();
+  if (packsInputCombines) {
+    rawPacksInput = rawPacksInput.trim().substring(1).trim();
+    if (!rawPacksInput) {
+      throw new ConfigurationError(
+        getConfigFilePropertyError(
+          void 0,
+          "packs",
+          "A '+' was used in the 'packs' input to specify that you wished to add some packs to your CodeQL analysis. However, no packs were specified. Please either remove the '+' or specify some packs."
+        )
+      );
+    }
+  }
+  return {
+    [languages[0]]: rawPacksInput.split(",").reduce((packs, pack) => {
+      packs.push(validatePackSpecification(pack));
+      return packs;
+    }, [])
+  };
+}
+async function calculateAugmentation(rawPacksInput, rawQueriesInput, repositoryProperties, languages) {
+  const packsInputCombines = shouldCombine(rawPacksInput);
+  const packsInput = parsePacksFromInput(
+    rawPacksInput,
+    languages,
+    packsInputCombines
+  );
+  const queriesInputCombines = shouldCombine(rawQueriesInput);
+  const queriesInput = parseQueriesFromInput(
+    rawQueriesInput,
+    queriesInputCombines
+  );
+  const repoExtraQueries = repositoryProperties["github-codeql-extra-queries" /* EXTRA_QUERIES */];
+  const repoExtraQueriesCombines = shouldCombine(repoExtraQueries);
+  const repoPropertyQueries = {
+    combines: repoExtraQueriesCombines,
+    input: parseQueriesFromInput(
+      repoExtraQueries,
+      repoExtraQueriesCombines,
+      new ConfigurationError(
+        getRepoPropertyError(
+          "github-codeql-extra-queries" /* EXTRA_QUERIES */,
+          getEmptyCombinesError()
+        )
+      )
+    )
+  };
+  return {
+    packsInputCombines,
+    packsInput: packsInput?.[languages[0]],
+    queriesInput,
+    queriesInputCombines,
+    repoPropertyQueries
+  };
+}
+function parseQueriesFromInput(rawQueriesInput, queriesInputCombines, errorToThrow) {
+  if (!rawQueriesInput) {
+    return void 0;
+  }
+  const trimmedInput = queriesInputCombines ? rawQueriesInput.trim().slice(1).trim() : rawQueriesInput?.trim() ?? "";
+  if (queriesInputCombines && trimmedInput.length === 0) {
+    if (errorToThrow) {
+      throw errorToThrow;
+    }
+    throw new ConfigurationError(
+      getConfigFilePropertyError(
+        void 0,
+        "queries",
+        "A '+' was used in the 'queries' input to specify that you wished to add some packs to your CodeQL analysis. However, no packs were specified. Please either remove the '+' or specify some packs."
+      )
+    );
+  }
+  return trimmedInput.split(",").map((query) => ({ uses: query.trim() }));
+}
+function combineQueries(logger, config, augmentationProperties) {
+  const result = [];
+  if (augmentationProperties.repoPropertyQueries?.input) {
+    logger.info(
+      `Found query configuration in the repository properties (${"github-codeql-extra-queries" /* EXTRA_QUERIES */}): ${augmentationProperties.repoPropertyQueries.input.map((q) => q.uses).join(", ")}`
+    );
+    if (!augmentationProperties.repoPropertyQueries.combines) {
+      logger.info(
+        `The queries configured in the repository properties don't allow combining with other query settings. Any queries configured elsewhere will be ignored.`
+      );
+      return augmentationProperties.repoPropertyQueries.input;
+    } else {
+      result.push(...augmentationProperties.repoPropertyQueries.input);
+    }
+  }
+  if (augmentationProperties.queriesInput) {
+    if (!augmentationProperties.queriesInputCombines) {
+      return result.concat(augmentationProperties.queriesInput);
+    } else {
+      result.push(...augmentationProperties.queriesInput);
+    }
+  }
+  if (config.queries) {
+    result.push(...config.queries);
+  }
+  return result;
+}
+function generateCodeScanningConfig(logger, originalUserInput, augmentationProperties) {
+  const augmentedConfig = cloneObject(originalUserInput);
+  augmentedConfig.queries = combineQueries(
+    logger,
+    augmentedConfig,
+    augmentationProperties
+  );
+  logger.debug(
+    `Combined queries: ${augmentedConfig.queries?.map((q) => q.uses).join(",")}`
+  );
+  if (augmentedConfig.queries?.length === 0) {
+    delete augmentedConfig.queries;
+  }
+  if (augmentationProperties.packsInput) {
+    if (augmentationProperties.packsInputCombines) {
+      if (Array.isArray(augmentedConfig.packs)) {
+        augmentedConfig.packs = (augmentedConfig.packs || []).concat(
+          augmentationProperties.packsInput
+        );
+      } else if (!augmentedConfig.packs) {
+        augmentedConfig.packs = augmentationProperties.packsInput;
+      } else {
+        const language = Object.keys(augmentedConfig.packs)[0];
+        augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
+      }
+    } else {
+      augmentedConfig.packs = augmentationProperties.packsInput;
+    }
+  }
+  if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
+    delete augmentedConfig.packs;
+  }
+  return augmentedConfig;
+}
+function parseUserConfig(logger, pathInput, contents, validateConfig) {
+  try {
+    const schema = (
+      // eslint-disable-next-line @typescript-eslint/no-require-imports
+      require_db_config_schema()
+    );
+    const doc = load(contents);
+    if (validateConfig) {
+      const result = new jsonschema.Validator().validate(doc, schema);
+      if (result.errors.length > 0) {
+        for (const error3 of result.errors) {
+          logger.error(error3.stack);
+        }
+        throw new ConfigurationError(
+          getInvalidConfigFileMessage(
+            pathInput,
+            result.errors.map((e) => e.stack)
+          )
+        );
+      }
+    }
+    return doc;
+  } catch (error3) {
+    if (error3 instanceof YAMLException) {
+      throw new ConfigurationError(
+        getConfigFileParseErrorMessage(pathInput, error3.message)
+      );
+    }
+    throw error3;
+  }
+}
+
+// src/config/remote-file.ts
+var DEFAULT_CONFIG_FILE_NAME = ".github/codeql-config.yml";
+var DEFAULT_CONFIG_FILE_REF = "main";
+function getDefaultOwner(env) {
+  const currentRepoNwo = env.getRequired("GITHUB_REPOSITORY" /* GITHUB_REPOSITORY */);
+  const nwoParts = currentRepoNwo.split("/");
+  if (nwoParts.length !== 2 || nwoParts[0].trim().length === 0) {
+    throw new Error(
+      `Expected ${"GITHUB_REPOSITORY" /* GITHUB_REPOSITORY */} to contain a name with owner, but got '${currentRepoNwo}'.`
+    );
+  }
+  return nwoParts[0].trim();
+}
+var OLD_REMOTE_ADDRESS_FORMAT = new RegExp(
+  "(?[^/]+)/(?[^/]+)/(?[^@]+)@(?.*)"
+);
+function parseOldRemoteFileAddress(input) {
+  const pieces = OLD_REMOTE_ADDRESS_FORMAT.exec(input);
+  if (pieces?.groups === void 0 || pieces.length < 5) {
+    return new Failure(void 0);
+  }
+  return new Success({
+    owner: pieces.groups.owner.trim(),
+    repo: pieces.groups.repo.trim(),
+    path: pieces.groups.path.trim(),
+    ref: pieces.groups.ref.trim()
+  });
+}
+function parseNewRemoteFileAddress(env, configFile) {
+  const format = new RegExp(
+    "^((?[^:@/]+)/)?(?[^:@/]+)(@(?[^:]+))?(:(?.+))?$"
+  );
+  const pieces = format.exec(configFile.trim());
+  const repo = pieces?.groups?.repo?.trim();
+  if (!pieces?.groups || !repo || repo.length === 0) {
+    return new Failure(void 0);
+  }
+  const owner = pieces.groups.owner?.trim();
+  const path29 = pieces.groups.path?.trim();
+  const ref = pieces.groups.ref?.trim();
+  return new Success({
+    owner: owner || getDefaultOwner(env),
+    repo,
+    path: path29 || DEFAULT_CONFIG_FILE_NAME,
+    ref: ref || DEFAULT_CONFIG_FILE_REF
+  });
+}
+async function parseRemoteFileAddress(actionState, configFile) {
+  const oldFormatAddressResult = parseOldRemoteFileAddress(configFile);
+  if (oldFormatAddressResult.isSuccess()) {
+    return oldFormatAddressResult.value;
+  }
+  const newFormatAddressResult = parseNewRemoteFileAddress(
+    actionState.env,
+    configFile
+  );
+  if (newFormatAddressResult.isFailure()) {
+    throw new ConfigurationError(
+      getConfigFileRepoFormatInvalidMessage(configFile)
+    );
+  }
+  const address = newFormatAddressResult.value;
+  if (address.path.startsWith("/")) {
+    throw new ConfigurationError(
+      `The path component of '${configFile}' cannot be an absolute path.`
+    );
+  }
+  return address;
+}
+
+// src/config/file.ts
+var LOCAL_PATH_PREFIX = "./";
+var REMOTE_PATH_PREFIX = "remote=";
+async function getConfigFileInput({
+  logger,
+  actions,
+  features
+}, repositoryProperties, analysisKinds) {
+  const input = actions.getOptionalInput("config-file");
+  if (input !== void 0) {
+    logger.info(`Using configuration file input from workflow: ${input}`);
+    return input;
+  }
+  const propertyValue = repositoryProperties["github-codeql-config-file" /* CONFIG_FILE */];
+  const analysisKindSupported = analysisKinds === void 0 || analysisKinds.includes("code-scanning" /* CodeScanning */) && analysisKinds.length === 1;
+  if (propertyValue !== void 0 && propertyValue.trim().length > 0) {
+    const useRepositoryProperty = await features.getValue(
+      "config_file_repository_property" /* ConfigFileRepositoryProperty */
+    );
+    if (analysisKindSupported && useRepositoryProperty) {
+      logger.info(
+        `Using configuration file input from repository property: ${propertyValue}`
+      );
+      return propertyValue;
+    } else if (!analysisKindSupported) {
+      logger.info(
+        "Ignoring configuration file input from repository property, because it is unsupported for the current analysis kind."
+      );
+    } else {
+      logger.info(
+        "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled."
+      );
+    }
+  }
+  return void 0;
+}
+async function getRemoteConfig(actionState, configFile, apiDetails) {
+  const address = await parseRemoteFileAddress(actionState, configFile);
+  const shouldProxyRequest = await actionState.features.getValue(
+    "proxy_api_requests" /* ProxyApiRequests */
+  );
+  const proxy = shouldProxyRequest ? getRegistryProxy(actionState) : void 0;
+  const response = await getApiClientWithExternalAuth(apiDetails, proxy).rest.repos.getContent({
+    owner: address.owner,
+    repo: address.repo,
+    path: address.path,
+    ref: address.ref
+  });
+  let fileContents;
+  if ("content" in response.data && response.data.content !== void 0) {
+    fileContents = response.data.content;
+  } else if (Array.isArray(response.data)) {
+    throw new ConfigurationError(
+      getConfigFileDirectoryGivenMessage(configFile)
+    );
+  } else {
+    throw new ConfigurationError(
+      getConfigFileFormatInvalidMessage(configFile)
+    );
+  }
+  const validateConfig = await actionState.features.getValue(
+    "validate_db_config" /* ValidateDbConfig */
+  );
+  return parseUserConfig(
+    actionState.logger,
+    configFile,
+    Buffer.from(fileContents, "base64").toString("binary"),
+    validateConfig
+  );
+}
+
+// src/diff-informed-analysis-utils.ts
+var fs6 = __toESM(require("fs"));
+async function getDiffInformedAnalysisBranches(codeql, features, logger) {
+  if (!await features.getValue("diff_informed_queries" /* DiffInformedQueries */, codeql)) {
+    return void 0;
+  }
+  const gitHubVersion = await getGitHubVersion();
+  if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(gitHubVersion.version, "<3.19", true)) {
+    return void 0;
+  }
+  const branches = getPullRequestBranches();
+  if (!branches) {
+    logger.info(
+      "Not performing diff-informed analysis because we are not analyzing a pull request."
+    );
+  }
+  return branches;
+}
+async function prepareDiffInformedAnalysis(codeql, features, logger) {
+  let branches;
+  try {
+    branches = await getDiffInformedAnalysisBranches(codeql, features, logger);
+  } catch (e) {
+    logger.warning(
+      `Failed to determine branch information for diff-informed analysis: ${getErrorMessage(e)}`
+    );
+    return false;
+  }
+  if (!branches) {
+    return false;
+  }
+  try {
+    return await computeAndPersistDiffRanges(branches, logger);
+  } catch (e) {
+    logger.warning(
+      `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`
+    );
+    return false;
+  }
+}
+function writeDiffRangesJsonFile(logger, ranges) {
+  const jsonContents = JSON.stringify(ranges, null, 2);
+  const jsonFilePath = getDiffRangesJsonFilePath();
+  fs6.writeFileSync(jsonFilePath, jsonContents);
+  logger.debug(
+    `Wrote pr-diff-range JSON file to ${jsonFilePath}:
+${jsonContents}`
+  );
+}
+function readDiffRangesJsonFile(logger) {
+  const jsonFilePath = getDiffRangesJsonFilePath();
+  if (!fs6.existsSync(jsonFilePath)) {
+    logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`);
+    return void 0;
+  }
+  const jsonContents = fs6.readFileSync(jsonFilePath, "utf8");
+  logger.debug(
+    `Read pr-diff-range JSON file from ${jsonFilePath}:
+${jsonContents}`
+  );
+  try {
+    return JSON.parse(jsonContents);
+  } catch (e) {
+    logger.warning(
+      `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}`
+    );
+    return void 0;
+  }
+}
+async function getPullRequestEditedDiffRanges(branches, logger) {
+  const fileDiffs = await getFileDiffsWithBasehead(branches, logger);
+  if (fileDiffs === void 0) {
+    return void 0;
+  }
+  if (fileDiffs.length >= 300) {
+    logger.warning(
+      `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.`
+    );
+    return void 0;
+  }
+  const results = [];
+  for (const filediff of fileDiffs) {
+    const diffRanges = getDiffRanges(filediff, logger);
+    if (diffRanges === void 0) {
+      return void 0;
+    }
+    results.push(...diffRanges);
+  }
+  return results;
+}
+async function computeAndPersistDiffRanges(branches, logger) {
+  logger.info("Computing PR diff ranges...");
+  const ranges = await getPullRequestEditedDiffRanges(branches, logger);
+  if (ranges === void 0) {
+    return false;
+  }
+  writeDiffRangesJsonFile(logger, ranges);
+  const distinctFiles = new Set(ranges.map((r) => r.path)).size;
+  logger.info(
+    `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`
+  );
+  return true;
+}
+async function getFileDiffsWithBasehead(branches, logger) {
+  const repositoryNwo = getRepositoryNwoFromEnv(
+    "CODE_SCANNING_REPOSITORY",
+    "GITHUB_REPOSITORY"
+  );
+  const basehead = `${branches.base}...${branches.head}`;
+  try {
+    const response = await getApiClient().rest.repos.compareCommitsWithBasehead(
+      {
+        owner: repositoryNwo.owner,
+        repo: repositoryNwo.repo,
+        basehead,
+        per_page: 1
+      }
+    );
+    logger.debug(
+      `Response from compareCommitsWithBasehead(${basehead}):
+${JSON.stringify(response, null, 2)}`
+    );
+    return response.data.files;
+  } catch (error3) {
+    if (error3.status) {
+      logger.warning(`Error retrieving diff ${basehead}: ${error3.message}`);
+      logger.debug(
+        `Error running compareCommitsWithBasehead(${basehead}):
+Request: ${JSON.stringify(error3.request, null, 2)}
+Error Response: ${JSON.stringify(error3.response, null, 2)}`
+      );
+      return void 0;
+    } else {
+      throw error3;
+    }
+  }
+}
+function getDiffRanges(fileDiff, logger) {
+  if (fileDiff.patch === void 0) {
+    if (fileDiff.changes === 0) {
+      return [];
+    }
+    return [
+      {
+        path: fileDiff.filename,
+        startLine: 0,
+        endLine: 0
+      }
+    ];
+  }
+  let currentLine = 0;
+  let additionRangeStartLine = void 0;
+  const diffRanges = [];
+  const diffLines = fileDiff.patch.split("\n");
+  diffLines.push(" ");
+  for (const diffLine of diffLines) {
+    if (diffLine.startsWith("-")) {
+      continue;
+    }
+    if (diffLine.startsWith("+")) {
+      if (additionRangeStartLine === void 0) {
+        additionRangeStartLine = currentLine;
+      }
+      currentLine++;
+      continue;
+    }
+    if (additionRangeStartLine !== void 0) {
+      diffRanges.push({
+        path: fileDiff.filename,
+        startLine: additionRangeStartLine,
+        endLine: currentLine - 1
+      });
+      additionRangeStartLine = void 0;
+    }
+    if (diffLine.startsWith("@@ ")) {
+      const match2 = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/);
+      if (match2 === null) {
+        logger.warning(
+          `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}`
+        );
+        return void 0;
+      }
+      currentLine = parseInt(match2[1], 10);
+      continue;
+    }
+    if (diffLine.startsWith(" ")) {
+      currentLine++;
+      continue;
+    }
+  }
+  return diffRanges;
+}
+
+// src/languages/builtin.json
+var builtin_default = {
+  languages: [
+    "actions",
+    "cpp",
+    "csharp",
+    "go",
+    "java",
+    "javascript",
+    "python",
+    "ruby",
+    "rust",
+    "swift"
+  ],
+  aliases: {
+    c: "cpp",
+    "c-c++": "cpp",
+    "c-cpp": "cpp",
+    "c#": "csharp",
+    "c++": "cpp",
+    "java-kotlin": "java",
+    "javascript-typescript": "javascript",
+    kotlin: "java",
+    typescript: "javascript"
+  }
+};
+
+// src/languages/index.ts
+var BuiltInLanguage = /* @__PURE__ */ ((BuiltInLanguage3) => {
+  BuiltInLanguage3["actions"] = "actions";
+  BuiltInLanguage3["cpp"] = "cpp";
+  BuiltInLanguage3["csharp"] = "csharp";
+  BuiltInLanguage3["go"] = "go";
+  BuiltInLanguage3["java"] = "java";
+  BuiltInLanguage3["javascript"] = "javascript";
+  BuiltInLanguage3["python"] = "python";
+  BuiltInLanguage3["ruby"] = "ruby";
+  BuiltInLanguage3["rust"] = "rust";
+  BuiltInLanguage3["swift"] = "swift";
+  return BuiltInLanguage3;
+})(BuiltInLanguage || {});
+var builtInLanguageSet = new Set(builtin_default.languages);
+function isBuiltInLanguage(language) {
+  return builtInLanguageSet.has(language);
+}
+function parseBuiltInLanguage(language) {
+  language = language.trim().toLowerCase();
+  language = builtin_default.aliases[language] ?? language;
+  if (isBuiltInLanguage(language)) {
+    return language;
+  }
+  return void 0;
+}
+
+// src/overlay/diagnostics.ts
+async function addOverlayDisablementDiagnostics(config, codeql, overlayDisabledReason) {
+  addNoLanguageDiagnostic(
+    config,
+    makeTelemetryDiagnostic(
+      "codeql-action/overlay-disabled",
+      "Overlay analysis disabled",
+      {
+        reason: overlayDisabledReason
+      }
+    )
+  );
+  if (overlayDisabledReason === "skipped-due-to-cached-status" /* SkippedDueToCachedStatus */) {
+    addNoLanguageDiagnostic(
+      config,
+      makeDiagnostic(
+        "codeql-action/overlay-disabled-due-to-cached-status",
+        "Skipped improved incremental analysis because it failed previously with similar hardware resources",
+        {
+          attributes: {
+            languages: config.languages
+          },
+          markdownMessage: `Improved incremental analysis was skipped because it previously failed for this repository with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. One possible reason for this is that improved incremental analysis can require a significant amount of disk space for some repositories. If you want to try re-enabling improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.
+
+Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`,
+          severity: "note",
+          visibility: {
+            cliSummaryTable: true,
+            statusPage: true,
+            telemetry: false
+          }
+        }
+      )
+    );
+  }
+  if (overlayDisabledReason === "disabled-by-repository-property" /* DisabledByRepositoryProperty */) {
+    addNoLanguageDiagnostic(
+      config,
+      makeDiagnostic(
+        "codeql-action/overlay-disabled-by-repository-property",
+        "Improved incremental analysis disabled by repository property",
+        {
+          attributes: {
+            languages: config.languages
+          },
+          markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`,
+          severity: "note",
+          visibility: {
+            cliSummaryTable: true,
+            statusPage: true,
+            telemetry: false
+          }
+        }
+      )
+    );
+  }
 }
-function isUnsupportedPlatform() {
-  return !SUPPORTED_PLATFORMS.some(
-    ([platform2, arch2]) => platform2 === process.platform && arch2 === process.arch
+
+// src/overlay/status.ts
+var fs7 = __toESM(require("fs"));
+var path8 = __toESM(require("path"));
+var actionsCache = __toESM(require_cache4());
+var MAX_CACHE_OPERATION_MS = 3e4;
+var STATUS_FILE_NAME = "overlay-status.json";
+function getStatusFilePath(languages) {
+  return path8.join(
+    getTemporaryDirectory(),
+    "overlay-status",
+    [...languages].sort().join("+"),
+    STATUS_FILE_NAME
   );
 }
-function getUnsupportedPlatformError(cliError) {
-  return new ConfigurationError(
-    `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}`
-  );
+function createOverlayStatus(attributes, checkRunId) {
+  const job = {
+    workflowRunId: getWorkflowRunID(),
+    workflowRunAttempt: getWorkflowRunAttempt(),
+    name: getRequiredEnvParam("GITHUB_JOB"),
+    checkRunId
+  };
+  return {
+    ...attributes,
+    job
+  };
 }
-function wrapCliConfigurationError(cliError) {
-  if (isUnsupportedPlatform()) {
-    return getUnsupportedPlatformError(cliError);
-  }
-  const cliConfigErrorCategory = getCliConfigCategoryIfExists(cliError);
-  if (cliConfigErrorCategory === void 0) {
-    return cliError;
+async function shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger) {
+  const status = await getOverlayStatus(codeql, languages, diskUsage, logger);
+  if (status === void 0) {
+    return false;
   }
-  let errorMessageBuilder = cliError.message;
-  const additionalErrorMessageToAppend = cliErrorsConfig[cliConfigErrorCategory].additionalErrorMessageToAppend;
-  if (additionalErrorMessageToAppend !== void 0) {
-    errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`;
+  if (status.attemptedToBuildOverlayBaseDatabase && !status.builtOverlayBaseDatabase) {
+    logger.debug(
+      "Cached overlay status indicates that building an overlay base database was unsuccessful."
+    );
+    return true;
   }
-  return new ConfigurationError(errorMessageBuilder);
-}
-
-// src/config-utils.ts
-var fs9 = __toESM(require("fs"));
-var path10 = __toESM(require("path"));
-var import_perf_hooks = require("perf_hooks");
-var core9 = __toESM(require_core());
-
-// src/caching-utils.ts
-var crypto2 = __toESM(require("crypto"));
-var core7 = __toESM(require_core());
-async function getTotalCacheSize(paths, logger, quiet = false) {
-  const sizes = await Promise.all(
-    paths.map((cacheDir2) => tryGetFolderBytes(cacheDir2, logger, quiet))
+  logger.debug(
+    "Cached overlay status does not indicate a previous unsuccessful attempt to build an overlay base database."
   );
-  return sizes.map((a) => a || 0).reduce((a, b) => a + b, 0);
-}
-function shouldStoreCache(kind) {
-  return kind === "full" /* Full */ || kind === "store" /* Store */;
-}
-function shouldRestoreCache(kind) {
-  return kind === "full" /* Full */ || kind === "restore" /* Restore */;
+  return false;
 }
-function getCachingKind(input) {
-  switch (input) {
-    case void 0:
-    case "none":
-    case "off":
-    case "false":
-      return "none" /* None */;
-    case "full":
-    case "on":
-    case "true":
-      return "full" /* Full */;
-    case "store":
-      return "store" /* Store */;
-    case "restore":
-      return "restore" /* Restore */;
-    default:
-      core7.warning(
-        `Unrecognized 'dependency-caching' input: ${input}. Defaulting to 'none'.`
+async function getOverlayStatus(codeql, languages, diskUsage, logger) {
+  const cacheKey3 = await getCacheKey(codeql, languages, diskUsage);
+  const statusFile = getStatusFilePath(languages);
+  try {
+    await fs7.promises.mkdir(path8.dirname(statusFile), { recursive: true });
+    const foundKey = await waitForResultWithTimeLimit(
+      MAX_CACHE_OPERATION_MS,
+      actionsCache.restoreCache([statusFile], cacheKey3),
+      () => {
+        logger.warning("Timed out restoring overlay status from cache.");
+      }
+    );
+    if (foundKey === void 0) {
+      logger.debug("No overlay status found in Actions cache.");
+      return void 0;
+    }
+    if (!fs7.existsSync(statusFile)) {
+      logger.debug(
+        "Overlay status cache entry found but status file is missing."
       );
-      return "none" /* None */;
+      return void 0;
+    }
+    const contents = await fs7.promises.readFile(statusFile, "utf-8");
+    const parsed = JSON.parse(contents);
+    if (!isObject(parsed) || typeof parsed["attemptedToBuildOverlayBaseDatabase"] !== "boolean" || typeof parsed["builtOverlayBaseDatabase"] !== "boolean") {
+      logger.debug(
+        "Ignoring overlay status cache entry with unexpected format."
+      );
+      return void 0;
+    }
+    return parsed;
+  } catch (error3) {
+    logger.warning(
+      `Failed to restore overlay status from cache: ${getErrorMessage(error3)}`
+    );
+    return void 0;
   }
 }
-var cacheKeyHashLength = 16;
-function createCacheKeyHash(components) {
-  const componentsJson = JSON.stringify(components);
-  return crypto2.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength);
-}
-function getDependencyCachingEnabled() {
-  const dependencyCaching = getOptionalInput("dependency-caching") || process.env["CODEQL_ACTION_DEPENDENCY_CACHING" /* DEPENDENCY_CACHING */];
-  if (dependencyCaching !== void 0) return getCachingKind(dependencyCaching);
-  if (!isHostedRunner()) return "none" /* None */;
-  if (!isDefaultSetup()) return "none" /* None */;
-  return "none" /* None */;
-}
-
-// src/config/db-config.ts
-var path6 = __toESM(require("path"));
-var jsonschema = __toESM(require_lib2());
-var semver5 = __toESM(require_semver2());
-
-// src/error-messages.ts
-var PACKS_PROPERTY = "packs";
-function getConfigFileOutsideWorkspaceErrorMessage(configFile) {
-  return `The configuration file "${configFile}" is outside of the workspace`;
-}
-function getConfigFileDoesNotExistErrorMessage(configFile) {
-  return `The configuration file "${configFile}" does not exist`;
-}
-function getConfigFileParseErrorMessage(configFile, message) {
-  return `Cannot parse "${configFile}": ${message}`;
-}
-function getInvalidConfigFileMessage(configFile, messages) {
-  const andMore = messages.length > 10 ? `, and ${messages.length - 10} more.` : ".";
-  return `The configuration file "${configFile}" is invalid: ${messages.slice(0, 10).join(", ")}${andMore}`;
-}
-function getConfigFileRepoFormatInvalidMessage(configFile) {
-  let error3 = `The configuration file "${configFile}" is not a supported remote file reference.`;
-  error3 += " Expected format //@";
-  return error3;
-}
-function getConfigFileFormatInvalidMessage(configFile) {
-  return `The configuration file "${configFile}" could not be read`;
-}
-function getConfigFileDirectoryGivenMessage(configFile) {
-  return `The configuration file "${configFile}" looks like a directory, not a file`;
-}
-function getEmptyCombinesError() {
-  return `A '+' was used to specify that you want to add extra arguments to the configuration, but no extra arguments were specified. Please either remove the '+' or specify some extra arguments.`;
-}
-function getConfigFilePropertyError(configFile, property, error3) {
-  if (configFile === void 0) {
-    return `The workflow property "${property}" is invalid: ${error3}`;
-  } else {
-    return `The configuration file "${configFile}" is invalid: property "${property}" ${error3}`;
+async function saveOverlayStatus(codeql, languages, diskUsage, status, logger) {
+  const cacheKey3 = await getCacheKey(codeql, languages, diskUsage);
+  const statusFile = getStatusFilePath(languages);
+  try {
+    await fs7.promises.mkdir(path8.dirname(statusFile), { recursive: true });
+    await fs7.promises.writeFile(statusFile, JSON.stringify(status));
+    const cacheId = await waitForResultWithTimeLimit(
+      MAX_CACHE_OPERATION_MS,
+      actionsCache.saveCache([statusFile], cacheKey3),
+      () => {
+        logger.warning("Timed out saving overlay status to cache.");
+      }
+    );
+    if (cacheId === void 0) {
+      return false;
+    }
+    logger.debug(`Saved overlay status to Actions cache with key ${cacheKey3}`);
+    return true;
+  } catch (error3) {
+    logger.warning(
+      `Failed to save overlay status to cache: ${getErrorMessage(error3)}`
+    );
+    return false;
   }
 }
-function getRepoPropertyError(propertyName, error3) {
-  return `The repository property "${propertyName}" is invalid: ${error3}`;
-}
-function getPacksStrInvalid(packStr, configFile) {
-  return configFile ? getConfigFilePropertyError(
-    configFile,
-    PACKS_PROPERTY,
-    `"${packStr}" is not a valid pack`
-  ) : `"${packStr}" is not a valid pack`;
-}
-function getNoLanguagesError() {
-  return "Did not detect any languages to analyze. Please update input in workflow or check that GitHub detects the correct languages in your repository.";
-}
-function getUnknownLanguagesError(languages) {
-  return `Did not recognize the following languages: ${languages.join(", ")}`;
+async function getCacheKey(codeql, languages, diskUsage) {
+  const diskSpaceToNearest10Gb = `${10 * Math.floor(diskUsage.numTotalBytes / (10 * 1024 * 1024 * 1024))}GB`;
+  return `codeql-overlay-status-${[...languages].sort().join("+")}-${(await codeql.getVersion()).version}-runner-${diskSpaceToNearest10Gb}`;
 }
 
-// src/feature-flags/properties.ts
-var GITHUB_CODEQL_PROPERTY_PREFIX = "github-codeql-";
-var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
-  RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
-  RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
-  RepositoryPropertyName2["FILE_COVERAGE_ON_PRS"] = "github-codeql-file-coverage-on-prs";
-  return RepositoryPropertyName2;
-})(RepositoryPropertyName || {});
-function isString2(value) {
-  return typeof value === "string";
+// src/trap-caching.ts
+var fs8 = __toESM(require("fs"));
+var path9 = __toESM(require("path"));
+var actionsCache2 = __toESM(require_cache4());
+var CACHE_VERSION = 1;
+var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap";
+var MINIMUM_CACHE_MB_TO_UPLOAD = 10;
+var MAX_CACHE_OPERATION_MS2 = 12e4;
+async function downloadTrapCaches(codeql, languages, logger) {
+  const result = {};
+  const languagesSupportingCaching = await getLanguagesSupportingCaching(
+    codeql,
+    languages,
+    logger
+  );
+  logger.info(
+    `Found ${languagesSupportingCaching.length} languages that support TRAP caching`
+  );
+  if (languagesSupportingCaching.length === 0) return result;
+  const cachesDir = path9.join(
+    getTemporaryDirectory(),
+    "trapCaches"
+  );
+  for (const language of languagesSupportingCaching) {
+    const cacheDir2 = path9.join(cachesDir, language);
+    fs8.mkdirSync(cacheDir2, { recursive: true });
+    result[language] = cacheDir2;
+  }
+  if (await isAnalyzingDefaultBranch()) {
+    logger.info(
+      "Analyzing default branch. Skipping downloading of TRAP caches."
+    );
+    return result;
+  }
+  let baseSha = "unknown";
+  const eventPath = process.env.GITHUB_EVENT_PATH;
+  if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) {
+    const event = JSON.parse(fs8.readFileSync(path9.resolve(eventPath), "utf-8"));
+    baseSha = event.pull_request?.base?.sha || baseSha;
+  }
+  for (const language of languages) {
+    const cacheDir2 = result[language];
+    if (cacheDir2 === void 0) continue;
+    const preferredKey = await cacheKey(codeql, language, baseSha);
+    logger.info(
+      `Looking in Actions cache for TRAP cache with key ${preferredKey}`
+    );
+    const found = await waitForResultWithTimeLimit(
+      MAX_CACHE_OPERATION_MS2,
+      actionsCache2.restoreCache([cacheDir2], preferredKey, [
+        // Fall back to any cache with the right key prefix
+        await cachePrefix(codeql, language)
+      ]),
+      () => {
+        logger.info(
+          `Timed out downloading cache for ${language}, will continue without it`
+        );
+      }
+    );
+    if (found === void 0) {
+      logger.info(`No TRAP cache found in Actions cache for ${language}`);
+      delete result[language];
+    }
+  }
+  return result;
 }
-var stringProperty = {
-  validate: isString2,
-  parse: parseStringRepositoryProperty
-};
-var booleanProperty = {
-  // The value from the API should come as a string, which we then parse into a boolean.
-  validate: isString2,
-  parse: parseBooleanRepositoryProperty
-};
-var repositoryPropertyParsers = {
-  ["github-codeql-disable-overlay" /* DISABLE_OVERLAY */]: booleanProperty,
-  ["github-codeql-extra-queries" /* EXTRA_QUERIES */]: stringProperty,
-  ["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */]: booleanProperty
-};
-async function loadPropertiesFromApi(logger, repositoryNwo) {
-  try {
-    const response = await getRepositoryProperties(repositoryNwo);
-    const remoteProperties = response.data;
-    if (!Array.isArray(remoteProperties)) {
-      throw new Error(
-        `Expected repository properties API to return an array, but got: ${JSON.stringify(response.data)}`
+async function uploadTrapCaches(codeql, config, logger) {
+  if (!await isAnalyzingDefaultBranch()) return false;
+  for (const language of config.languages) {
+    const cacheDir2 = config.trapCaches[language];
+    if (cacheDir2 === void 0) continue;
+    const trapFolderSize = await tryGetFolderBytes(cacheDir2, logger);
+    if (trapFolderSize === void 0) {
+      logger.info(
+        `Skipping upload of TRAP cache for ${language} as we couldn't determine its size`
       );
+      continue;
     }
-    logger.debug(
-      `Retrieved ${remoteProperties.length} repository properties: ${remoteProperties.map((p) => p.property_name).join(", ")}`
+    if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1048576) {
+      logger.info(
+        `Skipping upload of TRAP cache for ${language} as it is too small`
+      );
+      continue;
+    }
+    const key = await cacheKey(
+      codeql,
+      language,
+      process.env.GITHUB_SHA || "unknown"
     );
-    const properties = {};
-    const unrecognisedProperties = [];
-    for (const property of remoteProperties) {
-      if (property.property_name === void 0) {
-        throw new Error(
-          `Expected repository property object to have a 'property_name', but got: ${JSON.stringify(property)}`
+    logger.info(`Uploading TRAP cache to Actions cache with key ${key}`);
+    await waitForResultWithTimeLimit(
+      MAX_CACHE_OPERATION_MS2,
+      actionsCache2.saveCache([cacheDir2], key),
+      () => {
+        logger.info(
+          `Timed out waiting for TRAP cache for ${language} to upload, will continue without uploading`
         );
       }
-      if (isKnownPropertyName(property.property_name)) {
-        setProperty2(properties, property.property_name, property.value, logger);
-      } else if (property.property_name.startsWith(GITHUB_CODEQL_PROPERTY_PREFIX) && !isDynamicWorkflow()) {
-        unrecognisedProperties.push(property.property_name);
-      }
-    }
-    if (Object.keys(properties).length === 0) {
-      logger.debug("No known repository properties were found.");
-    } else {
-      logger.debug(
-        "Loaded the following values for the repository properties:"
-      );
-      for (const [property, value] of Object.entries(properties).sort(
-        ([nameA], [nameB]) => nameA.localeCompare(nameB)
-      )) {
-        logger.debug(`  ${property}: ${value}`);
+    );
+  }
+  return true;
+}
+async function cleanupTrapCaches(config, features, logger) {
+  if (!await features.getValue("cleanup_trap_caches" /* CleanupTrapCaches */)) {
+    return {
+      trap_cache_cleanup_skipped_because: "feature disabled"
+    };
+  }
+  logger.warning(
+    "TRAP cache cleanup is deprecated and will be removed in May 2026. We recommend instead disabling TRAP caching by passing the `trap-caching: false` input to the `init` Action."
+  );
+  if (!await isAnalyzingDefaultBranch()) {
+    return {
+      trap_cache_cleanup_skipped_because: "not analyzing default branch"
+    };
+  }
+  try {
+    let totalBytesCleanedUp = 0;
+    const allCaches = await listActionsCaches(
+      CODEQL_TRAP_CACHE_PREFIX,
+      await getRef()
+    );
+    for (const language of config.languages) {
+      if (config.trapCaches[language]) {
+        const cachesToRemove = await getTrapCachesForLanguage(
+          allCaches,
+          language,
+          logger
+        );
+        cachesToRemove.sort((a, b) => a.created_at.localeCompare(b.created_at));
+        const mostRecentCache = cachesToRemove.pop();
+        logger.debug(
+          `Keeping most recent TRAP cache (${JSON.stringify(mostRecentCache)})`
+        );
+        if (cachesToRemove.length === 0) {
+          logger.info(`No TRAP caches to clean up for ${language}.`);
+          continue;
+        }
+        for (const cache of cachesToRemove) {
+          logger.debug(`Cleaning up TRAP cache (${JSON.stringify(cache)})`);
+          await deleteActionsCache(cache.id);
+        }
+        const bytesCleanedUp = cachesToRemove.reduce(
+          (acc, item) => acc + item.size_in_bytes,
+          0
+        );
+        totalBytesCleanedUp += bytesCleanedUp;
+        const megabytesCleanedUp = (bytesCleanedUp / (1024 * 1024)).toFixed(2);
+        logger.info(
+          `Cleaned up ${megabytesCleanedUp} MiB of old TRAP caches for ${language}.`
+        );
       }
     }
-    if (unrecognisedProperties.length > 0) {
-      const unrecognisedPropertyList = unrecognisedProperties.map((name) => `'${name}'`).join(", ");
+    return { trap_cache_cleanup_size_bytes: totalBytesCleanedUp };
+  } catch (e) {
+    if (asHTTPError(e)?.status === 403) {
       logger.warning(
-        `Found repository properties (${unrecognisedPropertyList}), which look like CodeQL Action repository properties, but which are not understood by this version of the CodeQL Action. Do you need to update to a newer version?`
+        `Could not cleanup TRAP caches as the token did not have the required permissions. To clean up TRAP caches, ensure the token has the "actions:write" permission. See ${"https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs" /* ASSIGNING_PERMISSIONS_TO_JOBS */} for more information.`
       );
+    } else {
+      logger.info(`Failed to cleanup TRAP caches, continuing. Details: ${e}`);
     }
-    return properties;
-  } catch (e) {
-    throw new Error(
-      `Encountered an error while trying to determine repository properties: ${e}`
-    );
+    return { trap_cache_cleanup_error: getErrorMessage(e) };
   }
 }
-function setProperty2(properties, name, value, logger) {
-  const propertyOptions = repositoryPropertyParsers[name];
-  if (propertyOptions.validate(value)) {
-    properties[name] = propertyOptions.parse(name, value, logger);
-  } else {
-    throw new Error(
-      `Unexpected value for repository property '${name}' (${typeof value}), got: ${JSON.stringify(value)}`
-    );
+async function getTrapCachesForLanguage(allCaches, language, logger) {
+  logger.debug(`Listing TRAP caches for ${language}`);
+  for (const cache of allCaches) {
+    if (!cache.created_at || !cache.id || !cache.key || !cache.size_in_bytes) {
+      throw new Error(
+        `An unexpected cache item was returned from the API that was missing one or more required fields: ${JSON.stringify(cache)}`
+      );
+    }
   }
+  return allCaches.filter((cache) => {
+    return cache.key?.includes(`-${language}-`);
+  });
 }
-function parseBooleanRepositoryProperty(name, value, logger) {
-  if (value !== "true" && value !== "false") {
-    logger.warning(
-      `Repository property '${name}' has unexpected value '${value}'. Expected 'true' or 'false'. Defaulting to false.`
-    );
+async function getLanguagesSupportingCaching(codeql, languages, logger) {
+  const result = [];
+  const resolveResult = await codeql.resolveLanguages();
+  outer: for (const lang of languages) {
+    const extractorsForLanguage = resolveResult.extractors[lang];
+    if (extractorsForLanguage === void 0) {
+      logger.info(
+        `${lang} does not support TRAP caching (couldn't find an extractor)`
+      );
+      continue;
+    }
+    if (extractorsForLanguage.length !== 1) {
+      logger.info(
+        `${lang} does not support TRAP caching (found multiple extractors)`
+      );
+      continue;
+    }
+    const extractor = extractorsForLanguage[0];
+    const trapCacheOptions = extractor.extractor_options?.trap?.properties?.cache?.properties;
+    if (trapCacheOptions === void 0) {
+      logger.info(
+        `${lang} does not support TRAP caching (missing option group)`
+      );
+      continue;
+    }
+    for (const requiredOpt of ["dir", "bound", "write"]) {
+      if (!(requiredOpt in trapCacheOptions)) {
+        logger.info(
+          `${lang} does not support TRAP caching (missing ${requiredOpt} option)`
+        );
+        continue outer;
+      }
+    }
+    result.push(lang);
   }
-  return value === "true";
+  return result;
 }
-function parseStringRepositoryProperty(_name, value) {
-  return value;
+async function cacheKey(codeql, language, baseSha) {
+  return `${await cachePrefix(codeql, language)}${baseSha}`;
 }
-var KNOWN_REPOSITORY_PROPERTY_NAMES = new Set(
-  Object.values(RepositoryPropertyName)
-);
-function isKnownPropertyName(name) {
-  return KNOWN_REPOSITORY_PROPERTY_NAMES.has(name);
+async function cachePrefix(codeql, language) {
+  return `${CODEQL_TRAP_CACHE_PREFIX}-${CACHE_VERSION}-${(await codeql.getVersion()).version}-${language}-`;
 }
 
-// src/config/db-config.ts
-function shouldCombine(inputValue) {
-  return !!inputValue?.trim().startsWith("+");
-}
-var PACK_IDENTIFIER_PATTERN = (function() {
-  const alphaNumeric = "[a-z0-9]";
-  const alphaNumericDash = "[a-z0-9-]";
-  const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
-  return new RegExp(`^${component}/${component}$`);
-})();
-function parsePacksSpecification(packStr) {
-  if (typeof packStr !== "string") {
-    throw new ConfigurationError(getPacksStrInvalid(packStr));
-  }
-  packStr = packStr.trim();
-  const atIndex = packStr.indexOf("@");
-  const colonIndex = packStr.indexOf(":", atIndex);
-  const packStart = 0;
-  const versionStart = atIndex + 1 || void 0;
-  const pathStart = colonIndex + 1 || void 0;
-  const packEnd = Math.min(
-    atIndex > 0 ? atIndex : Infinity,
-    colonIndex > 0 ? colonIndex : Infinity,
-    packStr.length
+// src/config-utils.ts
+var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 14e3;
+var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6;
+var OVERLAY_MINIMUM_MEMORY_MB = 5 * 1024;
+var CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE = "2.24.3";
+async function getSupportedLanguageMap(codeql, logger) {
+  const resolveSupportedLanguagesUsingCli = await codeql.supportsFeature(
+    "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
   );
-  const versionEnd = versionStart ? Math.min(colonIndex > 0 ? colonIndex : Infinity, packStr.length) : void 0;
-  const pathEnd = pathStart ? packStr.length : void 0;
-  const packName = packStr.slice(packStart, packEnd).trim();
-  const version = versionStart ? packStr.slice(versionStart, versionEnd).trim() : void 0;
-  const packPath = pathStart ? packStr.slice(pathStart, pathEnd).trim() : void 0;
-  if (!PACK_IDENTIFIER_PATTERN.test(packName)) {
-    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  const resolveResult = await codeql.resolveLanguages({
+    filterToLanguagesWithQueries: resolveSupportedLanguagesUsingCli
+  });
+  if (resolveSupportedLanguagesUsingCli) {
+    logger.debug(
+      `The CodeQL CLI supports the following languages: ${Object.keys(resolveResult.extractors).join(", ")}`
+    );
   }
-  if (version) {
-    try {
-      new semver5.Range(version);
-    } catch {
-      throw new ConfigurationError(getPacksStrInvalid(packStr));
+  const supportedLanguages = {};
+  for (const extractor of Object.keys(resolveResult.extractors)) {
+    if (resolveSupportedLanguagesUsingCli || BuiltInLanguage[extractor] !== void 0) {
+      supportedLanguages[extractor] = extractor;
     }
   }
-  if (packPath && (path6.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows
-  // Use `x.split(y).join(z)` as a polyfill for `x.replaceAll(y, z)` since
-  // if we used a regex we'd need to escape the path separator on Windows
-  // which seems more awkward.
-  path6.normalize(packPath).split(path6.sep).join("/") !== packPath.split(path6.sep).join("/"))) {
-    throw new ConfigurationError(getPacksStrInvalid(packStr));
-  }
-  if (!packPath && pathStart) {
-    throw new ConfigurationError(getPacksStrInvalid(packStr));
+  if (resolveResult.aliases) {
+    for (const [alias, extractor] of Object.entries(resolveResult.aliases)) {
+      supportedLanguages[alias] = extractor;
+    }
   }
-  return {
-    name: packName,
-    version,
-    path: packPath
-  };
+  return supportedLanguages;
 }
-function validatePackSpecification(pack) {
-  return prettyPrintPack(parsePacksSpecification(pack));
+var baseWorkflowsPath = ".github/workflows";
+function hasActionsWorkflows(sourceRoot) {
+  const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath);
+  const stats = fs9.lstatSync(workflowsPath, { throwIfNoEntry: false });
+  return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0;
 }
-function parsePacksFromInput(rawPacksInput, languages, packsInputCombines) {
-  if (!rawPacksInput?.trim()) {
-    return void 0;
+async function getRawLanguagesInRepo(repository, sourceRoot, logger) {
+  logger.debug(
+    `Automatically detecting languages (${repository.owner}/${repository.repo})`
+  );
+  const response = await getApiClient().rest.repos.listLanguages({
+    owner: repository.owner,
+    repo: repository.repo
+  });
+  logger.debug(`Languages API response: ${JSON.stringify(response)}`);
+  const result = Object.keys(response.data).map(
+    (language) => language.trim().toLowerCase()
+  );
+  if (hasActionsWorkflows(sourceRoot)) {
+    logger.debug(`Found a .github/workflows directory`);
+    result.push("actions");
   }
-  if (languages.length > 1) {
-    throw new ConfigurationError(
-      "Cannot specify a 'packs' input in a multi-language analysis. Use a codeql-config.yml file instead and specify packs by language."
-    );
-  } else if (languages.length === 0) {
+  logger.debug(`Raw languages in repository: ${result.join(", ")}`);
+  return result;
+}
+async function getLanguages(codeql, languagesInput, repository, sourceRoot, logger) {
+  const { rawLanguages, autodetected } = await getRawLanguages(
+    languagesInput,
+    repository,
+    sourceRoot,
+    logger
+  );
+  const languageMap = await getSupportedLanguageMap(codeql, logger);
+  const languagesSet = /* @__PURE__ */ new Set();
+  const unknownLanguages = [];
+  for (const language of rawLanguages) {
+    const extractorName = languageMap[language];
+    if (extractorName === void 0) {
+      unknownLanguages.push(language);
+    } else {
+      languagesSet.add(extractorName);
+    }
+  }
+  const languages = Array.from(languagesSet);
+  if (!autodetected && unknownLanguages.length > 0) {
     throw new ConfigurationError(
-      "No languages specified. Cannot process the packs input."
+      getUnknownLanguagesError(unknownLanguages)
     );
   }
-  rawPacksInput = rawPacksInput.trim();
-  if (packsInputCombines) {
-    rawPacksInput = rawPacksInput.trim().substring(1).trim();
-    if (!rawPacksInput) {
-      throw new ConfigurationError(
-        getConfigFilePropertyError(
-          void 0,
-          "packs",
-          "A '+' was used in the 'packs' input to specify that you wished to add some packs to your CodeQL analysis. However, no packs were specified. Please either remove the '+' or specify some packs."
-        )
-      );
-    }
+  if (languages.length === 0) {
+    throw new ConfigurationError(getNoLanguagesError());
+  }
+  if (autodetected) {
+    logger.info(`Autodetected languages: ${languages.join(", ")}`);
+  } else {
+    logger.info(`Languages from configuration: ${languages.join(", ")}`);
+  }
+  return languages;
+}
+function getRawLanguagesNoAutodetect(languagesInput) {
+  return (languagesInput || "").split(",").map((x) => x.trim().toLowerCase()).filter((x) => x.length > 0);
+}
+async function getRawLanguages(languagesInput, repository, sourceRoot, logger) {
+  const languagesFromInput = getRawLanguagesNoAutodetect(languagesInput);
+  if (languagesFromInput.length > 0) {
+    return { rawLanguages: languagesFromInput, autodetected: false };
   }
   return {
-    [languages[0]]: rawPacksInput.split(",").reduce((packs, pack) => {
-      packs.push(validatePackSpecification(pack));
-      return packs;
-    }, [])
+    rawLanguages: await getRawLanguagesInRepo(repository, sourceRoot, logger),
+    autodetected: true
   };
 }
-async function calculateAugmentation(rawPacksInput, rawQueriesInput, repositoryProperties, languages) {
-  const packsInputCombines = shouldCombine(rawPacksInput);
-  const packsInput = parsePacksFromInput(
-    rawPacksInput,
+async function initActionState({
+  languagesInput,
+  queriesInput,
+  packsInput,
+  buildModeInput,
+  dbLocation,
+  dependencyCachingEnabled,
+  debugMode,
+  debugArtifactName,
+  debugDatabaseName,
+  repository,
+  tempDir,
+  codeql,
+  sourceRoot,
+  githubVersion,
+  features,
+  repositoryProperties,
+  analysisKinds,
+  logger,
+  enableFileCoverageInformation
+}, userConfig) {
+  const languages = await getLanguages(
+    codeql,
+    languagesInput,
+    repository,
+    sourceRoot,
+    logger
+  );
+  const buildMode = await parseBuildModeInput(
+    buildModeInput,
     languages,
-    packsInputCombines
+    features,
+    logger
   );
-  const queriesInputCombines = shouldCombine(rawQueriesInput);
-  const queriesInput = parseQueriesFromInput(
-    rawQueriesInput,
-    queriesInputCombines
+  const augmentationProperties = await calculateAugmentation(
+    packsInput,
+    queriesInput,
+    repositoryProperties,
+    languages
+  );
+  if (analysisKinds.length === 1 && analysisKinds.includes("code-quality" /* CodeQuality */) && augmentationProperties.repoPropertyQueries.input) {
+    logger.info(
+      `Ignoring queries configured in the repository properties, because query customisations are not supported for Code Quality analyses.`
+    );
+    augmentationProperties.repoPropertyQueries = {
+      combines: false,
+      input: void 0
+    };
+  }
+  const computedConfig = generateCodeScanningConfig(
+    logger,
+    userConfig,
+    augmentationProperties
   );
-  const repoExtraQueries = repositoryProperties["github-codeql-extra-queries" /* EXTRA_QUERIES */];
-  const repoExtraQueriesCombines = shouldCombine(repoExtraQueries);
-  const repoPropertyQueries = {
-    combines: repoExtraQueriesCombines,
-    input: parseQueriesFromInput(
-      repoExtraQueries,
-      repoExtraQueriesCombines,
-      new ConfigurationError(
-        getRepoPropertyError(
-          "github-codeql-extra-queries" /* EXTRA_QUERIES */,
-          getEmptyCombinesError()
-        )
-      )
-    )
-  };
   return {
-    packsInputCombines,
-    packsInput: packsInput?.[languages[0]],
-    queriesInput,
-    queriesInputCombines,
-    repoPropertyQueries
+    version: getActionVersion(),
+    analysisKinds,
+    languages,
+    buildMode,
+    originalUserInput: userConfig,
+    computedConfig,
+    tempDir,
+    codeQLCmd: codeql.getPath(),
+    gitHubVersion: githubVersion,
+    dbLocation: dbLocationOrDefault(dbLocation, tempDir),
+    debugMode,
+    debugArtifactName,
+    debugDatabaseName,
+    trapCaches: {},
+    trapCacheDownloadTime: 0,
+    dependencyCachingEnabled: getCachingKind(dependencyCachingEnabled),
+    dependencyCachingRestoredKeys: [],
+    extraQueryExclusions: [],
+    overlayDatabaseMode: "none" /* None */,
+    useOverlayDatabaseCaching: false,
+    overlayModeSetExplicitly: false,
+    repositoryProperties,
+    enableFileCoverageInformation
   };
 }
-function parseQueriesFromInput(rawQueriesInput, queriesInputCombines, errorToThrow) {
-  if (!rawQueriesInput) {
-    return void 0;
+async function downloadCacheWithTime(codeQL, languages, logger) {
+  const start = import_perf_hooks.performance.now();
+  const trapCaches = await downloadTrapCaches(codeQL, languages, logger);
+  const trapCacheDownloadTime = import_perf_hooks.performance.now() - start;
+  return { trapCaches, trapCacheDownloadTime };
+}
+async function loadUserConfig(actionState, configFile, workspacePath, apiDetails, tempDir) {
+  if (isLocal(configFile)) {
+    if (configFile !== userConfigFromActionPath(tempDir)) {
+      configFile = path10.resolve(workspacePath, configFile);
+      if (!(configFile + path10.sep).startsWith(workspacePath + path10.sep)) {
+        throw new ConfigurationError(
+          getConfigFileOutsideWorkspaceErrorMessage(configFile)
+        );
+      }
+    }
+    const validateConfig = await actionState.features.getValue(
+      "validate_db_config" /* ValidateDbConfig */
+    );
+    return getLocalConfig(actionState.logger, configFile, validateConfig);
+  } else {
+    if (isExplicitRemotePath(configFile)) {
+      configFile = configFile.substring(REMOTE_PATH_PREFIX.length);
+    }
+    return await getRemoteConfig(actionState, configFile, apiDetails);
   }
-  const trimmedInput = queriesInputCombines ? rawQueriesInput.trim().slice(1).trim() : rawQueriesInput?.trim() ?? "";
-  if (queriesInputCombines && trimmedInput.length === 0) {
-    if (errorToThrow) {
-      throw errorToThrow;
+}
+var OVERLAY_ANALYSIS_FEATURES = {
+  cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
+  csharp: "overlay_analysis_csharp" /* OverlayAnalysisCsharp */,
+  go: "overlay_analysis_go" /* OverlayAnalysisGo */,
+  java: "overlay_analysis_java" /* OverlayAnalysisJava */,
+  javascript: "overlay_analysis_javascript" /* OverlayAnalysisJavascript */,
+  python: "overlay_analysis_python" /* OverlayAnalysisPython */,
+  ruby: "overlay_analysis_ruby" /* OverlayAnalysisRuby */
+};
+var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
+  cpp: "overlay_analysis_code_scanning_cpp" /* OverlayAnalysisCodeScanningCpp */,
+  csharp: "overlay_analysis_code_scanning_csharp" /* OverlayAnalysisCodeScanningCsharp */,
+  go: "overlay_analysis_code_scanning_go" /* OverlayAnalysisCodeScanningGo */,
+  java: "overlay_analysis_code_scanning_java" /* OverlayAnalysisCodeScanningJava */,
+  javascript: "overlay_analysis_code_scanning_javascript" /* OverlayAnalysisCodeScanningJavascript */,
+  python: "overlay_analysis_code_scanning_python" /* OverlayAnalysisCodeScanningPython */,
+  ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */
+};
+async function checkOverlayAnalysisFeatureEnabled(features, codeql, languages, codeScanningConfig) {
+  if (!await features.getValue("overlay_analysis" /* OverlayAnalysis */, codeql)) {
+    return new Failure("overall-feature-not-enabled" /* OverallFeatureNotEnabled */);
+  }
+  let enableForCodeScanningOnly = false;
+  for (const language of languages) {
+    const feature = OVERLAY_ANALYSIS_FEATURES[language];
+    if (feature && await features.getValue(feature, codeql)) {
+      continue;
     }
-    throw new ConfigurationError(
-      getConfigFilePropertyError(
-        void 0,
-        "queries",
-        "A '+' was used in the 'queries' input to specify that you wished to add some packs to your CodeQL analysis. However, no packs were specified. Please either remove the '+' or specify some packs."
-      )
+    const codeScanningFeature = OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES[language];
+    if (codeScanningFeature && await features.getValue(codeScanningFeature, codeql)) {
+      enableForCodeScanningOnly = true;
+      continue;
+    }
+    return new Failure("language-not-enabled" /* LanguageNotEnabled */);
+  }
+  if (enableForCodeScanningOnly) {
+    const usesDefaultQueriesOnly = codeScanningConfig["disable-default-queries"] !== true && codeScanningConfig.packs === void 0 && codeScanningConfig.queries === void 0 && codeScanningConfig["query-filters"] === void 0;
+    if (!usesDefaultQueriesOnly) {
+      return new Failure("non-default-queries" /* NonDefaultQueries */);
+    }
+  }
+  return new Success(void 0);
+}
+function runnerHasSufficientDiskSpace(diskUsage, logger) {
+  const minimumDiskSpaceBytes = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES;
+  if (diskUsage.numAvailableBytes < minimumDiskSpaceBytes) {
+    const diskSpaceMb = Math.round(diskUsage.numAvailableBytes / 1e6);
+    const minimumDiskSpaceMb = Math.round(minimumDiskSpaceBytes / 1e6);
+    logger.info(
+      `Setting overlay database mode to ${"none" /* None */} due to insufficient disk space (${diskSpaceMb} MB, needed ${minimumDiskSpaceMb} MB).`
     );
+    return false;
   }
-  return trimmedInput.split(",").map((query) => ({ uses: query.trim() }));
+  return true;
 }
-function combineQueries(logger, config, augmentationProperties) {
-  const result = [];
-  if (augmentationProperties.repoPropertyQueries?.input) {
+async function runnerHasSufficientMemory(codeql, ramInput, logger) {
+  if (await codeQlVersionAtLeast(
+    codeql,
+    CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE
+  )) {
+    logger.debug(
+      `Skipping memory check for overlay analysis because CodeQL version is at least ${CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE}.`
+    );
+    return true;
+  }
+  const memoryFlagValue = getCodeQLMemoryLimit(ramInput, logger);
+  if (memoryFlagValue < OVERLAY_MINIMUM_MEMORY_MB) {
     logger.info(
-      `Found query configuration in the repository properties (${"github-codeql-extra-queries" /* EXTRA_QUERIES */}): ${augmentationProperties.repoPropertyQueries.input.map((q) => q.uses).join(", ")}`
+      `Setting overlay database mode to ${"none" /* None */} due to insufficient memory for CodeQL analysis (${memoryFlagValue} MB, needed ${OVERLAY_MINIMUM_MEMORY_MB} MB).`
     );
-    if (!augmentationProperties.repoPropertyQueries.combines) {
+    return false;
+  }
+  logger.debug(
+    `Memory available for CodeQL analysis is ${memoryFlagValue} MB, which is above the minimum of ${OVERLAY_MINIMUM_MEMORY_MB} MB.`
+  );
+  return true;
+}
+async function checkRunnerResources(codeql, diskUsage, ramInput, logger) {
+  if (!runnerHasSufficientDiskSpace(diskUsage, logger)) {
+    return new Failure("insufficient-disk-space" /* InsufficientDiskSpace */);
+  }
+  if (!await runnerHasSufficientMemory(codeql, ramInput, logger)) {
+    return new Failure("insufficient-memory" /* InsufficientMemory */);
+  }
+  return new Success(void 0);
+}
+async function checkOverlayEnablement(codeql, features, languages, sourceRoot, buildMode, ramInput, codeScanningConfig, repositoryProperties, gitVersion, logger) {
+  const modeEnv = process.env.CODEQL_OVERLAY_DATABASE_MODE;
+  if (modeEnv === "overlay" /* Overlay */ || modeEnv === "overlay-base" /* OverlayBase */ || modeEnv === "none" /* None */) {
+    logger.info(
+      `Setting overlay database mode to ${modeEnv} from the CODEQL_OVERLAY_DATABASE_MODE environment variable.`
+    );
+    if (modeEnv === "none" /* None */) {
+      return new Failure("disabled-by-environment-variable" /* DisabledByEnvironmentVariable */);
+    }
+    return validateOverlayDatabaseMode(
+      modeEnv,
+      false,
+      true,
+      codeql,
+      languages,
+      sourceRoot,
+      buildMode,
+      gitVersion,
+      logger
+    );
+  }
+  if (repositoryProperties["github-codeql-disable-overlay" /* DISABLE_OVERLAY */] === true) {
+    logger.info(
+      `Setting overlay database mode to ${"none" /* None */} because the ${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */} repository property is set to true.`
+    );
+    return new Failure("disabled-by-repository-property" /* DisabledByRepositoryProperty */);
+  }
+  const featureResult = await checkOverlayAnalysisFeatureEnabled(
+    features,
+    codeql,
+    languages,
+    codeScanningConfig
+  );
+  if (featureResult.isFailure()) {
+    return featureResult;
+  }
+  const performResourceChecks = !await features.getValue(
+    "overlay_analysis_skip_resource_checks" /* OverlayAnalysisSkipResourceChecks */,
+    codeql
+  );
+  const checkOverlayStatus = await features.getValue(
+    "overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */
+  );
+  const needDiskUsage = performResourceChecks || checkOverlayStatus;
+  const diskUsage = needDiskUsage ? await checkDiskUsage(logger) : void 0;
+  if (needDiskUsage && diskUsage === void 0) {
+    logger.warning(
+      `Unable to determine disk usage, therefore setting overlay database mode to ${"none" /* None */}.`
+    );
+    return new Failure("unable-to-determine-disk-usage" /* UnableToDetermineDiskUsage */);
+  }
+  const resourceResult = performResourceChecks && diskUsage !== void 0 ? await checkRunnerResources(codeql, diskUsage, ramInput, logger) : new Success(void 0);
+  if (resourceResult.isFailure()) {
+    return resourceResult;
+  }
+  if (checkOverlayStatus && diskUsage !== void 0 && await shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger)) {
+    logger.info(
+      `Setting overlay database mode to ${"none" /* None */} because overlay analysis previously failed with this combination of languages, disk space, and CodeQL version.`
+    );
+    return new Failure("skipped-due-to-cached-status" /* SkippedDueToCachedStatus */);
+  }
+  let overlayDatabaseMode;
+  if (isAnalyzingPullRequest()) {
+    overlayDatabaseMode = "overlay" /* Overlay */;
+    logger.info(
+      `Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing a pull request.`
+    );
+  } else if (await isAnalyzingDefaultBranch()) {
+    overlayDatabaseMode = "overlay-base" /* OverlayBase */;
+    logger.info(
+      `Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing the default branch.`
+    );
+  } else {
+    return new Failure("not-pull-request-or-default-branch" /* NotPullRequestOrDefaultBranch */);
+  }
+  return validateOverlayDatabaseMode(
+    overlayDatabaseMode,
+    true,
+    false,
+    codeql,
+    languages,
+    sourceRoot,
+    buildMode,
+    gitVersion,
+    logger
+  );
+}
+async function validateOverlayDatabaseMode(overlayDatabaseMode, useOverlayDatabaseCaching, overlayModeSetExplicitly, codeql, languages, sourceRoot, buildMode, gitVersion, logger) {
+  if (buildMode !== "none" /* None */ && (await Promise.all(
+    languages.map(
+      async (l) => l !== "go" /* go */ && // Workaround to allow overlay analysis for Go with any build
+      // mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
+      // ensure that overlay-base databases are only created for supported Go build setups,
+      // and that we'll fall back to full databases in other cases.
+      await codeql.isTracedLanguage(l)
+    )
+  )).some(Boolean)) {
+    logger.warning(
+      `Cannot build an ${overlayDatabaseMode} database because build-mode is set to "${buildMode}" instead of "none". Falling back to creating a normal full database instead.`
+    );
+    return new Failure("incompatible-build-mode" /* IncompatibleBuildMode */);
+  }
+  if (!await codeQlVersionAtLeast(codeql, CODEQL_OVERLAY_MINIMUM_VERSION)) {
+    logger.warning(
+      `Cannot build an ${overlayDatabaseMode} database because the CodeQL CLI is older than ${CODEQL_OVERLAY_MINIMUM_VERSION}. Falling back to creating a normal full database instead.`
+    );
+    return new Failure("incompatible-codeql" /* IncompatibleCodeQl */);
+  }
+  const gitRoot = await getGitRoot(sourceRoot);
+  if (gitRoot === void 0) {
+    logger.warning(
+      `Cannot build an ${overlayDatabaseMode} database because the source root "${sourceRoot}" is not inside a git repository. Falling back to creating a normal full database instead.`
+    );
+    return new Failure("no-git-root" /* NoGitRoot */);
+  }
+  if (hasSubmodules(gitRoot)) {
+    if (gitVersion === void 0) {
+      logger.warning(
+        `Cannot build an ${overlayDatabaseMode} database because the repository has submodules and the Git version could not be determined. Falling back to creating a normal full database instead.`
+      );
+      return new Failure("incompatible-git" /* IncompatibleGit */);
+    }
+    if (!gitVersion.isAtLeast(GIT_MINIMUM_VERSION_FOR_OVERLAY_WITH_SUBMODULES)) {
+      logger.warning(
+        `Cannot build an ${overlayDatabaseMode} database because the repository has submodules and the installed Git version is older than ${GIT_MINIMUM_VERSION_FOR_OVERLAY_WITH_SUBMODULES}. Falling back to creating a normal full database instead.`
+      );
+      return new Failure("incompatible-git" /* IncompatibleGit */);
+    }
+  }
+  return new Success({
+    overlayDatabaseMode,
+    useOverlayDatabaseCaching,
+    overlayModeSetExplicitly
+  });
+}
+async function isTrapCachingEnabled(features, overlayDatabaseMode) {
+  const trapCaching = getOptionalInput("trap-caching");
+  if (trapCaching !== void 0) return trapCaching === "true";
+  if (!isHostedRunner()) return false;
+  if (overlayDatabaseMode !== "none" /* None */ && await features.getValue("overlay_analysis_disable_trap_caching" /* OverlayAnalysisDisableTrapCaching */)) {
+    return false;
+  }
+  return true;
+}
+async function setCppTrapCachingEnvironmentVariables(config, logger) {
+  if (config.languages.includes("cpp" /* cpp */)) {
+    const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
+    if (process.env[envVar]) {
       logger.info(
-        `The queries configured in the repository properties don't allow combining with other query settings. Any queries configured elsewhere will be ignored.`
+        `Environment variable ${envVar} already set, leaving it unchanged.`
       );
-      return augmentationProperties.repoPropertyQueries.input;
+    } else if (config.trapCaches["cpp" /* cpp */]) {
+      logger.info("Enabling TRAP caching for C/C++.");
+      core10.exportVariable(envVar, "true");
     } else {
-      result.push(...augmentationProperties.repoPropertyQueries.input);
+      logger.debug(`Disabling TRAP caching for C/C++.`);
+      core10.exportVariable(envVar, "false");
     }
   }
-  if (augmentationProperties.queriesInput) {
-    if (!augmentationProperties.queriesInputCombines) {
-      return result.concat(augmentationProperties.queriesInput);
-    } else {
-      result.push(...augmentationProperties.queriesInput);
-    }
+}
+function dbLocationOrDefault(dbLocation, tempDir) {
+  return dbLocation || path10.resolve(tempDir, "codeql_databases");
+}
+function userConfigFromActionPath(tempDir) {
+  return path10.resolve(tempDir, "user-config-from-action.yml");
+}
+function hasQueryCustomisation(userConfig) {
+  return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]);
+}
+async function applyIncrementalAnalysisSettings(config, hasDiffRanges, codeql, logger) {
+  if (config.overlayDatabaseMode === "overlay" /* Overlay */ && !hasDiffRanges && !config.overlayModeSetExplicitly) {
+    logger.info(
+      `Reverting overlay database mode to ${"none" /* None */} because the PR diff ranges could not be computed.`
+    );
+    config.overlayDatabaseMode = "none" /* None */;
+    config.useOverlayDatabaseCaching = false;
+    await addOverlayDisablementDiagnostics(
+      config,
+      codeql,
+      "diff-informed-analysis-not-enabled" /* DiffInformedAnalysisNotEnabled */
+    );
   }
-  if (config.queries) {
-    result.push(...config.queries);
+  if (hasDiffRanges) {
+    config.extraQueryExclusions.push({
+      exclude: { tags: "exclude-from-incremental" }
+    });
   }
-  return result;
 }
-function generateCodeScanningConfig(logger, originalUserInput, augmentationProperties) {
-  const augmentedConfig = cloneObject(originalUserInput);
-  augmentedConfig.queries = combineQueries(
-    logger,
-    augmentedConfig,
-    augmentationProperties
+async function determineUserConfig(action, tempDir, inputs) {
+  const validateConfig = await action.features.getValue(
+    "validate_db_config" /* ValidateDbConfig */
   );
-  logger.debug(
-    `Combined queries: ${augmentedConfig.queries?.map((q) => q.uses).join(",")}`
-  );
-  if (augmentedConfig.queries?.length === 0) {
-    delete augmentedConfig.queries;
-  }
-  if (augmentationProperties.packsInput) {
-    if (augmentationProperties.packsInputCombines) {
-      if (Array.isArray(augmentedConfig.packs)) {
-        augmentedConfig.packs = (augmentedConfig.packs || []).concat(
-          augmentationProperties.packsInput
+  if (inputs.configInput) {
+    const computedConfigPath = userConfigFromActionPath(tempDir);
+    const allowMergeConfigs = () => action.features.getValue("allow_merge_config_files" /* AllowMergeConfigFiles */);
+    if (inputs.configFile && isDefaultSetup(action.env) && await allowMergeConfigs()) {
+      const fromConfigInput = parseUserConfig(
+        action.logger,
+        "`config` input",
+        inputs.configInput,
+        validateConfig
+      );
+      const fromConfigFile = await loadUserConfig(
+        action,
+        inputs.configFile,
+        inputs.workspacePath,
+        inputs.apiDetails,
+        tempDir
+      );
+      const mergedConfig = mergeDefaultSetupAndUserConfigs(
+        action.logger,
+        fromConfigInput,
+        fromConfigFile
+      );
+      fs9.writeFileSync(computedConfigPath, dump(mergedConfig));
+      action.logger.debug(
+        `Using merged configurations from 'config' input with configuration from '${inputs.configFile}': ${computedConfigPath}`
+      );
+      inputs.configFile = computedConfigPath;
+      return mergedConfig;
+    } else {
+      if (inputs.configFile) {
+        action.logger.warning(
+          `Both a config file and config input were provided. Ignoring config file.`
         );
-      } else if (!augmentedConfig.packs) {
-        augmentedConfig.packs = augmentationProperties.packsInput;
-      } else {
-        const language = Object.keys(augmentedConfig.packs)[0];
-        augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
       }
-    } else {
-      augmentedConfig.packs = augmentationProperties.packsInput;
+      fs9.writeFileSync(computedConfigPath, inputs.configInput);
+      inputs.configFile = computedConfigPath;
+      action.logger.debug(
+        `Using config from action input: ${inputs.configFile}`
+      );
     }
   }
-  if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
-    delete augmentedConfig.packs;
+  if (!inputs.configFile) {
+    action.logger.debug("No configuration file was provided");
+    return {};
+  } else {
+    action.logger.debug(`Using configuration file: ${inputs.configFile}`);
+    return await loadUserConfig(
+      action,
+      inputs.configFile,
+      inputs.workspacePath,
+      inputs.apiDetails,
+      tempDir
+    );
   }
-  return augmentedConfig;
 }
-function parseUserConfig(logger, pathInput, contents, validateConfig) {
+async function initConfig(actionState, inputs) {
+  const { logger, features } = actionState;
+  const { tempDir } = inputs;
+  const userConfig = await determineUserConfig(actionState, tempDir, inputs);
+  const config = await initActionState(inputs, userConfig);
+  if (config.analysisKinds.length === 1 && isCodeQualityEnabled(config)) {
+    if (hasQueryCustomisation(config.computedConfig)) {
+      throw new ConfigurationError(
+        "Query customizations are unsupported, because only `code-quality` analysis is enabled."
+      );
+    }
+    const queries = codeQualityQueries.map((v) => ({ uses: v }));
+    config.computedConfig["disable-default-queries"] = true;
+    config.computedConfig.queries = queries;
+    config.computedConfig["query-filters"] = [];
+  }
+  let gitVersion = void 0;
   try {
-    const schema2 = (
-      // eslint-disable-next-line @typescript-eslint/no-require-imports
-      require_db_config_schema()
-    );
-    const doc = load(contents);
-    if (validateConfig) {
-      const result = new jsonschema.Validator().validate(doc, schema2);
-      if (result.errors.length > 0) {
-        for (const error3 of result.errors) {
-          logger.error(error3.stack);
-        }
-        throw new ConfigurationError(
-          getInvalidConfigFileMessage(
-            pathInput,
-            result.errors.map((e) => e.stack)
-          )
+    gitVersion = await getGitVersionOrThrow();
+    logger.info(`Using Git version ${gitVersion.fullVersion}`);
+  } catch (e) {
+    logger.warning(`Could not determine Git version: ${getErrorMessage(e)}`);
+    if (isInTestMode() && process.env["CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION" /* TOLERATE_MISSING_GIT_VERSION */] !== "true") {
+      throw e;
+    }
+  }
+  if (await features.getValue("ignore_generated_files" /* IgnoreGeneratedFiles */) && isDynamicWorkflow()) {
+    try {
+      const generatedFilesCheckStartedAt = import_perf_hooks.performance.now();
+      const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
+      const generatedFilesDuration = Math.round(
+        import_perf_hooks.performance.now() - generatedFilesCheckStartedAt
+      );
+      if (generatedFiles.length > 0) {
+        config.computedConfig["paths-ignore"] ??= [];
+        config.computedConfig["paths-ignore"].push(...generatedFiles);
+        logger.info(
+          `Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${joinAtMost(generatedFiles, ", ", 10)}`
         );
+      } else {
+        logger.info(`Found no generated files.`);
       }
-    }
-    return doc;
-  } catch (error3) {
-    if (error3 instanceof YAMLException) {
-      throw new ConfigurationError(
-        getConfigFileParseErrorMessage(pathInput, error3.message)
+      await logGeneratedFilesTelemetry(
+        config,
+        generatedFilesDuration,
+        generatedFiles.length
       );
+    } catch (error3) {
+      logger.info(`Cannot ignore generated files: ${getErrorMessage(error3)}`);
     }
-    throw error3;
+  } else {
+    logger.debug(`Skipping check for generated files.`);
+  }
+  const overlayDatabaseModeResult = await checkOverlayEnablement(
+    inputs.codeql,
+    inputs.features,
+    config.languages,
+    inputs.sourceRoot,
+    config.buildMode,
+    inputs.ramInput,
+    config.computedConfig,
+    config.repositoryProperties,
+    gitVersion,
+    logger
+  );
+  if (overlayDatabaseModeResult.isSuccess()) {
+    const {
+      overlayDatabaseMode,
+      useOverlayDatabaseCaching,
+      overlayModeSetExplicitly
+    } = overlayDatabaseModeResult.value;
+    logger.info(
+      `Using overlay database mode: ${overlayDatabaseMode} ${useOverlayDatabaseCaching ? "with" : "without"} caching.`
+    );
+    config.overlayDatabaseMode = overlayDatabaseMode;
+    config.useOverlayDatabaseCaching = useOverlayDatabaseCaching;
+    config.overlayModeSetExplicitly = overlayModeSetExplicitly;
+  } else {
+    const overlayDisabledReason = overlayDatabaseModeResult.value;
+    logger.info(
+      `Using overlay database mode: ${"none" /* None */} without caching.`
+    );
+    config.overlayDatabaseMode = "none" /* None */;
+    config.useOverlayDatabaseCaching = false;
+    await addOverlayDisablementDiagnostics(
+      config,
+      inputs.codeql,
+      overlayDisabledReason
+    );
+  }
+  const hasDiffRanges = await prepareDiffInformedAnalysis(
+    inputs.codeql,
+    inputs.features,
+    logger
+  );
+  await applyIncrementalAnalysisSettings(
+    config,
+    hasDiffRanges,
+    inputs.codeql,
+    logger
+  );
+  if (await isTrapCachingEnabled(features, config.overlayDatabaseMode)) {
+    const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(
+      inputs.codeql,
+      config.languages,
+      logger
+    );
+    config.trapCaches = trapCaches;
+    config.trapCacheDownloadTime = trapCacheDownloadTime;
   }
+  await setCppTrapCachingEnvironmentVariables(config, logger);
+  return config;
 }
-
-// src/diagnostics.ts
-var import_fs = require("fs");
-var import_path = __toESM(require("path"));
-
-// src/logging.ts
-var core8 = __toESM(require_core());
-function getActionsLogger() {
-  return {
-    debug: core8.debug,
-    info: core8.info,
-    warning: core8.warning,
-    error: core8.error,
-    isDebug: core8.isDebug,
-    startGroup: core8.startGroup,
-    endGroup: core8.endGroup
-  };
+function isExplicitLocalPath(configPath) {
+  return configPath.startsWith(LOCAL_PATH_PREFIX);
 }
-function withGroup(groupName, f) {
-  core8.startGroup(groupName);
-  try {
-    return f();
-  } finally {
-    core8.endGroup();
+function isExplicitRemotePath(configPath) {
+  return configPath.startsWith(REMOTE_PATH_PREFIX);
+}
+function containsAtRef(configPath) {
+  return configPath.includes("@");
+}
+function isLocal(configPath) {
+  if (isExplicitLocalPath(configPath)) {
+    return true;
+  }
+  if (isExplicitRemotePath(configPath)) {
+    return false;
   }
+  return !containsAtRef(configPath);
 }
-async function withGroupAsync(groupName, f) {
-  core8.startGroup(groupName);
-  try {
-    return await f();
-  } finally {
-    core8.endGroup();
+function getLocalConfig(logger, configFile, validateConfig) {
+  if (!fs9.existsSync(configFile)) {
+    throw new ConfigurationError(
+      getConfigFileDoesNotExistErrorMessage(configFile)
+    );
   }
+  return parseUserConfig(
+    logger,
+    configFile,
+    fs9.readFileSync(configFile, "utf-8"),
+    validateConfig
+  );
 }
-function formatDuration(durationMs) {
-  if (durationMs < 1e3) {
-    return `${durationMs}ms`;
+function getPathToParsedConfigFile(tempDir) {
+  return path10.join(tempDir, "config");
+}
+async function saveConfig(config, logger) {
+  const configString = JSON.stringify(config);
+  const configFile = getPathToParsedConfigFile(config.tempDir);
+  fs9.mkdirSync(path10.dirname(configFile), { recursive: true });
+  fs9.writeFileSync(configFile, configString, "utf8");
+  logger.debug("Saved config:");
+  logger.debug(configString);
+}
+async function getConfig(tempDir, logger) {
+  const configFile = getPathToParsedConfigFile(tempDir);
+  if (!fs9.existsSync(configFile)) {
+    return void 0;
   }
-  if (durationMs < 60 * 1e3) {
-    return `${(durationMs / 1e3).toFixed(1)}s`;
+  const configString = fs9.readFileSync(configFile, "utf8");
+  logger.debug("Loaded config:");
+  logger.debug(configString);
+  const config = JSON.parse(configString);
+  if (config.version === void 0) {
+    throw new ConfigurationError(
+      `Loaded configuration file, but it does not contain the expected 'version' field.`
+    );
   }
-  const minutes = Math.floor(durationMs / (60 * 1e3));
-  const seconds = Math.floor(durationMs % (60 * 1e3) / 1e3);
-  return `${minutes}m${seconds}s`;
-}
-
-// src/diagnostics.ts
-var unwrittenDiagnostics = [];
-var unwrittenDefaultLanguageDiagnostics = [];
-var diagnosticCounter = 0;
-function makeDiagnostic(id, name, data = void 0) {
-  return {
-    ...data,
-    timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
-    source: { ...data?.source, id, name }
-  };
+  if (config.version !== getActionVersion()) {
+    throw new ConfigurationError(
+      `Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
+    );
+  }
+  return config;
 }
-function addDiagnostic(config, language, diagnostic) {
-  const logger = getActionsLogger();
-  const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
-  if ((0, import_fs.existsSync)(databasePath)) {
-    writeDiagnostic(config, language, diagnostic);
-  } else {
+async function generateRegistries(registriesInput, tempDir, logger) {
+  const registries = parseRegistries(registriesInput);
+  let registriesAuthTokens;
+  let qlconfigFile;
+  if (registries) {
+    const qlconfig = createRegistriesBlock(registries);
+    qlconfigFile = path10.join(tempDir, "qlconfig.yml");
+    const qlconfigContents = dump(qlconfig);
+    fs9.writeFileSync(qlconfigFile, qlconfigContents, "utf8");
+    logger.debug("Generated qlconfig.yml:");
+    logger.debug(qlconfigContents);
+    registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(",");
+  }
+  if (typeof process.env.CODEQL_REGISTRIES_AUTH === "string") {
     logger.debug(
-      `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.`
+      "Using CODEQL_REGISTRIES_AUTH environment variable to authenticate with registries."
     );
-    unwrittenDiagnostics.push({ diagnostic, language });
   }
+  return {
+    registriesAuthTokens: (
+      // if the user has explicitly set the CODEQL_REGISTRIES_AUTH env var then use that
+      process.env.CODEQL_REGISTRIES_AUTH ?? registriesAuthTokens
+    ),
+    qlconfigFile
+  };
 }
-function addNoLanguageDiagnostic(config, diagnostic) {
-  if (config !== void 0) {
-    addDiagnostic(
-      config,
-      // Arbitrarily choose the first language. We could also choose all languages, but that
-      // increases the risk of misinterpreting the data.
-      config.languages[0],
-      diagnostic
+function createRegistriesBlock(registries) {
+  if (!Array.isArray(registries) || registries.some((r) => !r.url || !r.packages)) {
+    throw new ConfigurationError(
+      "Invalid 'registries' input. Must be an array of objects with 'url' and 'packages' properties."
     );
-  } else {
-    unwrittenDefaultLanguageDiagnostics.push(diagnostic);
   }
+  const safeRegistries = registries.map((registry) => ({
+    // ensure the url ends with a slash to avoid a bug in the CLI 2.10.4
+    url: !registry?.url.endsWith("/") ? `${registry.url}/` : registry.url,
+    packages: registry.packages,
+    kind: registry.kind
+  }));
+  const qlconfig = {
+    registries: safeRegistries
+  };
+  return qlconfig;
 }
-function writeDiagnostic(config, language, diagnostic) {
-  const logger = getActionsLogger();
-  const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
-  const diagnosticsPath = import_path.default.resolve(
-    databasePath,
-    "diagnostic",
-    "codeql-action"
-  );
+async function wrapEnvironment(env, operation) {
+  const oldEnv = { ...process.env };
+  for (const [key, value] of Object.entries(env)) {
+    if (value !== void 0) {
+      process.env[key] = value;
+    }
+  }
   try {
-    (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true });
-    const uniqueSuffix = (diagnosticCounter++).toString();
-    const sanitizedTimestamp = diagnostic.timestamp.replace(
-      /[^a-zA-Z0-9.-]/g,
-      ""
+    await operation();
+  } finally {
+    for (const [key, value] of Object.entries(oldEnv)) {
+      process.env[key] = value;
+    }
+  }
+}
+async function parseBuildModeInput(input, languages, features, logger) {
+  if (input === void 0) {
+    return void 0;
+  }
+  if (!Object.values(BuildMode).includes(input)) {
+    throw new ConfigurationError(
+      `Invalid build mode: '${input}'. Supported build modes are: ${Object.values(
+        BuildMode
+      ).join(", ")}.`
     );
-    const jsonPath = import_path.default.resolve(
-      diagnosticsPath,
-      `codeql-action-${sanitizedTimestamp}-${uniqueSuffix}.json`
+  }
+  if (languages.includes("csharp" /* csharp */) && await features.getValue("disable_csharp_buildless" /* DisableCsharpBuildless */)) {
+    logger.warning(
+      "Scanning C# code without a build is temporarily unavailable. Falling back to 'autobuild' build mode."
     );
-    (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic));
-  } catch (err) {
-    logger.warning(`Unable to write diagnostic message to database: ${err}`);
-    logger.debug(JSON.stringify(diagnostic));
+    return "autobuild" /* Autobuild */;
   }
-}
-function logUnwrittenDiagnostics() {
-  const logger = getActionsLogger();
-  const num = unwrittenDiagnostics.length;
-  if (num > 0) {
+  if (languages.includes("java" /* java */) && await features.getValue("disable_java_buildless_enabled" /* DisableJavaBuildlessEnabled */)) {
     logger.warning(
-      `${num} diagnostic(s) could not be written to the database and will not appear on the Tool Status Page.`
+      "Scanning Java code without a build is temporarily unavailable. Falling back to 'autobuild' build mode."
     );
-    for (const unwritten of unwrittenDiagnostics) {
-      logger.debug(JSON.stringify(unwritten.diagnostic));
-    }
+    return "autobuild" /* Autobuild */;
   }
+  return input;
 }
-function flushDiagnostics(config) {
-  const logger = getActionsLogger();
-  const diagnosticsCount = unwrittenDiagnostics.length + unwrittenDefaultLanguageDiagnostics.length;
-  logger.debug(`Writing ${diagnosticsCount} diagnostic(s) to database.`);
-  for (const unwritten of unwrittenDiagnostics) {
-    writeDiagnostic(config, unwritten.language, unwritten.diagnostic);
+function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
+  const augmentedConfig = cloneObject(cliConfig);
+  if (extraQueryExclusions.length === 0) {
+    return augmentedConfig;
   }
-  for (const unwritten of unwrittenDefaultLanguageDiagnostics) {
-    addNoLanguageDiagnostic(config, unwritten);
+  augmentedConfig["query-filters"] = [
+    // Ordering matters. If the first filter is an inclusion, it implicitly
+    // excludes all queries that are not included. If it is an exclusion,
+    // it implicitly includes all queries that are not excluded. So user
+    // filters (if any) should always be first to preserve intent.
+    ...augmentedConfig["query-filters"] || [],
+    ...extraQueryExclusions
+  ];
+  if (augmentedConfig["query-filters"]?.length === 0) {
+    delete augmentedConfig["query-filters"];
   }
-  unwrittenDiagnostics = [];
-  unwrittenDefaultLanguageDiagnostics = [];
+  return augmentedConfig;
 }
-function makeTelemetryDiagnostic(id, name, attributes) {
-  return makeDiagnostic(id, name, {
-    attributes,
-    visibility: {
-      cliSummaryTable: false,
-      statusPage: false,
-      telemetry: true
-    }
-  });
+function isCodeScanningEnabled(config) {
+  return config.analysisKinds.includes("code-scanning" /* CodeScanning */);
 }
-
-// src/diff-informed-analysis-utils.ts
-var fs6 = __toESM(require("fs"));
-async function getDiffInformedAnalysisBranches(codeql, features, logger) {
-  if (!await features.getValue("diff_informed_queries" /* DiffInformedQueries */, codeql)) {
-    return void 0;
-  }
-  const gitHubVersion = await getGitHubVersion();
-  if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(gitHubVersion.version, "<3.19", true)) {
-    return void 0;
+function isCodeQualityEnabled(config) {
+  return config.analysisKinds.includes("code-quality" /* CodeQuality */);
+}
+function isRiskAssessmentEnabled(config) {
+  return config.analysisKinds.includes("risk-assessment" /* RiskAssessment */);
+}
+function getPrimaryAnalysisKind(config) {
+  if (config.analysisKinds.length === 1) {
+    return config.analysisKinds[0];
   }
-  const branches = getPullRequestBranches();
-  if (!branches) {
-    logger.info(
-      "Not performing diff-informed analysis because we are not analyzing a pull request."
-    );
+  return isCodeScanningEnabled(config) ? "code-scanning" /* CodeScanning */ : "code-quality" /* CodeQuality */;
+}
+function getPrimaryAnalysisConfig(config) {
+  return getAnalysisConfig(getPrimaryAnalysisKind(config));
+}
+async function logGeneratedFilesTelemetry(config, duration, generatedFilesCount) {
+  if (config.languages.length < 1) {
+    return;
   }
-  return branches;
+  addNoLanguageDiagnostic(
+    config,
+    makeTelemetryDiagnostic(
+      "codeql-action/generated-files-telemetry",
+      "Generated files telemetry",
+      {
+        duration,
+        generatedFilesCount
+      }
+    )
+  );
 }
-async function prepareDiffInformedAnalysis(codeql, features, logger) {
-  let branches;
-  try {
-    branches = await getDiffInformedAnalysisBranches(codeql, features, logger);
-  } catch (e) {
+
+// src/setup-codeql.ts
+var fs13 = __toESM(require("fs"));
+var path12 = __toESM(require("path"));
+var toolcache3 = __toESM(require_tool_cache());
+var import_fast_deep_equal = __toESM(require_fast_deep_equal());
+var semver9 = __toESM(require_semver2());
+
+// src/overlay/caching.ts
+var fs10 = __toESM(require("fs"));
+var actionsCache3 = __toESM(require_cache4());
+var semver6 = __toESM(require_semver2());
+var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500;
+var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
+var CACHE_VERSION2 = 1;
+var CACHE_PREFIX = "codeql-overlay-base-database";
+var MAX_CACHE_OPERATION_MS3 = 6e5;
+async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
+  const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
+  if (!fs10.existsSync(baseDatabaseOidsFilePath)) {
     logger.warning(
-      `Failed to determine branch information for diff-informed analysis: ${getErrorMessage(e)}`
+      `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist`
     );
     return false;
   }
-  if (!branches) {
-    return false;
-  }
-  return await withGroupAsync("Computing PR diff ranges", async () => {
+  for (const language of config.languages) {
+    const dbPath = getCodeQLDatabasePath(config, language);
     try {
-      return await computeAndPersistDiffRanges(branches, logger);
+      const resolveDatabaseOutput = await codeql.resolveDatabase(dbPath);
+      if (resolveDatabaseOutput === void 0 || !("overlayBaseSpecifier" in resolveDatabaseOutput)) {
+        logger.info(`${warningPrefix}: no overlayBaseSpecifier defined`);
+        return false;
+      } else {
+        logger.debug(
+          `Overlay base specifier for ${language} overlay-base database found: ${resolveDatabaseOutput.overlayBaseSpecifier}`
+        );
+      }
     } catch (e) {
-      logger.warning(
-        `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`
-      );
+      logger.warning(`${warningPrefix}: failed to resolve database: ${e}`);
       return false;
     }
-  });
-}
-function writeDiffRangesJsonFile(logger, ranges) {
-  const jsonContents = JSON.stringify(ranges, null, 2);
-  const jsonFilePath = getDiffRangesJsonFilePath();
-  fs6.writeFileSync(jsonFilePath, jsonContents);
-  logger.debug(
-    `Wrote pr-diff-range JSON file to ${jsonFilePath}:
-${jsonContents}`
-  );
+  }
+  return true;
 }
-function readDiffRangesJsonFile(logger) {
-  const jsonFilePath = getDiffRangesJsonFilePath();
-  if (!fs6.existsSync(jsonFilePath)) {
-    logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`);
-    return void 0;
+async function cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger) {
+  const overlayDatabaseMode = config.overlayDatabaseMode;
+  if (overlayDatabaseMode !== "overlay-base" /* OverlayBase */) {
+    logger.debug(
+      `Overlay database mode is ${overlayDatabaseMode}. Skip uploading overlay-base database to cache.`
+    );
+    return false;
   }
-  const jsonContents = fs6.readFileSync(jsonFilePath, "utf8");
-  logger.debug(
-    `Read pr-diff-range JSON file from ${jsonFilePath}:
-${jsonContents}`
-  );
-  try {
-    return JSON.parse(jsonContents);
-  } catch (e) {
-    logger.warning(
-      `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}`
+  if (!config.useOverlayDatabaseCaching) {
+    logger.debug(
+      "Overlay database caching is disabled. Skip uploading overlay-base database to cache."
     );
-    return void 0;
+    return false;
   }
-}
-async function getPullRequestEditedDiffRanges(branches, logger) {
-  const fileDiffs = await getFileDiffsWithBasehead(branches, logger);
-  if (fileDiffs === void 0) {
-    return void 0;
+  if (isInTestMode()) {
+    logger.debug(
+      "In test mode. Skip uploading overlay-base database to cache."
+    );
+    return false;
   }
-  if (fileDiffs.length >= 300) {
+  const databaseIsValid = await checkOverlayBaseDatabase(
+    codeql,
+    config,
+    logger,
+    "Abort uploading overlay-base database to cache"
+  );
+  if (!databaseIsValid) {
+    return false;
+  }
+  await withGroupAsync("Cleaning up databases", async () => {
+    await codeql.databaseCleanupCluster(config, "overlay" /* Overlay */);
+  });
+  const dbLocation = config.dbLocation;
+  const databaseSizeBytes = await tryGetFolderBytes(dbLocation, logger);
+  if (databaseSizeBytes === void 0) {
     logger.warning(
-      `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.`
+      "Failed to determine database size. Skip uploading overlay-base database to cache."
     );
-    return void 0;
-  }
-  const results = [];
-  for (const filediff of fileDiffs) {
-    const diffRanges = getDiffRanges(filediff, logger);
-    if (diffRanges === void 0) {
-      return void 0;
-    }
-    results.push(...diffRanges);
+    return false;
   }
-  return results;
-}
-async function computeAndPersistDiffRanges(branches, logger) {
-  const ranges = await getPullRequestEditedDiffRanges(branches, logger);
-  if (ranges === void 0) {
+  if (databaseSizeBytes > OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES) {
+    const databaseSizeMB = Math.round(databaseSizeBytes / 1e6);
+    logger.warning(
+      `Database size (${databaseSizeMB} MB) exceeds maximum upload size (${OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB} MB). Skip uploading overlay-base database to cache.`
+    );
     return false;
   }
-  writeDiffRangesJsonFile(logger, ranges);
-  const distinctFiles = new Set(ranges.map((r) => r.path)).size;
-  logger.info(
-    `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`
+  const codeQlVersion = (await codeql.getVersion()).version;
+  const checkoutPath = getRequiredInput("checkout_path");
+  const cacheSaveKey = await getCacheSaveKey(
+    config,
+    codeQlVersion,
+    checkoutPath,
+    logger
   );
-  return true;
-}
-async function getFileDiffsWithBasehead(branches, logger) {
-  const repositoryNwo = getRepositoryNwoFromEnv(
-    "CODE_SCANNING_REPOSITORY",
-    "GITHUB_REPOSITORY"
+  logger.info(
+    `Uploading overlay-base database to Actions cache with key ${cacheSaveKey}`
   );
-  const basehead = `${branches.base}...${branches.head}`;
   try {
-    const response = await getApiClient().rest.repos.compareCommitsWithBasehead(
-      {
-        owner: repositoryNwo.owner,
-        repo: repositoryNwo.repo,
-        basehead,
-        per_page: 1
+    const cacheId = await waitForResultWithTimeLimit(
+      MAX_CACHE_OPERATION_MS3,
+      actionsCache3.saveCache([dbLocation], cacheSaveKey),
+      () => {
       }
     );
-    logger.debug(
-      `Response from compareCommitsWithBasehead(${basehead}):
-${JSON.stringify(response, null, 2)}`
-    );
-    return response.data.files;
-  } catch (error3) {
-    if (error3.status) {
-      logger.warning(`Error retrieving diff ${basehead}: ${error3.message}`);
-      logger.debug(
-        `Error running compareCommitsWithBasehead(${basehead}):
-Request: ${JSON.stringify(error3.request, null, 2)}
-Error Response: ${JSON.stringify(error3.response, null, 2)}`
-      );
-      return void 0;
-    } else {
-      throw error3;
+    if (cacheId === void 0) {
+      logger.warning("Timed out while uploading overlay-base database");
+      return false;
     }
+  } catch (error3) {
+    logger.warning(
+      `Failed to upload overlay-base database to cache: ${error3 instanceof Error ? error3.message : String(error3)}`
+    );
+    return false;
   }
+  logger.info(`Successfully uploaded overlay-base database from ${dbLocation}`);
+  return true;
 }
-function getDiffRanges(fileDiff, logger) {
-  if (fileDiff.patch === void 0) {
-    if (fileDiff.changes === 0) {
-      return [];
-    }
-    return [
-      {
-        path: fileDiff.filename,
-        startLine: 0,
-        endLine: 0
-      }
-    ];
-  }
-  let currentLine = 0;
-  let additionRangeStartLine = void 0;
-  const diffRanges = [];
-  const diffLines = fileDiff.patch.split("\n");
-  diffLines.push(" ");
-  for (const diffLine of diffLines) {
-    if (diffLine.startsWith("-")) {
-      continue;
-    }
-    if (diffLine.startsWith("+")) {
-      if (additionRangeStartLine === void 0) {
-        additionRangeStartLine = currentLine;
-      }
-      currentLine++;
-      continue;
-    }
-    if (additionRangeStartLine !== void 0) {
-      diffRanges.push({
-        path: fileDiff.filename,
-        startLine: additionRangeStartLine,
-        endLine: currentLine - 1
-      });
-      additionRangeStartLine = void 0;
-    }
-    if (diffLine.startsWith("@@ ")) {
-      const match = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/);
-      if (match === null) {
-        logger.warning(
-          `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}`
-        );
-        return void 0;
-      }
-      currentLine = parseInt(match[1], 10);
-      continue;
-    }
-    if (diffLine.startsWith(" ")) {
-      currentLine++;
-      continue;
-    }
+async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
+  const overlayDatabaseMode = config.overlayDatabaseMode;
+  if (overlayDatabaseMode !== "overlay" /* Overlay */) {
+    logger.debug(
+      `Overlay database mode is ${overlayDatabaseMode}. Skip downloading overlay-base database from cache.`
+    );
+    return void 0;
   }
-  return diffRanges;
-}
-
-// src/languages/builtin.json
-var builtin_default = {
-  languages: [
-    "actions",
-    "cpp",
-    "csharp",
-    "go",
-    "java",
-    "javascript",
-    "python",
-    "ruby",
-    "rust",
-    "swift"
-  ],
-  aliases: {
-    c: "cpp",
-    "c-c++": "cpp",
-    "c-cpp": "cpp",
-    "c#": "csharp",
-    "c++": "cpp",
-    "java-kotlin": "java",
-    "javascript-typescript": "javascript",
-    kotlin: "java",
-    typescript: "javascript"
+  if (!config.useOverlayDatabaseCaching) {
+    logger.debug(
+      "Overlay database caching is disabled. Skip downloading overlay-base database from cache."
+    );
+    return void 0;
   }
-};
-
-// src/languages/index.ts
-var BuiltInLanguage = /* @__PURE__ */ ((BuiltInLanguage3) => {
-  BuiltInLanguage3["actions"] = "actions";
-  BuiltInLanguage3["cpp"] = "cpp";
-  BuiltInLanguage3["csharp"] = "csharp";
-  BuiltInLanguage3["go"] = "go";
-  BuiltInLanguage3["java"] = "java";
-  BuiltInLanguage3["javascript"] = "javascript";
-  BuiltInLanguage3["python"] = "python";
-  BuiltInLanguage3["ruby"] = "ruby";
-  BuiltInLanguage3["rust"] = "rust";
-  BuiltInLanguage3["swift"] = "swift";
-  return BuiltInLanguage3;
-})(BuiltInLanguage || {});
-var builtInLanguageSet = new Set(builtin_default.languages);
-function isBuiltInLanguage(language) {
-  return builtInLanguageSet.has(language);
-}
-function parseBuiltInLanguage(language) {
-  language = language.trim().toLowerCase();
-  language = builtin_default.aliases[language] ?? language;
-  if (isBuiltInLanguage(language)) {
-    return language;
+  if (isInTestMode()) {
+    logger.debug(
+      "In test mode. Skip downloading overlay-base database from cache."
+    );
+    return void 0;
   }
-  return void 0;
-}
-
-// src/overlay/diagnostics.ts
-async function addOverlayDisablementDiagnostics(config, codeql, overlayDisabledReason) {
-  addNoLanguageDiagnostic(
+  const dbLocation = config.dbLocation;
+  const codeQlVersion = (await codeql.getVersion()).version;
+  const cacheRestoreKeyPrefix = await getCacheRestoreKeyPrefix(
     config,
-    makeTelemetryDiagnostic(
-      "codeql-action/overlay-disabled",
-      "Overlay analysis disabled",
-      {
-        reason: overlayDisabledReason
-      }
-    )
+    codeQlVersion
   );
-  if (overlayDisabledReason === "skipped-due-to-cached-status" /* SkippedDueToCachedStatus */) {
-    addNoLanguageDiagnostic(
-      config,
-      makeDiagnostic(
-        "codeql-action/overlay-disabled-due-to-cached-status",
-        "Skipped improved incremental analysis because it failed previously with similar hardware resources",
+  logger.info(
+    `Looking in Actions cache for overlay-base database with restore key ${cacheRestoreKeyPrefix}`
+  );
+  let databaseDownloadDurationMs = 0;
+  try {
+    const databaseDownloadStart = performance.now();
+    const foundKey = await waitForResultWithTimeLimit(
+      // This ten-minute limit for the cache restore operation is mainly to
+      // guard against the possibility that the cache service is unresponsive
+      // and hangs outside the data download.
+      //
+      // Data download (which is normally the most time-consuming part of the
+      // restore operation) should not run long enough to hit this limit. Even
+      // for an extremely large 10GB database, at a download speed of 40MB/s
+      // (see below), the download should complete within five minutes. If we
+      // do hit this limit, there are likely more serious problems other than
+      // mere slow download speed.
+      //
+      // This is important because we don't want any ongoing file operations
+      // on the database directory when we do hit this limit. Hitting this
+      // time limit takes us to a fallback path where we re-initialize the
+      // database from scratch at dbLocation, and having the cache restore
+      // operation continue to write into dbLocation in the background would
+      // really mess things up. We want to hit this limit only in the case
+      // of a hung cache service, not just slow download speed.
+      MAX_CACHE_OPERATION_MS3,
+      actionsCache3.restoreCache(
+        [dbLocation],
+        cacheRestoreKeyPrefix,
+        void 0,
         {
-          attributes: {
-            languages: config.languages
-          },
-          markdownMessage: `Improved incremental analysis was skipped because it previously failed for this repository with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. One possible reason for this is that improved incremental analysis can require a significant amount of disk space for some repositories. If you want to try re-enabling improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.
-
-Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`,
-          severity: "note",
-          visibility: {
-            cliSummaryTable: true,
-            statusPage: true,
-            telemetry: false
-          }
+          // Azure SDK download (which is the default) uses 128MB segments; see
+          // https://github.com/actions/toolkit/blob/main/packages/cache/README.md.
+          // Setting segmentTimeoutInMs to 3000 translates to segment download
+          // speed of about 40 MB/s, which should be achievable unless the
+          // download is unreliable (in which case we do want to abort).
+          segmentTimeoutInMs: 3e3
         }
-      )
+      ),
+      () => {
+        logger.info("Timed out downloading overlay-base database from cache");
+      }
+    );
+    databaseDownloadDurationMs = Math.round(
+      performance.now() - databaseDownloadStart
+    );
+    if (foundKey === void 0) {
+      logger.info("No overlay-base database found in Actions cache");
+      return void 0;
+    }
+    logger.info(
+      `Downloaded overlay-base database in cache with key ${foundKey}`
     );
+  } catch (error3) {
+    logger.warning(
+      `Failed to download overlay-base database from cache: ${error3 instanceof Error ? error3.message : String(error3)}`
+    );
+    return void 0;
   }
-  if (overlayDisabledReason === "disabled-by-repository-property" /* DisabledByRepositoryProperty */) {
-    addNoLanguageDiagnostic(
-      config,
-      makeDiagnostic(
-        "codeql-action/overlay-disabled-by-repository-property",
-        "Improved incremental analysis disabled by repository property",
-        {
-          attributes: {
-            languages: config.languages
-          },
-          markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`,
-          severity: "note",
-          visibility: {
-            cliSummaryTable: true,
-            statusPage: true,
-            telemetry: false
-          }
-        }
-      )
+  const databaseIsValid = await checkOverlayBaseDatabase(
+    codeql,
+    config,
+    logger,
+    "Downloaded overlay-base database is invalid"
+  );
+  if (!databaseIsValid) {
+    logger.warning("Downloaded overlay-base database failed validation");
+    return void 0;
+  }
+  const databaseSizeBytes = await tryGetFolderBytes(dbLocation, logger);
+  if (databaseSizeBytes === void 0) {
+    logger.info(
+      "Filesystem error while accessing downloaded overlay-base database"
     );
+    return void 0;
   }
+  logger.info(`Successfully downloaded overlay-base database to ${dbLocation}`);
+  return {
+    databaseSizeBytes: Math.round(databaseSizeBytes),
+    databaseDownloadDurationMs
+  };
 }
-
-// src/overlay/status.ts
-var fs7 = __toESM(require("fs"));
-var path8 = __toESM(require("path"));
-var actionsCache = __toESM(require_cache4());
-var MAX_CACHE_OPERATION_MS = 3e4;
-var STATUS_FILE_NAME = "overlay-status.json";
-function getStatusFilePath(languages) {
-  return path8.join(
-    getTemporaryDirectory(),
-    "overlay-status",
-    [...languages].sort().join("+"),
-    STATUS_FILE_NAME
+async function getCacheSaveKey(config, codeQlVersion, checkoutPath, logger) {
+  let runId = 1;
+  let attemptId = 1;
+  try {
+    runId = getWorkflowRunID();
+    attemptId = getWorkflowRunAttempt();
+  } catch (e) {
+    logger.warning(
+      `Failed to get workflow run ID or attempt ID. Reason: ${getErrorMessage(e)}`
+    );
+  }
+  const sha = await getCommitOid(checkoutPath);
+  const restoreKeyPrefix = await getCacheRestoreKeyPrefix(
+    config,
+    codeQlVersion
   );
+  return `${restoreKeyPrefix}${sha}-${runId}-${attemptId}`;
 }
-function createOverlayStatus(attributes, checkRunId) {
-  const job = {
-    workflowRunId: getWorkflowRunID(),
-    workflowRunAttempt: getWorkflowRunAttempt(),
-    name: getRequiredEnvParam("GITHUB_JOB"),
-    checkRunId
-  };
-  return {
-    ...attributes,
-    job
+async function getCacheRestoreKeyPrefix(config, codeQlVersion) {
+  return `${await getCacheKeyPrefixBase(config.languages)}${codeQlVersion}-`;
+}
+async function getCacheKeyPrefixBase(parsedLanguages) {
+  const languagesComponent = [...parsedLanguages].sort().join("_");
+  const cacheKeyComponents = {
+    automationID: await getAutomationID()
+    // Add more components here as needed in the future
   };
+  const componentsHash = createCacheKeyHash(cacheKeyComponents);
+  return `${CACHE_PREFIX}-${CACHE_VERSION2}-${componentsHash}-${languagesComponent}-`;
 }
-async function shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger) {
-  const status = await getOverlayStatus(codeql, languages, diskUsage, logger);
-  if (status === void 0) {
-    return false;
-  }
-  if (status.attemptedToBuildOverlayBaseDatabase && !status.builtOverlayBaseDatabase) {
-    logger.debug(
-      "Cached overlay status indicates that building an overlay base database was unsuccessful."
+async function getCodeQlVersionsForOverlayBaseDatabases(rawLanguages, logger) {
+  const languages = rawLanguages.map(parseBuiltInLanguage);
+  if (languages.includes(void 0)) {
+    logger.warning(
+      "One or more provided languages are not recognized as built-in languages. Skipping searching for overlay-base databases in cache."
     );
-    return true;
+    return void 0;
   }
+  const dedupedLanguages = [
+    ...new Set(languages.filter((l) => l !== void 0))
+  ];
+  const cacheKeyPrefix = await getCacheKeyPrefixBase(dedupedLanguages);
   logger.debug(
-    "Cached overlay status does not indicate a previous unsuccessful attempt to build an overlay base database."
+    `Searching for overlay-base databases in Actions cache with prefix ${cacheKeyPrefix}`
   );
-  return false;
-}
-async function getOverlayStatus(codeql, languages, diskUsage, logger) {
-  const cacheKey3 = await getCacheKey(codeql, languages, diskUsage);
-  const statusFile = getStatusFilePath(languages);
-  try {
-    await fs7.promises.mkdir(path8.dirname(statusFile), { recursive: true });
-    const foundKey = await waitForResultWithTimeLimit(
-      MAX_CACHE_OPERATION_MS,
-      actionsCache.restoreCache([statusFile], cacheKey3),
-      () => {
-        logger.warning("Timed out restoring overlay status from cache.");
-      }
+  const caches = await listActionsCaches(cacheKeyPrefix);
+  if (caches.length === 0) {
+    logger.info("No overlay-base databases found in Actions cache.");
+    return [];
+  }
+  logger.info(
+    `Found ${caches.length} overlay-base ${caches.length === 1 ? "database" : "databases"} in the Actions cache.`
+  );
+  const versionRegex = /^([\d.]+)-/;
+  const versionSet = /* @__PURE__ */ new Set();
+  for (const cache of caches) {
+    if (!cache.key) continue;
+    const suffix = cache.key.substring(cacheKeyPrefix.length);
+    const match2 = suffix.match(versionRegex);
+    if (match2 && semver6.valid(match2[1])) {
+      versionSet.add(match2[1]);
+    }
+  }
+  if (versionSet.size === 0) {
+    logger.info(
+      "Could not parse any CodeQL versions from overlay-base database cache keys."
     );
-    if (foundKey === void 0) {
-      logger.debug("No overlay status found in Actions cache.");
-      return void 0;
+    return [];
+  }
+  const versions = [...versionSet].sort(semver6.rcompare);
+  logger.info(
+    `Found overlay databases for the following CodeQL versions in the Actions cache: ${versions.join(", ")}`
+  );
+  return versions;
+}
+
+// src/tar.ts
+var import_child_process = require("child_process");
+var fs11 = __toESM(require("fs"));
+var stream = __toESM(require("stream"));
+var import_toolrunner = __toESM(require_toolrunner());
+var io4 = __toESM(require_io());
+var toolcache = __toESM(require_tool_cache());
+var semver7 = __toESM(require_semver2());
+var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3";
+var MIN_REQUIRED_GNU_TAR_VERSION = "1.31";
+async function getTarVersion() {
+  const tar = await io4.which("tar", true);
+  let stdout = "";
+  const exitCode = await new import_toolrunner.ToolRunner(tar, ["--version"], {
+    listeners: {
+      stdout: (data) => {
+        stdout += data.toString();
+      }
     }
-    if (!fs7.existsSync(statusFile)) {
-      logger.debug(
-        "Overlay status cache entry found but status file is missing."
-      );
-      return void 0;
+  }).exec();
+  if (exitCode !== 0) {
+    throw new Error("Failed to call tar --version");
+  }
+  if (stdout.includes("GNU tar")) {
+    const match2 = stdout.match(/tar \(GNU tar\) ([0-9.]+)/);
+    if (!match2?.[1]) {
+      throw new Error("Failed to parse output of tar --version.");
     }
-    const contents = await fs7.promises.readFile(statusFile, "utf-8");
-    const parsed = JSON.parse(contents);
-    if (!isObject2(parsed) || typeof parsed["attemptedToBuildOverlayBaseDatabase"] !== "boolean" || typeof parsed["builtOverlayBaseDatabase"] !== "boolean") {
-      logger.debug(
-        "Ignoring overlay status cache entry with unexpected format."
-      );
-      return void 0;
+    return { type: "gnu", version: match2[1] };
+  } else if (stdout.includes("bsdtar")) {
+    const match2 = stdout.match(/bsdtar ([0-9.]+)/);
+    if (!match2?.[1]) {
+      throw new Error("Failed to parse output of tar --version.");
     }
-    return parsed;
-  } catch (error3) {
-    logger.warning(
-      `Failed to restore overlay status from cache: ${getErrorMessage(error3)}`
-    );
-    return void 0;
+    return { type: "bsd", version: match2[1] };
+  } else {
+    throw new Error("Unknown tar version");
   }
 }
-async function saveOverlayStatus(codeql, languages, diskUsage, status, logger) {
-  const cacheKey3 = await getCacheKey(codeql, languages, diskUsage);
-  const statusFile = getStatusFilePath(languages);
+async function isZstdAvailable(logger) {
+  const foundZstdBinary = await isBinaryAccessible("zstd", logger);
   try {
-    await fs7.promises.mkdir(path8.dirname(statusFile), { recursive: true });
-    await fs7.promises.writeFile(statusFile, JSON.stringify(status));
-    const cacheId = await waitForResultWithTimeLimit(
-      MAX_CACHE_OPERATION_MS,
-      actionsCache.saveCache([statusFile], cacheKey3),
-      () => {
-        logger.warning("Timed out saving overlay status to cache.");
-      }
-    );
-    if (cacheId === void 0) {
-      return false;
+    const tarVersion = await getTarVersion();
+    const { type, version } = tarVersion;
+    logger.info(`Found ${type} tar version ${version}.`);
+    switch (type) {
+      case "gnu":
+        return {
+          available: foundZstdBinary && // GNU tar only uses major and minor version numbers
+          semver7.gte(
+            semver7.coerce(version),
+            semver7.coerce(MIN_REQUIRED_GNU_TAR_VERSION)
+          ),
+          foundZstdBinary,
+          version: tarVersion
+        };
+      case "bsd":
+        return {
+          available: foundZstdBinary && // Do a loose comparison since these version numbers don't contain
+          // a patch version number.
+          semver7.gte(version, MIN_REQUIRED_BSD_TAR_VERSION),
+          foundZstdBinary,
+          version: tarVersion
+        };
+      default:
+        assertNever(type);
     }
-    logger.debug(`Saved overlay status to Actions cache with key ${cacheKey3}`);
-    return true;
-  } catch (error3) {
+  } catch (e) {
     logger.warning(
-      `Failed to save overlay status to cache: ${getErrorMessage(error3)}`
+      `Failed to determine tar version, therefore will assume zstd is not available. The underlying error was: ${e}`
     );
-    return false;
+    return { available: false, foundZstdBinary };
   }
 }
-async function getCacheKey(codeql, languages, diskUsage) {
-  const diskSpaceToNearest10Gb = `${10 * Math.floor(diskUsage.numTotalBytes / (10 * 1024 * 1024 * 1024))}GB`;
-  return `codeql-overlay-status-${[...languages].sort().join("+")}-${(await codeql.getVersion()).version}-runner-${diskSpaceToNearest10Gb}`;
+async function extract(tarPath, dest, compressionMethod, tarVersion, logger) {
+  fs11.mkdirSync(dest, { recursive: true });
+  switch (compressionMethod) {
+    case "gzip":
+      return await toolcache.extractTar(tarPath, dest);
+    case "zstd": {
+      if (!tarVersion) {
+        throw new Error(
+          "Could not determine tar version, which is required to extract a Zstandard archive."
+        );
+      }
+      await extractTarZst(tarPath, dest, tarVersion, logger);
+      return dest;
+    }
+  }
 }
-
-// src/trap-caching.ts
-var fs8 = __toESM(require("fs"));
-var path9 = __toESM(require("path"));
-var actionsCache2 = __toESM(require_cache4());
-var CACHE_VERSION = 1;
-var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap";
-var MINIMUM_CACHE_MB_TO_UPLOAD = 10;
-var MAX_CACHE_OPERATION_MS2 = 12e4;
-async function downloadTrapCaches(codeql, languages, logger) {
-  const result = {};
-  const languagesSupportingCaching = await getLanguagesSupportingCaching(
-    codeql,
-    languages,
-    logger
-  );
-  logger.info(
-    `Found ${languagesSupportingCaching.length} languages that support TRAP caching`
-  );
-  if (languagesSupportingCaching.length === 0) return result;
-  const cachesDir = path9.join(
-    getTemporaryDirectory(),
-    "trapCaches"
+async function extractTarZst(tar, dest, tarVersion, logger) {
+  logger.debug(
+    `Extracting to ${dest}.${tar instanceof stream.Readable ? ` Input stream has high water mark ${tar.readableHighWaterMark}.` : ""}`
   );
-  for (const language of languagesSupportingCaching) {
-    const cacheDir2 = path9.join(cachesDir, language);
-    fs8.mkdirSync(cacheDir2, { recursive: true });
-    result[language] = cacheDir2;
-  }
-  if (await isAnalyzingDefaultBranch()) {
-    logger.info(
-      "Analyzing default branch. Skipping downloading of TRAP caches."
-    );
-    return result;
-  }
-  let baseSha = "unknown";
-  const eventPath = process.env.GITHUB_EVENT_PATH;
-  if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) {
-    const event = JSON.parse(fs8.readFileSync(path9.resolve(eventPath), "utf-8"));
-    baseSha = event.pull_request?.base?.sha || baseSha;
-  }
-  for (const language of languages) {
-    const cacheDir2 = result[language];
-    if (cacheDir2 === void 0) continue;
-    const preferredKey = await cacheKey(codeql, language, baseSha);
-    logger.info(
-      `Looking in Actions cache for TRAP cache with key ${preferredKey}`
-    );
-    const found = await waitForResultWithTimeLimit(
-      MAX_CACHE_OPERATION_MS2,
-      actionsCache2.restoreCache([cacheDir2], preferredKey, [
-        // Fall back to any cache with the right key prefix
-        await cachePrefix(codeql, language)
-      ]),
-      () => {
-        logger.info(
-          `Timed out downloading cache for ${language}, will continue without it`
-        );
+  try {
+    const args = ["-x", "--zstd", "--ignore-zeros"];
+    if (tarVersion.type === "gnu") {
+      args.push("--warning=no-unknown-keyword");
+      args.push("--overwrite");
+    }
+    args.push("-f", tar instanceof stream.Readable ? "-" : tar, "-C", dest);
+    process.stdout.write(`[command]tar ${args.join(" ")}
+`);
+    await new Promise((resolve14, reject) => {
+      const tarProcess = (0, import_child_process.spawn)("tar", args, { stdio: "pipe" });
+      let stdout = "";
+      tarProcess.stdout?.on("data", (data) => {
+        stdout += data.toString();
+        process.stdout.write(data);
+      });
+      let stderr = "";
+      tarProcess.stderr?.on("data", (data) => {
+        stderr += data.toString();
+        process.stdout.write(data);
+      });
+      tarProcess.on("error", (err) => {
+        reject(new Error(`Error while extracting tar: ${err}`));
+      });
+      if (tar instanceof stream.Readable) {
+        stream.pipeline(tar, tarProcess.stdin, (err) => {
+          if (err) {
+            reject(
+              new Error(`Error while downloading and extracting tar: ${err}`)
+            );
+          }
+        });
       }
-    );
-    if (found === void 0) {
-      logger.info(`No TRAP cache found in Actions cache for ${language}`);
-      delete result[language];
+      tarProcess.on("exit", (code) => {
+        if (code !== 0) {
+          reject(
+            new CommandInvocationError(
+              "tar",
+              args,
+              code ?? void 0,
+              stdout,
+              stderr
+            )
+          );
+        }
+        resolve14();
+      });
+    });
+  } catch (e) {
+    await cleanUpPath(dest, "extraction destination directory", logger);
+    throw e;
+  }
+}
+var KNOWN_EXTENSIONS = {
+  "tar.gz": "gzip",
+  "tar.zst": "zstd"
+};
+function inferCompressionMethod(tarPath) {
+  for (const [ext2, method] of Object.entries(KNOWN_EXTENSIONS)) {
+    if (tarPath.endsWith(`.${ext2}`)) {
+      return method;
     }
   }
-  return result;
+  return void 0;
 }
-async function uploadTrapCaches(codeql, config, logger) {
-  if (!await isAnalyzingDefaultBranch()) return false;
-  for (const language of config.languages) {
-    const cacheDir2 = config.trapCaches[language];
-    if (cacheDir2 === void 0) continue;
-    const trapFolderSize = await tryGetFolderBytes(cacheDir2, logger);
-    if (trapFolderSize === void 0) {
-      logger.info(
-        `Skipping upload of TRAP cache for ${language} as we couldn't determine its size`
+
+// src/tools-download.ts
+var fs12 = __toESM(require("fs"));
+var os4 = __toESM(require("os"));
+var path11 = __toESM(require("path"));
+var import_perf_hooks2 = require("perf_hooks");
+var core11 = __toESM(require_core());
+var import_http_client = __toESM(require_lib());
+var toolcache2 = __toESM(require_tool_cache());
+var import_follow_redirects = __toESM(require_follow_redirects());
+var semver8 = __toESM(require_semver2());
+var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024;
+var STREAMING_STALL_TIMEOUT_MS = 5 * 60 * 1e3;
+var TOOLCACHE_TOOL_NAME = "CodeQL";
+async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorization, headers, tarVersion, logger) {
+  logger.info(
+    `Downloading CodeQL tools from ${codeqlURL} . This may take a while.`
+  );
+  try {
+    if (compressionMethod === "zstd" && process.platform === "linux") {
+      logger.info(`Streaming the extraction of the CodeQL bundle.`);
+      const toolsInstallStart = import_perf_hooks2.performance.now();
+      await downloadAndExtractZstdWithStreaming(
+        codeqlURL,
+        dest,
+        authorization,
+        headers,
+        tarVersion,
+        logger
+      );
+      const combinedDurationMs = Math.round(
+        import_perf_hooks2.performance.now() - toolsInstallStart
       );
-      continue;
-    }
-    if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1048576) {
       logger.info(
-        `Skipping upload of TRAP cache for ${language} as it is too small`
+        `Finished downloading and extracting CodeQL bundle to ${dest} (${formatDuration(
+          combinedDurationMs
+        )}).`
       );
-      continue;
+      return {};
     }
-    const key = await cacheKey(
-      codeql,
-      language,
-      process.env.GITHUB_SHA || "unknown"
+  } catch (e) {
+    core11.warning(
+      `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}`
     );
-    logger.info(`Uploading TRAP cache to Actions cache with key ${key}`);
-    await waitForResultWithTimeLimit(
-      MAX_CACHE_OPERATION_MS2,
-      actionsCache2.saveCache([cacheDir2], key),
-      () => {
-        logger.info(
-          `Timed out waiting for TRAP cache for ${language} to upload, will continue without uploading`
-        );
-      }
+    core11.warning(`Falling back to downloading the bundle before extracting.`);
+    await cleanUpPath(dest, "CodeQL bundle", logger);
+  }
+  const toolsDownloadStart = import_perf_hooks2.performance.now();
+  const archivedBundlePath = await toolcache2.downloadTool(
+    codeqlURL,
+    void 0,
+    authorization,
+    headers
+  );
+  const downloadDurationMs = Math.round(import_perf_hooks2.performance.now() - toolsDownloadStart);
+  logger.info(
+    `Finished downloading CodeQL bundle to ${archivedBundlePath} (${formatDuration(
+      downloadDurationMs
+    )}).`
+  );
+  let extractionDurationMs;
+  try {
+    logger.info("Extracting CodeQL bundle.");
+    const extractionStart = import_perf_hooks2.performance.now();
+    await extract(
+      archivedBundlePath,
+      dest,
+      compressionMethod,
+      tarVersion,
+      logger
     );
+    extractionDurationMs = Math.round(import_perf_hooks2.performance.now() - extractionStart);
+    logger.info(
+      `Finished extracting CodeQL bundle to ${dest} (${formatDuration(
+        extractionDurationMs
+      )}).`
+    );
+  } finally {
+    await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger);
   }
-  return true;
+  return { downloadDurationMs };
 }
-async function cleanupTrapCaches(config, features, logger) {
-  if (!await features.getValue("cleanup_trap_caches" /* CleanupTrapCaches */)) {
-    return {
-      trap_cache_cleanup_skipped_because: "feature disabled"
-    };
-  }
-  logger.warning(
-    "TRAP cache cleanup is deprecated and will be removed in May 2026. We recommend instead disabling TRAP caching by passing the `trap-caching: false` input to the `init` Action."
+async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) {
+  fs12.mkdirSync(dest, { recursive: true });
+  const agent = new import_http_client.HttpClient().getAgent(codeqlURL);
+  headers = Object.assign(
+    { "User-Agent": "CodeQL Action" },
+    authorization ? { authorization } : {},
+    headers
   );
-  if (!await isAnalyzingDefaultBranch()) {
-    return {
-      trap_cache_cleanup_skipped_because: "not analyzing default branch"
-    };
-  }
-  try {
-    let totalBytesCleanedUp = 0;
-    const allCaches = await listActionsCaches(
-      CODEQL_TRAP_CACHE_PREFIX,
-      await getRef()
+  const response = await new Promise((resolve14, reject) => {
+    const request3 = import_follow_redirects.https.get(
+      codeqlURL,
+      {
+        headers,
+        // Increase the high water mark to improve performance.
+        highWaterMark: STREAMING_HIGH_WATERMARK_BYTES,
+        // Use the agent to respect proxy settings.
+        agent
+      },
+      (r) => resolve14(r)
     );
-    for (const language of config.languages) {
-      if (config.trapCaches[language]) {
-        const cachesToRemove = await getTrapCachesForLanguage(
-          allCaches,
-          language,
-          logger
-        );
-        cachesToRemove.sort((a, b) => a.created_at.localeCompare(b.created_at));
-        const mostRecentCache = cachesToRemove.pop();
-        logger.debug(
-          `Keeping most recent TRAP cache (${JSON.stringify(mostRecentCache)})`
-        );
-        if (cachesToRemove.length === 0) {
-          logger.info(`No TRAP caches to clean up for ${language}.`);
-          continue;
-        }
-        for (const cache of cachesToRemove) {
-          logger.debug(`Cleaning up TRAP cache (${JSON.stringify(cache)})`);
-          await deleteActionsCache(cache.id);
-        }
-        const bytesCleanedUp = cachesToRemove.reduce(
-          (acc, item) => acc + item.size_in_bytes,
-          0
-        );
-        totalBytesCleanedUp += bytesCleanedUp;
-        const megabytesCleanedUp = (bytesCleanedUp / (1024 * 1024)).toFixed(2);
-        logger.info(
-          `Cleaned up ${megabytesCleanedUp} MiB of old TRAP caches for ${language}.`
-        );
-      }
-    }
-    return { trap_cache_cleanup_size_bytes: totalBytesCleanedUp };
-  } catch (e) {
-    if (asHTTPError(e)?.status === 403) {
-      logger.warning(
-        `Could not cleanup TRAP caches as the token did not have the required permissions. To clean up TRAP caches, ensure the token has the "actions:write" permission. See ${"https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs" /* ASSIGNING_PERMISSIONS_TO_JOBS */} for more information.`
+    request3.on("error", reject);
+    request3.setTimeout(STREAMING_STALL_TIMEOUT_MS, () => {
+      request3.destroy(
+        new Error(
+          `No data received for ${formatDuration(STREAMING_STALL_TIMEOUT_MS)}.`
+        )
       );
-    } else {
-      logger.info(`Failed to cleanup TRAP caches, continuing. Details: ${e}`);
-    }
-    return { trap_cache_cleanup_error: getErrorMessage(e) };
+    });
+  });
+  if (response.statusCode !== 200) {
+    response.resume();
+    throw new Error(
+      `Failed to download CodeQL bundle from ${codeqlURL}. HTTP status code: ${response.statusCode}.`
+    );
   }
+  await extractTarZst(response, dest, tarVersion, logger);
 }
-async function getTrapCachesForLanguage(allCaches, language, logger) {
-  logger.debug(`Listing TRAP caches for ${language}`);
-  for (const cache of allCaches) {
-    if (!cache.created_at || !cache.id || !cache.key || !cache.size_in_bytes) {
-      throw new Error(
-        `An unexpected cache item was returned from the API that was missing one or more required fields: ${JSON.stringify(cache)}`
-      );
-    }
+function getToolcacheDirectory(version) {
+  return path11.join(
+    getRequiredEnvParam("RUNNER_TOOL_CACHE"),
+    TOOLCACHE_TOOL_NAME,
+    semver8.clean(version) || version,
+    os4.arch() || ""
+  );
+}
+function writeToolcacheMarkerFile(extractedPath, logger) {
+  const markerFilePath = `${extractedPath}.complete`;
+  fs12.writeFileSync(markerFilePath, "");
+  logger.info(`Created toolcache marker file ${markerFilePath}`);
+}
+
+// src/setup-codeql.ts
+var CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action";
+var CODEQL_NIGHTLIES_REPOSITORY_OWNER = "dsp-testing";
+var CODEQL_NIGHTLIES_REPOSITORY_NAME = "codeql-cli-nightlies";
+var CODEQL_BUNDLE_VERSION_ALIAS = ["linked", "latest"];
+var CODEQL_NIGHTLY_TOOLS_INPUTS = ["nightly", "nightly-latest"];
+var CODEQL_TOOLCACHE_INPUT = "toolcache";
+function getCodeQLBundleExtension(compressionMethod) {
+  switch (compressionMethod) {
+    case "gzip":
+      return ".tar.gz";
+    case "zstd":
+      return ".tar.zst";
+    default:
+      assertNever(compressionMethod);
   }
-  return allCaches.filter((cache) => {
-    return cache.key?.includes(`-${language}-`);
-  });
 }
-async function getLanguagesSupportingCaching(codeql, languages, logger) {
-  const result = [];
-  const resolveResult = await codeql.betterResolveLanguages();
-  outer: for (const lang of languages) {
-    const extractorsForLanguage = resolveResult.extractors[lang];
-    if (extractorsForLanguage === void 0) {
-      logger.info(
-        `${lang} does not support TRAP caching (couldn't find an extractor)`
-      );
-      continue;
+function getCodeQLBundleName(compressionMethod) {
+  const extension = getCodeQLBundleExtension(compressionMethod);
+  let platform2;
+  if (process.platform === "win32") {
+    platform2 = "win64";
+  } else if (process.platform === "linux") {
+    platform2 = "linux64";
+  } else if (process.platform === "darwin") {
+    platform2 = "osx64";
+  } else {
+    return `codeql-bundle${extension}`;
+  }
+  return `codeql-bundle-${platform2}${extension}`;
+}
+function getCodeQLActionRepository(logger) {
+  if (isRunningLocalAction()) {
+    logger.info(
+      "The CodeQL Action is checked out locally. Using the default CodeQL Action repository."
+    );
+    return CODEQL_DEFAULT_ACTION_REPOSITORY;
+  }
+  return getRequiredEnvParam("GITHUB_ACTION_REPOSITORY");
+}
+async function getCodeQLBundleDownloadURL(tagName, apiDetails, compressionMethod, logger) {
+  const codeQLActionRepository = getCodeQLActionRepository(logger);
+  const potentialDownloadSources = [
+    // This GitHub instance, and this Action.
+    [apiDetails.url, codeQLActionRepository],
+    // This GitHub instance, and the canonical Action.
+    [apiDetails.url, CODEQL_DEFAULT_ACTION_REPOSITORY],
+    // GitHub.com, and the canonical Action.
+    [GITHUB_DOTCOM_URL, CODEQL_DEFAULT_ACTION_REPOSITORY]
+  ];
+  const uniqueDownloadSources = potentialDownloadSources.filter(
+    (source, index2, self2) => {
+      return !self2.slice(0, index2).some((other) => (0, import_fast_deep_equal.default)(source, other));
     }
-    if (extractorsForLanguage.length !== 1) {
-      logger.info(
-        `${lang} does not support TRAP caching (found multiple extractors)`
-      );
-      continue;
+  );
+  const codeQLBundleName = getCodeQLBundleName(compressionMethod);
+  for (const downloadSource of uniqueDownloadSources) {
+    const [apiURL, repository] = downloadSource;
+    if (apiURL === GITHUB_DOTCOM_URL && repository === CODEQL_DEFAULT_ACTION_REPOSITORY) {
+      break;
     }
-    const extractor = extractorsForLanguage[0];
-    const trapCacheOptions = extractor.extractor_options?.trap?.properties?.cache?.properties;
-    if (trapCacheOptions === void 0) {
+    const [repositoryOwner, repositoryName] = repository.split("/");
+    try {
+      const release2 = await getApiClient().rest.repos.getReleaseByTag({
+        owner: repositoryOwner,
+        repo: repositoryName,
+        tag: tagName
+      });
+      for (const asset of release2.data.assets) {
+        if (asset.name === codeQLBundleName) {
+          logger.info(
+            `Found CodeQL bundle ${codeQLBundleName} in ${repository} on ${apiURL} with URL ${asset.url}.`
+          );
+          return asset.url;
+        }
+      }
+    } catch (e) {
       logger.info(
-        `${lang} does not support TRAP caching (missing option group)`
+        `Looked for CodeQL bundle ${codeQLBundleName} in ${repository} on ${apiURL} but got error ${e}.`
       );
-      continue;
-    }
-    for (const requiredOpt of ["dir", "bound", "write"]) {
-      if (!(requiredOpt in trapCacheOptions)) {
-        logger.info(
-          `${lang} does not support TRAP caching (missing ${requiredOpt} option)`
-        );
-        continue outer;
-      }
     }
-    result.push(lang);
   }
-  return result;
-}
-async function cacheKey(codeql, language, baseSha) {
-  return `${await cachePrefix(codeql, language)}${baseSha}`;
+  return `https://github.com/${CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${tagName}/${codeQLBundleName}`;
 }
-async function cachePrefix(codeql, language) {
-  return `${CODEQL_TRAP_CACHE_PREFIX}-${CACHE_VERSION}-${(await codeql.getVersion()).version}-${language}-`;
+function tryGetBundleVersionFromTagName(tagName, logger) {
+  const match2 = tagName.match(/^codeql-bundle-(.*)$/);
+  if (match2 === null || match2.length < 2) {
+    logger.debug(`Could not determine bundle version from tag ${tagName}.`);
+    return void 0;
+  }
+  return match2[1];
 }
-
-// src/config-utils.ts
-var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4;
-var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6;
-var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_MB = 14e3;
-var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_MB * 1e6;
-var OVERLAY_MINIMUM_MEMORY_MB = 5 * 1024;
-var CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE = "2.24.3";
-async function getSupportedLanguageMap(codeql, logger) {
-  const resolveSupportedLanguagesUsingCli = await codeql.supportsFeature(
-    "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
-  );
-  const resolveResult = await codeql.betterResolveLanguages({
-    filterToLanguagesWithQueries: resolveSupportedLanguagesUsingCli
-  });
-  if (resolveSupportedLanguagesUsingCli) {
+function tryGetTagNameFromUrl(url2, logger) {
+  const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)];
+  if (matches.length === 0) {
+    logger.debug(`Could not determine tag name for URL ${url2}.`);
+    return void 0;
+  }
+  const match2 = matches[matches.length - 1];
+  if (match2?.length !== 2) {
     logger.debug(
-      `The CodeQL CLI supports the following languages: ${Object.keys(resolveResult.extractors).join(", ")}`
+      `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify(
+        match2
+      )}.`
     );
+    return void 0;
   }
-  const supportedLanguages = {};
-  for (const extractor of Object.keys(resolveResult.extractors)) {
-    if (resolveSupportedLanguagesUsingCli || BuiltInLanguage[extractor] !== void 0) {
-      supportedLanguages[extractor] = extractor;
-    }
+  return match2[1];
+}
+function convertToSemVer(version, logger) {
+  if (!semver9.valid(version)) {
+    logger.debug(
+      `Bundle version ${version} is not in SemVer format. Will treat it as pre-release 0.0.0-${version}.`
+    );
+    version = `0.0.0-${version}`;
   }
-  if (resolveResult.aliases) {
-    for (const [alias, extractor] of Object.entries(resolveResult.aliases)) {
-      supportedLanguages[alias] = extractor;
-    }
+  const s = semver9.clean(version);
+  if (!s) {
+    throw new Error(`Bundle version ${version} is not in SemVer format.`);
   }
-  return supportedLanguages;
-}
-var baseWorkflowsPath = ".github/workflows";
-function hasActionsWorkflows(sourceRoot) {
-  const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath);
-  const stats = fs9.lstatSync(workflowsPath, { throwIfNoEntry: false });
-  return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0;
+  return s;
 }
-async function getRawLanguagesInRepo(repository, sourceRoot, logger) {
-  logger.debug(
-    `Automatically detecting languages (${repository.owner}/${repository.repo})`
-  );
-  const response = await getApiClient().rest.repos.listLanguages({
-    owner: repository.owner,
-    repo: repository.repo
-  });
-  logger.debug(`Languages API response: ${JSON.stringify(response)}`);
-  const result = Object.keys(response.data).map(
-    (language) => language.trim().toLowerCase()
-  );
-  if (hasActionsWorkflows(sourceRoot)) {
-    logger.debug(`Found a .github/workflows directory`);
-    result.push("actions");
+async function findOverridingToolsInCache(humanReadableVersion, logger) {
+  const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({
+    folder: toolcache3.find("CodeQL", version),
+    version
+  })).filter(({ folder }) => fs13.existsSync(path12.join(folder, "pinned-version")));
+  if (candidates.length === 1) {
+    const candidate = candidates[0];
+    logger.debug(
+      `CodeQL tools version ${candidate.version} in toolcache overriding version ${humanReadableVersion}.`
+    );
+    return {
+      codeqlFolder: candidate.folder,
+      sourceType: "toolcache",
+      toolsVersion: candidate.version
+    };
+  } else if (candidates.length === 0) {
+    logger.debug(
+      "Did not find any candidate pinned versions of the CodeQL tools in the toolcache."
+    );
+  } else {
+    logger.debug(
+      "Could not use CodeQL tools from the toolcache since more than one candidate pinned version was found in the toolcache."
+    );
   }
-  logger.debug(`Raw languages in repository: ${result.join(", ")}`);
-  return result;
+  return void 0;
 }
-async function getLanguages(codeql, languagesInput, repository, sourceRoot, logger) {
-  const { rawLanguages, autodetected } = await getRawLanguages(
-    languagesInput,
-    repository,
-    sourceRoot,
-    logger
+async function getEnabledVersionsWithOverlayBaseDatabases(defaultCliVersion, rawLanguages, features, logger) {
+  if (rawLanguages === void 0 || rawLanguages.length === 0) {
+    return [];
+  }
+  const isEnabled = await features.getValue(
+    "overlay_analysis_match_codeql_version" /* OverlayAnalysisMatchCodeqlVersion */
   );
-  const languageMap = await getSupportedLanguageMap(codeql, logger);
-  const languagesSet = /* @__PURE__ */ new Set();
-  const unknownLanguages = [];
-  for (const language of rawLanguages) {
-    const extractorName = languageMap[language];
-    if (extractorName === void 0) {
-      unknownLanguages.push(language);
-    } else {
-      languagesSet.add(extractorName);
-    }
+  const isDryRun = !isEnabled && await features.getValue("overlay_analysis_match_codeql_version_dry_run" /* OverlayAnalysisMatchCodeqlVersionDryRun */);
+  if (!isEnabled && !isDryRun) {
+    return [];
   }
-  const languages = Array.from(languagesSet);
-  if (!autodetected && unknownLanguages.length > 0) {
-    throw new ConfigurationError(
-      getUnknownLanguagesError(unknownLanguages)
+  let cachedVersions;
+  try {
+    cachedVersions = await getCodeQlVersionsForOverlayBaseDatabases(
+      rawLanguages,
+      logger
+    );
+  } catch (e) {
+    logger.warning(
+      `Could not list overlay-base databases in the Actions cache while choosing a default CodeQL CLI version, falling back to the highest enabled version. Details: ${getErrorMessage(e)}`
     );
+    return [];
   }
-  if (languages.length === 0) {
-    throw new ConfigurationError(getNoLanguagesError());
+  if (cachedVersions === void 0 || cachedVersions.length === 0) {
+    return [];
   }
-  if (autodetected) {
-    logger.info(`Autodetected languages: ${languages.join(", ")}`);
-  } else {
-    logger.info(`Languages from configuration: ${languages.join(", ")}`);
+  const cachedVersionsSet = new Set(cachedVersions);
+  const overlayVersions = defaultCliVersion.enabledVersions.filter(
+    (v) => cachedVersionsSet.has(v.cliVersion)
+  );
+  if (overlayVersions.length === 0) {
+    return [];
   }
-  return languages;
-}
-function getRawLanguagesNoAutodetect(languagesInput) {
-  return (languagesInput || "").split(",").map((x) => x.trim().toLowerCase()).filter((x) => x.length > 0);
-}
-async function getRawLanguages(languagesInput, repository, sourceRoot, logger) {
-  const languagesFromInput = getRawLanguagesNoAutodetect(languagesInput);
-  if (languagesFromInput.length > 0) {
-    return { rawLanguages: languagesFromInput, autodetected: false };
+  const isCachedVersionDifferent = overlayVersions[0].cliVersion !== defaultCliVersion.enabledVersions[0].cliVersion;
+  if (isCachedVersionDifferent) {
+    addNoLanguageDiagnostic(
+      void 0,
+      makeTelemetryDiagnostic(
+        "codeql-action/overlay-aware-default-codeql-version",
+        "Overlay-aware default CodeQL version selection",
+        {
+          cachedVersions,
+          enabledVersions: defaultCliVersion.enabledVersions.map(
+            (v) => v.cliVersion
+          ),
+          isDryRun,
+          overlayAwareVersion: overlayVersions[0].cliVersion
+        }
+      )
+    );
   }
-  return {
-    rawLanguages: await getRawLanguagesInRepo(repository, sourceRoot, logger),
-    autodetected: true
-  };
+  if (isDryRun) {
+    logger.debug(
+      `Overlay-aware default CodeQL version selection is running in dry-run mode. Would have used version ${overlayVersions[0].cliVersion}.`
+    );
+    return [];
+  }
+  return overlayVersions;
 }
-async function initActionState({
-  languagesInput,
-  queriesInput,
-  packsInput,
-  buildModeInput,
-  dbLocation,
-  dependencyCachingEnabled,
-  debugMode,
-  debugArtifactName,
-  debugDatabaseName,
-  repository,
-  tempDir,
-  codeql,
-  sourceRoot,
-  githubVersion,
-  features,
-  repositoryProperties,
-  analysisKinds,
-  logger,
-  enableFileCoverageInformation
-}, userConfig) {
-  const languages = await getLanguages(
-    codeql,
-    languagesInput,
-    repository,
-    sourceRoot,
-    logger
-  );
-  const buildMode = await parseBuildModeInput(
-    buildModeInput,
-    languages,
+async function resolveDefaultCliVersion(defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
+  if (!useOverlayAwareDefaultCliVersion || !isAnalyzingPullRequest()) {
+    return defaultCliVersion.enabledVersions[0];
+  }
+  const overlayVersions = await getEnabledVersionsWithOverlayBaseDatabases(
+    defaultCliVersion,
+    rawLanguages,
     features,
     logger
   );
-  const augmentationProperties = await calculateAugmentation(
-    packsInput,
-    queriesInput,
-    repositoryProperties,
-    languages
-  );
-  if (analysisKinds.length === 1 && analysisKinds.includes("code-quality" /* CodeQuality */) && augmentationProperties.repoPropertyQueries.input) {
+  if (overlayVersions.length > 0) {
     logger.info(
-      `Ignoring queries configured in the repository properties, because query customisations are not supported for Code Quality analyses.`
+      `Using CodeQL version ${overlayVersions[0].cliVersion} since this is the highest enabled version that has a cached overlay-base database.`
     );
-    augmentationProperties.repoPropertyQueries = {
-      combines: false,
-      input: void 0
-    };
+    return overlayVersions[0];
   }
-  const computedConfig = generateCodeScanningConfig(
-    logger,
-    userConfig,
-    augmentationProperties
-  );
-  return {
-    version: getActionVersion(),
-    analysisKinds,
-    languages,
-    buildMode,
-    originalUserInput: userConfig,
-    computedConfig,
-    tempDir,
-    codeQLCmd: codeql.getPath(),
-    gitHubVersion: githubVersion,
-    dbLocation: dbLocationOrDefault(dbLocation, tempDir),
-    debugMode,
-    debugArtifactName,
-    debugDatabaseName,
-    trapCaches: {},
-    trapCacheDownloadTime: 0,
-    dependencyCachingEnabled: getCachingKind(dependencyCachingEnabled),
-    dependencyCachingRestoredKeys: [],
-    extraQueryExclusions: [],
-    overlayDatabaseMode: "none" /* None */,
-    useOverlayDatabaseCaching: false,
-    overlayModeSetExplicitly: false,
-    repositoryProperties,
-    enableFileCoverageInformation
-  };
-}
-async function downloadCacheWithTime(codeQL, languages, logger) {
-  const start = import_perf_hooks.performance.now();
-  const trapCaches = await downloadTrapCaches(codeQL, languages, logger);
-  const trapCacheDownloadTime = import_perf_hooks.performance.now() - start;
-  return { trapCaches, trapCacheDownloadTime };
+  return defaultCliVersion.enabledVersions[0];
 }
-async function loadUserConfig(logger, configFile, workspacePath, apiDetails, tempDir, validateConfig) {
-  if (isLocal(configFile)) {
-    if (configFile !== userConfigFromActionPath(tempDir)) {
-      configFile = path10.resolve(workspacePath, configFile);
-      if (!(configFile + path10.sep).startsWith(workspacePath + path10.sep)) {
-        throw new ConfigurationError(
-          getConfigFileOutsideWorkspaceErrorMessage(configFile)
+async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
+  if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
+    logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
+    const compressionMethod2 = inferCompressionMethod(toolsInput);
+    if (compressionMethod2 === void 0) {
+      throw new ConfigurationError(
+        `Could not infer compression method from path ${toolsInput}. Please specify a path ending in '.tar.gz' or '.tar.zst'.`
+      );
+    }
+    return {
+      codeqlTarPath: toolsInput,
+      compressionMethod: compressionMethod2,
+      sourceType: "local",
+      toolsVersion: "local"
+    };
+  }
+  let cliVersion2;
+  let tagName;
+  let url2;
+  const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode();
+  const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */);
+  const forceNightly = forceNightlyValueFF && canForceNightlyWithFF;
+  const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput);
+  if (forceNightly || nightlyRequestedByToolsInput) {
+    if (forceNightly) {
+      logger.info(
+        `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.`
+      );
+      addNoLanguageDiagnostic(
+        void 0,
+        makeDiagnostic(
+          "codeql-action/forced-nightly-cli",
+          "A nightly release of CodeQL was used",
+          {
+            markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.",
+            visibility: {
+              cliSummaryTable: true,
+              statusPage: true,
+              telemetry: true
+            },
+            severity: "note"
+          }
+        )
+      );
+    } else {
+      logger.info(
+        `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
+      );
+    }
+    toolsInput = await getNightlyToolsUrl(logger);
+  }
+  const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
+  if (forceShippedTools) {
+    cliVersion2 = cliVersion;
+    tagName = bundleVersion;
+    logger.info(
+      `'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
+    );
+    if (toolsInput === "latest") {
+      logger.warning(
+        "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
+      );
+    }
+  } else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
+    let latestToolcacheVersion;
+    const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
+    if (allowToolcacheValue) {
+      logger.info(
+        `Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
+      );
+      latestToolcacheVersion = getLatestToolcacheVersion(logger);
+      if (latestToolcacheVersion) {
+        cliVersion2 = latestToolcacheVersion;
+      }
+    }
+    if (latestToolcacheVersion === void 0) {
+      if (allowToolcacheValue) {
+        logger.info(
+          `Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
         );
+      } else {
+        logger.warning(
+          `Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
+        );
+      }
+      const version = await resolveDefaultCliVersion(
+        defaultCliVersion,
+        rawLanguages,
+        useOverlayAwareDefaultCliVersion,
+        features,
+        logger
+      );
+      cliVersion2 = version.cliVersion;
+      tagName = version.tagName;
+    }
+  } else if (toolsInput !== void 0) {
+    tagName = tryGetTagNameFromUrl(toolsInput, logger);
+    url2 = toolsInput;
+    if (tagName) {
+      const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger);
+      if (bundleVersion3 && semver9.valid(bundleVersion3)) {
+        cliVersion2 = convertToSemVer(bundleVersion3, logger);
       }
     }
-    return getLocalConfig(logger, configFile, validateConfig);
   } else {
-    return await getRemoteConfig(
-      logger,
-      configFile,
-      apiDetails,
-      validateConfig
+    const version = await resolveDefaultCliVersion(
+      defaultCliVersion,
+      rawLanguages,
+      useOverlayAwareDefaultCliVersion,
+      features,
+      logger
     );
+    cliVersion2 = version.cliVersion;
+    tagName = version.tagName;
   }
-}
-var OVERLAY_ANALYSIS_FEATURES = {
-  cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
-  csharp: "overlay_analysis_csharp" /* OverlayAnalysisCsharp */,
-  go: "overlay_analysis_go" /* OverlayAnalysisGo */,
-  java: "overlay_analysis_java" /* OverlayAnalysisJava */,
-  javascript: "overlay_analysis_javascript" /* OverlayAnalysisJavascript */,
-  python: "overlay_analysis_python" /* OverlayAnalysisPython */,
-  ruby: "overlay_analysis_ruby" /* OverlayAnalysisRuby */
-};
-var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
-  cpp: "overlay_analysis_code_scanning_cpp" /* OverlayAnalysisCodeScanningCpp */,
-  csharp: "overlay_analysis_code_scanning_csharp" /* OverlayAnalysisCodeScanningCsharp */,
-  go: "overlay_analysis_code_scanning_go" /* OverlayAnalysisCodeScanningGo */,
-  java: "overlay_analysis_code_scanning_java" /* OverlayAnalysisCodeScanningJava */,
-  javascript: "overlay_analysis_code_scanning_javascript" /* OverlayAnalysisCodeScanningJavascript */,
-  python: "overlay_analysis_code_scanning_python" /* OverlayAnalysisCodeScanningPython */,
-  ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */
-};
-async function checkOverlayAnalysisFeatureEnabled(features, codeql, languages, codeScanningConfig) {
-  if (!await features.getValue("overlay_analysis" /* OverlayAnalysis */, codeql)) {
-    return new Failure("overall-feature-not-enabled" /* OverallFeatureNotEnabled */);
-  }
-  let enableForCodeScanningOnly = false;
-  for (const language of languages) {
-    const feature = OVERLAY_ANALYSIS_FEATURES[language];
-    if (feature && await features.getValue(feature, codeql)) {
-      continue;
-    }
-    const codeScanningFeature = OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES[language];
-    if (codeScanningFeature && await features.getValue(codeScanningFeature, codeql)) {
-      enableForCodeScanningOnly = true;
-      continue;
+  const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger);
+  const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown";
+  logger.debug(
+    `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.`
+  );
+  let codeqlFolder;
+  if (cliVersion2) {
+    codeqlFolder = toolcache3.find("CodeQL", cliVersion2);
+    if (!codeqlFolder) {
+      logger.debug(
+        `Didn't find a version of the CodeQL tools in the toolcache with a version number exactly matching ${cliVersion2}.`
+      );
+      const allVersions = toolcache3.findAllVersions("CodeQL");
+      logger.debug(
+        `Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(
+          allVersions
+        )}.`
+      );
+      const candidateVersions = allVersions.filter(
+        (version) => version.startsWith(`${cliVersion2}-`)
+      );
+      if (candidateVersions.length === 1) {
+        logger.debug(
+          `Exactly one version of the CodeQL tools starting with ${cliVersion2} found in the toolcache, using that.`
+        );
+        codeqlFolder = toolcache3.find("CodeQL", candidateVersions[0]);
+      } else if (candidateVersions.length === 0) {
+        logger.debug(
+          `Didn't find any versions of the CodeQL tools starting with ${cliVersion2} in the toolcache. Trying next fallback method.`
+        );
+      } else {
+        logger.warning(
+          `Found ${candidateVersions.length} versions of the CodeQL tools starting with ${cliVersion2} in the toolcache, but at most one was expected.`
+        );
+        logger.debug("Trying next fallback method.");
+      }
     }
-    return new Failure("language-not-enabled" /* LanguageNotEnabled */);
   }
-  if (enableForCodeScanningOnly) {
-    const usesDefaultQueriesOnly = codeScanningConfig["disable-default-queries"] !== true && codeScanningConfig.packs === void 0 && codeScanningConfig.queries === void 0 && codeScanningConfig["query-filters"] === void 0;
-    if (!usesDefaultQueriesOnly) {
-      return new Failure("non-default-queries" /* NonDefaultQueries */);
+  if (!codeqlFolder && tagName) {
+    const fallbackVersion = await tryGetFallbackToolcacheVersion(
+      cliVersion2,
+      tagName,
+      logger
+    );
+    if (fallbackVersion) {
+      codeqlFolder = toolcache3.find("CodeQL", fallbackVersion);
+    } else {
+      logger.debug(
+        `Could not determine a fallback toolcache version number for CodeQL tools version ${humanReadableVersion}.`
+      );
     }
   }
-  return new Success(void 0);
-}
-function runnerHasSufficientDiskSpace(diskUsage, logger, useV2ResourceChecks) {
-  const minimumDiskSpaceBytes = useV2ResourceChecks ? OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_BYTES : OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES;
-  if (diskUsage.numAvailableBytes < minimumDiskSpaceBytes) {
-    const diskSpaceMb = Math.round(diskUsage.numAvailableBytes / 1e6);
-    const minimumDiskSpaceMb = Math.round(minimumDiskSpaceBytes / 1e6);
+  if (codeqlFolder) {
     logger.info(
-      `Setting overlay database mode to ${"none" /* None */} due to insufficient disk space (${diskSpaceMb} MB, needed ${minimumDiskSpaceMb} MB).`
-    );
-    return false;
-  }
-  return true;
-}
-async function runnerHasSufficientMemory(codeql, ramInput, logger) {
-  if (await codeQlVersionAtLeast(
-    codeql,
-    CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE
-  )) {
-    logger.debug(
-      `Skipping memory check for overlay analysis because CodeQL version is at least ${CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE}.`
+      `Found CodeQL tools version ${humanReadableVersion} in the toolcache.`
     );
-    return true;
-  }
-  const memoryFlagValue = getCodeQLMemoryLimit(ramInput, logger);
-  if (memoryFlagValue < OVERLAY_MINIMUM_MEMORY_MB) {
+  } else {
     logger.info(
-      `Setting overlay database mode to ${"none" /* None */} due to insufficient memory for CodeQL analysis (${memoryFlagValue} MB, needed ${OVERLAY_MINIMUM_MEMORY_MB} MB).`
+      `Did not find CodeQL tools version ${humanReadableVersion} in the toolcache.`
     );
-    return false;
-  }
-  logger.debug(
-    `Memory available for CodeQL analysis is ${memoryFlagValue} MB, which is above the minimum of ${OVERLAY_MINIMUM_MEMORY_MB} MB.`
-  );
-  return true;
-}
-async function checkRunnerResources(codeql, diskUsage, ramInput, logger, useV2ResourceChecks) {
-  if (!runnerHasSufficientDiskSpace(diskUsage, logger, useV2ResourceChecks)) {
-    return new Failure("insufficient-disk-space" /* InsufficientDiskSpace */);
   }
-  if (!await runnerHasSufficientMemory(codeql, ramInput, logger)) {
-    return new Failure("insufficient-memory" /* InsufficientMemory */);
+  if (codeqlFolder) {
+    if (cliVersion2) {
+      logger.info(
+        `Using CodeQL CLI version ${cliVersion2} from toolcache at ${codeqlFolder}`
+      );
+    } else {
+      logger.info(`Using CodeQL CLI from toolcache at ${codeqlFolder}`);
+    }
+    return {
+      codeqlFolder,
+      sourceType: "toolcache",
+      toolsVersion: cliVersion2 ?? humanReadableVersion
+    };
   }
-  return new Success(void 0);
-}
-async function checkOverlayEnablement(codeql, features, languages, sourceRoot, buildMode, ramInput, codeScanningConfig, repositoryProperties, gitVersion, logger) {
-  const modeEnv = process.env.CODEQL_OVERLAY_DATABASE_MODE;
-  if (modeEnv === "overlay" /* Overlay */ || modeEnv === "overlay-base" /* OverlayBase */ || modeEnv === "none" /* None */) {
-    logger.info(
-      `Setting overlay database mode to ${modeEnv} from the CODEQL_OVERLAY_DATABASE_MODE environment variable.`
+  if (variant === "GitHub Enterprise Server" /* GHES */ && !forceShippedTools && !toolsInput) {
+    const result = await findOverridingToolsInCache(
+      humanReadableVersion,
+      logger
     );
-    if (modeEnv === "none" /* None */) {
-      return new Failure("disabled-by-environment-variable" /* DisabledByEnvironmentVariable */);
+    if (result !== void 0) {
+      return result;
     }
-    return validateOverlayDatabaseMode(
-      modeEnv,
-      false,
-      true,
-      codeql,
-      languages,
-      sourceRoot,
-      buildMode,
-      gitVersion,
+  }
+  let compressionMethod;
+  if (!url2) {
+    compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip";
+    url2 = await getCodeQLBundleDownloadURL(
+      tagName,
+      apiDetails,
+      compressionMethod,
       logger
     );
+  } else {
+    const method = inferCompressionMethod(url2);
+    if (method === void 0) {
+      throw new ConfigurationError(
+        `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.`
+      );
+    }
+    compressionMethod = method;
   }
-  if (repositoryProperties["github-codeql-disable-overlay" /* DISABLE_OVERLAY */] === true) {
-    logger.info(
-      `Setting overlay database mode to ${"none" /* None */} because the ${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */} repository property is set to true.`
-    );
-    return new Failure("disabled-by-repository-property" /* DisabledByRepositoryProperty */);
+  if (cliVersion2) {
+    logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`);
+  } else {
+    logger.info(`Using CodeQL CLI sourced from ${url2} .`);
   }
-  const featureResult = await checkOverlayAnalysisFeatureEnabled(
-    features,
-    codeql,
-    languages,
-    codeScanningConfig
-  );
-  if (featureResult.isFailure()) {
-    return featureResult;
+  return {
+    bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger),
+    cliVersion: cliVersion2,
+    codeqlURL: url2,
+    compressionMethod,
+    sourceType: "download",
+    toolsVersion: cliVersion2 ?? humanReadableVersion
+  };
+}
+async function tryGetFallbackToolcacheVersion(cliVersion2, tagName, logger) {
+  const bundleVersion2 = tryGetBundleVersionFromTagName(tagName, logger);
+  if (!bundleVersion2) {
+    return void 0;
   }
-  const performResourceChecks = !await features.getValue(
-    "overlay_analysis_skip_resource_checks" /* OverlayAnalysisSkipResourceChecks */,
-    codeql
-  );
-  const useV2ResourceChecks = await features.getValue(
-    "overlay_analysis_resource_checks_v2" /* OverlayAnalysisResourceChecksV2 */
-  );
-  const checkOverlayStatus = await features.getValue(
-    "overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */
+  const fallbackVersion = convertToSemVer(bundleVersion2, logger);
+  logger.debug(
+    `Computed a fallback toolcache version number of ${fallbackVersion} for CodeQL version ${cliVersion2 ?? tagName}.`
   );
-  const needDiskUsage = performResourceChecks || checkOverlayStatus;
-  const diskUsage = needDiskUsage ? await checkDiskUsage(logger) : void 0;
-  if (needDiskUsage && diskUsage === void 0) {
-    logger.warning(
-      `Unable to determine disk usage, therefore setting overlay database mode to ${"none" /* None */}.`
-    );
-    return new Failure("unable-to-determine-disk-usage" /* UnableToDetermineDiskUsage */);
-  }
-  const resourceResult = performResourceChecks && diskUsage !== void 0 ? await checkRunnerResources(
-    codeql,
-    diskUsage,
-    ramInput,
-    logger,
-    useV2ResourceChecks
-  ) : new Success(void 0);
-  if (resourceResult.isFailure()) {
-    return resourceResult;
-  }
-  if (checkOverlayStatus && diskUsage !== void 0 && await shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger)) {
-    logger.info(
-      `Setting overlay database mode to ${"none" /* None */} because overlay analysis previously failed with this combination of languages, disk space, and CodeQL version.`
-    );
-    return new Failure("skipped-due-to-cached-status" /* SkippedDueToCachedStatus */);
-  }
-  let overlayDatabaseMode;
-  if (isAnalyzingPullRequest()) {
-    overlayDatabaseMode = "overlay" /* Overlay */;
-    logger.info(
-      `Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing a pull request.`
-    );
-  } else if (await isAnalyzingDefaultBranch()) {
-    overlayDatabaseMode = "overlay-base" /* OverlayBase */;
-    logger.info(
-      `Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing the default branch.`
-    );
+  return fallbackVersion;
+}
+var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVersion, maybeCliVersion, apiDetails, tarVersion, tempDir, logger) {
+  const parsedCodeQLURL = new URL(codeqlURL);
+  const searchParams = new URLSearchParams(parsedCodeQLURL.search);
+  const headers = {
+    accept: "application/octet-stream"
+  };
+  let authorization = void 0;
+  if (searchParams.has("token")) {
+    logger.debug("CodeQL tools URL contains an authorization token.");
   } else {
-    return new Failure("not-pull-request-or-default-branch" /* NotPullRequestOrDefaultBranch */);
+    authorization = getAuthorizationHeaderFor(
+      logger,
+      apiDetails,
+      codeqlURL
+    );
   }
-  return validateOverlayDatabaseMode(
-    overlayDatabaseMode,
-    true,
-    false,
-    codeql,
-    languages,
-    sourceRoot,
-    buildMode,
-    gitVersion,
+  const toolcacheInfo = getToolcacheDestinationInfo(
+    maybeBundleVersion,
+    maybeCliVersion,
     logger
   );
-}
-async function validateOverlayDatabaseMode(overlayDatabaseMode, useOverlayDatabaseCaching, overlayModeSetExplicitly, codeql, languages, sourceRoot, buildMode, gitVersion, logger) {
-  if (buildMode !== "none" /* None */ && (await Promise.all(
-    languages.map(
-      async (l) => l !== "go" /* go */ && // Workaround to allow overlay analysis for Go with any build
-      // mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
-      // ensure that overlay-base databases are only created for supported Go build setups,
-      // and that we'll fall back to full databases in other cases.
-      await codeql.isTracedLanguage(l)
-    )
-  )).some(Boolean)) {
-    logger.warning(
-      `Cannot build an ${overlayDatabaseMode} database because build-mode is set to "${buildMode}" instead of "none". Falling back to creating a normal full database instead.`
+  const extractedBundlePath = toolcacheInfo?.path ?? getTempExtractionDir(tempDir);
+  const statusReport = await downloadAndExtract(
+    codeqlURL,
+    compressionMethod,
+    extractedBundlePath,
+    authorization,
+    { "User-Agent": "CodeQL Action", ...headers },
+    tarVersion,
+    logger
+  );
+  if (!toolcacheInfo) {
+    logger.debug(
+      `Could not cache CodeQL tools because we could not determine the bundle version from the URL ${codeqlURL}.`
     );
-    return new Failure("incompatible-build-mode" /* IncompatibleBuildMode */);
+    return {
+      codeqlFolder: extractedBundlePath,
+      statusReport,
+      toolsVersion: maybeCliVersion ?? "unknown"
+    };
   }
-  if (!await codeQlVersionAtLeast(codeql, CODEQL_OVERLAY_MINIMUM_VERSION)) {
-    logger.warning(
-      `Cannot build an ${overlayDatabaseMode} database because the CodeQL CLI is older than ${CODEQL_OVERLAY_MINIMUM_VERSION}. Falling back to creating a normal full database instead.`
+  writeToolcacheMarkerFile(toolcacheInfo.path, logger);
+  return {
+    codeqlFolder: extractedBundlePath,
+    statusReport,
+    toolsVersion: maybeCliVersion ?? toolcacheInfo.version
+  };
+};
+function getToolcacheDestinationInfo(maybeBundleVersion, maybeCliVersion, logger) {
+  if (maybeBundleVersion) {
+    const version = getCanonicalToolcacheVersion(
+      maybeCliVersion,
+      maybeBundleVersion,
+      logger
     );
-    return new Failure("incompatible-codeql" /* IncompatibleCodeQl */);
+    return {
+      path: getToolcacheDirectory(version),
+      version
+    };
   }
-  const gitRoot = await getGitRoot(sourceRoot);
-  if (gitRoot === void 0) {
-    logger.warning(
-      `Cannot build an ${overlayDatabaseMode} database because the source root "${sourceRoot}" is not inside a git repository. Falling back to creating a normal full database instead.`
+  return void 0;
+}
+function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
+  if (!cliVersion2?.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
+    return convertToSemVer(bundleVersion2, logger);
+  }
+  return cliVersion2;
+}
+async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
+  if (!await isBinaryAccessible("tar", logger)) {
+    throw new ConfigurationError(
+      "Could not find tar in PATH, so unable to extract CodeQL bundle."
     );
-    return new Failure("no-git-root" /* NoGitRoot */);
   }
-  if (hasSubmodules(gitRoot)) {
-    if (gitVersion === void 0) {
-      logger.warning(
-        `Cannot build an ${overlayDatabaseMode} database because the repository has submodules and the Git version could not be determined. Falling back to creating a normal full database instead.`
+  const zstdAvailability = await isZstdAvailable(logger);
+  const source = await getCodeQLSource(
+    toolsInput,
+    defaultCliVersion,
+    rawLanguages,
+    useOverlayAwareDefaultCliVersion,
+    apiDetails,
+    variant,
+    zstdAvailability.available,
+    features,
+    logger
+  );
+  let codeqlFolder;
+  let toolsVersion = source.toolsVersion;
+  let toolsDownloadStatusReport;
+  let toolsSource;
+  switch (source.sourceType) {
+    case "local": {
+      codeqlFolder = await extract(
+        source.codeqlTarPath,
+        getTempExtractionDir(tempDir),
+        source.compressionMethod,
+        zstdAvailability.version,
+        logger
       );
-      return new Failure("incompatible-git" /* IncompatibleGit */);
+      toolsSource = "LOCAL" /* Local */;
+      break;
     }
-    if (!gitVersion.isAtLeast(GIT_MINIMUM_VERSION_FOR_OVERLAY_WITH_SUBMODULES)) {
-      logger.warning(
-        `Cannot build an ${overlayDatabaseMode} database because the repository has submodules and the installed Git version is older than ${GIT_MINIMUM_VERSION_FOR_OVERLAY_WITH_SUBMODULES}. Falling back to creating a normal full database instead.`
+    case "toolcache":
+      codeqlFolder = source.codeqlFolder;
+      logger.debug(`CodeQL found in cache ${codeqlFolder}`);
+      toolsSource = "TOOLCACHE" /* Toolcache */;
+      break;
+    case "download": {
+      const result = await downloadCodeQL(
+        source.codeqlURL,
+        source.compressionMethod,
+        source.bundleVersion,
+        source.cliVersion,
+        apiDetails,
+        zstdAvailability.version,
+        tempDir,
+        logger
       );
-      return new Failure("incompatible-git" /* IncompatibleGit */);
+      toolsVersion = result.toolsVersion;
+      codeqlFolder = result.codeqlFolder;
+      toolsDownloadStatusReport = result.statusReport;
+      toolsSource = "DOWNLOAD" /* Download */;
+      break;
     }
+    default:
+      assertNever(source);
   }
-  return new Success({
-    overlayDatabaseMode,
-    useOverlayDatabaseCaching,
-    overlayModeSetExplicitly
-  });
+  return {
+    codeqlFolder,
+    toolsDownloadStatusReport,
+    toolsSource,
+    toolsVersion
+  };
 }
-async function isTrapCachingEnabled(features, overlayDatabaseMode) {
-  const trapCaching = getOptionalInput("trap-caching");
-  if (trapCaching !== void 0) return trapCaching === "true";
-  if (!isHostedRunner()) return false;
-  if (overlayDatabaseMode !== "none" /* None */ && await features.getValue("overlay_analysis_disable_trap_caching" /* OverlayAnalysisDisableTrapCaching */)) {
-    return false;
-  }
-  return true;
+async function useZstdBundle(cliVersion2, tarSupportsZstd) {
+  return (
+    // In testing, gzip performs better than zstd on Windows.
+    process.platform !== "win32" && tarSupportsZstd && semver9.gte(cliVersion2, CODEQL_VERSION_ZSTD_BUNDLE)
+  );
 }
-async function setCppTrapCachingEnvironmentVariables(config, logger) {
-  if (config.languages.includes("cpp" /* cpp */)) {
-    const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
-    if (process.env[envVar]) {
-      logger.info(
-        `Environment variable ${envVar} already set, leaving it unchanged.`
-      );
-    } else if (config.trapCaches["cpp" /* cpp */]) {
-      logger.info("Enabling TRAP caching for C/C++.");
-      core9.exportVariable(envVar, "true");
-    } else {
-      logger.debug(`Disabling TRAP caching for C/C++.`);
-      core9.exportVariable(envVar, "false");
+function getTempExtractionDir(tempDir) {
+  return path12.join(tempDir, v4_default());
+}
+async function getNightlyToolsUrl(logger) {
+  const zstdAvailability = await isZstdAvailable(logger);
+  const compressionMethod = await useZstdBundle(
+    CODEQL_VERSION_ZSTD_BUNDLE,
+    zstdAvailability.available
+  ) ? "zstd" : "gzip";
+  try {
+    const release2 = await getApiClient().rest.repos.listReleases({
+      owner: CODEQL_NIGHTLIES_REPOSITORY_OWNER,
+      repo: CODEQL_NIGHTLIES_REPOSITORY_NAME,
+      per_page: 1,
+      page: 1,
+      prerelease: true
+    });
+    const latestRelease = release2.data[0];
+    if (!latestRelease) {
+      throw new Error("Could not find the latest nightly release.");
     }
+    return `https://github.com/${CODEQL_NIGHTLIES_REPOSITORY_OWNER}/${CODEQL_NIGHTLIES_REPOSITORY_NAME}/releases/download/${latestRelease.tag_name}/${getCodeQLBundleName(compressionMethod)}`;
+  } catch (e) {
+    throw new Error(
+      `Failed to retrieve the latest nightly release: ${wrapError(e)}`
+    );
   }
 }
-function dbLocationOrDefault(dbLocation, tempDir) {
-  return dbLocation || path10.resolve(tempDir, "codeql_databases");
-}
-function userConfigFromActionPath(tempDir) {
-  return path10.resolve(tempDir, "user-config-from-action.yml");
-}
-function hasQueryCustomisation(userConfig) {
-  return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]);
-}
-async function applyIncrementalAnalysisSettings(config, hasDiffRanges, codeql, logger) {
-  if (config.overlayDatabaseMode === "overlay" /* Overlay */ && !hasDiffRanges && !config.overlayModeSetExplicitly) {
+function getLatestToolcacheVersion(logger) {
+  const allVersions = toolcache3.findAllVersions("CodeQL").sort((a, b) => semver9.compare(b, a));
+  logger.debug(
+    `Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(
+      allVersions
+    )}.`
+  );
+  if (allVersions.length > 0) {
+    const latestToolcacheVersion = allVersions[0];
     logger.info(
-      `Reverting overlay database mode to ${"none" /* None */} because the PR diff ranges could not be computed.`
-    );
-    config.overlayDatabaseMode = "none" /* None */;
-    config.useOverlayDatabaseCaching = false;
-    await addOverlayDisablementDiagnostics(
-      config,
-      codeql,
-      "diff-informed-analysis-not-enabled" /* DiffInformedAnalysisNotEnabled */
+      `CLI version ${latestToolcacheVersion} is the latest version in the toolcache.`
     );
+    return latestToolcacheVersion;
   }
-  if (hasDiffRanges) {
-    config.extraQueryExclusions.push({
-      exclude: { tags: "exclude-from-incremental" }
-    });
-  }
+  return void 0;
 }
-async function initConfig(features, inputs) {
-  const { logger, tempDir } = inputs;
-  if (inputs.configInput) {
-    if (inputs.configFile) {
-      logger.warning(
-        `Both a config file and config input were provided. Ignoring config file.`
-      );
-    }
-    inputs.configFile = userConfigFromActionPath(tempDir);
-    fs9.writeFileSync(inputs.configFile, inputs.configInput);
-    logger.debug(`Using config from action input: ${inputs.configFile}`);
+function isReservedToolsValue(tools) {
+  return CODEQL_BUNDLE_VERSION_ALIAS.includes(tools) || CODEQL_NIGHTLY_TOOLS_INPUTS.includes(tools) || tools === CODEQL_TOOLCACHE_INPUT;
+}
+
+// src/tracer-config.ts
+var fs14 = __toESM(require("fs"));
+var path13 = __toESM(require("path"));
+async function shouldEnableIndirectTracing(codeql, config) {
+  if (config.buildMode === "none" /* None */) {
+    return false;
   }
-  let userConfig = {};
-  if (!inputs.configFile) {
-    logger.debug("No configuration file was provided");
-  } else {
-    logger.debug(`Using configuration file: ${inputs.configFile}`);
-    const validateConfig = await features.getValue("validate_db_config" /* ValidateDbConfig */);
-    userConfig = await loadUserConfig(
-      logger,
-      inputs.configFile,
-      inputs.workspacePath,
-      inputs.apiDetails,
-      tempDir,
-      validateConfig
-    );
+  if (config.buildMode === "autobuild" /* Autobuild */) {
+    return false;
   }
-  const config = await initActionState(inputs, userConfig);
-  if (config.analysisKinds.length === 1 && isCodeQualityEnabled(config)) {
-    if (hasQueryCustomisation(config.computedConfig)) {
-      throw new ConfigurationError(
-        "Query customizations are unsupported, because only `code-quality` analysis is enabled."
-      );
-    }
-    const queries = codeQualityQueries.map((v) => ({ uses: v }));
-    config.computedConfig["disable-default-queries"] = true;
-    config.computedConfig.queries = queries;
-    config.computedConfig["query-filters"] = [];
+  return asyncSome(config.languages, (l) => codeql.isTracedLanguage(l));
+}
+async function endTracingForCluster(codeql, config, logger) {
+  if (!await shouldEnableIndirectTracing(codeql, config)) return;
+  logger.info(
+    "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced."
+  );
+  const envVariablesFile = path13.resolve(
+    config.dbLocation,
+    "temp/tracingEnvironment/end-tracing.json"
+  );
+  if (!fs14.existsSync(envVariablesFile)) {
+    throw new Error(
+      `Environment file for ending tracing not found: ${envVariablesFile}`
+    );
   }
-  let gitVersion = void 0;
   try {
-    gitVersion = await getGitVersionOrThrow();
-    logger.info(`Using Git version ${gitVersion.fullVersion}`);
-    await logGitVersionTelemetry(config, gitVersion);
-  } catch (e) {
-    logger.warning(`Could not determine Git version: ${getErrorMessage(e)}`);
-    if (isInTestMode() && process.env["CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION" /* TOLERATE_MISSING_GIT_VERSION */] !== "true") {
-      throw e;
-    }
-  }
-  if (await features.getValue("ignore_generated_files" /* IgnoreGeneratedFiles */) && isDynamicWorkflow()) {
-    try {
-      const generatedFilesCheckStartedAt = import_perf_hooks.performance.now();
-      const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
-      const generatedFilesDuration = Math.round(
-        import_perf_hooks.performance.now() - generatedFilesCheckStartedAt
-      );
-      if (generatedFiles.length > 0) {
-        config.computedConfig["paths-ignore"] ??= [];
-        config.computedConfig["paths-ignore"].push(...generatedFiles);
-        logger.info(
-          `Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${joinAtMost(generatedFiles, ", ", 10)}`
-        );
+    const endTracingEnvVariables = JSON.parse(
+      fs14.readFileSync(envVariablesFile, "utf8")
+    );
+    for (const [key, value] of Object.entries(endTracingEnvVariables)) {
+      if (value !== null) {
+        process.env[key] = value;
       } else {
-        logger.info(`Found no generated files.`);
+        delete process.env[key];
       }
-      await logGeneratedFilesTelemetry(
-        config,
-        generatedFilesDuration,
-        generatedFiles.length
-      );
-    } catch (error3) {
-      logger.info(`Cannot ignore generated files: ${getErrorMessage(error3)}`);
     }
-  } else {
-    logger.debug(`Skipping check for generated files.`);
-  }
-  const overlayDatabaseModeResult = await checkOverlayEnablement(
-    inputs.codeql,
-    inputs.features,
-    config.languages,
-    inputs.sourceRoot,
-    config.buildMode,
-    inputs.ramInput,
-    config.computedConfig,
-    config.repositoryProperties,
-    gitVersion,
-    logger
-  );
-  if (overlayDatabaseModeResult.isSuccess()) {
-    const {
-      overlayDatabaseMode,
-      useOverlayDatabaseCaching,
-      overlayModeSetExplicitly
-    } = overlayDatabaseModeResult.value;
-    logger.info(
-      `Using overlay database mode: ${overlayDatabaseMode} ${useOverlayDatabaseCaching ? "with" : "without"} caching.`
-    );
-    config.overlayDatabaseMode = overlayDatabaseMode;
-    config.useOverlayDatabaseCaching = useOverlayDatabaseCaching;
-    config.overlayModeSetExplicitly = overlayModeSetExplicitly;
-  } else {
-    const overlayDisabledReason = overlayDatabaseModeResult.value;
-    logger.info(
-      `Using overlay database mode: ${"none" /* None */} without caching.`
-    );
-    config.overlayDatabaseMode = "none" /* None */;
-    config.useOverlayDatabaseCaching = false;
-    await addOverlayDisablementDiagnostics(
-      config,
-      inputs.codeql,
-      overlayDisabledReason
+  } catch (e) {
+    throw new Error(
+      `Failed to parse file containing end tracing environment variables: ${e}`
     );
   }
-  const hasDiffRanges = await prepareDiffInformedAnalysis(
-    inputs.codeql,
-    inputs.features,
-    logger
-  );
-  await applyIncrementalAnalysisSettings(
-    config,
-    hasDiffRanges,
-    inputs.codeql,
-    logger
+}
+async function getTracerConfigForCluster(config) {
+  const tracingEnvVariables = JSON.parse(
+    fs14.readFileSync(
+      path13.resolve(
+        config.dbLocation,
+        "temp/tracingEnvironment/start-tracing.json"
+      ),
+      "utf8"
+    )
   );
-  if (await isTrapCachingEnabled(features, config.overlayDatabaseMode)) {
-    const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(
-      inputs.codeql,
-      config.languages,
-      logger
-    );
-    config.trapCaches = trapCaches;
-    config.trapCacheDownloadTime = trapCacheDownloadTime;
+  return {
+    env: tracingEnvVariables
+  };
+}
+async function getCombinedTracerConfig(codeql, config) {
+  if (!await shouldEnableIndirectTracing(codeql, config)) {
+    return void 0;
   }
-  await setCppTrapCachingEnvironmentVariables(config, logger);
-  return config;
+  return await getTracerConfigForCluster(config);
 }
-function parseRegistries(registriesInput) {
+
+// src/codeql.ts
+var cachedCodeQL = void 0;
+var CODEQL_MINIMUM_VERSION = "2.19.4";
+var CODEQL_NEXT_MINIMUM_VERSION = "2.20.7";
+var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.16";
+var GHES_MOST_RECENT_DEPRECATION_DATE = "2026-07-01";
+var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
+async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger, checkVersion) {
   try {
-    return registriesInput ? load(registriesInput) : void 0;
-  } catch {
-    throw new ConfigurationError(
-      "Invalid registries input. Must be a YAML string."
+    const {
+      codeqlFolder,
+      toolsDownloadStatusReport,
+      toolsSource,
+      toolsVersion
+    } = await setupCodeQLBundle(
+      toolsInput,
+      apiDetails,
+      tempDir,
+      variant,
+      defaultCliVersion,
+      rawLanguages,
+      useOverlayAwareDefaultCliVersion,
+      features,
+      logger
     );
-  }
-}
-function parseRegistriesWithoutCredentials(registriesInput) {
-  return parseRegistries(registriesInput)?.map((r) => {
-    const { url: url2, packages, kind } = r;
-    return { url: url2, packages, kind };
-  });
-}
-function isLocal(configPath) {
-  if (configPath.indexOf("./") === 0) {
-    return true;
-  }
-  return configPath.indexOf("@") === -1;
-}
-function getLocalConfig(logger, configFile, validateConfig) {
-  if (!fs9.existsSync(configFile)) {
-    throw new ConfigurationError(
-      getConfigFileDoesNotExistErrorMessage(configFile)
+    let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql");
+    if (process.platform === "win32") {
+      codeqlCmd += ".exe";
+    } else if (process.platform !== "linux" && process.platform !== "darwin") {
+      throw new ConfigurationError(
+        `Unsupported platform: ${process.platform}`
+      );
+    }
+    cachedCodeQL = await getCodeQLForCmd(logger, codeqlCmd, checkVersion);
+    return {
+      codeql: cachedCodeQL,
+      toolsDownloadStatusReport,
+      toolsSource,
+      toolsVersion
+    };
+  } catch (rawError) {
+    const e = wrapApiConfigurationError(rawError);
+    const ErrorClass = e instanceof ConfigurationError || e instanceof Error && e.message.includes("ENOSPC") ? ConfigurationError : Error;
+    throw new ErrorClass(
+      `Unable to download and extract CodeQL CLI: ${getErrorMessage(e)}${e instanceof Error && e.stack ? `
+
+Details: ${e.stack}` : ""}`
     );
   }
-  return parseUserConfig(
-    logger,
-    configFile,
-    fs9.readFileSync(configFile, "utf-8"),
-    validateConfig
-  );
 }
-async function getRemoteConfig(logger, configFile, apiDetails, validateConfig) {
-  const format = new RegExp(
-    "(?[^/]+)/(?[^/]+)/(?[^@]+)@(?.*)"
-  );
-  const pieces = format.exec(configFile);
-  if (pieces?.groups === void 0 || pieces.length < 5) {
-    throw new ConfigurationError(
-      getConfigFileRepoFormatInvalidMessage(configFile)
-    );
+async function getCodeQL(logger, cmd) {
+  if (cachedCodeQL === void 0) {
+    cachedCodeQL = await getCodeQLForCmd(logger, cmd, true);
   }
-  const response = await getApiClientWithExternalAuth(apiDetails).rest.repos.getContent({
-    owner: pieces.groups.owner,
-    repo: pieces.groups.repo,
-    path: pieces.groups.path,
-    ref: pieces.groups.ref
-  });
-  let fileContents;
-  if ("content" in response.data && response.data.content !== void 0) {
-    fileContents = response.data.content;
-  } else if (Array.isArray(response.data)) {
+  return cachedCodeQL;
+}
+async function getCodeQLForCmd(logger, cmd, checkVersion) {
+  const codeql = {
+    getPath() {
+      return cmd;
+    },
+    async getVersion() {
+      let result = getCachedCodeQlVersion(cmd);
+      if (result === void 0) {
+        result = await runCliJson(
+          cmd,
+          ["version", "--format=json"],
+          {
+            noStreamStdout: true
+          }
+        );
+        cacheCodeQlVersion(cmd, result);
+      }
+      return result;
+    },
+    async printVersion() {
+      core12.info(JSON.stringify(await this.getVersion(), null, 2));
+    },
+    async supportsFeature(feature) {
+      return isSupportedToolsFeature(await this.getVersion(), feature);
+    },
+    async isTracedLanguage(language) {
+      const extractorPath = await this.resolveExtractor(language);
+      const tracingConfigPath = path14.join(
+        extractorPath,
+        "tools",
+        "tracing-config.lua"
+      );
+      return fs15.existsSync(tracingConfigPath);
+    },
+    async isScannedLanguage(language) {
+      return !await this.isTracedLanguage(language);
+    },
+    async databaseInitCluster(config, sourceRoot, processName, qlconfigFile) {
+      const extraArgs = config.languages.map(
+        (language) => `--language=${language}`
+      );
+      if (await shouldEnableIndirectTracing(codeql, config)) {
+        extraArgs.push("--begin-tracing");
+        extraArgs.push(...await getTrapCachingExtractorConfigArgs(config));
+        extraArgs.push(`--trace-process-name=${processName}`);
+      }
+      const codeScanningConfigFile = await writeCodeScanningConfigFile(
+        config,
+        logger
+      );
+      const externalRepositoryToken = getOptionalInput(
+        "external-repository-token"
+      );
+      extraArgs.push(`--codescanning-config=${codeScanningConfigFile}`);
+      if (externalRepositoryToken) {
+        extraArgs.push("--external-repository-token-stdin");
+      }
+      if (config.buildMode !== void 0) {
+        extraArgs.push(`--build-mode=${config.buildMode}`);
+      }
+      if (qlconfigFile !== void 0) {
+        extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
+      }
+      const overlayDatabaseMode = config.overlayDatabaseMode;
+      if (overlayDatabaseMode === "overlay" /* Overlay */) {
+        const overlayChangesFile = await writeOverlayChangesFile(
+          config,
+          sourceRoot,
+          logger
+        );
+        extraArgs.push(`--overlay-changes=${overlayChangesFile}`);
+      } else if (overlayDatabaseMode === "overlay-base" /* OverlayBase */) {
+        extraArgs.push("--overlay-base");
+      }
+      const baselineFilesOptions = config.enableFileCoverageInformation ? [
+        "--calculate-language-specific-baseline",
+        "--sublanguage-file-coverage"
+      ] : ["--no-calculate-baseline"];
+      await runCli(
+        cmd,
+        [
+          "database",
+          "init",
+          ...overlayDatabaseMode === "overlay" /* Overlay */ ? [] : ["--force-overwrite"],
+          "--db-cluster",
+          config.dbLocation,
+          `--source-root=${sourceRoot}`,
+          ...baselineFilesOptions,
+          "--extractor-include-aliases",
+          ...extraArgs,
+          ...getExtraOptionsFromEnv(["database", "init"], {
+            // Some user configs specify `--no-calculate-baseline` as an additional
+            // argument to `codeql database init`. Therefore ignore the baseline file
+            // options here to avoid specifying the same argument twice and erroring.
+            //
+            // Ignore `--overwrite` to avoid passing both `--force-overwrite` and `--overwrite` if
+            // the user has configured `--overwrite`.
+            ignoringOptions: [
+              "--force-overwrite",
+              "--overwrite",
+              ...baselineFilesOptions
+            ]
+          })
+        ],
+        { stdin: externalRepositoryToken }
+      );
+      if (overlayDatabaseMode === "overlay-base" /* OverlayBase */) {
+        await writeBaseDatabaseOidsFile(config, sourceRoot);
+      }
+    },
+    async runAutobuild(config, language) {
+      applyAutobuildAzurePipelinesTimeoutFix();
+      const autobuildCmd = path14.join(
+        await this.resolveExtractor(language),
+        "tools",
+        process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh"
+      );
+      if (config.debugMode) {
+        process.env["CODEQL_VERBOSITY" /* CLI_VERBOSITY */] = process.env["CODEQL_VERBOSITY" /* CLI_VERBOSITY */] || EXTRACTION_DEBUG_MODE_VERBOSITY;
+      }
+      await runCli(autobuildCmd);
+    },
+    async extractScannedLanguage(config, language) {
+      await runCli(cmd, [
+        "database",
+        "trace-command",
+        "--index-traceless-dbs",
+        ...await getTrapCachingExtractorConfigArgsForLang(config, language),
+        ...getExtractionVerbosityArguments(config.debugMode),
+        ...getExtraOptionsFromEnv(["database", "trace-command"]),
+        getCodeQLDatabasePath(config, language)
+      ]);
+    },
+    async extractUsingBuildMode(config, language) {
+      if (config.buildMode === "autobuild" /* Autobuild */) {
+        applyAutobuildAzurePipelinesTimeoutFix();
+      }
+      try {
+        await runCli(cmd, [
+          "database",
+          "trace-command",
+          "--use-build-mode",
+          "--working-dir",
+          process.cwd(),
+          ...await getTrapCachingExtractorConfigArgsForLang(config, language),
+          ...getExtractionVerbosityArguments(config.debugMode),
+          ...getExtraOptionsFromEnv(["database", "trace-command"]),
+          getCodeQLDatabasePath(config, language)
+        ]);
+      } catch (e) {
+        if (config.buildMode === "autobuild" /* Autobuild */) {
+          const prefix = `We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. See ${"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed" /* AUTOMATIC_BUILD_FAILED */} for more information.`;
+          throw new ConfigurationError(`${prefix} ${getErrorMessage(e)}`);
+        } else {
+          throw e;
+        }
+      }
+    },
+    async finalizeDatabase(databasePath, threadsFlag, memoryFlag, enableDebugLogging) {
+      const args = [
+        "database",
+        "finalize",
+        "--finalize-dataset",
+        threadsFlag,
+        memoryFlag,
+        ...getExtractionVerbosityArguments(enableDebugLogging),
+        ...getExtraOptionsFromEnv(["database", "finalize"]),
+        databasePath
+      ];
+      await runCli(cmd, args);
+    },
+    async resolveLanguages({
+      filterToLanguagesWithQueries
+    } = { filterToLanguagesWithQueries: false }) {
+      return runCliJson(cmd, [
+        "resolve",
+        "languages",
+        "--format=betterjson",
+        "--extractor-options-verbosity=4",
+        "--extractor-include-aliases",
+        // TODO: Unconditionally include `--filter-to-languages-with-queries`
+        //       once CODEQL_MINIMUM_VERSION is at least v2.23.0
+        //       — the first version to support this flag.
+        ...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
+        ...getExtraOptionsFromEnv(["resolve", "languages"])
+      ]);
+    },
+    async resolveBuildEnvironment(workingDir, language) {
+      const codeqlArgs = [
+        "resolve",
+        "build-environment",
+        `--language=${language}`,
+        "--extractor-include-aliases",
+        ...getExtraOptionsFromEnv(["resolve", "build-environment"])
+      ];
+      if (workingDir !== void 0) {
+        codeqlArgs.push("--working-dir", workingDir);
+      }
+      return await runCliJson(cmd, codeqlArgs);
+    },
+    async databaseRunQueries(databasePath, flags, queries = []) {
+      const codeqlArgs = [
+        "database",
+        "run-queries",
+        ...flags,
+        databasePath,
+        "--min-disk-free=1024",
+        // Try to leave at least 1GB free
+        "-v",
+        ...queries,
+        ...getExtraOptionsFromEnv(["database", "run-queries"], {
+          ignoringOptions: ["--expect-discarded-cache"]
+        })
+      ];
+      await runCli(cmd, codeqlArgs);
+    },
+    async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, threadsFlag, verbosityFlag, sarifRunPropertyFlag, automationDetailsId, config, features) {
+      const shouldExportDiagnostics = await features.getValue(
+        "export_diagnostics_enabled" /* ExportDiagnosticsEnabled */,
+        this
+      );
+      const codeqlArgs = [
+        "database",
+        "interpret-results",
+        threadsFlag,
+        "--format=sarif-latest",
+        verbosityFlag,
+        `--output=${sarifFile}`,
+        "--print-diagnostics-summary",
+        "--print-metrics-summary",
+        "--sarif-add-baseline-file-info",
+        `--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(
+          config
+        )}`,
+        "--sarif-group-rules-by-pack",
+        "--sarif-include-query-help=always",
+        "--sublanguage-file-coverage",
+        ...await getJobRunUuidSarifOptions(),
+        ...getExtraOptionsFromEnv(["database", "interpret-results"])
+      ];
+      if (sarifRunPropertyFlag !== void 0) {
+        codeqlArgs.push(sarifRunPropertyFlag);
+      }
+      if (automationDetailsId !== void 0) {
+        codeqlArgs.push("--sarif-category", automationDetailsId);
+      }
+      if (shouldExportDiagnostics) {
+        codeqlArgs.push("--sarif-include-diagnostics");
+      } else {
+        codeqlArgs.push("--no-sarif-include-diagnostics");
+      }
+      codeqlArgs.push(databasePath);
+      if (querySuitePaths) {
+        codeqlArgs.push(...querySuitePaths);
+      }
+      return await runCli(cmd, codeqlArgs, {
+        noStreamStdout: true
+      });
+    },
+    async databaseCleanupCluster(config, cleanupLevel) {
+      for (const language of config.languages) {
+        const databasePath = getCodeQLDatabasePath(config, language);
+        const codeqlArgs = [
+          "database",
+          "cleanup",
+          databasePath,
+          `--cache-cleanup=${cleanupLevel}`,
+          ...getExtraOptionsFromEnv(["database", "cleanup"])
+        ];
+        await runCli(cmd, codeqlArgs);
+      }
+    },
+    async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) {
+      const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : [];
+      const args = [
+        "database",
+        "bundle",
+        databasePath,
+        `--output=${outputFilePath}`,
+        `--name=${databaseName}`,
+        ...includeDiagnosticsArgs,
+        ...getExtraOptionsFromEnv(["database", "bundle"], {
+          ignoringOptions: includeDiagnosticsArgs
+        })
+      ];
+      if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) {
+        args.push(
+          ...alsoIncludeRelativePaths.flatMap((relativePath2) => [
+            "--include",
+            relativePath2
+          ])
+        );
+      }
+      await new toolrunner3.ToolRunner(cmd, args).exec();
+    },
+    async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
+      const args = [
+        "database",
+        "export-diagnostics",
+        `${databasePath}`,
+        "--db-cluster",
+        // Database is always a cluster for CodeQL versions that support diagnostics.
+        "--format=sarif-latest",
+        `--output=${sarifFile}`,
+        "--sarif-include-diagnostics",
+        // ExportDiagnosticsEnabled is always true if this command is run.
+        "-vvv",
+        ...getExtraOptionsFromEnv(["diagnostics", "export"])
+      ];
+      if (automationDetailsId !== void 0) {
+        args.push("--sarif-category", automationDetailsId);
+      }
+      await new toolrunner3.ToolRunner(cmd, args).exec();
+    },
+    async diagnosticsExport(sarifFile, automationDetailsId, config) {
+      const args = [
+        "diagnostics",
+        "export",
+        "--format=sarif-latest",
+        `--output=${sarifFile}`,
+        `--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(
+          config
+        )}`,
+        ...getExtraOptionsFromEnv(["diagnostics", "export"])
+      ];
+      if (automationDetailsId !== void 0) {
+        args.push("--sarif-category", automationDetailsId);
+      }
+      await new toolrunner3.ToolRunner(cmd, args).exec();
+    },
+    async resolveExtractor(language) {
+      let extractorPath = "";
+      await new toolrunner3.ToolRunner(
+        cmd,
+        [
+          "resolve",
+          "extractor",
+          "--format=json",
+          `--language=${language}`,
+          "--extractor-include-aliases",
+          ...getExtraOptionsFromEnv(["resolve", "extractor"])
+        ],
+        {
+          silent: true,
+          listeners: {
+            stdout: (data) => {
+              extractorPath += data.toString();
+            },
+            stderr: (data) => {
+              process.stderr.write(data);
+            }
+          }
+        }
+      ).exec();
+      return JSON.parse(extractorPath);
+    },
+    async resolveQueriesStartingPacks(queries) {
+      const codeqlArgs = [
+        "resolve",
+        "queries",
+        "--format=startingpacks",
+        ...getExtraOptionsFromEnv(["resolve", "queries"]),
+        ...queries
+      ];
+      return await runCliJson(cmd, codeqlArgs, {
+        noStreamStdout: true
+      });
+    },
+    async resolveDatabase(databasePath) {
+      const codeqlArgs = [
+        "resolve",
+        "database",
+        databasePath,
+        "--format=json",
+        ...getExtraOptionsFromEnv(["resolve", "database"])
+      ];
+      return await runCliJson(cmd, codeqlArgs, {
+        noStreamStdout: true
+      });
+    },
+    async mergeResults(sarifFiles, outputFile, {
+      mergeRunsFromEqualCategory = false
+    }) {
+      const args = [
+        "github",
+        "merge-results",
+        "--output",
+        outputFile,
+        ...getExtraOptionsFromEnv(["github", "merge-results"])
+      ];
+      for (const sarifFile of sarifFiles) {
+        args.push("--sarif", sarifFile);
+      }
+      if (mergeRunsFromEqualCategory) {
+        args.push("--sarif-merge-runs-from-equal-category");
+      }
+      await runCli(cmd, args);
+    }
+  };
+  if (checkVersion && !await codeQlVersionAtLeast(codeql, CODEQL_MINIMUM_VERSION)) {
     throw new ConfigurationError(
-      getConfigFileDirectoryGivenMessage(configFile)
+      `Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${(await codeql.getVersion()).version}`
     );
-  } else {
-    throw new ConfigurationError(
-      getConfigFileFormatInvalidMessage(configFile)
+  } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) {
+    const result = await codeql.getVersion();
+    core12.warning(
+      `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
+
+Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.`
     );
+    core12.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true");
   }
-  return parseUserConfig(
-    logger,
-    configFile,
-    Buffer.from(fileContents, "base64").toString("binary"),
-    validateConfig
-  );
-}
-function getPathToParsedConfigFile(tempDir) {
-  return path10.join(tempDir, "config");
-}
-async function saveConfig(config, logger) {
-  const configString = JSON.stringify(config);
-  const configFile = getPathToParsedConfigFile(config.tempDir);
-  fs9.mkdirSync(path10.dirname(configFile), { recursive: true });
-  fs9.writeFileSync(configFile, configString, "utf8");
-  logger.debug("Saved config:");
-  logger.debug(configString);
+  return codeql;
 }
-async function getConfig(tempDir, logger) {
-  const configFile = getPathToParsedConfigFile(tempDir);
-  if (!fs9.existsSync(configFile)) {
-    return void 0;
-  }
-  const configString = fs9.readFileSync(configFile, "utf8");
-  logger.debug("Loaded config:");
-  logger.debug(configString);
-  const config = JSON.parse(configString);
-  if (config.version === void 0) {
-    throw new ConfigurationError(
-      `Loaded configuration file, but it does not contain the expected 'version' field.`
-    );
-  }
-  if (config.version !== getActionVersion()) {
-    throw new ConfigurationError(
-      `Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
-    );
-  }
-  return config;
+function getExtraOptionsFromEnv(paths, { ignoringOptions } = {}) {
+  const options = getExtraOptionsEnvParam();
+  return getExtraOptions(options, paths, []).filter(
+    (option) => !ignoringOptions?.includes(option)
+  );
 }
-async function generateRegistries(registriesInput, tempDir, logger) {
-  const registries = parseRegistries(registriesInput);
-  let registriesAuthTokens;
-  let qlconfigFile;
-  if (registries) {
-    const qlconfig = createRegistriesBlock(registries);
-    qlconfigFile = path10.join(tempDir, "qlconfig.yml");
-    const qlconfigContents = dump(qlconfig);
-    fs9.writeFileSync(qlconfigFile, qlconfigContents, "utf8");
-    logger.debug("Generated qlconfig.yml:");
-    logger.debug(qlconfigContents);
-    registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(",");
+function asExtraOptions(options, pathInfo) {
+  if (options === void 0) {
+    return [];
   }
-  if (typeof process.env.CODEQL_REGISTRIES_AUTH === "string") {
-    logger.debug(
-      "Using CODEQL_REGISTRIES_AUTH environment variable to authenticate with registries."
-    );
+  if (!Array.isArray(options)) {
+    const msg = `The extra options for '${pathInfo.join(
+      "."
+    )}' ('${JSON.stringify(options)}') are not in an array.`;
+    throw new Error(msg);
   }
-  return {
-    registriesAuthTokens: (
-      // if the user has explicitly set the CODEQL_REGISTRIES_AUTH env var then use that
-      process.env.CODEQL_REGISTRIES_AUTH ?? registriesAuthTokens
-    ),
-    qlconfigFile
-  };
+  return options.map((o) => {
+    const t = typeof o;
+    if (t !== "string" && t !== "number" && t !== "boolean") {
+      const msg = `The extra option for '${pathInfo.join(
+        "."
+      )}' ('${JSON.stringify(o)}') is not a primitive value.`;
+      throw new Error(msg);
+    }
+    return `${o}`;
+  });
 }
-function createRegistriesBlock(registries) {
-  if (!Array.isArray(registries) || registries.some((r) => !r.url || !r.packages)) {
-    throw new ConfigurationError(
-      "Invalid 'registries' input. Must be an array of objects with 'url' and 'packages' properties."
-    );
-  }
-  const safeRegistries = registries.map((registry) => ({
-    // ensure the url ends with a slash to avoid a bug in the CLI 2.10.4
-    url: !registry?.url.endsWith("/") ? `${registry.url}/` : registry.url,
-    packages: registry.packages,
-    kind: registry.kind
-  }));
-  const qlconfig = {
-    registries: safeRegistries
-  };
-  return qlconfig;
+function getExtraOptions(options, paths, pathInfo) {
+  const all = asExtraOptions(options?.["*"], pathInfo.concat("*"));
+  const specific = paths.length === 0 ? asExtraOptions(options, pathInfo) : getExtraOptions(
+    options?.[paths[0]],
+    paths?.slice(1),
+    pathInfo.concat(paths[0])
+  );
+  return all.concat(specific);
 }
-async function wrapEnvironment(env, operation) {
-  const oldEnv = { ...process.env };
-  for (const [key, value] of Object.entries(env)) {
-    if (value !== void 0) {
-      process.env[key] = value;
-    }
-  }
+async function runCli(cmd, args = [], opts = {}) {
   try {
-    await operation();
-  } finally {
-    for (const [key, value] of Object.entries(oldEnv)) {
-      process.env[key] = value;
+    return await runTool(cmd, args, opts);
+  } catch (e) {
+    if (e instanceof CommandInvocationError) {
+      throw wrapCliConfigurationError(new CliError(e));
     }
+    throw e;
   }
 }
-async function parseBuildModeInput(input, languages, features, logger) {
-  if (input === void 0) {
-    return void 0;
-  }
-  if (!Object.values(BuildMode).includes(input)) {
-    throw new ConfigurationError(
-      `Invalid build mode: '${input}'. Supported build modes are: ${Object.values(
-        BuildMode
-      ).join(", ")}.`
-    );
-  }
-  if (languages.includes("csharp" /* csharp */) && await features.getValue("disable_csharp_buildless" /* DisableCsharpBuildless */)) {
-    logger.warning(
-      "Scanning C# code without a build is temporarily unavailable. Falling back to 'autobuild' build mode."
-    );
-    return "autobuild" /* Autobuild */;
-  }
-  if (languages.includes("java" /* java */) && await features.getValue("disable_java_buildless_enabled" /* DisableJavaBuildlessEnabled */)) {
-    logger.warning(
-      "Scanning Java code without a build is temporarily unavailable. Falling back to 'autobuild' build mode."
+async function runCliJson(cmd, args = [], opts = {}) {
+  const output = await runCli(cmd, args, opts);
+  try {
+    return JSON.parse(output);
+  } catch (e) {
+    throw Error(
+      `Unexpected output from codeql ${args.join(" ")}: ${getErrorMessage(e)}`
     );
-    return "autobuild" /* Autobuild */;
-  }
-  return input;
-}
-function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
-  const augmentedConfig = cloneObject(cliConfig);
-  if (extraQueryExclusions.length === 0) {
-    return augmentedConfig;
-  }
-  augmentedConfig["query-filters"] = [
-    // Ordering matters. If the first filter is an inclusion, it implicitly
-    // excludes all queries that are not included. If it is an exclusion,
-    // it implicitly includes all queries that are not excluded. So user
-    // filters (if any) should always be first to preserve intent.
-    ...augmentedConfig["query-filters"] || [],
-    ...extraQueryExclusions
-  ];
-  if (augmentedConfig["query-filters"]?.length === 0) {
-    delete augmentedConfig["query-filters"];
-  }
-  return augmentedConfig;
-}
-function isCodeScanningEnabled(config) {
-  return config.analysisKinds.includes("code-scanning" /* CodeScanning */);
-}
-function isCodeQualityEnabled(config) {
-  return config.analysisKinds.includes("code-quality" /* CodeQuality */);
-}
-function isRiskAssessmentEnabled(config) {
-  return config.analysisKinds.includes("risk-assessment" /* RiskAssessment */);
-}
-function getPrimaryAnalysisKind(config) {
-  if (config.analysisKinds.length === 1) {
-    return config.analysisKinds[0];
   }
-  return isCodeScanningEnabled(config) ? "code-scanning" /* CodeScanning */ : "code-quality" /* CodeQuality */;
 }
-function getPrimaryAnalysisConfig(config) {
-  return getAnalysisConfig(getPrimaryAnalysisKind(config));
+async function writeCodeScanningConfigFile(config, logger) {
+  const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
+  const augmentedConfig = appendExtraQueryExclusions(
+    config.extraQueryExclusions,
+    config.computedConfig
+  );
+  logger.info(
+    `Writing augmented user configuration file to ${codeScanningConfigFile}`
+  );
+  logger.startGroup("Augmented user configuration file contents");
+  logger.info(dump(augmentedConfig));
+  logger.endGroup();
+  fs15.writeFileSync(codeScanningConfigFile, dump(augmentedConfig));
+  return codeScanningConfigFile;
 }
-async function logGitVersionTelemetry(config, gitVersion) {
-  if (config.languages.length > 0) {
-    addNoLanguageDiagnostic(
-      config,
-      makeTelemetryDiagnostic(
-        "codeql-action/git-version-telemetry",
-        "Git version telemetry",
-        {
-          fullVersion: gitVersion.fullVersion,
-          truncatedVersion: gitVersion.truncatedVersion
-        }
-      )
+var TRAP_CACHE_SIZE_MB = 1024;
+async function getTrapCachingExtractorConfigArgs(config) {
+  const result = [];
+  for (const language of config.languages)
+    result.push(
+      await getTrapCachingExtractorConfigArgsForLang(config, language)
     );
-  }
-}
-async function logGeneratedFilesTelemetry(config, duration, generatedFilesCount) {
-  if (config.languages.length < 1) {
-    return;
-  }
-  addNoLanguageDiagnostic(
-    config,
-    makeTelemetryDiagnostic(
-      "codeql-action/generated-files-telemetry",
-      "Generated files telemetry",
-      {
-        duration,
-        generatedFilesCount
-      }
-    )
-  );
+  return result.flat();
 }
-
-// src/setup-codeql.ts
-var fs13 = __toESM(require("fs"));
-var path12 = __toESM(require("path"));
-var toolcache3 = __toESM(require_tool_cache());
-var import_fast_deep_equal = __toESM(require_fast_deep_equal());
-var semver9 = __toESM(require_semver2());
-
-// node_modules/uuid/dist-node/stringify.js
-var byteToHex = [];
-for (let i = 0; i < 256; ++i) {
-  byteToHex.push((i + 256).toString(16).slice(1));
+async function getTrapCachingExtractorConfigArgsForLang(config, language) {
+  const cacheDir2 = config.trapCaches[language];
+  if (cacheDir2 === void 0) return [];
+  const write = await isAnalyzingDefaultBranch();
+  return [
+    `-O=${language}.trap.cache.dir=${cacheDir2}`,
+    `-O=${language}.trap.cache.bound=${TRAP_CACHE_SIZE_MB}`,
+    `-O=${language}.trap.cache.write=${write}`
+  ];
 }
-function unsafeStringify(arr, offset = 0) {
-  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
+function getGeneratedCodeScanningConfigPath(config) {
+  return path14.resolve(config.tempDir, "user-config.yaml");
 }
-
-// node_modules/uuid/dist-node/rng.js
-var rnds8 = new Uint8Array(16);
-function rng() {
-  return crypto.getRandomValues(rnds8);
+function getExtractionVerbosityArguments(enableDebugLogging) {
+  return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : [];
 }
-
-// node_modules/uuid/dist-node/v4.js
-function v4(options, buf, offset) {
-  if (!buf && !options && crypto.randomUUID) {
-    return crypto.randomUUID();
-  }
-  return _v4(options, buf, offset);
+function applyAutobuildAzurePipelinesTimeoutFix() {
+  const javaToolOptions = process.env["JAVA_TOOL_OPTIONS"] || "";
+  process.env["JAVA_TOOL_OPTIONS"] = [
+    ...javaToolOptions.split(/\s+/),
+    "-Dhttp.keepAlive=false",
+    "-Dmaven.wagon.http.pool=false"
+  ].join(" ");
 }
-function _v4(options, buf, offset) {
-  options = options || {};
-  const rnds = options.random ?? options.rng?.() ?? rng();
-  if (rnds.length < 16) {
-    throw new Error("Random bytes length must be >= 16");
-  }
-  rnds[6] = rnds[6] & 15 | 64;
-  rnds[8] = rnds[8] & 63 | 128;
-  if (buf) {
-    offset = offset || 0;
-    if (offset < 0 || offset + 16 > buf.length) {
-      throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
-    }
-    for (let i = 0; i < 16; ++i) {
-      buf[offset + i] = rnds[i];
-    }
-    return buf;
-  }
-  return unsafeStringify(rnds);
+async function getJobRunUuidSarifOptions() {
+  const jobRunUuid = process.env["CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */];
+  return jobRunUuid ? [`--sarif-run-property=jobRunUuid=${jobRunUuid}`] : [];
 }
-var v4_default = v4;
 
-// src/overlay/caching.ts
-var fs10 = __toESM(require("fs"));
-var actionsCache3 = __toESM(require_cache4());
-var semver6 = __toESM(require_semver2());
-var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500;
-var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
-var CACHE_VERSION2 = 1;
-var CACHE_PREFIX = "codeql-overlay-base-database";
-var MAX_CACHE_OPERATION_MS3 = 6e5;
-async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
-  const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
-  if (!fs10.existsSync(baseDatabaseOidsFilePath)) {
-    logger.warning(
-      `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist`
-    );
-    return false;
-  }
-  for (const language of config.languages) {
-    const dbPath = getCodeQLDatabasePath(config, language);
-    try {
-      const resolveDatabaseOutput = await codeql.resolveDatabase(dbPath);
-      if (resolveDatabaseOutput === void 0 || !("overlayBaseSpecifier" in resolveDatabaseOutput)) {
-        logger.info(`${warningPrefix}: no overlayBaseSpecifier defined`);
-        return false;
-      } else {
-        logger.debug(
-          `Overlay base specifier for ${language} overlay-base database found: ${resolveDatabaseOutput.overlayBaseSpecifier}`
-        );
-      }
-    } catch (e) {
-      logger.warning(`${warningPrefix}: failed to resolve database: ${e}`);
-      return false;
-    }
-  }
-  return true;
-}
-async function cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger) {
-  const overlayDatabaseMode = config.overlayDatabaseMode;
-  if (overlayDatabaseMode !== "overlay-base" /* OverlayBase */) {
-    logger.debug(
-      `Overlay database mode is ${overlayDatabaseMode}. Skip uploading overlay-base database to cache.`
-    );
-    return false;
-  }
-  if (!config.useOverlayDatabaseCaching) {
-    logger.debug(
-      "Overlay database caching is disabled. Skip uploading overlay-base database to cache."
+// src/autobuild.ts
+async function determineAutobuildLanguages(codeql, config, logger) {
+  if (config.buildMode === "none" /* None */ || config.buildMode === "manual" /* Manual */) {
+    logger.info(
+      `Using build mode "${config.buildMode}", nothing to autobuild. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes" /* CODEQL_BUILD_MODES */} for more information.`
     );
-    return false;
+    return void 0;
   }
-  if (isInTestMode()) {
-    logger.debug(
-      "In test mode. Skip uploading overlay-base database to cache."
+  const autobuildLanguages = await asyncFilter(
+    config.languages,
+    async (language) => await codeql.isTracedLanguage(language)
+  );
+  if (autobuildLanguages.length === 0) {
+    logger.info(
+      "None of the languages in this project require extra build steps"
     );
-    return false;
+    return void 0;
   }
-  const databaseIsValid = await checkOverlayBaseDatabase(
-    codeql,
-    config,
-    logger,
-    "Abort uploading overlay-base database to cache"
+  const autobuildLanguagesWithoutGo = autobuildLanguages.filter(
+    (l) => l !== "go" /* go */
   );
-  if (!databaseIsValid) {
-    return false;
+  const languages = [];
+  if (autobuildLanguagesWithoutGo[0] !== void 0) {
+    languages.push(autobuildLanguagesWithoutGo[0]);
   }
-  await withGroupAsync("Cleaning up databases", async () => {
-    await codeql.databaseCleanupCluster(config, "overlay" /* Overlay */);
-  });
-  const dbLocation = config.dbLocation;
-  const databaseSizeBytes = await tryGetFolderBytes(dbLocation, logger);
-  if (databaseSizeBytes === void 0) {
-    logger.warning(
-      "Failed to determine database size. Skip uploading overlay-base database to cache."
-    );
-    return false;
+  if (autobuildLanguages.length !== autobuildLanguagesWithoutGo.length) {
+    languages.push("go" /* go */);
   }
-  if (databaseSizeBytes > OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES) {
-    const databaseSizeMB = Math.round(databaseSizeBytes / 1e6);
+  logger.debug(`Will autobuild ${languages.join(" and ")}.`);
+  if (autobuildLanguagesWithoutGo.length > 1) {
     logger.warning(
-      `Database size (${databaseSizeMB} MB) exceeds maximum upload size (${OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB} MB). Skip uploading overlay-base database to cache.`
+      `We will only automatically build ${languages.join(
+        " and "
+      )} code. If you wish to scan ${autobuildLanguagesWithoutGo.slice(1).join(
+        " and "
+      )}, you must replace the autobuild step of your workflow with custom build steps. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually" /* SPECIFY_BUILD_STEPS_MANUALLY */} for more information.`
     );
-    return false;
   }
-  const codeQlVersion = (await codeql.getVersion()).version;
-  const checkoutPath = getRequiredInput("checkout_path");
-  const cacheSaveKey = await getCacheSaveKey(
-    config,
-    codeQlVersion,
-    checkoutPath,
+  return languages;
+}
+async function setupCppAutobuild(codeql, logger) {
+  const envVar = featureConfig["cpp_dependency_installation_enabled" /* CppDependencyInstallation */].envVar;
+  const featureName = "C++ automatic installation of dependencies";
+  const gitHubVersion = await getGitHubVersion();
+  const repositoryNwo = getRepositoryNwo();
+  const features = initFeatures(
+    gitHubVersion,
+    repositoryNwo,
+    getTemporaryDirectory(),
     logger
   );
-  logger.info(
-    `Uploading overlay-base database to Actions cache with key ${cacheSaveKey}`
-  );
-  try {
-    const cacheId = await waitForResultWithTimeLimit(
-      MAX_CACHE_OPERATION_MS3,
-      actionsCache3.saveCache([dbLocation], cacheSaveKey),
-      () => {
-      }
-    );
-    if (cacheId === void 0) {
-      logger.warning("Timed out while uploading overlay-base database");
-      return false;
+  if (await features.getValue("cpp_dependency_installation_enabled" /* CppDependencyInstallation */, codeql)) {
+    if (process.env["RUNNER_ENVIRONMENT" /* RUNNER_ENVIRONMENT */] === "self-hosted" && process.env[envVar] !== "true") {
+      logger.info(
+        `Disabling ${featureName} as we are on a self-hosted runner.${getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` : ""}`
+      );
+      core13.exportVariable(envVar, "false");
+    } else {
+      logger.info(
+        `Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false'. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.`
+      );
+      core13.exportVariable(envVar, "true");
     }
-  } catch (error3) {
-    logger.warning(
-      `Failed to upload overlay-base database to cache: ${error3 instanceof Error ? error3.message : String(error3)}`
-    );
-    return false;
+  } else {
+    logger.info(`Disabling ${featureName}.`);
+    core13.exportVariable(envVar, "false");
   }
-  logger.info(`Successfully uploaded overlay-base database from ${dbLocation}`);
-  return true;
 }
-async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
-  const overlayDatabaseMode = config.overlayDatabaseMode;
-  if (overlayDatabaseMode !== "overlay" /* Overlay */) {
-    logger.debug(
-      `Overlay database mode is ${overlayDatabaseMode}. Skip downloading overlay-base database from cache.`
-    );
-    return void 0;
-  }
-  if (!config.useOverlayDatabaseCaching) {
-    logger.debug(
-      "Overlay database caching is disabled. Skip downloading overlay-base database from cache."
-    );
-    return void 0;
-  }
-  if (isInTestMode()) {
-    logger.debug(
-      "In test mode. Skip downloading overlay-base database from cache."
-    );
-    return void 0;
-  }
-  const dbLocation = config.dbLocation;
-  const codeQlVersion = (await codeql.getVersion()).version;
-  const cacheRestoreKeyPrefix = await getCacheRestoreKeyPrefix(
-    config,
-    codeQlVersion
-  );
-  logger.info(
-    `Looking in Actions cache for overlay-base database with restore key ${cacheRestoreKeyPrefix}`
-  );
-  let databaseDownloadDurationMs = 0;
-  try {
-    const databaseDownloadStart = performance.now();
-    const foundKey = await waitForResultWithTimeLimit(
-      // This ten-minute limit for the cache restore operation is mainly to
-      // guard against the possibility that the cache service is unresponsive
-      // and hangs outside the data download.
-      //
-      // Data download (which is normally the most time-consuming part of the
-      // restore operation) should not run long enough to hit this limit. Even
-      // for an extremely large 10GB database, at a download speed of 40MB/s
-      // (see below), the download should complete within five minutes. If we
-      // do hit this limit, there are likely more serious problems other than
-      // mere slow download speed.
-      //
-      // This is important because we don't want any ongoing file operations
-      // on the database directory when we do hit this limit. Hitting this
-      // time limit takes us to a fallback path where we re-initialize the
-      // database from scratch at dbLocation, and having the cache restore
-      // operation continue to write into dbLocation in the background would
-      // really mess things up. We want to hit this limit only in the case
-      // of a hung cache service, not just slow download speed.
-      MAX_CACHE_OPERATION_MS3,
-      actionsCache3.restoreCache(
-        [dbLocation],
-        cacheRestoreKeyPrefix,
-        void 0,
-        {
-          // Azure SDK download (which is the default) uses 128MB segments; see
-          // https://github.com/actions/toolkit/blob/main/packages/cache/README.md.
-          // Setting segmentTimeoutInMs to 3000 translates to segment download
-          // speed of about 40 MB/s, which should be achievable unless the
-          // download is unreliable (in which case we do want to abort).
-          segmentTimeoutInMs: 3e3
-        }
-      ),
-      () => {
-        logger.info("Timed out downloading overlay-base database from cache");
-      }
-    );
-    databaseDownloadDurationMs = Math.round(
-      performance.now() - databaseDownloadStart
-    );
-    if (foundKey === void 0) {
-      logger.info("No overlay-base database found in Actions cache");
-      return void 0;
-    }
-    logger.info(
-      `Downloaded overlay-base database in cache with key ${foundKey}`
-    );
-  } catch (error3) {
-    logger.warning(
-      `Failed to download overlay-base database from cache: ${error3 instanceof Error ? error3.message : String(error3)}`
-    );
-    return void 0;
+async function runAutobuild(config, language, logger) {
+  logger.startGroup(`Attempting to automatically build ${language} code`);
+  const codeQL = await getCodeQL(logger, config.codeQLCmd);
+  if (language === "cpp" /* cpp */) {
+    await setupCppAutobuild(codeQL, logger);
   }
-  const databaseIsValid = await checkOverlayBaseDatabase(
-    codeql,
-    config,
-    logger,
-    "Downloaded overlay-base database is invalid"
-  );
-  if (!databaseIsValid) {
-    logger.warning("Downloaded overlay-base database failed validation");
-    return void 0;
+  if (config.buildMode) {
+    await codeQL.extractUsingBuildMode(config, language);
+  } else {
+    await codeQL.runAutobuild(config, language);
   }
-  const databaseSizeBytes = await tryGetFolderBytes(dbLocation, logger);
-  if (databaseSizeBytes === void 0) {
-    logger.info(
-      "Filesystem error while accessing downloaded overlay-base database"
-    );
-    return void 0;
+  if (language === "go" /* go */) {
+    core13.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true");
   }
-  logger.info(`Successfully downloaded overlay-base database to ${dbLocation}`);
-  return {
-    databaseSizeBytes: Math.round(databaseSizeBytes),
-    databaseDownloadDurationMs
-  };
+  logger.endGroup();
 }
-async function getCacheSaveKey(config, codeQlVersion, checkoutPath, logger) {
-  let runId = 1;
-  let attemptId = 1;
-  try {
-    runId = getWorkflowRunID();
-    attemptId = getWorkflowRunAttempt();
-  } catch (e) {
-    logger.warning(
-      `Failed to get workflow run ID or attempt ID. Reason: ${getErrorMessage(e)}`
-    );
-  }
-  const sha = await getCommitOid(checkoutPath);
-  const restoreKeyPrefix = await getCacheRestoreKeyPrefix(
-    config,
-    codeQlVersion
-  );
-  return `${restoreKeyPrefix}${sha}-${runId}-${attemptId}`;
+
+// src/dependency-caching.ts
+var os5 = __toESM(require("os"));
+var import_path2 = require("path");
+var actionsCache4 = __toESM(require_cache4());
+var glob = __toESM(require_glob());
+var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies";
+var CODEQL_DEPENDENCY_CACHE_VERSION = 1;
+function getJavaTempDependencyDir() {
+  return (0, import_path2.join)(getTemporaryDirectory(), "codeql_java", "repository");
 }
-async function getCacheRestoreKeyPrefix(config, codeQlVersion) {
-  return `${await getCacheKeyPrefixBase(config.languages)}${codeQlVersion}-`;
+async function getJavaDependencyDirs() {
+  return [
+    // Maven
+    (0, import_path2.join)(os5.homedir(), ".m2", "repository"),
+    // Gradle
+    (0, import_path2.join)(os5.homedir(), ".gradle", "caches"),
+    // CodeQL Java build-mode: none
+    getJavaTempDependencyDir()
+  ];
 }
-async function getCacheKeyPrefixBase(parsedLanguages) {
-  const languagesComponent = [...parsedLanguages].sort().join("_");
-  const cacheKeyComponents = {
-    automationID: await getAutomationID()
-    // Add more components here as needed in the future
-  };
-  const componentsHash = createCacheKeyHash(cacheKeyComponents);
-  return `${CACHE_PREFIX}-${CACHE_VERSION2}-${componentsHash}-${languagesComponent}-`;
+function getCsharpTempDependencyDir() {
+  return (0, import_path2.join)(getTemporaryDirectory(), "codeql_csharp", "repository");
 }
-async function getCodeQlVersionsForOverlayBaseDatabases(rawLanguages, logger) {
-  const languages = rawLanguages.map(parseBuiltInLanguage);
-  if (languages.includes(void 0)) {
-    logger.warning(
-      "One or more provided languages are not recognized as built-in languages. Skipping searching for overlay-base databases in cache."
-    );
-    return void 0;
-  }
-  const dedupedLanguages = [
-    ...new Set(languages.filter((l) => l !== void 0))
+async function getCsharpDependencyDirs(codeql, features) {
+  const dirs = [
+    // Nuget
+    (0, import_path2.join)(os5.homedir(), ".nuget", "packages")
   ];
-  const cacheKeyPrefix = await getCacheKeyPrefixBase(dedupedLanguages);
-  logger.debug(
-    `Searching for overlay-base databases in Actions cache with prefix ${cacheKeyPrefix}`
-  );
-  const caches = await listActionsCaches(cacheKeyPrefix);
-  if (caches.length === 0) {
-    logger.info("No overlay-base databases found in Actions cache.");
-    return [];
-  }
-  logger.info(
-    `Found ${caches.length} overlay-base ${caches.length === 1 ? "database" : "databases"} in the Actions cache.`
-  );
-  const versionRegex = /^([\d.]+)-/;
-  const versionSet = /* @__PURE__ */ new Set();
-  for (const cache of caches) {
-    if (!cache.key) continue;
-    const suffix = cache.key.substring(cacheKeyPrefix.length);
-    const match = suffix.match(versionRegex);
-    if (match && semver6.valid(match[1])) {
-      versionSet.add(match[1]);
-    }
-  }
-  if (versionSet.size === 0) {
-    logger.info(
-      "Could not parse any CodeQL versions from overlay-base database cache keys."
-    );
-    return [];
+  if (await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */, codeql)) {
+    dirs.push(getCsharpTempDependencyDir());
   }
-  const versions = [...versionSet].sort(semver6.rcompare);
-  logger.info(
-    `Found overlay databases for the following CodeQL versions in the Actions cache: ${versions.join(", ")}`
-  );
-  return versions;
+  return dirs;
 }
-
-// src/tar.ts
-var import_child_process = require("child_process");
-var fs11 = __toESM(require("fs"));
-var stream = __toESM(require("stream"));
-var import_toolrunner = __toESM(require_toolrunner());
-var io4 = __toESM(require_io());
-var toolcache = __toESM(require_tool_cache());
-var semver7 = __toESM(require_semver2());
-var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3";
-var MIN_REQUIRED_GNU_TAR_VERSION = "1.31";
-async function getTarVersion() {
-  const tar = await io4.which("tar", true);
-  let stdout = "";
-  const exitCode = await new import_toolrunner.ToolRunner(tar, ["--version"], {
-    listeners: {
-      stdout: (data) => {
-        stdout += data.toString();
-      }
-    }
-  }).exec();
-  if (exitCode !== 0) {
-    throw new Error("Failed to call tar --version");
-  }
-  if (stdout.includes("GNU tar")) {
-    const match = stdout.match(/tar \(GNU tar\) ([0-9.]+)/);
-    if (!match?.[1]) {
-      throw new Error("Failed to parse output of tar --version.");
-    }
-    return { type: "gnu", version: match[1] };
-  } else if (stdout.includes("bsdtar")) {
-    const match = stdout.match(/bsdtar ([0-9.]+)/);
-    if (!match?.[1]) {
-      throw new Error("Failed to parse output of tar --version.");
-    }
-    return { type: "bsd", version: match[1] };
-  } else {
-    throw new Error("Unknown tar version");
+async function makePatternCheck(patterns) {
+  const globber = await makeGlobber(patterns);
+  if ((await globber.glob()).length === 0) {
+    return void 0;
   }
+  return patterns;
 }
-async function isZstdAvailable(logger) {
-  const foundZstdBinary = await isBinaryAccessible("zstd", logger);
-  try {
-    const tarVersion = await getTarVersion();
-    const { type: type2, version } = tarVersion;
-    logger.info(`Found ${type2} tar version ${version}.`);
-    switch (type2) {
-      case "gnu":
-        return {
-          available: foundZstdBinary && // GNU tar only uses major and minor version numbers
-          semver7.gte(
-            semver7.coerce(version),
-            semver7.coerce(MIN_REQUIRED_GNU_TAR_VERSION)
-          ),
-          foundZstdBinary,
-          version: tarVersion
-        };
-      case "bsd":
-        return {
-          available: foundZstdBinary && // Do a loose comparison since these version numbers don't contain
-          // a patch version number.
-          semver7.gte(version, MIN_REQUIRED_BSD_TAR_VERSION),
-          foundZstdBinary,
-          version: tarVersion
-        };
-      default:
-        assertNever(type2);
-    }
-  } catch (e) {
-    logger.warning(
-      `Failed to determine tar version, therefore will assume zstd is not available. The underlying error was: ${e}`
-    );
-    return { available: false, foundZstdBinary };
+var CSHARP_BASE_PATTERNS = [
+  // NuGet
+  "**/packages.lock.json",
+  // Paket
+  "**/paket.lock"
+];
+var CSHARP_EXTRA_PATTERNS = [
+  "**/*.csproj",
+  "**/packages.config",
+  "**/nuget.config"
+];
+async function getCsharpHashPatterns(codeql, features) {
+  const basePatterns = await internal.makePatternCheck(CSHARP_BASE_PATTERNS);
+  if (basePatterns !== void 0) {
+    return basePatterns;
   }
-}
-async function extract(tarPath, dest, compressionMethod, tarVersion, logger) {
-  fs11.mkdirSync(dest, { recursive: true });
-  switch (compressionMethod) {
-    case "gzip":
-      return await toolcache.extractTar(tarPath, dest);
-    case "zstd": {
-      if (!tarVersion) {
-        throw new Error(
-          "Could not determine tar version, which is required to extract a Zstandard archive."
-        );
-      }
-      await extractTarZst(tarPath, dest, tarVersion, logger);
-      return dest;
-    }
+  if (await features.getValue("csharp_new_cache_key" /* CsharpNewCacheKey */, codeql)) {
+    return internal.makePatternCheck(CSHARP_EXTRA_PATTERNS);
   }
+  return void 0;
 }
-async function extractTarZst(tar, dest, tarVersion, logger) {
-  logger.debug(
-    `Extracting to ${dest}.${tar instanceof stream.Readable ? ` Input stream has high water mark ${tar.readableHighWaterMark}.` : ""}`
-  );
-  try {
-    const args = ["-x", "--zstd", "--ignore-zeros"];
-    if (tarVersion.type === "gnu") {
-      args.push("--warning=no-unknown-keyword");
-      args.push("--overwrite");
-    }
-    args.push("-f", tar instanceof stream.Readable ? "-" : tar, "-C", dest);
-    process.stdout.write(`[command]tar ${args.join(" ")}
-`);
-    await new Promise((resolve13, reject) => {
-      const tarProcess = (0, import_child_process.spawn)("tar", args, { stdio: "pipe" });
-      let stdout = "";
-      tarProcess.stdout?.on("data", (data) => {
-        stdout += data.toString();
-        process.stdout.write(data);
-      });
-      let stderr = "";
-      tarProcess.stderr?.on("data", (data) => {
-        stderr += data.toString();
-        process.stdout.write(data);
-      });
-      tarProcess.on("error", (err) => {
-        reject(new Error(`Error while extracting tar: ${err}`));
-      });
-      if (tar instanceof stream.Readable) {
-        tar.pipe(tarProcess.stdin).on("error", (err) => {
-          reject(
-            new Error(`Error while downloading and extracting tar: ${err}`)
-          );
-        });
-      }
-      tarProcess.on("exit", (code) => {
-        if (code !== 0) {
-          reject(
-            new CommandInvocationError(
-              "tar",
-              args,
-              code ?? void 0,
-              stdout,
-              stderr
-            )
-          );
-        }
-        resolve13();
-      });
-    });
-  } catch (e) {
-    await cleanUpPath(dest, "extraction destination directory", logger);
-    throw e;
+var defaultCacheConfigs = {
+  java: {
+    getDependencyPaths: getJavaDependencyDirs,
+    getHashPatterns: async () => internal.makePatternCheck([
+      // Maven
+      "**/pom.xml",
+      // Gradle
+      "**/*.gradle*",
+      "**/gradle-wrapper.properties",
+      "buildSrc/**/Versions.kt",
+      "buildSrc/**/Dependencies.kt",
+      "gradle/*.versions.toml",
+      "**/versions.properties"
+    ])
+  },
+  csharp: {
+    getDependencyPaths: getCsharpDependencyDirs,
+    getHashPatterns: getCsharpHashPatterns
+  },
+  go: {
+    getDependencyPaths: async () => [(0, import_path2.join)(os5.homedir(), "go", "pkg", "mod")],
+    getHashPatterns: async () => internal.makePatternCheck(["**/go.sum"])
   }
-}
-var KNOWN_EXTENSIONS = {
-  "tar.gz": "gzip",
-  "tar.zst": "zstd"
 };
-function inferCompressionMethod(tarPath) {
-  for (const [ext, method] of Object.entries(KNOWN_EXTENSIONS)) {
-    if (tarPath.endsWith(`.${ext}`)) {
-      return method;
-    }
-  }
-  return void 0;
-}
-
-// src/tools-download.ts
-var fs12 = __toESM(require("fs"));
-var os3 = __toESM(require("os"));
-var path11 = __toESM(require("path"));
-var import_perf_hooks2 = require("perf_hooks");
-var core10 = __toESM(require_core());
-var import_http_client = __toESM(require_lib());
-var toolcache2 = __toESM(require_tool_cache());
-var import_follow_redirects = __toESM(require_follow_redirects());
-var semver8 = __toESM(require_semver2());
-var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024;
-var TOOLCACHE_TOOL_NAME = "CodeQL";
-function makeDownloadFirstToolsDownloadDurations(downloadDurationMs, extractionDurationMs) {
-  return {
-    combinedDurationMs: downloadDurationMs + extractionDurationMs,
-    downloadDurationMs,
-    extractionDurationMs,
-    streamExtraction: false
-  };
-}
-function makeStreamedToolsDownloadDurations(combinedDurationMs) {
-  return {
-    combinedDurationMs,
-    downloadDurationMs: void 0,
-    extractionDurationMs: void 0,
-    streamExtraction: true
-  };
+async function makeGlobber(patterns) {
+  return glob.create(patterns.join("\n"));
 }
-async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorization, headers, tarVersion, logger) {
-  logger.info(
-    `Downloading CodeQL tools from ${codeqlURL} . This may take a while.`
-  );
-  try {
-    if (compressionMethod === "zstd" && process.platform === "linux") {
-      logger.info(`Streaming the extraction of the CodeQL bundle.`);
-      const toolsInstallStart = import_perf_hooks2.performance.now();
-      await downloadAndExtractZstdWithStreaming(
-        codeqlURL,
-        dest,
-        authorization,
-        headers,
-        tarVersion,
-        logger
-      );
-      const combinedDurationMs = Math.round(
-        import_perf_hooks2.performance.now() - toolsInstallStart
-      );
-      logger.info(
-        `Finished downloading and extracting CodeQL bundle to ${dest} (${formatDuration(
-          combinedDurationMs
-        )}).`
-      );
-      return {
-        compressionMethod,
-        toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
-        ...makeStreamedToolsDownloadDurations(combinedDurationMs)
-      };
-    }
-  } catch (e) {
-    core10.warning(
-      `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}`
-    );
-    core10.warning(`Falling back to downloading the bundle before extracting.`);
-    await cleanUpPath(dest, "CodeQL bundle", logger);
-  }
-  const toolsDownloadStart = import_perf_hooks2.performance.now();
-  const archivedBundlePath = await toolcache2.downloadTool(
-    codeqlURL,
-    void 0,
-    authorization,
-    headers
-  );
-  const downloadDurationMs = Math.round(import_perf_hooks2.performance.now() - toolsDownloadStart);
-  logger.info(
-    `Finished downloading CodeQL bundle to ${archivedBundlePath} (${formatDuration(
-      downloadDurationMs
-    )}).`
-  );
-  let extractionDurationMs;
-  try {
-    logger.info("Extracting CodeQL bundle.");
-    const extractionStart = import_perf_hooks2.performance.now();
-    await extract(
-      archivedBundlePath,
-      dest,
-      compressionMethod,
-      tarVersion,
-      logger
-    );
-    extractionDurationMs = Math.round(import_perf_hooks2.performance.now() - extractionStart);
+async function checkHashPatterns(codeql, features, language, cacheConfig, checkType, logger) {
+  const patterns = await cacheConfig.getHashPatterns(codeql, features);
+  if (patterns === void 0) {
     logger.info(
-      `Finished extracting CodeQL bundle to ${dest} (${formatDuration(
-        extractionDurationMs
-      )}).`
-    );
-  } finally {
-    await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger);
-  }
-  return {
-    compressionMethod,
-    toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
-    ...makeDownloadFirstToolsDownloadDurations(
-      downloadDurationMs,
-      extractionDurationMs
-    )
-  };
-}
-async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) {
-  fs12.mkdirSync(dest, { recursive: true });
-  const agent = new import_http_client.HttpClient().getAgent(codeqlURL);
-  headers = Object.assign(
-    { "User-Agent": "CodeQL Action" },
-    authorization ? { authorization } : {},
-    headers
-  );
-  const response = await new Promise(
-    (resolve13) => import_follow_redirects.https.get(
-      codeqlURL,
-      {
-        headers,
-        // Increase the high water mark to improve performance.
-        highWaterMark: STREAMING_HIGH_WATERMARK_BYTES,
-        // Use the agent to respect proxy settings.
-        agent
-      },
-      (r) => resolve13(r)
-    )
-  );
-  if (response.statusCode !== 200) {
-    throw new Error(
-      `Failed to download CodeQL bundle from ${codeqlURL}. HTTP status code: ${response.statusCode}.`
+      `Skipping ${checkType} of dependency cache for ${language} as we cannot calculate a hash for the cache key.`
     );
   }
-  await extractTarZst(response, dest, tarVersion, logger);
-}
-function getToolcacheDirectory(version) {
-  return path11.join(
-    getRequiredEnvParam("RUNNER_TOOL_CACHE"),
-    TOOLCACHE_TOOL_NAME,
-    semver8.clean(version) || version,
-    os3.arch() || ""
-  );
-}
-function writeToolcacheMarkerFile(extractedPath, logger) {
-  const markerFilePath = `${extractedPath}.complete`;
-  fs12.writeFileSync(markerFilePath, "");
-  logger.info(`Created toolcache marker file ${markerFilePath}`);
-}
-function sanitizeUrlForStatusReport(url2) {
-  return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some(
-    (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`)
-  ) ? url2 : "sanitized-value";
-}
-
-// src/setup-codeql.ts
-var CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action";
-var CODEQL_NIGHTLIES_REPOSITORY_OWNER = "dsp-testing";
-var CODEQL_NIGHTLIES_REPOSITORY_NAME = "codeql-cli-nightlies";
-var CODEQL_BUNDLE_VERSION_ALIAS = ["linked", "latest"];
-var CODEQL_NIGHTLY_TOOLS_INPUTS = ["nightly", "nightly-latest"];
-var CODEQL_TOOLCACHE_INPUT = "toolcache";
-function getCodeQLBundleExtension(compressionMethod) {
-  switch (compressionMethod) {
-    case "gzip":
-      return ".tar.gz";
-    case "zstd":
-      return ".tar.zst";
-    default:
-      assertNever(compressionMethod);
-  }
-}
-function getCodeQLBundleName(compressionMethod) {
-  const extension = getCodeQLBundleExtension(compressionMethod);
-  let platform2;
-  if (process.platform === "win32") {
-    platform2 = "win64";
-  } else if (process.platform === "linux") {
-    platform2 = "linux64";
-  } else if (process.platform === "darwin") {
-    platform2 = "osx64";
-  } else {
-    return `codeql-bundle${extension}`;
-  }
-  return `codeql-bundle-${platform2}${extension}`;
+  return patterns;
 }
-function getCodeQLActionRepository(logger) {
-  if (isRunningLocalAction()) {
+async function downloadDependencyCaches(codeql, features, languages, logger) {
+  const status = [];
+  const restoredKeys = [];
+  for (const language of languages) {
+    const cacheConfig = defaultCacheConfigs[language];
+    if (cacheConfig === void 0) {
+      logger.info(
+        `Skipping download of dependency cache for ${language} as we have no caching configuration for it.`
+      );
+      continue;
+    }
+    const patterns = await checkHashPatterns(
+      codeql,
+      features,
+      language,
+      cacheConfig,
+      "download",
+      logger
+    );
+    if (patterns === void 0) {
+      status.push({ language, hit_kind: "no-hash" /* NoHash */ });
+      continue;
+    }
+    const primaryKey = await cacheKey2(codeql, features, language, patterns);
+    const restoreKeys = [
+      await cachePrefix2(codeql, features, language)
+    ];
     logger.info(
-      "The CodeQL Action is checked out locally. Using the default CodeQL Action repository."
+      `Downloading cache for ${language} with key ${primaryKey} and restore keys ${restoreKeys.join(
+        ", "
+      )}`
     );
-    return CODEQL_DEFAULT_ACTION_REPOSITORY;
+    const start = performance.now();
+    const hitKey = await actionsCache4.restoreCache(
+      await cacheConfig.getDependencyPaths(codeql, features),
+      primaryKey,
+      restoreKeys
+    );
+    const download_duration_ms = Math.round(performance.now() - start);
+    if (hitKey !== void 0) {
+      logger.info(`Cache hit on key ${hitKey} for ${language}.`);
+      let hit_kind = "partial" /* Partial */;
+      if (hitKey === primaryKey) {
+        hit_kind = "exact" /* Exact */;
+      }
+      status.push({
+        language,
+        hit_kind,
+        download_duration_ms
+      });
+      restoredKeys.push(hitKey);
+    } else {
+      status.push({ language, hit_kind: "miss" /* Miss */ });
+      logger.info(`No suitable cache found for ${language}.`);
+    }
   }
-  return getRequiredEnvParam("GITHUB_ACTION_REPOSITORY");
+  return { statusReport: status, restoredKeys };
 }
-async function getCodeQLBundleDownloadURL(tagName, apiDetails, compressionMethod, logger) {
-  const codeQLActionRepository = getCodeQLActionRepository(logger);
-  const potentialDownloadSources = [
-    // This GitHub instance, and this Action.
-    [apiDetails.url, codeQLActionRepository],
-    // This GitHub instance, and the canonical Action.
-    [apiDetails.url, CODEQL_DEFAULT_ACTION_REPOSITORY],
-    // GitHub.com, and the canonical Action.
-    [GITHUB_DOTCOM_URL, CODEQL_DEFAULT_ACTION_REPOSITORY]
-  ];
-  const uniqueDownloadSources = potentialDownloadSources.filter(
-    (source, index, self2) => {
-      return !self2.slice(0, index).some((other) => (0, import_fast_deep_equal.default)(source, other));
+async function uploadDependencyCaches(codeql, features, config, logger) {
+  const status = [];
+  for (const language of config.languages) {
+    const cacheConfig = defaultCacheConfigs[language];
+    if (cacheConfig === void 0) {
+      logger.info(
+        `Skipping upload of dependency cache for ${language} as we have no caching configuration for it.`
+      );
+      continue;
     }
-  );
-  const codeQLBundleName = getCodeQLBundleName(compressionMethod);
-  for (const downloadSource of uniqueDownloadSources) {
-    const [apiURL, repository] = downloadSource;
-    if (apiURL === GITHUB_DOTCOM_URL && repository === CODEQL_DEFAULT_ACTION_REPOSITORY) {
-      break;
+    const patterns = await checkHashPatterns(
+      codeql,
+      features,
+      language,
+      cacheConfig,
+      "upload",
+      logger
+    );
+    if (patterns === void 0) {
+      status.push({ language, result: "no-hash" /* NoHash */ });
+      continue;
     }
-    const [repositoryOwner, repositoryName] = repository.split("/");
+    const key = await cacheKey2(codeql, features, language, patterns);
+    if (config.dependencyCachingRestoredKeys.includes(key)) {
+      status.push({ language, result: "duplicate" /* Duplicate */ });
+      continue;
+    }
+    const size = await getTotalCacheSize(
+      await cacheConfig.getDependencyPaths(codeql, features),
+      logger,
+      true
+    );
+    if (size === 0) {
+      status.push({ language, result: "empty" /* Empty */ });
+      logger.info(
+        `Skipping upload of dependency cache for ${language} since it is empty.`
+      );
+      continue;
+    }
+    logger.info(
+      `Uploading cache of size ${size} for ${language} with key ${key}...`
+    );
     try {
-      const release2 = await getApiClient().rest.repos.getReleaseByTag({
-        owner: repositoryOwner,
-        repo: repositoryName,
-        tag: tagName
+      const start = performance.now();
+      await actionsCache4.saveCache(
+        await cacheConfig.getDependencyPaths(codeql, features),
+        key
+      );
+      const upload_duration_ms = Math.round(performance.now() - start);
+      status.push({
+        language,
+        result: "stored" /* Stored */,
+        upload_size_bytes: Math.round(size),
+        upload_duration_ms
       });
-      for (const asset of release2.data.assets) {
-        if (asset.name === codeQLBundleName) {
-          logger.info(
-            `Found CodeQL bundle ${codeQLBundleName} in ${repository} on ${apiURL} with URL ${asset.url}.`
-          );
-          return asset.url;
-        }
+    } catch (error3) {
+      if (error3 instanceof actionsCache4.ReserveCacheError) {
+        logger.info(
+          `Not uploading cache for ${language}, because ${key} is already in use.`
+        );
+        logger.debug(error3.message);
+        status.push({ language, result: "duplicate" /* Duplicate */ });
+      } else {
+        throw error3;
       }
-    } catch (e) {
-      logger.info(
-        `Looked for CodeQL bundle ${codeQLBundleName} in ${repository} on ${apiURL} but got error ${e}.`
-      );
     }
   }
-  return `https://github.com/${CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${tagName}/${codeQLBundleName}`;
+  return status;
 }
-function tryGetBundleVersionFromTagName(tagName, logger) {
-  const match = tagName.match(/^codeql-bundle-(.*)$/);
-  if (match === null || match.length < 2) {
-    logger.debug(`Could not determine bundle version from tag ${tagName}.`);
-    return void 0;
-  }
-  return match[1];
+async function cacheKey2(codeql, features, language, patterns) {
+  const hash2 = await glob.hashFiles(patterns.join("\n"));
+  return `${await cachePrefix2(codeql, features, language)}${hash2}`;
 }
-function tryGetTagNameFromUrl(url2, logger) {
-  const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)];
-  if (matches.length === 0) {
-    logger.debug(`Could not determine tag name for URL ${url2}.`);
-    return void 0;
+async function getFeaturePrefix(codeql, features, language) {
+  const enabledFeatures = [];
+  const addFeatureIfEnabled = async (feature) => {
+    if (await features.getValue(feature, codeql)) {
+      enabledFeatures.push(feature);
+    }
+  };
+  if (language === "csharp" /* csharp */) {
+    await addFeatureIfEnabled("csharp_new_cache_key" /* CsharpNewCacheKey */);
+    await addFeatureIfEnabled("csharp_cache_bmn" /* CsharpCacheBuildModeNone */);
   }
-  const match = matches[matches.length - 1];
-  if (match?.length !== 2) {
-    logger.debug(
-      `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify(
-        match
-      )}.`
-    );
-    return void 0;
+  if (enabledFeatures.length > 0) {
+    return `${createCacheKeyHash(enabledFeatures)}-`;
   }
-  return match[1];
+  return "";
 }
-function convertToSemVer(version, logger) {
-  if (!semver9.valid(version)) {
-    logger.debug(
-      `Bundle version ${version} is not in SemVer format. Will treat it as pre-release 0.0.0-${version}.`
-    );
-    version = `0.0.0-${version}`;
-  }
-  const s = semver9.clean(version);
-  if (!s) {
-    throw new Error(`Bundle version ${version} is not in SemVer format.`);
+async function cachePrefix2(codeql, features, language) {
+  const runnerOs = getRequiredEnvParam("RUNNER_OS");
+  const customPrefix = process.env["CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX" /* DEPENDENCY_CACHING_PREFIX */];
+  let prefix = CODEQL_DEPENDENCY_CACHE_PREFIX;
+  if (customPrefix !== void 0 && customPrefix.length > 0) {
+    prefix = `${prefix}-${customPrefix}`;
   }
-  return s;
+  const featurePrefix = await getFeaturePrefix(codeql, features, language);
+  return `${prefix}-${featurePrefix}${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`;
 }
-async function findOverridingToolsInCache(humanReadableVersion, logger) {
-  const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({
-    folder: toolcache3.find("CodeQL", version),
-    version
-  })).filter(({ folder }) => fs13.existsSync(path12.join(folder, "pinned-version")));
-  if (candidates.length === 1) {
-    const candidate = candidates[0];
-    logger.debug(
-      `CodeQL tools version ${candidate.version} in toolcache overriding version ${humanReadableVersion}.`
-    );
-    return {
-      codeqlFolder: candidate.folder,
-      sourceType: "toolcache",
-      toolsVersion: candidate.version
-    };
-  } else if (candidates.length === 0) {
-    logger.debug(
-      "Did not find any candidate pinned versions of the CodeQL tools in the toolcache."
+async function getDependencyCacheUsage(logger) {
+  try {
+    const caches = await listActionsCaches(CODEQL_DEPENDENCY_CACHE_PREFIX);
+    const totalSize = caches.reduce(
+      (acc, cache) => acc + (cache.size_in_bytes ?? 0),
+      0
     );
-  } else {
-    logger.debug(
-      "Could not use CodeQL tools from the toolcache since more than one candidate pinned version was found in the toolcache."
+    return { count: caches.length, size_bytes: totalSize };
+  } catch (err) {
+    logger.warning(
+      `Unable to retrieve information about dependency cache usage: ${getErrorMessage(err)}`
     );
   }
   return void 0;
 }
-async function getEnabledVersionsWithOverlayBaseDatabases(defaultCliVersion, rawLanguages, features, logger) {
-  if (rawLanguages === void 0 || rawLanguages.length === 0) {
-    return [];
-  }
-  const isEnabled = await features.getValue(
-    "overlay_analysis_match_codeql_version" /* OverlayAnalysisMatchCodeqlVersion */
-  );
-  const isDryRun = !isEnabled && await features.getValue("overlay_analysis_match_codeql_version_dry_run" /* OverlayAnalysisMatchCodeqlVersionDryRun */);
-  if (!isEnabled && !isDryRun) {
-    return [];
-  }
-  let cachedVersions;
-  try {
-    cachedVersions = await getCodeQlVersionsForOverlayBaseDatabases(
-      rawLanguages,
-      logger
-    );
-  } catch (e) {
-    logger.warning(
-      `Could not list overlay-base databases in the Actions cache while choosing a default CodeQL CLI version, falling back to the highest enabled version. Details: ${getErrorMessage(e)}`
-    );
-    return [];
+var internal = {
+  makePatternCheck
+};
+
+// src/analyze.ts
+var CodeQLAnalysisError = class extends Error {
+  constructor(queriesStatusReport, message, error3) {
+    super(message);
+    this.queriesStatusReport = queriesStatusReport;
+    this.message = message;
+    this.error = error3;
+    this.name = "CodeQLAnalysisError";
   }
-  if (cachedVersions === void 0 || cachedVersions.length === 0) {
-    return [];
+  queriesStatusReport;
+  message;
+  error;
+};
+async function setupPythonExtractor(logger) {
+  const codeqlPython = process.env["CODEQL_PYTHON"];
+  if (codeqlPython === void 0 || codeqlPython.length === 0) {
+    return;
   }
-  const cachedVersionsSet = new Set(cachedVersions);
-  const overlayVersions = defaultCliVersion.enabledVersions.filter(
-    (v) => cachedVersionsSet.has(v.cliVersion)
+  logger.warning(
+    "The CODEQL_PYTHON environment variable is no longer supported. Please remove it from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies.\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'."
   );
-  if (overlayVersions.length === 0) {
-    return [];
-  }
-  const isCachedVersionDifferent = overlayVersions[0].cliVersion !== defaultCliVersion.enabledVersions[0].cliVersion;
-  if (isCachedVersionDifferent) {
-    addNoLanguageDiagnostic(
-      void 0,
-      makeTelemetryDiagnostic(
-        "codeql-action/overlay-aware-default-codeql-version",
-        "Overlay-aware default CodeQL version selection",
-        {
-          cachedVersions,
-          enabledVersions: defaultCliVersion.enabledVersions.map(
-            (v) => v.cliVersion
-          ),
-          isDryRun,
-          overlayAwareVersion: overlayVersions[0].cliVersion
+  return;
+}
+async function runExtraction(codeql, features, config, logger) {
+  for (const language of config.languages) {
+    if (dbIsFinalized(config, language, logger)) {
+      logger.debug(
+        `Database for ${language} has already been finalized, skipping extraction.`
+      );
+      continue;
+    }
+    if (await shouldExtractLanguage(codeql, config, language)) {
+      logger.startGroup(`Extracting ${language}`);
+      if (language === "python" /* python */) {
+        await setupPythonExtractor(logger);
+      }
+      if (config.buildMode) {
+        if (language === "cpp" /* cpp */ && config.buildMode === "autobuild" /* Autobuild */) {
+          await setupCppAutobuild(codeql, logger);
         }
-      )
-    );
-  }
-  if (isDryRun) {
-    logger.debug(
-      `Overlay-aware default CodeQL version selection is running in dry-run mode. Would have used version ${overlayVersions[0].cliVersion}.`
-    );
-    return [];
+        if (language === "java" /* java */ && config.buildMode === "none" /* None */) {
+          process.env["CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_DEPENDENCY_DIR"] = getJavaTempDependencyDir();
+        }
+        if (language === "csharp" /* csharp */ && config.buildMode === "none" /* None */ && await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */)) {
+          process.env["CODEQL_EXTRACTOR_CSHARP_OPTION_BUILDLESS_DEPENDENCY_DIR"] = getCsharpTempDependencyDir();
+        }
+        await codeql.extractUsingBuildMode(config, language);
+      } else {
+        await codeql.extractScannedLanguage(config, language);
+      }
+      logger.endGroup();
+    }
   }
-  return overlayVersions;
 }
-async function resolveDefaultCliVersion(defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
-  if (!useOverlayAwareDefaultCliVersion || !isAnalyzingPullRequest()) {
-    return defaultCliVersion.enabledVersions[0];
-  }
-  const overlayVersions = await getEnabledVersionsWithOverlayBaseDatabases(
-    defaultCliVersion,
-    rawLanguages,
-    features,
-    logger
-  );
-  if (overlayVersions.length > 0) {
-    logger.info(
-      `Using CodeQL version ${overlayVersions[0].cliVersion} since this is the highest enabled version that has a cached overlay-base database.`
+async function shouldExtractLanguage(codeql, config, language) {
+  return config.buildMode === "none" /* None */ || config.buildMode === "autobuild" /* Autobuild */ && process.env["CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */] !== "true" || !config.buildMode && await codeql.isScannedLanguage(language);
+}
+function dbIsFinalized(config, language, logger) {
+  const dbPath = getCodeQLDatabasePath(config, language);
+  try {
+    const dbInfo = load(
+      fs16.readFileSync(path15.resolve(dbPath, "codeql-database.yml"), "utf8")
     );
-    return overlayVersions[0];
+    return !("inProgress" in dbInfo);
+  } catch {
+    logger.warning(
+      `Could not check whether database for ${language} was finalized. Assuming it is not.`
+    );
+    return false;
   }
-  return defaultCliVersion.enabledVersions[0];
 }
-async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
-  if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
-    logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
-    const compressionMethod2 = inferCompressionMethod(toolsInput);
-    if (compressionMethod2 === void 0) {
-      throw new ConfigurationError(
-        `Could not infer compression method from path ${toolsInput}. Please specify a path ending in '.tar.gz' or '.tar.zst'.`
-      );
-    }
-    return {
-      codeqlTarPath: toolsInput,
-      compressionMethod: compressionMethod2,
-      sourceType: "local",
-      toolsVersion: "local"
-    };
-  }
-  let cliVersion2;
-  let tagName;
-  let url2;
-  const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode();
-  const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */);
-  const forceNightly = forceNightlyValueFF && canForceNightlyWithFF;
-  const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput);
-  if (forceNightly || nightlyRequestedByToolsInput) {
-    if (forceNightly) {
+async function finalizeDatabaseCreation(codeql, features, config, threadsFlag, memoryFlag, logger) {
+  const extractionStart = import_perf_hooks3.performance.now();
+  await runExtraction(codeql, features, config, logger);
+  const extractionTime = import_perf_hooks3.performance.now() - extractionStart;
+  const trapImportStart = import_perf_hooks3.performance.now();
+  for (const language of config.languages) {
+    if (dbIsFinalized(config, language, logger)) {
       logger.info(
-        `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.`
-      );
-      addNoLanguageDiagnostic(
-        void 0,
-        makeDiagnostic(
-          "codeql-action/forced-nightly-cli",
-          "A nightly release of CodeQL was used",
-          {
-            markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.",
-            visibility: {
-              cliSummaryTable: true,
-              statusPage: true,
-              telemetry: true
-            },
-            severity: "note"
-          }
-        )
+        `There is already a finalized database for ${language} at the location where the CodeQL Action places databases, so we did not create one.`
       );
     } else {
-      logger.info(
-        `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
+      logger.startGroup(`Finalizing ${language}`);
+      await codeql.finalizeDatabase(
+        getCodeQLDatabasePath(config, language),
+        threadsFlag,
+        memoryFlag,
+        config.debugMode
       );
+      logger.endGroup();
     }
-    toolsInput = await getNightlyToolsUrl(logger);
   }
-  const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
-  if (forceShippedTools) {
-    cliVersion2 = cliVersion;
-    tagName = bundleVersion;
-    logger.info(
-      `'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
-    );
-    if (toolsInput === "latest") {
-      logger.warning(
-        "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
-      );
-    }
-  } else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
-    let latestToolcacheVersion;
-    const allowToolcacheValueFF = await features.getValue(
-      "allow_toolcache_input" /* AllowToolcacheInput */
-    );
-    const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
-    if (allowToolcacheValue) {
-      logger.info(
-        `Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
-      );
-      latestToolcacheVersion = getLatestToolcacheVersion(logger);
-      if (latestToolcacheVersion) {
-        cliVersion2 = latestToolcacheVersion;
-      }
-    }
-    if (latestToolcacheVersion === void 0) {
-      if (allowToolcacheValue) {
+  const trapImportTime = import_perf_hooks3.performance.now() - trapImportStart;
+  return {
+    scanned_language_extraction_duration_ms: Math.round(extractionTime),
+    trap_import_duration_ms: Math.round(trapImportTime)
+  };
+}
+async function setupDiffInformedQueryRun(logger) {
+  return await withGroupAsync(
+    "Generating diff range extension pack",
+    async () => {
+      const diffRanges = readDiffRangesJsonFile(logger);
+      if (diffRanges === void 0) {
         logger.info(
-          `Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
+          "No precomputed diff ranges found; skipping diff-informed analysis stage."
         );
-      } else {
-        if (allowToolcacheValueFF) {
-          logger.warning(
-            `Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
-          );
-        } else {
-          logger.info(
-            `Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
-          );
-        }
+        return void 0;
       }
-      const version = await resolveDefaultCliVersion(
-        defaultCliVersion,
-        rawLanguages,
-        useOverlayAwareDefaultCliVersion,
-        features,
-        logger
+      const checkoutPath = getRequiredInput("checkout_path");
+      const packDir = writeDiffRangeDataExtensionPack(
+        logger,
+        diffRanges,
+        checkoutPath
       );
-      cliVersion2 = version.cliVersion;
-      tagName = version.tagName;
-    }
-  } else if (toolsInput !== void 0) {
-    tagName = tryGetTagNameFromUrl(toolsInput, logger);
-    url2 = toolsInput;
-    if (tagName) {
-      const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger);
-      if (bundleVersion3 && semver9.valid(bundleVersion3)) {
-        cliVersion2 = convertToSemVer(bundleVersion3, logger);
-      }
+      logger.info(
+        `Successfully created diff range extension pack at ${packDir}.`
+      );
+      return packDir;
     }
-  } else {
-    const version = await resolveDefaultCliVersion(
-      defaultCliVersion,
-      rawLanguages,
-      useOverlayAwareDefaultCliVersion,
-      features,
-      logger
-    );
-    cliVersion2 = version.cliVersion;
-    tagName = version.tagName;
+  );
+}
+function diffRangeExtensionPackContents(ranges, checkoutPath) {
+  const header = `
+extensions:
+  - addsTo:
+      pack: codeql/util
+      extensible: restrictAlertsTo
+      checkPresence: false
+    data:
+`;
+  let data = ranges.map((range2) => {
+    const filename = path15.join(checkoutPath, range2.path).replaceAll(path15.sep, "/");
+    return `      - [${dump(filename, { forceQuotes: true, quoteStyle: "single" }).trim()}, ${range2.startLine}, ${range2.endLine}]
+`;
+  }).join("");
+  if (!data) {
+    data = '      - ["", 0, 0]\n';
   }
-  const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger);
-  const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown";
+  return header + data;
+}
+function writeDiffRangeDataExtensionPack(logger, ranges, checkoutPath) {
+  if (ranges.length === 0) {
+    ranges = [{ path: "", startLine: 0, endLine: 0 }];
+  }
+  const diffRangeDir = path15.join(getTemporaryDirectory(), "pr-diff-range");
+  fs16.mkdirSync(diffRangeDir, { recursive: true });
+  fs16.writeFileSync(
+    path15.join(diffRangeDir, "qlpack.yml"),
+    `
+name: codeql-action/pr-diff-range
+version: 0.0.0
+library: true
+extensionTargets:
+  codeql/util: '*'
+dataExtensions:
+  - pr-diff-range.yml
+`
+  );
+  const extensionContents = diffRangeExtensionPackContents(
+    ranges,
+    checkoutPath
+  );
+  const extensionFilePath = path15.join(diffRangeDir, "pr-diff-range.yml");
+  fs16.writeFileSync(extensionFilePath, extensionContents);
   logger.debug(
-    `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.`
+    `Wrote pr-diff-range extension pack to ${extensionFilePath}:
+${extensionContents}`
   );
-  let codeqlFolder;
-  if (cliVersion2) {
-    codeqlFolder = toolcache3.find("CodeQL", cliVersion2);
-    if (!codeqlFolder) {
-      logger.debug(
-        `Didn't find a version of the CodeQL tools in the toolcache with a version number exactly matching ${cliVersion2}.`
-      );
-      const allVersions = toolcache3.findAllVersions("CodeQL");
-      logger.debug(
-        `Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(
-          allVersions
-        )}.`
-      );
-      const candidateVersions = allVersions.filter(
-        (version) => version.startsWith(`${cliVersion2}-`)
+  return diffRangeDir;
+}
+var defaultSuites = /* @__PURE__ */ new Set([
+  "security-experimental",
+  "security-extended",
+  "security-and-quality",
+  "code-quality",
+  "code-scanning"
+]);
+function resolveQuerySuiteAlias(language, maybeSuite) {
+  if (defaultSuites.has(maybeSuite)) {
+    return `${language}-${maybeSuite}.qls`;
+  }
+  return maybeSuite;
+}
+function addSarifExtension(analysis, base) {
+  return `${base}${analysis.sarifExtension}`;
+}
+async function runQueries(sarifFolder, memoryFlag, threadsFlag, diffRangePackDir, automationDetailsId, codeql, config, logger, features) {
+  const statusReport = {};
+  const queryFlags = [memoryFlag, threadsFlag];
+  const incrementalMode = [];
+  if (config.overlayDatabaseMode !== "overlay-base" /* OverlayBase */) {
+    queryFlags.push("--expect-discarded-cache");
+  }
+  statusReport.analysis_is_diff_informed = diffRangePackDir !== void 0;
+  if (diffRangePackDir) {
+    queryFlags.push(`--additional-packs=${diffRangePackDir}`);
+    queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
+    incrementalMode.push("diff-informed");
+  }
+  statusReport.analysis_is_overlay = config.overlayDatabaseMode === "overlay" /* Overlay */;
+  statusReport.analysis_builds_overlay_base_database = config.overlayDatabaseMode === "overlay-base" /* OverlayBase */;
+  if (config.overlayDatabaseMode === "overlay" /* Overlay */) {
+    incrementalMode.push("overlay");
+  }
+  const sarifRunPropertyFlag = incrementalMode.length > 0 ? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}` : void 0;
+  const dbAnalysisConfig = getPrimaryAnalysisConfig(config);
+  for (const language of config.languages) {
+    try {
+      const queries = [];
+      if (config.analysisKinds.length > 1) {
+        queries.push(getGeneratedSuitePath(config, language));
+        if (isCodeQualityEnabled(config)) {
+          for (const qualityQuery of codeQualityQueries) {
+            queries.push(resolveQuerySuiteAlias(language, qualityQuery));
+          }
+        }
+      }
+      logger.startGroup(`Running queries for ${language}`);
+      const startTimeRunQueries = (/* @__PURE__ */ new Date()).getTime();
+      const databasePath = getCodeQLDatabasePath(config, language);
+      await codeql.databaseRunQueries(databasePath, queryFlags, queries);
+      logger.debug(`Finished running queries for ${language}.`);
+      statusReport[`analyze_builtin_queries_${language}_duration_ms`] = (/* @__PURE__ */ new Date()).getTime() - startTimeRunQueries;
+      const startTimeInterpretResults = /* @__PURE__ */ new Date();
+      const { summary: analysisSummary, sarifFile } = await runInterpretResultsFor(
+        dbAnalysisConfig,
+        language,
+        void 0,
+        config.debugMode
       );
-      if (candidateVersions.length === 1) {
-        logger.debug(
-          `Exactly one version of the CodeQL tools starting with ${cliVersion2} found in the toolcache, using that.`
-        );
-        codeqlFolder = toolcache3.find("CodeQL", candidateVersions[0]);
-      } else if (candidateVersions.length === 0) {
-        logger.debug(
-          `Didn't find any versions of the CodeQL tools starting with ${cliVersion2} in the toolcache. Trying next fallback method.`
+      let qualityAnalysisSummary;
+      if (config.analysisKinds.length > 1 && isCodeQualityEnabled(config)) {
+        const qualityResult = await runInterpretResultsFor(
+          CodeQuality,
+          language,
+          codeQualityQueries.map(
+            (i) => resolveQuerySuiteAlias(language, i)
+          ),
+          config.debugMode
         );
-      } else {
-        logger.warning(
-          `Found ${candidateVersions.length} versions of the CodeQL tools starting with ${cliVersion2} in the toolcache, but at most one was expected.`
+        qualityAnalysisSummary = qualityResult.summary;
+      }
+      const endTimeInterpretResults = /* @__PURE__ */ new Date();
+      statusReport[`interpret_results_${language}_duration_ms`] = endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
+      logger.endGroup();
+      if (analysisSummary.trim()) {
+        logger.info(analysisSummary);
+      }
+      if (qualityAnalysisSummary?.trim()) {
+        logger.info(qualityAnalysisSummary);
+      }
+      if (!config.enableFileCoverageInformation) {
+        logger.info(
+          "To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches."
         );
-        logger.debug("Trying next fallback method.");
       }
-    }
-  }
-  if (!codeqlFolder && tagName) {
-    const fallbackVersion = await tryGetFallbackToolcacheVersion(
-      cliVersion2,
-      tagName,
-      logger
-    );
-    if (fallbackVersion) {
-      codeqlFolder = toolcache3.find("CodeQL", fallbackVersion);
-    } else {
-      logger.debug(
-        `Could not determine a fallback toolcache version number for CodeQL tools version ${humanReadableVersion}.`
+      if (await features.getValue("qa_telemetry_enabled" /* QaTelemetryEnabled */)) {
+        const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile);
+        const perQueryAlertCountEventReport = {
+          event: "codeql database interpret-results",
+          started_at: startTimeInterpretResults.toISOString(),
+          completed_at: endTimeInterpretResults.toISOString(),
+          exit_status: "success",
+          language,
+          properties: {
+            alertCounts: perQueryAlertCounts
+          }
+        };
+        if (statusReport["event_reports"] === void 0) {
+          statusReport["event_reports"] = [];
+        }
+        statusReport["event_reports"].push(perQueryAlertCountEventReport);
+      }
+    } catch (e) {
+      statusReport.analyze_failure_language = language;
+      throw new CodeQLAnalysisError(
+        statusReport,
+        `Error running analysis for ${language}: ${getErrorMessage(e)}`,
+        wrapError(e)
       );
     }
   }
-  if (codeqlFolder) {
-    logger.info(
-      `Found CodeQL tools version ${humanReadableVersion} in the toolcache.`
+  return statusReport;
+  async function runInterpretResultsFor(analysis, language, queries, enableDebugLogging) {
+    logger.info(`Interpreting ${analysis.name} results for ${language}`);
+    const category = analysis.fixCategory(logger, automationDetailsId);
+    const sarifFile = path15.join(
+      sarifFolder,
+      addSarifExtension(analysis, language)
     );
-  } else {
-    logger.info(
-      `Did not find CodeQL tools version ${humanReadableVersion} in the toolcache.`
+    const summary = await runInterpretResults(
+      language,
+      queries,
+      sarifFile,
+      enableDebugLogging,
+      category
     );
+    return { summary, sarifFile };
   }
-  if (codeqlFolder) {
-    if (cliVersion2) {
-      logger.info(
-        `Using CodeQL CLI version ${cliVersion2} from toolcache at ${codeqlFolder}`
-      );
-    } else {
-      logger.info(`Using CodeQL CLI from toolcache at ${codeqlFolder}`);
-    }
-    return {
-      codeqlFolder,
-      sourceType: "toolcache",
-      toolsVersion: cliVersion2 ?? humanReadableVersion
-    };
+  async function runInterpretResults(language, queries, sarifFile, enableDebugLogging, category) {
+    const databasePath = getCodeQLDatabasePath(config, language);
+    return await codeql.databaseInterpretResults(
+      databasePath,
+      queries,
+      sarifFile,
+      threadsFlag,
+      enableDebugLogging ? "-vv" : "-v",
+      sarifRunPropertyFlag,
+      category,
+      config,
+      features
+    );
   }
-  if (variant === "GitHub Enterprise Server" /* GHES */ && !forceShippedTools && !toolsInput) {
-    const result = await findOverridingToolsInCache(
-      humanReadableVersion,
-      logger
+  function getPerQueryAlertCounts(sarifPath) {
+    const sarifObject = JSON.parse(
+      fs16.readFileSync(sarifPath, "utf8")
     );
-    if (result !== void 0) {
-      return result;
+    const perQueryAlertCounts = {};
+    for (const sarifRun of sarifObject.runs) {
+      if (sarifRun.results) {
+        for (const result of sarifRun.results) {
+          const query = result.rule?.id || result.ruleId;
+          if (query) {
+            perQueryAlertCounts[query] = (perQueryAlertCounts[query] || 0) + 1;
+          }
+        }
+      }
     }
+    return perQueryAlertCounts;
   }
-  let compressionMethod;
-  if (!url2) {
-    compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip";
-    url2 = await getCodeQLBundleDownloadURL(
-      tagName,
-      apiDetails,
-      compressionMethod,
-      logger
-    );
-  } else {
-    const method = inferCompressionMethod(url2);
-    if (method === void 0) {
-      throw new ConfigurationError(
-        `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.`
-      );
+}
+async function runFinalize(features, outputDir, threadsFlag, memoryFlag, codeql, config, logger) {
+  try {
+    await fs16.promises.rm(outputDir, { force: true, recursive: true });
+  } catch (error3) {
+    if (error3?.code !== "ENOENT") {
+      throw error3;
     }
-    compressionMethod = method;
   }
-  if (cliVersion2) {
-    logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`);
-  } else {
-    logger.info(`Using CodeQL CLI sourced from ${url2} .`);
+  await fs16.promises.mkdir(outputDir, { recursive: true });
+  const timings = await finalizeDatabaseCreation(
+    codeql,
+    features,
+    config,
+    threadsFlag,
+    memoryFlag,
+    logger
+  );
+  if (process.env["CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */] !== "true") {
+    await endTracingForCluster(codeql, config, logger);
   }
-  return {
-    bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger),
-    cliVersion: cliVersion2,
-    codeqlURL: url2,
-    compressionMethod,
-    sourceType: "download",
-    toolsVersion: cliVersion2 ?? humanReadableVersion
-  };
+  return timings;
 }
-async function tryGetFallbackToolcacheVersion(cliVersion2, tagName, logger) {
-  const bundleVersion2 = tryGetBundleVersionFromTagName(tagName, logger);
-  if (!bundleVersion2) {
-    return void 0;
+async function warnIfGoInstalledAfterInit(config, logger) {
+  const goInitPath = process.env["CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */];
+  if (process.env["CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */] !== "true" && goInitPath !== void 0) {
+    const goBinaryPath = await io5.which("go", true);
+    if (goInitPath !== goBinaryPath) {
+      logger.warning(
+        `Expected \`which go\` to return ${goInitPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`
+      );
+      addDiagnostic(
+        config,
+        "go" /* go */,
+        makeDiagnostic(
+          "go/workflow/go-installed-after-codeql-init",
+          "Go was installed after the `codeql-action/init` Action was run",
+          {
+            markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
+            visibility: {
+              statusPage: true,
+              telemetry: true,
+              cliSummaryTable: true
+            },
+            severity: "warning"
+          }
+        )
+      );
+    }
   }
-  const fallbackVersion = convertToSemVer(bundleVersion2, logger);
-  logger.debug(
-    `Computed a fallback toolcache version number of ${fallbackVersion} for CodeQL version ${cliVersion2 ?? tagName}.`
-  );
-  return fallbackVersion;
 }
-var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVersion, maybeCliVersion, apiDetails, tarVersion, tempDir, logger) {
-  const parsedCodeQLURL = new URL(codeqlURL);
-  const searchParams = new URLSearchParams(parsedCodeQLURL.search);
-  const headers = {
-    accept: "application/octet-stream"
-  };
-  let authorization = void 0;
-  if (searchParams.has("token")) {
-    logger.debug("CodeQL tools URL contains an authorization token.");
-  } else {
-    authorization = getAuthorizationHeaderFor(
-      logger,
-      apiDetails,
-      codeqlURL
-    );
+
+// src/database-upload.ts
+var fs17 = __toESM(require("fs"));
+async function cleanupAndUploadDatabases(repositoryNwo, codeql, config, apiDetails, features, logger) {
+  if (getRequiredInput("upload-database") !== "true") {
+    logger.debug("Database upload disabled in workflow. Skipping upload.");
+    return [];
   }
-  const toolcacheInfo = getToolcacheDestinationInfo(
-    maybeBundleVersion,
-    maybeCliVersion,
-    logger
-  );
-  const extractedBundlePath = toolcacheInfo?.path ?? getTempExtractionDir(tempDir);
-  const statusReport = await downloadAndExtract(
-    codeqlURL,
-    compressionMethod,
-    extractedBundlePath,
-    authorization,
-    { "User-Agent": "CodeQL Action", ...headers },
-    tarVersion,
-    logger
-  );
-  if (!toolcacheInfo) {
+  if (!config.analysisKinds.includes("code-scanning" /* CodeScanning */)) {
     logger.debug(
-      `Could not cache CodeQL tools because we could not determine the bundle version from the URL ${codeqlURL}.`
+      `Not uploading database because 'analysis-kinds: ${"code-scanning" /* CodeScanning */}' is not enabled.`
     );
-    return {
-      codeqlFolder: extractedBundlePath,
-      statusReport,
-      toolsVersion: maybeCliVersion ?? "unknown"
-    };
+    return [];
   }
-  writeToolcacheMarkerFile(toolcacheInfo.path, logger);
-  return {
-    codeqlFolder: extractedBundlePath,
-    statusReport,
-    toolsVersion: maybeCliVersion ?? toolcacheInfo.version
-  };
-};
-function getToolcacheDestinationInfo(maybeBundleVersion, maybeCliVersion, logger) {
-  if (maybeBundleVersion) {
-    const version = getCanonicalToolcacheVersion(
-      maybeCliVersion,
-      maybeBundleVersion,
-      logger
-    );
-    return {
-      path: getToolcacheDirectory(version),
-      version
-    };
+  if (isInTestMode()) {
+    logger.debug("In test mode. Skipping database upload.");
+    return [];
   }
-  return void 0;
-}
-function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
-  if (!cliVersion2?.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
-    return convertToSemVer(bundleVersion2, logger);
+  if (config.gitHubVersion.type !== "GitHub.com" /* DOTCOM */ && config.gitHubVersion.type !== "GitHub Enterprise Cloud with data residency" /* GHEC_DR */) {
+    logger.debug("Not running against github.com or GHEC-DR. Skipping upload.");
+    return [];
   }
-  return cliVersion2;
-}
-async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
-  if (!await isBinaryAccessible("tar", logger)) {
-    throw new ConfigurationError(
-      "Could not find tar in PATH, so unable to extract CodeQL bundle."
-    );
+  if (!await isAnalyzingDefaultBranch()) {
+    logger.debug("Not analyzing default branch. Skipping upload.");
+    return [];
   }
-  const zstdAvailability = await isZstdAvailable(logger);
-  const source = await getCodeQLSource(
-    toolsInput,
-    defaultCliVersion,
-    rawLanguages,
-    useOverlayAwareDefaultCliVersion,
-    apiDetails,
-    variant,
-    zstdAvailability.available,
-    features,
-    logger
-  );
-  let codeqlFolder;
-  let toolsVersion = source.toolsVersion;
-  let toolsDownloadStatusReport;
-  let toolsSource;
-  switch (source.sourceType) {
-    case "local": {
-      codeqlFolder = await extract(
-        source.codeqlTarPath,
-        getTempExtractionDir(tempDir),
-        source.compressionMethod,
-        zstdAvailability.version,
-        logger
+  const shouldUploadOverlayBase = config.overlayDatabaseMode === "overlay-base" /* OverlayBase */ && await features.getValue("upload_overlay_db_to_api" /* UploadOverlayDbToApi */, codeql);
+  const cleanupLevel = shouldUploadOverlayBase ? "overlay" /* Overlay */ : "clear" /* Clear */;
+  await withGroupAsync("Cleaning up databases", async () => {
+    await codeql.databaseCleanupCluster(config, cleanupLevel);
+  });
+  const reports = [];
+  for (const language of config.languages) {
+    let bundledDbSize = void 0;
+    try {
+      const bundledDb = await bundleDb(config, language, codeql, language, {
+        includeDiagnostics: false
+      });
+      bundledDbSize = fs17.statSync(bundledDb).size;
+      const commitOid = await getCommitOid(
+        getRequiredInput("checkout_path")
       );
-      toolsSource = "LOCAL" /* Local */;
-      break;
-    }
-    case "toolcache":
-      codeqlFolder = source.codeqlFolder;
-      logger.debug(`CodeQL found in cache ${codeqlFolder}`);
-      toolsSource = "TOOLCACHE" /* Toolcache */;
-      break;
-    case "download": {
-      const result = await downloadCodeQL(
-        source.codeqlURL,
-        source.compressionMethod,
-        source.bundleVersion,
-        source.cliVersion,
-        apiDetails,
-        zstdAvailability.version,
-        tempDir,
-        logger
+      const maxAttempts = 4;
+      let uploadDurationMs;
+      for (let attempt = 1; attempt <= maxAttempts; attempt++) {
+        try {
+          uploadDurationMs = await uploadBundledDatabase(
+            repositoryNwo,
+            language,
+            commitOid,
+            bundledDb,
+            bundledDbSize,
+            apiDetails
+          );
+          break;
+        } catch (e) {
+          const httpError = asHTTPError(e);
+          const isRetryable = !httpError || !DO_NOT_RETRY_STATUSES.includes(httpError.status);
+          if (!isRetryable) {
+            throw e;
+          } else if (attempt === maxAttempts) {
+            logger.error(
+              `Maximum retry attempts exhausted (${attempt}), aborting database upload`
+            );
+            throw e;
+          }
+          const backoffMs = 15e3 * Math.pow(2, attempt - 1);
+          logger.debug(
+            `Database upload attempt ${attempt} of ${maxAttempts} failed for ${language}: ${getErrorMessage(e)}. Retrying in ${backoffMs / 1e3}s...`
+          );
+          await new Promise((resolve14) => setTimeout(resolve14, backoffMs));
+        }
+      }
+      reports.push({
+        language,
+        zipped_upload_size_bytes: bundledDbSize,
+        is_overlay_base: shouldUploadOverlayBase,
+        upload_duration_ms: uploadDurationMs
+      });
+      logger.debug(`Successfully uploaded database for ${language}`);
+    } catch (e) {
+      logger.warning(
+        `Failed to upload database for ${language}: ${getErrorMessage(e)}`
       );
-      toolsVersion = result.toolsVersion;
-      codeqlFolder = result.codeqlFolder;
-      toolsDownloadStatusReport = result.statusReport;
-      toolsSource = "DOWNLOAD" /* Download */;
-      break;
+      reports.push({
+        language,
+        error: getErrorMessage(e),
+        ...bundledDbSize !== void 0 ? { zipped_upload_size_bytes: bundledDbSize } : {}
+      });
     }
-    default:
-      assertNever(source);
   }
-  return {
-    codeqlFolder,
-    toolsDownloadStatusReport,
-    toolsSource,
-    toolsVersion,
-    zstdAvailability
-  };
-}
-async function useZstdBundle(cliVersion2, tarSupportsZstd) {
-  return (
-    // In testing, gzip performs better than zstd on Windows.
-    process.platform !== "win32" && tarSupportsZstd && semver9.gte(cliVersion2, CODEQL_VERSION_ZSTD_BUNDLE)
-  );
-}
-function getTempExtractionDir(tempDir) {
-  return path12.join(tempDir, v4_default());
-}
-async function getNightlyToolsUrl(logger) {
-  const zstdAvailability = await isZstdAvailable(logger);
-  const compressionMethod = await useZstdBundle(
-    CODEQL_VERSION_ZSTD_BUNDLE,
-    zstdAvailability.available
-  ) ? "zstd" : "gzip";
-  try {
-    const release2 = await getApiClient().rest.repos.listReleases({
-      owner: CODEQL_NIGHTLIES_REPOSITORY_OWNER,
-      repo: CODEQL_NIGHTLIES_REPOSITORY_NAME,
-      per_page: 1,
-      page: 1,
-      prerelease: true
-    });
-    const latestRelease = release2.data[0];
-    if (!latestRelease) {
-      throw new Error("Could not find the latest nightly release.");
-    }
-    return `https://github.com/${CODEQL_NIGHTLIES_REPOSITORY_OWNER}/${CODEQL_NIGHTLIES_REPOSITORY_NAME}/releases/download/${latestRelease.tag_name}/${getCodeQLBundleName(compressionMethod)}`;
-  } catch (e) {
-    throw new Error(
-      `Failed to retrieve the latest nightly release: ${wrapError(e)}`
+  if (shouldUploadOverlayBase && !config.debugMode) {
+    await withGroupAsync(
+      "Measuring database size at the clear cleanup level",
+      () => recordClearCleanupSizes(codeql, config, reports, logger)
     );
   }
+  return reports;
 }
-function getLatestToolcacheVersion(logger) {
-  const allVersions = toolcache3.findAllVersions("CodeQL").sort((a, b) => semver9.compare(b, a));
-  logger.debug(
-    `Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(
-      allVersions
-    )}.`
-  );
-  if (allVersions.length > 0) {
-    const latestToolcacheVersion = allVersions[0];
-    logger.info(
-      `CLI version ${latestToolcacheVersion} is the latest version in the toolcache.`
+async function recordClearCleanupSizes(codeql, config, reports, logger) {
+  const startTime = performance.now();
+  try {
+    await codeql.databaseCleanupCluster(config, "clear" /* Clear */);
+  } catch (e) {
+    logger.warning(
+      `Failed to clean up databases at the '${"clear" /* Clear */}' level for size measurement: ${getErrorMessage(e)}`
     );
-    return latestToolcacheVersion;
+    return;
   }
-  return void 0;
-}
-function isReservedToolsValue(tools) {
-  return CODEQL_BUNDLE_VERSION_ALIAS.includes(tools) || CODEQL_NIGHTLY_TOOLS_INPUTS.includes(tools) || tools === CODEQL_TOOLCACHE_INPUT;
-}
-
-// src/tracer-config.ts
-var fs14 = __toESM(require("fs"));
-var path13 = __toESM(require("path"));
-async function shouldEnableIndirectTracing(codeql, config) {
-  if (config.buildMode === "none" /* None */) {
-    return false;
+  for (const language of config.languages) {
+    const report = reports.find((r) => r.language === language);
+    if (report === void 0) {
+      continue;
+    }
+    try {
+      const bundledDb = await bundleDb(config, language, codeql, language, {
+        includeDiagnostics: false
+      });
+      report.clear_cleanup_zipped_size_bytes = fs17.statSync(bundledDb).size;
+      logger.debug(
+        `Database for ${language} is ${report.clear_cleanup_zipped_size_bytes} bytes zipped at the '${"clear" /* Clear */}' cleanup level (vs. ${report.zipped_upload_size_bytes ?? "unknown"} bytes at the '${"overlay" /* Overlay */}' level).`
+      );
+    } catch (e) {
+      logger.warning(
+        `Failed to measure the '${"clear" /* Clear */}' cleanup database size for ${language}: ${getErrorMessage(e)}`
+      );
+    }
   }
-  if (config.buildMode === "autobuild" /* Autobuild */) {
-    return false;
+  const durationMs = performance.now() - startTime;
+  for (const report of reports) {
+    report.clear_cleanup_measurement_duration_ms = durationMs;
   }
-  return asyncSome(config.languages, (l) => codeql.isTracedLanguage(l));
 }
-async function endTracingForCluster(codeql, config, logger) {
-  if (!await shouldEnableIndirectTracing(codeql, config)) return;
-  logger.info(
-    "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced."
-  );
-  const envVariablesFile = path13.resolve(
-    config.dbLocation,
-    "temp/tracingEnvironment/end-tracing.json"
-  );
-  if (!fs14.existsSync(envVariablesFile)) {
-    throw new Error(
-      `Environment file for ending tracing not found: ${envVariablesFile}`
-    );
+async function uploadBundledDatabase(repositoryNwo, language, commitOid, bundledDb, bundledDbSize, apiDetails) {
+  const client = getApiClient();
+  const uploadsUrl = new URL(parseGitHubUrl(apiDetails.url));
+  uploadsUrl.hostname = `uploads.${uploadsUrl.hostname}`;
+  let uploadsBaseUrl = uploadsUrl.toString();
+  if (uploadsBaseUrl.endsWith("/")) {
+    uploadsBaseUrl = uploadsBaseUrl.slice(0, -1);
   }
+  const bundledDbReadStream = fs17.createReadStream(bundledDb);
   try {
-    const endTracingEnvVariables = JSON.parse(
-      fs14.readFileSync(envVariablesFile, "utf8")
-    );
-    for (const [key, value] of Object.entries(endTracingEnvVariables)) {
-      if (value !== null) {
-        process.env[key] = value;
-      } else {
-        delete process.env[key];
+    const startTime = performance.now();
+    await client.request(
+      `POST /repos/:owner/:repo/code-scanning/codeql/databases/:language?name=:name&commit_oid=:commit_oid`,
+      {
+        baseUrl: uploadsBaseUrl,
+        owner: repositoryNwo.owner,
+        repo: repositoryNwo.repo,
+        language,
+        name: `${language}-database`,
+        commit_oid: commitOid,
+        data: bundledDbReadStream,
+        headers: {
+          authorization: `token ${apiDetails.auth}`,
+          "Content-Type": "application/zip",
+          "Content-Length": bundledDbSize
+        },
+        // Disable `octokit/plugin-retry.js`, since the request body is a ReadStream which can only be consumed once.
+        request: {
+          retries: 0
+        }
       }
-    }
-  } catch (e) {
-    throw new Error(
-      `Failed to parse file containing end tracing environment variables: ${e}`
     );
+    return performance.now() - startTime;
+  } finally {
+    bundledDbReadStream.close();
   }
 }
-async function getTracerConfigForCluster(config) {
-  const tracingEnvVariables = JSON.parse(
-    fs14.readFileSync(
-      path13.resolve(
-        config.dbLocation,
-        "temp/tracingEnvironment/start-tracing.json"
-      ),
-      "utf8"
-    )
-  );
-  return {
-    env: tracingEnvVariables
-  };
-}
-async function getCombinedTracerConfig(codeql, config) {
-  if (!await shouldEnableIndirectTracing(codeql, config)) {
-    return void 0;
-  }
-  return await getTracerConfigForCluster(config);
-}
 
-// src/codeql.ts
-var cachedCodeQL = void 0;
-var CODEQL_MINIMUM_VERSION = "2.19.4";
-var CODEQL_NEXT_MINIMUM_VERSION = "2.19.4";
-var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.15";
-var GHES_MOST_RECENT_DEPRECATION_DATE = "2026-04-09";
-var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
-async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger, checkVersion) {
-  try {
-    const {
-      codeqlFolder,
-      toolsDownloadStatusReport,
-      toolsSource,
-      toolsVersion,
-      zstdAvailability
-    } = await setupCodeQLBundle(
-      toolsInput,
-      apiDetails,
-      tempDir,
-      variant,
-      defaultCliVersion,
-      rawLanguages,
-      useOverlayAwareDefaultCliVersion,
-      features,
-      logger
-    );
-    logger.debug(
-      `Bundle download status report: ${JSON.stringify(
-        toolsDownloadStatusReport
-      )}`
-    );
-    let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql");
-    if (process.platform === "win32") {
-      codeqlCmd += ".exe";
-    } else if (process.platform !== "linux" && process.platform !== "darwin") {
-      throw new ConfigurationError(
-        `Unsupported platform: ${process.platform}`
-      );
-    }
-    cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
-    return {
-      codeql: cachedCodeQL,
-      toolsDownloadStatusReport,
-      toolsSource,
-      toolsVersion,
-      zstdAvailability
-    };
-  } catch (rawError) {
-    const e = wrapApiConfigurationError(rawError);
-    const ErrorClass = e instanceof ConfigurationError || e instanceof Error && e.message.includes("ENOSPC") ? ConfigurationError : Error;
-    throw new ErrorClass(
-      `Unable to download and extract CodeQL CLI: ${getErrorMessage(e)}${e instanceof Error && e.stack ? `
+// src/upload-lib.ts
+var upload_lib_exports = {};
+__export(upload_lib_exports, {
+  buildPayload: () => buildPayload,
+  filterAlertsByDiffRange: () => filterAlertsByDiffRange,
+  findSarifFilesInDir: () => findSarifFilesInDir,
+  getGroupedSarifFilePaths: () => getGroupedSarifFilePaths,
+  populateRunAutomationDetails: () => populateRunAutomationDetails,
+  postProcessSarifFiles: () => postProcessSarifFiles,
+  readSarifFileOrThrow: () => readSarifFileOrThrow,
+  shouldConsiderConfigurationError: () => shouldConsiderConfigurationError,
+  shouldConsiderInvalidRequest: () => shouldConsiderInvalidRequest,
+  shouldShowCombineSarifFilesDeprecationWarning: () => shouldShowCombineSarifFilesDeprecationWarning,
+  throwIfCombineSarifFilesDisabled: () => throwIfCombineSarifFilesDisabled,
+  uploadFiles: () => uploadFiles,
+  uploadPayload: () => uploadPayload,
+  uploadPostProcessedFiles: () => uploadPostProcessedFiles,
+  validateSarifFileSchema: () => validateSarifFileSchema,
+  validateUniqueCategory: () => validateUniqueCategory,
+  waitForProcessing: () => waitForProcessing,
+  writePostProcessedFiles: () => writePostProcessedFiles
+});
+var fs21 = __toESM(require("fs"));
+var path18 = __toESM(require("path"));
+var url = __toESM(require("url"));
+var import_zlib = __toESM(require("zlib"));
+var core15 = __toESM(require_core());
+var jsonschema2 = __toESM(require_lib2());
 
-Details: ${e.stack}` : ""}`
-    );
-  }
+// src/fingerprints.ts
+var fs18 = __toESM(require("fs"));
+var import_path3 = __toESM(require("path"));
+
+// node_modules/long/index.js
+var wasm = null;
+try {
+  wasm = new WebAssembly.Instance(
+    new WebAssembly.Module(
+      new Uint8Array([
+        // \0asm
+        0,
+        97,
+        115,
+        109,
+        // version 1
+        1,
+        0,
+        0,
+        0,
+        // section "type"
+        1,
+        13,
+        2,
+        // 0, () => i32
+        96,
+        0,
+        1,
+        127,
+        // 1, (i32, i32, i32, i32) => i32
+        96,
+        4,
+        127,
+        127,
+        127,
+        127,
+        1,
+        127,
+        // section "function"
+        3,
+        7,
+        6,
+        // 0, type 0
+        0,
+        // 1, type 1
+        1,
+        // 2, type 1
+        1,
+        // 3, type 1
+        1,
+        // 4, type 1
+        1,
+        // 5, type 1
+        1,
+        // section "global"
+        6,
+        6,
+        1,
+        // 0, "high", mutable i32
+        127,
+        1,
+        65,
+        0,
+        11,
+        // section "export"
+        7,
+        50,
+        6,
+        // 0, "mul"
+        3,
+        109,
+        117,
+        108,
+        0,
+        1,
+        // 1, "div_s"
+        5,
+        100,
+        105,
+        118,
+        95,
+        115,
+        0,
+        2,
+        // 2, "div_u"
+        5,
+        100,
+        105,
+        118,
+        95,
+        117,
+        0,
+        3,
+        // 3, "rem_s"
+        5,
+        114,
+        101,
+        109,
+        95,
+        115,
+        0,
+        4,
+        // 4, "rem_u"
+        5,
+        114,
+        101,
+        109,
+        95,
+        117,
+        0,
+        5,
+        // 5, "get_high"
+        8,
+        103,
+        101,
+        116,
+        95,
+        104,
+        105,
+        103,
+        104,
+        0,
+        0,
+        // section "code"
+        10,
+        191,
+        1,
+        6,
+        // 0, "get_high"
+        4,
+        0,
+        35,
+        0,
+        11,
+        // 1, "mul"
+        36,
+        1,
+        1,
+        126,
+        32,
+        0,
+        173,
+        32,
+        1,
+        173,
+        66,
+        32,
+        134,
+        132,
+        32,
+        2,
+        173,
+        32,
+        3,
+        173,
+        66,
+        32,
+        134,
+        132,
+        126,
+        34,
+        4,
+        66,
+        32,
+        135,
+        167,
+        36,
+        0,
+        32,
+        4,
+        167,
+        11,
+        // 2, "div_s"
+        36,
+        1,
+        1,
+        126,
+        32,
+        0,
+        173,
+        32,
+        1,
+        173,
+        66,
+        32,
+        134,
+        132,
+        32,
+        2,
+        173,
+        32,
+        3,
+        173,
+        66,
+        32,
+        134,
+        132,
+        127,
+        34,
+        4,
+        66,
+        32,
+        135,
+        167,
+        36,
+        0,
+        32,
+        4,
+        167,
+        11,
+        // 3, "div_u"
+        36,
+        1,
+        1,
+        126,
+        32,
+        0,
+        173,
+        32,
+        1,
+        173,
+        66,
+        32,
+        134,
+        132,
+        32,
+        2,
+        173,
+        32,
+        3,
+        173,
+        66,
+        32,
+        134,
+        132,
+        128,
+        34,
+        4,
+        66,
+        32,
+        135,
+        167,
+        36,
+        0,
+        32,
+        4,
+        167,
+        11,
+        // 4, "rem_s"
+        36,
+        1,
+        1,
+        126,
+        32,
+        0,
+        173,
+        32,
+        1,
+        173,
+        66,
+        32,
+        134,
+        132,
+        32,
+        2,
+        173,
+        32,
+        3,
+        173,
+        66,
+        32,
+        134,
+        132,
+        129,
+        34,
+        4,
+        66,
+        32,
+        135,
+        167,
+        36,
+        0,
+        32,
+        4,
+        167,
+        11,
+        // 5, "rem_u"
+        36,
+        1,
+        1,
+        126,
+        32,
+        0,
+        173,
+        32,
+        1,
+        173,
+        66,
+        32,
+        134,
+        132,
+        32,
+        2,
+        173,
+        32,
+        3,
+        173,
+        66,
+        32,
+        134,
+        132,
+        130,
+        34,
+        4,
+        66,
+        32,
+        135,
+        167,
+        36,
+        0,
+        32,
+        4,
+        167,
+        11
+      ])
+    ),
+    {}
+  ).exports;
+} catch {
 }
-async function getCodeQL(cmd) {
-  if (cachedCodeQL === void 0) {
-    cachedCodeQL = await getCodeQLForCmd(cmd, true);
-  }
-  return cachedCodeQL;
+function Long(low, high, unsigned) {
+  this.low = low | 0;
+  this.high = high | 0;
+  this.unsigned = !!unsigned;
 }
-async function getCodeQLForCmd(cmd, checkVersion) {
-  const codeql = {
-    getPath() {
-      return cmd;
-    },
-    async getVersion() {
-      let result = getCachedCodeQlVersion(cmd);
-      if (result === void 0) {
-        const output = await runCli(cmd, ["version", "--format=json"], {
-          noStreamStdout: true
-        });
-        try {
-          result = JSON.parse(output);
-        } catch {
-          throw Error(
-            `Invalid JSON output from \`version --format=json\`: ${output}`
-          );
-        }
-        cacheCodeQlVersion(cmd, result);
-      }
-      return result;
-    },
-    async printVersion() {
-      core11.info(JSON.stringify(await this.getVersion(), null, 2));
-    },
-    async supportsFeature(feature) {
-      return isSupportedToolsFeature(await this.getVersion(), feature);
-    },
-    async isTracedLanguage(language) {
-      const extractorPath = await this.resolveExtractor(language);
-      const tracingConfigPath = path14.join(
-        extractorPath,
-        "tools",
-        "tracing-config.lua"
-      );
-      return fs15.existsSync(tracingConfigPath);
-    },
-    async isScannedLanguage(language) {
-      return !await this.isTracedLanguage(language);
-    },
-    async databaseInitCluster(config, sourceRoot, processName, qlconfigFile, logger) {
-      const extraArgs = config.languages.map(
-        (language) => `--language=${language}`
-      );
-      if (await shouldEnableIndirectTracing(codeql, config)) {
-        extraArgs.push("--begin-tracing");
-        extraArgs.push(...await getTrapCachingExtractorConfigArgs(config));
-        extraArgs.push(`--trace-process-name=${processName}`);
-      }
-      const codeScanningConfigFile = await writeCodeScanningConfigFile(
-        config,
-        logger
-      );
-      const externalRepositoryToken = getOptionalInput(
-        "external-repository-token"
-      );
-      extraArgs.push(`--codescanning-config=${codeScanningConfigFile}`);
-      if (externalRepositoryToken) {
-        extraArgs.push("--external-repository-token-stdin");
-      }
-      if (config.buildMode !== void 0) {
-        extraArgs.push(`--build-mode=${config.buildMode}`);
-      }
-      if (qlconfigFile !== void 0) {
-        extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
-      }
-      const overlayDatabaseMode = config.overlayDatabaseMode;
-      if (overlayDatabaseMode === "overlay" /* Overlay */) {
-        const overlayChangesFile = await writeOverlayChangesFile(
-          config,
-          sourceRoot,
-          logger
-        );
-        extraArgs.push(`--overlay-changes=${overlayChangesFile}`);
-      } else if (overlayDatabaseMode === "overlay-base" /* OverlayBase */) {
-        extraArgs.push("--overlay-base");
-      }
-      const baselineFilesOptions = config.enableFileCoverageInformation ? [
-        "--calculate-language-specific-baseline",
-        "--sublanguage-file-coverage"
-      ] : ["--no-calculate-baseline"];
-      await runCli(
-        cmd,
-        [
-          "database",
-          "init",
-          ...overlayDatabaseMode === "overlay" /* Overlay */ ? [] : ["--force-overwrite"],
-          "--db-cluster",
-          config.dbLocation,
-          `--source-root=${sourceRoot}`,
-          ...baselineFilesOptions,
-          "--extractor-include-aliases",
-          ...extraArgs,
-          ...getExtraOptionsFromEnv(["database", "init"], {
-            // Some user configs specify `--no-calculate-baseline` as an additional
-            // argument to `codeql database init`. Therefore ignore the baseline file
-            // options here to avoid specifying the same argument twice and erroring.
-            //
-            // Ignore `--overwrite` to avoid passing both `--force-overwrite` and `--overwrite` if
-            // the user has configured `--overwrite`.
-            ignoringOptions: [
-              "--force-overwrite",
-              "--overwrite",
-              ...baselineFilesOptions
-            ]
-          })
-        ],
-        { stdin: externalRepositoryToken }
-      );
-      if (overlayDatabaseMode === "overlay-base" /* OverlayBase */) {
-        await writeBaseDatabaseOidsFile(config, sourceRoot);
-      }
-    },
-    async runAutobuild(config, language) {
-      applyAutobuildAzurePipelinesTimeoutFix();
-      const autobuildCmd = path14.join(
-        await this.resolveExtractor(language),
-        "tools",
-        process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh"
-      );
-      if (config.debugMode) {
-        process.env["CODEQL_VERBOSITY" /* CLI_VERBOSITY */] = process.env["CODEQL_VERBOSITY" /* CLI_VERBOSITY */] || EXTRACTION_DEBUG_MODE_VERBOSITY;
-      }
-      await runCli(autobuildCmd);
-    },
-    async extractScannedLanguage(config, language) {
-      await runCli(cmd, [
-        "database",
-        "trace-command",
-        "--index-traceless-dbs",
-        ...await getTrapCachingExtractorConfigArgsForLang(config, language),
-        ...getExtractionVerbosityArguments(config.debugMode),
-        ...getExtraOptionsFromEnv(["database", "trace-command"]),
-        getCodeQLDatabasePath(config, language)
-      ]);
-    },
-    async extractUsingBuildMode(config, language) {
-      if (config.buildMode === "autobuild" /* Autobuild */) {
-        applyAutobuildAzurePipelinesTimeoutFix();
-      }
-      try {
-        await runCli(cmd, [
-          "database",
-          "trace-command",
-          "--use-build-mode",
-          "--working-dir",
-          process.cwd(),
-          ...await getTrapCachingExtractorConfigArgsForLang(config, language),
-          ...getExtractionVerbosityArguments(config.debugMode),
-          ...getExtraOptionsFromEnv(["database", "trace-command"]),
-          getCodeQLDatabasePath(config, language)
-        ]);
-      } catch (e) {
-        if (config.buildMode === "autobuild" /* Autobuild */) {
-          const prefix = `We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. See ${"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed" /* AUTOMATIC_BUILD_FAILED */} for more information.`;
-          throw new ConfigurationError(`${prefix} ${getErrorMessage(e)}`);
-        } else {
-          throw e;
-        }
-      }
-    },
-    async finalizeDatabase(databasePath, threadsFlag, memoryFlag, enableDebugLogging) {
-      const args = [
-        "database",
-        "finalize",
-        "--finalize-dataset",
-        threadsFlag,
-        memoryFlag,
-        ...getExtractionVerbosityArguments(enableDebugLogging),
-        ...getExtraOptionsFromEnv(["database", "finalize"]),
-        databasePath
-      ];
-      await runCli(cmd, args);
-    },
-    async resolveLanguages() {
-      const codeqlArgs = [
-        "resolve",
-        "languages",
-        "--format=json",
-        ...getExtraOptionsFromEnv(["resolve", "languages"])
-      ];
-      const output = await runCli(cmd, codeqlArgs);
-      try {
-        return JSON.parse(output);
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve languages: ${e}`
-        );
-      }
-    },
-    async betterResolveLanguages({
-      filterToLanguagesWithQueries
-    } = { filterToLanguagesWithQueries: false }) {
-      const codeqlArgs = [
-        "resolve",
-        "languages",
-        "--format=betterjson",
-        "--extractor-options-verbosity=4",
-        "--extractor-include-aliases",
-        ...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
-        ...getExtraOptionsFromEnv(["resolve", "languages"])
-      ];
-      const output = await runCli(cmd, codeqlArgs);
-      try {
-        return JSON.parse(output);
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve languages with --format=betterjson: ${e}`
-        );
-      }
-    },
-    async resolveBuildEnvironment(workingDir, language) {
-      const codeqlArgs = [
-        "resolve",
-        "build-environment",
-        `--language=${language}`,
-        "--extractor-include-aliases",
-        ...getExtraOptionsFromEnv(["resolve", "build-environment"])
-      ];
-      if (workingDir !== void 0) {
-        codeqlArgs.push("--working-dir", workingDir);
-      }
-      const output = await runCli(cmd, codeqlArgs);
-      try {
-        return JSON.parse(output);
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve build-environment: ${e} in
-${output}`
-        );
-      }
-    },
-    async databaseRunQueries(databasePath, flags, queries = []) {
-      const codeqlArgs = [
-        "database",
-        "run-queries",
-        ...flags,
-        databasePath,
-        "--min-disk-free=1024",
-        // Try to leave at least 1GB free
-        "-v",
-        ...queries,
-        ...getExtraOptionsFromEnv(["database", "run-queries"], {
-          ignoringOptions: ["--expect-discarded-cache"]
-        })
-      ];
-      await runCli(cmd, codeqlArgs);
-    },
-    async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, threadsFlag, verbosityFlag, sarifRunPropertyFlag, automationDetailsId, config, features) {
-      const shouldExportDiagnostics = await features.getValue(
-        "export_diagnostics_enabled" /* ExportDiagnosticsEnabled */,
-        this
-      );
-      const codeqlArgs = [
-        "database",
-        "interpret-results",
-        threadsFlag,
-        "--format=sarif-latest",
-        verbosityFlag,
-        `--output=${sarifFile}`,
-        "--print-diagnostics-summary",
-        "--print-metrics-summary",
-        "--sarif-add-baseline-file-info",
-        `--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(
-          config
-        )}`,
-        "--sarif-group-rules-by-pack",
-        "--sarif-include-query-help=always",
-        "--sublanguage-file-coverage",
-        ...await getJobRunUuidSarifOptions(),
-        ...getExtraOptionsFromEnv(["database", "interpret-results"])
-      ];
-      if (sarifRunPropertyFlag !== void 0) {
-        codeqlArgs.push(sarifRunPropertyFlag);
-      }
-      if (automationDetailsId !== void 0) {
-        codeqlArgs.push("--sarif-category", automationDetailsId);
-      }
-      if (shouldExportDiagnostics) {
-        codeqlArgs.push("--sarif-include-diagnostics");
-      } else {
-        codeqlArgs.push("--no-sarif-include-diagnostics");
-      }
-      codeqlArgs.push(databasePath);
-      if (querySuitePaths) {
-        codeqlArgs.push(...querySuitePaths);
-      }
-      return await runCli(cmd, codeqlArgs, {
-        noStreamStdout: true
-      });
-    },
-    async databaseCleanupCluster(config, cleanupLevel) {
-      for (const language of config.languages) {
-        const databasePath = getCodeQLDatabasePath(config, language);
-        const codeqlArgs = [
-          "database",
-          "cleanup",
-          databasePath,
-          `--cache-cleanup=${cleanupLevel}`,
-          ...getExtraOptionsFromEnv(["database", "cleanup"])
-        ];
-        await runCli(cmd, codeqlArgs);
-      }
-    },
-    async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) {
-      const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : [];
-      const args = [
-        "database",
-        "bundle",
-        databasePath,
-        `--output=${outputFilePath}`,
-        `--name=${databaseName}`,
-        ...includeDiagnosticsArgs,
-        ...getExtraOptionsFromEnv(["database", "bundle"], {
-          ignoringOptions: includeDiagnosticsArgs
-        })
-      ];
-      if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) {
-        args.push(
-          ...alsoIncludeRelativePaths.flatMap((relativePath) => [
-            "--include",
-            relativePath
-          ])
-        );
-      }
-      await new toolrunner3.ToolRunner(cmd, args).exec();
-    },
-    async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
-      const args = [
-        "database",
-        "export-diagnostics",
-        `${databasePath}`,
-        "--db-cluster",
-        // Database is always a cluster for CodeQL versions that support diagnostics.
-        "--format=sarif-latest",
-        `--output=${sarifFile}`,
-        "--sarif-include-diagnostics",
-        // ExportDiagnosticsEnabled is always true if this command is run.
-        "-vvv",
-        ...getExtraOptionsFromEnv(["diagnostics", "export"])
-      ];
-      if (automationDetailsId !== void 0) {
-        args.push("--sarif-category", automationDetailsId);
-      }
-      await new toolrunner3.ToolRunner(cmd, args).exec();
-    },
-    async diagnosticsExport(sarifFile, automationDetailsId, config) {
-      const args = [
-        "diagnostics",
-        "export",
-        "--format=sarif-latest",
-        `--output=${sarifFile}`,
-        `--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(
-          config
-        )}`,
-        ...getExtraOptionsFromEnv(["diagnostics", "export"])
-      ];
-      if (automationDetailsId !== void 0) {
-        args.push("--sarif-category", automationDetailsId);
-      }
-      await new toolrunner3.ToolRunner(cmd, args).exec();
-    },
-    async resolveExtractor(language) {
-      let extractorPath = "";
-      await new toolrunner3.ToolRunner(
-        cmd,
-        [
-          "resolve",
-          "extractor",
-          "--format=json",
-          `--language=${language}`,
-          "--extractor-include-aliases",
-          ...getExtraOptionsFromEnv(["resolve", "extractor"])
-        ],
-        {
-          silent: true,
-          listeners: {
-            stdout: (data) => {
-              extractorPath += data.toString();
-            },
-            stderr: (data) => {
-              process.stderr.write(data);
-            }
-          }
-        }
-      ).exec();
-      return JSON.parse(extractorPath);
-    },
-    async resolveQueriesStartingPacks(queries) {
-      const codeqlArgs = [
-        "resolve",
-        "queries",
-        "--format=startingpacks",
-        ...getExtraOptionsFromEnv(["resolve", "queries"]),
-        ...queries
-      ];
-      const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
-      try {
-        return JSON.parse(output);
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve queries --format=startingpacks: ${e}`
-        );
-      }
-    },
-    async resolveDatabase(databasePath) {
-      const codeqlArgs = [
-        "resolve",
-        "database",
-        databasePath,
-        "--format=json",
-        ...getExtraOptionsFromEnv(["resolve", "database"])
-      ];
-      const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
-      try {
-        return JSON.parse(output);
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve database --format=json: ${e}`
-        );
-      }
-    },
-    async mergeResults(sarifFiles, outputFile, {
-      mergeRunsFromEqualCategory = false
-    }) {
-      const args = [
-        "github",
-        "merge-results",
-        "--output",
-        outputFile,
-        ...getExtraOptionsFromEnv(["github", "merge-results"])
-      ];
-      for (const sarifFile of sarifFiles) {
-        args.push("--sarif", sarifFile);
-      }
-      if (mergeRunsFromEqualCategory) {
-        args.push("--sarif-merge-runs-from-equal-category");
-      }
-      await runCli(cmd, args);
+Long.prototype.__isLong__;
+Object.defineProperty(Long.prototype, "__isLong__", { value: true });
+function isLong(obj) {
+  return (obj && obj["__isLong__"]) === true;
+}
+function ctz32(value) {
+  var c = Math.clz32(value & -value);
+  return value ? 31 - c : c;
+}
+Long.isLong = isLong;
+var INT_CACHE = {};
+var UINT_CACHE = {};
+function fromInt(value, unsigned) {
+  var obj, cachedObj, cache;
+  if (unsigned) {
+    value >>>= 0;
+    if (cache = 0 <= value && value < 256) {
+      cachedObj = UINT_CACHE[value];
+      if (cachedObj) return cachedObj;
+    }
+    obj = fromBits(value, 0, true);
+    if (cache) UINT_CACHE[value] = obj;
+    return obj;
+  } else {
+    value |= 0;
+    if (cache = -128 <= value && value < 128) {
+      cachedObj = INT_CACHE[value];
+      if (cachedObj) return cachedObj;
     }
-  };
-  if (checkVersion && !await codeQlVersionAtLeast(codeql, CODEQL_MINIMUM_VERSION)) {
-    throw new ConfigurationError(
-      `Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${(await codeql.getVersion()).version}`
-    );
-  } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) {
-    const result = await codeql.getVersion();
-    core11.warning(
-      `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
-
-Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.`
-    );
-    core11.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true");
+    obj = fromBits(value, value < 0 ? -1 : 0, false);
+    if (cache) INT_CACHE[value] = obj;
+    return obj;
   }
-  return codeql;
 }
-function getExtraOptionsFromEnv(paths, { ignoringOptions } = {}) {
-  const options = getExtraOptionsEnvParam();
-  return getExtraOptions(options, paths, []).filter(
-    (option) => !ignoringOptions?.includes(option)
+Long.fromInt = fromInt;
+function fromNumber(value, unsigned) {
+  if (isNaN(value)) return unsigned ? UZERO : ZERO;
+  if (unsigned) {
+    if (value < 0) return UZERO;
+    if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
+  } else {
+    if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
+    if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
+  }
+  if (value < 0) return fromNumber(-value, unsigned).neg();
+  return fromBits(
+    value % TWO_PWR_32_DBL | 0,
+    value / TWO_PWR_32_DBL | 0,
+    unsigned
   );
 }
-function asExtraOptions(options, pathInfo) {
-  if (options === void 0) {
-    return [];
+Long.fromNumber = fromNumber;
+function fromBits(lowBits, highBits, unsigned) {
+  return new Long(lowBits, highBits, unsigned);
+}
+Long.fromBits = fromBits;
+var pow_dbl = Math.pow;
+function fromString(str, unsigned, radix) {
+  if (str.length === 0) throw Error("empty string");
+  if (typeof unsigned === "number") {
+    radix = unsigned;
+    unsigned = false;
+  } else {
+    unsigned = !!unsigned;
   }
-  if (!Array.isArray(options)) {
-    const msg = `The extra options for '${pathInfo.join(
-      "."
-    )}' ('${JSON.stringify(options)}') are not in an array.`;
-    throw new Error(msg);
+  if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
+    return unsigned ? UZERO : ZERO;
+  radix = radix || 10;
+  if (radix < 2 || 36 < radix) throw RangeError("radix");
+  var p;
+  if ((p = str.indexOf("-")) > 0) throw Error("interior hyphen");
+  else if (p === 0) {
+    return fromString(str.substring(1), unsigned, radix).neg();
   }
-  return options.map((o) => {
-    const t = typeof o;
-    if (t !== "string" && t !== "number" && t !== "boolean") {
-      const msg = `The extra option for '${pathInfo.join(
-        "."
-      )}' ('${JSON.stringify(o)}') is not a primitive value.`;
-      throw new Error(msg);
+  var radixToPower = fromNumber(pow_dbl(radix, 8));
+  var result = ZERO;
+  for (var i = 0; i < str.length; i += 8) {
+    var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
+    if (size < 8) {
+      var power = fromNumber(pow_dbl(radix, size));
+      result = result.mul(power).add(fromNumber(value));
+    } else {
+      result = result.mul(radixToPower);
+      result = result.add(fromNumber(value));
     }
-    return `${o}`;
-  });
+  }
+  result.unsigned = unsigned;
+  return result;
 }
-function getExtraOptions(options, paths, pathInfo) {
-  const all = asExtraOptions(options?.["*"], pathInfo.concat("*"));
-  const specific = paths.length === 0 ? asExtraOptions(options, pathInfo) : getExtraOptions(
-    options?.[paths[0]],
-    paths?.slice(1),
-    pathInfo.concat(paths[0])
+Long.fromString = fromString;
+function fromValue(val, unsigned) {
+  if (typeof val === "number") return fromNumber(val, unsigned);
+  if (typeof val === "string") return fromString(val, unsigned);
+  return fromBits(
+    val.low,
+    val.high,
+    typeof unsigned === "boolean" ? unsigned : val.unsigned
   );
-  return all.concat(specific);
 }
-async function runCli(cmd, args = [], opts = {}) {
-  try {
-    return await runTool(cmd, args, opts);
-  } catch (e) {
-    if (e instanceof CommandInvocationError) {
-      throw wrapCliConfigurationError(new CliError(e));
+Long.fromValue = fromValue;
+var TWO_PWR_16_DBL = 1 << 16;
+var TWO_PWR_24_DBL = 1 << 24;
+var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
+var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
+var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
+var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
+var ZERO = fromInt(0);
+Long.ZERO = ZERO;
+var UZERO = fromInt(0, true);
+Long.UZERO = UZERO;
+var ONE = fromInt(1);
+Long.ONE = ONE;
+var UONE = fromInt(1, true);
+Long.UONE = UONE;
+var NEG_ONE = fromInt(-1);
+Long.NEG_ONE = NEG_ONE;
+var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
+Long.MAX_VALUE = MAX_VALUE;
+var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
+Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
+var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
+Long.MIN_VALUE = MIN_VALUE;
+var LongPrototype = Long.prototype;
+LongPrototype.toInt = function toInt() {
+  return this.unsigned ? this.low >>> 0 : this.low;
+};
+LongPrototype.toNumber = function toNumber() {
+  if (this.unsigned)
+    return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
+  return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
+};
+LongPrototype.toString = function toString(radix) {
+  radix = radix || 10;
+  if (radix < 2 || 36 < radix) throw RangeError("radix");
+  if (this.isZero()) return "0";
+  if (this.isNegative()) {
+    if (this.eq(MIN_VALUE)) {
+      var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
+      return div.toString(radix) + rem1.toInt().toString(radix);
+    } else return "-" + this.neg().toString(radix);
+  }
+  var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
+  var result = "";
+  while (true) {
+    var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
+    rem = remDiv;
+    if (rem.isZero()) return digits + result;
+    else {
+      while (digits.length < 6) digits = "0" + digits;
+      result = "" + digits + result;
     }
-    throw e;
   }
-}
-async function writeCodeScanningConfigFile(config, logger) {
-  const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
-  const augmentedConfig = appendExtraQueryExclusions(
-    config.extraQueryExclusions,
-    config.computedConfig
-  );
-  logger.info(
-    `Writing augmented user configuration file to ${codeScanningConfigFile}`
+};
+LongPrototype.getHighBits = function getHighBits() {
+  return this.high;
+};
+LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
+  return this.high >>> 0;
+};
+LongPrototype.getLowBits = function getLowBits() {
+  return this.low;
+};
+LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
+  return this.low >>> 0;
+};
+LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
+  if (this.isNegative())
+    return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
+  var val = this.high != 0 ? this.high : this.low;
+  for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break;
+  return this.high != 0 ? bit + 33 : bit + 1;
+};
+LongPrototype.isSafeInteger = function isSafeInteger() {
+  var top11Bits = this.high >> 21;
+  if (!top11Bits) return true;
+  if (this.unsigned) return false;
+  return top11Bits === -1 && !(this.low === 0 && this.high === -2097152);
+};
+LongPrototype.isZero = function isZero() {
+  return this.high === 0 && this.low === 0;
+};
+LongPrototype.eqz = LongPrototype.isZero;
+LongPrototype.isNegative = function isNegative() {
+  return !this.unsigned && this.high < 0;
+};
+LongPrototype.isPositive = function isPositive() {
+  return this.unsigned || this.high >= 0;
+};
+LongPrototype.isOdd = function isOdd() {
+  return (this.low & 1) === 1;
+};
+LongPrototype.isEven = function isEven() {
+  return (this.low & 1) === 0;
+};
+LongPrototype.equals = function equals(other) {
+  if (!isLong(other)) other = fromValue(other);
+  if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
+    return false;
+  return this.high === other.high && this.low === other.low;
+};
+LongPrototype.eq = LongPrototype.equals;
+LongPrototype.notEquals = function notEquals(other) {
+  return !this.eq(
+    /* validates */
+    other
   );
-  logger.startGroup("Augmented user configuration file contents");
-  logger.info(dump(augmentedConfig));
-  logger.endGroup();
-  fs15.writeFileSync(codeScanningConfigFile, dump(augmentedConfig));
-  return codeScanningConfigFile;
-}
-var TRAP_CACHE_SIZE_MB = 1024;
-async function getTrapCachingExtractorConfigArgs(config) {
-  const result = [];
-  for (const language of config.languages)
-    result.push(
-      await getTrapCachingExtractorConfigArgsForLang(config, language)
+};
+LongPrototype.neq = LongPrototype.notEquals;
+LongPrototype.ne = LongPrototype.notEquals;
+LongPrototype.lessThan = function lessThan(other) {
+  return this.comp(
+    /* validates */
+    other
+  ) < 0;
+};
+LongPrototype.lt = LongPrototype.lessThan;
+LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
+  return this.comp(
+    /* validates */
+    other
+  ) <= 0;
+};
+LongPrototype.lte = LongPrototype.lessThanOrEqual;
+LongPrototype.le = LongPrototype.lessThanOrEqual;
+LongPrototype.greaterThan = function greaterThan(other) {
+  return this.comp(
+    /* validates */
+    other
+  ) > 0;
+};
+LongPrototype.gt = LongPrototype.greaterThan;
+LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
+  return this.comp(
+    /* validates */
+    other
+  ) >= 0;
+};
+LongPrototype.gte = LongPrototype.greaterThanOrEqual;
+LongPrototype.ge = LongPrototype.greaterThanOrEqual;
+LongPrototype.compare = function compare2(other) {
+  if (!isLong(other)) other = fromValue(other);
+  if (this.eq(other)) return 0;
+  var thisNeg = this.isNegative(), otherNeg = other.isNegative();
+  if (thisNeg && !otherNeg) return -1;
+  if (!thisNeg && otherNeg) return 1;
+  if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
+  return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
+};
+LongPrototype.comp = LongPrototype.compare;
+LongPrototype.negate = function negate() {
+  if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
+  return this.not().add(ONE);
+};
+LongPrototype.neg = LongPrototype.negate;
+LongPrototype.add = function add(addend) {
+  if (!isLong(addend)) addend = fromValue(addend);
+  var a48 = this.high >>> 16;
+  var a32 = this.high & 65535;
+  var a16 = this.low >>> 16;
+  var a00 = this.low & 65535;
+  var b48 = addend.high >>> 16;
+  var b32 = addend.high & 65535;
+  var b16 = addend.low >>> 16;
+  var b00 = addend.low & 65535;
+  var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+  c00 += a00 + b00;
+  c16 += c00 >>> 16;
+  c00 &= 65535;
+  c16 += a16 + b16;
+  c32 += c16 >>> 16;
+  c16 &= 65535;
+  c32 += a32 + b32;
+  c48 += c32 >>> 16;
+  c32 &= 65535;
+  c48 += a48 + b48;
+  c48 &= 65535;
+  return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
+};
+LongPrototype.subtract = function subtract(subtrahend) {
+  if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
+  return this.add(subtrahend.neg());
+};
+LongPrototype.sub = LongPrototype.subtract;
+LongPrototype.multiply = function multiply(multiplier) {
+  if (this.isZero()) return this;
+  if (!isLong(multiplier)) multiplier = fromValue(multiplier);
+  if (wasm) {
+    var low = wasm["mul"](this.low, this.high, multiplier.low, multiplier.high);
+    return fromBits(low, wasm["get_high"](), this.unsigned);
+  }
+  if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
+  if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
+  if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
+  if (this.isNegative()) {
+    if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
+    else return this.neg().mul(multiplier).neg();
+  } else if (multiplier.isNegative()) return this.mul(multiplier.neg()).neg();
+  if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
+    return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
+  var a48 = this.high >>> 16;
+  var a32 = this.high & 65535;
+  var a16 = this.low >>> 16;
+  var a00 = this.low & 65535;
+  var b48 = multiplier.high >>> 16;
+  var b32 = multiplier.high & 65535;
+  var b16 = multiplier.low >>> 16;
+  var b00 = multiplier.low & 65535;
+  var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+  c00 += a00 * b00;
+  c16 += c00 >>> 16;
+  c00 &= 65535;
+  c16 += a16 * b00;
+  c32 += c16 >>> 16;
+  c16 &= 65535;
+  c16 += a00 * b16;
+  c32 += c16 >>> 16;
+  c16 &= 65535;
+  c32 += a32 * b00;
+  c48 += c32 >>> 16;
+  c32 &= 65535;
+  c32 += a16 * b16;
+  c48 += c32 >>> 16;
+  c32 &= 65535;
+  c32 += a00 * b32;
+  c48 += c32 >>> 16;
+  c32 &= 65535;
+  c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+  c48 &= 65535;
+  return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
+};
+LongPrototype.mul = LongPrototype.multiply;
+LongPrototype.divide = function divide(divisor) {
+  if (!isLong(divisor)) divisor = fromValue(divisor);
+  if (divisor.isZero()) throw Error("division by zero");
+  if (wasm) {
+    if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
+      return this;
+    }
+    var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])(
+      this.low,
+      this.high,
+      divisor.low,
+      divisor.high
     );
-  return result.flat();
-}
-async function getTrapCachingExtractorConfigArgsForLang(config, language) {
-  const cacheDir2 = config.trapCaches[language];
-  if (cacheDir2 === void 0) return [];
-  const write = await isAnalyzingDefaultBranch();
-  return [
-    `-O=${language}.trap.cache.dir=${cacheDir2}`,
-    `-O=${language}.trap.cache.bound=${TRAP_CACHE_SIZE_MB}`,
-    `-O=${language}.trap.cache.write=${write}`
-  ];
-}
-function getGeneratedCodeScanningConfigPath(config) {
-  return path14.resolve(config.tempDir, "user-config.yaml");
-}
-function getExtractionVerbosityArguments(enableDebugLogging) {
-  return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : [];
-}
-function applyAutobuildAzurePipelinesTimeoutFix() {
-  const javaToolOptions = process.env["JAVA_TOOL_OPTIONS"] || "";
-  process.env["JAVA_TOOL_OPTIONS"] = [
-    ...javaToolOptions.split(/\s+/),
-    "-Dhttp.keepAlive=false",
-    "-Dmaven.wagon.http.pool=false"
-  ].join(" ");
-}
-async function getJobRunUuidSarifOptions() {
-  const jobRunUuid = process.env["JOB_RUN_UUID" /* JOB_RUN_UUID */];
-  return jobRunUuid ? [`--sarif-run-property=jobRunUuid=${jobRunUuid}`] : [];
-}
-
-// src/autobuild.ts
-async function determineAutobuildLanguages(codeql, config, logger) {
-  if (config.buildMode === "none" /* None */ || config.buildMode === "manual" /* Manual */) {
-    logger.info(
-      `Using build mode "${config.buildMode}", nothing to autobuild. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes" /* CODEQL_BUILD_MODES */} for more information.`
+    return fromBits(low, wasm["get_high"](), this.unsigned);
+  }
+  if (this.isZero()) return this.unsigned ? UZERO : ZERO;
+  var approx, rem, res;
+  if (!this.unsigned) {
+    if (this.eq(MIN_VALUE)) {
+      if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
+        return MIN_VALUE;
+      else if (divisor.eq(MIN_VALUE)) return ONE;
+      else {
+        var halfThis = this.shr(1);
+        approx = halfThis.div(divisor).shl(1);
+        if (approx.eq(ZERO)) {
+          return divisor.isNegative() ? ONE : NEG_ONE;
+        } else {
+          rem = this.sub(divisor.mul(approx));
+          res = approx.add(rem.div(divisor));
+          return res;
+        }
+      }
+    } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
+    if (this.isNegative()) {
+      if (divisor.isNegative()) return this.neg().div(divisor.neg());
+      return this.neg().div(divisor).neg();
+    } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
+    res = ZERO;
+  } else {
+    if (!divisor.unsigned) divisor = divisor.toUnsigned();
+    if (divisor.gt(this)) return UZERO;
+    if (divisor.gt(this.shru(1)))
+      return UONE;
+    res = UZERO;
+  }
+  rem = this;
+  while (rem.gte(divisor)) {
+    approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
+    var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
+    while (approxRem.isNegative() || approxRem.gt(rem)) {
+      approx -= delta;
+      approxRes = fromNumber(approx, this.unsigned);
+      approxRem = approxRes.mul(divisor);
+    }
+    if (approxRes.isZero()) approxRes = ONE;
+    res = res.add(approxRes);
+    rem = rem.sub(approxRem);
+  }
+  return res;
+};
+LongPrototype.div = LongPrototype.divide;
+LongPrototype.modulo = function modulo(divisor) {
+  if (!isLong(divisor)) divisor = fromValue(divisor);
+  if (wasm) {
+    var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])(
+      this.low,
+      this.high,
+      divisor.low,
+      divisor.high
     );
-    return void 0;
+    return fromBits(low, wasm["get_high"](), this.unsigned);
   }
-  const autobuildLanguages = await asyncFilter(
-    config.languages,
-    async (language) => await codeql.isTracedLanguage(language)
+  return this.sub(this.div(divisor).mul(divisor));
+};
+LongPrototype.mod = LongPrototype.modulo;
+LongPrototype.rem = LongPrototype.modulo;
+LongPrototype.not = function not() {
+  return fromBits(~this.low, ~this.high, this.unsigned);
+};
+LongPrototype.countLeadingZeros = function countLeadingZeros() {
+  return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;
+};
+LongPrototype.clz = LongPrototype.countLeadingZeros;
+LongPrototype.countTrailingZeros = function countTrailingZeros() {
+  return this.low ? ctz32(this.low) : ctz32(this.high) + 32;
+};
+LongPrototype.ctz = LongPrototype.countTrailingZeros;
+LongPrototype.and = function and(other) {
+  if (!isLong(other)) other = fromValue(other);
+  return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
+};
+LongPrototype.or = function or(other) {
+  if (!isLong(other)) other = fromValue(other);
+  return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
+};
+LongPrototype.xor = function xor(other) {
+  if (!isLong(other)) other = fromValue(other);
+  return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
+};
+LongPrototype.shiftLeft = function shiftLeft(numBits) {
+  if (isLong(numBits)) numBits = numBits.toInt();
+  if ((numBits &= 63) === 0) return this;
+  else if (numBits < 32)
+    return fromBits(
+      this.low << numBits,
+      this.high << numBits | this.low >>> 32 - numBits,
+      this.unsigned
+    );
+  else return fromBits(0, this.low << numBits - 32, this.unsigned);
+};
+LongPrototype.shl = LongPrototype.shiftLeft;
+LongPrototype.shiftRight = function shiftRight(numBits) {
+  if (isLong(numBits)) numBits = numBits.toInt();
+  if ((numBits &= 63) === 0) return this;
+  else if (numBits < 32)
+    return fromBits(
+      this.low >>> numBits | this.high << 32 - numBits,
+      this.high >> numBits,
+      this.unsigned
+    );
+  else
+    return fromBits(
+      this.high >> numBits - 32,
+      this.high >= 0 ? 0 : -1,
+      this.unsigned
+    );
+};
+LongPrototype.shr = LongPrototype.shiftRight;
+LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
+  if (isLong(numBits)) numBits = numBits.toInt();
+  if ((numBits &= 63) === 0) return this;
+  if (numBits < 32)
+    return fromBits(
+      this.low >>> numBits | this.high << 32 - numBits,
+      this.high >>> numBits,
+      this.unsigned
+    );
+  if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
+  return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
+};
+LongPrototype.shru = LongPrototype.shiftRightUnsigned;
+LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
+LongPrototype.rotateLeft = function rotateLeft(numBits) {
+  var b;
+  if (isLong(numBits)) numBits = numBits.toInt();
+  if ((numBits &= 63) === 0) return this;
+  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
+  if (numBits < 32) {
+    b = 32 - numBits;
+    return fromBits(
+      this.low << numBits | this.high >>> b,
+      this.high << numBits | this.low >>> b,
+      this.unsigned
+    );
+  }
+  numBits -= 32;
+  b = 32 - numBits;
+  return fromBits(
+    this.high << numBits | this.low >>> b,
+    this.low << numBits | this.high >>> b,
+    this.unsigned
   );
-  if (autobuildLanguages.length === 0) {
-    logger.info(
-      "None of the languages in this project require extra build steps"
+};
+LongPrototype.rotl = LongPrototype.rotateLeft;
+LongPrototype.rotateRight = function rotateRight(numBits) {
+  var b;
+  if (isLong(numBits)) numBits = numBits.toInt();
+  if ((numBits &= 63) === 0) return this;
+  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
+  if (numBits < 32) {
+    b = 32 - numBits;
+    return fromBits(
+      this.high << b | this.low >>> numBits,
+      this.low << b | this.high >>> numBits,
+      this.unsigned
     );
-    return void 0;
   }
-  const autobuildLanguagesWithoutGo = autobuildLanguages.filter(
-    (l) => l !== "go" /* go */
+  numBits -= 32;
+  b = 32 - numBits;
+  return fromBits(
+    this.low << b | this.high >>> numBits,
+    this.high << b | this.low >>> numBits,
+    this.unsigned
   );
-  const languages = [];
-  if (autobuildLanguagesWithoutGo[0] !== void 0) {
-    languages.push(autobuildLanguagesWithoutGo[0]);
+};
+LongPrototype.rotr = LongPrototype.rotateRight;
+LongPrototype.toSigned = function toSigned() {
+  if (!this.unsigned) return this;
+  return fromBits(this.low, this.high, false);
+};
+LongPrototype.toUnsigned = function toUnsigned() {
+  if (this.unsigned) return this;
+  return fromBits(this.low, this.high, true);
+};
+LongPrototype.toBytes = function toBytes(le) {
+  return le ? this.toBytesLE() : this.toBytesBE();
+};
+LongPrototype.toBytesLE = function toBytesLE() {
+  var hi = this.high, lo = this.low;
+  return [
+    lo & 255,
+    lo >>> 8 & 255,
+    lo >>> 16 & 255,
+    lo >>> 24,
+    hi & 255,
+    hi >>> 8 & 255,
+    hi >>> 16 & 255,
+    hi >>> 24
+  ];
+};
+LongPrototype.toBytesBE = function toBytesBE() {
+  var hi = this.high, lo = this.low;
+  return [
+    hi >>> 24,
+    hi >>> 16 & 255,
+    hi >>> 8 & 255,
+    hi & 255,
+    lo >>> 24,
+    lo >>> 16 & 255,
+    lo >>> 8 & 255,
+    lo & 255
+  ];
+};
+Long.fromBytes = function fromBytes(bytes, unsigned, le) {
+  return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+};
+Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {
+  return new Long(
+    bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
+    bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
+    unsigned
+  );
+};
+Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
+  return new Long(
+    bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
+    bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
+    unsigned
+  );
+};
+if (typeof BigInt === "function") {
+  Long.fromBigInt = function fromBigInt(value, unsigned) {
+    var lowBits = Number(BigInt.asIntN(32, value));
+    var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
+    return fromBits(lowBits, highBits, unsigned);
+  };
+  Long.fromValue = function fromValueWithBigInt(value, unsigned) {
+    if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
+    return fromValue(value, unsigned);
+  };
+  LongPrototype.toBigInt = function toBigInt() {
+    var lowBigInt = BigInt(this.low >>> 0);
+    var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
+    return highBigInt << BigInt(32) | lowBigInt;
+  };
+}
+var long_default = Long;
+
+// src/fingerprints.ts
+var tab = "	".charCodeAt(0);
+var space = " ".charCodeAt(0);
+var lf = "\n".charCodeAt(0);
+var cr = "\r".charCodeAt(0);
+var EOF = 65535;
+var BLOCK_SIZE = 100;
+var MOD = long_default.fromInt(37);
+function computeFirstMod() {
+  let firstMod = long_default.ONE;
+  for (let i = 0; i < BLOCK_SIZE; i++) {
+    firstMod = firstMod.multiply(MOD);
   }
-  if (autobuildLanguages.length !== autobuildLanguagesWithoutGo.length) {
-    languages.push("go" /* go */);
+  return firstMod;
+}
+async function hash(callback, filepath) {
+  const window2 = Array(BLOCK_SIZE).fill(0);
+  const lineNumbers = Array(BLOCK_SIZE).fill(-1);
+  let hashRaw = long_default.ZERO;
+  const firstMod = computeFirstMod();
+  let index2 = 0;
+  let lineNumber = 0;
+  let lineStart = true;
+  let prevCR = false;
+  const hashCounts = {};
+  const outputHash = function() {
+    const hashValue = hashRaw.toUnsigned().toString(16);
+    if (!hashCounts[hashValue]) {
+      hashCounts[hashValue] = 0;
+    }
+    hashCounts[hashValue]++;
+    callback(lineNumbers[index2], `${hashValue}:${hashCounts[hashValue]}`);
+    lineNumbers[index2] = -1;
+  };
+  const updateHash = function(current) {
+    const begin = window2[index2];
+    window2[index2] = current;
+    hashRaw = MOD.multiply(hashRaw).add(long_default.fromInt(current)).subtract(firstMod.multiply(long_default.fromInt(begin)));
+    index2 = (index2 + 1) % BLOCK_SIZE;
+  };
+  const processCharacter = function(current) {
+    if (current === space || current === tab || prevCR && current === lf) {
+      prevCR = false;
+      return;
+    }
+    if (current === cr) {
+      current = lf;
+      prevCR = true;
+    } else {
+      prevCR = false;
+    }
+    if (lineNumbers[index2] !== -1) {
+      outputHash();
+    }
+    if (lineStart) {
+      lineStart = false;
+      lineNumber++;
+      lineNumbers[index2] = lineNumber;
+    }
+    if (current === lf) {
+      lineStart = true;
+    }
+    updateHash(current);
+  };
+  const readStream = fs18.createReadStream(filepath, "utf8");
+  for await (const data of readStream) {
+    for (let i = 0; i < data.length; ++i) {
+      processCharacter(data.charCodeAt(i));
+    }
   }
-  logger.debug(`Will autobuild ${languages.join(" and ")}.`);
-  if (autobuildLanguagesWithoutGo.length > 1) {
-    logger.warning(
-      `We will only automatically build ${languages.join(
-        " and "
-      )} code. If you wish to scan ${autobuildLanguagesWithoutGo.slice(1).join(
-        " and "
-      )}, you must replace the autobuild step of your workflow with custom build steps. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually" /* SPECIFY_BUILD_STEPS_MANUALLY */} for more information.`
-    );
+  processCharacter(EOF);
+  for (let i = 0; i < BLOCK_SIZE; i++) {
+    if (lineNumbers[index2] !== -1) {
+      outputHash();
+    }
+    updateHash(0);
   }
-  return languages;
 }
-async function setupCppAutobuild(codeql, logger) {
-  const envVar = featureConfig["cpp_dependency_installation_enabled" /* CppDependencyInstallation */].envVar;
-  const featureName = "C++ automatic installation of dependencies";
-  const gitHubVersion = await getGitHubVersion();
-  const repositoryNwo = getRepositoryNwo();
-  const features = initFeatures(
-    gitHubVersion,
-    repositoryNwo,
-    getTemporaryDirectory(),
-    logger
-  );
-  if (await features.getValue("cpp_dependency_installation_enabled" /* CppDependencyInstallation */, codeql)) {
-    if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" && process.env[envVar] !== "true") {
-      logger.info(
-        `Disabling ${featureName} as we are on a self-hosted runner.${getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` : ""}`
-      );
-      core12.exportVariable(envVar, "false");
-    } else {
-      logger.info(
-        `Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false'. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.`
+function locationUpdateCallback(result, location, logger) {
+  let locationStartLine = location.physicalLocation?.region?.startLine;
+  if (locationStartLine === void 0) {
+    locationStartLine = 1;
+  }
+  return function(lineNumber, hashValue) {
+    if (locationStartLine !== lineNumber) {
+      return;
+    }
+    if (!result.partialFingerprints) {
+      result.partialFingerprints = {};
+    }
+    const existingFingerprint = result.partialFingerprints.primaryLocationLineHash;
+    if (!existingFingerprint) {
+      result.partialFingerprints.primaryLocationLineHash = hashValue;
+    } else if (existingFingerprint !== hashValue) {
+      logger.warning(
+        `Calculated fingerprint of ${hashValue} for file ${location.physicalLocation.artifactLocation.uri} line ${lineNumber}, but found existing inconsistent fingerprint value ${existingFingerprint}`
       );
-      core12.exportVariable(envVar, "true");
     }
-  } else {
-    logger.info(`Disabling ${featureName}.`);
-    core12.exportVariable(envVar, "false");
-  }
+  };
 }
-async function runAutobuild(config, language, logger) {
-  logger.startGroup(`Attempting to automatically build ${language} code`);
-  const codeQL = await getCodeQL(config.codeQLCmd);
-  if (language === "cpp" /* cpp */) {
-    await setupCppAutobuild(codeQL, logger);
+function resolveUriToFile(location, artifacts, sourceRoot, logger) {
+  if (!location.uri && location.index !== void 0) {
+    if (typeof location.index !== "number" || location.index < 0 || location.index >= artifacts.length || !isObject(artifacts[location.index].location)) {
+      logger.debug(`Ignoring location as index "${location.index}" is invalid`);
+      return void 0;
+    }
+    location = artifacts[location.index].location;
   }
-  if (config.buildMode) {
-    await codeQL.extractUsingBuildMode(config, language);
-  } else {
-    await codeQL.runAutobuild(config, language);
+  if (typeof location.uri !== "string") {
+    logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
+    return void 0;
   }
-  if (language === "go" /* go */) {
-    core12.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true");
+  let uri;
+  try {
+    uri = decodeURIComponent(location.uri);
+  } catch {
+    logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
+    return void 0;
   }
-  logger.endGroup();
-}
-
-// src/dependency-caching.ts
-var os4 = __toESM(require("os"));
-var import_path2 = require("path");
-var actionsCache4 = __toESM(require_cache4());
-var glob = __toESM(require_glob());
-var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies";
-var CODEQL_DEPENDENCY_CACHE_VERSION = 1;
-function getJavaTempDependencyDir() {
-  return (0, import_path2.join)(getTemporaryDirectory(), "codeql_java", "repository");
-}
-async function getJavaDependencyDirs() {
-  return [
-    // Maven
-    (0, import_path2.join)(os4.homedir(), ".m2", "repository"),
-    // Gradle
-    (0, import_path2.join)(os4.homedir(), ".gradle", "caches"),
-    // CodeQL Java build-mode: none
-    getJavaTempDependencyDir()
-  ];
-}
-function getCsharpTempDependencyDir() {
-  return (0, import_path2.join)(getTemporaryDirectory(), "codeql_csharp", "repository");
-}
-async function getCsharpDependencyDirs(codeql, features) {
-  const dirs = [
-    // Nuget
-    (0, import_path2.join)(os4.homedir(), ".nuget", "packages")
-  ];
-  if (await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */, codeql)) {
-    dirs.push(getCsharpTempDependencyDir());
+  const fileUriPrefix = "file://";
+  if (uri.startsWith(fileUriPrefix)) {
+    uri = uri.substring(fileUriPrefix.length);
   }
-  return dirs;
-}
-async function makePatternCheck(patterns) {
-  const globber = await makeGlobber(patterns);
-  if ((await globber.glob()).length === 0) {
+  if (uri.indexOf("://") !== -1) {
+    logger.debug(
+      `Ignoring location URI "${uri}" as the scheme is not recognised`
+    );
     return void 0;
   }
-  return patterns;
-}
-var CSHARP_BASE_PATTERNS = [
-  // NuGet
-  "**/packages.lock.json",
-  // Paket
-  "**/paket.lock"
-];
-var CSHARP_EXTRA_PATTERNS = [
-  "**/*.csproj",
-  "**/packages.config",
-  "**/nuget.config"
-];
-async function getCsharpHashPatterns(codeql, features) {
-  const basePatterns = await internal.makePatternCheck(CSHARP_BASE_PATTERNS);
-  if (basePatterns !== void 0) {
-    return basePatterns;
+  const srcRootPrefix = `${sourceRoot}/`;
+  if (uri.startsWith("/") && !uri.startsWith(srcRootPrefix)) {
+    logger.debug(
+      `Ignoring location URI "${uri}" as it is outside of the src root`
+    );
+    return void 0;
   }
-  if (await features.getValue("csharp_new_cache_key" /* CsharpNewCacheKey */, codeql)) {
-    return internal.makePatternCheck(CSHARP_EXTRA_PATTERNS);
+  if (!import_path3.default.isAbsolute(uri)) {
+    uri = srcRootPrefix + uri;
   }
-  return void 0;
-}
-var defaultCacheConfigs = {
-  java: {
-    getDependencyPaths: getJavaDependencyDirs,
-    getHashPatterns: async () => internal.makePatternCheck([
-      // Maven
-      "**/pom.xml",
-      // Gradle
-      "**/*.gradle*",
-      "**/gradle-wrapper.properties",
-      "buildSrc/**/Versions.kt",
-      "buildSrc/**/Dependencies.kt",
-      "gradle/*.versions.toml",
-      "**/versions.properties"
-    ])
-  },
-  csharp: {
-    getDependencyPaths: getCsharpDependencyDirs,
-    getHashPatterns: getCsharpHashPatterns
-  },
-  go: {
-    getDependencyPaths: async () => [(0, import_path2.join)(os4.homedir(), "go", "pkg", "mod")],
-    getHashPatterns: async () => internal.makePatternCheck(["**/go.sum"])
+  if (!fs18.existsSync(uri)) {
+    logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`);
+    return void 0;
   }
-};
-async function makeGlobber(patterns) {
-  return glob.create(patterns.join("\n"));
-}
-async function checkHashPatterns(codeql, features, language, cacheConfig, checkType, logger) {
-  const patterns = await cacheConfig.getHashPatterns(codeql, features);
-  if (patterns === void 0) {
-    logger.info(
-      `Skipping ${checkType} of dependency cache for ${language} as we cannot calculate a hash for the cache key.`
-    );
+  if (fs18.statSync(uri).isDirectory()) {
+    logger.debug(`Unable to compute fingerprint for directory: ${uri}`);
+    return void 0;
   }
-  return patterns;
+  return uri;
 }
-async function downloadDependencyCaches(codeql, features, languages, logger) {
-  const status = [];
-  const restoredKeys = [];
-  for (const language of languages) {
-    const cacheConfig = defaultCacheConfigs[language];
-    if (cacheConfig === void 0) {
-      logger.info(
-        `Skipping download of dependency cache for ${language} as we have no caching configuration for it.`
+async function addFingerprints(sarifLog, sourceRoot, logger) {
+  logger.info(
+    `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.`
+  );
+  const callbacksByFile = {};
+  for (const run9 of sarifLog.runs || []) {
+    const artifacts = run9.artifacts || [];
+    for (const result of run9.results || []) {
+      const primaryLocation = (result.locations || [])[0];
+      if (!primaryLocation?.physicalLocation?.artifactLocation) {
+        logger.debug(
+          `Unable to compute fingerprint for invalid location: ${JSON.stringify(
+            primaryLocation
+          )}`
+        );
+        continue;
+      }
+      if (primaryLocation?.physicalLocation?.region?.startLine === void 0) {
+        continue;
+      }
+      const filepath = resolveUriToFile(
+        primaryLocation.physicalLocation.artifactLocation,
+        artifacts,
+        sourceRoot,
+        logger
+      );
+      if (!filepath) {
+        continue;
+      }
+      if (!callbacksByFile[filepath]) {
+        callbacksByFile[filepath] = [];
+      }
+      callbacksByFile[filepath].push(
+        locationUpdateCallback(result, primaryLocation, logger)
       );
-      continue;
-    }
-    const patterns = await checkHashPatterns(
-      codeql,
-      features,
-      language,
-      cacheConfig,
-      "download",
-      logger
-    );
-    if (patterns === void 0) {
-      status.push({ language, hit_kind: "no-hash" /* NoHash */ });
-      continue;
     }
-    const primaryKey = await cacheKey2(codeql, features, language, patterns);
-    const restoreKeys = [
-      await cachePrefix2(codeql, features, language)
-    ];
-    logger.info(
-      `Downloading cache for ${language} with key ${primaryKey} and restore keys ${restoreKeys.join(
-        ", "
-      )}`
-    );
-    const start = performance.now();
-    const hitKey = await actionsCache4.restoreCache(
-      await cacheConfig.getDependencyPaths(codeql, features),
-      primaryKey,
-      restoreKeys
-    );
-    const download_duration_ms = Math.round(performance.now() - start);
-    if (hitKey !== void 0) {
-      logger.info(`Cache hit on key ${hitKey} for ${language}.`);
-      let hit_kind = "partial" /* Partial */;
-      if (hitKey === primaryKey) {
-        hit_kind = "exact" /* Exact */;
+  }
+  for (const [filepath, callbacks] of Object.entries(callbacksByFile)) {
+    const teeCallback = function(lineNumber, hashValue) {
+      for (const c of Object.values(callbacks)) {
+        c(lineNumber, hashValue);
       }
-      status.push({
-        language,
-        hit_kind,
-        download_duration_ms
-      });
-      restoredKeys.push(hitKey);
-    } else {
-      status.push({ language, hit_kind: "miss" /* Miss */ });
-      logger.info(`No suitable cache found for ${language}.`);
+    };
+    await hash(teeCallback, filepath);
+  }
+  return sarifLog;
+}
+
+// src/init.ts
+var fs19 = __toESM(require("fs"));
+var path17 = __toESM(require("path"));
+var core14 = __toESM(require_core());
+var toolrunner4 = __toESM(require_toolrunner());
+var github3 = __toESM(require_github());
+var io6 = __toESM(require_io());
+async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
+  logger.startGroup("Setup CodeQL tools");
+  const { codeql, toolsDownloadStatusReport, toolsSource, toolsVersion } = await setupCodeQL(
+    toolsInput,
+    apiDetails,
+    tempDir,
+    variant,
+    defaultCliVersion,
+    rawLanguages,
+    useOverlayAwareDefaultCliVersion,
+    features,
+    logger,
+    true
+  );
+  await codeql.printVersion();
+  logger.endGroup();
+  return {
+    codeql,
+    toolsDownloadStatusReport,
+    toolsSource,
+    toolsVersion
+  };
+}
+async function initConfig2(actionState, inputs) {
+  return await withGroupAsync("Load language configuration", async () => {
+    return await initConfig(actionState, inputs);
+  });
+}
+async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile) {
+  fs19.mkdirSync(config.dbLocation, { recursive: true });
+  await wrapEnvironment(
+    databaseInitEnvironment,
+    async () => await codeql.databaseInitCluster(
+      config,
+      sourceRoot,
+      processName,
+      qlconfigFile
+    )
+  );
+}
+async function checkPacksForOverlayCompatibility(codeql, config, logger) {
+  const codeQlOverlayVersion = (await codeql.getVersion()).overlayVersion;
+  if (codeQlOverlayVersion === void 0) {
+    logger.warning("The CodeQL CLI does not support overlay analysis.");
+    return false;
+  }
+  for (const language of config.languages) {
+    const suitePath = getGeneratedSuitePath(config, language);
+    const packDirs = await codeql.resolveQueriesStartingPacks([suitePath]);
+    if (packDirs.some(
+      (packDir) => !checkPackForOverlayCompatibility(
+        packDir,
+        codeQlOverlayVersion,
+        logger
+      )
+    )) {
+      return false;
     }
   }
-  return { statusReport: status, restoredKeys };
+  return true;
 }
-async function uploadDependencyCaches(codeql, features, config, logger) {
-  const status = [];
-  for (const language of config.languages) {
-    const cacheConfig = defaultCacheConfigs[language];
-    if (cacheConfig === void 0) {
-      logger.info(
-        `Skipping upload of dependency cache for ${language} as we have no caching configuration for it.`
-      );
-      continue;
+function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) {
+  try {
+    let qlpackPath = path17.join(packDir, "qlpack.yml");
+    if (!fs19.existsSync(qlpackPath)) {
+      qlpackPath = path17.join(packDir, "codeql-pack.yml");
     }
-    const patterns = await checkHashPatterns(
-      codeql,
-      features,
-      language,
-      cacheConfig,
-      "upload",
-      logger
+    const qlpackContents = load(
+      fs19.readFileSync(qlpackPath, "utf8")
     );
-    if (patterns === void 0) {
-      status.push({ language, result: "no-hash" /* NoHash */ });
-      continue;
+    if (!qlpackContents.buildMetadata) {
+      return true;
     }
-    const key = await cacheKey2(codeql, features, language, patterns);
-    if (config.dependencyCachingRestoredKeys.includes(key)) {
-      status.push({ language, result: "duplicate" /* Duplicate */ });
-      continue;
+    const packInfoPath = path17.join(packDir, ".packinfo");
+    if (!fs19.existsSync(packInfoPath)) {
+      logger.warning(
+        `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.`
+      );
+      return false;
     }
-    const size = await getTotalCacheSize(
-      await cacheConfig.getDependencyPaths(codeql, features),
-      logger,
-      true
+    const packInfoFileContents = JSON.parse(
+      fs19.readFileSync(packInfoPath, "utf8")
     );
-    if (size === 0) {
-      status.push({ language, result: "empty" /* Empty */ });
-      logger.info(
-        `Skipping upload of dependency cache for ${language} since it is empty.`
+    const packOverlayVersion = packInfoFileContents.overlayVersion;
+    if (typeof packOverlayVersion !== "number") {
+      logger.warning(
+        `The .packinfo file for the query pack at ${packDir} does not have the overlayVersion field, which indicates that the pack is not compatible with overlay analysis.`
       );
-      continue;
+      return false;
     }
-    logger.info(
-      `Uploading cache of size ${size} for ${language} with key ${key}...`
+    if (packOverlayVersion !== codeQlOverlayVersion) {
+      logger.warning(
+        `The query pack at ${packDir} was compiled with overlay version ${packOverlayVersion}, but the CodeQL CLI supports overlay version ${codeQlOverlayVersion}. The query pack needs to be recompiled to support overlay analysis.`
+      );
+      return false;
+    }
+  } catch (e) {
+    logger.warning(
+      `Error while checking pack at ${packDir} for overlay compatibility: ${getErrorMessage(e)}`
     );
-    try {
-      const start = performance.now();
-      await actionsCache4.saveCache(
-        await cacheConfig.getDependencyPaths(codeql, features),
-        key
+    return false;
+  }
+  return true;
+}
+async function checkInstallPython311(languages, codeql) {
+  if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) {
+    const script = path17.resolve(
+      __dirname,
+      "../python-setup",
+      "check_python12.ps1"
+    );
+    await new toolrunner4.ToolRunner(await io6.which("powershell", true), [
+      script
+    ]).exec();
+  }
+}
+function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync5 = fs19.rmSync) {
+  if (fs19.existsSync(config.dbLocation) && (fs19.statSync(config.dbLocation).isFile() || fs19.readdirSync(config.dbLocation).length > 0)) {
+    if (!options.disableExistingDirectoryWarning) {
+      logger.warning(
+        `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.`
       );
-      const upload_duration_ms = Math.round(performance.now() - start);
-      status.push({
-        language,
-        result: "stored" /* Stored */,
-        upload_size_bytes: Math.round(size),
-        upload_duration_ms
+    }
+    try {
+      rmSync5(config.dbLocation, {
+        force: true,
+        maxRetries: 3,
+        recursive: true
       });
-    } catch (error3) {
-      if (error3 instanceof actionsCache4.ReserveCacheError) {
-        logger.info(
-          `Not uploading cache for ${language}, because ${key} is already in use.`
+      logger.info(
+        `Cleaned up database cluster directory ${config.dbLocation}.`
+      );
+    } catch (e) {
+      const blurb = `The CodeQL Action requires an empty database cluster directory. ${getOptionalInput("db-location") ? `This is currently configured to be ${config.dbLocation}. ` : `By default, this is located at ${config.dbLocation}. You can customize it using the 'db-location' input to the init Action. `}An attempt was made to clean up the directory, but this failed.`;
+      if (isSelfHostedRunner()) {
+        throw new ConfigurationError(
+          `${blurb} This can happen if another process is using the directory or the directory is owned by a different user. Please clean up the directory manually and rerun the job. Details: ${getErrorMessage(
+            e
+          )}`
         );
-        logger.debug(error3.message);
-        status.push({ language, result: "duplicate" /* Duplicate */ });
       } else {
-        throw error3;
+        throw new Error(
+          `${blurb} This shouldn't typically happen on hosted runners. If you are using an advanced setup, please check your workflow, otherwise we recommend rerunning the job. Details: ${getErrorMessage(e)}`
+        );
       }
     }
   }
-  return status;
-}
-async function cacheKey2(codeql, features, language, patterns) {
-  const hash2 = await glob.hashFiles(patterns.join("\n"));
-  return `${await cachePrefix2(codeql, features, language)}${hash2}`;
 }
-async function getFeaturePrefix(codeql, features, language) {
-  const enabledFeatures = [];
-  const addFeatureIfEnabled = async (feature) => {
-    if (await features.getValue(feature, codeql)) {
-      enabledFeatures.push(feature);
-    }
-  };
-  if (language === "csharp" /* csharp */) {
-    await addFeatureIfEnabled("csharp_new_cache_key" /* CsharpNewCacheKey */);
-    await addFeatureIfEnabled("csharp_cache_bmn" /* CsharpCacheBuildModeNone */);
+async function getFileCoverageInformationEnabled(debugMode, codeql, features, repositoryProperties) {
+  if (debugMode) {
+    return {
+      enabled: true,
+      enabledByRepositoryProperty: false,
+      showDeprecationWarning: false
+    };
   }
-  if (enabledFeatures.length > 0) {
-    return `${createCacheKeyHash(enabledFeatures)}-`;
+  if (!isAnalyzingPullRequest()) {
+    return {
+      enabled: true,
+      enabledByRepositoryProperty: false,
+      showDeprecationWarning: false
+    };
   }
-  return "";
-}
-async function cachePrefix2(codeql, features, language) {
-  const runnerOs = getRequiredEnvParam("RUNNER_OS");
-  const customPrefix = process.env["CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX" /* DEPENDENCY_CACHING_PREFIX */];
-  let prefix = CODEQL_DEPENDENCY_CACHE_PREFIX;
-  if (customPrefix !== void 0 && customPrefix.length > 0) {
-    prefix = `${prefix}-${customPrefix}`;
+  if ((process.env["CODEQL_ACTION_FILE_COVERAGE_ON_PRS" /* FILE_COVERAGE_ON_PRS */] || "").toLocaleLowerCase() === "true") {
+    return {
+      enabled: true,
+      enabledByRepositoryProperty: false,
+      showDeprecationWarning: false
+    };
   }
-  const featurePrefix = await getFeaturePrefix(codeql, features, language);
-  return `${prefix}-${featurePrefix}${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`;
-}
-async function getDependencyCacheUsage(logger) {
-  try {
-    const caches = await listActionsCaches(CODEQL_DEPENDENCY_CACHE_PREFIX);
-    const totalSize = caches.reduce(
-      (acc, cache) => acc + (cache.size_in_bytes ?? 0),
-      0
-    );
-    return { count: caches.length, size_bytes: totalSize };
-  } catch (err) {
-    logger.warning(
-      `Unable to retrieve information about dependency cache usage: ${getErrorMessage(err)}`
-    );
+  if (repositoryProperties["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */] === true) {
+    return {
+      enabled: true,
+      enabledByRepositoryProperty: true,
+      showDeprecationWarning: false
+    };
   }
-  return void 0;
+  if (!await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */, codeql)) {
+    return {
+      enabled: true,
+      enabledByRepositoryProperty: false,
+      showDeprecationWarning: true
+    };
+  }
+  return {
+    enabled: false,
+    enabledByRepositoryProperty: false,
+    showDeprecationWarning: false
+  };
 }
-var internal = {
-  makePatternCheck
-};
+function logFileCoverageOnPrsDeprecationWarning(logger) {
+  if (process.env["CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION" /* DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION */]) {
+    return;
+  }
+  const repositoryOwnerType = github3.context.payload.repository?.owner.type;
+  let message = "Starting April 2026, the CodeQL Action will skip computing file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses.";
+  const envVarOptOut = "set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true`.";
+  const repoPropertyOptOut = 'create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository\'s settings.';
+  if (repositoryOwnerType === "Organization") {
+    if (isDefaultSetup()) {
+      message += `
 
-// src/analyze.ts
-var CodeQLAnalysisError = class extends Error {
-  constructor(queriesStatusReport, message, error3) {
-    super(message);
-    this.queriesStatusReport = queriesStatusReport;
-    this.message = message;
-    this.error = error3;
-    this.name = "CodeQLAnalysisError";
+To opt out of this change, ${repoPropertyOptOut}`;
+    } else {
+      message += `
+
+To opt out of this change, ${envVarOptOut} Alternatively, ${repoPropertyOptOut}`;
+    }
+  } else if (isDefaultSetup()) {
+    message += `
+
+To opt out of this change, switch to an advanced setup workflow and ${envVarOptOut}`;
+  } else {
+    message += `
+
+To opt out of this change, ${envVarOptOut}`;
   }
-  queriesStatusReport;
-  message;
-  error;
+  logger.warning(message);
+  core14.exportVariable("CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION" /* DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION */, "true");
+}
+
+// src/sarif/index.ts
+var fs20 = __toESM(require("fs"));
+var InvalidSarifUploadError = class extends Error {
 };
-async function setupPythonExtractor(logger) {
-  const codeqlPython = process.env["CODEQL_PYTHON"];
-  if (codeqlPython === void 0 || codeqlPython.length === 0) {
-    return;
+function getToolNames(sarifFile) {
+  const toolNames = {};
+  for (const run9 of sarifFile.runs || []) {
+    const tool = run9.tool || {};
+    const driver = tool.driver || {};
+    if (typeof driver.name === "string" && driver.name.length > 0) {
+      toolNames[driver.name] = true;
+    }
   }
-  logger.warning(
-    "The CODEQL_PYTHON environment variable is no longer supported. Please remove it from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies.\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'."
-  );
-  return;
+  return Object.keys(toolNames);
 }
-async function runExtraction(codeql, features, config, logger) {
-  for (const language of config.languages) {
-    if (dbIsFinalized(config, language, logger)) {
-      logger.debug(
-        `Database for ${language} has already been finalized, skipping extraction.`
+function readSarifFile(sarifFilePath) {
+  return JSON.parse(fs20.readFileSync(sarifFilePath, "utf8"));
+}
+function combineSarifFiles(sarifFiles, logger) {
+  logger.info(`Loading SARIF file(s)`);
+  const runs = [];
+  let version = void 0;
+  for (const sarifFile of sarifFiles) {
+    logger.debug(`Loading SARIF file: ${sarifFile}`);
+    const sarifLog = readSarifFile(sarifFile);
+    if (version === void 0) {
+      version = sarifLog.version;
+    } else if (version !== sarifLog.version) {
+      throw new InvalidSarifUploadError(
+        `Different SARIF versions encountered: ${version} and ${sarifLog.version}`
       );
+    }
+    runs.push(...sarifLog?.runs || []);
+  }
+  if (version === void 0) {
+    version = "2.1.0";
+  }
+  return { version, runs };
+}
+function areAllRunsProducedByCodeQL(sarifLogs) {
+  return sarifLogs.every((sarifLog) => {
+    return sarifLog.runs?.every((run9) => run9.tool?.driver?.name === "CodeQL");
+  });
+}
+function createRunKey(run9) {
+  return {
+    name: run9.tool?.driver?.name,
+    fullName: run9.tool?.driver?.fullName,
+    version: run9.tool?.driver?.version,
+    semanticVersion: run9.tool?.driver?.semanticVersion,
+    guid: run9.tool?.driver?.guid,
+    automationId: run9.automationDetails?.id
+  };
+}
+function areAllRunsUnique(sarifLogs) {
+  const keys = /* @__PURE__ */ new Set();
+  for (const sarifLog of sarifLogs) {
+    if (sarifLog.runs === void 0) {
       continue;
     }
-    if (await shouldExtractLanguage(codeql, config, language)) {
-      logger.startGroup(`Extracting ${language}`);
-      if (language === "python" /* python */) {
-        await setupPythonExtractor(logger);
-      }
-      if (config.buildMode) {
-        if (language === "cpp" /* cpp */ && config.buildMode === "autobuild" /* Autobuild */) {
-          await setupCppAutobuild(codeql, logger);
-        }
-        if (language === "java" /* java */ && config.buildMode === "none" /* None */) {
-          process.env["CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_DEPENDENCY_DIR"] = getJavaTempDependencyDir();
-        }
-        if (language === "csharp" /* csharp */ && config.buildMode === "none" /* None */ && await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */)) {
-          process.env["CODEQL_EXTRACTOR_CSHARP_OPTION_BUILDLESS_DEPENDENCY_DIR"] = getCsharpTempDependencyDir();
-        }
-        await codeql.extractUsingBuildMode(config, language);
-      } else {
-        await codeql.extractScannedLanguage(config, language);
+    for (const run9 of sarifLog.runs) {
+      const key = JSON.stringify(createRunKey(run9));
+      if (keys.has(key)) {
+        return false;
       }
-      logger.endGroup();
+      keys.add(key);
     }
   }
+  return true;
 }
-async function shouldExtractLanguage(codeql, config, language) {
-  return config.buildMode === "none" /* None */ || config.buildMode === "autobuild" /* Autobuild */ && process.env["CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */] !== "true" || !config.buildMode && await codeql.isScannedLanguage(language);
+
+// src/upload-lib.ts
+var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
+var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
+async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
+  return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
 }
-function dbIsFinalized(config, language, logger) {
-  const dbPath = getCodeQLDatabasePath(config, language);
-  try {
-    const dbInfo = load(
-      fs16.readFileSync(path15.resolve(dbPath, "codeql-database.yml"), "utf8")
-    );
-    return !("inProgress" in dbInfo);
-  } catch {
-    logger.warning(
-      `Could not check whether database for ${language} was finalized. Assuming it is not.`
-    );
+async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
+  if (!await shouldDisableCombineSarifFiles(sarifObjects, githubVersion)) {
+    return;
+  }
+  const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2025-07-21-code-scanning-will-stop-combining-multiple-sarif-runs-uploaded-in-the-same-sarif-file/";
+  throw new ConfigurationError(
+    `The CodeQL Action does not support uploading multiple SARIF runs with the same category. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
+  );
+}
+async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) {
+  if (githubVersion.type === "GitHub Enterprise Server" /* GHES */) {
+    if (satisfiesGHESVersion(githubVersion.version, "<3.18", true)) {
+      return false;
+    }
+  }
+  if (areAllRunsUnique(sarifObjects)) {
     return false;
   }
+  return true;
 }
-async function finalizeDatabaseCreation(codeql, features, config, threadsFlag, memoryFlag, logger) {
-  const extractionStart = import_perf_hooks3.performance.now();
-  await runExtraction(codeql, features, config, logger);
-  const extractionTime = import_perf_hooks3.performance.now() - extractionStart;
-  const trapImportStart = import_perf_hooks3.performance.now();
-  for (const language of config.languages) {
-    if (dbIsFinalized(config, language, logger)) {
-      logger.info(
-        `There is already a finalized database for ${language} at the location where the CodeQL Action places databases, so we did not create one.`
-      );
-    } else {
-      logger.startGroup(`Finalizing ${language}`);
-      await codeql.finalizeDatabase(
-        getCodeQLDatabasePath(config, language),
-        threadsFlag,
-        memoryFlag,
-        config.debugMode
+async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) {
+  logger.info("Combining SARIF files using the CodeQL CLI");
+  const sarifObjects = sarifFiles.map(readSarifFile);
+  const deprecationWarningMessage = gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025";
+  const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload";
+  if (!areAllRunsProducedByCodeQL(sarifObjects)) {
+    await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
+    logger.debug(
+      "Not all SARIF files were produced by CodeQL. Merging files in the action."
+    );
+    if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
+      logger.warning(
+        `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
       );
-      logger.endGroup();
+      core15.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
     }
+    return combineSarifFiles(sarifFiles, logger);
   }
-  const trapImportTime = import_perf_hooks3.performance.now() - trapImportStart;
-  return {
-    scanned_language_extraction_duration_ms: Math.round(extractionTime),
-    trap_import_duration_ms: Math.round(trapImportTime)
-  };
+  let codeQL;
+  let tempDir = getTemporaryDirectory();
+  const config = await getConfig(tempDir, logger);
+  if (config !== void 0) {
+    codeQL = await getCodeQL(logger, config.codeQLCmd);
+    tempDir = config.tempDir;
+  } else {
+    logger.info(
+      "Initializing CodeQL since the 'init' Action was not called before this step."
+    );
+    const apiDetails = {
+      auth: getRequiredInput("token"),
+      externalRepoAuth: getOptionalInput(
+        "external-repository-token"
+      ),
+      url: getRequiredEnvParam("GITHUB_SERVER_URL"),
+      apiURL: getRequiredEnvParam("GITHUB_API_URL")
+    };
+    const codeQLDefaultVersionInfo = await features.getEnabledDefaultCliVersions(gitHubVersion.type);
+    const initCodeQLResult = await initCodeQL(
+      void 0,
+      // There is no tools input on the upload action
+      apiDetails,
+      tempDir,
+      gitHubVersion.type,
+      codeQLDefaultVersionInfo,
+      void 0,
+      // rawLanguages: upload-lib does not run analysis
+      false,
+      // useOverlayAwareDefaultCliVersion: upload-lib does not run analysis
+      features,
+      logger
+    );
+    codeQL = initCodeQLResult.codeql;
+  }
+  const baseTempDir = path18.resolve(tempDir, "combined-sarif");
+  fs21.mkdirSync(baseTempDir, { recursive: true });
+  const outputDirectory = fs21.mkdtempSync(path18.resolve(baseTempDir, "output-"));
+  const outputFile = path18.resolve(outputDirectory, "combined-sarif.sarif");
+  await codeQL.mergeResults(sarifFiles, outputFile, {
+    mergeRunsFromEqualCategory: true
+  });
+  return readSarifFile(outputFile);
 }
-async function setupDiffInformedQueryRun(logger) {
-  return await withGroupAsync(
-    "Generating diff range extension pack",
-    async () => {
-      const diffRanges = readDiffRangesJsonFile(logger);
-      if (diffRanges === void 0) {
-        logger.info(
-          "No precomputed diff ranges found; skipping diff-informed analysis stage."
-        );
-        return void 0;
+function populateRunAutomationDetails(sarifFile, category, analysis_key, environment) {
+  const automationID = getAutomationID2(category, analysis_key, environment);
+  if (automationID !== void 0) {
+    for (const run9 of sarifFile.runs || []) {
+      if (run9.automationDetails === void 0) {
+        run9.automationDetails = {
+          id: automationID
+        };
       }
-      const checkoutPath = getRequiredInput("checkout_path");
-      const packDir = writeDiffRangeDataExtensionPack(
-        logger,
-        diffRanges,
-        checkoutPath
-      );
-      logger.info(
-        `Successfully created diff range extension pack at ${packDir}.`
-      );
-      return packDir;
     }
-  );
-}
-function diffRangeExtensionPackContents(ranges, checkoutPath) {
-  const header = `
-extensions:
-  - addsTo:
-      pack: codeql/util
-      extensible: restrictAlertsTo
-      checkPresence: false
-    data:
-`;
-  let data = ranges.map((range) => {
-    const filename = path15.join(checkoutPath, range.path).replaceAll(path15.sep, "/");
-    return `      - [${dump(filename, { forceQuotes: true }).trim()}, ${range.startLine}, ${range.endLine}]
-`;
-  }).join("");
-  if (!data) {
-    data = '      - ["", 0, 0]\n';
+    return sarifFile;
   }
-  return header + data;
+  return sarifFile;
 }
-function writeDiffRangeDataExtensionPack(logger, ranges, checkoutPath) {
-  if (ranges.length === 0) {
-    ranges = [{ path: "", startLine: 0, endLine: 0 }];
+function getAutomationID2(category, analysis_key, environment) {
+  if (category !== void 0) {
+    let automationID = category;
+    if (!automationID.endsWith("/")) {
+      automationID += "/";
+    }
+    return automationID;
   }
-  const diffRangeDir = path15.join(getTemporaryDirectory(), "pr-diff-range");
-  fs16.mkdirSync(diffRangeDir, { recursive: true });
-  fs16.writeFileSync(
-    path15.join(diffRangeDir, "qlpack.yml"),
-    `
-name: codeql-action/pr-diff-range
-version: 0.0.0
-library: true
-extensionTargets:
-  codeql/util: '*'
-dataExtensions:
-  - pr-diff-range.yml
-`
-  );
-  const extensionContents = diffRangeExtensionPackContents(
-    ranges,
-    checkoutPath
-  );
-  const extensionFilePath = path15.join(diffRangeDir, "pr-diff-range.yml");
-  fs16.writeFileSync(extensionFilePath, extensionContents);
-  logger.debug(
-    `Wrote pr-diff-range extension pack to ${extensionFilePath}:
-${extensionContents}`
-  );
-  return diffRangeDir;
+  return computeAutomationID(analysis_key, environment);
 }
-var defaultSuites = /* @__PURE__ */ new Set([
-  "security-experimental",
-  "security-extended",
-  "security-and-quality",
-  "code-quality",
-  "code-scanning"
-]);
-function resolveQuerySuiteAlias(language, maybeSuite) {
-  if (defaultSuites.has(maybeSuite)) {
-    return `${language}-${maybeSuite}.qls`;
+async function uploadPayload(payload, repositoryNwo, logger, analysis) {
+  logger.info("Uploading results");
+  if (shouldSkipSarifUpload()) {
+    const payloadSaveFile = path18.join(
+      getTemporaryDirectory(),
+      `payload-${analysis.kind}.json`
+    );
+    logger.info(
+      `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}`
+    );
+    logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`);
+    fs21.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2));
+    return "dummy-sarif-id";
+  }
+  const client = getApiClient();
+  try {
+    const response = await client.request(analysis.target, {
+      owner: repositoryNwo.owner,
+      repo: repositoryNwo.repo,
+      data: payload
+    });
+    logger.debug(`response status: ${response.status}`);
+    logger.info("Successfully uploaded results");
+    return response.data.id;
+  } catch (e) {
+    const httpError = asHTTPError(e);
+    if (httpError !== void 0) {
+      switch (httpError.status) {
+        case 403:
+          core15.warning(httpError.message || GENERIC_403_MSG);
+          break;
+        case 404:
+          core15.warning(httpError.message || GENERIC_404_MSG);
+          break;
+        default:
+          core15.warning(httpError.message);
+          break;
+      }
+    }
+    throw wrapApiConfigurationError(e);
   }
-  return maybeSuite;
 }
-function addSarifExtension(analysis, base) {
-  return `${base}${analysis.sarifExtension}`;
+function findSarifFilesInDir(sarifPath, isSarif) {
+  const sarifFiles = [];
+  const walkSarifFiles = (dir) => {
+    const entries = fs21.readdirSync(dir, { withFileTypes: true });
+    for (const entry of entries) {
+      if (entry.isFile() && isSarif(entry.name)) {
+        sarifFiles.push(path18.resolve(dir, entry.name));
+      } else if (entry.isDirectory()) {
+        walkSarifFiles(path18.resolve(dir, entry.name));
+      }
+    }
+  };
+  walkSarifFiles(sarifPath);
+  return sarifFiles;
 }
-async function runQueries(sarifFolder, memoryFlag, threadsFlag, diffRangePackDir, automationDetailsId, codeql, config, logger, features) {
-  const statusReport = {};
-  const queryFlags = [memoryFlag, threadsFlag];
-  const incrementalMode = [];
-  if (config.overlayDatabaseMode !== "overlay-base" /* OverlayBase */) {
-    queryFlags.push("--expect-discarded-cache");
+function getSarifFilePaths(sarifPath, isSarif) {
+  if (!fs21.existsSync(sarifPath)) {
+    throw new ConfigurationError(`Path does not exist: ${sarifPath}`);
   }
-  statusReport.analysis_is_diff_informed = diffRangePackDir !== void 0;
-  if (diffRangePackDir) {
-    queryFlags.push(`--additional-packs=${diffRangePackDir}`);
-    queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
-    incrementalMode.push("diff-informed");
+  let sarifFiles;
+  if (fs21.lstatSync(sarifPath).isDirectory()) {
+    sarifFiles = findSarifFilesInDir(sarifPath, isSarif);
+    if (sarifFiles.length === 0) {
+      throw new ConfigurationError(
+        `No SARIF files found to upload in "${sarifPath}".`
+      );
+    }
+  } else {
+    sarifFiles = [sarifPath];
   }
-  statusReport.analysis_is_overlay = config.overlayDatabaseMode === "overlay" /* Overlay */;
-  statusReport.analysis_builds_overlay_base_database = config.overlayDatabaseMode === "overlay-base" /* OverlayBase */;
-  if (config.overlayDatabaseMode === "overlay" /* Overlay */) {
-    incrementalMode.push("overlay");
+  return sarifFiles;
+}
+async function getGroupedSarifFilePaths(logger, sarifPath) {
+  const stats = fs21.statSync(sarifPath, { throwIfNoEntry: false });
+  if (stats === void 0) {
+    throw new ConfigurationError(`Path does not exist: ${sarifPath}`);
   }
-  const sarifRunPropertyFlag = incrementalMode.length > 0 ? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}` : void 0;
-  const dbAnalysisConfig = getPrimaryAnalysisConfig(config);
-  for (const language of config.languages) {
-    try {
-      const queries = [];
-      if (config.analysisKinds.length > 1) {
-        queries.push(getGeneratedSuitePath(config, language));
-        if (isCodeQualityEnabled(config)) {
-          for (const qualityQuery of codeQualityQueries) {
-            queries.push(resolveQuerySuiteAlias(language, qualityQuery));
-          }
-        }
-      }
-      logger.startGroup(`Running queries for ${language}`);
-      const startTimeRunQueries = (/* @__PURE__ */ new Date()).getTime();
-      const databasePath = getCodeQLDatabasePath(config, language);
-      await codeql.databaseRunQueries(databasePath, queryFlags, queries);
-      logger.debug(`Finished running queries for ${language}.`);
-      statusReport[`analyze_builtin_queries_${language}_duration_ms`] = (/* @__PURE__ */ new Date()).getTime() - startTimeRunQueries;
-      const startTimeInterpretResults = /* @__PURE__ */ new Date();
-      const { summary: analysisSummary, sarifFile } = await runInterpretResultsFor(
-        dbAnalysisConfig,
-        language,
-        void 0,
-        config.debugMode
+  const results = {};
+  if (stats.isDirectory()) {
+    let unassignedSarifFiles = findSarifFilesInDir(
+      sarifPath,
+      (name) => path18.extname(name) === ".sarif"
+    );
+    logger.debug(
+      `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}`
+    );
+    for (const analysisConfig of SarifScanOrder) {
+      const filesForCurrentAnalysis = unassignedSarifFiles.filter(
+        analysisConfig.sarifPredicate
       );
-      let qualityAnalysisSummary;
-      if (config.analysisKinds.length > 1 && isCodeQualityEnabled(config)) {
-        const qualityResult = await runInterpretResultsFor(
-          CodeQuality,
-          language,
-          codeQualityQueries.map(
-            (i) => resolveQuerySuiteAlias(language, i)
-          ),
-          config.debugMode
+      if (filesForCurrentAnalysis.length > 0) {
+        logger.debug(
+          `The following SARIF files are for ${analysisConfig.name}: ${filesForCurrentAnalysis.join(", ")}`
         );
-        qualityAnalysisSummary = qualityResult.summary;
-      }
-      const endTimeInterpretResults = /* @__PURE__ */ new Date();
-      statusReport[`interpret_results_${language}_duration_ms`] = endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
-      logger.endGroup();
-      if (analysisSummary.trim()) {
-        logger.info(analysisSummary);
-      }
-      if (qualityAnalysisSummary?.trim()) {
-        logger.info(qualityAnalysisSummary);
-      }
-      if (!config.enableFileCoverageInformation) {
-        logger.info(
-          "To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches."
+        unassignedSarifFiles = unassignedSarifFiles.filter(
+          (name) => !analysisConfig.sarifPredicate(name)
         );
+        results[analysisConfig.kind] = filesForCurrentAnalysis;
+      } else {
+        logger.debug(`Found no SARIF files for ${analysisConfig.name}`);
       }
-      if (await features.getValue("qa_telemetry_enabled" /* QaTelemetryEnabled */)) {
-        const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile);
-        const perQueryAlertCountEventReport = {
-          event: "codeql database interpret-results",
-          started_at: startTimeInterpretResults.toISOString(),
-          completed_at: endTimeInterpretResults.toISOString(),
-          exit_status: "success",
-          language,
-          properties: {
-            alertCounts: perQueryAlertCounts
-          }
-        };
-        if (statusReport["event_reports"] === void 0) {
-          statusReport["event_reports"] = [];
-        }
-        statusReport["event_reports"].push(perQueryAlertCountEventReport);
-      }
-    } catch (e) {
-      statusReport.analyze_failure_language = language;
-      throw new CodeQLAnalysisError(
-        statusReport,
-        `Error running analysis for ${language}: ${getErrorMessage(e)}`,
-        wrapError(e)
+    }
+    if (unassignedSarifFiles.length !== 0) {
+      logger.warning(
+        `Found files in ${sarifPath} which do not belong to any analysis: ${unassignedSarifFiles.join(", ")}`
       );
     }
-  }
-  return statusReport;
-  async function runInterpretResultsFor(analysis, language, queries, enableDebugLogging) {
-    logger.info(`Interpreting ${analysis.name} results for ${language}`);
-    const category = analysis.fixCategory(logger, automationDetailsId);
-    const sarifFile = path15.join(
-      sarifFolder,
-      addSarifExtension(analysis, language)
-    );
-    const summary = await runInterpretResults(
-      language,
-      queries,
-      sarifFile,
-      enableDebugLogging,
-      category
-    );
-    return { summary, sarifFile };
-  }
-  async function runInterpretResults(language, queries, sarifFile, enableDebugLogging, category) {
-    const databasePath = getCodeQLDatabasePath(config, language);
-    return await codeql.databaseInterpretResults(
-      databasePath,
-      queries,
-      sarifFile,
-      threadsFlag,
-      enableDebugLogging ? "-vv" : "-v",
-      sarifRunPropertyFlag,
-      category,
-      config,
-      features
-    );
-  }
-  function getPerQueryAlertCounts(sarifPath) {
-    const sarifObject = JSON.parse(
-      fs16.readFileSync(sarifPath, "utf8")
-    );
-    const perQueryAlertCounts = {};
-    for (const sarifRun of sarifObject.runs) {
-      if (sarifRun.results) {
-        for (const result of sarifRun.results) {
-          const query = result.rule?.id || result.ruleId;
-          if (query) {
-            perQueryAlertCounts[query] = (perQueryAlertCounts[query] || 0) + 1;
-          }
-        }
+  } else {
+    for (const analysisConfig of SarifScanOrder) {
+      if (analysisConfig.kind === "code-scanning" /* CodeScanning */ || analysisConfig.sarifPredicate(sarifPath)) {
+        logger.debug(
+          `Using '${sarifPath}' as a SARIF file for ${analysisConfig.name}.`
+        );
+        results[analysisConfig.kind] = [sarifPath];
+        break;
       }
     }
-    return perQueryAlertCounts;
   }
+  return results;
 }
-async function runFinalize(features, outputDir, threadsFlag, memoryFlag, codeql, config, logger) {
-  try {
-    await fs16.promises.rm(outputDir, { force: true, recursive: true });
-  } catch (error3) {
-    if (error3?.code !== "ENOENT") {
-      throw error3;
-    }
-  }
-  await fs16.promises.mkdir(outputDir, { recursive: true });
-  const timings = await finalizeDatabaseCreation(
-    codeql,
-    features,
-    config,
-    threadsFlag,
-    memoryFlag,
-    logger
-  );
-  if (process.env["CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */] !== "true") {
-    await endTracingForCluster(codeql, config, logger);
+function countResultsInSarif(sarifLog) {
+  let numResults = 0;
+  const parsedSarif = JSON.parse(sarifLog);
+  if (!Array.isArray(parsedSarif.runs)) {
+    throw new InvalidSarifUploadError("Invalid SARIF. Missing 'runs' array.");
   }
-  return timings;
-}
-async function warnIfGoInstalledAfterInit(config, logger) {
-  const goInitPath = process.env["CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */];
-  if (process.env["CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */] !== "true" && goInitPath !== void 0) {
-    const goBinaryPath = await io5.which("go", true);
-    if (goInitPath !== goBinaryPath) {
-      logger.warning(
-        `Expected \`which go\` to return ${goInitPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`
-      );
-      addDiagnostic(
-        config,
-        "go" /* go */,
-        makeDiagnostic(
-          "go/workflow/go-installed-after-codeql-init",
-          "Go was installed after the `codeql-action/init` Action was run",
-          {
-            markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
-            visibility: {
-              statusPage: true,
-              telemetry: true,
-              cliSummaryTable: true
-            },
-            severity: "warning"
-          }
-        )
+  for (const run9 of parsedSarif.runs) {
+    if (!Array.isArray(run9.results)) {
+      throw new InvalidSarifUploadError(
+        "Invalid SARIF. Missing 'results' array in run."
       );
     }
+    numResults += run9.results.length;
   }
+  return numResults;
 }
-
-// src/database-upload.ts
-var fs17 = __toESM(require("fs"));
-async function cleanupAndUploadDatabases(repositoryNwo, codeql, config, apiDetails, features, logger) {
-  if (getRequiredInput("upload-database") !== "true") {
-    logger.debug("Database upload disabled in workflow. Skipping upload.");
-    return [];
+function readSarifFileOrThrow(sarifFilePath) {
+  try {
+    return readSarifFile(sarifFilePath);
+  } catch (e) {
+    throw new InvalidSarifUploadError(
+      `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}`
+    );
   }
-  if (!config.analysisKinds.includes("code-scanning" /* CodeScanning */)) {
+}
+function validateSarifFileSchema(sarifLog, sarifFilePath, logger) {
+  if (areAllRunsProducedByCodeQL([sarifLog]) && // We want to validate CodeQL SARIF in testing environments.
+  !getTestingEnvironment()) {
     logger.debug(
-      `Not uploading database because 'analysis-kinds: ${"code-scanning" /* CodeScanning */}' is not enabled.`
+      `Skipping SARIF schema validation for ${sarifFilePath} as all runs are produced by CodeQL.`
     );
-    return [];
-  }
-  if (isInTestMode()) {
-    logger.debug("In test mode. Skipping database upload.");
-    return [];
+    return true;
   }
-  if (config.gitHubVersion.type !== "GitHub.com" /* DOTCOM */ && config.gitHubVersion.type !== "GitHub Enterprise Cloud with data residency" /* GHEC_DR */) {
-    logger.debug("Not running against github.com or GHEC-DR. Skipping upload.");
-    return [];
+  logger.info(`Validating ${sarifFilePath}`);
+  const schema = require_sarif_schema_2_1_0();
+  const result = new jsonschema2.Validator().validate(sarifLog, schema);
+  const warningAttributes = ["uri-reference", "uri"];
+  const errors = (result.errors ?? []).filter(
+    (err) => !(err.name === "format" && typeof err.argument === "string" && warningAttributes.includes(err.argument))
+  );
+  const warnings = (result.errors ?? []).filter(
+    (err) => err.name === "format" && typeof err.argument === "string" && warningAttributes.includes(err.argument)
+  );
+  for (const warning14 of warnings) {
+    logger.info(
+      `Warning: '${warning14.instance}' is not a valid URI in '${warning14.property}'.`
+    );
   }
-  if (!await isAnalyzingDefaultBranch()) {
-    logger.debug("Not analyzing default branch. Skipping upload.");
-    return [];
+  if (errors.length > 0) {
+    for (const error3 of errors) {
+      logger.startGroup(`Error details: ${error3.stack}`);
+      logger.info(JSON.stringify(error3, null, 2));
+      logger.endGroup();
+    }
+    const sarifErrors = errors.map((e) => `- ${e.stack}`);
+    throw new InvalidSarifUploadError(
+      `Unable to upload "${sarifFilePath}" as it is not valid SARIF:
+${sarifErrors.join(
+        "\n"
+      )}`
+    );
   }
-  const shouldUploadOverlayBase = config.overlayDatabaseMode === "overlay-base" /* OverlayBase */ && await features.getValue("upload_overlay_db_to_api" /* UploadOverlayDbToApi */, codeql);
-  const cleanupLevel = shouldUploadOverlayBase ? "overlay" /* Overlay */ : "clear" /* Clear */;
-  await withGroupAsync("Cleaning up databases", async () => {
-    await codeql.databaseCleanupCluster(config, cleanupLevel);
-  });
-  const reports = [];
-  for (const language of config.languages) {
-    let bundledDbSize = void 0;
-    try {
-      const bundledDb = await bundleDb(config, language, codeql, language, {
-        includeDiagnostics: false
-      });
-      bundledDbSize = fs17.statSync(bundledDb).size;
-      const commitOid = await getCommitOid(
-        getRequiredInput("checkout_path")
-      );
-      const maxAttempts = 4;
-      let uploadDurationMs;
-      for (let attempt = 1; attempt <= maxAttempts; attempt++) {
-        try {
-          uploadDurationMs = await uploadBundledDatabase(
-            repositoryNwo,
-            language,
-            commitOid,
-            bundledDb,
-            bundledDbSize,
-            apiDetails
-          );
-          break;
-        } catch (e) {
-          const httpError = asHTTPError(e);
-          const isRetryable = !httpError || !DO_NOT_RETRY_STATUSES.includes(httpError.status);
-          if (!isRetryable) {
-            throw e;
-          } else if (attempt === maxAttempts) {
-            logger.error(
-              `Maximum retry attempts exhausted (${attempt}), aborting database upload`
-            );
-            throw e;
-          }
-          const backoffMs = 15e3 * Math.pow(2, attempt - 1);
-          logger.debug(
-            `Database upload attempt ${attempt} of ${maxAttempts} failed for ${language}: ${getErrorMessage(e)}. Retrying in ${backoffMs / 1e3}s...`
-          );
-          await new Promise((resolve13) => setTimeout(resolve13, backoffMs));
-        }
-      }
-      reports.push({
-        language,
-        zipped_upload_size_bytes: bundledDbSize,
-        is_overlay_base: shouldUploadOverlayBase,
-        upload_duration_ms: uploadDurationMs
-      });
-      logger.debug(`Successfully uploaded database for ${language}`);
-    } catch (e) {
-      logger.warning(
-        `Failed to upload database for ${language}: ${getErrorMessage(e)}`
-      );
-      reports.push({
-        language,
-        error: getErrorMessage(e),
-        ...bundledDbSize !== void 0 ? { zipped_upload_size_bytes: bundledDbSize } : {}
-      });
+  return true;
+}
+function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid) {
+  const payloadObj = {
+    commit_oid: commitOid,
+    ref,
+    analysis_key: analysisKey,
+    analysis_name: analysisName,
+    sarif: zippedSarif,
+    workflow_run_id: workflowRunID,
+    workflow_run_attempt: workflowRunAttempt,
+    checkout_uri: checkoutURI,
+    environment,
+    started_at: process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */],
+    tool_names: toolNames,
+    base_ref: void 0,
+    base_sha: void 0
+  };
+  if (getWorkflowEventName() === "pull_request") {
+    if (commitOid === getRequiredEnvParam("GITHUB_SHA") && mergeBaseCommitOid) {
+      payloadObj.base_ref = `refs/heads/${getRequiredEnvParam(
+        "GITHUB_BASE_REF"
+      )}`;
+      payloadObj.base_sha = mergeBaseCommitOid;
+    } else if (process.env.GITHUB_EVENT_PATH) {
+      const githubEvent = JSON.parse(
+        fs21.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8")
+      );
+      payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`;
+      payloadObj.base_sha = githubEvent.pull_request.base.sha;
     }
   }
-  return reports;
+  return payloadObj;
 }
-async function uploadBundledDatabase(repositoryNwo, language, commitOid, bundledDb, bundledDbSize, apiDetails) {
-  const client = getApiClient();
-  const uploadsUrl = new URL(parseGitHubUrl(apiDetails.url));
-  uploadsUrl.hostname = `uploads.${uploadsUrl.hostname}`;
-  let uploadsBaseUrl = uploadsUrl.toString();
-  if (uploadsBaseUrl.endsWith("/")) {
-    uploadsBaseUrl = uploadsBaseUrl.slice(0, -1);
-  }
-  const bundledDbReadStream = fs17.createReadStream(bundledDb);
-  try {
-    const startTime = performance.now();
-    await client.request(
-      `POST /repos/:owner/:repo/code-scanning/codeql/databases/:language?name=:name&commit_oid=:commit_oid`,
-      {
-        baseUrl: uploadsBaseUrl,
-        owner: repositoryNwo.owner,
-        repo: repositoryNwo.repo,
-        language,
-        name: `${language}-database`,
-        commit_oid: commitOid,
-        data: bundledDbReadStream,
-        headers: {
-          authorization: `token ${apiDetails.auth}`,
-          "Content-Type": "application/zip",
-          "Content-Length": bundledDbSize
-        },
-        // Disable `octokit/plugin-retry.js`, since the request body is a ReadStream which can only be consumed once.
-        request: {
-          retries: 0
-        }
-      }
+async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths, category, analysis) {
+  logger.info(`Post-processing sarif files: ${JSON.stringify(sarifPaths)}`);
+  const gitHubVersion = await getGitHubVersion();
+  let sarifLog;
+  category = analysis.fixCategory(logger, category);
+  if (sarifPaths.length > 1) {
+    for (const sarifPath of sarifPaths) {
+      const parsedSarif = readSarifFileOrThrow(sarifPath);
+      validateSarifFileSchema(parsedSarif, sarifPath, logger);
+    }
+    sarifLog = await combineSarifFilesUsingCLI(
+      sarifPaths,
+      gitHubVersion,
+      features,
+      logger
     );
-    return performance.now() - startTime;
-  } finally {
-    bundledDbReadStream.close();
+  } else {
+    const sarifPath = sarifPaths[0];
+    sarifLog = readSarifFileOrThrow(sarifPath);
+    validateSarifFileSchema(sarifLog, sarifPath, logger);
+    await throwIfCombineSarifFilesDisabled([sarifLog], gitHubVersion);
   }
+  sarifLog = filterAlertsByDiffRange(logger, sarifLog);
+  sarifLog = await addFingerprints(sarifLog, checkoutPath, logger);
+  const analysisKey = await getAnalysisKey();
+  const environment = getRequiredInput("matrix");
+  sarifLog = populateRunAutomationDetails(
+    sarifLog,
+    category,
+    analysisKey,
+    environment
+  );
+  return { sarif: sarifLog, analysisKey, environment };
 }
-
-// src/status-report.ts
-var os5 = __toESM(require("os"));
-var core13 = __toESM(require_core());
-function isFirstPartyAnalysis(actionName) {
-  if (actionName !== "upload-sarif" /* UploadSarif */) {
-    return true;
+async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
+  const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
+  if (outputPath !== void 0) {
+    dumpSarifFile(
+      JSON.stringify(postProcessingResults.sarif),
+      outputPath,
+      logger,
+      uploadTarget
+    );
+  } else {
+    logger.debug(`Not writing post-processed SARIF files.`);
   }
-  return process.env["CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */] === "true";
 }
-function isThirdPartyAnalysis(actionName) {
-  return !isFirstPartyAnalysis(actionName);
+async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
+  const sarifPaths = getSarifFilePaths(
+    inputSarifPath,
+    uploadTarget.sarifPredicate
+  );
+  return uploadSpecifiedFiles(
+    sarifPaths,
+    checkoutPath,
+    category,
+    features,
+    logger,
+    uploadTarget
+  );
 }
-var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
-  JobStatus2["UnknownStatus"] = "JOB_STATUS_UNKNOWN";
-  JobStatus2["SuccessStatus"] = "JOB_STATUS_SUCCESS";
-  JobStatus2["FailureStatus"] = "JOB_STATUS_FAILURE";
-  JobStatus2["ConfigErrorStatus"] = "JOB_STATUS_CONFIGURATION_ERROR";
-  return JobStatus2;
-})(JobStatus || {});
-function getActionsStatus(error3, otherFailureCause) {
-  if (error3 || otherFailureCause) {
-    return error3 instanceof ConfigurationError ? "user-error" : "failure";
-  } else {
-    return "success";
-  }
+async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
+  const processingResults = await postProcessSarifFiles(
+    logger,
+    features,
+    checkoutPath,
+    sarifPaths,
+    category,
+    uploadTarget
+  );
+  return uploadPostProcessedFiles(
+    logger,
+    checkoutPath,
+    uploadTarget,
+    processingResults
+  );
 }
-function getJobStatusDisplayName(status) {
-  switch (status) {
-    case "JOB_STATUS_SUCCESS" /* SuccessStatus */:
-      return "success";
-    case "JOB_STATUS_FAILURE" /* FailureStatus */:
-      return "failure";
-    case "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */:
-      return "configuration error";
-    case "JOB_STATUS_UNKNOWN" /* UnknownStatus */:
-      return "unknown";
-    default:
-      assertNever(status);
-  }
+async function uploadPostProcessedFiles(logger, checkoutPath, uploadTarget, postProcessingResults) {
+  logger.startGroup(`Uploading ${uploadTarget.name} results`);
+  const sarifLog = postProcessingResults.sarif;
+  const toolNames = getToolNames(sarifLog);
+  logger.debug(`Validating that each SARIF run has a unique category`);
+  validateUniqueCategory(sarifLog, uploadTarget.sentinelPrefix);
+  logger.debug(`Serializing SARIF for upload`);
+  const sarifPayload = JSON.stringify(sarifLog);
+  logger.debug(`Compressing serialized SARIF`);
+  const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
+  const checkoutURI = url.pathToFileURL(checkoutPath).href;
+  const payload = uploadTarget.transformPayload(
+    buildPayload(
+      await getCommitOid(checkoutPath),
+      await getRef(),
+      postProcessingResults.analysisKey,
+      getRequiredEnvParam("GITHUB_WORKFLOW"),
+      zippedSarif,
+      getWorkflowRunID(),
+      getWorkflowRunAttempt(),
+      checkoutURI,
+      postProcessingResults.environment,
+      toolNames,
+      await determineBaseBranchHeadCommitOid()
+    )
+  );
+  const rawUploadSizeBytes = sarifPayload.length;
+  logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);
+  const zippedUploadSizeBytes = zippedSarif.length;
+  logger.debug(`Base64 zipped upload size: ${zippedUploadSizeBytes} bytes`);
+  const numResultInSarif = countResultsInSarif(sarifPayload);
+  logger.debug(`Number of results in upload: ${numResultInSarif}`);
+  const sarifID = await uploadPayload(
+    payload,
+    getRepositoryNwo(),
+    logger,
+    uploadTarget
+  );
+  logger.endGroup();
+  return {
+    statusReport: {
+      raw_upload_size_bytes: rawUploadSizeBytes,
+      zipped_upload_size_bytes: zippedUploadSizeBytes,
+      num_results_in_sarif: numResultInSarif
+    },
+    sarifID
+  };
 }
-function setJobStatusIfUnsuccessful(actionStatus) {
-  if (actionStatus === "user-error") {
-    core13.exportVariable(
-      "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */,
-      process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */
-    );
-  } else if (actionStatus === "failure" || actionStatus === "aborted") {
-    core13.exportVariable(
-      "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */,
-      process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */
+function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
+  if (!fs21.existsSync(outputDir)) {
+    fs21.mkdirSync(outputDir, { recursive: true });
+  } else if (!fs21.lstatSync(outputDir).isDirectory()) {
+    throw new ConfigurationError(
+      `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}`
     );
   }
+  const outputFile = path18.resolve(
+    outputDir,
+    `upload${uploadTarget.sarifExtension}`
+  );
+  logger.info(`Writing processed SARIF file to ${outputFile}`);
+  fs21.writeFileSync(outputFile, sarifPayload);
 }
-async function createStatusReportBase(actionName, status, actionStartedAt, config, diskInfo, logger, cause, exception2) {
+var STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS = 5 * 1e3;
+var STATUS_CHECK_BACKOFF_MULTIPLIER = 2;
+var STATUS_CHECK_MAX_TRIES = 5;
+async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
+  isUnsuccessfulExecution: false
+}) {
+  logger.startGroup("Waiting for processing to finish");
   try {
-    const commitOid = getOptionalInput("sha") || process.env["GITHUB_SHA"] || "";
-    const ref = await getRef();
-    const jobRunUUID = process.env["JOB_RUN_UUID" /* JOB_RUN_UUID */] || "";
-    const workflowRunID = getWorkflowRunID();
-    const workflowRunAttempt = getWorkflowRunAttempt();
-    const workflowName = process.env["GITHUB_WORKFLOW"] || "";
-    const jobName = process.env["GITHUB_JOB"] || "";
-    const analysis_key = await getAnalysisKey();
-    let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */];
-    if (workflowStartedAt === void 0) {
-      workflowStartedAt = actionStartedAt.toISOString();
-      core13.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt);
-    }
-    const runnerOs = getRequiredEnvParam("RUNNER_OS");
-    const codeQlCliVersion = getCachedCodeQlVersion();
-    const actionRef = process.env["GITHUB_ACTION_REF"] || "";
-    const testingEnvironment = getTestingEnvironment();
-    if (testingEnvironment) {
-      core13.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment);
-    }
-    const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true";
-    const statusReport = {
-      action_name: actionName,
-      action_oid: "unknown",
-      // TODO decide if it's possible to fill this in
-      action_ref: actionRef,
-      action_started_at: actionStartedAt.toISOString(),
-      action_version: getActionVersion(),
-      analysis_kinds: config?.analysisKinds?.join(","),
-      analysis_key,
-      build_mode: config?.buildMode,
-      commit_oid: commitOid,
-      first_party_analysis: isFirstPartyAnalysis(actionName),
-      job_name: jobName,
-      job_run_uuid: jobRunUUID,
-      ref,
-      runner_os: runnerOs,
-      started_at: workflowStartedAt,
-      status,
-      steady_state_default_setup: isSteadyStateDefaultSetupRun,
-      testing_environment: testingEnvironment || "",
-      workflow_name: workflowName,
-      workflow_run_attempt: workflowRunAttempt,
-      workflow_run_id: workflowRunID
-    };
-    try {
-      statusReport.actions_event_name = getWorkflowEventName();
-    } catch (e) {
-      logger.warning(
-        `Could not determine the workflow event name: ${getErrorMessage(e)}.`
-      );
-    }
-    if (config) {
-      statusReport.languages = config.languages?.join(",");
-    }
-    if (diskInfo) {
-      statusReport.runner_available_disk_space_bytes = diskInfo.numAvailableBytes;
-      statusReport.runner_total_disk_space_bytes = diskInfo.numTotalBytes;
-    }
-    if (cause) {
-      statusReport.cause = cause;
-    }
-    if (exception2) {
-      statusReport.exception = exception2;
-    }
-    if (status === "success" || status === "failure" || status === "aborted" || status === "user-error") {
-      statusReport.completed_at = (/* @__PURE__ */ new Date()).toISOString();
-    }
-    const matrix = getRequiredInput("matrix");
-    if (matrix) {
-      statusReport.matrix_vars = matrix;
-    }
-    if ("RUNNER_ARCH" in process.env) {
-      statusReport.runner_arch = process.env["RUNNER_ARCH"];
-    }
-    if (!(runnerOs === "Linux" && isSelfHostedRunner())) {
-      statusReport.runner_os_release = os5.release();
-    }
-    if (codeQlCliVersion !== void 0) {
-      statusReport.codeql_version = codeQlCliVersion.version;
+    const client = getApiClient();
+    let statusCheckBackoff = STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS;
+    if (process.env["NODE_ENV"] !== "test") {
+      await delay(statusCheckBackoff, { allowProcessExit: false });
     }
-    const imageVersion = process.env["ImageVersion"];
-    if (imageVersion) {
-      statusReport.runner_image_version = imageVersion;
+    for (let statusCheckCount = 1; statusCheckCount <= STATUS_CHECK_MAX_TRIES; statusCheckCount++) {
+      let response = void 0;
+      try {
+        response = await client.request(
+          "GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id",
+          {
+            owner: repositoryNwo.owner,
+            repo: repositoryNwo.repo,
+            sarif_id: sarifID
+          }
+        );
+      } catch (e) {
+        logger.warning(
+          `An error occurred checking the status of the delivery. ${e} It should still be processed in the background, but errors that occur during processing may not be reported.`
+        );
+        break;
+      }
+      const status = response.data.processing_status;
+      logger.info(`Analysis upload status is ${status}.`);
+      if (status === "pending") {
+        logger.debug("Analysis processing is still pending...");
+      } else if (options.isUnsuccessfulExecution) {
+        handleProcessingResultForUnsuccessfulExecution(
+          response,
+          status,
+          logger
+        );
+        break;
+      } else if (status === "complete") {
+        break;
+      } else if (status === "failed") {
+        const message = `Code Scanning could not process the submitted SARIF file:
+${response.data.errors}`;
+        const processingErrors = response.data.errors;
+        throw shouldConsiderConfigurationError(processingErrors) ? new ConfigurationError(message) : shouldConsiderInvalidRequest(processingErrors) ? new InvalidSarifUploadError(message) : new Error(message);
+      } else {
+        assertNever(status);
+      }
+      if (statusCheckCount === STATUS_CHECK_MAX_TRIES) {
+        logger.warning(
+          "Timed out waiting for analysis to finish processing. Continuing."
+        );
+        break;
+      } else {
+        statusCheckBackoff *= STATUS_CHECK_BACKOFF_MULTIPLIER;
+        await delay(statusCheckBackoff, { allowProcessExit: false });
+      }
     }
-    return statusReport;
-  } catch (e) {
+  } finally {
+    logger.endGroup();
+  }
+}
+function shouldConsiderConfigurationError(processingErrors) {
+  const expectedConfigErrors = [
+    "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled",
+    "rejecting delivery as the repository has too many logical alerts",
+    "A delivery cannot contain multiple runs with the same category"
+  ];
+  return processingErrors.length === 1 && expectedConfigErrors.some((msg) => processingErrors[0].includes(msg));
+}
+function shouldConsiderInvalidRequest(processingErrors) {
+  return processingErrors.every(
+    (error3) => error3.startsWith("rejecting SARIF") || error3.startsWith("an invalid URI was provided as a SARIF location") || error3.startsWith("locationFromSarifResult: expected artifact location") || error3.startsWith(
+      "could not convert rules: invalid security severity value, is not a number"
+    ) || /^SARIF URI scheme [^\s]* did not match the checkout URI scheme [^\s]*/.test(
+      error3
+    )
+  );
+}
+function handleProcessingResultForUnsuccessfulExecution(response, status, logger) {
+  if (status === "failed" && Array.isArray(response.data.errors) && response.data.errors.length === 1 && // eslint-disable-next-line @typescript-eslint/no-unsafe-call
+  response.data.errors[0].toString().startsWith("unsuccessful execution")) {
+    logger.info(
+      'Successfully uploaded a SARIF file for the unsuccessful execution. Received expected "unsuccessful execution" processing error, and no other errors.'
+    );
+  } else if (status === "failed") {
     logger.warning(
-      `Failed to gather information for telemetry: ${getErrorMessage(e)}. Will skip sending status report.`
+      `Failed to upload a SARIF file for the unsuccessful execution. Code scanning status information for the repository may be out of date as a result. Processing errors: ${response.data.errors}`
     );
-    if (isInTestMode()) {
-      throw e;
-    }
-    return void 0;
+  } else if (status === "complete") {
+    logger.debug(
+      'Uploaded a SARIF file for the unsuccessful execution, but did not receive the expected "unsuccessful execution" processing error. This is a known transient issue with the code scanning API, and does not cause out of date code scanning status information.'
+    );
+  } else {
+    assertNever(status);
   }
 }
-var OUT_OF_DATE_MSG = "CodeQL Action is out-of-date. Please upgrade to the latest version of `codeql-action`.";
-var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the API endpoint. Please update to a compatible version of `codeql-action`.";
-async function sendStatusReport(statusReport) {
-  setJobStatusIfUnsuccessful(statusReport.status);
-  const statusReportJSON = JSON.stringify(statusReport);
-  core13.debug(`Sending status report: ${statusReportJSON}`);
-  if (isInTestMode()) {
-    core13.debug("In test mode. Status reports are not uploaded.");
-    return;
+function validateUniqueCategory(sarifLog, sentinelPrefix) {
+  const categories = {};
+  for (const run9 of sarifLog.runs || []) {
+    const id = run9?.automationDetails?.id;
+    const tool = run9.tool?.driver?.name;
+    const category = `${sanitize(id)}_${sanitize(tool)}`;
+    categories[category] = { id, tool };
   }
-  const nwo = getRepositoryNwo();
-  const client = getApiClient();
-  try {
-    await client.request(
-      "PUT /repos/:owner/:repo/code-scanning/analysis/status",
-      {
-        owner: nwo.owner,
-        repo: nwo.repo,
-        data: statusReportJSON
-      }
-    );
-  } catch (e) {
-    const httpError = asHTTPError(e);
-    if (httpError !== void 0) {
-      switch (httpError.status) {
-        case 403:
-          if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") {
-            core13.warning(
-              `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading CodeQL results requires write access. To use CodeQL with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.`
-            );
-          } else {
-            core13.warning(
-              `This run of the CodeQL Action does not have permission to access the CodeQL Action API endpoints. This could be because the Action is running on a pull request from a fork. If not, please ensure the workflow has at least the 'security-events: read' permission. Details: ${httpError.message}`
-            );
-          }
-          return;
-        case 404:
-          core13.warning(httpError.message);
-          return;
-        case 422:
-          if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) {
-            core13.debug(INCOMPATIBLE_MSG);
-          } else {
-            core13.debug(OUT_OF_DATE_MSG);
-          }
-          return;
-      }
+  for (const [category, { id, tool }] of Object.entries(categories)) {
+    const sentinelEnvVar = `${sentinelPrefix}${category}`;
+    if (process.env[sentinelEnvVar]) {
+      throw new ConfigurationError(
+        `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`
+      );
     }
-    core13.warning(
-      `An unexpected error occurred when sending a status report: ${getErrorMessage(
-        e
-      )}`
-    );
+    core15.exportVariable(sentinelEnvVar, sentinelEnvVar);
   }
 }
-async function createInitWithConfigStatusReport(config, initStatusReport, configFile, totalCacheSize, overlayBaseDatabaseStats, dependencyCachingResults) {
-  const languages = config.languages.join(",");
-  const paths = (config.originalUserInput.paths || []).join(",");
-  const pathsIgnore = (config.originalUserInput["paths-ignore"] || []).join(
-    ","
-  );
-  const disableDefaultQueries = config.originalUserInput["disable-default-queries"] ? languages : "";
-  const queries = [];
-  let queriesInput = getOptionalInput("queries")?.trim();
-  if (queriesInput === void 0 || queriesInput.startsWith("+")) {
-    queries.push(
-      ...(config.originalUserInput.queries || []).map((q) => q.uses)
-    );
+function sanitize(str) {
+  return (str ?? "_").replace(/[^a-zA-Z0-9_]/g, "_").toLocaleUpperCase();
+}
+function filterAlertsByDiffRange(logger, sarifLog) {
+  const diffRanges = readDiffRangesJsonFile(logger);
+  if (!diffRanges?.length) {
+    return sarifLog;
   }
-  if (queriesInput !== void 0) {
-    queriesInput = queriesInput.startsWith("+") ? queriesInput.slice(1) : queriesInput;
-    queries.push(...queriesInput.split(","));
+  if (sarifLog.runs === void 0) {
+    return sarifLog;
   }
-  let packs = {};
-  if (Array.isArray(config.computedConfig.packs)) {
-    packs[config.languages[0]] = config.computedConfig.packs;
-  } else if (config.computedConfig.packs !== void 0) {
-    packs = config.computedConfig.packs;
+  for (const run9 of sarifLog.runs) {
+    if (run9.results) {
+      run9.results = run9.results.filter((result) => {
+        const locations = [
+          ...(result.locations || []).map((loc) => loc.physicalLocation),
+          ...(result.relatedLocations || []).map((loc) => loc.physicalLocation)
+        ];
+        return locations.some((physicalLocation) => {
+          const locationUri = physicalLocation?.artifactLocation?.uri;
+          const locationStartLine = physicalLocation?.region?.startLine;
+          if (!locationUri || locationStartLine === void 0) {
+            return false;
+          }
+          return diffRanges.some(
+            (range2) => range2.path === locationUri && (range2.startLine <= locationStartLine && range2.endLine >= locationStartLine || range2.startLine === 0 && range2.endLine === 0)
+          );
+        });
+      });
+    }
   }
-  return {
-    ...initStatusReport,
-    config_file: configFile ?? "",
-    disable_default_queries: disableDefaultQueries,
-    paths,
-    paths_ignore: pathsIgnore,
-    queries: queries.join(","),
-    packs: JSON.stringify(packs),
-    trap_cache_languages: Object.keys(config.trapCaches).join(","),
-    trap_cache_download_size_bytes: totalCacheSize,
-    trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
-    overlay_base_database_download_size_bytes: overlayBaseDatabaseStats?.databaseSizeBytes,
-    overlay_base_database_download_duration_ms: overlayBaseDatabaseStats?.databaseDownloadDurationMs,
-    dependency_caching_restore_results: dependencyCachingResults,
-    query_filters: JSON.stringify(
-      config.originalUserInput["query-filters"] ?? []
-    ),
-    registries: JSON.stringify(
-      parseRegistriesWithoutCredentials(getOptionalInput("registries")) ?? []
-    )
-  };
+  return sarifLog;
 }
-async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error3, logger) {
-  try {
-    const statusReport = await createStatusReportBase(
-      actionName,
-      "failure",
-      actionStartedAt,
-      void 0,
-      void 0,
+
+// src/upload-sarif.ts
+async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
+  const sarifGroups = await getGroupedSarifFilePaths(
+    logger,
+    sarifPath
+  );
+  const uploadResults = {};
+  for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
+    sarifGroups
+  )) {
+    const analysisConfig = getAnalysisConfig(analysisKind);
+    const postProcessingResults = await postProcessSarifFiles(
       logger,
-      `Unhandled CodeQL Action error: ${getErrorMessage(error3)}`,
-      error3 instanceof Error ? error3.stack : void 0
+      features,
+      checkoutPath,
+      sarifFiles,
+      category,
+      analysisConfig
     );
-    if (statusReport !== void 0) {
-      await sendStatusReport(statusReport);
-    }
-  } catch (e) {
-    logger.warning(
-      `Failed to send the unhandled error status report: ${getErrorMessage(e)}.`
+    await writePostProcessedFiles(
+      logger,
+      postProcessedOutputPath,
+      analysisConfig,
+      postProcessingResults
     );
-    if (isInTestMode()) {
-      throw e;
+    if (uploadKind === "always") {
+      uploadResults[analysisKind] = await uploadPostProcessedFiles(
+        logger,
+        checkoutPath,
+        analysisConfig,
+        postProcessingResults
+      );
     }
   }
+  return uploadResults;
 }
 
-// src/upload-lib.ts
-var upload_lib_exports = {};
-__export(upload_lib_exports, {
-  buildPayload: () => buildPayload,
-  filterAlertsByDiffRange: () => filterAlertsByDiffRange,
-  findSarifFilesInDir: () => findSarifFilesInDir,
-  getGroupedSarifFilePaths: () => getGroupedSarifFilePaths,
-  populateRunAutomationDetails: () => populateRunAutomationDetails,
-  postProcessSarifFiles: () => postProcessSarifFiles,
-  readSarifFileOrThrow: () => readSarifFileOrThrow,
-  shouldConsiderConfigurationError: () => shouldConsiderConfigurationError,
-  shouldConsiderInvalidRequest: () => shouldConsiderInvalidRequest,
-  shouldShowCombineSarifFilesDeprecationWarning: () => shouldShowCombineSarifFilesDeprecationWarning,
-  throwIfCombineSarifFilesDisabled: () => throwIfCombineSarifFilesDisabled,
-  uploadFiles: () => uploadFiles,
-  uploadPayload: () => uploadPayload,
-  uploadPostProcessedFiles: () => uploadPostProcessedFiles,
-  validateSarifFileSchema: () => validateSarifFileSchema,
-  validateUniqueCategory: () => validateUniqueCategory,
-  waitForProcessing: () => waitForProcessing,
-  writePostProcessedFiles: () => writePostProcessedFiles
-});
-var fs21 = __toESM(require("fs"));
-var path18 = __toESM(require("path"));
-var url = __toESM(require("url"));
-var import_zlib = __toESM(require("zlib"));
-var core15 = __toESM(require_core());
-var jsonschema2 = __toESM(require_lib2());
-
-// src/fingerprints.ts
-var fs18 = __toESM(require("fs"));
-var import_path3 = __toESM(require("path"));
-
-// node_modules/long/index.js
-var wasm = null;
-try {
-  wasm = new WebAssembly.Instance(
-    new WebAssembly.Module(
-      new Uint8Array([
-        // \0asm
-        0,
-        97,
-        115,
-        109,
-        // version 1
-        1,
-        0,
-        0,
-        0,
-        // section "type"
-        1,
-        13,
-        2,
-        // 0, () => i32
-        96,
-        0,
-        1,
-        127,
-        // 1, (i32, i32, i32, i32) => i32
-        96,
-        4,
-        127,
-        127,
-        127,
-        127,
-        1,
-        127,
-        // section "function"
-        3,
-        7,
-        6,
-        // 0, type 0
-        0,
-        // 1, type 1
-        1,
-        // 2, type 1
-        1,
-        // 3, type 1
-        1,
-        // 4, type 1
-        1,
-        // 5, type 1
-        1,
-        // section "global"
-        6,
-        6,
-        1,
-        // 0, "high", mutable i32
-        127,
-        1,
-        65,
-        0,
-        11,
-        // section "export"
-        7,
-        50,
-        6,
-        // 0, "mul"
-        3,
-        109,
-        117,
-        108,
-        0,
-        1,
-        // 1, "div_s"
-        5,
-        100,
-        105,
-        118,
-        95,
-        115,
-        0,
-        2,
-        // 2, "div_u"
-        5,
-        100,
-        105,
-        118,
-        95,
-        117,
-        0,
-        3,
-        // 3, "rem_s"
-        5,
-        114,
-        101,
-        109,
-        95,
-        115,
-        0,
-        4,
-        // 4, "rem_u"
-        5,
-        114,
-        101,
-        109,
-        95,
-        117,
-        0,
-        5,
-        // 5, "get_high"
-        8,
-        103,
-        101,
-        116,
-        95,
-        104,
-        105,
-        103,
-        104,
-        0,
-        0,
-        // section "code"
-        10,
-        191,
-        1,
-        6,
-        // 0, "get_high"
-        4,
-        0,
-        35,
-        0,
-        11,
-        // 1, "mul"
-        36,
-        1,
-        1,
-        126,
-        32,
-        0,
-        173,
-        32,
-        1,
-        173,
-        66,
-        32,
-        134,
-        132,
-        32,
-        2,
-        173,
-        32,
-        3,
-        173,
-        66,
-        32,
-        134,
-        132,
-        126,
-        34,
-        4,
-        66,
-        32,
-        135,
-        167,
-        36,
-        0,
-        32,
-        4,
-        167,
-        11,
-        // 2, "div_s"
-        36,
-        1,
-        1,
-        126,
-        32,
-        0,
-        173,
-        32,
-        1,
-        173,
-        66,
-        32,
-        134,
-        132,
-        32,
-        2,
-        173,
-        32,
-        3,
-        173,
-        66,
-        32,
-        134,
-        132,
-        127,
-        34,
-        4,
-        66,
-        32,
-        135,
-        167,
-        36,
-        0,
-        32,
-        4,
-        167,
-        11,
-        // 3, "div_u"
-        36,
-        1,
-        1,
-        126,
-        32,
-        0,
-        173,
-        32,
-        1,
-        173,
-        66,
-        32,
-        134,
-        132,
-        32,
-        2,
-        173,
-        32,
-        3,
-        173,
-        66,
-        32,
-        134,
-        132,
-        128,
-        34,
-        4,
-        66,
-        32,
-        135,
-        167,
-        36,
-        0,
-        32,
-        4,
-        167,
-        11,
-        // 4, "rem_s"
-        36,
-        1,
-        1,
-        126,
-        32,
-        0,
-        173,
-        32,
-        1,
-        173,
-        66,
-        32,
-        134,
-        132,
-        32,
-        2,
-        173,
-        32,
-        3,
-        173,
-        66,
-        32,
-        134,
-        132,
-        129,
-        34,
-        4,
-        66,
-        32,
-        135,
-        167,
-        36,
-        0,
-        32,
-        4,
-        167,
-        11,
-        // 5, "rem_u"
-        36,
-        1,
-        1,
-        126,
-        32,
-        0,
-        173,
-        32,
-        1,
-        173,
-        66,
-        32,
-        134,
-        132,
-        32,
-        2,
-        173,
-        32,
-        3,
-        173,
-        66,
-        32,
-        134,
-        132,
-        130,
-        34,
-        4,
-        66,
-        32,
-        135,
-        167,
-        36,
-        0,
-        32,
-        4,
-        167,
-        11
-      ])
-    ),
-    {}
-  ).exports;
-} catch {
+// src/analyze-action.ts
+async function sendStatusReport2(startedAt, config, stats, error3, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanup, dependencyCacheResults, databaseUploadResults, logger) {
+  const status = getActionsStatus(error3, stats?.analyze_failure_language);
+  const statusReportBase = await createStatusReportBase(
+    "finish" /* Analyze */,
+    status,
+    startedAt,
+    config,
+    await checkDiskUsage(logger),
+    logger,
+    error3?.message,
+    error3?.stack
+  );
+  if (statusReportBase !== void 0) {
+    const report = {
+      ...statusReportBase,
+      ...stats || {},
+      ...dbCreationTimings || {},
+      ...trapCacheCleanup || {},
+      dependency_caching_upload_results: dependencyCacheResults,
+      database_upload_results: databaseUploadResults
+    };
+    if (config && didUploadTrapCaches) {
+      const trapCacheUploadStatusReport = {
+        ...report,
+        trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0),
+        trap_cache_upload_size_bytes: Math.round(
+          await getTotalCacheSize(Object.values(config.trapCaches), logger)
+        )
+      };
+      await sendStatusReport(trapCacheUploadStatusReport);
+    } else {
+      await sendStatusReport(report);
+    }
+  }
 }
-function Long(low, high, unsigned) {
-  this.low = low | 0;
-  this.high = high | 0;
-  this.unsigned = !!unsigned;
+function hasBadExpectErrorInput() {
+  return getOptionalInput("expect-error") !== "false" && !isInTestMode();
 }
-Long.prototype.__isLong__;
-Object.defineProperty(Long.prototype, "__isLong__", { value: true });
-function isLong(obj) {
-  return (obj && obj["__isLong__"]) === true;
+function doesGoExtractionOutputExist(config) {
+  const golangDbDirectory = getCodeQLDatabasePath(
+    config,
+    "go" /* go */
+  );
+  const trapDirectory = import_path4.default.join(
+    golangDbDirectory,
+    "trap",
+    "go" /* go */
+  );
+  return fs22.existsSync(trapDirectory) && fs22.readdirSync(trapDirectory).some(
+    (fileName) => [
+      ".trap",
+      ".trap.gz",
+      ".trap.br",
+      ".trap.tar.gz",
+      ".trap.tar.br",
+      ".trap.tar"
+    ].some((ext2) => fileName.endsWith(ext2))
+  );
 }
-function ctz32(value) {
-  var c = Math.clz32(value & -value);
-  return value ? 31 - c : c;
+async function runAutobuildIfLegacyGoWorkflow(config, logger) {
+  if (!config.languages.includes("go" /* go */)) {
+    return;
+  }
+  if (config.buildMode) {
+    logger.debug(
+      "Skipping legacy Go autobuild since a build mode has been specified."
+    );
+    return;
+  }
+  if (process.env["CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */] === "true") {
+    logger.debug("Won't run Go autobuild since it has already been run.");
+    return;
+  }
+  if (dbIsFinalized(config, "go" /* go */, logger)) {
+    logger.debug(
+      "Won't run Go autobuild since there is already a finalized database for Go."
+    );
+    return;
+  }
+  if (doesGoExtractionOutputExist(config)) {
+    logger.debug(
+      "Won't run Go autobuild since at least one file of Go code has already been extracted."
+    );
+    if ("CODEQL_EXTRACTOR_GO_BUILD_TRACING" in process.env) {
+      logger.warning(
+        `The CODEQL_EXTRACTOR_GO_BUILD_TRACING environment variable has no effect on workflows with manual build steps, so we recommend that you remove it from your workflow.`
+      );
+    }
+    return;
+  }
+  logger.debug(
+    "Running Go autobuild because extraction output (TRAP files) for Go code has not been found."
+  );
+  await runAutobuild(config, "go" /* go */, logger);
 }
-Long.isLong = isLong;
-var INT_CACHE = {};
-var UINT_CACHE = {};
-function fromInt(value, unsigned) {
-  var obj, cachedObj, cache;
-  if (unsigned) {
-    value >>>= 0;
-    if (cache = 0 <= value && value < 256) {
-      cachedObj = UINT_CACHE[value];
-      if (cachedObj) return cachedObj;
+async function run({ startedAt, logger }) {
+  let uploadResults = void 0;
+  let runStats = void 0;
+  let config = void 0;
+  let trapCacheCleanupTelemetry = void 0;
+  let trapCacheUploadTime = void 0;
+  let dbCreationTimings = void 0;
+  let didUploadTrapCaches = false;
+  let dependencyCacheResults;
+  let databaseUploadResults = [];
+  try {
+    initializeEnvironment(getActionVersion());
+    persistInputs();
+    const statusReportBase = await createStatusReportBase(
+      "finish" /* Analyze */,
+      "starting",
+      startedAt,
+      config,
+      await checkDiskUsage(logger),
+      logger
+    );
+    if (statusReportBase !== void 0) {
+      await sendStatusReport(statusReportBase);
     }
-    obj = fromBits(value, 0, true);
-    if (cache) UINT_CACHE[value] = obj;
-    return obj;
-  } else {
-    value |= 0;
-    if (cache = -128 <= value && value < 128) {
-      cachedObj = INT_CACHE[value];
-      if (cachedObj) return cachedObj;
+    config = await getConfig(getTemporaryDirectory(), logger);
+    if (config === void 0) {
+      throw new ConfigurationError(
+        "Config file could not be found at expected location. Has the 'init' action been called?"
+      );
     }
-    obj = fromBits(value, value < 0 ? -1 : 0, false);
-    if (cache) INT_CACHE[value] = obj;
-    return obj;
+    const codeql = await getCodeQL(logger, config.codeQLCmd);
+    if (hasBadExpectErrorInput()) {
+      throw new ConfigurationError(
+        "`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork."
+      );
+    }
+    if (process.env.CODEQL_PROXY_HOST === "" && !await codeQlVersionAtLeast(codeql, "2.20.7")) {
+      delete process.env.CODEQL_PROXY_HOST;
+      delete process.env.CODEQL_PROXY_PORT;
+      delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
+    }
+    if (getOptionalInput("cleanup-level")) {
+      logger.info(
+        "The 'cleanup-level' input is ignored since the CodeQL Action now automatically manages database cleanup. This input can safely be removed from your workflow."
+      );
+    }
+    const apiDetails = getApiDetails();
+    const outputDir = getRequiredInput("output");
+    core16.exportVariable("CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */, outputDir);
+    const threads = getThreadsFlag(
+      getOptionalInput("threads") || process.env["CODEQL_THREADS"],
+      logger
+    );
+    const repositoryNwo = getRepositoryNwo();
+    const gitHubVersion = await getGitHubVersion();
+    checkActionVersion(getActionVersion(), gitHubVersion);
+    const features = initFeatures(
+      gitHubVersion,
+      repositoryNwo,
+      getTemporaryDirectory(),
+      logger
+    );
+    const memory = getMemoryFlag(
+      getOptionalInput("ram") || process.env["CODEQL_RAM"],
+      logger
+    );
+    const diffRangePackDir = await setupDiffInformedQueryRun(logger);
+    await warnIfGoInstalledAfterInit(config, logger);
+    await runAutobuildIfLegacyGoWorkflow(config, logger);
+    dbCreationTimings = await runFinalize(
+      features,
+      outputDir,
+      threads,
+      memory,
+      codeql,
+      config,
+      logger
+    );
+    if (getRequiredInput("skip-queries") !== "true") {
+      if (getOptionalInput("add-snippets") !== void 0) {
+        logger.warning(
+          "The `add-snippets` input has been removed and no longer has any effect."
+        );
+      }
+      runStats = await runQueries(
+        outputDir,
+        memory,
+        threads,
+        diffRangePackDir,
+        getOptionalInput("category"),
+        codeql,
+        config,
+        logger,
+        features
+      );
+    }
+    const dbLocations = {};
+    for (const language of config.languages) {
+      dbLocations[language] = getCodeQLDatabasePath(config, language);
+    }
+    core16.setOutput("db-locations", dbLocations);
+    core16.setOutput("sarif-output", import_path4.default.resolve(outputDir));
+    const uploadKind = getUploadValue(
+      getOptionalInput("upload")
+    );
+    if (runStats) {
+      const checkoutPath = getRequiredInput("checkout_path");
+      const category = getOptionalInput("category");
+      uploadResults = await postProcessAndUploadSarif(
+        logger,
+        features,
+        uploadKind,
+        checkoutPath,
+        outputDir,
+        category,
+        getOptionalInput("post-processed-sarif-path")
+      );
+      if (uploadResults["code-scanning" /* CodeScanning */] !== void 0) {
+        core16.setOutput(
+          "sarif-id",
+          uploadResults["code-scanning" /* CodeScanning */].sarifID
+        );
+      }
+      if (uploadResults["code-quality" /* CodeQuality */] !== void 0) {
+        core16.setOutput(
+          "quality-sarif-id",
+          uploadResults["code-quality" /* CodeQuality */].sarifID
+        );
+      }
+    } else {
+      logger.info("Not uploading results");
+    }
+    await cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger);
+    databaseUploadResults = await cleanupAndUploadDatabases(
+      repositoryNwo,
+      codeql,
+      config,
+      apiDetails,
+      features,
+      logger
+    );
+    const trapCacheUploadStartTime = import_perf_hooks4.performance.now();
+    didUploadTrapCaches = await uploadTrapCaches(codeql, config, logger);
+    trapCacheUploadTime = import_perf_hooks4.performance.now() - trapCacheUploadStartTime;
+    trapCacheCleanupTelemetry = await cleanupTrapCaches(
+      config,
+      features,
+      logger
+    );
+    if (shouldStoreCache(config.dependencyCachingEnabled)) {
+      dependencyCacheResults = await uploadDependencyCaches(
+        codeql,
+        features,
+        config,
+        logger
+      );
+    }
+    if (isInTestMode()) {
+      logger.debug("In test mode. Waiting for processing is disabled.");
+    } else if (uploadResults?.["code-scanning" /* CodeScanning */] !== void 0 && getRequiredInput("wait-for-processing") === "true") {
+      await waitForProcessing(
+        getRepositoryNwo(),
+        uploadResults["code-scanning" /* CodeScanning */].sarifID,
+        getActionsLogger()
+      );
+    }
+    if (getOptionalInput("expect-error") === "true") {
+      core16.setFailed(
+        `expect-error input was set to true but no error was thrown.`
+      );
+    }
+    core16.exportVariable("CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */, "true");
+  } catch (unwrappedError) {
+    const error3 = wrapError(unwrappedError);
+    if (getOptionalInput("expect-error") !== "true" || hasBadExpectErrorInput()) {
+      core16.setFailed(error3.message);
+    }
+    await sendStatusReport2(
+      startedAt,
+      config,
+      error3 instanceof CodeQLAnalysisError ? error3.queriesStatusReport : void 0,
+      error3 instanceof CodeQLAnalysisError ? error3.error : error3,
+      trapCacheUploadTime,
+      dbCreationTimings,
+      didUploadTrapCaches,
+      trapCacheCleanupTelemetry,
+      dependencyCacheResults,
+      databaseUploadResults,
+      logger
+    );
+    return;
   }
-}
-Long.fromInt = fromInt;
-function fromNumber(value, unsigned) {
-  if (isNaN(value)) return unsigned ? UZERO : ZERO;
-  if (unsigned) {
-    if (value < 0) return UZERO;
-    if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
+  if (runStats !== void 0 && uploadResults?.["code-scanning" /* CodeScanning */] !== void 0) {
+    await sendStatusReport2(
+      startedAt,
+      config,
+      {
+        ...runStats,
+        ...uploadResults["code-scanning" /* CodeScanning */].statusReport
+      },
+      void 0,
+      trapCacheUploadTime,
+      dbCreationTimings,
+      didUploadTrapCaches,
+      trapCacheCleanupTelemetry,
+      dependencyCacheResults,
+      databaseUploadResults,
+      logger
+    );
+  } else if (runStats !== void 0) {
+    await sendStatusReport2(
+      startedAt,
+      config,
+      { ...runStats },
+      void 0,
+      trapCacheUploadTime,
+      dbCreationTimings,
+      didUploadTrapCaches,
+      trapCacheCleanupTelemetry,
+      dependencyCacheResults,
+      databaseUploadResults,
+      logger
+    );
   } else {
-    if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
-    if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
+    await sendStatusReport2(
+      startedAt,
+      config,
+      void 0,
+      void 0,
+      trapCacheUploadTime,
+      dbCreationTimings,
+      didUploadTrapCaches,
+      trapCacheCleanupTelemetry,
+      dependencyCacheResults,
+      databaseUploadResults,
+      logger
+    );
   }
-  if (value < 0) return fromNumber(-value, unsigned).neg();
-  return fromBits(
-    value % TWO_PWR_32_DBL | 0,
-    value / TWO_PWR_32_DBL | 0,
-    unsigned
-  );
 }
-Long.fromNumber = fromNumber;
-function fromBits(lowBits, highBits, unsigned) {
-  return new Long(lowBits, highBits, unsigned);
+var analyze = {
+  name: "finish" /* Analyze */,
+  run
+};
+async function runWrapper() {
+  await runInActions(analyze);
+  await checkForTimeout();
 }
-Long.fromBits = fromBits;
-var pow_dbl = Math.pow;
-function fromString(str2, unsigned, radix) {
-  if (str2.length === 0) throw Error("empty string");
-  if (typeof unsigned === "number") {
-    radix = unsigned;
-    unsigned = false;
-  } else {
-    unsigned = !!unsigned;
-  }
-  if (str2 === "NaN" || str2 === "Infinity" || str2 === "+Infinity" || str2 === "-Infinity")
-    return unsigned ? UZERO : ZERO;
-  radix = radix || 10;
-  if (radix < 2 || 36 < radix) throw RangeError("radix");
-  var p;
-  if ((p = str2.indexOf("-")) > 0) throw Error("interior hyphen");
-  else if (p === 0) {
-    return fromString(str2.substring(1), unsigned, radix).neg();
-  }
-  var radixToPower = fromNumber(pow_dbl(radix, 8));
-  var result = ZERO;
-  for (var i = 0; i < str2.length; i += 8) {
-    var size = Math.min(8, str2.length - i), value = parseInt(str2.substring(i, i + size), radix);
-    if (size < 8) {
-      var power = fromNumber(pow_dbl(radix, size));
-      result = result.mul(power).add(fromNumber(value));
-    } else {
-      result = result.mul(radixToPower);
-      result = result.add(fromNumber(value));
+
+// src/analyze-action-post.ts
+var fs26 = __toESM(require("fs"));
+var core18 = __toESM(require_core());
+
+// src/debug-artifacts.ts
+var fs25 = __toESM(require("fs"));
+var path22 = __toESM(require("path"));
+var artifact = __toESM(require_artifact2());
+var artifactLegacy = __toESM(require_artifact_client2());
+var core17 = __toESM(require_core());
+
+// node_modules/archiver/lib/core.js
+var import_fs2 = require("fs");
+
+// node_modules/is-stream/index.js
+function isStream(stream2, { checkOpen = true } = {}) {
+  return stream2 !== null && typeof stream2 === "object" && (stream2.writable || stream2.readable || !checkOpen || stream2.writable === void 0 && stream2.readable === void 0) && typeof stream2.pipe === "function";
+}
+
+// node_modules/readdir-glob/dist/index.mjs
+var fs23 = __toESM(require("fs"), 1);
+var import_events = require("events");
+
+// node_modules/readdir-glob/node_modules/balanced-match/dist/esm/index.js
+var balanced = (a, b, str) => {
+  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
+  const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
+  const r = ma !== null && mb != null && range(ma, mb, str);
+  return r && {
+    start: r[0],
+    end: r[1],
+    pre: str.slice(0, r[0]),
+    body: str.slice(r[0] + ma.length, r[1]),
+    post: str.slice(r[1] + mb.length)
+  };
+};
+var maybeMatch = (reg, str) => {
+  const m = str.match(reg);
+  return m ? m[0] : null;
+};
+var range = (a, b, str) => {
+  let begs, beg, left, right = void 0, result;
+  let ai = str.indexOf(a);
+  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];
     }
   }
-  result.unsigned = unsigned;
   return result;
+};
+
+// node_modules/readdir-glob/node_modules/brace-expansion/dist/esm/index.js
+var escSlash = "\0SLASH" + Math.random() + "\0";
+var escOpen = "\0OPEN" + Math.random() + "\0";
+var escClose = "\0CLOSE" + Math.random() + "\0";
+var escComma = "\0COMMA" + Math.random() + "\0";
+var escPeriod = "\0PERIOD" + Math.random() + "\0";
+var 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;
+var EXPANSION_MAX_LENGTH = 4e6;
+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 expand2(str, options = {}) {
+  if (!str) {
+    return [];
+  }
+  const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
+  if (str.slice(0, 2) === "{}") {
+    str = "\\{\\}" + str.slice(2);
+  }
+  return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
 }
-Long.fromString = fromString;
-function fromValue(val, unsigned) {
-  if (typeof val === "number") return fromNumber(val, unsigned);
-  if (typeof val === "string") return fromString(val, unsigned);
-  return fromBits(
-    val.low,
-    val.high,
-    typeof unsigned === "boolean" ? unsigned : val.unsigned
-  );
+function embrace(str) {
+  return "{" + str + "}";
 }
-Long.fromValue = fromValue;
-var TWO_PWR_16_DBL = 1 << 16;
-var TWO_PWR_24_DBL = 1 << 24;
-var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
-var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
-var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
-var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
-var ZERO = fromInt(0);
-Long.ZERO = ZERO;
-var UZERO = fromInt(0, true);
-Long.UZERO = UZERO;
-var ONE = fromInt(1);
-Long.ONE = ONE;
-var UONE = fromInt(1, true);
-Long.UONE = UONE;
-var NEG_ONE = fromInt(-1);
-Long.NEG_ONE = NEG_ONE;
-var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
-Long.MAX_VALUE = MAX_VALUE;
-var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
-Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
-var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
-Long.MIN_VALUE = MIN_VALUE;
-var LongPrototype = Long.prototype;
-LongPrototype.toInt = function toInt() {
-  return this.unsigned ? this.low >>> 0 : this.low;
-};
-LongPrototype.toNumber = function toNumber() {
-  if (this.unsigned)
-    return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
-  return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
-};
-LongPrototype.toString = function toString2(radix) {
-  radix = radix || 10;
-  if (radix < 2 || 36 < radix) throw RangeError("radix");
-  if (this.isZero()) return "0";
-  if (this.isNegative()) {
-    if (this.eq(MIN_VALUE)) {
-      var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
-      return div.toString(radix) + rem1.toInt().toString(radix);
-    } else return "-" + this.neg().toString(radix);
+function isPadded(el) {
+  return /^-?0\d/.test(el);
+}
+function lte(i, y) {
+  return i <= y;
+}
+function gte6(i, y) {
+  return i >= y;
+}
+function combine(acc, pre, values, max, maxLength, dropEmpties) {
+  const out = [];
+  let length = 0;
+  for (let a = 0; a < acc.length; a++) {
+    for (let v = 0; v < values.length; v++) {
+      if (out.length >= max)
+        return out;
+      const expansion = acc[a] + pre + values[v];
+      if (dropEmpties && !expansion)
+        continue;
+      if (length + expansion.length > maxLength)
+        return out;
+      out.push(expansion);
+      length += expansion.length;
+    }
   }
-  var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
-  var result = "";
-  while (true) {
-    var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
-    rem = remDiv;
-    if (rem.isZero()) return digits + result;
-    else {
-      while (digits.length < 6) digits = "0" + digits;
-      result = "" + digits + result;
+  return out;
+}
+function expandSequence(body, isAlphaSequence, max, maxLength) {
+  const n = body.split(/\.\./);
+  const N = [];
+  if (n[0] === void 0 || n[1] === void 0) {
+    return N;
+  }
+  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 = lte;
+  const reverse = y < x;
+  if (reverse) {
+    incr *= -1;
+    test = gte6;
+  }
+  const pad = n.some(isPadded);
+  let length = 0;
+  for (let i = x; test(i, y) && N.length < max; 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;
+          }
+        }
+      }
+    }
+    if (length + c.length > maxLength)
+      break;
+    N.push(c);
+    length += c.length;
+  }
+  return N;
+}
+function expand_(str, max, maxLength, isTop) {
+  let acc = [""];
+  let dropEmpties = false;
+  let firstGroup = true;
+  for (; ; ) {
+    const m = balanced("{", "}", str);
+    if (!m) {
+      return combine(acc, str, [""], max, maxLength, dropEmpties);
+    }
+    const pre = m.pre;
+    if (/\$$/.test(pre)) {
+      acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length);
+      firstGroup = false;
+      if (!m.post.length)
+        break;
+      str = m.post;
+      continue;
+    }
+    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;
+        isTop = true;
+        continue;
+      }
+      return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties);
+    }
+    if (firstGroup) {
+      dropEmpties = isTop && !isSequence;
+      firstGroup = false;
+    }
+    let values;
+    if (isSequence) {
+      values = expandSequence(m.body, isAlphaSequence, max, maxLength);
+    } else {
+      let n = parseCommaParts(m.body);
+      if (n.length === 1 && n[0] !== void 0) {
+        n = expand_(n[0], max, maxLength, false).map(embrace);
+        if (n.length === 1) {
+          acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
+          if (!m.post.length)
+            break;
+          str = m.post;
+          continue;
+        }
+      }
+      let dropsEmpties = dropEmpties && !m.post.length && !pre;
+      for (let d = 0; dropsEmpties && d < acc.length; d++) {
+        if (acc[d]) {
+          dropsEmpties = false;
+        }
+      }
+      values = [];
+      let valuesLength = 0;
+      outer: for (let j = 0; j < n.length; j++) {
+        const expanded = expand_(n[j], max, maxLength, false);
+        for (let k = 0; k < expanded.length; k++) {
+          const v = expanded[k];
+          if (dropsEmpties && !v)
+            continue;
+          if (values.length >= max || valuesLength + v.length > maxLength) {
+            break outer;
+          }
+          values.push(v);
+          valuesLength += v.length;
+        }
+      }
     }
+    acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
+    if (!m.post.length)
+      break;
+    str = m.post;
+  }
+  return acc;
+}
+
+// node_modules/readdir-glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js
+var MAX_PATTERN_LENGTH = 1024 * 64;
+var assertValidPattern = (pattern) => {
+  if (typeof pattern !== "string") {
+    throw new TypeError("invalid pattern");
+  }
+  if (pattern.length > MAX_PATTERN_LENGTH) {
+    throw new TypeError("pattern is too long");
   }
 };
-LongPrototype.getHighBits = function getHighBits() {
-  return this.high;
-};
-LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
-  return this.high >>> 0;
-};
-LongPrototype.getLowBits = function getLowBits() {
-  return this.low;
-};
-LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
-  return this.low >>> 0;
-};
-LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
-  if (this.isNegative())
-    return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
-  var val = this.high != 0 ? this.high : this.low;
-  for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break;
-  return this.high != 0 ? bit + 33 : bit + 1;
-};
-LongPrototype.isSafeInteger = function isSafeInteger() {
-  var top11Bits = this.high >> 21;
-  if (!top11Bits) return true;
-  if (this.unsigned) return false;
-  return top11Bits === -1 && !(this.low === 0 && this.high === -2097152);
-};
-LongPrototype.isZero = function isZero() {
-  return this.high === 0 && this.low === 0;
-};
-LongPrototype.eqz = LongPrototype.isZero;
-LongPrototype.isNegative = function isNegative() {
-  return !this.unsigned && this.high < 0;
-};
-LongPrototype.isPositive = function isPositive() {
-  return this.unsigned || this.high >= 0;
-};
-LongPrototype.isOdd = function isOdd() {
-  return (this.low & 1) === 1;
-};
-LongPrototype.isEven = function isEven() {
-  return (this.low & 1) === 0;
-};
-LongPrototype.equals = function equals(other) {
-  if (!isLong(other)) other = fromValue(other);
-  if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
-    return false;
-  return this.high === other.high && this.low === other.low;
-};
-LongPrototype.eq = LongPrototype.equals;
-LongPrototype.notEquals = function notEquals(other) {
-  return !this.eq(
-    /* validates */
-    other
-  );
-};
-LongPrototype.neq = LongPrototype.notEquals;
-LongPrototype.ne = LongPrototype.notEquals;
-LongPrototype.lessThan = function lessThan(other) {
-  return this.comp(
-    /* validates */
-    other
-  ) < 0;
-};
-LongPrototype.lt = LongPrototype.lessThan;
-LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
-  return this.comp(
-    /* validates */
-    other
-  ) <= 0;
-};
-LongPrototype.lte = LongPrototype.lessThanOrEqual;
-LongPrototype.le = LongPrototype.lessThanOrEqual;
-LongPrototype.greaterThan = function greaterThan(other) {
-  return this.comp(
-    /* validates */
-    other
-  ) > 0;
-};
-LongPrototype.gt = LongPrototype.greaterThan;
-LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
-  return this.comp(
-    /* validates */
-    other
-  ) >= 0;
-};
-LongPrototype.gte = LongPrototype.greaterThanOrEqual;
-LongPrototype.ge = LongPrototype.greaterThanOrEqual;
-LongPrototype.compare = function compare2(other) {
-  if (!isLong(other)) other = fromValue(other);
-  if (this.eq(other)) return 0;
-  var thisNeg = this.isNegative(), otherNeg = other.isNegative();
-  if (thisNeg && !otherNeg) return -1;
-  if (!thisNeg && otherNeg) return 1;
-  if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
-  return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
-};
-LongPrototype.comp = LongPrototype.compare;
-LongPrototype.negate = function negate() {
-  if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
-  return this.not().add(ONE);
-};
-LongPrototype.neg = LongPrototype.negate;
-LongPrototype.add = function add(addend) {
-  if (!isLong(addend)) addend = fromValue(addend);
-  var a48 = this.high >>> 16;
-  var a32 = this.high & 65535;
-  var a16 = this.low >>> 16;
-  var a00 = this.low & 65535;
-  var b48 = addend.high >>> 16;
-  var b32 = addend.high & 65535;
-  var b16 = addend.low >>> 16;
-  var b00 = addend.low & 65535;
-  var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
-  c00 += a00 + b00;
-  c16 += c00 >>> 16;
-  c00 &= 65535;
-  c16 += a16 + b16;
-  c32 += c16 >>> 16;
-  c16 &= 65535;
-  c32 += a32 + b32;
-  c48 += c32 >>> 16;
-  c32 &= 65535;
-  c48 += a48 + b48;
-  c48 &= 65535;
-  return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
+
+// node_modules/readdir-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]
 };
-LongPrototype.subtract = function subtract(subtrahend) {
-  if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
-  return this.add(subtrahend.neg());
+var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
+var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+var rangesToString = (ranges) => ranges.join("");
+var parseClass = (glob2, position) => {
+  const pos = position;
+  if (glob2.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 negate2 = false;
+  let endPos = pos;
+  let rangeStart = "";
+  WHILE: while (i < glob2.length) {
+    const c = glob2.charAt(i);
+    if ((c === "!" || c === "^") && i === pos + 1) {
+      negate2 = 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 (glob2.startsWith(cls, i)) {
+          if (rangeStart) {
+            return ["$.", false, glob2.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 (glob2.startsWith("-]", i + 1)) {
+      ranges.push(braceEscape(c + "-"));
+      i += 2;
+      continue;
+    }
+    if (glob2.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, glob2.length - pos, true];
+  }
+  if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate2) {
+    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
+    return [regexpEscape(r), false, endPos - pos, false];
+  }
+  const sranges = "[" + (negate2 ? "^" : "") + rangesToString(ranges) + "]";
+  const snegs = "[" + (negate2 ? "" : "^") + rangesToString(negs) + "]";
+  const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
+  return [comb, uflag, endPos - pos, true];
 };
-LongPrototype.sub = LongPrototype.subtract;
-LongPrototype.multiply = function multiply(multiplier) {
-  if (this.isZero()) return this;
-  if (!isLong(multiplier)) multiplier = fromValue(multiplier);
-  if (wasm) {
-    var low = wasm["mul"](this.low, this.high, multiplier.low, multiplier.high);
-    return fromBits(low, wasm["get_high"](), this.unsigned);
+
+// node_modules/readdir-glob/node_modules/minimatch/dist/esm/unescape.js
+var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
+  if (magicalBraces) {
+    return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
   }
-  if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
-  if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
-  if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
-  if (this.isNegative()) {
-    if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
-    else return this.neg().mul(multiplier).neg();
-  } else if (multiplier.isNegative()) return this.mul(multiplier.neg()).neg();
-  if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
-    return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
-  var a48 = this.high >>> 16;
-  var a32 = this.high & 65535;
-  var a16 = this.low >>> 16;
-  var a00 = this.low & 65535;
-  var b48 = multiplier.high >>> 16;
-  var b32 = multiplier.high & 65535;
-  var b16 = multiplier.low >>> 16;
-  var b00 = multiplier.low & 65535;
-  var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
-  c00 += a00 * b00;
-  c16 += c00 >>> 16;
-  c00 &= 65535;
-  c16 += a16 * b00;
-  c32 += c16 >>> 16;
-  c16 &= 65535;
-  c16 += a00 * b16;
-  c32 += c16 >>> 16;
-  c16 &= 65535;
-  c32 += a32 * b00;
-  c48 += c32 >>> 16;
-  c32 &= 65535;
-  c32 += a16 * b16;
-  c48 += c32 >>> 16;
-  c32 &= 65535;
-  c32 += a00 * b32;
-  c48 += c32 >>> 16;
-  c32 &= 65535;
-  c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
-  c48 &= 65535;
-  return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
+  return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
 };
-LongPrototype.mul = LongPrototype.multiply;
-LongPrototype.divide = function divide(divisor) {
-  if (!isLong(divisor)) divisor = fromValue(divisor);
-  if (divisor.isZero()) throw Error("division by zero");
-  if (wasm) {
-    if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
+
+// node_modules/readdir-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;
+      }
     }
-    var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])(
-      this.low,
-      this.high,
-      divisor.low,
-      divisor.high
-    );
-    return fromBits(low, wasm["get_high"](), this.unsigned);
+    return this;
   }
-  if (this.isZero()) return this.unsigned ? UZERO : ZERO;
-  var approx, rem, res;
-  if (!this.unsigned) {
-    if (this.eq(MIN_VALUE)) {
-      if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
-        return MIN_VALUE;
-      else if (divisor.eq(MIN_VALUE)) return ONE;
-      else {
-        var halfThis = this.shr(1);
-        approx = halfThis.div(divisor).shl(1);
-        if (approx.eq(ZERO)) {
-          return divisor.isNegative() ? ONE : NEG_ONE;
-        } else {
-          rem = this.sub(divisor.mul(approx));
-          res = approx.add(rem.div(divisor));
-          return res;
+  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;
       }
-    } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
-    if (this.isNegative()) {
-      if (divisor.isNegative()) return this.neg().div(divisor.neg());
-      return this.neg().div(divisor).neg();
-    } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
-    res = ZERO;
-  } else {
-    if (!divisor.unsigned) divisor = divisor.toUnsigned();
-    if (divisor.gt(this)) return UZERO;
-    if (divisor.gt(this.shru(1)))
-      return UONE;
-    res = UZERO;
+      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;
   }
-  rem = this;
-  while (rem.gte(divisor)) {
-    approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
-    var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
-    while (approxRem.isNegative() || approxRem.gt(rem)) {
-      approx -= delta;
-      approxRes = fromNumber(approx, this.unsigned);
-      approxRem = approxRes.mul(divisor);
+  #canAdoptWithSpace(child) {
+    return this.#canAdopt(child, adoptionWithSpaceMap);
+  }
+  #canAdopt(child, map = adoptionMap) {
+    if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
+      return false;
     }
-    if (approxRes.isZero()) approxRes = ONE;
-    res = res.add(approxRes);
-    rem = rem.sub(approxRem);
+    const gc = child.#parts[0];
+    if (!gc || typeof gc !== "object" || gc.type === null) {
+      return false;
+    }
+    return this.#canAdoptType(gc.type, map);
   }
-  return res;
-};
-LongPrototype.div = LongPrototype.divide;
-LongPrototype.modulo = function modulo(divisor) {
-  if (!isLong(divisor)) divisor = fromValue(divisor);
-  if (wasm) {
-    var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])(
-      this.low,
-      this.high,
-      divisor.low,
-      divisor.high
-    );
-    return fromBits(low, wasm["get_high"](), this.unsigned);
+  #canAdoptType(c, map = adoptionAnyMap) {
+    return !!map.get(this.type)?.includes(c);
+  }
+  #adoptWithSpace(child, index2) {
+    const gc = child.#parts[0];
+    const blank = new _a(null, gc, this.options);
+    blank.#parts.push("");
+    gc.push(blank);
+    this.#adopt(child, index2);
+  }
+  #adopt(child, index2) {
+    const gc = child.#parts[0];
+    this.#parts.splice(index2, 1, ...gc.#parts);
+    for (const p of gc.#parts) {
+      if (typeof p === "object")
+        p.#parent = this;
+    }
+    this.#toString = void 0;
+  }
+  #canUsurpType(c) {
+    const m = usurpMap.get(this.type);
+    return !!m?.has(c);
+  }
+  #canUsurp(child) {
+    if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
+      return false;
+    }
+    const gc = child.#parts[0];
+    if (!gc || typeof gc !== "object" || gc.type === null) {
+      return false;
+    }
+    return this.#canUsurpType(gc.type);
+  }
+  #usurp(child) {
+    const m = usurpMap.get(this.type);
+    const gc = child.#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 glob2 = this.toString();
+    const [re, body, hasMagic, uflag] = this.toRegExpSource();
+    const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob2.toUpperCase() !== glob2.toLowerCase();
+    if (!anyMagic) {
+      return body;
+    }
+    const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
+    return Object.assign(new RegExp(`^${re}$`, flags), {
+      _src: re,
+      _glob: glob2
+    });
+  }
+  get options() {
+    return this.#options;
+  }
+  // returns the string match, the regexp source, whether there's magic
+  // in the regexp (so a regular expression is required) and whether or
+  // not the uflag is needed for the regular expression (for posix classes)
+  // TODO: instead of injecting the start/end at this point, just return
+  // the BODY of the regexp, along with the start/end portions suitable
+  // for binding the start/end in either a joined full-path makeRe context
+  // (where we bind to (^|/), or a standalone matchPart context (where
+  // we bind to ^, and not /).  Otherwise slashes get duped!
+  //
+  // In part-matching mode, the start is:
+  // - if not isStart: nothing
+  // - if traversal possible, but not allowed: ^(?!\.\.?$)
+  // - if dots allowed or not possible: ^
+  // - if dots possible and not allowed: ^(?!\.)
+  // end is:
+  // - if not isEnd(): nothing
+  // - else: $
+  //
+  // In full-path matching mode, we put the slash at the START of the
+  // pattern, so start is:
+  // - if first pattern: same as part-matching mode
+  // - if not isStart(): nothing
+  // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
+  // - if dots allowed or not possible: /
+  // - if dots possible and not allowed: /(?!\.)
+  // end is:
+  // - if last pattern, same as part-matching mode
+  // - else nothing
+  //
+  // Always put the (?:$|/) on negated tails, though, because that has to be
+  // there to bind the end of the negated pattern portion, and it's easier to
+  // just stick it in now rather than try to inject it later in the middle of
+  // the pattern.
+  //
+  // We can just always return the same end, and leave it up to the caller
+  // to know whether it's going to be used joined or in parts.
+  // And, if the start is adjusted slightly, can do the same there:
+  // - if not isStart: nothing
+  // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
+  // - if dots allowed or not possible: (?:/|^)
+  // - if dots possible and not allowed: (?:/|^)(?!\.)
+  //
+  // But it's better to have a simpler binding without a conditional, for
+  // performance, so probably better to return both start options.
+  //
+  // Then the caller just ignores the end if it's not the first pattern,
+  // and the start always gets applied.
+  //
+  // But that's always going to be $ if it's the ending pattern, or nothing,
+  // so the caller can just attach $ at the end of the pattern when building.
+  //
+  // So the todo is:
+  // - better detect what kind of start is needed
+  // - return both flavors of starting pattern
+  // - attach $ at the end of the pattern when creating the actual RegExp
+  //
+  // Ah, but wait, no, that all only applies to the root when the first pattern
+  // is not an extglob. If the first pattern IS an extglob, then we need all
+  // that dot prevention biz to live in the extglob portions, because eg
+  // +(*|.x*) can match .xy but not .yx.
+  //
+  // So, return the two flavors if it's #root and the first child is not an
+  // AST, otherwise leave it to the child AST to handle it, and there,
+  // use the (?:^|/) style of start binding.
+  //
+  // Even simplified further:
+  // - Since the start for a join is eg /(?!\.) and the start for a part
+  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
+  // or start or whatever) and prepend ^ or / at the Regexp construction.
+  toRegExpSource(allowDot) {
+    const dot = allowDot ?? !!this.#options.dot;
+    if (this.#root === this) {
+      this.#flatten();
+      this.#fillNegs();
+    }
+    if (!isExtglobAST(this)) {
+      const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
+      const src = this.#parts.map((p) => {
+        const [re, _2, hasMagic, uflag] = typeof p === "string" ? _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(src.charAt(0)) || // the pattern starts with \., and then [ or .
+              src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
+              src.startsWith("\\.\\.") && aps.has(src.charAt(4))
+            );
+            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
+            start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
+          }
+        }
+      }
+      let end = "";
+      if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
+        end = "(?:$|\\/)";
+      }
+      const final2 = start2 + src + end;
+      return [
+        final2,
+        unescape2(src),
+        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, unescape2(this.toString()), false, false];
+    }
+    let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
+    if (bodyDotAllowed === body) {
+      bodyDotAllowed = "";
+    }
+    if (bodyDotAllowed) {
+      body = `(?:${body})(?:${bodyDotAllowed})*?`;
+    }
+    let final = "";
+    if (this.type === "!" && this.#emptyExt) {
+      final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
+    } else {
+      const close = this.type === "!" ? (
+        // !() must match something,but !(x) can match ''
+        "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
+      ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
+      final = start + body + close;
+    }
+    return [
+      final,
+      unescape2(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, _2, _hasMagic, uflag] = p.toRegExpSource(dot);
+      this.#uflag = this.#uflag || uflag;
+      return re;
+    }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
+  }
+  static #parseGlob(glob2, hasMagic, noEmpty = false) {
+    let escaping = false;
+    let re = "";
+    let uflag = false;
+    let inStar = false;
+    for (let i = 0; i < glob2.length; i++) {
+      const c = glob2.charAt(i);
+      if (escaping) {
+        escaping = false;
+        re += (reSpecials.has(c) ? "\\" : "") + c;
+        continue;
+      }
+      if (c === "*") {
+        if (inStar)
+          continue;
+        inStar = true;
+        re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star;
+        hasMagic = true;
+        continue;
+      } else {
+        inStar = false;
+      }
+      if (c === "\\") {
+        if (i === glob2.length - 1) {
+          re += "\\\\";
+        } else {
+          escaping = true;
+        }
+        continue;
+      }
+      if (c === "[") {
+        const [src, needUflag, consumed, magic] = parseClass(glob2, i);
+        if (consumed) {
+          re += src;
+          uflag = uflag || needUflag;
+          i += consumed - 1;
+          hasMagic = hasMagic || magic;
+          continue;
+        }
+      }
+      if (c === "?") {
+        re += qmark;
+        hasMagic = true;
+        continue;
+      }
+      re += regExpEscape(c);
+    }
+    return [re, unescape2(glob2), !!hasMagic, uflag];
   }
-  return this.sub(this.div(divisor).mul(divisor));
-};
-LongPrototype.mod = LongPrototype.modulo;
-LongPrototype.rem = LongPrototype.modulo;
-LongPrototype.not = function not() {
-  return fromBits(~this.low, ~this.high, this.unsigned);
-};
-LongPrototype.countLeadingZeros = function countLeadingZeros() {
-  return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;
-};
-LongPrototype.clz = LongPrototype.countLeadingZeros;
-LongPrototype.countTrailingZeros = function countTrailingZeros() {
-  return this.low ? ctz32(this.low) : ctz32(this.high) + 32;
-};
-LongPrototype.ctz = LongPrototype.countTrailingZeros;
-LongPrototype.and = function and(other) {
-  if (!isLong(other)) other = fromValue(other);
-  return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
-};
-LongPrototype.or = function or(other) {
-  if (!isLong(other)) other = fromValue(other);
-  return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
-};
-LongPrototype.xor = function xor(other) {
-  if (!isLong(other)) other = fromValue(other);
-  return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
-};
-LongPrototype.shiftLeft = function shiftLeft(numBits) {
-  if (isLong(numBits)) numBits = numBits.toInt();
-  if ((numBits &= 63) === 0) return this;
-  else if (numBits < 32)
-    return fromBits(
-      this.low << numBits,
-      this.high << numBits | this.low >>> 32 - numBits,
-      this.unsigned
-    );
-  else return fromBits(0, this.low << numBits - 32, this.unsigned);
-};
-LongPrototype.shl = LongPrototype.shiftLeft;
-LongPrototype.shiftRight = function shiftRight(numBits) {
-  if (isLong(numBits)) numBits = numBits.toInt();
-  if ((numBits &= 63) === 0) return this;
-  else if (numBits < 32)
-    return fromBits(
-      this.low >>> numBits | this.high << 32 - numBits,
-      this.high >> numBits,
-      this.unsigned
-    );
-  else
-    return fromBits(
-      this.high >> numBits - 32,
-      this.high >= 0 ? 0 : -1,
-      this.unsigned
-    );
-};
-LongPrototype.shr = LongPrototype.shiftRight;
-LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
-  if (isLong(numBits)) numBits = numBits.toInt();
-  if ((numBits &= 63) === 0) return this;
-  if (numBits < 32)
-    return fromBits(
-      this.low >>> numBits | this.high << 32 - numBits,
-      this.high >>> numBits,
-      this.unsigned
-    );
-  if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
-  return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
 };
-LongPrototype.shru = LongPrototype.shiftRightUnsigned;
-LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
-LongPrototype.rotateLeft = function rotateLeft(numBits) {
-  var b;
-  if (isLong(numBits)) numBits = numBits.toInt();
-  if ((numBits &= 63) === 0) return this;
-  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
-  if (numBits < 32) {
-    b = 32 - numBits;
-    return fromBits(
-      this.low << numBits | this.high >>> b,
-      this.high << numBits | this.low >>> b,
-      this.unsigned
-    );
+_a = AST;
+
+// node_modules/readdir-glob/node_modules/minimatch/dist/esm/escape.js
+var escape2 = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
+  if (magicalBraces) {
+    return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
   }
-  numBits -= 32;
-  b = 32 - numBits;
-  return fromBits(
-    this.high << numBits | this.low >>> b,
-    this.low << numBits | this.high >>> b,
-    this.unsigned
-  );
+  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
 };
-LongPrototype.rotl = LongPrototype.rotateLeft;
-LongPrototype.rotateRight = function rotateRight(numBits) {
-  var b;
-  if (isLong(numBits)) numBits = numBits.toInt();
-  if ((numBits &= 63) === 0) return this;
-  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
-  if (numBits < 32) {
-    b = 32 - numBits;
-    return fromBits(
-      this.high << b | this.low >>> numBits,
-      this.low << b | this.high >>> numBits,
-      this.unsigned
-    );
+
+// node_modules/readdir-glob/node_modules/minimatch/dist/esm/index.js
+var minimatch = (p, pattern, options = {}) => {
+  assertValidPattern(pattern);
+  if (!options.nocomment && pattern.charAt(0) === "#") {
+    return false;
   }
-  numBits -= 32;
-  b = 32 - numBits;
-  return fromBits(
-    this.low << b | this.high >>> numBits,
-    this.high << b | this.low >>> numBits,
-    this.unsigned
-  );
+  return new Minimatch(pattern, options).match(p);
 };
-LongPrototype.rotr = LongPrototype.rotateRight;
-LongPrototype.toSigned = function toSigned() {
-  if (!this.unsigned) return this;
-  return fromBits(this.low, this.high, false);
+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);
 };
-LongPrototype.toUnsigned = function toUnsigned() {
-  if (this.unsigned) return this;
-  return fromBits(this.low, this.high, true);
+var starDotExtTestNocaseDot = (ext2) => {
+  ext2 = ext2.toLowerCase();
+  return (f) => f.toLowerCase().endsWith(ext2);
 };
-LongPrototype.toBytes = function toBytes(le) {
-  return le ? this.toBytesLE() : this.toBytesBE();
+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);
 };
-LongPrototype.toBytesLE = function toBytesLE() {
-  var hi = this.high, lo = this.low;
-  return [
-    lo & 255,
-    lo >>> 8 & 255,
-    lo >>> 16 & 255,
-    lo >>> 24,
-    hi & 255,
-    hi >>> 8 & 255,
-    hi >>> 16 & 255,
-    hi >>> 24
-  ];
+var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
+  const noext = qmarksTestNoExtDot([$0]);
+  if (!ext2)
+    return noext;
+  ext2 = ext2.toLowerCase();
+  return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
 };
-LongPrototype.toBytesBE = function toBytesBE() {
-  var hi = this.high, lo = this.low;
-  return [
-    hi >>> 24,
-    hi >>> 16 & 255,
-    hi >>> 8 & 255,
-    hi & 255,
-    lo >>> 24,
-    lo >>> 16 & 255,
-    lo >>> 8 & 255,
-    lo & 255
-  ];
+var qmarksTestDot = ([$0, ext2 = ""]) => {
+  const noext = qmarksTestNoExtDot([$0]);
+  return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
 };
-Long.fromBytes = function fromBytes(bytes, unsigned, le) {
-  return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
+var qmarksTest = ([$0, ext2 = ""]) => {
+  const noext = qmarksTestNoExt([$0]);
+  return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
 };
-Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {
-  return new Long(
-    bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
-    bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
-    unsigned
-  );
+var qmarksTestNoExt = ([$0]) => {
+  const len = $0.length;
+  return (f) => f.length === len && !f.startsWith(".");
 };
-Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
-  return new Long(
-    bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
-    bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
-    unsigned
-  );
+var qmarksTestNoExtDot = ([$0]) => {
+  const len = $0.length;
+  return (f) => f.length === len && f !== "." && f !== "..";
 };
-if (typeof BigInt === "function") {
-  Long.fromBigInt = function fromBigInt(value, unsigned) {
-    var lowBits = Number(BigInt.asIntN(32, value));
-    var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
-    return fromBits(lowBits, highBits, unsigned);
-  };
-  Long.fromValue = function fromValueWithBigInt(value, unsigned) {
-    if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
-    return fromValue(value, unsigned);
-  };
-  LongPrototype.toBigInt = function toBigInt() {
-    var lowBigInt = BigInt(this.low >>> 0);
-    var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
-    return highBigInt << BigInt(32) | lowBigInt;
-  };
-}
-var long_default = Long;
-
-// src/fingerprints.ts
-var tab = "	".charCodeAt(0);
-var space = " ".charCodeAt(0);
-var lf = "\n".charCodeAt(0);
-var cr = "\r".charCodeAt(0);
-var EOF = 65535;
-var BLOCK_SIZE = 100;
-var MOD = long_default.fromInt(37);
-function computeFirstMod() {
-  let firstMod = long_default.ONE;
-  for (let i = 0; i < BLOCK_SIZE; i++) {
-    firstMod = firstMod.multiply(MOD);
-  }
-  return firstMod;
-}
-async function hash(callback, filepath) {
-  const window2 = Array(BLOCK_SIZE).fill(0);
-  const lineNumbers = Array(BLOCK_SIZE).fill(-1);
-  let hashRaw = long_default.ZERO;
-  const firstMod = computeFirstMod();
-  let index = 0;
-  let lineNumber = 0;
-  let lineStart = true;
-  let prevCR = false;
-  const hashCounts = {};
-  const outputHash = function() {
-    const hashValue = hashRaw.toUnsigned().toString(16);
-    if (!hashCounts[hashValue]) {
-      hashCounts[hashValue] = 0;
+var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
+var path20 = {
+  win32: { sep: "\\" },
+  posix: { sep: "/" }
+};
+var sep6 = defaultPlatform === "win32" ? path20.win32.sep : path20.posix.sep;
+minimatch.sep = sep6;
+var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
+minimatch.GLOBSTAR = GLOBSTAR;
+var qmark2 = "[^/]";
+var star2 = qmark2 + "*?";
+var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
+var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
+var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
+minimatch.filter = filter;
+var ext = (a, b = {}) => Object.assign({}, a, b);
+var defaults2 = (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 = defaults2;
+var braceExpand = (pattern, options = {}) => {
+  assertValidPattern(pattern);
+  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+    return [pattern];
+  }
+  return expand2(pattern, { max: options.braceExpandMax });
+};
+minimatch.braceExpand = braceExpand;
+var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
+minimatch.makeRe = makeRe;
+var match = (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 = match;
+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;
     }
-    hashCounts[hashValue]++;
-    callback(lineNumbers[index], `${hashValue}:${hashCounts[hashValue]}`);
-    lineNumbers[index] = -1;
-  };
-  const updateHash = function(current) {
-    const begin = window2[index];
-    window2[index] = current;
-    hashRaw = MOD.multiply(hashRaw).add(long_default.fromInt(current)).subtract(firstMod.multiply(long_default.fromInt(begin)));
-    index = (index + 1) % BLOCK_SIZE;
-  };
-  const processCharacter = function(current) {
-    if (current === space || current === tab || prevCR && current === lf) {
-      prevCR = false;
-      return;
+    for (const pattern of this.set) {
+      for (const part of pattern) {
+        if (typeof part !== "string")
+          return true;
+      }
     }
-    if (current === cr) {
-      current = lf;
-      prevCR = true;
-    } else {
-      prevCR = false;
+    return false;
+  }
+  debug(..._2) {
+  }
+  make() {
+    const pattern = this.pattern;
+    const options = this.options;
+    if (!options.nocomment && pattern.charAt(0) === "#") {
+      this.comment = true;
+      return;
     }
-    if (lineNumbers[index] !== -1) {
-      outputHash();
+    if (!pattern) {
+      this.empty = true;
+      return;
     }
-    if (lineStart) {
-      lineStart = false;
-      lineNumber++;
-      lineNumbers[index] = lineNumber;
+    this.parseNegate();
+    this.globSet = [...new Set(this.braceExpand())];
+    if (options.debug) {
+      this.debug = (...args) => console.error(...args);
+    }
+    this.debug(this.pattern, this.globSet);
+    const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
+    this.globParts = this.preprocess(rawGlobParts);
+    this.debug(this.pattern, this.globParts);
+    let set = this.globParts.map((s, _2, __) => {
+      if (this.isWindows && this.windowsNoMagicRoot) {
+        const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
+        const isDrive = /^[a-z]:/i.test(s[0]);
+        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] = "?";
+        }
+      }
     }
-    if (current === lf) {
-      lineStart = true;
+    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] = "*";
+          }
+        }
+      }
     }
-    updateHash(current);
-  };
-  const readStream = fs18.createReadStream(filepath, "utf8");
-  for await (const data of readStream) {
-    for (let i = 0; i < data.length; ++i) {
-      processCharacter(data.charCodeAt(i));
+    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;
   }
-  processCharacter(EOF);
-  for (let i = 0; i < BLOCK_SIZE; i++) {
-    if (lineNumbers[index] !== -1) {
-      outputHash();
+  // 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);
     }
-    updateHash(0);
+    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);
   }
-}
-function locationUpdateCallback(result, location, logger) {
-  let locationStartLine = location.physicalLocation?.region?.startLine;
-  if (locationStartLine === void 0) {
-    locationStartLine = 1;
+  partsMatch(a, b, emptyGSMatch = false) {
+    let ai = 0;
+    let bi = 0;
+    let result = [];
+    let which9 = "";
+    while (ai < a.length && bi < b.length) {
+      if (a[ai] === b[bi]) {
+        result.push(which9 === "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 (which9 === "b")
+          return false;
+        which9 = "a";
+        result.push(a[ai]);
+        ai++;
+        bi++;
+      } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
+        if (which9 === "a")
+          return false;
+        which9 = "b";
+        result.push(b[bi]);
+        ai++;
+        bi++;
+      } else {
+        return false;
+      }
+    }
+    return a.length === b.length && result;
   }
-  return function(lineNumber, hashValue) {
-    if (locationStartLine !== lineNumber) {
+  parseNegate() {
+    if (this.nonegate)
       return;
+    const pattern = this.pattern;
+    let negate2 = false;
+    let negateOffset = 0;
+    for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
+      negate2 = !negate2;
+      negateOffset++;
+    }
+    if (negateOffset)
+      this.pattern = pattern.slice(negateOffset);
+    this.negate = negate2;
+  }
+  // set partial to true to test if, for example,
+  // "/a/b" matches the start of "/*/b/*/d"
+  // Partial means, if you run out of file before you run
+  // out of pattern, then that's fine, as long as all
+  // the parts match.
+  matchOne(file, pattern, partial = false) {
+    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;
+        }
+      }
     }
-    if (!result.partialFingerprints) {
-      result.partialFingerprints = {};
-    }
-    const existingFingerprint = result.partialFingerprints.primaryLocationLineHash;
-    if (!existingFingerprint) {
-      result.partialFingerprints.primaryLocationLineHash = hashValue;
-    } else if (existingFingerprint !== hashValue) {
-      logger.warning(
-        `Calculated fingerprint of ${hashValue} for file ${location.physicalLocation.artifactLocation.uri} line ${lineNumber}, but found existing inconsistent fingerprint value ${existingFingerprint}`
-      );
+    const { optimizationLevel = 1 } = this.options;
+    if (optimizationLevel >= 2) {
+      file = this.levelTwoFileOptimize(file);
     }
-  };
-}
-function resolveUriToFile(location, artifacts, sourceRoot, logger) {
-  if (!location.uri && location.index !== void 0) {
-    if (typeof location.index !== "number" || location.index < 0 || location.index >= artifacts.length || !isObject2(artifacts[location.index].location)) {
-      logger.debug(`Ignoring location as index "${location.index}" is invalid`);
-      return void 0;
+    if (pattern.includes(GLOBSTAR)) {
+      return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
     }
-    location = artifacts[location.index].location;
-  }
-  if (typeof location.uri !== "string") {
-    logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
-    return void 0;
-  }
-  let uri;
-  try {
-    uri = decodeURIComponent(location.uri);
-  } catch {
-    logger.debug(`Ignoring location as URI "${location.uri}" is invalid`);
-    return void 0;
-  }
-  const fileUriPrefix = "file://";
-  if (uri.startsWith(fileUriPrefix)) {
-    uri = uri.substring(fileUriPrefix.length);
-  }
-  if (uri.indexOf("://") !== -1) {
-    logger.debug(
-      `Ignoring location URI "${uri}" as the scheme is not recognised`
-    );
-    return void 0;
+    return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
   }
-  const srcRootPrefix = `${sourceRoot}/`;
-  if (uri.startsWith("/") && !uri.startsWith(srcRootPrefix)) {
-    logger.debug(
-      `Ignoring location URI "${uri}" as it is outside of the src root`
-    );
-    return void 0;
+  #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?");
+    }
   }
-  if (!import_path3.default.isAbsolute(uri)) {
-    uri = srcRootPrefix + uri;
+  braceExpand() {
+    return braceExpand(this.pattern, this.options);
   }
-  if (!fs18.existsSync(uri)) {
-    logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`);
-    return void 0;
+  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 [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
+    re = "^" + open + re + close + "$";
+    if (this.partial) {
+      re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
+    }
+    if (this.negate)
+      re = "^(?!" + re + ").+$";
+    try {
+      this.regexp = new RegExp(re, [...flags].join(""));
+    } catch {
+      this.regexp = false;
+    }
+    return this.regexp;
   }
-  if (fs18.statSync(uri).isDirectory()) {
-    logger.debug(`Unable to compute fingerprint for directory: ${uri}`);
-    return void 0;
+  slashSplit(p) {
+    if (this.preserveMultipleSlashes) {
+      return p.split("/");
+    } else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
+      return ["", ...p.split(/\/+/)];
+    } else {
+      return p.split(/\/+/);
+    }
   }
-  return uri;
-}
-async function addFingerprints(sarifLog, sourceRoot, logger) {
-  logger.info(
-    `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.`
-  );
-  const callbacksByFile = {};
-  for (const run9 of sarifLog.runs || []) {
-    const artifacts = run9.artifacts || [];
-    for (const result of run9.results || []) {
-      const primaryLocation = (result.locations || [])[0];
-      if (!primaryLocation?.physicalLocation?.artifactLocation) {
-        logger.debug(
-          `Unable to compute fingerprint for invalid location: ${JSON.stringify(
-            primaryLocation
-          )}`
-        );
-        continue;
-      }
-      if (primaryLocation?.physicalLocation?.region?.startLine === void 0) {
-        continue;
+  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];
       }
-      const filepath = resolveUriToFile(
-        primaryLocation.physicalLocation.artifactLocation,
-        artifacts,
-        sourceRoot,
-        logger
-      );
-      if (!filepath) {
-        continue;
+    }
+    for (const pattern of set) {
+      let file = ff;
+      if (options.matchBase && pattern.length === 1) {
+        file = [filename];
       }
-      if (!callbacksByFile[filepath]) {
-        callbacksByFile[filepath] = [];
+      const hit = this.matchOne(file, pattern, partial);
+      if (hit) {
+        if (options.flipNegate) {
+          return true;
+        }
+        return !this.negate;
       }
-      callbacksByFile[filepath].push(
-        locationUpdateCallback(result, primaryLocation, logger)
-      );
     }
+    if (options.flipNegate) {
+      return false;
+    }
+    return this.negate;
   }
-  for (const [filepath, callbacks] of Object.entries(callbacksByFile)) {
-    const teeCallback = function(lineNumber, hashValue) {
-      for (const c of Object.values(callbacks)) {
-        c(lineNumber, hashValue);
+  static defaults(def) {
+    return minimatch.defaults(def).Minimatch;
+  }
+};
+minimatch.AST = AST;
+minimatch.Minimatch = Minimatch;
+minimatch.escape = escape2;
+minimatch.unescape = unescape2;
+
+// node_modules/readdir-glob/dist/index.mjs
+var import_path5 = require("path");
+function readdir2(dir, strict) {
+  return new Promise((resolve$1, reject) => {
+    fs23.readdir(dir, { withFileTypes: true }, (err, files) => {
+      if (err) switch (err.code) {
+        case "ENOTDIR":
+          if (strict) reject(err);
+          else resolve$1([]);
+          break;
+        case "ENOTSUP":
+        case "ENOENT":
+        case "ENAMETOOLONG":
+        case "UNKNOWN":
+          resolve$1([]);
+          break;
+        case "ELOOP":
+        default:
+          reject(err);
+          break;
+      }
+      else resolve$1(files);
+    });
+  });
+}
+function getStat(file, followSymlinks) {
+  return new Promise((resolve$1) => {
+    const statFunc = followSymlinks ? fs23.stat : fs23.lstat;
+    statFunc(file, (err, stats) => {
+      if (err) switch (err.code) {
+        case "ENOENT":
+          if (followSymlinks) resolve$1(getStat(file, false));
+          else resolve$1(null);
+          break;
+        default:
+          resolve$1(null);
+          break;
+      }
+      else resolve$1(stats);
+    });
+  });
+}
+async function* exploreWalkAsync(dir, path29, followSymlinks, useStat, shouldSkip, strict) {
+  let files = await readdir2(path29 + dir, strict);
+  for (const file of files) {
+    let name = file.name;
+    const filename = dir + "/" + name;
+    const relative3 = filename.slice(1);
+    const absolute = path29 + "/" + relative3;
+    let stat2 = file;
+    if (useStat || followSymlinks) stat2 = await getStat(absolute, followSymlinks) ?? stat2;
+    if (stat2.isDirectory()) {
+      if (!shouldSkip(relative3)) {
+        yield {
+          relative: relative3,
+          absolute,
+          stat: stat2
+        };
+        yield* exploreWalkAsync(filename, path29, followSymlinks, useStat, shouldSkip, false);
       }
+    } else yield {
+      relative: relative3,
+      absolute,
+      stat: stat2
     };
-    await hash(teeCallback, filepath);
   }
-  return sarifLog;
 }
-
-// src/init.ts
-var fs19 = __toESM(require("fs"));
-var path17 = __toESM(require("path"));
-var core14 = __toESM(require_core());
-var toolrunner4 = __toESM(require_toolrunner());
-var github2 = __toESM(require_github());
-var io6 = __toESM(require_io());
-async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, rawLanguages, useOverlayAwareDefaultCliVersion, features, logger) {
-  logger.startGroup("Setup CodeQL tools");
-  const {
-    codeql,
-    toolsDownloadStatusReport,
-    toolsSource,
-    toolsVersion,
-    zstdAvailability
-  } = await setupCodeQL(
-    toolsInput,
-    apiDetails,
-    tempDir,
-    variant,
-    defaultCliVersion,
-    rawLanguages,
-    useOverlayAwareDefaultCliVersion,
-    features,
-    logger,
-    true
-  );
-  await codeql.printVersion();
-  logger.endGroup();
+async function* explore(path29, followSymlinks, useStat, shouldSkip) {
+  yield* exploreWalkAsync("", path29, followSymlinks, useStat, shouldSkip, true);
+}
+function readOptions(options) {
   return {
-    codeql,
-    toolsDownloadStatusReport,
-    toolsSource,
-    toolsVersion,
-    zstdAvailability
+    pattern: options.pattern,
+    dot: !!options.dot,
+    noglobstar: !!options.noglobstar,
+    matchBase: !!options.matchBase,
+    nocase: !!options.nocase,
+    ignore: options.ignore,
+    skip: options.skip,
+    follow: !!options.follow,
+    stat: !!options.stat,
+    nodir: !!options.nodir,
+    mark: !!options.mark,
+    silent: !!options.silent,
+    absolute: !!options.absolute
   };
 }
-async function initConfig2(features, inputs) {
-  return await withGroupAsync("Load language configuration", async () => {
-    return await initConfig(features, inputs);
-  });
-}
-async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile, logger) {
-  fs19.mkdirSync(config.dbLocation, { recursive: true });
-  await wrapEnvironment(
-    databaseInitEnvironment,
-    async () => await codeql.databaseInitCluster(
-      config,
-      sourceRoot,
-      processName,
-      qlconfigFile,
-      logger
-    )
-  );
-}
-async function checkPacksForOverlayCompatibility(codeql, config, logger) {
-  const codeQlOverlayVersion = (await codeql.getVersion()).overlayVersion;
-  if (codeQlOverlayVersion === void 0) {
-    logger.warning("The CodeQL CLI does not support overlay analysis.");
-    return false;
+var ReaddirGlob = class extends import_events.EventEmitter {
+  options;
+  matchers;
+  ignoreMatchers;
+  skipMatchers;
+  paused;
+  aborted;
+  inactive;
+  iterator;
+  constructor(cwd, options, cb) {
+    super();
+    if (typeof options === "function") {
+      cb = options;
+      options = void 0;
+    }
+    this.options = readOptions(options || {});
+    this.matchers = [];
+    if (this.options.pattern) {
+      const matchers = Array.isArray(this.options.pattern) ? this.options.pattern : [this.options.pattern];
+      this.matchers = matchers.map((m) => new Minimatch(m, {
+        dot: this.options.dot,
+        noglobstar: this.options.noglobstar,
+        matchBase: this.options.matchBase,
+        nocase: this.options.nocase
+      }));
+    }
+    this.ignoreMatchers = [];
+    if (this.options.ignore) {
+      const ignorePatterns = Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore];
+      this.ignoreMatchers = ignorePatterns.map((ignore) => new Minimatch(ignore, { dot: true }));
+    }
+    this.skipMatchers = [];
+    if (this.options.skip) {
+      const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip];
+      this.skipMatchers = skipPatterns.map((skip) => new Minimatch(skip, { dot: true }));
+    }
+    this.iterator = explore((0, import_path5.resolve)(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
+    this.paused = false;
+    this.inactive = false;
+    this.aborted = false;
+    if (cb) {
+      const nonNullCb = cb;
+      const matches = [];
+      this.on("match", (match2) => matches.push(this.options.absolute ? match2.absolute : match2.relative));
+      this.on("error", (err) => nonNullCb(err));
+      this.on("end", () => nonNullCb(null, matches));
+    }
+    setTimeout(() => this._next());
+  }
+  _shouldSkipDirectory(relative3) {
+    return this.skipMatchers.some((m) => m.match(relative3));
+  }
+  _fileMatches(relative3, isDirectory) {
+    const file = relative3 + (isDirectory ? "/" : "");
+    return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory);
+  }
+  _next() {
+    if (!this.paused && !this.aborted) this.iterator.next().then((obj) => {
+      if (!obj.done) {
+        const isDirectory = obj.value.stat.isDirectory();
+        if (this._fileMatches(obj.value.relative, isDirectory)) {
+          let relative3 = obj.value.relative;
+          let absolute = obj.value.absolute;
+          if (this.options.mark && isDirectory) {
+            relative3 += "/";
+            absolute += "/";
+          }
+          if (this.options.stat) this.emit("match", {
+            relative: relative3,
+            absolute,
+            stat: obj.value.stat
+          });
+          else this.emit("match", {
+            relative: relative3,
+            absolute
+          });
+        }
+        this._next();
+      } else this.emit("end");
+    }).catch((err) => {
+      this.abort();
+      this.emit("error", err);
+      if (!err.code && !this.options.silent) console.error(err);
+    });
+    else this.inactive = true;
   }
-  for (const language of config.languages) {
-    const suitePath = getGeneratedSuitePath(config, language);
-    const packDirs = await codeql.resolveQueriesStartingPacks([suitePath]);
-    if (packDirs.some(
-      (packDir) => !checkPackForOverlayCompatibility(
-        packDir,
-        codeQlOverlayVersion,
-        logger
-      )
-    )) {
-      return false;
+  abort() {
+    this.aborted = true;
+  }
+  pause() {
+    this.paused = true;
+  }
+  resume() {
+    this.paused = false;
+    if (this.inactive) {
+      this.inactive = false;
+      this._next();
     }
   }
-  return true;
+};
+var readdirGlob = (pattern, options, cb) => new ReaddirGlob(pattern, options, cb);
+readdirGlob.ReaddirGlob = ReaddirGlob;
+var src_default = readdirGlob;
+
+// node_modules/archiver/lib/core.js
+var import_lazystream = __toESM(require_lazystream(), 1);
+var import_async = __toESM(require_async(), 1);
+var import_path6 = require("path");
+
+// node_modules/archiver/lib/error.js
+var import_util34 = __toESM(require("util"), 1);
+var ERROR_CODES = {
+  ABORTED: "archive was aborted",
+  DIRECTORYDIRPATHREQUIRED: "diretory dirpath argument must be a non-empty string value",
+  DIRECTORYFUNCTIONINVALIDDATA: "invalid data returned by directory custom data function",
+  ENTRYNAMEREQUIRED: "entry name must be a non-empty string value",
+  FILEFILEPATHREQUIRED: "file filepath argument must be a non-empty string value",
+  FINALIZING: "archive already finalizing",
+  QUEUECLOSED: "queue closed",
+  NOENDMETHOD: "no suitable finalize/end method defined by module",
+  DIRECTORYNOTSUPPORTED: "support for directory entries not defined by module",
+  FORMATSET: "archive format already set",
+  INPUTSTEAMBUFFERREQUIRED: "input source must be valid Stream or Buffer instance",
+  MODULESET: "module already set",
+  SYMLINKNOTSUPPORTED: "support for symlink entries not defined by module",
+  SYMLINKFILEPATHREQUIRED: "symlink filepath argument must be a non-empty string value",
+  SYMLINKTARGETREQUIRED: "symlink target argument must be a non-empty string value",
+  ENTRYNOTSUPPORTED: "entry not supported"
+};
+function ArchiverError(code, data) {
+  Error.captureStackTrace(this, this.constructor);
+  this.message = ERROR_CODES[code] || code;
+  this.code = code;
+  this.data = data;
 }
-function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) {
-  try {
-    let qlpackPath = path17.join(packDir, "qlpack.yml");
-    if (!fs19.existsSync(qlpackPath)) {
-      qlpackPath = path17.join(packDir, "codeql-pack.yml");
-    }
-    const qlpackContents = load(
-      fs19.readFileSync(qlpackPath, "utf8")
+import_util34.default.inherits(ArchiverError, Error);
+
+// node_modules/archiver/lib/core.js
+var import_readable_stream2 = __toESM(require_ours(), 1);
+
+// node_modules/archiver/lib/utils.js
+var import_normalize_path = __toESM(require_normalize_path(), 1);
+var import_readable_stream = __toESM(require_ours(), 1);
+function dateify(dateish) {
+  dateish = dateish || /* @__PURE__ */ new Date();
+  if (dateish instanceof Date) {
+    dateish = dateish;
+  } else if (typeof dateish === "string") {
+    dateish = new Date(dateish);
+  } else {
+    dateish = /* @__PURE__ */ new Date();
+  }
+  return dateish;
+}
+function normalizeInputSource(source) {
+  if (source === null) {
+    return Buffer.alloc(0);
+  } else if (typeof source === "string") {
+    return Buffer.from(source);
+  } else if (isStream(source)) {
+    return source.pipe(new import_readable_stream.PassThrough());
+  }
+  return source;
+}
+function sanitizePath(filepath) {
+  return (0, import_normalize_path.default)(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
+}
+function trailingSlashIt(str) {
+  return str.slice(-1) !== "/" ? str + "/" : str;
+}
+
+// node_modules/archiver/lib/core.js
+var { ReaddirGlob: ReaddirGlob2 } = src_default;
+var win32 = process.platform === "win32";
+var Archiver = class extends import_readable_stream2.Transform {
+  _supportsDirectory = false;
+  _supportsSymlink = false;
+  /**
+   * @constructor
+   * @param {String} format The archive format to use.
+   * @param {(CoreOptions|TransformOptions)} options See also {@link ZipOptions} and {@link TarOptions}.
+   */
+  constructor(options) {
+    options = {
+      highWaterMark: 1024 * 1024,
+      statConcurrency: 4,
+      ...options
+    };
+    super(options);
+    this.options = options;
+    this._format = false;
+    this._module = false;
+    this._pending = 0;
+    this._pointer = 0;
+    this._entriesCount = 0;
+    this._entriesProcessedCount = 0;
+    this._fsEntriesTotalBytes = 0;
+    this._fsEntriesProcessedBytes = 0;
+    this._queue = (0, import_async.queue)(this._onQueueTask.bind(this), 1);
+    this._queue.drain(this._onQueueDrain.bind(this));
+    this._statQueue = (0, import_async.queue)(
+      this._onStatQueueTask.bind(this),
+      options.statConcurrency
     );
-    if (!qlpackContents.buildMetadata) {
-      return true;
+    this._statQueue.drain(this._onQueueDrain.bind(this));
+    this._state = {
+      aborted: false,
+      finalize: false,
+      finalizing: false,
+      finalized: false,
+      modulePiped: false
+    };
+    this._streams = [];
+  }
+  /**
+   * Internal logic for `abort`.
+   *
+   * @private
+   * @return void
+   */
+  _abort() {
+    this._state.aborted = true;
+    this._queue.kill();
+    this._statQueue.kill();
+    if (this._queue.idle()) {
+      this._shutdown();
     }
-    const packInfoPath = path17.join(packDir, ".packinfo");
-    if (!fs19.existsSync(packInfoPath)) {
-      logger.warning(
-        `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.`
-      );
-      return false;
+  }
+  /**
+   * Internal helper for appending files.
+   *
+   * @private
+   * @param  {String} filepath The source filepath.
+   * @param  {EntryData} data The entry data.
+   * @return void
+   */
+  _append(filepath, data) {
+    data = data || {};
+    let task = {
+      source: null,
+      filepath
+    };
+    if (!data.name) {
+      data.name = filepath;
+    }
+    data.sourcePath = filepath;
+    task.data = data;
+    this._entriesCount++;
+    if (data.stats && data.stats instanceof import_fs2.Stats) {
+      task = this._updateQueueTaskWithStats(task, data.stats);
+      if (task) {
+        if (data.stats.size) {
+          this._fsEntriesTotalBytes += data.stats.size;
+        }
+        this._queue.push(task);
+      }
+    } else {
+      this._statQueue.push(task);
     }
-    const packInfoFileContents = JSON.parse(
-      fs19.readFileSync(packInfoPath, "utf8")
-    );
-    const packOverlayVersion = packInfoFileContents.overlayVersion;
-    if (typeof packOverlayVersion !== "number") {
-      logger.warning(
-        `The .packinfo file for the query pack at ${packDir} does not have the overlayVersion field, which indicates that the pack is not compatible with overlay analysis.`
-      );
-      return false;
+  }
+  /**
+   * Internal logic for `finalize`.
+   *
+   * @private
+   * @return void
+   */
+  _finalize() {
+    if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+      return;
     }
-    if (packOverlayVersion !== codeQlOverlayVersion) {
-      logger.warning(
-        `The query pack at ${packDir} was compiled with overlay version ${packOverlayVersion}, but the CodeQL CLI supports overlay version ${codeQlOverlayVersion}. The query pack needs to be recompiled to support overlay analysis.`
-      );
+    this._state.finalizing = true;
+    this._moduleFinalize();
+    this._state.finalizing = false;
+    this._state.finalized = true;
+  }
+  /**
+   * Checks the various state variables to determine if we can `finalize`.
+   *
+   * @private
+   * @return {Boolean}
+   */
+  _maybeFinalize() {
+    if (this._state.finalizing || this._state.finalized || this._state.aborted) {
       return false;
     }
-  } catch (e) {
-    logger.warning(
-      `Error while checking pack at ${packDir} for overlay compatibility: ${getErrorMessage(e)}`
-    );
+    if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+      this._finalize();
+      return true;
+    }
     return false;
   }
-  return true;
-}
-async function checkInstallPython311(languages, codeql) {
-  if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) {
-    const script = path17.resolve(
-      __dirname,
-      "../python-setup",
-      "check_python12.ps1"
+  /**
+   * Appends an entry to the module.
+   *
+   * @private
+   * @fires  Archiver#entry
+   * @param  {(Buffer|Stream)} source
+   * @param  {EntryData} data
+   * @param  {Function} callback
+   * @return void
+   */
+  _moduleAppend(source, data, callback) {
+    if (this._state.aborted) {
+      callback();
+      return;
+    }
+    this._module.append(
+      source,
+      data,
+      function(err) {
+        this._task = null;
+        if (this._state.aborted) {
+          this._shutdown();
+          return;
+        }
+        if (err) {
+          this.emit("error", err);
+          setImmediate(callback);
+          return;
+        }
+        this.emit("entry", data);
+        this._entriesProcessedCount++;
+        if (data.stats && data.stats.size) {
+          this._fsEntriesProcessedBytes += data.stats.size;
+        }
+        this.emit("progress", {
+          entries: {
+            total: this._entriesCount,
+            processed: this._entriesProcessedCount
+          },
+          fs: {
+            totalBytes: this._fsEntriesTotalBytes,
+            processedBytes: this._fsEntriesProcessedBytes
+          }
+        });
+        setImmediate(callback);
+      }.bind(this)
     );
-    await new toolrunner4.ToolRunner(await io6.which("powershell", true), [
-      script
-    ]).exec();
   }
-}
-function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync5 = fs19.rmSync) {
-  if (fs19.existsSync(config.dbLocation) && (fs19.statSync(config.dbLocation).isFile() || fs19.readdirSync(config.dbLocation).length > 0)) {
-    if (!options.disableExistingDirectoryWarning) {
-      logger.warning(
-        `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.`
-      );
+  /**
+   * Finalizes the module.
+   *
+   * @private
+   * @return void
+   */
+  _moduleFinalize() {
+    if (typeof this._module.finalize === "function") {
+      this._module.finalize();
+    } else if (typeof this._module.end === "function") {
+      this._module.end();
+    } else {
+      this.emit("error", new ArchiverError("NOENDMETHOD"));
     }
-    try {
-      rmSync5(config.dbLocation, {
-        force: true,
-        maxRetries: 3,
-        recursive: true
-      });
-      logger.info(
-        `Cleaned up database cluster directory ${config.dbLocation}.`
-      );
-    } catch (e) {
-      const blurb = `The CodeQL Action requires an empty database cluster directory. ${getOptionalInput("db-location") ? `This is currently configured to be ${config.dbLocation}. ` : `By default, this is located at ${config.dbLocation}. You can customize it using the 'db-location' input to the init Action. `}An attempt was made to clean up the directory, but this failed.`;
-      if (isSelfHostedRunner()) {
-        throw new ConfigurationError(
-          `${blurb} This can happen if another process is using the directory or the directory is owned by a different user. Please clean up the directory manually and rerun the job. Details: ${getErrorMessage(
-            e
-          )}`
-        );
+  }
+  /**
+   * Pipes the module to our internal stream with error bubbling.
+   *
+   * @private
+   * @return void
+   */
+  _modulePipe() {
+    this._module.on("error", this._onModuleError.bind(this));
+    this._module.pipe(this);
+    this._state.modulePiped = true;
+  }
+  /**
+   * Unpipes the module from our internal stream.
+   *
+   * @private
+   * @return void
+   */
+  _moduleUnpipe() {
+    this._module.unpipe(this);
+    this._state.modulePiped = false;
+  }
+  /**
+   * Normalizes entry data with fallbacks for key properties.
+   *
+   * @private
+   * @param  {Object} data
+   * @param  {fs.Stats} stats
+   * @return {Object}
+   */
+  _normalizeEntryData(data, stats) {
+    data = {
+      type: "file",
+      name: null,
+      date: null,
+      mode: null,
+      prefix: null,
+      sourcePath: null,
+      stats: false,
+      ...data
+    };
+    if (stats && data.stats === false) {
+      data.stats = stats;
+    }
+    let isDir = data.type === "directory";
+    if (data.name) {
+      if (typeof data.prefix === "string" && "" !== data.prefix) {
+        data.name = data.prefix + "/" + data.name;
+        data.prefix = null;
+      }
+      data.name = sanitizePath(data.name);
+      if (data.type !== "symlink" && data.name.slice(-1) === "/") {
+        isDir = true;
+        data.type = "directory";
+      } else if (isDir) {
+        data.name += "/";
+      }
+    }
+    if (typeof data.mode === "number") {
+      if (win32) {
+        data.mode &= 511;
       } else {
-        throw new Error(
-          `${blurb} This shouldn't typically happen on hosted runners. If you are using an advanced setup, please check your workflow, otherwise we recommend rerunning the job. Details: ${getErrorMessage(e)}`
-        );
+        data.mode &= 4095;
+      }
+    } else if (data.stats && data.mode === null) {
+      if (win32) {
+        data.mode = data.stats.mode & 511;
+      } else {
+        data.mode = data.stats.mode & 4095;
+      }
+      if (win32 && isDir) {
+        data.mode = 493;
       }
+    } else if (data.mode === null) {
+      data.mode = isDir ? 493 : 420;
     }
+    if (data.stats && data.date === null) {
+      data.date = data.stats.mtime;
+    } else {
+      data.date = dateify(data.date);
+    }
+    return data;
   }
-}
-async function getFileCoverageInformationEnabled(debugMode, codeql, features, repositoryProperties) {
-  if (debugMode) {
-    return {
-      enabled: true,
-      enabledByRepositoryProperty: false,
-      showDeprecationWarning: false
-    };
+  /**
+   * Error listener that re-emits error on to our internal stream.
+   *
+   * @private
+   * @param  {Error} err
+   * @return void
+   */
+  _onModuleError(err) {
+    this.emit("error", err);
   }
-  if (!isAnalyzingPullRequest()) {
-    return {
-      enabled: true,
-      enabledByRepositoryProperty: false,
-      showDeprecationWarning: false
-    };
+  /**
+   * Checks the various state variables after queue has drained to determine if
+   * we need to `finalize`.
+   *
+   * @private
+   * @return void
+   */
+  _onQueueDrain() {
+    if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+      return;
+    }
+    if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+      this._finalize();
+    }
   }
-  if ((process.env["CODEQL_ACTION_FILE_COVERAGE_ON_PRS" /* FILE_COVERAGE_ON_PRS */] || "").toLocaleLowerCase() === "true") {
-    return {
-      enabled: true,
-      enabledByRepositoryProperty: false,
-      showDeprecationWarning: false
+  /**
+   * Appends each queue task to the module.
+   *
+   * @private
+   * @param  {Object} task
+   * @param  {Function} callback
+   * @return void
+   */
+  _onQueueTask(task, callback) {
+    const fullCallback = () => {
+      if (task.data.callback) {
+        task.data.callback();
+      }
+      callback();
     };
+    if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+      fullCallback();
+      return;
+    }
+    this._task = task;
+    this._moduleAppend(task.source, task.data, fullCallback);
   }
-  if (repositoryProperties["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */] === true) {
-    return {
-      enabled: true,
-      enabledByRepositoryProperty: true,
-      showDeprecationWarning: false
-    };
+  /**
+   * Performs a file stat and reinjects the task back into the queue.
+   *
+   * @private
+   * @param  {Object} task
+   * @param  {Function} callback
+   * @return void
+   */
+  _onStatQueueTask(task, callback) {
+    if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+      callback();
+      return;
+    }
+    (0, import_fs2.lstat)(
+      task.filepath,
+      function(err, stats) {
+        if (this._state.aborted) {
+          setImmediate(callback);
+          return;
+        }
+        if (err) {
+          this._entriesCount--;
+          this.emit("warning", err);
+          setImmediate(callback);
+          return;
+        }
+        task = this._updateQueueTaskWithStats(task, stats);
+        if (task) {
+          if (stats.size) {
+            this._fsEntriesTotalBytes += stats.size;
+          }
+          this._queue.push(task);
+        }
+        setImmediate(callback);
+      }.bind(this)
+    );
   }
-  if (!await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */, codeql)) {
-    return {
-      enabled: true,
-      enabledByRepositoryProperty: false,
-      showDeprecationWarning: true
-    };
+  /**
+   * Unpipes the module and ends our internal stream.
+   *
+   * @private
+   * @return void
+   */
+  _shutdown() {
+    this._moduleUnpipe();
+    this.end();
   }
-  return {
-    enabled: false,
-    enabledByRepositoryProperty: false,
-    showDeprecationWarning: false
-  };
-}
-function logFileCoverageOnPrsDeprecationWarning(logger) {
-  if (process.env["CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION" /* DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION */]) {
-    return;
+  /**
+   * Tracks the bytes emitted by our internal stream.
+   *
+   * @private
+   * @param  {Buffer} chunk
+   * @param  {String} encoding
+   * @param  {Function} callback
+   * @return void
+   */
+  _transform(chunk, encoding, callback) {
+    if (chunk) {
+      this._pointer += chunk.length;
+    }
+    callback(null, chunk);
   }
-  const repositoryOwnerType = github2.context.payload.repository?.owner.type;
-  let message = "Starting April 2026, the CodeQL Action will skip computing file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses.";
-  const envVarOptOut = "set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true`.";
-  const repoPropertyOptOut = 'create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository\'s settings.';
-  if (repositoryOwnerType === "Organization") {
-    if (isDefaultSetup()) {
-      message += `
-
-To opt out of this change, ${repoPropertyOptOut}`;
+  /**
+   * Updates and normalizes a queue task using stats data.
+   *
+   * @private
+   * @param  {Object} task
+   * @param  {Stats} stats
+   * @return {Object}
+   */
+  _updateQueueTaskWithStats(task, stats) {
+    if (stats.isFile()) {
+      task.data.type = "file";
+      task.data.sourceType = "stream";
+      task.source = new import_lazystream.Readable(function() {
+        return (0, import_fs2.createReadStream)(task.filepath);
+      });
+    } else if (stats.isDirectory() && this._supportsDirectory) {
+      task.data.name = trailingSlashIt(task.data.name);
+      task.data.type = "directory";
+      task.data.sourcePath = trailingSlashIt(task.filepath);
+      task.data.sourceType = "buffer";
+      task.source = Buffer.concat([]);
+    } else if (stats.isSymbolicLink() && this._supportsSymlink) {
+      const linkPath = (0, import_fs2.readlinkSync)(task.filepath);
+      const dirName = (0, import_path6.dirname)(task.filepath);
+      task.data.type = "symlink";
+      task.data.linkname = (0, import_path6.relative)(
+        dirName,
+        (0, import_path6.resolve)(dirName, linkPath)
+      );
+      task.data.sourceType = "buffer";
+      task.source = Buffer.concat([]);
     } else {
-      message += `
-
-To opt out of this change, ${envVarOptOut} Alternatively, ${repoPropertyOptOut}`;
+      if (stats.isDirectory()) {
+        this.emit(
+          "warning",
+          new ArchiverError("DIRECTORYNOTSUPPORTED", task.data)
+        );
+      } else if (stats.isSymbolicLink()) {
+        this.emit(
+          "warning",
+          new ArchiverError("SYMLINKNOTSUPPORTED", task.data)
+        );
+      } else {
+        this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data));
+      }
+      return null;
     }
-  } else if (isDefaultSetup()) {
-    message += `
-
-To opt out of this change, switch to an advanced setup workflow and ${envVarOptOut}`;
-  } else {
-    message += `
-
-To opt out of this change, ${envVarOptOut}`;
+    task.data = this._normalizeEntryData(task.data, stats);
+    return task;
   }
-  logger.warning(message);
-  core14.exportVariable("CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION" /* DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION */, "true");
-}
-
-// src/sarif/index.ts
-var fs20 = __toESM(require("fs"));
-var InvalidSarifUploadError = class extends Error {
-};
-function getToolNames(sarifFile) {
-  const toolNames = {};
-  for (const run9 of sarifFile.runs || []) {
-    const tool = run9.tool || {};
-    const driver = tool.driver || {};
-    if (typeof driver.name === "string" && driver.name.length > 0) {
-      toolNames[driver.name] = true;
+  /**
+   * Aborts the archiving process, taking a best-effort approach, by:
+   *
+   * - removing any pending queue tasks
+   * - allowing any active queue workers to finish
+   * - detaching internal module pipes
+   * - ending both sides of the Transform stream
+   *
+   * It will NOT drain any remaining sources.
+   *
+   * @return {this}
+   */
+  abort() {
+    if (this._state.aborted || this._state.finalized) {
+      return this;
     }
+    this._abort();
+    return this;
   }
-  return Object.keys(toolNames);
-}
-function readSarifFile(sarifFilePath) {
-  return JSON.parse(fs20.readFileSync(sarifFilePath, "utf8"));
-}
-function combineSarifFiles(sarifFiles, logger) {
-  logger.info(`Loading SARIF file(s)`);
-  const runs = [];
-  let version = void 0;
-  for (const sarifFile of sarifFiles) {
-    logger.debug(`Loading SARIF file: ${sarifFile}`);
-    const sarifLog = readSarifFile(sarifFile);
-    if (version === void 0) {
-      version = sarifLog.version;
-    } else if (version !== sarifLog.version) {
-      throw new InvalidSarifUploadError(
-        `Different SARIF versions encountered: ${version} and ${sarifLog.version}`
+  /**
+   * Appends an input source (text string, buffer, or stream) to the instance.
+   *
+   * When the instance has received, processed, and emitted the input, the `entry`
+   * event is fired.
+   *
+   * @fires  Archiver#entry
+   * @param  {(Buffer|Stream|String)} source The input source.
+   * @param  {EntryData} data See also {@link ZipEntryData} and {@link TarEntryData}.
+   * @return {this}
+   */
+  append(source, data) {
+    if (this._state.finalize || this._state.aborted) {
+      this.emit("error", new ArchiverError("QUEUECLOSED"));
+      return this;
+    }
+    data = this._normalizeEntryData(data);
+    if (typeof data.name !== "string" || data.name.length === 0) {
+      this.emit("error", new ArchiverError("ENTRYNAMEREQUIRED"));
+      return this;
+    }
+    if (data.type === "directory" && !this._supportsDirectory) {
+      this.emit(
+        "error",
+        new ArchiverError("DIRECTORYNOTSUPPORTED", { name: data.name })
       );
+      return this;
     }
-    runs.push(...sarifLog?.runs || []);
-  }
-  if (version === void 0) {
-    version = "2.1.0";
+    source = normalizeInputSource(source);
+    if (Buffer.isBuffer(source)) {
+      data.sourceType = "buffer";
+    } else if (isStream(source)) {
+      data.sourceType = "stream";
+    } else {
+      this.emit(
+        "error",
+        new ArchiverError("INPUTSTEAMBUFFERREQUIRED", { name: data.name })
+      );
+      return this;
+    }
+    this._entriesCount++;
+    this._queue.push({
+      data,
+      source
+    });
+    return this;
   }
-  return { version, runs };
-}
-function areAllRunsProducedByCodeQL(sarifLogs) {
-  return sarifLogs.every((sarifLog) => {
-    return sarifLog.runs?.every((run9) => run9.tool?.driver?.name === "CodeQL");
-  });
-}
-function createRunKey(run9) {
-  return {
-    name: run9.tool?.driver?.name,
-    fullName: run9.tool?.driver?.fullName,
-    version: run9.tool?.driver?.version,
-    semanticVersion: run9.tool?.driver?.semanticVersion,
-    guid: run9.tool?.driver?.guid,
-    automationId: run9.automationDetails?.id
-  };
-}
-function areAllRunsUnique(sarifLogs) {
-  const keys = /* @__PURE__ */ new Set();
-  for (const sarifLog of sarifLogs) {
-    if (sarifLog.runs === void 0) {
-      continue;
+  /**
+   * Appends a directory and its files, recursively, given its dirpath.
+   *
+   * @param  {String} dirpath The source directory path.
+   * @param  {String} destpath The destination path within the archive.
+   * @param  {(EntryData|Function)} data See also [ZipEntryData]{@link ZipEntryData} and
+   * [TarEntryData]{@link TarEntryData}.
+   * @return {this}
+   */
+  directory(dirpath, destpath, data) {
+    if (this._state.finalize || this._state.aborted) {
+      this.emit("error", new ArchiverError("QUEUECLOSED"));
+      return this;
     }
-    for (const run9 of sarifLog.runs) {
-      const key = JSON.stringify(createRunKey(run9));
-      if (keys.has(key)) {
-        return false;
+    if (typeof dirpath !== "string" || dirpath.length === 0) {
+      this.emit("error", new ArchiverError("DIRECTORYDIRPATHREQUIRED"));
+      return this;
+    }
+    this._pending++;
+    if (destpath === false) {
+      destpath = "";
+    } else if (typeof destpath !== "string") {
+      destpath = dirpath;
+    }
+    var dataFunction = false;
+    if (typeof data === "function") {
+      dataFunction = data;
+      data = {};
+    } else if (typeof data !== "object") {
+      data = {};
+    }
+    var globOptions = {
+      stat: true,
+      dot: true
+    };
+    function onGlobEnd() {
+      this._pending--;
+      this._maybeFinalize();
+    }
+    function onGlobError(err) {
+      this.emit("error", err);
+    }
+    function onGlobMatch(match2) {
+      globber.pause();
+      let ignoreMatch = false;
+      let entryData = Object.assign({}, data);
+      entryData.name = match2.relative;
+      entryData.prefix = destpath;
+      entryData.stats = match2.stat;
+      entryData.callback = globber.resume.bind(globber);
+      try {
+        if (dataFunction) {
+          entryData = dataFunction(entryData);
+          if (entryData === false) {
+            ignoreMatch = true;
+          } else if (typeof entryData !== "object") {
+            throw new ArchiverError("DIRECTORYFUNCTIONINVALIDDATA", {
+              dirpath
+            });
+          }
+        }
+      } catch (e) {
+        this.emit("error", e);
+        return;
       }
-      keys.add(key);
+      if (ignoreMatch) {
+        globber.resume();
+        return;
+      }
+      this._append(match2.absolute, entryData);
     }
+    const globber = src_default(dirpath, globOptions);
+    globber.on("error", onGlobError.bind(this));
+    globber.on("match", onGlobMatch.bind(this));
+    globber.on("end", onGlobEnd.bind(this));
+    return this;
   }
-  return true;
-}
-
-// src/upload-lib.ts
-var GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
-var GENERIC_404_MSG = "The CodeQL code scanning feature is forbidden on this repository.";
-async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects) {
-  return !areAllRunsUnique(sarifObjects) && !process.env.CODEQL_MERGE_SARIF_DEPRECATION_WARNING;
-}
-async function throwIfCombineSarifFilesDisabled(sarifObjects, githubVersion) {
-  if (!await shouldDisableCombineSarifFiles(sarifObjects, githubVersion)) {
-    return;
+  /**
+   * Appends a file given its filepath using a
+   * [lazystream]{@link https://github.com/jpommerening/node-lazystream} wrapper to
+   * prevent issues with open file limits.
+   *
+   * When the instance has received, processed, and emitted the file, the `entry`
+   * event is fired.
+   *
+   * @param  {String} filepath The source filepath.
+   * @param  {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
+   * [TarEntryData]{@link TarEntryData}.
+   * @return {this}
+   */
+  file(filepath, data) {
+    if (this._state.finalize || this._state.aborted) {
+      this.emit("error", new ArchiverError("QUEUECLOSED"));
+      return this;
+    }
+    if (typeof filepath !== "string" || filepath.length === 0) {
+      this.emit("error", new ArchiverError("FILEFILEPATHREQUIRED"));
+      return this;
+    }
+    this._append(filepath, data);
+    return this;
   }
-  const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2025-07-21-code-scanning-will-stop-combining-multiple-sarif-runs-uploaded-in-the-same-sarif-file/";
-  throw new ConfigurationError(
-    `The CodeQL Action does not support uploading multiple SARIF runs with the same category. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
-  );
-}
-async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) {
-  if (githubVersion.type === "GitHub Enterprise Server" /* GHES */) {
-    if (satisfiesGHESVersion(githubVersion.version, "<3.18", true)) {
-      return false;
+  /**
+   * Appends multiple files that match a glob pattern.
+   *
+   * @param  {String} pattern The [glob pattern]{@link https://github.com/isaacs/minimatch} to match.
+   * @param  {Object} options See [node-readdir-glob]{@link https://github.com/yqnn/node-readdir-glob#options}.
+   * @param  {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
+   * [TarEntryData]{@link TarEntryData}.
+   * @return {this}
+   */
+  glob(pattern, options, data) {
+    this._pending++;
+    options = {
+      stat: true,
+      pattern,
+      ...options
+    };
+    function onGlobEnd() {
+      this._pending--;
+      this._maybeFinalize();
+    }
+    function onGlobError(err) {
+      this.emit("error", err);
     }
+    function onGlobMatch(match2) {
+      globber.pause();
+      const entryData = Object.assign({}, data);
+      entryData.callback = globber.resume.bind(globber);
+      entryData.stats = match2.stat;
+      entryData.name = match2.relative;
+      this._append(match2.absolute, entryData);
+    }
+    const globber = new ReaddirGlob2(options.cwd || ".", options);
+    globber.on("error", onGlobError.bind(this));
+    globber.on("match", onGlobMatch.bind(this));
+    globber.on("end", onGlobEnd.bind(this));
+    return this;
   }
-  if (areAllRunsUnique(sarifObjects)) {
-    return false;
+  /**
+   * Finalizes the instance and prevents further appending to the archive
+   * structure (queue will continue til drained).
+   *
+   * The `end`, `close` or `finish` events on the destination stream may fire
+   * right after calling this method so you should set listeners beforehand to
+   * properly detect stream completion.
+   *
+   * @return {Promise}
+   */
+  finalize() {
+    if (this._state.aborted) {
+      var abortedError = new ArchiverError("ABORTED");
+      this.emit("error", abortedError);
+      return Promise.reject(abortedError);
+    }
+    if (this._state.finalize) {
+      var finalizingError = new ArchiverError("FINALIZING");
+      this.emit("error", finalizingError);
+      return Promise.reject(finalizingError);
+    }
+    this._state.finalize = true;
+    if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+      this._finalize();
+    }
+    var self2 = this;
+    return new Promise(function(resolve14, reject) {
+      var errored;
+      self2._module.on("end", function() {
+        if (!errored) {
+          resolve14();
+        }
+      });
+      self2._module.on("error", function(err) {
+        errored = true;
+        reject(err);
+      });
+    });
   }
-  return true;
-}
-async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) {
-  logger.info("Combining SARIF files using the CodeQL CLI");
-  const sarifObjects = sarifFiles.map(readSarifFile);
-  const deprecationWarningMessage = gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025";
-  const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload";
-  if (!areAllRunsProducedByCodeQL(sarifObjects)) {
-    await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
-    logger.debug(
-      "Not all SARIF files were produced by CodeQL. Merging files in the action."
-    );
-    if (await shouldShowCombineSarifFilesDeprecationWarning(sarifObjects)) {
-      logger.warning(
-        `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}`
+  /**
+   * Appends a symlink to the instance.
+   *
+   * This does NOT interact with filesystem and is used for programmatically creating symlinks.
+   *
+   * @param  {String} filepath The symlink path (within archive).
+   * @param  {String} target The target path (within archive).
+   * @param  {Number} mode Sets the entry permissions.
+   * @return {this}
+   */
+  symlink(filepath, target, mode) {
+    if (this._state.finalize || this._state.aborted) {
+      this.emit("error", new ArchiverError("QUEUECLOSED"));
+      return this;
+    }
+    if (typeof filepath !== "string" || filepath.length === 0) {
+      this.emit("error", new ArchiverError("SYMLINKFILEPATHREQUIRED"));
+      return this;
+    }
+    if (typeof target !== "string" || target.length === 0) {
+      this.emit(
+        "error",
+        new ArchiverError("SYMLINKTARGETREQUIRED", { filepath })
       );
-      core15.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
+      return this;
     }
-    return combineSarifFiles(sarifFiles, logger);
+    if (!this._supportsSymlink) {
+      this.emit(
+        "error",
+        new ArchiverError("SYMLINKNOTSUPPORTED", { filepath })
+      );
+      return this;
+    }
+    var data = {};
+    data.type = "symlink";
+    data.name = filepath.replace(/\\/g, "/");
+    data.linkname = target.replace(/\\/g, "/");
+    data.sourceType = "buffer";
+    if (typeof mode === "number") {
+      data.mode = mode;
+    }
+    this._entriesCount++;
+    this._queue.push({
+      data,
+      source: Buffer.concat([])
+    });
+    return this;
   }
-  let codeQL;
-  let tempDir = getTemporaryDirectory();
-  const config = await getConfig(tempDir, logger);
-  if (config !== void 0) {
-    codeQL = await getCodeQL(config.codeQLCmd);
-    tempDir = config.tempDir;
-  } else {
-    logger.info(
-      "Initializing CodeQL since the 'init' Action was not called before this step."
-    );
-    const apiDetails = {
-      auth: getRequiredInput("token"),
-      externalRepoAuth: getOptionalInput(
-        "external-repository-token"
-      ),
-      url: getRequiredEnvParam("GITHUB_SERVER_URL"),
-      apiURL: getRequiredEnvParam("GITHUB_API_URL")
-    };
-    const codeQLDefaultVersionInfo = await features.getEnabledDefaultCliVersions(gitHubVersion.type);
-    const initCodeQLResult = await initCodeQL(
-      void 0,
-      // There is no tools input on the upload action
-      apiDetails,
-      tempDir,
-      gitHubVersion.type,
-      codeQLDefaultVersionInfo,
-      void 0,
-      // rawLanguages: upload-lib does not run analysis
-      false,
-      // useOverlayAwareDefaultCliVersion: upload-lib does not run analysis
-      features,
-      logger
-    );
-    codeQL = initCodeQLResult.codeql;
+  /**
+   * Returns the current length (in bytes) that has been emitted.
+   *
+   * @return {Number}
+   */
+  pointer() {
+    return this._pointer;
   }
-  const baseTempDir = path18.resolve(tempDir, "combined-sarif");
-  fs21.mkdirSync(baseTempDir, { recursive: true });
-  const outputDirectory = fs21.mkdtempSync(path18.resolve(baseTempDir, "output-"));
-  const outputFile = path18.resolve(outputDirectory, "combined-sarif.sarif");
-  await codeQL.mergeResults(sarifFiles, outputFile, {
-    mergeRunsFromEqualCategory: true
-  });
-  return readSarifFile(outputFile);
-}
-function populateRunAutomationDetails(sarifFile, category, analysis_key, environment) {
-  const automationID = getAutomationID2(category, analysis_key, environment);
-  if (automationID !== void 0) {
-    for (const run9 of sarifFile.runs || []) {
-      if (run9.automationDetails === void 0) {
-        run9.automationDetails = {
-          id: automationID
-        };
-      }
-    }
-    return sarifFile;
+};
+
+// node_modules/compress-commons/lib/archivers/archive-entry.js
+var ArchiveEntry = class {
+  getName() {
   }
-  return sarifFile;
-}
-function getAutomationID2(category, analysis_key, environment) {
-  if (category !== void 0) {
-    let automationID = category;
-    if (!automationID.endsWith("/")) {
-      automationID += "/";
-    }
-    return automationID;
+  getSize() {
   }
-  return computeAutomationID(analysis_key, environment);
+  getLastModifiedDate() {
+  }
+  isDirectory() {
+  }
+};
+
+// node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
+var import_normalize_path2 = __toESM(require_normalize_path(), 1);
+
+// node_modules/compress-commons/lib/archivers/zip/util.js
+function dateToDos(d, forceLocalTime) {
+  forceLocalTime = forceLocalTime || false;
+  var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear();
+  if (year < 1980) {
+    return 2162688;
+  } else if (year >= 2044) {
+    return 2141175677;
+  }
+  var val = {
+    year,
+    month: forceLocalTime ? d.getMonth() : d.getUTCMonth(),
+    date: forceLocalTime ? d.getDate() : d.getUTCDate(),
+    hours: forceLocalTime ? d.getHours() : d.getUTCHours(),
+    minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(),
+    seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds()
+  };
+  return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2;
+}
+function dosToDate(dos) {
+  return new Date(
+    (dos >> 25 & 127) + 1980,
+    (dos >> 21 & 15) - 1,
+    dos >> 16 & 31,
+    dos >> 11 & 31,
+    dos >> 5 & 63,
+    (dos & 31) << 1
+  );
 }
-async function uploadPayload(payload, repositoryNwo, logger, analysis) {
-  logger.info("Uploading results");
-  if (shouldSkipSarifUpload()) {
-    const payloadSaveFile = path18.join(
-      getTemporaryDirectory(),
-      `payload-${analysis.kind}.json`
+function getEightBytes(v) {
+  var buf = Buffer.alloc(8);
+  buf.writeUInt32LE(v % 4294967296, 0);
+  buf.writeUInt32LE(v / 4294967296 | 0, 4);
+  return buf;
+}
+function getShortBytes(v) {
+  var buf = Buffer.alloc(2);
+  buf.writeUInt16LE((v & 65535) >>> 0, 0);
+  return buf;
+}
+function getShortBytesValue(buf, offset) {
+  return buf.readUInt16LE(offset);
+}
+function getLongBytes(v) {
+  var buf = Buffer.alloc(4);
+  buf.writeUInt32LE((v & 4294967295) >>> 0, 0);
+  return buf;
+}
+
+// node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
+var DATA_DESCRIPTOR_FLAG = 1 << 3;
+var ENCRYPTION_FLAG = 1 << 0;
+var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2;
+var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1;
+var STRONG_ENCRYPTION_FLAG = 1 << 6;
+var UFT8_NAMES_FLAG = 1 << 11;
+var GeneralPurposeBit = class _GeneralPurposeBit {
+  constructor() {
+    this.descriptor = false;
+    this.encryption = false;
+    this.utf8 = false;
+    this.numberOfShannonFanoTrees = 0;
+    this.strongEncryption = false;
+    this.slidingDictionarySize = 0;
+    return this;
+  }
+  encode() {
+    return getShortBytes(
+      (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) | (this.utf8 ? UFT8_NAMES_FLAG : 0) | (this.encryption ? ENCRYPTION_FLAG : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
     );
-    logger.info(
-      `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}`
+  }
+  static parse(buf, offset) {
+    var flag = getShortBytesValue(buf, offset);
+    var gbp = new _GeneralPurposeBit();
+    gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0);
+    gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0);
+    gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0);
+    gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0);
+    gbp.setSlidingDictionarySize(
+      (flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096
     );
-    logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`);
-    fs21.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2));
-    return "dummy-sarif-id";
+    gbp.setNumberOfShannonFanoTrees(
+      (flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2
+    );
+    return gbp;
   }
-  const client = getApiClient();
-  try {
-    const response = await client.request(analysis.target, {
-      owner: repositoryNwo.owner,
-      repo: repositoryNwo.repo,
-      data: payload
-    });
-    logger.debug(`response status: ${response.status}`);
-    logger.info("Successfully uploaded results");
-    return response.data.id;
-  } catch (e) {
-    const httpError = asHTTPError(e);
-    if (httpError !== void 0) {
-      switch (httpError.status) {
-        case 403:
-          core15.warning(httpError.message || GENERIC_403_MSG);
-          break;
-        case 404:
-          core15.warning(httpError.message || GENERIC_404_MSG);
-          break;
-        default:
-          core15.warning(httpError.message);
-          break;
-      }
+  setNumberOfShannonFanoTrees(n) {
+    this.numberOfShannonFanoTrees = n;
+  }
+  getNumberOfShannonFanoTrees() {
+    return this.numberOfShannonFanoTrees;
+  }
+  setSlidingDictionarySize(n) {
+    this.slidingDictionarySize = n;
+  }
+  getSlidingDictionarySize() {
+    return this.slidingDictionarySize;
+  }
+  useDataDescriptor(b) {
+    this.descriptor = b;
+  }
+  usesDataDescriptor() {
+    return this.descriptor;
+  }
+  useEncryption(b) {
+    this.encryption = b;
+  }
+  usesEncryption() {
+    return this.encryption;
+  }
+  useStrongEncryption(b) {
+    this.strongEncryption = b;
+  }
+  usesStrongEncryption() {
+    return this.strongEncryption;
+  }
+  useUTF8ForNames(b) {
+    this.utf8 = b;
+  }
+  usesUTF8ForNames() {
+    return this.utf8;
+  }
+};
+
+// node_modules/compress-commons/lib/archivers/zip/unix-stat.js
+var PERM_MASK = 4095;
+var FILE_TYPE_FLAG = 61440;
+var LINK_FLAG = 40960;
+var FILE_FLAG = 32768;
+var DIR_FLAG = 16384;
+var DEFAULT_LINK_PERM = 511;
+var DEFAULT_DIR_PERM = 493;
+var DEFAULT_FILE_PERM = 420;
+var unix_stat_default = {
+  PERM_MASK,
+  FILE_TYPE_FLAG,
+  LINK_FLAG,
+  FILE_FLAG,
+  DIR_FLAG,
+  DEFAULT_LINK_PERM,
+  DEFAULT_DIR_PERM,
+  DEFAULT_FILE_PERM
+};
+
+// node_modules/compress-commons/lib/archivers/zip/constants.js
+var EMPTY = Buffer.alloc(0);
+var SHORT_MASK = 65535;
+var SHORT_SHIFT = 16;
+var SHORT_ZERO = Buffer.from(Array(2));
+var LONG_ZERO = Buffer.from(Array(4));
+var MIN_VERSION_INITIAL = 10;
+var MIN_VERSION_DATA_DESCRIPTOR = 20;
+var MIN_VERSION_ZIP64 = 45;
+var VERSION_MADEBY = 45;
+var METHOD_STORED = 0;
+var METHOD_DEFLATED = 8;
+var PLATFORM_UNIX = 3;
+var PLATFORM_FAT = 0;
+var SIG_LFH = 67324752;
+var SIG_DD = 134695760;
+var SIG_CFH = 33639248;
+var SIG_EOCD = 101010256;
+var SIG_ZIP64_EOCD = 101075792;
+var SIG_ZIP64_EOCD_LOC = 117853008;
+var ZIP64_MAGIC_SHORT = 65535;
+var ZIP64_MAGIC = 4294967295;
+var ZIP64_EXTRA_ID = 1;
+var ZLIB_BEST_SPEED = 1;
+var MODE_MASK = 4095;
+var S_IFDIR = 16384;
+var S_IFREG = 32768;
+var S_DOS_A = 32;
+var S_DOS_D = 16;
+
+// node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
+var ZipArchiveEntry = class extends ArchiveEntry {
+  constructor(name) {
+    super();
+    this.platform = PLATFORM_FAT;
+    this.method = -1;
+    this.name = null;
+    this.size = 0;
+    this.csize = 0;
+    this.gpb = new GeneralPurposeBit();
+    this.crc = 0;
+    this.time = -1;
+    this.minver = MIN_VERSION_INITIAL;
+    this.mode = -1;
+    this.extra = null;
+    this.exattr = 0;
+    this.inattr = 0;
+    this.comment = null;
+    if (name) {
+      this.setName(name);
+    }
+  }
+  /**
+   * Returns the extra fields related to the entry.
+   *
+   * @returns {Buffer}
+   */
+  getCentralDirectoryExtra() {
+    return this.getExtra();
+  }
+  /**
+   * Returns the comment set for the entry.
+   *
+   * @returns {string}
+   */
+  getComment() {
+    return this.comment !== null ? this.comment : "";
+  }
+  /**
+   * Returns the compressed size of the entry.
+   *
+   * @returns {number}
+   */
+  getCompressedSize() {
+    return this.csize;
+  }
+  /**
+   * Returns the CRC32 digest for the entry.
+   *
+   * @returns {number}
+   */
+  getCrc() {
+    return this.crc;
+  }
+  /**
+   * Returns the external file attributes for the entry.
+   *
+   * @returns {number}
+   */
+  getExternalAttributes = function() {
+    return this.exattr;
+  };
+  /**
+   * Returns the extra fields related to the entry.
+   *
+   * @returns {Buffer}
+   */
+  getExtra() {
+    return this.extra !== null ? this.extra : EMPTY;
+  }
+  /**
+   * Returns the general purpose bits related to the entry.
+   *
+   * @returns {GeneralPurposeBit}
+   */
+  getGeneralPurposeBit() {
+    return this.gpb;
+  }
+  /**
+   * Returns the internal file attributes for the entry.
+   *
+   * @returns {number}
+   */
+  getInternalAttributes() {
+    return this.inattr;
+  }
+  /**
+   * Returns the last modified date of the entry.
+   *
+   * @returns {number}
+   */
+  getLastModifiedDate() {
+    return this.getTime();
+  }
+  /**
+   * Returns the extra fields related to the entry.
+   *
+   * @returns {Buffer}
+   */
+  getLocalFileDataExtra() {
+    return this.getExtra();
+  }
+  /**
+   * Returns the compression method used on the entry.
+   *
+   * @returns {number}
+   */
+  getMethod() {
+    return this.method;
+  }
+  /**
+   * Returns the filename of the entry.
+   *
+   * @returns {string}
+   */
+  getName() {
+    return this.name;
+  }
+  /**
+   * Returns the platform on which the entry was made.
+   *
+   * @returns {number}
+   */
+  getPlatform() {
+    return this.platform;
+  }
+  /**
+   * Returns the size of the entry.
+   *
+   * @returns {number}
+   */
+  getSize() {
+    return this.size;
+  }
+  /**
+   * Returns a date object representing the last modified date of the entry.
+   *
+   * @returns {number|Date}
+   */
+  getTime() {
+    return this.time !== -1 ? dosToDate(this.time) : -1;
+  }
+  /**
+   * Returns the DOS timestamp for the entry.
+   *
+   * @returns {number}
+   */
+  getTimeDos() {
+    return this.time !== -1 ? this.time : 0;
+  }
+  /**
+   * Returns the UNIX file permissions for the entry.
+   *
+   * @returns {number}
+   */
+  getUnixMode() {
+    return this.platform !== PLATFORM_UNIX ? 0 : this.getExternalAttributes() >> SHORT_SHIFT & SHORT_MASK;
+  }
+  /**
+   * Returns the version of ZIP needed to extract the entry.
+   *
+   * @returns {number}
+   */
+  getVersionNeededToExtract() {
+    return this.minver;
+  }
+  /**
+   * Sets the comment of the entry.
+   *
+   * @param comment
+   */
+  setComment(comment) {
+    if (Buffer.byteLength(comment) !== comment.length) {
+      this.getGeneralPurposeBit().useUTF8ForNames(true);
     }
-    throw wrapApiConfigurationError(e);
+    this.comment = comment;
   }
-}
-function findSarifFilesInDir(sarifPath, isSarif) {
-  const sarifFiles = [];
-  const walkSarifFiles = (dir) => {
-    const entries = fs21.readdirSync(dir, { withFileTypes: true });
-    for (const entry of entries) {
-      if (entry.isFile() && isSarif(entry.name)) {
-        sarifFiles.push(path18.resolve(dir, entry.name));
-      } else if (entry.isDirectory()) {
-        walkSarifFiles(path18.resolve(dir, entry.name));
-      }
+  /**
+   * Sets the compressed size of the entry.
+   *
+   * @param size
+   */
+  setCompressedSize(size) {
+    if (size < 0) {
+      throw new Error("invalid entry compressed size");
     }
-  };
-  walkSarifFiles(sarifPath);
-  return sarifFiles;
-}
-function getSarifFilePaths(sarifPath, isSarif) {
-  if (!fs21.existsSync(sarifPath)) {
-    throw new ConfigurationError(`Path does not exist: ${sarifPath}`);
+    this.csize = size;
   }
-  let sarifFiles;
-  if (fs21.lstatSync(sarifPath).isDirectory()) {
-    sarifFiles = findSarifFilesInDir(sarifPath, isSarif);
-    if (sarifFiles.length === 0) {
-      throw new ConfigurationError(
-        `No SARIF files found to upload in "${sarifPath}".`
-      );
+  /**
+   * Sets the checksum of the entry.
+   *
+   * @param crc
+   */
+  setCrc(crc) {
+    if (crc < 0) {
+      throw new Error("invalid entry crc32");
     }
-  } else {
-    sarifFiles = [sarifPath];
+    this.crc = crc;
   }
-  return sarifFiles;
-}
-async function getGroupedSarifFilePaths(logger, sarifPath) {
-  const stats = fs21.statSync(sarifPath, { throwIfNoEntry: false });
-  if (stats === void 0) {
-    throw new ConfigurationError(`Path does not exist: ${sarifPath}`);
+  /**
+   * Sets the external file attributes of the entry.
+   *
+   * @param attr
+   */
+  setExternalAttributes(attr) {
+    this.exattr = attr >>> 0;
   }
-  const results = {};
-  if (stats.isDirectory()) {
-    let unassignedSarifFiles = findSarifFilesInDir(
-      sarifPath,
-      (name) => path18.extname(name) === ".sarif"
-    );
-    logger.debug(
-      `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}`
-    );
-    for (const analysisConfig of SarifScanOrder) {
-      const filesForCurrentAnalysis = unassignedSarifFiles.filter(
-        analysisConfig.sarifPredicate
-      );
-      if (filesForCurrentAnalysis.length > 0) {
-        logger.debug(
-          `The following SARIF files are for ${analysisConfig.name}: ${filesForCurrentAnalysis.join(", ")}`
-        );
-        unassignedSarifFiles = unassignedSarifFiles.filter(
-          (name) => !analysisConfig.sarifPredicate(name)
-        );
-        results[analysisConfig.kind] = filesForCurrentAnalysis;
-      } else {
-        logger.debug(`Found no SARIF files for ${analysisConfig.name}`);
-      }
+  /**
+   * Sets the extra fields related to the entry.
+   *
+   * @param extra
+   */
+  setExtra(extra) {
+    this.extra = extra;
+  }
+  /**
+   * Sets the general purpose bits related to the entry.
+   *
+   * @param gpb
+   */
+  setGeneralPurposeBit(gpb) {
+    if (!(gpb instanceof GeneralPurposeBit)) {
+      throw new Error("invalid entry GeneralPurposeBit");
     }
-    if (unassignedSarifFiles.length !== 0) {
-      logger.warning(
-        `Found files in ${sarifPath} which do not belong to any analysis: ${unassignedSarifFiles.join(", ")}`
-      );
+    this.gpb = gpb;
+  }
+  /**
+   * Sets the internal file attributes of the entry.
+   *
+   * @param attr
+   */
+  setInternalAttributes(attr) {
+    this.inattr = attr;
+  }
+  /**
+   * Sets the compression method of the entry.
+   *
+   * @param method
+   */
+  setMethod(method) {
+    if (method < 0) {
+      throw new Error("invalid entry compression method");
     }
-  } else {
-    for (const analysisConfig of SarifScanOrder) {
-      if (analysisConfig.kind === "code-scanning" /* CodeScanning */ || analysisConfig.sarifPredicate(sarifPath)) {
-        logger.debug(
-          `Using '${sarifPath}' as a SARIF file for ${analysisConfig.name}.`
-        );
-        results[analysisConfig.kind] = [sarifPath];
-        break;
-      }
+    this.method = method;
+  }
+  /**
+   * Sets the name of the entry.
+   *
+   * @param name
+   * @param prependSlash
+   */
+  setName(name, prependSlash = false) {
+    name = (0, import_normalize_path2.default)(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
+    if (prependSlash) {
+      name = `/${name}`;
     }
+    if (Buffer.byteLength(name) !== name.length) {
+      this.getGeneralPurposeBit().useUTF8ForNames(true);
+    }
+    this.name = name;
   }
-  return results;
-}
-function countResultsInSarif(sarifLog) {
-  let numResults = 0;
-  const parsedSarif = JSON.parse(sarifLog);
-  if (!Array.isArray(parsedSarif.runs)) {
-    throw new InvalidSarifUploadError("Invalid SARIF. Missing 'runs' array.");
+  /**
+   * Sets the platform on which the entry was made.
+   *
+   * @param platform
+   */
+  setPlatform(platform2) {
+    this.platform = platform2;
   }
-  for (const run9 of parsedSarif.runs) {
-    if (!Array.isArray(run9.results)) {
-      throw new InvalidSarifUploadError(
-        "Invalid SARIF. Missing 'results' array in run."
-      );
+  /**
+   * Sets the size of the entry.
+   *
+   * @param size
+   */
+  setSize(size) {
+    if (size < 0) {
+      throw new Error("invalid entry size");
     }
-    numResults += run9.results.length;
+    this.size = size;
   }
-  return numResults;
-}
-function readSarifFileOrThrow(sarifFilePath) {
-  try {
-    return readSarifFile(sarifFilePath);
-  } catch (e) {
-    throw new InvalidSarifUploadError(
-      `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}`
-    );
+  /**
+   * Sets the time of the entry.
+   *
+   * @param time
+   * @param forceLocalTime
+   */
+  setTime(time, forceLocalTime) {
+    if (!(time instanceof Date)) {
+      throw new Error("invalid entry time");
+    }
+    this.time = dateToDos(time, forceLocalTime);
   }
-}
-function validateSarifFileSchema(sarifLog, sarifFilePath, logger) {
-  if (areAllRunsProducedByCodeQL([sarifLog]) && // We want to validate CodeQL SARIF in testing environments.
-  !getTestingEnvironment()) {
-    logger.debug(
-      `Skipping SARIF schema validation for ${sarifFilePath} as all runs are produced by CodeQL.`
-    );
-    return true;
+  /**
+   * Sets the UNIX file permissions for the entry.
+   *
+   * @param mode
+   */
+  setUnixMode(mode) {
+    mode |= this.isDirectory() ? S_IFDIR : S_IFREG;
+    var extattr = 0;
+    extattr |= mode << SHORT_SHIFT | (this.isDirectory() ? S_DOS_D : S_DOS_A);
+    this.setExternalAttributes(extattr);
+    this.mode = mode & MODE_MASK;
+    this.platform = PLATFORM_UNIX;
   }
-  logger.info(`Validating ${sarifFilePath}`);
-  const schema2 = require_sarif_schema_2_1_0();
-  const result = new jsonschema2.Validator().validate(sarifLog, schema2);
-  const warningAttributes = ["uri-reference", "uri"];
-  const errors = (result.errors ?? []).filter(
-    (err) => !(err.name === "format" && typeof err.argument === "string" && warningAttributes.includes(err.argument))
-  );
-  const warnings = (result.errors ?? []).filter(
-    (err) => err.name === "format" && typeof err.argument === "string" && warningAttributes.includes(err.argument)
-  );
-  for (const warning14 of warnings) {
-    logger.info(
-      `Warning: '${warning14.instance}' is not a valid URI in '${warning14.property}'.`
-    );
+  /**
+   * Sets the version of ZIP needed to extract this entry.
+   *
+   * @param minver
+   */
+  setVersionNeededToExtract(minver) {
+    this.minver = minver;
   }
-  if (errors.length > 0) {
-    for (const error3 of errors) {
-      logger.startGroup(`Error details: ${error3.stack}`);
-      logger.info(JSON.stringify(error3, null, 2));
-      logger.endGroup();
-    }
-    const sarifErrors = errors.map((e) => `- ${e.stack}`);
-    throw new InvalidSarifUploadError(
-      `Unable to upload "${sarifFilePath}" as it is not valid SARIF:
-${sarifErrors.join(
-        "\n"
-      )}`
-    );
+  /**
+   * Returns true if this entry represents a directory.
+   *
+   * @returns {boolean}
+   */
+  isDirectory() {
+    return this.getName().slice(-1) === "/";
   }
-  return true;
-}
-function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, workflowRunID, workflowRunAttempt, checkoutURI, environment, toolNames, mergeBaseCommitOid) {
-  const payloadObj = {
-    commit_oid: commitOid,
-    ref,
-    analysis_key: analysisKey,
-    analysis_name: analysisName,
-    sarif: zippedSarif,
-    workflow_run_id: workflowRunID,
-    workflow_run_attempt: workflowRunAttempt,
-    checkout_uri: checkoutURI,
-    environment,
-    started_at: process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */],
-    tool_names: toolNames,
-    base_ref: void 0,
-    base_sha: void 0
-  };
-  if (getWorkflowEventName() === "pull_request") {
-    if (commitOid === getRequiredEnvParam("GITHUB_SHA") && mergeBaseCommitOid) {
-      payloadObj.base_ref = `refs/heads/${getRequiredEnvParam(
-        "GITHUB_BASE_REF"
-      )}`;
-      payloadObj.base_sha = mergeBaseCommitOid;
-    } else if (process.env.GITHUB_EVENT_PATH) {
-      const githubEvent = JSON.parse(
-        fs21.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8")
-      );
-      payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`;
-      payloadObj.base_sha = githubEvent.pull_request.base.sha;
-    }
+  /**
+   * Returns true if this entry represents a unix symlink,
+   * in which case the entry's content contains the target path
+   * for the symlink.
+   *
+   * @returns {boolean}
+   */
+  isUnixSymlink() {
+    return (this.getUnixMode() & unix_stat_default.FILE_TYPE_FLAG) === unix_stat_default.LINK_FLAG;
   }
-  return payloadObj;
-}
-async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths, category, analysis) {
-  logger.info(`Post-processing sarif files: ${JSON.stringify(sarifPaths)}`);
-  const gitHubVersion = await getGitHubVersion();
-  let sarifLog;
-  category = analysis.fixCategory(logger, category);
-  if (sarifPaths.length > 1) {
-    for (const sarifPath of sarifPaths) {
-      const parsedSarif = readSarifFileOrThrow(sarifPath);
-      validateSarifFileSchema(parsedSarif, sarifPath, logger);
-    }
-    sarifLog = await combineSarifFilesUsingCLI(
-      sarifPaths,
-      gitHubVersion,
-      features,
-      logger
-    );
-  } else {
-    const sarifPath = sarifPaths[0];
-    sarifLog = readSarifFileOrThrow(sarifPath);
-    validateSarifFileSchema(sarifLog, sarifPath, logger);
-    await throwIfCombineSarifFilesDisabled([sarifLog], gitHubVersion);
+  /**
+   * Returns true if this entry is using the ZIP64 extension of ZIP.
+   *
+   * @returns {boolean}
+   */
+  isZip64() {
+    return this.csize > ZIP64_MAGIC || this.size > ZIP64_MAGIC;
   }
-  sarifLog = filterAlertsByDiffRange(logger, sarifLog);
-  sarifLog = await addFingerprints(sarifLog, checkoutPath, logger);
-  const analysisKey = await getAnalysisKey();
-  const environment = getRequiredInput("matrix");
-  sarifLog = populateRunAutomationDetails(
-    sarifLog,
-    category,
-    analysisKey,
-    environment
-  );
-  return { sarif: sarifLog, analysisKey, environment };
-}
-async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
-  const outputPath = pathInput || getOptionalEnvVar("CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */);
-  if (outputPath !== void 0) {
-    dumpSarifFile(
-      JSON.stringify(postProcessingResults.sarif),
-      outputPath,
-      logger,
-      uploadTarget
-    );
-  } else {
-    logger.debug(`Not writing post-processed SARIF files.`);
+};
+
+// node_modules/compress-commons/lib/archivers/archive-output-stream.js
+var import_readable_stream4 = __toESM(require_ours(), 1);
+
+// node_modules/compress-commons/lib/util/index.js
+var import_readable_stream3 = __toESM(require_ours(), 1);
+function normalizeInputSource2(source) {
+  if (source === null) {
+    return Buffer.alloc(0);
+  } else if (typeof source === "string") {
+    return Buffer.from(source);
+  } else if (isStream(source) && !source._readableState) {
+    var normalized = new import_readable_stream3.PassThrough();
+    source.pipe(normalized);
+    return normalized;
   }
+  return source;
 }
-async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
-  const sarifPaths = getSarifFilePaths(
-    inputSarifPath,
-    uploadTarget.sarifPredicate
-  );
-  return uploadSpecifiedFiles(
-    sarifPaths,
-    checkoutPath,
-    category,
-    features,
-    logger,
-    uploadTarget
-  );
-}
-async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
-  const processingResults = await postProcessSarifFiles(
-    logger,
-    features,
-    checkoutPath,
-    sarifPaths,
-    category,
-    uploadTarget
-  );
-  return uploadPostProcessedFiles(
-    logger,
-    checkoutPath,
-    uploadTarget,
-    processingResults
-  );
-}
-async function uploadPostProcessedFiles(logger, checkoutPath, uploadTarget, postProcessingResults) {
-  logger.startGroup(`Uploading ${uploadTarget.name} results`);
-  const sarifLog = postProcessingResults.sarif;
-  const toolNames = getToolNames(sarifLog);
-  logger.debug(`Validating that each SARIF run has a unique category`);
-  validateUniqueCategory(sarifLog, uploadTarget.sentinelPrefix);
-  logger.debug(`Serializing SARIF for upload`);
-  const sarifPayload = JSON.stringify(sarifLog);
-  logger.debug(`Compressing serialized SARIF`);
-  const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
-  const checkoutURI = url.pathToFileURL(checkoutPath).href;
-  const payload = uploadTarget.transformPayload(
-    buildPayload(
-      await getCommitOid(checkoutPath),
-      await getRef(),
-      postProcessingResults.analysisKey,
-      getRequiredEnvParam("GITHUB_WORKFLOW"),
-      zippedSarif,
-      getWorkflowRunID(),
-      getWorkflowRunAttempt(),
-      checkoutURI,
-      postProcessingResults.environment,
-      toolNames,
-      await determineBaseBranchHeadCommitOid()
-    )
-  );
-  const rawUploadSizeBytes = sarifPayload.length;
-  logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);
-  const zippedUploadSizeBytes = zippedSarif.length;
-  logger.debug(`Base64 zipped upload size: ${zippedUploadSizeBytes} bytes`);
-  const numResultInSarif = countResultsInSarif(sarifPayload);
-  logger.debug(`Number of results in upload: ${numResultInSarif}`);
-  const sarifID = await uploadPayload(
-    payload,
-    getRepositoryNwo(),
-    logger,
-    uploadTarget
-  );
-  logger.endGroup();
-  return {
-    statusReport: {
-      raw_upload_size_bytes: rawUploadSizeBytes,
-      zipped_upload_size_bytes: zippedUploadSizeBytes,
-      num_results_in_sarif: numResultInSarif
-    },
-    sarifID
-  };
-}
-function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
-  if (!fs21.existsSync(outputDir)) {
-    fs21.mkdirSync(outputDir, { recursive: true });
-  } else if (!fs21.lstatSync(outputDir).isDirectory()) {
-    throw new ConfigurationError(
-      `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}`
-    );
+
+// node_modules/compress-commons/lib/archivers/archive-output-stream.js
+var ArchiveOutputStream = class extends import_readable_stream4.Transform {
+  constructor(options) {
+    super(options);
+    this.offset = 0;
+    this._archive = {
+      finish: false,
+      finished: false,
+      processing: false
+    };
   }
-  const outputFile = path18.resolve(
-    outputDir,
-    `upload${uploadTarget.sarifExtension}`
-  );
-  logger.info(`Writing processed SARIF file to ${outputFile}`);
-  fs21.writeFileSync(outputFile, sarifPayload);
-}
-var STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS = 5 * 1e3;
-var STATUS_CHECK_BACKOFF_MULTIPLIER = 2;
-var STATUS_CHECK_MAX_TRIES = 5;
-async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
-  isUnsuccessfulExecution: false
-}) {
-  logger.startGroup("Waiting for processing to finish");
-  try {
-    const client = getApiClient();
-    let statusCheckBackoff = STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS;
-    if (process.env["NODE_ENV"] !== "test") {
-      await delay(statusCheckBackoff, { allowProcessExit: false });
-    }
-    for (let statusCheckCount = 1; statusCheckCount <= STATUS_CHECK_MAX_TRIES; statusCheckCount++) {
-      let response = void 0;
-      try {
-        response = await client.request(
-          "GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id",
-          {
-            owner: repositoryNwo.owner,
-            repo: repositoryNwo.repo,
-            sarif_id: sarifID
-          }
-        );
-      } catch (e) {
-        logger.warning(
-          `An error occurred checking the status of the delivery. ${e} It should still be processed in the background, but errors that occur during processing may not be reported.`
-        );
-        break;
-      }
-      const status = response.data.processing_status;
-      logger.info(`Analysis upload status is ${status}.`);
-      if (status === "pending") {
-        logger.debug("Analysis processing is still pending...");
-      } else if (options.isUnsuccessfulExecution) {
-        handleProcessingResultForUnsuccessfulExecution(
-          response,
-          status,
-          logger
-        );
-        break;
-      } else if (status === "complete") {
-        break;
-      } else if (status === "failed") {
-        const message = `Code Scanning could not process the submitted SARIF file:
-${response.data.errors}`;
-        const processingErrors = response.data.errors;
-        throw shouldConsiderConfigurationError(processingErrors) ? new ConfigurationError(message) : shouldConsiderInvalidRequest(processingErrors) ? new InvalidSarifUploadError(message) : new Error(message);
-      } else {
-        assertNever(status);
-      }
-      if (statusCheckCount === STATUS_CHECK_MAX_TRIES) {
-        logger.warning(
-          "Timed out waiting for analysis to finish processing. Continuing."
-        );
-        break;
-      } else {
-        statusCheckBackoff *= STATUS_CHECK_BACKOFF_MULTIPLIER;
-        await delay(statusCheckBackoff, { allowProcessExit: false });
-      }
+  _appendBuffer(zae, source, callback) {
+  }
+  _appendStream(zae, source, callback) {
+  }
+  _emitErrorCallback = function(err) {
+    if (err) {
+      this.emit("error", err);
     }
-  } finally {
-    logger.endGroup();
+  };
+  _finish(ae) {
   }
-}
-function shouldConsiderConfigurationError(processingErrors) {
-  const expectedConfigErrors = [
-    "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled",
-    "rejecting delivery as the repository has too many logical alerts",
-    "A delivery cannot contain multiple runs with the same category"
-  ];
-  return processingErrors.length === 1 && expectedConfigErrors.some((msg) => processingErrors[0].includes(msg));
-}
-function shouldConsiderInvalidRequest(processingErrors) {
-  return processingErrors.every(
-    (error3) => error3.startsWith("rejecting SARIF") || error3.startsWith("an invalid URI was provided as a SARIF location") || error3.startsWith("locationFromSarifResult: expected artifact location") || error3.startsWith(
-      "could not convert rules: invalid security severity value, is not a number"
-    ) || /^SARIF URI scheme [^\s]* did not match the checkout URI scheme [^\s]*/.test(
-      error3
-    )
-  );
-}
-function handleProcessingResultForUnsuccessfulExecution(response, status, logger) {
-  if (status === "failed" && Array.isArray(response.data.errors) && response.data.errors.length === 1 && // eslint-disable-next-line @typescript-eslint/no-unsafe-call
-  response.data.errors[0].toString().startsWith("unsuccessful execution")) {
-    logger.info(
-      'Successfully uploaded a SARIF file for the unsuccessful execution. Received expected "unsuccessful execution" processing error, and no other errors.'
-    );
-  } else if (status === "failed") {
-    logger.warning(
-      `Failed to upload a SARIF file for the unsuccessful execution. Code scanning status information for the repository may be out of date as a result. Processing errors: ${response.data.errors}`
-    );
-  } else if (status === "complete") {
-    logger.debug(
-      'Uploaded a SARIF file for the unsuccessful execution, but did not receive the expected "unsuccessful execution" processing error. This is a known transient issue with the code scanning API, and does not cause out of date code scanning status information.'
-    );
-  } else {
-    assertNever(status);
+  _normalizeEntry(ae) {
   }
-}
-function validateUniqueCategory(sarifLog, sentinelPrefix) {
-  const categories = {};
-  for (const run9 of sarifLog.runs || []) {
-    const id = run9?.automationDetails?.id;
-    const tool = run9.tool?.driver?.name;
-    const category = `${sanitize(id)}_${sanitize(tool)}`;
-    categories[category] = { id, tool };
+  _transform(chunk, encoding, callback) {
+    callback(null, chunk);
   }
-  for (const [category, { id, tool }] of Object.entries(categories)) {
-    const sentinelEnvVar = `${sentinelPrefix}${category}`;
-    if (process.env[sentinelEnvVar]) {
-      throw new ConfigurationError(
-        `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`
+  entry(ae, source, callback) {
+    source = source || null;
+    if (typeof callback !== "function") {
+      callback = this._emitErrorCallback.bind(this);
+    }
+    if (!(ae instanceof ArchiveEntry)) {
+      callback(new Error("not a valid instance of ArchiveEntry"));
+      return;
+    }
+    if (this._archive.finish || this._archive.finished) {
+      callback(new Error("unacceptable entry after finish"));
+      return;
+    }
+    if (this._archive.processing) {
+      callback(new Error("already processing an entry"));
+      return;
+    }
+    this._archive.processing = true;
+    this._normalizeEntry(ae);
+    this._entry = ae;
+    source = normalizeInputSource2(source);
+    if (Buffer.isBuffer(source)) {
+      this._appendBuffer(ae, source, callback);
+    } else if (isStream(source)) {
+      this._appendStream(ae, source, callback);
+    } else {
+      this._archive.processing = false;
+      callback(
+        new Error("input source must be valid Stream or Buffer instance")
       );
+      return;
     }
-    core15.exportVariable(sentinelEnvVar, sentinelEnvVar);
+    return this;
   }
-}
-function sanitize(str2) {
-  return (str2 ?? "_").replace(/[^a-zA-Z0-9_]/g, "_").toLocaleUpperCase();
-}
-function filterAlertsByDiffRange(logger, sarifLog) {
-  const diffRanges = readDiffRangesJsonFile(logger);
-  if (!diffRanges?.length) {
-    return sarifLog;
+  finish() {
+    if (this._archive.processing) {
+      this._archive.finish = true;
+      return;
+    }
+    this._finish();
   }
-  if (sarifLog.runs === void 0) {
-    return sarifLog;
+  getBytesWritten() {
+    return this.offset;
   }
-  for (const run9 of sarifLog.runs) {
-    if (run9.results) {
-      run9.results = run9.results.filter((result) => {
-        const locations = [
-          ...(result.locations || []).map((loc) => loc.physicalLocation),
-          ...(result.relatedLocations || []).map((loc) => loc.physicalLocation)
-        ];
-        return locations.some((physicalLocation) => {
-          const locationUri = physicalLocation?.artifactLocation?.uri;
-          const locationStartLine = physicalLocation?.region?.startLine;
-          if (!locationUri || locationStartLine === void 0) {
-            return false;
-          }
-          return diffRanges.some(
-            (range) => range.path === locationUri && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0)
-          );
-        });
-      });
+  write(chunk, cb) {
+    if (chunk) {
+      this.offset += chunk.length;
     }
+    return super.write(chunk, cb);
   }
-  return sarifLog;
-}
+};
 
-// src/upload-sarif.ts
-async function postProcessAndUploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category, postProcessedOutputPath) {
-  const sarifGroups = await getGroupedSarifFilePaths(
-    logger,
-    sarifPath
-  );
-  const uploadResults = {};
-  for (const [analysisKind, sarifFiles] of unsafeEntriesInvariant(
-    sarifGroups
-  )) {
-    const analysisConfig = getAnalysisConfig(analysisKind);
-    const postProcessingResults = await postProcessSarifFiles(
-      logger,
-      features,
-      checkoutPath,
-      sarifFiles,
-      category,
-      analysisConfig
-    );
-    await writePostProcessedFiles(
-      logger,
-      postProcessedOutputPath,
-      analysisConfig,
-      postProcessingResults
-    );
-    if (uploadKind === "always") {
-      uploadResults[analysisKind] = await uploadPostProcessedFiles(
-        logger,
-        checkoutPath,
-        analysisConfig,
-        postProcessingResults
-      );
+// node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
+var import_crc_323 = __toESM(require_crc32(), 1);
+
+// node_modules/crc32-stream/lib/crc32-stream.js
+var import_readable_stream5 = __toESM(require_ours(), 1);
+var import_crc_32 = __toESM(require_crc32(), 1);
+var CRC32Stream = class extends import_readable_stream5.Transform {
+  constructor(options) {
+    super(options);
+    this.checksum = Buffer.allocUnsafe(4);
+    this.checksum.writeInt32BE(0, 0);
+    this.rawSize = 0;
+  }
+  _transform(chunk, encoding, callback) {
+    if (chunk) {
+      this.checksum = import_crc_32.default.buf(chunk, this.checksum) >>> 0;
+      this.rawSize += chunk.length;
     }
+    callback(null, chunk);
   }
-  return uploadResults;
-}
+  digest(encoding) {
+    const checksum = Buffer.allocUnsafe(4);
+    checksum.writeUInt32BE(this.checksum >>> 0, 0);
+    return encoding ? checksum.toString(encoding) : checksum;
+  }
+  hex() {
+    return this.digest("hex").toUpperCase();
+  }
+  size() {
+    return this.rawSize;
+  }
+};
 
-// src/analyze-action.ts
-async function sendStatusReport2(startedAt, config, stats, error3, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanup, dependencyCacheResults, databaseUploadResults, logger) {
-  const status = getActionsStatus(error3, stats?.analyze_failure_language);
-  const statusReportBase = await createStatusReportBase(
-    "finish" /* Analyze */,
-    status,
-    startedAt,
-    config,
-    await checkDiskUsage(logger),
-    logger,
-    error3?.message,
-    error3?.stack
-  );
-  if (statusReportBase !== void 0) {
-    const report = {
-      ...statusReportBase,
-      ...stats || {},
-      ...dbCreationTimings || {},
-      ...trapCacheCleanup || {},
-      dependency_caching_upload_results: dependencyCacheResults,
-      database_upload_results: databaseUploadResults
-    };
-    if (config && didUploadTrapCaches) {
-      const trapCacheUploadStatusReport = {
-        ...report,
-        trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0),
-        trap_cache_upload_size_bytes: Math.round(
-          await getTotalCacheSize(Object.values(config.trapCaches), logger)
-        )
-      };
-      await sendStatusReport(trapCacheUploadStatusReport);
+// node_modules/crc32-stream/lib/deflate-crc32-stream.js
+var import_zlib2 = require("zlib");
+var import_crc_322 = __toESM(require_crc32(), 1);
+var DeflateCRC32Stream = class extends import_zlib2.DeflateRaw {
+  constructor(options) {
+    super(options);
+    this.checksum = Buffer.allocUnsafe(4);
+    this.checksum.writeInt32BE(0, 0);
+    this.rawSize = 0;
+    this.compressedSize = 0;
+  }
+  push(chunk, encoding) {
+    if (chunk) {
+      this.compressedSize += chunk.length;
+    }
+    return super.push(chunk, encoding);
+  }
+  _transform(chunk, encoding, callback) {
+    if (chunk) {
+      this.checksum = import_crc_322.default.buf(chunk, this.checksum) >>> 0;
+      this.rawSize += chunk.length;
+    }
+    super._transform(chunk, encoding, callback);
+  }
+  digest(encoding) {
+    const checksum = Buffer.allocUnsafe(4);
+    checksum.writeUInt32BE(this.checksum >>> 0, 0);
+    return encoding ? checksum.toString(encoding) : checksum;
+  }
+  hex() {
+    return this.digest("hex").toUpperCase();
+  }
+  size(compressed = false) {
+    if (compressed) {
+      return this.compressedSize;
     } else {
-      await sendStatusReport(report);
+      return this.rawSize;
     }
   }
-}
-function hasBadExpectErrorInput() {
-  return getOptionalInput("expect-error") !== "false" && !isInTestMode();
-}
-function doesGoExtractionOutputExist(config) {
-  const golangDbDirectory = getCodeQLDatabasePath(
-    config,
-    "go" /* go */
-  );
-  const trapDirectory = import_path4.default.join(
-    golangDbDirectory,
-    "trap",
-    "go" /* go */
-  );
-  return fs22.existsSync(trapDirectory) && fs22.readdirSync(trapDirectory).some(
-    (fileName) => [
-      ".trap",
-      ".trap.gz",
-      ".trap.br",
-      ".trap.tar.gz",
-      ".trap.tar.br",
-      ".trap.tar"
-    ].some((ext) => fileName.endsWith(ext))
-  );
-}
-async function runAutobuildIfLegacyGoWorkflow(config, logger) {
-  if (!config.languages.includes("go" /* go */)) {
-    return;
+};
+
+// node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
+function _defaults(o) {
+  if (typeof o !== "object") {
+    o = {};
+  }
+  if (typeof o.zlib !== "object") {
+    o.zlib = {};
+  }
+  if (typeof o.zlib.level !== "number") {
+    o.zlib.level = ZLIB_BEST_SPEED;
+  }
+  o.forceZip64 = !!o.forceZip64;
+  o.forceLocalTime = !!o.forceLocalTime;
+  return o;
+}
+var ZipArchiveOutputStream = class extends ArchiveOutputStream {
+  constructor(options) {
+    const _options = _defaults(options);
+    super(_options);
+    this.options = _options;
+    this._entry = null;
+    this._entries = [];
+    this._archive = {
+      centralLength: 0,
+      centralOffset: 0,
+      comment: "",
+      finish: false,
+      finished: false,
+      processing: false,
+      forceZip64: _options.forceZip64,
+      forceLocalTime: _options.forceLocalTime
+    };
+  }
+  _afterAppend(ae) {
+    this._entries.push(ae);
+    if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
+      this._writeDataDescriptor(ae);
+    }
+    this._archive.processing = false;
+    this._entry = null;
+    if (this._archive.finish && !this._archive.finished) {
+      this._finish();
+    }
   }
-  if (config.buildMode) {
-    logger.debug(
-      "Skipping legacy Go autobuild since a build mode has been specified."
-    );
-    return;
+  _appendBuffer(ae, source, callback) {
+    if (source.length === 0) {
+      ae.setMethod(METHOD_STORED);
+    }
+    var method = ae.getMethod();
+    if (method === METHOD_STORED) {
+      ae.setSize(source.length);
+      ae.setCompressedSize(source.length);
+      ae.setCrc(import_crc_323.default.buf(source) >>> 0);
+    }
+    this._writeLocalFileHeader(ae);
+    if (method === METHOD_STORED) {
+      this.write(source);
+      this._afterAppend(ae);
+      callback(null, ae);
+      return;
+    } else if (method === METHOD_DEFLATED) {
+      this._smartStream(ae, callback).end(source);
+      return;
+    } else {
+      callback(new Error("compression method " + method + " not implemented"));
+      return;
+    }
   }
-  if (process.env["CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */] === "true") {
-    logger.debug("Won't run Go autobuild since it has already been run.");
-    return;
+  _appendStream(ae, source, callback) {
+    ae.getGeneralPurposeBit().useDataDescriptor(true);
+    ae.setVersionNeededToExtract(MIN_VERSION_DATA_DESCRIPTOR);
+    this._writeLocalFileHeader(ae);
+    var smart = this._smartStream(ae, callback);
+    source.once("error", function(err) {
+      smart.emit("error", err);
+      smart.end();
+    });
+    source.pipe(smart);
   }
-  if (dbIsFinalized(config, "go" /* go */, logger)) {
-    logger.debug(
-      "Won't run Go autobuild since there is already a finalized database for Go."
+  _finish() {
+    this._archive.centralOffset = this.offset;
+    this._entries.forEach(
+      function(ae) {
+        this._writeCentralFileHeader(ae);
+      }.bind(this)
     );
-    return;
+    this._archive.centralLength = this.offset - this._archive.centralOffset;
+    if (this.isZip64()) {
+      this._writeCentralDirectoryZip64();
+    }
+    this._writeCentralDirectoryEnd();
+    this._archive.processing = false;
+    this._archive.finish = true;
+    this._archive.finished = true;
+    this.end();
   }
-  if (doesGoExtractionOutputExist(config)) {
-    logger.debug(
-      "Won't run Go autobuild since at least one file of Go code has already been extracted."
+  _normalizeEntry(ae) {
+    if (ae.getMethod() === -1) {
+      ae.setMethod(METHOD_DEFLATED);
+    }
+    if (ae.getMethod() === METHOD_DEFLATED) {
+      ae.getGeneralPurposeBit().useDataDescriptor(true);
+      ae.setVersionNeededToExtract(MIN_VERSION_DATA_DESCRIPTOR);
+    }
+    if (ae.getTime() === -1) {
+      ae.setTime(/* @__PURE__ */ new Date(), this._archive.forceLocalTime);
+    }
+    ae._offsets = {
+      file: 0,
+      data: 0,
+      contents: 0
+    };
+  }
+  _smartStream(ae, callback) {
+    var deflate = ae.getMethod() === METHOD_DEFLATED;
+    var process2 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream();
+    var error3 = null;
+    function handleStuff() {
+      var digest = process2.digest().readUInt32BE(0);
+      ae.setCrc(digest);
+      ae.setSize(process2.size());
+      ae.setCompressedSize(process2.size(true));
+      this._afterAppend(ae);
+      callback(error3, ae);
+    }
+    process2.once("end", handleStuff.bind(this));
+    process2.once("error", function(err) {
+      error3 = err;
+    });
+    process2.pipe(this, { end: false });
+    return process2;
+  }
+  _writeCentralDirectoryEnd() {
+    var records = this._entries.length;
+    var size = this._archive.centralLength;
+    var offset = this._archive.centralOffset;
+    if (this.isZip64()) {
+      records = ZIP64_MAGIC_SHORT;
+      size = ZIP64_MAGIC;
+      offset = ZIP64_MAGIC;
+    }
+    this.write(getLongBytes(SIG_EOCD));
+    this.write(SHORT_ZERO);
+    this.write(SHORT_ZERO);
+    this.write(getShortBytes(records));
+    this.write(getShortBytes(records));
+    this.write(getLongBytes(size));
+    this.write(getLongBytes(offset));
+    var comment = this.getComment();
+    var commentLength = Buffer.byteLength(comment);
+    this.write(getShortBytes(commentLength));
+    this.write(comment);
+  }
+  _writeCentralDirectoryZip64() {
+    this.write(getLongBytes(SIG_ZIP64_EOCD));
+    this.write(getEightBytes(44));
+    this.write(getShortBytes(MIN_VERSION_ZIP64));
+    this.write(getShortBytes(MIN_VERSION_ZIP64));
+    this.write(LONG_ZERO);
+    this.write(LONG_ZERO);
+    this.write(getEightBytes(this._entries.length));
+    this.write(getEightBytes(this._entries.length));
+    this.write(getEightBytes(this._archive.centralLength));
+    this.write(getEightBytes(this._archive.centralOffset));
+    this.write(getLongBytes(SIG_ZIP64_EOCD_LOC));
+    this.write(LONG_ZERO);
+    this.write(
+      getEightBytes(this._archive.centralOffset + this._archive.centralLength)
     );
-    if ("CODEQL_EXTRACTOR_GO_BUILD_TRACING" in process.env) {
-      logger.warning(
-        `The CODEQL_EXTRACTOR_GO_BUILD_TRACING environment variable has no effect on workflows with manual build steps, so we recommend that you remove it from your workflow.`
+    this.write(getLongBytes(1));
+  }
+  _writeCentralFileHeader(ae) {
+    var gpb = ae.getGeneralPurposeBit();
+    var method = ae.getMethod();
+    var fileOffset = ae._offsets.file;
+    var size = ae.getSize();
+    var compressedSize = ae.getCompressedSize();
+    if (ae.isZip64() || fileOffset > ZIP64_MAGIC) {
+      size = ZIP64_MAGIC;
+      compressedSize = ZIP64_MAGIC;
+      fileOffset = ZIP64_MAGIC;
+      ae.setVersionNeededToExtract(MIN_VERSION_ZIP64);
+      var extraBuf = Buffer.concat(
+        [
+          getShortBytes(ZIP64_EXTRA_ID),
+          getShortBytes(24),
+          getEightBytes(ae.getSize()),
+          getEightBytes(ae.getCompressedSize()),
+          getEightBytes(ae._offsets.file)
+        ],
+        28
       );
+      ae.setExtra(extraBuf);
+    }
+    this.write(getLongBytes(SIG_CFH));
+    this.write(getShortBytes(ae.getPlatform() << 8 | VERSION_MADEBY));
+    this.write(getShortBytes(ae.getVersionNeededToExtract()));
+    this.write(gpb.encode());
+    this.write(getShortBytes(method));
+    this.write(getLongBytes(ae.getTimeDos()));
+    this.write(getLongBytes(ae.getCrc()));
+    this.write(getLongBytes(compressedSize));
+    this.write(getLongBytes(size));
+    var name = ae.getName();
+    var comment = ae.getComment();
+    var extra = ae.getCentralDirectoryExtra();
+    if (gpb.usesUTF8ForNames()) {
+      name = Buffer.from(name);
+      comment = Buffer.from(comment);
+    }
+    this.write(getShortBytes(name.length));
+    this.write(getShortBytes(extra.length));
+    this.write(getShortBytes(comment.length));
+    this.write(SHORT_ZERO);
+    this.write(getShortBytes(ae.getInternalAttributes()));
+    this.write(getLongBytes(ae.getExternalAttributes()));
+    this.write(getLongBytes(fileOffset));
+    this.write(name);
+    this.write(extra);
+    this.write(comment);
+  }
+  _writeDataDescriptor(ae) {
+    this.write(getLongBytes(SIG_DD));
+    this.write(getLongBytes(ae.getCrc()));
+    if (ae.isZip64()) {
+      this.write(getEightBytes(ae.getCompressedSize()));
+      this.write(getEightBytes(ae.getSize()));
+    } else {
+      this.write(getLongBytes(ae.getCompressedSize()));
+      this.write(getLongBytes(ae.getSize()));
+    }
+  }
+  _writeLocalFileHeader(ae) {
+    var gpb = ae.getGeneralPurposeBit();
+    var method = ae.getMethod();
+    var name = ae.getName();
+    var extra = ae.getLocalFileDataExtra();
+    if (ae.isZip64()) {
+      gpb.useDataDescriptor(true);
+      ae.setVersionNeededToExtract(MIN_VERSION_ZIP64);
+    }
+    if (gpb.usesUTF8ForNames()) {
+      name = Buffer.from(name);
+    }
+    ae._offsets.file = this.offset;
+    this.write(getLongBytes(SIG_LFH));
+    this.write(getShortBytes(ae.getVersionNeededToExtract()));
+    this.write(gpb.encode());
+    this.write(getShortBytes(method));
+    this.write(getLongBytes(ae.getTimeDos()));
+    ae._offsets.data = this.offset;
+    if (gpb.usesDataDescriptor()) {
+      this.write(LONG_ZERO);
+      this.write(LONG_ZERO);
+      this.write(LONG_ZERO);
+    } else {
+      this.write(getLongBytes(ae.getCrc()));
+      this.write(getLongBytes(ae.getCompressedSize()));
+      this.write(getLongBytes(ae.getSize()));
     }
-    return;
+    this.write(getShortBytes(name.length));
+    this.write(getShortBytes(extra.length));
+    this.write(name);
+    this.write(extra);
+    ae._offsets.contents = this.offset;
   }
-  logger.debug(
-    "Running Go autobuild because extraction output (TRAP files) for Go code has not been found."
-  );
-  await runAutobuild(config, "go" /* go */, logger);
+  getComment(comment) {
+    return this._archive.comment !== null ? this._archive.comment : "";
+  }
+  isZip64() {
+    return this._archive.forceZip64 || this._entries.length > ZIP64_MAGIC_SHORT || this._archive.centralLength > ZIP64_MAGIC || this._archive.centralOffset > ZIP64_MAGIC;
+  }
+  setComment(comment) {
+    this._archive.comment = comment;
+  }
+};
+
+// node_modules/zip-stream/utils.js
+var import_normalize_path3 = __toESM(require_normalize_path(), 1);
+function dateify2(dateish) {
+  dateish = dateish || /* @__PURE__ */ new Date();
+  if (dateish instanceof Date) {
+    dateish = dateish;
+  } else if (typeof dateish === "string") {
+    dateish = new Date(dateish);
+  } else {
+    dateish = /* @__PURE__ */ new Date();
+  }
+  return dateish;
 }
-async function run(startedAt) {
-  let uploadResults = void 0;
-  let runStats = void 0;
-  let config = void 0;
-  let trapCacheCleanupTelemetry = void 0;
-  let trapCacheUploadTime = void 0;
-  let dbCreationTimings = void 0;
-  let didUploadTrapCaches = false;
-  let dependencyCacheResults;
-  let databaseUploadResults = [];
-  const logger = getActionsLogger();
-  try {
-    initializeEnvironment(getActionVersion());
-    persistInputs();
-    const statusReportBase = await createStatusReportBase(
-      "finish" /* Analyze */,
-      "starting",
-      startedAt,
-      config,
-      await checkDiskUsage(logger),
-      logger
-    );
-    if (statusReportBase !== void 0) {
-      await sendStatusReport(statusReportBase);
+function sanitizePath2(filepath) {
+  return (0, import_normalize_path3.default)(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, "");
+}
+
+// node_modules/zip-stream/index.js
+var ZipStream = class extends ZipArchiveOutputStream {
+  /**
+   * @constructor
+   * @extends external:ZipArchiveOutputStream
+   * @param {Object} [options]
+   * @param {String} [options.comment] Sets the zip archive comment.
+   * @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
+   * @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
+   * @param {Boolean} [options.store=false] Sets the compression method to STORE.
+   * @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
+   * to control compression.
+   */
+  constructor(options) {
+    options = options || {};
+    options.zlib = options.zlib || {};
+    if (typeof options.level === "number" && options.level >= 0) {
+      options.zlib.level = options.level;
+      delete options.level;
     }
-    config = await getConfig(getTemporaryDirectory(), logger);
-    if (config === void 0) {
-      throw new ConfigurationError(
-        "Config file could not be found at expected location. Has the 'init' action been called?"
-      );
+    if (!options.forceZip64 && typeof options.zlib.level === "number" && options.zlib.level === 0) {
+      options.store = true;
     }
-    const codeql = await getCodeQL(config.codeQLCmd);
-    if (hasBadExpectErrorInput()) {
-      throw new ConfigurationError(
-        "`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork."
-      );
+    options.namePrependSlash = options.namePrependSlash || false;
+    super(options);
+    if (options.comment && options.comment.length > 0) {
+      this.setComment(options.comment);
     }
-    if (process.env.CODEQL_PROXY_HOST === "" && !await codeQlVersionAtLeast(codeql, "2.20.7")) {
-      delete process.env.CODEQL_PROXY_HOST;
-      delete process.env.CODEQL_PROXY_PORT;
-      delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
+  }
+  /**
+   * Normalizes entry data with fallbacks for key properties.
+   *
+   * @private
+   * @param  {Object} data
+   * @return {Object}
+   */
+  _normalizeFileData(data) {
+    data = {
+      type: "file",
+      name: null,
+      namePrependSlash: this.options.namePrependSlash,
+      linkname: null,
+      date: null,
+      mode: null,
+      store: this.options.store,
+      comment: "",
+      ...data
+    };
+    let isDir = data.type === "directory";
+    const isSymlink = data.type === "symlink";
+    if (data.name) {
+      data.name = sanitizePath2(data.name);
+      if (!isSymlink && data.name.slice(-1) === "/") {
+        isDir = true;
+        data.type = "directory";
+      } else if (isDir) {
+        data.name += "/";
+      }
+    }
+    if (isDir || isSymlink) {
+      data.store = true;
+    }
+    data.date = dateify2(data.date);
+    return data;
+  }
+  /**
+   * Appends an entry given an input source (text string, buffer, or stream).
+   *
+   * @param  {(Buffer|Stream|String)} source The input source.
+   * @param  {Object} data
+   * @param  {String} data.name Sets the entry name including internal path.
+   * @param  {String} [data.comment] Sets the entry comment.
+   * @param  {(String|Date)} [data.date=NOW()] Sets the entry date.
+   * @param  {Number} [data.mode=D:0755/F:0644] Sets the entry permissions.
+   * @param  {Boolean} [data.store=options.store] Sets the compression method to STORE.
+   * @param  {String} [data.type=file] Sets the entry type. Defaults to `directory`
+   * if name ends with trailing slash.
+   * @param  {Function} callback
+   * @return this
+   */
+  entry(source, data, callback) {
+    if (typeof callback !== "function") {
+      callback = this._emitErrorCallback.bind(this);
     }
-    if (getOptionalInput("cleanup-level")) {
-      logger.info(
-        "The 'cleanup-level' input is ignored since the CodeQL Action now automatically manages database cleanup. This input can safely be removed from your workflow."
-      );
+    data = this._normalizeFileData(data);
+    if (data.type !== "file" && data.type !== "directory" && data.type !== "symlink") {
+      callback(new Error(data.type + " entries not currently supported"));
+      return;
     }
-    const apiDetails = getApiDetails();
-    const outputDir = getRequiredInput("output");
-    core16.exportVariable("CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */, outputDir);
-    const threads = getThreadsFlag(
-      getOptionalInput("threads") || process.env["CODEQL_THREADS"],
-      logger
-    );
-    const repositoryNwo = getRepositoryNwo();
-    const gitHubVersion = await getGitHubVersion();
-    checkActionVersion(getActionVersion(), gitHubVersion);
-    const features = initFeatures(
-      gitHubVersion,
-      repositoryNwo,
-      getTemporaryDirectory(),
-      logger
-    );
-    const memory = getMemoryFlag(
-      getOptionalInput("ram") || process.env["CODEQL_RAM"],
-      logger
-    );
-    const diffRangePackDir = await setupDiffInformedQueryRun(logger);
-    await warnIfGoInstalledAfterInit(config, logger);
-    await runAutobuildIfLegacyGoWorkflow(config, logger);
-    dbCreationTimings = await runFinalize(
-      features,
-      outputDir,
-      threads,
-      memory,
-      codeql,
-      config,
-      logger
-    );
-    if (getRequiredInput("skip-queries") !== "true") {
-      if (getOptionalInput("add-snippets") !== void 0) {
-        logger.warning(
-          "The `add-snippets` input has been removed and no longer has any effect."
-        );
-      }
-      runStats = await runQueries(
-        outputDir,
-        memory,
-        threads,
-        diffRangePackDir,
-        getOptionalInput("category"),
-        codeql,
-        config,
-        logger,
-        features
+    if (typeof data.name !== "string" || data.name.length === 0) {
+      callback(new Error("entry name must be a non-empty string value"));
+      return;
+    }
+    if (data.type === "symlink" && typeof data.linkname !== "string") {
+      callback(
+        new Error(
+          "entry linkname must be a non-empty string value when type equals symlink"
+        )
       );
+      return;
     }
-    const dbLocations = {};
-    for (const language of config.languages) {
-      dbLocations[language] = getCodeQLDatabasePath(config, language);
+    const entry = new ZipArchiveEntry(data.name);
+    entry.setTime(data.date, this.options.forceLocalTime);
+    if (data.namePrependSlash) {
+      entry.setName(data.name, true);
     }
-    core16.setOutput("db-locations", dbLocations);
-    core16.setOutput("sarif-output", import_path4.default.resolve(outputDir));
-    const uploadKind = getUploadValue(
-      getOptionalInput("upload")
-    );
-    if (runStats) {
-      const checkoutPath = getRequiredInput("checkout_path");
-      const category = getOptionalInput("category");
-      uploadResults = await postProcessAndUploadSarif(
-        logger,
-        features,
-        uploadKind,
-        checkoutPath,
-        outputDir,
-        category,
-        getOptionalInput("post-processed-sarif-path")
-      );
-      if (uploadResults["code-scanning" /* CodeScanning */] !== void 0) {
-        core16.setOutput(
-          "sarif-id",
-          uploadResults["code-scanning" /* CodeScanning */].sarifID
-        );
-      }
-      if (uploadResults["code-quality" /* CodeQuality */] !== void 0) {
-        core16.setOutput(
-          "quality-sarif-id",
-          uploadResults["code-quality" /* CodeQuality */].sarifID
-        );
-      }
-    } else {
-      logger.info("Not uploading results");
+    if (data.store) {
+      entry.setMethod(0);
     }
-    await cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger);
-    databaseUploadResults = await cleanupAndUploadDatabases(
-      repositoryNwo,
-      codeql,
-      config,
-      apiDetails,
-      features,
-      logger
-    );
-    const trapCacheUploadStartTime = import_perf_hooks4.performance.now();
-    didUploadTrapCaches = await uploadTrapCaches(codeql, config, logger);
-    trapCacheUploadTime = import_perf_hooks4.performance.now() - trapCacheUploadStartTime;
-    trapCacheCleanupTelemetry = await cleanupTrapCaches(
-      config,
-      features,
-      logger
-    );
-    if (shouldStoreCache(config.dependencyCachingEnabled)) {
-      dependencyCacheResults = await uploadDependencyCaches(
-        codeql,
-        features,
-        config,
-        logger
-      );
+    if (data.comment.length > 0) {
+      entry.setComment(data.comment);
     }
-    if (isInTestMode()) {
-      logger.debug("In test mode. Waiting for processing is disabled.");
-    } else if (uploadResults?.["code-scanning" /* CodeScanning */] !== void 0 && getRequiredInput("wait-for-processing") === "true") {
-      await waitForProcessing(
-        getRepositoryNwo(),
-        uploadResults["code-scanning" /* CodeScanning */].sarifID,
-        getActionsLogger()
-      );
+    if (data.type === "symlink" && typeof data.mode !== "number") {
+      data.mode = 40960;
     }
-    if (getOptionalInput("expect-error") === "true") {
-      core16.setFailed(
-        `expect-error input was set to true but no error was thrown.`
-      );
+    if (typeof data.mode === "number") {
+      if (data.type === "symlink") {
+        data.mode |= 40960;
+      }
+      entry.setUnixMode(data.mode);
     }
-    core16.exportVariable("CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */, "true");
-  } catch (unwrappedError) {
-    const error3 = wrapError(unwrappedError);
-    if (getOptionalInput("expect-error") !== "true" || hasBadExpectErrorInput()) {
-      core16.setFailed(error3.message);
+    if (data.type === "symlink" && typeof data.linkname === "string") {
+      source = Buffer.from(data.linkname);
     }
-    await sendStatusReport2(
-      startedAt,
-      config,
-      error3 instanceof CodeQLAnalysisError ? error3.queriesStatusReport : void 0,
-      error3 instanceof CodeQLAnalysisError ? error3.error : error3,
-      trapCacheUploadTime,
-      dbCreationTimings,
-      didUploadTrapCaches,
-      trapCacheCleanupTelemetry,
-      dependencyCacheResults,
-      databaseUploadResults,
-      logger
-    );
-    return;
+    return super.entry(entry, source, callback);
   }
-  if (runStats !== void 0 && uploadResults?.["code-scanning" /* CodeScanning */] !== void 0) {
-    await sendStatusReport2(
-      startedAt,
-      config,
-      {
-        ...runStats,
-        ...uploadResults["code-scanning" /* CodeScanning */].statusReport
-      },
-      void 0,
-      trapCacheUploadTime,
-      dbCreationTimings,
-      didUploadTrapCaches,
-      trapCacheCleanupTelemetry,
-      dependencyCacheResults,
-      databaseUploadResults,
-      logger
-    );
-  } else if (runStats !== void 0) {
-    await sendStatusReport2(
-      startedAt,
-      config,
-      { ...runStats },
-      void 0,
-      trapCacheUploadTime,
-      dbCreationTimings,
-      didUploadTrapCaches,
-      trapCacheCleanupTelemetry,
-      dependencyCacheResults,
-      databaseUploadResults,
-      logger
-    );
+  /**
+   * Finalizes the instance and prevents further appending to the archive
+   * structure (queue will continue til drained).
+   *
+   * @return void
+   */
+  finalize() {
+    this.finish();
+  }
+};
+
+// node_modules/archiver/lib/plugins/zip.js
+var Zip = class {
+  /**
+   * @constructor
+   * @param {ZipOptions} [options]
+   * @param {String} [options.comment] Sets the zip archive comment.
+   * @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
+   * @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
+   * @param {Boolean} [options.namePrependSlash=false] Prepends a forward slash to archive file paths.
+   * @param {Boolean} [options.store=false] Sets the compression method to STORE.
+   * @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
+   */
+  constructor(options) {
+    options = this.options = {
+      comment: "",
+      forceUTC: false,
+      namePrependSlash: false,
+      store: false,
+      ...options
+    };
+    this.engine = new ZipStream(options);
+  }
+  /**
+   * @param  {(Buffer|Stream)} source
+   * @param  {ZipEntryData} data
+   * @param  {String} data.name Sets the entry name including internal path.
+   * @param  {(String|Date)} [data.date=NOW()] Sets the entry date.
+   * @param  {Number} [data.mode=D:0755/F:0644] Sets the entry permissions.
+   * @param  {String} [data.prefix] Sets a path prefix for the entry name. Useful
+   * when working with methods like `directory` or `glob`.
+   * @param  {fs.Stats} [data.stats] Sets the fs stat data for this entry allowing
+   * for reduction of fs stat calls when stat data is already known.
+   * @param  {Boolean} [data.store=ZipOptions.store] Sets the compression method to STORE.
+   * @param  {Function} callback
+   * @return void
+   */
+  append(source, data, callback) {
+    this.engine.entry(source, data, callback);
+  }
+  /**
+   * @return void
+   */
+  finalize() {
+    this.engine.finalize();
+  }
+  /**
+   * @return this.engine
+   */
+  on() {
+    return this.engine.on.apply(this.engine, arguments);
+  }
+  /**
+   * @return this.engine
+   */
+  pipe() {
+    return this.engine.pipe.apply(this.engine, arguments);
+  }
+  /**
+   * @return this.engine
+   */
+  unpipe() {
+    return this.engine.unpipe.apply(this.engine, arguments);
+  }
+};
+
+// node_modules/archiver/lib/plugins/tar.js
+var import_tar_stream = __toESM(require_tar_stream(), 1);
+
+// node_modules/archiver/lib/plugins/json.js
+var import_readable_stream6 = __toESM(require_ours(), 1);
+
+// node_modules/buffer-crc32/dist/index.mjs
+var CRC_TABLE = new Int32Array([
+  0,
+  1996959894,
+  3993919788,
+  2567524794,
+  124634137,
+  1886057615,
+  3915621685,
+  2657392035,
+  249268274,
+  2044508324,
+  3772115230,
+  2547177864,
+  162941995,
+  2125561021,
+  3887607047,
+  2428444049,
+  498536548,
+  1789927666,
+  4089016648,
+  2227061214,
+  450548861,
+  1843258603,
+  4107580753,
+  2211677639,
+  325883990,
+  1684777152,
+  4251122042,
+  2321926636,
+  335633487,
+  1661365465,
+  4195302755,
+  2366115317,
+  997073096,
+  1281953886,
+  3579855332,
+  2724688242,
+  1006888145,
+  1258607687,
+  3524101629,
+  2768942443,
+  901097722,
+  1119000684,
+  3686517206,
+  2898065728,
+  853044451,
+  1172266101,
+  3705015759,
+  2882616665,
+  651767980,
+  1373503546,
+  3369554304,
+  3218104598,
+  565507253,
+  1454621731,
+  3485111705,
+  3099436303,
+  671266974,
+  1594198024,
+  3322730930,
+  2970347812,
+  795835527,
+  1483230225,
+  3244367275,
+  3060149565,
+  1994146192,
+  31158534,
+  2563907772,
+  4023717930,
+  1907459465,
+  112637215,
+  2680153253,
+  3904427059,
+  2013776290,
+  251722036,
+  2517215374,
+  3775830040,
+  2137656763,
+  141376813,
+  2439277719,
+  3865271297,
+  1802195444,
+  476864866,
+  2238001368,
+  4066508878,
+  1812370925,
+  453092731,
+  2181625025,
+  4111451223,
+  1706088902,
+  314042704,
+  2344532202,
+  4240017532,
+  1658658271,
+  366619977,
+  2362670323,
+  4224994405,
+  1303535960,
+  984961486,
+  2747007092,
+  3569037538,
+  1256170817,
+  1037604311,
+  2765210733,
+  3554079995,
+  1131014506,
+  879679996,
+  2909243462,
+  3663771856,
+  1141124467,
+  855842277,
+  2852801631,
+  3708648649,
+  1342533948,
+  654459306,
+  3188396048,
+  3373015174,
+  1466479909,
+  544179635,
+  3110523913,
+  3462522015,
+  1591671054,
+  702138776,
+  2966460450,
+  3352799412,
+  1504918807,
+  783551873,
+  3082640443,
+  3233442989,
+  3988292384,
+  2596254646,
+  62317068,
+  1957810842,
+  3939845945,
+  2647816111,
+  81470997,
+  1943803523,
+  3814918930,
+  2489596804,
+  225274430,
+  2053790376,
+  3826175755,
+  2466906013,
+  167816743,
+  2097651377,
+  4027552580,
+  2265490386,
+  503444072,
+  1762050814,
+  4150417245,
+  2154129355,
+  426522225,
+  1852507879,
+  4275313526,
+  2312317920,
+  282753626,
+  1742555852,
+  4189708143,
+  2394877945,
+  397917763,
+  1622183637,
+  3604390888,
+  2714866558,
+  953729732,
+  1340076626,
+  3518719985,
+  2797360999,
+  1068828381,
+  1219638859,
+  3624741850,
+  2936675148,
+  906185462,
+  1090812512,
+  3747672003,
+  2825379669,
+  829329135,
+  1181335161,
+  3412177804,
+  3160834842,
+  628085408,
+  1382605366,
+  3423369109,
+  3138078467,
+  570562233,
+  1426400815,
+  3317316542,
+  2998733608,
+  733239954,
+  1555261956,
+  3268935591,
+  3050360625,
+  752459403,
+  1541320221,
+  2607071920,
+  3965973030,
+  1969922972,
+  40735498,
+  2617837225,
+  3943577151,
+  1913087877,
+  83908371,
+  2512341634,
+  3803740692,
+  2075208622,
+  213261112,
+  2463272603,
+  3855990285,
+  2094854071,
+  198958881,
+  2262029012,
+  4057260610,
+  1759359992,
+  534414190,
+  2176718541,
+  4139329115,
+  1873836001,
+  414664567,
+  2282248934,
+  4279200368,
+  1711684554,
+  285281116,
+  2405801727,
+  4167216745,
+  1634467795,
+  376229701,
+  2685067896,
+  3608007406,
+  1308918612,
+  956543938,
+  2808555105,
+  3495958263,
+  1231636301,
+  1047427035,
+  2932959818,
+  3654703836,
+  1088359270,
+  936918e3,
+  2847714899,
+  3736837829,
+  1202900863,
+  817233897,
+  3183342108,
+  3401237130,
+  1404277552,
+  615818150,
+  3134207493,
+  3453421203,
+  1423857449,
+  601450431,
+  3009837614,
+  3294710456,
+  1567103746,
+  711928724,
+  3020668471,
+  3272380065,
+  1510334235,
+  755167117
+]);
+function ensureBuffer(input) {
+  if (Buffer.isBuffer(input)) {
+    return input;
+  }
+  if (typeof input === "number") {
+    return Buffer.alloc(input);
+  } else if (typeof input === "string") {
+    return Buffer.from(input);
   } else {
-    await sendStatusReport2(
-      startedAt,
-      config,
-      void 0,
-      void 0,
-      trapCacheUploadTime,
-      dbCreationTimings,
-      didUploadTrapCaches,
-      trapCacheCleanupTelemetry,
-      dependencyCacheResults,
-      databaseUploadResults,
-      logger
-    );
+    throw new Error("input must be buffer, number, or string, received " + typeof input);
   }
 }
-async function runWrapper() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error3) {
-    core16.setFailed(`analyze action failed: ${getErrorMessage(error3)}`);
-    await sendUnhandledErrorStatusReport(
-      "finish" /* Analyze */,
-      startedAt,
-      error3,
-      logger
-    );
+function bufferizeInt(num) {
+  const tmp = ensureBuffer(4);
+  tmp.writeInt32BE(num, 0);
+  return tmp;
+}
+function _crc32(buf, previous) {
+  buf = ensureBuffer(buf);
+  if (Buffer.isBuffer(previous)) {
+    previous = previous.readUInt32BE(0);
   }
-  await checkForTimeout();
+  let crc = ~~previous ^ -1;
+  for (var n = 0; n < buf.length; n++) {
+    crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
+  }
+  return crc ^ -1;
 }
+function crc324() {
+  return bufferizeInt(_crc32.apply(null, arguments));
+}
+crc324.signed = function() {
+  return _crc32.apply(null, arguments);
+};
+crc324.unsigned = function() {
+  return _crc32.apply(null, arguments) >>> 0;
+};
 
-// src/analyze-action-post.ts
-var fs25 = __toESM(require("fs"));
-var core18 = __toESM(require_core());
-
-// src/debug-artifacts.ts
-var fs24 = __toESM(require("fs"));
-var path21 = __toESM(require("path"));
-var artifact = __toESM(require_artifact2());
-var artifactLegacy = __toESM(require_artifact_client2());
-var core17 = __toESM(require_core());
-var import_archiver = __toESM(require_archiver());
+// node_modules/archiver/index.js
+var ZipArchive = class extends Archiver {
+  constructor(options) {
+    super(options);
+    this._format = "zip";
+    this._module = new Zip(options);
+    this._supportsDirectory = true;
+    this._supportsSymlink = true;
+    this._modulePipe();
+  }
+};
 
 // src/artifact-scanner.ts
-var fs23 = __toESM(require("fs"));
+var fs24 = __toESM(require("fs"));
 var os6 = __toESM(require("os"));
-var path20 = __toESM(require("path"));
+var path21 = __toESM(require("path"));
 var exec = __toESM(require_exec());
 var GITHUB_PAT_CLASSIC_PATTERN = {
   type: "Personal Access Token (Classic)" /* PersonalAccessClassic */,
@@ -158127,24 +160617,24 @@ var GITHUB_TOKEN_PATTERNS = [
   }
 ];
 function isAuthToken(value, patterns = GITHUB_TOKEN_PATTERNS) {
-  for (const { type: type2, pattern } of patterns) {
+  for (const { type, pattern } of patterns) {
     if (value.match(pattern)) {
-      return type2;
+      return type;
     }
   }
   return void 0;
 }
-function scanFileForTokens(filePath, relativePath, logger) {
+function scanFileForTokens(filePath, relativePath2, logger) {
   const findings = [];
   try {
-    const content = fs23.readFileSync(filePath, "utf8");
-    for (const { type: type2, pattern } of GITHUB_TOKEN_PATTERNS) {
+    const content = fs24.readFileSync(filePath, "utf8");
+    for (const { type, pattern } of GITHUB_TOKEN_PATTERNS) {
       const matches = content.match(pattern);
       if (matches) {
         for (let i = 0; i < matches.length; i++) {
-          findings.push({ tokenType: type2, filePath: relativePath });
+          findings.push({ tokenType: type, filePath: relativePath2 });
         }
-        logger.debug(`Found ${matches.length} ${type2}(s) in ${relativePath}`);
+        logger.debug(`Found ${matches.length} ${type}(s) in ${relativePath2}`);
       }
     }
     return findings;
@@ -158170,10 +160660,10 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log
     findings: []
   };
   try {
-    const tempExtractDir = fs23.mkdtempSync(
-      path20.join(extractDir, `extract-${depth}-`)
+    const tempExtractDir = fs24.mkdtempSync(
+      path21.join(extractDir, `extract-${depth}-`)
     );
-    const fileName = path20.basename(archivePath).toLowerCase();
+    const fileName = path21.basename(archivePath).toLowerCase();
     if (fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz")) {
       logger.debug(`Extracting tar.gz file: ${archivePath}`);
       await exec.exec("tar", ["-xzf", archivePath, "-C", tempExtractDir], {
@@ -158190,21 +160680,21 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log
       );
     } else if (fileName.endsWith(".zst")) {
       logger.debug(`Extracting zst file: ${archivePath}`);
-      const outputFile = path20.join(
+      const outputFile = path21.join(
         tempExtractDir,
-        path20.basename(archivePath, ".zst")
+        path21.basename(archivePath, ".zst")
       );
       await exec.exec("zstd", ["-d", archivePath, "-o", outputFile], {
         silent: true
       });
     } else if (fileName.endsWith(".gz")) {
       logger.debug(`Extracting gz file: ${archivePath}`);
-      const outputFile = path20.join(
+      const outputFile = path21.join(
         tempExtractDir,
-        path20.basename(archivePath, ".gz")
+        path21.basename(archivePath, ".gz")
       );
       await exec.exec("gunzip", ["-c", archivePath], {
-        outStream: fs23.createWriteStream(outputFile),
+        outStream: fs24.createWriteStream(outputFile),
         silent: true
       });
     } else if (fileName.endsWith(".zip")) {
@@ -158225,7 +160715,7 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log
     );
     result.scannedFiles += scanResult.scannedFiles;
     result.findings.push(...scanResult.findings);
-    fs23.rmSync(tempExtractDir, { recursive: true, force: true });
+    fs24.rmSync(tempExtractDir, { recursive: true, force: true });
   } catch (e) {
     logger.debug(
       `Could not extract or scan archive file ${archivePath}: ${getErrorMessage(e)}`
@@ -158233,17 +160723,17 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log
   }
   return result;
 }
-async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) {
+async function scanFile(fullPath, relativePath2, extractDir, logger, depth = 0) {
   const result = {
     scannedFiles: 1,
     findings: []
   };
-  const fileName = path20.basename(fullPath).toLowerCase();
+  const fileName = path21.basename(fullPath).toLowerCase();
   const isArchive = fileName.endsWith(".zip") || fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz") || fileName.endsWith(".tar.zst") || fileName.endsWith(".zst") || fileName.endsWith(".gz");
   if (isArchive) {
     const archiveResult = await scanArchiveFile(
       fullPath,
-      relativePath,
+      relativePath2,
       extractDir,
       logger,
       depth
@@ -158251,7 +160741,7 @@ async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) {
     result.scannedFiles += archiveResult.scannedFiles;
     result.findings.push(...archiveResult.findings);
   }
-  const fileFindings = scanFileForTokens(fullPath, relativePath, logger);
+  const fileFindings = scanFileForTokens(fullPath, relativePath2, logger);
   result.findings.push(...fileFindings);
   return result;
 }
@@ -158260,14 +160750,14 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) {
     scannedFiles: 0,
     findings: []
   };
-  const entries = fs23.readdirSync(dirPath, { withFileTypes: true });
+  const entries = fs24.readdirSync(dirPath, { withFileTypes: true });
   for (const entry of entries) {
-    const fullPath = path20.join(dirPath, entry.name);
-    const relativePath = path20.join(baseRelativePath, entry.name);
+    const fullPath = path21.join(dirPath, entry.name);
+    const relativePath2 = path21.join(baseRelativePath, entry.name);
     if (entry.isDirectory()) {
       const subResult = await scanDirectory(
         fullPath,
-        relativePath,
+        relativePath2,
         logger,
         depth
       );
@@ -158276,8 +160766,8 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) {
     } else if (entry.isFile()) {
       const fileResult = await scanFile(
         fullPath,
-        relativePath,
-        path20.dirname(fullPath),
+        relativePath2,
+        path21.dirname(fullPath),
         logger,
         depth
       );
@@ -158295,11 +160785,11 @@ async function scanArtifactsForTokens(filesToScan, logger) {
     scannedFiles: 0,
     findings: []
   };
-  const tempScanDir = fs23.mkdtempSync(path20.join(os6.tmpdir(), "artifact-scan-"));
+  const tempScanDir = fs24.mkdtempSync(path21.join(os6.tmpdir(), "artifact-scan-"));
   try {
     for (const filePath of filesToScan) {
-      const stats = fs23.statSync(filePath);
-      const fileName = path20.basename(filePath);
+      const stats = fs24.statSync(filePath);
+      const fileName = path21.basename(filePath);
       if (stats.isDirectory()) {
         const dirResult = await scanDirectory(filePath, fileName, logger);
         result.scannedFiles += dirResult.scannedFiles;
@@ -158324,7 +160814,7 @@ async function scanArtifactsForTokens(filesToScan, logger) {
       );
       filesWithTokens.add(finding.filePath);
     }
-    const tokenTypesSummary = Array.from(tokenTypesCounts.entries()).map(([type2, count]) => `${count} ${type2}${count > 1 ? "s" : ""}`).join(", ");
+    const tokenTypesSummary = Array.from(tokenTypesCounts.entries()).map(([type, count]) => `${count} ${type}${count > 1 ? "s" : ""}`).join(", ");
     const baseSummary = `scanned ${result.scannedFiles} files, found ${result.findings.length} potential token(s) in ${filesWithTokens.size} file(s)`;
     const summaryWithTypes = tokenTypesSummary ? `${baseSummary} (${tokenTypesSummary})` : baseSummary;
     logger.info(`Artifact check complete: ${summaryWithTypes}`);
@@ -158336,7 +160826,7 @@ async function scanArtifactsForTokens(filesToScan, logger) {
     }
   } finally {
     try {
-      fs23.rmSync(tempScanDir, { recursive: true, force: true });
+      fs24.rmSync(tempScanDir, { recursive: true, force: true });
     } catch (e) {
       logger.debug(
         `Could not clean up temporary scan directory: ${getErrorMessage(e)}`
@@ -158356,14 +160846,14 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion
       logger.info(
         "Uploading available combined SARIF files as Actions debugging artifact..."
       );
-      const baseTempDir = path21.resolve(tempDir, "combined-sarif");
+      const baseTempDir = path22.resolve(tempDir, "combined-sarif");
       const toUpload = [];
-      if (fs24.existsSync(baseTempDir)) {
-        const outputDirs = fs24.readdirSync(baseTempDir);
+      if (fs25.existsSync(baseTempDir)) {
+        const outputDirs = fs25.readdirSync(baseTempDir);
         for (const outputDir of outputDirs) {
-          const sarifFiles = fs24.readdirSync(path21.resolve(baseTempDir, outputDir)).filter((f) => path21.extname(f) === ".sarif");
+          const sarifFiles = fs25.readdirSync(path22.resolve(baseTempDir, outputDir)).filter((f) => path22.extname(f) === ".sarif");
           for (const sarifFile of sarifFiles) {
-            toUpload.push(path21.resolve(baseTempDir, outputDir, sarifFile));
+            toUpload.push(path22.resolve(baseTempDir, outputDir, sarifFile));
           }
         }
       }
@@ -158389,17 +160879,17 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion
 function tryPrepareSarifDebugArtifact(config, language, logger) {
   try {
     const analyzeActionOutputDir = process.env["CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */];
-    if (analyzeActionOutputDir !== void 0 && fs24.existsSync(analyzeActionOutputDir) && fs24.lstatSync(analyzeActionOutputDir).isDirectory()) {
-      const sarifFile = path21.resolve(
+    if (analyzeActionOutputDir !== void 0 && fs25.existsSync(analyzeActionOutputDir) && fs25.lstatSync(analyzeActionOutputDir).isDirectory()) {
+      const sarifFile = path22.resolve(
         analyzeActionOutputDir,
         `${language}.sarif`
       );
-      if (fs24.existsSync(sarifFile)) {
-        const sarifInDbLocation = path21.resolve(
+      if (fs25.existsSync(sarifFile)) {
+        const sarifInDbLocation = path22.resolve(
           config.dbLocation,
           `${language}.sarif`
         );
-        fs24.copyFileSync(sarifFile, sarifInDbLocation);
+        fs25.copyFileSync(sarifFile, sarifInDbLocation);
         return sarifInDbLocation;
       }
     }
@@ -158450,13 +160940,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ
         }
         logger.info("Preparing database logs debug artifact...");
         const databaseDirectory = getCodeQLDatabasePath(config, language);
-        const logsDirectory = path21.resolve(databaseDirectory, "log");
+        const logsDirectory = path22.resolve(databaseDirectory, "log");
         if (doesDirectoryExist(logsDirectory)) {
           filesToUpload.push(...listFolder(logsDirectory));
           logger.info("Database logs debug artifact ready for upload.");
         }
         logger.info("Preparing database cluster logs debug artifact...");
-        const multiLanguageTracingLogsDirectory = path21.resolve(
+        const multiLanguageTracingLogsDirectory = path22.resolve(
           config.dbLocation,
           "log"
         );
@@ -158506,7 +160996,7 @@ function getArtifactSuffix(matrix) {
   if (matrix) {
     try {
       const matrixObject = JSON.parse(matrix);
-      if (isObject2(matrixObject)) {
+      if (isObject(matrixObject)) {
         for (const matrixKey of Object.keys(matrixObject).sort())
           suffix += `-${matrixObject[matrixKey]}`;
       } else {
@@ -158543,8 +161033,8 @@ async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVarian
   try {
     await artifactUploader.uploadArtifact(
       sanitizeArtifactName(`${artifactName}${suffix}`),
-      toUpload.map((file) => path21.normalize(file)),
-      path21.normalize(rootDir),
+      toUpload.map((file) => path22.normalize(file)),
+      path22.normalize(rootDir),
       {
         // ensure we don't keep the debug artifacts around for too long since they can be large.
         retentionDays: 7
@@ -158571,18 +161061,18 @@ async function getArtifactUploaderClient(logger, ghVariant) {
 }
 async function createPartialDatabaseBundle(config, language) {
   const databasePath = getCodeQLDatabasePath(config, language);
-  const databaseBundlePath = path21.resolve(
+  const databaseBundlePath = path22.resolve(
     config.dbLocation,
     `${config.debugDatabaseName}-${language}-partial.zip`
   );
   core17.info(
     `${config.debugDatabaseName}-${language} is not finalized. Uploading partial database bundle at ${databaseBundlePath}...`
   );
-  if (fs24.existsSync(databaseBundlePath)) {
-    await fs24.promises.rm(databaseBundlePath, { force: true });
+  if (fs25.existsSync(databaseBundlePath)) {
+    await fs25.promises.rm(databaseBundlePath, { force: true });
   }
-  const output = fs24.createWriteStream(databaseBundlePath);
-  const zip = (0, import_archiver.default)("zip");
+  const output = fs25.createWriteStream(databaseBundlePath);
+  const zip = new ZipArchive();
   zip.on("error", (err) => {
     throw err;
   });
@@ -158620,7 +161110,7 @@ async function runWrapper2() {
         logger
       );
       if (config !== void 0) {
-        const codeql = await getCodeQL(config.codeQLCmd);
+        const codeql = await getCodeQL(logger, config.codeQLCmd);
         const version = await codeql.getVersion();
         await uploadCombinedSarifArtifacts(
           logger,
@@ -158634,9 +161124,9 @@ async function runWrapper2() {
       getCsharpTempDependencyDir()
     ];
     for (const tempDependencyDir of tempDependencyDirs) {
-      if (fs25.existsSync(tempDependencyDir)) {
+      if (fs26.existsSync(tempDependencyDir)) {
         try {
-          fs25.rmSync(tempDependencyDir, { recursive: true });
+          fs26.rmSync(tempDependencyDir, { recursive: true });
         } catch (error3) {
           logger.info(
             `Failed to remove temporary dependencies directory: ${getErrorMessage(error3)}`
@@ -158675,8 +161165,7 @@ async function sendCompletedStatusReport(config, logger, startedAt, allLanguages
     await sendStatusReport(statusReport);
   }
 }
-async function run2(startedAt) {
-  const logger = getActionsLogger();
+async function run2({ startedAt, logger }) {
   let config;
   let currentLanguage;
   let languages;
@@ -158701,7 +161190,7 @@ async function run2(startedAt) {
         "Config file could not be found at expected location. Has the 'init' action been called?"
       );
     }
-    const codeql = await getCodeQL(config.codeQLCmd);
+    const codeql = await getCodeQL(logger, config.codeQLCmd);
     languages = await determineAutobuildLanguages(codeql, config, logger);
     if (languages !== void 0) {
       const workingDirectory = getOptionalInput("working-directory");
@@ -158735,34 +161224,59 @@ async function run2(startedAt) {
   core19.exportVariable("CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */, "true");
   await sendCompletedStatusReport(config, logger, startedAt, languages ?? []);
 }
+var autobuild = {
+  name: "autobuild" /* Autobuild */,
+  run: run2
+};
 async function runWrapper3() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run2(startedAt);
-  } catch (error3) {
-    core19.setFailed(`autobuild action failed. ${getErrorMessage(error3)}`);
-    await sendUnhandledErrorStatusReport(
-      "autobuild" /* Autobuild */,
-      startedAt,
-      error3,
-      logger
-    );
-  }
+  await runInActions(autobuild);
 }
 
 // src/init-action.ts
-var fs27 = __toESM(require("fs"));
-var path23 = __toESM(require("path"));
+var fs28 = __toESM(require("fs"));
+var path24 = __toESM(require("path"));
 var core21 = __toESM(require_core());
-var github3 = __toESM(require_github());
 var io7 = __toESM(require_io());
 var semver10 = __toESM(require_semver2());
 
+// src/config/inputs.ts
+async function getToolsInput(action, repositoryProperties) {
+  const name = "tools" /* Tools */;
+  const input = action.actions.getOptionalInput(name);
+  const propertyValue = repositoryProperties["github-codeql-tools" /* TOOLS */];
+  const allowRepositoryProperty = await action.features.getValue(
+    "tools_repository_property" /* ToolsRepositoryProperty */
+  );
+  if (allowRepositoryProperty && propertyValue?.startsWith("!")) {
+    action.logger.info(
+      `Using ${name} input from repository property (enforced): ${propertyValue}`
+    );
+    return {
+      // Drop the '!' from the value.
+      value: propertyValue.substring(1),
+      source: "repository-property" /* RepositoryProperty */
+    };
+  }
+  if (input !== void 0) {
+    action.logger.info(`Using ${name} input from workflow: ${input}`);
+    return { value: input, source: "workflow" /* Workflow */ };
+  }
+  if (allowRepositoryProperty && propertyValue !== void 0) {
+    action.logger.info(
+      `Using ${name} input from repository property: ${propertyValue}`
+    );
+    return {
+      value: propertyValue,
+      source: "repository-property" /* RepositoryProperty */
+    };
+  }
+  return void 0;
+}
+
 // src/workflow.ts
-var fs26 = __toESM(require("fs"));
-var path22 = __toESM(require("path"));
-var import_zlib2 = __toESM(require("zlib"));
+var fs27 = __toESM(require("fs"));
+var path23 = __toESM(require("path"));
+var import_zlib3 = __toESM(require("zlib"));
 var core20 = __toESM(require_core());
 function toCodedErrors(errors) {
   return Object.entries(errors).reduce(
@@ -158779,7 +161293,7 @@ var WorkflowErrors = toCodedErrors({
   InconsistentActionVersion: `Not all workflow steps that use \`github/codeql-action\` actions use the same version. Please ensure that all such steps use the same version to avoid compatibility issues.`
 });
 async function groupLanguagesByExtractor(languages, codeql) {
-  const resolveResult = await codeql.betterResolveLanguages();
+  const resolveResult = await codeql.resolveLanguages();
   if (!resolveResult.aliases) {
     return void 0;
   }
@@ -158908,19 +161422,19 @@ async function getWorkflow(logger) {
       "Using the workflow specified by the CODE_SCANNING_WORKFLOW_FILE environment variable."
     );
     return load(
-      import_zlib2.default.gunzipSync(Buffer.from(maybeWorkflow, "base64")).toString()
+      import_zlib3.default.gunzipSync(Buffer.from(maybeWorkflow, "base64")).toString()
     );
   }
   const workflowPath = await getWorkflowAbsolutePath(logger);
-  return load(fs26.readFileSync(workflowPath, "utf-8"));
+  return load(fs27.readFileSync(workflowPath, "utf-8"));
 }
 async function getWorkflowAbsolutePath(logger) {
-  const relativePath = await getWorkflowRelativePath();
-  const absolutePath = path22.join(
+  const relativePath2 = await getWorkflowRelativePath();
+  const absolutePath = path23.join(
     getRequiredEnvParam("GITHUB_WORKSPACE"),
-    relativePath
+    relativePath2
   );
-  if (fs26.existsSync(absolutePath)) {
+  if (fs27.existsSync(absolutePath)) {
     logger.debug(
       `Derived the following absolute path for the currently executing workflow: ${absolutePath}.`
     );
@@ -159049,7 +161563,7 @@ async function sendStartingStatusReport(startedAt, config, logger) {
     await sendStatusReport(statusReportBase);
   }
 }
-async function sendCompletedStatusReport2(startedAt, config, configFile, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, overlayBaseDatabaseStats, dependencyCachingResults, logger, error3) {
+async function sendCompletedStatusReport2(startedAt, config, configFile, toolsInput, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, overlayBaseDatabaseStats, dependencyCachingResults, logger, error3) {
   const statusReportBase = await createStatusReportBase(
     "init" /* Init */,
     getActionsStatus(error3),
@@ -159066,11 +161580,14 @@ async function sendCompletedStatusReport2(startedAt, config, configFile, toolsDo
   const workflowLanguages = getOptionalInput("languages");
   const initStatusReport = {
     ...statusReportBase,
-    tools_input: getOptionalInput("tools") || "",
+    tools_input: toolsInput?.value || "",
     tools_resolved_version: toolsVersion,
     tools_source: toolsSource || "UNKNOWN" /* Unknown */,
     workflow_languages: workflowLanguages || ""
   };
+  if (toolsInput !== void 0) {
+    initStatusReport.computed_inputs.tools = toolsInput;
+  }
   const initToolsDownloadFields = {};
   if (toolsDownloadStatusReport?.downloadDurationMs !== void 0) {
     initToolsDownloadFields.tools_download_duration_ms = toolsDownloadStatusReport.downloadDurationMs;
@@ -159097,19 +161614,20 @@ async function sendCompletedStatusReport2(startedAt, config, configFile, toolsDo
     await sendStatusReport({ ...initStatusReport, ...initToolsDownloadFields });
   }
 }
-async function run3(startedAt) {
-  const logger = getActionsLogger();
+async function run3(actionState) {
+  const startedAt = actionState.startedAt;
+  const logger = actionState.logger;
   let apiDetails;
   let config;
   let configFile;
   let codeql;
   let features;
   let sourceRoot;
+  let toolsInput;
   let toolsDownloadStatusReport;
   let toolsFeatureFlagsValid;
   let toolsSource;
   let toolsVersion;
-  let zstdAvailability;
   try {
     initializeEnvironment(getActionVersion());
     persistInputs();
@@ -159133,12 +161651,9 @@ async function run3(startedAt) {
       repositoryNwo,
       logger
     );
-    const jobRunUuid = v4_default();
-    logger.info(`Job run UUID is ${jobRunUuid}.`);
-    core21.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid);
+    const repositoryProperties = repositoryPropertiesResult.orElse({});
     core21.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true");
-    configFile = getOptionalInput("config-file");
-    sourceRoot = path23.resolve(
+    sourceRoot = path24.resolve(
       getRequiredEnvParam("GITHUB_WORKSPACE"),
       getOptionalInput("source-root") || ""
     );
@@ -159150,12 +161665,22 @@ async function run3(startedAt) {
         `Failed to parse analysis kinds for 'starting' status report: ${getErrorMessage(err)}`
       );
     }
+    const actionStateWithFeatures = { ...actionState, features };
+    configFile = await getConfigFileInput(
+      actionStateWithFeatures,
+      repositoryProperties,
+      analysisKinds
+    );
     await sendStartingStatusReport(startedAt, { analysisKinds }, logger);
     if (process.env["CODEQL_ACTION_SETUP_CODEQL_HAS_RUN" /* SETUP_CODEQL_ACTION_HAS_RUN */] === "true") {
       throw new ConfigurationError(
         `The 'init' action should not be run in the same workflow as 'setup-codeql'.`
       );
     }
+    toolsInput = await getToolsInput(
+      actionStateWithFeatures,
+      repositoryProperties
+    );
     const codeQLDefaultVersionInfo = await features.getEnabledDefaultCliVersions(gitHubVersion.type);
     toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
     const rawLanguages = getRawLanguagesNoAutodetect(
@@ -159163,7 +161688,7 @@ async function run3(startedAt) {
     );
     const useOverlayAwareDefaultCliVersion = analysisKinds?.length === 1 && analysisKinds[0] === "code-scanning" /* CodeScanning */;
     const initCodeQLResult = await initCodeQL(
-      getOptionalInput("tools"),
+      toolsInput?.value,
       apiDetails,
       getTemporaryDirectory(),
       gitHubVersion.type,
@@ -159177,7 +161702,6 @@ async function run3(startedAt) {
     toolsDownloadStatusReport = initCodeQLResult.toolsDownloadStatusReport;
     toolsVersion = initCodeQLResult.toolsVersion;
     toolsSource = initCodeQLResult.toolsSource;
-    zstdAvailability = initCodeQLResult.zstdAvailability;
     await checkWorkflow(logger, codeql);
     if (
       // Only enable the experimental features env variable for Rust analysis if the user has explicitly
@@ -159199,14 +161723,13 @@ async function run3(startedAt) {
     }
     analysisKinds = await getAnalysisKinds(logger, features);
     const debugMode = getOptionalInput("debug") === "true" || core21.isDebug();
-    const repositoryProperties = repositoryPropertiesResult.orElse({});
     const fileCoverageResult = await getFileCoverageInformationEnabled(
       debugMode,
       codeql,
       features,
       repositoryProperties
     );
-    config = await initConfig2(features, {
+    config = await initConfig2(actionStateWithFeatures, {
       analysisKinds,
       languagesInput: getOptionalInput("languages"),
       queriesInput: getOptionalInput("queries"),
@@ -159309,19 +161832,6 @@ async function run3(startedAt) {
     if (config.overlayDatabaseMode !== "overlay" /* Overlay */) {
       cleanupDatabaseClusterDirectory(config, logger);
     }
-    if (zstdAvailability) {
-      await recordZstdAvailability(config, zstdAvailability);
-    }
-    if (toolsDownloadStatusReport) {
-      addNoLanguageDiagnostic(
-        config,
-        makeTelemetryDiagnostic(
-          "codeql-action/bundle-download-telemetry",
-          "CodeQL bundle download telemetry",
-          toolsDownloadStatusReport
-        )
-      );
-    }
     const goFlags = process.env["GOFLAGS"];
     if (goFlags) {
       core21.exportVariable("GOFLAGS", goFlags);
@@ -159338,21 +161848,21 @@ async function run3(startedAt) {
         )) {
           try {
             logger.debug(`Applying static binary workaround for Go`);
-            const tempBinPath = path23.resolve(
+            const tempBinPath = path24.resolve(
               getTemporaryDirectory(),
               "codeql-action-go-tracing",
               "bin"
             );
-            fs27.mkdirSync(tempBinPath, { recursive: true });
+            fs28.mkdirSync(tempBinPath, { recursive: true });
             core21.addPath(tempBinPath);
-            const goWrapperPath = path23.resolve(tempBinPath, "go");
-            fs27.writeFileSync(
+            const goWrapperPath = path24.resolve(tempBinPath, "go");
+            fs28.writeFileSync(
               goWrapperPath,
               `#!/bin/bash
 
 exec ${goBinaryPath} "$@"`
             );
-            fs27.chmodSync(goWrapperPath, "755");
+            fs28.chmodSync(goWrapperPath, "755");
             core21.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath);
           } catch (e) {
             logger.warning(
@@ -159450,8 +161960,7 @@ exec ${goBinaryPath} "$@"`
       config,
       sourceRoot,
       "Runner.Worker.exe",
-      qlconfigFile,
-      logger
+      qlconfigFile
     );
     if (config.overlayDatabaseMode !== "none" /* None */ && !await checkPacksForOverlayCompatibility(codeql, config, logger)) {
       logger.info(
@@ -159467,8 +161976,7 @@ exec ${goBinaryPath} "$@"`
         config,
         sourceRoot,
         "Runner.Worker.exe",
-        qlconfigFile,
-        logger
+        qlconfigFile
       );
     }
     const tracerConfig = await getCombinedTracerConfig(codeql, config);
@@ -159496,6 +162004,7 @@ exec ${goBinaryPath} "$@"`
       config,
       void 0,
       // We only report config info on success.
+      toolsInput,
       toolsDownloadStatusReport,
       toolsFeatureFlagsValid,
       toolsSource,
@@ -159513,6 +162022,7 @@ exec ${goBinaryPath} "$@"`
     startedAt,
     config,
     configFile,
+    toolsInput,
     toolsDownloadStatusReport,
     toolsFeatureFlagsValid,
     toolsSource,
@@ -159522,50 +162032,12 @@ exec ${goBinaryPath} "$@"`
     logger
   );
 }
-async function loadRepositoryProperties(repositoryNwo, logger) {
-  const repositoryOwnerType = github3.context.payload.repository?.owner.type;
-  logger.debug(
-    `Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
-  );
-  if (repositoryOwnerType === "User") {
-    logger.debug(
-      "Skipping loading repository properties because the repository is owned by a user and therefore cannot have repository properties."
-    );
-    return new Success({});
-  }
-  try {
-    return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
-  } catch (error3) {
-    logger.warning(
-      `Failed to load repository properties: ${getErrorMessage(error3)}`
-    );
-    return new Failure(error3);
-  }
-}
-async function recordZstdAvailability(config, zstdAvailability) {
-  addNoLanguageDiagnostic(
-    config,
-    makeTelemetryDiagnostic(
-      "codeql-action/zstd-availability",
-      "Zstandard availability",
-      zstdAvailability
-    )
-  );
-}
+var init = {
+  name: "init" /* Init */,
+  run: run3
+};
 async function runWrapper4() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run3(startedAt);
-  } catch (error3) {
-    core21.setFailed(`init action failed: ${getErrorMessage(error3)}`);
-    await sendUnhandledErrorStatusReport(
-      "init" /* Init */,
-      startedAt,
-      error3,
-      logger
-    );
-  }
+  await runInActions(init);
   await checkForTimeout();
 }
 
@@ -159573,8 +162045,8 @@ async function runWrapper4() {
 var core22 = __toESM(require_core());
 
 // src/init-action-post-helper.ts
-var fs28 = __toESM(require("fs"));
-var import_path5 = __toESM(require("path"));
+var fs29 = __toESM(require("fs"));
+var import_path7 = __toESM(require("path"));
 var github4 = __toESM(require_github());
 function createFailedUploadFailedSarifResult(error3) {
   const wrappedError = wrapError(error3);
@@ -159606,6 +162078,7 @@ async function prepareFailedSarif(logger, features, config) {
     const category = `/language:${language}`;
     const checkoutPath = ".";
     const result = await generateFailedSarif(
+      logger,
       features,
       config,
       category,
@@ -159626,6 +162099,7 @@ async function prepareFailedSarif(logger, features, config) {
     const category = getCategoryInputOrThrow(workflow, jobName, matrix);
     const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix);
     const result = await generateFailedSarif(
+      logger,
       features,
       config,
       category,
@@ -159634,9 +162108,9 @@ async function prepareFailedSarif(logger, features, config) {
     return new Success(result);
   }
 }
-async function generateFailedSarif(features, config, category, checkoutPath, sarifFile) {
+async function generateFailedSarif(logger, features, config, category, checkoutPath, sarifFile) {
   const databasePath = config.dbLocation;
-  const codeql = await getCodeQL(config.codeQLCmd);
+  const codeql = await getCodeQL(logger, config.codeQLCmd);
   if (sarifFile === void 0) {
     sarifFile = "../codeql-failed-run.sarif";
   }
@@ -159685,8 +162159,8 @@ async function maybeUploadFailedSarifArtifact(config, features, logger) {
   const name = sanitizeArtifactName(`sarif-artifact-${suffix}`);
   await client.uploadArtifact(
     name,
-    [import_path5.default.normalize(failedSarif.sarifFile)],
-    import_path5.default.normalize("..")
+    [import_path7.default.normalize(failedSarif.sarifFile)],
+    import_path7.default.normalize("..")
   );
   return { sarifID: name };
 }
@@ -159761,7 +162235,7 @@ async function uploadFailureInfo(uploadAllAvailableDebugArtifacts, printDebugLog
   }
   if (isSelfHostedRunner()) {
     try {
-      fs28.rmSync(config.dbLocation, {
+      fs29.rmSync(config.dbLocation, {
         recursive: true,
         force: true,
         maxRetries: 3
@@ -159902,7 +162376,7 @@ async function run4(startedAt) {
         "Debugging artifacts are unavailable since the 'init' Action failed before it could produce any."
       );
     } else {
-      const codeql = await getCodeQL(config.codeQLCmd);
+      const codeql = await getCodeQL(logger, config.codeQLCmd);
       uploadFailedSarifResult = await uploadFailureInfo(
         tryUploadAllAvailableDebugArtifacts,
         printDebugLogs,
@@ -160005,7 +162479,7 @@ var core23 = __toESM(require_core());
 // src/resolve-environment.ts
 async function runResolveBuildEnvironment(cmd, logger, workingDir, language) {
   logger.startGroup(`Attempting to resolve build environment for ${language}`);
-  const codeql = await getCodeQL(cmd);
+  const codeql = await getCodeQL(logger, cmd);
   if (workingDir !== void 0) {
     logger.info(`Using ${workingDir} as the working directory.`);
   }
@@ -160110,7 +162584,7 @@ async function runWrapper6() {
 
 // src/setup-codeql-action.ts
 var core24 = __toESM(require_core());
-async function sendCompletedStatusReport3(startedAt, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error3) {
+async function sendCompletedStatusReport3(startedAt, toolsInput, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error3) {
   const statusReportBase = await createStatusReportBase(
     "setup-codeql" /* SetupCodeQL */,
     getActionsStatus(error3),
@@ -160126,11 +162600,14 @@ async function sendCompletedStatusReport3(startedAt, toolsDownloadStatusReport,
   }
   const initStatusReport = {
     ...statusReportBase,
-    tools_input: getOptionalInput("tools") || "",
+    tools_input: toolsInput?.value || "",
     tools_resolved_version: toolsVersion,
     tools_source: toolsSource || "UNKNOWN" /* Unknown */,
     workflow_languages: ""
   };
+  if (toolsInput !== void 0) {
+    initStatusReport.computed_inputs.tools = toolsInput;
+  }
   const initToolsDownloadFields = {};
   if (toolsDownloadStatusReport?.downloadDurationMs !== void 0) {
     initToolsDownloadFields.tools_download_duration_ms = toolsDownloadStatusReport.downloadDurationMs;
@@ -160140,9 +162617,10 @@ async function sendCompletedStatusReport3(startedAt, toolsDownloadStatusReport,
   }
   await sendStatusReport({ ...initStatusReport, ...initToolsDownloadFields });
 }
-async function run6(startedAt) {
-  const logger = getActionsLogger();
+async function run6(actionState) {
+  const { logger, startedAt } = actionState;
   let codeql;
+  let toolsInput;
   let toolsDownloadStatusReport;
   let toolsFeatureFlagsValid;
   let toolsSource;
@@ -160165,9 +162643,12 @@ async function run6(startedAt) {
       getTemporaryDirectory(),
       logger
     );
-    const jobRunUuid = v4_default();
-    logger.info(`Job run UUID is ${jobRunUuid}.`);
-    core24.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid);
+    const repositoryPropertiesResult = await loadRepositoryProperties(
+      repositoryNwo,
+      logger
+    );
+    const repositoryProperties = repositoryPropertiesResult.orElse({});
+    const actionStateWithFeatures = { ...actionState, features };
     const statusReportBase = await createStatusReportBase(
       "setup-codeql" /* SetupCodeQL */,
       "starting",
@@ -160179,6 +162660,10 @@ async function run6(startedAt) {
     if (statusReportBase !== void 0) {
       await sendStatusReport(statusReportBase);
     }
+    toolsInput = await getToolsInput(
+      actionStateWithFeatures,
+      repositoryProperties
+    );
     const codeQLDefaultVersionInfo = await features.getEnabledDefaultCliVersions(gitHubVersion.type);
     toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
     const rawLanguages = getRawLanguagesNoAutodetect(
@@ -160186,7 +162671,7 @@ async function run6(startedAt) {
     );
     const analysisKinds = await getAnalysisKinds(logger, features);
     const initCodeQLResult = await initCodeQL(
-      getOptionalInput("tools"),
+      toolsInput?.value,
       apiDetails,
       getTemporaryDirectory(),
       gitHubVersion.type,
@@ -160223,6 +162708,7 @@ async function run6(startedAt) {
   }
   await sendCompletedStatusReport3(
     startedAt,
+    toolsInput,
     toolsDownloadStatusReport,
     toolsFeatureFlagsValid,
     toolsSource,
@@ -160230,174 +162716,30 @@ async function run6(startedAt) {
     logger
   );
 }
+var setupCodeQL2 = {
+  name: "setup-codeql" /* SetupCodeQL */,
+  run: run6
+};
 async function runWrapper7() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run6(startedAt);
-  } catch (error3) {
-    core24.setFailed(`setup-codeql action failed: ${getErrorMessage(error3)}`);
-    await sendUnhandledErrorStatusReport(
-      "setup-codeql" /* SetupCodeQL */,
-      startedAt,
-      error3,
-      logger
-    );
-  }
+  await runInActions(setupCodeQL2);
   await checkForTimeout();
 }
 
 // src/start-proxy-action.ts
 var import_child_process2 = require("child_process");
-var path27 = __toESM(require("path"));
+var path28 = __toESM(require("path"));
 var core27 = __toESM(require_core());
 
 // src/start-proxy.ts
-var path25 = __toESM(require("path"));
+var path26 = __toESM(require("path"));
 var core26 = __toESM(require_core());
 var toolcache4 = __toESM(require_tool_cache());
 
-// src/start-proxy/types.ts
-var usernameSchema = {
-  /** The username needed to authenticate to the package registry, if any. */
-  username: optional(string)
-};
-function hasUsername(config) {
-  return "username" in config;
-}
-var usernamePasswordSchema = {
-  /** The password needed to authenticate to the package registry, if any. */
-  password: optional(string),
-  ...usernameSchema
-};
-function hasUsernameAndPassword(config) {
-  return hasUsername(config) && "password" in config;
-}
-var tokenSchema = {
-  /** The token needed to authenticate to the package registry, if any. */
-  token: optional(string),
-  ...usernameSchema
-};
-function hasToken(config) {
-  return "token" in config;
-}
-function isToken(config) {
-  return "token" in config && validateSchema(tokenSchema, config);
-}
-var azureConfigSchema = {
-  "tenant-id": string,
-  "client-id": string
-};
-function isAzureConfig(config) {
-  return validateSchema(azureConfigSchema, config);
-}
-var awsConfigSchema = {
-  "aws-region": string,
-  "account-id": string,
-  "role-name": string,
-  domain: string,
-  "domain-owner": string,
-  audience: optional(string)
-};
-function isAWSConfig(config) {
-  return validateSchema(awsConfigSchema, config);
-}
-var jfrogConfigSchema = {
-  "jfrog-oidc-provider-name": string,
-  audience: optional(string),
-  "identity-mapping-name": optional(string)
-};
-function isJFrogConfig(config) {
-  return validateSchema(jfrogConfigSchema, config);
-}
-var cloudsmithConfigSchema = {
-  namespace: string,
-  "service-slug": string,
-  "api-host": string
-};
-function isCloudsmithConfig(config) {
-  return validateSchema(cloudsmithConfigSchema, config);
-}
-var gcpConfigSchema = {
-  "workload-identity-provider": string,
-  "service-account": optional(string),
-  audience: optional(string)
-};
-function isGCPConfig(config) {
-  return validateSchema(gcpConfigSchema, config);
-}
-var oidcSchemas = [
-  { schema: azureConfigSchema, name: "Azure" },
-  { schema: awsConfigSchema, name: "AWS" },
-  { schema: jfrogConfigSchema, name: "JFrog" },
-  { schema: cloudsmithConfigSchema, name: "Cloudsmith" },
-  { schema: gcpConfigSchema, name: "GCP" }
-];
-function credentialToStr(credential) {
-  let result = `Type: ${credential.type};`;
-  const appendIfDefined = (name, val) => {
-    if (isDefined2(val)) {
-      result += ` ${name}: ${val};`;
-    }
-  };
-  appendIfDefined("Url", credential.url);
-  appendIfDefined("Host", credential.host);
-  if (hasUsername(credential)) {
-    appendIfDefined("Username", credential.username);
-  }
-  if ("password" in credential) {
-    appendIfDefined(
-      "Password",
-      isDefined2(credential.password) ? "***" : void 0
-    );
-  }
-  if (hasToken(credential)) {
-    appendIfDefined("Token", isDefined2(credential.token) ? "***" : void 0);
-  }
-  if (isAzureConfig(credential)) {
-    appendIfDefined("Tenant", credential["tenant-id"]);
-    appendIfDefined("Client", credential["client-id"]);
-  } else if (isAWSConfig(credential)) {
-    appendIfDefined("AWS Region", credential["aws-region"]);
-    appendIfDefined("AWS Account", credential["account-id"]);
-    appendIfDefined("AWS Role", credential["role-name"]);
-    appendIfDefined("AWS Domain", credential.domain);
-    appendIfDefined("AWS Domain Owner", credential["domain-owner"]);
-    appendIfDefined("AWS Audience", credential.audience);
-  } else if (isJFrogConfig(credential)) {
-    appendIfDefined("JFrog Provider", credential["jfrog-oidc-provider-name"]);
-    appendIfDefined(
-      "JFrog Identity Mapping",
-      credential["identity-mapping-name"]
-    );
-    appendIfDefined("JFrog Audience", credential.audience);
-  } else if (isCloudsmithConfig(credential)) {
-    appendIfDefined("Cloudsmith Namespace", credential.namespace);
-    appendIfDefined("Cloudsmith Service Slug", credential["service-slug"]);
-    appendIfDefined("Cloudsmith API Host", credential["api-host"]);
-  } else if (isGCPConfig(credential)) {
-    appendIfDefined(
-      "GCP Workload Identity Provider",
-      credential["workload-identity-provider"]
-    );
-    appendIfDefined("GCP Service Account", credential["service-account"]);
-    appendIfDefined("GCP Audience", credential.audience);
-  }
-  return result;
-}
-function getAddressString(address) {
-  if (address.url === void 0) {
-    return address.host;
-  } else {
-    return address.url;
-  }
-}
-
 // src/start-proxy/validation.ts
 var core25 = __toESM(require_core());
-function cloneCredential(schema2, obj) {
+function cloneCredential(schema, obj) {
   const result = {};
-  for (const key of Object.keys(schema2)) {
+  for (const key of Object.keys(schema)) {
     if (!isDefined2(obj[key])) {
       continue;
     }
@@ -160502,16 +162844,11 @@ function isPAT(value) {
     GITHUB_PAT_FINE_GRAINED_PATTERN
   ]);
 }
+var ALWAYS_ENABLED_REGISTRY_TYPE = [
+  "git_source",
+  "docker_registry"
+];
 var LANGUAGE_TO_REGISTRY_TYPE = {
-  java: ["maven_repository"],
-  csharp: ["nuget_feed"],
-  javascript: ["npm_registry"],
-  python: ["python_index"],
-  ruby: ["rubygems_server"],
-  rust: ["cargo_registry"],
-  go: ["goproxy_server", "git_source"]
-};
-var NEW_LANGUAGE_TO_REGISTRY_TYPE = {
   actions: [],
   cpp: [],
   java: ["maven_repository"],
@@ -160540,9 +162877,8 @@ function getRegistryAddress(registry) {
     );
   }
 }
-function getCredentials(logger, registrySecrets, registriesCredentials, language, skipUnusedRegistries = false) {
-  const registryMapping = skipUnusedRegistries ? NEW_LANGUAGE_TO_REGISTRY_TYPE : LANGUAGE_TO_REGISTRY_TYPE;
-  const registryTypeForLanguage = language ? registryMapping[language] : void 0;
+function getCredentials(logger, registrySecrets, registriesCredentials, language) {
+  const registryTypeForLanguage = language ? LANGUAGE_TO_REGISTRY_TYPE[language] : void 0;
   let credentialsStr;
   if (registriesCredentials !== void 0) {
     logger.info(`Using registries_credentials input.`);
@@ -160568,7 +162904,7 @@ function getCredentials(logger, registrySecrets, registriesCredentials, language
   }
   const out = [];
   for (const e of parsed) {
-    if (e === null || !isObject2(e)) {
+    if (e === null || !isObject(e)) {
       throw new ConfigurationError("Invalid credentials - must be an object");
     }
     if (!isDefined2(e.type) || !isString(e.type)) {
@@ -160576,11 +162912,11 @@ function getCredentials(logger, registrySecrets, registriesCredentials, language
     }
     const authConfig = getAuthConfig(e);
     const address = getRegistryAddress(e);
-    if (registryTypeForLanguage && !registryTypeForLanguage.some((t) => t === e.type)) {
+    if (!ALWAYS_ENABLED_REGISTRY_TYPE.some((t) => t === e.type) && registryTypeForLanguage && !registryTypeForLanguage.some((t) => t === e.type)) {
       continue;
     }
-    const isPrintable2 = (str2) => {
-      return str2 ? /^[\x20-\x7E]*$/.test(str2) : true;
+    const isPrintable2 = (str) => {
+      return str ? /^[\x20-\x7E]*$/.test(str) : true;
     };
     for (const key of Object.keys(e)) {
       const val = e[key];
@@ -160733,7 +163069,7 @@ async function getProxyBinaryPath(logger, features) {
       proxyInfo.version
     );
   }
-  return path25.join(proxyBin, proxyFileName);
+  return path26.join(proxyBin, proxyFileName);
 }
 
 // src/start-proxy/ca.ts
@@ -160798,8 +163134,8 @@ function generateCertificateAuthority() {
 }
 
 // src/start-proxy/environment.ts
-var fs29 = __toESM(require("fs"));
-var path26 = __toESM(require("path"));
+var fs30 = __toESM(require("fs"));
+var path27 = __toESM(require("path"));
 var toolrunner5 = __toESM(require_toolrunner());
 var io8 = __toESM(require_io());
 function checkEnvVar(logger, name) {
@@ -160864,16 +163200,16 @@ function discoverActionsJdks() {
 function checkJdkSettings(logger, jdkHome) {
   const filesToCheck = [
     // JDK 9+
-    path26.join("conf", "net.properties"),
+    path27.join("conf", "net.properties"),
     // JDK 8 and below
-    path26.join("lib", "net.properties")
+    path27.join("lib", "net.properties")
   ];
   for (const fileToCheck of filesToCheck) {
-    const file = path26.join(jdkHome, fileToCheck);
+    const file = path27.join(jdkHome, fileToCheck);
     try {
-      if (fs29.existsSync(file)) {
+      if (fs30.existsSync(file)) {
         logger.debug(`Found '${file}'.`);
-        const lines = String(fs29.readFileSync(file)).split("\n");
+        const lines = String(fs30.readFileSync(file)).split("\n");
         for (const line of lines) {
           for (const property of javaProperties) {
             if (line.startsWith(`${property}=`)) {
@@ -160941,7 +163277,7 @@ async function checkProxyEnvironment(logger, language) {
 
 // src/start-proxy/reachability.ts
 var https2 = __toESM(require("https"));
-var import_https_proxy_agent = __toESM(require_dist2());
+var import_https_proxy_agent = __toESM(require_dist3());
 var connectionTestConfig = {
   nuget_feed: { path: "v3/index.json" }
 };
@@ -160969,7 +163305,7 @@ var NetworkReachabilityBackend = class {
   proxy;
   agent;
   async checkConnection(url2) {
-    return new Promise((resolve13, reject) => {
+    return new Promise((resolve14, reject) => {
       const req = https2.request(
         url2,
         {
@@ -160982,7 +163318,7 @@ var NetworkReachabilityBackend = class {
         (res) => {
           res.destroy();
           if (res.statusCode !== void 0 && res.statusCode < 400) {
-            resolve13(res.statusCode);
+            resolve14(res.statusCode);
           } else {
             reject(new ReachabilityError(res.statusCode));
           }
@@ -161047,14 +163383,15 @@ async function checkConnections(logger, proxy, backend) {
 }
 
 // src/start-proxy-action.ts
-async function run7(startedAt) {
-  const logger = getActionsLogger();
+async function run7(action) {
+  const startedAt = action.startedAt;
+  const logger = action.logger;
   let features;
   let language;
   try {
     persistInputs();
     const tempDir = getTemporaryDirectory();
-    const proxyLogFilePath = path27.resolve(tempDir, "proxy.log");
+    const proxyLogFilePath = path28.resolve(tempDir, "proxy.log");
     core27.saveState("proxy-log-file", proxyLogFilePath);
     const repositoryNwo = getRepositoryNwo();
     const gitHubVersion = await getGitHubVersion();
@@ -161066,15 +163403,11 @@ async function run7(startedAt) {
     );
     const languageInput = getOptionalInput("language");
     language = languageInput ? parseBuiltInLanguage(languageInput) : void 0;
-    const skipUnusedRegistries = await features.getValue(
-      "start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */
-    );
     const credentials = getCredentials(
       logger,
       getOptionalInput("registry_secrets"),
       getOptionalInput("registries_credentials"),
-      language,
-      skipUnusedRegistries
+      language
     );
     if (credentials.length === 0) {
       logger.info("No credentials found, skipping proxy setup.");
@@ -161118,20 +163451,13 @@ async function run7(startedAt) {
     await sendFailedStatusReport(logger, startedAt, language, unwrappedError);
   }
 }
+var startProxyAction = {
+  name: "start-proxy" /* StartProxy */,
+  run: run7,
+  transformTelemetryError: getSafeErrorMessage
+};
 async function runWrapper8() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run7(startedAt);
-  } catch (error3) {
-    core27.setFailed(`start-proxy action failed: ${getErrorMessage(error3)}`);
-    await sendUnhandledErrorStatusReport(
-      "start-proxy" /* StartProxy */,
-      startedAt,
-      getSafeErrorMessage(wrapError(error3)),
-      logger
-    );
-  }
+  await runInActions(startProxyAction);
 }
 async function startProxy(binPath, config, logFilePath, logger) {
   const host = "127.0.0.1";
@@ -161242,8 +163568,7 @@ async function sendSuccessStatusReport2(startedAt, uploadStats, logger) {
     await sendStatusReport(statusReport);
   }
 }
-async function run8(startedAt) {
-  const logger = getActionsLogger();
+async function run8({ startedAt, logger }) {
   try {
     initializeEnvironment(getActionVersion());
     const gitHubVersion = await getGitHubVersion();
@@ -161326,22 +163651,12 @@ async function run8(startedAt) {
     return;
   }
 }
+var uploadSarif = {
+  name: "upload-sarif" /* UploadSarif */,
+  run: run8
+};
 async function runWrapper10() {
-  const startedAt = /* @__PURE__ */ new Date();
-  const logger = getActionsLogger();
-  try {
-    await run8(startedAt);
-  } catch (error3) {
-    core29.setFailed(
-      `codeql/upload-sarif action failed: ${getErrorMessage(error3)}`
-    );
-    await sendUnhandledErrorStatusReport(
-      "upload-sarif" /* UploadSarif */,
-      startedAt,
-      error3,
-      logger
-    );
-  }
+  await runInActions(uploadSarif);
 }
 
 // src/upload-sarif-action-post.ts
@@ -161434,6 +163749,13 @@ undici/lib/web/fetch/body.js:
 undici/lib/web/websocket/frame.js:
   (*! ws. MIT License. Einar Otto Stangvik  *)
 
+content-type/dist/index.js:
+  (*!
+   * content-type
+   * Copyright(c) 2015 Douglas Christopher Wilson
+   * MIT Licensed
+   *)
+
 @octokit/request-error/dist-src/index.js:
   (* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
 
@@ -161441,6 +163763,9 @@ undici/lib/web/websocket/frame.js:
   (* v8 ignore next -- @preserve *)
   (* v8 ignore else -- @preserve *)
 
+@octokit/graphql/dist-bundle/index.js:
+  (* v8 ignore if -- @preserve *)
+
 normalize-path/index.js:
   (*!
    * normalize-path 
@@ -161449,6 +163774,9 @@ normalize-path/index.js:
    * Released under the MIT License.
    *)
 
+safe-buffer/index.js:
+  (*! safe-buffer. MIT License. Feross Aboukhadijeh  *)
+
 archiver/lib/error.js:
 archiver/lib/core.js:
   (**
@@ -161462,6 +163790,7 @@ archiver/lib/core.js:
 crc-32/crc32.js:
   (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
 
+zip-stream/index.js:
 zip-stream/index.js:
   (**
    * ZipStream
@@ -161471,6 +163800,7 @@ zip-stream/index.js:
    * @copyright (c) 2014 Chris Talkington, contributors.
    *)
 
+archiver/lib/plugins/zip.js:
 archiver/lib/plugins/zip.js:
   (**
    * ZIP Format Plugin
@@ -161480,6 +163810,7 @@ archiver/lib/plugins/zip.js:
    * @copyright (c) 2012-2014 Chris Talkington, contributors.
    *)
 
+archiver/lib/plugins/tar.js:
 archiver/lib/plugins/tar.js:
   (**
    * TAR Format Plugin
@@ -161489,6 +163820,7 @@ archiver/lib/plugins/tar.js:
    * @copyright (c) 2012-2014 Chris Talkington, contributors.
    *)
 
+archiver/lib/plugins/json.js:
 archiver/lib/plugins/json.js:
   (**
    * JSON Format Plugin
@@ -161517,7 +163849,7 @@ tmp/lib/tmp.js:
    *)
 
 js-yaml/dist/js-yaml.mjs:
-  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
+  (*! js-yaml 5.2.3 https://github.com/nodeca/js-yaml @license MIT *)
 
 long/index.js:
   (**
diff --git a/package-lock.json b/package-lock.json
index 18253b6b9d..50ebd990cd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "codeql",
-  "version": "4.36.2",
+  "version": "4.37.7",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "codeql",
-      "version": "4.36.2",
+      "version": "4.37.7",
       "license": "MIT",
       "workspaces": [
         "pr-checks"
@@ -14,7 +14,7 @@
       "dependencies": {
         "@actions/artifact": "^5.0.3",
         "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
-        "@actions/cache": "^5.0.5",
+        "@actions/cache": "^5.2.0",
         "@actions/core": "^2.0.3",
         "@actions/exec": "^2.0.0",
         "@actions/github": "^8.0.1",
@@ -22,46 +22,50 @@
         "@actions/http-client": "^3.0.0",
         "@actions/io": "^2.0.0",
         "@actions/tool-cache": "^3.0.1",
-        "@octokit/plugin-retry": "^8.1.0",
-        "archiver": "^7.0.1",
+        "@octokit/core": "^7.0.7",
+        "@octokit/plugin-paginate-rest": "^14.0.0",
+        "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
+        "@octokit/plugin-retry": "^8.1.1",
+        "archiver": "^8.0.0",
         "fast-deep-equal": "^3.1.3",
         "follow-redirects": "^1.16.0",
         "get-folder-size": "^5.0.0",
         "https-proxy-agent": "^7.0.6",
-        "js-yaml": "^4.1.1",
+        "js-yaml": "^5.2.3",
         "jsonschema": "1.5.0",
         "long": "^5.3.2",
         "node-forge": "^1.4.0",
-        "semver": "^7.8.1",
-        "uuid": "^14.0.0"
+        "semver": "^7.8.5",
+        "undici": "^6.28.0",
+        "uuid": "^14.0.1"
       },
       "devDependencies": {
         "@ava/typescript": "6.0.0",
         "@eslint/compat": "^2.1.0",
         "@microsoft/eslint-formatter-sarif": "^3.1.0",
         "@octokit/types": "^16.0.0",
-        "@types/archiver": "^7.0.0",
+        "@types/archiver": "^8.0.0",
         "@types/follow-redirects": "^1.14.4",
         "@types/js-yaml": "^4.0.9",
-        "@types/node": "^20.19.41",
+        "@types/node": "^20.19.43",
         "@types/node-forge": "^1.3.14",
         "@types/sarif": "^2.1.7",
-        "@types/semver": "^7.7.1",
-        "@types/sinon": "^21.0.1",
+        "@types/semver": "^7.8.0",
+        "@types/sinon": "^22.0.0",
         "ava": "^6.4.1",
-        "esbuild": "^0.28.0",
-        "eslint": "^9.39.4",
-        "eslint-import-resolver-typescript": "^4.4.4",
-        "eslint-plugin-github": "^6.0.0",
-        "eslint-plugin-import-x": "^4.16.2",
+        "esbuild": "^0.28.1",
+        "eslint": "^9.39.5",
+        "eslint-import-resolver-typescript": "^4.4.5",
+        "eslint-plugin-github": "^6.1.2",
+        "eslint-plugin-import-x": "^4.17.1",
         "eslint-plugin-jsdoc": "^62.9.0",
         "eslint-plugin-no-async-foreach": "^0.1.1",
-        "glob": "^11.1.0",
-        "globals": "^17.6.0",
-        "nock": "^14.0.15",
-        "sinon": "^22.0.0",
+        "glob": "^13.0.6",
+        "globals": "^17.9.0",
+        "nock": "^14.0.17",
+        "sinon": "^22.1.0",
         "typescript": "^6.0.3",
-        "typescript-eslint": "^8.60.0"
+        "typescript-eslint": "^8.66.0"
       }
     },
     "node_modules/@aashutoshrathi/word-wrap": {
@@ -345,16 +349,119 @@
       "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
       "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg=="
     },
+    "node_modules/@actions/artifact/node_modules/archiver": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",
+      "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==",
+      "license": "MIT",
+      "dependencies": {
+        "archiver-utils": "^5.0.2",
+        "async": "^3.2.4",
+        "buffer-crc32": "^1.0.0",
+        "readable-stream": "^4.0.0",
+        "readdir-glob": "^1.1.2",
+        "tar-stream": "^3.0.0",
+        "zip-stream": "^6.0.1"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
     "node_modules/@actions/artifact/node_modules/before-after-hook": {
       "version": "2.2.3",
       "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
       "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
       "license": "Apache-2.0"
     },
+    "node_modules/@actions/artifact/node_modules/brace-expansion": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz",
+      "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==",
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/compress-commons": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz",
+      "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==",
+      "license": "MIT",
+      "dependencies": {
+        "crc-32": "^1.2.0",
+        "crc32-stream": "^6.0.0",
+        "is-stream": "^2.0.1",
+        "normalize-path": "^3.0.0",
+        "readable-stream": "^4.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/crc32-stream": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",
+      "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==",
+      "license": "MIT",
+      "dependencies": {
+        "crc-32": "^1.2.0",
+        "readable-stream": "^4.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/is-stream": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+      "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/minimatch": {
+      "version": "5.1.9",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
+      "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/readdir-glob": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",
+      "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "minimatch": "^5.1.0"
+      }
+    },
+    "node_modules/@actions/artifact/node_modules/zip-stream": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz",
+      "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==",
+      "license": "MIT",
+      "dependencies": {
+        "archiver-utils": "^5.0.0",
+        "compress-commons": "^6.0.2",
+        "readable-stream": "^4.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
     "node_modules/@actions/cache": {
-      "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-5.0.5.tgz",
-      "integrity": "sha512-jiQSg0gfd+C2KPgcmdCOq7dCuCIQQWQ4b1YfGIRaaA9w7PJbRwTOcCz4LiFEUnqZGf0ha/8OKL3BeNwetHzYsQ==",
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-5.2.0.tgz",
+      "integrity": "sha512-1R1Oc8cuDNCygsIP7gLiKLGCymOw/k5FkGQkXZFcLz6/RWyMImkfP0dZX6kjA9SRAmANcKNocI2XrsIaZ1it8w==",
       "license": "MIT",
       "dependencies": {
         "@actions/core": "^2.0.0",
@@ -845,9 +952,9 @@
       }
     },
     "node_modules/@esbuild/aix-ppc64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz",
-      "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
+      "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
       "cpu": [
         "ppc64"
       ],
@@ -862,9 +969,9 @@
       }
     },
     "node_modules/@esbuild/android-arm": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz",
-      "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
+      "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
       "cpu": [
         "arm"
       ],
@@ -879,9 +986,9 @@
       }
     },
     "node_modules/@esbuild/android-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz",
-      "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
+      "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
       "cpu": [
         "arm64"
       ],
@@ -896,9 +1003,9 @@
       }
     },
     "node_modules/@esbuild/android-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz",
-      "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
+      "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
       "cpu": [
         "x64"
       ],
@@ -913,9 +1020,9 @@
       }
     },
     "node_modules/@esbuild/darwin-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz",
-      "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
+      "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
       "cpu": [
         "arm64"
       ],
@@ -930,9 +1037,9 @@
       }
     },
     "node_modules/@esbuild/darwin-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz",
-      "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
+      "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
       "cpu": [
         "x64"
       ],
@@ -947,9 +1054,9 @@
       }
     },
     "node_modules/@esbuild/freebsd-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz",
-      "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
       "cpu": [
         "arm64"
       ],
@@ -964,9 +1071,9 @@
       }
     },
     "node_modules/@esbuild/freebsd-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz",
-      "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
+      "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
       "cpu": [
         "x64"
       ],
@@ -981,9 +1088,9 @@
       }
     },
     "node_modules/@esbuild/linux-arm": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz",
-      "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
+      "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
       "cpu": [
         "arm"
       ],
@@ -998,9 +1105,9 @@
       }
     },
     "node_modules/@esbuild/linux-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz",
-      "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
+      "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
       "cpu": [
         "arm64"
       ],
@@ -1015,9 +1122,9 @@
       }
     },
     "node_modules/@esbuild/linux-ia32": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz",
-      "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
+      "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
       "cpu": [
         "ia32"
       ],
@@ -1032,9 +1139,9 @@
       }
     },
     "node_modules/@esbuild/linux-loong64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz",
-      "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
+      "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
       "cpu": [
         "loong64"
       ],
@@ -1049,9 +1156,9 @@
       }
     },
     "node_modules/@esbuild/linux-mips64el": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz",
-      "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
+      "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
       "cpu": [
         "mips64el"
       ],
@@ -1066,9 +1173,9 @@
       }
     },
     "node_modules/@esbuild/linux-ppc64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz",
-      "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
+      "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
       "cpu": [
         "ppc64"
       ],
@@ -1083,9 +1190,9 @@
       }
     },
     "node_modules/@esbuild/linux-riscv64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz",
-      "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
+      "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
       "cpu": [
         "riscv64"
       ],
@@ -1100,9 +1207,9 @@
       }
     },
     "node_modules/@esbuild/linux-s390x": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz",
-      "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
+      "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
       "cpu": [
         "s390x"
       ],
@@ -1117,9 +1224,9 @@
       }
     },
     "node_modules/@esbuild/linux-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz",
-      "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
+      "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
       "cpu": [
         "x64"
       ],
@@ -1134,9 +1241,9 @@
       }
     },
     "node_modules/@esbuild/netbsd-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz",
-      "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
       "cpu": [
         "arm64"
       ],
@@ -1151,9 +1258,9 @@
       }
     },
     "node_modules/@esbuild/netbsd-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz",
-      "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
+      "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
       "cpu": [
         "x64"
       ],
@@ -1168,9 +1275,9 @@
       }
     },
     "node_modules/@esbuild/openbsd-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz",
-      "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
       "cpu": [
         "arm64"
       ],
@@ -1185,9 +1292,9 @@
       }
     },
     "node_modules/@esbuild/openbsd-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz",
-      "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
+      "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
       "cpu": [
         "x64"
       ],
@@ -1202,9 +1309,9 @@
       }
     },
     "node_modules/@esbuild/openharmony-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz",
-      "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
+      "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
       "cpu": [
         "arm64"
       ],
@@ -1219,9 +1326,9 @@
       }
     },
     "node_modules/@esbuild/sunos-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz",
-      "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
+      "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
       "cpu": [
         "x64"
       ],
@@ -1236,9 +1343,9 @@
       }
     },
     "node_modules/@esbuild/win32-arm64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz",
-      "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
+      "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
       "cpu": [
         "arm64"
       ],
@@ -1253,9 +1360,9 @@
       }
     },
     "node_modules/@esbuild/win32-ia32": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz",
-      "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
+      "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
       "cpu": [
         "ia32"
       ],
@@ -1270,9 +1377,9 @@
       }
     },
     "node_modules/@esbuild/win32-x64": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz",
-      "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
+      "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
       "cpu": [
         "x64"
       ],
@@ -1391,9 +1498,9 @@
       }
     },
     "node_modules/@eslint/eslintrc": {
-      "version": "3.3.5",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz",
-      "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==",
+      "version": "3.3.6",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.6.tgz",
+      "integrity": "sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -1403,7 +1510,7 @@
         "globals": "^14.0.0",
         "ignore": "^5.2.0",
         "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.1",
+        "js-yaml": "^4.3.0",
         "minimatch": "^3.1.5",
         "strip-json-comments": "^3.1.1"
       },
@@ -1419,6 +1526,7 @@
       "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
       "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=18"
       },
@@ -1426,10 +1534,33 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+      "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/puzrin"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/nodeca"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "argparse": "^2.0.1"
+      },
+      "bin": {
+        "js-yaml": "bin/js-yaml.js"
+      }
+    },
     "node_modules/@eslint/js": {
-      "version": "9.39.4",
-      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
-      "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
+      "version": "9.39.5",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz",
+      "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -1555,90 +1686,6 @@
         "url": "https://github.com/sponsors/nzakas"
       }
     },
-    "node_modules/@isaacs/cliui": {
-      "version": "8.0.2",
-      "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
-      "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
-      "license": "ISC",
-      "dependencies": {
-        "string-width": "^5.1.2",
-        "string-width-cjs": "npm:string-width@^4.2.0",
-        "strip-ansi": "^7.0.1",
-        "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
-        "wrap-ansi": "^8.1.0",
-        "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
-      "version": "6.2.0",
-      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz",
-      "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-regex?sponsor=1"
-      }
-    },
-    "node_modules/@isaacs/cliui/node_modules/emoji-regex": {
-      "version": "9.2.2",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-      "license": "MIT"
-    },
-    "node_modules/@isaacs/cliui/node_modules/string-width": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-      "license": "MIT",
-      "dependencies": {
-        "eastasianwidth": "^0.2.0",
-        "emoji-regex": "^9.2.2",
-        "strip-ansi": "^7.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/@isaacs/cliui/node_modules/strip-ansi": {
-      "version": "7.1.0",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
-      "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/strip-ansi?sponsor=1"
-      }
-    },
-    "node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
-      "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^6.1.0",
-        "string-width": "^5.0.1",
-        "strip-ansi": "^7.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
-      }
-    },
     "node_modules/@isaacs/fs-minipass": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
@@ -1932,6 +1979,29 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/@microsoft/eslint-formatter-sarif/node_modules/js-yaml": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
+      "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/puzrin"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/nodeca"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "argparse": "^2.0.1"
+      },
+      "bin": {
+        "js-yaml": "bin/js-yaml.js"
+      }
+    },
     "node_modules/@mswjs/interceptors": {
       "version": "0.41.3",
       "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.3.tgz",
@@ -2017,16 +2087,16 @@
       }
     },
     "node_modules/@octokit/core": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
-      "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
+      "version": "7.0.7",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.7.tgz",
+      "integrity": "sha512-DcB0M3KFgr9ECI328lhBMVsyFT2DnmNucSBTqEN3exyNKUzkkpUSCHmTRcunF41Eou2TIQKW4seewri8ON9bSA==",
       "license": "MIT",
       "dependencies": {
         "@octokit/auth-token": "^6.0.0",
-        "@octokit/graphql": "^9.0.3",
-        "@octokit/request": "^10.0.6",
-        "@octokit/request-error": "^7.0.2",
-        "@octokit/types": "^16.0.0",
+        "@octokit/graphql": "^9.0.4",
+        "@octokit/request": "^10.0.13",
+        "@octokit/request-error": "^7.1.1",
+        "@octokit/types": "^17.0.0",
         "before-after-hook": "^4.0.0",
         "universal-user-agent": "^7.0.0"
       },
@@ -2034,6 +2104,21 @@
         "node": ">= 20"
       }
     },
+    "node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/core/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
     "node_modules/@octokit/core/node_modules/universal-user-agent": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
@@ -2041,18 +2126,33 @@
       "license": "ISC"
     },
     "node_modules/@octokit/endpoint": {
-      "version": "11.0.2",
-      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
-      "integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
+      "version": "11.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.4.tgz",
+      "integrity": "sha512-f1cOWoHPmxryJFknxbtDdjODWfV8A9tc8Aae6ermXPNgHFZ/x91AtHIz4gicEjL8hkJiip+u21QHJORfBv/qiA==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/types": "^16.0.0",
+        "@octokit/types": "^17.0.0",
         "universal-user-agent": "^7.0.2"
       },
       "engines": {
         "node": ">= 20"
       }
     },
+    "node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/endpoint/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
     "node_modules/@octokit/endpoint/node_modules/universal-user-agent": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
@@ -2060,19 +2160,34 @@
       "license": "ISC"
     },
     "node_modules/@octokit/graphql": {
-      "version": "9.0.3",
-      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
-      "integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
+      "version": "9.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.4.tgz",
+      "integrity": "sha512-5s15CCiY8XXQ+FG+b1YQcl6Z2FA++nwAz/tg2VUrTmnMncP+2nnGUEYANImdnxsA2Fnq+Mbl7hDjUTw7cFAwcg==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/request": "^10.0.6",
-        "@octokit/types": "^16.0.0",
+        "@octokit/request": "^10.0.13",
+        "@octokit/types": "^17.0.0",
         "universal-user-agent": "^7.0.0"
       },
       "engines": {
         "node": ">= 20"
       }
     },
+    "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/graphql/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
     "node_modules/@octokit/graphql/node_modules/universal-user-agent": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
@@ -2125,13 +2240,13 @@
       }
     },
     "node_modules/@octokit/plugin-retry": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.1.0.tgz",
-      "integrity": "sha512-O1FZgXeiGb2sowEr/hYTr6YunGdSAFWnr2fyW39Ah85H8O33ELASQxcvOFF5LE6Tjekcyu2ms4qAzJVhSaJxTw==",
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.1.1.tgz",
+      "integrity": "sha512-VCVvZ/R1+u3WuiBWpNavZ0mY4aaJNAsENrpBP9aLSR2QyOpQgd7DhM5j4AW7z4MQpnJYgwBPf0XqPQoNBRdQwg==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/request-error": "^7.0.2",
-        "@octokit/types": "^16.0.0",
+        "@octokit/request-error": "^7.1.1",
+        "@octokit/types": "^17.0.0",
         "bottleneck": "^2.15.3"
       },
       "engines": {
@@ -2141,16 +2256,32 @@
         "@octokit/core": ">=7"
       }
     },
+    "node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
     "node_modules/@octokit/request": {
-      "version": "10.0.7",
-      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
-      "integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
+      "version": "10.0.13",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.13.tgz",
+      "integrity": "sha512-v2269YxL9Yf+x3d+gRI63FP0vFQEiWgLyBzxe/Y+0yFDg2B/Tzf5dhh9VNfccVAQnfcfwQWyk/y6Bn7rUXXs7A==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/endpoint": "^11.0.2",
-        "@octokit/request-error": "^7.0.2",
-        "@octokit/types": "^16.0.0",
-        "fast-content-type-parse": "^3.0.0",
+        "@octokit/endpoint": "^11.0.3",
+        "@octokit/request-error": "^7.1.1",
+        "@octokit/types": "^17.0.0",
+        "content-type": "^2.0.0",
+        "json-with-bigint": "^3.5.3",
         "universal-user-agent": "^7.0.2"
       },
       "engines": {
@@ -2158,17 +2289,47 @@
       }
     },
     "node_modules/@octokit/request-error": {
-      "version": "7.1.0",
-      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
-      "integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.1.tgz",
+      "integrity": "sha512-+eaY7G2VVpSf2pc5Gn1+mph837V/d/TYTJAgWL9Tb0ogGYcpN3IlAVFgjL+Vv93F/sevrxkvsYCedtpLdcFLzA==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/types": "^16.0.0"
+        "@octokit/types": "^17.0.0"
       },
       "engines": {
         "node": ">= 20"
       }
     },
+    "node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/request-error/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
+    "node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
+      "version": "28.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-28.0.0.tgz",
+      "integrity": "sha512-0rFyLuyHvIj6uuZWuDslxkowFYdPXoNIkeAv4b27dzm2Tf4vGWXnPsMcxs7d65kLdMERgP3wc1AEPlqMz8e1cQ==",
+      "license": "MIT"
+    },
+    "node_modules/@octokit/request/node_modules/@octokit/types": {
+      "version": "17.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-17.0.0.tgz",
+      "integrity": "sha512-ByP1v7YL5SMveFPP7+sj0/ZuWCOOg/Chs4NafOMpq6WNIM/hdGY0S7C0TCGDBWu1aGmOxmUIhMx3cO+IdwYZ1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "@octokit/openapi-types": "^28.0.0"
+      }
+    },
     "node_modules/@octokit/request/node_modules/universal-user-agent": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
@@ -2209,13 +2370,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/@package-json/types": {
-      "version": "0.0.12",
-      "resolved": "https://registry.npmjs.org/@package-json/types/-/types-0.0.12.tgz",
-      "integrity": "sha512-uu43FGU34B5VM9mCNjXCwLaGHYjXdNincqKLaraaCW+7S2+SmiBg1Nv8bPnmschrIfZmfKNY9f3fC376MRrObw==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/@pkgr/core": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
@@ -2421,12 +2575,13 @@
       }
     },
     "node_modules/@types/archiver": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-7.0.0.tgz",
-      "integrity": "sha512-/3vwGwx9n+mCQdYZ2IKGGHEFL30I96UgBlk8EtRDDFQ9uxM1l4O5Ci6r00EMAkiDaTqD9DQ6nVrWRICnBPtzzg==",
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-8.0.0.tgz",
+      "integrity": "sha512-YpXPbEuv9+eUIPPQWUPahj3cvs9isWRuF+J4z+KbdYVDO3rWorWQFxUVHnwPu2AgKwvgpki5F2VMX0Xx+mX45A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
+        "@types/node": "*",
         "@types/readdir-glob": "*"
       }
     },
@@ -2469,9 +2624,9 @@
       "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "20.19.41",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.41.tgz",
-      "integrity": "sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ==",
+      "version": "20.19.43",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz",
+      "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2506,16 +2661,16 @@
       "license": "MIT"
     },
     "node_modules/@types/semver": {
-      "version": "7.7.1",
-      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
-      "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
+      "version": "7.8.0",
+      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.8.0.tgz",
+      "integrity": "sha512-1mAINjtQCXXeLkJ9ehXkwOcBpqtLxiVtKhpUf83DdRNdQKV0iXZpaHYqRr7nj+wvxuJzoAmAwXI+sCNMv1CzLQ==",
       "dev": true,
       "license": "MIT"
     },
     "node_modules/@types/sinon": {
-      "version": "21.0.1",
-      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-21.0.1.tgz",
-      "integrity": "sha512-5yoJSqLbjH8T9V2bksgRayuhpZy+723/z6wBOR+Soe4ZlXC0eW8Na71TeaZPUWDQvM7LYKa9UGFc6LRqxiR5fQ==",
+      "version": "22.0.0",
+      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-22.0.0.tgz",
+      "integrity": "sha512-TDbVpbccc2HfiqHR09Argj3mHV1KMW7sCCKj52fsl8lbRLkEn7fB1966EWhOKWUBcqfBueZuPoA7/OK1CKiy3g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2528,17 +2683,17 @@
       "license": "MIT"
     },
     "node_modules/@typescript-eslint/eslint-plugin": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.60.0.tgz",
-      "integrity": "sha512-QYb/sa74/s7OKMbACMjrYnGspj9Hs5YI5aaffSL65UfeBUzVzBJfVo3oWSpbzPurvm7yaCCo2Lk7lVj610HqKw==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.66.0.tgz",
+      "integrity": "sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/regexpp": "^4.12.2",
-        "@typescript-eslint/scope-manager": "8.60.0",
-        "@typescript-eslint/type-utils": "8.60.0",
-        "@typescript-eslint/utils": "8.60.0",
-        "@typescript-eslint/visitor-keys": "8.60.0",
+        "@typescript-eslint/scope-manager": "8.66.0",
+        "@typescript-eslint/type-utils": "8.66.0",
+        "@typescript-eslint/utils": "8.66.0",
+        "@typescript-eslint/visitor-keys": "8.66.0",
         "ignore": "^7.0.5",
         "natural-compare": "^1.4.0",
         "ts-api-utils": "^2.5.0"
@@ -2551,7 +2706,7 @@
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "@typescript-eslint/parser": "^8.60.0",
+        "@typescript-eslint/parser": "^8.66.0",
         "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
         "typescript": ">=4.8.4 <6.1.0"
       }
@@ -2567,16 +2722,16 @@
       }
     },
     "node_modules/@typescript-eslint/parser": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.60.0.tgz",
-      "integrity": "sha512-fcqpj/MyK4sxDPcbe7STNPbpQL4RLZOPWuaTmwZYuc+hJKzRf58yRxfhqGpc6PIq9ZyfSBpfHgmUHmHs0KwHwg==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.66.0.tgz",
+      "integrity": "sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/scope-manager": "8.60.0",
-        "@typescript-eslint/types": "8.60.0",
-        "@typescript-eslint/typescript-estree": "8.60.0",
-        "@typescript-eslint/visitor-keys": "8.60.0",
+        "@typescript-eslint/scope-manager": "8.66.0",
+        "@typescript-eslint/types": "8.66.0",
+        "@typescript-eslint/typescript-estree": "8.66.0",
+        "@typescript-eslint/visitor-keys": "8.66.0",
         "debug": "^4.4.3"
       },
       "engines": {
@@ -2610,14 +2765,14 @@
       }
     },
     "node_modules/@typescript-eslint/project-service": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.60.0.tgz",
-      "integrity": "sha512-aZu74NNKJeUWqCjDddzdiKaS82dgYgV/vmf+Ui3ZdZejmgfXR/q+pRumgobnQ2cCJTgGTWp4ypiwsuofFubavg==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.66.0.tgz",
+      "integrity": "sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/tsconfig-utils": "^8.60.0",
-        "@typescript-eslint/types": "^8.60.0",
+        "@typescript-eslint/tsconfig-utils": "^8.66.0",
+        "@typescript-eslint/types": "^8.66.0",
         "debug": "^4.4.3"
       },
       "engines": {
@@ -2650,14 +2805,14 @@
       }
     },
     "node_modules/@typescript-eslint/scope-manager": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.60.0.tgz",
-      "integrity": "sha512-pFzqhllJMs+jghLQWzV00ds39xLzuyqPSev5pd8f4Ir0rtKR3ZLUB4/4dhjOFighWb9larvtfJvqL+4yKDI3Xw==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.66.0.tgz",
+      "integrity": "sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.60.0",
-        "@typescript-eslint/visitor-keys": "8.60.0"
+        "@typescript-eslint/types": "8.66.0",
+        "@typescript-eslint/visitor-keys": "8.66.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2668,9 +2823,9 @@
       }
     },
     "node_modules/@typescript-eslint/tsconfig-utils": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.0.tgz",
-      "integrity": "sha512-BZPR3RGYlAXnly6ymAxfkVn5rCbZzQNou0rxv3GfWZ8cTQp+hhVd73khbGLAd8k1TlAPLISH337M+tAgAnaJDQ==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.66.0.tgz",
+      "integrity": "sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2685,15 +2840,15 @@
       }
     },
     "node_modules/@typescript-eslint/type-utils": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.60.0.tgz",
-      "integrity": "sha512-SX46wEUtitCpq7AN38HkUU/+zvUpdKf7ephtWAFgckH8O7PQIyL5gvrhQgBLuEYgLfuKWOVvWVskMbuFHAz5xg==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.66.0.tgz",
+      "integrity": "sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.60.0",
-        "@typescript-eslint/typescript-estree": "8.60.0",
-        "@typescript-eslint/utils": "8.60.0",
+        "@typescript-eslint/types": "8.66.0",
+        "@typescript-eslint/typescript-estree": "8.66.0",
+        "@typescript-eslint/utils": "8.66.0",
         "debug": "^4.4.3",
         "ts-api-utils": "^2.5.0"
       },
@@ -2728,9 +2883,9 @@
       }
     },
     "node_modules/@typescript-eslint/types": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.60.0.tgz",
-      "integrity": "sha512-AsE7x2XaAK+CVbeih0Fvbn+r1qHxtpLDJ3XUuFcIinT318T90yHMJC+Zgv+jUuDjQQd06HKwxnDu6sz1IcTilA==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.66.0.tgz",
+      "integrity": "sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2742,16 +2897,16 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.60.0.tgz",
-      "integrity": "sha512-3AcZNBGMClm6CXDyo8kYvVGT/sx29sS0oBsIb9oZI2gunA4Vm2M3YHzRLPvsUBBsl+yB5FPtltq7gGH0iTlp9g==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.66.0.tgz",
+      "integrity": "sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/project-service": "8.60.0",
-        "@typescript-eslint/tsconfig-utils": "8.60.0",
-        "@typescript-eslint/types": "8.60.0",
-        "@typescript-eslint/visitor-keys": "8.60.0",
+        "@typescript-eslint/project-service": "8.66.0",
+        "@typescript-eslint/tsconfig-utils": "8.66.0",
+        "@typescript-eslint/types": "8.66.0",
+        "@typescript-eslint/visitor-keys": "8.66.0",
         "debug": "^4.4.3",
         "minimatch": "^10.2.2",
         "semver": "^7.7.3",
@@ -2780,16 +2935,16 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
-      "version": "5.0.6",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
-      "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
+      "version": "5.0.9",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^4.0.2"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       }
     },
     "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
@@ -2811,13 +2966,13 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
-      "version": "10.2.5",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
-      "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
+      "version": "10.2.6",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
+      "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "brace-expansion": "^5.0.5"
+        "brace-expansion": "^5.0.8"
       },
       "engines": {
         "node": "18 || 20 || >=22"
@@ -2827,16 +2982,16 @@
       }
     },
     "node_modules/@typescript-eslint/utils": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.60.0.tgz",
-      "integrity": "sha512-HtXuPfrHTyBDkameWpl+vJb1Uevu2tznAyahM1Oc4AENidCLTPiZDWIo4GfcxNdC/RcfGcadzzkqbRG87dUrQA==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.66.0.tgz",
+      "integrity": "sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.9.1",
-        "@typescript-eslint/scope-manager": "8.60.0",
-        "@typescript-eslint/types": "8.60.0",
-        "@typescript-eslint/typescript-estree": "8.60.0"
+        "@typescript-eslint/scope-manager": "8.66.0",
+        "@typescript-eslint/types": "8.66.0",
+        "@typescript-eslint/typescript-estree": "8.66.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2851,13 +3006,13 @@
       }
     },
     "node_modules/@typescript-eslint/visitor-keys": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.60.0.tgz",
-      "integrity": "sha512-9WI52t8ZGLVGrPMBet25yAftqY/n95+zmoUUtJBBQTKDSKUu7OsPTroT2op7U9JatkoRccL0YkWDNMFfC4Sjxg==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.66.0.tgz",
+      "integrity": "sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "8.60.0",
+        "@typescript-eslint/types": "8.66.0",
         "eslint-visitor-keys": "^5.0.0"
       },
       "engines": {
@@ -3210,6 +3365,8 @@
     },
     "node_modules/abort-controller": {
       "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+      "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
       "license": "MIT",
       "dependencies": {
         "event-target-shim": "^5.0.0"
@@ -3289,6 +3446,7 @@
     },
     "node_modules/ansi-regex": {
       "version": "5.0.1",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=8"
@@ -3298,6 +3456,7 @@
       "version": "6.2.3",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
       "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=12"
@@ -3307,21 +3466,23 @@
       }
     },
     "node_modules/archiver": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",
-      "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==",
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/archiver/-/archiver-8.0.0.tgz",
+      "integrity": "sha512-fV1orZfsnPn9BaSByR/qE67rJCLJEy2Ox5bq7nJh+jquWaNh6Sfec75kJ2T6PtdGUbPQlrVoSVCEOa5SdiTQ1g==",
       "license": "MIT",
       "dependencies": {
-        "archiver-utils": "^5.0.2",
         "async": "^3.2.4",
         "buffer-crc32": "^1.0.0",
+        "is-stream": "^4.0.0",
+        "lazystream": "^1.0.0",
+        "normalize-path": "^3.0.0",
         "readable-stream": "^4.0.0",
-        "readdir-glob": "^1.1.2",
+        "readdir-glob": "^3.0.0",
         "tar-stream": "^3.0.0",
-        "zip-stream": "^6.0.1"
+        "zip-stream": "^7.0.2"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=18"
       }
     },
     "node_modules/archiver-utils": {
@@ -3795,9 +3956,9 @@
       "license": "MIT"
     },
     "node_modules/brace-expansion": {
-      "version": "1.1.14",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
-      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "version": "1.1.18",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
+      "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^1.0.0",
@@ -4145,6 +4306,7 @@
     },
     "node_modules/color-convert": {
       "version": "2.0.1",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
@@ -4155,6 +4317,7 @@
     },
     "node_modules/color-name": {
       "version": "1.1.4",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/comment-parser": {
@@ -4174,31 +4337,19 @@
       "dev": true
     },
     "node_modules/compress-commons": {
-      "version": "6.0.2",
-      "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz",
-      "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-7.0.1.tgz",
+      "integrity": "sha512-g0S8KAD8qf4+V//pr3BfB1aBnARLXNz2Gx+jmHU0LEriUuoQUOPOulVquHKTJ8+EAIIO7fhseNDr9wK5Q9FKBQ==",
       "license": "MIT",
       "dependencies": {
         "crc-32": "^1.2.0",
-        "crc32-stream": "^6.0.0",
-        "is-stream": "^2.0.1",
+        "crc32-stream": "^7.0.1",
+        "is-stream": "^4.0.0",
         "normalize-path": "^3.0.0",
-        "readable-stream": "^4.0.0"
-      },
-      "engines": {
-        "node": ">= 14"
-      }
-    },
-    "node_modules/compress-commons/node_modules/is-stream": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
-      "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
+        "readable-stream": "^4.0.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": ">=18"
       }
     },
     "node_modules/concat-map": {
@@ -4234,6 +4385,19 @@
         "node": "^14.18.0 || >=16.10.0"
       }
     },
+    "node_modules/content-type": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
+      "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
+      }
+    },
     "node_modules/convert-to-spaces": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
@@ -4262,22 +4426,23 @@
       }
     },
     "node_modules/crc32-stream": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",
-      "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-7.0.1.tgz",
+      "integrity": "sha512-IBWsY8xznyQrcHn8h4bC8/4ErNke5elzgG8GcqF4RFPw6aHkWWRc7Tgw6upjaTX/CT/yQgqYENkxYsTYN+hW2g==",
       "license": "MIT",
       "dependencies": {
         "crc-32": "^1.2.0",
         "readable-stream": "^4.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=18"
       }
     },
     "node_modules/cross-spawn": {
       "version": "7.0.6",
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
       "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+      "dev": true,
       "dependencies": {
         "path-key": "^3.1.0",
         "shebang-command": "^2.0.0",
@@ -4476,12 +4641,6 @@
         "node": ">= 0.4"
       }
     },
-    "node_modules/eastasianwidth": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
-      "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
-      "license": "MIT"
-    },
     "node_modules/electron-to-chromium": {
       "version": "1.5.68",
       "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz",
@@ -4503,6 +4662,7 @@
     },
     "node_modules/emoji-regex": {
       "version": "8.0.0",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/es-abstract": {
@@ -4651,9 +4811,9 @@
       }
     },
     "node_modules/esbuild": {
-      "version": "0.28.0",
-      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz",
-      "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==",
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
+      "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
       "dev": true,
       "hasInstallScript": true,
       "license": "MIT",
@@ -4664,32 +4824,32 @@
         "node": ">=18"
       },
       "optionalDependencies": {
-        "@esbuild/aix-ppc64": "0.28.0",
-        "@esbuild/android-arm": "0.28.0",
-        "@esbuild/android-arm64": "0.28.0",
-        "@esbuild/android-x64": "0.28.0",
-        "@esbuild/darwin-arm64": "0.28.0",
-        "@esbuild/darwin-x64": "0.28.0",
-        "@esbuild/freebsd-arm64": "0.28.0",
-        "@esbuild/freebsd-x64": "0.28.0",
-        "@esbuild/linux-arm": "0.28.0",
-        "@esbuild/linux-arm64": "0.28.0",
-        "@esbuild/linux-ia32": "0.28.0",
-        "@esbuild/linux-loong64": "0.28.0",
-        "@esbuild/linux-mips64el": "0.28.0",
-        "@esbuild/linux-ppc64": "0.28.0",
-        "@esbuild/linux-riscv64": "0.28.0",
-        "@esbuild/linux-s390x": "0.28.0",
-        "@esbuild/linux-x64": "0.28.0",
-        "@esbuild/netbsd-arm64": "0.28.0",
-        "@esbuild/netbsd-x64": "0.28.0",
-        "@esbuild/openbsd-arm64": "0.28.0",
-        "@esbuild/openbsd-x64": "0.28.0",
-        "@esbuild/openharmony-arm64": "0.28.0",
-        "@esbuild/sunos-x64": "0.28.0",
-        "@esbuild/win32-arm64": "0.28.0",
-        "@esbuild/win32-ia32": "0.28.0",
-        "@esbuild/win32-x64": "0.28.0"
+        "@esbuild/aix-ppc64": "0.28.1",
+        "@esbuild/android-arm": "0.28.1",
+        "@esbuild/android-arm64": "0.28.1",
+        "@esbuild/android-x64": "0.28.1",
+        "@esbuild/darwin-arm64": "0.28.1",
+        "@esbuild/darwin-x64": "0.28.1",
+        "@esbuild/freebsd-arm64": "0.28.1",
+        "@esbuild/freebsd-x64": "0.28.1",
+        "@esbuild/linux-arm": "0.28.1",
+        "@esbuild/linux-arm64": "0.28.1",
+        "@esbuild/linux-ia32": "0.28.1",
+        "@esbuild/linux-loong64": "0.28.1",
+        "@esbuild/linux-mips64el": "0.28.1",
+        "@esbuild/linux-ppc64": "0.28.1",
+        "@esbuild/linux-riscv64": "0.28.1",
+        "@esbuild/linux-s390x": "0.28.1",
+        "@esbuild/linux-x64": "0.28.1",
+        "@esbuild/netbsd-arm64": "0.28.1",
+        "@esbuild/netbsd-x64": "0.28.1",
+        "@esbuild/openbsd-arm64": "0.28.1",
+        "@esbuild/openbsd-x64": "0.28.1",
+        "@esbuild/openharmony-arm64": "0.28.1",
+        "@esbuild/sunos-x64": "0.28.1",
+        "@esbuild/win32-arm64": "0.28.1",
+        "@esbuild/win32-ia32": "0.28.1",
+        "@esbuild/win32-x64": "0.28.1"
       }
     },
     "node_modules/escalade": {
@@ -4711,9 +4871,9 @@
       }
     },
     "node_modules/eslint": {
-      "version": "9.39.4",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz",
-      "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==",
+      "version": "9.39.5",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz",
+      "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -4722,8 +4882,8 @@
         "@eslint/config-array": "^0.21.2",
         "@eslint/config-helpers": "^0.4.2",
         "@eslint/core": "^0.17.0",
-        "@eslint/eslintrc": "^3.3.5",
-        "@eslint/js": "9.39.4",
+        "@eslint/eslintrc": "^3.3.6",
+        "@eslint/js": "9.39.5",
         "@eslint/plugin-kit": "^0.4.1",
         "@humanfs/node": "^0.16.6",
         "@humanwhocodes/module-importer": "^1.0.1",
@@ -4825,9 +4985,9 @@
       }
     },
     "node_modules/eslint-import-resolver-typescript": {
-      "version": "4.4.4",
-      "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz",
-      "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==",
+      "version": "4.4.5",
+      "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.5.tgz",
+      "integrity": "sha512-nbE5XLph6TLtGYcu/U6e6ZVXyKBhbDWK5cLGk76eJ7NdZpwf1P9EFkpt1Z01mNZNrrilsAYWKH6zUkL4reoXbw==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
@@ -4933,15 +5093,15 @@
       }
     },
     "node_modules/eslint-plugin-github": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.0.0.tgz",
-      "integrity": "sha512-J8MvUoiR/TU/Y9NnEmg1AnbvMUj9R6IO260z47zymMLLvso7B4c80IKjd8diqmqtSmeXXlbIus4i0SvK84flag==",
+      "version": "6.1.2",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-6.1.2.tgz",
+      "integrity": "sha512-XU1fVItfnwYWXG0GqH0MV2VY9EzvgbPxDnUJ9I1915Cpn24z13Vgx1pttrdQy6bhLmDYp+Wl7pX/L1YMKdG+6g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@eslint/compat": "^1.2.3",
-        "@eslint/eslintrc": "^3.1.0",
-        "@eslint/js": "^9.14.0",
+        "@eslint/compat": "^2.0.0",
+        "@eslint/eslintrc": "^3.3.6",
+        "@eslint/js": "^9.39.5",
         "@github/browserslist-config": "^1.0.0",
         "@typescript-eslint/eslint-plugin": "^8.0.0",
         "@typescript-eslint/parser": "^8.0.0",
@@ -4956,79 +5116,18 @@
         "eslint-plugin-no-only-tests": "^3.0.0",
         "eslint-plugin-prettier": "^5.2.1",
         "eslint-rule-documentation": ">=1.0.0",
-        "globals": "^16.0.0",
+        "globals": "^17.7.0",
         "jsx-ast-utils": "^3.3.2",
         "prettier": "^3.0.0",
         "svg-element-attributes": "^1.3.1",
-        "typescript": "^5.7.3",
+        "typescript": "^6.0.3",
         "typescript-eslint": "^8.14.0"
       },
       "bin": {
         "eslint-ignore-errors": "bin/eslint-ignore-errors.js"
       },
       "peerDependencies": {
-        "eslint": "^8 || ^9"
-      }
-    },
-    "node_modules/eslint-plugin-github/node_modules/@eslint/compat": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
-      "integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@eslint/core": "^0.17.0"
-      },
-      "engines": {
-        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
-      },
-      "peerDependencies": {
-        "eslint": "^8.40 || 9"
-      },
-      "peerDependenciesMeta": {
-        "eslint": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/eslint-plugin-github/node_modules/@eslint/core": {
-      "version": "0.17.0",
-      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
-      "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@types/json-schema": "^7.0.15"
-      },
-      "engines": {
-        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
-      }
-    },
-    "node_modules/eslint-plugin-github/node_modules/globals": {
-      "version": "16.5.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz",
-      "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/eslint-plugin-github/node_modules/typescript": {
-      "version": "5.9.3",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
-      "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "bin": {
-        "tsc": "bin/tsc",
-        "tsserver": "bin/tsserver"
-      },
-      "engines": {
-        "node": ">=14.17"
+        "eslint": "^8 || ^9 || ^10"
       }
     },
     "node_modules/eslint-plugin-i18n-text": {
@@ -5074,13 +5173,12 @@
       }
     },
     "node_modules/eslint-plugin-import-x": {
-      "version": "4.16.2",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.16.2.tgz",
-      "integrity": "sha512-rM9K8UBHcWKpzQzStn1YRN2T5NvdeIfSVoKu/lKF41znQXHAUcBbYXe5wd6GNjZjTrP7viQ49n1D83x/2gYgIw==",
+      "version": "4.17.1",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.17.1.tgz",
+      "integrity": "sha512-4cdstYkKCyjumM2Q9NSI03K8D2a9F4Ssz33K2lv2hQa4KmR9jPLwk3uWGtNvclfqBrPGfGuMBwsGMbe6dMRbfg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@package-json/types": "^0.0.12",
         "@typescript-eslint/types": "^8.56.0",
         "comment-parser": "^1.4.1",
         "debug": "^4.4.1",
@@ -5122,16 +5220,16 @@
       }
     },
     "node_modules/eslint-plugin-import-x/node_modules/brace-expansion": {
-      "version": "5.0.6",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
-      "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
+      "version": "5.0.9",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^4.0.2"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       }
     },
     "node_modules/eslint-plugin-import-x/node_modules/minimatch": {
@@ -5556,6 +5654,8 @@
     },
     "node_modules/event-target-shim": {
       "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+      "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
       "license": "MIT",
       "engines": {
         "node": ">=6"
@@ -5595,22 +5695,6 @@
         "url": "https://github.com/sindresorhus/execa?sponsor=1"
       }
     },
-    "node_modules/fast-content-type-parse": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz",
-      "integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/fastify"
-        },
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/fastify"
-        }
-      ],
-      "license": "MIT"
-    },
     "node_modules/fast-deep-equal": {
       "version": "3.1.3",
       "license": "MIT"
@@ -5832,22 +5916,6 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/foreground-child": {
-      "version": "3.3.1",
-      "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
-      "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
-      "license": "ISC",
-      "dependencies": {
-        "cross-spawn": "^7.0.6",
-        "signal-exit": "^4.0.1"
-      },
-      "engines": {
-        "node": ">=14"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
     "node_modules/fsevents": {
       "version": "2.3.3",
       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -6033,23 +6101,17 @@
       }
     },
     "node_modules/glob": {
-      "version": "11.1.0",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",
-      "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==",
+      "version": "13.0.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
+      "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "foreground-child": "^3.3.1",
-        "jackspeak": "^4.1.1",
-        "minimatch": "^10.1.1",
-        "minipass": "^7.1.2",
-        "package-json-from-dist": "^1.0.0",
-        "path-scurry": "^2.0.0"
-      },
-      "bin": {
-        "glob": "dist/esm/bin.mjs"
+        "minimatch": "^10.2.2",
+        "minipass": "^7.1.3",
+        "path-scurry": "^2.0.2"
       },
       "engines": {
-        "node": "20 || >=22"
+        "node": "18 || 20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -6078,15 +6140,15 @@
       }
     },
     "node_modules/glob/node_modules/brace-expansion": {
-      "version": "5.0.6",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
-      "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
+      "version": "5.0.9",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^4.0.2"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       }
     },
     "node_modules/glob/node_modules/minimatch": {
@@ -6105,9 +6167,9 @@
       }
     },
     "node_modules/globals": {
-      "version": "17.6.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz",
-      "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==",
+      "version": "17.9.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-17.9.0.tgz",
+      "integrity": "sha512-m/MvAW61QVU5VDNF1Vj8axt016h8w7L5TU1e9zlab7XIttAT2YAlCwl75K1fOqvMM9apmD7lbCIRhpfkhmxhCg==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -6423,7 +6485,9 @@
       }
     },
     "node_modules/inherits": {
-      "version": "2.0.3",
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
       "license": "ISC"
     },
     "node_modules/internal-slot": {
@@ -6622,6 +6686,7 @@
     },
     "node_modules/is-fullwidth-code-point": {
       "version": "3.0.0",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=8"
@@ -6806,7 +6871,6 @@
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz",
       "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=18"
@@ -6933,23 +6997,9 @@
     },
     "node_modules/isexe": {
       "version": "2.0.0",
+      "dev": true,
       "license": "ISC"
     },
-    "node_modules/jackspeak": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
-      "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
-      "license": "BlueOak-1.0.0",
-      "dependencies": {
-        "@isaacs/cliui": "^8.0.2"
-      },
-      "engines": {
-        "node": "20 || >=22"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
     "node_modules/js-string-escape": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
@@ -6960,15 +7010,25 @@
       }
     },
     "node_modules/js-yaml": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
-      "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+      "version": "5.2.3",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.3.tgz",
+      "integrity": "sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/puzrin"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/nodeca"
+        }
+      ],
       "license": "MIT",
       "dependencies": {
         "argparse": "^2.0.1"
       },
       "bin": {
-        "js-yaml": "bin/js-yaml.js"
+        "js-yaml": "bin/js-yaml.mjs"
       }
     },
     "node_modules/jschardet": {
@@ -7013,6 +7073,12 @@
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/json-with-bigint": {
+      "version": "3.5.10",
+      "resolved": "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.10.tgz",
+      "integrity": "sha512-Vcx+JVNEBts/xfcoCS69sKrOhOk/3TVlvlT+XzUOefVKnnrbYSCKpDCm10pohsJFtsJVYnwa/cXRZ4eElzaM6w==",
+      "license": "MIT"
+    },
     "node_modules/json5": {
       "version": "1.0.2",
       "dev": true,
@@ -7210,10 +7276,10 @@
       "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="
     },
     "node_modules/lru-cache": {
-      "version": "11.1.0",
-      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
-      "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
-      "license": "ISC",
+      "version": "11.5.1",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
+      "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",
+      "license": "BlueOak-1.0.0",
       "engines": {
         "node": "20 || >=22"
       }
@@ -7354,10 +7420,10 @@
       }
     },
     "node_modules/minipass": {
-      "version": "7.1.2",
-      "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
-      "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
-      "license": "ISC",
+      "version": "7.1.3",
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+      "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+      "license": "BlueOak-1.0.0",
       "engines": {
         "node": ">=16 || 14 >=14.17"
       }
@@ -7415,9 +7481,9 @@
       "license": "MIT"
     },
     "node_modules/nock": {
-      "version": "14.0.15",
-      "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.15.tgz",
-      "integrity": "sha512-S0a47C9pLvcYx/Ugf0H30BVBEcUgMMBDk9VJIDlJ8XGrfH2QDUD4Tgdp45qDIiHttokBG+IbsOtsvIjGR/j3bg==",
+      "version": "14.0.17",
+      "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.17.tgz",
+      "integrity": "sha512-EjRr1weMa4ALQX35AgZTEnP+weJJjlW1KGDiNM2IQC2069YDHas4f4B4UUYR+TTLyKWxJvOz2wObDKQs/LNreA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -7506,6 +7572,8 @@
     },
     "node_modules/normalize-path": {
       "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
       "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
@@ -7750,12 +7818,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/package-json-from-dist": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
-      "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==",
-      "license": "BlueOak-1.0.0"
-    },
     "node_modules/parent-module": {
       "version": "1.0.1",
       "dev": true,
@@ -7823,6 +7885,7 @@
     },
     "node_modules/path-key": {
       "version": "3.1.1",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=8"
@@ -7834,16 +7897,16 @@
       "license": "MIT"
     },
     "node_modules/path-scurry": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
-      "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
+      "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "lru-cache": "^11.0.0",
         "minipass": "^7.1.2"
       },
       "engines": {
-        "node": "20 || >=22"
+        "node": "18 || 20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -7967,6 +8030,8 @@
     },
     "node_modules/process": {
       "version": "0.11.10",
+      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+      "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
       "license": "MIT",
       "engines": {
         "node": ">= 0.6.0"
@@ -8020,9 +8085,9 @@
       "license": "MIT"
     },
     "node_modules/readable-stream": {
-      "version": "4.5.2",
-      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
-      "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
+      "version": "4.7.0",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
+      "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
       "license": "MIT",
       "dependencies": {
         "abort-controller": "^3.0.0",
@@ -8036,33 +8101,54 @@
       }
     },
     "node_modules/readdir-glob": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",
-      "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-3.0.0.tgz",
+      "integrity": "sha512-AhNB2KgKeVJr16nK9LLZbJNWnYoT23ZrumNKFDebHBdkC8KHSqWo871JAUhoWC/RtjEVdqNMFpM6qrwRbaUqpw==",
       "license": "Apache-2.0",
       "dependencies": {
-        "minimatch": "^5.1.0"
+        "minimatch": "^10.2.2"
+      },
+      "engines": {
+        "node": ">=18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/yqnn"
+      }
+    },
+    "node_modules/readdir-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/readdir-glob/node_modules/brace-expansion": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
-      "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
+      "version": "5.0.9",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
       "license": "MIT",
       "dependencies": {
-        "balanced-match": "^1.0.0"
+        "balanced-match": "^4.0.2"
+      },
+      "engines": {
+        "node": "20 || >=22"
       }
     },
     "node_modules/readdir-glob/node_modules/minimatch": {
-      "version": "5.1.9",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
-      "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
-      "license": "ISC",
+      "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": "^2.0.1"
+        "brace-expansion": "^5.0.5"
       },
       "engines": {
-        "node": ">=10"
+        "node": "18 || 20 || >=22"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/reflect.getprototypeof": {
@@ -8311,9 +8397,9 @@
       }
     },
     "node_modules/semver": {
-      "version": "7.8.1",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",
-      "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",
+      "version": "7.8.5",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+      "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
       "license": "ISC",
       "bin": {
         "semver": "bin/semver.js"
@@ -8399,6 +8485,7 @@
     },
     "node_modules/shebang-command": {
       "version": "2.0.0",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "shebang-regex": "^3.0.0"
@@ -8409,6 +8496,7 @@
     },
     "node_modules/shebang-regex": {
       "version": "3.0.0",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=8"
@@ -8494,6 +8582,7 @@
       "version": "4.1.0",
       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
       "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+      "dev": true,
       "engines": {
         "node": ">=14"
       },
@@ -8502,9 +8591,9 @@
       }
     },
     "node_modules/sinon": {
-      "version": "22.0.0",
-      "resolved": "https://registry.npmjs.org/sinon/-/sinon-22.0.0.tgz",
-      "integrity": "sha512-sq/6DpdXOrLyfbKlXLg/Usc7xu8YXPeLkOFZRvA3bNUSA2lhbrZ06yuXbH1fkzBPCbz9O10+7hznzUsjaYNm0Q==",
+      "version": "22.1.0",
+      "resolved": "https://registry.npmjs.org/sinon/-/sinon-22.1.0.tgz",
+      "integrity": "sha512-n1ajF2rBWMTtEwbKcw4UdFg4nCnDdq/U6RDoxtOd7oapOlRoJ5ynwFx60owROyhDpA9QhMZi0pCO/xtmwFjG7w==",
       "dev": true,
       "license": "BSD-3-Clause",
       "dependencies": {
@@ -8669,21 +8758,7 @@
     },
     "node_modules/string-width": {
       "version": "4.2.3",
-      "license": "MIT",
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/string-width-cjs": {
-      "name": "string-width",
-      "version": "4.2.3",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "emoji-regex": "^8.0.0",
@@ -8769,19 +8844,7 @@
     },
     "node_modules/strip-ansi": {
       "version": "6.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/strip-ansi-cjs": {
-      "name": "strip-ansi",
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
-      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "ansi-regex": "^5.0.1"
@@ -8871,9 +8934,9 @@
       }
     },
     "node_modules/supertap/node_modules/js-yaml": {
-      "version": "3.14.2",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
-      "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
+      "version": "3.15.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz",
+      "integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -8950,9 +9013,9 @@
       }
     },
     "node_modules/tar": {
-      "version": "7.5.15",
-      "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.15.tgz",
-      "integrity": "sha512-dzGK0boVlC4W5QFuQN1EFSl3bIDYsk7Tj40U6eIBnK2k/8ml7TZ5agbI5j5+qnoVcAA+rNtBml8SEiLxZpNqRQ==",
+      "version": "7.5.20",
+      "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.20.tgz",
+      "integrity": "sha512-9FcyK4PA6+WbzlTM9WhQm6vB5W7cP7dUiPsv1g7YDwEQnQ1CGpK3MGlKk/ITVWMk05kHZuBhmVhiv8LZoy/PFQ==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
@@ -9140,9 +9203,9 @@
       "license": "0BSD"
     },
     "node_modules/tsx": {
-      "version": "4.22.3",
-      "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.3.tgz",
-      "integrity": "sha512-mdoNxBC/cSQObGGVQ5Bpn5i+yv7j68gk3Nfm3wFjcJg3Z0Mix9jzAFfP12prmm5eVGmDKtp0yyArrs0Q+8gZHg==",
+      "version": "4.23.8",
+      "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.8.tgz",
+      "integrity": "sha512-8W675THjbzfFmLOQzjDBIBna+WjqMGIxmSZ1mMc1+o9qoVsEuAgQu5j5ueLhau8inOkDu9OslVg0FmfBs1RIHw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -9292,16 +9355,16 @@
       }
     },
     "node_modules/typescript-eslint": {
-      "version": "8.60.0",
-      "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.60.0.tgz",
-      "integrity": "sha512-9f65qWLZdAW9m1JaxBDUHcqRUfL8bkxxXL7XxEfI+F09q56PkBvIfCjLF3yInsDM/BBmwkqmCQdCZe/RYlIWEw==",
+      "version": "8.66.0",
+      "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.66.0.tgz",
+      "integrity": "sha512-QlEbBPz/RuJ1XUHj29nm3t0F/O/cSlEnntozqPOYHnnTGAXFamnMBu5i9Vn6vhUPHGAjR+Vl+5J8vPN/BMUrJw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/eslint-plugin": "8.60.0",
-        "@typescript-eslint/parser": "8.60.0",
-        "@typescript-eslint/typescript-estree": "8.60.0",
-        "@typescript-eslint/utils": "8.60.0"
+        "@typescript-eslint/eslint-plugin": "8.66.0",
+        "@typescript-eslint/parser": "8.66.0",
+        "@typescript-eslint/typescript-estree": "8.66.0",
+        "@typescript-eslint/utils": "8.66.0"
       },
       "engines": {
         "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -9335,9 +9398,9 @@
       }
     },
     "node_modules/undici": {
-      "version": "6.24.1",
-      "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz",
-      "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==",
+      "version": "6.28.0",
+      "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz",
+      "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==",
       "license": "MIT",
       "engines": {
         "node": ">=18.17"
@@ -9465,9 +9528,9 @@
       "license": "MIT"
     },
     "node_modules/uuid": {
-      "version": "14.0.0",
-      "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
-      "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==",
+      "version": "14.0.1",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz",
+      "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==",
       "funding": [
         "https://github.com/sponsors/broofa",
         "https://github.com/sponsors/ctavan"
@@ -9506,6 +9569,7 @@
     },
     "node_modules/which": {
       "version": "2.0.2",
+      "dev": true,
       "license": "ISC",
       "dependencies": {
         "isexe": "^2.0.0"
@@ -9624,39 +9688,6 @@
         "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
       }
     },
-    "node_modules/wrap-ansi-cjs": {
-      "name": "wrap-ansi",
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
-      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
-      }
-    },
-    "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
-      }
-    },
     "node_modules/wrap-ansi/node_modules/ansi-styles": {
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -9797,31 +9828,32 @@
       }
     },
     "node_modules/zip-stream": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz",
-      "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==",
+      "version": "7.0.5",
+      "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-7.0.5.tgz",
+      "integrity": "sha512-dSvYKdvLsAHCDqPOhIwk/q5CvuWtTB3Dgpoe0uVEFjTzIOAmsQpprX25InCvrvJsirEbu1OHyy67n/kAj1Sw/w==",
       "license": "MIT",
       "dependencies": {
-        "archiver-utils": "^5.0.0",
-        "compress-commons": "^6.0.2",
+        "compress-commons": "^7.0.0",
+        "normalize-path": "^3.0.0",
         "readable-stream": "^4.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=18"
       }
     },
     "pr-checks": {
       "dependencies": {
         "@actions/core": "^2.0.3",
         "@actions/github": "^8.0.1",
-        "@octokit/core": "^7.0.6",
+        "@octokit/core": "^7.0.7",
         "@octokit/plugin-paginate-rest": ">=9.2.2",
         "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
+        "semver": "^7.8.5",
         "yaml": "^2.9.0"
       },
       "devDependencies": {
-        "@types/node": "^20.19.41",
-        "tsx": "^4.22.3"
+        "@types/node": "^20.19.43",
+        "tsx": "^4.23.8"
       }
     }
   }
diff --git a/package.json b/package.json
index ec33e335b0..17229b4b7b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "codeql",
-  "version": "4.36.2",
+  "version": "4.37.7",
   "private": true,
   "description": "CodeQL action",
   "scripts": {
@@ -22,7 +22,7 @@
   "dependencies": {
     "@actions/artifact": "^5.0.3",
     "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
-    "@actions/cache": "^5.0.5",
+    "@actions/cache": "^5.2.0",
     "@actions/core": "^2.0.3",
     "@actions/exec": "^2.0.0",
     "@actions/github": "^8.0.1",
@@ -30,46 +30,50 @@
     "@actions/http-client": "^3.0.0",
     "@actions/io": "^2.0.0",
     "@actions/tool-cache": "^3.0.1",
-    "@octokit/plugin-retry": "^8.1.0",
-    "archiver": "^7.0.1",
+    "@octokit/core": "^7.0.7",
+    "@octokit/plugin-paginate-rest": "^14.0.0",
+    "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
+    "@octokit/plugin-retry": "^8.1.1",
+    "archiver": "^8.0.0",
     "fast-deep-equal": "^3.1.3",
     "follow-redirects": "^1.16.0",
     "get-folder-size": "^5.0.0",
     "https-proxy-agent": "^7.0.6",
-    "js-yaml": "^4.1.1",
+    "js-yaml": "^5.2.3",
     "jsonschema": "1.5.0",
     "long": "^5.3.2",
     "node-forge": "^1.4.0",
-    "semver": "^7.8.1",
-    "uuid": "^14.0.0"
+    "semver": "^7.8.5",
+    "uuid": "^14.0.1",
+    "undici": "^6.28.0"
   },
   "devDependencies": {
     "@ava/typescript": "6.0.0",
     "@eslint/compat": "^2.1.0",
     "@microsoft/eslint-formatter-sarif": "^3.1.0",
     "@octokit/types": "^16.0.0",
-    "@types/archiver": "^7.0.0",
+    "@types/archiver": "^8.0.0",
     "@types/follow-redirects": "^1.14.4",
     "@types/js-yaml": "^4.0.9",
-    "@types/node": "^20.19.41",
+    "@types/node": "^20.19.43",
     "@types/node-forge": "^1.3.14",
     "@types/sarif": "^2.1.7",
-    "@types/semver": "^7.7.1",
-    "@types/sinon": "^21.0.1",
+    "@types/semver": "^7.8.0",
+    "@types/sinon": "^22.0.0",
     "ava": "^6.4.1",
-    "esbuild": "^0.28.0",
-    "eslint": "^9.39.4",
-    "eslint-import-resolver-typescript": "^4.4.4",
-    "eslint-plugin-github": "^6.0.0",
-    "eslint-plugin-import-x": "^4.16.2",
+    "esbuild": "^0.28.1",
+    "eslint": "^9.39.5",
+    "eslint-import-resolver-typescript": "^4.4.5",
+    "eslint-plugin-github": "^6.1.2",
+    "eslint-plugin-import-x": "^4.17.1",
     "eslint-plugin-jsdoc": "^62.9.0",
     "eslint-plugin-no-async-foreach": "^0.1.1",
-    "glob": "^11.1.0",
-    "globals": "^17.6.0",
-    "nock": "^14.0.15",
-    "sinon": "^22.0.0",
+    "glob": "^13.0.6",
+    "globals": "^17.9.0",
+    "nock": "^14.0.17",
+    "sinon": "^22.1.0",
     "typescript": "^6.0.3",
-    "typescript-eslint": "^8.60.0"
+    "typescript-eslint": "^8.66.0"
   },
   "overrides": {
     "@actions/tool-cache": {
@@ -90,7 +94,7 @@
     "eslint-plugin-jsx-a11y": {
       "semver": ">=6.3.1"
     },
-    "glob": "^11.1.0",
-    "undici": "^6.24.0"
+    "glob": "^13.0.6",
+    "undici": "^6.28.0"
   }
 }
diff --git a/pr-checks/bundle-changelog.test.ts b/pr-checks/bundle-changelog.test.ts
new file mode 100644
index 0000000000..6cc4d096ba
--- /dev/null
+++ b/pr-checks/bundle-changelog.test.ts
@@ -0,0 +1,142 @@
+/**
+ * Tests for `bundle-changelog.ts`.
+ */
+
+import * as assert from "node:assert/strict";
+import * as fs from "node:fs";
+import * as os from "node:os";
+import * as path from "node:path";
+import { afterEach, beforeEach, describe, it } from "node:test";
+
+import {
+  CLI_VERSION_ENV_VAR,
+  getCLIVersion,
+  getPRNumber,
+  getPRUrl,
+  PR_URL_ENV_VAR,
+  updateChangelog,
+} from "./bundle-changelog";
+import {
+  EMPTY_CHANGELOG,
+  NO_CHANGES_STR,
+  UNRELEASED_PLACEHOLDER,
+} from "./changelog";
+
+let testDir: string;
+
+beforeEach(() => {
+  // Set up a temporary directory for testing
+  testDir = fs.mkdtempSync(path.join(os.tmpdir(), "bundle-changelog-test-"));
+});
+
+afterEach(() => {
+  /** Clean up temporary directories. */
+  fs.rmSync(testDir, { recursive: true, force: true });
+});
+
+describe("getCLIVersion", async () => {
+  await it("throws if the environment variable is not set", async () => {
+    delete process.env[CLI_VERSION_ENV_VAR];
+    assert.throws(() => getCLIVersion());
+  });
+
+  await it("throws if the environment variable is empty", async () => {
+    process.env[CLI_VERSION_ENV_VAR] = "    ";
+    assert.throws(() => getCLIVersion());
+  });
+
+  await it("returns value of the environment variable if set", async () => {
+    const testValue = "1.2.3";
+    process.env[CLI_VERSION_ENV_VAR] = testValue;
+    assert.deepEqual(getCLIVersion(), testValue);
+  });
+});
+
+const testPrUrl = "https://github.com/github/codeql-action/pulls/42";
+
+describe("getPRUrl", async () => {
+  await it("throws if the environment variable is not set", async () => {
+    delete process.env[PR_URL_ENV_VAR];
+    assert.throws(() => getPRUrl());
+  });
+
+  await it("throws if the environment variable is empty", async () => {
+    process.env[PR_URL_ENV_VAR] = "    ";
+    assert.throws(() => getPRUrl());
+  });
+
+  await it("returns value of the environment variable if set", async () => {
+    process.env[PR_URL_ENV_VAR] = testPrUrl;
+    assert.deepEqual(getPRUrl(), testPrUrl);
+  });
+});
+
+describe("getPRNumber", async () => {
+  await it("throws if the last part of the input is not a number", async () => {
+    assert.throws(() => getPRNumber(`${testPrUrl}/foo`));
+  });
+
+  await it("throws if the last part of the input is not a positive number", async () => {
+    assert.throws(() => getPRNumber(`${testPrUrl}/-100`));
+  });
+
+  await it("returns the PR number from an URL", async () => {
+    assert.equal(getPRNumber(testPrUrl), 42);
+  });
+});
+
+const testChangelog = `${EMPTY_CHANGELOG.trimEnd()}
+
+## 4.23.7
+
+- Other change
+
+## 4.23.6
+
+${NO_CHANGES_STR}`;
+
+const expectedChangelog = `# CodeQL Action Changelog
+
+## ${UNRELEASED_PLACEHOLDER}
+
+- Update default CodeQL bundle version to
+
+## 4.23.7
+
+- Other change
+
+## 4.23.6
+
+${NO_CHANGES_STR}`;
+
+describe("updateChangelog", async () => {
+  await it("removes `NO_CHANGES_STR` if present in [UNRELEASED] section", async () => {
+    const result = updateChangelog(EMPTY_CHANGELOG, "");
+    assert.ok(!result.includes(NO_CHANGES_STR.trim()));
+  });
+
+  await it("doesn't remove `NO_CHANGES_STR` if present in versioned section", async () => {
+    const result = updateChangelog(
+      EMPTY_CHANGELOG.replace(UNRELEASED_PLACEHOLDER, "1.2.3"),
+      "",
+    );
+    assert.ok(result.includes(NO_CHANGES_STR.trim()));
+  });
+
+  await it("throws if there are no sections", async () => {
+    assert.throws(() => {
+      updateChangelog(
+        "# CodeQL Action Changelog",
+        "- Update default CodeQL bundle version to",
+      );
+    });
+  });
+
+  await it("adds note at the end of the first section", async () => {
+    const result = updateChangelog(
+      testChangelog,
+      "- Update default CodeQL bundle version to",
+    );
+    assert.deepEqual(result, expectedChangelog);
+  });
+});
diff --git a/pr-checks/bundle-changelog.ts b/pr-checks/bundle-changelog.ts
new file mode 100755
index 0000000000..557a8556c1
--- /dev/null
+++ b/pr-checks/bundle-changelog.ts
@@ -0,0 +1,127 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Updates the changelog with a change note for an updated CodeQL CLI bundle.
+ */
+
+import * as fs from "node:fs";
+
+import {
+  parseChangelog,
+  renderChangelog,
+  UNRELEASED_PLACEHOLDER,
+} from "./changelog";
+import { CHANGELOG_FILE, CLI_BUNDLE_RELEASE_URL_PREFIX } from "./config";
+import { getErrorMessage } from "./util";
+
+export const CLI_VERSION_ENV_VAR = "CLI_VERSION";
+export const PR_URL_ENV_VAR = "PR_URL";
+
+/** Gets the CLI version from the environment. */
+export function getCLIVersion() {
+  const cliVersion = process.env[CLI_VERSION_ENV_VAR];
+
+  if (cliVersion === undefined || cliVersion.trim() === "") {
+    throw new Error(`No CLI version was set in '${CLI_VERSION_ENV_VAR}'.`);
+  }
+
+  return cliVersion;
+}
+
+/** Gets the PR URL from the environment. */
+export function getPRUrl() {
+  const prUrl = process.env[PR_URL_ENV_VAR];
+
+  if (prUrl === undefined || prUrl.trim() === "") {
+    throw new Error(`No PR URL was set in '${PR_URL_ENV_VAR}'.`);
+  }
+
+  return prUrl;
+}
+
+/**
+ * Gets the PR number from something like a PR URL.
+ */
+export function getPRNumber(prUrl: string) {
+  const prUrlParts = prUrl.split("/");
+  const prNumberStr = prUrlParts[prUrlParts.length - 1];
+
+  const prNumber = Number.parseInt(prNumberStr, 10);
+
+  if (!Number.isInteger(prNumber) || prNumber <= 0) {
+    throw new Error(
+      `Invalid PR URL '${prUrl}': last part is not a positive number`,
+    );
+  }
+
+  return prNumber;
+}
+
+/**
+ * Updates `changelog` by adding `changelogNote` to the first section.
+ *
+ * @param contents The existing changelog contents.
+ * @param changelogNote The note to add to the first section.
+ */
+export function updateChangelog(contents: string, changelogNote: string) {
+  // If the "[UNRELEASED]" section starts with "no user facing changes", remove that line.
+  contents = contents.replace(
+    `## ${UNRELEASED_PLACEHOLDER}\n\nNo user facing changes.`,
+    `## ${UNRELEASED_PLACEHOLDER}\n`,
+  );
+
+  const changelog = parseChangelog(contents);
+
+  if (changelog.sections.length === 0) {
+    throw new Error("The changelog contains no existing sections.");
+  }
+
+  // Add the changelog note to the bottom of the first section.
+  const firstSection = changelog.sections[0];
+  const lastLine = firstSection.bodyLines.pop();
+
+  if (lastLine !== undefined && lastLine.trim() !== "") {
+    // We expect the last line to be empty. If it isn't for some reason,
+    // add it back.
+    firstSection.bodyLines.push(lastLine);
+  }
+
+  firstSection.bodyLines.push(changelogNote);
+
+  // If the last line is empty as expected, then add it back in after the new note.
+  if (lastLine?.trim() === "") {
+    firstSection.bodyLines.push(lastLine);
+  }
+
+  return renderChangelog(changelog);
+}
+
+function main() {
+  try {
+    const cliVersion = getCLIVersion();
+    const prUrl = getPRUrl();
+
+    // The GitHub Release for the new bundle version.
+    const bundleReleaseUrl = `${CLI_BUNDLE_RELEASE_URL_PREFIX}${cliVersion}`;
+
+    // Get the PR number from the PR URL.
+    const prNumber = getPRNumber(prUrl);
+    const changelogNote = `- Update default CodeQL bundle version to [${cliVersion}](${bundleReleaseUrl}). [#${prNumber}](${prUrl})`;
+
+    let changelog = fs.readFileSync(CHANGELOG_FILE, "utf-8");
+
+    changelog = updateChangelog(changelog, changelogNote);
+
+    fs.writeFileSync(CHANGELOG_FILE, changelog);
+
+    return 0;
+  } catch (err) {
+    console.error(`Failed to bundle changelog: ${getErrorMessage(err)}`);
+    return -1;
+  }
+}
+
+// Only call `main` if this script was run directly.
+if (require.main === module) {
+  process.exit(main());
+}
diff --git a/pr-checks/changelog.test.ts b/pr-checks/changelog.test.ts
new file mode 100755
index 0000000000..817852e3e1
--- /dev/null
+++ b/pr-checks/changelog.test.ts
@@ -0,0 +1,72 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Tests for `changelog.ts`.
+ */
+
+import * as assert from "node:assert/strict";
+import * as fs from "node:fs";
+import { describe, it } from "node:test";
+
+import {
+  EMPTY_CHANGELOG,
+  getReleaseDateString,
+  parseChangelog,
+  processChangelogForBackports,
+  renderChangelog,
+  setVersionAndDate,
+} from "./changelog";
+import { CHANGELOG_FILE } from "./config";
+
+const testDate = new Date(2026, 7, 14);
+
+describe("getReleaseDateString", async () => {
+  await it("formats dates as expected", async () => {
+    assert.equal(getReleaseDateString(testDate), "14 Aug 2026");
+  });
+});
+
+const emptyChangelogExpected = `# CodeQL Action Changelog
+
+## 9.99.9 - 14 Aug 2026
+
+No user facing changes.
+
+`;
+
+describe("setVersionAndDate", async () => {
+  await it("replaces the placeholder", async () => {
+    const result = setVersionAndDate("9.99.9", EMPTY_CHANGELOG, testDate);
+    assert.equal(result, emptyChangelogExpected);
+  });
+});
+
+describe("parseChangelog + renderChangelog", async () => {
+  await it("renderChangelog(parseChangelog(c)) == c", async () => {
+    const actualChangelog = fs.readFileSync(CHANGELOG_FILE, "utf-8");
+    const roundtrip = renderChangelog(parseChangelog(actualChangelog));
+    assert.deepEqual(roundtrip.split("\n"), actualChangelog.split("\n"));
+  });
+});
+
+const testChangelog = `# CodeQL Action Changelog
+
+## 4.12.3 - 14 Aug 2026
+
+No user facing changes.
+`;
+
+const testChangelogResult: string = `# CodeQL Action Changelog
+
+## 3.12.3 - 14 Aug 2026
+
+No user facing changes.
+`;
+
+describe("processChangelogForBackports", async () => {
+  await it("replaces major versions", async () => {
+    const result = processChangelogForBackports("4", "3", testChangelog);
+
+    assert.deepEqual(result.split("\n"), testChangelogResult.split("\n"));
+  });
+});
diff --git a/pr-checks/changelog.ts b/pr-checks/changelog.ts
new file mode 100644
index 0000000000..4cf1e75494
--- /dev/null
+++ b/pr-checks/changelog.ts
@@ -0,0 +1,212 @@
+import * as fs from "node:fs";
+
+import { CHANGELOG_FILE, DryRunOption } from "./config";
+
+/** The placeholder in the header for unreleased changes. */
+export const UNRELEASED_PLACEHOLDER = "[UNRELEASED]";
+
+/** The default contents for a section in the changelog. */
+export const NO_CHANGES_STR = "No user facing changes.\n\n";
+
+/** Placeholder changelog content for a new release. */
+export const EMPTY_CHANGELOG = `# CodeQL Action Changelog
+
+## ${UNRELEASED_PLACEHOLDER}
+
+${NO_CHANGES_STR}`;
+
+/**
+ * Represents sections in a changelog.
+ */
+export interface ChangelogSection {
+  headerLine: string;
+  bodyLines: string[];
+}
+
+/**
+ * Represents a changelog.
+ */
+export interface Changelog {
+  preamble: string[];
+  sections: ChangelogSection[];
+}
+
+/** Returns `date` formatted as `DD Mon YYYY`. */
+export function getReleaseDateString(today: Date = new Date()): string {
+  return today.toLocaleDateString("en-GB", {
+    day: "2-digit",
+    month: "short",
+    year: "numeric",
+  });
+}
+
+export interface OpenChangelogOptions {
+  initChangelog?: boolean;
+}
+
+export function withChangelog(
+  transformer: (contents: string) => string,
+  options: DryRunOption & OpenChangelogOptions,
+): void {
+  let content: string;
+
+  if (options.initChangelog && !fs.existsSync(CHANGELOG_FILE)) {
+    content = EMPTY_CHANGELOG;
+  } else {
+    content = fs.readFileSync(CHANGELOG_FILE, "utf8");
+  }
+
+  if (!options.dryRun) {
+    fs.writeFileSync(CHANGELOG_FILE, transformer(content), "utf8");
+  } else {
+    console.info(`[DRY RUN] Would have written updated changelog.`);
+  }
+}
+
+/**
+ * Updates the `[UNRELEASED]` marker in `CHANGELOG.md` with the given version
+ * and today's date.
+ */
+export function setVersionAndDate(
+  version: string,
+  content: string,
+  date: Date = new Date(),
+): string {
+  const versionAndDate = `${version} - ${getReleaseDateString(date)}`;
+  return content.replace(UNRELEASED_PLACEHOLDER, versionAndDate);
+}
+
+/**
+ * Parses `content` into a structured representation of a changelog.
+ *
+ * @param content The contents of the changelog file.
+ */
+export function parseChangelog(content: string): Changelog {
+  const lines = content.split("\n");
+  let i = 0;
+
+  const preamble: string[] = [];
+  const sections: ChangelogSection[] = [];
+  let currentSection: ChangelogSection | undefined = undefined;
+
+  // Process all lines of the input file.
+  while (i < lines.length) {
+    const line = lines[i];
+
+    // Sections of the changelog start with `## `.
+    if (line.startsWith("## ")) {
+      // We have discovered a new section. If `currentSection` is already defined,
+      // then this marks the end of that section. Push it to the array of sections
+      // in the changelog.
+      if (currentSection !== undefined) {
+        sections.push(currentSection);
+      }
+
+      // Initialise the new section.
+      currentSection = { headerLine: line, bodyLines: [] };
+    } else if (currentSection !== undefined) {
+      // Add lines between the section header and the next to the current section.
+      currentSection.bodyLines.push(line);
+    } else {
+      // This is neither a section header nor are we in a section already,
+      // so this line is part of the preamble.
+      preamble.push(line);
+    }
+
+    i++;
+  }
+
+  // Push the current section to the array of completed sections, if there is
+  // still one unfinished.
+  if (currentSection !== undefined) {
+    sections.push(currentSection);
+  }
+
+  return { preamble, sections };
+}
+
+/**
+ * Combines an array of lines into a single string by adding line breaks.
+ */
+export function unlines(lines: string[]): string {
+  return `${lines.join("\n")}`;
+}
+
+/**
+ * Renders a given changelog to a string.
+ */
+export function renderChangelog(changelog: Changelog): string {
+  let result = unlines(changelog.preamble);
+
+  for (const section of changelog.sections) {
+    result += `\n${section.headerLine}\n${unlines(section.bodyLines)}`;
+  }
+
+  return result;
+}
+
+/**
+ * Processes changelog entries for a backport, converting version references
+ * from the source major version to the target major version and filtering
+ * entries that only apply to newer versions.
+ */
+export function processChangelogForBackports(
+  sourceBranchMajorVersion: string,
+  targetBranchMajorVersion: string,
+  content: string,
+): string {
+  // Changelog entries can use the following format to indicate
+  // that they only apply to newer versions
+  const someVersionsOnlyRegex = /\[v(\d+)\+ only\]/;
+
+  // Parse the changelog.
+  const changelog = parseChangelog(content);
+
+  if (changelog.sections.length === 0) {
+    throw new Error("Could not find any change sections in CHANGELOG.md");
+  }
+
+  // Filter out changelog entries that only apply to newer versions and
+  // update the section headings with the backport major version for
+  // sections we keep.
+  for (const section of changelog.sections) {
+    // Update the section headings with the backport major version.
+    section.headerLine = section.headerLine.replace(
+      `## ${sourceBranchMajorVersion}`,
+      `## ${targetBranchMajorVersion}`,
+    );
+
+    const filteredEntries: string[] = [];
+    let foundContent = false;
+
+    for (const line of section.bodyLines) {
+      // Skip the entry if `someVersionsOnlyRegex` matches and the major version
+      // of the target branch is smaller than the required version.
+      const match = someVersionsOnlyRegex.exec(line);
+      if (
+        match &&
+        Number.parseInt(targetBranchMajorVersion) < Number.parseInt(match[1])
+      ) {
+        continue;
+      }
+
+      // Keep the line.
+      filteredEntries.push(line);
+
+      // Set `foundContent` to `true` if the line is not empty.
+      if (line.trim() !== "") {
+        foundContent = true;
+      }
+    }
+
+    // Update the section with the retained entries.
+    section.bodyLines = filteredEntries;
+
+    // Add an entry if we didn't keep any.
+    if (!foundContent) {
+      section.bodyLines.push(NO_CHANGES_STR.trim());
+    }
+  }
+
+  return renderChangelog(changelog);
+}
diff --git a/pr-checks/checks/bundle-zstd.yml b/pr-checks/checks/bundle-zstd.yml
deleted file mode 100644
index a961af3c36..0000000000
--- a/pr-checks/checks/bundle-zstd.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-name: "Bundle: Zstandard checks"
-description: "A Zstandard CodeQL bundle should be extracted on supported operating systems"
-versions:
-  - linked
-operatingSystems:
-  - ubuntu
-  - macos
-  - windows
-steps:
-  - name: Remove CodeQL from toolcache
-    uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
-    with:
-      script: |
-        const fs = require('fs');
-        const path = require('path');
-        const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
-        if (codeqlPath !== undefined) {
-          fs.rmdirSync(codeqlPath, { recursive: true });
-        }
-  - id: init
-    uses: ./../action/init
-    with:
-      languages: javascript
-      tools: ${{ steps.prepare-test.outputs.tools-url }}
-  - uses: ./../action/analyze
-    with:
-      output: ${{ runner.temp }}/results
-      upload-database: false
-  - name: Upload SARIF
-    uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
-    with:
-      name: ${{ matrix.os }}-zstd-bundle.sarif
-      path: ${{ runner.temp }}/results/javascript.sarif
-      retention-days: 7
-  - name: Check diagnostic with expected tools URL appears in SARIF
-    uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
-    env:
-      SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
-    with:
-      script: |
-        const fs = require('fs');
-
-        const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
-        const run = sarif.runs[0];
-
-        const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
-        const downloadTelemetryNotifications = toolExecutionNotifications.filter(n =>
-          n.descriptor.id === 'codeql-action/bundle-download-telemetry'
-        );
-        if (downloadTelemetryNotifications.length !== 1) {
-          core.setFailed(
-            'Expected exactly one reporting descriptor in the ' +
-              `'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
-              `${downloadTelemetryNotifications.length}. All notification reporting descriptors: ` +
-              `${JSON.stringify(toolExecutionNotifications)}.`
-          );
-        }
-
-        const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
-        console.log(`Found tools URL: ${toolsUrl}`);
-
-        const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';
-
-        if (!toolsUrl.endsWith(expectedExtension)) {
-          core.setFailed(
-            `Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
-          );
-        }
diff --git a/pr-checks/checks/global-proxy.yml b/pr-checks/checks/global-proxy.yml
index 5f90022c04..9d9653c13c 100644
--- a/pr-checks/checks/global-proxy.yml
+++ b/pr-checks/checks/global-proxy.yml
@@ -5,17 +5,45 @@ versions:
   - nightly-latest
 container:
   image: ubuntu:22.04
+  options: --cap-add=NET_ADMIN
 services:
   squid-proxy:
     image: ubuntu/squid:latest
     ports:
       - 3128:3128
 env:
-  https_proxy: http://squid-proxy:3128
   CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
 steps:
+  - name: Block direct internet access to force proxy usage
+    run: |
+      apt-get update -qq && apt-get install -y -qq iptables >/dev/null 2>&1
+      PROXY_IP=$(getent hosts squid-proxy | awk '{ print $1 }')
+      echo "Squid proxy IP: $PROXY_IP"
+      # Allow all traffic to the proxy container
+      iptables -A OUTPUT -d "$PROXY_IP" -j ACCEPT
+      # Allow DNS resolution
+      iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
+      iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
+      # Allow loopback
+      iptables -A OUTPUT -o lo -j ACCEPT
+      # Allow already-established connections (from checkout/prepare-test)
+      iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+      # Block all other outbound HTTP and HTTPS, ensuring direct access fails
+      iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
+      iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
+      echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
+
+  - name: Set proxy environment variables
+    shell: bash
+    run: |
+      echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
+      echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
+      echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
+      echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
+
   - uses: ./../action/init
     with:
       languages: javascript
       tools: ${{ steps.prepare-test.outputs.tools-url }}
+
   - uses: ./../action/analyze
diff --git a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml
index 69f9b47621..f0b4097d7b 100644
--- a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml
+++ b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml
@@ -12,7 +12,7 @@ steps:
       languages: go
       tools: ${{ steps.prepare-test.outputs.tools-url }}
   # Deliberately change Go after the `init` step
-  - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
+  - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
     with:
       go-version: "1.20"
   - name: Build code
diff --git a/pr-checks/checks/job-run-uuid-sarif.yml b/pr-checks/checks/job-run-uuid-sarif.yml
index dc1dd02d43..b86725d944 100644
--- a/pr-checks/checks/job-run-uuid-sarif.yml
+++ b/pr-checks/checks/job-run-uuid-sarif.yml
@@ -21,8 +21,8 @@ steps:
     run: |
       cd "$RUNNER_TEMP/results"
       actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)
-      if [[ "$actual" != "$JOB_RUN_UUID" ]]; then
-        echo "Expected SARIF output to contain job run UUID '$JOB_RUN_UUID', but found '$actual'."
+      if [[ "$actual" != "$CODEQL_ACTION_JOB_RUN_UUID" ]]; then
+        echo "Expected SARIF output to contain job run UUID '$CODEQL_ACTION_JOB_RUN_UUID', but found '$actual'."
         exit 1
       else
         echo "Found job run UUID '$actual'."
diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml
index fcafe5fb35..b57e90ab4c 100644
--- a/pr-checks/checks/multi-language-autodetect.yml
+++ b/pr-checks/checks/multi-language-autodetect.yml
@@ -4,6 +4,16 @@ operatingSystems:
   - ubuntu
   - os: macos
     runner-image: macos-latest-xlarge
+  # Older CodeQL CLI versions only support Swift up to 6.1, which requires Xcode 16. That is
+  # not available on macOS 26, so run these versions on macOS 15 where we select Xcode 16
+  # below. See https://github.com/actions/runner-images/issues/14167.
+  - os: macos
+    runner-image: macos-15-xlarge
+    codeql-versions:
+      - stable-v2.19.4
+      - stable-v2.20.7
+      - stable-v2.21.4
+      - stable-v2.22.4
 env:
   CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI: true
 installGo: true
@@ -13,12 +23,13 @@ steps:
     # We need Python 3.13 for older CLI versions because they are not compatible with Python 3.14 or newer.
     # See https://github.com/github/codeql-action/pull/3212
     if: matrix.version != 'nightly-latest' && matrix.version != 'linked'
-    uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+    uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
     with:
       python-version: "3.13"
 
   - name: Use Xcode 16
-    if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
+    # Only the older CodeQL CLI versions need Xcode 16, and these run on macOS 15.
+    if: matrix.os == 'macos-15-xlarge'
     run: sudo xcode-select -s "/Applications/Xcode_16.app"
 
   - uses: ./../action/init
diff --git a/pr-checks/checks/rubocop-multi-language.yml b/pr-checks/checks/rubocop-multi-language.yml
index 35135a545b..37c5d36e90 100644
--- a/pr-checks/checks/rubocop-multi-language.yml
+++ b/pr-checks/checks/rubocop-multi-language.yml
@@ -5,7 +5,7 @@ versions:
   - default
 steps:
   - name: Set up Ruby
-    uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
+    uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
     with:
       ruby-version: 2.6
   - name: Install Code Scanning integration
diff --git a/pr-checks/checks/start-proxy.yml b/pr-checks/checks/start-proxy.yml
index a4bf794873..675fc013a2 100644
--- a/pr-checks/checks/start-proxy.yml
+++ b/pr-checks/checks/start-proxy.yml
@@ -6,16 +6,14 @@ operatingSystems:
   - windows
 versions:
   - linked
+env:
+  CODEQL_ACTION_PROXY_API_REQUESTS: "true"
 steps:
-  - uses: ./../action/init
-    with:
-      languages: csharp
-      tools: ${{ steps.prepare-test.outputs.tools-url }}
-
   - name: Setup proxy for registries
     id: proxy
     uses: ./../action/start-proxy
     with:
+      language: java
       registry_secrets: |
         [
           {
@@ -44,3 +42,13 @@ steps:
       || !contains(steps.proxy.outputs.proxy_urls, 'https://repo.maven.apache.org/maven2/')
       || !contains(steps.proxy.outputs.proxy_urls, 'https://repo1.maven.org/maven2')
     run: exit 1
+
+  - uses: ./../action/init
+    env:
+      CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
+      CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}
+      CODEQL_PROXY_CA_CERTIFICATE: ${{ steps.proxy.outputs.proxy_ca_certificate }}
+    with:
+      languages: java
+      tools: ${{ steps.prepare-test.outputs.tools-url }}
+      config-file: codeql-action@main:tests/multi-language-repo/.github/codeql/custom-queries.yml
diff --git a/pr-checks/checks/submit-sarif-failure.yml b/pr-checks/checks/submit-sarif-failure.yml
index 2bba971d72..c33e1322f7 100644
--- a/pr-checks/checks/submit-sarif-failure.yml
+++ b/pr-checks/checks/submit-sarif-failure.yml
@@ -21,7 +21,7 @@ permissions:
   security-events: write # needed to upload the SARIF file
 
 steps:
-  - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
   - uses: ./init
     with:
       languages: javascript
diff --git a/pr-checks/checks/swift-custom-build.yml b/pr-checks/checks/swift-custom-build.yml
index 7a07d5b7e2..a2d04421b8 100644
--- a/pr-checks/checks/swift-custom-build.yml
+++ b/pr-checks/checks/swift-custom-build.yml
@@ -11,9 +11,6 @@ installDotNet: true
 env:
   DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
 steps:
-  - name: Use Xcode 16
-    if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
-    run: sudo xcode-select -s "/Applications/Xcode_16.app"
   - uses: ./../action/init
     id: init
     with:
diff --git a/pr-checks/checks/with-checkout-path.yml b/pr-checks/checks/with-checkout-path.yml
index e91066e18e..a6cde895b6 100644
--- a/pr-checks/checks/with-checkout-path.yml
+++ b/pr-checks/checks/with-checkout-path.yml
@@ -14,7 +14,7 @@ steps:
       rm -rf ./* .github .git
   # Check out the actions repo again, but at a different location.
   # choose an arbitrary SHA so that we can later test that the commit_oid is not from main
-  - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
     with:
       ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
       path: x/y/z/some-path
diff --git a/pr-checks/config.ts b/pr-checks/config.ts
index 4c7cc03f38..356fe665f9 100644
--- a/pr-checks/config.ts
+++ b/pr-checks/config.ts
@@ -12,6 +12,12 @@ export const REPO_ROOT = path.join(PR_CHECKS_DIR, "..");
 /** The path of the file configuring which checks shouldn't be required. */
 export const PR_CHECK_EXCLUDED_FILE = path.join(PR_CHECKS_DIR, "excluded.yml");
 
+/** The path of the main `package.json`. */
+export const PACKAGE_JSON = path.join(REPO_ROOT, "package.json");
+
+/** The path of the changelog. */
+export const CHANGELOG_FILE = path.join(REPO_ROOT, "CHANGELOG.md");
+
 /** The path to the esbuild metadata file. */
 export const BUNDLE_METADATA_FILE = path.join(REPO_ROOT, "meta.json");
 
@@ -24,3 +30,19 @@ export const BUILTIN_LANGUAGES_FILE = path.join(
   "languages",
   "builtin.json",
 );
+
+/** Path to the api-compatibility.json file. */
+export const API_COMPATIBILITY_FILE = path.join(
+  SOURCE_ROOT,
+  "api-compatibility.json",
+);
+
+/** The prefix of CodeQL CLI bundle release URLs. */
+export const CLI_BUNDLE_RELEASE_URL_PREFIX =
+  "https://github.com/github/codeql-action/releases/tag/codeql-bundle-v";
+
+/** A common interface for operations that support dry runs. */
+export interface DryRunOption {
+  /** A value indicating whether to perform operations with side effects. */
+  dryRun?: boolean;
+}
diff --git a/pr-checks/excluded.yml b/pr-checks/excluded.yml
index d8d643d107..1a5262fc0b 100644
--- a/pr-checks/excluded.yml
+++ b/pr-checks/excluded.yml
@@ -10,6 +10,7 @@ is:
   - "check-expected-release-files"
   - "Cleanup artifacts"
   - "CodeQL"
+  - "copilot-pull-request-reviewer"
   - "Dependabot"
   - "Label PR with size"
   - "Post repo size comment"
diff --git a/pr-checks/package.json b/pr-checks/package.json
index 02b841e6d5..6c23d847f2 100644
--- a/pr-checks/package.json
+++ b/pr-checks/package.json
@@ -4,13 +4,14 @@
   "dependencies": {
     "@actions/core": "^2.0.3",
     "@actions/github": "^8.0.1",
-    "@octokit/core": "^7.0.6",
+    "@octokit/core": "^7.0.7",
     "@octokit/plugin-paginate-rest": ">=9.2.2",
     "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
+    "semver": "^7.8.5",
     "yaml": "^2.9.0"
   },
   "devDependencies": {
-    "@types/node": "^20.19.41",
-    "tsx": "^4.22.3"
+    "@types/node": "^20.19.43",
+    "tsx": "^4.23.8"
   }
 }
diff --git a/pr-checks/prepare-changelog.test.ts b/pr-checks/prepare-changelog.test.ts
new file mode 100644
index 0000000000..13a302c8f6
--- /dev/null
+++ b/pr-checks/prepare-changelog.test.ts
@@ -0,0 +1,54 @@
+/**
+ * Tests for `prepare-changelog.ts`.
+ */
+
+import * as assert from "node:assert/strict";
+import * as fs from "node:fs";
+import * as os from "node:os";
+import * as path from "node:path";
+import { afterEach, beforeEach, describe, it } from "node:test";
+
+import { EMPTY_CHANGELOG, NO_CHANGES_STR } from "./changelog";
+import { extractChangelogSnippet } from "./prepare-changelog";
+
+let testDir: string;
+
+beforeEach(() => {
+  // Set up a temporary directory for testing
+  testDir = fs.mkdtempSync(path.join(os.tmpdir(), "prepare-changelog-test-"));
+});
+
+afterEach(() => {
+  /** Clean up temporary directories. */
+  fs.rmSync(testDir, { recursive: true, force: true });
+});
+
+const testBody = `- Test change`;
+const testChangelog = `${EMPTY_CHANGELOG.replace(NO_CHANGES_STR, testBody)}
+
+## Another section
+
+- Other change`;
+
+describe("extractChangelogSnippet", async () => {
+  await it("returns the default body if the input doesn't exist", async () => {
+    const result = extractChangelogSnippet(path.join(testDir, "not-here.md"));
+    assert.deepEqual(result, NO_CHANGES_STR);
+  });
+
+  await it("returns the first section if the input exists", async () => {
+    const changelogPath = path.join(testDir, "test-readme.md");
+    fs.writeFileSync(changelogPath, testChangelog);
+
+    const result = extractChangelogSnippet(changelogPath);
+    assert.deepEqual(result, testBody);
+  });
+
+  await it("returns an empty string if there is no first section", async () => {
+    const changelogPath = path.join(testDir, "test-readme.md");
+    fs.writeFileSync(changelogPath, "# CodeQL Action Changelog\n");
+
+    const result = extractChangelogSnippet(changelogPath);
+    assert.deepEqual(result, "");
+  });
+});
diff --git a/pr-checks/prepare-changelog.ts b/pr-checks/prepare-changelog.ts
new file mode 100755
index 0000000000..0c89699fc8
--- /dev/null
+++ b/pr-checks/prepare-changelog.ts
@@ -0,0 +1,82 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Extracts the body of the first changelog section and outputs it to either
+ * stdout or a file.
+ */
+
+import * as fs from "node:fs";
+import { parseArgs } from "node:util";
+
+import { NO_CHANGES_STR, parseChangelog } from "./changelog";
+import { CHANGELOG_FILE } from "./config";
+import { getErrorMessage } from "./util";
+
+/**
+ * Prepare the changelog for the new release
+ * This function will extract the part of the changelog that
+ * we want to include in the new release.
+ *
+ * @param changelogPath The path to the changelog file.
+ */
+export function extractChangelogSnippet(changelogPath: string) {
+  try {
+    const content = fs.readFileSync(changelogPath, "utf-8");
+    const changelog = parseChangelog(content);
+
+    // Return an empty string if we couldn't find the first section.
+    if (changelog.sections.length === 0) {
+      return "";
+    }
+
+    return changelog.sections[0].bodyLines.join("\n").trim();
+  } catch (err) {
+    if (err instanceof Error && "code" in err && err.code === "ENOENT") {
+      console.error(`Changelog file at '${changelogPath}' does not exist.`);
+      return NO_CHANGES_STR;
+    } else {
+      throw Error(
+        `Failed to open changelog file at '${changelogPath}': ${getErrorMessage(err)}`,
+      );
+    }
+  }
+}
+
+function main() {
+  try {
+    const { values } = parseArgs({
+      options: {
+        changelog: {
+          type: "string",
+          short: "f",
+          default: CHANGELOG_FILE,
+        },
+        output: {
+          type: "string",
+          short: "o",
+        },
+      },
+      strict: true,
+    });
+
+    const body = extractChangelogSnippet(values.changelog);
+
+    // If no `output` argument was provided, output to stdout. Otherwise,
+    // write a file to the specified path.
+    if (values.output === undefined) {
+      console.info(body);
+    } else {
+      fs.writeFileSync(values.output, body);
+    }
+
+    return 0;
+  } catch (err) {
+    console.error(`Failed to prepare changelog: ${getErrorMessage(err)}`);
+    return -1;
+  }
+}
+
+// Only call `main` if this script was run directly.
+if (require.main === module) {
+  process.exit(main());
+}
diff --git a/pr-checks/rollback-changelog.test.ts b/pr-checks/rollback-changelog.test.ts
new file mode 100644
index 0000000000..5264755a69
--- /dev/null
+++ b/pr-checks/rollback-changelog.test.ts
@@ -0,0 +1,45 @@
+/**
+ * Tests for `rollback-changelog.ts`.
+ */
+
+import * as assert from "node:assert/strict";
+import * as fs from "node:fs";
+import { describe, it } from "node:test";
+
+import { getReleaseDateString, parseChangelog } from "./changelog";
+import { CHANGELOG_FILE } from "./config";
+import { updateChangelog } from "./rollback-changelog";
+
+describe("updateChangelog", async () => {
+  await it("replaces the first section with one for the rollback release", async () => {
+    const actualChangelog = parseChangelog(
+      fs.readFileSync(CHANGELOG_FILE, "utf-8"),
+    );
+    const existingFirstSection = actualChangelog.sections[0];
+
+    const today = new Date();
+    updateChangelog(actualChangelog, {
+      "new-version": "Test.1.3",
+      "rollback-version": "Test.1.2",
+      "target-version": "Test.1.1",
+      today,
+    });
+
+    // Check that the old, first section is gone.
+    for (const section of actualChangelog.sections) {
+      assert.notDeepEqual(section, existingFirstSection);
+    }
+
+    // Check that the new, first section matches our expectations.
+    const newFirstSection = actualChangelog.sections[0];
+    assert.deepEqual(
+      newFirstSection.headerLine,
+      `## Test.1.3 - ${getReleaseDateString(today)}`,
+    );
+    assert.equal(newFirstSection.bodyLines.length, 3);
+    assert.deepEqual(
+      newFirstSection.bodyLines[1],
+      `This release rolls back Test.1.2 due to issues with that release. It is identical to Test.1.1.`,
+    );
+  });
+});
diff --git a/pr-checks/rollback-changelog.ts b/pr-checks/rollback-changelog.ts
new file mode 100755
index 0000000000..15a37b1b7c
--- /dev/null
+++ b/pr-checks/rollback-changelog.ts
@@ -0,0 +1,84 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Replaces the current, first section of the changelog with a new one for the rollback release.
+ */
+
+import * as fs from "node:fs";
+import { parseArgs } from "node:util";
+
+import {
+  Changelog,
+  ChangelogSection,
+  getReleaseDateString,
+  parseChangelog,
+  renderChangelog,
+} from "./changelog";
+import { CHANGELOG_FILE } from "./config";
+import { getErrorMessage } from "./util";
+
+export interface RollbackChangelogInputs {
+  "target-version": string;
+  "rollback-version": string;
+  "new-version": string;
+  today?: Date;
+}
+
+/**
+ * Replaces the current, first section of the changelog with a new one for the rollback release.
+ */
+export function updateChangelog(
+  changelog: Changelog,
+  versions: RollbackChangelogInputs,
+) {
+  // Drop the existing first section.
+  changelog.sections.shift();
+
+  // Construct the section for the rollback version.
+  const newSection: ChangelogSection = {
+    headerLine: `## ${versions["new-version"]} - ${getReleaseDateString(versions.today)}`,
+    bodyLines: [
+      "",
+      `This release rolls back ${versions["rollback-version"]} due to issues with that release. It is identical to ${versions["target-version"]}.`,
+      "",
+    ],
+  };
+
+  // Add the new section at the top of the changelog.
+  changelog.sections.unshift(newSection);
+}
+
+function main() {
+  try {
+    const options = {
+      "target-version": { type: "string", short: "t" },
+      "rollback-version": { type: "string", short: "r" },
+      "new-version": { type: "string", short: "n" },
+    } as const;
+
+    const { values } = parseArgs({ options, strict: true });
+
+    for (const key of Object.keys(options)) {
+      const val = values[key as keyof typeof values];
+      if (val === undefined || val.trim() === "") {
+        throw new Error(`Argument '--${key}' is required.`);
+      }
+    }
+
+    const changelog = parseChangelog(fs.readFileSync(CHANGELOG_FILE, "utf-8"));
+    updateChangelog(changelog, values as RollbackChangelogInputs);
+    console.info(renderChangelog(changelog));
+
+    return 0;
+  } catch (err) {
+    console.error(
+      `Failed to prepare rollback changelog: ${getErrorMessage(err)}`,
+    );
+    return -1;
+  }
+}
+
+// Only call `main` if this script was run directly.
+if (require.main === module) {
+  process.exit(main());
+}
diff --git a/pr-checks/sync.ts b/pr-checks/sync.ts
index 4d7ae200a4..9dcce16fe5 100755
--- a/pr-checks/sync.ts
+++ b/pr-checks/sync.ts
@@ -54,6 +54,13 @@ type OperatingSystem =
       os: OperatingSystemIdentifier;
       /** Optional runner image label. */
       "runner-image"?: string;
+      /**
+       * Optional CodeQL versions to run on this entry. If specified, this entry runs only these
+       * versions. A sibling entry for the same OS that omits `codeql-versions` runs all versions
+       * not claimed by any sibling entry. This allows pinning specific CodeQL versions to a
+       * particular runner image while letting the remaining versions default to another.
+       */
+      "codeql-versions"?: string[];
     };
 
 /**
@@ -204,8 +211,8 @@ const languageSetups: LanguageSetups = {
         name: "Install Node.js",
         uses: pinnedUses(
           "actions/setup-node",
-          "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e",
-          "v6.4.0",
+          "820762786026740c76f36085b0efc47a31fe5020",
+          "v7.0.0",
         ),
         with: {
           "node-version": defaultLanguageVersions.javascript,
@@ -226,8 +233,8 @@ const languageSetups: LanguageSetups = {
         name: "Install Go",
         uses: pinnedUses(
           "actions/setup-go",
-          "4a3601121dd01d1626a1e23e37211e3254c1c06c",
-          "v6.4.0",
+          "b7ad1dad31e06c5925ef5d2fc7ad053ef454303e",
+          "v7.0.0",
         ),
         with: {
           "go-version": `\${{ inputs.go-version || '${defaultLanguageVersions.go}' }}`,
@@ -246,8 +253,8 @@ const languageSetups: LanguageSetups = {
         name: "Install Java",
         uses: pinnedUses(
           "actions/setup-java",
-          "be666c2fcd27ec809703dec50e508c2fdc7f6654",
-          "v5.2.0",
+          "b6effb05e454b25005698d916606bdc6ffcbf961",
+          "v5.7.0",
         ),
         with: {
           "java-version": `\${{ inputs.java-version || '${defaultLanguageVersions.java}' }}`,
@@ -264,8 +271,8 @@ const languageSetups: LanguageSetups = {
         name: "Install Python",
         uses: pinnedUses(
           "actions/setup-python",
-          "a309ff8b426b58ec0e2a45f0f869d46889d02405",
-          "v6.2.0",
+          "5fda3b95a4ea91299a34e894583c3862153e4b97",
+          "v7.0.0",
         ),
         with: {
           "python-version": `\${{ inputs.python-version || '${defaultLanguageVersions.python}' }}`,
@@ -281,8 +288,8 @@ const languageSetups: LanguageSetups = {
         name: "Install .NET",
         uses: pinnedUses(
           "actions/setup-dotnet",
-          "9a946fdbd5fb07b82b2f5a4466058b876ab72bb2",
-          "v5.3.0",
+          "a98b56852c35b8e3190ac28c8c2271da59106c68",
+          "v6.0.0",
         ),
         with: {
           "dotnet-version": `\${{ inputs.dotnet-version || '${defaultLanguageVersions.csharp}' }}`,
@@ -352,6 +359,28 @@ function generateJobMatrix(
 ): Array> {
   let matrix: Array> = [];
 
+  const operatingSystems = checkSpecification.operatingSystems ?? ["ubuntu"];
+
+  // For each OS, collect the CodeQL versions explicitly claimed by entries that specify
+  // `codeql-versions`. A sibling entry for the same OS that omits `codeql-versions` runs all
+  // versions not in this set.
+  const claimedVersionsByOs = new Map>();
+  for (const operatingSystemConfig of operatingSystems) {
+    if (typeof operatingSystemConfig === "string") {
+      continue;
+    }
+    const entryVersions = operatingSystemConfig["codeql-versions"];
+    if (!entryVersions) {
+      continue;
+    }
+    const claimed =
+      claimedVersionsByOs.get(operatingSystemConfig.os) ?? new Set();
+    for (const entryVersion of entryVersions) {
+      claimed.add(entryVersion);
+    }
+    claimedVersionsByOs.set(operatingSystemConfig.os, claimed);
+  }
+
   for (const version of checkSpecification.versions ?? defaultTestVersions) {
     if (version === "latest") {
       throw new Error(
@@ -364,7 +393,6 @@ function generateJobMatrix(
       "macos-latest",
       "windows-latest",
     ];
-    const operatingSystems = checkSpecification.operatingSystems ?? ["ubuntu"];
 
     for (const operatingSystemConfig of operatingSystems) {
       const operatingSystem =
@@ -379,6 +407,19 @@ function generateJobMatrix(
         continue;
       }
 
+      // An entry that specifies `codeql-versions` runs only those versions. A sibling entry for
+      // the same OS that omits `codeql-versions` runs all versions not claimed by its siblings.
+      const entryVersions =
+        typeof operatingSystemConfig === "string"
+          ? undefined
+          : operatingSystemConfig["codeql-versions"];
+      const runsThisVersion = entryVersions
+        ? entryVersions.includes(version)
+        : !claimedVersionsByOs.get(operatingSystem)?.has(version);
+      if (!runsThisVersion) {
+        continue;
+      }
+
       const runnerImagesForOs =
         typeof operatingSystemConfig === "string" ||
         operatingSystemConfig["runner-image"] === undefined
@@ -488,8 +529,8 @@ function generateJob(
       name: "Check out repository",
       uses: pinnedUses(
         "actions/checkout",
-        "df4cb1c069e1874edd31b4311f1884172cec0e10",
-        "v6.0.3",
+        "3d3c42e5aac5ba805825da76410c181273ba90b1",
+        "v7.0.1",
       ),
     },
     ...setupInfo.steps,
@@ -724,9 +765,7 @@ function main(): void {
         push: {
           branches: ["main", "releases/v*"],
         },
-        pull_request: {
-          types: ["opened", "synchronize", "reopened", "ready_for_review"],
-        },
+        pull_request: {},
         merge_group: {
           types: ["checks_requested"],
         },
diff --git a/pr-checks/update-ghes-versions.test.ts b/pr-checks/update-ghes-versions.test.ts
new file mode 100644
index 0000000000..187c067c37
--- /dev/null
+++ b/pr-checks/update-ghes-versions.test.ts
@@ -0,0 +1,204 @@
+#!/usr/bin/env npx tsx
+
+/*
+ * Tests for the update-ghes-versions.ts script
+ */
+
+import * as assert from "node:assert/strict";
+import { describe, it } from "node:test";
+
+import {
+  addWeeks,
+  determineSupportedRange,
+  type EnterpriseReleases,
+  parseEnterpriseVersion,
+  printEnterpriseVersion,
+} from "./update-ghes-versions";
+
+describe("parseEnterpriseVersion", async () => {
+  await it("parses a two-component version string", () => {
+    const ver = parseEnterpriseVersion("3.10");
+    assert.notEqual(ver, null);
+    assert.equal(ver!.major, 3);
+    assert.equal(ver!.minor, 10);
+    assert.equal(ver!.patch, 0);
+  });
+
+  await it("parses a three-component version string", () => {
+    const ver = parseEnterpriseVersion("3.10.2");
+    assert.notEqual(ver, null);
+    assert.equal(ver!.major, 3);
+    assert.equal(ver!.minor, 10);
+    assert.equal(ver!.patch, 2);
+  });
+
+  await it("returns null for invalid input", () => {
+    assert.equal(parseEnterpriseVersion("not-a-version"), null);
+  });
+});
+
+describe("printEnterpriseVersion", async () => {
+  await it("prints only major.minor when patch is 0", () => {
+    const ver = parseEnterpriseVersion("3.10")!;
+    assert.equal(printEnterpriseVersion(ver), "3.10");
+  });
+
+  await it("includes patch when non-zero", () => {
+    const ver = parseEnterpriseVersion("3.10.2")!;
+    assert.equal(printEnterpriseVersion(ver), "3.10.2");
+  });
+});
+
+describe("addWeeks", async () => {
+  await it("adds weeks to a date", () => {
+    const date = new Date("2025-01-01T00:00:00Z");
+    const result = addWeeks(date, 2);
+    assert.equal(result.toISOString(), "2025-01-15T00:00:00.000Z");
+  });
+
+  await it("does not mutate the original date", () => {
+    const date = new Date("2025-01-01T00:00:00Z");
+    addWeeks(date, 2);
+    assert.equal(date.toISOString(), "2025-01-01T00:00:00.000Z");
+  });
+});
+
+/**
+ * Helper to build a release entry with a feature freeze and end-of-life date.
+ * Dates are ISO date strings (e.g. "2025-06-01").
+ */
+function release(featureFreeze: string, end: string) {
+  return { feature_freeze: featureFreeze, end };
+}
+
+describe("determineSupportedRange", async () => {
+  // A fixed "today" for deterministic tests.
+  const today = new Date("2025-06-15");
+
+  const farPastEnd = "2020-01-01";
+  const farFutureEnd = "2099-12-31";
+  const farPastFreeze = "2020-01-01";
+  const farFutureFreeze = "2099-12-31";
+
+  await it("returns the only supported release as both min and max", () => {
+    const releases: EnterpriseReleases = {
+      "3.10": release(farPastFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      { minimumVersion: "3.10", maximumVersion: "3.10" },
+      releases,
+    );
+    assert.equal(result.minimumVersion, "3.10");
+    assert.equal(result.maximumVersion, "3.10");
+  });
+
+  await it("determines the range from multiple supported releases", () => {
+    const releases: EnterpriseReleases = {
+      "3.10": release(farPastFreeze, farFutureEnd),
+      "3.11": release(farPastFreeze, farFutureEnd),
+      "3.12": release(farPastFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      { minimumVersion: "3.10", maximumVersion: "3.12" },
+      releases,
+    );
+    assert.equal(result.minimumVersion, "3.10");
+    assert.equal(result.maximumVersion, "3.12");
+  });
+
+  await it("drops an end-of-life release from the minimum", () => {
+    const releases: EnterpriseReleases = {
+      // 3.10 has been end of life for a long time.
+      "3.10": release(farPastFreeze, farPastEnd),
+      "3.11": release(farPastFreeze, farFutureEnd),
+      "3.12": release(farPastFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      { minimumVersion: "3.10", maximumVersion: "3.12" },
+      releases,
+    );
+    assert.equal(result.minimumVersion, "3.11");
+    assert.equal(result.maximumVersion, "3.12");
+  });
+
+  await it("bumps the maximum when a newer release's feature freeze has passed", () => {
+    const releases: EnterpriseReleases = {
+      "3.10": release(farPastFreeze, farFutureEnd),
+      "3.11": release(farPastFreeze, farFutureEnd),
+      // 3.12 has a feature freeze far in the past, so it should be picked up.
+      "3.12": release(farPastFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      // The stored maximum is 3.11, but 3.12 should be picked up.
+      { minimumVersion: "3.10", maximumVersion: "3.11" },
+      releases,
+    );
+    assert.equal(result.minimumVersion, "3.10");
+    assert.equal(result.maximumVersion, "3.12");
+  });
+
+  await it("does not bump the maximum when feature freeze is far in the future", () => {
+    const releases: EnterpriseReleases = {
+      "3.10": release(farPastFreeze, farFutureEnd),
+      "3.11": release(farPastFreeze, farFutureEnd),
+      // 3.12 has a feature freeze far in the future, so it should NOT be picked up.
+      "3.12": release(farFutureFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      { minimumVersion: "3.10", maximumVersion: "3.11" },
+      releases,
+    );
+    assert.equal(result.minimumVersion, "3.10");
+    assert.equal(result.maximumVersion, "3.11");
+  });
+
+  await it("ignores releases older than the first supported release (2.22)", () => {
+    const releases: EnterpriseReleases = {
+      "2.21": release(farPastFreeze, farFutureEnd),
+      "3.10": release(farPastFreeze, farFutureEnd),
+      "3.11": release(farPastFreeze, farFutureEnd),
+    };
+    const result = determineSupportedRange(
+      today,
+      { minimumVersion: "3.10", maximumVersion: "3.11" },
+      releases,
+    );
+    // 2.21 is older than 2.22, so it should be ignored — 3.10 remains the minimum.
+    assert.equal(result.minimumVersion, "3.10");
+    assert.equal(result.maximumVersion, "3.11");
+  });
+
+  await it("throws when no supported releases remain", () => {
+    const releases: EnterpriseReleases = {
+      // All releases are end of life.
+      "3.10": release(farPastFreeze, farPastEnd),
+      "3.11": release(farPastFreeze, farPastEnd),
+    };
+    assert.throws(
+      () =>
+        determineSupportedRange(
+          today,
+          { minimumVersion: "3.10", maximumVersion: "3.11" },
+          releases,
+        ),
+      /Could not determine oldest supported release/,
+    );
+  });
+
+  await it("throws when maximumVersion is not a valid version", () => {
+    assert.throws(
+      () =>
+        determineSupportedRange(
+          today,
+          { minimumVersion: "3.10", maximumVersion: "invalid" },
+          {},
+        ),
+      /is not a valid semantic version/,
+    );
+  });
+});
diff --git a/pr-checks/update-ghes-versions.ts b/pr-checks/update-ghes-versions.ts
new file mode 100755
index 0000000000..055424dff1
--- /dev/null
+++ b/pr-checks/update-ghes-versions.ts
@@ -0,0 +1,243 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Updates src/api-compatibility.json with the current range of supported
+ * GitHub Enterprise Server versions by reading the releases.json file from
+ * an `enterprise-releases` checkout.
+ */
+
+import * as fs from "node:fs";
+import * as path from "node:path";
+
+import { type SemVer } from "semver";
+import * as semver from "semver";
+
+import * as json from "../src/json";
+
+import { API_COMPATIBILITY_FILE } from "./config";
+
+/** The first GHES version that included Code Scanning. */
+const FIRST_SUPPORTED_RELEASE: SemVer = new semver.SemVer("2.22.0");
+
+/** Environment variables specific to this script. */
+export enum EnvVar {
+  ENTERPRISE_RELEASES_PATH = "ENTERPRISE_RELEASES_PATH",
+}
+
+/**
+ * The semver specification requires three numeric components, but GHES release families
+ * only have two. This function uses `semver.coerce` to first coerce the version string
+ * into an acceptable input for `semver.parse`. E.g. `3.10` becomes `3.10.0`.
+ */
+export function parseEnterpriseVersion(val: string): SemVer | null {
+  return semver.parse(semver.coerce(val));
+}
+
+/**
+ * Mirroring `parseEnterpriseVersion`, this function returns only the major and minor
+ * version components from `ver`.
+ */
+export function printEnterpriseVersion(ver: SemVer) {
+  if (ver.patch === 0) {
+    return `${ver.major}.${ver.minor}`;
+  }
+  return ver.toString();
+}
+
+/** The JSON schema for `API_COMPATIBILITY_FILE`. */
+const apiCompatibilitySchema = {
+  minimumVersion: json.string,
+  maximumVersion: json.string,
+} as const satisfies json.Schema;
+
+/** The type representing the expected contents of `API_COMPATIBILITY_FILE`. */
+type ApiCompatibility = json.FromSchema;
+
+/** Reads the current contents of the `API_COMPATIBILITY_FILE` file. */
+export function readApiCompatibility(): ApiCompatibility {
+  const apiCompatibilityData: unknown = JSON.parse(
+    fs.readFileSync(API_COMPATIBILITY_FILE, "utf8"),
+  );
+
+  if (!json.isObject(apiCompatibilityData)) {
+    throw new Error(
+      `Expected '${API_COMPATIBILITY_FILE}' to contain an object.`,
+    );
+  }
+  if (!json.validateSchema(apiCompatibilitySchema, apiCompatibilityData)) {
+    throw new Error(
+      `The contents of '${API_COMPATIBILITY_FILE}' do not match the expected JSON schema.`,
+    );
+  }
+
+  return apiCompatibilityData;
+}
+
+/** The JSON schema for entries in the `releases.json` file. */
+const releaseDataSchema = {
+  feature_freeze: json.string,
+  end: json.string,
+} as const satisfies json.Schema;
+
+/** The type representing entries in the `releases.json` file. */
+export type ReleaseData = json.FromSchema;
+
+/** A mapping from GHES releases to release information. */
+export type EnterpriseReleases = Record;
+
+/** Reads information about GHES releases. */
+export function readEnterpriseReleases(
+  enterpriseReleasesPath: string,
+): EnterpriseReleases {
+  const releaseFilePath = path.join(enterpriseReleasesPath, "releases.json");
+  const releases: unknown = JSON.parse(
+    fs.readFileSync(releaseFilePath, "utf8"),
+  );
+
+  if (!json.isObject(releases)) {
+    throw new Error(`Expected '${releaseFilePath}' to contain an object.`);
+  }
+
+  // Remove GHES version using a previous version numbering scheme.
+  delete releases["11.10"];
+
+  // Validate that the object satisfies the schema.
+  for (const [, releaseData] of Object.entries(releases)) {
+    if (!json.isObject(releaseData)) {
+      throw new Error(
+        `Expected release data to be an object, but it is ${typeof releaseData}.`,
+      );
+    }
+    if (!json.validateSchema(releaseDataSchema, releaseData)) {
+      throw new Error("Expected release data to satisfy schema.");
+    }
+  }
+
+  return releases;
+}
+
+/** Adds `weeks`-many weeks to the UTC date of `date`. */
+export function addWeeks(date: Date, weeks: number): Date {
+  const result = new Date(date);
+  result.setUTCDate(date.getUTCDate() + weeks * 7);
+  return result;
+}
+
+/** Determines the current range of GHES versions we should support. */
+export function determineSupportedRange(
+  today: Date,
+  apiCompatibilityData: ApiCompatibility,
+  releases: EnterpriseReleases,
+): ApiCompatibility {
+  // We only care about the UTC date component.
+  today.setUTCHours(0, 0, 0, 0);
+
+  // Our goal is to identify the oldest and newest GHES release we should support.
+  // We begin with `oldestSupportRelease = undefined` so that we determine the
+  // minimum from scratch and don't stick to `apiCompatibilityData.minimumVersion`
+  // when it is no longer supported.
+  // For `newestSupportedRelease`, we assume that `apiCompatibilityData.maximumVersion`
+  // is guaranteed to not be outdated.
+  let oldestSupportedRelease: SemVer | undefined;
+  let newestSupportedRelease = parseEnterpriseVersion(
+    apiCompatibilityData.maximumVersion,
+  );
+
+  if (newestSupportedRelease === null) {
+    throw new Error(
+      `${apiCompatibilityData.maximumVersion} is not a valid semantic version.`,
+    );
+  }
+
+  // NOTE: We deliberately omit including any data from `releases` in the error messages below.
+
+  for (const [releaseVersionString, releaseData] of Object.entries(releases)) {
+    const releaseVersion = parseEnterpriseVersion(releaseVersionString);
+
+    if (releaseVersion === null) {
+      throw new Error("Invalid enterprise release version.");
+    }
+
+    // Ignore GHES releases older than `FIRST_SUPPORTED_RELEASE`.
+    if (semver.compare(releaseVersion, FIRST_SUPPORTED_RELEASE) < 0) {
+      continue;
+    }
+
+    // Set `newestSupportedRelease` to a GHES release if it has a greater version
+    // than the current `newestSupportedRelease` and the feature freeze has
+    // already happened or will be in the next two weeks.
+    if (semver.compare(releaseVersion, newestSupportedRelease) > 0) {
+      const featureFreezeDate = new Date(releaseData.feature_freeze);
+      if (featureFreezeDate < addWeeks(today, 2)) {
+        newestSupportedRelease = releaseVersion;
+      }
+    }
+
+    if (
+      oldestSupportedRelease === undefined ||
+      semver.compare(releaseVersion, oldestSupportedRelease) < 0
+    ) {
+      const endOfLifeDate = new Date(releaseData.end);
+      // The GHES version is not actually end of life until the end of the day
+      // specified by `endOfLifeDate`. Wait an extra week to be safe.
+      const isEndOfLife = today > addWeeks(endOfLifeDate, 1);
+      if (!isEndOfLife) {
+        oldestSupportedRelease = releaseVersion;
+      }
+    }
+  }
+
+  if (!oldestSupportedRelease) {
+    throw new Error("Could not determine oldest supported release.");
+  }
+
+  return {
+    maximumVersion: printEnterpriseVersion(newestSupportedRelease),
+    minimumVersion: printEnterpriseVersion(oldestSupportedRelease),
+  };
+}
+
+function main() {
+  const enterpriseReleasesPath = process.env[EnvVar.ENTERPRISE_RELEASES_PATH];
+  if (!enterpriseReleasesPath) {
+    throw new Error(
+      `${EnvVar.ENTERPRISE_RELEASES_PATH} environment variable must be set`,
+    );
+  }
+
+  // Get the version compatibility data stored in the repo.
+  const apiCompatibilityData = readApiCompatibility();
+
+  // Get the GHES release information.
+  const releases = readEnterpriseReleases(enterpriseReleasesPath);
+
+  // Determine the supported range.
+  const newCompatibilityData: ApiCompatibility = determineSupportedRange(
+    new Date(),
+    apiCompatibilityData,
+    releases,
+  );
+
+  // If the version range has changed, write the updates to `API_COMPATIBILITY_FILE`.
+  if (
+    newCompatibilityData.minimumVersion !==
+      apiCompatibilityData.minimumVersion ||
+    newCompatibilityData.maximumVersion !== apiCompatibilityData.maximumVersion
+  ) {
+    const data = JSON.stringify(newCompatibilityData);
+    fs.writeFileSync(API_COMPATIBILITY_FILE, `${data}\n`);
+
+    console.log(
+      `Updated '${path.basename(API_COMPATIBILITY_FILE)}': ${newCompatibilityData.minimumVersion} - ${newCompatibilityData.maximumVersion}`,
+    );
+  } else {
+    console.log(
+      `No changes, not writing to '${path.basename(API_COMPATIBILITY_FILE)}'.`,
+    );
+  }
+}
+
+// Only call `main` if this script was run directly.
+if (require.main === module) {
+  main();
+}
diff --git a/pr-checks/update-release-branch.ts b/pr-checks/update-release-branch.ts
new file mode 100755
index 0000000000..088da59281
--- /dev/null
+++ b/pr-checks/update-release-branch.ts
@@ -0,0 +1,840 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Creates a release preparation branch and opens a PR to merge changes from a
+ * source branch into a target release branch.
+ *
+ * For primary releases this merges `main` into the latest `releases/vN` branch.
+ * For backports this merges a newer release branch into an older one, handling
+ * version number and changelog migration automatically.
+ *
+ * Usage:
+ *   update-release-branch.ts \
+ *     --repository-nwo github/codeql-action \
+ *     --source-branch main \
+ *     --target-branch releases/v4 \
+ *     --conductor username \
+ *     [--is-primary-release] \
+ *     [--dry-run]
+ */
+
+import { execFileSync, type ExecFileSyncOptions } from "node:child_process";
+import { parseArgs } from "node:util";
+
+import { type ApiClient, getApiClient } from "./api-client";
+import * as changelog from "./changelog";
+import { DryRunOption, REPO_ROOT } from "./config";
+import {
+  getCurrentVersion,
+  replaceVersionInPackageJson,
+  withPackageJson,
+} from "./versions";
+
+/**
+ * NB: This exact commit message is used to find commits for reverting during backports.
+ *  Changing it requires a transition period where both old and new versions are supported.
+ */
+export const BACKPORT_COMMIT_MESSAGE = "Update version and changelog for v";
+
+/**
+ * Commit message used for rebuild commits, both those produced by this script and those produced
+ *  by the `Rebuild Action` workflow (`.github/workflows/rebuild.yml`).
+ */
+export const REBUILD_COMMIT_MESSAGE = "Rebuild";
+
+/** The name of the git remote. */
+const ORIGIN = "origin";
+
+/** Environment variables checked (in order) for a GitHub API token. */
+const TOKEN_ENVIRONMENT_VARIABLES = ["GH_TOKEN", "GITHUB_TOKEN"] as const;
+
+/** The expected prefix for release branch names. */
+const RELEASE_BRANCH_PREFIX = "releases/v";
+
+/**
+ * Gets a GitHub API token from one of the supported environment variables.
+ * @throws If none of the supported environment variables is set.
+ */
+export function getGitHubToken(): string {
+  for (const name of TOKEN_ENVIRONMENT_VARIABLES) {
+    const token = process.env[name]?.trim();
+    if (token) {
+      return token;
+    }
+  }
+  throw new Error("Missing GitHub token. Set GITHUB_TOKEN or GH_TOKEN.");
+}
+
+/** Options for {@link runCommand}. */
+export interface RunCommandOptions extends DryRunOption {
+  /** Options for `execFileSync`. */
+  execOptions?: ExecFileSyncOptions;
+}
+
+/**
+ * Runs a command, streaming output to the console by default.
+ *
+ * @param command The name of the command to run.
+ * @param args The arguments for the command.
+ * @throws When the process exits with a non-zero exit code.
+ * @param options How to run the command.
+ */
+export function runCommand(
+  command: string,
+  args: string[],
+  options?: RunCommandOptions,
+) {
+  if (!options?.dryRun) {
+    console.log(`Running \`${command} ${args.join(" ")}\`.`);
+    return execFileSync(command, args, {
+      stdio: "inherit",
+      cwd: REPO_ROOT,
+      ...options?.execOptions,
+    });
+  } else {
+    console.info(
+      `[DRY RUN] Would have executed '${command} ${args.join(" ")}'`,
+    );
+    return "";
+  }
+}
+
+/** Options for {@link runGit}. */
+export interface RunGitOptions extends DryRunOption {
+  /** When true, non-zero exit codes will not throw. */
+  allowNonZeroExitCode?: boolean;
+}
+
+/**
+ * Runs `git` with the given `args` and returns the stdout.
+ *
+ * @param args - Arguments to pass to `git`.
+ * @param options - Optional settings.
+ * @throws If `git` does not exit successfully, unless
+ *         `options.allowNonZeroExitCode` is `true`.
+ * @returns The trimmed stdout output.
+ */
+export function runGit(args: string[], options?: RunGitOptions): string {
+  const execOptions: ExecFileSyncOptions = {
+    encoding: "utf8",
+    stdio: ["pipe", "pipe", "pipe"],
+  };
+
+  try {
+    const result = runCommand("git", args, {
+      dryRun: options?.dryRun,
+      execOptions,
+    }) as string;
+    return result.trimEnd();
+  } catch (error: unknown) {
+    if (options?.allowNonZeroExitCode) {
+      // execFileSync throws an object with `stdout` when the process exits
+      // with a non-zero code.
+      const execError = error as { stdout?: Buffer | string };
+      if (typeof execError.stdout === "string") {
+        return execError.stdout.trimEnd();
+      }
+      if (Buffer.isBuffer(execError.stdout)) {
+        return execError.stdout.toString("utf8").trimEnd();
+      }
+      return "";
+    }
+    throw error;
+  }
+}
+
+/** Returns true if the given branch exists on the origin remote. */
+export function branchExistsOnRemote(branchName: string): boolean {
+  const result = runGit(["ls-remote", "--heads", ORIGIN, branchName]);
+  return result !== "";
+}
+
+/** Represents commits returned by the GitHub API (relevant fields only). */
+export interface GitHubCommit {
+  sha: string;
+  commit: { message: string; author: { date?: string } | null };
+  author: { login: string } | null;
+  committer: { login: string } | null;
+  parents: Array<{ sha: string }>;
+}
+
+/** Returns true if the commit is an automatic PR merge commit made by GitHub. */
+export function isPrMergeCommit(commit: GitHubCommit): boolean {
+  return commit.committer?.login === "web-flow" && commit.parents.length > 1;
+}
+
+/**
+ * Gets a list of commits on the source branch that are not on the target branch,
+ * excluding automatic PR merge commits. This will not include any commits that
+ * exist on the target branch that aren't on the source branch.
+ *
+ * Uses `git log` to find the SHAs, then fetches each commit from the GitHub API
+ * to obtain full metadata (author, parents, associated PRs, etc.).
+ *
+ * @param client - An authenticated GitHub API client.
+ * @param owner - The repository owner.
+ * @param repo - The repository name.
+ * @param sourceBranch - The source branch name (without `origin/` prefix).
+ * @param targetBranch - The target branch name (without `origin/` prefix).
+ * @returns The list of non-merge commits unique to the source branch.
+ */
+export async function getCommitDifference(
+  client: ApiClient,
+  owner: string,
+  repo: string,
+  sourceBranch: string,
+  targetBranch: string,
+): Promise {
+  const logOutput = runGit([
+    "log",
+    "--pretty=format:%H",
+    `${ORIGIN}/${targetBranch}..${ORIGIN}/${sourceBranch}`,
+  ]);
+
+  // An empty log output means no commits to merge.
+  if (logOutput === "") {
+    return [];
+  }
+
+  const shas = logOutput.split("\n");
+
+  // Fetch full commit objects from the API.
+  console.info(
+    `Fetching information about ${shas.length} commits from the API...`,
+  );
+
+  const commits: GitHubCommit[] = [];
+  for (const sha of shas) {
+    const { data } = await client.rest.repos.getCommit({
+      owner,
+      repo,
+      ref: sha,
+    });
+    commits.push(data as GitHubCommit);
+  }
+
+  // Filter out automatic PR merge commits.
+  return commits.filter((c) => !isPrMergeCommit(c));
+}
+
+/** Truncates a commit message for display. */
+export function getTruncatedCommitMessage(message: string): string {
+  const firstLine = message.split("\n")[0];
+  if (firstLine.length > 60) {
+    return `${firstLine.slice(0, 57)}...`;
+  }
+  return firstLine;
+}
+
+/** Represents pull requests associated with a commit (relevant fields only). */
+export interface AssociatedPullRequest {
+  number: number;
+  user: { login: string; site_admin: boolean } | null;
+  merge_commit_sha: string | null;
+}
+
+/**
+ * Gets the pull request that introduced a commit to the source branch.
+ * Returns the earliest PR by number if multiple are associated.
+ */
+export async function getPrForCommit(
+  client: ApiClient,
+  owner: string,
+  repo: string,
+  commit: GitHubCommit,
+): Promise {
+  const prs = await client.paginate(
+    client.rest.repos.listPullRequestsAssociatedWithCommit,
+    {
+      owner,
+      repo,
+      commit_sha: commit.sha,
+    },
+  );
+
+  if (prs.length === 0) {
+    return undefined;
+  }
+
+  // Return the earliest PR by number.
+  const sorted = [...prs].sort((a, b) => a.number - b.number);
+  return sorted[0];
+}
+
+/**
+ * Get the login of the person who merged a pull request.
+ * Falls back to the commit author of the merge commit.
+ * For most cases this will be the same as the author, but for PRs opened
+ * by external contributors getting the merger will get us the GitHub
+ * employee who reviewed and merged the PR.
+ */
+export async function getMergerOfPr(
+  client: ApiClient,
+  owner: string,
+  repo: string,
+  pr: AssociatedPullRequest,
+): Promise {
+  if (!pr.merge_commit_sha) {
+    return "unknown";
+  }
+  const { data: commit } = await client.rest.repos.getCommit({
+    owner,
+    repo,
+    ref: pr.merge_commit_sha,
+  });
+  return commit.author?.login ?? "unknown";
+}
+
+/**
+ * Returns the PR author's login if they are GitHub staff (site_admin),
+ * otherwise undefined.
+ */
+export function getPrAuthorIfStaff(
+  pr: AssociatedPullRequest,
+): string | undefined {
+  if (pr.user?.site_admin) {
+    return pr.user.login;
+  }
+  return undefined;
+}
+
+/** Parameters for {@link openPr}. */
+interface OpenPrParams {
+  client: ApiClient;
+  owner: string;
+  repo: string;
+  commits: GitHubCommit[];
+  sourceBranchShortSha: string;
+  newBranchName: string;
+  sourceBranch: string;
+  targetBranch: string;
+  conductor: string;
+  isPrimaryRelease: boolean;
+  conflictedFiles: string[];
+  dryRun: boolean;
+}
+
+/**
+ * Opens a pull request from the new branch to the target branch and assigns
+ * the conductor.
+ */
+export async function openPr(params: OpenPrParams): Promise {
+  const {
+    client,
+    owner,
+    repo,
+    commits,
+    sourceBranchShortSha,
+    newBranchName,
+    sourceBranch,
+    targetBranch,
+    conductor,
+    isPrimaryRelease,
+    conflictedFiles,
+    dryRun,
+  } = params;
+
+  // Sort the commits into those with and without associated PRs.
+  const pullRequests: AssociatedPullRequest[] = [];
+  const commitsWithoutPrs: GitHubCommit[] = [];
+
+  console.info(`Finding PRs for ${commits.length} commits...`);
+
+  for (const commit of commits) {
+    const pr = await getPrForCommit(client, owner, repo, commit);
+    if (!pr) {
+      commitsWithoutPrs.push(commit);
+    } else if (!pullRequests.some((p) => p.number === pr.number)) {
+      pullRequests.push(pr);
+    }
+  }
+
+  console.log(`Found ${pullRequests.length} pull requests.`);
+  console.log(
+    `Found ${commitsWithoutPrs.length} commits not in a pull request.`,
+  );
+
+  // Sort PRs by number (ascending) and commits by date.
+  pullRequests.sort((a, b) => a.number - b.number);
+  commitsWithoutPrs.sort((a, b) => {
+    const dateA = a.commit.author?.date ?? "";
+    const dateB = b.commit.author?.date ?? "";
+    return dateA.localeCompare(dateB);
+  });
+
+  // Build the PR body.
+  const body: string[] = [];
+  body.push(`Merging ${sourceBranchShortSha} into \`${targetBranch}\`.`);
+  body.push("");
+  body.push(`Conductor for this PR is @${conductor}.`);
+
+  if (pullRequests.length > 0) {
+    body.push("");
+    body.push("Contains the following pull requests:");
+    for (const pr of pullRequests) {
+      const displayUser =
+        getPrAuthorIfStaff(pr) ??
+        (await getMergerOfPr(client, owner, repo, pr));
+      body.push(`- #${pr.number} (@${displayUser})`);
+    }
+  }
+
+  if (commitsWithoutPrs.length > 0) {
+    body.push("");
+    body.push("Contains the following commits not from a pull request:");
+    for (const commit of commitsWithoutPrs) {
+      const authorDesc = commit.author ? ` (@${commit.author.login})` : "";
+      body.push(
+        `- ${commit.sha} - ${getTruncatedCommitMessage(commit.commit.message)}${authorDesc}`,
+      );
+    }
+  }
+
+  body.push("");
+  body.push("Please do the following:");
+  if (conflictedFiles.length > 0) {
+    body.push(
+      " - [ ] Ensure `package.json` file contains the correct version.",
+    );
+    body.push(
+      " - [ ] Add a commit to this branch to resolve the merge conflicts in the following files:",
+    );
+    for (const file of conflictedFiles) {
+      body.push(`    - \`${file}\``);
+    }
+    body.push(
+      ` - [ ] Rebuild the Action locally (\`npm run build\`) and push any changes to the built output in \`lib\` as a separate commit named exactly \`${REBUILD_COMMIT_MESSAGE}\`.`,
+    );
+    body.push(
+      " - [ ] Ensure another maintainer has reviewed the additional commits you added to this branch to resolve the merge conflicts.",
+    );
+  }
+  body.push(
+    " - [ ] Ensure the CHANGELOG displays the correct version and date.",
+  );
+  body.push(
+    " - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.",
+  );
+  body.push(
+    ` - [ ] Check that there are not any unexpected commits being merged into the \`${targetBranch}\` branch.`,
+  );
+  body.push(
+    " - [ ] Ensure the docs team is aware of any documentation changes that need to be released.",
+  );
+  body.push(
+    " - [ ] Approve running the full set of PR checks if you have not pushed any changes.",
+  );
+  body.push(
+    " - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.",
+  );
+
+  if (isPrimaryRelease) {
+    body.push(
+      " - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.",
+    );
+    body.push(
+      " - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.",
+    );
+  }
+
+  const title = `Merge ${sourceBranch} into ${targetBranch}`;
+
+  if (dryRun) {
+    console.info(`[DRY RUN] Would create PR: "${title}" with body:`);
+
+    for (const line of body) {
+      console.info(`[DRY RUN] > ${line}`);
+    }
+
+    console.info(`[DRY RUN] and assign it to @${conductor}`);
+
+    return;
+  }
+
+  // Create the pull request.
+  const { data: pr } = await client.rest.pulls.create({
+    owner,
+    repo,
+    title,
+    body: body.join("\n"),
+    head: newBranchName,
+    base: targetBranch,
+  });
+  console.log(`Created PR #${pr.number}`);
+
+  // Assign the conductor.
+  await client.rest.issues.addAssignees({
+    owner,
+    repo,
+    issue_number: pr.number,
+    assignees: [conductor],
+  });
+  console.log(`Assigned PR to ${conductor}`);
+}
+
+interface MainOptions {
+  dryRun: boolean;
+  repositoryNwo: string;
+  sourceBranch: string;
+  targetBranch: string;
+  isPrimaryRelease: boolean;
+  conductor: string;
+}
+
+function parseCliOptions(): MainOptions {
+  const { values } = parseArgs({
+    options: {
+      "dry-run": { type: "boolean", default: false },
+      "repository-nwo": { type: "string" },
+      "source-branch": { type: "string" },
+      "target-branch": { type: "string" },
+      "is-primary-release": { type: "boolean", default: false },
+      conductor: { type: "string" },
+    },
+    strict: true,
+  });
+
+  if (!values["repository-nwo"]) {
+    throw new Error("--repository-nwo is required");
+  }
+  if (!values["source-branch"]) {
+    throw new Error("--source-branch is required");
+  }
+  if (!values["target-branch"]) {
+    throw new Error("--target-branch is required");
+  }
+  if (!values["conductor"]) {
+    throw new Error("--conductor is required");
+  }
+
+  return {
+    dryRun: values["dry-run"],
+    repositoryNwo: values["repository-nwo"],
+    sourceBranch: values["source-branch"],
+    targetBranch: values["target-branch"],
+    isPrimaryRelease: values["is-primary-release"] ?? false,
+    conductor: values["conductor"],
+  };
+}
+
+/**
+ * Rebuilds the action (npm ci + npm run build) and commits any changes.
+ */
+export function rebuildAction(options: MainOptions): void {
+  // For backports, the only source-level change vs the source branch is the new version number,
+  // so we just need to refresh the version embedded in `lib/`.
+  runCommand("npm", ["ci"]);
+  runCommand("npm", ["run", "build"]);
+
+  runGit(["add", "--all"], { dryRun: options.dryRun });
+
+  // `git diff --cached --quiet` exits 0 if there are no staged changes.
+  try {
+    execFileSync("git", ["diff", "--cached", "--quiet"]);
+    console.log("Rebuild produced no changes; skipping Rebuild commit.");
+  } catch {
+    runGit(["commit", "-m", REBUILD_COMMIT_MESSAGE], {
+      dryRun: options.dryRun,
+    });
+    console.log("Created Rebuild commit.");
+  }
+}
+
+/**
+ * Prepares the new update/backport branch.
+ *
+ * @param options The options we are running with.
+ * @param newBranchName The name of the new branch to create.
+ * @param targetBranchMajorVersion The target branch's major version.
+ * @param version The target version.
+ */
+export async function prepareNewBranch(
+  options: MainOptions,
+  newBranchName: string,
+  targetBranchMajorVersion: string,
+  version: string,
+): Promise {
+  // The process of creating the v{Older} release can run into merge conflicts. We commit the unresolved
+  // conflicts so a maintainer can easily resolve them (vs erroring and requiring maintainers to
+  // reconstruct the release manually)
+  let conflictedFiles: string[] = [];
+
+  if (!options.isPrimaryRelease) {
+    // For backports, the source branch is also a release branch.
+    const sourceBranchMajorVersion = options.sourceBranch.replace(
+      RELEASE_BRANCH_PREFIX,
+      "",
+    );
+
+    // Start from the target branch.
+    console.log(
+      `Creating ${newBranchName} from the ${ORIGIN}/${options.targetBranch} branch`,
+    );
+
+    runGit(
+      ["checkout", "-b", newBranchName, `${ORIGIN}/${options.targetBranch}`],
+      { dryRun: options.dryRun },
+    );
+
+    // Revert the commit that we made as part of the last release that updated the version number and
+    // changelog to refer to {older}.x.x variants. This avoids merge conflicts in the changelog and
+    // package.json files when we merge in the v{latest} branch.
+    // This commit will not exist the first time we release the v{N-1} branch from the v{N} branch, so we
+    // use `git log --grep` to conditionally revert the commit.
+    console.log(
+      "Reverting the version number and changelog updates from the last release to avoid conflicts",
+    );
+    const vOlderUpdateCommits = runGit([
+      "log",
+      "--grep",
+      `^${BACKPORT_COMMIT_MESSAGE}`,
+      "--format=%H",
+    ])
+      .split("\n")
+      .filter((s) => s !== "");
+
+    if (vOlderUpdateCommits.length > 0) {
+      // Only revert the newest commit as older ones will already have been
+      // reverted in previous releases.
+      console.log(`  Reverting ${vOlderUpdateCommits[0]}`);
+      runGit(["revert", vOlderUpdateCommits[0], "--no-edit"], {
+        dryRun: options.dryRun,
+      });
+
+      // Also revert the "Rebuild" commit, whether created by this script or
+      // by the `Rebuild Action` workflow.
+      const rebuildCommits = runGit([
+        "log",
+        "--grep",
+        `^${REBUILD_COMMIT_MESSAGE}$`,
+        "--format=%H",
+      ])
+        .split("\n")
+        .filter((s) => s !== "");
+      const rebuildCommit = rebuildCommits[0];
+      console.log(`  Reverting ${rebuildCommit}`);
+      runGit(["revert", rebuildCommit, "--no-edit"], {
+        dryRun: options.dryRun,
+      });
+    } else {
+      console.log("  Nothing to revert.");
+    }
+
+    // Merge the source branch into the release prep branch.
+    console.log(
+      `Merging ${ORIGIN}/${options.sourceBranch} into the release prep branch`,
+    );
+    runGit(["merge", `${ORIGIN}/${options.sourceBranch}`], {
+      allowNonZeroExitCode: true,
+      dryRun: options.dryRun,
+    });
+    conflictedFiles = runGit(["diff", "--name-only", "--diff-filter", "U"])
+      .split("\n")
+      .filter((s) => s !== "");
+    if (conflictedFiles.length > 0) {
+      runGit(["add", "."], {
+        dryRun: options.dryRun,
+      });
+      runGit(["commit", "--no-edit"], {
+        dryRun: options.dryRun,
+      });
+    }
+
+    // Migrate the package version number.
+    console.log(`Setting version number to '${version}' in package.json`);
+    withPackageJson((content) => {
+      const currentPkgVersion = getCurrentVersion(content);
+      if (currentPkgVersion) {
+        return {
+          content: replaceVersionInPackageJson(
+            currentPkgVersion,
+            version,
+            content,
+          ),
+          value: currentPkgVersion,
+        };
+      }
+      return { value: currentPkgVersion };
+    }, options);
+    runGit(["add", "package.json"], {
+      dryRun: options.dryRun,
+    });
+
+    // Migrate the changelog notes from the source major version to the target.
+    console.log(
+      `Migrating changelog notes from v${sourceBranchMajorVersion} to v${targetBranchMajorVersion}`,
+    );
+    changelog.withChangelog(
+      (contents) =>
+        changelog.processChangelogForBackports(
+          sourceBranchMajorVersion,
+          targetBranchMajorVersion,
+          contents,
+        ),
+      options,
+    );
+
+    runGit(["add", "CHANGELOG.md"], {
+      dryRun: options.dryRun,
+    });
+    runGit(["commit", "-m", `${BACKPORT_COMMIT_MESSAGE}${version}`], {
+      dryRun: options.dryRun,
+    });
+  } else {
+    // For a standard (primary) release, there won't be new commits on the
+    // target branch that aren't already on the source branch, so we can just
+    // start from the source branch.
+    runGit(
+      ["checkout", "-b", newBranchName, `${ORIGIN}/${options.sourceBranch}`],
+      {
+        dryRun: options.dryRun,
+      },
+    );
+
+    console.log("Updating changelog");
+    changelog.withChangelog(
+      (contents) => changelog.setVersionAndDate(version, contents),
+      { ...options, initChangelog: true },
+    );
+
+    runGit(["add", "CHANGELOG.md"], {
+      dryRun: options.dryRun,
+    });
+    runGit(["commit", "-m", `Update changelog for v${version}`], {
+      dryRun: options.dryRun,
+    });
+  }
+
+  // For backports, rebuild the action unless there were merge conflicts.
+  if (!options.isPrimaryRelease) {
+    if (conflictedFiles.length === 0) {
+      console.log("Rebuilding the Action.");
+      rebuildAction(options);
+    } else {
+      console.log(
+        `Skipping automatic rebuild because the merge produced conflicts in: ${conflictedFiles.join(", ")}`,
+      );
+    }
+  }
+
+  return conflictedFiles;
+}
+
+async function main(): Promise {
+  const options = parseCliOptions();
+  const token = getGitHubToken();
+  const client = getApiClient(token);
+
+  if (!options.targetBranch.startsWith(RELEASE_BRANCH_PREFIX)) {
+    throw new Error(
+      `Expected target branch to start with '${RELEASE_BRANCH_PREFIX}', but got '${options.targetBranch}'.`,
+    );
+  }
+  if (
+    !options.isPrimaryRelease &&
+    !options.sourceBranch.startsWith(RELEASE_BRANCH_PREFIX)
+  ) {
+    throw new Error(
+      `Expected source branch to start with '${RELEASE_BRANCH_PREFIX}' for backports, but got '${options.sourceBranch}'.`,
+    );
+  }
+  if (!options.repositoryNwo.includes("/")) {
+    throw new Error(
+      `Expected repository name with owner in 'owner/repo' format, but got '${options.repositoryNwo}'`,
+    );
+  }
+
+  const targetBranchMajorVersion = options.targetBranch.replace(
+    RELEASE_BRANCH_PREFIX,
+    "",
+  );
+
+  const currentVersion = withPackageJson((content) => {
+    return { value: getCurrentVersion(content) };
+  }, options);
+
+  if (!currentVersion) {
+    throw new Error("Failed to read current version from package.json");
+  }
+
+  const [, vMinor, vPatch] = currentVersion.split(".");
+  const version = `${targetBranchMajorVersion}.${vMinor}.${vPatch}`;
+
+  console.log(
+    `Considering difference between ${options.sourceBranch} and ${options.targetBranch}...`,
+  );
+
+  const sourceBranchShortSha = runGit([
+    "rev-parse",
+    "--short",
+    `${ORIGIN}/${options.sourceBranch}`,
+  ]);
+  console.log(
+    `Current head of ${options.sourceBranch} is ${sourceBranchShortSha}.`,
+  );
+
+  const [owner, repo] = options.repositoryNwo.split("/");
+  const commits = await getCommitDifference(
+    client,
+    owner,
+    repo,
+    options.sourceBranch,
+    options.targetBranch,
+  );
+
+  if (commits.length === 0) {
+    console.log(
+      `No commits to merge from ${options.sourceBranch} to ${options.targetBranch}.`,
+    );
+    return;
+  }
+
+  // Use a distinct branch prefix to support specific PR checks on backports.
+  const branchPrefix = options.isPrimaryRelease ? "update" : "backport";
+
+  // The branch name is based on the target version and the SHA of the source
+  // branch head. If the branch already exists we can assume this script has
+  // already run for this combination.
+  const newBranchName = `${branchPrefix}-v${version}-${sourceBranchShortSha}`;
+  console.log(`Branch name is '${newBranchName}'.`);
+
+  // Check if the branch already exists. If so we can abort as this script
+  // has already run on this combination of branches.
+  if (branchExistsOnRemote(newBranchName)) {
+    console.log(`Branch '${newBranchName}' already exists. Nothing to do.`);
+    return;
+  }
+
+  // Prepare the update/backport branch.
+  const conflictedFiles = await prepareNewBranch(
+    options,
+    newBranchName,
+    targetBranchMajorVersion,
+    version,
+  );
+
+  // Push the new branch to the remote.
+  console.log(`Creating branch ${newBranchName}.`);
+  runGit(["push", ORIGIN, newBranchName], { dryRun: options.dryRun });
+
+  // Open a PR to merge the new branch into the target branch.
+  await openPr({
+    client,
+    owner,
+    repo,
+    commits,
+    sourceBranchShortSha,
+    newBranchName,
+    sourceBranch: options.sourceBranch,
+    targetBranch: options.targetBranch,
+    conductor: options.conductor,
+    isPrimaryRelease: options.isPrimaryRelease,
+    conflictedFiles,
+    dryRun: options.dryRun,
+  });
+}
+
+// Only call `main` if this script was run directly.
+if (require.main === module) {
+  void main();
+}
diff --git a/pr-checks/util.ts b/pr-checks/util.ts
new file mode 100644
index 0000000000..353b2a9654
--- /dev/null
+++ b/pr-checks/util.ts
@@ -0,0 +1,9 @@
+/**
+ * Returns an appropriate message for the error.
+ *
+ * If the error is an `Error` instance, this returns the error message without
+ * an `Error: ` prefix.
+ */
+export function getErrorMessage(error: unknown): string {
+  return error instanceof Error ? error.message : String(error);
+}
diff --git a/pr-checks/versions.test.ts b/pr-checks/versions.test.ts
new file mode 100755
index 0000000000..6697710f83
--- /dev/null
+++ b/pr-checks/versions.test.ts
@@ -0,0 +1,44 @@
+#!/usr/bin/env npx tsx
+
+/**
+ * Tests for `versions.ts`.
+ */
+
+import * as assert from "node:assert/strict";
+import { describe, it } from "node:test";
+
+import { getCurrentVersion, replaceVersionInPackageJson } from "./versions";
+
+describe("getCurrentVersion", async () => {
+  await it("reads versions", async () => {
+    const result = getCurrentVersion(`{ "version": "1.23.4" }`);
+    assert.deepEqual(result, "1.23.4");
+  });
+});
+
+const packageJsonContents = `{
+  "name": "codeql",
+  "version": "1.23.4"
+}
+`;
+
+const packageJsonContentsExpected = `{
+  "name": "codeql",
+  "version": "2.23.4"
+}
+`;
+
+describe("replaceVersionInPackageJson", async () => {
+  await it("replaces versions", async () => {
+    const result = replaceVersionInPackageJson(
+      "1.23.4",
+      "2.23.4",
+      packageJsonContents,
+    );
+    assert.deepEqual(
+      result.split("\n"),
+      packageJsonContentsExpected.split("\n"),
+    );
+    assert.deepEqual(JSON.parse(result), { name: "codeql", version: "2.23.4" });
+  });
+});
diff --git a/pr-checks/versions.ts b/pr-checks/versions.ts
new file mode 100644
index 0000000000..4abc7faa17
--- /dev/null
+++ b/pr-checks/versions.ts
@@ -0,0 +1,54 @@
+import * as fs from "node:fs";
+
+import { DryRunOption, PACKAGE_JSON } from "./config";
+
+export function withPackageJson(
+  transformer: (content: string) => { value: T; content?: string },
+  options: DryRunOption,
+): T {
+  const content = fs.readFileSync(PACKAGE_JSON, "utf8");
+  const result = transformer(content);
+
+  if (result.content !== undefined) {
+    if (!options.dryRun) {
+      fs.writeFileSync(PACKAGE_JSON, result.content, "utf8");
+    } else {
+      console.info(`[DRY RUN] Would have written an updated package.json`);
+    }
+  }
+
+  return result.value;
+}
+
+/** Reads the current version from `package.json`. */
+export function getCurrentVersion(content: string): string | undefined {
+  const pkg: { version: string } = JSON.parse(content);
+  return pkg.version;
+}
+
+/**
+ * Replaces the version in `package.json` textually. Only updates the version
+ * field that immediately follows the `"name": "codeql"` line.
+ * `npm version` doesn't always work because of merge conflicts, so we
+ * replace the version in package.json textually.
+ */
+export function replaceVersionInPackageJson(
+  prevVersion: string,
+  newVersion: string,
+  content: string,
+): string {
+  const lines = content.split("\n");
+  let prevLineIsCodeql = false;
+  const output: string[] = [];
+
+  for (const line of lines) {
+    if (prevLineIsCodeql && line.includes(`"version": "${prevVersion}"`)) {
+      output.push(line.replace(prevVersion, newVersion));
+    } else {
+      output.push(line);
+    }
+    prevLineIsCodeql = line.includes('"name": "codeql",');
+  }
+
+  return output.join("\n");
+}
diff --git a/src/action-common.test.ts b/src/action-common.test.ts
new file mode 100644
index 0000000000..fc2e0a9aaa
--- /dev/null
+++ b/src/action-common.test.ts
@@ -0,0 +1,123 @@
+import * as core from "@actions/core";
+import test from "ava";
+import sinon from "sinon";
+
+import * as common from "./action-common";
+import * as actionsUtil from "./actions-util";
+import * as environment from "./environment";
+import * as logging from "./logging";
+import { ActionName } from "./status-report";
+import * as statusReport from "./status-report";
+import {
+  getTestActionsEnv,
+  getTestEnv,
+  makeMacro,
+  RecordingLogger,
+  setupTests,
+} from "./testing-utils";
+import { getErrorMessage } from "./util";
+
+setupTests(test);
+
+interface RunInActionsTestOpts {
+  runFn?: () => Promise;
+  expectedErrorMessage?: string;
+  expectedTelemetryError?: string;
+}
+
+const runInActionsMacro = makeMacro({
+  exec: async (t, opts: RunInActionsTestOpts) => {
+    const expectFailure = opts?.expectedErrorMessage !== undefined;
+
+    const logger = new RecordingLogger();
+    const getActionsLogger = sinon
+      .stub(logging, "getActionsLogger")
+      .returns(logger);
+
+    const env = getTestEnv();
+    const getEnv = sinon.stub(environment, "getEnv").returns(env);
+
+    const actionsEnv = getTestActionsEnv(env);
+    const getActionsEnv = sinon
+      .stub(actionsUtil, "getActionsEnv")
+      .returns(actionsEnv);
+
+    const getJobUUID = sinon
+      .stub(statusReport, "getJobUUID")
+      .returns("test-job-uuid");
+
+    const setFailed = sinon.stub(core, "setFailed");
+    const sendUnhandledErrorStatusReport = sinon.stub(
+      statusReport,
+      "sendUnhandledErrorStatusReport",
+    );
+
+    const name = ActionName.Init;
+    const run = sinon.stub();
+
+    if (opts?.runFn) {
+      run.callsFake(opts.runFn);
+    }
+
+    const transformTelemetryError = sinon
+      .stub()
+      .callsFake((err) => opts?.expectedTelemetryError ?? getErrorMessage(err));
+    const testAction: common.Action = {
+      name,
+      run,
+      transformTelemetryError,
+    };
+
+    await common.runInActions(testAction);
+
+    // These always should have been called once.
+    t.true(getActionsLogger.calledOnce);
+    t.true(getEnv.calledOnce);
+    t.true(getActionsEnv.calledOnce);
+
+    const expectedActionState = {
+      actions: actionsEnv,
+      env,
+      logger,
+      name: ActionName.Init,
+    };
+
+    t.true(getJobUUID.calledOnceWithExactly(sinon.match(expectedActionState)));
+    t.true(run.calledOnceWithExactly(sinon.match(expectedActionState)));
+
+    t.is(setFailed.calledOnce, expectFailure ?? false);
+    t.is(sendUnhandledErrorStatusReport.calledOnce, expectFailure ?? false);
+
+    if (expectFailure) {
+      t.true(
+        setFailed.calledOnceWithExactly(
+          `${statusReport.getDisplayActionName(name)} action failed: ${opts?.expectedErrorMessage}`,
+        ),
+      );
+      t.true(
+        sendUnhandledErrorStatusReport.calledOnceWithExactly(
+          name,
+          sinon.match.any,
+          opts?.expectedTelemetryError ?? opts?.expectedErrorMessage,
+          logger,
+        ),
+      );
+    }
+  },
+  title: (providedTitle) => `runInActions - ${providedTitle}`,
+});
+
+runInActionsMacro.serial("calls run", {});
+runInActionsMacro.serial("handles run exceptions", {
+  runFn: () => {
+    throw new Error("Test failure");
+  },
+  expectedErrorMessage: "Test failure",
+});
+runInActionsMacro.serial("transforms run exceptions", {
+  runFn: () => {
+    throw new Error("Test failure");
+  },
+  expectedErrorMessage: "Test failure",
+  expectedTelemetryError: "Transformed failure message",
+});
diff --git a/src/action-common.ts b/src/action-common.ts
new file mode 100644
index 0000000000..95323e7f2a
--- /dev/null
+++ b/src/action-common.ts
@@ -0,0 +1,126 @@
+import * as core from "@actions/core";
+
+import { ActionsEnv, getActionsEnv } from "./actions-util";
+import type { ApiClient } from "./api-client";
+import { Env, ReadOnlyEnv } from "./environment";
+import type { FeatureEnablement } from "./feature-flags";
+import { getActionsLogger, Logger } from "./logging";
+import {
+  ActionName,
+  getDisplayActionName,
+  getJobUUID,
+  sendUnhandledErrorStatusReport,
+} from "./status-report";
+import { getEnv, getErrorMessage, wrapError } from "./util";
+
+/** Base state that is available to an Action on startup. */
+export interface BaseState {
+  /** The name of the Action. */
+  name: ActionName;
+  /** When the Action was started. */
+  startedAt: Date;
+}
+
+/** Describes different state features that an Action may have. */
+export interface FeatureState {
+  Base: BaseState;
+  Logger: {
+    /** The logger that is in use. */
+    logger: Logger;
+  };
+  Env: {
+    /** Information about environment variables. */
+    env: Env;
+  };
+  ReadOnlyEnv: {
+    env: ReadOnlyEnv;
+  };
+  Actions: {
+    /** Access to Actions-related functionality. */
+    actions: ActionsEnv;
+  };
+  Api: {
+    /** A GitHub API client. */
+    apiClient: ApiClient;
+  };
+  FeatureFlags: {
+    /** Information about enabled feature flags. */
+    features: FeatureEnablement;
+  };
+}
+
+/** Identifies a type of state an Action may have. */
+export type StateFeature = keyof FeatureState;
+
+/** Constructs the intersection of all state types identifies by `Fs`. */
+export type FieldsOf = Fs extends []
+  ? Record
+  : Fs extends [
+        infer Head extends StateFeature,
+        ...infer Tail extends readonly StateFeature[],
+      ]
+    ? FeatureState[Head] & FieldsOf
+    : never;
+
+/** Describes the state of an Action that has access to the state corresponding to `Fs`. */
+export type ActionState = FieldsOf;
+
+/** The type of an Action's main entry point. This is a function that is provided
+ * with a basic `ActionState` object with features that are always available.
+ * Each Action can then augment the `state` further if additional features are required.
+ */
+export type ActionMain = (
+  state: ActionState<["Base", "Logger", "Env", "Actions"]>,
+) => Promise;
+
+/** A specification for a CodeQL Action step. */
+export interface Action {
+  /** The name of the Action. */
+  name: ActionName;
+  /** The entry point for the Action. */
+  run: ActionMain;
+  /**
+   * An optional function that transforms a caught error into a message suitable for
+   * inclusion in a status report. This is primarily intended for the `start-proxy`
+   * action to replace the thrown `Error`'s message with a safe one.
+   */
+  transformTelemetryError?: (error: Error) => string;
+}
+
+/** A generic entry point that sets up the basic environment for the `action` and runs it. */
+export async function runInActions(action: Action) {
+  const startedAt = new Date();
+  const logger = getActionsLogger();
+  const env = getEnv();
+  const actionsEnv = getActionsEnv();
+
+  try {
+    const actionState = {
+      name: action.name,
+      startedAt,
+      logger,
+      env,
+      actions: actionsEnv,
+    };
+
+    // Create a unique identifier for this run.
+    getJobUUID(actionState);
+
+    await action.run(actionState);
+  } catch (error) {
+    core.setFailed(
+      `${getDisplayActionName(action.name)} action failed: ${getErrorMessage(error)}`,
+    );
+
+    const statusReportError =
+      action.transformTelemetryError !== undefined
+        ? action.transformTelemetryError(wrapError(error))
+        : error;
+    await sendUnhandledErrorStatusReport(
+      action.name,
+      startedAt,
+      statusReportError,
+      logger,
+    );
+  }
+}
diff --git a/src/actions-util.ts b/src/actions-util.ts
index 592a70ace3..dd5124620d 100644
--- a/src/actions-util.ts
+++ b/src/actions-util.ts
@@ -7,12 +7,13 @@ import * as github from "@actions/github";
 import * as io from "@actions/io";
 
 import type { Config } from "./config-utils";
+import { Env, EnvVar, ActionsEnvVars } from "./environment";
 import { Logger } from "./logging";
 import {
   doesDirectoryExist,
   getCodeQLDatabasePath,
-  getRequiredEnvParam,
   ConfigurationError,
+  getEnv,
 } from "./util";
 
 /**
@@ -21,6 +22,27 @@ import {
  */
 declare const __CODEQL_ACTION_VERSION__: string;
 
+/**
+ * Abstracts over GitHub Actions functions so that we do not have to stub
+ * global functions in tests.
+ */
+export interface ActionsEnv {
+  getRequiredInput: (name: string) => string;
+  getOptionalInput: (name: string) => string | undefined;
+  exportVariable: (name: string, value: string) => void;
+}
+
+/**
+ * Gets the real `ActionsEnv` used by production code.
+ */
+export function getActionsEnv(): ActionsEnv {
+  return {
+    getRequiredInput,
+    getOptionalInput,
+    exportVariable: core.exportVariable,
+  };
+}
+
 /**
  * Wrapper around core.getInput for inputs that always have a value.
  * Also see getOptionalInput.
@@ -46,17 +68,21 @@ export const getOptionalInput = function (name: string): string | undefined {
   return value.length > 0 ? value : undefined;
 };
 
-export function getTemporaryDirectory(): string {
-  const value = process.env["CODEQL_ACTION_TEMP"];
-  return value !== undefined && value !== ""
-    ? value
-    : getRequiredEnvParam("RUNNER_TEMP");
+/**
+ * Gets the temporary directory used by the CodeQL Action. This will either be the temporary
+ * directory that has been set in `CODEQL_ACTION_TEMP` by e.g. a previous step, or the
+ * value of `RUNNER_TEMP` otherwise.
+ */
+export function getTemporaryDirectory(env: Env = getEnv()): string {
+  return (
+    env.getOptional(EnvVar.TEMP) ?? env.getRequired(ActionsEnvVars.RUNNER_TEMP)
+  );
 }
 
 const PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json";
 
-export function getDiffRangesJsonFilePath(): string {
-  return path.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME);
+export function getDiffRangesJsonFilePath(env: Env = getEnv()): string {
+  return path.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME);
 }
 
 export function getActionVersion(): string {
@@ -68,16 +94,16 @@ export function getActionVersion(): string {
  *
  * This will be "dynamic" for default setup workflow runs.
  */
-export function getWorkflowEventName() {
-  return getRequiredEnvParam("GITHUB_EVENT_NAME");
+export function getWorkflowEventName(env: Env = getEnv()) {
+  return env.getRequired(ActionsEnvVars.GITHUB_EVENT_NAME);
 }
 
 /**
  * Returns whether the current workflow is executing a local copy of the Action, e.g. we're running
  * a workflow on the codeql-action repo itself.
  */
-export function isRunningLocalAction(): boolean {
-  const relativeScriptPath = getRelativeScriptPath();
+export function isRunningLocalAction(env: Env = getEnv()): boolean {
+  const relativeScriptPath = getRelativeScriptPath(env);
   return (
     relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)
   );
@@ -88,15 +114,15 @@ export function isRunningLocalAction(): boolean {
  *
  * This can be used to get the Action's name or tell if we're running a local Action.
  */
-function getRelativeScriptPath(): string {
-  const runnerTemp = getRequiredEnvParam("RUNNER_TEMP");
+function getRelativeScriptPath(env: Env): string {
+  const runnerTemp = env.getRequired(ActionsEnvVars.RUNNER_TEMP);
   const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
   return path.relative(actionsDirectory, __filename);
 }
 
 /** Returns the contents of `GITHUB_EVENT_PATH` as a JSON object. */
-export function getWorkflowEvent(): any {
-  const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH");
+export function getWorkflowEvent(env: Env = getEnv()): any {
+  const eventJsonFile = env.getRequired(ActionsEnvVars.GITHUB_EVENT_PATH);
   try {
     return JSON.parse(fs.readFileSync(eventJsonFile, "utf-8"));
   } catch (e) {
@@ -165,17 +191,17 @@ export function getUploadValue(input: string | undefined): UploadKind {
 /**
  * Get the workflow run ID.
  */
-export function getWorkflowRunID(): number {
-  const workflowRunIdString = getRequiredEnvParam("GITHUB_RUN_ID");
+export function getWorkflowRunID(env: Env = getEnv()): number {
+  const workflowRunIdString = env.getRequired(ActionsEnvVars.GITHUB_RUN_ID);
   const workflowRunID = parseInt(workflowRunIdString, 10);
   if (Number.isNaN(workflowRunID)) {
     throw new Error(
-      `GITHUB_RUN_ID must define a non NaN workflow run ID. Current value is ${workflowRunIdString}`,
+      `${ActionsEnvVars.GITHUB_RUN_ID} must define a non NaN workflow run ID. Current value is ${workflowRunIdString}`,
     );
   }
   if (workflowRunID < 0) {
     throw new Error(
-      `GITHUB_RUN_ID must be a non-negative integer. Current value is ${workflowRunIdString}`,
+      `${ActionsEnvVars.GITHUB_RUN_ID} must be a non-negative integer. Current value is ${workflowRunIdString}`,
     );
   }
   return workflowRunID;
@@ -184,17 +210,19 @@ export function getWorkflowRunID(): number {
 /**
  * Get the workflow run attempt number.
  */
-export function getWorkflowRunAttempt(): number {
-  const workflowRunAttemptString = getRequiredEnvParam("GITHUB_RUN_ATTEMPT");
+export function getWorkflowRunAttempt(env: Env = getEnv()): number {
+  const workflowRunAttemptString = env.getRequired(
+    ActionsEnvVars.GITHUB_RUN_ATTEMPT,
+  );
   const workflowRunAttempt = parseInt(workflowRunAttemptString, 10);
   if (Number.isNaN(workflowRunAttempt)) {
     throw new Error(
-      `GITHUB_RUN_ATTEMPT must define a non NaN workflow run attempt. Current value is ${workflowRunAttemptString}`,
+      `${ActionsEnvVars.GITHUB_RUN_ATTEMPT} must define a non NaN workflow run attempt. Current value is ${workflowRunAttemptString}`,
     );
   }
   if (workflowRunAttempt <= 0) {
     throw new Error(
-      `GITHUB_RUN_ATTEMPT must be a positive integer. Current value is ${workflowRunAttemptString}`,
+      `${ActionsEnvVars.GITHUB_RUN_ATTEMPT} must be a positive integer. Current value is ${workflowRunAttemptString}`,
     );
   }
   return workflowRunAttempt;
@@ -251,18 +279,18 @@ export const getFileType = async (filePath: string): Promise => {
   }
 };
 
-export function isSelfHostedRunner() {
-  return process.env.RUNNER_ENVIRONMENT === "self-hosted";
+export function isSelfHostedRunner(env: Env = getEnv()) {
+  return env.getOptional(ActionsEnvVars.RUNNER_ENVIRONMENT) === "self-hosted";
 }
 
 /** Determines whether the workflow trigger is `dynamic`. */
-export function isDynamicWorkflow(): boolean {
-  return getWorkflowEventName() === "dynamic";
+export function isDynamicWorkflow(env: Env = getEnv()): boolean {
+  return getWorkflowEventName(env) === "dynamic";
 }
 
 /** Determines whether we are running in default setup. */
-export function isDefaultSetup(): boolean {
-  return isDynamicWorkflow();
+export function isDefaultSetup(env: Env = getEnv()): boolean {
+  return isDynamicWorkflow(env);
 }
 
 export function prettyPrintInvocation(cmd: string, args: string[]): string {
@@ -360,9 +388,10 @@ const persistedInputsKey = "persisted_inputs";
  * This would be simplified if actions/runner#3514 is addressed.
  * https://github.com/actions/runner/issues/3514
  */
-export const persistInputs = function () {
-  const inputEnvironmentVariables = Object.entries(process.env).filter(
-    ([name]) => name.startsWith("INPUT_"),
+export const persistInputs = function (env: Env = getEnv()) {
+  const entries = env.entries();
+  const inputEnvironmentVariables = entries.filter(([name]) =>
+    name.startsWith("INPUT_"),
   );
   core.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
 };
@@ -390,7 +419,9 @@ export interface PullRequestBranches {
  * @returns the base and head branches of the pull request, or undefined if
  * we are not analyzing a pull request.
  */
-export function getPullRequestBranches(): PullRequestBranches | undefined {
+export function getPullRequestBranches(
+  env: Env = getEnv(),
+): PullRequestBranches | undefined {
   const pullRequest = github.context.payload.pull_request;
   if (pullRequest) {
     return {
@@ -404,8 +435,10 @@ export function getPullRequestBranches(): PullRequestBranches | undefined {
 
   // PR analysis under Default Setup does not have the pull_request context,
   // but it should set CODE_SCANNING_REF and CODE_SCANNING_BASE_BRANCH.
-  const codeScanningRef = process.env.CODE_SCANNING_REF;
-  const codeScanningBaseBranch = process.env.CODE_SCANNING_BASE_BRANCH;
+  const codeScanningRef = env.getOptional(EnvVar.CODE_SCANNING_REF);
+  const codeScanningBaseBranch = env.getOptional(
+    EnvVar.CODE_SCANNING_BASE_BRANCH,
+  );
   if (codeScanningRef && codeScanningBaseBranch) {
     return {
       base: codeScanningBaseBranch,
@@ -420,8 +453,8 @@ export function getPullRequestBranches(): PullRequestBranches | undefined {
 /**
  * Returns whether we are analyzing a pull request.
  */
-export function isAnalyzingPullRequest(): boolean {
-  return getPullRequestBranches() !== undefined;
+export function isAnalyzingPullRequest(env: Env = getEnv()): boolean {
+  return getPullRequestBranches(env) !== undefined;
 }
 
 /**
@@ -445,13 +478,14 @@ const qualityCategoryMapping: Record = {
 export function fixCodeQualityCategory(
   logger: Logger,
   category?: string,
+  env: Env = getEnv(),
 ): string | undefined {
   // The `category` should always be set by Default Setup. We perform this check
   // to avoid potential issues if Code Quality supports Advanced Setup in the future
   // and before this workaround is removed.
   if (
     category !== undefined &&
-    isDefaultSetup() &&
+    isDefaultSetup(env) &&
     category.startsWith("/language:")
   ) {
     const language = category.substring("/language:".length);
diff --git a/src/analyze-action-post.ts b/src/analyze-action-post.ts
index fe8fbea61c..732b52af19 100644
--- a/src/analyze-action-post.ts
+++ b/src/analyze-action-post.ts
@@ -38,7 +38,7 @@ export async function runWrapper() {
         logger,
       );
       if (config !== undefined) {
-        const codeql = await getCodeQL(config.codeQLCmd);
+        const codeql = await getCodeQL(logger, config.codeQLCmd);
         const version = await codeql.getVersion();
         await debugArtifacts.uploadCombinedSarifArtifacts(
           logger,
diff --git a/src/analyze-action.ts b/src/analyze-action.ts
index cc2777bc5f..c3c2e40e7f 100644
--- a/src/analyze-action.ts
+++ b/src/analyze-action.ts
@@ -4,6 +4,7 @@ import { performance } from "perf_hooks";
 
 import * as core from "@actions/core";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import * as actionsUtil from "./actions-util";
 import * as analyses from "./analyses";
 import {
@@ -40,7 +41,6 @@ import {
   createStatusReportBase,
   DatabaseCreationTimings,
   getActionsStatus,
-  sendUnhandledErrorStatusReport,
   StatusReportBase,
 } from "./status-report";
 import {
@@ -212,7 +212,7 @@ async function runAutobuildIfLegacyGoWorkflow(config: Config, logger: Logger) {
   await runAutobuild(config, BuiltInLanguage.go, logger);
 }
 
-async function run(startedAt: Date) {
+async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
 
@@ -228,7 +228,6 @@ async function run(startedAt: Date) {
   let didUploadTrapCaches = false;
   let dependencyCacheResults: DependencyCacheUploadStatusReport | undefined;
   let databaseUploadResults: DatabaseUploadResult[] = [];
-  const logger = getActionsLogger();
 
   try {
     util.initializeEnvironment(actionsUtil.getActionVersion());
@@ -256,7 +255,7 @@ async function run(startedAt: Date) {
       );
     }
 
-    const codeql = await getCodeQL(config.codeQLCmd);
+    const codeql = await getCodeQL(logger, config.codeQLCmd);
 
     if (hasBadExpectErrorInput()) {
       throw new util.ConfigurationError(
@@ -523,19 +522,13 @@ async function run(startedAt: Date) {
   }
 }
 
+/** Defines the `analyze` Action. */
+const analyze: Action = {
+  name: ActionName.Analyze,
+  run,
+};
+
 export async function runWrapper() {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(`analyze action failed: ${util.getErrorMessage(error)}`);
-    await sendUnhandledErrorStatusReport(
-      ActionName.Analyze,
-      startedAt,
-      error,
-      logger,
-    );
-  }
+  await runInActions(analyze);
   await util.checkForTimeout();
 }
diff --git a/src/analyze.ts b/src/analyze.ts
index 63830445d2..411477b597 100644
--- a/src/analyze.ts
+++ b/src/analyze.ts
@@ -281,11 +281,11 @@ extensions:
         .join(checkoutPath, range.path)
         .replaceAll(path.sep, "/");
 
-      // Using yaml.dump() with `forceQuotes: true` ensures that all special
+      // Using yaml.dump() with `quoteStyle: "double"` ensures that all special
       // characters are escaped, and that the path is always rendered as a
       // quoted string on a single line.
       return (
-        `      - [${yaml.dump(filename, { forceQuotes: true }).trim()}, ` +
+        `      - [${yaml.dump(filename, { forceQuotes: true, quoteStyle: "single" }).trim()}, ` +
         `${range.startLine}, ${range.endLine}]\n`
       );
     })
diff --git a/src/api-client.test.ts b/src/api-client.test.ts
index f8846e7682..ae8c6269b1 100644
--- a/src/api-client.test.ts
+++ b/src/api-client.test.ts
@@ -2,11 +2,13 @@ import * as github from "@actions/github";
 import * as githubUtils from "@actions/github/lib/utils";
 import test from "ava";
 import * as sinon from "sinon";
+import { ProxyAgent } from "undici";
 
 import * as actionsUtil from "./actions-util";
 import * as api from "./api-client";
 import { DO_NOT_RETRY_STATUSES } from "./api-client";
-import { setupTests } from "./testing-utils";
+import { ActionsEnvVars, RegistryProxyVars } from "./environment";
+import { callee, getTestEnv, setupTests } from "./testing-utils";
 import * as util from "./util";
 
 setupTests(test);
@@ -20,23 +22,23 @@ test.serial("getApiClient", async (t) => {
   const githubStub: sinon.SinonStub = sinon.stub();
   pluginStub.returns(githubStub);
 
+  const env = getTestEnv();
+  env.set(ActionsEnvVars.GITHUB_SERVER_URL, "http://github.localhost");
+  env.set(ActionsEnvVars.GITHUB_API_URL, "http://api.github.localhost");
+
   sinon.stub(actionsUtil, "getRequiredInput").withArgs("token").returns("xyz");
-  const requiredEnvParamStub = sinon.stub(util, "getRequiredEnvParam");
-  requiredEnvParamStub
-    .withArgs("GITHUB_SERVER_URL")
-    .returns("http://github.localhost");
-  requiredEnvParamStub
-    .withArgs("GITHUB_API_URL")
-    .returns("http://api.github.localhost");
 
-  api.getApiClient();
+  const apiClient = api.getApiClient(env);
+  t.truthy(apiClient);
 
+  t.true(githubStub.calledOnce);
   t.assert(
     githubStub.calledOnceWithExactly({
       auth: "token xyz",
       baseUrl: "http://api.github.localhost",
       log: sinon.match.any,
       userAgent: `CodeQL-Action/${actionsUtil.getActionVersion()}`,
+      request: sinon.match.any,
       retry: {
         doNotRetry: DO_NOT_RETRY_STATUSES,
       },
@@ -181,6 +183,7 @@ test.serial(
       "Code Security must be enabled for this repository to use code scanning",
       "Advanced Security must be enabled for this repository to use code scanning",
       "Code Scanning is not enabled for this repository. Please enable code scanning in the repository settings.",
+      "Code quality is not enabled for this repository. Please enable code quality in the repository settings.",
     ];
     const transforms = [
       (msg: string) => msg,
@@ -205,3 +208,67 @@ test.serial(
     }
   },
 );
+
+test("getRegistryProxy - returns undefined if the proxy is not configured", async (t) => {
+  const target = callee(api.getRegistryProxy).withArgs();
+
+  // Empty environment.
+  await target.passes(t.is, undefined);
+  // Only the host.
+  await target
+    .withEnv(getTestEnv({ [RegistryProxyVars.PROXY_HOST]: "localhost" }))
+    .passes(t.is, undefined);
+  // Only the port.
+  await target
+    .withEnv(getTestEnv({ [RegistryProxyVars.PROXY_PORT]: "1234" }))
+    .passes(t.is, undefined);
+});
+
+test("getRegistryProxy - returns value when both vars are set", async (t) => {
+  await callee(api.getRegistryProxy)
+    .withArgs()
+    .withEnv(
+      getTestEnv({
+        [RegistryProxyVars.PROXY_HOST]: "localhost",
+        [RegistryProxyVars.PROXY_PORT]: "1234",
+      }),
+    )
+    .passes(t.truthy);
+});
+
+test("getRegistryProxyConfig - gets the configuration from the env vars", async (t) => {
+  const host = "localhost";
+  const port = "1234";
+  const ca = "cert";
+
+  await callee(api.getRegistryProxyConfig)
+    .withArgs()
+    .withEnv(
+      getTestEnv({
+        [RegistryProxyVars.PROXY_HOST]: host,
+        [RegistryProxyVars.PROXY_PORT]: port,
+        [RegistryProxyVars.PROXY_CA_CERTIFICATE]: ca,
+      }),
+    )
+    .passes(t.like, { host, port, ca });
+});
+
+test("makeProxyRequestOptions - returns defaults without custom proxy", async (t) => {
+  t.deepEqual(
+    api.makeProxyRequestOptions(undefined),
+    githubUtils.defaults.request,
+  );
+});
+
+test("makeProxyRequestOptions - returns fetch with custom proxy", async (t) => {
+  const opts = api.makeProxyRequestOptions(
+    new ProxyAgent("http://localhost:1080"),
+  );
+  // Fetch should be different from the defaults.
+  t.notDeepEqual(opts?.fetch, githubUtils.defaults.request?.fetch);
+  // The options should be the same aside from that.
+  t.deepEqual(
+    { ...opts, fetch: githubUtils.defaults.request?.fetch },
+    githubUtils.defaults.request,
+  );
+});
diff --git a/src/api-client.ts b/src/api-client.ts
index 4a061d4828..ba800a2587 100644
--- a/src/api-client.ts
+++ b/src/api-client.ts
@@ -1,9 +1,26 @@
 import * as core from "@actions/core";
 import * as githubUtils from "@actions/github/lib/utils";
+import { type Octokit } from "@octokit/core";
+import { type PaginateInterface } from "@octokit/plugin-paginate-rest";
+import { type Api } from "@octokit/plugin-rest-endpoint-methods";
 import * as retry from "@octokit/plugin-retry";
+import { RequestRequestOptions } from "@octokit/types";
+import {
+  ProxyAgent,
+  RequestInfo,
+  RequestInit,
+  fetch as undiciFetch,
+} from "undici";
 
+import type { ActionState } from "./action-common";
 import { getActionVersion, getRequiredInput } from "./actions-util";
-import { EnvVar } from "./environment";
+import {
+  ActionsEnvVars,
+  EnvVar,
+  ReadOnlyEnv,
+  RegistryProxyVars,
+  getEnv,
+} from "./environment";
 import { Logger } from "./logging";
 import { getRepositoryNwo, RepositoryNwo } from "./repository";
 import {
@@ -43,13 +60,90 @@ export interface GitHubApiExternalRepoDetails {
   apiURL: string | undefined;
 }
 
+/**
+ * Gets the configuration for the private registry authentication proxy,
+ * if it is available in the environment.
+ *
+ * @param action The required Action state.
+ * @returns The hostname, port, and CA retrieved from the corresponding environment variables.
+ */
+export function getRegistryProxyConfig(action: ActionState<["ReadOnlyEnv"]>) {
+  return {
+    host: action.env.getOptional(RegistryProxyVars.PROXY_HOST),
+    port: action.env.getOptional(RegistryProxyVars.PROXY_PORT),
+    ca: action.env.getOptional(RegistryProxyVars.PROXY_CA_CERTIFICATE),
+  };
+}
+
+/**
+ * Gets the configuration for the private registry authentication proxy,
+ * and uses it to initialise a corresponding `ProxyAgent`.
+ *
+ * @param action The required Action state.
+ * @returns A `ProxyAgent` corresponding to the private registry proxy,
+ *          or `undefined` if we couldn't retrieve the host and port.
+ */
+export function getRegistryProxy(
+  action: ActionState<["Logger", "ReadOnlyEnv"]>,
+): ProxyAgent | undefined {
+  const { host, port, ca } = getRegistryProxyConfig(action);
+
+  if (host && port) {
+    const uri = `http://${host}:${port}`;
+    action.logger.debug(
+      `Using private registry proxy at '${uri}' for API client.`,
+    );
+    return new ProxyAgent({
+      uri,
+      keepAliveTimeout: 10,
+      keepAliveMaxTimeout: 10,
+      requestTls: ca ? { ca } : undefined,
+    });
+  }
+
+  return undefined;
+}
+
+/**
+ * Constructs a `RequestRequestOptions` with a custom `fetch` implementation
+ * that uses `dispatcher` as a proxy for requests.
+ *
+ * @param dispatcher The proxy to use, if any.
+ */
+export function makeProxyRequestOptions(
+  dispatcher: ProxyAgent | undefined,
+): RequestRequestOptions | undefined {
+  // If we don't have a custom `ProxyAgent`, return the defaults.
+  if (dispatcher === undefined) {
+    return githubUtils.defaults.request;
+  }
+
+  // Otherwise, construct the custom `fetch` and add it onto the defaults.
+  return {
+    ...githubUtils.defaults.request,
+    fetch: (req: RequestInfo, init?: RequestInit) => {
+      return undiciFetch(req, { ...init, dispatcher });
+    },
+  };
+}
+
+/** The type of GitHub API client we use. */
+export type ApiClient = Octokit & Api & { paginate: PaginateInterface };
+
+/** Options for `createApiClientWithDetails`. */
+interface CreateApiClientOptions {
+  allowExternal?: boolean;
+  proxy?: ProxyAgent;
+}
+
 function createApiClientWithDetails(
   apiDetails: GitHubApiCombinedDetails,
-  { allowExternal = false } = {},
-) {
+  { allowExternal = false, proxy = undefined }: CreateApiClientOptions = {},
+): ApiClient {
   const auth =
     (allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth;
   const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
+  const requestOptions = makeProxyRequestOptions(proxy);
   return new retryingOctokit(
     githubUtils.getOctokitOptions(auth, {
       baseUrl: apiDetails.apiURL,
@@ -60,6 +154,7 @@ function createApiClientWithDetails(
         warn: core.warning,
         error: core.error,
       },
+      request: requestOptions,
       retry: {
         doNotRetry: DO_NOT_RETRY_STATUSES,
       },
@@ -67,22 +162,23 @@ function createApiClientWithDetails(
   );
 }
 
-export function getApiDetails(): GitHubApiDetails {
+export function getApiDetails(env: ReadOnlyEnv = getEnv()): GitHubApiDetails {
   return {
     auth: getRequiredInput("token"),
-    url: getRequiredEnvParam("GITHUB_SERVER_URL"),
-    apiURL: getRequiredEnvParam("GITHUB_API_URL"),
+    url: env.getRequired(ActionsEnvVars.GITHUB_SERVER_URL),
+    apiURL: env.getRequired(ActionsEnvVars.GITHUB_API_URL),
   };
 }
 
-export function getApiClient() {
-  return createApiClientWithDetails(getApiDetails());
+export function getApiClient(env: ReadOnlyEnv = getEnv()) {
+  return createApiClientWithDetails(getApiDetails(env));
 }
 
 export function getApiClientWithExternalAuth(
   apiDetails: GitHubApiCombinedDetails,
+  proxy?: ProxyAgent,
 ) {
-  return createApiClientWithDetails(apiDetails, { allowExternal: true });
+  return createApiClientWithDetails(apiDetails, { allowExternal: true, proxy });
 }
 
 /**
@@ -311,6 +407,7 @@ function isEnablementError(msg: string) {
     /Code Security must be enabled/i,
     /Advanced Security must be enabled/i,
     /Code Scanning is not enabled/i,
+    /Code Quality is not enabled/i,
   ].some((pattern) => pattern.test(msg));
 }
 
diff --git a/src/api-compatibility.json b/src/api-compatibility.json
index 435f8f1d6b..7569440194 100644
--- a/src/api-compatibility.json
+++ b/src/api-compatibility.json
@@ -1 +1 @@
-{"maximumVersion": "3.22", "minimumVersion": "3.16"}
+{"maximumVersion": "3.22", "minimumVersion": "3.17"}
diff --git a/src/autobuild-action.ts b/src/autobuild-action.ts
index dc20211379..9fa8016578 100644
--- a/src/autobuild-action.ts
+++ b/src/autobuild-action.ts
@@ -1,5 +1,6 @@
 import * as core from "@actions/core";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import {
   getActionVersion,
   getOptionalInput,
@@ -11,13 +12,12 @@ import { getCodeQL } from "./codeql";
 import { Config, getConfig } from "./config-utils";
 import { EnvVar } from "./environment";
 import { Language } from "./languages";
-import { Logger, getActionsLogger } from "./logging";
+import { Logger } from "./logging";
 import {
   StatusReportBase,
   getActionsStatus,
   createStatusReportBase,
   sendStatusReport,
-  sendUnhandledErrorStatusReport,
   ActionName,
 } from "./status-report";
 import { endTracingForCluster } from "./tracer-config";
@@ -26,7 +26,6 @@ import {
   checkDiskUsage,
   checkGitHubVersionInRange,
   ConfigurationError,
-  getErrorMessage,
   initializeEnvironment,
   wrapError,
 } from "./util";
@@ -69,11 +68,10 @@ async function sendCompletedStatusReport(
   }
 }
 
-async function run(startedAt: Date) {
+async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
 
-  const logger = getActionsLogger();
   let config: Config | undefined;
   let currentLanguage: Language | undefined;
   let languages: Language[] | undefined;
@@ -101,7 +99,7 @@ async function run(startedAt: Date) {
       );
     }
 
-    const codeql = await getCodeQL(config.codeQLCmd);
+    const codeql = await getCodeQL(logger, config.codeQLCmd);
 
     languages = await determineAutobuildLanguages(codeql, config, logger);
     if (languages !== undefined) {
@@ -142,18 +140,12 @@ async function run(startedAt: Date) {
   await sendCompletedStatusReport(config, logger, startedAt, languages ?? []);
 }
 
+/** Defines the `autobuild` Action. */
+const autobuild: Action = {
+  name: ActionName.Autobuild,
+  run,
+};
+
 export async function runWrapper() {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(`autobuild action failed. ${getErrorMessage(error)}`);
-    await sendUnhandledErrorStatusReport(
-      ActionName.Autobuild,
-      startedAt,
-      error,
-      logger,
-    );
-  }
+  await runInActions(autobuild);
 }
diff --git a/src/autobuild.ts b/src/autobuild.ts
index fc4983f4ef..49b790102d 100644
--- a/src/autobuild.ts
+++ b/src/autobuild.ts
@@ -5,7 +5,7 @@ import { getGitHubVersion } from "./api-client";
 import { CodeQL, getCodeQL } from "./codeql";
 import * as configUtils from "./config-utils";
 import { DocUrl } from "./doc-url";
-import { EnvVar } from "./environment";
+import { ActionsEnvVars, EnvVar } from "./environment";
 import { Feature, featureConfig, initFeatures } from "./feature-flags";
 import { BuiltInLanguage, Language } from "./languages";
 import { Logger } from "./logging";
@@ -126,7 +126,7 @@ export async function setupCppAutobuild(codeql: CodeQL, logger: Logger) {
   if (await features.getValue(Feature.CppDependencyInstallation, codeql)) {
     // disable autoinstall on self-hosted runners unless explicitly requested
     if (
-      process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
+      process.env[ActionsEnvVars.RUNNER_ENVIRONMENT] === "self-hosted" &&
       process.env[envVar] !== "true"
     ) {
       logger.info(
@@ -155,7 +155,7 @@ export async function runAutobuild(
   logger: Logger,
 ) {
   logger.startGroup(`Attempting to automatically build ${language} code`);
-  const codeQL = await getCodeQL(config.codeQLCmd);
+  const codeQL = await getCodeQL(logger, config.codeQLCmd);
   if (language === BuiltInLanguage.cpp) {
     await setupCppAutobuild(codeQL, logger);
   }
diff --git a/src/codeql.test.ts b/src/codeql.test.ts
index dea4cf04af..e8208888e7 100644
--- a/src/codeql.test.ts
+++ b/src/codeql.test.ts
@@ -156,6 +156,7 @@ test.serial(
         t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
         t.is(result.toolsVersion, `0.0.0-${version}`);
         t.is(result.toolsSource, ToolsSource.Download);
+        assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
       }
 
       t.is(toolcache.findAllVersions("CodeQL").length, 2);
@@ -191,9 +192,7 @@ test.serial(
       t.assert(toolcache.find("CodeQL", `2.15.0`));
       t.is(result.toolsVersion, `2.15.0`);
       t.is(result.toolsSource, ToolsSource.Download);
-      if (result.toolsDownloadStatusReport) {
-        assertDurationsInteger(t, result.toolsDownloadStatusReport);
-      }
+      assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
     });
   },
 );
@@ -230,9 +229,7 @@ test.serial(
       t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
       t.deepEqual(result.toolsVersion, "0.0.0-20200610");
       t.is(result.toolsSource, ToolsSource.Download);
-      if (result.toolsDownloadStatusReport) {
-        assertDurationsInteger(t, result.toolsDownloadStatusReport);
-      }
+      assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
     });
   },
 );
@@ -282,11 +279,7 @@ for (const {
         t.assert(toolcache.find("CodeQL", expectedToolcacheVersion));
         t.deepEqual(result.toolsVersion, expectedToolcacheVersion);
         t.is(result.toolsSource, ToolsSource.Download);
-        t.assert(
-          Number.isInteger(
-            result.toolsDownloadStatusReport?.downloadDurationMs,
-          ),
-        );
+        assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
       });
     },
   );
@@ -330,9 +323,7 @@ for (const toolcacheVersion of [
           SAMPLE_DEFAULT_CLI_VERSION.enabledVersions[0].cliVersion,
         );
         t.is(result.toolsSource, ToolsSource.Toolcache);
-        t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
-        t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
-        t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
+        t.is(result.toolsDownloadStatusReport, undefined);
       });
     },
   );
@@ -373,9 +364,7 @@ test.serial(
       );
       t.deepEqual(result.toolsVersion, "0.0.0-20200601");
       t.is(result.toolsSource, ToolsSource.Toolcache);
-      t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
-      t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
-      t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
+      t.is(result.toolsDownloadStatusReport, undefined);
 
       const cachedVersions = toolcache.findAllVersions("CodeQL");
       t.is(cachedVersions.length, 1);
@@ -421,9 +410,7 @@ test.serial(
       );
       t.deepEqual(result.toolsVersion, defaults.cliVersion);
       t.is(result.toolsSource, ToolsSource.Download);
-      if (result.toolsDownloadStatusReport) {
-        assertDurationsInteger(t, result.toolsDownloadStatusReport);
-      }
+      t.truthy(result.toolsDownloadStatusReport);
 
       const cachedVersions = toolcache.findAllVersions("CodeQL");
       t.is(cachedVersions.length, 2);
@@ -462,9 +449,7 @@ test.serial(
       );
       t.deepEqual(result.toolsVersion, defaults.cliVersion);
       t.is(result.toolsSource, ToolsSource.Download);
-      if (result.toolsDownloadStatusReport) {
-        assertDurationsInteger(t, result.toolsDownloadStatusReport);
-      }
+      t.truthy(result.toolsDownloadStatusReport);
 
       const cachedVersions = toolcache.findAllVersions("CodeQL");
       t.is(cachedVersions.length, 2);
@@ -506,9 +491,7 @@ test.serial(
 
       t.is(result.toolsVersion, "0.0.0-20230203");
       t.is(result.toolsSource, ToolsSource.Download);
-      if (result.toolsDownloadStatusReport) {
-        assertDurationsInteger(t, result.toolsDownloadStatusReport);
-      }
+      assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
 
       const cachedVersions = toolcache.findAllVersions("CodeQL");
       t.is(cachedVersions.length, 1);
@@ -519,15 +502,11 @@ test.serial(
   },
 );
 
-function assertDurationsInteger(
+function assertDownloadDurationInteger(
   t: ExecutionContext,
-  statusReport: ToolsDownloadStatusReport,
+  statusReport: ToolsDownloadStatusReport | undefined,
 ) {
-  t.assert(Number.isInteger(statusReport?.combinedDurationMs));
-  if (statusReport.downloadDurationMs !== undefined) {
-    t.assert(Number.isInteger(statusReport?.downloadDurationMs));
-    t.assert(Number.isInteger(statusReport?.extractionDurationMs));
-  }
+  t.assert(Number.isInteger(statusReport?.downloadDurationMs));
 }
 
 test.serial("getExtraOptions works for explicit paths", (t) => {
@@ -601,7 +580,6 @@ const injectedConfigMacro = makeMacro({
         "",
         undefined,
         undefined,
-        getRunnerLogger(true),
       );
 
       const args = runnerConstructorStub.firstCall.args[1] as string[];
@@ -877,7 +855,6 @@ test.serial(
         "",
         undefined,
         "/path/to/qlconfig.yml",
-        getRunnerLogger(true),
       );
 
       const args = runnerConstructorStub.firstCall.args[1] as string[];
@@ -908,7 +885,6 @@ test.serial(
         "",
         undefined,
         undefined, // undefined qlconfigFile
-        getRunnerLogger(true),
       );
 
       const args = runnerConstructorStub.firstCall.args[1] as any[];
@@ -1087,7 +1063,6 @@ test.serial(
       "sourceRoot",
       undefined,
       undefined,
-      getRunnerLogger(false),
     );
 
     t.true(runnerConstructorStub.calledOnce);
diff --git a/src/codeql.ts b/src/codeql.ts
index afae491a4a..9b064620eb 100644
--- a/src/codeql.ts
+++ b/src/codeql.ts
@@ -23,11 +23,10 @@ import {
 } from "./feature-flags";
 import { isAnalyzingDefaultBranch } from "./git-utils";
 import { Language } from "./languages";
-import { Logger } from "./logging";
+import { getRunnerLogger, Logger } from "./logging";
 import { writeBaseDatabaseOidsFile, writeOverlayChangesFile } from "./overlay";
 import { OverlayDatabaseMode } from "./overlay/overlay-database-mode";
 import * as setupCodeql from "./setup-codeql";
-import { ZstdAvailability } from "./tar";
 import { ToolsDownloadStatusReport } from "./tools-download";
 import { ToolsFeature, isSupportedToolsFeature } from "./tools-features";
 import { shouldEnableIndirectTracing } from "./tracer-config";
@@ -92,7 +91,6 @@ export interface CodeQL {
     sourceRoot: string,
     processName: string | undefined,
     qlconfigFile: string | undefined,
-    logger: Logger,
   ): Promise;
   /**
    * Runs the autobuilder for the given language.
@@ -117,16 +115,12 @@ export interface CodeQL {
     memoryFlag: string,
     enableDebugLogging: boolean,
   ): Promise;
-  /**
-   * Run 'codeql resolve languages'.
-   */
-  resolveLanguages(): Promise;
   /**
    * Run 'codeql resolve languages' with '--format=betterjson'.
    */
-  betterResolveLanguages(options?: {
+  resolveLanguages(options?: {
     filterToLanguagesWithQueries: boolean;
-  }): Promise;
+  }): Promise;
   /**
    * Run 'codeql resolve build-environment'
    */
@@ -239,20 +233,14 @@ export interface ResolveDatabaseOutput {
 }
 
 export interface ResolveLanguagesOutput {
-  [language: string]: [string];
-}
-
-export interface BetterResolveLanguagesOutput {
   aliases?: {
     [alias: string]: string;
   };
   extractors: {
-    [language: string]: [
-      {
-        extractor_root: string;
-        extractor_options?: any;
-      },
-    ];
+    [language: string]: Array<{
+      extractor_root: string;
+      extractor_options?: any;
+    }>;
   };
 }
 
@@ -282,17 +270,17 @@ const CODEQL_MINIMUM_VERSION = "2.19.4";
 /**
  * This version will shortly become the oldest version of CodeQL that the Action will run with.
  */
-const CODEQL_NEXT_MINIMUM_VERSION = "2.19.4";
+const CODEQL_NEXT_MINIMUM_VERSION = "2.20.7";
 
 /**
  * This is the version of GHES that was most recently deprecated.
  */
-const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.15";
+const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.16";
 
 /**
  * This is the deprecation date for the version of GHES that was most recently deprecated.
  */
-const GHES_MOST_RECENT_DEPRECATION_DATE = "2026-04-09";
+const GHES_MOST_RECENT_DEPRECATION_DATE = "2026-07-01";
 
 /** The CLI verbosity level to use for extraction in debug mode. */
 const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
@@ -329,7 +317,6 @@ export async function setupCodeQL(
   toolsDownloadStatusReport?: ToolsDownloadStatusReport;
   toolsSource: setupCodeql.ToolsSource;
   toolsVersion: string;
-  zstdAvailability: ZstdAvailability;
 }> {
   try {
     const {
@@ -337,7 +324,6 @@ export async function setupCodeQL(
       toolsDownloadStatusReport,
       toolsSource,
       toolsVersion,
-      zstdAvailability,
     } = await setupCodeql.setupCodeQLBundle(
       toolsInput,
       apiDetails,
@@ -350,12 +336,6 @@ export async function setupCodeQL(
       logger,
     );
 
-    logger.debug(
-      `Bundle download status report: ${JSON.stringify(
-        toolsDownloadStatusReport,
-      )}`,
-    );
-
     let codeqlCmd = path.join(codeqlFolder, "codeql", "codeql");
     if (process.platform === "win32") {
       codeqlCmd += ".exe";
@@ -365,13 +345,12 @@ export async function setupCodeQL(
       );
     }
 
-    cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
+    cachedCodeQL = await getCodeQLForCmd(logger, codeqlCmd, checkVersion);
     return {
       codeql: cachedCodeQL,
       toolsDownloadStatusReport,
       toolsSource,
       toolsVersion,
-      zstdAvailability,
     };
   } catch (rawError) {
     const e = api.wrapApiConfigurationError(rawError);
@@ -392,9 +371,9 @@ export async function setupCodeQL(
 /**
  * Use the CodeQL executable located at the given path.
  */
-export async function getCodeQL(cmd: string): Promise {
+export async function getCodeQL(logger: Logger, cmd: string): Promise {
   if (cachedCodeQL === undefined) {
-    cachedCodeQL = await getCodeQLForCmd(cmd, true);
+    cachedCodeQL = await getCodeQLForCmd(logger, cmd, true);
   }
   return cachedCodeQL;
 }
@@ -460,10 +439,9 @@ export function createStubCodeQL(partialCodeql: Partial): CodeQL {
       "extractUsingBuildMode",
     ),
     finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"),
-    resolveLanguages: resolveFunction(partialCodeql, "resolveLanguages"),
-    betterResolveLanguages: resolveFunction(
+    resolveLanguages: resolveFunction(
       partialCodeql,
-      "betterResolveLanguages",
+      "resolveLanguages",
       async () => ({ aliases: {}, extractors: {} }),
     ),
     resolveBuildEnvironment: resolveFunction(
@@ -502,8 +480,9 @@ export function createStubCodeQL(partialCodeql: Partial): CodeQL {
  */
 export async function getCodeQLForTesting(
   cmd = "codeql-for-testing",
+  logger: Logger = getRunnerLogger(true),
 ): Promise {
-  return getCodeQLForCmd(cmd, false);
+  return getCodeQLForCmd(logger, cmd, false);
 }
 
 /**
@@ -515,6 +494,7 @@ export async function getCodeQLForTesting(
  * @returns A new CodeQL object
  */
 async function getCodeQLForCmd(
+  logger: Logger,
   cmd: string,
   checkVersion: boolean,
 ): Promise {
@@ -525,16 +505,13 @@ async function getCodeQLForCmd(
     async getVersion() {
       let result = util.getCachedCodeQlVersion(cmd);
       if (result === undefined) {
-        const output = await runCli(cmd, ["version", "--format=json"], {
-          noStreamStdout: true,
-        });
-        try {
-          result = JSON.parse(output) as VersionInfo;
-        } catch {
-          throw Error(
-            `Invalid JSON output from \`version --format=json\`: ${output}`,
-          );
-        }
+        result = await runCliJson(
+          cmd,
+          ["version", "--format=json"],
+          {
+            noStreamStdout: true,
+          },
+        );
         util.cacheCodeQlVersion(cmd, result);
       }
       return result;
@@ -563,7 +540,6 @@ async function getCodeQLForCmd(
       sourceRoot: string,
       processName: string | undefined,
       qlconfigFile: string | undefined,
-      logger: Logger,
     ) {
       const extraArgs = config.languages.map(
         (language) => `--language=${language}`,
@@ -735,50 +711,27 @@ async function getCodeQLForCmd(
       ];
       await runCli(cmd, args);
     },
-    async resolveLanguages() {
-      const codeqlArgs = [
-        "resolve",
-        "languages",
-        "--format=json",
-        ...getExtraOptionsFromEnv(["resolve", "languages"]),
-      ];
-      const output = await runCli(cmd, codeqlArgs);
-
-      try {
-        return JSON.parse(output) as ResolveLanguagesOutput;
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve languages: ${e}`,
-        );
-      }
-    },
-    async betterResolveLanguages(
+    async resolveLanguages(
       {
         filterToLanguagesWithQueries,
       }: {
         filterToLanguagesWithQueries: boolean;
       } = { filterToLanguagesWithQueries: false },
     ) {
-      const codeqlArgs = [
+      return runCliJson(cmd, [
         "resolve",
         "languages",
         "--format=betterjson",
         "--extractor-options-verbosity=4",
         "--extractor-include-aliases",
+        // TODO: Unconditionally include `--filter-to-languages-with-queries`
+        //       once CODEQL_MINIMUM_VERSION is at least v2.23.0
+        //       — the first version to support this flag.
         ...(filterToLanguagesWithQueries
           ? ["--filter-to-languages-with-queries"]
           : []),
         ...getExtraOptionsFromEnv(["resolve", "languages"]),
-      ];
-      const output = await runCli(cmd, codeqlArgs);
-
-      try {
-        return JSON.parse(output) as BetterResolveLanguagesOutput;
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve languages with --format=betterjson: ${e}`,
-        );
-      }
+      ]);
     },
     async resolveBuildEnvironment(
       workingDir: string | undefined,
@@ -794,15 +747,7 @@ async function getCodeQLForCmd(
       if (workingDir !== undefined) {
         codeqlArgs.push("--working-dir", workingDir);
       }
-      const output = await runCli(cmd, codeqlArgs);
-
-      try {
-        return JSON.parse(output) as ResolveBuildEnvironmentOutput;
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve build-environment: ${e} in\n${output}`,
-        );
-      }
+      return await runCliJson(cmd, codeqlArgs);
     },
     async databaseRunQueries(
       databasePath: string,
@@ -1004,15 +949,9 @@ async function getCodeQLForCmd(
         ...getExtraOptionsFromEnv(["resolve", "queries"]),
         ...queries,
       ];
-      const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
-
-      try {
-        return JSON.parse(output) as string[];
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve queries --format=startingpacks: ${e}`,
-        );
-      }
+      return await runCliJson(cmd, codeqlArgs, {
+        noStreamStdout: true,
+      });
     },
     async resolveDatabase(
       databasePath: string,
@@ -1024,15 +963,9 @@ async function getCodeQLForCmd(
         "--format=json",
         ...getExtraOptionsFromEnv(["resolve", "database"]),
       ];
-      const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
-
-      try {
-        return JSON.parse(output) as ResolveDatabaseOutput;
-      } catch (e) {
-        throw new Error(
-          `Unexpected output from codeql resolve database --format=json: ${e}`,
-        );
-      }
+      return await runCliJson(cmd, codeqlArgs, {
+        noStreamStdout: true,
+      });
     },
     async mergeResults(
       sarifFiles: string[],
@@ -1188,6 +1121,30 @@ async function runCli(
   }
 }
 
+/**
+ * Wraps the command executor {@link runCli} and tries to parse the output as JSON.
+ * @param cmd The command to run.
+ * @param args The arguments to pass to the command.
+ * @param opts The options for running the command.
+ * @param opts.stdin Optional string to pass to the command's standard input.
+ * @param opts.noStreamStdout Optional boolean to indicate whether to stream the command's standard output.
+ * @returns The parsed JSON output from the command.
+ */
+async function runCliJson(
+  cmd: string,
+  args: string[] = [],
+  opts: { stdin?: string; noStreamStdout?: boolean } = {},
+): Promise {
+  const output = await runCli(cmd, args, opts);
+  try {
+    return JSON.parse(output) as T;
+  } catch (e) {
+    throw Error(
+      `Unexpected output from codeql ${args.join(" ")}: ${getErrorMessage(e)}`,
+    );
+  }
+}
+
 /**
  * Writes the code scanning configuration that is to be used by the CLI.
  *
diff --git a/src/config-utils.test.ts b/src/config-utils.test.ts
index 25f9293c40..aec214cd64 100644
--- a/src/config-utils.test.ts
+++ b/src/config-utils.test.ts
@@ -6,12 +6,14 @@ import test, { ExecutionContext } from "ava";
 import * as yaml from "js-yaml";
 import * as sinon from "sinon";
 
+import { ActionState } from "./action-common";
 import * as actionsUtil from "./actions-util";
 import { AnalysisKind, supportedAnalysisKinds } from "./analyses";
 import * as api from "./api-client";
 import { CachingKind } from "./caching-utils";
 import { createStubCodeQL } from "./codeql";
 import { UserConfig } from "./config/db-config";
+import * as file from "./config/file";
 import * as configUtils from "./config-utils";
 import * as errorMessages from "./error-messages";
 import { Feature } from "./feature-flags";
@@ -36,6 +38,10 @@ import {
   mockCodeQLVersion,
   createTestConfig,
   makeMacro,
+  initAllState,
+  callee,
+  SAMPLE_DOTCOM_API_DETAILS,
+  AssertableTarget,
 } from "./testing-utils";
 import {
   GitHubVariant,
@@ -75,7 +81,7 @@ function createTestInitConfigInputs(
       repository: { owner: "github", repo: "example" },
       tempDir: "",
       codeql: createStubCodeQL({
-        async betterResolveLanguages() {
+        async resolveLanguages() {
           return {
             extractors: {
               html: [{ extractor_root: "" }],
@@ -150,7 +156,7 @@ test.serial("load empty config", async (t) => {
     setupActionsVars(tempDir, tempDir);
 
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             javascript: [{ extractor_root: "" }],
@@ -160,8 +166,9 @@ test.serial("load empty config", async (t) => {
       },
     });
 
+    const state = initAllState({ logger });
     const config = await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         languagesInput: languages,
         repository: { owner: "github", repo: "example" },
@@ -193,7 +200,7 @@ test.serial("load code quality config", async (t) => {
     setupActionsVars(tempDir, tempDir);
 
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             actions: [{ extractor_root: "" }],
@@ -202,8 +209,9 @@ test.serial("load code quality config", async (t) => {
       },
     });
 
+    const state = initAllState({ logger });
     const config = await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         analysisKinds: [AnalysisKind.CodeQuality],
         languagesInput: languages,
@@ -247,7 +255,7 @@ test.serial(
       setupActionsVars(tempDir, tempDir);
 
       const codeql = createStubCodeQL({
-        async betterResolveLanguages() {
+        async resolveLanguages() {
           return {
             extractors: {
               javascript: [{ extractor_root: "" }],
@@ -280,9 +288,10 @@ test.serial(
         repositoryProperties,
       });
 
+      const state = initAllState({ logger });
       await t.notThrowsAsync(async () => {
         const config = await configUtils.initConfig(
-          createFeatures([]),
+          state,
           createTestInitConfigInputs({
             analysisKinds: [AnalysisKind.CodeQuality],
             languagesInput: languages,
@@ -305,7 +314,7 @@ test.serial("loading a saved config produces the same config", async (t) => {
     const logger = getRunnerLogger(true);
 
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             javascript: [{ extractor_root: "" }],
@@ -321,8 +330,9 @@ test.serial("loading a saved config produces the same config", async (t) => {
     // Sanity check that getConfig returns undefined before we have called initConfig
     t.deepEqual(await configUtils.getConfig(tempDir, logger), undefined);
 
+    const state = initAllState({ logger });
     const config1 = await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         languagesInput: "javascript,python",
         tempDir,
@@ -352,7 +362,7 @@ test.serial("loading config with version mismatch throws", async (t) => {
     const logger = getRunnerLogger(true);
 
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             javascript: [{ extractor_root: "" }],
@@ -373,8 +383,9 @@ test.serial("loading config with version mismatch throws", async (t) => {
       .stub(actionsUtil, "getActionVersion")
       .returns("does-not-exist");
 
+    const state = initAllState({ logger });
     const config = await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         languagesInput: "javascript,python",
         tempDir,
@@ -402,8 +413,9 @@ test.serial("loading config with version mismatch throws", async (t) => {
 test.serial("load input outside of workspace", async (t) => {
   return await withTmpDir(async (tempDir) => {
     try {
+      const state = initAllState();
       await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           configFile: "../input",
           tempDir,
@@ -424,34 +436,6 @@ test.serial("load input outside of workspace", async (t) => {
   });
 });
 
-test.serial("load non-local input with invalid repo syntax", async (t) => {
-  return await withTmpDir(async (tempDir) => {
-    // no filename given, just a repo
-    const configFile = "octo-org/codeql-config@main";
-
-    try {
-      await configUtils.initConfig(
-        createFeatures([]),
-        createTestInitConfigInputs({
-          configFile,
-          tempDir,
-          workspacePath: tempDir,
-        }),
-      );
-      throw new Error("initConfig did not throw error");
-    } catch (err) {
-      t.deepEqual(
-        err,
-        new ConfigurationError(
-          errorMessages.getConfigFileRepoFormatInvalidMessage(
-            "octo-org/codeql-config@main",
-          ),
-        ),
-      );
-    }
-  });
-});
-
 test.serial("load non-existent input", async (t) => {
   return await withTmpDir(async (tempDir) => {
     const languagesInput = "javascript";
@@ -459,8 +443,9 @@ test.serial("load non-existent input", async (t) => {
     t.false(fs.existsSync(path.join(tempDir, configFile)));
 
     try {
+      const state = initAllState();
       await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           languagesInput,
           configFile,
@@ -482,12 +467,30 @@ test.serial("load non-existent input", async (t) => {
   });
 });
 
+/** A non-empty, but fairly minimal configuration file. */
+const simpleConfigFileContents = `
+  name: my config
+  queries:
+    - uses: ./foo_file`;
+
+/** A less minimal configuration file. */
+const otherConfigFileContents = `
+  name: my config
+  disable-default-queries: true
+  queries:
+    - uses: ./foo
+  paths-ignore:
+    - a
+    - b
+  paths:
+    - c/d`;
+
 test.serial("load non-empty input", async (t) => {
   return await withTmpDir(async (tempDir) => {
     setupActionsVars(tempDir, tempDir);
 
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             javascript: [{ extractor_root: "" }],
@@ -496,18 +499,6 @@ test.serial("load non-empty input", async (t) => {
       },
     });
 
-    // Just create a generic config object with non-default values for all fields
-    const inputFileContents = `
-      name: my config
-      disable-default-queries: true
-      queries:
-        - uses: ./foo
-      paths-ignore:
-        - a
-        - b
-      paths:
-        - c/d`;
-
     fs.mkdirSync(path.join(tempDir, "foo"));
 
     const userConfig: UserConfig = {
@@ -534,10 +525,11 @@ test.serial("load non-empty input", async (t) => {
     });
 
     const languagesInput = "javascript";
-    const configFilePath = createConfigFile(inputFileContents, tempDir);
+    const configFilePath = createConfigFile(otherConfigFileContents, tempDir);
 
+    const state = initAllState();
     const actualConfig = await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         languagesInput,
         buildModeInput: "none",
@@ -559,14 +551,12 @@ test.serial(
   "Using config input and file together, config input should be used.",
   async (t) => {
     return await withTmpDir(async (tempDir) => {
-      process.env["RUNNER_TEMP"] = tempDir;
-      process.env["GITHUB_WORKSPACE"] = tempDir;
+      setupActionsVars(tempDir, tempDir);
 
-      const inputFileContents = `
-      name: my config
-      queries:
-        - uses: ./foo_file`;
-      const configFilePath = createConfigFile(inputFileContents, tempDir);
+      const configFilePath = createConfigFile(
+        simpleConfigFileContents,
+        tempDir,
+      );
 
       const configInput = `
       name: my config
@@ -582,7 +572,7 @@ test.serial(
       fs.mkdirSync(path.join(tempDir, "foo"));
 
       const codeql = createStubCodeQL({
-        async betterResolveLanguages() {
+        async resolveLanguages() {
           return {
             extractors: {
               javascript: [{ extractor_root: "" }],
@@ -595,8 +585,9 @@ test.serial(
       // Only JS, python packs will be ignored
       const languagesInput = "javascript";
 
+      const state = initAllState({ env: util.getEnv() });
       const config = await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           languagesInput,
           configFile: configFilePath,
@@ -615,7 +606,7 @@ test.serial(
 test.serial("API client used when reading remote config", async (t) => {
   return await withTmpDir(async (tempDir) => {
     const codeql = createStubCodeQL({
-      async betterResolveLanguages() {
+      async resolveLanguages() {
         return {
           extractors: {
             javascript: [{ extractor_root: "" }],
@@ -647,8 +638,9 @@ test.serial("API client used when reading remote config", async (t) => {
     const configFile = "octo-org/codeql-config/config.yaml@main";
     const languagesInput = "javascript";
 
+    const state = initAllState();
     await configUtils.initConfig(
-      createFeatures([]),
+      state,
       createTestInitConfigInputs({
         languagesInput,
         configFile,
@@ -669,9 +661,10 @@ test.serial(
       mockGetContents(dummyResponse);
 
       const repoReference = "octo-org/codeql-config/config.yaml@main";
+      const state = initAllState();
       try {
         await configUtils.initConfig(
-          createFeatures([]),
+          state,
           createTestInitConfigInputs({
             configFile: repoReference,
             tempDir,
@@ -699,9 +692,10 @@ test.serial("Invalid format of remote config handled correctly", async (t) => {
     mockGetContents(dummyResponse);
 
     const repoReference = "octo-org/codeql-config/config.yaml@main";
+    const state = initAllState();
     try {
       await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           configFile: repoReference,
           tempDir,
@@ -725,13 +719,14 @@ test.serial("No detected languages", async (t) => {
     mockListLanguages([]);
     const codeql = createStubCodeQL({
       async resolveLanguages() {
-        return {};
+        return { extractors: {} };
       },
     });
 
+    const state = initAllState();
     try {
       await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           tempDir,
           codeql,
@@ -752,9 +747,10 @@ test.serial("Unknown languages", async (t) => {
   return await withTmpDir(async (tempDir) => {
     const languagesInput = "rubbish,english";
 
+    const state = initAllState();
     try {
       await configUtils.initConfig(
-        createFeatures([]),
+        state,
         createTestInitConfigInputs({
           languagesInput,
           tempDir,
@@ -891,7 +887,7 @@ const mockRepositoryNwo = parseRepositoryNwo("owner/repo");
       extractor_root: "",
     };
     const codeQL = createStubCodeQL({
-      betterResolveLanguages: (options) =>
+      resolveLanguages: (options) =>
         Promise.resolve({
           aliases: {
             "c#": BuiltInLanguage.csharp,
@@ -1299,13 +1295,12 @@ checkOverlayEnablementMacro.serial(
 );
 
 checkOverlayEnablementMacro.serial(
-  "No overlay-base database on default branch if runner disk space is below v2 limit and v2 resource checks enabled",
+  "No overlay-base database on default branch if runner disk space is below minimum",
   {
     languages: [BuiltInLanguage.javascript],
     features: [
       Feature.OverlayAnalysis,
       Feature.OverlayAnalysisCodeScanningJavascript,
-      Feature.OverlayAnalysisResourceChecksV2,
     ],
     isDefaultBranch: true,
     diskUsage: {
@@ -1319,13 +1314,12 @@ checkOverlayEnablementMacro.serial(
 );
 
 checkOverlayEnablementMacro.serial(
-  "Overlay-base database on default branch if runner disk space is between v2 and v1 limits and v2 resource checks enabled",
+  "Overlay-base database on default branch if runner disk space is above minimum",
   {
     languages: [BuiltInLanguage.javascript],
     features: [
       Feature.OverlayAnalysis,
       Feature.OverlayAnalysisCodeScanningJavascript,
-      Feature.OverlayAnalysisResourceChecksV2,
     ],
     isDefaultBranch: true,
     diskUsage: {
@@ -1339,25 +1333,6 @@ checkOverlayEnablementMacro.serial(
   },
 );
 
-checkOverlayEnablementMacro.serial(
-  "No overlay-base database on default branch if runner disk space is between v2 and v1 limits and v2 resource checks not enabled",
-  {
-    languages: [BuiltInLanguage.javascript],
-    features: [
-      Feature.OverlayAnalysis,
-      Feature.OverlayAnalysisCodeScanningJavascript,
-    ],
-    isDefaultBranch: true,
-    diskUsage: {
-      numAvailableBytes: 15_000_000_000,
-      numTotalBytes: 100_000_000_000,
-    },
-  },
-  {
-    disabledReason: OverlayDisabledReason.InsufficientDiskSpace,
-  },
-);
-
 checkOverlayEnablementMacro.serial(
   "No overlay-base database on default branch if memory flag is too low",
   {
@@ -2272,3 +2247,440 @@ test("applyIncrementalAnalysisSettings: adds exclusions for diff-informed-only r
     { exclude: { tags: "exclude-from-incremental" } },
   ]);
 });
+
+test("determineUserConfig - empty config when neither input is specified", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv()
+      .withFeatures([])
+      .withArgs(
+        tmpDir,
+        createTestInitConfigInputs({
+          configInput: undefined,
+          configFile: undefined,
+          workspacePath: tmpDir,
+        }),
+      );
+
+    // The returned configuration should be empty.
+    await target
+      // The fact that no configuration was provided should have been logged,
+      .logs(t, "No configuration file was provided")
+      // But not the messages for the two input sources
+      // or the warning about both inputs.
+      .notLogs(
+        t,
+        "Using config from action input:",
+        "Using configuration file:",
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      .passes(t.deepEqual, {});
+  });
+});
+
+test("determineUserConfig - loads config file", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const configFilePath = createConfigFile(simpleConfigFileContents, tmpDir);
+
+    const inputs = createTestInitConfigInputs({
+      configInput: undefined,
+      configFile: configFilePath,
+      workspacePath: tmpDir,
+    });
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv()
+      .withArgs(tmpDir, inputs);
+
+    await target
+      // The path of the input config file should have been logged,
+      .logs(t, `Using configuration file: ${configFilePath}`)
+      .notLogs(
+        t,
+        // The other two origin messages and the warning about both inputs should
+        // not have been logged.
+        "No configuration file was provided",
+        "Using config from action input:",
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      // The loaded configuration should match `simpleConfigFileContents`.
+      .passes(t.deepEqual, {
+        name: "my config",
+        queries: [{ uses: "./foo_file" }],
+      });
+
+    // The `configFile` input should not have changed.
+    t.is(inputs.configFile, configFilePath);
+  });
+});
+
+test("determineUserConfig - loads config input", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const expectedConfigPath = configUtils.userConfigFromActionPath(tmpDir);
+
+    const inputs = createTestInitConfigInputs({
+      configInput: simpleConfigFileContents,
+      configFile: undefined,
+      workspacePath: tmpDir,
+    });
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv()
+      .withArgs(tmpDir, inputs);
+
+    await target
+      // The input source and path of the generated config file should have been logged.
+      .logs(
+        t,
+        "Using config from action input:",
+        `Using configuration file: ${expectedConfigPath}`,
+      )
+      // The message about no configuration input and
+      // the warning about both inputs should not have been logged.
+      .notLogs(
+        t,
+        "No configuration file was provided",
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      // The loaded configuration should match `simpleConfigFileContents`.
+      .passes(t.deepEqual, {
+        name: "my config",
+        queries: [{ uses: "./foo_file" }],
+      });
+
+    // The `configFile` input should have been mutated to the generated path.
+    t.is(inputs.configFile, expectedConfigPath);
+  });
+});
+
+test("determineUserConfig - ignores config file input when both specified", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const configFilePath = createConfigFile(otherConfigFileContents, tmpDir);
+    const expectedConfigPath = configUtils.userConfigFromActionPath(tmpDir);
+
+    const inputs = createTestInitConfigInputs({
+      configInput: simpleConfigFileContents,
+      configFile: configFilePath,
+      workspacePath: tmpDir,
+    });
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv()
+      .withArgs(tmpDir, inputs);
+
+    await target
+      // The path of the generated config file and
+      // the warning about both inputs should have been logged.
+      .logs(
+        t,
+        `Using config from action input: ${expectedConfigPath}`,
+        `Using configuration file: ${expectedConfigPath}`,
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      .notLogs(t, "No configuration file was provided")
+      // The loaded configuration should match `simpleConfigFileContents`.
+      .passes(t.deepEqual, {
+        name: "my config",
+        queries: [{ uses: "./foo_file" }],
+      });
+
+    // The `configFile` input should have been mutated to the generated path.
+    t.is(inputs.configFile, expectedConfigPath);
+  });
+});
+
+/** A `config` input that we might get from Default Setup. */
+const defaultSetupConfigInput = `
+  threat-models: [local, remote]
+  default-setup:
+    org:
+      model-packs: [foo, bar]`;
+
+test("determineUserConfig - merges configs if FF is enabled in Default Setup", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const configFilePath = createConfigFile(simpleConfigFileContents, tmpDir);
+    const expectedConfigPath = configUtils.userConfigFromActionPath(tmpDir);
+
+    const inputs = createTestInitConfigInputs({
+      configInput: defaultSetupConfigInput,
+      configFile: configFilePath,
+      workspacePath: tmpDir,
+    });
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv({ GITHUB_EVENT_NAME: "dynamic" })
+      .withFeatures([Feature.AllowMergeConfigFiles])
+      .withArgs(tmpDir, inputs);
+
+    // The loaded configuration should match the result of merging
+    // `defaultSetupConfigInput` and `simpleConfigFileContents`.
+    const expectedConfig = {
+      name: "my config",
+      queries: [{ uses: "./foo_file" }],
+      "threat-models": ["local", "remote"],
+      "default-setup": {
+        org: {
+          "model-packs": ["foo", "bar"],
+        },
+      },
+    } satisfies UserConfig;
+
+    await target
+      .logs(
+        t,
+        `Using merged configurations from 'config' input with configuration from '${configFilePath}': ${expectedConfigPath}`,
+      )
+      .notLogs(
+        t,
+        `Using configuration file: ${expectedConfigPath}`,
+        "No configuration file was provided",
+        `Using config from action input: ${expectedConfigPath}`,
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      .passes(t.deepEqual, expectedConfig);
+
+    // The `configFile` input should have been mutated to the generated path.
+    t.is(inputs.configFile, expectedConfigPath);
+
+    // Since `result` is the result of merging the configurations in-memory,
+    // also check whether loading the configuration from disk that was written
+    // by `determineUserConfig` matches our expectations.
+    const loadedFromDisk = configUtils.getLocalConfig(
+      getRunnerLogger(true),
+      expectedConfigPath,
+      false,
+    );
+    t.deepEqual(loadedFromDisk, expectedConfig);
+  });
+});
+
+test("determineUserConfig - ignores config file input in Default Setup if FF is off", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const configFilePath = createConfigFile(otherConfigFileContents, tmpDir);
+    const expectedConfigPath = configUtils.userConfigFromActionPath(tmpDir);
+
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv({ GITHUB_EVENT_NAME: "dynamic" })
+      .withArgs(
+        tmpDir,
+        createTestInitConfigInputs({
+          configInput: simpleConfigFileContents,
+          configFile: configFilePath,
+          workspacePath: tmpDir,
+        }),
+      );
+
+    await target
+      .logs(
+        t,
+        `Using config from action input: ${expectedConfigPath}`,
+        `Using configuration file: ${expectedConfigPath}`,
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      .notLogs(t, "No configuration file was provided")
+      .passes(t.deepEqual, {
+        name: "my config",
+        queries: [{ uses: "./foo_file" }],
+      });
+  });
+});
+
+test("determineUserConfig - ignores config file input outside Default Setup if FF is on", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const configFilePath = createConfigFile(otherConfigFileContents, tmpDir);
+    const expectedConfigPath = configUtils.userConfigFromActionPath(tmpDir);
+
+    const target = callee(configUtils.determineUserConfig)
+      .withDefaultActionsEnv()
+      .withFeatures([Feature.AllowMergeConfigFiles])
+      .withArgs(
+        tmpDir,
+        createTestInitConfigInputs({
+          configInput: simpleConfigFileContents,
+          configFile: configFilePath,
+          workspacePath: tmpDir,
+        }),
+      );
+
+    await target
+      .logs(
+        t,
+        `Using config from action input: ${expectedConfigPath}`,
+        `Using configuration file: ${expectedConfigPath}`,
+        "Both a config file and config input were provided. Ignoring config file.",
+      )
+      .notLogs(t, "No configuration file was provided")
+      .passes(t.deepEqual, {
+        name: "my config",
+        queries: [{ uses: "./foo_file" }],
+      });
+  });
+});
+
+test("loadUserConfig - loads local configuration files", async (t) => {
+  await withTmpDir(async (workspaceDir) => {
+    await withTmpDir(async (tmpDir) => {
+      // Construct the test target.
+      const loadUserConfig = (
+        actionState: ActionState<["Logger", "Env", "FeatureFlags"]>,
+        filePath: string,
+      ) =>
+        configUtils.loadUserConfig(
+          actionState,
+          filePath,
+          workspaceDir,
+          SAMPLE_DOTCOM_API_DETAILS,
+          tmpDir,
+        );
+      const target = callee(loadUserConfig);
+
+      // `loadUserConfig` should load local configuration files if they are inside the workspace:
+      const insideOfWorkspace = path.join(workspaceDir, "some-file.yml");
+      fs.writeFileSync(insideOfWorkspace, "test-key: present", "utf8");
+
+      await target
+        .withArgs(insideOfWorkspace)
+        .passes(t.deepEqual, { "test-key": "present" });
+
+      // `loadUserConfig` should normally throw if the path is outside of the workspace:
+      const outsideOfWorkspace = path.join(
+        tmpDir,
+        "not-the-generated-file.yml",
+      );
+      fs.writeFileSync(outsideOfWorkspace, "test-key: present", "utf8");
+
+      await target
+        .withArgs(outsideOfWorkspace)
+        .throws(t, { instanceOf: ConfigurationError });
+
+      // `loadUserConfig` does not throw if the path is the result of `userConfigFromActionPath`:
+      const generatedPath = configUtils.userConfigFromActionPath(tmpDir);
+      fs.writeFileSync(generatedPath, "test-key: present", "utf8");
+
+      await target
+        .withArgs(generatedPath)
+        .passes(t.deepEqual, { "test-key": "present" });
+    });
+  });
+});
+
+test.serial("loadUserConfig - loads remote configuration files", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const getRemoteConfig = sinon.stub(file, "getRemoteConfig").resolves({});
+
+    const remoteAddress = "owner/repo/file@ref";
+    await callee(configUtils.loadUserConfig)
+      .withArgs(remoteAddress, tmpDir, SAMPLE_DOTCOM_API_DETAILS, tmpDir)
+      .passes(t.deepEqual, {});
+
+    t.true(
+      getRemoteConfig.calledOnceWithExactly(
+        sinon.match.any,
+        remoteAddress,
+        SAMPLE_DOTCOM_API_DETAILS,
+      ),
+    );
+  });
+});
+
+test.serial(
+  "loadUserConfig - loads remote configuration files (new format, partial)",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      const getRemoteConfig = sinon.stub(file, "getRemoteConfig").resolves({});
+
+      // Construct the basic test target.
+      const target = callee(configUtils.loadUserConfig).withDefaultActionsEnv();
+
+      // Utility function to assert that `targetWithArgs` has identified
+      // the input as a remote file address.
+      const checkIsRemote =
+        (address: string) =>
+        async (targetWithArgs: AssertableTarget) => {
+          // We have stubbed `getRemoteConfig` to resolve to `{}`, so we
+          // expect that result.
+          await targetWithArgs.passes(t.deepEqual, {});
+
+          // And `getRemoteConfig` should have been called exactly once.
+          t.is(getRemoteConfig.callCount, 1);
+
+          // Get the arguments for the call and check that there were three.
+          // We don't care about the first, but check that the other two
+          // match our expectations. We break it down like this to get
+          // more useful test output.
+          const args = getRemoteConfig.getCalls()[0].args;
+          t.is(args.length, 3);
+          t.deepEqual(args[1], address);
+          t.deepEqual(args[2], SAMPLE_DOTCOM_API_DETAILS);
+        };
+
+      // Utility function to assert that `targetWithArgs` has not identified
+      // the input as a remote file address.
+      const checkIsNotRemote = async (
+        targetWithArgs: AssertableTarget,
+      ) => {
+        // We expect `loadUserConfig` to have thrown if it thinks the path is local,
+        // since the inputs we provide aren't for files that exist.
+        await targetWithArgs.throws(t);
+
+        // Additionally, we expect that `getRemoteConfig` wasn't called.
+        t.is(getRemoteConfig.callCount, 0);
+      };
+
+      // Utility function to add the explicit `REMOTE_PATH_PREFIX` to the input.
+      const withExplicitPrefix = (str: string) =>
+        `${file.REMOTE_PATH_PREFIX}${str}`;
+
+      // Utility to set up a call to `loadUserConfig` with the provided `address`
+      // and pass it to `assertion`.
+      const testTargetWith = async (
+        address: string,
+        assertion: (
+          targetWithArgs: AssertableTarget>,
+        ) => Promise,
+      ) => {
+        // Reset the stub's history since we re-use it.
+        getRemoteConfig.resetHistory();
+
+        // Log the input we are testing so that, in the event of a failure,
+        // it is easier to see which input was responsible.
+        t.log(`testTargetWith("${address}")`);
+
+        // Prepare the test call to `loadUserConfig`.
+        const targetWithArgs = target.withArgs(
+          address,
+          tmpDir,
+          SAMPLE_DOTCOM_API_DETAILS,
+          tmpDir,
+        );
+
+        // Pass it to the provided assertion function.
+        await assertion(targetWithArgs);
+      };
+
+      // Since this input contains an '@' character, it is treated as a remote path
+      // by the old logic even without the explicit prefix.
+      const remoteWithoutPrefix = "repo@main";
+      await testTargetWith(
+        remoteWithoutPrefix,
+        checkIsRemote(remoteWithoutPrefix),
+      );
+      await testTargetWith(
+        withExplicitPrefix(remoteWithoutPrefix),
+        checkIsRemote(remoteWithoutPrefix),
+      );
+      // It is only treated as a local path with the corresponding prefix.
+      await testTargetWith(`./${remoteWithoutPrefix}`, checkIsNotRemote);
+
+      // The following test inputs are examples of ambiguous paths. They could refer to
+      // valid local or remote paths. For each, we check that they are treated as remote
+      // paths if the explicit remote file prefix is used and as local paths otherwise.
+      const testInputs = ["repo:file", "input", "../input"];
+
+      for (const testInput of testInputs) {
+        for (const addPrefix of [true, false]) {
+          await testTargetWith(
+            addPrefix ? withExplicitPrefix(testInput) : testInput,
+            addPrefix ? checkIsRemote(testInput) : checkIsNotRemote,
+          );
+        }
+      }
+    });
+  },
+);
diff --git a/src/config-utils.ts b/src/config-utils.ts
index f4bd761a23..6d1efaa1ba 100644
--- a/src/config-utils.ts
+++ b/src/config-utils.ts
@@ -5,10 +5,12 @@ import { performance } from "perf_hooks";
 import * as core from "@actions/core";
 import * as yaml from "js-yaml";
 
+import { ActionState } from "./action-common";
 import {
   getActionVersion,
   getOptionalInput,
   isAnalyzingPullRequest,
+  isDefaultSetup,
   isDynamicWorkflow,
 } from "./actions-util";
 import {
@@ -18,15 +20,27 @@ import {
   getAnalysisConfig,
 } from "./analyses";
 import * as api from "./api-client";
-import { CachingKind, getCachingKind } from "./caching-utils";
+import { getCachingKind } from "./caching-utils";
 import { type CodeQL } from "./codeql";
+import { type Config } from "./config/action-config";
 import {
   calculateAugmentation,
   ExcludeQueryFilter,
   generateCodeScanningConfig,
+  mergeDefaultSetupAndUserConfigs,
   parseUserConfig,
   UserConfig,
 } from "./config/db-config";
+import {
+  getRemoteConfig,
+  LOCAL_PATH_PREFIX,
+  REMOTE_PATH_PREFIX,
+} from "./config/file";
+import {
+  parseRegistries,
+  type RegistryConfigNoCredentials,
+  type RegistryConfigWithCredentials,
+} from "./config/pack-registries";
 import {
   addNoLanguageDiagnostic,
   makeTelemetryDiagnostic,
@@ -79,6 +93,8 @@ import {
   isHostedRunner,
 } from "./util";
 
+export { type Config } from "./config/action-config";
+
 /**
  * The minimum available disk space (in MB) required to perform overlay analysis.
  * If the available disk space on the runner is below the threshold when deciding
@@ -86,19 +102,10 @@ import {
  * analysis unless overlay analysis has been explicitly enabled via environment
  * variable.
  */
-const OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 20000;
+const OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 14000;
 const OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES =
   OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1_000_000;
 
-/**
- * The v2 minimum available disk space (in MB) required to perform overlay
- * analysis. This is a lower threshold than the v1 limit, allowing overlay
- * analysis to run on runners with less available disk space.
- */
-const OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_MB = 14000;
-const OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_BYTES =
-  OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_MB * 1_000_000;
-
 /**
  * The minimum memory (in MB) that must be available for CodeQL to perform overlay analysis. If
  * CodeQL will be given less memory than this threshold, then the action will not perform overlay
@@ -117,148 +124,6 @@ const OVERLAY_MINIMUM_MEMORY_MB = 5 * 1024;
  */
 const CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE = "2.24.3";
 
-export type RegistryConfigWithCredentials = RegistryConfigNoCredentials & {
-  // Token to use when downloading packs from this registry.
-  token: string;
-};
-
-/**
- * The list of registries and the associated pack globs that determine where each
- * pack can be downloaded from.
- */
-export interface RegistryConfigNoCredentials {
-  // URL of a package registry, eg- https://ghcr.io/v2/
-  url: string;
-
-  // List of globs that determine which packs are associated with this registry.
-  packages: string[] | string;
-
-  // Kind of registry, either "github" or "docker". Default is "docker".
-  // "docker" refers specifically to the GitHub Container Registry, which is the usual way of sharing CodeQL packs.
-  // "github" refers to packs published as content in a GitHub repository. This kind of registry is used in scenarios
-  // where GHCR is not available, such as certain GHES environments.
-  kind?: "github" | "docker";
-}
-
-/**
- * Format of the parsed config file.
- */
-export interface Config {
-  /**
-   * The version of the CodeQL Action that the configuration is for.
-   */
-  version: string;
-  /**
-   * Set of analysis kinds that are enabled.
-   */
-  analysisKinds: AnalysisKind[];
-  /**
-   * Set of languages to run analysis for.
-   */
-  languages: Language[];
-  /**
-   * Build mode, if set. Currently only a single build mode is supported per job.
-   */
-  buildMode: BuildMode | undefined;
-  /**
-   * A unaltered copy of the original user input.
-   * Mainly intended to be used for status reporting.
-   * If any field is useful for the actual processing
-   * of the action then consider pulling it out to a
-   * top-level field above.
-   */
-  originalUserInput: UserConfig;
-  /**
-   * Directory to use for temporary files that should be
-   * deleted at the end of the job.
-   */
-  tempDir: string;
-  /**
-   * Path of the CodeQL executable.
-   */
-  codeQLCmd: string;
-  /**
-   * Version of GitHub we are talking to.
-   */
-  gitHubVersion: GitHubVersion;
-  /**
-   * The location where CodeQL databases should be stored.
-   */
-  dbLocation: string;
-  /**
-   * Specifies whether we are debugging mode and should try to produce extra
-   * output for debugging purposes when possible.
-   */
-  debugMode: boolean;
-  /**
-   * Specifies the name of the debugging artifact if we are in debug mode.
-   */
-  debugArtifactName: string;
-  /**
-   * Specifies the name of the database in the debugging artifact.
-   */
-  debugDatabaseName: string;
-  /**
-   * The configuration we computed by combining `originalUserInput` with `augmentationProperties`,
-   * as well as adjustments made to it based on unsupported or required options.
-   */
-  computedConfig: UserConfig;
-
-  /**
-   * Partial map from languages to locations of TRAP caches for that language.
-   * If a key is omitted, then TRAP caching should not be used for that language.
-   */
-  trapCaches: { [language: Language]: string };
-
-  /**
-   * Time taken to download TRAP caches. Used for status reporting.
-   */
-  trapCacheDownloadTime: number;
-
-  /** A value indicating how dependency caching should be used. */
-  dependencyCachingEnabled: CachingKind;
-
-  /** The keys of caches that we restored, if any. */
-  dependencyCachingRestoredKeys: string[];
-
-  /**
-   * Extra query exclusions to append to the config.
-   */
-  extraQueryExclusions: ExcludeQueryFilter[];
-
-  /**
-   * The overlay database mode to use.
-   */
-  overlayDatabaseMode: OverlayDatabaseMode;
-
-  /**
-   * Whether to use caching for overlay databases. If it is true, the action
-   * will upload the created overlay-base database to the actions cache, and
-   * download an overlay-base database from the actions cache before it creates
-   * a new overlay database. If it is false, the action assumes that the
-   * workflow will be responsible for managing database storage and retrieval.
-   *
-   * This property has no effect unless `overlayDatabaseMode` is `Overlay` or
-   * `OverlayBase`.
-   */
-  useOverlayDatabaseCaching: boolean;
-
-  /**
-   * Whether the overlay database mode was set explicitly.
-   */
-  overlayModeSetExplicitly: boolean;
-
-  /**
-   * A partial mapping from repository properties that affect us to their values.
-   */
-  repositoryProperties: RepositoryProperties;
-
-  /**
-   * Whether to enable file coverage information.
-   */
-  enableFileCoverageInformation: boolean;
-}
-
 async function getSupportedLanguageMap(
   codeql: CodeQL,
   logger: Logger,
@@ -266,7 +131,7 @@ async function getSupportedLanguageMap(
   const resolveSupportedLanguagesUsingCli = await codeql.supportsFeature(
     ToolsFeature.BuiltinExtractorsSpecifyDefaultQueries,
   );
-  const resolveResult = await codeql.betterResolveLanguages({
+  const resolveResult = await codeql.resolveLanguages({
     filterToLanguagesWithQueries: resolveSupportedLanguagesUsingCli,
   });
   if (resolveSupportedLanguagesUsingCli) {
@@ -598,13 +463,22 @@ async function downloadCacheWithTime(
   return { trapCaches, trapCacheDownloadTime };
 }
 
-async function loadUserConfig(
-  logger: Logger,
+/**
+ * Loads a CLI configuration file from `configFile`.
+ *
+ * @param actionState The Action state.
+ * @param configFile The address of the configuration file.
+ * @param workspacePath The workspace path, used to check that the configuration file exists relative to it.
+ * @param apiDetails Information for how to access the API to fetch remote files.
+ * @param tempDir The temporary directory which may contain a CodeQL Action-generated configuration file.
+ * @returns The loaded configuration file, if successful.
+ */
+export async function loadUserConfig(
+  actionState: ActionState<["Logger", "Env", "FeatureFlags"]>,
   configFile: string,
   workspacePath: string,
   apiDetails: api.GitHubApiCombinedDetails,
   tempDir: string,
-  validateConfig: boolean,
 ): Promise {
   if (isLocal(configFile)) {
     if (configFile !== userConfigFromActionPath(tempDir)) {
@@ -617,14 +491,18 @@ async function loadUserConfig(
         );
       }
     }
-    return getLocalConfig(logger, configFile, validateConfig);
-  } else {
-    return await getRemoteConfig(
-      logger,
-      configFile,
-      apiDetails,
-      validateConfig,
+    const validateConfig = await actionState.features.getValue(
+      Feature.ValidateDbConfig,
     );
+    return getLocalConfig(actionState.logger, configFile, validateConfig);
+  } else {
+    // Drop the explicit prefix if it is present. Since `REMOTE_PATH_PREFIX` is chosen
+    // to not conflict with permissible characters in "owner" or "repo" components,
+    // this does not risk removing valid parts of either component by accident.
+    if (isExplicitRemotePath(configFile)) {
+      configFile = configFile.substring(REMOTE_PATH_PREFIX.length);
+    }
+    return await getRemoteConfig(actionState, configFile, apiDetails);
   }
 }
 
@@ -705,11 +583,8 @@ async function checkOverlayAnalysisFeatureEnabled(
 function runnerHasSufficientDiskSpace(
   diskUsage: DiskUsage,
   logger: Logger,
-  useV2ResourceChecks: boolean,
 ): boolean {
-  const minimumDiskSpaceBytes = useV2ResourceChecks
-    ? OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_V2_BYTES
-    : OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES;
+  const minimumDiskSpaceBytes = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES;
   if (diskUsage.numAvailableBytes < minimumDiskSpaceBytes) {
     const diskSpaceMb = Math.round(diskUsage.numAvailableBytes / 1_000_000);
     const minimumDiskSpaceMb = Math.round(minimumDiskSpaceBytes / 1_000_000);
@@ -764,9 +639,8 @@ async function checkRunnerResources(
   diskUsage: DiskUsage,
   ramInput: string | undefined,
   logger: Logger,
-  useV2ResourceChecks: boolean,
 ): Promise> {
-  if (!runnerHasSufficientDiskSpace(diskUsage, logger, useV2ResourceChecks)) {
+  if (!runnerHasSufficientDiskSpace(diskUsage, logger)) {
     return new Failure(OverlayDisabledReason.InsufficientDiskSpace);
   }
   if (!(await runnerHasSufficientMemory(codeql, ramInput, logger))) {
@@ -865,9 +739,6 @@ export async function checkOverlayEnablement(
     Feature.OverlayAnalysisSkipResourceChecks,
     codeql,
   ));
-  const useV2ResourceChecks = await features.getValue(
-    Feature.OverlayAnalysisResourceChecksV2,
-  );
   const checkOverlayStatus = await features.getValue(
     Feature.OverlayAnalysisStatusCheck,
   );
@@ -881,13 +752,7 @@ export async function checkOverlayEnablement(
   }
   const resourceResult =
     performResourceChecks && diskUsage !== undefined
-      ? await checkRunnerResources(
-          codeql,
-          diskUsage,
-          ramInput,
-          logger,
-          useV2ResourceChecks,
-        )
+      ? await checkRunnerResources(codeql, diskUsage, ramInput, logger)
       : new Success(undefined);
   if (resourceResult.isFailure()) {
     return resourceResult;
@@ -1071,7 +936,11 @@ function dbLocationOrDefault(
   return dbLocation || path.resolve(tempDir, "codeql_databases");
 }
 
-function userConfigFromActionPath(tempDir: string): string {
+/**
+ * Gets the path for the CodeQL Action-generated configuration file,
+ * which is used to store the `config` input.
+ */
+export function userConfigFromActionPath(tempDir: string): string {
   return path.resolve(tempDir, "user-config-from-action.yml");
 }
 
@@ -1132,44 +1001,123 @@ export async function applyIncrementalAnalysisSettings(
 }
 
 /**
- * Load and return the config.
+ * Determines where to load the `UserConfig` for the CLI from and loads it.
  *
- * This will parse the config from the user input if present, or generate
- * a default config. The parsed config is then stored to a known location.
+ * @param inputs The Action inputs. The `configFile` value will be mutated
+ *               if a CodeQL Action-generated file should be used.
+ *
+ * @returns The loaded `UserConfig`, which might be empty if no configuration
+ *          was specified.
  */
-export async function initConfig(
-  features: FeatureEnablement,
+export async function determineUserConfig(
+  action: ActionState<["Logger", "Env", "FeatureFlags"]>,
+  tempDir: string,
   inputs: InitConfigInputs,
-): Promise {
-  const { logger, tempDir } = inputs;
+): Promise {
+  const validateConfig = await action.features.getValue(
+    Feature.ValidateDbConfig,
+  );
 
-  // if configInput is set, it takes precedence over configFile
+  // We have the following cases:
+  // 1. A `config` or `config-file` input is provided, but not both: use the provided one.
+  // 2. Both are provided and we are in an advanced workflow: ignore the `config-file` input.
+  // 3. Both are provided and we are in Default Setup: the `config` input uses a limited
+  //    set of options, which are supported by `mergeDefaultSetupAndUserConfigs`,
+  //    and we merge the two configs.
   if (inputs.configInput) {
-    if (inputs.configFile) {
-      logger.warning(
-        `Both a config file and config input were provided. Ignoring config file.`,
+    const computedConfigPath = userConfigFromActionPath(tempDir);
+
+    // Get a function which enables us to determine whether the FF that allows us to
+    // merge supported configuration file properties is enabled. We only execute
+    // this lazily if the other checks pass.
+    const allowMergeConfigs = () =>
+      action.features.getValue(Feature.AllowMergeConfigFiles);
+
+    // Check whether we also have a `config-file` input and decide what to do.
+    if (
+      inputs.configFile &&
+      isDefaultSetup(action.env) &&
+      (await allowMergeConfigs())
+    ) {
+      // If the FF is enabled and we are in Default Setup, combine the supported
+      // configuration file properties and write the result to disk.
+      const fromConfigInput = parseUserConfig(
+        action.logger,
+        "`config` input",
+        inputs.configInput,
+        validateConfig,
+      );
+      const fromConfigFile = await loadUserConfig(
+        action,
+        inputs.configFile,
+        inputs.workspacePath,
+        inputs.apiDetails,
+        tempDir,
+      );
+
+      // Write the merged configuration to disk so that it can be loaded subsequently by
+      // the CLI or other CodeQL Action steps.
+      const mergedConfig = mergeDefaultSetupAndUserConfigs(
+        action.logger,
+        fromConfigInput,
+        fromConfigFile,
+      );
+      fs.writeFileSync(computedConfigPath, yaml.dump(mergedConfig));
+      action.logger.debug(
+        `Using merged configurations from 'config' input with configuration from '${inputs.configFile}': ${computedConfigPath}`,
+      );
+
+      inputs.configFile = computedConfigPath;
+      return mergedConfig;
+    } else {
+      // If we are in this branch and there is a `config-file` input, then it means
+      // we didn't meet the conditions for merging the configurations. Warn the user
+      // that the configuration file will be ignored.
+      if (inputs.configFile) {
+        action.logger.warning(
+          `Both a config file and config input were provided. Ignoring config file.`,
+        );
+      }
+
+      // Write the `config` input straight to disk.
+      fs.writeFileSync(computedConfigPath, inputs.configInput);
+      inputs.configFile = computedConfigPath;
+      action.logger.debug(
+        `Using config from action input: ${inputs.configFile}`,
       );
     }
-    inputs.configFile = userConfigFromActionPath(tempDir);
-    fs.writeFileSync(inputs.configFile, inputs.configInput);
-    logger.debug(`Using config from action input: ${inputs.configFile}`);
   }
 
-  let userConfig: UserConfig = {};
+  // Load whatever configuration file we have, if any.
   if (!inputs.configFile) {
-    logger.debug("No configuration file was provided");
+    action.logger.debug("No configuration file was provided");
+    return {};
   } else {
-    logger.debug(`Using configuration file: ${inputs.configFile}`);
-    const validateConfig = await features.getValue(Feature.ValidateDbConfig);
-    userConfig = await loadUserConfig(
-      logger,
+    action.logger.debug(`Using configuration file: ${inputs.configFile}`);
+    return await loadUserConfig(
+      action,
       inputs.configFile,
       inputs.workspacePath,
       inputs.apiDetails,
       tempDir,
-      validateConfig,
     );
   }
+}
+
+/**
+ * Load and return the config.
+ *
+ * This will parse the config from the user input if present, or generate
+ * a default config. The parsed config is then stored to a known location.
+ */
+export async function initConfig(
+  actionState: ActionState<["Logger", "Env", "FeatureFlags"]>,
+  inputs: InitConfigInputs,
+): Promise {
+  const { logger, features } = actionState;
+  const { tempDir } = inputs;
+
+  const userConfig = await determineUserConfig(actionState, tempDir, inputs);
 
   const config = await initActionState(inputs, userConfig);
 
@@ -1196,7 +1144,6 @@ export async function initConfig(
   try {
     gitVersion = await getGitVersionOrThrow();
     logger.info(`Using Git version ${gitVersion.fullVersion}`);
-    await logGitVersionTelemetry(config, gitVersion);
   } catch (e) {
     logger.warning(`Could not determine Git version: ${getErrorMessage(e)}`);
     // Throw the error in test mode so it's more visible, unless the environment
@@ -1317,39 +1264,61 @@ export async function initConfig(
   return config;
 }
 
-function parseRegistries(
-  registriesInput: string | undefined,
-): RegistryConfigWithCredentials[] | undefined {
-  try {
-    return registriesInput
-      ? (yaml.load(registriesInput) as RegistryConfigWithCredentials[])
-      : undefined;
-  } catch {
-    throw new ConfigurationError(
-      "Invalid registries input. Must be a YAML string.",
-    );
-  }
+/**
+ * Determines if `configPath` is explicitly local. That is, it starts with `LOCAL_PATH_PREFIX`.
+ * A configuration file path that starts with `LOCAL_PATH_PREFIX` is always treated as a local path.
+ *
+ * @param configPath The path to test.
+ */
+function isExplicitLocalPath(configPath: string): boolean {
+  return configPath.startsWith(LOCAL_PATH_PREFIX);
 }
 
-export function parseRegistriesWithoutCredentials(
-  registriesInput?: string,
-): RegistryConfigNoCredentials[] | undefined {
-  return parseRegistries(registriesInput)?.map((r) => {
-    const { url, packages, kind } = r;
-    return { url, packages, kind };
-  });
+/**
+ * Determines if `configPath` starts with the prefix used to explicitly mark a path
+ * as a remote path (`REMOTE_PATH_PREFIX`).
+ *
+ * @param configPath The path to test.
+ */
+function isExplicitRemotePath(configPath: string): boolean {
+  return configPath.startsWith(REMOTE_PATH_PREFIX);
 }
 
+/**
+ * Determines if `configPath` contains a '@' character.
+ *
+ * @param configPath The path to test.
+ */
+function containsAtRef(configPath: string): boolean {
+  return configPath.includes("@");
+}
+
+/**
+ * Determines if `configPath` refers to a local configuration file.
+ *
+ * @param configPath The path to test.
+ * @returns True if it is local, or false otherwise.
+ */
 function isLocal(configPath: string): boolean {
-  // If the path starts with ./, look locally
-  if (configPath.indexOf("./") === 0) {
+  // If the path starts with `LOCAL_PATH_PREFIX`, it is explicitly local.
+  // This allows local paths that would otherwise contain '@'
+  // to be used with a `LOCAL_PATH_PREFIX` prefix.
+  if (isExplicitLocalPath(configPath)) {
     return true;
   }
+  // If the path starts with `REMOTE_PATH_PREFIX`, it is explicitly remote.
+  // This allows users to resolve ambiguity by specifying `REMOTE_PATH_PREFIX`.
+  if (isExplicitRemotePath(configPath)) {
+    return false;
+  }
 
-  return configPath.indexOf("@") === -1;
+  // Otherwise, the path is also local if it does not contain '@'.
+  // This assumes the `OLD_REMOTE_ADDRESS_FORMAT` which must contain a '@'
+  // character for remote addresses.
+  return !containsAtRef(configPath);
 }
 
-function getLocalConfig(
+export function getLocalConfig(
   logger: Logger,
   configFile: string,
   validateConfig: boolean,
@@ -1369,54 +1338,6 @@ function getLocalConfig(
   );
 }
 
-async function getRemoteConfig(
-  logger: Logger,
-  configFile: string,
-  apiDetails: api.GitHubApiCombinedDetails,
-  validateConfig: boolean,
-): Promise {
-  // retrieve the various parts of the config location, and ensure they're present
-  const format = new RegExp(
-    "(?[^/]+)/(?[^/]+)/(?[^@]+)@(?.*)",
-  );
-  const pieces = format.exec(configFile);
-  // 5 = 4 groups + the whole expression
-  if (pieces?.groups === undefined || pieces.length < 5) {
-    throw new ConfigurationError(
-      errorMessages.getConfigFileRepoFormatInvalidMessage(configFile),
-    );
-  }
-
-  const response = await api
-    .getApiClientWithExternalAuth(apiDetails)
-    .rest.repos.getContent({
-      owner: pieces.groups.owner,
-      repo: pieces.groups.repo,
-      path: pieces.groups.path,
-      ref: pieces.groups.ref,
-    });
-
-  let fileContents: string;
-  if ("content" in response.data && response.data.content !== undefined) {
-    fileContents = response.data.content;
-  } else if (Array.isArray(response.data)) {
-    throw new ConfigurationError(
-      errorMessages.getConfigFileDirectoryGivenMessage(configFile),
-    );
-  } else {
-    throw new ConfigurationError(
-      errorMessages.getConfigFileFormatInvalidMessage(configFile),
-    );
-  }
-
-  return parseUserConfig(
-    logger,
-    configFile,
-    Buffer.from(fileContents, "base64").toString("binary"),
-    validateConfig,
-  );
-}
-
 /**
  * Get the file path where the parsed config will be stored.
  */
@@ -1700,26 +1621,6 @@ export function getPrimaryAnalysisConfig(config: Config): AnalysisConfig {
   return getAnalysisConfig(getPrimaryAnalysisKind(config));
 }
 
-/** Logs the Git version as a telemetry diagnostic. */
-async function logGitVersionTelemetry(
-  config: Config,
-  gitVersion: GitVersionInfo,
-): Promise {
-  if (config.languages.length > 0) {
-    addNoLanguageDiagnostic(
-      config,
-      makeTelemetryDiagnostic(
-        "codeql-action/git-version-telemetry",
-        "Git version telemetry",
-        {
-          fullVersion: gitVersion.fullVersion,
-          truncatedVersion: gitVersion.truncatedVersion,
-        },
-      ),
-    );
-  }
-}
-
 /**
  * Logs the time it took to identify generated files and how many were discovered as
  * a telemetry diagnostic.
diff --git a/src/config/action-config.ts b/src/config/action-config.ts
new file mode 100644
index 0000000000..de6882e77e
--- /dev/null
+++ b/src/config/action-config.ts
@@ -0,0 +1,128 @@
+import type { AnalysisKind } from "../analyses";
+import type { CachingKind } from "../caching-utils";
+import type { RepositoryProperties } from "../feature-flags/properties";
+import type { Language } from "../languages";
+import type { OverlayDatabaseMode } from "../overlay/overlay-database-mode";
+import type { BuildMode, GitHubVersion } from "../util";
+
+import type { ExcludeQueryFilter, UserConfig } from "./db-config";
+
+/**
+ * Format of the CodeQL Action configuration state that is persisted
+ * between steps of the CodeQL Action in a CodeQL workflow.
+ */
+export interface Config {
+  /**
+   * The version of the CodeQL Action that the configuration is for.
+   */
+  version: string;
+  /**
+   * Set of analysis kinds that are enabled.
+   */
+  analysisKinds: AnalysisKind[];
+  /**
+   * Set of languages to run analysis for.
+   */
+  languages: Language[];
+  /**
+   * Build mode, if set. Currently only a single build mode is supported per job.
+   */
+  buildMode: BuildMode | undefined;
+  /**
+   * A unaltered copy of the original user input.
+   * Mainly intended to be used for status reporting.
+   * If any field is useful for the actual processing
+   * of the action then consider pulling it out to a
+   * top-level field above.
+   */
+  originalUserInput: UserConfig;
+  /**
+   * Directory to use for temporary files that should be
+   * deleted at the end of the job.
+   */
+  tempDir: string;
+  /**
+   * Path of the CodeQL executable.
+   */
+  codeQLCmd: string;
+  /**
+   * Version of GitHub we are talking to.
+   */
+  gitHubVersion: GitHubVersion;
+  /**
+   * The location where CodeQL databases should be stored.
+   */
+  dbLocation: string;
+  /**
+   * Specifies whether we are debugging mode and should try to produce extra
+   * output for debugging purposes when possible.
+   */
+  debugMode: boolean;
+  /**
+   * Specifies the name of the debugging artifact if we are in debug mode.
+   */
+  debugArtifactName: string;
+  /**
+   * Specifies the name of the database in the debugging artifact.
+   */
+  debugDatabaseName: string;
+  /**
+   * The configuration we computed by combining `originalUserInput` with `augmentationProperties`,
+   * as well as adjustments made to it based on unsupported or required options.
+   */
+  computedConfig: UserConfig;
+
+  /**
+   * Partial map from languages to locations of TRAP caches for that language.
+   * If a key is omitted, then TRAP caching should not be used for that language.
+   */
+  trapCaches: { [language: Language]: string };
+
+  /**
+   * Time taken to download TRAP caches. Used for status reporting.
+   */
+  trapCacheDownloadTime: number;
+
+  /** A value indicating how dependency caching should be used. */
+  dependencyCachingEnabled: CachingKind;
+
+  /** The keys of caches that we restored, if any. */
+  dependencyCachingRestoredKeys: string[];
+
+  /**
+   * Extra query exclusions to append to the config.
+   */
+  extraQueryExclusions: ExcludeQueryFilter[];
+
+  /**
+   * The overlay database mode to use.
+   */
+  overlayDatabaseMode: OverlayDatabaseMode;
+
+  /**
+   * Whether to use caching for overlay databases. If it is true, the action
+   * will upload the created overlay-base database to the actions cache, and
+   * download an overlay-base database from the actions cache before it creates
+   * a new overlay database. If it is false, the action assumes that the
+   * workflow will be responsible for managing database storage and retrieval.
+   *
+   * This property has no effect unless `overlayDatabaseMode` is `Overlay` or
+   * `OverlayBase`.
+   */
+  useOverlayDatabaseCaching: boolean;
+
+  /**
+   * Whether the overlay database mode was set explicitly.
+   */
+  overlayModeSetExplicitly: boolean;
+
+  /**
+   * A partial mapping from repository properties that affect us to their values.
+   */
+  repositoryProperties: RepositoryProperties;
+
+  /**
+   * Whether to enable file coverage information.
+   */
+  enableFileCoverageInformation: boolean;
+}
diff --git a/src/config/db-config.test.ts b/src/config/db-config.test.ts
index ca0061e136..63d9d2ffec 100644
--- a/src/config/db-config.test.ts
+++ b/src/config/db-config.test.ts
@@ -8,6 +8,7 @@ import {
   getRecordingLogger,
   LoggedMessage,
   makeMacro,
+  RecordingLogger,
 } from "../testing-utils";
 import { ConfigurationError, prettyPrintPack } from "../util";
 
@@ -488,3 +489,139 @@ test("parseUserConfig - throws no ConfigurationError if validation should fail,
     ),
   );
 });
+
+test("mergeDefaultSetupAndUserConfigs - combines threat models", async (t) => {
+  const logger = new RecordingLogger();
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    { "threat-models": ["a", "b"] },
+    { "threat-models": ["local", "remote"] },
+  );
+
+  const threatModels = result["threat-models"];
+
+  if (t.truthy(threatModels)) {
+    t.deepEqual(threatModels, ["a", "b", "local", "remote"]);
+  }
+});
+
+test("mergeDefaultSetupAndUserConfigs - warns if user-supplied config contains default setup key", async (t) => {
+  const logger = new RecordingLogger();
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    {},
+    { "default-setup": {} },
+  );
+
+  // User-supplied value is ignored.
+  t.deepEqual(result, {});
+
+  // Warning is logged.
+  t.true(
+    logger.hasMessage(
+      "The 'default-setup' configuration key is not supported in user-supplied configuration files",
+    ),
+  );
+});
+
+test("mergeDefaultSetupAndUserConfigs - keeps default setup key from 'config' input", async (t) => {
+  const logger = new RecordingLogger();
+  const expected: dbConfig.DefaultSetupConfig = {
+    org: { "model-packs": ["some-pack"] },
+  };
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    { "default-setup": expected },
+    {},
+  );
+
+  // Result matches the input.
+  t.deepEqual(result["default-setup"], expected);
+
+  // No warning is logged.
+  t.false(
+    logger.hasMessage(
+      "The 'default-setup' configuration key is not supported in user-supplied configuration files",
+    ),
+  );
+});
+
+test("mergeDefaultSetupAndUserConfigs - keeps other properties from user-supplied configuration", async (t) => {
+  const logger = new RecordingLogger();
+  const configFile: dbConfig.UserConfig = {
+    "query-filters": [{ exclude: { a: "b" } }],
+    "paths-ignore": ["path"],
+  };
+
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    {},
+    configFile,
+  );
+
+  t.deepEqual(result, configFile);
+});
+
+test("mergeDefaultSetupAndUserConfigs - ignores, but warns about, unknown keys from Default Setup", async (t) => {
+  const logger = new RecordingLogger();
+  const configFile: dbConfig.UserConfig = {
+    "query-filters": [{ exclude: { a: "b" } }],
+    "paths-ignore": ["path"],
+  };
+
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    {
+      "default-setup": {
+        borg: [],
+        org: {
+          unknown: "foo",
+          "model-packs": [],
+        },
+      } as unknown as dbConfig.DefaultSetupConfig,
+      "paths-ignore": ["other-path"],
+    },
+    configFile,
+  );
+
+  t.deepEqual(result, {
+    ...configFile,
+    "default-setup": { org: { "model-packs": [] } },
+  });
+
+  const expectedUnrecognisedKeys = [
+    ".default-setup.org.unknown",
+    ".default-setup.borg",
+    ".paths-ignore",
+  ].join(", ");
+  checkExpectedLogMessages(t, logger.messages, [
+    `Unrecognised keys in Default Setup configuration: ${expectedUnrecognisedKeys}`,
+  ]);
+});
+
+test("mergeDefaultSetupAndUserConfigs - warns about invalid keys from Default Setup", async (t) => {
+  const logger = new RecordingLogger();
+  const configFile: dbConfig.UserConfig = {};
+
+  const result = dbConfig.mergeDefaultSetupAndUserConfigs(
+    logger,
+    {
+      "default-setup": {
+        org: {
+          "model-packs": [123],
+        },
+      } as unknown as dbConfig.DefaultSetupConfig,
+    },
+    configFile,
+  );
+
+  t.deepEqual(result, {
+    ...configFile,
+    "default-setup": { org: { "model-packs": [123] } },
+  });
+
+  const expectedInvalidKeys = [".default-setup.org.model-packs[0]"].join(", ");
+  checkExpectedLogMessages(t, logger.messages, [
+    `Invalid keys in Default Setup configuration: ${expectedInvalidKeys}`,
+  ]);
+});
diff --git a/src/config/db-config.ts b/src/config/db-config.ts
index a84a20f247..7b5bdbd8ce 100644
--- a/src/config/db-config.ts
+++ b/src/config/db-config.ts
@@ -4,11 +4,16 @@ import * as yaml from "js-yaml";
 import * as jsonschema from "jsonschema";
 import * as semver from "semver";
 
+import {
+  addNoLanguageDiagnostic,
+  makeTelemetryDiagnostic,
+} from "../diagnostics";
 import * as errorMessages from "../error-messages";
 import {
   RepositoryProperties,
   RepositoryPropertyName,
 } from "../feature-flags/properties";
+import * as json from "../json";
 import { Language } from "../languages";
 import { Logger } from "../logging";
 import { cloneObject, ConfigurationError, prettyPrintPack } from "../util";
@@ -28,6 +33,21 @@ export interface QuerySpec {
   uses: string;
 }
 
+const ORG_SCHEMA = {
+  /** An array of model pack names. */
+  "model-packs": json.optional(json.array(json.string)),
+} as const satisfies json.Schema;
+
+/** Not intended to be provided directly by a user. */
+export type OrgType = json.FromSchema;
+
+const DEFAULT_SETUP_SCHEMA = {
+  org: json.optional(json.object(ORG_SCHEMA)),
+} as const satisfies json.Schema;
+
+/** Not intended to be provided directly by a user. */
+export type DefaultSetupConfig = json.FromSchema;
+
 /**
  * Format of the config file supplied by the user.
  */
@@ -46,6 +66,119 @@ export interface UserConfig {
   // Set of query filters to include and exclude extra queries based on
   // codeql query suite `include` and `exclude` properties
   "query-filters"?: QueryFilter[];
+
+  /** An array (possibly empty or absent) of threat models to use. */
+  "threat-models"?: string[];
+
+  /**
+   * Configuration options that are reserved for us in Default Setup and
+   * not intended to be supplied directly by users.
+   */
+  "default-setup"?: DefaultSetupConfig;
+}
+
+/** A subset of the `UserConfig` schema that is used by Default Setup. */
+const DEFAULT_SETUP_CONFIG_SCHEMA = {
+  "threat-models": json.optional(json.array(json.string)),
+  "default-setup": json.optional(
+    json.object(DEFAULT_SETUP_SCHEMA),
+  ),
+} as const satisfies json.Schema;
+
+/**
+ * Merges supported properties from two configuration files. This is intended only for
+ * use with merging the `config` input provided by Default Setup with a potentially
+ * richer configuration file provided by a user.
+ *
+ * @param logger The logger to use.
+ * @param fromConfigInput The configuration from Default Setup.
+ * @param fromConfigFile The user-supplied configuration.
+ * @returns The combination of both configuration files.
+ */
+export function mergeDefaultSetupAndUserConfigs(
+  logger: Logger,
+  fromConfigInput: UserConfig,
+  fromConfigFile: UserConfig,
+): UserConfig {
+  logger.debug(
+    "Combining configuration files from 'config' and 'config-file' inputs",
+  );
+
+  // Check for unexpected keys in the configuration from the `config` input
+  // that was provided by Default Setup. This should only contain the keys
+  // we would expect to receive from Default Setup.
+  const schemaCheckResult = json.checkSchema(
+    DEFAULT_SETUP_CONFIG_SCHEMA,
+    fromConfigInput as json.UnvalidatedObject,
+  );
+
+  // Report any invalid or unrecognised keys.
+  if (schemaCheckResult.invalidKeys.length > 0) {
+    logger.warning(
+      `Invalid keys in Default Setup configuration: ${schemaCheckResult.invalidKeys.join(", ")}`,
+    );
+    addNoLanguageDiagnostic(
+      undefined,
+      makeTelemetryDiagnostic(
+        "codeql-action/invalid-default-setup-config-keys",
+        "Invalid Default Setup configuration keys",
+        {
+          invalidKeys: schemaCheckResult.invalidKeys,
+        },
+        ["internal-error"],
+      ),
+    );
+  }
+  if (schemaCheckResult.unknownKeys.length > 0) {
+    logger.warning(
+      `Unrecognised keys in Default Setup configuration: ${schemaCheckResult.unknownKeys.join(", ")}`,
+    );
+    addNoLanguageDiagnostic(
+      undefined,
+      makeTelemetryDiagnostic(
+        "codeql-action/unrecognised-default-setup-config-keys",
+        "Unrecognised Default Setup configuration keys",
+        {
+          unrecognisedKeys: schemaCheckResult.unknownKeys,
+        },
+        ["internal-error"],
+      ),
+    );
+  }
+
+  // Combine all specified threat models from both sources.
+  const threatModels = new Set(fromConfigInput["threat-models"] || []);
+  for (const configFileThreatModel of fromConfigFile["threat-models"] || []) {
+    threatModels.add(configFileThreatModel);
+  }
+
+  // Warn if there is a 'default-setup' configuration key in the user-supplied configuration,
+  // since it is not meant to be used and we therefore ignore it here.
+  if (fromConfigFile["default-setup"]) {
+    logger.warning(
+      `The 'default-setup' configuration key is not supported in user-supplied configuration files and will be ignored.`,
+    );
+  }
+
+  // Since we expect the `fromConfigInput` configuration to be provided by Default Setup,
+  // we expect a limited set of options. Therefore, we base the overall configuration on
+  // the one provided via the `config-file` input, which may be richer.
+  const result = { ...fromConfigFile };
+  delete result["threat-models"];
+  delete result["default-setup"];
+
+  if (fromConfigInput["default-setup"]?.org?.["model-packs"]) {
+    result["default-setup"] = {
+      org: {
+        "model-packs": fromConfigInput["default-setup"].org["model-packs"],
+      },
+    };
+  }
+  if (threatModels.size > 0) {
+    result["threat-models"] = Array.from(threatModels);
+  }
+
+  return result;
 }
 
 /**
diff --git a/src/config/file.test.ts b/src/config/file.test.ts
new file mode 100644
index 0000000000..0833ad3d06
--- /dev/null
+++ b/src/config/file.test.ts
@@ -0,0 +1,166 @@
+import * as github from "@actions/github";
+import test from "ava";
+import sinon from "sinon";
+
+import { AnalysisKind } from "../analyses";
+import * as api from "../api-client";
+import { RegistryProxyVars } from "../environment";
+import { Feature } from "../feature-flags";
+import { RepositoryPropertyName } from "../feature-flags/properties";
+import {
+  callee,
+  SAMPLE_DOTCOM_API_DETAILS,
+  setupTests,
+} from "../testing-utils";
+
+import { getConfigFileInput, getRemoteConfig } from "./file";
+
+setupTests(test);
+
+test("getConfigFileInput returns undefined by default", async (t) => {
+  await callee(getConfigFileInput)
+    .withArgs({}, undefined)
+    .withFeatures([Feature.ConfigFileRepositoryProperty])
+    .passes(t.is, undefined);
+});
+
+const repositoryProperties = {
+  [RepositoryPropertyName.CONFIG_FILE]: "/path/from/property",
+};
+
+test("getConfigFileInput returns input value", async (t) => {
+  const testInput = "/some/path";
+
+  // Even though both an input and repository property are configured,
+  // we prefer the direct input to the Action.
+  await callee(getConfigFileInput)
+    .withFeatures([Feature.ConfigFileRepositoryProperty])
+    .withActions((actionsEnv) => {
+      sinon
+        .stub(actionsEnv, "getOptionalInput")
+        .withArgs("config-file")
+        .returns(testInput);
+    })
+    .withArgs(repositoryProperties, undefined)
+    .logs(t, "Using configuration file input from workflow")
+    .passes(t.is, testInput);
+});
+
+test("getConfigFileInput returns repository property value", async (t) => {
+  // Since there is no direct input, we should use the repository property.
+  await callee(getConfigFileInput)
+    .withFeatures([Feature.ConfigFileRepositoryProperty])
+    .withArgs(repositoryProperties, undefined)
+    .logs(t, "Using configuration file input from repository property")
+    .passes(t.is, repositoryProperties[RepositoryPropertyName.CONFIG_FILE]);
+});
+
+test("getConfigFileInput returns repository property value for Code Scanning", async (t) => {
+  // Since there is no direct input, we should use the repository property.
+  await callee(getConfigFileInput)
+    .withFeatures([Feature.ConfigFileRepositoryProperty])
+    .withArgs(repositoryProperties, [AnalysisKind.CodeScanning])
+    .logs(t, "Using configuration file input from repository property")
+    .passes(t.is, repositoryProperties[RepositoryPropertyName.CONFIG_FILE]);
+});
+
+test("getConfigFileInput ignores repository property for other analysis kinds", async (t) => {
+  const unsupportedCases = [
+    [AnalysisKind.CodeQuality],
+    [AnalysisKind.RiskAssessment],
+    [AnalysisKind.CodeScanning, AnalysisKind.CodeQuality],
+  ];
+
+  const target = callee(getConfigFileInput).withFeatures([
+    Feature.ConfigFileRepositoryProperty,
+  ]);
+
+  for (const unsupportedCase of unsupportedCases) {
+    // Since the analysis kind is unsupported, we should ignore the repository property.
+    await target
+      .withArgs(repositoryProperties, unsupportedCase)
+      .logs(
+        t,
+        "Ignoring configuration file input from repository property, because it is unsupported for the current analysis kind.",
+      )
+      .passes(t.is, undefined);
+  }
+});
+
+test("getConfigFileInput ignores empty repository property value", async (t) => {
+  // Since the repository property value is an empty/whitespace string, we should ignore it.
+  await callee(getConfigFileInput)
+    .withFeatures([Feature.ConfigFileRepositoryProperty])
+    .withArgs({ [RepositoryPropertyName.CONFIG_FILE]: "   " }, undefined)
+    .passes(t.is, undefined);
+});
+
+test("getConfigFileInput ignores repository property value when FF is off", async (t) => {
+  // Since the FF is off, we should ignore the repository property value.
+  await callee(getConfigFileInput)
+    .withFeatures([])
+    .withArgs(repositoryProperties, undefined)
+    .notLogs(t, "Using configuration file input from repository property")
+    .logs(
+      t,
+      "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled.",
+    )
+    .passes(t.is, undefined);
+});
+
+test.serial("getRemoteConfig uses proxy when it is supposed to", async (t) => {
+  const client = github.getOctokit("123");
+  const response = {
+    data: {
+      content: Buffer.from("disable-default-queries: false").toString("base64"),
+    },
+  };
+  sinon
+    .stub(client.rest.repos, "getContent")
+    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
+    .resolves(response as any);
+
+  // We stub `getApiClientWithExternalAuth` so that it throws if no
+  // proxy is provided and returns the client otherwise. This allows us
+  // to verify the result in the following test cases.
+  const errorMessage = "No `proxy` was provided by the caller.";
+  sinon
+    .stub(api, "getApiClientWithExternalAuth")
+    .callsFake((_details, proxy) => {
+      // Throw if proxy isn't defined.
+      if (proxy === undefined) {
+        throw new Error(errorMessage);
+      }
+      // Otherwise return the client object.
+      return client;
+    });
+
+  const target = callee(getRemoteConfig)
+    .withDefaultActionsEnv()
+    .withArgs("file.yml", SAMPLE_DOTCOM_API_DETAILS);
+
+  // Should use it when the FF is enabled and the environment variables are set.
+  await target
+    .withFeatures([Feature.ProxyApiRequests])
+    .withEnv((env) => {
+      env.set(RegistryProxyVars.PROXY_HOST, "localhost");
+      env.set(RegistryProxyVars.PROXY_PORT, "1234");
+    })
+    .logs(t, "Using private registry proxy at 'http://localhost:1234'")
+    .passes(t.truthy);
+
+  // But not when the FF is not enabled.
+  await target
+    .withEnv((env) => {
+      env.set(RegistryProxyVars.PROXY_HOST, "localhost");
+      env.set(RegistryProxyVars.PROXY_PORT, "1234");
+    })
+    .notLogs(t, "Using private registry proxy at 'http://localhost:1234'")
+    .throws(t, { message: errorMessage });
+
+  // And not when the environment variables aren't set.
+  await target
+    .withFeatures([Feature.ProxyApiRequests])
+    .notLogs(t, "Using private registry proxy at 'http://localhost:1234'")
+    .throws(t, { message: errorMessage });
+});
diff --git a/src/config/file.ts b/src/config/file.ts
new file mode 100644
index 0000000000..be0e415a38
--- /dev/null
+++ b/src/config/file.ts
@@ -0,0 +1,137 @@
+import { ActionState } from "../action-common";
+import { AnalysisKind } from "../analyses";
+import * as api from "../api-client";
+import * as errorMessages from "../error-messages";
+import { Feature } from "../feature-flags";
+import {
+  RepositoryProperties,
+  RepositoryPropertyName,
+} from "../feature-flags/properties";
+import { ConfigurationError } from "../util";
+
+import { parseUserConfig, UserConfig } from "./db-config";
+import { parseRemoteFileAddress } from "./remote-file";
+
+/**
+ * The prefix that can be specified to indicate that a path should be treated as a local file address.
+ */
+export const LOCAL_PATH_PREFIX = "./";
+
+/**
+ * The prefix that can be specified to indicate that a path should be treated as a remote file address.
+ * The new remote file address format must start with either an owner or repository name. Both
+ * are restricted to ASCII characters, '.', and '-'. The prefix chosen here does not interfere with
+ * those (since it contains an `=`) and is _unlikely_ (but not impossible) to appear in a local file path.
+ */
+export const REMOTE_PATH_PREFIX = "remote=";
+
+/**
+ * Gets the value that is configured for the configuration file, if any.
+ */
+export async function getConfigFileInput(
+  {
+    logger,
+    actions,
+    features,
+  }: ActionState<["Logger", "Actions", "FeatureFlags"]>,
+  repositoryProperties: Partial,
+  analysisKinds: AnalysisKind[] | undefined,
+): Promise {
+  const input = actions.getOptionalInput("config-file");
+
+  if (input !== undefined) {
+    logger.info(`Using configuration file input from workflow: ${input}`);
+    return input;
+  }
+
+  const propertyValue =
+    repositoryProperties[RepositoryPropertyName.CONFIG_FILE];
+
+  // Only allow the repository property to be used for standard Code Scanning analyses,
+  // since we don't currently support some customisation options for Code Quality.
+  // We don't expect customisations for Risk Assessments either.
+  const analysisKindSupported =
+    analysisKinds === undefined ||
+    (analysisKinds.includes(AnalysisKind.CodeScanning) &&
+      analysisKinds.length === 1);
+
+  if (propertyValue !== undefined && propertyValue.trim().length > 0) {
+    // Only use the repository property value if the FF is enabled.
+    const useRepositoryProperty = await features.getValue(
+      Feature.ConfigFileRepositoryProperty,
+    );
+
+    if (analysisKindSupported && useRepositoryProperty) {
+      logger.info(
+        `Using configuration file input from repository property: ${propertyValue}`,
+      );
+      return propertyValue;
+    } else if (!analysisKindSupported) {
+      logger.info(
+        "Ignoring configuration file input from repository property, because it is unsupported for the current analysis kind.",
+      );
+    } else {
+      logger.info(
+        "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled.",
+      );
+    }
+  }
+
+  return undefined;
+}
+
+/**
+ * Attempts to fetch a `UserConfig` from a remote `address`.
+ *
+ * @param actionState The current Action state.
+ * @param configFile The remote address of the configuration file.
+ * @param apiDetails Information about how to connect to the API.
+ *
+ * @returns The `UserConfig`, if it could be fetched and parsed successfully.
+ */
+export async function getRemoteConfig(
+  actionState: ActionState<["Logger", "Env", "FeatureFlags"]>,
+  configFile: string,
+  apiDetails: api.GitHubApiCombinedDetails,
+): Promise {
+  const address = await parseRemoteFileAddress(actionState, configFile);
+
+  const shouldProxyRequest = await actionState.features.getValue(
+    Feature.ProxyApiRequests,
+  );
+  const proxy = shouldProxyRequest
+    ? api.getRegistryProxy(actionState)
+    : undefined;
+
+  const response = await api
+    .getApiClientWithExternalAuth(apiDetails, proxy)
+    .rest.repos.getContent({
+      owner: address.owner,
+      repo: address.repo,
+      path: address.path,
+      ref: address.ref,
+    });
+
+  let fileContents: string;
+  if ("content" in response.data && response.data.content !== undefined) {
+    fileContents = response.data.content;
+  } else if (Array.isArray(response.data)) {
+    throw new ConfigurationError(
+      errorMessages.getConfigFileDirectoryGivenMessage(configFile),
+    );
+  } else {
+    throw new ConfigurationError(
+      errorMessages.getConfigFileFormatInvalidMessage(configFile),
+    );
+  }
+
+  const validateConfig = await actionState.features.getValue(
+    Feature.ValidateDbConfig,
+  );
+  return parseUserConfig(
+    actionState.logger,
+    configFile,
+    Buffer.from(fileContents, "base64").toString("binary"),
+    validateConfig,
+  );
+}
diff --git a/src/config/inputs.test.ts b/src/config/inputs.test.ts
new file mode 100644
index 0000000000..851dd72e2f
--- /dev/null
+++ b/src/config/inputs.test.ts
@@ -0,0 +1,89 @@
+import test from "ava";
+import sinon from "sinon";
+
+import { ActionsEnv } from "../actions-util";
+import { Feature } from "../feature-flags";
+import { RepositoryPropertyName } from "../feature-flags/properties";
+import { callee } from "../testing-utils";
+
+import { ComputedInput, getToolsInput, InputName, InputSource } from "./inputs";
+
+test("getToolsInput - undefined if there's no input", async (t) => {
+  await callee(getToolsInput).withArgs({}).passes(t.is, undefined);
+});
+
+const expectedWorkflowResult: ComputedInput = {
+  source: InputSource.Workflow,
+  value: "workflow-input-value",
+};
+
+const expectedRepositoryPropertyResult: ComputedInput = {
+  source: InputSource.RepositoryProperty,
+  value: "repo-property-input-value",
+};
+
+function stubGetToolsInput(actions: ActionsEnv) {
+  sinon
+    .stub(actions, "getOptionalInput")
+    .withArgs(InputName.Tools)
+    .returns(expectedWorkflowResult.value);
+}
+
+const workflowLogMessage = `Using ${InputName.Tools} input from workflow:`;
+
+test("getToolsInput - returns workflow input if available", async (t) => {
+  await callee(getToolsInput)
+    .withActions(stubGetToolsInput)
+    .withArgs({})
+    .logs(t, workflowLogMessage)
+    .passes(t.deepEqual, expectedWorkflowResult);
+});
+
+test("getToolsInput - returns repository property value if enforced", async (t) => {
+  const target = callee(getToolsInput)
+    .withActions(stubGetToolsInput)
+    .withArgs({
+      [RepositoryPropertyName.TOOLS]: `!${expectedRepositoryPropertyResult.value}`,
+    });
+
+  // We expect the repository value if provided and the FF is enabled.
+  const enforcedLogMessage = `Using ${InputName.Tools} input from repository property (enforced):`;
+  await target
+    .withFeatures([Feature.ToolsRepositoryProperty])
+    .logs(t, enforcedLogMessage)
+    .passes(t.deepEqual, expectedRepositoryPropertyResult);
+  await target
+    .notLogs(t, enforcedLogMessage)
+    .logs(t, workflowLogMessage)
+    .passes(t.deepEqual, expectedWorkflowResult);
+});
+
+test("getToolsInput - prefers workflow input", async (t) => {
+  const target = callee(getToolsInput)
+    .withActions(stubGetToolsInput)
+    .withArgs({
+      [RepositoryPropertyName.TOOLS]: expectedRepositoryPropertyResult.value,
+    });
+
+  // We expect the workflow input regardless of the FF state.
+  await target
+    .withFeatures([Feature.ToolsRepositoryProperty])
+    .logs(t, workflowLogMessage)
+    .passes(t.deepEqual, expectedWorkflowResult);
+  await target
+    .logs(t, workflowLogMessage)
+    .passes(t.deepEqual, expectedWorkflowResult);
+});
+
+test("getToolsInput - returns repository property", async (t) => {
+  const target = callee(getToolsInput).withArgs({
+    [RepositoryPropertyName.TOOLS]: expectedRepositoryPropertyResult.value,
+  });
+
+  // We expect the repository property if the FF is enabled or undefined otherwise.
+  await target
+    .withFeatures([Feature.ToolsRepositoryProperty])
+    .logs(t, `Using ${InputName.Tools} input from repository property:`)
+    .passes(t.deepEqual, expectedRepositoryPropertyResult);
+  await target.passes(t.is, undefined);
+});
diff --git a/src/config/inputs.ts b/src/config/inputs.ts
new file mode 100644
index 0000000000..32a8dfd6f6
--- /dev/null
+++ b/src/config/inputs.ts
@@ -0,0 +1,80 @@
+import { ActionState } from "../action-common";
+import { Feature } from "../feature-flags";
+import {
+  RepositoryProperties,
+  RepositoryPropertyName,
+} from "../feature-flags/properties";
+
+/** Enumerates input names. */
+export enum InputName {
+  Tools = "tools",
+}
+
+/** Enumerates input sources. */
+export enum InputSource {
+  Workflow = "workflow",
+  RepositoryProperty = "repository-property",
+}
+
+/**
+ * Represents an effective input to the CodeQL Action. That is,
+ * the input value that was computed or selected from multiple sources.
+ */
+export type ComputedInput = {
+  /** The value of the property. */
+  value: string;
+  /** The source of the property. */
+  source: InputSource;
+};
+
+/**
+ * Gets the computed `tools` input. This comes from either the workflow or
+ * the repository property.
+ *
+ * @param action The Action state.
+ * @param repositoryProperties The values of known repository properties.
+ * @returns The computed input or `undefined` if there is no input.
+ */
+export async function getToolsInput(
+  action: ActionState<["Logger", "Actions", "FeatureFlags"]>,
+  repositoryProperties: Partial,
+): Promise {
+  const name = InputName.Tools;
+  const input = action.actions.getOptionalInput(name);
+  const propertyValue = repositoryProperties[RepositoryPropertyName.TOOLS];
+  const allowRepositoryProperty = await action.features.getValue(
+    Feature.ToolsRepositoryProperty,
+  );
+
+  // The repository property takes precedence if it starts with an '!'.
+  if (allowRepositoryProperty && propertyValue?.startsWith("!")) {
+    action.logger.info(
+      `Using ${name} input from repository property (enforced): ${propertyValue}`,
+    );
+    return {
+      // Drop the '!' from the value.
+      value: propertyValue.substring(1),
+      source: InputSource.RepositoryProperty,
+    };
+  }
+
+  // Otherwise, the input from the workflow takes precedence.
+  if (input !== undefined) {
+    action.logger.info(`Using ${name} input from workflow: ${input}`);
+    return { value: input, source: InputSource.Workflow };
+  }
+
+  // Use the repository property if there's no workflow input.
+  if (allowRepositoryProperty && propertyValue !== undefined) {
+    action.logger.info(
+      `Using ${name} input from repository property: ${propertyValue}`,
+    );
+    return {
+      value: propertyValue,
+      source: InputSource.RepositoryProperty,
+    };
+  }
+
+  // There's no input.
+  return undefined;
+}
diff --git a/src/config/pack-registries.ts b/src/config/pack-registries.ts
new file mode 100644
index 0000000000..76d2f6cd47
--- /dev/null
+++ b/src/config/pack-registries.ts
@@ -0,0 +1,49 @@
+import * as yaml from "js-yaml";
+
+import { ConfigurationError } from "../util";
+
+export type RegistryConfigWithCredentials = RegistryConfigNoCredentials & {
+  // Token to use when downloading packs from this registry.
+  token: string;
+};
+
+/**
+ * The list of registries and the associated pack globs that determine where each
+ * pack can be downloaded from.
+ */
+export interface RegistryConfigNoCredentials {
+  // URL of a package registry, eg- https://ghcr.io/v2/
+  url: string;
+
+  // List of globs that determine which packs are associated with this registry.
+  packages: string[] | string;
+
+  // Kind of registry, either "github" or "docker". Default is "docker".
+  // "docker" refers specifically to the GitHub Container Registry, which is the usual way of sharing CodeQL packs.
+  // "github" refers to packs published as content in a GitHub repository. This kind of registry is used in scenarios
+  // where GHCR is not available, such as certain GHES environments.
+  kind?: "github" | "docker";
+}
+
+export function parseRegistries(
+  registriesInput: string | undefined,
+): RegistryConfigWithCredentials[] | undefined {
+  try {
+    return registriesInput
+      ? (yaml.load(registriesInput) as RegistryConfigWithCredentials[])
+      : undefined;
+  } catch {
+    throw new ConfigurationError(
+      "Invalid registries input. Must be a YAML string.",
+    );
+  }
+}
+
+export function parseRegistriesWithoutCredentials(
+  registriesInput?: string,
+): RegistryConfigNoCredentials[] | undefined {
+  return parseRegistries(registriesInput)?.map((r) => {
+    const { url, packages, kind } = r;
+    return { url, packages, kind };
+  });
+}
diff --git a/src/config/remote-file.test.ts b/src/config/remote-file.test.ts
new file mode 100644
index 0000000000..e263e6d79a
--- /dev/null
+++ b/src/config/remote-file.test.ts
@@ -0,0 +1,229 @@
+import test from "ava";
+import sinon from "sinon";
+
+import { ActionsEnvVars } from "../environment";
+import { callee } from "../testing-utils";
+import { ConfigurationError } from "../util";
+
+import {
+  DEFAULT_CONFIG_FILE_NAME,
+  DEFAULT_CONFIG_FILE_REF,
+  parseRemoteFileAddress,
+  RemoteFileAddress,
+} from "./remote-file";
+
+type ParseRemoteFileAddressTest = {
+  input: string;
+  expected: RemoteFileAddress;
+};
+
+test("parseRemoteFileAddress accepts full remote addresses", async (t) => {
+  const target = callee(parseRemoteFileAddress);
+
+  const expected: RemoteFileAddress = {
+    owner: "owner",
+    repo: "repo",
+    path: "path",
+    ref: "ref",
+  };
+
+  const oldFormatInputs: ParseRemoteFileAddressTest[] = [
+    { input: "owner/repo/path@ref", expected },
+    { input: "owner  /repo/path@ref", expected },
+    { input: "owner/   repo/path@ref", expected },
+    { input: "owner/repo   /path@ref", expected },
+    { input: "owner/repo/   path@ref", expected },
+    { input: "owner/repo/path   @ref", expected },
+    { input: "owner/repo/path@   ref", expected },
+    {
+      input: "owner/repo/path/to/codeql.yml@ref/feature",
+      expected: { ...expected, path: "path/to/codeql.yml", ref: "ref/feature" },
+    },
+    {
+      input: "  owner/repo/path/to/codeql.yml@ref/feature  ",
+      expected: { ...expected, path: "path/to/codeql.yml", ref: "ref/feature" },
+    },
+  ];
+
+  for (const oldFormatInput of oldFormatInputs) {
+    await target
+      .withArgs(oldFormatInput.input)
+      .passes(t.deepEqual, oldFormatInput.expected);
+  }
+
+  // New format.
+  const newFormatInputs: ParseRemoteFileAddressTest[] = [
+    { input: "owner/repo@ref:path", expected },
+    { input: "owner  /repo@ref:path", expected },
+    { input: "owner/   repo@ref:path", expected },
+    { input: "owner/repo   @ref:path", expected },
+    { input: "owner/repo@   ref:path", expected },
+    { input: "owner/repo@ref   :path", expected },
+    { input: "owner/repo@ref:   path", expected },
+    {
+      input: "owner/repo@ref/feature:path/to/codeql.yml",
+      expected: { ...expected, path: "path/to/codeql.yml", ref: "ref/feature" },
+    },
+    {
+      input: "  owner/repo@ref/feature:path/to/codeql.yml  ",
+      expected: { ...expected, path: "path/to/codeql.yml", ref: "ref/feature" },
+    },
+  ];
+
+  for (const newFormatInput of newFormatInputs) {
+    const targetWithArgs = target.withArgs(newFormatInput.input);
+
+    await targetWithArgs.passes(t.deepEqual, newFormatInput.expected);
+  }
+});
+
+test("parseRemoteFileAddress accepts remote address without an owner", async (t) => {
+  const owner = "test-owner";
+  const target = callee(parseRemoteFileAddress).withEnv((env) => {
+    const getRequired = sinon.stub(env, "getRequired");
+    getRequired
+      .withArgs(ActionsEnvVars.GITHUB_REPOSITORY)
+      .returns(`${owner}/current-repo`);
+  });
+
+  const testCases: ParseRemoteFileAddressTest[] = [
+    {
+      input: "repo@ref:path.yml",
+      expected: {
+        owner,
+        repo: "repo",
+        path: "path.yml",
+        ref: "ref",
+      },
+    },
+    {
+      input: "repo@ref",
+      expected: {
+        owner,
+        repo: "repo",
+        path: DEFAULT_CONFIG_FILE_NAME,
+        ref: "ref",
+      },
+    },
+    {
+      input: "repo:path.yml",
+      expected: {
+        owner,
+        repo: "repo",
+        path: "path.yml",
+        ref: DEFAULT_CONFIG_FILE_REF,
+      },
+    },
+    {
+      input: "repo",
+      expected: {
+        owner,
+        repo: "repo",
+        path: DEFAULT_CONFIG_FILE_NAME,
+        ref: DEFAULT_CONFIG_FILE_REF,
+      },
+    },
+  ];
+
+  for (const testCase of testCases) {
+    const targetWithArgs = target.withArgs(testCase.input);
+
+    await targetWithArgs.passes(t.deepEqual, testCase.expected);
+  }
+});
+
+test("parseRemoteFileAddress throws for invalid `GITHUB_REPOSITORY`", async (t) => {
+  const getRequired: sinon.SinonStub = sinon.stub();
+  getRequired.withArgs(ActionsEnvVars.GITHUB_REPOSITORY).returns(`not-valid`);
+
+  const target = callee(parseRemoteFileAddress)
+    .withArgs("repo@ref")
+    .withEnv((env) => {
+      sinon.define(env, "getRequired", getRequired);
+    });
+
+  await target.throws(t, { instanceOf: Error });
+
+  t.assert(getRequired.calledOnceWith(ActionsEnvVars.GITHUB_REPOSITORY));
+});
+
+test("parseRemoteFileAddress accepts remote address without a path", async (t) => {
+  const target = callee(parseRemoteFileAddress);
+
+  const testCases: ParseRemoteFileAddressTest[] = [
+    {
+      input: "owner/repo@ref",
+      expected: {
+        owner: "owner",
+        repo: "repo",
+        path: DEFAULT_CONFIG_FILE_NAME,
+        ref: "ref",
+      },
+    },
+    {
+      input: "owner/repo",
+      expected: {
+        owner: "owner",
+        repo: "repo",
+        path: DEFAULT_CONFIG_FILE_NAME,
+        ref: DEFAULT_CONFIG_FILE_REF,
+      },
+    },
+  ];
+
+  for (const testCase of testCases) {
+    const targetWithArgs = target.withArgs(testCase.input);
+
+    await targetWithArgs.passes(t.deepEqual, testCase.expected);
+  }
+});
+
+test("parseRemoteFileAddress accepts remote address without a ref", async (t) => {
+  const target = callee(parseRemoteFileAddress).withArgs("owner/repo:path");
+
+  await target.passes(t.deepEqual, {
+    owner: "owner",
+    repo: "repo",
+    path: "path",
+    ref: DEFAULT_CONFIG_FILE_REF,
+  } satisfies RemoteFileAddress);
+});
+
+test("parseRemoteFileAddress rejects invalid values", async (t) => {
+  const owner = "owner";
+  const target = callee(parseRemoteFileAddress).withEnv((env) => {
+    const getRequired = sinon.stub(env, "getRequired");
+    getRequired
+      .withArgs(ActionsEnvVars.GITHUB_REPOSITORY)
+      .returns(`${owner}/current-repo`);
+  });
+
+  const testInputs = [
+    "  ",
+    "repo//absolute",
+    "repo:/absolute",
+    "/repo@ref",
+    "   /repo@ref",
+    "repo@",
+    "repo:",
+    "repo/",
+    "/repo",
+    ":path",
+    "@ref",
+    "@ref:path",
+    "owner/@ref:path",
+    "owner/@ref",
+    "owner/:path",
+  ];
+
+  for (const testInput of testInputs) {
+    const targetWithArgs = target.withArgs(testInput);
+
+    await targetWithArgs.throws(t, {
+      // When the new format is accepted, there are some more specific
+      // errors in some cases. It is sufficient for us to check that
+      // an exception is thrown.
+      instanceOf: ConfigurationError,
+    });
+  }
+});
diff --git a/src/config/remote-file.ts b/src/config/remote-file.ts
new file mode 100644
index 0000000000..1052072a28
--- /dev/null
+++ b/src/config/remote-file.ts
@@ -0,0 +1,153 @@
+import { ActionState } from "../action-common";
+import { ActionsEnvVars, ReadOnlyEnv } from "../environment";
+import * as errorMessages from "../error-messages";
+import { ConfigurationError, Failure, Result, Success } from "../util";
+
+/** Represents remote file addresses. */
+export interface RemoteFileAddress {
+  /** The owner of the repository. */
+  owner: string;
+  /** The repository name. */
+  repo: string;
+  /** The path of the file. */
+  path: string;
+  /** The ref of the repository. */
+  ref: string;
+}
+
+/** The default file path to use in configuration file shorthands. */
+export const DEFAULT_CONFIG_FILE_NAME = ".github/codeql-config.yml";
+
+/** The default ref to use in configuration file shorthands. */
+export const DEFAULT_CONFIG_FILE_REF = "main";
+
+/** Extracts the owner from the `GITHUB_REPOSITORY` environment variable. */
+function getDefaultOwner(env: ReadOnlyEnv): string {
+  const currentRepoNwo = env.getRequired(ActionsEnvVars.GITHUB_REPOSITORY);
+  const nwoParts = currentRepoNwo.split("/");
+
+  if (nwoParts.length !== 2 || nwoParts[0].trim().length === 0) {
+    // This shouldn't happen, so we should throw if `GITHUB_REPOSITORY` doesn't match
+    // our expectations.
+    throw new Error(
+      `Expected ${ActionsEnvVars.GITHUB_REPOSITORY} to contain a name with owner, but got '${currentRepoNwo}'.`,
+    );
+  }
+
+  return nwoParts[0].trim();
+}
+
+/**
+ * The old remote address format that's always been supported for the `config-file` input.
+ * All the components are required. Unchanged from the previous implementation.
+ */
+const OLD_REMOTE_ADDRESS_FORMAT = new RegExp(
+  "(?[^/]+)/(?[^/]+)/(?[^@]+)@(?.*)",
+);
+
+/**
+ * Attempts to parse `input` as a `RemoteFileAddress` using the old format.
+ *
+ * @param input The input to try and parse.
+ * @returns A `RemoteFileAddress` value if successful or `undefined` otherwise.
+ */
+function parseOldRemoteFileAddress(
+  input: string,
+): Result {
+  const pieces = OLD_REMOTE_ADDRESS_FORMAT.exec(input);
+
+  // 5 = 4 groups + the whole expression
+  if (pieces?.groups === undefined || pieces.length < 5) {
+    return new Failure(undefined);
+  }
+
+  return new Success({
+    owner: pieces.groups.owner.trim(),
+    repo: pieces.groups.repo.trim(),
+    path: pieces.groups.path.trim(),
+    ref: pieces.groups.ref.trim(),
+  });
+}
+
+/**
+ * Attempts to parse `input` as a `RemoteFileAddress` using the new format.
+ *
+ * @param env The read-only environment to obtain the owner name from if needed.
+ * @param configFile The input to try and parse.
+ * @returns A `RemoteFileAddress` value if successful or `undefined` otherwise.
+ */
+export function parseNewRemoteFileAddress(
+  env: ReadOnlyEnv,
+  configFile: string,
+): Result {
+  // retrieve the various parts of the config location, and ensure they're present
+  const format = new RegExp(
+    "^((?[^:@/]+)/)?(?[^:@/]+)(@(?[^:]+))?(:(?.+))?$",
+  );
+  const pieces = format.exec(configFile.trim());
+
+  const repo: string | undefined = pieces?.groups?.repo?.trim();
+
+  // Check that the regular expression matched and that we have at least the repo name.
+  if (!pieces?.groups || !repo || repo.length === 0) {
+    return new Failure(undefined);
+  }
+
+  const owner: string | undefined = pieces.groups.owner?.trim();
+  const path: string | undefined = pieces.groups.path?.trim();
+  const ref: string | undefined = pieces.groups.ref?.trim();
+
+  return new Success({
+    owner: owner || getDefaultOwner(env),
+    repo,
+    path: path || DEFAULT_CONFIG_FILE_NAME,
+    ref: ref || DEFAULT_CONFIG_FILE_REF,
+  });
+}
+
+/**
+ * Attempts to parse `configFile` into an array of `RemoteFileAddress` components.
+ *
+ * @param actionState The current Action state.
+ * @param configFile The string to try and parse.
+ * @returns The successful result of executing the regex.
+ * @throws `ConfigurationError` if the format of `configFile` is not valid.
+ */
+export async function parseRemoteFileAddress(
+  actionState: ActionState<["FeatureFlags", "Env"]>,
+  configFile: string,
+): Promise {
+  // Try to parse the input using the old format. If successful, return the
+  // resulting `RemoteFileAddress`. Otherwise, continue using the new format.
+  const oldFormatAddressResult = parseOldRemoteFileAddress(configFile);
+
+  if (oldFormatAddressResult.isSuccess()) {
+    return oldFormatAddressResult.value;
+  }
+
+  // retrieve the various parts of the config location, and ensure they're present
+  const newFormatAddressResult = parseNewRemoteFileAddress(
+    actionState.env,
+    configFile,
+  );
+
+  if (newFormatAddressResult.isFailure()) {
+    // Neither the old format nor the new format worked. Throw an error that
+    // explains the format we accept. We only mention the new format, since that's
+    // what we want to be used going forward.
+    throw new ConfigurationError(
+      errorMessages.getConfigFileRepoFormatInvalidMessage(configFile),
+    );
+  }
+
+  const address = newFormatAddressResult.value;
+
+  // Ensure that the path is a relative path.
+  if (address.path.startsWith("/")) {
+    throw new ConfigurationError(
+      `The path component of '${configFile}' cannot be an absolute path.`,
+    );
+  }
+
+  return address;
+}
diff --git a/src/database-upload.test.ts b/src/database-upload.test.ts
index 1cfbaecad6..bcaf9f1c9e 100644
--- a/src/database-upload.test.ts
+++ b/src/database-upload.test.ts
@@ -11,8 +11,10 @@ import * as apiClient from "./api-client";
 import { createStubCodeQL } from "./codeql";
 import { Config } from "./config-utils";
 import { cleanupAndUploadDatabases } from "./database-upload";
+import { Feature } from "./feature-flags";
 import * as gitUtils from "./git-utils";
 import { BuiltInLanguage } from "./languages";
+import { OverlayDatabaseMode } from "./overlay/overlay-database-mode";
 import { RepositoryNwo } from "./repository";
 import {
   checkExpectedLogMessages,
@@ -24,6 +26,7 @@ import {
   setupTests,
 } from "./testing-utils";
 import {
+  CleanupLevel,
   GitHubVariant,
   HTTPError,
   initializeEnvironment,
@@ -335,3 +338,191 @@ test.serial("Successfully uploading a database to GHEC-DR", async (t) => {
     );
   });
 });
+
+test.serial(
+  "Records overlay and clear cleanup sizes when uploading an overlay-base database",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      setupActionsVars(tmpDir, tmpDir);
+      sinon
+        .stub(actionsUtil, "getRequiredInput")
+        .withArgs("upload-database")
+        .returns("true");
+      sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
+
+      await mockHttpRequests(201);
+
+      // Track the cleanup level passed to each cleanup so that the database
+      // bundle stub can write a differently-sized bundle for each level.
+      const cleanupLevels: CleanupLevel[] = [];
+      let lastCleanupLevel: CleanupLevel | undefined;
+      const overlaySizeBytes = 100;
+      const clearSizeBytes = 50;
+      const codeql = createStubCodeQL({
+        async databaseCleanupCluster(_config, cleanupLevel) {
+          cleanupLevels.push(cleanupLevel);
+          lastCleanupLevel = cleanupLevel;
+        },
+        async databaseBundle(_databasePath, outputFilePath) {
+          const sizeBytes =
+            lastCleanupLevel === CleanupLevel.Overlay
+              ? overlaySizeBytes
+              : clearSizeBytes;
+          fs.writeFileSync(outputFilePath, "x".repeat(sizeBytes));
+        },
+      });
+
+      const config = getTestConfig(tmpDir);
+      config.overlayDatabaseMode = OverlayDatabaseMode.OverlayBase;
+
+      const loggedMessages: LoggedMessage[] = [];
+      const results = await cleanupAndUploadDatabases(
+        testRepoName,
+        codeql,
+        config,
+        testApiDetails,
+        createFeatures([Feature.UploadOverlayDbToApi]),
+        getRecordingLogger(loggedMessages),
+      );
+
+      // The database should be cleaned up at the `overlay` level for the upload
+      // and then re-cleaned at the `clear` level to measure its size.
+      t.deepEqual(cleanupLevels, [CleanupLevel.Overlay, CleanupLevel.Clear]);
+
+      t.is(results.length, 1);
+      t.is(results[0].is_overlay_base, true);
+      t.is(results[0].zipped_upload_size_bytes, overlaySizeBytes);
+      t.is(results[0].clear_cleanup_zipped_size_bytes, clearSizeBytes);
+      t.is(typeof results[0].clear_cleanup_measurement_duration_ms, "number");
+    });
+  },
+);
+
+test.serial(
+  "Does not measure clear cleanup size for a regular (non-overlay-base) upload",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      setupActionsVars(tmpDir, tmpDir);
+      sinon
+        .stub(actionsUtil, "getRequiredInput")
+        .withArgs("upload-database")
+        .returns("true");
+      sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
+
+      await mockHttpRequests(201);
+
+      const cleanupLevels: CleanupLevel[] = [];
+      const codeql = createStubCodeQL({
+        async databaseCleanupCluster(_config, cleanupLevel) {
+          cleanupLevels.push(cleanupLevel);
+        },
+        async databaseBundle(_databasePath, outputFilePath) {
+          fs.writeFileSync(outputFilePath, "");
+        },
+      });
+
+      const results = await cleanupAndUploadDatabases(
+        testRepoName,
+        codeql,
+        getTestConfig(tmpDir),
+        testApiDetails,
+        createFeatures([Feature.UploadOverlayDbToApi]),
+        getRecordingLogger([]),
+      );
+
+      // A regular upload is cleaned only once, at the `clear` level.
+      t.deepEqual(cleanupLevels, [CleanupLevel.Clear]);
+      t.is(results[0].is_overlay_base, false);
+      t.is(results[0].clear_cleanup_zipped_size_bytes, undefined);
+      t.is(results[0].clear_cleanup_measurement_duration_ms, undefined);
+    });
+  },
+);
+
+test.serial("Does not measure clear cleanup size in debug mode", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    setupActionsVars(tmpDir, tmpDir);
+    sinon
+      .stub(actionsUtil, "getRequiredInput")
+      .withArgs("upload-database")
+      .returns("true");
+    sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
+
+    await mockHttpRequests(201);
+
+    const cleanupLevels: CleanupLevel[] = [];
+    const codeql = createStubCodeQL({
+      async databaseCleanupCluster(_config, cleanupLevel) {
+        cleanupLevels.push(cleanupLevel);
+      },
+      async databaseBundle(_databasePath, outputFilePath) {
+        fs.writeFileSync(outputFilePath, "");
+      },
+    });
+
+    const config = getTestConfig(tmpDir);
+    config.overlayDatabaseMode = OverlayDatabaseMode.OverlayBase;
+    config.debugMode = true;
+
+    const results = await cleanupAndUploadDatabases(
+      testRepoName,
+      codeql,
+      config,
+      testApiDetails,
+      createFeatures([Feature.UploadOverlayDbToApi]),
+      getRecordingLogger([]),
+    );
+
+    // In debug mode we clean up at the `overlay` level for the upload but skip
+    // the additional `clear` cleanup, to preserve the database for debugging.
+    t.deepEqual(cleanupLevels, [CleanupLevel.Overlay]);
+    t.is(results[0].is_overlay_base, true);
+    t.is(results[0].clear_cleanup_zipped_size_bytes, undefined);
+    t.is(results[0].clear_cleanup_measurement_duration_ms, undefined);
+  });
+});
+
+test.serial(
+  "Does not record a clear cleanup duration when the clear cleanup fails",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      setupActionsVars(tmpDir, tmpDir);
+      sinon
+        .stub(actionsUtil, "getRequiredInput")
+        .withArgs("upload-database")
+        .returns("true");
+      sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
+
+      await mockHttpRequests(201);
+
+      const codeql = createStubCodeQL({
+        async databaseCleanupCluster(_config, cleanupLevel) {
+          if (cleanupLevel === CleanupLevel.Clear) {
+            throw new Error("clear cleanup failed");
+          }
+        },
+        async databaseBundle(_databasePath, outputFilePath) {
+          fs.writeFileSync(outputFilePath, "x".repeat(100));
+        },
+      });
+
+      const config = getTestConfig(tmpDir);
+      config.overlayDatabaseMode = OverlayDatabaseMode.OverlayBase;
+
+      const results = await cleanupAndUploadDatabases(
+        testRepoName,
+        codeql,
+        config,
+        testApiDetails,
+        createFeatures([Feature.UploadOverlayDbToApi]),
+        getRecordingLogger([]),
+      );
+
+      // When the `clear` cleanup fails, no size is measured, so we should not
+      // report a measurement duration either.
+      t.is(results[0].is_overlay_base, true);
+      t.is(results[0].clear_cleanup_zipped_size_bytes, undefined);
+      t.is(results[0].clear_cleanup_measurement_duration_ms, undefined);
+    });
+  },
+);
diff --git a/src/database-upload.ts b/src/database-upload.ts
index 9869f38034..0189bef1e6 100644
--- a/src/database-upload.ts
+++ b/src/database-upload.ts
@@ -25,6 +25,19 @@ export interface DatabaseUploadResult {
   zipped_upload_size_bytes?: number;
   /** Whether the uploaded database is an overlay base. */
   is_overlay_base?: boolean;
+  /**
+   * For overlay-base uploads only: the size in bytes that the zipped database
+   * would have been if it had been cleaned at the `clear` cleanup level instead
+   * of the `overlay` level.
+   */
+  clear_cleanup_zipped_size_bytes?: number;
+  /**
+   * For overlay-base uploads only: the time in milliseconds spent measuring the
+   * `clear` cleanup size (cleaning up the cluster at the `clear` level and
+   * bundling each database). This is a cluster-wide measurement, so it is the
+   * same for every language in a run.
+   */
+  clear_cleanup_measurement_duration_ms?: number;
   /** Time taken to upload database in milliseconds. */
   upload_duration_ms?: number;
   /** If there was an error during database upload, this is its message. */
@@ -156,9 +169,89 @@ export async function cleanupAndUploadDatabases(
       });
     }
   }
+
+  // When we upload an overlay-base database, we cleaned the databases at the `overlay` level, which
+  // retains more data than the `clear` level used for regular uploads. Measure what the zipped size
+  // would have been at the `clear` level too, so we can compare the storage cost of overlay-base
+  // databases against regular databases for the same repository.
+  //
+  // We skip this in debug mode, where the databases are preserved and uploaded as debug artifacts,
+  // since cleaning them up at the `clear` level would discard data that is useful for debugging.
+  if (shouldUploadOverlayBase && !config.debugMode) {
+    await withGroupAsync(
+      "Measuring database size at the clear cleanup level",
+      () => recordClearCleanupSizes(codeql, config, reports, logger),
+    );
+  }
+
   return reports;
 }
 
+/**
+ * Cleans up the databases at the `clear` cleanup level and records the resulting zipped size for
+ * each language in `clear_cleanup_zipped_size_bytes`. If the cleanup succeeds, also records the
+ * time spent taking the measurement in `clear_cleanup_measurement_duration_ms`.
+ *
+ * This mutates the entries of `reports` in place. It must run only after all overlay-base uploads
+ * have completed, since the `clear` cleanup discards overlay data that the uploaded database
+ * depends on.
+ *
+ * Failures here are non-fatal: this is telemetry-only, so we log and move on rather than failing
+ * the workflow.
+ */
+async function recordClearCleanupSizes(
+  codeql: CodeQL,
+  config: Config,
+  reports: DatabaseUploadResult[],
+  logger: Logger,
+): Promise {
+  // Include both the cleanup and the re-bundling to record how much time taking this measurement adds
+  // to the run.
+  const startTime = performance.now();
+
+  try {
+    await codeql.databaseCleanupCluster(config, CleanupLevel.Clear);
+  } catch (e) {
+    // The cleanup didn't run, so there are no sizes to measure. Return without recording a
+    // duration, so that we don't report a measurement duration with no accompanying sizes.
+    logger.warning(
+      `Failed to clean up databases at the '${CleanupLevel.Clear}' level for ` +
+        `size measurement: ${util.getErrorMessage(e)}`,
+    );
+    return;
+  }
+
+  for (const language of config.languages) {
+    const report = reports.find((r) => r.language === language);
+    if (report === undefined) {
+      continue;
+    }
+    try {
+      const bundledDb = await bundleDb(config, language, codeql, language, {
+        includeDiagnostics: false,
+      });
+      report.clear_cleanup_zipped_size_bytes = fs.statSync(bundledDb).size;
+      logger.debug(
+        `Database for ${language} is ` +
+          `${report.clear_cleanup_zipped_size_bytes} bytes zipped at the ` +
+          `'${CleanupLevel.Clear}' cleanup level ` +
+          `(vs. ${report.zipped_upload_size_bytes ?? "unknown"} bytes at the ` +
+          `'${CleanupLevel.Overlay}' level).`,
+      );
+    } catch (e) {
+      logger.warning(
+        `Failed to measure the '${CleanupLevel.Clear}' cleanup database size ` +
+          `for ${language}: ${util.getErrorMessage(e)}`,
+      );
+    }
+  }
+
+  const durationMs = performance.now() - startTime;
+  for (const report of reports) {
+    report.clear_cleanup_measurement_duration_ms = durationMs;
+  }
+}
+
 /**
  * Uploads a bundled database to the GitHub API.
  *
diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts
index 016fcdf7c4..9f5f1775d4 100644
--- a/src/debug-artifacts.ts
+++ b/src/debug-artifacts.ts
@@ -4,7 +4,7 @@ import * as path from "path";
 import * as artifact from "@actions/artifact";
 import * as artifactLegacy from "@actions/artifact-legacy";
 import * as core from "@actions/core";
-import archiver from "archiver";
+import { ZipArchive } from "archiver";
 
 import { getOptionalInput, getTemporaryDirectory } from "./actions-util";
 import { dbIsFinalized } from "./analyze";
@@ -397,7 +397,7 @@ async function createPartialDatabaseBundle(
     await fs.promises.rm(databaseBundlePath, { force: true });
   }
   const output = fs.createWriteStream(databaseBundlePath);
-  const zip = archiver("zip");
+  const zip = new ZipArchive();
 
   zip.on("error", (err) => {
     throw err;
diff --git a/src/defaults.json b/src/defaults.json
index 7c82ff2a6e..b5d9f13644 100644
--- a/src/defaults.json
+++ b/src/defaults.json
@@ -1,6 +1,6 @@
 {
-  "bundleVersion": "codeql-bundle-v2.25.6",
-  "cliVersion": "2.25.6",
-  "priorBundleVersion": "codeql-bundle-v2.25.5",
-  "priorCliVersion": "2.25.5"
+  "bundleVersion": "codeql-bundle-v2.26.3",
+  "cliVersion": "2.26.3",
+  "priorBundleVersion": "codeql-bundle-v2.26.2",
+  "priorCliVersion": "2.26.2"
 }
diff --git a/src/diagnostics.ts b/src/diagnostics.ts
index 65e82ce1af..fa0e87c046 100644
--- a/src/diagnostics.ts
+++ b/src/diagnostics.ts
@@ -6,24 +6,45 @@ import { Language } from "./languages";
 import { getActionsLogger } from "./logging";
 import { getCodeQLDatabasePath } from "./util";
 
-/** Represents a diagnostic message for the tool status page, etc. */
-export interface DiagnosticMessage {
+/**
+ * Known tags for diagnostics. There is currently only "internal-error",
+ * but others may be added in the future.
+ */
+export type DiagnosticTag = "internal-error";
+
+/** Optional information about the origin of a diagnostic. */
+export type DiagnosticSourceOptions = {
+  /**
+   * Name of the CodeQL extractor. This is used to identify which tool component the reporting
+   * descriptor object should be nested under in SARIF.
+   */
+  extractorName?: string;
+  /** An array of tags for the diagnostic. */
+  tags?: DiagnosticTag[];
+};
+
+/** Represents information about the origin of a diagnostic. */
+export type DiagnosticSource = {
+  /**
+   * An identifier under which it makes sense to group this diagnostic message.
+   * This is used to build the SARIF reporting descriptor object.
+   */
+  id: string;
+  /** Display name for the ID. This is used to build the SARIF reporting descriptor object. */
+  name: string;
+} & DiagnosticSourceOptions;
+
+/**
+ * Represents a diagnostic message for the tool status page, etc.
+ *
+ * Unlike {@link DiagnosticMessage}, properties which can automatically
+ * be populated are optional in this type.
+ */
+export type DiagnosticMessageOptions = {
   /** ISO 8601 timestamp */
-  timestamp: string;
-  source: {
-    /**
-     * An identifier under which it makes sense to group this diagnostic message.
-     * This is used to build the SARIF reporting descriptor object.
-     */
-    id: string;
-    /** Display name for the ID. This is used to build the SARIF reporting descriptor object. */
-    name: string;
-    /**
-     * Name of the CodeQL extractor. This is used to identify which tool component the reporting
-     * descriptor object should be nested under in SARIF.
-     */
-    extractorName?: string;
-  };
+  timestamp?: string;
+  /** Information about the origin of the diagnostic. */
+  source?: DiagnosticSourceOptions;
   /** GitHub flavored Markdown formatted message. Should include inline links to any help pages. */
   markdownMessage?: string;
   /** Plain text message. Used by components where the string processing needed to support Markdown is cumbersome. */
@@ -53,7 +74,15 @@ export interface DiagnosticMessage {
   };
   /** Structured metadata about the diagnostic message */
   attributes?: { [key: string]: any };
-}
+};
+
+/** Represents a diagnostic message for the tool status page, etc. */
+export type DiagnosticMessage = DiagnosticMessageOptions & {
+  /** ISO 8601 timestamp */
+  timestamp: string;
+  /** Information about the origin of the diagnostic. */
+  source: DiagnosticSource;
+};
 
 /** Represents a diagnostic message that has not yet been written to the database. */
 interface UnwrittenDiagnostic {
@@ -90,7 +119,7 @@ let diagnosticCounter = 0;
 export function makeDiagnostic(
   id: string,
   name: string,
-  data: Partial | undefined = undefined,
+  data: DiagnosticMessageOptions | undefined = undefined,
 ): DiagnosticMessage {
   return {
     ...data,
@@ -243,6 +272,7 @@ export function makeTelemetryDiagnostic(
   id: string,
   name: string,
   attributes: { [key: string]: any },
+  tags?: DiagnosticTag[],
 ): DiagnosticMessage {
   return makeDiagnostic(id, name, {
     attributes,
@@ -251,5 +281,8 @@ export function makeTelemetryDiagnostic(
       statusPage: false,
       telemetry: true,
     },
+    source: {
+      tags,
+    },
   });
 }
diff --git a/src/diff-informed-analysis-utils.ts b/src/diff-informed-analysis-utils.ts
index a48c6dcfdf..b8e9c6915d 100644
--- a/src/diff-informed-analysis-utils.ts
+++ b/src/diff-informed-analysis-utils.ts
@@ -5,7 +5,7 @@ import type { PullRequestBranches } from "./actions-util";
 import { getApiClient, getGitHubVersion } from "./api-client";
 import type { CodeQL } from "./codeql";
 import { Feature, FeatureEnablement } from "./feature-flags";
-import { Logger, withGroupAsync } from "./logging";
+import { Logger } from "./logging";
 import { getRepositoryNwoFromEnv } from "./repository";
 import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "./util";
 
@@ -83,16 +83,14 @@ export async function prepareDiffInformedAnalysis(
     return false;
   }
 
-  return await withGroupAsync("Computing PR diff ranges", async () => {
-    try {
-      return await computeAndPersistDiffRanges(branches, logger);
-    } catch (e) {
-      logger.warning(
-        `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`,
-      );
-      return false;
-    }
-  });
+  try {
+    return await computeAndPersistDiffRanges(branches, logger);
+  } catch (e) {
+    logger.warning(
+      `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`,
+    );
+    return false;
+  }
 }
 
 export interface DiffThunkRange {
@@ -192,6 +190,7 @@ export async function computeAndPersistDiffRanges(
   branches: PullRequestBranches,
   logger: Logger,
 ): Promise {
+  logger.info("Computing PR diff ranges...");
   const ranges = await getPullRequestEditedDiffRanges(branches, logger);
   if (ranges === undefined) {
     return false;
diff --git a/src/environment.ts b/src/environment.ts
index c3f54ebd27..d6ff20391a 100644
--- a/src/environment.ts
+++ b/src/environment.ts
@@ -1,3 +1,13 @@
+/**
+ * Environment variables used by Default Setup to communicate the private registry proxy configuration.
+ */
+export enum RegistryProxyVars {
+  PROXY_HOST = "CODEQL_PROXY_HOST",
+  PROXY_PORT = "CODEQL_PROXY_PORT",
+  PROXY_CA_CERTIFICATE = "CODEQL_PROXY_CA_CERTIFICATE",
+  PROXY_URLS = "CODEQL_PROXY_URLS",
+}
+
 /**
  * Environment variables used by the CodeQL Action.
  *
@@ -17,6 +27,18 @@ export enum EnvVar {
    */
   CLI_VERBOSITY = "CODEQL_VERBOSITY",
 
+  /**
+   * Set by Default Setup to the base branch of the PR being analysed, if analysing a PR.
+   * This is needed because the `pull_request` context is not available for `dynamic` events.
+   */
+  CODE_SCANNING_BASE_BRANCH = "CODE_SCANNING_BASE_BRANCH",
+
+  /**
+   * Set by Default Setup to the full ref being analysed, if analysing a PR.
+   * This is needed because the `pull_request` context is not available for `dynamic` events.
+   */
+  CODE_SCANNING_REF = "CODE_SCANNING_REF",
+
   /**
    * `PersistedVersionInfo` for the CodeQL CLI, so later Actions steps can reuse it instead of
    * invoking `codeql version` again.
@@ -66,7 +88,7 @@ export enum EnvVar {
   LOG_VERSION_DEPRECATION = "CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION",
 
   /** UUID representing the current job run. */
-  JOB_RUN_UUID = "JOB_RUN_UUID",
+  JOB_RUN_UUID = "CODEQL_ACTION_JOB_RUN_UUID",
 
   /** Status for the entire job, submitted to the status report in `init-post` */
   JOB_STATUS = "CODEQL_ACTION_JOB_STATUS",
@@ -83,6 +105,9 @@ export enum EnvVar {
   /** Whether to suppress the warning if the current CLI will soon be unsupported. */
   SUPPRESS_DEPRECATED_SOON_WARNING = "CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING",
 
+  /** Used to dictate or persist the temporary directory used by the CodeQL Action. */
+  TEMP = "CODEQL_ACTION_TEMP",
+
   /** Whether to disable uploading SARIF results or status reports to the GitHub API */
   TEST_MODE = "CODEQL_ACTION_TEST_MODE",
 
@@ -160,3 +185,135 @@ export enum EnvVar {
   /** Used by Code Scanning Risk Assessment to communicate the assessment ID to the CodeQL Action. */
   RISK_ASSESSMENT_ID = "CODEQL_ACTION_RISK_ASSESSMENT_ID",
 }
+
+/**
+ * Enumerates known GitHub Actions environment variables that we expect
+ * to be set in a GitHub Actions environment.
+ */
+export enum ActionsEnvVars {
+  GITHUB_ACTION_REPOSITORY = "GITHUB_ACTION_REPOSITORY",
+  GITHUB_API_URL = "GITHUB_API_URL",
+  GITHUB_EVENT_NAME = "GITHUB_EVENT_NAME",
+  GITHUB_EVENT_PATH = "GITHUB_EVENT_PATH",
+  GITHUB_JOB = "GITHUB_JOB",
+  GITHUB_REF = "GITHUB_REF",
+  GITHUB_REPOSITORY = "GITHUB_REPOSITORY",
+  GITHUB_RUN_ATTEMPT = "GITHUB_RUN_ATTEMPT",
+  GITHUB_RUN_ID = "GITHUB_RUN_ID",
+  GITHUB_SERVER_URL = "GITHUB_SERVER_URL",
+  GITHUB_SHA = "GITHUB_SHA",
+  GITHUB_WORKFLOW = "GITHUB_WORKFLOW",
+  GITHUB_WORKSPACE = "GITHUB_WORKSPACE",
+  RUNNER_ENVIRONMENT = "RUNNER_ENVIRONMENT",
+  RUNNER_NAME = "RUNNER_NAME",
+  RUNNER_OS = "RUNNER_OS",
+  RUNNER_TEMP = "RUNNER_TEMP",
+  RUNNER_TOOL_CACHE = "RUNNER_TOOL_CACHE",
+}
+
+/** A type representing all known environment variables. */
+export type KnownEnvVar = EnvVar | ActionsEnvVars | RegistryProxyVars;
+
+/**
+ * Gets an environment variable, but throws an error if it is not set.
+ */
+function getRequiredEnvVar(env: NodeJS.ProcessEnv, paramName: string): string {
+  const value = env[paramName];
+  if (value === undefined || value.length === 0) {
+    throw new Error(`${paramName} environment variable must be set`);
+  }
+  return value;
+}
+
+/**
+ * Get an environment parameter, but throw an error if it is not set.
+ *
+ * @deprecated Use `getRequired` of a `ReadOnlyEnv` or `Env` instance instead.
+ */
+export function getRequiredEnvParam(paramName: string): string {
+  return getRequiredEnvVar(process.env, paramName);
+}
+
+/**
+ * Gets an environment variable, but returns `undefined` if it is not set or empty.
+ */
+function getOptionalEnvVarFrom(
+  env: NodeJS.ProcessEnv,
+  paramName: string,
+): string | undefined {
+  const value = env[paramName];
+  if (value?.trim().length === 0) {
+    return undefined;
+  }
+  return value;
+}
+
+/**
+ * Get an environment variable, but return `undefined` if it is not set or empty.
+ *
+ * @deprecated Use `getOptional` of a `ReadOnlyEnv` or `Env` instance instead.
+ */
+export function getOptionalEnvVar(paramName: string): string | undefined {
+  return getOptionalEnvVarFrom(process.env, paramName);
+}
+
+/**
+ * An abstraction around read-only environment variables, to allow abstracting away from `process.env`
+ * in tests, while clearly signalling in regular code that the consumer of the `ReadOnlyEnv` instance
+ * will only read from it.
+ */
+export class ReadOnlyEnv {
+  constructor(protected readonly vars: Record) {}
+
+  /** Clones the object while detaching the underlying environment from the original. */
+  public clone(): this {
+    return Object.create(this, { vars: { value: { ...this.vars } } }) as this;
+  }
+
+  /** Gets a copy of the underlying environment. */
+  public get(): Record {
+    return { ...this.vars };
+  }
+
+  /** Tries to get the value for `name` and throws if there isn't one. */
+  public getRequired(name: string): string {
+    return getRequiredEnvVar(this.vars, name);
+  }
+
+  /** Gets the value for `name`, or `undefined` if it isn't set or empty. */
+  public getOptional(name: string): string | undefined {
+    return getOptionalEnvVarFrom(this.vars, name);
+  }
+
+  /** Gets the entries of the underlying `ProcessEnv`. */
+  public entries(): Array<[string, T]> {
+    return Object.entries(this.vars);
+  }
+}
+
+/**
+ * A wrapper around an environment, to allow abstracting away from `process.env` in tests.
+ * Use `ReadOnlyEnv` instead if you only plan to read from the environment.
+ * This type allows writing to the environment.
+ */
+export class Env<
+  T extends string | undefined = string | undefined,
+> extends ReadOnlyEnv {
+  private changed: boolean = false;
+
+  /** Sets an environment variable. */
+  public set(name: string, value: T): void {
+    this.vars[name] = value;
+    this.changed = true;
+  }
+
+  /** Gets a value indicating whether `set` was called at least once. */
+  public hasChanged(): boolean {
+    return this.changed;
+  }
+}
+
+/** Gets an `Env` instance for `env`, which is `process.env` by default. */
+export function getEnv(env: NodeJS.ProcessEnv = process.env): Env {
+  return new Env(env);
+}
diff --git a/src/error-messages.ts b/src/error-messages.ts
index 578ec69733..bd32a6a04a 100644
--- a/src/error-messages.ts
+++ b/src/error-messages.ts
@@ -30,7 +30,7 @@ export function getInvalidConfigFileMessage(
   return `The configuration file "${configFile}" is invalid: ${messages.slice(0, 10).join(", ")}${andMore}`;
 }
 
-export function getConfigFileRepoFormatInvalidMessage(
+export function getConfigFileRepoOldFormatInvalidMessage(
   configFile: string,
 ): string {
   let error = `The configuration file "${configFile}" is not a supported remote file reference.`;
@@ -39,6 +39,15 @@ export function getConfigFileRepoFormatInvalidMessage(
   return error;
 }
 
+export function getConfigFileRepoFormatInvalidMessage(
+  configFile: string,
+): string {
+  let error = `The configuration file "${configFile}" is not a supported remote file reference.`;
+  error += " Expected format [/][@][:]";
+
+  return error;
+}
+
 export function getConfigFileFormatInvalidMessage(configFile: string): string {
   return `The configuration file "${configFile}" could not be read`;
 }
diff --git a/src/feature-flags.ts b/src/feature-flags.ts
index 05a2611426..fff7ef0440 100644
--- a/src/feature-flags.ts
+++ b/src/feature-flags.ts
@@ -70,10 +70,13 @@ export interface CodeQLDefaultVersionInfo {
  * Legacy features should end with `_enabled`.
  */
 export enum Feature {
+  /** Allows supported properties of configuration files to be merged. */
+  AllowMergeConfigFiles = "allow_merge_config_files",
   /** Controls whether we allow multiple values for the `analysis-kinds` input. */
   AllowMultipleAnalysisKinds = "allow_multiple_analysis_kinds",
-  AllowToolcacheInput = "allow_toolcache_input",
   CleanupTrapCaches = "cleanup_trap_caches",
+  /** Whether to allow the `config-file` input to be specified via a repository property. */
+  ConfigFileRepositoryProperty = "config_file_repository_property",
   CppDependencyInstallation = "cpp_dependency_installation_enabled",
   CsharpCacheBuildModeNone = "csharp_cache_bmn",
   CsharpNewCacheKey = "csharp_new_cache_key",
@@ -119,11 +122,6 @@ export enum Feature {
    */
   OverlayAnalysisMatchCodeqlVersionDryRun = "overlay_analysis_match_codeql_version_dry_run",
   OverlayAnalysisPython = "overlay_analysis_python",
-  /**
-   * Controls whether lower disk space requirements are used for overlay hardware checks.
-   * Has no effect if `OverlayAnalysisSkipResourceChecks` is enabled.
-   */
-  OverlayAnalysisResourceChecksV2 = "overlay_analysis_resource_checks_v2",
   OverlayAnalysisRuby = "overlay_analysis_ruby",
   /** Controls whether hardware checks are skipped for overlay analysis. */
   OverlayAnalysisSkipResourceChecks = "overlay_analysis_skip_resource_checks",
@@ -132,10 +130,13 @@ export enum Feature {
   /** Controls whether overlay build failures on the default branch are stored in the Actions cache. */
   OverlayAnalysisStatusSave = "overlay_analysis_status_save",
   QaTelemetryEnabled = "qa_telemetry_enabled",
+  /** Routes (some) API requests through the registry proxy. */
+  ProxyApiRequests = "proxy_api_requests",
   /** Note that this currently only disables baseline file coverage information. */
   SkipFileCoverageOnPrs = "skip_file_coverage_on_prs",
-  StartProxyRemoveUnusedRegistries = "start_proxy_remove_unused_registries",
   StartProxyUseFeaturesRelease = "start_proxy_use_features_release",
+  /** Whether to allow the `tools` input to be specified via a repository property. */
+  ToolsRepositoryProperty = "tools_repository_property",
   UploadOverlayDbToApi = "upload_overlay_db_to_api",
   ValidateDbConfig = "validate_db_config",
 }
@@ -170,14 +171,14 @@ export type FeatureConfig = {
 };
 
 export const featureConfig = {
-  [Feature.AllowMultipleAnalysisKinds]: {
+  [Feature.AllowMergeConfigFiles]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_ALLOW_MULTIPLE_ANALYSIS_KINDS",
+    envVar: "CODEQL_ACTION_ALLOW_MERGE_CONFIG_FILES",
     minimumVersion: undefined,
   },
-  [Feature.AllowToolcacheInput]: {
+  [Feature.AllowMultipleAnalysisKinds]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
+    envVar: "CODEQL_ACTION_ALLOW_MULTIPLE_ANALYSIS_KINDS",
     minimumVersion: undefined,
   },
   [Feature.CleanupTrapCaches]: {
@@ -185,6 +186,11 @@ export const featureConfig = {
     envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
     minimumVersion: undefined,
   },
+  [Feature.ConfigFileRepositoryProperty]: {
+    defaultValue: false,
+    envVar: "CODEQL_ACTION_CONFIG_FILE_REPOSITORY_PROPERTY",
+    minimumVersion: undefined,
+  },
   [Feature.CppDependencyInstallation]: {
     defaultValue: false,
     envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
@@ -343,11 +349,6 @@ export const featureConfig = {
     envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_MATCH_CODEQL_VERSION_DRY_RUN",
     minimumVersion: undefined,
   },
-  [Feature.OverlayAnalysisResourceChecksV2]: {
-    defaultValue: false,
-    envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_RESOURCE_CHECKS_V2",
-    minimumVersion: undefined,
-  },
   [Feature.OverlayAnalysisStatusCheck]: {
     defaultValue: false,
     envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK",
@@ -369,20 +370,25 @@ export const featureConfig = {
     legacyApi: true,
     minimumVersion: undefined,
   },
+  [Feature.ProxyApiRequests]: {
+    defaultValue: false,
+    envVar: "CODEQL_ACTION_PROXY_API_REQUESTS",
+    minimumVersion: undefined,
+  },
   [Feature.SkipFileCoverageOnPrs]: {
     defaultValue: false,
     envVar: "CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS",
     minimumVersion: undefined,
     toolsFeature: ToolsFeature.SuppressesMissingFileBaselineWarning,
   },
-  [Feature.StartProxyRemoveUnusedRegistries]: {
+  [Feature.StartProxyUseFeaturesRelease]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
+    envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
     minimumVersion: undefined,
   },
-  [Feature.StartProxyUseFeaturesRelease]: {
+  [Feature.ToolsRepositoryProperty]: {
     defaultValue: false,
-    envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
+    envVar: "CODEQL_ACTION_TOOLS_REPOSITORY_PROPERTY",
     minimumVersion: undefined,
   },
   [Feature.UploadOverlayDbToApi]: {
diff --git a/src/feature-flags/properties.test.ts b/src/feature-flags/properties.test.ts
index 2676c2dcda..d3094a8d1c 100644
--- a/src/feature-flags/properties.test.ts
+++ b/src/feature-flags/properties.test.ts
@@ -72,12 +72,17 @@ test.serial(
 );
 
 test.serial("loadPropertiesFromApi loads known properties", async (t) => {
+  const knownProperties = [
+    { property_name: "github-codeql-config-file", value: "owner/repo" },
+    { property_name: "github-codeql-extra-queries", value: "+queries" },
+    { property_name: "github-codeql-tools", value: "nightly" },
+  ];
   sinon.stub(api, "getRepositoryProperties").resolves({
     headers: {},
     status: 200,
     url: "",
     data: [
-      { property_name: "github-codeql-extra-queries", value: "+queries" },
+      ...knownProperties,
       { property_name: "unknown-property", value: "something" },
     ] satisfies properties.GitHubPropertiesResponse,
   });
@@ -87,7 +92,12 @@ test.serial("loadPropertiesFromApi loads known properties", async (t) => {
     logger,
     mockRepositoryNwo,
   );
-  t.deepEqual(response, { "github-codeql-extra-queries": "+queries" });
+  t.deepEqual(
+    response,
+    Object.fromEntries(
+      knownProperties.map((prop) => [prop.property_name, prop.value]),
+    ),
+  );
 });
 
 test.serial("loadPropertiesFromApi parses true boolean property", async (t) => {
diff --git a/src/feature-flags/properties.ts b/src/feature-flags/properties.ts
index 12ba280bec..4c888bd5ec 100644
--- a/src/feature-flags/properties.ts
+++ b/src/feature-flags/properties.ts
@@ -1,7 +1,10 @@
+import * as github from "@actions/github";
+
 import { isDynamicWorkflow } from "../actions-util";
 import { getRepositoryProperties } from "../api-client";
 import { Logger } from "../logging";
 import { RepositoryNwo } from "../repository";
+import { Failure, getErrorMessage, Result, Success } from "../util";
 
 /** The common prefix that we expect all of our repository properties to have. */
 export const GITHUB_CODEQL_PROPERTY_PREFIX = "github-codeql-";
@@ -10,16 +13,20 @@ export const GITHUB_CODEQL_PROPERTY_PREFIX = "github-codeql-";
  * Enumerates repository property names that have some meaning to us.
  */
 export enum RepositoryPropertyName {
+  CONFIG_FILE = "github-codeql-config-file",
   DISABLE_OVERLAY = "github-codeql-disable-overlay",
   EXTRA_QUERIES = "github-codeql-extra-queries",
   FILE_COVERAGE_ON_PRS = "github-codeql-file-coverage-on-prs",
+  TOOLS = "github-codeql-tools",
 }
 
 /** Parsed types of the known repository properties. */
 export type AllRepositoryProperties = {
+  [RepositoryPropertyName.CONFIG_FILE]: string;
   [RepositoryPropertyName.DISABLE_OVERLAY]: boolean;
   [RepositoryPropertyName.EXTRA_QUERIES]: string;
   [RepositoryPropertyName.FILE_COVERAGE_ON_PRS]: boolean;
+  [RepositoryPropertyName.TOOLS]: string;
 };
 
 /** Parsed repository properties. */
@@ -27,9 +34,11 @@ export type RepositoryProperties = Partial;
 
 /** Maps known repository properties to the type we expect to get from the API. */
 export type RepositoryPropertyApiType = {
+  [RepositoryPropertyName.CONFIG_FILE]: string;
   [RepositoryPropertyName.DISABLE_OVERLAY]: string;
   [RepositoryPropertyName.EXTRA_QUERIES]: string;
   [RepositoryPropertyName.FILE_COVERAGE_ON_PRS]: string;
+  [RepositoryPropertyName.TOOLS]: string;
 };
 
 /** The type of functions which take the `value` from the API and try to convert it to the type we want. */
@@ -74,9 +83,11 @@ const booleanProperty = {
 const repositoryPropertyParsers: {
   [K in RepositoryPropertyName]: PropertyInfo;
 } = {
+  [RepositoryPropertyName.CONFIG_FILE]: stringProperty,
   [RepositoryPropertyName.DISABLE_OVERLAY]: booleanProperty,
   [RepositoryPropertyName.EXTRA_QUERIES]: stringProperty,
   [RepositoryPropertyName.FILE_COVERAGE_ON_PRS]: booleanProperty,
+  [RepositoryPropertyName.TOOLS]: stringProperty,
 };
 
 /**
@@ -226,3 +237,35 @@ const KNOWN_REPOSITORY_PROPERTY_NAMES = new Set(
 function isKnownPropertyName(name: string): name is RepositoryPropertyName {
   return KNOWN_REPOSITORY_PROPERTY_NAMES.has(name);
 }
+
+/**
+ * Loads [repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) if applicable.
+ */
+export async function loadRepositoryProperties(
+  repositoryNwo: RepositoryNwo,
+  logger: Logger,
+): Promise> {
+  // See if we can skip loading repository properties early. In particular,
+  // repositories owned by users cannot have repository properties, so we can
+  // skip the API call entirely in that case.
+  const repositoryOwnerType = github.context.payload.repository?.owner.type;
+  logger.debug(
+    `Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`,
+  );
+  if (repositoryOwnerType === "User") {
+    logger.debug(
+      "Skipping loading repository properties because the repository is owned by a user and " +
+        "therefore cannot have repository properties.",
+    );
+    return new Success({});
+  }
+
+  try {
+    return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
+  } catch (error) {
+    logger.warning(
+      `Failed to load repository properties: ${getErrorMessage(error)}`,
+    );
+    return new Failure(error);
+  }
+}
diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts
index 23695b6d1c..7b7b056a1c 100644
--- a/src/init-action-post-helper.ts
+++ b/src/init-action-post-helper.ts
@@ -123,6 +123,7 @@ async function prepareFailedSarif(
     const category = `/language:${language}`;
     const checkoutPath = ".";
     const result = await generateFailedSarif(
+      logger,
       features,
       config,
       category,
@@ -146,6 +147,7 @@ async function prepareFailedSarif(
     const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix);
 
     const result = await generateFailedSarif(
+      logger,
       features,
       config,
       category,
@@ -156,6 +158,7 @@ async function prepareFailedSarif(
 }
 
 async function generateFailedSarif(
+  logger: Logger,
   features: FeatureEnablement,
   config: Config,
   category: string | undefined,
@@ -163,7 +166,7 @@ async function generateFailedSarif(
   sarifFile?: string,
 ) {
   const databasePath = config.dbLocation;
-  const codeql = await getCodeQL(config.codeQLCmd);
+  const codeql = await getCodeQL(logger, config.codeQLCmd);
 
   // Set the filename for the SARIF file if not already set.
   if (sarifFile === undefined) {
diff --git a/src/init-action-post.ts b/src/init-action-post.ts
index b407cfb99e..2261b56ea6 100644
--- a/src/init-action-post.ts
+++ b/src/init-action-post.ts
@@ -75,7 +75,7 @@ async function run(startedAt: Date) {
         "Debugging artifacts are unavailable since the 'init' Action failed before it could produce any.",
       );
     } else {
-      const codeql = await getCodeQL(config.codeQLCmd);
+      const codeql = await getCodeQL(logger, config.codeQLCmd);
 
       uploadFailedSarifResult = await initActionPostHelper.uploadFailureInfo(
         debugArtifacts.tryUploadAllAvailableDebugArtifacts,
diff --git a/src/init-action.ts b/src/init-action.ts
index b7593a51cc..6b5ed392ef 100644
--- a/src/init-action.ts
+++ b/src/init-action.ts
@@ -2,11 +2,10 @@ import * as fs from "fs";
 import * as path from "path";
 
 import * as core from "@actions/core";
-import * as github from "@actions/github";
 import * as io from "@actions/io";
 import * as semver from "semver";
-import { v4 as uuidV4 } from "uuid";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import {
   FileCmdNotFoundError,
   getActionVersion,
@@ -24,6 +23,8 @@ import {
   shouldRestoreCache,
 } from "./caching-utils";
 import { CodeQL } from "./codeql";
+import { getConfigFileInput } from "./config/file";
+import { ComputedInput, getToolsInput } from "./config/inputs";
 import * as configUtils from "./config-utils";
 import {
   DependencyCacheRestoreStatusReport,
@@ -39,10 +40,7 @@ import {
 } from "./diagnostics";
 import { EnvVar } from "./environment";
 import { Feature, FeatureEnablement, initFeatures } from "./feature-flags";
-import {
-  loadPropertiesFromApi,
-  RepositoryProperties,
-} from "./feature-flags/properties";
+import { loadRepositoryProperties } from "./feature-flags/properties";
 import {
   checkInstallPython311,
   checkPacksForOverlayCompatibility,
@@ -54,13 +52,13 @@ import {
   runDatabaseInitCluster,
 } from "./init";
 import { JavaEnvVars, BuiltInLanguage } from "./languages";
-import { getActionsLogger, Logger, withGroupAsync } from "./logging";
+import { Logger, withGroupAsync } from "./logging";
 import {
   downloadOverlayBaseDatabaseFromCache,
   OverlayBaseDatabaseDownloadStats,
 } from "./overlay/caching";
 import { OverlayDatabaseMode } from "./overlay/overlay-database-mode";
-import { getRepositoryNwo, RepositoryNwo } from "./repository";
+import { getRepositoryNwo } from "./repository";
 import { ToolsSource } from "./setup-codeql";
 import {
   ActionName,
@@ -71,9 +69,7 @@ import {
   createStatusReportBase,
   getActionsStatus,
   sendStatusReport,
-  sendUnhandledErrorStatusReport,
 } from "./status-report";
-import { ZstdAvailability } from "./tar";
 import { ToolsDownloadStatusReport } from "./tools-download";
 import { ToolsFeature } from "./tools-features";
 import { getCombinedTracerConfig } from "./tracer-config";
@@ -93,10 +89,7 @@ import {
   checkActionVersion,
   getErrorMessage,
   BuildMode,
-  Result,
   getOptionalEnvVar,
-  Success,
-  Failure,
 } from "./util";
 import { checkWorkflow } from "./workflow";
 
@@ -136,6 +129,7 @@ async function sendCompletedStatusReport(
   startedAt: Date,
   config: configUtils.Config | undefined,
   configFile: string | undefined,
+  toolsInput: ComputedInput | undefined,
   toolsDownloadStatusReport: ToolsDownloadStatusReport | undefined,
   toolsFeatureFlagsValid: boolean | undefined,
   toolsSource: ToolsSource,
@@ -164,12 +158,16 @@ async function sendCompletedStatusReport(
 
   const initStatusReport: InitStatusReport = {
     ...statusReportBase,
-    tools_input: getOptionalInput("tools") || "",
+    tools_input: toolsInput?.value || "",
     tools_resolved_version: toolsVersion,
     tools_source: toolsSource || ToolsSource.Unknown,
     workflow_languages: workflowLanguages || "",
   };
 
+  if (toolsInput !== undefined) {
+    initStatusReport.computed_inputs.tools = toolsInput;
+  }
+
   const initToolsDownloadFields: InitToolsDownloadFields = {};
 
   if (toolsDownloadStatusReport?.downloadDurationMs !== undefined) {
@@ -202,11 +200,14 @@ async function sendCompletedStatusReport(
   }
 }
 
-async function run(startedAt: Date) {
+async function run(
+  actionState: ActionState<["Base", "Logger", "Env", "Actions"]>,
+) {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
 
-  const logger = getActionsLogger();
+  const startedAt = actionState.startedAt;
+  const logger = actionState.logger;
 
   let apiDetails: GitHubApiCombinedDetails;
   let config: configUtils.Config | undefined;
@@ -214,11 +215,11 @@ async function run(startedAt: Date) {
   let codeql: CodeQL;
   let features: FeatureEnablement;
   let sourceRoot: string;
+  let toolsInput: ComputedInput | undefined;
   let toolsDownloadStatusReport: ToolsDownloadStatusReport | undefined;
   let toolsFeatureFlagsValid: boolean | undefined;
   let toolsSource: ToolsSource;
   let toolsVersion: string;
-  let zstdAvailability: ZstdAvailability | undefined;
 
   try {
     initializeEnvironment(getActionVersion());
@@ -251,16 +252,10 @@ async function run(startedAt: Date) {
       repositoryNwo,
       logger,
     );
-
-    // Create a unique identifier for this run.
-    const jobRunUuid = uuidV4();
-    logger.info(`Job run UUID is ${jobRunUuid}.`);
-    core.exportVariable(EnvVar.JOB_RUN_UUID, jobRunUuid);
+    const repositoryProperties = repositoryPropertiesResult.orElse({});
 
     core.exportVariable(EnvVar.INIT_ACTION_HAS_RUN, "true");
 
-    configFile = getOptionalInput("config-file");
-
     // path.resolve() respects the intended semantics of source-root. If
     // source-root is relative, it is relative to the GITHUB_WORKSPACE. If
     // source-root is absolute, it is used as given.
@@ -283,6 +278,14 @@ async function run(startedAt: Date) {
       );
     }
 
+    // Compute the value of the `config-file` input.
+    const actionStateWithFeatures = { ...actionState, features };
+    configFile = await getConfigFileInput(
+      actionStateWithFeatures,
+      repositoryProperties,
+      analysisKinds,
+    );
+
     // Send a status report indicating that an analysis is starting.
     await sendStartingStatusReport(startedAt, { analysisKinds }, logger);
 
@@ -293,6 +296,12 @@ async function run(startedAt: Date) {
       );
     }
 
+    // Get the computed `tools` input.
+    toolsInput = await getToolsInput(
+      actionStateWithFeatures,
+      repositoryProperties,
+    );
+
     const codeQLDefaultVersionInfo =
       await features.getEnabledDefaultCliVersions(gitHubVersion.type);
     toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
@@ -303,7 +312,7 @@ async function run(startedAt: Date) {
       analysisKinds?.length === 1 &&
       analysisKinds[0] === AnalysisKind.CodeScanning;
     const initCodeQLResult = await initCodeQL(
-      getOptionalInput("tools"),
+      toolsInput?.value,
       apiDetails,
       getTemporaryDirectory(),
       gitHubVersion.type,
@@ -317,7 +326,6 @@ async function run(startedAt: Date) {
     toolsDownloadStatusReport = initCodeQLResult.toolsDownloadStatusReport;
     toolsVersion = initCodeQLResult.toolsVersion;
     toolsSource = initCodeQLResult.toolsSource;
-    zstdAvailability = initCodeQLResult.zstdAvailability;
 
     // Check the workflow for problems. If there are any problems, they are reported
     // to the workflow log. No exceptions are thrown.
@@ -350,7 +358,6 @@ async function run(startedAt: Date) {
 
     analysisKinds = await getAnalysisKinds(logger, features);
     const debugMode = getOptionalInput("debug") === "true" || core.isDebug();
-    const repositoryProperties = repositoryPropertiesResult.orElse({});
     const fileCoverageResult = await getFileCoverageInformationEnabled(
       debugMode,
       codeql,
@@ -358,7 +365,7 @@ async function run(startedAt: Date) {
       repositoryProperties,
     );
 
-    config = await initConfig(features, {
+    config = await initConfig(actionStateWithFeatures, {
       analysisKinds,
       languagesInput: getOptionalInput("languages"),
       queriesInput: getOptionalInput("queries"),
@@ -489,22 +496,6 @@ async function run(startedAt: Date) {
       cleanupDatabaseClusterDirectory(config, logger);
     }
 
-    if (zstdAvailability) {
-      await recordZstdAvailability(config, zstdAvailability);
-    }
-
-    // Log CodeQL download telemetry, if appropriate
-    if (toolsDownloadStatusReport) {
-      addNoLanguageDiagnostic(
-        config,
-        makeTelemetryDiagnostic(
-          "codeql-action/bundle-download-telemetry",
-          "CodeQL bundle download telemetry",
-          toolsDownloadStatusReport,
-        ),
-      );
-    }
-
     // Forward Go flags
     const goFlags = process.env["GOFLAGS"];
     if (goFlags) {
@@ -698,7 +689,6 @@ async function run(startedAt: Date) {
       sourceRoot,
       "Runner.Worker.exe",
       qlconfigFile,
-      logger,
     );
 
     // To check custom query packs for compatibility with overlay analysis, we
@@ -727,7 +717,6 @@ async function run(startedAt: Date) {
         sourceRoot,
         "Runner.Worker.exe",
         qlconfigFile,
-        logger,
       );
     }
 
@@ -770,6 +759,7 @@ async function run(startedAt: Date) {
       startedAt,
       config,
       undefined, // We only report config info on success.
+      toolsInput,
       toolsDownloadStatusReport,
       toolsFeatureFlagsValid,
       toolsSource,
@@ -787,6 +777,7 @@ async function run(startedAt: Date) {
     startedAt,
     config,
     configFile,
+    toolsInput,
     toolsDownloadStatusReport,
     toolsFeatureFlagsValid,
     toolsSource,
@@ -797,65 +788,13 @@ async function run(startedAt: Date) {
   );
 }
 
-/**
- * Loads [repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) if applicable.
- */
-async function loadRepositoryProperties(
-  repositoryNwo: RepositoryNwo,
-  logger: Logger,
-): Promise> {
-  // See if we can skip loading repository properties early. In particular,
-  // repositories owned by users cannot have repository properties, so we can
-  // skip the API call entirely in that case.
-  const repositoryOwnerType = github.context.payload.repository?.owner.type;
-  logger.debug(
-    `Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`,
-  );
-  if (repositoryOwnerType === "User") {
-    logger.debug(
-      "Skipping loading repository properties because the repository is owned by a user and " +
-        "therefore cannot have repository properties.",
-    );
-    return new Success({});
-  }
-
-  try {
-    return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
-  } catch (error) {
-    logger.warning(
-      `Failed to load repository properties: ${getErrorMessage(error)}`,
-    );
-    return new Failure(error);
-  }
-}
-
-async function recordZstdAvailability(
-  config: configUtils.Config,
-  zstdAvailability: ZstdAvailability,
-) {
-  addNoLanguageDiagnostic(
-    config,
-    makeTelemetryDiagnostic(
-      "codeql-action/zstd-availability",
-      "Zstandard availability",
-      zstdAvailability,
-    ),
-  );
-}
+/** Defines the `init` Action. */
+const init: Action = {
+  name: ActionName.Init,
+  run,
+};
 
 export async function runWrapper() {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(`init action failed: ${getErrorMessage(error)}`);
-    await sendUnhandledErrorStatusReport(
-      ActionName.Init,
-      startedAt,
-      error,
-      logger,
-    );
-  }
+  await runInActions(init);
   await checkForTimeout();
 }
diff --git a/src/init.test.ts b/src/init.test.ts
index 88ad0c9b18..1f0d2c701c 100644
--- a/src/init.test.ts
+++ b/src/init.test.ts
@@ -8,6 +8,7 @@ import * as sinon from "sinon";
 
 import * as actionsUtil from "./actions-util";
 import { createStubCodeQL } from "./codeql";
+import { ActionsEnvVars } from "./environment";
 import { Feature } from "./feature-flags";
 import {
   checkPacksForOverlayCompatibility,
@@ -84,7 +85,7 @@ for (const { runnerEnv, ErrorConstructor, message } of [
     `cleanupDatabaseClusterDirectory throws a ${ErrorConstructor.name} when cleanup fails on ${runnerEnv} runner`,
     async (t) => {
       await withTmpDir(async (tmpDir: string) => {
-        process.env["RUNNER_ENVIRONMENT"] = runnerEnv;
+        process.env[ActionsEnvVars.RUNNER_ENVIRONMENT] = runnerEnv;
 
         const dbLocation = path.resolve(tmpDir, "dbs");
         fs.mkdirSync(dbLocation, { recursive: true });
diff --git a/src/init.ts b/src/init.ts
index 2533d9a894..c6a258e58c 100644
--- a/src/init.ts
+++ b/src/init.ts
@@ -7,6 +7,7 @@ import * as github from "@actions/github";
 import * as io from "@actions/io";
 import * as yaml from "js-yaml";
 
+import { ActionState } from "./action-common";
 import {
   getOptionalInput,
   isAnalyzingPullRequest,
@@ -29,7 +30,6 @@ import {
 import { BuiltInLanguage, Language } from "./languages";
 import { Logger, withGroupAsync } from "./logging";
 import { ToolsSource } from "./setup-codeql";
-import { ZstdAvailability } from "./tar";
 import { ToolsDownloadStatusReport } from "./tools-download";
 import * as util from "./util";
 
@@ -48,27 +48,21 @@ export async function initCodeQL(
   toolsDownloadStatusReport?: ToolsDownloadStatusReport;
   toolsSource: ToolsSource;
   toolsVersion: string;
-  zstdAvailability: ZstdAvailability;
 }> {
   logger.startGroup("Setup CodeQL tools");
-  const {
-    codeql,
-    toolsDownloadStatusReport,
-    toolsSource,
-    toolsVersion,
-    zstdAvailability,
-  } = await setupCodeQL(
-    toolsInput,
-    apiDetails,
-    tempDir,
-    variant,
-    defaultCliVersion,
-    rawLanguages,
-    useOverlayAwareDefaultCliVersion,
-    features,
-    logger,
-    true,
-  );
+  const { codeql, toolsDownloadStatusReport, toolsSource, toolsVersion } =
+    await setupCodeQL(
+      toolsInput,
+      apiDetails,
+      tempDir,
+      variant,
+      defaultCliVersion,
+      rawLanguages,
+      useOverlayAwareDefaultCliVersion,
+      features,
+      logger,
+      true,
+    );
   await codeql.printVersion();
   logger.endGroup();
   return {
@@ -76,16 +70,15 @@ export async function initCodeQL(
     toolsDownloadStatusReport,
     toolsSource,
     toolsVersion,
-    zstdAvailability,
   };
 }
 
 export async function initConfig(
-  features: FeatureEnablement,
+  actionState: ActionState<["Logger", "Env", "FeatureFlags"]>,
   inputs: configUtils.InitConfigInputs,
 ): Promise {
   return await withGroupAsync("Load language configuration", async () => {
-    return await configUtils.initConfig(features, inputs);
+    return await configUtils.initConfig(actionState, inputs);
   });
 }
 
@@ -96,7 +89,6 @@ export async function runDatabaseInitCluster(
   sourceRoot: string,
   processName: string | undefined,
   qlconfigFile: string | undefined,
-  logger: Logger,
 ): Promise {
   fs.mkdirSync(config.dbLocation, { recursive: true });
   await configUtils.wrapEnvironment(
@@ -107,7 +99,6 @@ export async function runDatabaseInitCluster(
         sourceRoot,
         processName,
         qlconfigFile,
-        logger,
       ),
   );
 }
diff --git a/src/json/index.test.ts b/src/json/index.test.ts
index 825bbc0e70..80edbedece 100644
--- a/src/json/index.test.ts
+++ b/src/json/index.test.ts
@@ -10,8 +10,8 @@ const testSchema = {
   requiredKey: json.string,
 };
 
-const optionalSchema = {
-  optionalKey: json.optional(json.string),
+const optionalOrNullSchema = {
+  optionalKey: json.optionalOrNull(json.string),
 };
 
 test("validateSchema - required properties are required", async (t) => {
@@ -28,13 +28,36 @@ test("validateSchema - required properties are required", async (t) => {
   t.true(json.validateSchema(testSchema, { requiredKey: "foo" }));
 });
 
-test("validateSchema - optional properties are optional", async (t) => {
+test("validateSchema - optionalOrNullSchema properties are optional or null", async (t) => {
   // Optional fields may be absent
+  t.true(json.validateSchema(optionalOrNullSchema, {}));
+  t.true(json.validateSchema(optionalOrNullSchema, { optionalKey: undefined }));
+  t.true(json.validateSchema(optionalOrNullSchema, { optionalKey: null }));
+
+  // But, if present, should have the expected type
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: 0 }));
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: 123 }));
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: false }));
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: true }));
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: [] }));
+  t.false(json.validateSchema(optionalOrNullSchema, { optionalKey: {} }));
+  t.true(json.validateSchema(optionalOrNullSchema, { optionalKey: "" }));
+  t.true(json.validateSchema(optionalOrNullSchema, { optionalKey: "foo" }));
+});
+
+const optionalSchema = {
+  optionalKey: json.optional(json.string),
+};
+
+test("validateSchema - optional properties are optional", async (t) => {
+  // Optional fields may be absent or explicitly undefined
   t.true(json.validateSchema(optionalSchema, {}));
   t.true(json.validateSchema(optionalSchema, { optionalKey: undefined }));
-  t.true(json.validateSchema(optionalSchema, { optionalKey: null }));
 
-  // But, if present, should have the expected type
+  // But should reject null
+  t.false(json.validateSchema(optionalSchema, { optionalKey: null }));
+
+  // And, if present, should have the expected type
   t.false(json.validateSchema(optionalSchema, { optionalKey: 0 }));
   t.false(json.validateSchema(optionalSchema, { optionalKey: 123 }));
   t.false(json.validateSchema(optionalSchema, { optionalKey: false }));
@@ -44,3 +67,76 @@ test("validateSchema - optional properties are optional", async (t) => {
   t.true(json.validateSchema(optionalSchema, { optionalKey: "" }));
   t.true(json.validateSchema(optionalSchema, { optionalKey: "foo" }));
 });
+
+const arraySchema = {
+  arrayKey: json.array(json.number),
+};
+
+test("validateSchema - validates arrays", async (t) => {
+  // Arrays of numeric elements are accepted.
+  t.true(json.validateSchema(arraySchema, { arrayKey: [] }));
+  t.true(json.validateSchema(arraySchema, { arrayKey: [4] }));
+  t.true(json.validateSchema(arraySchema, { arrayKey: [4, 8] }));
+  t.true(json.validateSchema(arraySchema, { arrayKey: [4, 8, 15] }));
+
+  // Other array elements are not accepted.
+  t.false(json.validateSchema(arraySchema, { arrayKey: [4, 8, 15, "bar"] }));
+  t.false(json.validateSchema(arraySchema, { arrayKey: [4, 8, undefined] }));
+  t.false(json.validateSchema(arraySchema, { arrayKey: [4, 8, 15, null] }));
+});
+
+const objectSchema = {
+  objectKey: json.object(arraySchema),
+};
+
+test("validateSchema - validates objects", async (t) => {
+  // Objects of the given schema are accepted.
+  t.true(json.validateSchema(objectSchema, { objectKey: { arrayKey: [] } }));
+  t.true(json.validateSchema(objectSchema, { objectKey: { arrayKey: [4] } }));
+
+  // Other values are not accepted.
+  t.false(json.validateSchema(objectSchema, {}));
+  t.false(json.validateSchema(objectSchema, { objectKey: [] }));
+  t.false(json.validateSchema(objectSchema, { objectKey: undefined }));
+  t.false(json.validateSchema(objectSchema, { objectKey: null }));
+  t.false(json.validateSchema(objectSchema, { objectKey: "foo" }));
+  t.false(json.validateSchema(objectSchema, { objectKey: 123 }));
+});
+
+const checkSchemaTestSchema = {
+  rootKey: json.object(objectSchema),
+};
+
+test("checkSchema - reports unknown keys", async (t) => {
+  const result = json.checkSchema(checkSchemaTestSchema, {
+    rootKey: {
+      objectKey: {
+        arrayKey: [],
+      },
+      nestedExtraKey: "foo",
+    },
+    extraKey: "bar",
+  });
+
+  t.true(result.valid);
+  t.deepEqual(
+    result.unknownKeys.sort(),
+    [".extraKey", ".rootKey.nestedExtraKey"].sort(),
+  );
+});
+
+test("checkSchema - reports invalid keys", async (t) => {
+  const result = json.checkSchema(checkSchemaTestSchema, {
+    rootKey: {
+      objectKey: {
+        arrayKey: ["foo"],
+      },
+    },
+  });
+
+  t.false(result.valid);
+  t.deepEqual(
+    result.invalidKeys.sort(),
+    [".rootKey.objectKey.arrayKey[0]"].sort(),
+  );
+});
diff --git a/src/json/index.ts b/src/json/index.ts
index 8a1b60a178..d8764ec478 100644
--- a/src/json/index.ts
+++ b/src/json/index.ts
@@ -30,6 +30,16 @@ export function isString(value: unknown): value is string {
   return typeof value === "string";
 }
 
+/** Asserts that `value` is a number. */
+export function isNumber(value: unknown): value is number {
+  return typeof value === "number";
+}
+
+/** Asserts that `value` is a boolean. */
+export function isBoolean(value: unknown): value is boolean {
+  return typeof value === "boolean";
+}
+
 /** Asserts that `value` is either a string or undefined. */
 export function isStringOrUndefined(
   value: unknown,
@@ -43,28 +53,146 @@ export function isStringOrUndefined(
  */
 export type Validator = {
   validate: (val: unknown) => val is T;
+  check: (
+    val: unknown,
+    opts: CheckSchemaOptions,
+    path: string,
+  ) => CheckSchemaResult;
   required: boolean;
 };
 
+function defaultCheck(
+  validate: (val: unknown) => val is any,
+): (arg: unknown) => CheckSchemaResult {
+  return (arg) => ({ unknownKeys: [], invalidKeys: [], valid: validate(arg) });
+}
+
+function makeValidator(validate: (arg: unknown) => arg is T) {
+  return {
+    validate,
+    check: defaultCheck(validate),
+    required: true,
+  } as const satisfies Validator;
+}
+
 /** Extracts `T` from `Validator`. */
 export type UnwrapValidator = V extends Validator ? A : never;
 
 /** A validator for string fields in schemas. */
-export const string = {
-  validate: isString,
-  required: true,
-} as const satisfies Validator;
+export const string = makeValidator(isString);
 
-/** Transforms a validator to be optional. */
-export function optional(validator: Validator) {
+/** A validator for number fields in schemas. */
+export const number = makeValidator(isNumber);
+
+/** A validator for boolean fields in schemas. */
+export const boolean = makeValidator(isBoolean);
+
+/** A validator for arrays. */
+export function array(validator: Validator) {
+  const validate = (val: unknown) => {
+    return isArray(val) && val.every((e) => validator.validate(e));
+  };
+  return {
+    validate,
+    check: (val: unknown, opts: CheckSchemaOptions, path: string) => {
+      const result: CheckSchemaResult = successfulCheckSchema();
+
+      // The value must be an array.
+      if (!isArray(val)) {
+        result.valid = false;
+        return result;
+      }
+
+      // Validate all elements of the array.
+      let index = 0;
+      for (const e of val) {
+        const elementPath = `${path}[${index}]`;
+        const eResult = validator.check(e, opts, `${elementPath}`);
+
+        result.invalidKeys.push(...eResult.invalidKeys);
+        result.unknownKeys.push(...eResult.unknownKeys);
+        index++;
+
+        if (!eResult.valid) {
+          result.valid = false;
+
+          // Add the element path to `invalidKeys` if we didn't get
+          // any more specific ones from the element validator.
+          if (eResult.invalidKeys.length === 0) {
+            result.invalidKeys.push(elementPath);
+          }
+
+          if (opts.failFast) {
+            return result;
+          }
+
+          continue;
+        }
+      }
+
+      return result;
+    },
+    required: true,
+  } as const satisfies Validator;
+}
+
+/** A validator for objects. */
+export function object<
+  S extends Schema,
+  T extends UnvalidatedObject = FromSchema,
+>(schema: S) {
+  return {
+    validate: (val: unknown) => {
+      return isObject(val) && validateSchema(schema, val);
+    },
+    check: (val, opts, path) => {
+      if (!isObject(val)) {
+        return invalidCheckSchema();
+      }
+      return checkSchema(schema, val, opts, path);
+    },
+    required: true,
+  } as const satisfies Validator;
+}
+
+/**
+ * Transforms a validator to be optional, accepting `undefined` or `null` for an
+ * absent value.
+ */
+export function optionalOrNull(validator: Validator) {
   return {
     validate: (val: unknown) => {
       return val === undefined || val === null || validator.validate(val);
     },
+    check: (val, opts, path) => {
+      if (val === undefined || val === null) {
+        return successfulCheckSchema();
+      }
+      return validator.check(val, opts, path);
+    },
     required: false,
   } as const satisfies Validator;
 }
 
+/**
+ * Transforms a validator to be optional, accepting `undefined` for an absent
+ * value but, unlike `optionalOrNull`, rejecting `null`.
+ */
+export function optional(validator: Validator) {
+  return {
+    validate: (val: unknown): val is T | undefined => {
+      return val === undefined || validator.validate(val);
+    },
+    check: (val, opts, path) => {
+      if (val === undefined) {
+        return successfulCheckSchema();
+      }
+      return validator.check(val, opts, path);
+    },
+    required: false,
+  } as const satisfies Validator;
+}
+
 /** Represents an arbitrary object schema. */
 export type Schema = Record>;
 
@@ -90,28 +218,150 @@ export type FromSchema = {
  * @param obj The object to validate.
  * @returns Asserts that `obj` is of the `schema`'s type if validation is successful.
  */
-export function validateSchema(
+export function validateSchema<
+  S extends Schema,
+  T extends UnvalidatedObject = FromSchema,
+>(schema: S, obj: UnvalidatedObject): obj is T {
+  const result = checkSchema(schema, obj, { failFast: true });
+  return result.valid;
+}
+
+/**
+ * Validates that `arr` is an array whose elements satisfy at least `elementSchema`.
+ * Additional keys are accepted in each element.
+ *
+ * @param elementSchema The schema to validate the elements against.
+ * @param arr The array to validate.
+ * @returns Asserts that `arr` has elements of `schema`'s type if validation is successful.
+ */
+export function validateArray<
+  S extends Schema,
+  T extends UnvalidatedArray = Array>,
+>(elementSchema: S, arr: UnvalidatedArray): arr is T {
+  const elementValidator = object(elementSchema);
+
+  return array(elementValidator).validate(arr);
+}
+
+export interface CheckSchemaOptions {
+  /** Whether to stop validation after the first error. */
+  failFast?: boolean;
+}
+
+export interface CheckSchemaResult {
+  /** Whether the `obj` satisfies the schema. */
+  valid: boolean;
+  /** Unknown keys that were found during validation. */
+  unknownKeys: string[];
+  /** Known keys that failed validation. */
+  invalidKeys: string[];
+}
+
+/**
+ * Convenience function to produce a `CheckSchemaResult` where `valid: true`.
+ */
+function successfulCheckSchema(): CheckSchemaResult {
+  return {
+    valid: true,
+    unknownKeys: [],
+    invalidKeys: [],
+  };
+}
+
+/**
+ * Convenience function to produce a `CheckSchemaResult` where `valid: false`.
+ */
+function invalidCheckSchema(): CheckSchemaResult {
+  return {
+    valid: false,
+    unknownKeys: [],
+    invalidKeys: [],
+  };
+}
+
+export function checkSchema(
   schema: S,
   obj: UnvalidatedObject,
-): obj is FromSchema {
+  options: CheckSchemaOptions = {},
+  path: string = "",
+): CheckSchemaResult {
+  const result: CheckSchemaResult = successfulCheckSchema();
+
+  // Track the set of input keys. We remove keys from this set as we recognise them
+  // during validation.
+  const inputKeys = new Set(Object.keys(obj));
+
+  // Track keys that have failed validation, starting with the empty set.
+  const invalidKeys = new Set();
+
+  // Loop through all keys in the object schema and validate that the given object
+  // satisfies the schema key.
   for (const [key, validator] of Object.entries(schema)) {
     const hasKey = key in obj;
 
+    // Remove key from set of unrecognised keys.
+    inputKeys.delete(key);
+
+    // Add the key to the set of invalid keys. We remove it later once
+    // it passes validation.
+    invalidKeys.add(key);
+
     // If the property is required, but absent, fail.
     if (validator.required && !hasKey) {
-      return false;
+      result.valid = false;
+
+      if (options.failFast) {
+        break;
+      }
+      continue;
     }
 
     // If the property is required, but undefined or null, fail.
     if (validator.required && (obj[key] === undefined || obj[key] === null)) {
-      return false;
+      result.valid = false;
+
+      if (options.failFast) {
+        break;
+      }
+      continue;
     }
 
     // If the property is present, validate it.
-    if (hasKey && !validator.validate(obj[key])) {
-      return false;
+    if (hasKey) {
+      const checkResult = validator.check(obj[key], options, `${path}.${key}`);
+
+      result.unknownKeys.push(...checkResult.unknownKeys);
+      result.invalidKeys.push(...checkResult.invalidKeys);
+
+      // If we have invalid keys from the validator, then that means that
+      // we have a more specific key than `key`. Remove `key` from the results.
+      if (checkResult.invalidKeys.length > 0) {
+        invalidKeys.delete(key);
+      }
+
+      if (!checkResult.valid) {
+        result.valid = false;
+
+        if (options.failFast) {
+          break;
+        }
+        continue;
+      }
     }
+
+    // If we reach this point, the key has been successfully validated.
+    invalidKeys.delete(key);
+  }
+
+  // If there are any remaining keys in `inputKeys`, add them to `unknownKeys`.
+  for (const remainingKey of inputKeys) {
+    result.unknownKeys.push(`${path}.${remainingKey}`);
+  }
+
+  // If there are any remaining keys in `invalidKeys`, add them to the result.
+  for (const invalidKey of invalidKeys) {
+    result.invalidKeys.push(`${path}.${invalidKey}`);
   }
 
-  return true;
+  return result;
 }
diff --git a/src/resolve-environment.ts b/src/resolve-environment.ts
index d202efa83e..3a1a6ca6bf 100644
--- a/src/resolve-environment.ts
+++ b/src/resolve-environment.ts
@@ -9,7 +9,7 @@ export async function runResolveBuildEnvironment(
 ) {
   logger.startGroup(`Attempting to resolve build environment for ${language}`);
 
-  const codeql = await getCodeQL(cmd);
+  const codeql = await getCodeQL(logger, cmd);
 
   if (workingDir !== undefined) {
     logger.info(`Using ${workingDir} as the working directory.`);
diff --git a/src/setup-codeql-action.ts b/src/setup-codeql-action.ts
index d3e0e7dbcc..7873449f9c 100644
--- a/src/setup-codeql-action.ts
+++ b/src/setup-codeql-action.ts
@@ -1,6 +1,6 @@
 import * as core from "@actions/core";
-import { v4 as uuidV4 } from "uuid";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import {
   getActionVersion,
   getOptionalInput,
@@ -10,11 +10,13 @@ import {
 import { AnalysisKind, getAnalysisKinds } from "./analyses";
 import { getGitHubVersion } from "./api-client";
 import { CodeQL } from "./codeql";
+import { ComputedInput, getToolsInput } from "./config/inputs";
 import { getRawLanguagesNoAutodetect } from "./config-utils";
 import { EnvVar } from "./environment";
 import { initFeatures } from "./feature-flags";
+import { loadRepositoryProperties } from "./feature-flags/properties";
 import { initCodeQL } from "./init";
-import { getActionsLogger, Logger } from "./logging";
+import { Logger } from "./logging";
 import { getRepositoryNwo } from "./repository";
 import { ToolsSource } from "./setup-codeql";
 import {
@@ -24,7 +26,6 @@ import {
   createStatusReportBase,
   getActionsStatus,
   sendStatusReport,
-  sendUnhandledErrorStatusReport,
 } from "./status-report";
 import { ToolsDownloadStatusReport } from "./tools-download";
 import {
@@ -36,7 +37,6 @@ import {
   ConfigurationError,
   wrapError,
   checkActionVersion,
-  getErrorMessage,
 } from "./util";
 
 /**
@@ -44,6 +44,7 @@ import {
  */
 async function sendCompletedStatusReport(
   startedAt: Date,
+  toolsInput: ComputedInput | undefined,
   toolsDownloadStatusReport: ToolsDownloadStatusReport | undefined,
   toolsFeatureFlagsValid: boolean | undefined,
   toolsSource: ToolsSource,
@@ -68,12 +69,16 @@ async function sendCompletedStatusReport(
 
   const initStatusReport: InitStatusReport = {
     ...statusReportBase,
-    tools_input: getOptionalInput("tools") || "",
+    tools_input: toolsInput?.value || "",
     tools_resolved_version: toolsVersion,
     tools_source: toolsSource || ToolsSource.Unknown,
     workflow_languages: "",
   };
 
+  if (toolsInput !== undefined) {
+    initStatusReport.computed_inputs.tools = toolsInput;
+  }
+
   const initToolsDownloadFields: InitToolsDownloadFields = {};
 
   if (toolsDownloadStatusReport?.downloadDurationMs !== undefined) {
@@ -88,13 +93,15 @@ async function sendCompletedStatusReport(
 }
 
 /** The main behaviour of this action. */
-async function run(startedAt: Date): Promise {
+async function run(
+  actionState: ActionState<["Base", "Logger", "Env", "Actions"]>,
+): Promise {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
-
-  const logger = getActionsLogger();
+  const { logger, startedAt } = actionState;
 
   let codeql: CodeQL;
+  let toolsInput: ComputedInput | undefined;
   let toolsDownloadStatusReport: ToolsDownloadStatusReport | undefined;
   let toolsFeatureFlagsValid: boolean | undefined;
   let toolsSource: ToolsSource;
@@ -123,9 +130,14 @@ async function run(startedAt: Date): Promise {
       logger,
     );
 
-    const jobRunUuid = uuidV4();
-    logger.info(`Job run UUID is ${jobRunUuid}.`);
-    core.exportVariable(EnvVar.JOB_RUN_UUID, jobRunUuid);
+    // Fetch the values of known repository properties that affect us.
+    const repositoryPropertiesResult = await loadRepositoryProperties(
+      repositoryNwo,
+      logger,
+    );
+    const repositoryProperties = repositoryPropertiesResult.orElse({});
+
+    const actionStateWithFeatures = { ...actionState, features };
 
     const statusReportBase = await createStatusReportBase(
       ActionName.SetupCodeQL,
@@ -138,6 +150,13 @@ async function run(startedAt: Date): Promise {
     if (statusReportBase !== undefined) {
       await sendStatusReport(statusReportBase);
     }
+
+    // Get the computed `tools` input.
+    toolsInput = await getToolsInput(
+      actionStateWithFeatures,
+      repositoryProperties,
+    );
+
     const codeQLDefaultVersionInfo =
       await features.getEnabledDefaultCliVersions(gitHubVersion.type);
     toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
@@ -146,7 +165,7 @@ async function run(startedAt: Date): Promise {
     );
     const analysisKinds = await getAnalysisKinds(logger, features);
     const initCodeQLResult = await initCodeQL(
-      getOptionalInput("tools"),
+      toolsInput?.value,
       apiDetails,
       getTemporaryDirectory(),
       gitHubVersion.type,
@@ -187,6 +206,7 @@ async function run(startedAt: Date): Promise {
 
   await sendCompletedStatusReport(
     startedAt,
+    toolsInput,
     toolsDownloadStatusReport,
     toolsFeatureFlagsValid,
     toolsSource,
@@ -195,20 +215,14 @@ async function run(startedAt: Date): Promise {
   );
 }
 
+/** Defines the `setup-codeql` Action. */
+const setupCodeQL: Action = {
+  name: ActionName.SetupCodeQL,
+  run,
+};
+
 /** Run the action and catch any unhandled errors. */
 export async function runWrapper(): Promise {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(`setup-codeql action failed: ${getErrorMessage(error)}`);
-    await sendUnhandledErrorStatusReport(
-      ActionName.SetupCodeQL,
-      startedAt,
-      error,
-      logger,
-    );
-  }
+  await runInActions(setupCodeQL);
   await checkForTimeout();
 }
diff --git a/src/setup-codeql.test.ts b/src/setup-codeql.test.ts
index 49d4d66aad..219e39984c 100644
--- a/src/setup-codeql.test.ts
+++ b/src/setup-codeql.test.ts
@@ -7,6 +7,7 @@ import * as sinon from "sinon";
 
 import * as actionsUtil from "./actions-util";
 import * as api from "./api-client";
+import { EnvVar } from "./environment";
 import { Feature } from "./feature-flags";
 import { getRunnerLogger } from "./logging";
 import { getCacheRestoreKeyPrefix } from "./overlay/caching";
@@ -116,30 +117,69 @@ test.serial(
   },
 );
 
-test.serial(
-  "getCodeQLSource correctly returns bundled CLI version when tools == linked",
-  async (t) => {
-    const features = createFeatures([]);
-
-    await withTmpDir(async (tmpDir) => {
-      setupActionsVars(tmpDir, tmpDir);
-      const source = await setupCodeql.getCodeQLSource(
-        "linked",
-        SAMPLE_DEFAULT_CLI_VERSION,
-        undefined, // rawLanguages
-        false, // useOverlayAwareDefaultCliVersion
-        SAMPLE_DOTCOM_API_DETAILS,
-        GitHubVariant.DOTCOM,
-        false,
-        features,
-        getRunnerLogger(true),
-      );
-
-      t.is(source.toolsVersion, LINKED_CLI_VERSION.cliVersion);
-      t.is(source.sourceType, "download");
-    });
+const LINKED_BUNDLE_TEST_CASES = [
+  {
+    platform: "linux",
+    tarSupportsZstd: true,
+    expectedBundleName: "codeql-bundle-linux64.tar.zst",
+    expectedCompressionMethod: "zstd",
   },
-);
+  {
+    platform: "darwin",
+    tarSupportsZstd: true,
+    expectedBundleName: "codeql-bundle-osx64.tar.zst",
+    expectedCompressionMethod: "zstd",
+  },
+  {
+    platform: "win32",
+    tarSupportsZstd: true,
+    expectedBundleName: "codeql-bundle-win64.tar.gz",
+    expectedCompressionMethod: "gzip",
+  },
+  {
+    platform: "linux",
+    tarSupportsZstd: false,
+    expectedBundleName: "codeql-bundle-linux64.tar.gz",
+    expectedCompressionMethod: "gzip",
+  },
+] as const;
+
+for (const {
+  platform,
+  tarSupportsZstd,
+  expectedBundleName,
+  expectedCompressionMethod,
+} of LINKED_BUNDLE_TEST_CASES) {
+  test.serial(
+    `getCodeQLSource selects ${expectedBundleName} for linked tools`,
+    async (t) => {
+      const features = createFeatures([]);
+      sinon.stub(process, "platform").value(platform);
+
+      await withTmpDir(async (tmpDir) => {
+        setupActionsVars(tmpDir, tmpDir);
+        const source = await setupCodeql.getCodeQLSource(
+          "linked",
+          SAMPLE_DEFAULT_CLI_VERSION,
+          undefined, // rawLanguages
+          false, // useOverlayAwareDefaultCliVersion
+          SAMPLE_DOTCOM_API_DETAILS,
+          GitHubVariant.DOTCOM,
+          tarSupportsZstd,
+          features,
+          getRunnerLogger(true),
+        );
+
+        t.is(source.toolsVersion, LINKED_CLI_VERSION.cliVersion);
+        t.is(source.sourceType, "download");
+        if (source.sourceType === "download") {
+          t.is(source.compressionMethod, expectedCompressionMethod);
+          t.true(source.codeqlURL.endsWith(`/${expectedBundleName}`));
+        }
+      });
+    },
+  );
+}
 
 test.serial(
   "getCodeQLSource correctly returns bundled CLI version when tools == latest",
@@ -193,12 +233,7 @@ test.serial(
     sinon.stub(setupCodeql, "downloadCodeQL").resolves({
       codeqlFolder: "codeql",
       statusReport: {
-        combinedDurationMs: 500,
-        compressionMethod: "gzip",
         downloadDurationMs: 200,
-        extractionDurationMs: 300,
-        streamExtraction: false,
-        toolsUrl: "toolsUrl",
       },
       toolsVersion: LINKED_CLI_VERSION.cliVersion,
     });
@@ -250,12 +285,7 @@ test.serial(
     sinon.stub(setupCodeql, "downloadCodeQL").resolves({
       codeqlFolder: "codeql",
       statusReport: {
-        combinedDurationMs: 500,
-        compressionMethod: "gzip",
         downloadDurationMs: 200,
-        extractionDurationMs: 300,
-        streamExtraction: false,
-        toolsUrl: bundleUrl,
       },
       toolsVersion: expectedVersion,
     });
@@ -421,7 +451,7 @@ test.serial(
   async (t) => {
     const loggedMessages: LoggedMessage[] = [];
     const logger = getRecordingLogger(loggedMessages);
-    const features = createFeatures([Feature.AllowToolcacheInput]);
+    const features = createFeatures([]);
 
     const latestToolcacheVersion = "3.2.1";
     const latestVersionPath = "/path/to/latest";
@@ -550,7 +580,7 @@ const toolcacheInputFallbackMacro = makeMacro({
 
 toolcacheInputFallbackMacro.serial(
   "the toolcache doesn't have a CodeQL CLI when tools == toolcache",
-  [Feature.AllowToolcacheInput],
+  [],
   { GITHUB_EVENT_NAME: "dynamic" },
   [],
   [
@@ -561,7 +591,7 @@ toolcacheInputFallbackMacro.serial(
 
 toolcacheInputFallbackMacro.serial(
   "the workflow trigger is not `dynamic`",
-  [Feature.AllowToolcacheInput],
+  [],
   { GITHUB_EVENT_NAME: "pull_request" },
   [],
   [
@@ -569,14 +599,6 @@ toolcacheInputFallbackMacro.serial(
   ],
 );
 
-toolcacheInputFallbackMacro.serial(
-  "the feature flag is not enabled",
-  [],
-  { GITHUB_EVENT_NAME: "dynamic" },
-  [],
-  [`Ignoring 'tools: toolcache' because the feature is not enabled.`],
-);
-
 test.serial(
   'tryGetTagNameFromUrl extracts the right tag name for a repo name containing "codeql-bundle"',
   (t) => {
@@ -637,8 +659,8 @@ test.serial(
   async (t) => {
     await withTmpDir(async (tmpDir) => {
       setupActionsVars(tmpDir, tmpDir);
-      process.env["CODE_SCANNING_REF"] = "refs/heads/feature-branch";
-      process.env["CODE_SCANNING_BASE_BRANCH"] = "main";
+      process.env[EnvVar.CODE_SCANNING_REF] = "refs/heads/feature-branch";
+      process.env[EnvVar.CODE_SCANNING_BASE_BRANCH] = "main";
 
       sinon.stub(api, "getAutomationID").resolves("test/");
       const listStub = sinon.stub(api, "listActionsCaches").resolves([
diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts
index 3db0b6ca4d..8d374585aa 100644
--- a/src/setup-codeql.ts
+++ b/src/setup-codeql.ts
@@ -533,11 +533,7 @@ export async function getCodeQLSource(
     // We only allow `toolsInput === "toolcache"` for `dynamic` events. In general, using `toolsInput === "toolcache"`
     // can lead to alert wobble and so it shouldn't be used for an analysis where results are intended to be uploaded.
     // We also allow this in test mode.
-    const allowToolcacheValueFF = await features.getValue(
-      Feature.AllowToolcacheInput,
-    );
-    const allowToolcacheValue =
-      allowToolcacheValueFF && (isDynamicWorkflow() || util.isInTestMode());
+    const allowToolcacheValue = isDynamicWorkflow() || util.isInTestMode();
     if (allowToolcacheValue) {
       // If `toolsInput === "toolcache"`, try to find the latest version of the CLI that's available in the toolcache
       // and use that. We perform this check here since we can set `cliVersion` directly and don't want to default to
@@ -558,15 +554,9 @@ export async function getCodeQLSource(
           `Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`,
         );
       } else {
-        if (allowToolcacheValueFF) {
-          logger.warning(
-            `Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`,
-          );
-        } else {
-          logger.info(
-            `Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`,
-          );
-        }
+        logger.warning(
+          `Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`,
+        );
       }
 
       const version = await resolveDefaultCliVersion(
@@ -921,7 +911,6 @@ interface SetupCodeQLResult {
   toolsDownloadStatusReport?: ToolsDownloadStatusReport;
   toolsSource: ToolsSource;
   toolsVersion: string;
-  zstdAvailability: tar.ZstdAvailability;
 }
 
 /**
@@ -1005,7 +994,6 @@ export async function setupCodeQLBundle(
     toolsDownloadStatusReport,
     toolsSource,
     toolsVersion,
-    zstdAvailability,
   };
 }
 
diff --git a/src/start-proxy-action.ts b/src/start-proxy-action.ts
index 609b576441..e8b89732f7 100644
--- a/src/start-proxy-action.ts
+++ b/src/start-proxy-action.ts
@@ -3,11 +3,12 @@ import * as path from "path";
 
 import * as core from "@actions/core";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import * as actionsUtil from "./actions-util";
 import { getGitHubVersion } from "./api-client";
-import { Feature, FeatureEnablement, initFeatures } from "./feature-flags";
+import { FeatureEnablement, initFeatures } from "./feature-flags";
 import { BuiltInLanguage, parseBuiltInLanguage } from "./languages";
-import { getActionsLogger, Logger } from "./logging";
+import { Logger } from "./logging";
 import { getRepositoryNwo } from "./repository";
 import {
   credentialToStr,
@@ -23,14 +24,14 @@ import {
 import { generateCertificateAuthority } from "./start-proxy/ca";
 import { checkProxyEnvironment } from "./start-proxy/environment";
 import { checkConnections } from "./start-proxy/reachability";
-import { ActionName, sendUnhandledErrorStatusReport } from "./status-report";
+import { ActionName } from "./status-report";
 import * as util from "./util";
 
-async function run(startedAt: Date) {
+async function run(action: ActionState<["Base", "Logger", "Env", "Actions"]>) {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
-
-  const logger = getActionsLogger();
+  const startedAt = action.startedAt;
+  const logger = action.logger;
   let features: FeatureEnablement | undefined;
   let language: BuiltInLanguage | undefined;
 
@@ -57,18 +58,12 @@ async function run(startedAt: Date) {
     const languageInput = actionsUtil.getOptionalInput("language");
     language = languageInput ? parseBuiltInLanguage(languageInput) : undefined;
 
-    // Query the FF for whether we should use the reduced registry mapping.
-    const skipUnusedRegistries = await features.getValue(
-      Feature.StartProxyRemoveUnusedRegistries,
-    );
-
     // Get the registry configurations from one of the inputs.
     const credentials = getCredentials(
       logger,
       actionsUtil.getOptionalInput("registry_secrets"),
       actionsUtil.getOptionalInput("registries_credentials"),
       language,
-      skipUnusedRegistries,
     );
 
     if (credentials.length === 0) {
@@ -128,21 +123,15 @@ async function run(startedAt: Date) {
   }
 }
 
-export async function runWrapper() {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
+/** Defines the `start-proxy` Action. */
+const startProxyAction: Action = {
+  name: ActionName.StartProxy,
+  run,
+  transformTelemetryError: getSafeErrorMessage,
+};
 
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
-    await sendUnhandledErrorStatusReport(
-      ActionName.StartProxy,
-      startedAt,
-      getSafeErrorMessage(util.wrapError(error)),
-      logger,
-    );
-  }
+export async function runWrapper() {
+  await runInActions(startProxyAction);
 }
 
 async function startProxy(
diff --git a/src/start-proxy.test.ts b/src/start-proxy.test.ts
index 9f12656f62..ee953798b8 100644
--- a/src/start-proxy.test.ts
+++ b/src/start-proxy.test.ts
@@ -120,9 +120,20 @@ const mixedCredentials = [
   { type: "maven_repository", host: "maven.pkg.github.com", token: "def" },
   { type: "nuget_feed", host: "nuget.pkg.github.com", token: "ghi" },
   { type: "goproxy_server", host: "goproxy.example.com", token: "jkl" },
-  { type: "git_source", host: "github.com/github", token: "mno" },
 ];
 
+const gitSourceCredential = {
+  type: "git_source",
+  host: "github.com/github",
+  token: "mno",
+};
+
+const dockerRegistryCredential = {
+  type: "docker_registry",
+  host: "https://registry.example.com",
+  token: "pqr",
+};
+
 test("getCredentials prefers registriesCredentials over registrySecrets", async (t) => {
   const registryCredentials = Buffer.from(
     JSON.stringify([
@@ -241,7 +252,7 @@ test("getCredentials returns all for a language when specified", async (t) => {
   const credentials = startProxyExports.getCredentials(
     getRunnerLogger(true),
     undefined,
-    toEncodedJSON(mixedCredentials),
+    toEncodedJSON([...mixedCredentials, gitSourceCredential]),
     BuiltInLanguage.go,
   );
   t.is(credentials.length, 2);
@@ -284,7 +295,7 @@ test("getCredentials returns all maven_repositories for Java when specified", as
       host: "maven2.pkg.github.com",
       token: "token2",
     },
-    { type: "git_source", host: "github.com/github", token: "mno" },
+    { type: "goproxy_server", host: "github.com/github", token: "mno" },
   ];
 
   const credentials = startProxyExports.getCredentials(
@@ -585,7 +596,6 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
     undefined,
     credentialsInput,
     BuiltInLanguage.java,
-    false,
   );
 
   t.is(credentials.length, 3);
@@ -604,8 +614,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
       getRunnerLogger(true),
       undefined,
       toEncodedJSON([{ ...baseInvalid, "replaces-base": null }]),
-      BuiltInLanguage.actions,
-      false,
+      BuiltInLanguage.java,
     ),
   );
   t.throws(() =>
@@ -613,8 +622,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
       getRunnerLogger(true),
       undefined,
       toEncodedJSON([{ ...baseInvalid, "replaces-base": 123 }]),
-      BuiltInLanguage.actions,
-      false,
+      BuiltInLanguage.java,
     ),
   );
   t.throws(() =>
@@ -622,36 +630,59 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
       getRunnerLogger(true),
       undefined,
       toEncodedJSON([{ ...baseInvalid, "replaces-base": "true" }]),
-      BuiltInLanguage.actions,
-      false,
+      BuiltInLanguage.java,
     ),
   );
 });
 
-test("getCredentials returns all credentials for Actions when using LANGUAGE_TO_REGISTRY_TYPE", async (t) => {
-  const credentialsInput = toEncodedJSON(mixedCredentials);
+test("getCredentials returns only ALWAYS_ENABLED_REGISTRY_TYPE credentials for Actions", async (t) => {
+  const credentialsInput = toEncodedJSON([
+    ...mixedCredentials,
+    gitSourceCredential,
+    dockerRegistryCredential,
+  ]);
 
   const credentials = startProxyExports.getCredentials(
     getRunnerLogger(true),
     undefined,
     credentialsInput,
     BuiltInLanguage.actions,
-    false,
   );
-  t.is(credentials.length, mixedCredentials.length);
+
+  for (const credential of credentials) {
+    t.true(
+      startProxyExports.ALWAYS_ENABLED_REGISTRY_TYPE.some(
+        (ty) => ty === credential.type,
+      ),
+    );
+  }
 });
 
-test("getCredentials returns no credentials for Actions when using NEW_LANGUAGE_TO_REGISTRY_TYPE", async (t) => {
-  const credentialsInput = toEncodedJSON(mixedCredentials);
+test("getCredentials always returns ALWAYS_ENABLED_REGISTRY_TYPE credentials for all languages", async (t) => {
+  const alwaysEnabledCredentials: startProxyExports.Credential[] = [];
 
-  const credentials = startProxyExports.getCredentials(
-    getRunnerLogger(true),
-    undefined,
-    credentialsInput,
-    BuiltInLanguage.actions,
-    true,
-  );
-  t.deepEqual(credentials, []);
+  for (const alwaysEnabled of startProxyExports.ALWAYS_ENABLED_REGISTRY_TYPE) {
+    alwaysEnabledCredentials.push({
+      type: alwaysEnabled,
+      host: `host-${alwaysEnabled}`,
+      token: `bar-${alwaysEnabled}`,
+      url: `url-${alwaysEnabled}`,
+    });
+  }
+
+  const credentialsInput = toEncodedJSON(alwaysEnabledCredentials);
+
+  // Test all languages.
+  for (const language of Object.values(BuiltInLanguage)) {
+    const credentials = startProxyExports.getCredentials(
+      getRunnerLogger(true),
+      undefined,
+      credentialsInput,
+      language,
+    );
+
+    t.deepEqual(credentials, alwaysEnabledCredentials);
+  }
 });
 
 function mockGetApiClient(endpoints: any) {
diff --git a/src/start-proxy.ts b/src/start-proxy.ts
index d6111510f6..caa1b3054a 100644
--- a/src/start-proxy.ts
+++ b/src/start-proxy.ts
@@ -83,12 +83,6 @@ export class StartProxyError extends Error {
   }
 }
 
-interface StartProxyStatus extends StatusReportBase {
-  // A comma-separated list of registry types which are configured for CodeQL.
-  // This only includes registry types we support, not all that are configured.
-  registry_types: string;
-}
-
 /**
  * Sends a status report for the `start-proxy` action indicating a successful outcome.
  *
@@ -112,7 +106,7 @@ export async function sendSuccessStatusReport(
     logger,
   );
   if (statusReportBase !== undefined) {
-    const statusReport: StartProxyStatus = {
+    const statusReport: StatusReportBase = {
       ...statusReportBase,
       registry_types: registry_types.join(","),
     };
@@ -187,19 +181,19 @@ function isPAT(value: string) {
   ]);
 }
 
-type RegistryMapping = Partial>;
+/**
+ * A list of always-enabled registry types. The registry types in this list are always
+ * enabled, because generic CodeQL workflow components may use them rather than just
+ * language-specific components.
+ */
+export const ALWAYS_ENABLED_REGISTRY_TYPE = [
+  "git_source",
+  "docker_registry",
+] as const;
 
-const LANGUAGE_TO_REGISTRY_TYPE: RegistryMapping = {
-  java: ["maven_repository"],
-  csharp: ["nuget_feed"],
-  javascript: ["npm_registry"],
-  python: ["python_index"],
-  ruby: ["rubygems_server"],
-  rust: ["cargo_registry"],
-  go: ["goproxy_server", "git_source"],
-} as const;
+type RegistryMapping = Partial>;
 
-const NEW_LANGUAGE_TO_REGISTRY_TYPE: Required = {
+export const LANGUAGE_TO_REGISTRY_TYPE: Required = {
   actions: [],
   cpp: [],
   java: ["maven_repository"],
@@ -243,21 +237,19 @@ function getRegistryAddress(
   }
 }
 
-// getCredentials returns registry credentials from action inputs.
-// It prefers `registries_credentials` over `registry_secrets`.
-// If neither is set, it returns an empty array.
+/**
+ * Returns registry credentials from action inputs.
+ * It prefers `registriesCredentials` over `registrySecrets`.
+ * If neither is set, it returns an empty array.
+ */
 export function getCredentials(
   logger: Logger,
   registrySecrets: string | undefined,
   registriesCredentials: string | undefined,
   language: BuiltInLanguage | undefined,
-  skipUnusedRegistries: boolean = false,
 ): Credential[] {
-  const registryMapping = skipUnusedRegistries
-    ? NEW_LANGUAGE_TO_REGISTRY_TYPE
-    : LANGUAGE_TO_REGISTRY_TYPE;
   const registryTypeForLanguage = language
-    ? registryMapping[language]
+    ? LANGUAGE_TO_REGISTRY_TYPE[language]
     : undefined;
 
   let credentialsStr: string;
@@ -305,8 +297,11 @@ export function getCredentials(
     const address = getRegistryAddress(e);
 
     // Filter credentials based on language if specified. `type` is the registry type.
-    // E.g., "maven_feed" for Java/Kotlin, "nuget_repository" for C#.
+    // E.g., "maven_repository" for Java/Kotlin, "nuget_feed" for C#.
+    // We always allow types in `ALWAYS_ENABLED_REGISTRY_TYPE` since they can be used by
+    // other parts of the workflow.
     if (
+      !ALWAYS_ENABLED_REGISTRY_TYPE.some((t) => t === e.type) &&
       registryTypeForLanguage &&
       !registryTypeForLanguage.some((t) => t === e.type)
     ) {
diff --git a/src/start-proxy/types.ts b/src/start-proxy/types.ts
index 13a4ce0e8f..17803e9126 100644
--- a/src/start-proxy/types.ts
+++ b/src/start-proxy/types.ts
@@ -12,7 +12,7 @@ export type RawCredential = UnvalidatedObject;
 /** A schema for credential objects with a username. */
 export const usernameSchema = {
   /** The username needed to authenticate to the package registry, if any. */
-  username: json.optional(json.string),
+  username: json.optionalOrNull(json.string),
 } as const satisfies json.Schema;
 
 /** Usernames may be present for both authentication with tokens or passwords. */
@@ -29,7 +29,7 @@ export function hasUsername(config: AuthConfig): config is Username {
 /** A schema for credential objects with a username and password. */
 export const usernamePasswordSchema = {
   /** The password needed to authenticate to the package registry, if any. */
-  password: json.optional(json.string),
+  password: json.optionalOrNull(json.string),
   ...usernameSchema,
 } as const satisfies json.Schema;
 
@@ -52,7 +52,7 @@ export function hasUsernameAndPassword(
 /** A schema for credential objects for token-based authentication. */
 export const tokenSchema = {
   /** The token needed to authenticate to the package registry, if any. */
-  token: json.optional(json.string),
+  token: json.optionalOrNull(json.string),
   ...usernameSchema,
 } as const satisfies json.Schema;
 
@@ -100,7 +100,7 @@ export const awsConfigSchema = {
   "role-name": json.string,
   domain: json.string,
   "domain-owner": json.string,
-  audience: json.optional(json.string),
+  audience: json.optionalOrNull(json.string),
 } as const satisfies json.Schema;
 
 /** Configuration for AWS OIDC. */
@@ -116,8 +116,8 @@ export function isAWSConfig(
 /** A schema for JFrog OIDC configurations. */
 export const jfrogConfigSchema = {
   "jfrog-oidc-provider-name": json.string,
-  audience: json.optional(json.string),
-  "identity-mapping-name": json.optional(json.string),
+  audience: json.optionalOrNull(json.string),
+  "identity-mapping-name": json.optionalOrNull(json.string),
 } as const satisfies json.Schema;
 
 /** Configuration for JFrog OIDC. */
@@ -150,8 +150,8 @@ export function isCloudsmithConfig(
 /** A schema for GCP OIDC configurations. */
 export const gcpConfigSchema = {
   "workload-identity-provider": json.string,
-  "service-account": json.optional(json.string),
-  audience: json.optional(json.string),
+  "service-account": json.optionalOrNull(json.string),
+  audience: json.optionalOrNull(json.string),
 } as const satisfies json.Schema;
 
 /** Configuration for GCP OIDC. */
@@ -254,13 +254,19 @@ export function credentialToStr(credential: Credential): string {
   return result;
 }
 
-/** A package registry is identified by its type and address. */
-export type Registry = {
+/** The schema for `RegistryBase` objects. */
+export const registryBaseSchema = {
   /** The type of the package registry. */
-  type: string;
+  type: json.string,
   /** Whether the registry replaces the base registry for the ecosystem. */
-  "replaces-base"?: boolean;
-} & Address;
+  "replaces-base": json.optional(json.boolean),
+} as const satisfies json.Schema;
+
+/** Information about a registry, other than its address. */
+export type RegistryBase = json.FromSchema;
+
+/** A package registry is identified by its type and address. */
+export type Registry = RegistryBase & Address;
 
 // If a registry has an `url`, then that takes precedence over the `host` which may or may
 // not be defined.
diff --git a/src/status-report.test.ts b/src/status-report.test.ts
index 52132b7649..2b763da700 100644
--- a/src/status-report.test.ts
+++ b/src/status-report.test.ts
@@ -1,17 +1,21 @@
 import test from "ava";
 import * as sinon from "sinon";
+import * as uuid from "uuid";
 
 import * as actionsUtil from "./actions-util";
 import { Config } from "./config-utils";
-import { EnvVar } from "./environment";
+import { EnvVar, RegistryProxyVars } from "./environment";
 import { BuiltInLanguage } from "./languages";
 import { getRunnerLogger } from "./logging";
 import { ToolsSource } from "./setup-codeql";
+import type { Registry } from "./start-proxy";
 import {
   ActionName,
   createInitWithConfigStatusReport,
   createStatusReportBase,
   getActionsStatus,
+  getRegistryTypesFromEnv,
+  getJobUUID,
   InitStatusReport,
   InitWithConfigStatusReport,
 } from "./status-report";
@@ -20,11 +24,106 @@ import {
   setupActionsVars,
   createTestConfig,
   makeMacro,
+  getTestEnv,
+  RecordingLogger,
+  callee,
 } from "./testing-utils";
 import { BuildMode, ConfigurationError, withTmpDir, wrapError } from "./util";
 
 setupTests(test);
 
+test("getRegistryTypesFromEnv - gets unique registry types from environment", async (t) => {
+  const logger = new RecordingLogger(true);
+  const env = getTestEnv({
+    [RegistryProxyVars.PROXY_URLS]: JSON.stringify([
+      { type: "git_source", url: "https://example.com" },
+      { type: "git_source", url: "https://github.com" },
+      { type: "docker_registry", url: "https://registry.example.com" },
+    ] satisfies Array>),
+  });
+
+  const result = getRegistryTypesFromEnv(logger, env);
+  t.deepEqual(result, ["git_source", "docker_registry"].sort().join(","));
+});
+
+test("getRegistryTypesFromEnv - returns undefined if the env var is not set", async (t) => {
+  const logger = new RecordingLogger(true);
+  const env = getTestEnv({});
+
+  const result = getRegistryTypesFromEnv(logger, env);
+  t.is(result, undefined);
+});
+
+test("getRegistryTypesFromEnv - returns undefined if the env var is not valid JSON", async (t) => {
+  const logger = new RecordingLogger(true);
+  const env = getTestEnv({ [RegistryProxyVars.PROXY_URLS]: "[" });
+
+  const result = getRegistryTypesFromEnv(logger, env);
+  t.is(result, undefined);
+});
+
+test("getRegistryTypesFromEnv - returns undefined if the env var is unexpected JSON", async (t) => {
+  const logger = new RecordingLogger(true);
+
+  t.is(
+    getRegistryTypesFromEnv(
+      logger,
+      getTestEnv({
+        // Top-level object rather than an array of objects.
+        [RegistryProxyVars.PROXY_URLS]: JSON.stringify({ type: "git_source" }),
+      }),
+    ),
+    undefined,
+  );
+  t.is(
+    getRegistryTypesFromEnv(
+      logger,
+      getTestEnv({
+        // Object has no "type" key.
+        [RegistryProxyVars.PROXY_URLS]: JSON.stringify([{}]),
+      }),
+    ),
+    undefined,
+  );
+});
+
+test("getJobUUID - generates valid UUIDs", async (t) => {
+  await callee(getJobUUID)
+    .withArgs()
+    .logs(t, "Job run UUID is ")
+    .hasEnv(t, (val) => {
+      return {
+        [EnvVar.JOB_RUN_UUID]: val,
+      };
+    })
+    .passes((val) => {
+      t.true(uuid.validate(val));
+    });
+});
+
+test("getJobUUID - retrieves existing job UUIDs", async (t) => {
+  const existingJobUuid = uuid.v4();
+  await callee(getJobUUID)
+    .withArgs()
+    .withEnv((env) => {
+      env.set(EnvVar.JOB_RUN_UUID, existingJobUuid);
+    })
+    .logs(t, `Existing job run UUID is ${existingJobUuid}.`)
+    .passes(t.deepEqual, existingJobUuid);
+});
+
+test("getJobUUID - doesn't retrieve invalid UUIDs", async (t) => {
+  const existingJobUuid = "not-a-uuid";
+  await callee(getJobUUID)
+    .withArgs()
+    .withEnv((env) => {
+      env.set(EnvVar.JOB_RUN_UUID, existingJobUuid);
+    })
+    .logs(t, `Job run UUID is `)
+    .notLogs(t, `Existing job run UUID is ${existingJobUuid}.`)
+    .passes(t.notDeepEqual, existingJobUuid);
+});
+
 function setupEnvironmentAndStub(tmpDir: string) {
   setupActionsVars(tmpDir, tmpDir, {
     GITHUB_EVENT_NAME: "dynamic",
@@ -34,6 +133,9 @@ function setupEnvironmentAndStub(tmpDir: string) {
 
   process.env[EnvVar.ANALYSIS_KEY] = "analysis-key";
   process.env["ImageVersion"] = "2023.05.19.1";
+  process.env[RegistryProxyVars.PROXY_URLS] = JSON.stringify([
+    { type: "maven_repository" },
+  ] satisfies Array>);
 
   const getRequiredInput = sinon.stub(actionsUtil, "getRequiredInput");
   getRequiredInput.withArgs("matrix").resolves("input/matrix");
@@ -71,11 +173,13 @@ test.serial("createStatusReportBase", async (t) => {
       t.is(statusReport.build_mode, BuildMode.None);
       t.is(statusReport.cause, "failure cause");
       t.is(statusReport.commit_oid, process.env["GITHUB_SHA"]!);
+      t.deepEqual(statusReport.computed_inputs, {});
       t.is(statusReport.exception, "exception stack trace");
       t.is(statusReport.job_name, process.env["GITHUB_JOB"] || "");
       t.is(typeof statusReport.job_run_uuid, "string");
       t.is(statusReport.languages, "java,swift");
       t.is(statusReport.ref, process.env["GITHUB_REF"]!);
+      t.is(statusReport.registry_types, "maven_repository");
       t.is(statusReport.runner_available_disk_space_bytes, 100);
       t.is(statusReport.runner_image_version, process.env["ImageVersion"]);
       t.is(statusReport.runner_os, process.env["RUNNER_OS"]!);
diff --git a/src/status-report.ts b/src/status-report.ts
index b3e3628b36..b471bfa971 100644
--- a/src/status-report.ts
+++ b/src/status-report.ts
@@ -1,7 +1,9 @@
 import * as os from "os";
 
 import * as core from "@actions/core";
+import * as uuid from "uuid";
 
+import type { ActionState } from "./action-common";
 import {
   getWorkflowEventName,
   getOptionalInput,
@@ -12,15 +14,19 @@ import {
   isSelfHostedRunner,
 } from "./actions-util";
 import { getAnalysisKey, getApiClient } from "./api-client";
-import { parseRegistriesWithoutCredentials, type Config } from "./config-utils";
-import { DependencyCacheRestoreStatusReport } from "./dependency-caching";
+import type { Config } from "./config/action-config";
+import type { ComputedInput, InputName } from "./config/inputs";
+import { parseRegistriesWithoutCredentials } from "./config/pack-registries";
+import type { DependencyCacheRestoreStatusReport } from "./dependency-caching";
 import { DocUrl } from "./doc-url";
-import { EnvVar } from "./environment";
+import { EnvVar, getEnv, ReadOnlyEnv, RegistryProxyVars } from "./environment";
 import { getRef } from "./git-utils";
-import { Logger } from "./logging";
-import { OverlayBaseDatabaseDownloadStats } from "./overlay/caching";
+import * as json from "./json";
+import type { Logger } from "./logging";
+import type { OverlayBaseDatabaseDownloadStats } from "./overlay/caching";
 import { getRepositoryNwo } from "./repository";
-import { ToolsSource } from "./setup-codeql";
+import type { ToolsSource } from "./setup-codeql";
+import { registryBaseSchema } from "./start-proxy/types";
 import {
   ConfigurationError,
   getRequiredEnvParam,
@@ -46,6 +52,41 @@ export enum ActionName {
   UploadSarif = "upload-sarif",
 }
 
+/**
+ * Maps an `ActionName` to its display name. Usually that is the same, except
+ * for `ActionName.Analyze` where it is `"analyze"` instead of `"finish"`.
+ */
+export function getDisplayActionName(actionName: ActionName): string {
+  if (actionName === ActionName.Analyze) {
+    return "analyze";
+  }
+  return actionName;
+}
+
+/**
+ * Either creates a UUIDv4 for the analysis or retrieves an existing one from the
+ * environment and returns it.
+ * If a new UUID is generated, it is also exported as an environment variable.
+ */
+export function getJobUUID(
+  action: ActionState<["Logger", "ReadOnlyEnv", "Actions"]>,
+) {
+  // Check if we already have a UUID for the analysis and return it if so.
+  const existingJobRunUuid = action.env.getOptional(EnvVar.JOB_RUN_UUID);
+
+  if (existingJobRunUuid !== undefined && uuid.validate(existingJobRunUuid)) {
+    action.logger.info(`Existing job run UUID is ${existingJobRunUuid}.`);
+    return existingJobRunUuid;
+  }
+
+  // Otherwise generate a new UUID.
+  const jobRunUuid = uuid.v4();
+  action.logger.info(`Job run UUID is ${jobRunUuid}.`);
+
+  action.actions.exportVariable(EnvVar.JOB_RUN_UUID, jobRunUuid);
+  return jobRunUuid;
+}
+
 /**
  * @returns a boolean indicating whether the analysis is considered to be first party.
  *
@@ -110,6 +151,8 @@ export interface StatusReportBase {
   commit_oid: string;
   /** Time this action completed, or undefined if not yet completed. */
   completed_at?: string;
+  /** A mapping of input names to their computed values. */
+  computed_inputs: Partial>;
   /** Stack trace of the failure (or undefined if status is not failure). */
   exception?: string;
   /** Whether this is a first-party (CodeQL) run of the action. */
@@ -144,6 +187,12 @@ export interface StatusReportBase {
   ml_powered_javascript_queries?: string;
   /** Ref that the workflow was triggered on. */
   ref: string;
+  /**
+   * A comma-separated list of private registry types which are configured for CodeQL.
+   * This only includes registry types we support (as determined by the `start-proxy` action),
+   * not all that are configured.
+   */
+  registry_types?: string;
   /** Action runner hardware architecture (context runner.arch). */
   runner_arch?: string;
   /** Available disk space on the runner, in bytes. */
@@ -247,6 +296,50 @@ export interface EventReport {
   started_at: string;
 }
 
+/**
+ * Attempts to retrieve a list of private registry types from the `CODEQL_PROXY_URLS` environment
+ * variable and returns it as a comma-separated string if successful. Returns `undefined` otherwise.
+ */
+export function getRegistryTypesFromEnv(
+  logger: Logger,
+  env: ReadOnlyEnv = getEnv(),
+): string | undefined {
+  // Try to get the value of the environment variable.
+  const value = env.getOptional(RegistryProxyVars.PROXY_URLS);
+
+  if (value === undefined) {
+    return undefined;
+  }
+
+  // Try to parse the JSON we expect to find in it and return the comma-separated list of
+  // (unique) registry types.
+  try {
+    const data = JSON.parse(value) as unknown;
+
+    // Check that the parsed JSON meets our expectations.
+    if (!json.isArray(data)) {
+      logger.debug(
+        `Expected '${RegistryProxyVars.PROXY_URLS}' to contain a JSON array, but got '${typeof data}'.`,
+      );
+      return undefined;
+    }
+    if (!json.validateArray(registryBaseSchema, data)) {
+      logger.debug(
+        `Expected '${RegistryProxyVars.PROXY_URLS}' to contain a JSON array of registry objects, but got something else.`,
+      );
+      return undefined;
+    }
+
+    const types = new Set(data.map((r) => r.type));
+    return Array.from(types).sort().join(",");
+  } catch (err) {
+    logger.debug(
+      `Failed to parse '${RegistryProxyVars.PROXY_URLS}': ${getErrorMessage(err)}.`,
+    );
+    return undefined;
+  }
+}
+
 /**
  * Compose a StatusReport.
  *
@@ -304,10 +397,12 @@ export async function createStatusReportBase(
       analysis_key,
       build_mode: config?.buildMode,
       commit_oid: commitOid,
+      computed_inputs: {},
       first_party_analysis: isFirstPartyAnalysis(actionName),
       job_name: jobName,
       job_run_uuid: jobRunUUID,
       ref,
+      registry_types: getRegistryTypesFromEnv(logger),
       runner_os: runnerOs,
       started_at: workflowStartedAt,
       status,
diff --git a/src/tar.test.ts b/src/tar.test.ts
new file mode 100644
index 0000000000..48f4e866d3
--- /dev/null
+++ b/src/tar.test.ts
@@ -0,0 +1,33 @@
+import * as path from "path";
+import * as stream from "stream";
+
+import test from "ava";
+
+import { getRunnerLogger } from "./logging";
+import { extractTarZst } from "./tar";
+import { setupTests } from "./testing-utils";
+import { withTmpDir } from "./util";
+
+setupTests(test);
+
+test("extractTarZst rejects if the input stream errors", async (t) => {
+  await withTmpDir(async (tmpDir) => {
+    const archive = new stream.PassThrough();
+    const promise = extractTarZst(
+      archive,
+      path.join(tmpDir, "dest"),
+      { type: "gnu", version: "1.34" },
+      getRunnerLogger(true),
+    );
+
+    archive.destroy(
+      Object.assign(new Error("socket hang up"), {
+        code: "ECONNRESET",
+      }),
+    );
+
+    await t.throwsAsync(promise, {
+      message: /Error while downloading and extracting tar/,
+    });
+  });
+});
diff --git a/src/tar.ts b/src/tar.ts
index 723716b016..3a0d79cc64 100644
--- a/src/tar.ts
+++ b/src/tar.ts
@@ -194,10 +194,15 @@ export async function extractTarZst(
       });
 
       if (tar instanceof stream.Readable) {
-        tar.pipe(tarProcess.stdin).on("error", (err) => {
-          reject(
-            new Error(`Error while downloading and extracting tar: ${err}`),
-          );
+        // Use `pipeline` rather than `pipe` so that an error on either stream is reported here
+        // rather than being emitted as an unhandled `error` event, and so that `tar`'s standard
+        // input is closed if the download fails partway through.
+        stream.pipeline(tar, tarProcess.stdin, (err) => {
+          if (err) {
+            reject(
+              new Error(`Error while downloading and extracting tar: ${err}`),
+            );
+          }
         });
       }
 
diff --git a/src/testing-utils.ts b/src/testing-utils.ts
index 1702d6835a..279459275d 100644
--- a/src/testing-utils.ts
+++ b/src/testing-utils.ts
@@ -3,6 +3,8 @@ import path from "path";
 
 import * as github from "@actions/github";
 import test, {
+  type ThrownError,
+  type ThrowsExpectation,
   type ExecutionContext,
   type MacroDeclarationOptions,
   type TestFn,
@@ -10,7 +12,8 @@ import test, {
 import nock from "nock";
 import * as sinon from "sinon";
 
-import { getActionVersion } from "./actions-util";
+import { ActionState, StateFeature } from "./action-common";
+import { ActionsEnv, getActionVersion } from "./actions-util";
 import { AnalysisKind } from "./analyses";
 import * as apiClient from "./api-client";
 import { GitHubApiDetails } from "./api-client";
@@ -18,6 +21,7 @@ import { CachingKind } from "./caching-utils";
 import * as codeql from "./codeql";
 import { Config } from "./config-utils";
 import * as defaults from "./defaults.json";
+import { Env, ActionsEnvVars } from "./environment";
 import {
   CodeQLDefaultVersionInfo,
   Feature,
@@ -26,13 +30,18 @@ import {
 } from "./feature-flags";
 import { Logger } from "./logging";
 import { OverlayDatabaseMode } from "./overlay/overlay-database-mode";
+import { ActionName } from "./status-report";
 import {
   DEFAULT_DEBUG_ARTIFACT_NAME,
   DEFAULT_DEBUG_DATABASE_NAME,
+  Failure,
+  getEnv,
   GitHubVariant,
   GitHubVersion,
   HTTPError,
   resetCachedCodeQlVersion,
+  Result,
+  Success,
 } from "./util";
 
 export const SAMPLE_DOTCOM_API_DETAILS = {
@@ -172,6 +181,365 @@ export function makeMacro(
   return wrapper;
 }
 
+export function getTestEnv(testEnv: NodeJS.ProcessEnv = {}): Env {
+  return getEnv(testEnv);
+}
+
+/** An implementation of `ActionsEnv` for use in tests. */
+class TestActionsEnv implements ActionsEnv {
+  constructor(private readonly env: Env) {}
+
+  public clone(env: Env): this {
+    return Object.create(this, { env: { value: env } }) as this;
+  }
+
+  public getRequiredInput(name: string): string {
+    throw new Error(`Input required and not supplied: ${name}`);
+  }
+
+  public getOptionalInput(_name: string): string | undefined {
+    return undefined;
+  }
+
+  public exportVariable(name: string, value: string): void {
+    this.env.set(name, value);
+  }
+}
+
+/**
+ * Gets an `ActionsEnv` instance for use in tests.
+ */
+export function getTestActionsEnv(env: Env): TestActionsEnv {
+  return new TestActionsEnv(env);
+}
+
+/** For testing purposes, we make all available state features accessible in `TestEnv`. */
+type AllState = [
+  "Base",
+  "Logger",
+  "Env",
+  "ReadOnlyEnv",
+  "Actions",
+  "Api",
+  "FeatureFlags",
+];
+
+/** Initialise a fresh `ActionState` value. */
+export function initAllState(
+  overrides?: Partial>,
+): ActionState {
+  const env = getTestEnv();
+  return {
+    name: ActionName.Init,
+    startedAt: new Date(),
+    logger: new RecordingLogger(),
+    env,
+    actions: getTestActionsEnv(env),
+    apiClient: github.getOctokit("123"),
+    features: createFeatures([]),
+    ...overrides,
+  };
+}
+
+type DelayedCheck<
+  Args extends readonly any[],
+  R,
+  Fs extends ReadonlyArray,
+> = (
+  env: Readonly>,
+  result: Result, ThrownError>,
+) => Promise;
+
+export type Mutation = (val: T) => void;
+export type ValueOrMutation = T | Mutation;
+
+/**
+ * Wraps a function that accepts an `ActionState` for testing in different environments.
+ */
+abstract class BaseEnvBuilder<
+  Args extends readonly any[],
+  R,
+  Fs extends ReadonlyArray,
+> {
+  protected readonly fn: (state: ActionState, ...args: Args) => R;
+  private logger: RecordingLogger;
+  private actions: TestActionsEnv;
+  protected state: ActionState;
+  protected checks: Array>;
+
+  constructor(
+    fn: (state: ActionState, ...args: Args) => R,
+    cloneFrom?: BaseEnvBuilder,
+  ) {
+    this.fn = fn;
+    this.logger = new RecordingLogger();
+
+    if (cloneFrom !== undefined) {
+      const env = cloneFrom.state.env.clone();
+      this.actions = cloneFrom.actions.clone(env);
+      this.state = {
+        ...cloneFrom.state,
+        env,
+        actions: this.actions,
+        logger: this.logger,
+      } satisfies ActionState;
+    } else {
+      const env = getTestEnv();
+      this.actions = getTestActionsEnv(env);
+      this.state = initAllState({
+        logger: this.logger,
+        env,
+        actions: this.actions,
+      });
+    }
+
+    this.checks = [...(cloneFrom?.checks ?? [])];
+  }
+
+  /**
+   * Creates a clone of this object. Used internally.
+   * Must be overridden by subclasses.
+   */
+  protected abstract clone(): this;
+
+  public getLogger(): RecordingLogger {
+    return this.logger;
+  }
+
+  public getState(): ActionState {
+    return this.state;
+  }
+
+  public withArgs(...args: Args): CallableEnvBuilder {
+    const result = new CallableEnvBuilder(this.fn, args, this.clone());
+    return result;
+  }
+
+  public withFeatures(enabled: Feature[]): this {
+    const result = this.clone();
+    result.state.features = createFeatures(enabled);
+    return result;
+  }
+
+  /**
+   * Sets environment variables that are always available to GitHub Actions,
+   * excluding some that are expected to be set to paths.
+   *
+   * @param overrides Overrides for the defaults.
+   */
+  public withDefaultActionsEnv(overrides?: ActionVarOverrides): this {
+    const result = this.clone();
+    setupBaseActionsVars(overrides, result.state.env);
+    return result;
+  }
+
+  /**
+   * Sets environment variables that are always available to GitHub Actions.
+   * @param tempDir A value for `RUNNER_TEMP` and `GITHUB_WORKSPACE`.
+   * @param toolsDir A value for `RUNNER_TOOL_CACHE`.
+   * @param overrides Overrides for the defaults.
+   */
+  public withActionsEnv(
+    tempDir: string,
+    toolsDir: string,
+    overrides?: ActionVarOverrides,
+  ): this {
+    const result = this.clone();
+    setupActionsVars(tempDir, toolsDir, overrides, result.state.env);
+    return result;
+  }
+
+  public withEnv(arg: ValueOrMutation): this {
+    const result = this.clone();
+    if (typeof arg === "function") {
+      arg(result.state.env);
+    } else {
+      result.state.env = arg;
+    }
+    return result;
+  }
+
+  /** Applies `fn` to the `ActionsEnv`. */
+  public withActions(fn: Mutation): this {
+    const result = this.clone();
+    fn(result.state.actions);
+    return result;
+  }
+
+  /**
+   * Adds a delayed check that `messages` are logged. The check will be
+   * performed after the main assertion passes.
+   */
+  public logs(t: ExecutionContext, ...messages: string[]): this {
+    const result = this.clone();
+    result.checks.push(async (env) => {
+      checkExpectedLogMessages(t, env.getLogger().messages, messages);
+    });
+    return result;
+  }
+
+  /**
+   * Adds a delayed check that the environment variables returned by `fn`
+   * are present in the environment after the main assertion passes.
+   */
+  public hasEnv(
+    t: ExecutionContext,
+    fn: (
+      value: Awaited | undefined,
+      error: ThrownError | undefined,
+    ) => Record,
+  ): this {
+    const result = this.clone();
+    result.checks.push(async (env, r) => {
+      const value = r.orElse(undefined);
+      const error = r.isFailure() ? r.value : undefined;
+      const expected = fn(value, error);
+
+      t.like(env.getState().env.get(), expected);
+    });
+    return result;
+  }
+
+  /**
+   * Adds a delayed check that `messages` are not logged. The check will be
+   * performed after the main assertion passes.
+   */
+  public notLogs(t: ExecutionContext, ...messages: string[]): this {
+    const result = this.clone();
+    result.checks.push(async (env) => {
+      checkUnexpectedLogMessages(t, env.getLogger().messages, messages);
+    });
+    return result;
+  }
+}
+
+class EnvBuilder<
+  Args extends readonly any[],
+  R,
+  Fs extends ReadonlyArray,
+> extends BaseEnvBuilder {
+  protected clone(): this {
+    return new EnvBuilder(this.fn, this) as this;
+  }
+}
+
+export interface PassedAssertion {
+  result: Awaited;
+  assertionResult: T;
+}
+
+/**
+ * A more minimal, exported interface for `CallableEnvBuilder`. This makes it easier to
+ * define helper functions in tests which expect a value of a compatible type.
+ */
+export interface AssertableTarget {
+  passes(
+    assertion: (val: Awaited, ...assertionArgs: AArgs) => AResult,
+    ...assertionArgs: AArgs
+  ): Promise>;
+
+  throws(
+    t: ExecutionContext,
+    expectations?: ThrowsExpectation,
+  ): Promise>;
+}
+
+class CallableEnvBuilder<
+    Args extends readonly any[],
+    R,
+    Fs extends ReadonlyArray,
+  >
+  extends BaseEnvBuilder
+  implements AssertableTarget
+{
+  private args: Args;
+
+  constructor(
+    fn: (state: ActionState, ...args: Args) => R,
+    args: Args,
+    cloneFrom?: BaseEnvBuilder,
+  ) {
+    super(fn, cloneFrom);
+    this.args = args;
+  }
+
+  protected clone(): this {
+    return new CallableEnvBuilder(this.fn, this.args, this) as this;
+  }
+
+  public getArgs(): Args {
+    return this.args;
+  }
+
+  call(): R {
+    return this.fn(this.state as unknown as ActionState, ...this.args);
+  }
+
+  /**
+   * Calls the underlying function in the configured environment and passes
+   * the result to `assertion` along with extra `assertionArgs`.
+   *
+   * @param assertion The assertion to apply to the result.
+   * @param assertionArgs Extra arguments for the assertion.
+   * @returns The result of the assertion.
+   */
+  public async passes(
+    assertion: (val: Awaited, ...assertionArgs: AArgs) => AResult,
+    ...assertionArgs: AArgs
+  ): Promise> {
+    // this.call() may or may not return a promise,
+    // `Promise.resolve` turns the result into one if it isn't already,
+    // and we then await it. That ensures that `result` is an `Awaited`.
+    const result = await Promise.resolve(this.call());
+
+    // Run the main assertion on the `result`.
+    const assertionResult = await assertion(result, ...assertionArgs);
+
+    // Run other delayed checks.
+    for (const delayedCheck of this.checks) {
+      await delayedCheck(this, new Success(result));
+    }
+
+    // Return the results of the function call and the main assertion.
+    return { result, assertionResult };
+  }
+
+  /**
+   * Asserts that calling the underlying function should throw an exception.
+   *
+   * @param t The execution context for the assertion.
+   * @param expectations Expectations for the error.
+   * @returns The error that was thrown.
+   */
+  public async throws(
+    t: ExecutionContext,
+    expectations?: ThrowsExpectation,
+  ): Promise> {
+    // Run the main assertion.
+    const error = await t.throwsAsync(
+      async () => Promise.resolve(this.call()),
+      expectations,
+    );
+
+    // Run other delayed checks.
+    for (const delayedCheck of this.checks) {
+      await delayedCheck(this, new Failure(error));
+    }
+
+    // Return the error.
+    return error;
+  }
+}
+
+/** Utility function to construct a `TestEnv`. */
+export function callee<
+  Args extends readonly any[],
+  R,
+  Fs extends readonly StateFeature[],
+>(fn: (state: ActionState, ...args: Args) => R): EnvBuilder {
+  return new EnvBuilder(fn);
+}
+
 /**
  * Default values for environment variables typically set in an Actions
  * environment. Tests can override individual variables by passing them in the
@@ -191,7 +559,7 @@ export const DEFAULT_ACTIONS_VARS = {
   GITHUB_WORKFLOW: "test-workflow",
   RUNNER_NAME: "my-runner",
   RUNNER_OS: "Linux",
-} as const satisfies Record;
+} as const satisfies Partial>;
 
 /** Partial mappings from GitHub Actions environment variables to values. */
 export type ActionVarOverrides = Partial<
@@ -203,11 +571,15 @@ export type ActionVarOverrides = Partial<
  * excluding some that are expected to be set to paths. See `setupActionsVars`.
  *
  * @param overrides Overrides for the defaults.
+ * @param env The environment to set the variables for.
  */
-export function setupBaseActionsVars(overrides?: ActionVarOverrides) {
+export function setupBaseActionsVars(
+  overrides?: ActionVarOverrides,
+  env: Env = getEnv(),
+) {
   const vars = { ...DEFAULT_ACTIONS_VARS, ...overrides };
   for (const [key, value] of Object.entries(vars)) {
-    process.env[key] = value;
+    env.set(key, value);
   }
 }
 
@@ -217,16 +589,18 @@ export function setupBaseActionsVars(overrides?: ActionVarOverrides) {
  * @param tempDir A value for `RUNNER_TEMP` and `GITHUB_WORKSPACE`.
  * @param toolsDir A value for `RUNNER_TOOL_CACHE`.
  * @param overrides Overrides for the defaults.
+ * @param env The environment to set the variables for.
  */
 export function setupActionsVars(
   tempDir: string,
   toolsDir: string,
   overrides?: ActionVarOverrides,
+  env: Env = getEnv(),
 ) {
-  setupBaseActionsVars(overrides);
-  process.env["RUNNER_TEMP"] = tempDir;
-  process.env["RUNNER_TOOL_CACHE"] = toolsDir;
-  process.env["GITHUB_WORKSPACE"] = tempDir;
+  setupBaseActionsVars(overrides, env);
+  env.set(ActionsEnvVars.RUNNER_TEMP, tempDir);
+  env.set(ActionsEnvVars.RUNNER_TOOL_CACHE, toolsDir);
+  env.set(ActionsEnvVars.GITHUB_WORKSPACE, tempDir);
 }
 
 type LogLevel = "debug" | "info" | "warning" | "error";
@@ -360,6 +734,34 @@ export function checkExpectedLogMessages(
   }
 }
 
+/**
+ * Checks that `messages` contains none of `unexpectedMessages`.
+ */
+export function checkUnexpectedLogMessages(
+  t: ExecutionContext,
+  messages: LoggedMessage[],
+  unexpectedMessages: string[],
+) {
+  const presentMessages: string[] = [];
+
+  for (const unexpectedMessage of unexpectedMessages) {
+    if (hasLoggedMessage(messages, unexpectedMessage)) {
+      presentMessages.push(unexpectedMessage);
+    }
+  }
+
+  if (presentMessages.length > 0) {
+    const listify = (lines: string[]) =>
+      lines.map((m) => ` - '${m}'`).join("\n");
+
+    t.fail(
+      `Did not expect\n\n${listify(presentMessages)}\n\nin the logger output, but found them in:\n\n${messages.map((m) => ` - '${m.message}'`).join("\n")}`,
+    );
+  } else {
+    t.pass();
+  }
+}
+
 /**
  * Asserts that `message` should not have been logged to `logger`.
  */
diff --git a/src/tools-download.test.ts b/src/tools-download.test.ts
new file mode 100644
index 0000000000..66fe0e72e4
--- /dev/null
+++ b/src/tools-download.test.ts
@@ -0,0 +1,115 @@
+import { once } from "events";
+import * as path from "path";
+
+import * as toolcache from "@actions/tool-cache";
+import test from "ava";
+import nock from "nock";
+import * as sinon from "sinon";
+
+import { getRunnerLogger } from "./logging";
+import * as tar from "./tar";
+import { setupTests } from "./testing-utils";
+import { downloadAndExtract } from "./tools-download";
+import { withTmpDir } from "./util";
+
+setupTests(test);
+
+test.serial(
+  "downloadAndExtract reports the duration when downloading before extracting",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      const archivePath = path.join(tmpDir, "codeql-bundle.tar.gz");
+      const destination = path.join(tmpDir, "codeql");
+      sinon.stub(toolcache, "downloadTool").resolves(archivePath);
+      sinon.stub(tar, "extract").resolves(destination);
+
+      const statusReport = await downloadAndExtract(
+        "https://example.com/codeql-bundle.tar.gz",
+        "gzip",
+        destination,
+        undefined,
+        {},
+        undefined,
+        getRunnerLogger(true),
+      );
+
+      t.assert(Number.isInteger(statusReport.downloadDurationMs));
+    });
+  },
+);
+
+test.serial(
+  "downloadAndExtract falls back to downloading before extracting if streaming fails",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      sinon.stub(process, "platform").value("linux");
+      const archivePath = path.join(tmpDir, "codeql-bundle.tar.zst");
+      const destination = path.join(tmpDir, "codeql");
+      const downloadTool = sinon
+        .stub(toolcache, "downloadTool")
+        .resolves(archivePath);
+      const extract = sinon.stub(tar, "extract").resolves(destination);
+      const extractTarZst = sinon.stub(tar, "extractTarZst").resolves();
+      const request = nock("https://example.com")
+        .get("/codeql-bundle.tar.zst")
+        .replyWithError(
+          Object.assign(new Error("socket hang up"), { code: "ECONNRESET" }),
+        );
+
+      const statusReport = await downloadAndExtract(
+        "https://example.com/codeql-bundle.tar.zst",
+        "zstd",
+        destination,
+        undefined,
+        {},
+        { type: "gnu", version: "1.34" },
+        getRunnerLogger(true),
+      );
+
+      t.assert(Number.isInteger(statusReport.downloadDurationMs));
+      t.true(request.isDone());
+      t.false(extractTarZst.called);
+      t.true(downloadTool.calledOnce);
+      t.true(extract.calledOnce);
+    });
+  },
+);
+
+test.serial(
+  "downloadAndExtract omits the download duration when streaming extraction",
+  async (t) => {
+    await withTmpDir(async (tmpDir) => {
+      sinon.stub(process, "platform").value("linux");
+      const downloadTool = sinon.stub(toolcache, "downloadTool");
+      const extractTarZst = sinon
+        .stub(tar, "extractTarZst")
+        .callsFake(async (archive) => {
+          if (typeof archive === "string") {
+            t.fail("Expected the Zstandard archive to be streamed.");
+            return;
+          }
+          const end = once(archive, "end");
+          archive.resume();
+          await end;
+        });
+      const request = nock("https://example.com")
+        .get("/codeql-bundle.tar.zst")
+        .reply(200, "archive");
+
+      const statusReport = await downloadAndExtract(
+        "https://example.com/codeql-bundle.tar.zst",
+        "zstd",
+        path.join(tmpDir, "codeql"),
+        undefined,
+        {},
+        { type: "gnu", version: "1.34" },
+        getRunnerLogger(true),
+      );
+
+      t.deepEqual(statusReport, {});
+      t.false(downloadTool.called);
+      t.true(extractTarZst.calledOnce);
+      t.true(request.isDone());
+    });
+  },
+);
diff --git a/src/tools-download.ts b/src/tools-download.ts
index 5d8a4c5fb9..9b2fa8723a 100644
--- a/src/tools-download.ts
+++ b/src/tools-download.ts
@@ -20,65 +20,19 @@ import { cleanUpPath, getErrorMessage, getRequiredEnvParam } from "./util";
 const STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // 4 MiB
 
 /**
- * The name of the tool cache directory for the CodeQL tools.
+ * How long the streaming download of the CodeQL tools may stall for before we abort it. This
+ * applies both to establishing the connection and to gaps between chunks of the response body.
  */
-const TOOLCACHE_TOOL_NAME = "CodeQL";
+const STREAMING_STALL_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
 
 /**
- * Timing information for the download and extraction of the CodeQL tools when
- * we fully download the bundle before extracting.
- */
-type DownloadFirstToolsDownloadDurations = {
-  combinedDurationMs: number;
-  downloadDurationMs: number;
-  extractionDurationMs: number;
-  streamExtraction: false;
-};
-
-function makeDownloadFirstToolsDownloadDurations(
-  downloadDurationMs: number,
-  extractionDurationMs: number,
-): DownloadFirstToolsDownloadDurations {
-  return {
-    combinedDurationMs: downloadDurationMs + extractionDurationMs,
-    downloadDurationMs,
-    extractionDurationMs,
-    streamExtraction: false,
-  };
-}
-
-/**
- * Timing information for the download and extraction of the CodeQL tools when
- * we stream the download and extraction of the bundle.
+ * The name of the tool cache directory for the CodeQL tools.
  */
-type StreamedToolsDownloadDurations = {
-  combinedDurationMs: number;
-  downloadDurationMs: undefined;
-  extractionDurationMs: undefined;
-  streamExtraction: true;
-};
-
-function makeStreamedToolsDownloadDurations(
-  combinedDurationMs: number,
-): StreamedToolsDownloadDurations {
-  return {
-    combinedDurationMs,
-    downloadDurationMs: undefined,
-    extractionDurationMs: undefined,
-    streamExtraction: true,
-  };
-}
-
-type ToolsDownloadDurations =
-  | DownloadFirstToolsDownloadDurations
-  | StreamedToolsDownloadDurations;
+const TOOLCACHE_TOOL_NAME = "CodeQL";
 
 export type ToolsDownloadStatusReport = {
-  cacheDurationMs?: number;
-  compressionMethod: tar.CompressionMethod;
-  toolsUrl: string;
-  zstdFailureReason?: string;
-} & ToolsDownloadDurations;
+  downloadDurationMs?: number;
+};
 
 export async function downloadAndExtract(
   codeqlURL: string,
@@ -116,11 +70,7 @@ export async function downloadAndExtract(
         )}).`,
       );
 
-      return {
-        compressionMethod,
-        toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
-        ...makeStreamedToolsDownloadDurations(combinedDurationMs),
-      };
+      return {};
     }
   } catch (e) {
     core.warning(
@@ -170,14 +120,7 @@ export async function downloadAndExtract(
     await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger);
   }
 
-  return {
-    compressionMethod,
-    toolsUrl: sanitizeUrlForStatusReport(codeqlURL),
-    ...makeDownloadFirstToolsDownloadDurations(
-      downloadDurationMs,
-      extractionDurationMs,
-    ),
-  };
+  return { downloadDurationMs };
 }
 
 async function downloadAndExtractZstdWithStreaming(
@@ -200,8 +143,8 @@ async function downloadAndExtractZstdWithStreaming(
     authorization ? { authorization } : {},
     headers,
   );
-  const response = await new Promise((resolve) =>
-    https.get(
+  const response = await new Promise((resolve, reject) => {
+    const request = https.get(
       codeqlURL,
       {
         headers,
@@ -211,10 +154,24 @@ async function downloadAndExtractZstdWithStreaming(
         agent,
       } as unknown as RequestOptions,
       (r) => resolve(r),
-    ),
-  );
+    );
+    // Without this listener, connection failures such as `ECONNRESET` are emitted as unhandled
+    // `error` events, which terminate the process instead of letting us fall back to downloading
+    // the bundle before extracting it. This listener stays attached after the response arrives, so
+    // it also handles errors that occur while the response is being streamed.
+    request.on("error", reject);
+    request.setTimeout(STREAMING_STALL_TIMEOUT_MS, () => {
+      request.destroy(
+        new Error(
+          `No data received for ${formatDuration(STREAMING_STALL_TIMEOUT_MS)}.`,
+        ),
+      );
+    });
+  });
 
   if (response.statusCode !== 200) {
+    // Discard the response body so that the connection can be released.
+    response.resume();
     throw new Error(
       `Failed to download CodeQL bundle from ${codeqlURL}. HTTP status code: ${response.statusCode}.`,
     );
@@ -241,11 +198,3 @@ export function writeToolcacheMarkerFile(
   fs.writeFileSync(markerFilePath, "");
   logger.info(`Created toolcache marker file ${markerFilePath}`);
 }
-
-function sanitizeUrlForStatusReport(url: string): string {
-  return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some(
-    (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`),
-  )
-    ? url
-    : "sanitized-value";
-}
diff --git a/src/trap-caching.test.ts b/src/trap-caching.test.ts
index 9805475796..478305e577 100644
--- a/src/trap-caching.test.ts
+++ b/src/trap-caching.test.ts
@@ -38,7 +38,7 @@ const stubCodeql = createStubCodeQL({
   async getVersion() {
     return makeVersionInfo("2.10.3");
   },
-  async betterResolveLanguages() {
+  async resolveLanguages() {
     return {
       extractors: {
         [BuiltInLanguage.javascript]: [
diff --git a/src/trap-caching.ts b/src/trap-caching.ts
index 216122d47e..a802aac892 100644
--- a/src/trap-caching.ts
+++ b/src/trap-caching.ts
@@ -280,7 +280,7 @@ export async function getLanguagesSupportingCaching(
   logger: Logger,
 ): Promise {
   const result: Language[] = [];
-  const resolveResult = await codeql.betterResolveLanguages();
+  const resolveResult = await codeql.resolveLanguages();
   outer: for (const lang of languages) {
     const extractorsForLanguage = resolveResult.extractors[lang];
     if (extractorsForLanguage === undefined) {
diff --git a/src/upload-lib.ts b/src/upload-lib.ts
index 83d1eaffb0..da5552cf24 100644
--- a/src/upload-lib.ts
+++ b/src/upload-lib.ts
@@ -140,7 +140,7 @@ async function combineSarifFilesUsingCLI(
 
   const config = await getConfig(tempDir, logger);
   if (config !== undefined) {
-    codeQL = await getCodeQL(config.codeQLCmd);
+    codeQL = await getCodeQL(logger, config.codeQLCmd);
     tempDir = config.tempDir;
   } else {
     logger.info(
diff --git a/src/upload-sarif-action.ts b/src/upload-sarif-action.ts
index bd190f0318..d3437510ce 100644
--- a/src/upload-sarif-action.ts
+++ b/src/upload-sarif-action.ts
@@ -1,17 +1,17 @@
 import * as core from "@actions/core";
 
+import { Action, ActionState, runInActions } from "./action-common";
 import * as actionsUtil from "./actions-util";
 import { getActionVersion, getTemporaryDirectory } from "./actions-util";
 import * as analyses from "./analyses";
 import { getGitHubVersion } from "./api-client";
 import { initFeatures } from "./feature-flags";
-import { Logger, getActionsLogger } from "./logging";
+import { Logger } from "./logging";
 import { getRepositoryNwo } from "./repository";
 import { InvalidSarifUploadError } from "./sarif";
 import {
   createStatusReportBase,
   sendStatusReport,
-  sendUnhandledErrorStatusReport,
   StatusReportBase,
   getActionsStatus,
   ActionName,
@@ -23,7 +23,6 @@ import {
   ConfigurationError,
   checkActionVersion,
   checkDiskUsage,
-  getErrorMessage,
   initializeEnvironment,
   shouldSkipSarifUpload,
   wrapError,
@@ -55,12 +54,9 @@ async function sendSuccessStatusReport(
   }
 }
 
-async function run(startedAt: Date) {
+async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
   // To capture errors appropriately, keep as much code within the try-catch as
   // possible, and only use safe functions outside.
-
-  const logger = getActionsLogger();
-
   try {
     initializeEnvironment(getActionVersion());
 
@@ -165,20 +161,12 @@ async function run(startedAt: Date) {
   }
 }
 
+/** Defines the `upload-sarif` Action. */
+const uploadSarif: Action = {
+  name: ActionName.UploadSarif,
+  run,
+};
+
 export async function runWrapper() {
-  const startedAt = new Date();
-  const logger = getActionsLogger();
-  try {
-    await run(startedAt);
-  } catch (error) {
-    core.setFailed(
-      `codeql/upload-sarif action failed: ${getErrorMessage(error)}`,
-    );
-    await sendUnhandledErrorStatusReport(
-      ActionName.UploadSarif,
-      startedAt,
-      error,
-      logger,
-    );
-  }
+  await runInActions(uploadSarif);
 }
diff --git a/src/util.ts b/src/util.ts
index 200d68d2c2..b7d27afae3 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -13,11 +13,14 @@ import * as apiCompatibility from "./api-compatibility.json";
 import type { CodeQL, VersionInfo } from "./codeql";
 import type { Pack } from "./config/db-config";
 import type { Config } from "./config-utils";
-import { EnvVar } from "./environment";
+import { EnvVar, getRequiredEnvParam } from "./environment";
 import * as json from "./json";
 import { Language } from "./languages";
 import { Logger } from "./logging";
 
+// Re-export for backwards compatibility to avoid updating a lot of imports elsewhere.
+export { getRequiredEnvParam, getOptionalEnvVar, getEnv } from "./environment";
+
 /**
  * The name of the file containing the base database OIDs, as stored in the
  * root of the database location.
@@ -566,28 +569,6 @@ export function initializeEnvironment(version: string) {
   core.exportVariable(EnvVar.VERSION, version);
 }
 
-/**
- * Get an environment parameter, but throw an error if it is not set.
- */
-export function getRequiredEnvParam(paramName: string): string {
-  const value = process.env[paramName];
-  if (value === undefined || value.length === 0) {
-    throw new Error(`${paramName} environment variable must be set`);
-  }
-  return value;
-}
-
-/**
- * Get an environment variable, but return `undefined` if it is not set or empty.
- */
-export function getOptionalEnvVar(paramName: string): string | undefined {
-  const value = process.env[paramName];
-  if (value?.trim().length === 0) {
-    return undefined;
-  }
-  return value;
-}
-
 export class HTTPError extends Error {
   public status: number;
 
@@ -712,7 +693,13 @@ export function getBaseDatabaseOidsFilePath(config: Config): string {
   return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME);
 }
 
-// Create a bundle for the given DB, if it doesn't already exist
+/**
+ * Bundles the database for the given language into a `.zip` file, returning the path to it.
+ *
+ * If a bundle for `dbName` already exists (e.g. from an earlier call), it is deleted and
+ * re-created, so each call produces a fresh bundle reflecting the current database contents and the
+ * given `includeDiagnostics` value.
+ */
 export async function bundleDb(
   config: Config,
   language: Language,
diff --git a/src/workflow.test.ts b/src/workflow.test.ts
index bc5075dd0c..c7f168a9dc 100644
--- a/src/workflow.test.ts
+++ b/src/workflow.test.ts
@@ -383,7 +383,7 @@ async function testLanguageAliases(
   process.env.GITHUB_JOB = "test";
 
   const codeql = await getCodeQLForTesting();
-  sinon.stub(codeql, "betterResolveLanguages").resolves({
+  sinon.stub(codeql, "resolveLanguages").resolves({
     aliases:
       aliases !== undefined
         ? // Remap from languageName -> aliases to alias -> languageName
diff --git a/src/workflow.ts b/src/workflow.ts
index 467980fb0a..151cfd5c5d 100644
--- a/src/workflow.ts
+++ b/src/workflow.ts
@@ -86,7 +86,7 @@ async function groupLanguagesByExtractor(
   languages: string[],
   codeql: CodeQL,
 ): Promise<{ [extractorName: string]: string[] } | undefined> {
-  const resolveResult = await codeql.betterResolveLanguages();
+  const resolveResult = await codeql.resolveLanguages();
   if (!resolveResult.aliases) {
     return undefined;
   }