From 2e34e6604842be0f9120289f3fc7b2c071c771d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 04:46:55 +0000 Subject: [PATCH 1/9] :arrow_up: Bump @octokit/webhooks from 13.3.0 to 13.4.1 Bumps [@octokit/webhooks](https://github.com/octokit/webhooks.js) from 13.3.0 to 13.4.1. - [Release notes](https://github.com/octokit/webhooks.js/releases) - [Commits](https://github.com/octokit/webhooks.js/compare/v13.3.0...v13.4.1) --- updated-dependencies: - dependency-name: "@octokit/webhooks" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea07b5b7..6079e6f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2452,9 +2452,9 @@ "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==" }, "node_modules/@octokit/openapi-webhooks-types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-8.3.0.tgz", - "integrity": "sha512-vKLsoR4xQxg4Z+6rU/F65ItTUz/EXbD+j/d4mlq2GW8TsA4Tc8Kdma2JTAAJ5hrKWUQzkR/Esn2fjsqiVRYaQg==" + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-8.5.1.tgz", + "integrity": "sha512-i3h1b5zpGSB39ffBbYdSGuAd0NhBAwPyA3QV3LYi/lx4lsbZiu7u2UHgXVUR6EpvOI8REOuVh1DZTRfHoJDvuQ==" }, "node_modules/@octokit/plugin-paginate-rest": { "version": "11.3.5", @@ -2687,11 +2687,11 @@ } }, "node_modules/@octokit/webhooks": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-13.3.0.tgz", - "integrity": "sha512-TUkJLtI163Bz5+JK0O+zDkQpn4gKwN+BovclUvCj6pI/6RXrFqQvUMRS2M+Rt8Rv0qR3wjoMoOPmpJKeOh0nBg==", + "version": "13.4.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-13.4.1.tgz", + "integrity": "sha512-I5YPUtfWidh+OzyrlDahJsUpkpGK0kCTmDRbuqGmlCUzOtxdEkX3R4d6Cd08ijQYwkVXQJanPdbKuZBeV2NMaA==", "dependencies": { - "@octokit/openapi-webhooks-types": "8.3.0", + "@octokit/openapi-webhooks-types": "8.5.1", "@octokit/request-error": "^6.0.1", "@octokit/webhooks-methods": "^5.0.0" }, From aeaf4aa7e036a3dd76d0638b180d3508fa83ccf1 Mon Sep 17 00:00:00 2001 From: Andrei Iurko Date: Wed, 13 Nov 2024 17:23:57 +0300 Subject: [PATCH 2/9] :bug: Make GHA respect coverage thresholds (QD-10150) --- common/qodana.ts | 17 +++++++++++++++-- scan/__tests__/data/some.sarif.json | 10 ++++++++-- scan/__tests__/main.test.ts | 10 ++++------ scan/dist/index.js | 14 +++++++++----- scan/src/output.ts | 8 +++----- vsts/QodanaScan/index.js | 9 +++++++-- 6 files changed, 46 insertions(+), 22 deletions(-) diff --git a/common/qodana.ts b/common/qodana.ts index 4751280c..0f5c028d 100644 --- a/common/qodana.ts +++ b/common/qodana.ts @@ -225,6 +225,8 @@ export interface Coverage { freshCoverage: number freshLines: number freshCoveredLines: number + totalCoverageThreshold: number + freshCoverageThreshold: number } /** @@ -250,7 +252,16 @@ export function getCoverageFromSarif(sarifPath: string): Coverage { freshLines: sarifContents.runs[0].properties['coverage']['freshLines'] || 0, freshCoveredLines: - sarifContents.runs[0].properties['coverage']['freshCoveredLines'] || 0 + sarifContents.runs[0].properties['coverage']['freshCoveredLines'] || + 0, + totalCoverageThreshold: + sarifContents.runs[0].properties['qodanaFailureConditions']?.[ + 'testCoverageThresholds' + ]?.['totalCoverage'] || COVERAGE_THRESHOLD, + freshCoverageThreshold: + sarifContents.runs[0].properties['qodanaFailureConditions']?.[ + 'testCoverageThresholds' + ]?.['freshCoverage'] || COVERAGE_THRESHOLD } } else { return { @@ -259,7 +270,9 @@ export function getCoverageFromSarif(sarifPath: string): Coverage { totalCoveredLines: 0, freshCoverage: 0, freshLines: 0, - freshCoveredLines: 0 + freshCoveredLines: 0, + totalCoverageThreshold: COVERAGE_THRESHOLD, + freshCoverageThreshold: COVERAGE_THRESHOLD } } } diff --git a/scan/__tests__/data/some.sarif.json b/scan/__tests__/data/some.sarif.json index 38233785..296000c6 100644 --- a/scan/__tests__/data/some.sarif.json +++ b/scan/__tests__/data/some.sarif.json @@ -8258,10 +8258,16 @@ "\n" ], "properties": { + "qodanaFailureConditions": { + "testCoverageThresholds": { + "totalCoverage": 40, + "freshCoverage": 40 + } + }, "coverage": { - "totalCoverage": 70.0, + "totalCoverage": 45.0, "totalLines": 124.0, - "totalCoveredLines": 87.0 + "totalCoveredLines": 56.0 } } } diff --git a/scan/__tests__/main.test.ts b/scan/__tests__/main.test.ts index 599fe17e..3af13e4e 100644 --- a/scan/__tests__/main.test.ts +++ b/scan/__tests__/main.test.ts @@ -101,16 +101,14 @@ test('test empty summary output', () => { test('test passed coverage output', () => { const result = getCoverageStats( - getCoverageFromSarif('__tests__/data/some.sarif.json'), - 50 + getCoverageFromSarif('__tests__/data/some.sarif.json') ) expect(result).toEqual(passedCoverageFixture()) }) test('test failed coverage output', () => { const result = getCoverageStats( - getCoverageFromSarif('__tests__/data/empty.sarif.json'), - 50 + getCoverageFromSarif('__tests__/data/empty.sarif.json') ) expect(result).toEqual(failedCoverageFixture()) }) @@ -353,8 +351,8 @@ Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com function passedCoverageFixture(): string { return `\`\`\`diff @@ Code coverage @@ -+ 70% total lines covered -124 lines analyzed, 87 lines covered ++ 45% total lines covered +124 lines analyzed, 56 lines covered # Calculated according to the filters of your coverage tool \`\`\`` } diff --git a/scan/dist/index.js b/scan/dist/index.js index 3995b641..f6c8e0d0 100644 --- a/scan/dist/index.js +++ b/scan/dist/index.js @@ -34337,7 +34337,9 @@ function getCoverageFromSarif(sarifPath) { totalCoveredLines: sarifContents.runs[0].properties["coverage"]["totalCoveredLines"] || 0, freshCoverage: sarifContents.runs[0].properties["coverage"]["freshCoverage"] || 0, freshLines: sarifContents.runs[0].properties["coverage"]["freshLines"] || 0, - freshCoveredLines: sarifContents.runs[0].properties["coverage"]["freshCoveredLines"] || 0 + freshCoveredLines: sarifContents.runs[0].properties["coverage"]["freshCoveredLines"] || 0, + totalCoverageThreshold: sarifContents.runs[0].properties["qodanaFailureConditions"]?.["testCoverageThresholds"]?.["totalCoverage"] || COVERAGE_THRESHOLD, + freshCoverageThreshold: sarifContents.runs[0].properties["qodanaFailureConditions"]?.["testCoverageThresholds"]?.["freshCoverage"] || COVERAGE_THRESHOLD }; } else { return { @@ -34346,7 +34348,9 @@ function getCoverageFromSarif(sarifPath) { totalCoveredLines: 0, freshCoverage: 0, freshLines: 0, - freshCoveredLines: 0 + freshCoveredLines: 0, + totalCoverageThreshold: COVERAGE_THRESHOLD, + freshCoverageThreshold: COVERAGE_THRESHOLD }; } } @@ -134644,14 +134648,14 @@ ${message} \`\`\``; } __name(wrapToDiffBlock, "wrapToDiffBlock"); - function getCoverageStats(c, threshold) { + function getCoverageStats(c) { if (c.totalLines === 0 && c.totalCoveredLines === 0) { return ""; } let stats = ""; if (c.totalLines !== 0) { let conclusion = `${c.totalCoverage}% total lines covered`; - if (c.totalCoverage < threshold) { + if (c.totalCoverage < c.totalCoverageThreshold) { conclusion = `- ${conclusion}`; } else { conclusion = `+ ${conclusion}`; @@ -134698,7 +134702,7 @@ ${c.freshLines} lines analyzed, ${c.freshCoveredLines} lines covered`; try { const problems = (0, annotations_1.parseSarif)(`${resultsDir}/${qodana_12.QODANA_SARIF_NAME}`); const reportUrl = getReportURL(resultsDir); - const coverageInfo = getCoverageStats((0, qodana_12.getCoverageFromSarif)(`${resultsDir}/${qodana_12.QODANA_SHORT_SARIF_NAME}`), qodana_12.COVERAGE_THRESHOLD); + const coverageInfo = getCoverageStats((0, qodana_12.getCoverageFromSarif)(`${resultsDir}/${qodana_12.QODANA_SHORT_SARIF_NAME}`)); let licensesInfo = ""; let packages = 0; const licensesJson = `${resultsDir}/projectStructure/${qodana_12.QODANA_LICENSES_JSON}`; diff --git a/scan/src/output.ts b/scan/src/output.ts index a42db1fb..eb9006f5 100644 --- a/scan/src/output.ts +++ b/scan/src/output.ts @@ -19,7 +19,6 @@ import * as core from '@actions/core' import * as fs from 'fs' import { Coverage, - COVERAGE_THRESHOLD, getCoverageFromSarif, QODANA_LICENSES_JSON, QODANA_LICENSES_MD, @@ -77,7 +76,7 @@ ${message} \`\`\`` } -export function getCoverageStats(c: Coverage, threshold: number): string { +export function getCoverageStats(c: Coverage): string { if (c.totalLines === 0 && c.totalCoveredLines === 0) { return '' } @@ -85,7 +84,7 @@ export function getCoverageStats(c: Coverage, threshold: number): string { let stats = '' if (c.totalLines !== 0) { let conclusion = `${c.totalCoverage}% total lines covered` - if (c.totalCoverage < threshold) { + if (c.totalCoverage < c.totalCoverageThreshold) { conclusion = `- ${conclusion}` } else { conclusion = `+ ${conclusion}` @@ -153,8 +152,7 @@ export async function publishOutput( const problems = parseSarif(`${resultsDir}/${QODANA_SARIF_NAME}`) const reportUrl = getReportURL(resultsDir) const coverageInfo = getCoverageStats( - getCoverageFromSarif(`${resultsDir}/${QODANA_SHORT_SARIF_NAME}`), - COVERAGE_THRESHOLD + getCoverageFromSarif(`${resultsDir}/${QODANA_SHORT_SARIF_NAME}`) ) let licensesInfo = '' let packages = 0 diff --git a/vsts/QodanaScan/index.js b/vsts/QodanaScan/index.js index 12b0930b..0d3fb080 100644 --- a/vsts/QodanaScan/index.js +++ b/vsts/QodanaScan/index.js @@ -9899,6 +9899,7 @@ function getQodanaScanArgs(args, resultsDir, cacheDir) { return cliArgs; } function getCoverageFromSarif(sarifPath) { + var _a, _b, _c, _d; if (fs.existsSync(sarifPath)) { const sarifContents = JSON.parse( fs.readFileSync(sarifPath, { encoding: "utf8" }) @@ -9910,7 +9911,9 @@ function getCoverageFromSarif(sarifPath) { totalCoveredLines: sarifContents.runs[0].properties["coverage"]["totalCoveredLines"] || 0, freshCoverage: sarifContents.runs[0].properties["coverage"]["freshCoverage"] || 0, freshLines: sarifContents.runs[0].properties["coverage"]["freshLines"] || 0, - freshCoveredLines: sarifContents.runs[0].properties["coverage"]["freshCoveredLines"] || 0 + freshCoveredLines: sarifContents.runs[0].properties["coverage"]["freshCoveredLines"] || 0, + totalCoverageThreshold: ((_b = (_a = sarifContents.runs[0].properties["qodanaFailureConditions"]) == null ? void 0 : _a["testCoverageThresholds"]) == null ? void 0 : _b["totalCoverage"]) || COVERAGE_THRESHOLD, + freshCoverageThreshold: ((_d = (_c = sarifContents.runs[0].properties["qodanaFailureConditions"]) == null ? void 0 : _c["testCoverageThresholds"]) == null ? void 0 : _d["freshCoverage"]) || COVERAGE_THRESHOLD }; } else { return { @@ -9919,7 +9922,9 @@ function getCoverageFromSarif(sarifPath) { totalCoveredLines: 0, freshCoverage: 0, freshLines: 0, - freshCoveredLines: 0 + freshCoveredLines: 0, + totalCoverageThreshold: COVERAGE_THRESHOLD, + freshCoverageThreshold: COVERAGE_THRESHOLD }; } } From fbf199c8569dd6c2ed85ae8b753e9afebd8d9ee1 Mon Sep 17 00:00:00 2001 From: okue Date: Mon, 2 Dec 2024 18:53:33 +0900 Subject: [PATCH 3/9] :bug: Fix cache_default_branch_only's default branch checking --- scan/dist/index.js | 2 +- scan/src/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/dist/index.js b/scan/dist/index.js index f6c8e0d0..870df83c 100644 --- a/scan/dist/index.js +++ b/scan/dist/index.js @@ -135346,7 +135346,7 @@ var require_utils10 = __commonJS({ core2.warning('Turn on "use-cache" option to use "cache-default-branch-only"'); } if (useCaches && cacheDefaultBranchOnly) { - const currentBranch = github2.context.payload.ref; + const currentBranch = github2.context.payload.ref_name; const defaultBranch = (_a = github2.context.payload.repository) === null || _a === void 0 ? void 0 : _a.default_branch; core2.debug(`Current branch: ${currentBranch} | Default branch: ${defaultBranch}`); return currentBranch === defaultBranch; diff --git a/scan/src/utils.ts b/scan/src/utils.ts index 42359ecb..5c736c15 100644 --- a/scan/src/utils.ts +++ b/scan/src/utils.ts @@ -360,7 +360,7 @@ export function isNeedToUploadCache( } if (useCaches && cacheDefaultBranchOnly) { - const currentBranch = github.context.payload.ref + const currentBranch = github.context.payload.ref_name const defaultBranch = github.context.payload.repository?.default_branch core.debug( `Current branch: ${currentBranch} | Default branch: ${defaultBranch}` From b198d9b4acbb6d174d5f9ad09204bd37a98eb45f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 04:05:13 +0000 Subject: [PATCH 4/9] :arrow_up: Bump the npm-production group with 2 updates Bumps the npm-production group with 2 updates: [@octokit/plugin-paginate-rest](https://github.com/octokit/plugin-paginate-rest.js) and [@octokit/types](https://github.com/octokit/types.ts). Updates `@octokit/plugin-paginate-rest` from 11.3.5 to 11.3.6 - [Release notes](https://github.com/octokit/plugin-paginate-rest.js/releases) - [Commits](https://github.com/octokit/plugin-paginate-rest.js/compare/v11.3.5...v11.3.6) Updates `@octokit/types` from 13.6.1 to 13.6.2 - [Release notes](https://github.com/octokit/types.ts/releases) - [Commits](https://github.com/octokit/types.ts/compare/v13.6.1...v13.6.2) --- updated-dependencies: - dependency-name: "@octokit/plugin-paginate-rest" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-production - dependency-name: "@octokit/types" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-production ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6079e6f9..397425f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2457,11 +2457,11 @@ "integrity": "sha512-i3h1b5zpGSB39ffBbYdSGuAd0NhBAwPyA3QV3LYi/lx4lsbZiu7u2UHgXVUR6EpvOI8REOuVh1DZTRfHoJDvuQ==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz", - "integrity": "sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.6.tgz", + "integrity": "sha512-zcvqqf/+TicbTCa/Z+3w4eBJcAxCFymtc0UAIsR3dEVoNilWld4oXdscQ3laXamTszUZdusw97K8+DrbFiOwjw==", "dependencies": { - "@octokit/types": "^13.6.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" @@ -2679,9 +2679,9 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" }, "node_modules/@octokit/types": { - "version": "13.6.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz", - "integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==", + "version": "13.6.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz", + "integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==", "dependencies": { "@octokit/openapi-types": "^22.2.0" } From 5220de7301d598ba479f594298010606121ffc70 Mon Sep 17 00:00:00 2001 From: qodana-bot Date: Sun, 1 Dec 2024 22:35:23 +0000 Subject: [PATCH 5/9] :arrow_up: Update node, dependencies, fix ESLint config :arrow_up: Bump the npm-development group across 1 directory with 9 updates Bumps the npm-development group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `5.0.1` | `5.1.3` | | [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `28.8.2` | `28.9.0` | | [prettier](https://github.com/prettier/prettier) | `3.3.3` | `3.4.1` | | [typescript](https://github.com/microsoft/TypeScript) | `5.5.4` | `5.7.2` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.5.2` | `22.10.1` | | [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) | `29.5.12` | `29.5.14` | | [axios](https://github.com/axios/axios) | `1.7.7` | `1.7.8` | | [esbuild](https://github.com/evanw/esbuild) | `0.23.1` | `0.24.0` | | [nock](https://github.com/nock/nock) | `13.5.5` | `13.5.6` | Updates `eslint-plugin-github` from 5.0.1 to 5.1.3 - [Release notes](https://github.com/github/eslint-plugin-github/releases) - [Commits](https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.1.3) Updates `eslint-plugin-jest` from 28.8.2 to 28.9.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.2...v28.9.0) Updates `prettier` from 3.3.3 to 3.4.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.1) Updates `typescript` from 5.5.4 to 5.7.2 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.7.2) Updates `@types/node` from 22.5.2 to 22.10.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/jest` from 29.5.12 to 29.5.14 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Updates `axios` from 1.7.7 to 1.7.8 - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.7...v1.7.8) Updates `esbuild` from 0.23.1 to 0.24.0 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.23.1...v0.24.0) Updates `nock` from 13.5.5 to 13.5.6 - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.5.5...v13.5.6) --- updated-dependencies: - dependency-name: eslint-plugin-github dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: axios dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: nock dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development ... Signed-off-by: dependabot[bot] :arrow_up: Bump @actions/core from 1.10.1 to 1.11.1 Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.10.1 to 1.11.1. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] :arrow_up: Bump @actions/cache from 3.2.4 to 3.3.0 :bricks: Fix dependabot configuration :bricks: Update ESLint configuration :bricks: Bump Node :bricks: Test EAPs Revert ":arrow_up: Update `qodana` to `v2024.3.2`" This reverts commit 766b1efbfebae89ef668e1679effe7b7c046a199. # Conflicts: # .github/workflows/node.yml # scan/dist/index.js # vsts/vss-extension.dev.json :bricks: Sync changes with reverts --- .github/dependabot.yml | 9 +- .github/linters/.eslintrc.yml | 68 + .github/workflows/node.yml | 16 +- .github/workflows/release.yml | 7 +- .node-version | 1 + CONTRIBUTING.md | 2 +- common/.eslintrc.json | 55 - common/package.json | 11 +- common/qodana.ts | 1 - package-lock.json | 1712 ++++++------ package.json | 8 +- scan/.eslintignore | 5 - scan/.eslintrc.json | 55 - scan/dist/index.js | 4820 ++++++++++++++++----------------- scan/package.json | 23 +- scan/src/annotations.ts | 8 +- scan/src/main.ts | 5 +- scan/src/output.ts | 26 +- scan/src/utils.ts | 160 +- vsts/.eslintignore | 4 - vsts/.eslintrc.json | 55 - vsts/QodanaScan/index.js | 86 +- vsts/package.json | 13 +- vsts/src/main.ts | 7 +- vsts/src/utils.ts | 15 +- vsts/vss-extension.dev.json | 2 +- 26 files changed, 3391 insertions(+), 3783 deletions(-) create mode 100644 .github/linters/.eslintrc.yml create mode 100644 .node-version delete mode 100644 common/.eslintrc.json delete mode 100644 scan/.eslintignore delete mode 100644 scan/.eslintrc.json delete mode 100644 vsts/.eslintignore delete mode 100644 vsts/.eslintrc.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7577691b..4a3d1e35 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,15 +14,12 @@ updates: schedule: interval: weekly groups: - npm-development: - dependency-type: development + dependencies: + patterns: + - "*" update-types: - minor - patch - npm-production: - dependency-type: production - update-types: - - patch - package-ecosystem: gradle directory: gradle diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml new file mode 100644 index 00000000..06bd49d9 --- /dev/null +++ b/.github/linters/.eslintrc.yml @@ -0,0 +1,68 @@ +env: + node: true + es6: true + jest: true + +globals: + Atomics: readonly + SharedArrayBuffer: readonly + +ignorePatterns: + - '!.*' + - 'common/update-cli.js' + - '**/node_modules/.*' + - '**/dist/.*' + - '**/lib/.*' + - '*.js' + - '*.d.ts' + - '*.test.ts' + - '**/coverage/.*' + - '*.json' + +parser: '@typescript-eslint/parser' + +parserOptions: + ecmaVersion: 2023 + sourceType: module + project: + - './tsconfig.json' + +plugins: + - jest + - '@typescript-eslint' + +extends: + - eslint:recommended + - plugin:@typescript-eslint/recommended-type-checked + - plugin:jest/recommended + +rules: + { + 'camelcase': 'off', + 'eslint-comments/no-use': 'off', + 'eslint-comments/no-unused-disable': 'off', + 'i18n-text/no-en': 'off', + 'import/no-namespace': 'off', + 'no-console': 'off', + 'semi': 'off', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/explicit-member-accessibility': + ['error', { 'accessibility': 'no-public' }], + '@typescript-eslint/explicit-function-return-type': + ['error', { 'allowExpressions': true }], + '@typescript-eslint/no-empty-interface': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-inferrable-types': 'error', + '@typescript-eslint/no-non-null-assertion': 'warn', + '@typescript-eslint/no-unnecessary-qualifier': 'error', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-var-requires': 'error', + '@typescript-eslint/prefer-for-of': 'warn', + '@typescript-eslint/prefer-function-type': 'warn', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + '@typescript-eslint/promise-function-async': 'error', + '@typescript-eslint/require-array-sort-compare': 'error', + '@typescript-eslint/space-before-function-paren': 'off' + } diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index d98b3bed..9ca35e49 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -34,10 +34,12 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - - name: Set Node.js 16.x - uses: actions/setup-node@v4.1.0 + - name: Setup Node.js + id: setup-node + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version-file: .node-version + cache: npm - name: Install dependencies run: npm ci && npm run build - name: Rebuild scan/dist/ @@ -89,6 +91,7 @@ jobs: runs-on: ${{ matrix.os }} needs: [lint] strategy: + fail-fast: false matrix: os: [ubuntu-latest] directory: [ @@ -384,11 +387,12 @@ jobs: filters: | azure-dev: - "vsts/vss-extension.dev.json" - - name: Set Node.js 16.x + - name: Set Node.js if: steps.filter.outputs.azure-dev == 'true' - uses: actions/setup-node@v4.1.0 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version-file: .node-version + cache: npm - name: Install dependencies if: steps.filter.outputs.azure-dev == 'true' run: cd vsts && npm install && cd QodanaScan && npm install && npm i -g tfx-cli diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03e407da..64562d2c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,10 +45,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set Node.js 16.x - uses: actions/setup-node@v4.1.0 + - name: Set Node.js + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version-file: .node-version + cache: npm - name: Install dependencies run: cd vsts && npm install && cd QodanaScan && npm install && npm i -g tfx-cli - name: Package and publish diff --git a/.node-version b/.node-version new file mode 100644 index 00000000..9944ce63 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +21.6.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a74a050f..6927a7af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ By participating in this project, you agree to abide by our [Code of conduct](.g Prerequisites: -- [Node.js 12.x](https://nodejs.org/) +- [Node.js](https://nodejs.org/) (the version is specified in [.node-version](.node-version)) - Java 11 Other things you might need to develop: diff --git a/common/.eslintrc.json b/common/.eslintrc.json deleted file mode 100644 index 98d0bd73..00000000 --- a/common/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "tsconfig.json" - }, - "rules": { - "i18n-text/no-en": "off", - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "camelcase": "off", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "semi": "off", - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true - } - } \ No newline at end of file diff --git a/common/package.json b/common/package.json index 4bbefc34..c8818b7c 100644 --- a/common/package.json +++ b/common/package.json @@ -7,22 +7,21 @@ "url": "git+https://github.com/JetBrains/qodana-cli.git" }, "scripts": { - "lint": "eslint --fix **/*.ts" + "lint": "eslint --fix **/*.ts -c ../.github/linters/.eslintrc.yml" }, "files": [ "qodana.ts", "cli.json" ], "devDependencies": { - "@types/node": "^22.5.2", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "ts-jest": "^29.2.5", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } } diff --git a/common/qodana.ts b/common/qodana.ts index 0f5c028d..a7c0734a 100644 --- a/common/qodana.ts +++ b/common/qodana.ts @@ -95,7 +95,6 @@ export function getQodanaUrl( return `https://github.com/JetBrains/qodana-cli/releases/download/${cli_version}/qodana_${platform}_${arch}.${archive}` } -// eslint-disable-next-line no-shadow -- shadowing is intentional here (ESLint bug) export enum QodanaExitCode { Success = 0, FailThreshold = 255 diff --git a/package-lock.json b/package-lock.json index 397425f1..5eddf3df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,14 +14,14 @@ "vsts" ], "devDependencies": { + "@typescript-eslint/eslint-plugin": "^8.14.0", "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "eslint-plugin-prettier": "^5.2.1", - "prettier": "3.3.3", + "prettier": "3.4.1", "prettier-eslint": "^16.3.0", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } }, "common": { @@ -29,16 +29,142 @@ "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { - "@types/node": "^22.5.2", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "ts-jest": "^29.2.5", - "typescript": "^5.5.4" + "typescript": "^5.7.2" + } + }, + "common/node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "common/node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "common/node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "common/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "common/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "common/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "common/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -191,11 +317,11 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" }, "node_modules/@actions/cache": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.2.4.tgz", - "integrity": "sha512-RuHnwfcDagtX+37s0ZWy7clbOfnZ7AlDJQ7k/9rzt2W4Gnwde3fa/qjSjVuz4vLcLIpc7fUob27CMrqiWZytYA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.3.0.tgz", + "integrity": "sha512-+eCsMTIZUEm+QA9GqjollOhCdvRrZ1JV8d9Rp34zVNizBkYITO8dhKczP5Xps1dFzc5n59p7vYVtZrGt18bb5Q==", "dependencies": { - "@actions/core": "^1.10.0", + "@actions/core": "^1.11.1", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", "@actions/http-client": "^2.1.1", @@ -203,8 +329,7 @@ "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", - "semver": "^6.3.1", - "uuid": "^3.3.3" + "semver": "^6.3.1" } }, "node_modules/@actions/cache/node_modules/semver": { @@ -216,20 +341,12 @@ } }, "node_modules/@actions/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", - "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", "dependencies": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "node_modules/@actions/core/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" } }, "node_modules/@actions/exec": { @@ -1201,18 +1318,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/runtime": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", - "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/template": { "version": "7.24.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", @@ -1290,9 +1395,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", "cpu": [ "ppc64" ], @@ -1306,9 +1411,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], @@ -1322,9 +1427,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], @@ -1338,9 +1443,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], @@ -1354,9 +1459,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -1370,9 +1475,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], @@ -1386,9 +1491,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], @@ -1402,9 +1507,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], @@ -1418,9 +1523,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], @@ -1434,9 +1539,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], @@ -1450,9 +1555,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], @@ -1466,9 +1571,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], @@ -1482,9 +1587,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], @@ -1498,9 +1603,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], @@ -1514,9 +1619,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], @@ -1530,9 +1635,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], @@ -1546,9 +1651,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], @@ -1562,9 +1667,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], @@ -1578,9 +1683,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", "cpu": [ "arm64" ], @@ -1594,9 +1699,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], @@ -1610,9 +1715,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], @@ -1626,9 +1731,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], @@ -1642,9 +1747,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], @@ -1658,9 +1763,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], @@ -1737,12 +1842,6 @@ "node": ">=14" } }, - "node_modules/@github/browserslist-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@github/browserslist-config/-/browserslist-config-1.0.0.tgz", - "integrity": "sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==", - "dev": true - }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -2970,33 +3069,29 @@ } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@types/node": { - "version": "22.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.2.tgz", - "integrity": "sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, "node_modules/@types/node-fetch": { @@ -3032,12 +3127,6 @@ "resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz", "integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==" }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -3073,33 +3162,31 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz", - "integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.7.1", - "@typescript-eslint/type-utils": "7.7.1", - "@typescript-eslint/utils": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", - "debug": "^4.3.4", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3108,26 +3195,27 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, + "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3135,53 +3223,80 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "node_modules/@typescript-eslint/types": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -3193,24 +3308,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -3219,7 +3317,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -3234,43 +3332,26 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", - "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz", - "integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==", + "node_modules/@typescript-eslint/utils": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.7.1", - "@typescript-eslint/utils": "7.7.1", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3278,111 +3359,33 @@ } } }, - "node_modules/@typescript-eslint/types": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", - "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.17.0", + "eslint-visitor-keys": "^4.2.0" + }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", - "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/visitor-keys": "7.7.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz", - "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.7.1", - "@typescript-eslint/types": "7.7.1", - "@typescript-eslint/typescript-estree": "7.7.1", - "semver": "^7.6.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", - "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.7.1", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/eslint" } }, "node_modules/@ungap/structured-clone": { @@ -3403,9 +3406,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3618,20 +3621,13 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.5", "is-array-buffer": "^3.0.4" @@ -3648,6 +3644,8 @@ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3677,6 +3675,8 @@ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3697,6 +3697,8 @@ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -3715,6 +3717,8 @@ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -3733,6 +3737,8 @@ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", @@ -3756,12 +3762,6 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true - }, "node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", @@ -3777,6 +3777,8 @@ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -3787,19 +3789,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/axe-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", - "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", "dev": true, "dependencies": { "follow-redirects": "^1.15.6", @@ -3821,15 +3814,6 @@ "node": ">= 6" } }, - "node_modules/axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, "node_modules/azure-pipelines-task-lib": { "version": "4.17.3", "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.17.3.tgz", @@ -4147,9 +4131,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -4166,10 +4150,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -4290,9 +4274,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001612", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", - "integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "dev": true, "funding": [ { @@ -4591,17 +4575,13 @@ "node": ">= 8" } }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true - }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -4619,6 +4599,8 @@ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -4636,6 +4618,8 @@ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -4714,6 +4698,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -4739,15 +4725,6 @@ "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/des.js": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", @@ -4847,9 +4824,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.746", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.746.tgz", - "integrity": "sha512-jeWaIta2rIG2FzHaYIhSuVWqC6KJYo7oSBX4Jv7g+aVujKztfvdpf+n6MGwZdC5hQXbax4nntykLH2juIQrfPg==", + "version": "1.5.67", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz", + "integrity": "sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==", "dev": true }, "node_modules/emittery": { @@ -4896,6 +4873,8 @@ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", @@ -4970,36 +4949,13 @@ "node": ">= 0.4" } }, - "node_modules/es-iterator-helpers": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", - "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "es-errors": "^1.3.0" }, @@ -5012,6 +4968,8 @@ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "get-intrinsic": "^1.2.4", "has-tostringtag": "^1.0.2", @@ -5026,6 +4984,8 @@ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "hasown": "^2.0.0" } @@ -5035,6 +4995,8 @@ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -5048,9 +5010,9 @@ } }, "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "bin": { @@ -5060,36 +5022,36 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -5167,6 +5129,8 @@ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, + "optional": true, + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -5179,6 +5143,8 @@ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.13.0", @@ -5190,6 +5156,8 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -5255,106 +5223,13 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-escompat": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.4.0.tgz", - "integrity": "sha512-ufTPv8cwCxTNoLnTZBFTQ5SxU2w7E7wiMIS7PSxsgP1eAxFjtSaoZ80LRn64hI8iYziE6kJG6gX/ZCJVxh48Bg==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.0" - }, - "peerDependencies": { - "eslint": ">=5.14.1" - } - }, - "node_modules/eslint-plugin-eslint-comments": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", - "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "ignore": "^5.0.5" - }, - "engines": { - "node": ">=6.5.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-plugin-filenames": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", - "integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==", - "dev": true, - "dependencies": { - "lodash.camelcase": "4.3.0", - "lodash.kebabcase": "4.1.1", - "lodash.snakecase": "4.1.1", - "lodash.upperfirst": "4.3.1" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/eslint-plugin-github": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.1.tgz", - "integrity": "sha512-qbXG3wL5Uh2JB92EKeX2hPtO9c/t75qVxQjVLYuTFfhHifLZzv9CBvLCvoaBhLrAC/xTMVht7DK/NofYK8X4Dg==", - "dev": true, - "dependencies": { - "@github/browserslist-config": "^1.0.0", - "@typescript-eslint/eslint-plugin": "^7.0.1", - "@typescript-eslint/parser": "^7.0.1", - "aria-query": "^5.3.0", - "eslint-config-prettier": ">=8.0.0", - "eslint-plugin-escompat": "^3.3.3", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-i18n-text": "^1.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-no-only-tests": "^3.0.0", - "eslint-plugin-prettier": "^5.0.0", - "eslint-rule-documentation": ">=1.0.0", - "jsx-ast-utils": "^3.3.2", - "prettier": "^3.0.0", - "svg-element-attributes": "^1.3.1" - }, - "bin": { - "eslint-ignore-errors": "bin/eslint-ignore-errors.js" - }, - "peerDependencies": { - "eslint": "^8.0.1" - } - }, - "node_modules/eslint-plugin-i18n-text": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", - "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==", - "dev": true, - "peerDependencies": { - "eslint": ">=5.0.0" - } - }, "node_modules/eslint-plugin-import": { "version": "2.29.1", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "array-includes": "^3.1.7", "array.prototype.findlastindex": "^1.2.3", @@ -5386,6 +5261,8 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -5395,6 +5272,8 @@ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "esutils": "^2.0.2" }, @@ -5407,14 +5286,16 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "optional": true, + "peer": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-jest": { - "version": "28.8.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.2.tgz", - "integrity": "sha512-mC3OyklHmS5i7wYU1rGId9EnxRI8TVlnFG56AE+8U9iRy6zwaNygZR+DsdZuCL0gRG0wVeyzq+uWcPt6yJrrMA==", + "version": "28.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.9.0.tgz", + "integrity": "sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -5436,45 +5317,6 @@ } } }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", - "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.23.2", - "aria-query": "^5.3.0", - "array-includes": "^3.1.7", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "=4.7.0", - "axobject-query": "^3.2.1", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.15", - "hasown": "^2.0.0", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-no-only-tests": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.1.0.tgz", - "integrity": "sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==", - "dev": true, - "engines": { - "node": ">=5.0.0" - } - }, "node_modules/eslint-plugin-prettier": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", @@ -5505,15 +5347,6 @@ } } }, - "node_modules/eslint-rule-documentation": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz", - "integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -5866,6 +5699,8 @@ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "is-callable": "^1.1.3" } @@ -5942,6 +5777,8 @@ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -5960,6 +5797,8 @@ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "optional": true, + "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6035,6 +5874,8 @@ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.5", "es-errors": "^1.3.0", @@ -6110,6 +5951,8 @@ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -6188,6 +6031,8 @@ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "optional": true, + "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6239,6 +6084,8 @@ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-symbols": "^1.0.3" }, @@ -6422,6 +6269,8 @@ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.0", @@ -6444,6 +6293,8 @@ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.1" @@ -6461,28 +6312,15 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6493,6 +6331,8 @@ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6518,6 +6358,8 @@ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -6541,6 +6383,8 @@ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "is-typed-array": "^1.1.13" }, @@ -6556,6 +6400,8 @@ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6575,18 +6421,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -6604,21 +6438,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -6631,23 +6450,13 @@ "node": ">=0.10.0" } }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-negative-zero": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -6669,6 +6478,8 @@ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6701,6 +6512,8 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6712,23 +6525,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-shared-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7" }, @@ -6755,6 +6558,8 @@ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6770,6 +6575,8 @@ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -6785,6 +6592,8 @@ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "which-typed-array": "^1.1.14" }, @@ -6795,23 +6604,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -6819,27 +6618,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/isexe": { "version": "2.0.0", @@ -6912,19 +6697,6 @@ "node": ">=8" } }, - "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - } - }, "node_modules/jackspeak": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", @@ -7594,6 +7366,8 @@ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "minimist": "^1.2.0" }, @@ -7601,21 +7375,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -7682,24 +7441,6 @@ "node": ">=6" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", - "dev": true - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/lazystream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", @@ -7799,18 +7540,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true - }, - "node_modules/lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -7823,18 +7552,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", - "dev": true - }, - "node_modules/lodash.upperfirst": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", - "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", - "dev": true - }, "node_modules/loglevel": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", @@ -8080,9 +7797,9 @@ } }, "node_modules/nock": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", - "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", + "version": "13.5.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", + "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -8119,9 +7836,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/nodejs-file-downloader": { @@ -8168,6 +7885,8 @@ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" } @@ -8177,6 +7896,8 @@ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -8190,25 +7911,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.fromentries": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -8227,6 +7936,8 @@ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -8241,6 +7952,8 @@ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -8450,9 +8163,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { @@ -8545,6 +8258,8 @@ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" } @@ -8559,9 +8274,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -8955,38 +8670,13 @@ "node": ">= 0.10" } }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.6", "define-properties": "^1.2.1", @@ -9132,6 +8822,8 @@ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4", @@ -9169,6 +8861,8 @@ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -9232,6 +8926,8 @@ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -9440,6 +9136,8 @@ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -9458,6 +9156,8 @@ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -9472,6 +9172,8 @@ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -9512,6 +9214,8 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=4" } @@ -9560,16 +9264,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/svg-element-attributes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.1.tgz", - "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -9867,6 +9561,8 @@ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -9953,6 +9649,8 @@ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -9967,6 +9665,8 @@ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -9986,6 +9686,8 @@ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -10006,6 +9708,8 @@ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -10038,9 +9742,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10055,6 +9759,8 @@ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -10082,9 +9788,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "node_modules/universal-user-agent": { "version": "7.0.2", @@ -10102,9 +9808,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -10121,8 +9827,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -10255,6 +9961,8 @@ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -10266,55 +9974,13 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", - "dev": true, - "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -10485,34 +10151,160 @@ "license": "Apache-2.0", "dependencies": { "@actions/artifact": "^2.1.11", - "@actions/cache": "^3.2.4", - "@actions/core": "^1.10.1", + "@actions/cache": "^3.3.0", + "@actions/core": "^1.11.1", "@actions/exec": "^1.1.0", "@actions/github": "^6.0.0", "@actions/tool-cache": "^2.0.1", - "@octokit/plugin-paginate-rest": "*", - "@octokit/rest": "*", - "@octokit/types": "*", - "@octokit/webhooks": "*", + "@octokit/plugin-paginate-rest": "latest", + "@octokit/rest": "latest", + "@octokit/types": "latest", + "@octokit/webhooks": "latest", "@types/sarif": "^2.1.7", "jszip": "^3.10.1" }, "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^22.5.2", + "@types/jest": "^29.5.14", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "axios": "^1.7.7", - "esbuild": "0.23.1", + "axios": "^1.7.8", + "esbuild": "0.24.0", "eslint": "^8.57.1", "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", - "jest": "*", + "eslint-plugin-jest": "^28.9.0", + "jest": "latest", "js-yaml": "^4.1.0", - "nock": "^13.5.5", - "prettier": "3.3.3", - "ts-jest": "*", - "typescript": "^5.5.4" + "nock": "^13.5.6", + "prettier": "3.4.1", + "ts-jest": "latest", + "typescript": "^5.7.2" + } + }, + "scan/node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "scan/node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "scan/node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "scan/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "scan/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "scan/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "scan/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "vsts": { @@ -10525,18 +10317,144 @@ "azure-pipelines-tool-lib": "^2.0.8" }, "devDependencies": { - "@types/node": "^22.5.2", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "esbuild": "0.23.1", + "esbuild": "0.24.0", "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "sync-request": "^6.1.0", "ts-jest": "^29.2.5", - "typescript": "^5.5.4" + "typescript": "^5.7.2" + } + }, + "vsts/node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "vsts/node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "vsts/node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "vsts/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "vsts/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "vsts/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "vsts/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } } } diff --git a/package.json b/package.json index 5a06c5cd..4ad024d2 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ ], "devDependencies": { "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", + "@typescript-eslint/eslint-plugin": "^8.14.0", "eslint-plugin-prettier": "^5.2.1", - "prettier": "3.3.3", + "prettier": "3.4.1", "prettier-eslint": "^16.3.0", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } } diff --git a/scan/.eslintignore b/scan/.eslintignore deleted file mode 100644 index 3c492bd2..00000000 --- a/scan/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/ -lib/ -node_modules/ -jest.config.js -__tests__ \ No newline at end of file diff --git a/scan/.eslintrc.json b/scan/.eslintrc.json deleted file mode 100644 index 98d0bd73..00000000 --- a/scan/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "tsconfig.json" - }, - "rules": { - "i18n-text/no-en": "off", - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "camelcase": "off", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "semi": "off", - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true - } - } \ No newline at end of file diff --git a/scan/dist/index.js b/scan/dist/index.js index 870df83c..d9f54700 100644 --- a/scan/dist/index.js +++ b/scan/dist/index.js @@ -74,9 +74,13 @@ var require_command = __commonJS({ "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -90,7 +94,7 @@ var require_command = __commonJS({ if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); } __setModuleDefault3(result, mod); return result; @@ -147,370 +151,29 @@ var require_command = __commonJS({ } }; function escapeData(s) { - return utils_12.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + return (0, utils_12.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } __name(escapeData, "escapeData"); function escapeProperty(s) { - return utils_12.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + return (0, utils_12.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } __name(escapeProperty, "escapeProperty"); } }); -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - import_crypto.default.randomFillSync(rnds8Pool); - poolPtr = 0; - } - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} -var import_crypto, rnds8Pool, poolPtr; -var init_rng = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { - import_crypto = __toESM(require("crypto")); - rnds8Pool = new Uint8Array(256); - poolPtr = rnds8Pool.length; - __name(rng, "rng"); - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js -var regex_default; -var init_regex = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { - regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js -function validate(uuid) { - return typeof uuid === "string" && regex_default.test(uuid); -} -var validate_default; -var init_validate = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { - init_regex(); - __name(validate, "validate"); - validate_default = validate; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js -function stringify(arr, offset = 0) { - const uuid = (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(); - if (!validate_default(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - return uuid; -} -var byteToHex, stringify_default; -var init_stringify = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { - init_validate(); - byteToHex = []; - for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 256).toString(16).substr(1)); - } - __name(stringify, "stringify"); - stringify_default = stringify; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - if (node == null) { - node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - if (clockseq == null) { - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; - } - } - let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); - let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; - if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; - } - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { - nsecs = 0; - } - if (nsecs >= 1e4) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - msecs += 122192928e5; - const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; - b[i++] = tl & 255; - const tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; - b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; - b[i++] = clockseq & 255; - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - return buf || stringify_default(b); -} -var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; -var init_v1 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { - init_rng(); - init_stringify(); - _lastMSecs = 0; - _lastNSecs = 0; - __name(v1, "v1"); - v1_default = v1; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js -function parse(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - let v; - const arr = new Uint8Array(16); - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 255; - arr[2] = v >>> 8 & 255; - arr[3] = v & 255; - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 255; - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 255; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 255; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v / 4294967296 & 255; - arr[12] = v >>> 24 & 255; - arr[13] = v >>> 16 & 255; - arr[14] = v >>> 8 & 255; - arr[15] = v & 255; - return arr; -} -var parse_default; -var init_parse = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { - init_validate(); - __name(parse, "parse"); - parse_default = parse; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - return bytes; -} -function v35_default(name, version4, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === "string") { - value = stringToBytes(value); - } - if (typeof namespace === "string") { - namespace = parse_default(namespace); - } - if (namespace.length !== 16) { - throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); - } - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version4; - bytes[8] = bytes[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return stringify_default(bytes); - } - __name(generateUUID, "generateUUID"); - try { - generateUUID.name = name; - } catch (err) { - } - generateUUID.DNS = DNS; - generateUUID.URL = URL2; - return generateUUID; -} -var DNS, URL2; -var init_v35 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { - init_stringify(); - init_parse(); - __name(stringToBytes, "stringToBytes"); - DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - __name(v35_default, "default"); - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto2.default.createHash("md5").update(bytes).digest(); -} -var import_crypto2, md5_default; -var init_md5 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { - import_crypto2 = __toESM(require("crypto")); - __name(md5, "md5"); - md5_default = md5; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js -var v3, v3_default; -var init_v3 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { - init_v35(); - init_md5(); - v3 = v35_default("v3", 48, md5_default); - v3_default = v3; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return stringify_default(rnds); -} -var v4_default; -var init_v4 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { - init_rng(); - init_stringify(); - __name(v4, "v4"); - v4_default = v4; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto3.default.createHash("sha1").update(bytes).digest(); -} -var import_crypto3, sha1_default; -var init_sha1 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { - import_crypto3 = __toESM(require("crypto")); - __name(sha1, "sha1"); - sha1_default = sha1; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js -var v5, v5_default; -var init_v5 = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { - init_v35(); - init_sha1(); - v5 = v35_default("v5", 80, sha1_default); - v5_default = v5; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js -var nil_default; -var init_nil = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { - nil_default = "00000000-0000-0000-0000-000000000000"; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js -function version(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - return parseInt(uuid.substr(14, 1), 16); -} -var version_default; -var init_version = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { - init_validate(); - __name(version, "version"); - version_default = version; - } -}); - -// ../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js -var esm_node_exports = {}; -__export(esm_node_exports, { - NIL: () => nil_default, - parse: () => parse_default, - stringify: () => stringify_default, - v1: () => v1_default, - v3: () => v3_default, - v4: () => v4_default, - v5: () => v5_default, - validate: () => validate_default, - version: () => version_default -}); -var init_esm_node = __esm({ - "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { - init_v1(); - init_v3(); - init_v4(); - init_v5(); - init_nil(); - init_version(); - init_validate(); - init_stringify(); - init_parse(); - } -}); - // ../node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ "../node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; @@ -524,16 +187,16 @@ var require_file_command = __commonJS({ if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); } __setModuleDefault3(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto4 = __importStar3(require("crypto")); var fs2 = __importStar3(require("fs")); var os = __importStar3(require("os")); - var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_12 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -543,15 +206,15 @@ var require_file_command = __commonJS({ if (!fs2.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs2.appendFileSync(filePath, `${utils_12.toCommandValue(message)}${os.EOL}`, { + fs2.appendFileSync(filePath, `${(0, utils_12.toCommandValue)(message)}${os.EOL}`, { encoding: "utf8" }); } __name(issueFileCommand, "issueFileCommand"); exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_12.toCommandValue(value); + const delimiter = `ghadelimiter_${crypto4.randomUUID()}`; + const convertedValue = (0, utils_12.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } @@ -1359,7 +1022,7 @@ var require_util = __commonJS({ var { InvalidArgumentError } = require_errors(); var { Blob: Blob2 } = require("buffer"); var nodeUtil = require("util"); - var { stringify: stringify3 } = require("querystring"); + var { stringify: stringify2 } = require("querystring"); var { headerNameLowerCasedRecord } = require_constants(); var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { @@ -1377,7 +1040,7 @@ var require_util = __commonJS({ if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - const stringified = stringify3(queryParams); + const stringified = stringify2(queryParams); if (stringified) { url += "?" + stringified; } @@ -4104,11 +3767,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto7.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4409,7 +4072,7 @@ var require_util2 = __commonJS({ } __name(isURLPotentiallyTrustworthy, "isURLPotentiallyTrustworthy"); function bytesMatch(bytes, metadataList) { - if (crypto7 === void 0) { + if (crypto4 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4424,7 +4087,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto7.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -11792,7 +11455,7 @@ var require_proxy_agent = __commonJS({ "../node_modules/undici/lib/proxy-agent.js"(exports2, module2) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); - var { URL: URL4 } = require("url"); + var { URL: URL3 } = require("url"); var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); @@ -11847,7 +11510,7 @@ var require_proxy_agent = __commonJS({ this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL4(opts.uri); + const resolvedUrl = new URL3(opts.uri); const { origin, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); @@ -11902,7 +11565,7 @@ var require_proxy_agent = __commonJS({ }); } dispatch(opts, handler) { - const { host } = new URL4(opts.origin); + const { host } = new URL3(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( @@ -16395,7 +16058,7 @@ var require_util6 = __commonJS({ } } __name(validateCookieMaxAge, "validateCookieMaxAge"); - function stringify3(cookie) { + function stringify2(cookie) { if (cookie.name.length === 0) { return null; } @@ -16443,7 +16106,7 @@ var require_util6 = __commonJS({ } return out.join("; "); } - __name(stringify3, "stringify"); + __name(stringify2, "stringify"); var kHeadersListNode; function getHeadersList(headers) { if (headers[kHeadersList]) { @@ -16462,7 +16125,7 @@ var require_util6 = __commonJS({ __name(getHeadersList, "getHeadersList"); module2.exports = { isCTLExcludingHtab, - stringify: stringify3, + stringify: stringify2, getHeadersList }; } @@ -16615,7 +16278,7 @@ var require_cookies = __commonJS({ "../node_modules/undici/lib/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse(); - var { stringify: stringify3, getHeadersList } = require_util6(); + var { stringify: stringify2, getHeadersList } = require_util6(); var { webidl } = require_webidl(); var { Headers: Headers2 } = require_headers(); function getCookies(headers) { @@ -16660,9 +16323,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify3(cookie); + const str = stringify2(cookie); if (str) { - headers.append("Set-Cookie", stringify3(cookie)); + headers.append("Set-Cookie", stringify2(cookie)); } } __name(setCookie, "setCookie"); @@ -17176,9 +16839,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -17197,7 +16860,7 @@ var require_connection = __commonJS({ const headersList = new Headers2(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto7.randomBytes(16).toString("base64"); + const keyValue = crypto4.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -17226,7 +16889,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto7.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -17310,9 +16973,9 @@ var require_frame = __commonJS({ "../node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -17324,7 +16987,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto7.randomBytes(4); + this.maskKey = crypto4.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -18997,9 +18660,9 @@ var require_oidc_utils = __commonJS({ const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - core_1.debug(`ID token url is ${id_token_url}`); + (0, core_1.debug)(`ID token url is ${id_token_url}`); const id_token = yield _OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); + (0, core_1.setSecret)(id_token); return id_token; } catch (error) { throw new Error(`Error message: ${error.message}`); @@ -19315,364 +18978,1551 @@ var require_summary = __commonJS({ // ../node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ "../node_modules/@actions/core/lib/path-utils.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar3(require("path")); - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - __name(toPosixPath, "toPosixPath"); - exports2.toPosixPath = toPosixPath; - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - __name(toWin32Path, "toWin32Path"); - exports2.toWin32Path = toWin32Path; - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path2.sep); - } - __name(toPlatformPath, "toPlatformPath"); - exports2.toPlatformPath = toPlatformPath; - } -}); - -// ../node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "../node_modules/@actions/core/lib/core.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_12 = require_utils(); - var os = __importStar3(require("os")); - var path2 = __importStar3(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 || (exports2.ExitCode = {})); - function exportVariable(name, val) { - const convertedVal = utils_12.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); - } - command_1.issueCommand("set-env", { name }, convertedVal); - } - __name(exportVariable, "exportVariable"); - exports2.exportVariable = exportVariable; - function setSecret(secret) { - command_1.issueCommand("add-mask", {}, secret); - } - __name(setSecret, "setSecret"); - exports2.setSecret = setSecret; - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - file_command_1.issueFileCommand("PATH", inputPath); - } else { - command_1.issueCommand("add-path", {}, inputPath); - } - process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; - } - __name(addPath, "addPath"); - exports2.addPath = addPath; - function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); - } - __name(getInput, "getInput"); - exports2.getInput = getInput; - function getMultilineInput(name, options) { - const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map((input) => input.trim()); - } - __name(getMultilineInput, "getMultilineInput"); - exports2.getMultilineInput = getMultilineInput; - function getBooleanInput(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - __name(getBooleanInput, "getBooleanInput"); - exports2.getBooleanInput = getBooleanInput; - function setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - command_1.issueCommand("set-output", { name }, utils_12.toCommandValue(value)); - } - __name(setOutput, "setOutput"); - exports2.setOutput = setOutput; - function setCommandEcho(enabled) { - command_1.issue("echo", enabled ? "on" : "off"); - } - __name(setCommandEcho, "setCommandEcho"); - exports2.setCommandEcho = setCommandEcho; - function setFailed2(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - __name(setFailed2, "setFailed"); - exports2.setFailed = setFailed2; - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - __name(isDebug, "isDebug"); - exports2.isDebug = isDebug; - function debug(message) { - command_1.issueCommand("debug", {}, message); - } - __name(debug, "debug"); - exports2.debug = debug; - function error(message, properties = {}) { - command_1.issueCommand("error", utils_12.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - __name(error, "error"); - exports2.error = error; - function warning(message, properties = {}) { - command_1.issueCommand("warning", utils_12.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - __name(warning, "warning"); - exports2.warning = warning; - function notice(message, properties = {}) { - command_1.issueCommand("notice", utils_12.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - __name(notice, "notice"); - exports2.notice = notice; - function info(message) { - process.stdout.write(message + os.EOL); - } - __name(info, "info"); - exports2.info = info; - function startGroup(name) { - command_1.issue("group", name); - } - __name(startGroup, "startGroup"); - exports2.startGroup = startGroup; - function endGroup() { - command_1.issue("endgroup"); - } - __name(endGroup, "endGroup"); - exports2.endGroup = endGroup; - function group(name, fn) { - return __awaiter3(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - __name(group, "group"); - exports2.group = group; - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); - } - command_1.issueCommand("save-state", { name }, utils_12.toCommandValue(value)); - } - __name(saveState, "saveState"); - exports2.saveState = saveState; - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - __name(getState, "getState"); - exports2.getState = getState; - function getIDToken(aud) { - return __awaiter3(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - __name(getIDToken, "getIDToken"); - exports2.getIDToken = getIDToken; - var summary_1 = require_summary(); - Object.defineProperty(exports2, "summary", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return summary_1.summary; - }, "get") }); - var summary_2 = require_summary(); - Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return summary_2.markdownSummary; - }, "get") }); - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return path_utils_1.toPosixPath; - }, "get") }); - Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return path_utils_1.toWin32Path; - }, "get") }); - Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return path_utils_1.toPlatformPath; - }, "get") }); - } -}); - -// ../node_modules/@actions/github/lib/context.js -var require_context = __commonJS({ - "../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 { - static { - __name(this, "Context"); - } - /** - * 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 path2 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path2} 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.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/github/lib/internal/utils.js -var require_utils3 = __commonJS({ - "../node_modules/@actions/github/lib/internal/utils.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar3(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + __name(toPosixPath, "toPosixPath"); + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + __name(toWin32Path, "toWin32Path"); + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + __name(toPlatformPath, "toPlatformPath"); + exports2.toPlatformPath = toPlatformPath; + } +}); + +// ../node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ + "../node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + 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 fs2 = __importStar3(require("fs")); + var path2 = __importStar3(require("path")); + _a = fs2.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; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter3(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + __name(exists, "exists"); + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter3(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + __name(isDirectory, "isDirectory"); + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + __name(isRooted, "isRooted"); + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter3(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + __name(tryGetExecutablePath, "tryGetExecutablePath"); + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + __name(normalizeSeparators, "normalizeSeparators"); + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + __name(isUnixExecutable, "isUnixExecutable"); + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + __name(getCmdPath, "getCmdPath"); + exports2.getCmdPath = getCmdPath; + } +}); + +// ../node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ + "../node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + 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 path2 = __importStar3(require("path")); + var ioUtil = __importStar3(require_io_util()); + function cp(source, dest, options = {}) { + return __awaiter3(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + __name(cp, "cp"); + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter3(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + __name(mv, "mv"); + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter3(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + __name(rmRF, "rmRF"); + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter3(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + __name(mkdirP, "mkdirP"); + exports2.mkdirP = mkdirP; + function which(tool, check) { + return __awaiter3(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + __name(which, "which"); + exports2.which = which; + function findInPath(tool) { + return __awaiter3(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + __name(findInPath, "findInPath"); + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + __name(readCopyOptions, "readCopyOptions"); + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter3(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + __name(cpDirRecursive, "cpDirRecursive"); + function copyFile(srcFile, destFile, force) { + return __awaiter3(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + __name(copyFile, "copyFile"); + } +}); + +// ../node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ + "../node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar3(require("os")); + var events = __importStar3(require("events")); + var child = __importStar3(require("child_process")); + var path2 = __importStar3(require("path")); + var io2 = __importStar3(require_io()); + var ioUtil = __importStar3(require_io_util()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + static { + __name(this, "ToolRunner"); + } + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter3(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io2.which(this.toolPath, true); + return new Promise((resolve, reject) => __awaiter3(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } else { + resolve(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + __name(append, "append"); + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + __name(argStringToArray, "argStringToArray"); + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + static { + __name(this, "ExecState"); + } + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// ../node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "../node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar3(require_toolrunner()); + function exec(commandLine, args, options) { + return __awaiter3(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + __name(exec, "exec"); + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter3(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 originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = /* @__PURE__ */ __name((data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }, "stdErrListener"); + const stdOutListener = /* @__PURE__ */ __name((data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }, "stdOutListener"); + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + __name(getExecOutput, "getExecOutput"); + exports2.getExecOutput = getExecOutput; + } +}); + +// ../node_modules/@actions/core/lib/platform.js +var require_platform = __commonJS({ + "../node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar3(require_exec()); + var getWindowsInfo = /* @__PURE__ */ __name(() => __awaiter3(void 0, void 0, void 0, function* () { + const { stdout: version3 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version3.trim() + }; + }), "getWindowsInfo"); + var getMacOsInfo = /* @__PURE__ */ __name(() => __awaiter3(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version3 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[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, + version: version3 + }; + }), "getMacOsInfo"); + var getLinuxInfo = /* @__PURE__ */ __name(() => __awaiter3(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version3] = stdout.trim().split("\n"); + return { + name, + version: version3 + }; + }), "getLinuxInfo"); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter3(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + __name(getDetails, "getDetails"); + exports2.getDetails = getDetails; + } +}); + +// ../node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ + "../node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + 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.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command(); + var file_command_1 = require_file_command(); + var utils_12 = require_utils(); + var os = __importStar3(require("os")); + var path2 = __importStar3(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 exportVariable(name, val) { + const convertedVal = (0, utils_12.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + __name(exportVariable, "exportVariable"); + exports2.exportVariable = exportVariable; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + __name(setSecret, "setSecret"); + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + __name(addPath, "addPath"); + exports2.addPath = addPath; + function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + __name(getInput, "getInput"); + exports2.getInput = getInput; + function getMultilineInput(name, options) { + const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + __name(getMultilineInput, "getMultilineInput"); + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + __name(getBooleanInput, "getBooleanInput"); + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_12.toCommandValue)(value)); + } + __name(setOutput, "setOutput"); + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + __name(setCommandEcho, "setCommandEcho"); + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + __name(setFailed2, "setFailed"); + exports2.setFailed = setFailed2; + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + __name(isDebug, "isDebug"); + exports2.isDebug = isDebug; + function debug(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + __name(debug, "debug"); + exports2.debug = debug; + function error(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_12.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + __name(error, "error"); + exports2.error = error; + function warning(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_12.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + __name(warning, "warning"); + exports2.warning = warning; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_12.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + __name(notice, "notice"); + exports2.notice = notice; + function info(message) { + process.stdout.write(message + os.EOL); + } + __name(info, "info"); + exports2.info = info; + function startGroup(name) { + (0, command_1.issue)("group", name); + } + __name(startGroup, "startGroup"); + exports2.startGroup = startGroup; + function endGroup() { + (0, command_1.issue)("endgroup"); + } + __name(endGroup, "endGroup"); + exports2.endGroup = endGroup; + function group(name, fn) { + return __awaiter3(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + __name(group, "group"); + exports2.group = group; + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_12.toCommandValue)(value)); + } + __name(saveState, "saveState"); + exports2.saveState = saveState; + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + __name(getState, "getState"); + exports2.getState = getState; + function getIDToken(aud) { + return __awaiter3(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + __name(getIDToken, "getIDToken"); + exports2.getIDToken = getIDToken; + var summary_1 = require_summary(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return summary_1.summary; + }, "get") }); + var summary_2 = require_summary(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return summary_2.markdownSummary; + }, "get") }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return path_utils_1.toPosixPath; + }, "get") }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return path_utils_1.toWin32Path; + }, "get") }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return path_utils_1.toPlatformPath; + }, "get") }); + exports2.platform = __importStar3(require_platform()); + } +}); + +// ../node_modules/@actions/github/lib/context.js +var require_context = __commonJS({ + "../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 { + static { + __name(this, "Context"); + } + /** + * 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 path2 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path2} 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.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/github/lib/internal/utils.js +var require_utils3 = __commonJS({ + "../node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -20227,7 +21077,7 @@ var require_dist_node2 = __commonJS({ } } __name(expand, "expand"); - function parse3(options) { + function parse2(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -20290,9 +21140,9 @@ var require_dist_node2 = __commonJS({ options.request ? { request: options.request } : null ); } - __name(parse3, "parse"); + __name(parse2, "parse"); function endpointWithDefaults(defaults, route, options) { - return parse3(merge(defaults, route, options)); + return parse2(merge(defaults, route, options)); } __name(endpointWithDefaults, "endpointWithDefaults"); function withDefaults(oldDefaults, newDefaults) { @@ -20302,7 +21152,7 @@ var require_dist_node2 = __commonJS({ DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), merge: merge.bind(null, DEFAULTS2), - parse: parse3 + parse: parse2 }); } __name(withDefaults, "withDefaults"); @@ -23760,456 +24610,11 @@ var require_github = __commonJS({ } }); -// ../node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ - "../node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - 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 fs2 = __importStar3(require("fs")); - var path2 = __importStar3(require("path")); - _a = fs2.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; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter3(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - __name(exists, "exists"); - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter3(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - __name(isDirectory, "isDirectory"); - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - __name(isRooted, "isRooted"); - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter3(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - __name(tryGetExecutablePath, "tryGetExecutablePath"); - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - __name(normalizeSeparators, "normalizeSeparators"); - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - __name(isUnixExecutable, "isUnixExecutable"); - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - __name(getCmdPath, "getCmdPath"); - exports2.getCmdPath = getCmdPath; - } -}); - -// ../node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ - "../node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - 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 path2 = __importStar3(require("path")); - var ioUtil = __importStar3(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter3(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - __name(cp, "cp"); - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter3(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - __name(mv, "mv"); - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter3(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - __name(rmRF, "rmRF"); - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter3(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - __name(mkdirP, "mkdirP"); - exports2.mkdirP = mkdirP; - function which(tool, check) { - return __awaiter3(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - __name(which, "which"); - exports2.which = which; - function findInPath(tool) { - return __awaiter3(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - __name(findInPath, "findInPath"); - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - __name(readCopyOptions, "readCopyOptions"); - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter3(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - __name(cpDirRecursive, "cpDirRecursive"); - function copyFile(srcFile, destFile, force) { - return __awaiter3(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - __name(copyFile, "copyFile"); - } -}); - // ../common/cli.json -var version2, checksum; +var version, checksum; var init_cli = __esm({ "../common/cli.json"() { - version2 = "2024.2.6"; + version = "2024.2.6"; checksum = { windows_x86_64: "a63c618048aaab42c7448e5307f53cc8046d744f27cc769074529daf4bb09a8f", linux_arm64: "77189751f3c04205613dde5890bae7c47143cb68c1cf542524d8c5b59aeccf8b", @@ -34274,7 +34679,7 @@ function getQodanaUrl(arch, platform, nightly = false) { throw new Error(`Unsupported architecture: ${arch}`); } const archive = platform === "windows" ? "zip" : "tar.gz"; - const cli_version = nightly ? "nightly" : `v${version2}`; + const cli_version = nightly ? "nightly" : `v${version}`; return `https://github.com/JetBrains/qodana-cli/releases/download/${cli_version}/qodana_${platform}_${arch}.${archive}`; } function isExecutionSuccessful(exitCode) { @@ -34357,7 +34762,7 @@ function getCoverageFromSarif(sarifPath) { throw new Error(`SARIF file not found: ${sarifPath}`); } function sha256sum(file) { - const hash = (0, import_crypto4.createHash)("sha256"); + const hash = (0, import_crypto.createHash)("sha256"); hash.update(fs.readFileSync(file)); return hash.digest("hex"); } @@ -34407,12 +34812,12 @@ async function compressFolder(srcDir, destFile) { zip.generateNodeStream({ streamFiles: true, compression: "DEFLATE" }).pipe(fs.createWriteStream(destFile)).on("error", (err) => reject(err)).on("finish", resolve); }); } -var import_crypto4, fs, import_path, import_jszip, import_util, readdir2, stat2, mkdir2, SUPPORTED_PLATFORMS, SUPPORTED_ARCHS, FAIL_THRESHOLD_OUTPUT, QODANA_SARIF_NAME, QODANA_SHORT_SARIF_NAME, QODANA_REPORT_URL_NAME, QODANA_OPEN_IN_IDE_NAME, QODANA_LICENSES_MD, QODANA_LICENSES_JSON, EXECUTABLE, VERSION, COVERAGE_THRESHOLD, QodanaExitCode, NONE, BRANCH, PULL_REQUEST; +var import_crypto, fs, import_path, import_jszip, import_util, readdir2, stat2, mkdir2, SUPPORTED_PLATFORMS, SUPPORTED_ARCHS, FAIL_THRESHOLD_OUTPUT, QODANA_SARIF_NAME, QODANA_SHORT_SARIF_NAME, QODANA_REPORT_URL_NAME, QODANA_OPEN_IN_IDE_NAME, QODANA_LICENSES_MD, QODANA_LICENSES_JSON, EXECUTABLE, VERSION, COVERAGE_THRESHOLD, QodanaExitCode, NONE, BRANCH, PULL_REQUEST; var init_qodana = __esm({ "../common/qodana.ts"() { "use strict"; init_cli(); - import_crypto4 = require("crypto"); + import_crypto = require("crypto"); fs = __toESM(require("fs")); import_path = __toESM(require("path")); import_jszip = __toESM(require_lib4()); @@ -34430,7 +34835,7 @@ var init_qodana = __esm({ QODANA_LICENSES_MD = "thirdPartySoftwareList.md"; QODANA_LICENSES_JSON = "third-party-libraries.json"; EXECUTABLE = "qodana"; - VERSION = version2; + VERSION = version; COVERAGE_THRESHOLD = 50; __name(getQodanaSha256, "getQodanaSha256"); __name(getProcessArchName, "getProcessArchName"); @@ -34459,615 +34864,6 @@ var init_qodana = __esm({ } }); -// ../node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ - "../node_modules/@actions/exec/lib/toolrunner.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar3(require("os")); - var events = __importStar3(require("events")); - var child = __importStar3(require("child_process")); - var path2 = __importStar3(require("path")); - var io2 = __importStar3(require_io()); - var ioUtil = __importStar3(require_io_util()); - var timers_1 = require("timers"); - var IS_WINDOWS = process.platform === "win32"; - var ToolRunner = class extends events.EventEmitter { - static { - __name(this, "ToolRunner"); - } - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS) { - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } else { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env["COMSPEC"] || "cmd.exe"; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - if (!arg) { - return '""'; - } - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - } - if (!needsQuotes) { - return arg; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) { - return '""'; - } - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { - return arg; - } - if (!arg.includes('"') && !arg.includes("\\")) { - return `"${arg}"`; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += "\\"; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter3(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - this.toolPath = yield io2.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter3(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp.stdout) { - cp.stdout.on("data", (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ""; - if (cp.stderr) { - cp.stderr.on("data", (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on("error", (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on("exit", (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on("close", (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on("done", (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit("stdline", stdbuffer); - } - if (errbuffer.length > 0) { - this.emit("errline", errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error("child process missing stdin"); - } - cp.stdin.end(this.options.input); - } - })); - }); - } - }; - exports2.ToolRunner = ToolRunner; - function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c) { - if (escaped && c !== '"') { - arg += "\\"; - } - arg += c; - escaped = false; - } - __name(append, "append"); - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } else { - append(c); - } - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; - } - __name(argStringToArray, "argStringToArray"); - exports2.argStringToArray = argStringToArray; - var ExecState = class _ExecState extends events.EventEmitter { - static { - __name(this, "ExecState"); - } - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error("toolPath must not be empty"); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } - }; - } -}); - -// ../node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ - "../node_modules/@actions/exec/lib/exec.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; - var string_decoder_1 = require("string_decoder"); - var tr = __importStar3(require_toolrunner()); - function exec(commandLine, args, options) { - return __awaiter3(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - __name(exec, "exec"); - exports2.exec = exec; - function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter3(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 originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = /* @__PURE__ */ __name((data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }, "stdErrListener"); - const stdOutListener = /* @__PURE__ */ __name((data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }, "stdOutListener"); - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - __name(getExecOutput, "getExecOutput"); - exports2.getExecOutput = getExecOutput; - } -}); - // ../node_modules/@actions/glob/lib/internal-glob-options-helper.js var require_internal_glob_options_helper = __commonJS({ "../node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { @@ -35796,9 +35592,9 @@ var require_minimatch = __commonJS({ throw new TypeError("pattern is too long"); } }, "assertValidPattern"); - Minimatch.prototype.parse = parse3; + Minimatch.prototype.parse = parse2; var SUBPARSE = {}; - function parse3(pattern, isSub) { + function parse2(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { @@ -36032,7 +35828,7 @@ var require_minimatch = __commonJS({ regExp._src = re2; return regExp; } - __name(parse3, "parse"); + __name(parse2, "parse"); minimatch.makeRe = function(pattern, options) { return new Minimatch(pattern, options || {}).makeRe(); }; @@ -36971,77 +36767,77 @@ var require_semver = __commonJS({ } } var i; - exports2.parse = parse3; - function parse3(version4, options) { + exports2.parse = parse2; + function parse2(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version4 instanceof SemVer) { - return version4; + if (version3 instanceof SemVer) { + return version3; } - if (typeof version4 !== "string") { + if (typeof version3 !== "string") { return null; } - if (version4.length > MAX_LENGTH) { + if (version3.length > MAX_LENGTH) { return null; } var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version4)) { + if (!r.test(version3)) { return null; } try { - return new SemVer(version4, options); + return new SemVer(version3, options); } catch (er) { return null; } } - __name(parse3, "parse"); + __name(parse2, "parse"); exports2.valid = valid; - function valid(version4, options) { - var v = parse3(version4, options); + function valid(version3, options) { + var v = parse2(version3, options); return v ? v.version : null; } __name(valid, "valid"); exports2.clean = clean; - function clean(version4, options) { - var s = parse3(version4.trim().replace(/^[=v]+/, ""), options); + function clean(version3, options) { + var s = parse2(version3.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports2.SemVer = SemVer; - function SemVer(version4, options) { + function SemVer(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version4 instanceof SemVer) { - if (version4.loose === options.loose) { - return version4; + if (version3 instanceof SemVer) { + if (version3.loose === options.loose) { + return version3; } else { - version4 = version4.version; + version3 = version3.version; } - } else if (typeof version4 !== "string") { - throw new TypeError("Invalid Version: " + version4); + } else if (typeof version3 !== "string") { + throw new TypeError("Invalid Version: " + version3); } - if (version4.length > MAX_LENGTH) { + if (version3.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { - return new SemVer(version4, options); + return new SemVer(version3, options); } - debug("SemVer", version4, options); + debug("SemVer", version3, options); this.options = options; this.loose = !!options.loose; - var m = version4.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + var m = version3.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { - throw new TypeError("Invalid Version: " + version4); + throw new TypeError("Invalid Version: " + version3); } - this.raw = version4; + this.raw = version3; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; @@ -37229,13 +37025,13 @@ var require_semver = __commonJS({ return this; }; exports2.inc = inc; - function inc(version4, release, loose, identifier) { + function inc(version3, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { - return new SemVer(version4, loose).inc(release, identifier).version; + return new SemVer(version3, loose).inc(release, identifier).version; } catch (er) { return null; } @@ -37246,16 +37042,16 @@ var require_semver = __commonJS({ if (eq(version1, version22)) { return null; } else { - var v13 = parse3(version1); - var v2 = parse3(version22); + var v12 = parse2(version1); + var v2 = parse2(version22); var prefix = ""; - if (v13.prerelease.length || v2.prerelease.length) { + if (v12.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } - for (var key in v13) { + for (var key in v12) { if (key === "major" || key === "minor" || key === "patch") { - if (v13[key] !== v2[key]) { + if (v12[key] !== v2[key]) { return prefix + key; } } @@ -37447,19 +37243,19 @@ var require_semver = __commonJS({ Comparator.prototype.toString = function() { return this.value; }; - Comparator.prototype.test = function(version4) { - debug("Comparator.test", version4, this.options.loose); - if (this.semver === ANY || version4 === ANY) { + Comparator.prototype.test = function(version3) { + debug("Comparator.test", version3, this.options.loose); + if (this.semver === ANY || version3 === ANY) { return true; } - if (typeof version4 === "string") { + if (typeof version3 === "string") { try { - version4 = new SemVer(version4, this.options); + version3 = new SemVer(version3, this.options); } catch (er) { return false; } } - return cmp(version4, this.operator, this.semver, this.options); + return cmp(version3, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { @@ -37782,31 +37578,31 @@ var require_semver = __commonJS({ return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); - Range.prototype.test = function(version4) { - if (!version4) { + Range.prototype.test = function(version3) { + if (!version3) { return false; } - if (typeof version4 === "string") { + if (typeof version3 === "string") { try { - version4 = new SemVer(version4, this.options); + version3 = new SemVer(version3, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { - if (testSet(this.set[i2], version4, this.options)) { + if (testSet(this.set[i2], version3, this.options)) { return true; } } return false; }; - function testSet(set, version4, options) { + function testSet(set, version3, options) { for (var i2 = 0; i2 < set.length; i2++) { - if (!set[i2].test(version4)) { + if (!set[i2].test(version3)) { return false; } } - if (version4.prerelease.length && !options.includePrerelease) { + if (version3.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { @@ -37814,7 +37610,7 @@ var require_semver = __commonJS({ } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; - if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) { + if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } } @@ -37825,13 +37621,13 @@ var require_semver = __commonJS({ } __name(testSet, "testSet"); exports2.satisfies = satisfies; - function satisfies(version4, range, options) { + function satisfies(version3, range, options) { try { range = new Range(range, options); } catch (er) { return false; } - return range.test(version4); + return range.test(version3); } __name(satisfies, "satisfies"); exports2.maxSatisfying = maxSatisfying; @@ -37930,18 +37726,18 @@ var require_semver = __commonJS({ } __name(validRange, "validRange"); exports2.ltr = ltr; - function ltr(version4, range, options) { - return outside(version4, range, "<", options); + function ltr(version3, range, options) { + return outside(version3, range, "<", options); } __name(ltr, "ltr"); exports2.gtr = gtr; - function gtr(version4, range, options) { - return outside(version4, range, ">", options); + function gtr(version3, range, options) { + return outside(version3, range, ">", options); } __name(gtr, "gtr"); exports2.outside = outside; - function outside(version4, range, hilo, options) { - version4 = new SemVer(version4, options); + function outside(version3, range, hilo, options) { + version3 = new SemVer(version3, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { @@ -37962,7 +37758,7 @@ var require_semver = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies(version4, range, options)) { + if (satisfies(version3, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { @@ -37984,9 +37780,9 @@ var require_semver = __commonJS({ if (high.operator === comp || high.operator === ecomp) { return false; } - if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) { + if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { return false; - } else if (low.operator === ecomp && ltfn(version4, low.semver)) { + } else if (low.operator === ecomp && ltfn(version3, low.semver)) { return false; } } @@ -37994,8 +37790,8 @@ var require_semver = __commonJS({ } __name(outside, "outside"); exports2.prerelease = prerelease; - function prerelease(version4, options) { - var parsed = parse3(version4, options); + function prerelease(version3, options) { + var parsed = parse2(version3, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); @@ -38007,23 +37803,23 @@ var require_semver = __commonJS({ } __name(intersects, "intersects"); exports2.coerce = coerce; - function coerce(version4, options) { - if (version4 instanceof SemVer) { - return version4; + function coerce(version3, options) { + if (version3 instanceof SemVer) { + return version3; } - if (typeof version4 === "number") { - version4 = String(version4); + if (typeof version3 === "number") { + version3 = String(version3); } - if (typeof version4 !== "string") { + if (typeof version3 !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { - match = version4.match(safeRe[t.COERCE]); + match = version3.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) { + while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } @@ -38034,169 +37830,12 @@ var require_semver = __commonJS({ if (match === null) { return null; } - return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } }); -// ../node_modules/uuid/lib/rng.js -var require_rng = __commonJS({ - "../node_modules/uuid/lib/rng.js"(exports2, module2) { - var crypto7 = require("crypto"); - module2.exports = /* @__PURE__ */ __name(function nodeRNG() { - return crypto7.randomBytes(16); - }, "nodeRNG"); - } -}); - -// ../node_modules/uuid/lib/bytesToUuid.js -var require_bytesToUuid = __commonJS({ - "../node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { - var byteToHex3 = []; - for (i = 0; i < 256; ++i) { - byteToHex3[i] = (i + 256).toString(16).substr(1); - } - var i; - function bytesToUuid(buf, offset) { - var i2 = offset || 0; - var bth = byteToHex3; - return [ - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]] - ].join(""); - } - __name(bytesToUuid, "bytesToUuid"); - module2.exports = bytesToUuid; - } -}); - -// ../node_modules/uuid/v1.js -var require_v1 = __commonJS({ - "../node_modules/uuid/v1.js"(exports2, module2) { - var rng3 = require_rng(); - var bytesToUuid = require_bytesToUuid(); - var _nodeId3; - var _clockseq3; - var _lastMSecs3 = 0; - var _lastNSecs3 = 0; - function v13(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - options = options || {}; - var node = options.node || _nodeId3; - var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; - if (node == null || clockseq == null) { - var seedBytes = rng3(); - if (node == null) { - node = _nodeId3 = [ - seedBytes[0] | 1, - seedBytes[1], - seedBytes[2], - seedBytes[3], - seedBytes[4], - seedBytes[5] - ]; - } - if (clockseq == null) { - clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; - } - } - var msecs = options.msecs !== void 0 ? options.msecs : (/* @__PURE__ */ new Date()).getTime(); - var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; - var dt = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; - if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; - } - if ((dt < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { - nsecs = 0; - } - if (nsecs >= 1e4) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs3 = msecs; - _lastNSecs3 = nsecs; - _clockseq3 = clockseq; - msecs += 122192928e5; - var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; - b[i++] = tl & 255; - var tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; - b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; - b[i++] = clockseq & 255; - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - return buf ? buf : bytesToUuid(b); - } - __name(v13, "v1"); - module2.exports = v13; - } -}); - -// ../node_modules/uuid/v4.js -var require_v4 = __commonJS({ - "../node_modules/uuid/v4.js"(exports2, module2) { - var rng3 = require_rng(); - var bytesToUuid = require_bytesToUuid(); - function v43(options, buf, offset) { - var i = buf && offset || 0; - if (typeof options == "string") { - buf = options === "binary" ? new Array(16) : null; - options = null; - } - options = options || {}; - var rnds = options.random || (options.rng || rng3)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - return buf || bytesToUuid(rnds); - } - __name(v43, "v4"); - module2.exports = v43; - } -}); - -// ../node_modules/uuid/index.js -var require_uuid = __commonJS({ - "../node_modules/uuid/index.js"(exports2, module2) { - var v13 = require_v1(); - var v43 = require_v4(); - var uuid = v43; - uuid.v1 = v13; - uuid.v4 = v43; - module2.exports = uuid; - } -}); - // ../node_modules/@actions/cache/lib/internal/constants.js var require_constants7 = __commonJS({ "../node_modules/@actions/cache/lib/internal/constants.js"(exports2) { @@ -38318,11 +37957,11 @@ var require_cacheUtils = __commonJS({ var exec = __importStar3(require_exec()); var glob = __importStar3(require_glob()); var io2 = __importStar3(require_io()); + var crypto4 = __importStar3(require("crypto")); var fs2 = __importStar3(require("fs")); var path2 = __importStar3(require("path")); var semver = __importStar3(require_semver()); var util = __importStar3(require("util")); - var uuid_1 = require_uuid(); var constants_1 = require_constants7(); function createTempDirectory() { return __awaiter3(this, void 0, void 0, function* () { @@ -38341,7 +37980,7 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path2.join(baseLocation, "actions", "temp"); } - const dest = path2.join(tempDirectory, (0, uuid_1.v4)()); + const dest = path2.join(tempDirectory, crypto4.randomUUID()); yield io2.mkdirP(dest); return dest; }); @@ -38422,8 +38061,8 @@ var require_cacheUtils = __commonJS({ function getCompressionMethod() { return __awaiter3(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); - const version4 = semver.clean(versionOutput); - core2.debug(`zstd version: ${version4}`); + const version3 = semver.clean(versionOutput); + core2.debug(`zstd version: ${version3}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -38470,96 +38109,96 @@ var require_cacheUtils = __commonJS({ }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js -function rng2() { - if (poolPtr2 > rnds8Pool2.length - 16) { - import_crypto5.default.randomFillSync(rnds8Pool2); - poolPtr2 = 0; +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto2.default.randomFillSync(rnds8Pool); + poolPtr = 0; } - return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); + return rnds8Pool.slice(poolPtr, poolPtr += 16); } -var import_crypto5, rnds8Pool2, poolPtr2; -var init_rng2 = __esm({ +var import_crypto2, rnds8Pool, poolPtr; +var init_rng = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js"() { - import_crypto5 = __toESM(require("crypto")); - rnds8Pool2 = new Uint8Array(256); - poolPtr2 = rnds8Pool2.length; - __name(rng2, "rng"); + import_crypto2 = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + __name(rng, "rng"); } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js -var regex_default2; -var init_regex2 = __esm({ +var regex_default; +var init_regex = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js"() { - regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js -function validate2(uuid) { - return typeof uuid === "string" && regex_default2.test(uuid); +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); } -var validate_default2; -var init_validate2 = __esm({ +var validate_default; +var init_validate = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js"() { - init_regex2(); - __name(validate2, "validate"); - validate_default2 = validate2; + init_regex(); + __name(validate, "validate"); + validate_default = validate; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js -function stringify2(arr, offset = 0) { - const uuid = (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); - if (!validate_default2(uuid)) { +function stringify(arr, offset = 0) { + const uuid = (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(); + if (!validate_default(uuid)) { throw TypeError("Stringified UUID is invalid"); } return uuid; } -var byteToHex2, stringify_default2; -var init_stringify2 = __esm({ +var byteToHex, stringify_default; +var init_stringify = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js"() { - init_validate2(); - byteToHex2 = []; + init_validate(); + byteToHex = []; for (let i = 0; i < 256; ++i) { - byteToHex2.push((i + 256).toString(16).substr(1)); + byteToHex.push((i + 256).toString(16).substr(1)); } - __name(stringify2, "stringify"); - stringify_default2 = stringify2; + __name(stringify, "stringify"); + stringify_default = stringify; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js -function v12(options, buf, offset) { +function v1(options, buf, offset) { let i = buf && offset || 0; const b = buf || new Array(16); options = options || {}; - let node = options.node || _nodeId2; - let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng2)(); + const seedBytes = options.random || (options.rng || rng)(); if (node == null) { - node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } if (clockseq == null) { - clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); - let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; - const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } - if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } - _lastMSecs2 = msecs; - _lastNSecs2 = nsecs; - _clockseq2 = clockseq; + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; @@ -38576,23 +38215,23 @@ function v12(options, buf, offset) { for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } - return buf || stringify_default2(b); + return buf || stringify_default(b); } -var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; -var init_v12 = __esm({ +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js"() { - init_rng2(); - init_stringify2(); - _lastMSecs2 = 0; - _lastNSecs2 = 0; - __name(v12, "v1"); - v1_default2 = v12; + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + __name(v1, "v1"); + v1_default = v1; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js -function parse2(uuid) { - if (!validate_default2(uuid)) { +function parse(uuid) { + if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } let v; @@ -38615,17 +38254,17 @@ function parse2(uuid) { arr[15] = v & 255; return arr; } -var parse_default2; -var init_parse2 = __esm({ +var parse_default; +var init_parse = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js"() { - init_validate2(); - __name(parse2, "parse"); - parse_default2 = parse2; + init_validate(); + __name(parse, "parse"); + parse_default = parse; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes2(str) { +function stringToBytes(str) { str = unescape(encodeURIComponent(str)); const bytes = []; for (let i = 0; i < str.length; ++i) { @@ -38633,13 +38272,13 @@ function stringToBytes2(str) { } return bytes; } -function v35_default2(name, version4, hashfunc) { +function v35_default(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { - value = stringToBytes2(value); + value = stringToBytes(value); } if (typeof namespace === "string") { - namespace = parse_default2(namespace); + namespace = parse_default(namespace); } if (namespace.length !== 16) { throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); @@ -38648,7 +38287,7 @@ function v35_default2(name, version4, hashfunc) { bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version4; + bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; @@ -38657,62 +38296,62 @@ function v35_default2(name, version4, hashfunc) { } return buf; } - return stringify_default2(bytes); + return stringify_default(bytes); } __name(generateUUID, "generateUUID"); try { generateUUID.name = name; } catch (err) { } - generateUUID.DNS = DNS2; - generateUUID.URL = URL3; + generateUUID.DNS = DNS; + generateUUID.URL = URL2; return generateUUID; } -var DNS2, URL3; -var init_v352 = __esm({ +var DNS, URL2; +var init_v35 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js"() { - init_stringify2(); - init_parse2(); - __name(stringToBytes2, "stringToBytes"); - DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - __name(v35_default2, "default"); + init_stringify(); + init_parse(); + __name(stringToBytes, "stringToBytes"); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + __name(v35_default, "default"); } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js -function md52(bytes) { +function md5(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } - return import_crypto6.default.createHash("md5").update(bytes).digest(); + return import_crypto3.default.createHash("md5").update(bytes).digest(); } -var import_crypto6, md5_default2; -var init_md52 = __esm({ +var import_crypto3, md5_default; +var init_md5 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js"() { - import_crypto6 = __toESM(require("crypto")); - __name(md52, "md5"); - md5_default2 = md52; + import_crypto3 = __toESM(require("crypto")); + __name(md5, "md5"); + md5_default = md5; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js -var v32, v3_default2; -var init_v32 = __esm({ +var v3, v3_default; +var init_v3 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js"() { - init_v352(); - init_md52(); - v32 = v35_default2("v3", 48, md5_default2); - v3_default2 = v32; + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js -function v42(options, buf, offset) { +function v4(options, buf, offset) { options = options || {}; - const rnds = options.random || (options.rng || rng2)(); + const rnds = options.random || (options.rng || rng)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { @@ -38722,95 +38361,95 @@ function v42(options, buf, offset) { } return buf; } - return stringify_default2(rnds); + return stringify_default(rnds); } -var v4_default2; -var init_v42 = __esm({ +var v4_default; +var init_v4 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js"() { - init_rng2(); - init_stringify2(); - __name(v42, "v4"); - v4_default2 = v42; + init_rng(); + init_stringify(); + __name(v4, "v4"); + v4_default = v4; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js -function sha12(bytes) { +function sha1(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } - return import_crypto7.default.createHash("sha1").update(bytes).digest(); + return import_crypto4.default.createHash("sha1").update(bytes).digest(); } -var import_crypto7, sha1_default2; -var init_sha12 = __esm({ +var import_crypto4, sha1_default; +var init_sha1 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js"() { - import_crypto7 = __toESM(require("crypto")); - __name(sha12, "sha1"); - sha1_default2 = sha12; + import_crypto4 = __toESM(require("crypto")); + __name(sha1, "sha1"); + sha1_default = sha1; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js -var v52, v5_default2; -var init_v52 = __esm({ +var v5, v5_default; +var init_v5 = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js"() { - init_v352(); - init_sha12(); - v52 = v35_default2("v5", 80, sha1_default2); - v5_default2 = v52; + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js -var nil_default2; -var init_nil2 = __esm({ +var nil_default; +var init_nil = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js"() { - nil_default2 = "00000000-0000-0000-0000-000000000000"; + nil_default = "00000000-0000-0000-0000-000000000000"; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js -function version3(uuid) { - if (!validate_default2(uuid)) { +function version2(uuid) { + if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } return parseInt(uuid.substr(14, 1), 16); } -var version_default2; -var init_version2 = __esm({ +var version_default; +var init_version = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js"() { - init_validate2(); - __name(version3, "version"); - version_default2 = version3; + init_validate(); + __name(version2, "version"); + version_default = version2; } }); // ../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js -var esm_node_exports2 = {}; -__export(esm_node_exports2, { - NIL: () => nil_default2, - parse: () => parse_default2, - stringify: () => stringify_default2, - v1: () => v1_default2, - v3: () => v3_default2, - v4: () => v4_default2, - v5: () => v5_default2, - validate: () => validate_default2, - version: () => version_default2 -}); -var init_esm_node2 = __esm({ +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ "../node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js"() { - init_v12(); - init_v32(); - init_v42(); - init_v52(); - init_nil2(); - init_version2(); - init_validate2(); - init_stringify2(); - init_parse2(); + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); } }); @@ -39501,7 +39140,7 @@ var require_XMLDOMImplementation = __commonJS({ function XMLDOMImplementation2() { } __name(XMLDOMImplementation2, "XMLDOMImplementation"); - XMLDOMImplementation2.prototype.hasFeature = function(feature, version4) { + XMLDOMImplementation2.prototype.hasFeature = function(feature, version3) { return true; }; XMLDOMImplementation2.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { @@ -39513,7 +39152,7 @@ var require_XMLDOMImplementation = __commonJS({ XMLDOMImplementation2.prototype.createHTMLDocument = function(title) { throw new Error("This DOM method is not implemented."); }; - XMLDOMImplementation2.prototype.getFeature = function(feature, version4) { + XMLDOMImplementation2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented."); }; return XMLDOMImplementation2; @@ -40258,17 +39897,17 @@ var require_XMLDeclaration = __commonJS({ NodeType = require_NodeType(); module2.exports = XMLDeclaration = function(superClass) { extend(XMLDeclaration2, superClass); - function XMLDeclaration2(parent, version4, encoding, standalone) { + function XMLDeclaration2(parent, version3, encoding, standalone) { var ref; XMLDeclaration2.__super__.constructor.call(this, parent); - if (isObject(version4)) { - ref = version4, version4 = ref.version, encoding = ref.encoding, standalone = ref.standalone; + if (isObject(version3)) { + ref = version3, version3 = ref.version, encoding = ref.encoding, standalone = ref.standalone; } - if (!version4) { - version4 = "1.0"; + if (!version3) { + version3 = "1.0"; } this.type = NodeType.Declaration; - this.version = this.stringify.xmlVersion(version4); + this.version = this.stringify.xmlVersion(version3); if (encoding != null) { this.encoding = this.stringify.xmlEncoding(encoding); } @@ -41344,10 +40983,10 @@ var require_XMLNode = __commonJS({ Array.prototype.push.apply(this.parent.children, removed); return this; }; - XMLNode2.prototype.declaration = function(version4, encoding, standalone) { + XMLNode2.prototype.declaration = function(version3, encoding, standalone) { var doc, xmldec; doc = this.document(); - xmldec = new XMLDeclaration(doc, version4, encoding, standalone); + xmldec = new XMLDeclaration(doc, version3, encoding, standalone); if (doc.children.length === 0) { doc.children.unshift(xmldec); } else if (doc.children[0].type === NodeType.Declaration) { @@ -41471,8 +41110,8 @@ var require_XMLNode = __commonJS({ XMLNode2.prototype.doc = function() { return this.document(); }; - XMLNode2.prototype.dec = function(version4, encoding, standalone) { - return this.declaration(version4, encoding, standalone); + XMLNode2.prototype.dec = function(version3, encoding, standalone) { + return this.declaration(version3, encoding, standalone); }; XMLNode2.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); @@ -41519,7 +41158,7 @@ var require_XMLNode = __commonJS({ XMLNode2.prototype.normalize = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; - XMLNode2.prototype.isSupported = function(feature, version4) { + XMLNode2.prototype.isSupported = function(feature, version3) { return true; }; XMLNode2.prototype.hasAttributes = function() { @@ -41575,7 +41214,7 @@ var require_XMLNode = __commonJS({ } return true; }; - XMLNode2.prototype.getFeature = function(feature, version4) { + XMLNode2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.setUserData = function(key, data, handler) { @@ -42779,13 +42418,13 @@ var require_XMLDocumentCB = __commonJS({ } return this; }; - XMLDocumentCB2.prototype.declaration = function(version4, encoding, standalone) { + XMLDocumentCB2.prototype.declaration = function(version3, encoding, standalone) { var node; this.openCurrent(); if (this.documentStarted) { throw new Error("declaration() must be the first node."); } - node = new XMLDeclaration(this, version4, encoding, standalone); + node = new XMLDeclaration(this, version3, encoding, standalone); this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; @@ -42956,8 +42595,8 @@ var require_XMLDocumentCB = __commonJS({ XMLDocumentCB2.prototype.ins = function(target, value) { return this.instruction(target, value); }; - XMLDocumentCB2.prototype.dec = function(version4, encoding, standalone) { - return this.declaration(version4, encoding, standalone); + XMLDocumentCB2.prototype.dec = function(version3, encoding, standalone) { + return this.declaration(version3, encoding, standalone); }; XMLDocumentCB2.prototype.dtd = function(root, pubID, sysID) { return this.doctype(root, pubID, sysID); @@ -57358,8 +56997,8 @@ var require_URL = __commonJS({ var utils = require_utils6(); var Impl = require_URL_impl(); var impl = utils.implSymbol; - function URL4(url) { - if (!this || this[impl] || !(this instanceof URL4)) { + function URL3(url) { + if (!this || this[impl] || !(this instanceof URL3)) { throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); } if (arguments.length < 1) { @@ -57375,8 +57014,8 @@ var require_URL = __commonJS({ } module2.exports.setup(this, args); } - __name(URL4, "URL"); - URL4.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() { + __name(URL3, "URL"); + URL3.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() { if (!this || !module2.exports.is(this)) { throw new TypeError("Illegal invocation"); } @@ -57386,7 +57025,7 @@ var require_URL = __commonJS({ } return this[impl].toJSON.apply(this[impl], args); }, "toJSON"); - Object.defineProperty(URL4.prototype, "href", { + Object.defineProperty(URL3.prototype, "href", { get() { return this[impl].href; }, @@ -57397,20 +57036,20 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - URL4.prototype.toString = function() { + URL3.prototype.toString = function() { if (!this || !module2.exports.is(this)) { throw new TypeError("Illegal invocation"); } return this.href; }; - Object.defineProperty(URL4.prototype, "origin", { + Object.defineProperty(URL3.prototype, "origin", { get() { return this[impl].origin; }, enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "protocol", { + Object.defineProperty(URL3.prototype, "protocol", { get() { return this[impl].protocol; }, @@ -57421,7 +57060,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "username", { + Object.defineProperty(URL3.prototype, "username", { get() { return this[impl].username; }, @@ -57432,7 +57071,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "password", { + Object.defineProperty(URL3.prototype, "password", { get() { return this[impl].password; }, @@ -57443,7 +57082,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "host", { + Object.defineProperty(URL3.prototype, "host", { get() { return this[impl].host; }, @@ -57454,7 +57093,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "hostname", { + Object.defineProperty(URL3.prototype, "hostname", { get() { return this[impl].hostname; }, @@ -57465,7 +57104,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "port", { + Object.defineProperty(URL3.prototype, "port", { get() { return this[impl].port; }, @@ -57476,7 +57115,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "pathname", { + Object.defineProperty(URL3.prototype, "pathname", { get() { return this[impl].pathname; }, @@ -57487,7 +57126,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "search", { + Object.defineProperty(URL3.prototype, "search", { get() { return this[impl].search; }, @@ -57498,7 +57137,7 @@ var require_URL = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(URL4.prototype, "hash", { + Object.defineProperty(URL3.prototype, "hash", { get() { return this[impl].hash; }, @@ -57514,7 +57153,7 @@ var require_URL = __commonJS({ return !!obj && obj[impl] instanceof Impl.implementation; }, create(constructorArgs, privateData) { - let obj = Object.create(URL4.prototype); + let obj = Object.create(URL3.prototype); this.setup(obj, constructorArgs, privateData); return obj; }, @@ -57524,10 +57163,10 @@ var require_URL = __commonJS({ obj[impl] = new Impl.implementation(constructorArgs, privateData); obj[impl][utils.wrapperSymbol] = obj; }, - interface: URL4, + interface: URL3, expose: { - Window: { URL: URL4 }, - Worker: { URL: URL4 } + Window: { URL: URL3 }, + Worker: { URL: URL3 } } }; } @@ -58401,12 +58040,12 @@ var require_lib7 = __commonJS({ configurable: true }); var INTERNALS$2 = Symbol("Request internals"); - var URL4 = Url.URL || whatwgUrl.URL; + var URL3 = Url.URL || whatwgUrl.URL; var parse_url = Url.parse; var format_url = Url.format; function parseURL(urlStr) { if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL4(urlStr).toString(); + urlStr = new URL3(urlStr).toString(); } return parse_url(urlStr); } @@ -58851,7 +58490,7 @@ var init_platform = __esm({ // ../node_modules/@opentelemetry/api/build/esm/version.js var VERSION2; -var init_version3 = __esm({ +var init_version2 = __esm({ "../node_modules/@opentelemetry/api/build/esm/version.js"() { VERSION2 = "1.8.0"; } @@ -58926,7 +58565,7 @@ function _makeCompatibilityCheck(ownVersion) { var re, isCompatible; var init_semver = __esm({ "../node_modules/@opentelemetry/api/build/esm/internal/semver.js"() { - init_version3(); + init_version2(); re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; __name(_makeCompatibilityCheck, "_makeCompatibilityCheck"); isCompatible = _makeCompatibilityCheck(VERSION2); @@ -58975,7 +58614,7 @@ var major, GLOBAL_OPENTELEMETRY_API_KEY, _global; var init_global_utils = __esm({ "../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js"() { init_platform(); - init_version3(); + init_version2(); init_semver(); major = VERSION2.split(".")[0]; GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major); @@ -59948,10 +59587,10 @@ var init_ProxyTracer = __esm({ NOOP_TRACER = new NoopTracer(); ProxyTracer = /** @class */ function() { - function ProxyTracer2(_provider, name, version4, options) { + function ProxyTracer2(_provider, name, version3, options) { this._provider = _provider; this.name = name; - this.version = version4; + this.version = version3; this.options = options; } __name(ProxyTracer2, "ProxyTracer"); @@ -60008,9 +59647,9 @@ var init_ProxyTracerProvider = __esm({ function ProxyTracerProvider2() { } __name(ProxyTracerProvider2, "ProxyTracerProvider"); - ProxyTracerProvider2.prototype.getTracer = function(name, version4, options) { + ProxyTracerProvider2.prototype.getTracer = function(name, version3, options) { var _a; - return (_a = this.getDelegateTracer(name, version4, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version4, options); + return (_a = this.getDelegateTracer(name, version3, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version3, options); }; ProxyTracerProvider2.prototype.getDelegate = function() { var _a; @@ -60019,9 +59658,9 @@ var init_ProxyTracerProvider = __esm({ ProxyTracerProvider2.prototype.setDelegate = function(delegate) { this._delegate = delegate; }; - ProxyTracerProvider2.prototype.getDelegateTracer = function(name, version4, options) { + ProxyTracerProvider2.prototype.getDelegateTracer = function(name, version3, options) { var _a; - return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version4, options); + return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version3, options); }; return ProxyTracerProvider2; }(); @@ -60233,8 +59872,8 @@ var init_metrics = __esm({ MetricsAPI2.prototype.getMeterProvider = function() { return getGlobal(API_NAME3) || NOOP_METER_PROVIDER; }; - MetricsAPI2.prototype.getMeter = function(name, version4, options) { - return this.getMeterProvider().getMeter(name, version4, options); + MetricsAPI2.prototype.getMeter = function(name, version3, options) { + return this.getMeterProvider().getMeter(name, version3, options); }; MetricsAPI2.prototype.disable = function() { unregisterGlobal(API_NAME3, DiagAPI.instance()); @@ -60407,8 +60046,8 @@ var init_trace = __esm({ TraceAPI2.prototype.getTracerProvider = function() { return getGlobal(API_NAME5) || this._proxyTracerProvider; }; - TraceAPI2.prototype.getTracer = function(name, version4) { - return this.getTracerProvider().getTracer(name, version4); + TraceAPI2.prototype.getTracer = function(name, version3) { + return this.getTracerProvider().getTracer(name, version3); }; TraceAPI2.prototype.disable = function() { unregisterGlobal(API_NAME5, DiagAPI.instance()); @@ -60527,8 +60166,8 @@ var require_dist2 = __commonJS({ return api.trace.isSpanContextValid(context3); } __name(isSpanContextValid2, "isSpanContextValid"); - function getTracer(name, version4) { - return api.trace.getTracer(name || "azure/core-tracing", version4); + function getTracer(name, version3) { + return api.trace.getTracer(name || "azure/core-tracing", version3); } __name(getTracer, "getTracer"); var context2 = api.context; @@ -60583,8 +60222,8 @@ var require_dist2 = __commonJS({ if (parts.length !== 4) { return; } - const [version4, traceId, spanId, traceOptions] = parts; - if (version4 !== VERSION3) { + const [version3, traceId, spanId, traceOptions] = parts; + if (version3 !== VERSION3) { return; } const traceFlags = parseInt(traceOptions, 16); @@ -60631,7 +60270,7 @@ var require_dist3 = __commonJS({ "../node_modules/@azure/core-http/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var uuid = (init_esm_node2(), __toCommonJS(esm_node_exports2)); + var uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); var util = require("util"); var tslib = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var xml2js = require_xml2js(); @@ -63192,7 +62831,7 @@ var require_dist3 = __commonJS({ includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY }; - return parse3(jsonContentTypes, xmlContentTypes, response, updatedOptions).then((parsedResponse) => { + return parse2(jsonContentTypes, xmlContentTypes, response, updatedOptions).then((parsedResponse) => { if (!shouldDeserializeResponse(parsedResponse)) { return parsedResponse; } @@ -63286,7 +62925,7 @@ var require_dist3 = __commonJS({ return { error, shouldReturnResponse: false }; } __name(handleErrorResponse, "handleErrorResponse"); - function parse3(jsonContentTypes, xmlContentTypes, operationResponse, opts) { + function parse2(jsonContentTypes, xmlContentTypes, operationResponse, opts) { var _a; const errorHandler = /* @__PURE__ */ __name((err) => { const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; @@ -63313,7 +62952,7 @@ var require_dist3 = __commonJS({ } return Promise.resolve(operationResponse); } - __name(parse3, "parse"); + __name(parse2, "parse"); var DefaultKeepAliveOptions = { enable: true }; @@ -66460,7 +66099,7 @@ var require_dist4 = __commonJS({ var logger$1 = require_commonjs3(); var abortController = require_dist(); var os = require("os"); - var crypto7 = require("crypto"); + var crypto4 = require("crypto"); var stream = require("stream"); require_commonjs5(); var coreLro = require_commonjs6(); @@ -74940,7 +74579,7 @@ var require_dist4 = __commonJS({ } } }; - var version4 = { + var version3 = { parameterPath: "version", mapper: { defaultValue: "2023-11-03", @@ -76604,7 +76243,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId ], isXML: true, @@ -76632,7 +76271,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -76659,7 +76298,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -76689,7 +76328,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -76719,7 +76358,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId ], isXML: true, @@ -76741,7 +76380,7 @@ var require_dist4 = __commonJS({ }, queryParameters: [comp, restype1], urlParameters: [url], - headerParameters: [version4, accept1], + headerParameters: [version3, accept1], isXML: true, serializer: xmlSerializer$5 }; @@ -76767,7 +76406,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, contentLength, multipartContentType @@ -76799,7 +76438,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -77053,7 +76692,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, restype2], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -77079,7 +76718,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, restype2], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId @@ -77102,7 +76741,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, restype2], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -77131,7 +76770,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -77172,7 +76811,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId @@ -77202,7 +76841,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, access, leaseId, @@ -77233,7 +76872,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, deletedContainerName, @@ -77261,7 +76900,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, sourceContainerName, @@ -77296,7 +76935,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, contentLength, multipartContentType @@ -77329,7 +76968,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -77355,7 +76994,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -77386,7 +77025,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -77416,7 +77055,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -77446,7 +77085,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -77476,7 +77115,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -77512,7 +77151,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -77544,7 +77183,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -77565,7 +77204,7 @@ var require_dist4 = __commonJS({ }, queryParameters: [comp, restype1], urlParameters: [url], - headerParameters: [version4, accept1], + headerParameters: [version3, accept1], isXML: true, serializer: xmlSerializer$4 }; @@ -77911,7 +77550,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -77949,7 +77588,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -77985,7 +77624,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -78014,7 +77653,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp8], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -78036,7 +77675,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp11], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, expiryOptions, @@ -78060,7 +77699,7 @@ var require_dist4 = __commonJS({ queryParameters: [comp, timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -78094,7 +77733,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp12], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifUnmodifiedSince, @@ -78119,7 +77758,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp12], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1 ], @@ -78141,7 +77780,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp13], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, legalHold @@ -78164,7 +77803,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp6], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -78197,7 +77836,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp10], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -78227,7 +77866,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp10], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -78256,7 +77895,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp10], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -78285,7 +77924,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp10], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -78315,7 +77954,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp10], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -78344,7 +77983,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp14], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -78377,7 +78016,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -78419,7 +78058,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, metadata, @@ -78467,7 +78106,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -78499,7 +78138,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -78524,7 +78163,7 @@ var require_dist4 = __commonJS({ }, queryParameters: [comp, restype1], urlParameters: [url], - headerParameters: [version4, accept1], + headerParameters: [version3, accept1], isXML: true, serializer: xmlSerializer$3 }; @@ -78561,7 +78200,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, leaseId, ifModifiedSince, @@ -78599,7 +78238,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -78630,7 +78269,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, leaseId, ifTags, @@ -78809,7 +78448,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -78858,7 +78497,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp19], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, contentLength, leaseId, @@ -78899,7 +78538,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp19], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -78937,7 +78576,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp19], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -78991,7 +78630,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -79028,7 +78667,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -79058,7 +78697,7 @@ var require_dist4 = __commonJS({ queryParameters: [comp, timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -79091,7 +78730,7 @@ var require_dist4 = __commonJS({ queryParameters: [comp, timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -79121,7 +78760,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp21], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, ifModifiedSince, @@ -79227,7 +78866,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -79273,7 +78912,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp22], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, contentLength, leaseId, @@ -79311,7 +78950,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp22], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -79356,7 +78995,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds, comp23], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -79514,7 +79153,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, contentLength, metadata, @@ -79563,7 +79202,7 @@ var require_dist4 = __commonJS({ queryParameters: [timeoutInSeconds], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -79622,7 +79261,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, contentLength, leaseId, @@ -79657,7 +79296,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, contentLength, @@ -79697,7 +79336,7 @@ var require_dist4 = __commonJS({ headerParameters: [ contentType, accept, - version4, + version3, requestId, metadata, leaseId, @@ -79750,7 +79389,7 @@ var require_dist4 = __commonJS({ ], urlParameters: [url], headerParameters: [ - version4, + version3, requestId, accept1, leaseId, @@ -81199,7 +80838,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto7.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return crypto4.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; var packageName = "azure-storage-blob"; @@ -81620,7 +81259,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto7.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return crypto4.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; function ipRangeToString(ipRange) { @@ -81636,8 +81275,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; static { __name(this, "SASQueryParameters"); } - constructor(version5, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version5; + constructor(version4, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { + this.version = version4; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -81840,7 +81479,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version5 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + const version4 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { @@ -81849,25 +81488,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version5 >= "2020-12-06") { + if (version4 >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); } } - if (version5 >= "2018-11-09") { + if (version4 >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version5 >= "2020-02-10") { + if (version4 >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version5 >= "2015-04-05") { + if (version4 >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -82170,44 +81809,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } __name(getCanonicalName, "getCanonicalName"); function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version5 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version5 < "2018-11-09") { + const version4 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version4 < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version5 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version4 < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version5 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version4 < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version5 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version4 < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version5 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version4 < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version5 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version4 < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version5 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version4 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version5 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version4 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version5 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version4 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version5 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version4 < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version5; + blobSASSignatureValues.version = version4; return blobSASSignatureValues; } __name(SASSignatureValuesSanityCheckAndAutofill, "SASSignatureValuesSanityCheckAndAutofill"); @@ -89041,30 +88680,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { - const version5 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version5 < "2020-08-04") { + const version4 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version4 < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version5 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version4 < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version5 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version4 < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version5 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version4 < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version5 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version4 < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version5 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version4 < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version5 >= "2020-12-06") { + if (version4 >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, @@ -89074,7 +88713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version5, + version4, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -89089,13 +88728,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version5, + version4, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return new SASQueryParameters(version5, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope); + return new SASQueryParameters(version4, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope); } __name(generateAccountSASQueryParameters, "generateAccountSASQueryParameters"); var BlobServiceClient = class _BlobServiceClient extends StorageClient { @@ -90623,7 +90262,7 @@ var require_cacheHttpClient = __commonJS({ var core2 = __importStar3(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var crypto7 = __importStar3(require("crypto")); + var crypto4 = __importStar3(require("crypto")); var fs2 = __importStar3(require("fs")); var url_1 = require("url"); var utils = __importStar3(require_cacheUtils()); @@ -90669,21 +90308,21 @@ var require_cacheHttpClient = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto7.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto4.createHash("sha256").update(components.join("|")).digest("hex"); } __name(getCacheVersion, "getCacheVersion"); exports2.getCacheVersion = getCacheVersion; function getCacheEntry(keys, paths, options) { return __awaiter3(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version4 = 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=${version4}`; + const version3 = 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=${version3}`; const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter3(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { if (core2.isDebug()) { - yield printCachesListForDiagnostics(keys[0], httpClient, version4); + yield printCachesListForDiagnostics(keys[0], httpClient, version3); } return null; } @@ -90703,7 +90342,7 @@ var require_cacheHttpClient = __commonJS({ } __name(getCacheEntry, "getCacheEntry"); exports2.getCacheEntry = getCacheEntry; - function printCachesListForDiagnostics(key, httpClient, version4) { + function printCachesListForDiagnostics(key, httpClient, version3) { return __awaiter3(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter3(this, void 0, void 0, function* () { @@ -90713,7 +90352,7 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core2.debug(`No matching cache found for cache key '${key}', version '${version4} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core2.debug(`No matching cache found for cache key '${key}', version '${version3} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { core2.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); @@ -90745,10 +90384,10 @@ Other caches with similar key:`); function reserveCache(key, paths, options) { return __awaiter3(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version4 = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const version3 = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { key, - version: version4, + version: version3, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter3(this, void 0, void 0, function* () { @@ -91474,77 +91113,77 @@ var require_semver2 = __commonJS({ } } var i; - exports2.parse = parse3; - function parse3(version4, options) { + exports2.parse = parse2; + function parse2(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version4 instanceof SemVer) { - return version4; + if (version3 instanceof SemVer) { + return version3; } - if (typeof version4 !== "string") { + if (typeof version3 !== "string") { return null; } - if (version4.length > MAX_LENGTH) { + if (version3.length > MAX_LENGTH) { return null; } var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version4)) { + if (!r.test(version3)) { return null; } try { - return new SemVer(version4, options); + return new SemVer(version3, options); } catch (er) { return null; } } - __name(parse3, "parse"); + __name(parse2, "parse"); exports2.valid = valid; - function valid(version4, options) { - var v = parse3(version4, options); + function valid(version3, options) { + var v = parse2(version3, options); return v ? v.version : null; } __name(valid, "valid"); exports2.clean = clean; - function clean(version4, options) { - var s = parse3(version4.trim().replace(/^[=v]+/, ""), options); + function clean(version3, options) { + var s = parse2(version3.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports2.SemVer = SemVer; - function SemVer(version4, options) { + function SemVer(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version4 instanceof SemVer) { - if (version4.loose === options.loose) { - return version4; + if (version3 instanceof SemVer) { + if (version3.loose === options.loose) { + return version3; } else { - version4 = version4.version; + version3 = version3.version; } - } else if (typeof version4 !== "string") { - throw new TypeError("Invalid Version: " + version4); + } else if (typeof version3 !== "string") { + throw new TypeError("Invalid Version: " + version3); } - if (version4.length > MAX_LENGTH) { + if (version3.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { - return new SemVer(version4, options); + return new SemVer(version3, options); } - debug("SemVer", version4, options); + debug("SemVer", version3, options); this.options = options; this.loose = !!options.loose; - var m = version4.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + var m = version3.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { - throw new TypeError("Invalid Version: " + version4); + throw new TypeError("Invalid Version: " + version3); } - this.raw = version4; + this.raw = version3; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; @@ -91732,13 +91371,13 @@ var require_semver2 = __commonJS({ return this; }; exports2.inc = inc; - function inc(version4, release, loose, identifier) { + function inc(version3, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { - return new SemVer(version4, loose).inc(release, identifier).version; + return new SemVer(version3, loose).inc(release, identifier).version; } catch (er) { return null; } @@ -91749,16 +91388,16 @@ var require_semver2 = __commonJS({ if (eq(version1, version22)) { return null; } else { - var v13 = parse3(version1); - var v2 = parse3(version22); + var v12 = parse2(version1); + var v2 = parse2(version22); var prefix = ""; - if (v13.prerelease.length || v2.prerelease.length) { + if (v12.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } - for (var key in v13) { + for (var key in v12) { if (key === "major" || key === "minor" || key === "patch") { - if (v13[key] !== v2[key]) { + if (v12[key] !== v2[key]) { return prefix + key; } } @@ -91950,19 +91589,19 @@ var require_semver2 = __commonJS({ Comparator.prototype.toString = function() { return this.value; }; - Comparator.prototype.test = function(version4) { - debug("Comparator.test", version4, this.options.loose); - if (this.semver === ANY || version4 === ANY) { + Comparator.prototype.test = function(version3) { + debug("Comparator.test", version3, this.options.loose); + if (this.semver === ANY || version3 === ANY) { return true; } - if (typeof version4 === "string") { + if (typeof version3 === "string") { try { - version4 = new SemVer(version4, this.options); + version3 = new SemVer(version3, this.options); } catch (er) { return false; } } - return cmp(version4, this.operator, this.semver, this.options); + return cmp(version3, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { @@ -92285,31 +91924,31 @@ var require_semver2 = __commonJS({ return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); - Range.prototype.test = function(version4) { - if (!version4) { + Range.prototype.test = function(version3) { + if (!version3) { return false; } - if (typeof version4 === "string") { + if (typeof version3 === "string") { try { - version4 = new SemVer(version4, this.options); + version3 = new SemVer(version3, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { - if (testSet(this.set[i2], version4, this.options)) { + if (testSet(this.set[i2], version3, this.options)) { return true; } } return false; }; - function testSet(set, version4, options) { + function testSet(set, version3, options) { for (var i2 = 0; i2 < set.length; i2++) { - if (!set[i2].test(version4)) { + if (!set[i2].test(version3)) { return false; } } - if (version4.prerelease.length && !options.includePrerelease) { + if (version3.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { @@ -92317,7 +91956,7 @@ var require_semver2 = __commonJS({ } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; - if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) { + if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } } @@ -92328,13 +91967,13 @@ var require_semver2 = __commonJS({ } __name(testSet, "testSet"); exports2.satisfies = satisfies; - function satisfies(version4, range, options) { + function satisfies(version3, range, options) { try { range = new Range(range, options); } catch (er) { return false; } - return range.test(version4); + return range.test(version3); } __name(satisfies, "satisfies"); exports2.maxSatisfying = maxSatisfying; @@ -92433,18 +92072,18 @@ var require_semver2 = __commonJS({ } __name(validRange, "validRange"); exports2.ltr = ltr; - function ltr(version4, range, options) { - return outside(version4, range, "<", options); + function ltr(version3, range, options) { + return outside(version3, range, "<", options); } __name(ltr, "ltr"); exports2.gtr = gtr; - function gtr(version4, range, options) { - return outside(version4, range, ">", options); + function gtr(version3, range, options) { + return outside(version3, range, ">", options); } __name(gtr, "gtr"); exports2.outside = outside; - function outside(version4, range, hilo, options) { - version4 = new SemVer(version4, options); + function outside(version3, range, hilo, options) { + version3 = new SemVer(version3, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { @@ -92465,7 +92104,7 @@ var require_semver2 = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies(version4, range, options)) { + if (satisfies(version3, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { @@ -92487,9 +92126,9 @@ var require_semver2 = __commonJS({ if (high.operator === comp || high.operator === ecomp) { return false; } - if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) { + if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { return false; - } else if (low.operator === ecomp && ltfn(version4, low.semver)) { + } else if (low.operator === ecomp && ltfn(version3, low.semver)) { return false; } } @@ -92497,8 +92136,8 @@ var require_semver2 = __commonJS({ } __name(outside, "outside"); exports2.prerelease = prerelease; - function prerelease(version4, options) { - var parsed = parse3(version4, options); + function prerelease(version3, options) { + var parsed = parse2(version3, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); @@ -92510,23 +92149,23 @@ var require_semver2 = __commonJS({ } __name(intersects, "intersects"); exports2.coerce = coerce; - function coerce(version4, options) { - if (version4 instanceof SemVer) { - return version4; + function coerce(version3, options) { + if (version3 instanceof SemVer) { + return version3; } - if (typeof version4 === "number") { - version4 = String(version4); + if (typeof version3 === "number") { + version3 = String(version3); } - if (typeof version4 !== "string") { + if (typeof version3 !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { - match = version4.match(safeRe[t.COERCE]); + match = version3.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) { + while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } @@ -92537,7 +92176,7 @@ var require_semver2 = __commonJS({ if (match === null) { return null; } - return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } @@ -92615,9 +92254,9 @@ var require_manifest = __commonJS({ let match; let file; for (const candidate of candidates) { - const version4 = candidate.version; - core_1.debug(`check ${version4} satisfies ${versionSpec}`); - if (semver.satisfies(version4, versionSpec) && (!stable || candidate.stable === stable)) { + const version3 = candidate.version; + core_1.debug(`check ${version3} satisfies ${versionSpec}`); + if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { file = candidate.files.find((item) => { core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); let chk = item.arch === archFilter && item.platform === platFilter; @@ -92649,9 +92288,9 @@ var require_manifest = __commonJS({ exports2._findMatch = _findMatch; function _getOsVersion() { const plat = os.platform(); - let version4 = ""; + let version3 = ""; if (plat === "darwin") { - version4 = cp.execSync("sw_vers -productVersion").toString(); + version3 = cp.execSync("sw_vers -productVersion").toString(); } else if (plat === "linux") { const lsbContents = module2.exports._readLinuxVersionFile(); if (lsbContents) { @@ -92659,13 +92298,13 @@ var require_manifest = __commonJS({ for (const line of lines) { const parts = line.split("="); if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version4 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); break; } } } } - return version4; + return version3; } __name(_getOsVersion, "_getOsVersion"); exports2._getOsVersion = _getOsVersion; @@ -92685,6 +92324,82 @@ var require_manifest = __commonJS({ } }); +// ../node_modules/uuid/lib/rng.js +var require_rng = __commonJS({ + "../node_modules/uuid/lib/rng.js"(exports2, module2) { + var crypto4 = require("crypto"); + module2.exports = /* @__PURE__ */ __name(function nodeRNG() { + return crypto4.randomBytes(16); + }, "nodeRNG"); + } +}); + +// ../node_modules/uuid/lib/bytesToUuid.js +var require_bytesToUuid = __commonJS({ + "../node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { + var byteToHex2 = []; + for (i = 0; i < 256; ++i) { + byteToHex2[i] = (i + 256).toString(16).substr(1); + } + var i; + function bytesToUuid(buf, offset) { + var i2 = offset || 0; + var bth = byteToHex2; + return [ + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]] + ].join(""); + } + __name(bytesToUuid, "bytesToUuid"); + module2.exports = bytesToUuid; + } +}); + +// ../node_modules/uuid/v4.js +var require_v4 = __commonJS({ + "../node_modules/uuid/v4.js"(exports2, module2) { + var rng2 = require_rng(); + var bytesToUuid = require_bytesToUuid(); + function v42(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid(rnds); + } + __name(v42, "v4"); + module2.exports = v42; + } +}); + // ../node_modules/@actions/tool-cache/lib/retry-helper.js var require_retry_helper = __commonJS({ "../node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { @@ -93148,40 +92863,40 @@ var require_tool_cache = __commonJS({ }); } __name(extractZipNix, "extractZipNix"); - function cacheDir(sourceDir, tool, version4, arch) { + function cacheDir(sourceDir, tool, version3, arch) { return __awaiter3(this, void 0, void 0, function* () { - version4 = semver.clean(version4) || version4; + version3 = semver.clean(version3) || version3; arch = arch || os.arch(); - core2.debug(`Caching tool ${tool} ${version4} ${arch}`); + core2.debug(`Caching tool ${tool} ${version3} ${arch}`); core2.debug(`source dir: ${sourceDir}`); if (!fs2.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } - const destPath = yield _createToolPath(tool, version4, arch); + const destPath = yield _createToolPath(tool, version3, arch); for (const itemName of fs2.readdirSync(sourceDir)) { const s = path2.join(sourceDir, itemName); yield io2.cp(s, destPath, { recursive: true }); } - _completeToolPath(tool, version4, arch); + _completeToolPath(tool, version3, arch); return destPath; }); } __name(cacheDir, "cacheDir"); exports2.cacheDir = cacheDir; - function cacheFile(sourceFile, targetFile, tool, version4, arch) { + function cacheFile(sourceFile, targetFile, tool, version3, arch) { return __awaiter3(this, void 0, void 0, function* () { - version4 = semver.clean(version4) || version4; + version3 = semver.clean(version3) || version3; arch = arch || os.arch(); - core2.debug(`Caching tool ${tool} ${version4} ${arch}`); + core2.debug(`Caching tool ${tool} ${version3} ${arch}`); core2.debug(`source file: ${sourceFile}`); if (!fs2.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } - const destFolder = yield _createToolPath(tool, version4, arch); + const destFolder = yield _createToolPath(tool, version3, arch); const destPath = path2.join(destFolder, targetFile); core2.debug(`destination file ${destPath}`); yield io2.cp(sourceFile, destPath); - _completeToolPath(tool, version4, arch); + _completeToolPath(tool, version3, arch); return destFolder; }); } @@ -93289,9 +93004,9 @@ var require_tool_cache = __commonJS({ }); } __name(_createExtractFolder, "_createExtractFolder"); - function _createToolPath(tool, version4, arch) { + function _createToolPath(tool, version3, arch) { return __awaiter3(this, void 0, void 0, function* () { - const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version4) || version4, arch || ""); + const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); core2.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io2.rmRF(folderPath); @@ -93301,8 +93016,8 @@ var require_tool_cache = __commonJS({ }); } __name(_createToolPath, "_createToolPath"); - function _completeToolPath(tool, version4, arch) { - const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version4) || version4, arch || ""); + function _completeToolPath(tool, version3, arch) { + const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); const markerPath = `${folderPath}.complete`; fs2.writeFileSync(markerPath, ""); core2.debug("finished caching tool"); @@ -93318,7 +93033,7 @@ var require_tool_cache = __commonJS({ __name(isExplicitVersion, "isExplicitVersion"); exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { - let version4 = ""; + let version3 = ""; core2.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver.gt(a, b)) { @@ -93330,16 +93045,16 @@ var require_tool_cache = __commonJS({ const potential = versions[i]; const satisfied = semver.satisfies(potential, versionSpec); if (satisfied) { - version4 = potential; + version3 = potential; break; } } - if (version4) { - core2.debug(`matched: ${version4}`); + if (version3) { + core2.debug(`matched: ${version3}`); } else { core2.debug("match not found"); } - return version4; + return version3; } __name(evaluateVersions, "evaluateVersions"); exports2.evaluateVersions = evaluateVersions; @@ -102305,7 +102020,7 @@ var require_blob_upload = __commonJS({ var storage_blob_1 = require_dist4(); var config_1 = require_config(); var core2 = __importStar3(require_core()); - var crypto7 = __importStar3(require("crypto")); + var crypto4 = __importStar3(require("crypto")); var stream = __importStar3(require("stream")); var errors_1 = require_errors3(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { @@ -102343,7 +102058,7 @@ var require_blob_upload = __commonJS({ }; let sha256Hash = void 0; const uploadStream = new stream.PassThrough(); - const hashStream = crypto7.createHash("sha256"); + const hashStream = crypto4.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); core2.info("Beginning upload of artifact content to blob storage"); @@ -128328,7 +128043,7 @@ var require_dist_node12 = __commonJS({ }); } __name(expand, "expand"); - function parse3(options) { + function parse2(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -128383,9 +128098,9 @@ var require_dist_node12 = __commonJS({ request: options.request } : null); } - __name(parse3, "parse"); + __name(parse2, "parse"); function endpointWithDefaults(defaults, route, options) { - return parse3(merge(defaults, route, options)); + return parse2(merge(defaults, route, options)); } __name(endpointWithDefaults, "endpointWithDefaults"); function withDefaults(oldDefaults, newDefaults) { @@ -128395,7 +128110,7 @@ var require_dist_node12 = __commonJS({ DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), merge: merge.bind(null, DEFAULTS2), - parse: parse3 + parse: parse2 }); } __name(withDefaults, "withDefaults"); @@ -131113,7 +130828,7 @@ var require_binary = __commonJS({ }); return stream; }; - exports2.parse = /* @__PURE__ */ __name(function parse3(buffer) { + exports2.parse = /* @__PURE__ */ __name(function parse2(buffer) { var self2 = words(function(bytes, cb) { return function(name) { if (offset + bytes <= buffer.length) { @@ -133220,12 +132935,12 @@ var require_light = __commonJS({ } }; var Sync_1 = Sync; - var version4 = "2.19.5"; + var version3 = "2.19.5"; var version$1 = { - version: version4 + version: version3 }; var version$2 = /* @__PURE__ */ Object.freeze({ - version: version4, + version: version3, default: version$1 }); var require$$2 = /* @__PURE__ */ __name(() => console.log("You must import the full version of Bottleneck in order to use this feature."), "require$$2"); @@ -134562,15 +134277,25 @@ var require_output = __commonJS({ } : function(o, v) { o["default"] = v; }); - var __importStar3 = 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)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; + var __importStar3 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = /* @__PURE__ */ __name(function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding3(result, mod, k[i]); + } + __setModuleDefault3(result, mod); + return result; + }; + }(); var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -134676,18 +134401,18 @@ ${c.freshLines} lines analyzed, ${c.freshCoveredLines} lines covered`; } __name(getCoverageStats, "getCoverageStats"); function getReportURL(resultsDir) { + var _a; let reportUrlFile = `${resultsDir}/${qodana_12.QODANA_OPEN_IN_IDE_NAME}`; if (fs2.existsSync(reportUrlFile)) { - const data = JSON.parse(fs2.readFileSync(reportUrlFile, { encoding: "utf8" })); - if (data && data.cloud && data.cloud.url) { + const rawData = fs2.readFileSync(reportUrlFile, { encoding: "utf8" }); + const data = JSON.parse(rawData); + if ((_a = data === null || data === void 0 ? void 0 : data.cloud) === null || _a === void 0 ? void 0 : _a.url) { return data.cloud.url; } } else { reportUrlFile = `${resultsDir}/${qodana_12.QODANA_REPORT_URL_NAME}`; if (fs2.existsSync(reportUrlFile)) { - return fs2.readFileSync(`${resultsDir}/${qodana_12.QODANA_REPORT_URL_NAME}`, { - encoding: "utf8" - }); + return fs2.readFileSync(reportUrlFile, { encoding: "utf8" }); } } return ""; @@ -134847,15 +134572,25 @@ var require_annotations = __commonJS({ } : function(o, v) { o["default"] = v; }); - var __importStar3 = 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)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; + var __importStar3 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = /* @__PURE__ */ __name(function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding3(result, mod, k[i]); + } + __setModuleDefault3(result, mod); + return result; + }; + }(); var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -135063,15 +134798,25 @@ var require_utils10 = __commonJS({ } : function(o, v) { o["default"] = v; }); - var __importStar3 = 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)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; + var __importStar3 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = /* @__PURE__ */ __name(function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding3(result, mod, k[i]); + } + __setModuleDefault3(result, mod); + return result; + }; + }(); var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -135138,8 +134883,10 @@ var require_utils10 = __commonJS({ exports2.ANALYSIS_FINISHED_REACTION = "+1"; exports2.ANALYSIS_STARTED_REACTION = "eyes"; function getInputs() { + const rawArgs = core2.getInput("args"); + const argList = rawArgs ? rawArgs.split(",").map((arg) => arg.trim()) : []; return { - args: core2.getInput("args").split(",").map((arg) => arg.trim()), + args: argList, resultsDir: core2.getInput("results-dir"), cacheDir: core2.getInput("cache-dir"), primaryCacheKey: core2.getInput("primary-cache-key"), @@ -135162,21 +134909,18 @@ var require_utils10 = __commonJS({ __name(getInputs, "getInputs"); function getPrSha() { return __awaiter3(this, void 0, void 0, function* () { + const pr = github2.context.payload.pull_request; if (process.env.QODANA_PR_SHA) { return process.env.QODANA_PR_SHA; } - if (github2.context.payload.pull_request !== void 0) { - const output = yield gitOutput([ - "merge-base", - github2.context.payload.pull_request.base.sha, - github2.context.payload.pull_request.head.sha - ], { + if (pr) { + const output = yield gitOutput(["merge-base", pr.base.sha, pr.head.sha], { ignoreReturnCode: true }); if (output.exitCode === 0) { return output.stdout.trim(); } else { - return github2.context.payload.pull_request.base.sha; + return pr.base.sha; } } return ""; @@ -135184,13 +134928,15 @@ var require_utils10 = __commonJS({ } __name(getPrSha, "getPrSha"); function getHeadSha() { + const c = github2.context; + const pr = c.payload.pull_request; if (process.env.QODANA_REVISION) { return process.env.QODANA_REVISION; } - if (github2.context.payload.pull_request !== void 0) { - return github2.context.payload.pull_request.head.sha; + if (pr) { + return pr.head.sha; } - return github2.context.sha; + return c.sha; } __name(getHeadSha, "getHeadSha"); function qodana(inputs_1) { @@ -135204,10 +134950,11 @@ var require_utils10 = __commonJS({ } } } - return (yield exec.getExecOutput(qodana_12.EXECUTABLE, args, { + const exit = yield exec.getExecOutput(qodana_12.EXECUTABLE, args, { ignoreReturnCode: true, env: Object.assign(Object.assign({}, process.env), { QODANA_REVISION: getHeadSha(), NONINTERACTIVE: "1" }) - })).exitCode; + }); + return exit.exitCode; }); } __name(qodana, "qodana"); @@ -135219,9 +134966,10 @@ var require_utils10 = __commonJS({ } try { const c = github2.context; + const pr = c.payload.pull_request; let currentBranch = c.ref; - if (((_a = c.payload.pull_request) === null || _a === void 0 ? void 0 : _a.head.ref) !== void 0) { - currentBranch = c.payload.pull_request.head.ref; + if ((_a = pr === null || pr === void 0 ? void 0 : pr.head) === null || _a === void 0 ? void 0 : _a.ref) { + currentBranch = pr.head.ref; } const currentCommit = (yield exec.getExecOutput("git", ["rev-parse", "HEAD"])).stdout.trim(); currentBranch = (0, qodana_12.validateBranchName)(currentBranch); @@ -135324,7 +135072,7 @@ var require_utils10 = __commonJS({ if (!execute) { return ""; } - const restoreKeys = [additionalCacheKey]; + const restoreKeys = [additionalCacheKey].filter((k) => k); try { const cacheKey = yield cache.restoreCache([cacheDir], primaryKey, restoreKeys); if (!cacheKey) { @@ -135349,7 +135097,7 @@ var require_utils10 = __commonJS({ const currentBranch = github2.context.payload.ref_name; const defaultBranch = (_a = github2.context.payload.repository) === null || _a === void 0 ? void 0 : _a.default_branch; core2.debug(`Current branch: ${currentBranch} | Default branch: ${defaultBranch}`); - return currentBranch === defaultBranch; + return currentBranch === `refs/heads/${defaultBranch}`; } return useCaches; } @@ -135366,8 +135114,7 @@ var require_utils10 = __commonJS({ __name(getWorkflowRunUrl, "getWorkflowRunUrl"); function postResultsToPRComments(toolName, content, postComment) { return __awaiter3(this, void 0, void 0, function* () { - var _a; - const pr = (_a = github2.context.payload.pull_request) !== null && _a !== void 0 ? _a : ""; + const pr = github2.context.payload.pull_request; if (!postComment || !pr) { return; } @@ -135432,9 +135179,12 @@ ${comment_tag_pattern}`; __name(updateComment, "updateComment"); function putReaction(newReaction, oldReaction) { return __awaiter3(this, void 0, void 0, function* () { - var _a; + const pr = github2.context.payload.pull_request; + if (!pr) { + return; + } const client = github2.getOctokit(getInputs().githubToken); - const issue_number = (_a = github2.context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number; + const issue_number = pr.number; if (oldReaction !== "") { try { const { data: reactions } = yield client.rest.reactions.listForIssue(Object.assign(Object.assign({}, github2.context.repo), { issue_number })); @@ -135457,9 +135207,11 @@ ${comment_tag_pattern}`; function publishGitHubCheck(failedByThreshold, name, output) { return __awaiter3(this, void 0, void 0, function* () { const conclusion = (0, annotations_1.getGitHubCheckConclusion)(output.annotations, failedByThreshold); - let sha = github2.context.sha; - if (github2.context.payload.pull_request) { - sha = github2.context.payload.pull_request.head.sha; + const c = github2.context; + const pr = c.payload.pull_request; + let sha = c.sha; + if (pr) { + sha = pr.head.sha; } const client = github2.getOctokit(getInputs().githubToken); const result = yield client.rest.checks.listForRef(Object.assign(Object.assign({}, github2.context.repo), { ref: sha })); @@ -135505,7 +135257,7 @@ ${comment_tag_pattern}`; __name(git, "git"); function gitOutput(args_1) { return __awaiter3(this, arguments, void 0, function* (args, options = {}) { - return yield exec.getExecOutput("git", args, options); + return exec.getExecOutput("git", args, options); }); } __name(gitOutput, "gitOutput"); @@ -135554,15 +135306,25 @@ var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.creat } : function(o, v) { o["default"] = v; }); -var __importStar2 = exports && exports.__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 __importStar2 = exports && exports.__importStar || /* @__PURE__ */ function() { + var ownKeys = /* @__PURE__ */ __name(function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; +}(); var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -135642,7 +135404,7 @@ function main() { }); } __name(main, "main"); -main(); +void main(); /*! Bundled license information: undici/lib/fetch/body.js: diff --git a/scan/package.json b/scan/package.json index 2469ccba..f01d7831 100644 --- a/scan/package.json +++ b/scan/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "main": "lib/main.js", "scripts": { - "lint": "prettier --write '**/*.ts' && eslint --fix **/*.ts", + "lint": "prettier --write '**/*.ts' && eslint --fix **/*.ts -c ../.github/linters/.eslintrc.yml", "build": "tsc --build .", "package": "../node_modules/.bin/esbuild lib/main.js --platform=node --keep-names --bundle --outfile=dist/index.js", "test": "jest --config jest.config.js", @@ -17,8 +17,8 @@ }, "dependencies": { "@actions/artifact": "^2.1.11", - "@actions/cache": "^3.2.4", - "@actions/core": "^1.10.1", + "@actions/cache": "^3.3.0", + "@actions/core": "^1.11.1", "@actions/exec": "^1.1.0", "@actions/github": "^6.0.0", "@actions/tool-cache": "^2.0.1", @@ -30,20 +30,19 @@ "jszip": "^3.10.1" }, "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^22.5.2", + "@types/jest": "^29.5.14", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "axios": "^1.7.7", - "esbuild": "0.23.1", + "axios": "^1.7.8", + "esbuild": "0.24.0", "eslint": "^8.57.1", "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "jest": "latest", "js-yaml": "^4.1.0", - "nock": "^13.5.5", - "prettier": "3.3.3", + "nock": "^13.5.6", + "prettier": "3.4.1", "ts-jest": "latest", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } } diff --git a/scan/src/annotations.ts b/scan/src/annotations.ts index 62970631..122b3acc 100644 --- a/scan/src/annotations.ts +++ b/scan/src/annotations.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -/* eslint-disable @typescript-eslint/no-non-null-assertion,github/array-foreach */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ import * as core from '@actions/core' import {AnnotationProperties} from '@actions/core' import * as fs from 'fs' @@ -138,7 +138,7 @@ function parseResult( const region = location.region return { message: result.message.markdown ?? result.message.text!, - title: rules.get(result.ruleId!)?.shortDescription!, + title: rules.get(result.ruleId!)?.shortDescription, path: location.artifactLocation!.uri!, start_line: region?.startLine || 0, end_line: region?.endLine || region?.startLine || 1, @@ -192,7 +192,9 @@ function parseRules(tool: Tool): Map { * @returns GitHub Check Outputs with annotations are created for each result. */ export function parseSarif(path: string): Output { - const sarif: Log = JSON.parse(fs.readFileSync(path, {encoding: 'utf8'})) + const sarif: Log = JSON.parse( + fs.readFileSync(path, {encoding: 'utf8'}) + ) as Log const run = sarif.runs[0] const rules = parseRules(run.tool) let title = 'No new problems found by ' diff --git a/scan/src/main.ts b/scan/src/main.ts index 73da9c51..fbec2563 100644 --- a/scan/src/main.ts +++ b/scan/src/main.ts @@ -87,7 +87,7 @@ async function main(): Promise { restoreCachesPromise ]) const reservedCacheKey = await restoreCachesPromise - const exitCode = await qodana(inputs) + const exitCode = (await qodana(inputs)) as QodanaExitCode const canUploadCache = isNeedToUploadCache(inputs.useCaches, inputs.cacheDefaultBranchOnly) && isExecutionSuccessful(exitCode) @@ -125,5 +125,4 @@ async function main(): Promise { } } -// noinspection JSIgnoredPromiseFromCall -main() +void main() diff --git a/scan/src/output.ts b/scan/src/output.ts index eb9006f5..c97dadcb 100644 --- a/scan/src/output.ts +++ b/scan/src/output.ts @@ -70,6 +70,20 @@ so that the action will upload the files as the job artifacts: const SUMMARY_PR_MODE = `💡 Qodana analysis was run in the pull request mode: only the changed files were checked` const DEPENDENCY_CHARS_LIMIT = 65000 // 65k chars is the GitHub limit for a comment +interface CloudData { + url?: string +} + +interface OpenInIDEData { + cloud?: CloudData +} + +interface LicenseEntry { + name?: string + version?: string + license?: string +} + function wrapToDiffBlock(message: string): string { return `\`\`\`diff ${message} @@ -111,16 +125,15 @@ ${c.freshLines} lines analyzed, ${c.freshCoveredLines} lines covered` export function getReportURL(resultsDir: string): string { let reportUrlFile = `${resultsDir}/${QODANA_OPEN_IN_IDE_NAME}` if (fs.existsSync(reportUrlFile)) { - const data = JSON.parse(fs.readFileSync(reportUrlFile, {encoding: 'utf8'})) - if (data && data.cloud && data.cloud.url) { + const rawData = fs.readFileSync(reportUrlFile, {encoding: 'utf8'}) + const data = JSON.parse(rawData) as OpenInIDEData + if (data?.cloud?.url) { return data.cloud.url } } else { reportUrlFile = `${resultsDir}/${QODANA_REPORT_URL_NAME}` if (fs.existsSync(reportUrlFile)) { - return fs.readFileSync(`${resultsDir}/${QODANA_REPORT_URL_NAME}`, { - encoding: 'utf8' - }) + return fs.readFileSync(reportUrlFile, {encoding: 'utf8'}) } } return '' @@ -154,13 +167,14 @@ export async function publishOutput( const coverageInfo = getCoverageStats( getCoverageFromSarif(`${resultsDir}/${QODANA_SHORT_SARIF_NAME}`) ) + let licensesInfo = '' let packages = 0 const licensesJson = `${resultsDir}/projectStructure/${QODANA_LICENSES_JSON}` if (fs.existsSync(licensesJson)) { const licenses = JSON.parse( fs.readFileSync(licensesJson, {encoding: 'utf8'}) - ) + ) as LicenseEntry[] if (licenses.length > 0) { packages = licenses.length licensesInfo = fs.readFileSync( diff --git a/scan/src/utils.ts b/scan/src/utils.ts index 5c736c15..270501e7 100644 --- a/scan/src/utils.ts +++ b/scan/src/utils.ts @@ -17,15 +17,16 @@ import * as cache from '@actions/cache' import * as core from '@actions/core' import * as exec from '@actions/exec' +import {ExecOutput} from '@actions/exec' import * as github from '@actions/github' import * as tc from '@actions/tool-cache' import artifact from '@actions/artifact' import {GitHub} from '@actions/github/lib/utils' import {Conclusion, getGitHubCheckConclusion, Output} from './annotations' import { + BRANCH, + compressFolder, EXECUTABLE, - Inputs, - VERSION, getProcessArchName, getProcessPlatformName, getQodanaPullArgs, @@ -33,45 +34,54 @@ import { getQodanaSha256, getQodanaSha256MismatchMessage, getQodanaUrl, - sha256sum, - PushFixesType, + Inputs, + isNativeMode, NONE, PULL_REQUEST, - BRANCH, - isNativeMode, + PushFixesType, + sha256sum, validateBranchName, - compressFolder + VERSION } from '../../common/qodana' import path from 'path' import * as fs from 'fs' import * as os from 'os' import {COMMIT_EMAIL, COMMIT_USER, prFixesBody} from './output' -import {ExecOutput} from '@actions/exec' export const ANALYSIS_FINISHED_REACTION = '+1' export const ANALYSIS_STARTED_REACTION = 'eyes' -const REACTIONS = [ - '+1', - '-1', - 'laugh', - 'confused', - 'heart', - 'hooray', - 'rocket', - 'eyes' -] as const -type Reaction = (typeof REACTIONS)[number] + +type Reaction = + | '+1' + | '-1' + | 'laugh' + | 'confused' + | 'heart' + | 'hooray' + | 'rocket' + | 'eyes' + +interface PullRequestPayload { + number: number + head: { + sha: string + ref: string + } + base: { + sha: string + ref: string + } +} /** * The context for the action. * @returns The action inputs. */ export function getInputs(): Inputs { + const rawArgs = core.getInput('args') + const argList = rawArgs ? rawArgs.split(',').map(arg => arg.trim()) : [] return { - args: core - .getInput('args') - .split(',') - .map(arg => arg.trim()), + args: argList, resultsDir: core.getInput('results-dir'), cacheDir: core.getInput('cache-dir'), primaryCacheKey: core.getInput('primary-cache-key'), @@ -92,45 +102,37 @@ export function getInputs(): Inputs { } async function getPrSha(): Promise { + const pr = github.context.payload.pull_request as + | PullRequestPayload + | undefined if (process.env.QODANA_PR_SHA) { return process.env.QODANA_PR_SHA } - if (github.context.payload.pull_request !== undefined) { - const output = await gitOutput( - [ - 'merge-base', - github.context.payload.pull_request.base.sha, - github.context.payload.pull_request.head.sha - ], - { - ignoreReturnCode: true - } - ) + if (pr) { + const output = await gitOutput(['merge-base', pr.base.sha, pr.head.sha], { + ignoreReturnCode: true + }) if (output.exitCode === 0) { return output.stdout.trim() } else { - return github.context.payload.pull_request.base.sha + return pr.base.sha } } return '' } function getHeadSha(): string { + const c = github.context + const pr = c.payload.pull_request as PullRequestPayload | undefined if (process.env.QODANA_REVISION) { return process.env.QODANA_REVISION } - if (github.context.payload.pull_request !== undefined) { - return github.context.payload.pull_request.head.sha + if (pr) { + return pr.head.sha } - return github.context.sha + return c.sha } -/** - * Runs the qodana command with the given arguments. - * @param inputs the action inputs. - * @param args docker command arguments. - * @returns The qodana command execution output. - */ export async function qodana( inputs: Inputs, args: string[] = [] @@ -144,16 +146,15 @@ export async function qodana( } } } - return ( - await exec.getExecOutput(EXECUTABLE, args, { - ignoreReturnCode: true, - env: { - ...process.env, - QODANA_REVISION: getHeadSha(), - NONINTERACTIVE: '1' - } - }) - ).exitCode + const exit = await exec.getExecOutput(EXECUTABLE, args, { + ignoreReturnCode: true, + env: { + ...process.env, + QODANA_REVISION: getHeadSha(), + NONINTERACTIVE: '1' + } + }) + return exit.exitCode } export async function pushQuickFixes( @@ -165,10 +166,13 @@ export async function pushQuickFixes( } try { const c = github.context + const pr = c.payload.pull_request as PullRequestPayload | undefined let currentBranch = c.ref - if (c.payload.pull_request?.head.ref !== undefined) { - currentBranch = c.payload.pull_request.head.ref + + if (pr?.head?.ref) { + currentBranch = pr.head.ref } + const currentCommit = ( await exec.getExecOutput('git', ['rev-parse', 'HEAD']) ).stdout.trim() @@ -204,11 +208,6 @@ export async function pushQuickFixes( } } -/** - * Prepares the agent for qodana scan: install Qodana CLI and pull the linter. - * @param args qodana arguments - * @param useNightly whether to use a nightly version of Qodana CLI - */ export async function prepareAgent( args: string[], useNightly = false @@ -319,7 +318,7 @@ export async function restoreCaches( if (!execute) { return '' } - const restoreKeys = [additionalCacheKey] + const restoreKeys = [additionalCacheKey].filter(k => k) try { const cacheKey = await cache.restoreCache( [cacheDir], @@ -328,9 +327,7 @@ export async function restoreCaches( ) if (!cacheKey) { core.info( - `No cache found for input keys: ${[primaryKey, ...restoreKeys].join( - ', ' - )}. + `No cache found for input keys: ${[primaryKey, ...restoreKeys].join(', ')}. With cache the pipeline would be faster.` ) return '' @@ -338,9 +335,7 @@ export async function restoreCaches( return cacheKey } catch (error) { core.warning( - `Failed to restore cache with key ${primaryKey} – ${ - (error as Error).message - }` + `Failed to restore cache with key ${primaryKey} – ${(error as Error).message}` ) } return '' @@ -360,12 +355,13 @@ export function isNeedToUploadCache( } if (useCaches && cacheDefaultBranchOnly) { - const currentBranch = github.context.payload.ref_name - const defaultBranch = github.context.payload.repository?.default_branch + const currentBranch = github.context.payload.ref_name as string + const defaultBranch = github.context.payload.repository + ?.default_branch as string core.debug( `Current branch: ${currentBranch} | Default branch: ${defaultBranch}` ) - return currentBranch === defaultBranch + return currentBranch === `refs/heads/${defaultBranch}` } return useCaches @@ -396,7 +392,9 @@ export async function postResultsToPRComments( content: string, postComment: boolean ): Promise { - const pr = github.context.payload.pull_request ?? '' + const pr = github.context.payload.pull_request as + | PullRequestPayload + | undefined if (!postComment || !pr) { return } @@ -497,9 +495,15 @@ export async function putReaction( newReaction: Reaction, oldReaction: string ): Promise { + const pr = github.context.payload.pull_request as + | PullRequestPayload + | undefined + if (!pr) { + return + } const client = github.getOctokit(getInputs().githubToken) + const issue_number = pr.number - const issue_number = github.context.payload.pull_request?.number as number if (oldReaction !== '') { try { const {data: reactions} = await client.rest.reactions.listForIssue({ @@ -547,9 +551,11 @@ export async function publishGitHubCheck( output.annotations, failedByThreshold ) - let sha = github.context.sha - if (github.context.payload.pull_request) { - sha = github.context.payload.pull_request.head.sha + const c = github.context + const pr = c.payload.pull_request as PullRequestPayload | undefined + let sha = c.sha + if (pr) { + sha = pr.head.sha } const client = github.getOctokit(getInputs().githubToken) const result = await client.rest.checks.listForRef({ @@ -624,7 +630,7 @@ async function gitOutput( args: string[], options: exec.ExecOptions = {} ): Promise { - return await exec.getExecOutput('git', args, options) + return exec.getExecOutput('git', args, options) } async function createPr( diff --git a/vsts/.eslintignore b/vsts/.eslintignore deleted file mode 100644 index 47dcf33c..00000000 --- a/vsts/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -dist/ -lib/ -node_modules/ -jest.config.js \ No newline at end of file diff --git a/vsts/.eslintrc.json b/vsts/.eslintrc.json deleted file mode 100644 index 98d0bd73..00000000 --- a/vsts/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "tsconfig.json" - }, - "rules": { - "i18n-text/no-en": "off", - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "camelcase": "off", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "semi": "off", - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true - } - } \ No newline at end of file diff --git a/vsts/QodanaScan/index.js b/vsts/QodanaScan/index.js index 0d3fb080..009d875a 100644 --- a/vsts/QodanaScan/index.js +++ b/vsts/QodanaScan/index.js @@ -14633,15 +14633,25 @@ var require_utils3 = __commonJS({ } : 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 __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __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(resolve) { @@ -14712,7 +14722,7 @@ var require_utils3 = __commonJS({ const inputs = getInputs(); args = (0, qodana_12.getQodanaScanArgs)(inputs.args, inputs.resultsDir, inputs.cacheDir); } - return tl2.exec(qodana_12.EXECUTABLE, args, { + return yield tl2.execAsync(qodana_12.EXECUTABLE, args, { ignoreReturnCode: true, env: Object.assign(Object.assign({}, process.env), { NONINTERACTIVE: "1" }) }); @@ -14761,19 +14771,17 @@ var require_utils3 = __commonJS({ }); } function uploadSarif(resultsDir, execute) { - return __awaiter2(this, void 0, void 0, function* () { - if (!execute) { - return; - } - try { - const parentDir = path2.dirname(resultsDir); - const qodanaSarif = path2.join(parentDir, "qodana.sarif"); - tl2.cp(path2.join(resultsDir, "qodana.sarif.json"), qodanaSarif); - tl2.uploadArtifact("CodeAnalysisLogs", qodanaSarif, "CodeAnalysisLogs"); - } catch (error) { - tl2.warning(`Failed to upload SARIF \u2013 ${error.message}`); - } - }); + if (!execute) { + return; + } + try { + const parentDir = path2.dirname(resultsDir); + const qodanaSarif = path2.join(parentDir, "qodana.sarif"); + tl2.cp(path2.join(resultsDir, "qodana.sarif.json"), qodanaSarif); + tl2.uploadArtifact("CodeAnalysisLogs", qodanaSarif, "CodeAnalysisLogs"); + } catch (error) { + tl2.warning(`Failed to upload SARIF \u2013 ${error.message}`); + } } } }); @@ -14797,15 +14805,25 @@ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create } : function(o, v) { o["default"] = v; }); -var __importStar = exports && exports.__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)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; -}; +var __importStar = exports && exports.__importStar || /* @__PURE__ */ function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; +}(); var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -14847,7 +14865,7 @@ function main() { yield (0, utils_1.prepareAgent)(inputs.args); const exitCode = yield (0, utils_1.qodana)(); yield (0, utils_1.uploadArtifacts)(inputs.resultsDir, inputs.artifactName, inputs.uploadResult); - yield (0, utils_1.uploadSarif)(inputs.resultsDir, inputs.uploadSarif); + (0, utils_1.uploadSarif)(inputs.resultsDir, inputs.uploadSarif); if (!(0, qodana_1.isExecutionSuccessful)(exitCode)) { (0, utils_1.setFailed)(`qodana scan failed with exit code ${exitCode}`); } else if (exitCode === qodana_1.QodanaExitCode.FailThreshold) { @@ -14858,4 +14876,4 @@ function main() { } }); } -main(); +void main(); diff --git a/vsts/package.json b/vsts/package.json index 52bf64fa..266946ac 100644 --- a/vsts/package.json +++ b/vsts/package.json @@ -4,7 +4,7 @@ "description": "Qodana for Azure Pipelines extension", "main": "azure.js", "scripts": { - "lint": "prettier --write '**/*.ts' && eslint --fix **/*.ts", + "lint": "prettier --write '**/*.ts' && eslint --fix **/*.ts -c ../.github/linters/.eslintrc.yml", "bump-dev": "jq '.version |= (split(\".\") | .[2] = (. [2]| tonumber + 1 | tostring) | join(\".\"))' vss-extension.dev.json > tmp.json && mv tmp.json vss-extension.dev.json\n", "package": "npm run bump-dev && cd QodanaScan && npm ci && cd .. && ../node_modules/.bin/esbuild lib/main.js --platform=node --bundle --outfile=QodanaScan/index.js --target=node16 --external:shelljs --external:azure-pipelines-task-lib", "readme": "cp ../.github/md/azure.md README.md && curl -sS https://raw.githubusercontent.com/JetBrains/Qodana/2022.2/topics/azure-pipelines.md >> README.md && cat ../.github/md/tracker.md >> README.md", @@ -29,17 +29,16 @@ "azure-pipelines-tool-lib": "^2.0.8" }, "devDependencies": { - "@types/node": "^22.5.2", + "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "esbuild": "0.23.1", + "esbuild": "0.24.0", "eslint": "^8.57.1", - "eslint-plugin-github": "^5.0.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "sync-request": "^6.1.0", "ts-jest": "^29.2.5", - "typescript": "^5.5.4" + "typescript": "^5.7.2" } } diff --git a/vsts/src/main.ts b/vsts/src/main.ts index 00bdd016..0d261ab8 100644 --- a/vsts/src/main.ts +++ b/vsts/src/main.ts @@ -40,13 +40,13 @@ async function main(): Promise { tl.mkdirP(inputs.resultsDir) tl.mkdirP(inputs.cacheDir) await prepareAgent(inputs.args) - const exitCode = await qodana() + const exitCode = (await qodana()) as QodanaExitCode await uploadArtifacts( inputs.resultsDir, inputs.artifactName, inputs.uploadResult ) - await uploadSarif(inputs.resultsDir, inputs.uploadSarif) + uploadSarif(inputs.resultsDir, inputs.uploadSarif) if (!isExecutionSuccessful(exitCode)) { setFailed(`qodana scan failed with exit code ${exitCode}`) } else if (exitCode === QodanaExitCode.FailThreshold) { @@ -57,5 +57,4 @@ async function main(): Promise { } } -// noinspection JSIgnoredPromiseFromCall -main() +void main() diff --git a/vsts/src/utils.ts b/vsts/src/utils.ts index 538076ad..3c727d5d 100644 --- a/vsts/src/utils.ts +++ b/vsts/src/utils.ts @@ -17,9 +17,8 @@ import * as tl from 'azure-pipelines-task-lib/task' import * as tool from 'azure-pipelines-tool-lib' import { + compressFolder, EXECUTABLE, - Inputs, - VERSION, getProcessArchName, getProcessPlatformName, getQodanaPullArgs, @@ -27,9 +26,10 @@ import { getQodanaSha256, getQodanaSha256MismatchMessage, getQodanaUrl, - sha256sum, + Inputs, isNativeMode, - compressFolder + sha256sum, + VERSION } from '../../common/qodana' // eslint-disable-next-line @typescript-eslint/no-require-imports @@ -78,7 +78,7 @@ export async function qodana(args: string[] = []): Promise { const inputs = getInputs() args = getQodanaScanArgs(inputs.args, inputs.resultsDir, inputs.cacheDir) } - return tl.exec(EXECUTABLE, args, { + return await tl.execAsync(EXECUTABLE, args, { ignoreReturnCode: true, env: { ...process.env, @@ -158,10 +158,7 @@ export async function uploadArtifacts( * @param resultsDir The path to upload a report from. * @param execute whether to execute promise or not. */ -export async function uploadSarif( - resultsDir: string, - execute: boolean -): Promise { +export function uploadSarif(resultsDir: string, execute: boolean): void { if (!execute) { return } diff --git a/vsts/vss-extension.dev.json b/vsts/vss-extension.dev.json index 607b04f5..2c36ad34 100644 --- a/vsts/vss-extension.dev.json +++ b/vsts/vss-extension.dev.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "qodana-dev", "name": "Qodana (Dev)", - "version": "2024.2.124", + "version": "2024.2.131", "publisher": "JetBrains", "targets": [ { From d53681af69c825d81b96aac52d03f9ce5ed22c52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:52:56 +0000 Subject: [PATCH 6/9] :arrow_up: Bump the dependencies group with 4 updates Bumps the dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [prettier](https://github.com/prettier/prettier), [axios](https://github.com/axios/axios) and [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript). Updates `@typescript-eslint/eslint-plugin` from 8.17.0 to 8.18.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.18.0/packages/eslint-plugin) Updates `prettier` from 3.4.1 to 3.4.2 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.1...3.4.2) Updates `axios` from 1.7.8 to 1.7.9 - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.8...v1.7.9) Updates `eslint-import-resolver-typescript` from 3.6.3 to 3.7.0 - [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases) - [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.6.3...v3.7.0) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: axios dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: eslint-import-resolver-typescript dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] --- common/package.json | 2 +- package-lock.json | 395 ++++++++++++++++++++++++++++++++++++-------- package.json | 4 +- scan/package.json | 6 +- vsts/package.json | 2 +- 5 files changed, 337 insertions(+), 72 deletions(-) diff --git a/common/package.json b/common/package.json index c8818b7c..b33887d2 100644 --- a/common/package.json +++ b/common/package.json @@ -20,7 +20,7 @@ "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.4.1", + "prettier": "3.4.2", "ts-jest": "^29.2.5", "typescript": "^5.7.2" } diff --git a/package-lock.json b/package-lock.json index 5eddf3df..b44d91b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,11 +14,11 @@ "vsts" ], "devDependencies": { - "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/eslint-plugin": "^8.18.0", "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", "eslint-plugin-prettier": "^5.2.1", - "prettier": "3.4.1", + "prettier": "3.4.2", "prettier-eslint": "^16.3.0", "ts-node": "^10.9.2", "typescript": "^5.7.2" @@ -35,7 +35,7 @@ "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.4.1", + "prettier": "3.4.2", "ts-jest": "^29.2.5", "typescript": "^5.7.2" } @@ -3162,16 +3162,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", - "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", + "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/type-utils": "8.17.0", - "@typescript-eslint/utils": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/type-utils": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3186,12 +3186,67 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@typescript-eslint/parser": { @@ -3228,6 +3283,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/types": "8.17.0", "@typescript-eslint/visitor-keys": "8.17.0" @@ -3241,13 +3297,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", - "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/utils": "8.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -3259,12 +3315,100 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", + "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/types": { @@ -3272,6 +3416,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true, + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -3285,6 +3430,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/types": "8.17.0", "@typescript-eslint/visitor-keys": "8.17.0", @@ -3313,6 +3459,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "peer": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -3322,6 +3469,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3333,15 +3481,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", - "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0" + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3351,12 +3499,117 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", + "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/visitor-keys": { @@ -3364,6 +3617,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/types": "8.17.0", "eslint-visitor-keys": "^4.2.0" @@ -3381,6 +3635,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -3790,9 +4045,9 @@ } }, "node_modules/axios": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", - "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dev": true, "dependencies": { "follow-redirects": "^1.15.6", @@ -4633,11 +4888,11 @@ } }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -5163,19 +5418,19 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", - "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", + "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", "dev": true, "dependencies": { "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.3.5", + "debug": "^4.3.7", "enhanced-resolve": "^5.15.0", - "eslint-module-utils": "^2.8.1", "fast-glob": "^3.3.2", "get-tsconfig": "^4.7.5", "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3" + "is-glob": "^4.0.3", + "stable-hash": "^0.0.4" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -5202,6 +5457,8 @@ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "debug": "^3.2.7" }, @@ -5219,6 +5476,8 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -7777,9 +8036,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -8274,9 +8533,9 @@ } }, "node_modules/prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", - "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -9040,6 +9299,12 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/stable-hash": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", + "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", + "dev": true + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -10156,10 +10421,10 @@ "@actions/exec": "^1.1.0", "@actions/github": "^6.0.0", "@actions/tool-cache": "^2.0.1", - "@octokit/plugin-paginate-rest": "latest", - "@octokit/rest": "latest", - "@octokit/types": "latest", - "@octokit/webhooks": "latest", + "@octokit/plugin-paginate-rest": "*", + "@octokit/rest": "*", + "@octokit/types": "*", + "@octokit/webhooks": "*", "@types/sarif": "^2.1.7", "jszip": "^3.10.1" }, @@ -10167,16 +10432,16 @@ "@types/jest": "^29.5.14", "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "axios": "^1.7.8", + "axios": "^1.7.9", "esbuild": "0.24.0", "eslint": "^8.57.1", - "eslint-import-resolver-typescript": "^3.6.3", + "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-jest": "^28.9.0", - "jest": "latest", + "jest": "*", "js-yaml": "^4.1.0", "nock": "^13.5.6", - "prettier": "3.4.1", - "ts-jest": "latest", + "prettier": "3.4.2", + "ts-jest": "*", "typescript": "^5.7.2" } }, @@ -10324,7 +10589,7 @@ "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.4.1", + "prettier": "3.4.2", "sync-request": "^6.1.0", "ts-jest": "^29.2.5", "typescript": "^5.7.2" diff --git a/package.json b/package.json index 4ad024d2..73686d32 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "devDependencies": { "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", - "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/eslint-plugin": "^8.18.0", "eslint-plugin-prettier": "^5.2.1", - "prettier": "3.4.1", + "prettier": "3.4.2", "prettier-eslint": "^16.3.0", "ts-node": "^10.9.2", "typescript": "^5.7.2" diff --git a/scan/package.json b/scan/package.json index f01d7831..b62aefe3 100644 --- a/scan/package.json +++ b/scan/package.json @@ -33,15 +33,15 @@ "@types/jest": "^29.5.14", "@types/node": "^22.10.1", "@typescript-eslint/parser": "^7.18.0", - "axios": "^1.7.8", + "axios": "^1.7.9", "esbuild": "0.24.0", "eslint": "^8.57.1", - "eslint-import-resolver-typescript": "^3.6.3", + "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-jest": "^28.9.0", "jest": "latest", "js-yaml": "^4.1.0", "nock": "^13.5.6", - "prettier": "3.4.1", + "prettier": "3.4.2", "ts-jest": "latest", "typescript": "^5.7.2" } diff --git a/vsts/package.json b/vsts/package.json index 266946ac..cd499c84 100644 --- a/vsts/package.json +++ b/vsts/package.json @@ -36,7 +36,7 @@ "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", "js-yaml": "^4.1.0", - "prettier": "3.4.1", + "prettier": "3.4.2", "sync-request": "^6.1.0", "ts-jest": "^29.2.5", "typescript": "^5.7.2" From f3c87d3b314c24525b084491d10fe9f61c2a2e97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:58:12 +0000 Subject: [PATCH 7/9] :arrow_up: Bump @typescript-eslint/parser from 7.18.0 to 8.18.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.18.0 to 8.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.18.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- common/package.json | 2 +- package-lock.json | 771 ++++---------------------------------------- scan/package.json | 2 +- vsts/package.json | 2 +- 4 files changed, 61 insertions(+), 716 deletions(-) diff --git a/common/package.json b/common/package.json index b33887d2..e3b87b1b 100644 --- a/common/package.json +++ b/common/package.json @@ -15,7 +15,7 @@ ], "devDependencies": { "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", diff --git a/package-lock.json b/package-lock.json index b44d91b8..39071dd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", "jest": "^29.7.0", @@ -40,133 +40,6 @@ "typescript": "^5.7.2" } }, - "common/node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "common/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "common/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "common/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "common/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "common/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "common/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -3190,162 +3063,17 @@ "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", - "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", - "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", - "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", - "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", - "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "8.18.0", - "@typescript-eslint/utils": "8.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", - "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", - "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", + "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, "dependencies": { + "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0", "@typescript-eslint/visitor-keys": "8.18.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3355,162 +3083,37 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", - "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", - "dev": true, - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", - "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { + "node_modules/@typescript-eslint/scope-manager": { "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", - "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/typescript-estree": "8.18.0" + "@typescript-eslint/visitor-keys": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/type-utils": { "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", - "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.18.0", - "@typescript-eslint/visitor-keys": "8.18.0" + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3518,9 +3121,13 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "node_modules/@typescript-eslint/types": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", @@ -3533,7 +3140,7 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "node_modules/@typescript-eslint/typescript-estree": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", @@ -3559,24 +3166,7 @@ "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.18.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -3585,19 +3175,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -3612,14 +3190,36 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@typescript-eslint/utils": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", - "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/types": "8.18.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3635,7 +3235,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -10431,7 +10030,7 @@ "devDependencies": { "@types/jest": "^29.5.14", "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "axios": "^1.7.9", "esbuild": "0.24.0", "eslint": "^8.57.1", @@ -10445,133 +10044,6 @@ "typescript": "^5.7.2" } }, - "scan/node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "scan/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "scan/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "scan/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "scan/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "scan/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "scan/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "vsts": { "name": "@qodana/vsts", "version": "1.0.0", @@ -10583,7 +10055,7 @@ }, "devDependencies": { "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "esbuild": "0.24.0", "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", @@ -10594,133 +10066,6 @@ "ts-jest": "^29.2.5", "typescript": "^5.7.2" } - }, - "vsts/node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "vsts/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "vsts/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "vsts/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "vsts/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "vsts/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "vsts/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } } } } diff --git a/scan/package.json b/scan/package.json index b62aefe3..0ec597c0 100644 --- a/scan/package.json +++ b/scan/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/jest": "^29.5.14", "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "axios": "^1.7.9", "esbuild": "0.24.0", "eslint": "^8.57.1", diff --git a/vsts/package.json b/vsts/package.json index cd499c84..ecc1e2b0 100644 --- a/vsts/package.json +++ b/vsts/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/node": "^22.10.1", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/parser": "^8.18.0", "esbuild": "0.24.0", "eslint": "^8.57.1", "eslint-plugin-jest": "^28.9.0", From 6eab9c064629904ea29e9e2578235df3f32d429c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:59:29 +0000 Subject: [PATCH 8/9] :arrow_up: Bump @actions/cache from 3.2.4 to 4.0.0 Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 3.2.4 to 4.0.0. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/@actions/cache@4.0.0/packages/cache) --- updated-dependencies: - dependency-name: "@actions/cache" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 +- scan/dist/index.js | 15645 ++++++++++++++++++++-------------- scan/package.json | 2 +- vsts/vss-extension.dev.json | 2 +- 4 files changed, 9181 insertions(+), 6480 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39071dd3..9c7a1cdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -190,9 +190,9 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" }, "node_modules/@actions/cache": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.3.0.tgz", - "integrity": "sha512-+eCsMTIZUEm+QA9GqjollOhCdvRrZ1JV8d9Rp34zVNizBkYITO8dhKczP5Xps1dFzc5n59p7vYVtZrGt18bb5Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.0.tgz", + "integrity": "sha512-WIuxjnZ44lNYtIS4fqSaYvF00hORdy3cSin+jx8xNgBVGWnNIAiCBHjlwusVQlcgExoQC9pHXGrDsZyZr7rCDQ==", "dependencies": { "@actions/core": "^1.11.1", "@actions/exec": "^1.0.1", @@ -202,7 +202,9 @@ "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", - "semver": "^6.3.1" + "@protobuf-ts/plugin": "^2.9.4", + "semver": "^6.3.1", + "twirp-ts": "^2.5.0" } }, "node_modules/@actions/cache/node_modules/semver": { @@ -10015,7 +10017,7 @@ "license": "Apache-2.0", "dependencies": { "@actions/artifact": "^2.1.11", - "@actions/cache": "^3.3.0", + "@actions/cache": "^4.0.0", "@actions/core": "^1.11.1", "@actions/exec": "^1.1.0", "@actions/github": "^6.0.0", diff --git a/scan/dist/index.js b/scan/dist/index.js index d9f54700..3830c043 100644 --- a/scan/dist/index.js +++ b/scan/dist/index.js @@ -37841,7 +37841,7 @@ var require_constants7 = __commonJS({ "../node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ManifestFilename = exports2.TarFilename = exports2.SystemTarPathOnWindows = exports2.GnuTarPathOnWindows = exports2.SocketTimeout = exports2.DefaultRetryDelay = exports2.DefaultRetryAttempts = exports2.ArchiveToolType = exports2.CompressionMethod = exports2.CacheFilename = void 0; + 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"; @@ -37865,6 +37865,7 @@ var require_constants7 = __commonJS({ exports2.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; exports2.TarFilename = "cache.tar"; exports2.ManifestFilename = "manifest.txt"; + exports2.CacheFileSizeLimit = 10 * Math.pow(1024, 3); } }); @@ -37952,7 +37953,7 @@ var require_cacheUtils = __commonJS({ __name(settle, "settle"); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isGhes = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; + exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core2 = __importStar3(require_core()); var exec = __importStar3(require_exec()); var glob = __importStar3(require_glob()); @@ -37963,6 +37964,7 @@ var require_cacheUtils = __commonJS({ var semver = __importStar3(require_semver()); var util = __importStar3(require("util")); var constants_1 = require_constants7(); + var versionSalt = "1.0"; function createTempDirectory() { return __awaiter3(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; @@ -38096,15 +38098,28 @@ var require_cacheUtils = __commonJS({ } __name(assertDefined, "assertDefined"); exports2.assertDefined = assertDefined; - function isGhes() { - const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === "GITHUB.COM"; - const isGheHost = hostname.endsWith(".GHE.COM") || hostname.endsWith(".GHE.LOCALHOST"); - return !isGitHubHost && !isGheHost; + function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { + const components = paths.slice(); + if (compressionMethod) { + components.push(compressionMethod); + } + if (process.platform === "win32" && !enableCrossOsArchive) { + components.push("windows-only"); + } + components.push(versionSalt); + return crypto4.createHash("sha256").update(components.join("|")).digest("hex"); } - __name(isGhes, "isGhes"); - exports2.isGhes = isGhes; + __name(getCacheVersion, "getCacheVersion"); + exports2.getCacheVersion = getCacheVersion; + function getRuntimeToken() { + const token = process.env["ACTIONS_RUNTIME_TOKEN"]; + if (!token) { + throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable"); + } + return token; + } + __name(getRuntimeToken, "getRuntimeToken"); + exports2.getRuntimeToken = getRuntimeToken; } }); @@ -89544,6 +89559,284 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }); +// ../node_modules/@actions/cache/lib/internal/shared/errors.js +var require_errors2 = __commonJS({ + "../node_modules/@actions/cache/lib/internal/shared/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UsageError = exports2.NetworkError = exports2.GHESNotSupportedError = exports2.CacheNotFoundError = exports2.InvalidResponseError = exports2.FilesNotFoundError = void 0; + var FilesNotFoundError = class extends Error { + static { + __name(this, "FilesNotFoundError"); + } + constructor(files = []) { + let message = "No files were found to upload"; + if (files.length > 0) { + message += `: ${files.join(", ")}`; + } + super(message); + this.files = files; + this.name = "FilesNotFoundError"; + } + }; + exports2.FilesNotFoundError = FilesNotFoundError; + var InvalidResponseError = class extends Error { + static { + __name(this, "InvalidResponseError"); + } + constructor(message) { + super(message); + this.name = "InvalidResponseError"; + } + }; + exports2.InvalidResponseError = InvalidResponseError; + var CacheNotFoundError = class extends Error { + static { + __name(this, "CacheNotFoundError"); + } + constructor(message = "Cache not found") { + super(message); + this.name = "CacheNotFoundError"; + } + }; + exports2.CacheNotFoundError = CacheNotFoundError; + var GHESNotSupportedError = class extends Error { + static { + __name(this, "GHESNotSupportedError"); + } + constructor(message = "@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.") { + super(message); + this.name = "GHESNotSupportedError"; + } + }; + exports2.GHESNotSupportedError = GHESNotSupportedError; + var NetworkError = class extends Error { + static { + __name(this, "NetworkError"); + } + constructor(code) { + const message = `Unable to make request: ${code} +If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; + super(message); + this.code = code; + this.name = "NetworkError"; + } + }; + exports2.NetworkError = NetworkError; + NetworkError.isNetworkErrorCode = (code) => { + if (!code) + return false; + return [ + "ECONNRESET", + "ENOTFOUND", + "ETIMEDOUT", + "ECONNREFUSED", + "EHOSTUNREACH" + ].includes(code); + }; + var UsageError = class extends Error { + static { + __name(this, "UsageError"); + } + constructor() { + const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours. +More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; + super(message); + this.name = "UsageError"; + } + }; + exports2.UsageError = UsageError; + UsageError.isUsageErrorMessage = (msg) => { + if (!msg) + return false; + return msg.includes("insufficient usage"); + }; + } +}); + +// ../node_modules/@actions/cache/lib/internal/uploadUtils.js +var require_uploadUtils = __commonJS({ + "../node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; + var core2 = __importStar3(require_core()); + var storage_blob_1 = require_dist4(); + var errors_1 = require_errors2(); + var UploadProgress = class { + static { + __name(this, "UploadProgress"); + } + constructor(contentLength) { + this.contentLength = contentLength; + this.sentBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); + } + /** + * Sets the number of bytes sent + * + * @param sentBytes the number of bytes sent + */ + setSentBytes(sentBytes) { + this.sentBytes = sentBytes; + } + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.sentBytes; + } + /** + * Returns true if the upload is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current upload stats. Once the upload completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) { + return; + } + const transferredBytes = this.sentBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); + core2.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + if (this.isDone()) { + this.displayedComplete = true; + } + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setSentBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1e3) { + const displayCallback = /* @__PURE__ */ __name(() => { + this.display(); + if (!this.isDone()) { + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + }, "displayCallback"); + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the upload + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = void 0; + } + this.display(); + } + }; + exports2.UploadProgress = UploadProgress; + function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { + var _a; + return __awaiter3(this, void 0, void 0, function* () { + 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 uploadOptions = { + blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, + concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + maxSingleShotSize: 128 * 1024 * 1024, + onProgress: uploadProgress.onProgress() + }; + try { + uploadProgress.startDisplayTimer(); + core2.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); + if (response._response.status >= 400) { + throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); + } + return response; + } catch (error) { + core2.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); + throw error; + } finally { + uploadProgress.stopDisplayTimer(); + } + }); + } + __name(uploadCacheArchiveSDK, "uploadCacheArchiveSDK"); + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + } +}); + // ../node_modules/@actions/cache/lib/internal/requestUtils.js var require_requestUtils = __commonJS({ "../node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { @@ -90132,10 +90425,14 @@ var require_options = __commonJS({ var core2 = __importStar3(require_core()); function getUploadOptions(copy) { const result = { + useAzureSdk: false, uploadConcurrency: 4, uploadChunkSize: 32 * 1024 * 1024 }; if (copy) { + if (typeof copy.useAzureSdk === "boolean") { + result.useAzureSdk = copy.useAzureSdk; + } if (typeof copy.uploadConcurrency === "number") { result.uploadConcurrency = copy.uploadConcurrency; } @@ -90143,6 +90440,9 @@ var require_options = __commonJS({ result.uploadChunkSize = copy.uploadChunkSize; } } + result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; + result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; + core2.debug(`Use Azure SDK: ${result.useAzureSdk}`); core2.debug(`Upload concurrency: ${result.uploadConcurrency}`); core2.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; @@ -90195,6 +90495,122 @@ var require_options = __commonJS({ } }); +// ../node_modules/@actions/cache/lib/internal/config.js +var require_config = __commonJS({ + "../node_modules/@actions/cache/lib/internal/config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + function isGhes() { + const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === "GITHUB.COM"; + const isGheHost = hostname.endsWith(".GHE.COM"); + const isLocalHost = hostname.endsWith(".LOCALHOST"); + return !isGitHubHost && !isGheHost && !isLocalHost; + } + __name(isGhes, "isGhes"); + exports2.isGhes = isGhes; + function getCacheServiceVersion() { + if (isGhes()) + return "v1"; + return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; + } + __name(getCacheServiceVersion, "getCacheServiceVersion"); + exports2.getCacheServiceVersion = getCacheServiceVersion; + function getCacheServiceURL() { + const version3 = getCacheServiceVersion(); + switch (version3) { + case "v1": + return process.env["ACTIONS_CACHE_URL"] || process.env["ACTIONS_RESULTS_URL"] || ""; + case "v2": + return process.env["ACTIONS_RESULTS_URL"] || ""; + default: + throw new Error(`Unsupported cache service version: ${version3}`); + } + } + __name(getCacheServiceURL, "getCacheServiceURL"); + exports2.getCacheServiceURL = getCacheServiceURL; + } +}); + +// ../node_modules/@actions/cache/package.json +var require_package = __commonJS({ + "../node_modules/@actions/cache/package.json"(exports2, module2) { + module2.exports = { + name: "@actions/cache", + version: "4.0.0", + preview: true, + description: "Actions cache lib", + keywords: [ + "github", + "actions", + "cache" + ], + homepage: "https://github.com/actions/toolkit/tree/main/packages/cache", + license: "MIT", + main: "lib/cache.js", + types: "lib/cache.d.ts", + directories: { + lib: "lib", + test: "__tests__" + }, + files: [ + "lib", + "!.DS_Store" + ], + publishConfig: { + access: "public" + }, + repository: { + type: "git", + url: "git+https://github.com/actions/toolkit.git", + directory: "packages/cache" + }, + scripts: { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + test: 'echo "Error: run tests from root" && exit 1', + tsc: "tsc" + }, + bugs: { + url: "https://github.com/actions/toolkit/issues" + }, + dependencies: { + "@actions/core": "^1.11.1", + "@actions/exec": "^1.0.1", + "@actions/glob": "^0.1.0", + "@actions/http-client": "^2.1.1", + "@actions/io": "^1.0.1", + "@azure/abort-controller": "^1.1.0", + "@azure/ms-rest-js": "^2.6.0", + "@azure/storage-blob": "^12.13.0", + "@protobuf-ts/plugin": "^2.9.4", + semver: "^6.3.1", + "twirp-ts": "^2.5.0" + }, + devDependencies: { + "@types/semver": "^6.0.0", + typescript: "^5.2.2" + } + }; + } +}); + +// ../node_modules/@actions/cache/lib/internal/shared/user-agent.js +var require_user_agent = __commonJS({ + "../node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentString = void 0; + var packageJson = require_package(); + function getUserAgentString() { + return `@actions/cache-${packageJson.version}`; + } + __name(getUserAgentString, "getUserAgentString"); + exports2.getUserAgentString = getUserAgentString; + } +}); + // ../node_modules/@actions/cache/lib/internal/cacheHttpClient.js var require_cacheHttpClient = __commonJS({ "../node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { @@ -90258,20 +90674,21 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = exports2.getCacheVersion = void 0; + exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; var core2 = __importStar3(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var crypto4 = __importStar3(require("crypto")); var fs2 = __importStar3(require("fs")); var url_1 = require("url"); var utils = __importStar3(require_cacheUtils()); + var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); var requestUtils_1 = require_requestUtils(); - var versionSalt = "1.0"; + var config_1 = require_config(); + var user_agent_1 = require_user_agent(); function getCacheApiUrl(resource) { - const baseUrl = process.env["ACTIONS_CACHE_URL"] || ""; + const baseUrl = (0, config_1.getCacheServiceURL)(); if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } @@ -90296,26 +90713,13 @@ var require_cacheHttpClient = __commonJS({ function createHttpClient() { const token = process.env["ACTIONS_RUNTIME_TOKEN"] || ""; const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); - return new http_client_1.HttpClient("actions/cache", [bearerCredentialHandler], getRequestOptions()); + return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } __name(createHttpClient, "createHttpClient"); - function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { - const components = paths.slice(); - if (compressionMethod) { - components.push(compressionMethod); - } - if (process.platform === "win32" && !enableCrossOsArchive) { - components.push("windows-only"); - } - components.push(versionSalt); - return crypto4.createHash("sha256").update(components.join("|")).digest("hex"); - } - __name(getCacheVersion, "getCacheVersion"); - exports2.getCacheVersion = getCacheVersion; function getCacheEntry(keys, paths, options) { return __awaiter3(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version3 = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const version3 = 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=${version3}`; const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter3(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); @@ -90384,7 +90788,7 @@ Other caches with similar key:`); function reserveCache(key, paths, options) { return __awaiter3(this, void 0, void 0, function* () { const httpClient = createHttpClient(); - const version3 = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const version3 = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { key, version: version3, @@ -90462,19 +90866,27 @@ Other caches with similar key:`); }); } __name(commitCache, "commitCache"); - function saveCache(cacheId, archivePath, options) { + function saveCache(cacheId, archivePath, signedUploadURL, options) { return __awaiter3(this, void 0, void 0, function* () { - const httpClient = createHttpClient(); - core2.debug("Upload cache"); - yield uploadFile(httpClient, cacheId, archivePath, options); - core2.debug("Commiting cache"); - const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core2.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); - const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); - if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { - throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); - } - core2.info("Cache saved successfully"); + const uploadOptions = (0, options_1.getUploadOptions)(options); + if (uploadOptions.useAzureSdk) { + if (!signedUploadURL) { + throw new Error("Azure Storage SDK can only be used when a signed URL is provided."); + } + yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); + } else { + const httpClient = createHttpClient(); + core2.debug("Upload cache"); + yield uploadFile(httpClient, cacheId, archivePath, options); + core2.debug("Commiting cache"); + const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); + core2.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { + throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + } + core2.info("Cache saved successfully"); + } }); } __name(saveCache, "saveCache"); @@ -90482,37 +90894,18 @@ Other caches with similar key:`); } }); -// ../node_modules/@actions/cache/lib/internal/tar.js -var require_tar = __commonJS({ - "../node_modules/@actions/cache/lib/internal/tar.js"(exports2) { +// ../node_modules/twirp-ts/build/twirp/context.js +var require_context2 = __commonJS({ + "../node_modules/twirp-ts/build/twirp/context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../node_modules/twirp-ts/build/twirp/hooks.js +var require_hooks = __commonJS({ + "../node_modules/twirp-ts/build/twirp/hooks.js"(exports2) { "use strict"; - var __createBinding3 = 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: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -90545,1646 +90938,1099 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; - var exec_1 = require_exec(); - var io2 = __importStar3(require_io()); - var fs_1 = require("fs"); - var path2 = __importStar3(require("path")); - var utils = __importStar3(require_cacheUtils()); - var constants_1 = require_constants7(); - var IS_WINDOWS = process.platform === "win32"; - function getTarPath() { - return __awaiter3(this, void 0, void 0, function* () { - switch (process.platform) { - case "win32": { - const gnuTar = yield utils.getGnuTarPathOnWindows(); - const systemTar = constants_1.SystemTarPathOnWindows; - if (gnuTar) { - return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; - } else if ((0, fs_1.existsSync)(systemTar)) { - return { path: systemTar, type: constants_1.ArchiveToolType.BSD }; + exports2.isHook = exports2.chainHooks = void 0; + function chainHooks(...hooks) { + if (hooks.length === 0) { + return null; + } + if (hooks.length === 1) { + return hooks[0]; + } + const serverHook = { + requestReceived(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.requestReceived) { + continue; + } + yield hook.requestReceived(ctx); } - break; - } - case "darwin": { - const gnuTar = yield io2.which("gtar", false); - if (gnuTar) { - return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; - } else { - return { - path: yield io2.which("tar", true), - type: constants_1.ArchiveToolType.BSD - }; + }); + }, + requestPrepared(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.requestPrepared) { + continue; + } + console.warn("hook requestPrepared is deprecated and will be removed in the next release. Please use responsePrepared instead."); + yield hook.requestPrepared(ctx); } - } - default: - break; - } - return { - path: yield io2.which("tar", true), - type: constants_1.ArchiveToolType.GNU - }; - }); - } - __name(getTarPath, "getTarPath"); - function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { - return __awaiter3(this, void 0, void 0, function* () { - 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 (type) { - case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); - break; - case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/")); - break; - case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P"); - break; - } - if (tarPath.type === constants_1.ArchiveToolType.GNU) { - switch (process.platform) { - case "win32": - args.push("--force-local"); - break; - case "darwin": - args.push("--delay-directory-restore"); - break; - } - } - return args; - }); - } - __name(getTarArgs, "getTarArgs"); - function getCommands(compressionMethod, type, archivePath = "") { - return __awaiter3(this, void 0, void 0, function* () { - let args; - const tarPath = yield getTarPath(); - 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 && type !== "create") { - args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; - } else { - args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; - } - if (BSD_TAR_ZSTD) { - return args; - } - return [args.join(" ")]; - }); - } - __name(getCommands, "getCommands"); - function getWorkingDirectory() { - var _a; - return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); - } - __name(getWorkingDirectory, "getWorkingDirectory"); - function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter3(this, void 0, void 0, function* () { - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return BSD_TAR_ZSTD ? [ - "zstd -d --long=30 --force -o", - constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") - ] : [ - "--use-compress-program", - IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" - ]; - case constants_1.CompressionMethod.ZstdWithoutLong: - return BSD_TAR_ZSTD ? [ - "zstd -d --force -o", - constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") - ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; - default: - return ["-z"]; - } - }); - } - __name(getDecompressionProgram, "getDecompressionProgram"); - function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter3(this, void 0, void 0, function* () { - const cacheFileName = utils.getCacheFileName(compressionMethod); - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return BSD_TAR_ZSTD ? [ - "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), - constants_1.TarFilename - ] : [ - "--use-compress-program", - IS_WINDOWS ? '"zstd -T0 --long=30"' : "zstdmt --long=30" - ]; - case constants_1.CompressionMethod.ZstdWithoutLong: - return BSD_TAR_ZSTD ? [ - "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), - constants_1.TarFilename - ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; - default: - return ["-z"]; - } - }); - } - __name(getCompressionProgram, "getCompressionProgram"); - function execCommands(commands, cwd) { - return __awaiter3(this, void 0, void 0, function* () { - for (const command of commands) { - try { - yield (0, exec_1.exec)(command, void 0, { - cwd, - env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) - }); - } catch (error) { - throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); - } + }); + }, + responsePrepared(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.responsePrepared) { + continue; + } + yield hook.responsePrepared(ctx); + } + }); + }, + requestSent(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.requestSent) { + continue; + } + console.warn("hook requestSent is deprecated and will be removed in the next release. Please use responseSent instead."); + yield hook.requestSent(ctx); + } + }); + }, + responseSent(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.responseSent) { + continue; + } + yield hook.responseSent(ctx); + } + }); + }, + requestRouted(ctx) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.requestRouted) { + continue; + } + yield hook.requestRouted(ctx); + } + }); + }, + error(ctx, err) { + return __awaiter3(this, void 0, void 0, function* () { + for (const hook of hooks) { + if (!hook.error) { + continue; + } + yield hook.error(ctx, err); + } + }); } - }); - } - __name(execCommands, "execCommands"); - function listTar(archivePath, compressionMethod) { - return __awaiter3(this, void 0, void 0, function* () { - const commands = yield getCommands(compressionMethod, "list", archivePath); - yield execCommands(commands); - }); - } - __name(listTar, "listTar"); - exports2.listTar = listTar; - function extractTar(archivePath, compressionMethod) { - return __awaiter3(this, void 0, void 0, function* () { - const workingDirectory = getWorkingDirectory(); - yield io2.mkdirP(workingDirectory); - const commands = yield getCommands(compressionMethod, "extract", archivePath); - yield execCommands(commands); - }); + }; + return serverHook; } - __name(extractTar, "extractTar"); - exports2.extractTar = extractTar; - function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter3(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); - const commands = yield getCommands(compressionMethod, "create"); - yield execCommands(commands, archiveFolder); - }); + __name(chainHooks, "chainHooks"); + exports2.chainHooks = chainHooks; + function isHook(object) { + return "requestReceived" in object || "requestPrepared" in object || "requestSent" in object || "requestRouted" in object || "responsePrepared" in object || "responseSent" in object || "error" in object; } - __name(createTar, "createTar"); - exports2.createTar = createTar; + __name(isHook, "isHook"); + exports2.isHook = isHook; } }); -// ../node_modules/@actions/cache/lib/cache.js -var require_cache2 = __commonJS({ - "../node_modules/@actions/cache/lib/cache.js"(exports2) { +// ../node_modules/twirp-ts/build/twirp/errors.js +var require_errors3 = __commonJS({ + "../node_modules/twirp-ts/build/twirp/errors.js"(exports2) { "use strict"; - var __createBinding3 = 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: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; - }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core2 = __importStar3(require_core()); - var path2 = __importStar3(require("path")); - var utils = __importStar3(require_cacheUtils()); - var cacheHttpClient = __importStar3(require_cacheHttpClient()); - var tar_1 = require_tar(); - var ValidationError = class _ValidationError extends Error { + exports2.isValidErrorCode = exports2.httpStatusFromErrorCode = exports2.TwirpErrorCode = exports2.BadRouteError = exports2.InternalServerErrorWith = exports2.InternalServerError = exports2.RequiredArgumentError = exports2.InvalidArgumentError = exports2.NotFoundError = exports2.TwirpError = void 0; + var TwirpError = class _TwirpError extends Error { static { - __name(this, "ValidationError"); + __name(this, "TwirpError"); } - constructor(message) { - super(message); - this.name = "ValidationError"; - Object.setPrototypeOf(this, _ValidationError.prototype); + constructor(code, msg) { + super(msg); + this.code = TwirpErrorCode.Internal; + this.meta = {}; + this.code = code; + this.msg = msg; + Object.setPrototypeOf(this, _TwirpError.prototype); } - }; - exports2.ValidationError = ValidationError; - var ReserveCacheError = class _ReserveCacheError extends Error { - static { - __name(this, "ReserveCacheError"); + /** + * Adds a metadata kv to the error + * @param key + * @param value + */ + withMeta(key, value) { + this.meta[key] = value; + return this; } - constructor(message) { - super(message); - this.name = "ReserveCacheError"; - Object.setPrototypeOf(this, _ReserveCacheError.prototype); - } - }; - exports2.ReserveCacheError = ReserveCacheError; - function checkPaths(paths) { - if (!paths || paths.length === 0) { - throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); + /** + * Returns a single metadata value + * return "" if not found + * @param key + */ + getMeta(key) { + return this.meta[key] || ""; } - } - __name(checkPaths, "checkPaths"); - function checkKey(key) { - if (key.length > 512) { - throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); + /** + * Add the original error cause + * @param err + * @param addMeta + */ + withCause(err, addMeta = false) { + this._originalCause = err; + if (addMeta) { + this.withMeta("cause", err.message); + } + return this; } - const regex = /^[^,]*$/; - if (!regex.test(key)) { - throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); + cause() { + return this._originalCause; } - } - __name(checkKey, "checkKey"); - function isFeatureAvailable() { - return !!process.env["ACTIONS_CACHE_URL"]; - } - __name(isFeatureAvailable, "isFeatureAvailable"); - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter3(this, void 0, void 0, function* () { - checkPaths(paths); - restoreKeys = restoreKeys || []; - const keys = [primaryKey, ...restoreKeys]; - core2.debug("Resolved Keys:"); - core2.debug(JSON.stringify(keys)); - if (keys.length > 10) { - throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); - } - for (const key of keys) { - checkKey(key); - } - const compressionMethod = yield utils.getCompressionMethod(); - let archivePath = ""; - try { - const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { - compressionMethod, - enableCrossOsArchive - }); - if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { - return void 0; - } - if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core2.info("Lookup only - skipping download"); - return cacheEntry.cacheKey; - } - archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core2.debug(`Archive Path: ${archivePath}`); - yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core2.isDebug()) { - yield (0, tar_1.listTar)(archivePath, compressionMethod); - } - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core2.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core2.info("Cache restored successfully"); - return cacheEntry.cacheKey; - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) { - throw error; - } else { - core2.warning(`Failed to restore: ${error.message}`); - } - } finally { - try { - yield utils.unlinkFile(archivePath); - } catch (error) { - core2.debug(`Failed to delete archive: ${error}`); - } - } - return void 0; - }); - } - __name(restoreCache, "restoreCache"); - exports2.restoreCache = restoreCache; - function saveCache(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter3(this, void 0, void 0, function* () { - checkPaths(paths); - checkKey(key); - const compressionMethod = yield utils.getCompressionMethod(); - let cacheId = -1; - const cachePaths = yield utils.resolvePaths(paths); - core2.debug("Cache Paths:"); - core2.debug(`${JSON.stringify(cachePaths)}`); - if (cachePaths.length === 0) { - 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 = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core2.debug(`Archive Path: ${archivePath}`); + /** + * Returns the error representation to JSON + */ + toJSON() { try { - yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core2.isDebug()) { - yield (0, tar_1.listTar)(archivePath, compressionMethod); - } - const fileSizeLimit = 10 * 1024 * 1024 * 1024; - const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core2.debug(`File Size: ${archiveFileSize}`); - if (archiveFileSize > fileSizeLimit && !utils.isGhes()) { - throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); - } - core2.debug("Reserving Cache"); - const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { - compressionMethod, - enableCrossOsArchive, - cacheSize: archiveFileSize + return JSON.stringify({ + code: this.code, + msg: this.msg, + meta: this.meta }); - if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.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 ReserveCacheError(`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}`); - } - core2.debug(`Saving Cache (ID: ${cacheId})`); - yield cacheHttpClient.saveCache(cacheId, archivePath, options); - } catch (error) { - const typedError = error; - if (typedError.name === ValidationError.name) { - throw error; - } else if (typedError.name === ReserveCacheError.name) { - core2.info(`Failed to save: ${typedError.message}`); - } else { - core2.warning(`Failed to save: ${typedError.message}`); - } - } finally { - try { - yield utils.unlinkFile(archivePath); - } catch (error) { - core2.debug(`Failed to delete archive: ${error}`); - } + } catch (e) { + return `{"code": "internal", "msg": "There was an error but it could not be serialized into JSON"}`; } - return cacheId; - }); - } - __name(saveCache, "saveCache"); - exports2.saveCache = saveCache; - } -}); - -// ../node_modules/@actions/tool-cache/node_modules/semver/semver.js -var require_semver2 = __commonJS({ - "../node_modules/@actions/tool-cache/node_modules/semver/semver.js"(exports2, module2) { - exports2 = module2.exports = SemVer; - var debug; - if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = /* @__PURE__ */ __name(function() { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift("SEMVER"); - console.log.apply(console, args); - }, "debug"); - } else { - debug = /* @__PURE__ */ __name(function() { - }, "debug"); - } - exports2.SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var re2 = exports2.re = []; - var safeRe = exports2.safeRe = []; - var src = exports2.src = []; - var t = exports2.tokens = {}; - var R = 0; - function tok(n) { - t[n] = R++; - } - __name(tok, "tok"); - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - function makeSafeRe(value) { - for (var i2 = 0; i2 < safeRegexReplacements.length; i2++) { - var token = safeRegexReplacements[i2][0]; - var max = safeRegexReplacements[i2][1]; - value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); - } - return value; - } - __name(makeSafeRe, "makeSafeRe"); - tok("NUMERICIDENTIFIER"); - src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; - tok("NUMERICIDENTIFIERLOOSE"); - src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; - tok("NONNUMERICIDENTIFIER"); - src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; - tok("MAINVERSION"); - src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; - tok("MAINVERSIONLOOSE"); - src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; - tok("PRERELEASEIDENTIFIER"); - src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASEIDENTIFIERLOOSE"); - src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; - tok("PRERELEASE"); - src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; - tok("PRERELEASELOOSE"); - src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; - tok("BUILDIDENTIFIER"); - src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; - tok("BUILD"); - src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; - tok("FULL"); - tok("FULLPLAIN"); - src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; - src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; - tok("LOOSEPLAIN"); - src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; - tok("LOOSE"); - src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; - tok("GTLT"); - src[t.GTLT] = "((?:<|>)?=?)"; - tok("XRANGEIDENTIFIERLOOSE"); - src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; - tok("XRANGEIDENTIFIER"); - src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; - tok("XRANGEPLAIN"); - src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGEPLAINLOOSE"); - src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; - tok("XRANGE"); - src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; - tok("XRANGELOOSE"); - src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COERCE"); - src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; - tok("COERCERTL"); - re2[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); - safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); - tok("LONETILDE"); - src[t.LONETILDE] = "(?:~>?)"; - tok("TILDETRIM"); - src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; - re2[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); - safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); - var tildeTrimReplace = "$1~"; - tok("TILDE"); - src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; - tok("TILDELOOSE"); - src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("LONECARET"); - src[t.LONECARET] = "(?:\\^)"; - tok("CARETTRIM"); - src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; - re2[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); - safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); - var caretTrimReplace = "$1^"; - tok("CARET"); - src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; - tok("CARETLOOSE"); - src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; - tok("COMPARATORLOOSE"); - src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; - tok("COMPARATOR"); - src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; - tok("COMPARATORTRIM"); - src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; - re2[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); - safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); - var comparatorTrimReplace = "$1$2$3"; - tok("HYPHENRANGE"); - src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; - tok("HYPHENRANGELOOSE"); - src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; - tok("STAR"); - src[t.STAR] = "(<|>)?=?\\s*\\*"; - for (i = 0; i < R; i++) { - debug(i, src[i]); - if (!re2[i]) { - re2[i] = new RegExp(src[i]); - safeRe[i] = new RegExp(makeSafeRe(src[i])); - } - } - var i; - exports2.parse = parse2; - function parse2(version3, options) { - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false - }; - } - if (version3 instanceof SemVer) { - return version3; - } - if (typeof version3 !== "string") { - return null; - } - if (version3.length > MAX_LENGTH) { - return null; - } - var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version3)) { - return null; - } - try { - return new SemVer(version3, options); - } catch (er) { - return null; - } - } - __name(parse2, "parse"); - exports2.valid = valid; - function valid(version3, options) { - var v = parse2(version3, options); - return v ? v.version : null; - } - __name(valid, "valid"); - exports2.clean = clean; - function clean(version3, options) { - var s = parse2(version3.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; - } - __name(clean, "clean"); - exports2.SemVer = SemVer; - function SemVer(version3, options) { - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false - }; } - if (version3 instanceof SemVer) { - if (version3.loose === options.loose) { - return version3; - } else { - version3 = version3.version; + /** + * Create a twirp error from an object + * @param obj + */ + static fromObject(obj) { + const code = obj["code"] || TwirpErrorCode.Unknown; + const msg = obj["msg"] || "unknown"; + const error = new _TwirpError(code, msg); + if (obj["meta"]) { + Object.keys(obj["meta"]).forEach((key) => { + error.withMeta(key, obj["meta"][key]); + }); } - } else if (typeof version3 !== "string") { - throw new TypeError("Invalid Version: " + version3); + return error; } - if (version3.length > MAX_LENGTH) { - throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + }; + exports2.TwirpError = TwirpError; + var NotFoundError = class extends TwirpError { + static { + __name(this, "NotFoundError"); } - if (!(this instanceof SemVer)) { - return new SemVer(version3, options); + constructor(msg) { + super(TwirpErrorCode.NotFound, msg); } - debug("SemVer", version3, options); - this.options = options; - this.loose = !!options.loose; - var m = version3.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); - if (!m) { - throw new TypeError("Invalid Version: " + version3); + }; + exports2.NotFoundError = NotFoundError; + var InvalidArgumentError = class extends TwirpError { + static { + __name(this, "InvalidArgumentError"); } - this.raw = version3; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); + constructor(argument, validationMsg) { + super(TwirpErrorCode.InvalidArgument, argument + " " + validationMsg); + this.withMeta("argument", argument); } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); + }; + exports2.InvalidArgumentError = InvalidArgumentError; + var RequiredArgumentError = class extends InvalidArgumentError { + static { + __name(this, "RequiredArgumentError"); } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); + constructor(argument) { + super(argument, "is required"); } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } - } - return id; - }); + }; + exports2.RequiredArgumentError = RequiredArgumentError; + var InternalServerError = class extends TwirpError { + static { + __name(this, "InternalServerError"); } - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - __name(SemVer, "SemVer"); - SemVer.prototype.format = function() { - this.version = this.major + "." + this.minor + "." + this.patch; - if (this.prerelease.length) { - this.version += "-" + this.prerelease.join("."); + constructor(msg) { + super(TwirpErrorCode.Internal, msg); } - return this.version; - }; - SemVer.prototype.toString = function() { - return this.version; }; - SemVer.prototype.compare = function(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + exports2.InternalServerError = InternalServerError; + var InternalServerErrorWith = class extends InternalServerError { + static { + __name(this, "InternalServerErrorWith"); } - return this.compareMain(other) || this.comparePre(other); - }; - SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + constructor(err) { + super(err.message); + this.withMeta("cause", err.name); + this.withCause(err); } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; - SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + exports2.InternalServerErrorWith = InternalServerErrorWith; + var BadRouteError = class extends TwirpError { + static { + __name(this, "BadRouteError"); } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; + constructor(msg, method, url) { + super(TwirpErrorCode.BadRoute, msg); + this.withMeta("twirp_invalid_route", method + " " + url); } - var i2 = 0; - do { - var a = this.prerelease[i2]; - var b = other.prerelease[i2]; - debug("prerelease compare", i2, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i2); }; - SemVer.prototype.compareBuild = function(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - var i2 = 0; - do { - var a = this.build[i2]; - var b = other.build[i2]; - debug("prerelease compare", i2, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i2); - }; - SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier); - this.inc("pre", identifier); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier); - } - this.inc("pre", identifier); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case "pre": - if (this.prerelease.length === 0) { - this.prerelease = [0]; - } else { - var i2 = this.prerelease.length; - while (--i2 >= 0) { - if (typeof this.prerelease[i2] === "number") { - this.prerelease[i2]++; - i2 = -2; - } - } - if (i2 === -1) { - this.prerelease.push(0); - } - } - if (identifier) { - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0]; - } - } else { - this.prerelease = [identifier, 0]; - } - } - break; + exports2.BadRouteError = BadRouteError; + var TwirpErrorCode; + (function(TwirpErrorCode2) { + TwirpErrorCode2["Canceled"] = "canceled"; + TwirpErrorCode2["Unknown"] = "unknown"; + TwirpErrorCode2["InvalidArgument"] = "invalid_argument"; + TwirpErrorCode2["Malformed"] = "malformed"; + TwirpErrorCode2["DeadlineExceeded"] = "deadline_exceeded"; + TwirpErrorCode2["NotFound"] = "not_found"; + TwirpErrorCode2["BadRoute"] = "bad_route"; + TwirpErrorCode2["AlreadyExists"] = "already_exists"; + TwirpErrorCode2["PermissionDenied"] = "permission_denied"; + TwirpErrorCode2["Unauthenticated"] = "unauthenticated"; + TwirpErrorCode2["ResourceExhausted"] = "resource_exhausted"; + TwirpErrorCode2["FailedPrecondition"] = "failed_precondition"; + TwirpErrorCode2["Aborted"] = "aborted"; + TwirpErrorCode2["OutOfRange"] = "out_of_range"; + TwirpErrorCode2["Unimplemented"] = "unimplemented"; + TwirpErrorCode2["Internal"] = "internal"; + TwirpErrorCode2["Unavailable"] = "unavailable"; + TwirpErrorCode2["DataLoss"] = "data_loss"; + })(TwirpErrorCode = exports2.TwirpErrorCode || (exports2.TwirpErrorCode = {})); + function httpStatusFromErrorCode(code) { + switch (code) { + case TwirpErrorCode.Canceled: + return 408; + // RequestTimeout + case TwirpErrorCode.Unknown: + return 500; + // Internal Server Error + case TwirpErrorCode.InvalidArgument: + return 400; + // BadRequest + case TwirpErrorCode.Malformed: + return 400; + // BadRequest + case TwirpErrorCode.DeadlineExceeded: + return 408; + // RequestTimeout + case TwirpErrorCode.NotFound: + return 404; + // Not Found + case TwirpErrorCode.BadRoute: + return 404; + // Not Found + case TwirpErrorCode.AlreadyExists: + return 409; + // Conflict + case TwirpErrorCode.PermissionDenied: + return 403; + // Forbidden + case TwirpErrorCode.Unauthenticated: + return 401; + // Unauthorized + case TwirpErrorCode.ResourceExhausted: + return 429; + // Too Many Requests + case TwirpErrorCode.FailedPrecondition: + return 412; + // Precondition Failed + case TwirpErrorCode.Aborted: + return 409; + // Conflict + case TwirpErrorCode.OutOfRange: + return 400; + // Bad Request + case TwirpErrorCode.Unimplemented: + return 501; + // Not Implemented + case TwirpErrorCode.Internal: + return 500; + // Internal Server Error + case TwirpErrorCode.Unavailable: + return 503; + // Service Unavailable + case TwirpErrorCode.DataLoss: + return 500; + // Internal Server Error default: - throw new Error("invalid increment argument: " + release); - } - this.format(); - this.raw = this.version; - return this; - }; - exports2.inc = inc; - function inc(version3, release, loose, identifier) { - if (typeof loose === "string") { - identifier = loose; - loose = void 0; - } - try { - return new SemVer(version3, loose).inc(release, identifier).version; - } catch (er) { - return null; + return 0; } } - __name(inc, "inc"); - exports2.diff = diff; - function diff(version1, version22) { - if (eq(version1, version22)) { - return null; - } else { - var v12 = parse2(version1); - var v2 = parse2(version22); - var prefix = ""; - if (v12.prerelease.length || v2.prerelease.length) { - prefix = "pre"; - var defaultResult = "prerelease"; + __name(httpStatusFromErrorCode, "httpStatusFromErrorCode"); + exports2.httpStatusFromErrorCode = httpStatusFromErrorCode; + function isValidErrorCode(code) { + return httpStatusFromErrorCode(code) != 0; + } + __name(isValidErrorCode, "isValidErrorCode"); + exports2.isValidErrorCode = isValidErrorCode; + } +}); + +// ../node_modules/twirp-ts/build/twirp/request.js +var require_request3 = __commonJS({ + "../node_modules/twirp-ts/build/twirp/request.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - for (var key in v12) { - if (key === "major" || key === "minor" || key === "patch") { - if (v12[key] !== v2[key]) { - return prefix + key; - } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } } - return defaultResult; - } - } - __name(diff, "diff"); - exports2.compareIdentifiers = compareIdentifiers; - var numeric = /^[0-9]+$/; - function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - } - __name(compareIdentifiers, "compareIdentifiers"); - exports2.rcompareIdentifiers = rcompareIdentifiers; - function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); - } - __name(rcompareIdentifiers, "rcompareIdentifiers"); - exports2.major = major2; - function major2(a, loose) { - return new SemVer(a, loose).major; - } - __name(major2, "major"); - exports2.minor = minor; - function minor(a, loose) { - return new SemVer(a, loose).minor; - } - __name(minor, "minor"); - exports2.patch = patch; - function patch(a, loose) { - return new SemVer(a, loose).patch; - } - __name(patch, "patch"); - exports2.compare = compare; - function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); - } - __name(compare, "compare"); - exports2.compareLoose = compareLoose; - function compareLoose(a, b) { - return compare(a, b, true); - } - __name(compareLoose, "compareLoose"); - exports2.compareBuild = compareBuild; - function compareBuild(a, b, loose) { - var versionA = new SemVer(a, loose); - var versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - } - __name(compareBuild, "compareBuild"); - exports2.rcompare = rcompare; - function rcompare(a, b, loose) { - return compare(b, a, loose); - } - __name(rcompare, "rcompare"); - exports2.sort = sort; - function sort(list, loose) { - return list.sort(function(a, b) { - return exports2.compareBuild(a, b, loose); - }); - } - __name(sort, "sort"); - exports2.rsort = rsort; - function rsort(list, loose) { - return list.sort(function(a, b) { - return exports2.compareBuild(b, a, loose); + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); - } - __name(rsort, "rsort"); - exports2.gt = gt; - function gt(a, b, loose) { - return compare(a, b, loose) > 0; - } - __name(gt, "gt"); - exports2.lt = lt; - function lt(a, b, loose) { - return compare(a, b, loose) < 0; - } - __name(lt, "lt"); - exports2.eq = eq; - function eq(a, b, loose) { - return compare(a, b, loose) === 0; - } - __name(eq, "eq"); - exports2.neq = neq; - function neq(a, b, loose) { - return compare(a, b, loose) !== 0; - } - __name(neq, "neq"); - exports2.gte = gte; - function gte(a, b, loose) { - return compare(a, b, loose) >= 0; - } - __name(gte, "gte"); - exports2.lte = lte; - function lte(a, b, loose) { - return compare(a, b, loose) <= 0; - } - __name(lte, "lte"); - exports2.cmp = cmp; - function cmp(a, op, b, loose) { - switch (op) { - case "===": - if (typeof a === "object") - a = a.version; - if (typeof b === "object") - b = b.version; - return a === b; - case "!==": - if (typeof a === "object") - a = a.version; - if (typeof b === "object") - b = b.version; - return a !== b; - case "": - case "=": - case "==": - return eq(a, b, loose); - case "!=": - return neq(a, b, loose); - case ">": - return gt(a, b, loose); - case ">=": - return gte(a, b, loose); - case "<": - return lt(a, b, loose); - case "<=": - return lte(a, b, loose); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseTwirpPath = exports2.getRequestData = exports2.validateRequest = exports2.getContentType = exports2.TwirpContentType = void 0; + var errors_1 = require_errors3(); + var TwirpContentType; + (function(TwirpContentType2) { + TwirpContentType2[TwirpContentType2["Protobuf"] = 0] = "Protobuf"; + TwirpContentType2[TwirpContentType2["JSON"] = 1] = "JSON"; + TwirpContentType2[TwirpContentType2["Unknown"] = 2] = "Unknown"; + })(TwirpContentType = exports2.TwirpContentType || (exports2.TwirpContentType = {})); + function getContentType(mimeType) { + switch (mimeType) { + case "application/protobuf": + return TwirpContentType.Protobuf; + case "application/json": + return TwirpContentType.JSON; default: - throw new TypeError("Invalid operator: " + op); + return TwirpContentType.Unknown; } } - __name(cmp, "cmp"); - exports2.Comparator = Comparator; - function Comparator(comp, options) { - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false - }; + __name(getContentType, "getContentType"); + exports2.getContentType = getContentType; + function validateRequest(ctx, request, pathPrefix) { + if (request.method !== "POST") { + const msg = `unsupported method ${request.method} (only POST is allowed)`; + throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); } - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } + const path2 = parseTwirpPath(request.url || ""); + if (path2.pkgService !== (ctx.packageName ? ctx.packageName + "." : "") + ctx.serviceName) { + const msg = `no handler for path ${request.url}`; + throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); } - if (!(this instanceof Comparator)) { - return new Comparator(comp, options); + if (path2.prefix !== pathPrefix) { + const msg = `invalid path prefix ${path2.prefix}, expected ${pathPrefix}, on path ${request.url}`; + throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); } - comp = comp.trim().split(/\s+/).join(" "); - debug("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; + const mimeContentType = request.headers["content-type"] || ""; + if (ctx.contentType === TwirpContentType.Unknown) { + const msg = `unexpected Content-Type: ${request.headers["content-type"]}`; + throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); } - debug("comp", this); + return Object.assign(Object.assign({}, path2), { mimeContentType, contentType: ctx.contentType }); } - __name(Comparator, "Comparator"); - var ANY = {}; - Comparator.prototype.parse = function(comp) { - var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var m = comp.match(r); - if (!m) { - throw new TypeError("Invalid comparator: " + comp); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer(m[2], this.options.loose); - } - }; - Comparator.prototype.toString = function() { - return this.value; - }; - Comparator.prototype.test = function(version3) { - debug("Comparator.test", version3, this.options.loose); - if (this.semver === ANY || version3 === ANY) { - return true; - } - if (typeof version3 === "string") { - try { - version3 = new SemVer(version3, this.options); - } catch (er) { - return false; + __name(validateRequest, "validateRequest"); + exports2.validateRequest = validateRequest; + function getRequestData(req) { + return new Promise((resolve, reject) => { + const reqWithRawBody = req; + if (reqWithRawBody.rawBody instanceof Buffer) { + resolve(reqWithRawBody.rawBody); + return; } - } - return cmp(version3, this.operator, this.semver, this.options); - }; - Comparator.prototype.intersects = function(comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError("a Comparator is required"); - } - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false + const chunks = []; + req.on("data", (chunk) => chunks.push(chunk)); + req.on("end", () => __awaiter3(this, void 0, void 0, function* () { + const data = Buffer.concat(chunks); + resolve(data); + })); + req.on("error", (err) => { + if (req.aborted) { + reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.DeadlineExceeded, "failed to read request: deadline exceeded")); + } else { + reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, err.message).withCause(err)); + } + }); + req.on("close", () => { + reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Canceled, "failed to read request: context canceled")); + }); + }); + } + __name(getRequestData, "getRequestData"); + exports2.getRequestData = getRequestData; + function parseTwirpPath(path2) { + const parts = path2.split("/"); + if (parts.length < 2) { + return { + pkgService: "", + method: "", + prefix: "" }; } - var rangeTmp; - if (this.operator === "") { - if (this.value === "") { - return true; - } - rangeTmp = new Range(comp.value, options); - return satisfies(this.value, rangeTmp, options); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; - } - rangeTmp = new Range(this.value, options); - return satisfies(comp.semver, rangeTmp, options); + return { + method: parts[parts.length - 1], + pkgService: parts[parts.length - 2], + prefix: parts.slice(0, parts.length - 2).join("/") + }; + } + __name(parseTwirpPath, "parseTwirpPath"); + exports2.parseTwirpPath = parseTwirpPath; + } +}); + +// ../node_modules/twirp-ts/build/twirp/server.js +var require_server = __commonJS({ + "../node_modules/twirp-ts/build/twirp/server.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); - var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); - var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); - var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); - return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.Range = Range; - function Range(range, options) { - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeError = exports2.TwirpServer = void 0; + var hooks_1 = require_hooks(); + var request_1 = require_request3(); + var errors_1 = require_errors3(); + var TwirpServer = class { + static { + __name(this, "TwirpServer"); + } + constructor(options) { + this.pathPrefix = "/twirp"; + this.hooks = []; + this.interceptors = []; + this.packageName = options.packageName; + this.serviceName = options.serviceName; + this.methodList = options.methodList; + this.matchRoute = options.matchRoute; + this.service = options.service; + } + /** + * Returns the prefix for this server + */ + get prefix() { + return this.pathPrefix; + } + /** + * The http handler for twirp complaint endpoints + * @param options + */ + httpHandler(options) { + return (req, resp) => { + if ((options === null || options === void 0 ? void 0 : options.prefix) !== void 0) { + this.withPrefix(options.prefix); + } + return this._httpHandler(req, resp); }; } - if (range instanceof Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; + /** + * Adds interceptors or hooks to the request stack + * @param middlewares + */ + use(...middlewares) { + middlewares.forEach((middleware) => { + if (hooks_1.isHook(middleware)) { + this.hooks.push(middleware); + return this; + } + this.interceptors.push(middleware); + }); + return this; + } + /** + * Adds a prefix to the service url path + * @param prefix + */ + withPrefix(prefix) { + if (prefix === false) { + this.pathPrefix = ""; } else { - return new Range(range.raw, options); + this.pathPrefix = prefix; } + return this; } - if (range instanceof Comparator) { - return new Range(range.value, options); + /** + * Returns the regex matching path for this twirp server + */ + matchingPath() { + const baseRegex = this.baseURI().replace(/\./g, "\\."); + return new RegExp(`${baseRegex}/(${this.methodList.join("|")})`); } - if (!(this instanceof Range)) { - return new Range(range, options); + /** + * Returns the base URI for this twirp server + */ + baseURI() { + return `${this.pathPrefix}/${this.packageName ? this.packageName + "." : ""}${this.serviceName}`; } - 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).filter(function(c) { - return c.length; - }); - if (!this.set.length) { - throw new TypeError("Invalid SemVer Range: " + this.raw); + /** + * Create a twirp context + * @param req + * @param res + * @private + */ + createContext(req, res) { + return { + packageName: this.packageName, + serviceName: this.serviceName, + methodName: "", + contentType: request_1.getContentType(req.headers["content-type"]), + req, + res + }; } - this.format(); - } - __name(Range, "Range"); - Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; - }; - Range.prototype.toString = function() { - return this.range; - }; - Range.prototype.parseRange = function(range) { - var loose = this.options.loose; - var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug("hyphen replace", range); - range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); - debug("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(" "); - var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; - var set = range.split(" ").map(function(comp) { - return parseComparator(comp, this.options); - }, this).join(" ").split(/\s+/); - if (this.options.loose) { - set = set.filter(function(comp) { - return !!comp.match(compRe); + /** + * Twrip server http handler implementation + * @param req + * @param resp + * @private + */ + _httpHandler(req, resp) { + return __awaiter3(this, void 0, void 0, function* () { + const ctx = this.createContext(req, resp); + try { + yield this.invokeHook("requestReceived", ctx); + const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || ""); + const handler = this.matchRoute(method, { + onMatch: /* @__PURE__ */ __name((ctx2) => { + return this.invokeHook("requestRouted", ctx2); + }, "onMatch"), + onNotFound: /* @__PURE__ */ __name(() => { + const msg = `no handler for path ${req.url}`; + throw new errors_1.BadRouteError(msg, req.method || "", req.url || ""); + }, "onNotFound") + }); + const body = yield request_1.getRequestData(req); + const response = yield handler(ctx, this.service, body, this.interceptors); + yield Promise.all([ + this.invokeHook("responsePrepared", ctx), + // keep backwards compatibility till next release + this.invokeHook("requestPrepared", ctx) + ]); + resp.statusCode = 200; + resp.setHeader("Content-Type", mimeContentType); + resp.end(response); + } catch (e) { + yield this.invokeHook("error", ctx, mustBeTwirpError(e)); + if (!resp.headersSent) { + writeError(resp, e); + } + } finally { + yield Promise.all([ + this.invokeHook("responseSent", ctx), + // keep backwards compatibility till next release + this.invokeHook("requestSent", ctx) + ]); + } + }); + } + /** + * Invoke a hook + * @param hookName + * @param ctx + * @param err + * @protected + */ + invokeHook(hookName, ctx, err) { + return __awaiter3(this, void 0, void 0, function* () { + if (this.hooks.length === 0) { + return; + } + const chainedHooks = hooks_1.chainHooks(...this.hooks); + const hook = chainedHooks === null || chainedHooks === void 0 ? void 0 : chainedHooks[hookName]; + if (hook) { + yield hook(ctx, err || new errors_1.InternalServerError("internal server error")); + } }); } - set = set.map(function(comp) { - return new Comparator(comp, this.options); - }, this); - return set; }; - Range.prototype.intersects = function(range, options) { - if (!(range instanceof Range)) { - throw new TypeError("a Range is required"); + exports2.TwirpServer = TwirpServer; + function writeError(res, error) { + const twirpError = mustBeTwirpError(error); + res.setHeader("Content-Type", "application/json"); + res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code); + res.end(twirpError.toJSON()); + } + __name(writeError, "writeError"); + exports2.writeError = writeError; + function mustBeTwirpError(err) { + if (err instanceof errors_1.TwirpError) { + return err; } - return this.set.some(function(thisComparators) { - return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { - return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, options); - }); - }); + return new errors_1.InternalServerErrorWith(err); + } + __name(mustBeTwirpError, "mustBeTwirpError"); + } +}); + +// ../node_modules/twirp-ts/build/twirp/interceptors.js +var require_interceptors = __commonJS({ + "../node_modules/twirp-ts/build/twirp/interceptors.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - function isSatisfiable(comparators, options) { - var result = true; - var remainingComparators = comparators.slice(); - var testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every(function(otherComparator) { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chainInterceptors = void 0; + function chainInterceptors(...interceptors) { + if (interceptors.length === 0) { + return; } - return result; - } - __name(isSatisfiable, "isSatisfiable"); - exports2.toComparators = toComparators; - function toComparators(range, options) { - return new Range(range, options).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(" ").trim().split(" "); + if (interceptors.length === 1) { + return interceptors[0]; + } + const first = interceptors[0]; + return (ctx, request, handler) => __awaiter3(this, void 0, void 0, function* () { + let next = handler; + for (let i = interceptors.length - 1; i > 0; i--) { + next = /* @__PURE__ */ ((next2) => (ctx2, typedRequest) => { + return interceptors[i](ctx2, typedRequest, next2); + })(next); + } + return first(ctx, request, next); }); } - __name(toComparators, "toComparators"); - function parseComparator(comp, options) { - debug("comp", comp, options); - comp = replaceCarets(comp, options); - debug("caret", comp); - comp = replaceTildes(comp, options); - debug("tildes", comp); - comp = replaceXRanges(comp, options); - debug("xrange", comp); - comp = replaceStars(comp, options); - debug("stars", comp); - return comp; + __name(chainInterceptors, "chainInterceptors"); + exports2.chainInterceptors = chainInterceptors; + } +}); + +// ../node_modules/dot-object/index.js +var require_dot_object = __commonJS({ + "../node_modules/dot-object/index.js"(exports2, module2) { + "use strict"; + function _process(v, mod) { + var i; + var r; + if (typeof mod === "function") { + r = mod(v); + if (r !== void 0) { + v = r; + } + } else if (Array.isArray(mod)) { + for (i = 0; i < mod.length; i++) { + r = mod[i](v); + if (r !== void 0) { + v = r; + } + } + } + return v; } - __name(parseComparator, "parseComparator"); - function isX(id) { - return !id || id.toLowerCase() === "x" || id === "*"; + __name(_process, "_process"); + function parseKey(key, val) { + if (key[0] === "-" && Array.isArray(val) && /^-\d+$/.test(key)) { + return val.length + parseInt(key, 10); + } + return key; } - __name(isX, "isX"); - function replaceTildes(comp, options) { - return comp.trim().split(/\s+/).map(function(comp2) { - return replaceTilde(comp2, options); - }).join(" "); + __name(parseKey, "parseKey"); + function isIndex(k) { + return /^\d+$/.test(k); } - __name(replaceTildes, "replaceTildes"); - function replaceTilde(comp, options) { - var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; - return comp.replace(r, function(_2, M, m, p, pr) { - debug("tilde", comp, _2, M, m, p, pr); - var ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - } else if (isX(p)) { - ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - } else if (pr) { - debug("replaceTilde pr", pr); - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - } else { - ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - } - debug("tilde return", ret); - return ret; - }); + __name(isIndex, "isIndex"); + function isObject(val) { + return Object.prototype.toString.call(val) === "[object Object]"; } - __name(replaceTilde, "replaceTilde"); - function replaceCarets(comp, options) { - return comp.trim().split(/\s+/).map(function(comp2) { - return replaceCaret(comp2, options); - }).join(" "); + __name(isObject, "isObject"); + function isArrayOrObject(val) { + return Object(val) === val; } - __name(replaceCarets, "replaceCarets"); - function replaceCaret(comp, options) { - debug("caret", comp, options); - var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; - return comp.replace(r, function(_2, M, m, p, pr) { - debug("caret", comp, _2, M, m, p, pr); - var ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; - } else if (isX(p)) { - if (M === "0") { - ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; - } else { - ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; - } - } else if (pr) { - debug("replaceCaret pr", pr); - if (M === "0") { - if (m === "0") { - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); - } else { - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; - } - } else { - ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; - } - } else { - debug("no pr"); - if (M === "0") { - if (m === "0") { - ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); - } else { - ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; - } - } else { - ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; - } - } - debug("caret return", ret); - return ret; - }); + __name(isArrayOrObject, "isArrayOrObject"); + function isEmptyObject(val) { + return Object.keys(val).length === 0; } - __name(replaceCaret, "replaceCaret"); - function replaceXRanges(comp, options) { - debug("replaceXRanges", comp, options); - return comp.split(/\s+/).map(function(comp2) { - return replaceXRange(comp2, options); - }).join(" "); + __name(isEmptyObject, "isEmptyObject"); + var blacklist = ["__proto__", "prototype", "constructor"]; + var blacklistFilter = /* @__PURE__ */ __name(function(part) { + return blacklist.indexOf(part) === -1; + }, "blacklistFilter"); + function parsePath(path2, sep) { + if (path2.indexOf("[") >= 0) { + path2 = path2.replace(/\[/g, sep).replace(/]/g, ""); + } + var parts = path2.split(sep); + var check = parts.filter(blacklistFilter); + if (check.length !== parts.length) { + throw Error("Refusing to update blacklisted property " + path2); + } + return parts; } - __name(replaceXRanges, "replaceXRanges"); - function replaceXRange(comp, options) { - comp = comp.trim(); - var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug("xRange", comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; - } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; - } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M = +M + 1; - } else { - m = +m + 1; - } - } - ret = gtlt + M + "." + m + "." + p + pr; - } else if (xm) { - ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; - } else if (xp) { - ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; - } - debug("xRange return", ret); - return ret; - }); - } - __name(replaceXRange, "replaceXRange"); - function replaceStars(comp, options) { - debug("replaceStars", comp, options); - return comp.trim().replace(safeRe[t.STAR], ""); - } - __name(replaceStars, "replaceStars"); - function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = ">=" + fM + ".0.0"; - } else if (isX(fp)) { - from = ">=" + fM + "." + fm + ".0"; - } else { - from = ">=" + from; - } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = "<" + (+tM + 1) + ".0.0"; - } else if (isX(tp)) { - to = "<" + tM + "." + (+tm + 1) + ".0"; - } else if (tpr) { - to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; - } else { - to = "<=" + to; + __name(parsePath, "parsePath"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + function DotObject(separator, override, useArray, useBrackets) { + if (!(this instanceof DotObject)) { + return new DotObject(separator, override, useArray, useBrackets); } - return (from + " " + to).trim(); + if (typeof override === "undefined") override = false; + if (typeof useArray === "undefined") useArray = true; + if (typeof useBrackets === "undefined") useBrackets = true; + this.separator = separator || "."; + this.override = override; + this.useArray = useArray; + this.useBrackets = useBrackets; + this.keepArray = false; + this.cleanup = []; } - __name(hyphenReplace, "hyphenReplace"); - Range.prototype.test = function(version3) { - if (!version3) { - return false; - } - if (typeof version3 === "string") { - try { - version3 = new SemVer(version3, this.options); - } catch (er) { - return false; - } - } - for (var i2 = 0; i2 < this.set.length; i2++) { - if (testSet(this.set[i2], version3, this.options)) { - return true; - } - } - return false; - }; - function testSet(set, version3, options) { - for (var i2 = 0; i2 < set.length; i2++) { - if (!set[i2].test(version3)) { - return false; - } - } - if (version3.prerelease.length && !options.includePrerelease) { - for (i2 = 0; i2 < set.length; i2++) { - debug(set[i2].semver); - if (set[i2].semver === ANY) { - continue; - } - if (set[i2].semver.prerelease.length > 0) { - var allowed = set[i2].semver; - if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { - return true; + __name(DotObject, "DotObject"); + var dotDefault = new DotObject(".", false, true, true); + function wrap(method) { + return function() { + return dotDefault[method].apply(dotDefault, arguments); + }; + } + __name(wrap, "wrap"); + DotObject.prototype._fill = function(a, obj, v, mod) { + var k = a.shift(); + if (a.length > 0) { + obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {}); + if (!isArrayOrObject(obj[k])) { + if (this.override) { + obj[k] = {}; + } else { + if (!(isArrayOrObject(v) && isEmptyObject(v))) { + throw new Error( + "Trying to redefine `" + k + "` which is a " + typeof obj[k] + ); } + return; } } - return false; - } - return true; - } - __name(testSet, "testSet"); - exports2.satisfies = satisfies; - function satisfies(version3, range, options) { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - return range.test(version3); - } - __name(satisfies, "satisfies"); - exports2.maxSatisfying = maxSatisfying; - function maxSatisfying(versions, range, options) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); + this._fill(a, obj[k], v, mod); + } else { + if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) { + if (!(isArrayOrObject(v) && isEmptyObject(v))) { + throw new Error("Trying to redefine non-empty obj['" + k + "']"); } + return; } - }); - return max; - } - __name(maxSatisfying, "maxSatisfying"); - exports2.minSatisfying = minSatisfying; - function minSatisfying(versions, range, options) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; + obj[k] = _process(v, mod); } - versions.forEach(function(v) { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); - } + }; + DotObject.prototype.object = function(obj, mods) { + var self2 = this; + Object.keys(obj).forEach(function(k) { + var mod = mods === void 0 ? null : mods[k]; + var ok = parsePath(k, self2.separator).join(self2.separator); + if (ok.indexOf(self2.separator) !== -1) { + self2._fill(ok.split(self2.separator), obj, obj[k], mod); + delete obj[k]; + } else { + obj[k] = _process(obj[k], mod); } }); - return min; - } - __name(minSatisfying, "minSatisfying"); - exports2.minVersion = minVersion; - function minVersion(range, loose) { - range = new Range(range, loose); - var minver = new SemVer("0.0.0"); - if (range.test(minver)) { - return minver; - } - minver = new SemVer("0.0.0-0"); - if (range.test(minver)) { - return minver; + return obj; + }; + DotObject.prototype.str = function(path2, v, obj, mod) { + var ok = parsePath(path2, this.separator).join(this.separator); + if (path2.indexOf(this.separator) !== -1) { + this._fill(ok.split(this.separator), obj, v, mod); + } else { + obj[path2] = _process(v, mod); } - minver = null; - for (var i2 = 0; i2 < range.set.length; ++i2) { - var comparators = range.set[i2]; - comparators.forEach(function(comparator) { - var compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) { - compver.patch++; + return obj; + }; + DotObject.prototype.pick = function(path2, obj, remove, reindexArray) { + var i; + var keys; + var val; + var key; + var cp; + keys = parsePath(path2, this.separator); + for (i = 0; i < keys.length; i++) { + key = parseKey(keys[i], obj); + if (obj && typeof obj === "object" && key in obj) { + if (i === keys.length - 1) { + if (remove) { + val = obj[key]; + if (reindexArray && Array.isArray(obj)) { + obj.splice(key, 1); } else { - compver.prerelease.push(0); + delete obj[key]; } - compver.raw = compver.format(); - /* fallthrough */ - case "": - case ">=": - if (!minver || gt(minver, compver)) { - minver = compver; + if (Array.isArray(obj)) { + cp = keys.slice(0, -1).join("."); + if (this.cleanup.indexOf(cp) === -1) { + this.cleanup.push(cp); + } } - break; - case "<": - case "<=": - break; - /* istanbul ignore next */ - default: - throw new Error("Unexpected operation: " + comparator.operator); + return val; + } else { + return obj[key]; + } + } else { + obj = obj[key]; } - }); - } - if (minver && range.test(minver)) { - return minver; - } - return null; - } - __name(minVersion, "minVersion"); - exports2.validRange = validRange; - function validRange(range, options) { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; - } - } - __name(validRange, "validRange"); - exports2.ltr = ltr; - function ltr(version3, range, options) { - return outside(version3, range, "<", options); - } - __name(ltr, "ltr"); - exports2.gtr = gtr; - function gtr(version3, range, options) { - return outside(version3, range, ">", options); - } - __name(gtr, "gtr"); - exports2.outside = outside; - function outside(version3, range, hilo, options) { - version3 = new SemVer(version3, options); - range = new Range(range, options); - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (satisfies(version3, range, options)) { - return false; + } else { + return void 0; + } } - for (var i2 = 0; i2 < range.set.length; ++i2) { - var comparators = range.set[i2]; - var high = null; - var low = null; - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator(">=0.0.0"); - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; - } + if (remove && Array.isArray(obj)) { + obj = obj.filter(function(n) { + return n !== void 0; }); - if (high.operator === comp || high.operator === ecomp) { - return false; + } + return obj; + }; + DotObject.prototype.delete = function(path2, obj) { + return this.remove(path2, obj, true); + }; + DotObject.prototype.remove = function(path2, obj, reindexArray) { + var i; + this.cleanup = []; + if (Array.isArray(path2)) { + for (i = 0; i < path2.length; i++) { + this.pick(path2[i], obj, true, reindexArray); } - if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version3, low.semver)) { - return false; + if (!reindexArray) { + this._cleanup(obj); } + return obj; + } else { + return this.pick(path2, obj, true, reindexArray); } - return true; - } - __name(outside, "outside"); - exports2.prerelease = prerelease; - function prerelease(version3, options) { - var parsed = parse2(version3, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - } - __name(prerelease, "prerelease"); - exports2.intersects = intersects; - function intersects(r1, r2, options) { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2); - } - __name(intersects, "intersects"); - exports2.coerce = coerce; - function coerce(version3, options) { - if (version3 instanceof SemVer) { - return version3; + }; + DotObject.prototype._cleanup = function(obj) { + var ret; + var i; + var keys; + var root; + if (this.cleanup.length) { + for (i = 0; i < this.cleanup.length; i++) { + keys = this.cleanup[i].split("."); + root = keys.splice(0, -1).join("."); + ret = root ? this.pick(root, obj) : obj; + ret = ret[keys[0]].filter(function(v) { + return v !== void 0; + }); + this.set(this.cleanup[i], ret, obj); + } + this.cleanup = []; } - if (typeof version3 === "number") { - version3 = String(version3); + }; + DotObject.prototype.del = DotObject.prototype.remove; + DotObject.prototype.move = function(source, target, obj, mods, merge) { + if (typeof mods === "function" || Array.isArray(mods)) { + this.set(target, _process(this.pick(source, obj, true), mods), obj, merge); + } else { + merge = mods; + this.set(target, this.pick(source, obj, true), obj, merge); } - if (typeof version3 !== "string") { - return null; + return obj; + }; + DotObject.prototype.transfer = function(source, target, obj1, obj2, mods, merge) { + if (typeof mods === "function" || Array.isArray(mods)) { + this.set( + target, + _process(this.pick(source, obj1, true), mods), + obj2, + merge + ); + } else { + merge = mods; + this.set(target, this.pick(source, obj1, true), obj2, merge); } - options = options || {}; - var match = null; - if (!options.rtl) { - match = version3.match(safeRe[t.COERCE]); + return obj2; + }; + DotObject.prototype.copy = function(source, target, obj1, obj2, mods, merge) { + if (typeof mods === "function" || Array.isArray(mods)) { + this.set( + target, + _process( + // clone what is picked + JSON.parse(JSON.stringify(this.pick(source, obj1, false))), + mods + ), + obj2, + merge + ); } else { - var next; - while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + merge = mods; + this.set(target, this.pick(source, obj1, false), obj2, merge); + } + return obj2; + }; + DotObject.prototype.set = function(path2, val, obj, merge) { + var i; + var k; + var keys; + var key; + if (typeof val === "undefined") { + return obj; + } + keys = parsePath(path2, this.separator); + for (i = 0; i < keys.length; i++) { + key = keys[i]; + if (i === keys.length - 1) { + if (merge && isObject(val) && isObject(obj[key])) { + for (k in val) { + if (hasOwnProperty.call(val, k)) { + obj[key][k] = val[k]; + } + } + } else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) { + for (var j = 0; j < val.length; j++) { + obj[keys[i]].push(val[j]); + } + } else { + obj[key] = val; + } + } else if ( + // force the value to be an object + !hasOwnProperty.call(obj, key) || !isObject(obj[key]) && !Array.isArray(obj[key]) + ) { + if (/^\d+$/.test(keys[i + 1])) { + obj[key] = []; + } else { + obj[key] = {}; } - safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } - safeRe[t.COERCERTL].lastIndex = -1; - } - if (match === null) { - return null; + obj = obj[key]; } - return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); - } - __name(coerce, "coerce"); + return obj; + }; + DotObject.prototype.transform = function(recipe, obj, tgt) { + obj = obj || {}; + tgt = tgt || {}; + Object.keys(recipe).forEach( + function(key) { + this.set(recipe[key], this.pick(key, obj), tgt); + }.bind(this) + ); + return tgt; + }; + DotObject.prototype.dot = function(obj, tgt, path2) { + tgt = tgt || {}; + path2 = path2 || []; + var isArray = Array.isArray(obj); + Object.keys(obj).forEach( + function(key) { + var index = isArray && this.useBrackets ? "[" + key + "]" : key; + if (isArrayOrObject(obj[key]) && (isObject(obj[key]) && !isEmptyObject(obj[key]) || Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0)) { + if (isArray && this.useBrackets) { + var previousKey = path2[path2.length - 1] || ""; + return this.dot( + obj[key], + tgt, + path2.slice(0, -1).concat(previousKey + index) + ); + } else { + return this.dot(obj[key], tgt, path2.concat(index)); + } + } else { + if (isArray && this.useBrackets) { + tgt[path2.join(this.separator).concat("[" + key + "]")] = obj[key]; + } else { + tgt[path2.concat(index).join(this.separator)] = obj[key]; + } + } + }.bind(this) + ); + return tgt; + }; + DotObject.pick = wrap("pick"); + DotObject.move = wrap("move"); + DotObject.transfer = wrap("transfer"); + DotObject.transform = wrap("transform"); + DotObject.copy = wrap("copy"); + DotObject.object = wrap("object"); + DotObject.str = wrap("str"); + DotObject.set = wrap("set"); + DotObject.delete = wrap("delete"); + DotObject.del = DotObject.remove = wrap("remove"); + DotObject.dot = wrap("dot"); + ["override", "overwrite"].forEach(function(prop) { + Object.defineProperty(DotObject, prop, { + get: /* @__PURE__ */ __name(function() { + return dotDefault.override; + }, "get"), + set: /* @__PURE__ */ __name(function(val) { + dotDefault.override = !!val; + }, "set") + }); + }); + ["useArray", "keepArray", "useBrackets"].forEach(function(prop) { + Object.defineProperty(DotObject, prop, { + get: /* @__PURE__ */ __name(function() { + return dotDefault[prop]; + }, "get"), + set: /* @__PURE__ */ __name(function(val) { + dotDefault[prop] = val; + }, "set") + }); + }); + DotObject._process = _process; + module2.exports = DotObject; } }); -// ../node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "../node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { +// ../node_modules/twirp-ts/build/twirp/http.client.js +var require_http_client = __commonJS({ + "../node_modules/twirp-ts/build/twirp/http.client.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -92204,7 +92050,7 @@ var require_manifest = __commonJS({ if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); } __setModuleDefault3(result, mod); return result; @@ -92241,168 +92087,78 @@ var require_manifest = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver = __importStar3(require_semver2()); - var core_1 = require_core(); - var os = require("os"); - var cp = require("child_process"); - var fs2 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter3(this, void 0, void 0, function* () { - const platFilter = os.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version3 = candidate.version; - core_1.debug(`check ${version3} satisfies ${versionSpec}`); - if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; + exports2.FetchRPC = exports2.wrapErrorResponseToTwirpError = exports2.NodeHttpRPC = void 0; + var http = __importStar3(require("http")); + var https = __importStar3(require("https")); + var url_1 = require("url"); + var errors_1 = require_errors3(); + var NodeHttpRPC = /* @__PURE__ */ __name((options) => ({ + request(service, method, contentType, data) { + let client; + return new Promise((resolve, rejected) => { + const responseChunks = []; + const requestData = contentType === "application/protobuf" ? Buffer.from(data) : JSON.stringify(data); + const url = new url_1.URL(options.baseUrl); + const isHttps = url.protocol === "https:"; + if (isHttps) { + client = https; + } else { + client = http; + } + const prefix = url.pathname !== "/" ? url.pathname : ""; + const req = client.request(Object.assign(Object.assign({}, options ? options : {}), { method: "POST", protocol: url.protocol, host: url.hostname, port: url.port ? url.port : isHttps ? 443 : 80, path: `${prefix}/${service}/${method}`, headers: Object.assign(Object.assign({}, options.headers ? options.headers : {}), { "Content-Type": contentType, "Content-Length": contentType === "application/protobuf" ? Buffer.byteLength(requestData) : Buffer.from(requestData).byteLength }) }), (res) => { + res.on("data", (chunk) => responseChunks.push(chunk)); + res.on("end", () => { + const data2 = Buffer.concat(responseChunks); + if (res.statusCode != 200) { + rejected(wrapErrorResponseToTwirpError(data2.toString())); + } else { + if (contentType === "application/json") { + resolve(JSON.parse(data2.toString())); } else { - chk = semver.satisfies(osVersion, item.platform_version); + resolve(data2); } } - return chk; }); - if (file) { - core_1.debug(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; - }); + res.on("error", (err) => { + rejected(err); + }); + }).on("error", (err) => { + rejected(err); + }); + req.end(requestData); + }); + } + }), "NodeHttpRPC"); + exports2.NodeHttpRPC = NodeHttpRPC; + function wrapErrorResponseToTwirpError(errorResponse) { + return errors_1.TwirpError.fromObject(JSON.parse(errorResponse)); } - __name(_findMatch, "_findMatch"); - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os.platform(); - let version3 = ""; - if (plat === "darwin") { - version3 = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; + __name(wrapErrorResponseToTwirpError, "wrapErrorResponseToTwirpError"); + exports2.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError; + var FetchRPC = /* @__PURE__ */ __name((options) => ({ + request(service, method, contentType, data) { + return __awaiter3(this, void 0, void 0, function* () { + const headers = new Headers(options.headers); + headers.set("content-type", contentType); + const response = yield fetch(`${options.baseUrl}/${service}/${method}`, Object.assign(Object.assign({}, options), { method: "POST", headers, body: data instanceof Uint8Array ? data : JSON.stringify(data) })); + if (response.status === 200) { + if (contentType === "application/json") { + return yield response.json(); } + return new Uint8Array(yield response.arrayBuffer()); } - } - } - return version3; - } - __name(_getOsVersion, "_getOsVersion"); - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs2.existsSync(lsbReleaseFile)) { - contents = fs2.readFileSync(lsbReleaseFile).toString(); - } else if (fs2.existsSync(osReleaseFile)) { - contents = fs2.readFileSync(osReleaseFile).toString(); - } - return contents; - } - __name(_readLinuxVersionFile, "_readLinuxVersionFile"); - exports2._readLinuxVersionFile = _readLinuxVersionFile; - } -}); - -// ../node_modules/uuid/lib/rng.js -var require_rng = __commonJS({ - "../node_modules/uuid/lib/rng.js"(exports2, module2) { - var crypto4 = require("crypto"); - module2.exports = /* @__PURE__ */ __name(function nodeRNG() { - return crypto4.randomBytes(16); - }, "nodeRNG"); - } -}); - -// ../node_modules/uuid/lib/bytesToUuid.js -var require_bytesToUuid = __commonJS({ - "../node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { - var byteToHex2 = []; - for (i = 0; i < 256; ++i) { - byteToHex2[i] = (i + 256).toString(16).substr(1); - } - var i; - function bytesToUuid(buf, offset) { - var i2 = offset || 0; - var bth = byteToHex2; - return [ - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - "-", - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]], - bth[buf[i2++]] - ].join(""); - } - __name(bytesToUuid, "bytesToUuid"); - module2.exports = bytesToUuid; - } -}); - -// ../node_modules/uuid/v4.js -var require_v4 = __commonJS({ - "../node_modules/uuid/v4.js"(exports2, module2) { - var rng2 = require_rng(); - var bytesToUuid = require_bytesToUuid(); - function v42(options, buf, offset) { - var i = buf && offset || 0; - if (typeof options == "string") { - buf = options === "binary" ? new Array(16) : null; - options = null; - } - options = options || {}; - var rnds = options.random || (options.rng || rng2)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } + throw errors_1.TwirpError.fromObject(yield response.json()); + }); } - return buf || bytesToUuid(rnds); - } - __name(v42, "v4"); - module2.exports = v42; + }), "FetchRPC"); + exports2.FetchRPC = FetchRPC; } }); -// ../node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "../node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// ../node_modules/twirp-ts/build/twirp/gateway.js +var require_gateway = __commonJS({ + "../node_modules/twirp-ts/build/twirp/gateway.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -92422,7 +92178,7 @@ var require_retry_helper = __commonJS({ if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); } __setModuleDefault3(result, mod); return result; @@ -92458,60 +92214,181 @@ var require_retry_helper = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __rest2 = exports2 && exports2.__rest || function(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RetryHelper = void 0; - var core2 = __importStar3(require_core()); - var RetryHelper = class { + exports2.Gateway = exports2.Pattern = void 0; + var querystring_1 = require("querystring"); + var dotObject = __importStar3(require_dot_object()); + var request_1 = require_request3(); + var errors_1 = require_errors3(); + var http_client_1 = require_http_client(); + var server_1 = require_server(); + var Pattern; + (function(Pattern2) { + Pattern2["POST"] = "post"; + Pattern2["GET"] = "get"; + Pattern2["PATCH"] = "patch"; + Pattern2["PUT"] = "put"; + Pattern2["DELETE"] = "delete"; + })(Pattern = exports2.Pattern || (exports2.Pattern = {})); + var Gateway = class { static { - __name(this, "RetryHelper"); + __name(this, "Gateway"); } - constructor(maxAttempts, minSeconds, maxSeconds) { - if (maxAttempts < 1) { - throw new Error("max attempts should be greater than or equal to 1"); - } - this.maxAttempts = maxAttempts; - this.minSeconds = Math.floor(minSeconds); - this.maxSeconds = Math.floor(maxSeconds); - if (this.minSeconds > this.maxSeconds) { - throw new Error("min seconds should be less than or equal to max seconds"); - } + constructor(routes) { + this.routes = routes; } - execute(action, isRetryable) { - return __awaiter3(this, void 0, void 0, function* () { - let attempt = 1; - while (attempt < this.maxAttempts) { - try { - return yield action(); - } catch (err) { - if (isRetryable && !isRetryable(err)) { - throw err; + /** + * Middleware that rewrite the current request + * to a Twirp compliant request + */ + twirpRewrite(prefix = "/twirp") { + return (req, resp, next) => { + this.rewrite(req, resp, prefix).then(() => next()).catch((e) => { + if (e instanceof errors_1.TwirpError) { + if (e.code !== errors_1.TwirpErrorCode.NotFound) { + server_1.writeError(resp, e); + } else { + next(); } - core2.info(err.message); } - const seconds = this.getSleepAmount(); - core2.info(`Waiting ${seconds} seconds before trying again`); - yield this.sleep(seconds); - attempt++; + }); + }; + } + /** + * Rewrite an incoming request to a Twirp compliant request + * @param req + * @param resp + * @param prefix + */ + rewrite(req, resp, prefix = "/twirp") { + return __awaiter3(this, void 0, void 0, function* () { + const [match, route] = this.matchRoute(req); + const body = yield this.prepareTwirpBody(req, match, route); + const twirpUrl = `${prefix}/${route.packageName}.${route.serviceName}/${route.methodName}`; + req.url = twirpUrl; + req.originalUrl = twirpUrl; + req.method = "POST"; + req.headers["content-type"] = "application/json"; + req.rawBody = Buffer.from(JSON.stringify(body)); + if (route.responseBodyKey) { + const endFn = resp.end.bind(resp); + resp.end = function(chunk) { + if (resp.statusCode === 200) { + endFn(`{ "${route.responseBodyKey}": ${chunk} }`); + } else { + endFn(chunk); + } + }; } - return yield action(); }); } - getSleepAmount() { - return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; + /** + * Create a reverse proxy handler to + * proxy http requests to Twirp Compliant handlers + * @param httpClientOption + */ + reverseProxy(httpClientOption) { + const client = http_client_1.NodeHttpRPC(httpClientOption); + return (req, res) => __awaiter3(this, void 0, void 0, function* () { + try { + const [match, route] = this.matchRoute(req); + const body = yield this.prepareTwirpBody(req, match, route); + const response = yield client.request(`${route.packageName}.${route.serviceName}`, route.methodName, "application/json", body); + res.statusCode = 200; + res.setHeader("content-type", "application/json"); + let jsonResponse; + if (route.responseBodyKey) { + jsonResponse = JSON.stringify({ [route.responseBodyKey]: response }); + } else { + jsonResponse = JSON.stringify(response); + } + res.end(jsonResponse); + } catch (e) { + server_1.writeError(res, e); + } + }); } - sleep(seconds) { + /** + * Prepares twirp body requests using http.google.annotions + * compliant spec + * + * @param req + * @param match + * @param route + * @protected + */ + prepareTwirpBody(req, match, route) { return __awaiter3(this, void 0, void 0, function* () { - return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + const _a = match.params, { query_string } = _a, params = __rest2(_a, ["query_string"]); + let requestBody = Object.assign({}, params); + if (query_string && route.bodyKey !== "*") { + const queryParams = this.parseQueryString(query_string); + requestBody = Object.assign(Object.assign({}, queryParams), requestBody); + } + let body = {}; + if (route.bodyKey) { + const data = yield request_1.getRequestData(req); + try { + const jsonBody = JSON.parse(data.toString() || "{}"); + if (route.bodyKey === "*") { + body = jsonBody; + } else { + body[route.bodyKey] = jsonBody; + } + } catch (e) { + const msg = "the json request could not be decoded"; + throw new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + return Object.assign(Object.assign({}, body), requestBody); }); } + /** + * Matches a route + * @param req + */ + matchRoute(req) { + var _a; + const httpMethod = (_a = req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase(); + if (!httpMethod) { + throw new errors_1.BadRouteError(`method not allowed`, req.method || "", req.url || ""); + } + const routes = this.routes[httpMethod]; + for (const route of routes) { + const match = route.matcher(req.url || "/"); + if (match) { + return [match, route]; + } + } + throw new errors_1.NotFoundError(`url ${req.url} not found`); + } + /** + * Parse query string + * @param queryString + */ + parseQueryString(queryString) { + const queryParams = querystring_1.parse(queryString.replace("?", "")); + return dotObject.object(queryParams); + } }; - exports2.RetryHelper = RetryHelper; + exports2.Gateway = Gateway; } }); -// ../node_modules/@actions/tool-cache/lib/tool-cache.js -var require_tool_cache = __commonJS({ - "../node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { +// ../node_modules/twirp-ts/build/twirp/index.js +var require_twirp = __commonJS({ + "../node_modules/twirp-ts/build/twirp/index.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -92522,1093 +92399,482 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding3(exports3, m, p); }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TwirpContentType = void 0; + __exportStar2(require_context2(), exports2); + __exportStar2(require_server(), exports2); + __exportStar2(require_interceptors(), exports2); + __exportStar2(require_hooks(), exports2); + __exportStar2(require_errors3(), exports2); + __exportStar2(require_gateway(), exports2); + __exportStar2(require_http_client(), exports2); + var request_1 = require_request3(); + Object.defineProperty(exports2, "TwirpContentType", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return request_1.TwirpContentType; + }, "get") }); + } +}); + +// ../node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js +var require_json_typings = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isJsonObject = exports2.typeofJsonValue = void 0; + function typeofJsonValue(value) { + let t = typeof value; + if (t == "object") { + if (Array.isArray(value)) + return "array"; + if (value === null) + return "null"; } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return t; + } + __name(typeofJsonValue, "typeofJsonValue"); + exports2.typeofJsonValue = typeofJsonValue; + function isJsonObject(value) { + return value !== null && typeof value == "object" && !Array.isArray(value); + } + __name(isJsonObject, "isJsonObject"); + exports2.isJsonObject = isJsonObject; + } +}); + +// ../node_modules/@protobuf-ts/runtime/build/commonjs/base64.js +var require_base642 = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/base64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.base64encode = exports2.base64decode = void 0; + var encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + var decTable = []; + for (let i = 0; i < encTable.length; i++) + decTable[encTable[i].charCodeAt(0)] = i; + decTable["-".charCodeAt(0)] = encTable.indexOf("+"); + decTable["_".charCodeAt(0)] = encTable.indexOf("/"); + function base64decode(base64Str) { + let es = base64Str.length * 3 / 4; + if (base64Str[base64Str.length - 2] == "=") + es -= 2; + else if (base64Str[base64Str.length - 1] == "=") + es -= 1; + let bytes = new Uint8Array(es), bytePos = 0, groupPos = 0, b, p = 0; + for (let i = 0; i < base64Str.length; i++) { + b = decTable[base64Str.charCodeAt(i)]; + if (b === void 0) { + switch (base64Str[i]) { + case "=": + groupPos = 0; + // reset state when padding found + case "\n": + case "\r": + case " ": + case " ": + continue; + // skip white-space, and padding + default: + throw Error(`invalid base64 string.`); } } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + switch (groupPos) { + case 0: + p = b; + groupPos = 1; + break; + case 1: + bytes[bytePos++] = p << 2 | (b & 48) >> 4; + p = b; + groupPos = 2; + break; + case 2: + bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2; + p = b; + groupPos = 3; + break; + case 3: + bytes[bytePos++] = (p & 3) << 6 | b; + groupPos = 0; + break; } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + if (groupPos == 1) + throw Error(`invalid base64 string.`); + return bytes.subarray(0, bytePos); + } + __name(base64decode, "base64decode"); + exports2.base64decode = base64decode; + function base64encode(bytes) { + let base64 = "", groupPos = 0, b, p = 0; + for (let i = 0; i < bytes.length; i++) { + b = bytes[i]; + switch (groupPos) { + case 0: + base64 += encTable[b >> 2]; + p = (b & 3) << 4; + groupPos = 1; + break; + case 1: + base64 += encTable[p | b >> 4]; + p = (b & 15) << 2; + groupPos = 2; + break; + case 2: + base64 += encTable[p | b >> 6]; + base64 += encTable[b & 63]; + groupPos = 0; + break; } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core2 = __importStar3(require_core()); - var io2 = __importStar3(require_io()); - var fs2 = __importStar3(require("fs")); - var mm = __importStar3(require_manifest()); - var os = __importStar3(require("os")); - var path2 = __importStar3(require("path")); - var httpm = __importStar3(require_lib()); - var semver = __importStar3(require_semver2()); - var stream = __importStar3(require("stream")); - var util = __importStar3(require("util")); - var assert_1 = require("assert"); - var v4_1 = __importDefault2(require_v4()); - var exec_1 = require_exec(); - var retry_helper_1 = require_retry_helper(); - var HTTPError = class extends Error { - static { - __name(this, "HTTPError"); } - constructor(httpStatusCode) { - super(`Unexpected HTTP response: ${httpStatusCode}`); - this.httpStatusCode = httpStatusCode; - Object.setPrototypeOf(this, new.target.prototype); + if (groupPos) { + base64 += encTable[p]; + base64 += "="; + if (groupPos == 1) + base64 += "="; } - }; - exports2.HTTPError = HTTPError; - var IS_WINDOWS = process.platform === "win32"; - var IS_MAC = process.platform === "darwin"; - var userAgent = "actions/tool-cache"; - function downloadTool(url, dest, auth, headers) { - return __awaiter3(this, void 0, void 0, function* () { - dest = dest || path2.join(_getTempDirectory(), v4_1.default()); - yield io2.mkdirP(path2.dirname(dest)); - core2.debug(`Downloading ${url}`); - core2.debug(`Destination ${dest}`); - const maxAttempts = 3; - const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); - const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); - const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); - return yield retryHelper.execute(() => __awaiter3(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); - }), (err) => { - if (err instanceof HTTPError && err.httpStatusCode) { - if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { - return false; - } - } - return true; - }); - }); + return base64; } - __name(downloadTool, "downloadTool"); - exports2.downloadTool = downloadTool; - function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter3(this, void 0, void 0, function* () { - if (fs2.existsSync(dest)) { - throw new Error(`Destination file path ${dest} already exists`); - } - const http = new httpm.HttpClient(userAgent, [], { - allowRetries: false - }); - if (auth) { - core2.debug("set auth"); - if (headers === void 0) { - headers = {}; - } - headers.authorization = auth; - } - const response = yield http.get(url, headers); - if (response.message.statusCode !== 200) { - const err = new HTTPError(response.message.statusCode); - core2.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); - throw err; - } - const pipeline = util.promisify(stream.pipeline); - const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); - const readStream = responseMessageFactory(); - let succeeded = false; - try { - yield pipeline(readStream, fs2.createWriteStream(dest)); - core2.debug("download complete"); - succeeded = true; - return dest; - } finally { - if (!succeeded) { - core2.debug("download failed"); - try { - yield io2.rmRF(dest); - } catch (err) { - core2.debug(`Failed to delete '${dest}'. ${err.message}`); - } - } + __name(base64encode, "base64encode"); + exports2.base64encode = base64encode; + } +}); + +// ../node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js +var require_protobufjs_utf8 = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.utf8read = void 0; + var fromCharCodes = /* @__PURE__ */ __name((chunk) => String.fromCharCode.apply(String, chunk), "fromCharCodes"); + function utf8read(bytes) { + if (bytes.length < 1) + return ""; + let pos = 0, parts = [], chunk = [], i = 0, t; + let len = bytes.length; + while (pos < len) { + t = bytes[pos++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 65536; + chunk[i++] = 55296 + (t >> 10); + chunk[i++] = 56320 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63; + if (i > 8191) { + parts.push(fromCharCodes(chunk)); + i = 0; } - }); + } + if (parts.length) { + if (i) + parts.push(fromCharCodes(chunk.slice(0, i))); + return parts.join(""); + } + return fromCharCodes(chunk.slice(0, i)); } - __name(downloadToolAttempt, "downloadToolAttempt"); - function extract7z(file, dest, _7zPath) { - return __awaiter3(this, void 0, void 0, function* () { - assert_1.ok(IS_WINDOWS, "extract7z() not supported on current OS"); - assert_1.ok(file, 'parameter "file" is required'); - dest = yield _createExtractFolder(dest); - const originalCwd = process.cwd(); - process.chdir(dest); - if (_7zPath) { - try { - const logLevel = core2.isDebug() ? "-bb1" : "-bb0"; - const args = [ - "x", - logLevel, - "-bd", - "-sccUTF-8", - file - ]; - const options = { - silent: true - }; - yield exec_1.exec(`"${_7zPath}"`, args, options); - } finally { - process.chdir(originalCwd); - } - } else { - const escapedScript = path2.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}'`; - const args = [ - "-NoLogo", - "-Sta", - "-NoProfile", - "-NonInteractive", - "-ExecutionPolicy", - "Unrestricted", - "-Command", - command - ]; - const options = { - silent: true - }; - try { - const powershellPath = yield io2.which("powershell", true); - yield exec_1.exec(`"${powershellPath}"`, args, options); - } finally { - process.chdir(originalCwd); - } + __name(utf8read, "utf8read"); + exports2.utf8read = utf8read; + } +}); + +// ../node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js +var require_binary_format_contract = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WireType = exports2.mergeBinaryOptions = exports2.UnknownFieldHandler = void 0; + var UnknownFieldHandler; + (function(UnknownFieldHandler2) { + UnknownFieldHandler2.symbol = Symbol.for("protobuf-ts/unknown"); + UnknownFieldHandler2.onRead = (typeName, message, fieldNo, wireType, data) => { + let container = is(message) ? message[UnknownFieldHandler2.symbol] : message[UnknownFieldHandler2.symbol] = []; + container.push({ no: fieldNo, wireType, data }); + }; + UnknownFieldHandler2.onWrite = (typeName, message, writer) => { + for (let { no, wireType, data } of UnknownFieldHandler2.list(message)) + writer.tag(no, wireType).raw(data); + }; + UnknownFieldHandler2.list = (message, fieldNo) => { + if (is(message)) { + let all = message[UnknownFieldHandler2.symbol]; + return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all; } - return dest; - }); + return []; + }; + UnknownFieldHandler2.last = (message, fieldNo) => UnknownFieldHandler2.list(message, fieldNo).slice(-1)[0]; + const is = /* @__PURE__ */ __name((message) => message && Array.isArray(message[UnknownFieldHandler2.symbol]), "is"); + })(UnknownFieldHandler = exports2.UnknownFieldHandler || (exports2.UnknownFieldHandler = {})); + function mergeBinaryOptions(a, b) { + return Object.assign(Object.assign({}, a), b); } - __name(extract7z, "extract7z"); - exports2.extract7z = extract7z; - function extractTar(file, dest, flags = "xz") { - return __awaiter3(this, void 0, void 0, function* () { - if (!file) { - throw new Error("parameter 'file' is required"); - } - dest = yield _createExtractFolder(dest); - core2.debug("Checking tar --version"); - let versionOutput = ""; - yield exec_1.exec("tar --version", [], { - ignoreReturnCode: true, - silent: true, - listeners: { - stdout: /* @__PURE__ */ __name((data) => versionOutput += data.toString(), "stdout"), - stderr: /* @__PURE__ */ __name((data) => versionOutput += data.toString(), "stderr") - } - }); - core2.debug(versionOutput.trim()); - const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); - let args; - if (flags instanceof Array) { - args = flags; - } else { - args = [flags]; - } - if (core2.isDebug() && !flags.includes("v")) { - args.push("-v"); - } - let destArg = dest; - let fileArg = file; - if (IS_WINDOWS && isGnuTar) { - args.push("--force-local"); - destArg = dest.replace(/\\/g, "/"); - fileArg = file.replace(/\\/g, "/"); + __name(mergeBinaryOptions, "mergeBinaryOptions"); + exports2.mergeBinaryOptions = mergeBinaryOptions; + var WireType; + (function(WireType2) { + WireType2[WireType2["Varint"] = 0] = "Varint"; + WireType2[WireType2["Bit64"] = 1] = "Bit64"; + WireType2[WireType2["LengthDelimited"] = 2] = "LengthDelimited"; + WireType2[WireType2["StartGroup"] = 3] = "StartGroup"; + WireType2[WireType2["EndGroup"] = 4] = "EndGroup"; + WireType2[WireType2["Bit32"] = 5] = "Bit32"; + })(WireType = exports2.WireType || (exports2.WireType = {})); + } +}); + +// ../node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js +var require_goog_varint = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.varint32read = exports2.varint32write = exports2.int64toString = exports2.int64fromString = exports2.varint64write = exports2.varint64read = void 0; + function varint64read() { + let lowBits = 0; + let highBits = 0; + for (let shift = 0; shift < 28; shift += 7) { + let b = this.buf[this.pos++]; + lowBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; } - if (isGnuTar) { - args.push("--warning=no-unknown-keyword"); - args.push("--overwrite"); + } + let middleByte = this.buf[this.pos++]; + lowBits |= (middleByte & 15) << 28; + highBits = (middleByte & 112) >> 4; + if ((middleByte & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; + } + for (let shift = 3; shift <= 31; shift += 7) { + let b = this.buf[this.pos++]; + highBits |= (b & 127) << shift; + if ((b & 128) == 0) { + this.assertBounds(); + return [lowBits, highBits]; } - args.push("-C", destArg, "-f", fileArg); - yield exec_1.exec(`tar`, args); - return dest; - }); + } + throw new Error("invalid varint"); } - __name(extractTar, "extractTar"); - exports2.extractTar = extractTar; - function extractXar(file, dest, flags = []) { - return __awaiter3(this, void 0, void 0, function* () { - assert_1.ok(IS_MAC, "extractXar() not supported on current OS"); - assert_1.ok(file, 'parameter "file" is required'); - dest = yield _createExtractFolder(dest); - let args; - if (flags instanceof Array) { - args = flags; - } else { - args = [flags]; + __name(varint64read, "varint64read"); + exports2.varint64read = varint64read; + function varint64write(lo, hi, bytes) { + for (let i = 0; i < 28; i = i + 7) { + const shift = lo >>> i; + const hasNext = !(shift >>> 7 == 0 && hi == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) { + return; } - args.push("-x", "-C", dest, "-f", file); - if (core2.isDebug()) { - args.push("-v"); + } + const splitBits = lo >>> 28 & 15 | (hi & 7) << 4; + const hasMoreBits = !(hi >> 3 == 0); + bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255); + if (!hasMoreBits) { + return; + } + for (let i = 3; i < 31; i = i + 7) { + const shift = hi >>> i; + const hasNext = !(shift >>> 7 == 0); + const byte = (hasNext ? shift | 128 : shift) & 255; + bytes.push(byte); + if (!hasNext) { + return; } - const xarPath = yield io2.which("xar", true); - yield exec_1.exec(`"${xarPath}"`, _unique(args)); - return dest; - }); + } + bytes.push(hi >>> 31 & 1); } - __name(extractXar, "extractXar"); - exports2.extractXar = extractXar; - function extractZip(file, dest) { - return __awaiter3(this, void 0, void 0, function* () { - if (!file) { - throw new Error("parameter 'file' is required"); - } - dest = yield _createExtractFolder(dest); - if (IS_WINDOWS) { - yield extractZipWin(file, dest); - } else { - yield extractZipNix(file, dest); - } - return dest; - }); - } - __name(extractZip, "extractZip"); - exports2.extractZip = extractZip; - function extractZipWin(file, dest) { - return __awaiter3(this, void 0, void 0, function* () { - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); - const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); - const pwshPath = yield io2.which("pwsh", false); - if (pwshPath) { - const pwshCommand = [ - `$ErrorActionPreference = 'Stop' ;`, - `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, - `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, - `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` - ].join(" "); - const args = [ - "-NoLogo", - "-NoProfile", - "-NonInteractive", - "-ExecutionPolicy", - "Unrestricted", - "-Command", - pwshCommand - ]; - core2.debug(`Using pwsh at path: ${pwshPath}`); - yield exec_1.exec(`"${pwshPath}"`, args); - } else { - const powershellCommand = [ - `$ErrorActionPreference = 'Stop' ;`, - `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, - `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, - `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` - ].join(" "); - const args = [ - "-NoLogo", - "-Sta", - "-NoProfile", - "-NonInteractive", - "-ExecutionPolicy", - "Unrestricted", - "-Command", - powershellCommand - ]; - const powershellPath = yield io2.which("powershell", true); - core2.debug(`Using powershell at path: ${powershellPath}`); - yield exec_1.exec(`"${powershellPath}"`, args); - } - }); - } - __name(extractZipWin, "extractZipWin"); - function extractZipNix(file, dest) { - return __awaiter3(this, void 0, void 0, function* () { - const unzipPath = yield io2.which("unzip", true); - const args = [file]; - if (!core2.isDebug()) { - args.unshift("-q"); - } - args.unshift("-o"); - yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest }); - }); - } - __name(extractZipNix, "extractZipNix"); - function cacheDir(sourceDir, tool, version3, arch) { - return __awaiter3(this, void 0, void 0, function* () { - version3 = semver.clean(version3) || version3; - arch = arch || os.arch(); - core2.debug(`Caching tool ${tool} ${version3} ${arch}`); - core2.debug(`source dir: ${sourceDir}`); - if (!fs2.statSync(sourceDir).isDirectory()) { - throw new Error("sourceDir is not a directory"); - } - const destPath = yield _createToolPath(tool, version3, arch); - for (const itemName of fs2.readdirSync(sourceDir)) { - const s = path2.join(sourceDir, itemName); - yield io2.cp(s, destPath, { recursive: true }); - } - _completeToolPath(tool, version3, arch); - return destPath; - }); - } - __name(cacheDir, "cacheDir"); - exports2.cacheDir = cacheDir; - function cacheFile(sourceFile, targetFile, tool, version3, arch) { - return __awaiter3(this, void 0, void 0, function* () { - version3 = semver.clean(version3) || version3; - arch = arch || os.arch(); - core2.debug(`Caching tool ${tool} ${version3} ${arch}`); - core2.debug(`source file: ${sourceFile}`); - if (!fs2.statSync(sourceFile).isFile()) { - throw new Error("sourceFile is not a file"); + __name(varint64write, "varint64write"); + exports2.varint64write = varint64write; + var TWO_PWR_32_DBL = (1 << 16) * (1 << 16); + function int64fromString(dec) { + let minus = dec[0] == "-"; + if (minus) + dec = dec.slice(1); + const base = 1e6; + let lowBits = 0; + let highBits = 0; + function add1e6digit(begin, end) { + const digit1e6 = Number(dec.slice(begin, end)); + highBits *= base; + lowBits = lowBits * base + digit1e6; + if (lowBits >= TWO_PWR_32_DBL) { + highBits = highBits + (lowBits / TWO_PWR_32_DBL | 0); + lowBits = lowBits % TWO_PWR_32_DBL; } - const destFolder = yield _createToolPath(tool, version3, arch); - const destPath = path2.join(destFolder, targetFile); - core2.debug(`destination file ${destPath}`); - yield io2.cp(sourceFile, destPath); - _completeToolPath(tool, version3, arch); - return destFolder; - }); - } - __name(cacheFile, "cacheFile"); - exports2.cacheFile = cacheFile; - function find(toolName, versionSpec, arch) { - if (!toolName) { - throw new Error("toolName parameter is required"); } - if (!versionSpec) { - throw new Error("versionSpec parameter is required"); + __name(add1e6digit, "add1e6digit"); + add1e6digit(-24, -18); + add1e6digit(-18, -12); + add1e6digit(-12, -6); + add1e6digit(-6); + return [minus, lowBits, highBits]; + } + __name(int64fromString, "int64fromString"); + exports2.int64fromString = int64fromString; + function int64toString(bitsLow, bitsHigh) { + if (bitsHigh >>> 0 <= 2097151) { + return "" + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0)); } - arch = arch || os.arch(); - if (!isExplicitVersion(versionSpec)) { - const localVersions = findAllVersions(toolName, arch); - const match = evaluateVersions(localVersions, versionSpec); - versionSpec = match; + let low = bitsLow & 16777215; + let mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215; + let high = bitsHigh >> 16 & 65535; + let digitA = low + mid * 6777216 + high * 6710656; + let digitB = mid + high * 8147497; + let digitC = high * 2; + let base = 1e7; + if (digitA >= base) { + digitB += Math.floor(digitA / base); + digitA %= base; } - let toolPath = ""; - if (versionSpec) { - versionSpec = semver.clean(versionSpec) || ""; - const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); - core2.debug(`checking cache: ${cachePath}`); - if (fs2.existsSync(cachePath) && fs2.existsSync(`${cachePath}.complete`)) { - core2.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); - toolPath = cachePath; - } else { - core2.debug("not found"); - } + if (digitB >= base) { + digitC += Math.floor(digitB / base); + digitB %= base; } - return toolPath; - } - __name(find, "find"); - exports2.find = find; - function findAllVersions(toolName, arch) { - const versions = []; - arch = arch || os.arch(); - const toolPath = path2.join(_getCacheDirectory(), toolName); - if (fs2.existsSync(toolPath)) { - const children2 = fs2.readdirSync(toolPath); - for (const child of children2) { - if (isExplicitVersion(child)) { - const fullPath = path2.join(toolPath, child, arch || ""); - if (fs2.existsSync(fullPath) && fs2.existsSync(`${fullPath}.complete`)) { - versions.push(child); - } - } + function decimalFrom1e7(digit1e7, needLeadingZeros) { + let partial = digit1e7 ? String(digit1e7) : ""; + if (needLeadingZeros) { + return "0000000".slice(partial.length) + partial; } + return partial; } - return versions; + __name(decimalFrom1e7, "decimalFrom1e7"); + return decimalFrom1e7( + digitC, + /*needLeadingZeros=*/ + 0 + ) + decimalFrom1e7( + digitB, + /*needLeadingZeros=*/ + digitC + ) + // If the final 1e7 digit didn't need leading zeros, we would have + // returned via the trivial code path at the top. + decimalFrom1e7( + digitA, + /*needLeadingZeros=*/ + 1 + ); } - __name(findAllVersions, "findAllVersions"); - exports2.findAllVersions = findAllVersions; - function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter3(this, void 0, void 0, function* () { - let releases = []; - const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; - const http = new httpm.HttpClient("tool-cache"); - const headers = {}; - if (auth) { - core2.debug("set auth"); - headers.authorization = auth; - } - const response = yield http.getJson(treeUrl, headers); - if (!response.result) { - return releases; - } - let manifestUrl = ""; - for (const item of response.result.tree) { - if (item.path === "versions-manifest.json") { - manifestUrl = item.url; - break; - } - } - headers["accept"] = "application/vnd.github.VERSION.raw"; - let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); - if (versionsRaw) { - versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); - try { - releases = JSON.parse(versionsRaw); - } catch (_a) { - core2.debug("Invalid json"); - } + __name(int64toString, "int64toString"); + exports2.int64toString = int64toString; + function varint32write(value, bytes) { + if (value >= 0) { + while (value > 127) { + bytes.push(value & 127 | 128); + value = value >>> 7; } - return releases; - }); - } - __name(getManifestFromRepo, "getManifestFromRepo"); - exports2.getManifestFromRepo = getManifestFromRepo; - function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { - return __awaiter3(this, void 0, void 0, function* () { - const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); - return match; - }); - } - __name(findFromManifest, "findFromManifest"); - exports2.findFromManifest = findFromManifest; - function _createExtractFolder(dest) { - return __awaiter3(this, void 0, void 0, function* () { - if (!dest) { - dest = path2.join(_getTempDirectory(), v4_1.default()); + bytes.push(value); + } else { + for (let i = 0; i < 9; i++) { + bytes.push(value & 127 | 128); + value = value >> 7; } - yield io2.mkdirP(dest); - return dest; - }); - } - __name(_createExtractFolder, "_createExtractFolder"); - function _createToolPath(tool, version3, arch) { - return __awaiter3(this, void 0, void 0, function* () { - const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); - core2.debug(`destination ${folderPath}`); - const markerPath = `${folderPath}.complete`; - yield io2.rmRF(folderPath); - yield io2.rmRF(markerPath); - yield io2.mkdirP(folderPath); - return folderPath; - }); - } - __name(_createToolPath, "_createToolPath"); - function _completeToolPath(tool, version3, arch) { - const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); - const markerPath = `${folderPath}.complete`; - fs2.writeFileSync(markerPath, ""); - core2.debug("finished caching tool"); - } - __name(_completeToolPath, "_completeToolPath"); - function isExplicitVersion(versionSpec) { - const c = semver.clean(versionSpec) || ""; - core2.debug(`isExplicit: ${c}`); - const valid = semver.valid(c) != null; - core2.debug(`explicit? ${valid}`); - return valid; + bytes.push(1); + } } - __name(isExplicitVersion, "isExplicitVersion"); - exports2.isExplicitVersion = isExplicitVersion; - function evaluateVersions(versions, versionSpec) { - let version3 = ""; - core2.debug(`evaluating ${versions.length} versions`); - versions = versions.sort((a, b) => { - if (semver.gt(a, b)) { - return 1; - } - return -1; - }); - for (let i = versions.length - 1; i >= 0; i--) { - const potential = versions[i]; - const satisfied = semver.satisfies(potential, versionSpec); - if (satisfied) { - version3 = potential; - break; - } + __name(varint32write, "varint32write"); + exports2.varint32write = varint32write; + function varint32read() { + let b = this.buf[this.pos++]; + let result = b & 127; + if ((b & 128) == 0) { + this.assertBounds(); + return result; } - if (version3) { - core2.debug(`matched: ${version3}`); - } else { - core2.debug("match not found"); + b = this.buf[this.pos++]; + result |= (b & 127) << 7; + if ((b & 128) == 0) { + this.assertBounds(); + return result; } - return version3; - } - __name(evaluateVersions, "evaluateVersions"); - exports2.evaluateVersions = evaluateVersions; - function _getCacheDirectory() { - const cacheDirectory = process.env["RUNNER_TOOL_CACHE"] || ""; - assert_1.ok(cacheDirectory, "Expected RUNNER_TOOL_CACHE to be defined"); - return cacheDirectory; - } - __name(_getCacheDirectory, "_getCacheDirectory"); - function _getTempDirectory() { - const tempDirectory = process.env["RUNNER_TEMP"] || ""; - assert_1.ok(tempDirectory, "Expected RUNNER_TEMP to be defined"); - return tempDirectory; - } - __name(_getTempDirectory, "_getTempDirectory"); - function _getGlobal(key, defaultValue) { - const value = global[key]; - return value !== void 0 ? value : defaultValue; - } - __name(_getGlobal, "_getGlobal"); - function _unique(values) { - return Array.from(new Set(values)); + b = this.buf[this.pos++]; + result |= (b & 127) << 14; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 127) << 21; + if ((b & 128) == 0) { + this.assertBounds(); + return result; + } + b = this.buf[this.pos++]; + result |= (b & 15) << 28; + for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) + b = this.buf[this.pos++]; + if ((b & 128) != 0) + throw new Error("invalid varint"); + this.assertBounds(); + return result >>> 0; } - __name(_unique, "_unique"); + __name(varint32read, "varint32read"); + exports2.varint32read = varint32read; } }); -// ../node_modules/@actions/artifact/lib/internal/shared/config.js -var require_config = __commonJS({ - "../node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js +var require_pb_long = __commonJS({ + "../node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js"(exports2) { "use strict"; - var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUploadChunkTimeout = exports2.getConcurrency = exports2.getGitHubWorkspaceDir = exports2.isGhes = exports2.getResultsServiceUrl = exports2.getRuntimeToken = exports2.getUploadChunkSize = void 0; - var os_1 = __importDefault2(require("os")); - function getUploadChunkSize() { - return 8 * 1024 * 1024; + exports2.PbLong = exports2.PbULong = exports2.detectBi = void 0; + var goog_varint_1 = require_goog_varint(); + var BI; + function detectBi() { + const dv = new DataView(new ArrayBuffer(8)); + const ok = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function"; + BI = ok ? { + MIN: BigInt("-9223372036854775808"), + MAX: BigInt("9223372036854775807"), + UMIN: BigInt("0"), + UMAX: BigInt("18446744073709551615"), + C: BigInt, + V: dv + } : void 0; } - __name(getUploadChunkSize, "getUploadChunkSize"); - exports2.getUploadChunkSize = getUploadChunkSize; - function getRuntimeToken() { - const token = process.env["ACTIONS_RUNTIME_TOKEN"]; - if (!token) { - throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable"); - } - return token; + __name(detectBi, "detectBi"); + exports2.detectBi = detectBi; + detectBi(); + function assertBi(bi) { + if (!bi) + throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); } - __name(getRuntimeToken, "getRuntimeToken"); - exports2.getRuntimeToken = getRuntimeToken; - function getResultsServiceUrl() { - const resultsUrl = process.env["ACTIONS_RESULTS_URL"]; - if (!resultsUrl) { - throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable"); + __name(assertBi, "assertBi"); + var RE_DECIMAL_STR = /^-?[0-9]+$/; + var TWO_PWR_32_DBL = 4294967296; + var HALF_2_PWR_32 = 2147483648; + var SharedPbLong = class { + static { + __name(this, "SharedPbLong"); } - return new URL(resultsUrl).origin; - } - __name(getResultsServiceUrl, "getResultsServiceUrl"); - exports2.getResultsServiceUrl = getResultsServiceUrl; - function isGhes() { - const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === "GITHUB.COM"; - const isGheHost = hostname.endsWith(".GHE.COM"); - const isLocalHost = hostname.endsWith(".LOCALHOST"); - return !isGitHubHost && !isGheHost && !isLocalHost; - } - __name(isGhes, "isGhes"); - exports2.isGhes = isGhes; - function getGitHubWorkspaceDir() { - const ghWorkspaceDir = process.env["GITHUB_WORKSPACE"]; - if (!ghWorkspaceDir) { - throw new Error("Unable to get the GITHUB_WORKSPACE env variable"); + /** + * Create a new instance with the given bits. + */ + constructor(lo, hi) { + this.lo = lo | 0; + this.hi = hi | 0; } - return ghWorkspaceDir; - } - __name(getGitHubWorkspaceDir, "getGitHubWorkspaceDir"); - exports2.getGitHubWorkspaceDir = getGitHubWorkspaceDir; - function getConcurrency() { - const numCPUs = os_1.default.cpus().length; - if (numCPUs <= 4) { - return 32; + /** + * Is this instance equal to 0? + */ + isZero() { + return this.lo == 0 && this.hi == 0; } - const concurrency = 16 * numCPUs; - return concurrency > 300 ? 300 : concurrency; - } - __name(getConcurrency, "getConcurrency"); - exports2.getConcurrency = getConcurrency; - function getUploadChunkTimeout() { - return 3e5; - } - __name(getUploadChunkTimeout, "getUploadChunkTimeout"); - exports2.getUploadChunkTimeout = getUploadChunkTimeout; - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js -var require_json_typings = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isJsonObject = exports2.typeofJsonValue = void 0; - function typeofJsonValue(value) { - let t = typeof value; - if (t == "object") { - if (Array.isArray(value)) - return "array"; - if (value === null) - return "null"; - } - return t; - } - __name(typeofJsonValue, "typeofJsonValue"); - exports2.typeofJsonValue = typeofJsonValue; - function isJsonObject(value) { - return value !== null && typeof value == "object" && !Array.isArray(value); - } - __name(isJsonObject, "isJsonObject"); - exports2.isJsonObject = isJsonObject; - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/base64.js -var require_base642 = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/base64.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.base64encode = exports2.base64decode = void 0; - var encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); - var decTable = []; - for (let i = 0; i < encTable.length; i++) - decTable[encTable[i].charCodeAt(0)] = i; - decTable["-".charCodeAt(0)] = encTable.indexOf("+"); - decTable["_".charCodeAt(0)] = encTable.indexOf("/"); - function base64decode(base64Str) { - let es = base64Str.length * 3 / 4; - if (base64Str[base64Str.length - 2] == "=") - es -= 2; - else if (base64Str[base64Str.length - 1] == "=") - es -= 1; - let bytes = new Uint8Array(es), bytePos = 0, groupPos = 0, b, p = 0; - for (let i = 0; i < base64Str.length; i++) { - b = decTable[base64Str.charCodeAt(i)]; - if (b === void 0) { - switch (base64Str[i]) { - case "=": - groupPos = 0; - // reset state when padding found - case "\n": - case "\r": - case " ": - case " ": - continue; - // skip white-space, and padding - default: - throw Error(`invalid base64 string.`); - } - } - switch (groupPos) { - case 0: - p = b; - groupPos = 1; - break; - case 1: - bytes[bytePos++] = p << 2 | (b & 48) >> 4; - p = b; - groupPos = 2; - break; - case 2: - bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2; - p = b; - groupPos = 3; - break; - case 3: - bytes[bytePos++] = (p & 3) << 6 | b; - groupPos = 0; - break; - } - } - if (groupPos == 1) - throw Error(`invalid base64 string.`); - return bytes.subarray(0, bytePos); - } - __name(base64decode, "base64decode"); - exports2.base64decode = base64decode; - function base64encode(bytes) { - let base64 = "", groupPos = 0, b, p = 0; - for (let i = 0; i < bytes.length; i++) { - b = bytes[i]; - switch (groupPos) { - case 0: - base64 += encTable[b >> 2]; - p = (b & 3) << 4; - groupPos = 1; - break; - case 1: - base64 += encTable[p | b >> 4]; - p = (b & 15) << 2; - groupPos = 2; - break; - case 2: - base64 += encTable[p | b >> 6]; - base64 += encTable[b & 63]; - groupPos = 0; - break; - } - } - if (groupPos) { - base64 += encTable[p]; - base64 += "="; - if (groupPos == 1) - base64 += "="; - } - return base64; - } - __name(base64encode, "base64encode"); - exports2.base64encode = base64encode; - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js -var require_protobufjs_utf8 = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.utf8read = void 0; - var fromCharCodes = /* @__PURE__ */ __name((chunk) => String.fromCharCode.apply(String, chunk), "fromCharCodes"); - function utf8read(bytes) { - if (bytes.length < 1) - return ""; - let pos = 0, parts = [], chunk = [], i = 0, t; - let len = bytes.length; - while (pos < len) { - t = bytes[pos++]; - if (t < 128) - chunk[i++] = t; - else if (t > 191 && t < 224) - chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63; - else if (t > 239 && t < 365) { - t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 65536; - chunk[i++] = 55296 + (t >> 10); - chunk[i++] = 56320 + (t & 1023); - } else - chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63; - if (i > 8191) { - parts.push(fromCharCodes(chunk)); - i = 0; - } - } - if (parts.length) { - if (i) - parts.push(fromCharCodes(chunk.slice(0, i))); - return parts.join(""); - } - return fromCharCodes(chunk.slice(0, i)); - } - __name(utf8read, "utf8read"); - exports2.utf8read = utf8read; - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js -var require_binary_format_contract = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.WireType = exports2.mergeBinaryOptions = exports2.UnknownFieldHandler = void 0; - var UnknownFieldHandler; - (function(UnknownFieldHandler2) { - UnknownFieldHandler2.symbol = Symbol.for("protobuf-ts/unknown"); - UnknownFieldHandler2.onRead = (typeName, message, fieldNo, wireType, data) => { - let container = is(message) ? message[UnknownFieldHandler2.symbol] : message[UnknownFieldHandler2.symbol] = []; - container.push({ no: fieldNo, wireType, data }); - }; - UnknownFieldHandler2.onWrite = (typeName, message, writer) => { - for (let { no, wireType, data } of UnknownFieldHandler2.list(message)) - writer.tag(no, wireType).raw(data); - }; - UnknownFieldHandler2.list = (message, fieldNo) => { - if (is(message)) { - let all = message[UnknownFieldHandler2.symbol]; - return fieldNo ? all.filter((uf) => uf.no == fieldNo) : all; - } - return []; - }; - UnknownFieldHandler2.last = (message, fieldNo) => UnknownFieldHandler2.list(message, fieldNo).slice(-1)[0]; - const is = /* @__PURE__ */ __name((message) => message && Array.isArray(message[UnknownFieldHandler2.symbol]), "is"); - })(UnknownFieldHandler = exports2.UnknownFieldHandler || (exports2.UnknownFieldHandler = {})); - function mergeBinaryOptions(a, b) { - return Object.assign(Object.assign({}, a), b); - } - __name(mergeBinaryOptions, "mergeBinaryOptions"); - exports2.mergeBinaryOptions = mergeBinaryOptions; - var WireType; - (function(WireType2) { - WireType2[WireType2["Varint"] = 0] = "Varint"; - WireType2[WireType2["Bit64"] = 1] = "Bit64"; - WireType2[WireType2["LengthDelimited"] = 2] = "LengthDelimited"; - WireType2[WireType2["StartGroup"] = 3] = "StartGroup"; - WireType2[WireType2["EndGroup"] = 4] = "EndGroup"; - WireType2[WireType2["Bit32"] = 5] = "Bit32"; - })(WireType = exports2.WireType || (exports2.WireType = {})); - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js -var require_goog_varint = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.varint32read = exports2.varint32write = exports2.int64toString = exports2.int64fromString = exports2.varint64write = exports2.varint64read = void 0; - function varint64read() { - let lowBits = 0; - let highBits = 0; - for (let shift = 0; shift < 28; shift += 7) { - let b = this.buf[this.pos++]; - lowBits |= (b & 127) << shift; - if ((b & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - let middleByte = this.buf[this.pos++]; - lowBits |= (middleByte & 15) << 28; - highBits = (middleByte & 112) >> 4; - if ((middleByte & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - for (let shift = 3; shift <= 31; shift += 7) { - let b = this.buf[this.pos++]; - highBits |= (b & 127) << shift; - if ((b & 128) == 0) { - this.assertBounds(); - return [lowBits, highBits]; - } - } - throw new Error("invalid varint"); - } - __name(varint64read, "varint64read"); - exports2.varint64read = varint64read; - function varint64write(lo, hi, bytes) { - for (let i = 0; i < 28; i = i + 7) { - const shift = lo >>> i; - const hasNext = !(shift >>> 7 == 0 && hi == 0); - const byte = (hasNext ? shift | 128 : shift) & 255; - bytes.push(byte); - if (!hasNext) { - return; - } - } - const splitBits = lo >>> 28 & 15 | (hi & 7) << 4; - const hasMoreBits = !(hi >> 3 == 0); - bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255); - if (!hasMoreBits) { - return; - } - for (let i = 3; i < 31; i = i + 7) { - const shift = hi >>> i; - const hasNext = !(shift >>> 7 == 0); - const byte = (hasNext ? shift | 128 : shift) & 255; - bytes.push(byte); - if (!hasNext) { - return; - } - } - bytes.push(hi >>> 31 & 1); - } - __name(varint64write, "varint64write"); - exports2.varint64write = varint64write; - var TWO_PWR_32_DBL = (1 << 16) * (1 << 16); - function int64fromString(dec) { - let minus = dec[0] == "-"; - if (minus) - dec = dec.slice(1); - const base = 1e6; - let lowBits = 0; - let highBits = 0; - function add1e6digit(begin, end) { - const digit1e6 = Number(dec.slice(begin, end)); - highBits *= base; - lowBits = lowBits * base + digit1e6; - if (lowBits >= TWO_PWR_32_DBL) { - highBits = highBits + (lowBits / TWO_PWR_32_DBL | 0); - lowBits = lowBits % TWO_PWR_32_DBL; - } - } - __name(add1e6digit, "add1e6digit"); - add1e6digit(-24, -18); - add1e6digit(-18, -12); - add1e6digit(-12, -6); - add1e6digit(-6); - return [minus, lowBits, highBits]; - } - __name(int64fromString, "int64fromString"); - exports2.int64fromString = int64fromString; - function int64toString(bitsLow, bitsHigh) { - if (bitsHigh >>> 0 <= 2097151) { - return "" + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0)); - } - let low = bitsLow & 16777215; - let mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215; - let high = bitsHigh >> 16 & 65535; - let digitA = low + mid * 6777216 + high * 6710656; - let digitB = mid + high * 8147497; - let digitC = high * 2; - let base = 1e7; - if (digitA >= base) { - digitB += Math.floor(digitA / base); - digitA %= base; - } - if (digitB >= base) { - digitC += Math.floor(digitB / base); - digitB %= base; - } - function decimalFrom1e7(digit1e7, needLeadingZeros) { - let partial = digit1e7 ? String(digit1e7) : ""; - if (needLeadingZeros) { - return "0000000".slice(partial.length) + partial; - } - return partial; - } - __name(decimalFrom1e7, "decimalFrom1e7"); - return decimalFrom1e7( - digitC, - /*needLeadingZeros=*/ - 0 - ) + decimalFrom1e7( - digitB, - /*needLeadingZeros=*/ - digitC - ) + // If the final 1e7 digit didn't need leading zeros, we would have - // returned via the trivial code path at the top. - decimalFrom1e7( - digitA, - /*needLeadingZeros=*/ - 1 - ); - } - __name(int64toString, "int64toString"); - exports2.int64toString = int64toString; - function varint32write(value, bytes) { - if (value >= 0) { - while (value > 127) { - bytes.push(value & 127 | 128); - value = value >>> 7; - } - bytes.push(value); - } else { - for (let i = 0; i < 9; i++) { - bytes.push(value & 127 | 128); - value = value >> 7; - } - bytes.push(1); - } - } - __name(varint32write, "varint32write"); - exports2.varint32write = varint32write; - function varint32read() { - let b = this.buf[this.pos++]; - let result = b & 127; - if ((b & 128) == 0) { - this.assertBounds(); - return result; - } - b = this.buf[this.pos++]; - result |= (b & 127) << 7; - if ((b & 128) == 0) { - this.assertBounds(); - return result; - } - b = this.buf[this.pos++]; - result |= (b & 127) << 14; - if ((b & 128) == 0) { - this.assertBounds(); - return result; - } - b = this.buf[this.pos++]; - result |= (b & 127) << 21; - if ((b & 128) == 0) { - this.assertBounds(); - return result; - } - b = this.buf[this.pos++]; - result |= (b & 15) << 28; - for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) - b = this.buf[this.pos++]; - if ((b & 128) != 0) - throw new Error("invalid varint"); - this.assertBounds(); - return result >>> 0; - } - __name(varint32read, "varint32read"); - exports2.varint32read = varint32read; - } -}); - -// ../node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js -var require_pb_long = __commonJS({ - "../node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PbLong = exports2.PbULong = exports2.detectBi = void 0; - var goog_varint_1 = require_goog_varint(); - var BI; - function detectBi() { - const dv = new DataView(new ArrayBuffer(8)); - const ok = globalThis.BigInt !== void 0 && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function"; - BI = ok ? { - MIN: BigInt("-9223372036854775808"), - MAX: BigInt("9223372036854775807"), - UMIN: BigInt("0"), - UMAX: BigInt("18446744073709551615"), - C: BigInt, - V: dv - } : void 0; - } - __name(detectBi, "detectBi"); - exports2.detectBi = detectBi; - detectBi(); - function assertBi(bi) { - if (!bi) - throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support"); - } - __name(assertBi, "assertBi"); - var RE_DECIMAL_STR = /^-?[0-9]+$/; - var TWO_PWR_32_DBL = 4294967296; - var HALF_2_PWR_32 = 2147483648; - var SharedPbLong = class { - static { - __name(this, "SharedPbLong"); - } - /** - * Create a new instance with the given bits. - */ - constructor(lo, hi) { - this.lo = lo | 0; - this.hi = hi | 0; - } - /** - * Is this instance equal to 0? - */ - isZero() { - return this.lo == 0 && this.hi == 0; - } - /** - * Convert to a native number. - */ - toNumber() { - let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0); - if (!Number.isSafeInteger(result)) - throw new Error("cannot convert to safe number"); - return result; + /** + * Convert to a native number. + */ + toNumber() { + let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0); + if (!Number.isSafeInteger(result)) + throw new Error("cannot convert to safe number"); + return result; } }; var PbULong = class _PbULong extends SharedPbLong { @@ -96300,2055 +95566,2093 @@ var require_commonjs7 = __commonJS({ } }); -// ../node_modules/@actions/artifact/lib/generated/google/protobuf/timestamp.js -var require_timestamp = __commonJS({ - "../node_modules/@actions/artifact/lib/generated/google/protobuf/timestamp.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js +var require_reflection_info2 = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Timestamp = void 0; + exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; var runtime_1 = require_commonjs7(); - var runtime_2 = require_commonjs7(); - var runtime_3 = require_commonjs7(); - var runtime_4 = require_commonjs7(); - var runtime_5 = require_commonjs7(); - var runtime_6 = require_commonjs7(); - var runtime_7 = require_commonjs7(); - var Timestamp$Type = class extends runtime_7.MessageType { + function normalizeMethodInfo(method, service) { + var _a, _b, _c; + let m = method; + m.service = service; + m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name); + m.serverStreaming = !!m.serverStreaming; + m.clientStreaming = !!m.clientStreaming; + m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {}; + m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0; + return m; + } + __name(normalizeMethodInfo, "normalizeMethodInfo"); + 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; + return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; + } + __name(readMethodOptions, "readMethodOptions"); + 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; + if (!options) { + return void 0; + } + const optionVal = options[extensionName]; + if (optionVal === void 0) { + return optionVal; + } + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + __name(readMethodOption, "readMethodOption"); + exports2.readMethodOption = readMethodOption; + function readServiceOption(service, extensionName, extensionType) { + const options = service.options; + if (!options) { + return void 0; + } + const optionVal = options[extensionName]; + if (optionVal === void 0) { + return optionVal; + } + return extensionType ? extensionType.fromJson(optionVal) : optionVal; + } + __name(readServiceOption, "readServiceOption"); + exports2.readServiceOption = readServiceOption; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js +var require_service_type = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceType = void 0; + var reflection_info_1 = require_reflection_info2(); + var ServiceType = class { static { - __name(this, "Timestamp$Type"); + __name(this, "ServiceType"); } - constructor() { - super("google.protobuf.Timestamp", [ - { - no: 1, - name: "seconds", - kind: "scalar", - T: 3 - /*ScalarType.INT64*/ - }, - { - no: 2, - name: "nanos", - kind: "scalar", - T: 5 - /*ScalarType.INT32*/ + constructor(typeName, methods, options) { + this.typeName = typeName; + this.methods = methods.map((i) => reflection_info_1.normalizeMethodInfo(i, this)); + this.options = options !== null && options !== void 0 ? options : {}; + } + }; + exports2.ServiceType = ServiceType; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js +var require_rpc_error = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RpcError = void 0; + var RpcError = class extends Error { + static { + __name(this, "RpcError"); + } + constructor(message, code = "UNKNOWN", meta) { + super(message); + this.name = "RpcError"; + Object.setPrototypeOf(this, new.target.prototype); + this.code = code; + this.meta = meta !== null && meta !== void 0 ? meta : {}; + } + toString() { + const l = [this.name + ": " + this.message]; + if (this.code) { + l.push(""); + l.push("Code: " + this.code); + } + if (this.serviceName && this.methodName) { + l.push("Method: " + this.serviceName + "/" + this.methodName); + } + let m = Object.entries(this.meta); + if (m.length) { + l.push(""); + l.push("Meta:"); + for (let [k, v] of m) { + l.push(` ${k}: ${v}`); } - ]); + } + return l.join("\n"); + } + }; + exports2.RpcError = RpcError; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js +var require_rpc_options = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeRpcOptions = void 0; + var runtime_1 = require_commonjs7(); + function mergeRpcOptions(defaults, options) { + if (!options) + return defaults; + let o = {}; + copy(defaults, 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); + break; + case "binaryOptions": + o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); + break; + case "meta": + o.meta = {}; + copy(defaults.meta, o.meta); + copy(options.meta, o.meta); + break; + case "interceptors": + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); + break; + } + } + return o; + } + __name(mergeRpcOptions, "mergeRpcOptions"); + exports2.mergeRpcOptions = mergeRpcOptions; + function copy(a, into) { + if (!a) + return; + let c = into; + for (let [k, v] of Object.entries(a)) { + if (v instanceof Date) + c[k] = new Date(v.getTime()); + else if (Array.isArray(v)) + c[k] = v.concat(); + else + c[k] = v; + } + } + __name(copy, "copy"); + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js +var require_deferred = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Deferred = exports2.DeferredState = void 0; + var DeferredState; + (function(DeferredState2) { + DeferredState2[DeferredState2["PENDING"] = 0] = "PENDING"; + DeferredState2[DeferredState2["REJECTED"] = 1] = "REJECTED"; + DeferredState2[DeferredState2["RESOLVED"] = 2] = "RESOLVED"; + })(DeferredState = exports2.DeferredState || (exports2.DeferredState = {})); + var Deferred = class { + static { + __name(this, "Deferred"); } /** - * Creates a new `Timestamp` for the current time. + * @param preventUnhandledRejectionWarning - prevents the warning + * "Unhandled Promise rejection" by adding a noop rejection handler. + * Working with calls returned from the runtime-rpc package in an + * async function usually means awaiting one call property after + * the other. This means that the "status" is not being awaited when + * an earlier await for the "headers" is rejected. This causes the + * "unhandled promise reject" warning. A more correct behaviour for + * calls might be to become aware whether at least one of the + * promises is handled and swallow the rejection warning for the + * others. */ - now() { - const msg = this.create(); - const ms = Date.now(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); - msg.nanos = ms % 1e3 * 1e6; - return msg; + constructor(preventUnhandledRejectionWarning = true) { + this._state = DeferredState.PENDING; + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + if (preventUnhandledRejectionWarning) { + this._promise.catch((_2) => { + }); + } } /** - * Converts a `Timestamp` to a JavaScript Date. + * Get the current state of the promise. */ - toDate(message) { - return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6)); + get state() { + return this._state; } /** - * Converts a JavaScript Date to a `Timestamp`. + * Get the deferred promise. */ - fromDate(date) { - const msg = this.create(); - const ms = date.getTime(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); - msg.nanos = ms % 1e3 * 1e6; - return msg; + get promise() { + return this._promise; } /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. + * Resolve the promise. Throws if the promise is already resolved or rejected. */ - internalJsonWrite(message, options) { - let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1e3; - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (message.nanos < 0) - throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); - let z = "Z"; - if (message.nanos > 0) { - let nanosStr = (message.nanos + 1e9).toString().substring(1); - if (nanosStr.substring(3) === "000000") - z = "." + nanosStr.substring(0, 3) + "Z"; - else if (nanosStr.substring(6) === "000") - z = "." + nanosStr.substring(0, 6) + "Z"; - else - z = "." + nanosStr + "Z"; - } - return new Date(ms).toISOString().replace(".000Z", z); + resolve(value) { + if (this.state !== DeferredState.PENDING) + throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`); + this._resolve(value); + this._state = DeferredState.RESOLVED; } /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. + * Reject the promise. Throws if the promise is already resolved or rejected. */ - 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")); - if (Number.isNaN(ms)) - throw new Error("Unable to parse Timestamp from JSON. Invalid value."); - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (!target) - target = this.create(); - target.seconds = runtime_6.PbLong.from(ms / 1e3).toString(); - target.nanos = 0; - if (matches[7]) - target.nanos = parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1e9; - return target; - } - create(value) { - const message = { seconds: "0", nanos: 0 }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + reject(reason) { + if (this.state !== DeferredState.PENDING) + throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`); + this._reject(reason); + this._state = DeferredState.REJECTED; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 seconds */ - 1: - message.seconds = reader.int64().toString(); - break; - case /* int32 nanos */ - 2: - message.nanos = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + /** + * Resolve the promise. Ignore if not pending. + */ + resolvePending(val) { + if (this._state === DeferredState.PENDING) + this.resolve(val); } - internalBinaryWrite(message, writer, options) { - if (message.seconds !== "0") - writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); - if (message.nanos !== 0) - writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + /** + * Reject the promise. Ignore if not pending. + */ + rejectPending(reason) { + if (this._state === DeferredState.PENDING) + this.reject(reason); } }; - exports2.Timestamp = new Timestamp$Type(); + exports2.Deferred = Deferred; } }); -// ../node_modules/@actions/artifact/lib/generated/google/protobuf/wrappers.js -var require_wrappers = __commonJS({ - "../node_modules/@actions/artifact/lib/generated/google/protobuf/wrappers.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js +var require_rpc_output_stream = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.BytesValue = exports2.StringValue = exports2.BoolValue = exports2.UInt32Value = exports2.Int32Value = exports2.UInt64Value = exports2.Int64Value = exports2.FloatValue = exports2.DoubleValue = void 0; + exports2.RpcOutputStreamController = void 0; + var deferred_1 = require_deferred(); var runtime_1 = require_commonjs7(); - var runtime_2 = require_commonjs7(); - var runtime_3 = require_commonjs7(); - var runtime_4 = require_commonjs7(); - var runtime_5 = require_commonjs7(); - var runtime_6 = require_commonjs7(); - var runtime_7 = require_commonjs7(); - var DoubleValue$Type = class extends runtime_7.MessageType { + var RpcOutputStreamController = class { static { - __name(this, "DoubleValue$Type"); + __name(this, "RpcOutputStreamController"); } constructor() { - super("google.protobuf.DoubleValue", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 1 - /*ScalarType.DOUBLE*/ - } - ]); - } - /** - * Encode `DoubleValue` to JSON number. - */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(2, message.value, "value", false, true); + this._lis = { + nxt: [], + msg: [], + err: [], + cmp: [] + }; + this._closed = false; } - /** - * Decode `DoubleValue` from JSON number. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); - return target; + // --- RpcOutputStream callback API + onNext(callback) { + return this.addLis(callback, this._lis.nxt); } - create(value) { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + onMessage(callback) { + return this.addLis(callback, this._lis.msg); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* double value */ - 1: - message.value = reader.double(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + onError(callback) { + return this.addLis(callback, this._lis.err); } - internalBinaryWrite(message, writer, options) { - if (message.value !== 0) - writer.tag(1, runtime_3.WireType.Bit64).double(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + onComplete(callback) { + return this.addLis(callback, this._lis.cmp); } - }; - exports2.DoubleValue = new DoubleValue$Type(); - var FloatValue$Type = class extends runtime_7.MessageType { - static { - __name(this, "FloatValue$Type"); + addLis(callback, list) { + list.push(callback); + return () => { + let i = list.indexOf(callback); + if (i >= 0) + list.splice(i, 1); + }; } - constructor() { - super("google.protobuf.FloatValue", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 2 - /*ScalarType.FLOAT*/ - } - ]); + // remove all listeners + clearLis() { + for (let l of Object.values(this._lis)) + l.splice(0, l.length); } + // --- Controller API /** - * Encode `FloatValue` to JSON number. + * Is this stream already closed by a completion or error? */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(1, message.value, "value", false, true); + get closed() { + return this._closed !== false; } /** - * Decode `FloatValue` from JSON number. + * Emit message, close with error, or close successfully, but only one + * at a time. + * Can be used to wrap a stream by using the other stream's `onNext`. */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); - return target; + notifyNext(message, error, complete) { + runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); + if (message) + this.notifyMessage(message); + if (error) + this.notifyError(error); + if (complete) + this.notifyComplete(); } - create(value) { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* float value */ - 1: - message.value = reader.float(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.value !== 0) - writer.tag(1, runtime_3.WireType.Bit32).float(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } - }; - exports2.FloatValue = new FloatValue$Type(); - var Int64Value$Type = class extends runtime_7.MessageType { - static { - __name(this, "Int64Value$Type"); - } - constructor() { - super("google.protobuf.Int64Value", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 3 - /*ScalarType.INT64*/ - } - ]); + /** + * Emits a new message. Throws if stream is closed. + * + * Triggers onNext and onMessage callbacks. + */ + notifyMessage(message) { + runtime_1.assert(!this.closed, "stream is closed"); + this.pushIt({ value: message, done: false }); + this._lis.msg.forEach((l) => l(message)); + this._lis.nxt.forEach((l) => l(message, void 0, false)); } /** - * Encode `Int64Value` to JSON string. + * Closes the stream with an error. Throws if stream is closed. + * + * Triggers onNext and onError callbacks. */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(runtime_1.ScalarType.INT64, message.value, "value", false, true); + notifyError(error) { + runtime_1.assert(!this.closed, "stream is closed"); + this._closed = error; + this.pushIt(error); + this._lis.err.forEach((l) => l(error)); + this._lis.nxt.forEach((l) => l(void 0, error, false)); + this.clearLis(); } /** - * Decode `Int64Value` from JSON string. + * Closes the stream successfully. Throws if stream is closed. + * + * Triggers onNext and onComplete callbacks. */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.INT64, runtime_2.LongType.STRING, "value"); - return target; + notifyComplete() { + runtime_1.assert(!this.closed, "stream is closed"); + this._closed = true; + this.pushIt({ value: null, done: true }); + this._lis.cmp.forEach((l) => l()); + this._lis.nxt.forEach((l) => l(void 0, void 0, true)); + this.clearLis(); } - create(value) { - const message = { value: "0" }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + /** + * Creates an async iterator (that can be used with `for await {...}`) + * to consume the stream. + * + * Some things to note: + * - If an error occurs, the `for await` will throw it. + * - If an error occurred before the `for await` was started, `for await` + * will re-throw it. + * - If the stream is already complete, the `for await` will be empty. + * - If your `for await` consumes slower than the stream produces, + * for example because you are relaying messages in a slow operation, + * messages are queued. + */ + [Symbol.asyncIterator]() { + if (!this._itState) { + this._itState = { q: [] }; + } + if (this._closed === true) + this.pushIt({ value: null, done: true }); + else if (this._closed !== false) + this.pushIt(this._closed); + return { + next: /* @__PURE__ */ __name(() => { + let state = this._itState; + runtime_1.assert(state, "bad state"); + runtime_1.assert(!state.p, "iterator contract broken"); + let first = state.q.shift(); + if (first) + return "value" in first ? Promise.resolve(first) : Promise.reject(first); + state.p = new deferred_1.Deferred(); + return state.p.promise; + }, "next") + }; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 value */ - 1: - message.value = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } + // "push" a new iterator result. + // this either resolves a pending promise, or enqueues the result. + pushIt(result) { + let state = this._itState; + if (!state) + return; + if (state.p) { + const p = state.p; + runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken"); + "value" in result ? p.resolve(result) : p.reject(result); + delete state.p; + } else { + state.q.push(result); } - return message; } - internalBinaryWrite(message, writer, options) { - if (message.value !== "0") - writer.tag(1, runtime_3.WireType.Varint).int64(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + }; + exports2.RpcOutputStreamController = RpcOutputStreamController; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js +var require_unary_call = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.Int64Value = new Int64Value$Type(); - var UInt64Value$Type = class extends runtime_7.MessageType { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnaryCall = void 0; + var UnaryCall = class { static { - __name(this, "UInt64Value$Type"); + __name(this, "UnaryCall"); } - constructor() { - super("google.protobuf.UInt64Value", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 4 - /*ScalarType.UINT64*/ - } - ]); + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; } /** - * Encode `UInt64Value` to JSON string. + * If you are only interested in the final outcome of this call, + * you can await it to receive a `FinishedUnaryCall`. */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(runtime_1.ScalarType.UINT64, message.value, "value", false, true); + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - /** - * Decode `UInt64Value` from JSON string. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.UINT64, runtime_2.LongType.STRING, "value"); - return target; + promiseFinished() { + return __awaiter3(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + response, + status, + trailers + }; + }); } - create(value) { - const message = { value: "0" }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + }; + exports2.UnaryCall = UnaryCall; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js +var require_server_streaming_call = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* uint64 value */ - 1: - message.value = reader.uint64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.value !== "0") - writer.tag(1, runtime_3.WireType.Varint).uint64(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.UInt64Value = new UInt64Value$Type(); - var Int32Value$Type = class extends runtime_7.MessageType { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServerStreamingCall = void 0; + var ServerStreamingCall = class { static { - __name(this, "Int32Value$Type"); + __name(this, "ServerStreamingCall"); } - constructor() { - super("google.protobuf.Int32Value", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 5 - /*ScalarType.INT32*/ - } - ]); + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.request = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; } /** - * Encode `Int32Value` to JSON string. + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * You should first setup some listeners to the `request` to + * see the actual messages the server replied with. */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(5, message.value, "value", false, true); + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - /** - * Decode `Int32Value` from JSON string. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 5, void 0, "value"); - return target; + promiseFinished() { + return __awaiter3(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + request: this.request, + headers, + status, + trailers + }; + }); } - create(value) { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + }; + exports2.ServerStreamingCall = ServerStreamingCall; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js +var require_client_streaming_call = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int32 value */ - 1: - message.value = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.value !== 0) - writer.tag(1, runtime_3.WireType.Varint).int32(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.Int32Value = new Int32Value$Type(); - var UInt32Value$Type = class extends runtime_7.MessageType { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ClientStreamingCall = void 0; + var ClientStreamingCall = class { static { - __name(this, "UInt32Value$Type"); + __name(this, "ClientStreamingCall"); } - constructor() { - super("google.protobuf.UInt32Value", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 13 - /*ScalarType.UINT32*/ - } - ]); + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.response = response; + this.status = status; + this.trailers = trailers; } /** - * Encode `UInt32Value` to JSON string. + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(13, message.value, "value", false, true); + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - /** - * Decode `UInt32Value` from JSON string. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 13, void 0, "value"); - return target; + promiseFinished() { + return __awaiter3(this, void 0, void 0, function* () { + let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + response, + status, + trailers + }; + }); } - create(value) { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + }; + exports2.ClientStreamingCall = ClientStreamingCall; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js +var require_duplex_streaming_call = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* uint32 value */ - 1: - message.value = reader.uint32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.value !== 0) - writer.tag(1, runtime_3.WireType.Varint).uint32(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.UInt32Value = new UInt32Value$Type(); - var BoolValue$Type = class extends runtime_7.MessageType { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DuplexStreamingCall = void 0; + var DuplexStreamingCall = class { static { - __name(this, "BoolValue$Type"); + __name(this, "DuplexStreamingCall"); } - constructor() { - super("google.protobuf.BoolValue", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 8 - /*ScalarType.BOOL*/ - } - ]); + constructor(method, requestHeaders, request, headers, response, status, trailers) { + this.method = method; + this.requestHeaders = requestHeaders; + this.requests = request; + this.headers = headers; + this.responses = response; + this.status = status; + this.trailers = trailers; } /** - * Encode `BoolValue` to JSON bool. + * Instead of awaiting the response status and trailers, you can + * just as well await this call itself to receive the server outcome. + * Note that it may still be valid to send more request messages. */ - internalJsonWrite(message, options) { - return message.value; + then(onfulfilled, onrejected) { + return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } - /** - * Decode `BoolValue` from JSON bool. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 8, void 0, "value"); - return target; + promiseFinished() { + return __awaiter3(this, void 0, void 0, function* () { + let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); + return { + method: this.method, + requestHeaders: this.requestHeaders, + headers, + status, + trailers + }; + }); } - create(value) { - const message = { value: false }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + }; + exports2.DuplexStreamingCall = DuplexStreamingCall; + } +}); + +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js +var require_test_transport = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool value */ - 1: - message.value = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } } - return message; - } - internalBinaryWrite(message, writer, options) { - if (message.value !== false) - writer.tag(1, runtime_3.WireType.Varint).bool(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - exports2.BoolValue = new BoolValue$Type(); - var StringValue$Type = class extends runtime_7.MessageType { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestTransport = void 0; + var rpc_error_1 = require_rpc_error(); + var runtime_1 = require_commonjs7(); + var rpc_output_stream_1 = require_rpc_output_stream(); + var rpc_options_1 = require_rpc_options(); + var unary_call_1 = require_unary_call(); + var server_streaming_call_1 = require_server_streaming_call(); + var client_streaming_call_1 = require_client_streaming_call(); + var duplex_streaming_call_1 = require_duplex_streaming_call(); + var TestTransport = class _TestTransport { static { - __name(this, "StringValue$Type"); + __name(this, "TestTransport"); } - constructor() { - super("google.protobuf.StringValue", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - } - ]); + /** + * Initialize with mock data. Omitted fields have default value. + */ + constructor(data) { + this.suppressUncaughtRejections = true; + this.headerDelay = 10; + this.responseDelay = 50; + this.betweenResponseDelay = 10; + this.afterResponseDelay = 10; + this.data = data !== null && data !== void 0 ? data : {}; } /** - * Encode `StringValue` to JSON string. + * Sent message(s) during the last operation. */ - internalJsonWrite(message, options) { - return message.value; + get sentMessages() { + if (this.lastInput instanceof TestInputStream) { + return this.lastInput.sent; + } else if (typeof this.lastInput == "object") { + return [this.lastInput.single]; + } + return []; } /** - * Decode `StringValue` from JSON string. + * Sending message(s) completed? */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 9, void 0, "value"); - return target; + get sendComplete() { + if (this.lastInput instanceof TestInputStream) { + return this.lastInput.completed; + } else if (typeof this.lastInput == "object") { + return true; + } + return false; } - create(value) { - const message = { value: "" }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + // 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; + return headers instanceof rpc_error_1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string value */ - 1: - message.value = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } + // Creates a promise for a single, valid, message from the mock data. + promiseSingleResponse(method) { + if (this.data.response instanceof rpc_error_1.RpcError) { + return Promise.reject(this.data.response); } - return message; + let r; + if (Array.isArray(this.data.response)) { + runtime_1.assert(this.data.response.length > 0); + r = this.data.response[0]; + } else if (this.data.response !== void 0) { + r = this.data.response; + } else { + r = method.O.create(); + } + runtime_1.assert(method.O.is(r)); + return Promise.resolve(r); } - internalBinaryWrite(message, writer, options) { - if (message.value !== "") - writer.tag(1, runtime_3.WireType.LengthDelimited).string(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + /** + * Pushes response messages from the mock data to the output stream. + * If an error response, status or trailers are mocked, the stream is + * closed with the respective error. + * Otherwise, stream is completed successfully. + * + * The returned promise resolves when the stream is closed. It should + * not reject. If it does, code is broken. + */ + streamResponses(method, stream, abort) { + return __awaiter3(this, void 0, void 0, function* () { + const messages = []; + if (this.data.response === void 0) { + messages.push(method.O.create()); + } else if (Array.isArray(this.data.response)) { + for (let msg of this.data.response) { + runtime_1.assert(method.O.is(msg)); + messages.push(msg); + } + } else if (!(this.data.response instanceof rpc_error_1.RpcError)) { + runtime_1.assert(method.O.is(this.data.response)); + messages.push(this.data.response); + } + try { + yield delay(this.responseDelay, abort)(void 0); + } catch (error) { + stream.notifyError(error); + return; + } + if (this.data.response instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.response); + return; + } + for (let msg of messages) { + stream.notifyMessage(msg); + try { + yield delay(this.betweenResponseDelay, abort)(void 0); + } catch (error) { + stream.notifyError(error); + return; + } + } + if (this.data.status instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.status); + return; + } + if (this.data.trailers instanceof rpc_error_1.RpcError) { + stream.notifyError(this.data.trailers); + return; + } + stream.notifyComplete(); + }); } - }; - exports2.StringValue = new StringValue$Type(); - var BytesValue$Type = class extends runtime_7.MessageType { - static { - __name(this, "BytesValue$Type"); + // 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; + return status instanceof rpc_error_1.RpcError ? Promise.reject(status) : Promise.resolve(status); } - constructor() { - super("google.protobuf.BytesValue", [ - { - no: 1, - name: "value", - kind: "scalar", - T: 12 - /*ScalarType.BYTES*/ + // 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; + return trailers instanceof rpc_error_1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); + } + maybeSuppressUncaught(...promise) { + if (this.suppressUncaughtRejections) { + for (let p of promise) { + p.catch(() => { + }); } - ]); + } } - /** - * Encode `BytesValue` to JSON string. - */ - internalJsonWrite(message, options) { - return this.refJsonWriter.scalar(12, message.value, "value", false, true); + mergeOptions(options) { + return rpc_options_1.mergeRpcOptions({}, options); } - /** - * Decode `BytesValue` from JSON string. - */ - internalJsonRead(json, options, target) { - if (!target) - target = this.create(); - target.value = this.refJsonReader.scalar(json, 12, void 0, "value"); - return target; + unary(method, input, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + }).then(delay(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { + }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { + }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = { single: input }; + return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); } - create(value) { - const message = { value: new Uint8Array(0) }; - globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_5.reflectionMergePartial)(this, message, value); - return message; + serverStreaming(method, input, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => { + }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(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); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bytes value */ - 1: - message.value = reader.bytes(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + clientStreaming(method, options) { + var _a; + const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { + }).then(delay(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { + }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { + }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); + this.maybeSuppressUncaught(statusPromise, trailersPromise); + this.lastInput = new TestInputStream(this.data, options.abort); + 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(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => { + }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(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); + return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); + } + }; + exports2.TestTransport = TestTransport; + TestTransport.defaultHeaders = { + responseHeader: "test" + }; + TestTransport.defaultStatus = { + code: "OK", + detail: "all good" + }; + TestTransport.defaultTrailers = { + responseTrailer: "test" + }; + function delay(ms, abort) { + return (v) => new Promise((resolve, reject) => { + if (abort === null || abort === void 0 ? void 0 : abort.aborted) { + reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); + } else { + const id = setTimeout(() => resolve(v), ms); + if (abort) { + abort.addEventListener("abort", (ev) => { + clearTimeout(id); + reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); + }); } } - return message; + }); + } + __name(delay, "delay"); + var TestInputStream = class { + static { + __name(this, "TestInputStream"); } - internalBinaryWrite(message, writer, options) { - if (message.value.length) - writer.tag(1, runtime_3.WireType.LengthDelimited).bytes(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + constructor(data, abort) { + this._completed = false; + this._sent = []; + this.data = data; + this.abort = abort; + } + get sent() { + return this._sent; + } + get completed() { + return this._completed; + } + send(message) { + if (this.data.inputMessage instanceof rpc_error_1.RpcError) { + return Promise.reject(this.data.inputMessage); + } + const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; + return Promise.resolve(void 0).then(() => { + this._sent.push(message); + }).then(delay(delayMs, this.abort)); + } + complete() { + if (this.data.inputComplete instanceof rpc_error_1.RpcError) { + return Promise.reject(this.data.inputComplete); + } + const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; + return Promise.resolve(void 0).then(() => { + this._completed = true; + }).then(delay(delayMs, this.abort)); } }; - exports2.BytesValue = new BytesValue$Type(); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js -var require_reflection_info2 = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js +var require_rpc_interceptor = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; + exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; var runtime_1 = require_commonjs7(); - function normalizeMethodInfo(method, service) { - var _a, _b, _c; - let m = method; - m.service = service; - m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name); - m.serverStreaming = !!m.serverStreaming; - m.clientStreaming = !!m.clientStreaming; - m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {}; - m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0; - return m; - } - __name(normalizeMethodInfo, "normalizeMethodInfo"); - 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; - return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : void 0; - } - __name(readMethodOptions, "readMethodOptions"); - 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; - if (!options) { - return void 0; + function stackIntercept(kind, transport, method, options, input) { + var _a, _b, _c, _d; + if (kind == "unary") { + let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.unary(mtd, inp, opt), "tail"); + for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { + const next = tail; + tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt), "tail"); + } + return tail(method, input, options); } - const optionVal = options[extensionName]; - if (optionVal === void 0) { - return optionVal; + if (kind == "serverStreaming") { + let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt), "tail"); + for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) { + const next = tail; + tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt), "tail"); + } + return tail(method, input, options); } - return extensionType ? extensionType.fromJson(optionVal) : optionVal; - } - __name(readMethodOption, "readMethodOption"); - exports2.readMethodOption = readMethodOption; - function readServiceOption(service, extensionName, extensionType) { - const options = service.options; - if (!options) { - return void 0; + if (kind == "clientStreaming") { + let tail = /* @__PURE__ */ __name((mtd, opt) => transport.clientStreaming(mtd, opt), "tail"); + for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) { + const next = tail; + tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptClientStreaming(next, mtd, opt), "tail"); + } + return tail(method, options); } - const optionVal = options[extensionName]; - if (optionVal === void 0) { - return optionVal; + if (kind == "duplex") { + let tail = /* @__PURE__ */ __name((mtd, opt) => transport.duplex(mtd, opt), "tail"); + for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) { + const next = tail; + tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptDuplex(next, mtd, opt), "tail"); + } + return tail(method, options); } - return extensionType ? extensionType.fromJson(optionVal) : optionVal; + runtime_1.assertNever(kind); } - __name(readServiceOption, "readServiceOption"); - exports2.readServiceOption = readServiceOption; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js -var require_service_type = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ServiceType = void 0; - var reflection_info_1 = require_reflection_info2(); - var ServiceType = class { - static { - __name(this, "ServiceType"); - } - constructor(typeName, methods, options) { - this.typeName = typeName; - this.methods = methods.map((i) => reflection_info_1.normalizeMethodInfo(i, this)); - this.options = options !== null && options !== void 0 ? options : {}; - } - }; - exports2.ServiceType = ServiceType; + __name(stackIntercept, "stackIntercept"); + exports2.stackIntercept = stackIntercept; + function stackUnaryInterceptors(transport, method, input, options) { + return stackIntercept("unary", transport, method, options, input); + } + __name(stackUnaryInterceptors, "stackUnaryInterceptors"); + exports2.stackUnaryInterceptors = stackUnaryInterceptors; + function stackServerStreamingInterceptors(transport, method, input, options) { + return stackIntercept("serverStreaming", transport, method, options, input); + } + __name(stackServerStreamingInterceptors, "stackServerStreamingInterceptors"); + exports2.stackServerStreamingInterceptors = stackServerStreamingInterceptors; + function stackClientStreamingInterceptors(transport, method, options) { + return stackIntercept("clientStreaming", transport, method, options); + } + __name(stackClientStreamingInterceptors, "stackClientStreamingInterceptors"); + exports2.stackClientStreamingInterceptors = stackClientStreamingInterceptors; + function stackDuplexStreamingInterceptors(transport, method, options) { + return stackIntercept("duplex", transport, method, options); + } + __name(stackDuplexStreamingInterceptors, "stackDuplexStreamingInterceptors"); + exports2.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js -var require_rpc_error = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js +var require_server_call_context = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RpcError = void 0; - var RpcError = class extends Error { + exports2.ServerCallContextController = void 0; + var ServerCallContextController = class { static { - __name(this, "RpcError"); + __name(this, "ServerCallContextController"); } - constructor(message, code = "UNKNOWN", meta) { - super(message); - this.name = "RpcError"; - Object.setPrototypeOf(this, new.target.prototype); - this.code = code; - this.meta = meta !== null && meta !== void 0 ? meta : {}; + constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: "OK", detail: "" }) { + this._cancelled = false; + this._listeners = []; + this.method = method; + this.headers = headers; + this.deadline = deadline; + this.trailers = {}; + this._sendRH = sendResponseHeadersFn; + this.status = defaultStatus; } - toString() { - const l = [this.name + ": " + this.message]; - if (this.code) { - l.push(""); - l.push("Code: " + this.code); - } - if (this.serviceName && this.methodName) { - l.push("Method: " + this.serviceName + "/" + this.methodName); - } - let m = Object.entries(this.meta); - if (m.length) { - l.push(""); - l.push("Meta:"); - for (let [k, v] of m) { - l.push(` ${k}: ${v}`); + /** + * Set the call cancelled. + * + * Invokes all callbacks registered with onCancel() and + * sets `cancelled = true`. + */ + notifyCancelled() { + if (!this._cancelled) { + this._cancelled = true; + for (let l of this._listeners) { + l(); } } - return l.join("\n"); + } + /** + * Send response headers. + */ + sendResponseHeaders(data) { + this._sendRH(data); + } + /** + * Is the call cancelled? + * + * When the client closes the connection before the server + * is done, the call is cancelled. + * + * If you want to cancel a request on the server, throw a + * RpcError with the CANCELLED status code. + */ + get cancelled() { + return this._cancelled; + } + /** + * Add a callback for cancellation. + */ + onCancel(callback) { + const l = this._listeners; + l.push(callback); + return () => { + let i = l.indexOf(callback); + if (i >= 0) + l.splice(i, 1); + }; } }; - exports2.RpcError = RpcError; + exports2.ServerCallContextController = ServerCallContextController; } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js -var require_rpc_options = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js"(exports2) { +// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js +var require_commonjs8 = __commonJS({ + "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs7(); - function mergeRpcOptions(defaults, options) { - if (!options) - return defaults; - let o = {}; - copy(defaults, 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); - break; - case "binaryOptions": - o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions); - break; - case "meta": - o.meta = {}; - copy(defaults.meta, o.meta); - copy(options.meta, o.meta); - break; - case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); - break; - } - } - return o; - } - __name(mergeRpcOptions, "mergeRpcOptions"); - exports2.mergeRpcOptions = mergeRpcOptions; - function copy(a, into) { - if (!a) - return; - let c = into; - for (let [k, v] of Object.entries(a)) { - if (v instanceof Date) - c[k] = new Date(v.getTime()); - else if (Array.isArray(v)) - c[k] = v.concat(); - else - c[k] = v; - } - } - __name(copy, "copy"); + var service_type_1 = require_service_type(); + Object.defineProperty(exports2, "ServiceType", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return service_type_1.ServiceType; + }, "get") }); + var reflection_info_1 = require_reflection_info2(); + Object.defineProperty(exports2, "readMethodOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return reflection_info_1.readMethodOptions; + }, "get") }); + Object.defineProperty(exports2, "readMethodOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return reflection_info_1.readMethodOption; + }, "get") }); + Object.defineProperty(exports2, "readServiceOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return reflection_info_1.readServiceOption; + }, "get") }); + var rpc_error_1 = require_rpc_error(); + Object.defineProperty(exports2, "RpcError", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_error_1.RpcError; + }, "get") }); + var rpc_options_1 = require_rpc_options(); + Object.defineProperty(exports2, "mergeRpcOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_options_1.mergeRpcOptions; + }, "get") }); + var rpc_output_stream_1 = require_rpc_output_stream(); + Object.defineProperty(exports2, "RpcOutputStreamController", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_output_stream_1.RpcOutputStreamController; + }, "get") }); + var test_transport_1 = require_test_transport(); + Object.defineProperty(exports2, "TestTransport", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return test_transport_1.TestTransport; + }, "get") }); + var deferred_1 = require_deferred(); + Object.defineProperty(exports2, "Deferred", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return deferred_1.Deferred; + }, "get") }); + Object.defineProperty(exports2, "DeferredState", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return deferred_1.DeferredState; + }, "get") }); + var duplex_streaming_call_1 = require_duplex_streaming_call(); + Object.defineProperty(exports2, "DuplexStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return duplex_streaming_call_1.DuplexStreamingCall; + }, "get") }); + var client_streaming_call_1 = require_client_streaming_call(); + Object.defineProperty(exports2, "ClientStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return client_streaming_call_1.ClientStreamingCall; + }, "get") }); + var server_streaming_call_1 = require_server_streaming_call(); + Object.defineProperty(exports2, "ServerStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return server_streaming_call_1.ServerStreamingCall; + }, "get") }); + var unary_call_1 = require_unary_call(); + Object.defineProperty(exports2, "UnaryCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return unary_call_1.UnaryCall; + }, "get") }); + var rpc_interceptor_1 = require_rpc_interceptor(); + Object.defineProperty(exports2, "stackIntercept", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_interceptor_1.stackIntercept; + }, "get") }); + Object.defineProperty(exports2, "stackDuplexStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_interceptor_1.stackDuplexStreamingInterceptors; + }, "get") }); + Object.defineProperty(exports2, "stackClientStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_interceptor_1.stackClientStreamingInterceptors; + }, "get") }); + Object.defineProperty(exports2, "stackServerStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_interceptor_1.stackServerStreamingInterceptors; + }, "get") }); + Object.defineProperty(exports2, "stackUnaryInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return rpc_interceptor_1.stackUnaryInterceptors; + }, "get") }); + var server_call_context_1 = require_server_call_context(); + Object.defineProperty(exports2, "ServerCallContextController", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return server_call_context_1.ServerCallContextController; + }, "get") }); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js -var require_deferred = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js"(exports2) { +// ../node_modules/@actions/cache/lib/generated/google/protobuf/timestamp.js +var require_timestamp = __commonJS({ + "../node_modules/@actions/cache/lib/generated/google/protobuf/timestamp.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Deferred = exports2.DeferredState = void 0; - var DeferredState; - (function(DeferredState2) { - DeferredState2[DeferredState2["PENDING"] = 0] = "PENDING"; - DeferredState2[DeferredState2["REJECTED"] = 1] = "REJECTED"; - DeferredState2[DeferredState2["RESOLVED"] = 2] = "RESOLVED"; - })(DeferredState = exports2.DeferredState || (exports2.DeferredState = {})); - var Deferred = class { + exports2.Timestamp = void 0; + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var runtime_6 = require_commonjs7(); + var runtime_7 = require_commonjs7(); + var Timestamp$Type = class extends runtime_7.MessageType { static { - __name(this, "Deferred"); + __name(this, "Timestamp$Type"); } - /** - * @param preventUnhandledRejectionWarning - prevents the warning - * "Unhandled Promise rejection" by adding a noop rejection handler. - * Working with calls returned from the runtime-rpc package in an - * async function usually means awaiting one call property after - * the other. This means that the "status" is not being awaited when - * an earlier await for the "headers" is rejected. This causes the - * "unhandled promise reject" warning. A more correct behaviour for - * calls might be to become aware whether at least one of the - * promises is handled and swallow the rejection warning for the - * others. - */ - constructor(preventUnhandledRejectionWarning = true) { - this._state = DeferredState.PENDING; - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - if (preventUnhandledRejectionWarning) { - this._promise.catch((_2) => { - }); - } + constructor() { + super("google.protobuf.Timestamp", [ + { + no: 1, + name: "seconds", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { + no: 2, + name: "nanos", + kind: "scalar", + T: 5 + /*ScalarType.INT32*/ + } + ]); } /** - * Get the current state of the promise. + * Creates a new `Timestamp` for the current time. */ - get state() { - return this._state; + now() { + const msg = this.create(); + const ms = Date.now(); + msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); + msg.nanos = ms % 1e3 * 1e6; + return msg; } /** - * Get the deferred promise. + * Converts a `Timestamp` to a JavaScript Date. */ - get promise() { - return this._promise; + toDate(message) { + return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6)); } /** - * Resolve the promise. Throws if the promise is already resolved or rejected. + * Converts a JavaScript Date to a `Timestamp`. */ - resolve(value) { - if (this.state !== DeferredState.PENDING) - throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`); - this._resolve(value); - this._state = DeferredState.RESOLVED; + fromDate(date) { + const msg = this.create(); + const ms = date.getTime(); + msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); + msg.nanos = ms % 1e3 * 1e6; + return msg; } /** - * Reject the promise. Throws if the promise is already resolved or rejected. + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. */ - reject(reason) { - if (this.state !== DeferredState.PENDING) - throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`); - this._reject(reason); - this._state = DeferredState.REJECTED; + internalJsonWrite(message, options) { + let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1e3; + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (message.nanos < 0) + throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); + let z = "Z"; + if (message.nanos > 0) { + let nanosStr = (message.nanos + 1e9).toString().substring(1); + if (nanosStr.substring(3) === "000000") + z = "." + nanosStr.substring(0, 3) + "Z"; + else if (nanosStr.substring(6) === "000") + z = "." + nanosStr.substring(0, 6) + "Z"; + else + z = "." + nanosStr + "Z"; + } + return new Date(ms).toISOString().replace(".000Z", z); } /** - * Resolve the promise. Ignore if not pending. + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. */ - resolvePending(val) { - if (this._state === DeferredState.PENDING) - this.resolve(val); + 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")); + if (Number.isNaN(ms)) + throw new Error("Unable to parse Timestamp from JSON. Invalid value."); + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (!target) + target = this.create(); + target.seconds = runtime_6.PbLong.from(ms / 1e3).toString(); + target.nanos = 0; + if (matches[7]) + target.nanos = parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1e9; + return target; } - /** - * Reject the promise. Ignore if not pending. - */ - rejectPending(reason) { - if (this._state === DeferredState.PENDING) - this.reject(reason); + create(value) { + const message = { seconds: "0", nanos: 0 }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 seconds */ + 1: + message.seconds = reader.int64().toString(); + break; + case /* int32 nanos */ + 2: + message.nanos = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.seconds !== "0") + writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); + if (message.nanos !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.Deferred = Deferred; + exports2.Timestamp = new Timestamp$Type(); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js -var require_rpc_output_stream = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js"(exports2) { +// ../node_modules/@actions/cache/lib/generated/results/entities/v1/cacheentry.js +var require_cacheentry = __commonJS({ + "../node_modules/@actions/cache/lib/generated/results/entities/v1/cacheentry.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RpcOutputStreamController = void 0; - var deferred_1 = require_deferred(); + exports2.CacheEntry = void 0; var runtime_1 = require_commonjs7(); - var RpcOutputStreamController = class { - static { - __name(this, "RpcOutputStreamController"); - } - constructor() { - this._lis = { - nxt: [], - msg: [], - err: [], - cmp: [] - }; - this._closed = false; - } - // --- RpcOutputStream callback API - onNext(callback) { - return this.addLis(callback, this._lis.nxt); - } - onMessage(callback) { - return this.addLis(callback, this._lis.msg); - } - onError(callback) { - return this.addLis(callback, this._lis.err); - } - onComplete(callback) { - return this.addLis(callback, this._lis.cmp); - } - addLis(callback, list) { - list.push(callback); - return () => { - let i = list.indexOf(callback); - if (i >= 0) - list.splice(i, 1); - }; - } - // remove all listeners - clearLis() { - for (let l of Object.values(this._lis)) - l.splice(0, l.length); - } - // --- Controller API - /** - * Is this stream already closed by a completion or error? - */ - get closed() { - return this._closed !== false; - } - /** - * Emit message, close with error, or close successfully, but only one - * at a time. - * Can be used to wrap a stream by using the other stream's `onNext`. - */ - notifyNext(message, error, complete) { - runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); - if (message) - this.notifyMessage(message); - if (error) - this.notifyError(error); - if (complete) - this.notifyComplete(); - } - /** - * Emits a new message. Throws if stream is closed. - * - * Triggers onNext and onMessage callbacks. - */ - notifyMessage(message) { - runtime_1.assert(!this.closed, "stream is closed"); - this.pushIt({ value: message, done: false }); - this._lis.msg.forEach((l) => l(message)); - this._lis.nxt.forEach((l) => l(message, void 0, false)); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var timestamp_1 = require_timestamp(); + var CacheEntry$Type = class extends runtime_5.MessageType { + static { + __name(this, "CacheEntry$Type"); } - /** - * Closes the stream with an error. Throws if stream is closed. - * - * Triggers onNext and onError callbacks. - */ - notifyError(error) { - runtime_1.assert(!this.closed, "stream is closed"); - this._closed = error; - this.pushIt(error); - this._lis.err.forEach((l) => l(error)); - this._lis.nxt.forEach((l) => l(void 0, error, false)); - this.clearLis(); + constructor() { + super("github.actions.results.entities.v1.CacheEntry", [ + { + no: 1, + name: "key", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "hash", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "size_bytes", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { + no: 4, + name: "scope", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 5, + name: "version", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { no: 6, name: "created_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") }, + { no: 7, name: "last_accessed_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") }, + { no: 8, name: "expires_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") } + ]); } - /** - * Closes the stream successfully. Throws if stream is closed. - * - * Triggers onNext and onComplete callbacks. - */ - notifyComplete() { - runtime_1.assert(!this.closed, "stream is closed"); - this._closed = true; - this.pushIt({ value: null, done: true }); - this._lis.cmp.forEach((l) => l()); - this._lis.nxt.forEach((l) => l(void 0, void 0, true)); - this.clearLis(); + create(value) { + const message = { key: "", hash: "", sizeBytes: "0", scope: "", version: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - /** - * Creates an async iterator (that can be used with `for await {...}`) - * to consume the stream. - * - * Some things to note: - * - If an error occurs, the `for await` will throw it. - * - If an error occurred before the `for await` was started, `for await` - * will re-throw it. - * - If the stream is already complete, the `for await` will be empty. - * - If your `for await` consumes slower than the stream produces, - * for example because you are relaying messages in a slow operation, - * messages are queued. - */ - [Symbol.asyncIterator]() { - if (!this._itState) { - this._itState = { q: [] }; + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string key */ + 1: + message.key = reader.string(); + break; + case /* string hash */ + 2: + message.hash = reader.string(); + break; + case /* int64 size_bytes */ + 3: + message.sizeBytes = reader.int64().toString(); + break; + case /* string scope */ + 4: + message.scope = reader.string(); + break; + case /* string version */ + 5: + message.version = reader.string(); + break; + case /* google.protobuf.Timestamp created_at */ + 6: + message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); + break; + case /* google.protobuf.Timestamp last_accessed_at */ + 7: + message.lastAccessedAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAccessedAt); + break; + case /* google.protobuf.Timestamp expires_at */ + 8: + message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - if (this._closed === true) - this.pushIt({ value: null, done: true }); - else if (this._closed !== false) - this.pushIt(this._closed); - return { - next: /* @__PURE__ */ __name(() => { - let state = this._itState; - runtime_1.assert(state, "bad state"); - runtime_1.assert(!state.p, "iterator contract broken"); - let first = state.q.shift(); - if (first) - return "value" in first ? Promise.resolve(first) : Promise.reject(first); - state.p = new deferred_1.Deferred(); - return state.p.promise; - }, "next") - }; + return message; } - // "push" a new iterator result. - // this either resolves a pending promise, or enqueues the result. - pushIt(result) { - let state = this._itState; - if (!state) - return; - if (state.p) { - const p = state.p; - runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken"); - "value" in result ? p.resolve(result) : p.reject(result); - delete state.p; - } else { - state.q.push(result); - } + internalBinaryWrite(message, writer, options) { + if (message.key !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.hash !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.hash); + if (message.sizeBytes !== "0") + writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); + if (message.scope !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.scope); + if (message.version !== "") + writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.version); + if (message.createdAt) + timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.lastAccessedAt) + timestamp_1.Timestamp.internalBinaryWrite(message.lastAccessedAt, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.expiresAt) + timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.RpcOutputStreamController = RpcOutputStreamController; + exports2.CacheEntry = new CacheEntry$Type(); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js -var require_unary_call = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { +// ../node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js +var require_cachescope = __commonJS({ + "../node_modules/@actions/cache/lib/generated/results/entities/v1/cachescope.js"(exports2) { "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UnaryCall = void 0; - var UnaryCall = class { + exports2.CacheScope = void 0; + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var CacheScope$Type = class extends runtime_5.MessageType { static { - __name(this, "UnaryCall"); + __name(this, "CacheScope$Type"); } - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.request = request; - this.headers = headers; - this.response = response; - this.status = status; - this.trailers = trailers; + constructor() { + super("github.actions.results.entities.v1.CacheScope", [ + { + no: 1, + name: "scope", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "permission", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + } + ]); } - /** - * If you are only interested in the final outcome of this call, - * you can await it to receive a `FinishedUnaryCall`. - */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + create(value) { + const message = { scope: "", permission: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - promiseFinished() { - return __awaiter3(this, void 0, void 0, function* () { - let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - request: this.request, - headers, - response, - status, - trailers - }; - }); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string scope */ + 1: + message.scope = reader.string(); + break; + case /* int64 permission */ + 2: + message.permission = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.scope !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.scope); + if (message.permission !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.permission); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.UnaryCall = UnaryCall; + exports2.CacheScope = new CacheScope$Type(); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js -var require_server_streaming_call = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { +// ../node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js +var require_cachemetadata = __commonJS({ + "../node_modules/@actions/cache/lib/generated/results/entities/v1/cachemetadata.js"(exports2) { "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ServerStreamingCall = void 0; - var ServerStreamingCall = class { + exports2.CacheMetadata = void 0; + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var cachescope_1 = require_cachescope(); + var CacheMetadata$Type = class extends runtime_5.MessageType { static { - __name(this, "ServerStreamingCall"); + __name(this, "CacheMetadata$Type"); } - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.request = request; - this.headers = headers; - this.responses = response; - this.status = status; - this.trailers = trailers; + constructor() { + super("github.actions.results.entities.v1.CacheMetadata", [ + { + no: 1, + name: "repository_id", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { no: 2, name: "scope", kind: "message", repeat: 1, T: /* @__PURE__ */ __name(() => cachescope_1.CacheScope, "T") } + ]); } - /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * You should first setup some listeners to the `request` to - * see the actual messages the server replied with. - */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + create(value) { + const message = { repositoryId: "0", scope: [] }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - promiseFinished() { - return __awaiter3(this, void 0, void 0, function* () { - let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - request: this.request, - headers, - status, - trailers - }; - }); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 repository_id */ + 1: + message.repositoryId = reader.int64().toString(); + break; + case /* repeated github.actions.results.entities.v1.CacheScope scope */ + 2: + message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.repositoryId !== "0") + writer.tag(1, runtime_1.WireType.Varint).int64(message.repositoryId); + for (let i = 0; i < message.scope.length; i++) + cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.ServerStreamingCall = ServerStreamingCall; + exports2.CacheMetadata = new CacheMetadata$Type(); } }); -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js -var require_client_streaming_call = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { +// ../node_modules/@actions/cache/lib/generated/results/api/v1/cache.js +var require_cache2 = __commonJS({ + "../node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ClientStreamingCall = void 0; - var ClientStreamingCall = class { + exports2.CacheService = exports2.LookupCacheEntryResponse = exports2.LookupCacheEntryRequest = exports2.ListCacheEntriesResponse = exports2.ListCacheEntriesRequest = exports2.DeleteCacheEntryResponse = exports2.DeleteCacheEntryRequest = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; + var runtime_rpc_1 = require_commonjs8(); + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var cacheentry_1 = require_cacheentry(); + var cachemetadata_1 = require_cachemetadata(); + var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { static { - __name(this, "ClientStreamingCall"); + __name(this, "CreateCacheEntryRequest$Type"); } - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.requests = request; - this.headers = headers; - this.response = response; - this.status = status; - this.trailers = trailers; + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "version", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + } + ]); } - /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * Note that it may still be valid to send more request messages. - */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); - } - promiseFinished() { - return __awaiter3(this, void 0, void 0, function* () { - let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - headers, - response, - status, - trailers - }; - }); - } - }; - exports2.ClientStreamingCall = ClientStreamingCall; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js -var require_duplex_streaming_call = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + create(value) { + const message = { key: "", version: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* github.actions.results.entities.v1.CacheMetadata metadata */ + 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* string key */ + 2: + message.key = reader.string(); + break; + case /* string version */ + 3: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.version !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DuplexStreamingCall = void 0; - var DuplexStreamingCall = class { + exports2.CreateCacheEntryRequest = new CreateCacheEntryRequest$Type(); + var CreateCacheEntryResponse$Type = class extends runtime_5.MessageType { static { - __name(this, "DuplexStreamingCall"); + __name(this, "CreateCacheEntryResponse$Type"); } - constructor(method, requestHeaders, request, headers, response, status, trailers) { - this.method = method; - this.requestHeaders = requestHeaders; - this.requests = request; - this.headers = headers; - this.responses = response; - this.status = status; - this.trailers = trailers; + constructor() { + super("github.actions.results.api.v1.CreateCacheEntryResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + }, + { + no: 2, + name: "signed_upload_url", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + } + ]); } - /** - * Instead of awaiting the response status and trailers, you can - * just as well await this call itself to receive the server outcome. - * Note that it may still be valid to send more request messages. - */ - then(onfulfilled, onrejected) { - return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); + create(value) { + const message = { ok: false, signedUploadUrl: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - promiseFinished() { - return __awaiter3(this, void 0, void 0, function* () { - let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); - return { - method: this.method, - requestHeaders: this.requestHeaders, - headers, - status, - trailers - }; - }); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool ok */ + 1: + message.ok = reader.bool(); + break; + case /* string signed_upload_url */ + 2: + message.signedUploadUrl = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedUploadUrl !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.DuplexStreamingCall = DuplexStreamingCall; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js -var require_test_transport = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + exports2.CreateCacheEntryResponse = new CreateCacheEntryResponse$Type(); + var FinalizeCacheEntryUploadRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "FinalizeCacheEntryUploadRequest$Type"); } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "size_bytes", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + ]); + } + create(value) { + const message = { key: "", sizeBytes: "0", version: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* github.actions.results.entities.v1.CacheMetadata metadata */ + 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* string key */ + 2: + message.key = reader.string(); + break; + case /* int64 size_bytes */ + 3: + message.sizeBytes = reader.int64().toString(); + break; + case /* string version */ + 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + if (message.sizeBytes !== "0") + writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); + if (message.version !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TestTransport = void 0; - var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs7(); - var rpc_output_stream_1 = require_rpc_output_stream(); - var rpc_options_1 = require_rpc_options(); - var unary_call_1 = require_unary_call(); - var server_streaming_call_1 = require_server_streaming_call(); - var client_streaming_call_1 = require_client_streaming_call(); - var duplex_streaming_call_1 = require_duplex_streaming_call(); - var TestTransport = class _TestTransport { + exports2.FinalizeCacheEntryUploadRequest = new FinalizeCacheEntryUploadRequest$Type(); + var FinalizeCacheEntryUploadResponse$Type = class extends runtime_5.MessageType { static { - __name(this, "TestTransport"); + __name(this, "FinalizeCacheEntryUploadResponse$Type"); } - /** - * Initialize with mock data. Omitted fields have default value. - */ - constructor(data) { - this.suppressUncaughtRejections = true; - this.headerDelay = 10; - this.responseDelay = 50; - this.betweenResponseDelay = 10; - this.afterResponseDelay = 10; - this.data = data !== null && data !== void 0 ? data : {}; + constructor() { + super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + }, + { + no: 2, + name: "entry_id", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + } + ]); } - /** - * Sent message(s) during the last operation. - */ - get sentMessages() { - if (this.lastInput instanceof TestInputStream) { - return this.lastInput.sent; - } else if (typeof this.lastInput == "object") { - return [this.lastInput.single]; - } - return []; + create(value) { + const message = { ok: false, entryId: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - /** - * Sending message(s) completed? - */ - get sendComplete() { - if (this.lastInput instanceof TestInputStream) { - return this.lastInput.completed; - } else if (typeof this.lastInput == "object") { - return true; + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool ok */ + 1: + message.ok = reader.bool(); + break; + case /* int64 entry_id */ + 2: + message.entryId = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - return false; + return message; } - // 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; - return headers instanceof rpc_error_1.RpcError ? Promise.reject(headers) : Promise.resolve(headers); + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.entryId !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - // Creates a promise for a single, valid, message from the mock data. - promiseSingleResponse(method) { - if (this.data.response instanceof rpc_error_1.RpcError) { - return Promise.reject(this.data.response); - } - let r; - if (Array.isArray(this.data.response)) { - runtime_1.assert(this.data.response.length > 0); - r = this.data.response[0]; - } else if (this.data.response !== void 0) { - r = this.data.response; - } else { - r = method.O.create(); - } - runtime_1.assert(method.O.is(r)); - return Promise.resolve(r); + }; + exports2.FinalizeCacheEntryUploadResponse = new FinalizeCacheEntryUploadResponse$Type(); + var GetCacheEntryDownloadURLRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetCacheEntryDownloadURLRequest$Type"); } - /** - * Pushes response messages from the mock data to the output stream. - * If an error response, status or trailers are mocked, the stream is - * closed with the respective error. - * Otherwise, stream is completed successfully. - * - * The returned promise resolves when the stream is closed. It should - * not reject. If it does, code is broken. - */ - streamResponses(method, stream, abort) { - return __awaiter3(this, void 0, void 0, function* () { - const messages = []; - if (this.data.response === void 0) { - messages.push(method.O.create()); - } else if (Array.isArray(this.data.response)) { - for (let msg of this.data.response) { - runtime_1.assert(method.O.is(msg)); - messages.push(msg); - } - } else if (!(this.data.response instanceof rpc_error_1.RpcError)) { - runtime_1.assert(method.O.is(this.data.response)); - messages.push(this.data.response); - } - try { - yield delay(this.responseDelay, abort)(void 0); - } catch (error) { - stream.notifyError(error); - return; - } - if (this.data.response instanceof rpc_error_1.RpcError) { - stream.notifyError(this.data.response); - return; - } - for (let msg of messages) { - stream.notifyMessage(msg); - try { - yield delay(this.betweenResponseDelay, abort)(void 0); - } catch (error) { - stream.notifyError(error); - return; - } - } - if (this.data.status instanceof rpc_error_1.RpcError) { - stream.notifyError(this.data.status); - return; - } - if (this.data.trailers instanceof rpc_error_1.RpcError) { - stream.notifyError(this.data.trailers); - return; + constructor() { + super("github.actions.results.api.v1.GetCacheEntryDownloadURLRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, + { + no: 2, + name: "key", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "restore_keys", + kind: "scalar", + repeat: 2, + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 4, + name: "version", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ } - stream.notifyComplete(); - }); - } - // 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; - 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; - return trailers instanceof rpc_error_1.RpcError ? Promise.reject(trailers) : Promise.resolve(trailers); + create(value) { + const message = { key: "", restoreKeys: [], version: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - maybeSuppressUncaught(...promise) { - if (this.suppressUncaughtRejections) { - for (let p of promise) { - p.catch(() => { - }); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* github.actions.results.entities.v1.CacheMetadata metadata */ + 1: + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* string key */ + 2: + message.key = reader.string(); + break; + case /* repeated string restore_keys */ + 3: + message.restoreKeys.push(reader.string()); + break; + case /* string version */ + 4: + message.version = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } + return message; } - mergeOptions(options) { - 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(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { - }).then(delay(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { - }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { - }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = { single: input }; - return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise); + internalBinaryWrite(message, writer, options) { + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + for (let i = 0; i < message.restoreKeys.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); + if (message.version !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - serverStreaming(method, input, options) { - var _a; - const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders().then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => { - }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(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(delay(this.headerDelay, options.abort)), responsePromise = headersPromise.catch((_2) => { - }).then(delay(this.responseDelay, options.abort)).then((_2) => this.promiseSingleResponse(method)), statusPromise = responsePromise.catch((_2) => { - }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseStatus()), trailersPromise = responsePromise.catch((_2) => { - }).then(delay(this.afterResponseDelay, options.abort)).then((_2) => this.promiseTrailers()); - this.maybeSuppressUncaught(statusPromise, trailersPromise); - this.lastInput = new TestInputStream(this.data, options.abort); - 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(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise.then(delay(this.responseDelay, options.abort)).catch(() => { - }).then(() => this.streamResponses(method, outputStream, options.abort)).then(delay(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); - return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise); - } - }; - exports2.TestTransport = TestTransport; - TestTransport.defaultHeaders = { - responseHeader: "test" - }; - TestTransport.defaultStatus = { - code: "OK", - detail: "all good" - }; - TestTransport.defaultTrailers = { - responseTrailer: "test" - }; - function delay(ms, abort) { - return (v) => new Promise((resolve, reject) => { - if (abort === null || abort === void 0 ? void 0 : abort.aborted) { - reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); - } else { - const id = setTimeout(() => resolve(v), ms); - if (abort) { - abort.addEventListener("abort", (ev) => { - clearTimeout(id); - reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); - }); - } - } - }); - } - __name(delay, "delay"); - var TestInputStream = class { - static { - __name(this, "TestInputStream"); - } - constructor(data, abort) { - this._completed = false; - this._sent = []; - this.data = data; - this.abort = abort; - } - get sent() { - return this._sent; - } - get completed() { - return this._completed; - } - send(message) { - if (this.data.inputMessage instanceof rpc_error_1.RpcError) { - return Promise.reject(this.data.inputMessage); - } - const delayMs = this.data.inputMessage === void 0 ? 10 : this.data.inputMessage; - return Promise.resolve(void 0).then(() => { - this._sent.push(message); - }).then(delay(delayMs, this.abort)); - } - complete() { - if (this.data.inputComplete instanceof rpc_error_1.RpcError) { - return Promise.reject(this.data.inputComplete); - } - const delayMs = this.data.inputComplete === void 0 ? 10 : this.data.inputComplete; - return Promise.resolve(void 0).then(() => { - this._completed = true; - }).then(delay(delayMs, this.abort)); - } - }; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js -var require_rpc_interceptor = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs7(); - function stackIntercept(kind, transport, method, options, input) { - var _a, _b, _c, _d; - if (kind == "unary") { - let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.unary(mtd, inp, opt), "tail"); - for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) { - const next = tail; - tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt), "tail"); - } - return tail(method, input, options); - } - if (kind == "serverStreaming") { - let tail = /* @__PURE__ */ __name((mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt), "tail"); - for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) { - const next = tail; - tail = /* @__PURE__ */ __name((mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt), "tail"); - } - return tail(method, input, options); - } - if (kind == "clientStreaming") { - let tail = /* @__PURE__ */ __name((mtd, opt) => transport.clientStreaming(mtd, opt), "tail"); - for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) { - const next = tail; - tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptClientStreaming(next, mtd, opt), "tail"); - } - return tail(method, options); - } - if (kind == "duplex") { - let tail = /* @__PURE__ */ __name((mtd, opt) => transport.duplex(mtd, opt), "tail"); - for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) { - const next = tail; - tail = /* @__PURE__ */ __name((mtd, opt) => curr.interceptDuplex(next, mtd, opt), "tail"); - } - return tail(method, options); - } - runtime_1.assertNever(kind); - } - __name(stackIntercept, "stackIntercept"); - exports2.stackIntercept = stackIntercept; - function stackUnaryInterceptors(transport, method, input, options) { - return stackIntercept("unary", transport, method, options, input); - } - __name(stackUnaryInterceptors, "stackUnaryInterceptors"); - exports2.stackUnaryInterceptors = stackUnaryInterceptors; - function stackServerStreamingInterceptors(transport, method, input, options) { - return stackIntercept("serverStreaming", transport, method, options, input); - } - __name(stackServerStreamingInterceptors, "stackServerStreamingInterceptors"); - exports2.stackServerStreamingInterceptors = stackServerStreamingInterceptors; - function stackClientStreamingInterceptors(transport, method, options) { - return stackIntercept("clientStreaming", transport, method, options); - } - __name(stackClientStreamingInterceptors, "stackClientStreamingInterceptors"); - exports2.stackClientStreamingInterceptors = stackClientStreamingInterceptors; - function stackDuplexStreamingInterceptors(transport, method, options) { - return stackIntercept("duplex", transport, method, options); - } - __name(stackDuplexStreamingInterceptors, "stackDuplexStreamingInterceptors"); - exports2.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js -var require_server_call_context = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ServerCallContextController = void 0; - var ServerCallContextController = class { - static { - __name(this, "ServerCallContextController"); - } - constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: "OK", detail: "" }) { - this._cancelled = false; - this._listeners = []; - this.method = method; - this.headers = headers; - this.deadline = deadline; - this.trailers = {}; - this._sendRH = sendResponseHeadersFn; - this.status = defaultStatus; - } - /** - * Set the call cancelled. - * - * Invokes all callbacks registered with onCancel() and - * sets `cancelled = true`. - */ - notifyCancelled() { - if (!this._cancelled) { - this._cancelled = true; - for (let l of this._listeners) { - l(); - } - } - } - /** - * Send response headers. - */ - sendResponseHeaders(data) { - this._sendRH(data); - } - /** - * Is the call cancelled? - * - * When the client closes the connection before the server - * is done, the call is cancelled. - * - * If you want to cancel a request on the server, throw a - * RpcError with the CANCELLED status code. - */ - get cancelled() { - return this._cancelled; - } - /** - * Add a callback for cancellation. - */ - onCancel(callback) { - const l = this._listeners; - l.push(callback); - return () => { - let i = l.indexOf(callback); - if (i >= 0) - l.splice(i, 1); - }; - } - }; - exports2.ServerCallContextController = ServerCallContextController; - } -}); - -// ../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs8 = __commonJS({ - "../node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var service_type_1 = require_service_type(); - Object.defineProperty(exports2, "ServiceType", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return service_type_1.ServiceType; - }, "get") }); - var reflection_info_1 = require_reflection_info2(); - Object.defineProperty(exports2, "readMethodOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return reflection_info_1.readMethodOptions; - }, "get") }); - Object.defineProperty(exports2, "readMethodOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return reflection_info_1.readMethodOption; - }, "get") }); - Object.defineProperty(exports2, "readServiceOption", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return reflection_info_1.readServiceOption; - }, "get") }); - var rpc_error_1 = require_rpc_error(); - Object.defineProperty(exports2, "RpcError", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_error_1.RpcError; - }, "get") }); - var rpc_options_1 = require_rpc_options(); - Object.defineProperty(exports2, "mergeRpcOptions", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_options_1.mergeRpcOptions; - }, "get") }); - var rpc_output_stream_1 = require_rpc_output_stream(); - Object.defineProperty(exports2, "RpcOutputStreamController", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_output_stream_1.RpcOutputStreamController; - }, "get") }); - var test_transport_1 = require_test_transport(); - Object.defineProperty(exports2, "TestTransport", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return test_transport_1.TestTransport; - }, "get") }); - var deferred_1 = require_deferred(); - Object.defineProperty(exports2, "Deferred", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return deferred_1.Deferred; - }, "get") }); - Object.defineProperty(exports2, "DeferredState", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return deferred_1.DeferredState; - }, "get") }); - var duplex_streaming_call_1 = require_duplex_streaming_call(); - Object.defineProperty(exports2, "DuplexStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return duplex_streaming_call_1.DuplexStreamingCall; - }, "get") }); - var client_streaming_call_1 = require_client_streaming_call(); - Object.defineProperty(exports2, "ClientStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return client_streaming_call_1.ClientStreamingCall; - }, "get") }); - var server_streaming_call_1 = require_server_streaming_call(); - Object.defineProperty(exports2, "ServerStreamingCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return server_streaming_call_1.ServerStreamingCall; - }, "get") }); - var unary_call_1 = require_unary_call(); - Object.defineProperty(exports2, "UnaryCall", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return unary_call_1.UnaryCall; - }, "get") }); - var rpc_interceptor_1 = require_rpc_interceptor(); - Object.defineProperty(exports2, "stackIntercept", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_interceptor_1.stackIntercept; - }, "get") }); - Object.defineProperty(exports2, "stackDuplexStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_interceptor_1.stackDuplexStreamingInterceptors; - }, "get") }); - Object.defineProperty(exports2, "stackClientStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_interceptor_1.stackClientStreamingInterceptors; - }, "get") }); - Object.defineProperty(exports2, "stackServerStreamingInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_interceptor_1.stackServerStreamingInterceptors; - }, "get") }); - Object.defineProperty(exports2, "stackUnaryInterceptors", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return rpc_interceptor_1.stackUnaryInterceptors; - }, "get") }); - var server_call_context_1 = require_server_call_context(); - Object.defineProperty(exports2, "ServerCallContextController", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return server_call_context_1.ServerCallContextController; - }, "get") }); - } -}); - -// ../node_modules/@actions/artifact/lib/generated/results/api/v1/artifact.js -var require_artifact = __commonJS({ - "../node_modules/@actions/artifact/lib/generated/results/api/v1/artifact.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ArtifactService = exports2.DeleteArtifactResponse = exports2.DeleteArtifactRequest = exports2.GetSignedArtifactURLResponse = exports2.GetSignedArtifactURLRequest = exports2.ListArtifactsResponse_MonolithArtifact = exports2.ListArtifactsResponse = exports2.ListArtifactsRequest = exports2.FinalizeArtifactResponse = exports2.FinalizeArtifactRequest = exports2.CreateArtifactResponse = exports2.CreateArtifactRequest = void 0; - var runtime_rpc_1 = require_commonjs8(); - var runtime_1 = require_commonjs7(); - var runtime_2 = require_commonjs7(); - var runtime_3 = require_commonjs7(); - var runtime_4 = require_commonjs7(); - var runtime_5 = require_commonjs7(); - var wrappers_1 = require_wrappers(); - var wrappers_2 = require_wrappers(); - var timestamp_1 = require_timestamp(); - var CreateArtifactRequest$Type = class extends runtime_5.MessageType { - static { - __name(this, "CreateArtifactRequest$Type"); + }; + exports2.GetCacheEntryDownloadURLRequest = new GetCacheEntryDownloadURLRequest$Type(); + var GetCacheEntryDownloadURLResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetCacheEntryDownloadURLResponse$Type"); } constructor() { - super("github.actions.results.api.v1.CreateArtifactRequest", [ + super("github.actions.results.api.v1.GetCacheEntryDownloadURLResponse", [ { no: 1, - name: "workflow_run_backend_id", + name: "ok", kind: "scalar", - T: 9 - /*ScalarType.STRING*/ + T: 8 + /*ScalarType.BOOL*/ }, { no: 2, - name: "workflow_job_run_backend_id", + name: "signed_download_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 3, - name: "name", + name: "matched_key", kind: "scalar", T: 9 /*ScalarType.STRING*/ - }, - { no: 4, name: "expires_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") }, - { - no: 5, - name: "version", - kind: "scalar", - T: 5 - /*ScalarType.INT32*/ } ]); } create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", version: 0 }; + const message = { ok: false, signedDownloadUrl: "", matchedKey: "" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98359,25 +97663,17 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* string workflow_run_backend_id */ + case /* bool ok */ 1: - message.workflowRunBackendId = reader.string(); + message.ok = reader.bool(); break; - case /* string workflow_job_run_backend_id */ + case /* string signed_download_url */ 2: - message.workflowJobRunBackendId = reader.string(); + message.signedDownloadUrl = reader.string(); break; - case /* string name */ + case /* string matched_key */ 3: - message.name = reader.string(); - break; - case /* google.protobuf.Timestamp expires_at */ - 4: - message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt); - break; - case /* int32 version */ - 5: - message.version = reader.int32(); + message.matchedKey = reader.string(); break; default: let u = options.readUnknownField; @@ -98391,39 +97687,29 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.name !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); - if (message.expiresAt) - timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); - if (message.version !== 0) - writer.tag(5, runtime_1.WireType.Varint).int32(message.version); + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedDownloadUrl !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedDownloadUrl); + if (message.matchedKey !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.matchedKey); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.CreateArtifactRequest = new CreateArtifactRequest$Type(); - var CreateArtifactResponse$Type = class extends runtime_5.MessageType { + exports2.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); + var DeleteCacheEntryRequest$Type = class extends runtime_5.MessageType { static { - __name(this, "CreateArtifactResponse$Type"); + __name(this, "DeleteCacheEntryRequest$Type"); } constructor() { - super("github.actions.results.api.v1.CreateArtifactResponse", [ - { - no: 1, - name: "ok", - kind: "scalar", - T: 8 - /*ScalarType.BOOL*/ - }, + super("github.actions.results.api.v1.DeleteCacheEntryRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, { no: 2, - name: "signed_upload_url", + name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ @@ -98431,7 +97717,7 @@ var require_artifact = __commonJS({ ]); } create(value) { - const message = { ok: false, signedUploadUrl: "" }; + const message = { key: "" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98442,13 +97728,13 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* bool ok */ + case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.ok = reader.bool(); + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); break; - case /* string signed_upload_url */ + case /* string key */ 2: - message.signedUploadUrl = reader.string(); + message.key = reader.string(); break; default: let u = options.readUnknownField; @@ -98462,56 +97748,41 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.ok !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.signedUploadUrl !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.CreateArtifactResponse = new CreateArtifactResponse$Type(); - var FinalizeArtifactRequest$Type = class extends runtime_5.MessageType { + exports2.DeleteCacheEntryRequest = new DeleteCacheEntryRequest$Type(); + var DeleteCacheEntryResponse$Type = class extends runtime_5.MessageType { static { - __name(this, "FinalizeArtifactRequest$Type"); + __name(this, "DeleteCacheEntryResponse$Type"); } constructor() { - super("github.actions.results.api.v1.FinalizeArtifactRequest", [ + super("github.actions.results.api.v1.DeleteCacheEntryResponse", [ { no: 1, - name: "workflow_run_backend_id", + name: "ok", kind: "scalar", - T: 9 - /*ScalarType.STRING*/ + T: 8 + /*ScalarType.BOOL*/ }, { no: 2, - name: "workflow_job_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { - no: 3, - name: "name", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { - no: 4, - name: "size", + name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ - }, - { no: 5, name: "hash", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") } + } ]); } create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0" }; + const message = { ok: false, entryId: "0" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98522,25 +97793,13 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* string workflow_run_backend_id */ + case /* bool ok */ 1: - message.workflowRunBackendId = reader.string(); + message.ok = reader.bool(); break; - case /* string workflow_job_run_backend_id */ + case /* int64 entry_id */ 2: - message.workflowJobRunBackendId = reader.string(); - break; - case /* string name */ - 3: - message.name = reader.string(); - break; - case /* int64 size */ - 4: - message.size = reader.int64().toString(); - break; - case /* google.protobuf.StringValue hash */ - 5: - message.hash = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.hash); + message.entryId = reader.int64().toString(); break; default: let u = options.readUnknownField; @@ -98554,47 +97813,43 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.name !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); - if (message.size !== "0") - writer.tag(4, runtime_1.WireType.Varint).int64(message.size); - if (message.hash) - wrappers_2.StringValue.internalBinaryWrite(message.hash, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.entryId !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.FinalizeArtifactRequest = new FinalizeArtifactRequest$Type(); - var FinalizeArtifactResponse$Type = class extends runtime_5.MessageType { + exports2.DeleteCacheEntryResponse = new DeleteCacheEntryResponse$Type(); + var ListCacheEntriesRequest$Type = class extends runtime_5.MessageType { static { - __name(this, "FinalizeArtifactResponse$Type"); + __name(this, "ListCacheEntriesRequest$Type"); } constructor() { - super("github.actions.results.api.v1.FinalizeArtifactResponse", [ + super("github.actions.results.api.v1.ListCacheEntriesRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, { - no: 1, - name: "ok", + no: 2, + name: "key", kind: "scalar", - T: 8 - /*ScalarType.BOOL*/ + T: 9 + /*ScalarType.STRING*/ }, { - no: 2, - name: "artifact_id", + no: 3, + name: "restore_keys", kind: "scalar", - T: 3 - /*ScalarType.INT64*/ + repeat: 2, + T: 9 + /*ScalarType.STRING*/ } ]); } create(value) { - const message = { ok: false, artifactId: "0" }; + const message = { key: "", restoreKeys: [] }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98605,13 +97860,17 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* bool ok */ + case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.ok = reader.bool(); + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); break; - case /* int64 artifact_id */ + case /* string key */ 2: - message.artifactId = reader.int64().toString(); + message.key = reader.string(); + break; + case /* repeated string restore_keys */ + 3: + message.restoreKeys.push(reader.string()); break; default: let u = options.readUnknownField; @@ -98625,43 +97884,30 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.ok !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.artifactId !== "0") - writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId); + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + for (let i = 0; i < message.restoreKeys.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.FinalizeArtifactResponse = new FinalizeArtifactResponse$Type(); - var ListArtifactsRequest$Type = class extends runtime_5.MessageType { + exports2.ListCacheEntriesRequest = new ListCacheEntriesRequest$Type(); + var ListCacheEntriesResponse$Type = class extends runtime_5.MessageType { static { - __name(this, "ListArtifactsRequest$Type"); + __name(this, "ListCacheEntriesResponse$Type"); } constructor() { - super("github.actions.results.api.v1.ListArtifactsRequest", [ - { - no: 1, - name: "workflow_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { - no: 2, - name: "workflow_job_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { no: 3, name: "name_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") }, - { no: 4, name: "id_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_1.Int64Value, "T") } + super("github.actions.results.api.v1.ListCacheEntriesResponse", [ + { no: 1, name: "entries", kind: "message", repeat: 1, T: /* @__PURE__ */ __name(() => cacheentry_1.CacheEntry, "T") } ]); } create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "" }; + const message = { entries: [] }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98672,21 +97918,9 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* string workflow_run_backend_id */ + case /* repeated github.actions.results.entities.v1.CacheEntry entries */ 1: - message.workflowRunBackendId = reader.string(); - break; - case /* string workflow_job_run_backend_id */ - 2: - message.workflowJobRunBackendId = reader.string(); - break; - case /* google.protobuf.StringValue name_filter */ - 3: - message.nameFilter = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.nameFilter); - break; - case /* google.protobuf.Int64Value id_filter */ - 4: - message.idFilter = wrappers_1.Int64Value.internalBinaryRead(reader, reader.uint32(), options, message.idFilter); + message.entries.push(cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -98700,113 +97934,48 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.nameFilter) - wrappers_2.StringValue.internalBinaryWrite(message.nameFilter, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); - if (message.idFilter) - wrappers_1.Int64Value.internalBinaryWrite(message.idFilter, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } - }; - exports2.ListArtifactsRequest = new ListArtifactsRequest$Type(); - var ListArtifactsResponse$Type = class extends runtime_5.MessageType { - static { - __name(this, "ListArtifactsResponse$Type"); - } - constructor() { - super("github.actions.results.api.v1.ListArtifactsResponse", [ - { no: 1, name: "artifacts", kind: "message", repeat: 1, T: /* @__PURE__ */ __name(() => exports2.ListArtifactsResponse_MonolithArtifact, "T") } - ]); - } - create(value) { - const message = { artifacts: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact artifacts */ - 1: - message.artifacts.push(exports2.ListArtifactsResponse_MonolithArtifact.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - for (let i = 0; i < message.artifacts.length; i++) - exports2.ListArtifactsResponse_MonolithArtifact.internalBinaryWrite(message.artifacts[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + for (let i = 0; i < message.entries.length; i++) + cacheentry_1.CacheEntry.internalBinaryWrite(message.entries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.ListArtifactsResponse = new ListArtifactsResponse$Type(); - var ListArtifactsResponse_MonolithArtifact$Type = class extends runtime_5.MessageType { + exports2.ListCacheEntriesResponse = new ListCacheEntriesResponse$Type(); + var LookupCacheEntryRequest$Type = class extends runtime_5.MessageType { static { - __name(this, "ListArtifactsResponse_MonolithArtifact$Type"); + __name(this, "LookupCacheEntryRequest$Type"); } constructor() { - super("github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact", [ - { - no: 1, - name: "workflow_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, + super("github.actions.results.api.v1.LookupCacheEntryRequest", [ + { no: 1, name: "metadata", kind: "message", T: /* @__PURE__ */ __name(() => cachemetadata_1.CacheMetadata, "T") }, { no: 2, - name: "workflow_job_run_backend_id", + name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 3, - name: "database_id", + name: "restore_keys", kind: "scalar", - T: 3 - /*ScalarType.INT64*/ + repeat: 2, + T: 9 + /*ScalarType.STRING*/ }, { no: 4, - name: "name", + name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ - }, - { - no: 5, - name: "size", - kind: "scalar", - T: 3 - /*ScalarType.INT64*/ - }, - { no: 6, name: "created_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") } + } ]); } create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", databaseId: "0", name: "", size: "0" }; + const message = { key: "", restoreKeys: [], version: "" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98817,29 +97986,21 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* string workflow_run_backend_id */ + case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.workflowRunBackendId = reader.string(); + message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); break; - case /* string workflow_job_run_backend_id */ + case /* string key */ 2: - message.workflowJobRunBackendId = reader.string(); + message.key = reader.string(); break; - case /* int64 database_id */ + case /* repeated string restore_keys */ 3: - message.databaseId = reader.int64().toString(); + message.restoreKeys.push(reader.string()); break; - case /* string name */ + case /* string version */ 4: - message.name = reader.string(); - break; - case /* int64 size */ - 5: - message.size = reader.int64().toString(); - break; - case /* google.protobuf.Timestamp created_at */ - 6: - message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); + message.version = reader.string(); break; default: let u = options.readUnknownField; @@ -98853,56 +98014,39 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.databaseId !== "0") - writer.tag(3, runtime_1.WireType.Varint).int64(message.databaseId); - if (message.name !== "") - writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.name); - if (message.size !== "0") - writer.tag(5, runtime_1.WireType.Varint).int64(message.size); - if (message.createdAt) - timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.metadata) + cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.key !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); + for (let i = 0; i < message.restoreKeys.length; i++) + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); + if (message.version !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.ListArtifactsResponse_MonolithArtifact = new ListArtifactsResponse_MonolithArtifact$Type(); - var GetSignedArtifactURLRequest$Type = class extends runtime_5.MessageType { + exports2.LookupCacheEntryRequest = new LookupCacheEntryRequest$Type(); + var LookupCacheEntryResponse$Type = class extends runtime_5.MessageType { static { - __name(this, "GetSignedArtifactURLRequest$Type"); + __name(this, "LookupCacheEntryResponse$Type"); } constructor() { - super("github.actions.results.api.v1.GetSignedArtifactURLRequest", [ + super("github.actions.results.api.v1.LookupCacheEntryResponse", [ { no: 1, - name: "workflow_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { - no: 2, - name: "workflow_job_run_backend_id", + name: "exists", kind: "scalar", - T: 9 - /*ScalarType.STRING*/ + T: 8 + /*ScalarType.BOOL*/ }, - { - no: 3, - name: "name", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - } + { no: 2, name: "entry", kind: "message", T: /* @__PURE__ */ __name(() => cacheentry_1.CacheEntry, "T") } ]); } create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" }; + const message = { exists: false }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -98913,17 +98057,13 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* string workflow_run_backend_id */ + case /* bool exists */ 1: - message.workflowRunBackendId = reader.string(); + message.exists = reader.bool(); break; - case /* string workflow_job_run_backend_id */ + case /* github.actions.results.entities.v1.CacheEntry entry */ 2: - message.workflowJobRunBackendId = reader.string(); - break; - case /* string name */ - 3: - message.name = reader.string(); + message.entry = cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options, message.entry); break; default: let u = options.readUnknownField; @@ -98937,173 +98077,3784 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.name !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); + if (message.exists !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.exists); + if (message.entry) + cacheentry_1.CacheEntry.internalBinaryWrite(message.entry, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.GetSignedArtifactURLRequest = new GetSignedArtifactURLRequest$Type(); - var GetSignedArtifactURLResponse$Type = class extends runtime_5.MessageType { - static { - __name(this, "GetSignedArtifactURLResponse$Type"); - } - constructor() { - super("github.actions.results.api.v1.GetSignedArtifactURLResponse", [ - { - no: 1, - name: "signed_url", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - } - ]); + exports2.LookupCacheEntryResponse = new LookupCacheEntryResponse$Type(); + exports2.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ + { name: "CreateCacheEntry", options: {}, I: exports2.CreateCacheEntryRequest, O: exports2.CreateCacheEntryResponse }, + { name: "FinalizeCacheEntryUpload", options: {}, I: exports2.FinalizeCacheEntryUploadRequest, O: exports2.FinalizeCacheEntryUploadResponse }, + { name: "GetCacheEntryDownloadURL", options: {}, I: exports2.GetCacheEntryDownloadURLRequest, O: exports2.GetCacheEntryDownloadURLResponse }, + { name: "DeleteCacheEntry", options: {}, I: exports2.DeleteCacheEntryRequest, O: exports2.DeleteCacheEntryResponse }, + { name: "ListCacheEntries", options: {}, I: exports2.ListCacheEntriesRequest, O: exports2.ListCacheEntriesResponse }, + { name: "LookupCacheEntry", options: {}, I: exports2.LookupCacheEntryRequest, O: exports2.LookupCacheEntryResponse } + ]); + } +}); + +// ../node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp.js +var require_cache_twirp = __commonJS({ + "../node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createCacheServiceServer = exports2.CacheServiceMethodList = exports2.CacheServiceMethod = exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; + var twirp_ts_1 = require_twirp(); + var cache_1 = require_cache2(); + var CacheServiceClientJSON = class { + static { + __name(this, "CacheServiceClientJSON"); + } + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); + this.DeleteCacheEntry.bind(this); + this.ListCacheEntries.bind(this); + this.LookupCacheEntry.bind(this); + } + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data); + return promise.then((data2) => cache_1.CreateCacheEntryResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data); + return promise.then((data2) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data); + return promise.then((data2) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + DeleteCacheEntry(request) { + const data = cache_1.DeleteCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/json", data); + return promise.then((data2) => cache_1.DeleteCacheEntryResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + ListCacheEntries(request) { + const data = cache_1.ListCacheEntriesRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/json", data); + return promise.then((data2) => cache_1.ListCacheEntriesResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + LookupCacheEntry(request) { + const data = cache_1.LookupCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/json", data); + return promise.then((data2) => cache_1.LookupCacheEntryResponse.fromJson(data2, { + ignoreUnknownFields: true + })); + } + }; + exports2.CacheServiceClientJSON = CacheServiceClientJSON; + var CacheServiceClientProtobuf = class { + static { + __name(this, "CacheServiceClientProtobuf"); + } + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); + this.DeleteCacheEntry.bind(this); + this.ListCacheEntries.bind(this); + this.LookupCacheEntry.bind(this); + } + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); + return promise.then((data2) => cache_1.CreateCacheEntryResponse.fromBinary(data2)); + } + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); + return promise.then((data2) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data2)); + } + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); + return promise.then((data2) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data2)); + } + DeleteCacheEntry(request) { + const data = cache_1.DeleteCacheEntryRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/protobuf", data); + return promise.then((data2) => cache_1.DeleteCacheEntryResponse.fromBinary(data2)); + } + ListCacheEntries(request) { + const data = cache_1.ListCacheEntriesRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/protobuf", data); + return promise.then((data2) => cache_1.ListCacheEntriesResponse.fromBinary(data2)); + } + LookupCacheEntry(request) { + const data = cache_1.LookupCacheEntryRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/protobuf", data); + return promise.then((data2) => cache_1.LookupCacheEntryResponse.fromBinary(data2)); + } + }; + exports2.CacheServiceClientProtobuf = CacheServiceClientProtobuf; + var CacheServiceMethod; + (function(CacheServiceMethod2) { + CacheServiceMethod2["CreateCacheEntry"] = "CreateCacheEntry"; + CacheServiceMethod2["FinalizeCacheEntryUpload"] = "FinalizeCacheEntryUpload"; + CacheServiceMethod2["GetCacheEntryDownloadURL"] = "GetCacheEntryDownloadURL"; + CacheServiceMethod2["DeleteCacheEntry"] = "DeleteCacheEntry"; + CacheServiceMethod2["ListCacheEntries"] = "ListCacheEntries"; + CacheServiceMethod2["LookupCacheEntry"] = "LookupCacheEntry"; + })(CacheServiceMethod || (exports2.CacheServiceMethod = CacheServiceMethod = {})); + exports2.CacheServiceMethodList = [ + CacheServiceMethod.CreateCacheEntry, + CacheServiceMethod.FinalizeCacheEntryUpload, + CacheServiceMethod.GetCacheEntryDownloadURL, + CacheServiceMethod.DeleteCacheEntry, + CacheServiceMethod.ListCacheEntries, + CacheServiceMethod.LookupCacheEntry + ]; + function createCacheServiceServer(service) { + return new twirp_ts_1.TwirpServer({ + service, + packageName: "github.actions.results.api.v1", + serviceName: "CacheService", + methodList: exports2.CacheServiceMethodList, + matchRoute: matchCacheServiceRoute + }); + } + __name(createCacheServiceServer, "createCacheServiceServer"); + exports2.createCacheServiceServer = createCacheServiceServer; + function matchCacheServiceRoute(method, events) { + switch (method) { + case "CreateCacheEntry": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "CreateCacheEntry" }); + yield events.onMatch(ctx); + return handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors); + }); + case "FinalizeCacheEntryUpload": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "FinalizeCacheEntryUpload" }); + yield events.onMatch(ctx); + return handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors); + }); + case "GetCacheEntryDownloadURL": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "GetCacheEntryDownloadURL" }); + yield events.onMatch(ctx); + return handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors); + }); + case "DeleteCacheEntry": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "DeleteCacheEntry" }); + yield events.onMatch(ctx); + return handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors); + }); + case "ListCacheEntries": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "ListCacheEntries" }); + yield events.onMatch(ctx); + return handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors); + }); + case "LookupCacheEntry": + return (ctx, service, data, interceptors) => __awaiter3(this, void 0, void 0, function* () { + ctx = Object.assign(Object.assign({}, ctx), { methodName: "LookupCacheEntry" }); + yield events.onMatch(ctx); + return handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors); + }); + default: + events.onNotFound(); + const msg = `no handler found`; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(matchCacheServiceRoute, "matchCacheServiceRoute"); + function handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceCreateCacheEntryRequest, "handleCacheServiceCreateCacheEntryRequest"); + function handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceFinalizeCacheEntryUploadRequest, "handleCacheServiceFinalizeCacheEntryUploadRequest"); + function handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceGetCacheEntryDownloadURLRequest, "handleCacheServiceGetCacheEntryDownloadURLRequest"); + function handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceDeleteCacheEntryRequest, "handleCacheServiceDeleteCacheEntryRequest"); + function handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceListCacheEntriesRequest, "handleCacheServiceListCacheEntriesRequest"); + function handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors) { + switch (ctx.contentType) { + case twirp_ts_1.TwirpContentType.JSON: + return handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors); + case twirp_ts_1.TwirpContentType.Protobuf: + return handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors); + default: + const msg = "unexpected Content-Type"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); + } + } + __name(handleCacheServiceLookupCacheEntryRequest, "handleCacheServiceLookupCacheEntryRequest"); + function handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.CreateCacheEntryRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.CreateCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.CreateCacheEntry(ctx, request); + } + return JSON.stringify(cache_1.CreateCacheEntryResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceCreateCacheEntryJSON, "handleCacheServiceCreateCacheEntryJSON"); + function handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.FinalizeCacheEntryUploadRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.FinalizeCacheEntryUpload(ctx2, inputReq); + }); + } else { + response = yield service.FinalizeCacheEntryUpload(ctx, request); + } + return JSON.stringify(cache_1.FinalizeCacheEntryUploadResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceFinalizeCacheEntryUploadJSON, "handleCacheServiceFinalizeCacheEntryUploadJSON"); + function handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.GetCacheEntryDownloadURLRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.GetCacheEntryDownloadURL(ctx2, inputReq); + }); + } else { + response = yield service.GetCacheEntryDownloadURL(ctx, request); + } + return JSON.stringify(cache_1.GetCacheEntryDownloadURLResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceGetCacheEntryDownloadURLJSON, "handleCacheServiceGetCacheEntryDownloadURLJSON"); + function handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.DeleteCacheEntryRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.DeleteCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.DeleteCacheEntry(ctx, request); + } + return JSON.stringify(cache_1.DeleteCacheEntryResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceDeleteCacheEntryJSON, "handleCacheServiceDeleteCacheEntryJSON"); + function handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.ListCacheEntriesRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.ListCacheEntries(ctx2, inputReq); + }); + } else { + response = yield service.ListCacheEntries(ctx, request); + } + return JSON.stringify(cache_1.ListCacheEntriesResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceListCacheEntriesJSON, "handleCacheServiceListCacheEntriesJSON"); + function handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + const body = JSON.parse(data.toString() || "{}"); + request = cache_1.LookupCacheEntryRequest.fromJson(body, { + ignoreUnknownFields: true + }); + } catch (e) { + if (e instanceof Error) { + const msg = "the json request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.LookupCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.LookupCacheEntry(ctx, request); + } + return JSON.stringify(cache_1.LookupCacheEntryResponse.toJson(response, { + useProtoFieldName: true, + emitDefaultValues: false + })); + }); + } + __name(handleCacheServiceLookupCacheEntryJSON, "handleCacheServiceLookupCacheEntryJSON"); + function handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.CreateCacheEntryRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.CreateCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.CreateCacheEntry(ctx, request); + } + return Buffer.from(cache_1.CreateCacheEntryResponse.toBinary(response)); + }); + } + __name(handleCacheServiceCreateCacheEntryProtobuf, "handleCacheServiceCreateCacheEntryProtobuf"); + function handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.FinalizeCacheEntryUploadRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.FinalizeCacheEntryUpload(ctx2, inputReq); + }); + } else { + response = yield service.FinalizeCacheEntryUpload(ctx, request); + } + return Buffer.from(cache_1.FinalizeCacheEntryUploadResponse.toBinary(response)); + }); + } + __name(handleCacheServiceFinalizeCacheEntryUploadProtobuf, "handleCacheServiceFinalizeCacheEntryUploadProtobuf"); + function handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.GetCacheEntryDownloadURLRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.GetCacheEntryDownloadURL(ctx2, inputReq); + }); + } else { + response = yield service.GetCacheEntryDownloadURL(ctx, request); + } + return Buffer.from(cache_1.GetCacheEntryDownloadURLResponse.toBinary(response)); + }); + } + __name(handleCacheServiceGetCacheEntryDownloadURLProtobuf, "handleCacheServiceGetCacheEntryDownloadURLProtobuf"); + function handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.DeleteCacheEntryRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.DeleteCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.DeleteCacheEntry(ctx, request); + } + return Buffer.from(cache_1.DeleteCacheEntryResponse.toBinary(response)); + }); + } + __name(handleCacheServiceDeleteCacheEntryProtobuf, "handleCacheServiceDeleteCacheEntryProtobuf"); + function handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.ListCacheEntriesRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.ListCacheEntries(ctx2, inputReq); + }); + } else { + response = yield service.ListCacheEntries(ctx, request); + } + return Buffer.from(cache_1.ListCacheEntriesResponse.toBinary(response)); + }); + } + __name(handleCacheServiceListCacheEntriesProtobuf, "handleCacheServiceListCacheEntriesProtobuf"); + function handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors) { + return __awaiter3(this, void 0, void 0, function* () { + let request; + let response; + try { + request = cache_1.LookupCacheEntryRequest.fromBinary(data); + } catch (e) { + if (e instanceof Error) { + const msg = "the protobuf request could not be decoded"; + throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + } + } + if (interceptors && interceptors.length > 0) { + const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); + response = yield interceptor(ctx, request, (ctx2, inputReq) => { + return service.LookupCacheEntry(ctx2, inputReq); + }); + } else { + response = yield service.LookupCacheEntry(ctx, request); + } + return Buffer.from(cache_1.LookupCacheEntryResponse.toBinary(response)); + }); + } + __name(handleCacheServiceLookupCacheEntryProtobuf, "handleCacheServiceLookupCacheEntryProtobuf"); + } +}); + +// ../node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js +var require_cacheTwirpClient = __commonJS({ + "../node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { + "use strict"; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.internalCacheTwirpClient = void 0; + var core_1 = require_core(); + var user_agent_1 = require_user_agent(); + var errors_1 = require_errors2(); + var config_1 = require_config(); + var cacheUtils_1 = require_cacheUtils(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); + var cache_twirp_1 = require_cache_twirp(); + var CacheServiceClient = class { + static { + __name(this, "CacheServiceClient"); + } + constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { + this.maxAttempts = 5; + this.baseRetryIntervalMilliseconds = 3e3; + this.retryMultiplier = 1.5; + const token = (0, cacheUtils_1.getRuntimeToken)(); + this.baseUrl = (0, config_1.getCacheServiceURL)(); + if (maxAttempts) { + this.maxAttempts = maxAttempts; + } + if (baseRetryIntervalMilliseconds) { + this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; + } + if (retryMultiplier) { + this.retryMultiplier = retryMultiplier; + } + this.httpClient = new http_client_1.HttpClient(userAgent, [ + new auth_1.BearerCredentialHandler(token) + ]); + } + // This function satisfies the Rpc interface. It is compatible with the JSON + // JSON generated client. + request(service, method, contentType, data) { + return __awaiter3(this, void 0, void 0, function* () { + const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url}`); + const headers = { + "Content-Type": contentType + }; + try { + const { body } = yield this.retryableRequest(() => __awaiter3(this, void 0, void 0, function* () { + return this.httpClient.post(url, JSON.stringify(data), headers); + })); + return body; + } catch (error) { + throw new Error(`Failed to ${method}: ${error.message}`); + } + }); + } + retryableRequest(operation) { + return __awaiter3(this, void 0, void 0, function* () { + let attempt = 0; + let errorMessage = ""; + let rawBody = ""; + while (attempt < this.maxAttempts) { + let isRetryable = false; + try { + const response = yield operation(); + const statusCode = response.message.statusCode; + rawBody = yield response.readBody(); + (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); + (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); + const body = JSON.parse(rawBody); + (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`); + if (this.isSuccessStatusCode(statusCode)) { + return { response, body }; + } + isRetryable = this.isRetryableHttpStatusCode(statusCode); + errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; + if (body.msg) { + if (errors_1.UsageError.isUsageErrorMessage(body.msg)) { + throw new errors_1.UsageError(); + } + errorMessage = `${errorMessage}: ${body.msg}`; + } + } catch (error) { + if (error instanceof SyntaxError) { + (0, core_1.debug)(`Raw Body: ${rawBody}`); + } + if (error instanceof errors_1.UsageError) { + throw error; + } + if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) { + throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); + } + isRetryable = true; + errorMessage = error.message; + } + if (!isRetryable) { + throw new Error(`Received non-retryable error: ${errorMessage}`); + } + if (attempt + 1 === this.maxAttempts) { + throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); + } + const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); + (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); + yield this.sleep(retryTimeMilliseconds); + attempt++; + } + throw new Error(`Request failed`); + }); + } + isSuccessStatusCode(statusCode) { + if (!statusCode) + return false; + return statusCode >= 200 && statusCode < 300; + } + isRetryableHttpStatusCode(statusCode) { + if (!statusCode) + return false; + const retryableStatusCodes = [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.GatewayTimeout, + http_client_1.HttpCodes.InternalServerError, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.TooManyRequests + ]; + return retryableStatusCodes.includes(statusCode); + } + sleep(milliseconds) { + return __awaiter3(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); + }); + } + getExponentialRetryTimeMilliseconds(attempt) { + if (attempt < 0) { + throw new Error("attempt should be a positive integer"); + } + if (attempt === 0) { + return this.baseRetryIntervalMilliseconds; + } + const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); + const maxTime = minTime * this.retryMultiplier; + return Math.trunc(Math.random() * (maxTime - minTime) + minTime); + } + }; + function internalCacheTwirpClient(options) { + const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); + return new cache_twirp_1.CacheServiceClientJSON(client); + } + __name(internalCacheTwirpClient, "internalCacheTwirpClient"); + exports2.internalCacheTwirpClient = internalCacheTwirpClient; + } +}); + +// ../node_modules/@actions/cache/lib/internal/tar.js +var require_tar = __commonJS({ + "../node_modules/@actions/cache/lib/internal/tar.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + var exec_1 = require_exec(); + var io2 = __importStar3(require_io()); + var fs_1 = require("fs"); + var path2 = __importStar3(require("path")); + var utils = __importStar3(require_cacheUtils()); + var constants_1 = require_constants7(); + var IS_WINDOWS = process.platform === "win32"; + function getTarPath() { + return __awaiter3(this, void 0, void 0, function* () { + switch (process.platform) { + case "win32": { + const gnuTar = yield utils.getGnuTarPathOnWindows(); + const systemTar = constants_1.SystemTarPathOnWindows; + if (gnuTar) { + return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; + } else if ((0, fs_1.existsSync)(systemTar)) { + return { path: systemTar, type: constants_1.ArchiveToolType.BSD }; + } + break; + } + case "darwin": { + const gnuTar = yield io2.which("gtar", false); + if (gnuTar) { + return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; + } else { + return { + path: yield io2.which("tar", true), + type: constants_1.ArchiveToolType.BSD + }; + } + } + default: + break; + } + return { + path: yield io2.which("tar", true), + type: constants_1.ArchiveToolType.GNU + }; + }); + } + __name(getTarPath, "getTarPath"); + function getTarArgs(tarPath, compressionMethod, type, archivePath = "") { + return __awaiter3(this, void 0, void 0, function* () { + 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 (type) { + case "create": + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + break; + case "extract": + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/")); + break; + case "list": + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P"); + break; + } + if (tarPath.type === constants_1.ArchiveToolType.GNU) { + switch (process.platform) { + case "win32": + args.push("--force-local"); + break; + case "darwin": + args.push("--delay-directory-restore"); + break; + } + } + return args; + }); + } + __name(getTarArgs, "getTarArgs"); + function getCommands(compressionMethod, type, archivePath = "") { + return __awaiter3(this, void 0, void 0, function* () { + let args; + const tarPath = yield getTarPath(); + 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 && type !== "create") { + args = [[...compressionArgs].join(" "), [...tarArgs].join(" ")]; + } else { + args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; + } + if (BSD_TAR_ZSTD) { + return args; + } + return [args.join(" ")]; + }); + } + __name(getCommands, "getCommands"); + function getWorkingDirectory() { + var _a; + return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); + } + __name(getWorkingDirectory, "getWorkingDirectory"); + function getDecompressionProgram(tarPath, compressionMethod, archivePath) { + return __awaiter3(this, void 0, void 0, function* () { + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: + return BSD_TAR_ZSTD ? [ + "zstd -d --long=30 --force -o", + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") + ] : [ + "--use-compress-program", + IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" + ]; + case constants_1.CompressionMethod.ZstdWithoutLong: + return BSD_TAR_ZSTD ? [ + "zstd -d --force -o", + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") + ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; + default: + return ["-z"]; + } + }); + } + __name(getDecompressionProgram, "getDecompressionProgram"); + function getCompressionProgram(tarPath, compressionMethod) { + return __awaiter3(this, void 0, void 0, function* () { + const cacheFileName = utils.getCacheFileName(compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: + return BSD_TAR_ZSTD ? [ + "zstd -T0 --long=30 --force -o", + cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), + constants_1.TarFilename + ] : [ + "--use-compress-program", + IS_WINDOWS ? '"zstd -T0 --long=30"' : "zstdmt --long=30" + ]; + case constants_1.CompressionMethod.ZstdWithoutLong: + return BSD_TAR_ZSTD ? [ + "zstd -T0 --force -o", + cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), + constants_1.TarFilename + ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; + default: + return ["-z"]; + } + }); + } + __name(getCompressionProgram, "getCompressionProgram"); + function execCommands(commands, cwd) { + return __awaiter3(this, void 0, void 0, function* () { + for (const command of commands) { + try { + yield (0, exec_1.exec)(command, void 0, { + cwd, + env: Object.assign(Object.assign({}, process.env), { MSYS: "winsymlinks:nativestrict" }) + }); + } catch (error) { + throw new Error(`${command.split(" ")[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); + } + } + }); + } + __name(execCommands, "execCommands"); + function listTar(archivePath, compressionMethod) { + return __awaiter3(this, void 0, void 0, function* () { + const commands = yield getCommands(compressionMethod, "list", archivePath); + yield execCommands(commands); + }); + } + __name(listTar, "listTar"); + exports2.listTar = listTar; + function extractTar(archivePath, compressionMethod) { + return __awaiter3(this, void 0, void 0, function* () { + const workingDirectory = getWorkingDirectory(); + yield io2.mkdirP(workingDirectory); + const commands = yield getCommands(compressionMethod, "extract", archivePath); + yield execCommands(commands); + }); + } + __name(extractTar, "extractTar"); + exports2.extractTar = extractTar; + function createTar(archiveFolder, sourceDirectories, compressionMethod) { + return __awaiter3(this, void 0, void 0, function* () { + (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + const commands = yield getCommands(compressionMethod, "create"); + yield execCommands(commands, archiveFolder); + }); + } + __name(createTar, "createTar"); + exports2.createTar = createTar; + } +}); + +// ../node_modules/@actions/cache/lib/cache.js +var require_cache3 = __commonJS({ + "../node_modules/@actions/cache/lib/cache.js"(exports2) { + "use strict"; + var __createBinding3 = 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: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; + var core2 = __importStar3(require_core()); + var path2 = __importStar3(require("path")); + var utils = __importStar3(require_cacheUtils()); + var cacheHttpClient = __importStar3(require_cacheHttpClient()); + var cacheTwirpClient = __importStar3(require_cacheTwirpClient()); + var config_1 = require_config(); + var tar_1 = require_tar(); + var constants_1 = require_constants7(); + var ValidationError = class _ValidationError extends Error { + static { + __name(this, "ValidationError"); + } + constructor(message) { + super(message); + this.name = "ValidationError"; + Object.setPrototypeOf(this, _ValidationError.prototype); + } + }; + exports2.ValidationError = ValidationError; + var ReserveCacheError = class _ReserveCacheError extends Error { + static { + __name(this, "ReserveCacheError"); + } + constructor(message) { + super(message); + this.name = "ReserveCacheError"; + Object.setPrototypeOf(this, _ReserveCacheError.prototype); + } + }; + exports2.ReserveCacheError = ReserveCacheError; + function checkPaths(paths) { + if (!paths || paths.length === 0) { + throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); + } + } + __name(checkPaths, "checkPaths"); + function checkKey(key) { + if (key.length > 512) { + throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); + } + const regex = /^[^,]*$/; + if (!regex.test(key)) { + throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); + } + } + __name(checkKey, "checkKey"); + function isFeatureAvailable() { + return !!process.env["ACTIONS_CACHE_URL"]; + } + __name(isFeatureAvailable, "isFeatureAvailable"); + exports2.isFeatureAvailable = isFeatureAvailable; + function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter3(this, void 0, void 0, function* () { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core2.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + switch (cacheServiceVersion) { + case "v2": + return yield restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + case "v1": + default: + return yield restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive); + } + }); + } + __name(restoreCache, "restoreCache"); + exports2.restoreCache = restoreCache; + function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter3(this, void 0, void 0, function* () { + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core2.debug("Resolved Keys:"); + core2.debug(JSON.stringify(keys)); + if (keys.length > 10) { + throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + } + for (const key of keys) { + checkKey(key); + } + const compressionMethod = yield utils.getCompressionMethod(); + let archivePath = ""; + try { + const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { + compressionMethod, + enableCrossOsArchive + }); + if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { + return void 0; + } + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core2.info("Lookup only - skipping download"); + return cacheEntry.cacheKey; + } + archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core2.debug(`Archive Path: ${archivePath}`); + yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); + if (core2.isDebug()) { + yield (0, tar_1.listTar)(archivePath, compressionMethod); + } + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core2.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core2.info("Cache restored successfully"); + return cacheEntry.cacheKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } else { + core2.warning(`Failed to restore: ${error.message}`); + } + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core2.debug(`Failed to delete archive: ${error}`); + } + } + return void 0; + }); + } + __name(restoreCacheV1, "restoreCacheV1"); + function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { + return __awaiter3(this, void 0, void 0, function* () { + options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core2.debug("Resolved Keys:"); + core2.debug(JSON.stringify(keys)); + if (keys.length > 10) { + throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + } + for (const key of keys) { + checkKey(key); + } + let archivePath = ""; + try { + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + const compressionMethod = yield utils.getCompressionMethod(); + const request = { + key: primaryKey, + restoreKeys, + version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive) + }; + const response = yield twirpClient.GetCacheEntryDownloadURL(request); + if (!response.ok) { + core2.warning(`Cache not found for keys: ${keys.join(", ")}`); + return void 0; + } + core2.info(`Cache hit for: ${request.key}`); + if (options === null || options === void 0 ? void 0 : options.lookupOnly) { + core2.info("Lookup only - skipping download"); + return response.matchedKey; + } + archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core2.debug(`Archive path: ${archivePath}`); + core2.debug(`Starting download of archive to: ${archivePath}`); + yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core2.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core2.isDebug()) { + yield (0, tar_1.listTar)(archivePath, compressionMethod); + } + yield (0, tar_1.extractTar)(archivePath, compressionMethod); + core2.info("Cache restored successfully"); + return response.matchedKey; + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } else { + core2.warning(`Failed to restore: ${error.message}`); + } + } finally { + try { + if (archivePath) { + yield utils.unlinkFile(archivePath); + } + } catch (error) { + core2.debug(`Failed to delete archive: ${error}`); + } + } + return void 0; + }); + } + __name(restoreCacheV2, "restoreCacheV2"); + function saveCache(paths, key, options, enableCrossOsArchive = false) { + return __awaiter3(this, void 0, void 0, function* () { + const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); + core2.debug(`Cache service version: ${cacheServiceVersion}`); + checkPaths(paths); + checkKey(key); + switch (cacheServiceVersion) { + case "v2": + return yield saveCacheV2(paths, key, options, enableCrossOsArchive); + case "v1": + default: + return yield saveCacheV1(paths, key, options, enableCrossOsArchive); + } + }); + } + __name(saveCache, "saveCache"); + exports2.saveCache = saveCache; + function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; + return __awaiter3(this, void 0, void 0, function* () { + const compressionMethod = yield utils.getCompressionMethod(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core2.debug("Cache Paths:"); + core2.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) { + 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 = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core2.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core2.isDebug()) { + yield (0, tar_1.listTar)(archivePath, compressionMethod); + } + const fileSizeLimit = 10 * 1024 * 1024 * 1024; + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core2.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { + throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + } + core2.debug("Reserving Cache"); + const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { + compressionMethod, + enableCrossOsArchive, + cacheSize: archiveFileSize + }); + if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.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 ReserveCacheError(`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}`); + } + core2.debug(`Saving Cache (ID: ${cacheId})`); + yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } else if (typedError.name === ReserveCacheError.name) { + core2.info(`Failed to save: ${typedError.message}`); + } else { + core2.warning(`Failed to save: ${typedError.message}`); + } + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core2.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } + __name(saveCacheV1, "saveCacheV1"); + function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { + return __awaiter3(this, void 0, void 0, function* () { + options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); + const compressionMethod = yield utils.getCompressionMethod(); + const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); + let cacheId = -1; + const cachePaths = yield utils.resolvePaths(paths); + core2.debug("Cache Paths:"); + core2.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) { + 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 = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core2.debug(`Archive Path: ${archivePath}`); + try { + yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); + if (core2.isDebug()) { + yield (0, tar_1.listTar)(archivePath, compressionMethod); + } + const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); + core2.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { + throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); + } + options.archiveSizeBytes = archiveFileSize; + core2.debug("Reserving Cache"); + const version3 = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); + const request = { + key, + version: version3 + }; + const response = yield twirpClient.CreateCacheEntry(request); + if (!response.ok) { + throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); + } + core2.debug(`Attempting to upload cache located at: ${archivePath}`); + yield cacheHttpClient.saveCache(cacheId, archivePath, response.signedUploadUrl, options); + const finalizeRequest = { + key, + version: version3, + sizeBytes: `${archiveFileSize}` + }; + const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); + core2.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + if (!finalizeResponse.ok) { + throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); + } + cacheId = parseInt(finalizeResponse.entryId); + } catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } else if (typedError.name === ReserveCacheError.name) { + core2.info(`Failed to save: ${typedError.message}`); + } else { + core2.warning(`Failed to save: ${typedError.message}`); + } + } finally { + try { + yield utils.unlinkFile(archivePath); + } catch (error) { + core2.debug(`Failed to delete archive: ${error}`); + } + } + return cacheId; + }); + } + __name(saveCacheV2, "saveCacheV2"); + } +}); + +// ../node_modules/@actions/tool-cache/node_modules/semver/semver.js +var require_semver2 = __commonJS({ + "../node_modules/@actions/tool-cache/node_modules/semver/semver.js"(exports2, module2) { + exports2 = module2.exports = SemVer; + var debug; + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = /* @__PURE__ */ __name(function() { + var args = Array.prototype.slice.call(arguments, 0); + args.unshift("SEMVER"); + console.log.apply(console, args); + }, "debug"); + } else { + debug = /* @__PURE__ */ __name(function() { + }, "debug"); + } + exports2.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var re2 = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var t = exports2.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + __name(tok, "tok"); + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + function makeSafeRe(value) { + for (var i2 = 0; i2 < safeRegexReplacements.length; i2++) { + var token = safeRegexReplacements[i2][0]; + var max = safeRegexReplacements[i2][1]; + value = value.split(token + "*").join(token + "{0," + max + "}").split(token + "+").join(token + "{1," + max + "}"); + } + return value; + } + __name(makeSafeRe, "makeSafeRe"); + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "\\d+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-]" + LETTERDASHNUMBER + "*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + "+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re2[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re2[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re2[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re2[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (i = 0; i < R; i++) { + debug(i, src[i]); + if (!re2[i]) { + re2[i] = new RegExp(src[i]); + safeRe[i] = new RegExp(makeSafeRe(src[i])); + } + } + var i; + exports2.parse = parse2; + function parse2(version3, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version3 instanceof SemVer) { + return version3; + } + if (typeof version3 !== "string") { + return null; + } + if (version3.length > MAX_LENGTH) { + return null; + } + var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; + if (!r.test(version3)) { + return null; + } + try { + return new SemVer(version3, options); + } catch (er) { + return null; + } + } + __name(parse2, "parse"); + exports2.valid = valid; + function valid(version3, options) { + var v = parse2(version3, options); + return v ? v.version : null; + } + __name(valid, "valid"); + exports2.clean = clean; + function clean(version3, options) { + var s = parse2(version3.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + __name(clean, "clean"); + exports2.SemVer = SemVer; + function SemVer(version3, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version3 instanceof SemVer) { + if (version3.loose === options.loose) { + return version3; + } else { + version3 = version3.version; + } + } else if (typeof version3 !== "string") { + throw new TypeError("Invalid Version: " + version3); + } + if (version3.length > MAX_LENGTH) { + throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + } + if (!(this instanceof SemVer)) { + return new SemVer(version3, options); + } + debug("SemVer", version3, options); + this.options = options; + this.loose = !!options.loose; + var m = version3.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + if (!m) { + throw new TypeError("Invalid Version: " + version3); + } + this.raw = version3; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + __name(SemVer, "SemVer"); + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) { + this.version += "-" + this.prerelease.join("."); + } + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + var i2 = 0; + do { + var a = this.prerelease[i2]; + var b = other.prerelease[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + var i2 = 0; + do { + var a = this.build[i2]; + var b = other.build[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + var i2 = this.prerelease.length; + while (--i2 >= 0) { + if (typeof this.prerelease[i2] === "number") { + this.prerelease[i2]++; + i2 = -2; + } + } + if (i2 === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports2.inc = inc; + function inc(version3, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version3, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + __name(inc, "inc"); + exports2.diff = diff; + function diff(version1, version22) { + if (eq(version1, version22)) { + return null; + } else { + var v12 = parse2(version1); + var v2 = parse2(version22); + var prefix = ""; + if (v12.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v12) { + if (key === "major" || key === "minor" || key === "patch") { + if (v12[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + } + __name(diff, "diff"); + exports2.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + __name(compareIdentifiers, "compareIdentifiers"); + exports2.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + __name(rcompareIdentifiers, "rcompareIdentifiers"); + exports2.major = major2; + function major2(a, loose) { + return new SemVer(a, loose).major; + } + __name(major2, "major"); + exports2.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + __name(minor, "minor"); + exports2.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + __name(patch, "patch"); + exports2.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + __name(compare, "compare"); + exports2.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + __name(compareLoose, "compareLoose"); + exports2.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + __name(compareBuild, "compareBuild"); + exports2.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + __name(rcompare, "rcompare"); + exports2.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(a, b, loose); + }); + } + __name(sort, "sort"); + exports2.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(b, a, loose); + }); + } + __name(rsort, "rsort"); + exports2.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + __name(gt, "gt"); + exports2.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + __name(lt, "lt"); + exports2.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + __name(eq, "eq"); + exports2.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + __name(neq, "neq"); + exports2.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + __name(gte, "gte"); + exports2.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + __name(lte, "lte"); + exports2.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError("Invalid operator: " + op); + } + } + __name(cmp, "cmp"); + exports2.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + if (!(this instanceof Comparator)) { + return new Comparator(comp, options); + } + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + __name(Comparator, "Comparator"); + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var m = comp.match(r); + if (!m) { + throw new TypeError("Invalid comparator: " + comp); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version3) { + debug("Comparator.test", version3, this.options.loose); + if (this.semver === ANY || version3 === ANY) { + return true; + } + if (typeof version3 === "string") { + try { + version3 = new SemVer(version3, this.options); + } catch (er) { + return false; + } + } + return cmp(version3, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + var rangeTmp; + if (this.operator === "") { + if (this.value === "") { + return true; + } + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports2.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + return new Range(range.value, options); + } + if (!(this instanceof Range)) { + return new Range(range, 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).filter(function(c) { + return c.length; + }); + if (!this.set.length) { + throw new TypeError("Invalid SemVer Range: " + this.raw); + } + this.format(); + } + __name(Range, "Range"); + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace); + debug("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(" "); + var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) { + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + __name(isSatisfiable, "isSatisfiable"); + exports2.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + __name(toComparators, "toComparators"); + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + __name(parseComparator, "parseComparator"); + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + __name(isX, "isX"); + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceTilde(comp2, options); + }).join(" "); + } + __name(replaceTildes, "replaceTildes"); + function replaceTilde(comp, options) { + var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]; + return comp.replace(r, function(_2, M, m, p, pr) { + debug("tilde", comp, _2, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + debug("tilde return", ret); + return ret; + }); + } + __name(replaceTilde, "replaceTilde"); + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceCaret(comp2, options); + }).join(" "); + } + __name(replaceCarets, "replaceCarets"); + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]; + return comp.replace(r, function(_2, M, m, p, pr) { + debug("caret", comp, _2, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + if (M === "0") { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + } + debug("caret return", ret); + return ret; + }); + } + __name(replaceCaret, "replaceCaret"); + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp2) { + return replaceXRange(comp2, options); + }).join(" "); + } + __name(replaceXRanges, "replaceXRanges"); + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) { + ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + } else if (xp) { + ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + } + debug("xRange return", ret); + return ret; + }); + } + __name(replaceXRange, "replaceXRange"); + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(safeRe[t.STAR], ""); + } + __name(replaceStars, "replaceStars"); + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = ">=" + fM + ".0.0"; + } else if (isX(fp)) { + from = ">=" + fM + "." + fm + ".0"; + } else { + from = ">=" + from; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = "<" + (+tM + 1) + ".0.0"; + } else if (isX(tp)) { + to = "<" + tM + "." + (+tm + 1) + ".0"; + } else if (tpr) { + to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + } else { + to = "<=" + to; + } + return (from + " " + to).trim(); + } + __name(hyphenReplace, "hyphenReplace"); + Range.prototype.test = function(version3) { + if (!version3) { + return false; + } + if (typeof version3 === "string") { + try { + version3 = new SemVer(version3, this.options); + } catch (er) { + return false; + } + } + for (var i2 = 0; i2 < this.set.length; i2++) { + if (testSet(this.set[i2], version3, this.options)) { + return true; + } + } + return false; + }; + function testSet(set, version3, options) { + for (var i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version3)) { + return false; + } + } + if (version3.prerelease.length && !options.includePrerelease) { + for (i2 = 0; i2 < set.length; i2++) { + debug(set[i2].semver); + if (set[i2].semver === ANY) { + continue; + } + if (set[i2].semver.prerelease.length > 0) { + var allowed = set[i2].semver; + if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { + return true; + } + } + } + return false; + } + return true; + } + __name(testSet, "testSet"); + exports2.satisfies = satisfies; + function satisfies(version3, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version3); + } + __name(satisfies, "satisfies"); + exports2.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + __name(maxSatisfying, "maxSatisfying"); + exports2.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + __name(minSatisfying, "minSatisfying"); + exports2.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + comparators.forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + /* fallthrough */ + case "": + case ">=": + if (!minver || gt(minver, compver)) { + minver = compver; + } + break; + case "<": + case "<=": + break; + /* istanbul ignore next */ + default: + throw new Error("Unexpected operation: " + comparator.operator); + } + }); + } + if (minver && range.test(minver)) { + return minver; + } + return null; + } + __name(minVersion, "minVersion"); + exports2.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + __name(validRange, "validRange"); + exports2.ltr = ltr; + function ltr(version3, range, options) { + return outside(version3, range, "<", options); + } + __name(ltr, "ltr"); + exports2.gtr = gtr; + function gtr(version3, range, options) { + return outside(version3, range, ">", options); + } + __name(gtr, "gtr"); + exports2.outside = outside; + function outside(version3, range, hilo, options) { + version3 = new SemVer(version3, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version3, range, options)) { + return false; + } + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version3, low.semver)) { + return false; + } + } + return true; + } + __name(outside, "outside"); + exports2.prerelease = prerelease; + function prerelease(version3, options) { + var parsed = parse2(version3, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + __name(prerelease, "prerelease"); + exports2.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + __name(intersects, "intersects"); + exports2.coerce = coerce; + function coerce(version3, options) { + if (version3 instanceof SemVer) { + return version3; + } + if (typeof version3 === "number") { + version3 = String(version3); + } + if (typeof version3 !== "string") { + return null; + } + options = options || {}; + var match = null; + if (!options.rtl) { + match = version3.match(safeRe[t.COERCE]); + } else { + var next; + while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + safeRe[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } + __name(coerce, "coerce"); + } +}); + +// ../node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "../node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver = __importStar3(require_semver2()); + var core_1 = require_core(); + var os = require("os"); + var cp = require("child_process"); + var fs2 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter3(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version3 = candidate.version; + core_1.debug(`check ${version3} satisfies ${versionSpec}`); + if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + core_1.debug(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + __name(_findMatch, "_findMatch"); + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os.platform(); + let version3 = ""; + if (plat === "darwin") { + version3 = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version3; + } + __name(_getOsVersion, "_getOsVersion"); + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs2.existsSync(lsbReleaseFile)) { + contents = fs2.readFileSync(lsbReleaseFile).toString(); + } else if (fs2.existsSync(osReleaseFile)) { + contents = fs2.readFileSync(osReleaseFile).toString(); + } + return contents; + } + __name(_readLinuxVersionFile, "_readLinuxVersionFile"); + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// ../node_modules/uuid/lib/rng.js +var require_rng = __commonJS({ + "../node_modules/uuid/lib/rng.js"(exports2, module2) { + var crypto4 = require("crypto"); + module2.exports = /* @__PURE__ */ __name(function nodeRNG() { + return crypto4.randomBytes(16); + }, "nodeRNG"); + } +}); + +// ../node_modules/uuid/lib/bytesToUuid.js +var require_bytesToUuid = __commonJS({ + "../node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { + var byteToHex2 = []; + for (i = 0; i < 256; ++i) { + byteToHex2[i] = (i + 256).toString(16).substr(1); + } + var i; + function bytesToUuid(buf, offset) { + var i2 = offset || 0; + var bth = byteToHex2; + return [ + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]] + ].join(""); + } + __name(bytesToUuid, "bytesToUuid"); + module2.exports = bytesToUuid; + } +}); + +// ../node_modules/uuid/v4.js +var require_v4 = __commonJS({ + "../node_modules/uuid/v4.js"(exports2, module2) { + var rng2 = require_rng(); + var bytesToUuid = require_bytesToUuid(); + function v42(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid(rnds); + } + __name(v42, "v4"); + module2.exports = v42; + } +}); + +// ../node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "../node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetryHelper = void 0; + var core2 = __importStar3(require_core()); + var RetryHelper = class { + static { + __name(this, "RetryHelper"); + } + constructor(maxAttempts, minSeconds, maxSeconds) { + if (maxAttempts < 1) { + throw new Error("max attempts should be greater than or equal to 1"); + } + this.maxAttempts = maxAttempts; + this.minSeconds = Math.floor(minSeconds); + this.maxSeconds = Math.floor(maxSeconds); + if (this.minSeconds > this.maxSeconds) { + throw new Error("min seconds should be less than or equal to max seconds"); + } + } + execute(action, isRetryable) { + return __awaiter3(this, void 0, void 0, function* () { + let attempt = 1; + while (attempt < this.maxAttempts) { + try { + return yield action(); + } catch (err) { + if (isRetryable && !isRetryable(err)) { + throw err; + } + core2.info(err.message); + } + const seconds = this.getSleepAmount(); + core2.info(`Waiting ${seconds} seconds before trying again`); + yield this.sleep(seconds); + attempt++; + } + return yield action(); + }); + } + getSleepAmount() { + return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; + } + sleep(seconds) { + return __awaiter3(this, void 0, void 0, function* () { + return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + }); + } + }; + exports2.RetryHelper = RetryHelper; + } +}); + +// ../node_modules/@actions/tool-cache/lib/tool-cache.js +var require_tool_cache = __commonJS({ + "../node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { + "use strict"; + var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar3 = 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.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); + } + __setModuleDefault3(result, mod); + return result; + }; + var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; + var core2 = __importStar3(require_core()); + var io2 = __importStar3(require_io()); + var fs2 = __importStar3(require("fs")); + var mm = __importStar3(require_manifest()); + var os = __importStar3(require("os")); + var path2 = __importStar3(require("path")); + var httpm = __importStar3(require_lib()); + var semver = __importStar3(require_semver2()); + var stream = __importStar3(require("stream")); + var util = __importStar3(require("util")); + var assert_1 = require("assert"); + var v4_1 = __importDefault2(require_v4()); + var exec_1 = require_exec(); + var retry_helper_1 = require_retry_helper(); + var HTTPError = class extends Error { + static { + __name(this, "HTTPError"); + } + constructor(httpStatusCode) { + super(`Unexpected HTTP response: ${httpStatusCode}`); + this.httpStatusCode = httpStatusCode; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.HTTPError = HTTPError; + var IS_WINDOWS = process.platform === "win32"; + var IS_MAC = process.platform === "darwin"; + var userAgent = "actions/tool-cache"; + function downloadTool(url, dest, auth, headers) { + return __awaiter3(this, void 0, void 0, function* () { + dest = dest || path2.join(_getTempDirectory(), v4_1.default()); + yield io2.mkdirP(path2.dirname(dest)); + core2.debug(`Downloading ${url}`); + core2.debug(`Destination ${dest}`); + const maxAttempts = 3; + const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); + const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); + const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); + return yield retryHelper.execute(() => __awaiter3(this, void 0, void 0, function* () { + return yield downloadToolAttempt(url, dest || "", auth, headers); + }), (err) => { + if (err instanceof HTTPError && err.httpStatusCode) { + if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { + return false; + } + } + return true; + }); + }); + } + __name(downloadTool, "downloadTool"); + exports2.downloadTool = downloadTool; + function downloadToolAttempt(url, dest, auth, headers) { + return __awaiter3(this, void 0, void 0, function* () { + if (fs2.existsSync(dest)) { + throw new Error(`Destination file path ${dest} already exists`); + } + const http = new httpm.HttpClient(userAgent, [], { + allowRetries: false + }); + if (auth) { + core2.debug("set auth"); + if (headers === void 0) { + headers = {}; + } + headers.authorization = auth; + } + const response = yield http.get(url, headers); + if (response.message.statusCode !== 200) { + const err = new HTTPError(response.message.statusCode); + core2.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + throw err; + } + const pipeline = util.promisify(stream.pipeline); + const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); + const readStream = responseMessageFactory(); + let succeeded = false; + try { + yield pipeline(readStream, fs2.createWriteStream(dest)); + core2.debug("download complete"); + succeeded = true; + return dest; + } finally { + if (!succeeded) { + core2.debug("download failed"); + try { + yield io2.rmRF(dest); + } catch (err) { + core2.debug(`Failed to delete '${dest}'. ${err.message}`); + } + } + } + }); + } + __name(downloadToolAttempt, "downloadToolAttempt"); + function extract7z(file, dest, _7zPath) { + return __awaiter3(this, void 0, void 0, function* () { + assert_1.ok(IS_WINDOWS, "extract7z() not supported on current OS"); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + const originalCwd = process.cwd(); + process.chdir(dest); + if (_7zPath) { + try { + const logLevel = core2.isDebug() ? "-bb1" : "-bb0"; + const args = [ + "x", + logLevel, + "-bd", + "-sccUTF-8", + file + ]; + const options = { + silent: true + }; + yield exec_1.exec(`"${_7zPath}"`, args, options); + } finally { + process.chdir(originalCwd); + } + } else { + const escapedScript = path2.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}'`; + const args = [ + "-NoLogo", + "-Sta", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + command + ]; + const options = { + silent: true + }; + try { + const powershellPath = yield io2.which("powershell", true); + yield exec_1.exec(`"${powershellPath}"`, args, options); + } finally { + process.chdir(originalCwd); + } + } + return dest; + }); + } + __name(extract7z, "extract7z"); + exports2.extract7z = extract7z; + function extractTar(file, dest, flags = "xz") { + return __awaiter3(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + core2.debug("Checking tar --version"); + let versionOutput = ""; + yield exec_1.exec("tar --version", [], { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: /* @__PURE__ */ __name((data) => versionOutput += data.toString(), "stdout"), + stderr: /* @__PURE__ */ __name((data) => versionOutput += data.toString(), "stderr") + } + }); + core2.debug(versionOutput.trim()); + const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); + let args; + if (flags instanceof Array) { + args = flags; + } else { + args = [flags]; + } + if (core2.isDebug() && !flags.includes("v")) { + args.push("-v"); + } + let destArg = dest; + let fileArg = file; + if (IS_WINDOWS && isGnuTar) { + args.push("--force-local"); + destArg = dest.replace(/\\/g, "/"); + fileArg = file.replace(/\\/g, "/"); + } + if (isGnuTar) { + args.push("--warning=no-unknown-keyword"); + args.push("--overwrite"); + } + args.push("-C", destArg, "-f", fileArg); + yield exec_1.exec(`tar`, args); + return dest; + }); + } + __name(extractTar, "extractTar"); + exports2.extractTar = extractTar; + function extractXar(file, dest, flags = []) { + return __awaiter3(this, void 0, void 0, function* () { + assert_1.ok(IS_MAC, "extractXar() not supported on current OS"); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + let args; + if (flags instanceof Array) { + args = flags; + } else { + args = [flags]; + } + args.push("-x", "-C", dest, "-f", file); + if (core2.isDebug()) { + args.push("-v"); + } + const xarPath = yield io2.which("xar", true); + yield exec_1.exec(`"${xarPath}"`, _unique(args)); + return dest; + }); + } + __name(extractXar, "extractXar"); + exports2.extractXar = extractXar; + function extractZip(file, dest) { + return __awaiter3(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + if (IS_WINDOWS) { + yield extractZipWin(file, dest); + } else { + yield extractZipNix(file, dest); + } + return dest; + }); + } + __name(extractZip, "extractZip"); + exports2.extractZip = extractZip; + function extractZipWin(file, dest) { + return __awaiter3(this, void 0, void 0, function* () { + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const pwshPath = yield io2.which("pwsh", false); + if (pwshPath) { + const pwshCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, + `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, + `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` + ].join(" "); + const args = [ + "-NoLogo", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + pwshCommand + ]; + core2.debug(`Using pwsh at path: ${pwshPath}`); + yield exec_1.exec(`"${pwshPath}"`, args); + } else { + const powershellCommand = [ + `$ErrorActionPreference = 'Stop' ;`, + `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, + `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, + `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` + ].join(" "); + const args = [ + "-NoLogo", + "-Sta", + "-NoProfile", + "-NonInteractive", + "-ExecutionPolicy", + "Unrestricted", + "-Command", + powershellCommand + ]; + const powershellPath = yield io2.which("powershell", true); + core2.debug(`Using powershell at path: ${powershellPath}`); + yield exec_1.exec(`"${powershellPath}"`, args); + } + }); + } + __name(extractZipWin, "extractZipWin"); + function extractZipNix(file, dest) { + return __awaiter3(this, void 0, void 0, function* () { + const unzipPath = yield io2.which("unzip", true); + const args = [file]; + if (!core2.isDebug()) { + args.unshift("-q"); + } + args.unshift("-o"); + yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest }); + }); + } + __name(extractZipNix, "extractZipNix"); + function cacheDir(sourceDir, tool, version3, arch) { + return __awaiter3(this, void 0, void 0, function* () { + version3 = semver.clean(version3) || version3; + arch = arch || os.arch(); + core2.debug(`Caching tool ${tool} ${version3} ${arch}`); + core2.debug(`source dir: ${sourceDir}`); + if (!fs2.statSync(sourceDir).isDirectory()) { + throw new Error("sourceDir is not a directory"); + } + const destPath = yield _createToolPath(tool, version3, arch); + for (const itemName of fs2.readdirSync(sourceDir)) { + const s = path2.join(sourceDir, itemName); + yield io2.cp(s, destPath, { recursive: true }); + } + _completeToolPath(tool, version3, arch); + return destPath; + }); + } + __name(cacheDir, "cacheDir"); + exports2.cacheDir = cacheDir; + function cacheFile(sourceFile, targetFile, tool, version3, arch) { + return __awaiter3(this, void 0, void 0, function* () { + version3 = semver.clean(version3) || version3; + arch = arch || os.arch(); + core2.debug(`Caching tool ${tool} ${version3} ${arch}`); + core2.debug(`source file: ${sourceFile}`); + if (!fs2.statSync(sourceFile).isFile()) { + throw new Error("sourceFile is not a file"); + } + const destFolder = yield _createToolPath(tool, version3, arch); + const destPath = path2.join(destFolder, targetFile); + core2.debug(`destination file ${destPath}`); + yield io2.cp(sourceFile, destPath); + _completeToolPath(tool, version3, arch); + return destFolder; + }); + } + __name(cacheFile, "cacheFile"); + exports2.cacheFile = cacheFile; + function find(toolName, versionSpec, arch) { + if (!toolName) { + throw new Error("toolName parameter is required"); + } + if (!versionSpec) { + throw new Error("versionSpec parameter is required"); + } + arch = arch || os.arch(); + if (!isExplicitVersion(versionSpec)) { + const localVersions = findAllVersions(toolName, arch); + const match = evaluateVersions(localVersions, versionSpec); + versionSpec = match; + } + let toolPath = ""; + if (versionSpec) { + versionSpec = semver.clean(versionSpec) || ""; + const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); + core2.debug(`checking cache: ${cachePath}`); + if (fs2.existsSync(cachePath) && fs2.existsSync(`${cachePath}.complete`)) { + core2.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + toolPath = cachePath; + } else { + core2.debug("not found"); + } + } + return toolPath; + } + __name(find, "find"); + exports2.find = find; + function findAllVersions(toolName, arch) { + const versions = []; + arch = arch || os.arch(); + const toolPath = path2.join(_getCacheDirectory(), toolName); + if (fs2.existsSync(toolPath)) { + const children2 = fs2.readdirSync(toolPath); + for (const child of children2) { + if (isExplicitVersion(child)) { + const fullPath = path2.join(toolPath, child, arch || ""); + if (fs2.existsSync(fullPath) && fs2.existsSync(`${fullPath}.complete`)) { + versions.push(child); + } + } + } + } + return versions; + } + __name(findAllVersions, "findAllVersions"); + exports2.findAllVersions = findAllVersions; + function getManifestFromRepo(owner, repo, auth, branch = "master") { + return __awaiter3(this, void 0, void 0, function* () { + let releases = []; + const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; + const http = new httpm.HttpClient("tool-cache"); + const headers = {}; + if (auth) { + core2.debug("set auth"); + headers.authorization = auth; + } + const response = yield http.getJson(treeUrl, headers); + if (!response.result) { + return releases; + } + let manifestUrl = ""; + for (const item of response.result.tree) { + if (item.path === "versions-manifest.json") { + manifestUrl = item.url; + break; + } + } + headers["accept"] = "application/vnd.github.VERSION.raw"; + let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); + if (versionsRaw) { + versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); + try { + releases = JSON.parse(versionsRaw); + } catch (_a) { + core2.debug("Invalid json"); + } + } + return releases; + }); + } + __name(getManifestFromRepo, "getManifestFromRepo"); + exports2.getManifestFromRepo = getManifestFromRepo; + function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { + return __awaiter3(this, void 0, void 0, function* () { + const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); + return match; + }); + } + __name(findFromManifest, "findFromManifest"); + exports2.findFromManifest = findFromManifest; + function _createExtractFolder(dest) { + return __awaiter3(this, void 0, void 0, function* () { + if (!dest) { + dest = path2.join(_getTempDirectory(), v4_1.default()); + } + yield io2.mkdirP(dest); + return dest; + }); + } + __name(_createExtractFolder, "_createExtractFolder"); + function _createToolPath(tool, version3, arch) { + return __awaiter3(this, void 0, void 0, function* () { + const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); + core2.debug(`destination ${folderPath}`); + const markerPath = `${folderPath}.complete`; + yield io2.rmRF(folderPath); + yield io2.rmRF(markerPath); + yield io2.mkdirP(folderPath); + return folderPath; + }); + } + __name(_createToolPath, "_createToolPath"); + function _completeToolPath(tool, version3, arch) { + const folderPath = path2.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); + const markerPath = `${folderPath}.complete`; + fs2.writeFileSync(markerPath, ""); + core2.debug("finished caching tool"); + } + __name(_completeToolPath, "_completeToolPath"); + function isExplicitVersion(versionSpec) { + const c = semver.clean(versionSpec) || ""; + core2.debug(`isExplicit: ${c}`); + const valid = semver.valid(c) != null; + core2.debug(`explicit? ${valid}`); + return valid; + } + __name(isExplicitVersion, "isExplicitVersion"); + exports2.isExplicitVersion = isExplicitVersion; + function evaluateVersions(versions, versionSpec) { + let version3 = ""; + core2.debug(`evaluating ${versions.length} versions`); + versions = versions.sort((a, b) => { + if (semver.gt(a, b)) { + return 1; + } + return -1; + }); + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; + const satisfied = semver.satisfies(potential, versionSpec); + if (satisfied) { + version3 = potential; + break; + } + } + if (version3) { + core2.debug(`matched: ${version3}`); + } else { + core2.debug("match not found"); + } + return version3; + } + __name(evaluateVersions, "evaluateVersions"); + exports2.evaluateVersions = evaluateVersions; + function _getCacheDirectory() { + const cacheDirectory = process.env["RUNNER_TOOL_CACHE"] || ""; + assert_1.ok(cacheDirectory, "Expected RUNNER_TOOL_CACHE to be defined"); + return cacheDirectory; + } + __name(_getCacheDirectory, "_getCacheDirectory"); + function _getTempDirectory() { + const tempDirectory = process.env["RUNNER_TEMP"] || ""; + assert_1.ok(tempDirectory, "Expected RUNNER_TEMP to be defined"); + return tempDirectory; + } + __name(_getTempDirectory, "_getTempDirectory"); + function _getGlobal(key, defaultValue) { + const value = global[key]; + return value !== void 0 ? value : defaultValue; + } + __name(_getGlobal, "_getGlobal"); + function _unique(values) { + return Array.from(new Set(values)); + } + __name(_unique, "_unique"); + } +}); + +// ../node_modules/@actions/artifact/lib/internal/shared/config.js +var require_config2 = __commonJS({ + "../node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUploadChunkTimeout = exports2.getConcurrency = exports2.getGitHubWorkspaceDir = exports2.isGhes = exports2.getResultsServiceUrl = exports2.getRuntimeToken = exports2.getUploadChunkSize = void 0; + var os_1 = __importDefault2(require("os")); + function getUploadChunkSize() { + return 8 * 1024 * 1024; + } + __name(getUploadChunkSize, "getUploadChunkSize"); + exports2.getUploadChunkSize = getUploadChunkSize; + function getRuntimeToken() { + const token = process.env["ACTIONS_RUNTIME_TOKEN"]; + if (!token) { + throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable"); } - create(value) { - const message = { signedUrl: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + return token; + } + __name(getRuntimeToken, "getRuntimeToken"); + exports2.getRuntimeToken = getRuntimeToken; + function getResultsServiceUrl() { + const resultsUrl = process.env["ACTIONS_RESULTS_URL"]; + if (!resultsUrl) { + throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable"); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string signed_url */ - 1: - message.signedUrl = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + return new URL(resultsUrl).origin; + } + __name(getResultsServiceUrl, "getResultsServiceUrl"); + exports2.getResultsServiceUrl = getResultsServiceUrl; + function isGhes() { + const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === "GITHUB.COM"; + const isGheHost = hostname.endsWith(".GHE.COM"); + const isLocalHost = hostname.endsWith(".LOCALHOST"); + return !isGitHubHost && !isGheHost && !isLocalHost; + } + __name(isGhes, "isGhes"); + exports2.isGhes = isGhes; + function getGitHubWorkspaceDir() { + const ghWorkspaceDir = process.env["GITHUB_WORKSPACE"]; + if (!ghWorkspaceDir) { + throw new Error("Unable to get the GITHUB_WORKSPACE env variable"); } - internalBinaryWrite(message, writer, options) { - if (message.signedUrl !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.signedUrl); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + return ghWorkspaceDir; + } + __name(getGitHubWorkspaceDir, "getGitHubWorkspaceDir"); + exports2.getGitHubWorkspaceDir = getGitHubWorkspaceDir; + function getConcurrency() { + const numCPUs = os_1.default.cpus().length; + if (numCPUs <= 4) { + return 32; } - }; - exports2.GetSignedArtifactURLResponse = new GetSignedArtifactURLResponse$Type(); - var DeleteArtifactRequest$Type = class extends runtime_5.MessageType { + const concurrency = 16 * numCPUs; + return concurrency > 300 ? 300 : concurrency; + } + __name(getConcurrency, "getConcurrency"); + exports2.getConcurrency = getConcurrency; + function getUploadChunkTimeout() { + return 3e5; + } + __name(getUploadChunkTimeout, "getUploadChunkTimeout"); + exports2.getUploadChunkTimeout = getUploadChunkTimeout; + } +}); + +// ../node_modules/@actions/artifact/lib/generated/google/protobuf/timestamp.js +var require_timestamp2 = __commonJS({ + "../node_modules/@actions/artifact/lib/generated/google/protobuf/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Timestamp = void 0; + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var runtime_6 = require_commonjs7(); + var runtime_7 = require_commonjs7(); + var Timestamp$Type = class extends runtime_7.MessageType { static { - __name(this, "DeleteArtifactRequest$Type"); + __name(this, "Timestamp$Type"); } constructor() { - super("github.actions.results.api.v1.DeleteArtifactRequest", [ + super("google.protobuf.Timestamp", [ { no: 1, - name: "workflow_run_backend_id", + name: "seconds", kind: "scalar", - T: 9 - /*ScalarType.STRING*/ + T: 3 + /*ScalarType.INT64*/ }, { no: 2, - name: "workflow_job_run_backend_id", - kind: "scalar", - T: 9 - /*ScalarType.STRING*/ - }, - { - no: 3, - name: "name", + name: "nanos", kind: "scalar", - T: 9 - /*ScalarType.STRING*/ + T: 5 + /*ScalarType.INT32*/ } ]); } - create(value) { - const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== void 0) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + /** + * Creates a new `Timestamp` for the current time. + */ + now() { + const msg = this.create(); + const ms = Date.now(); + msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); + msg.nanos = ms % 1e3 * 1e6; + return msg; } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string workflow_run_backend_id */ - 1: - message.workflowRunBackendId = reader.string(); - break; - case /* string workflow_job_run_backend_id */ - 2: - message.workflowJobRunBackendId = reader.string(); - break; - case /* string name */ - 3: - message.name = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + /** + * Converts a `Timestamp` to a JavaScript Date. + */ + toDate(message) { + return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6)); } - internalBinaryWrite(message, writer, options) { - if (message.workflowRunBackendId !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); - if (message.workflowJobRunBackendId !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); - if (message.name !== "") - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + /** + * Converts a JavaScript Date to a `Timestamp`. + */ + fromDate(date) { + const msg = this.create(); + const ms = date.getTime(); + msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1e3)).toString(); + msg.nanos = ms % 1e3 * 1e6; + return msg; } - }; - exports2.DeleteArtifactRequest = new DeleteArtifactRequest$Type(); - var DeleteArtifactResponse$Type = class extends runtime_5.MessageType { - static { - __name(this, "DeleteArtifactResponse$Type"); + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + internalJsonWrite(message, options) { + let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1e3; + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (message.nanos < 0) + throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); + let z = "Z"; + if (message.nanos > 0) { + let nanosStr = (message.nanos + 1e9).toString().substring(1); + if (nanosStr.substring(3) === "000000") + z = "." + nanosStr.substring(0, 3) + "Z"; + else if (nanosStr.substring(6) === "000") + z = "." + nanosStr.substring(0, 6) + "Z"; + else + z = "." + nanosStr + "Z"; + } + return new Date(ms).toISOString().replace(".000Z", z); } - constructor() { - super("github.actions.results.api.v1.DeleteArtifactResponse", [ - { - no: 1, - name: "ok", - kind: "scalar", - T: 8 - /*ScalarType.BOOL*/ - }, - { - no: 2, - name: "artifact_id", - kind: "scalar", - T: 3 - /*ScalarType.INT64*/ - } - ]); + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + 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")); + if (Number.isNaN(ms)) + throw new Error("Unable to parse Timestamp from JSON. Invalid value."); + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (!target) + target = this.create(); + target.seconds = runtime_6.PbLong.from(ms / 1e3).toString(); + target.nanos = 0; + if (matches[7]) + target.nanos = parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1e9; + return target; } create(value) { - const message = { ok: false, artifactId: "0" }; + const message = { seconds: "0", nanos: 0 }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== void 0) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -99114,13 +101865,13 @@ var require_artifact = __commonJS({ while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* bool ok */ + case /* int64 seconds */ 1: - message.ok = reader.bool(); + message.seconds = reader.int64().toString(); break; - case /* int64 artifact_id */ + case /* int32 nanos */ 2: - message.artifactId = reader.int64().toString(); + message.nanos = reader.int32(); break; default: let u = options.readUnknownField; @@ -99134,1548 +101885,1496 @@ var require_artifact = __commonJS({ return message; } internalBinaryWrite(message, writer, options) { - if (message.ok !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - if (message.artifactId !== "0") - writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId); + if (message.seconds !== "0") + writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); + if (message.nanos !== 0) + writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } }; - exports2.DeleteArtifactResponse = new DeleteArtifactResponse$Type(); - exports2.ArtifactService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.ArtifactService", [ - { name: "CreateArtifact", options: {}, I: exports2.CreateArtifactRequest, O: exports2.CreateArtifactResponse }, - { name: "FinalizeArtifact", options: {}, I: exports2.FinalizeArtifactRequest, O: exports2.FinalizeArtifactResponse }, - { name: "ListArtifacts", options: {}, I: exports2.ListArtifactsRequest, O: exports2.ListArtifactsResponse }, - { name: "GetSignedArtifactURL", options: {}, I: exports2.GetSignedArtifactURLRequest, O: exports2.GetSignedArtifactURLResponse }, - { name: "DeleteArtifact", options: {}, I: exports2.DeleteArtifactRequest, O: exports2.DeleteArtifactResponse } - ]); - } -}); - -// ../node_modules/twirp-ts/build/twirp/context.js -var require_context2 = __commonJS({ - "../node_modules/twirp-ts/build/twirp/context.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../node_modules/twirp-ts/build/twirp/hooks.js -var require_hooks = __commonJS({ - "../node_modules/twirp-ts/build/twirp/hooks.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isHook = exports2.chainHooks = void 0; - function chainHooks(...hooks) { - if (hooks.length === 0) { - return null; - } - if (hooks.length === 1) { - return hooks[0]; - } - const serverHook = { - requestReceived(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestReceived) { - continue; - } - yield hook.requestReceived(ctx); - } - }); - }, - requestPrepared(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestPrepared) { - continue; - } - console.warn("hook requestPrepared is deprecated and will be removed in the next release. Please use responsePrepared instead."); - yield hook.requestPrepared(ctx); - } - }); - }, - responsePrepared(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responsePrepared) { - continue; - } - yield hook.responsePrepared(ctx); - } - }); - }, - requestSent(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestSent) { - continue; - } - console.warn("hook requestSent is deprecated and will be removed in the next release. Please use responseSent instead."); - yield hook.requestSent(ctx); - } - }); - }, - responseSent(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responseSent) { - continue; - } - yield hook.responseSent(ctx); - } - }); - }, - requestRouted(ctx) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestRouted) { - continue; - } - yield hook.requestRouted(ctx); - } - }); - }, - error(ctx, err) { - return __awaiter3(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.error) { - continue; - } - yield hook.error(ctx, err); - } - }); - } - }; - return serverHook; - } - __name(chainHooks, "chainHooks"); - exports2.chainHooks = chainHooks; - function isHook(object) { - return "requestReceived" in object || "requestPrepared" in object || "requestSent" in object || "requestRouted" in object || "responsePrepared" in object || "responseSent" in object || "error" in object; - } - __name(isHook, "isHook"); - exports2.isHook = isHook; + exports2.Timestamp = new Timestamp$Type(); } }); -// ../node_modules/twirp-ts/build/twirp/errors.js -var require_errors2 = __commonJS({ - "../node_modules/twirp-ts/build/twirp/errors.js"(exports2) { +// ../node_modules/@actions/artifact/lib/generated/google/protobuf/wrappers.js +var require_wrappers = __commonJS({ + "../node_modules/@actions/artifact/lib/generated/google/protobuf/wrappers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isValidErrorCode = exports2.httpStatusFromErrorCode = exports2.TwirpErrorCode = exports2.BadRouteError = exports2.InternalServerErrorWith = exports2.InternalServerError = exports2.RequiredArgumentError = exports2.InvalidArgumentError = exports2.NotFoundError = exports2.TwirpError = void 0; - var TwirpError = class _TwirpError extends Error { + exports2.BytesValue = exports2.StringValue = exports2.BoolValue = exports2.UInt32Value = exports2.Int32Value = exports2.UInt64Value = exports2.Int64Value = exports2.FloatValue = exports2.DoubleValue = void 0; + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var runtime_6 = require_commonjs7(); + var runtime_7 = require_commonjs7(); + var DoubleValue$Type = class extends runtime_7.MessageType { static { - __name(this, "TwirpError"); - } - constructor(code, msg) { - super(msg); - this.code = TwirpErrorCode.Internal; - this.meta = {}; - this.code = code; - this.msg = msg; - Object.setPrototypeOf(this, _TwirpError.prototype); + __name(this, "DoubleValue$Type"); } - /** - * Adds a metadata kv to the error - * @param key - * @param value - */ - withMeta(key, value) { - this.meta[key] = value; - return this; + constructor() { + super("google.protobuf.DoubleValue", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 1 + /*ScalarType.DOUBLE*/ + } + ]); } /** - * Returns a single metadata value - * return "" if not found - * @param key + * Encode `DoubleValue` to JSON number. */ - getMeta(key) { - return this.meta[key] || ""; + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(2, message.value, "value", false, true); } /** - * Add the original error cause - * @param err - * @param addMeta + * Decode `DoubleValue` from JSON number. */ - withCause(err, addMeta = false) { - this._originalCause = err; - if (addMeta) { - this.withMeta("cause", err.message); - } - return this; + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); + return target; } - cause() { - return this._originalCause; + create(value) { + const message = { value: 0 }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; } - /** - * Returns the error representation to JSON - */ - toJSON() { - try { - return JSON.stringify({ - code: this.code, - msg: this.msg, - meta: this.meta - }); - } catch (e) { - return `{"code": "internal", "msg": "There was an error but it could not be serialized into JSON"}`; + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* double value */ + 1: + message.value = reader.double(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } + return message; } - /** - * Create a twirp error from an object - * @param obj - */ - static fromObject(obj) { - const code = obj["code"] || TwirpErrorCode.Unknown; - const msg = obj["msg"] || "unknown"; - const error = new _TwirpError(code, msg); - if (obj["meta"]) { - Object.keys(obj["meta"]).forEach((key) => { - error.withMeta(key, obj["meta"][key]); - }); - } - return error; + internalBinaryWrite(message, writer, options) { + if (message.value !== 0) + writer.tag(1, runtime_3.WireType.Bit64).double(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.TwirpError = TwirpError; - var NotFoundError = class extends TwirpError { + exports2.DoubleValue = new DoubleValue$Type(); + var FloatValue$Type = class extends runtime_7.MessageType { static { - __name(this, "NotFoundError"); - } - constructor(msg) { - super(TwirpErrorCode.NotFound, msg); + __name(this, "FloatValue$Type"); } - }; - exports2.NotFoundError = NotFoundError; - var InvalidArgumentError = class extends TwirpError { - static { - __name(this, "InvalidArgumentError"); + constructor() { + super("google.protobuf.FloatValue", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 2 + /*ScalarType.FLOAT*/ + } + ]); } - constructor(argument, validationMsg) { - super(TwirpErrorCode.InvalidArgument, argument + " " + validationMsg); - this.withMeta("argument", argument); + /** + * Encode `FloatValue` to JSON number. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(1, message.value, "value", false, true); } - }; - exports2.InvalidArgumentError = InvalidArgumentError; - var RequiredArgumentError = class extends InvalidArgumentError { - static { - __name(this, "RequiredArgumentError"); + /** + * Decode `FloatValue` from JSON number. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, void 0, "value"); + return target; } - constructor(argument) { - super(argument, "is required"); + create(value) { + const message = { value: 0 }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; } - }; - exports2.RequiredArgumentError = RequiredArgumentError; - var InternalServerError = class extends TwirpError { - static { - __name(this, "InternalServerError"); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* float value */ + 1: + message.value = reader.float(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; } - constructor(msg) { - super(TwirpErrorCode.Internal, msg); + internalBinaryWrite(message, writer, options) { + if (message.value !== 0) + writer.tag(1, runtime_3.WireType.Bit32).float(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.InternalServerError = InternalServerError; - var InternalServerErrorWith = class extends InternalServerError { + exports2.FloatValue = new FloatValue$Type(); + var Int64Value$Type = class extends runtime_7.MessageType { static { - __name(this, "InternalServerErrorWith"); - } - constructor(err) { - super(err.message); - this.withMeta("cause", err.name); - this.withCause(err); + __name(this, "Int64Value$Type"); } - }; - exports2.InternalServerErrorWith = InternalServerErrorWith; - var BadRouteError = class extends TwirpError { - static { - __name(this, "BadRouteError"); + constructor() { + super("google.protobuf.Int64Value", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + } + ]); } - constructor(msg, method, url) { - super(TwirpErrorCode.BadRoute, msg); - this.withMeta("twirp_invalid_route", method + " " + url); + /** + * Encode `Int64Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(runtime_1.ScalarType.INT64, message.value, "value", false, true); } - }; - exports2.BadRouteError = BadRouteError; - var TwirpErrorCode; - (function(TwirpErrorCode2) { - TwirpErrorCode2["Canceled"] = "canceled"; - TwirpErrorCode2["Unknown"] = "unknown"; - TwirpErrorCode2["InvalidArgument"] = "invalid_argument"; - TwirpErrorCode2["Malformed"] = "malformed"; - TwirpErrorCode2["DeadlineExceeded"] = "deadline_exceeded"; - TwirpErrorCode2["NotFound"] = "not_found"; - TwirpErrorCode2["BadRoute"] = "bad_route"; - TwirpErrorCode2["AlreadyExists"] = "already_exists"; - TwirpErrorCode2["PermissionDenied"] = "permission_denied"; - TwirpErrorCode2["Unauthenticated"] = "unauthenticated"; - TwirpErrorCode2["ResourceExhausted"] = "resource_exhausted"; - TwirpErrorCode2["FailedPrecondition"] = "failed_precondition"; - TwirpErrorCode2["Aborted"] = "aborted"; - TwirpErrorCode2["OutOfRange"] = "out_of_range"; - TwirpErrorCode2["Unimplemented"] = "unimplemented"; - TwirpErrorCode2["Internal"] = "internal"; - TwirpErrorCode2["Unavailable"] = "unavailable"; - TwirpErrorCode2["DataLoss"] = "data_loss"; - })(TwirpErrorCode = exports2.TwirpErrorCode || (exports2.TwirpErrorCode = {})); - function httpStatusFromErrorCode(code) { - switch (code) { - case TwirpErrorCode.Canceled: - return 408; - // RequestTimeout - case TwirpErrorCode.Unknown: - return 500; - // Internal Server Error - case TwirpErrorCode.InvalidArgument: - return 400; - // BadRequest - case TwirpErrorCode.Malformed: - return 400; - // BadRequest - case TwirpErrorCode.DeadlineExceeded: - return 408; - // RequestTimeout - case TwirpErrorCode.NotFound: - return 404; - // Not Found - case TwirpErrorCode.BadRoute: - return 404; - // Not Found - case TwirpErrorCode.AlreadyExists: - return 409; - // Conflict - case TwirpErrorCode.PermissionDenied: - return 403; - // Forbidden - case TwirpErrorCode.Unauthenticated: - return 401; - // Unauthorized - case TwirpErrorCode.ResourceExhausted: - return 429; - // Too Many Requests - case TwirpErrorCode.FailedPrecondition: - return 412; - // Precondition Failed - case TwirpErrorCode.Aborted: - return 409; - // Conflict - case TwirpErrorCode.OutOfRange: - return 400; - // Bad Request - case TwirpErrorCode.Unimplemented: - return 501; - // Not Implemented - case TwirpErrorCode.Internal: - return 500; - // Internal Server Error - case TwirpErrorCode.Unavailable: - return 503; - // Service Unavailable - case TwirpErrorCode.DataLoss: - return 500; - // Internal Server Error - default: - return 0; + /** + * Decode `Int64Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.INT64, runtime_2.LongType.STRING, "value"); + return target; } - } - __name(httpStatusFromErrorCode, "httpStatusFromErrorCode"); - exports2.httpStatusFromErrorCode = httpStatusFromErrorCode; - function isValidErrorCode(code) { - return httpStatusFromErrorCode(code) != 0; - } - __name(isValidErrorCode, "isValidErrorCode"); - exports2.isValidErrorCode = isValidErrorCode; - } -}); - -// ../node_modules/twirp-ts/build/twirp/request.js -var require_request3 = __commonJS({ - "../node_modules/twirp-ts/build/twirp/request.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + create(value) { + const message = { value: "0" }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 value */ + 1: + message.value = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parseTwirpPath = exports2.getRequestData = exports2.validateRequest = exports2.getContentType = exports2.TwirpContentType = void 0; - var errors_1 = require_errors2(); - var TwirpContentType; - (function(TwirpContentType2) { - TwirpContentType2[TwirpContentType2["Protobuf"] = 0] = "Protobuf"; - TwirpContentType2[TwirpContentType2["JSON"] = 1] = "JSON"; - TwirpContentType2[TwirpContentType2["Unknown"] = 2] = "Unknown"; - })(TwirpContentType = exports2.TwirpContentType || (exports2.TwirpContentType = {})); - function getContentType(mimeType) { - switch (mimeType) { - case "application/protobuf": - return TwirpContentType.Protobuf; - case "application/json": - return TwirpContentType.JSON; - default: - return TwirpContentType.Unknown; + return message; } - } - __name(getContentType, "getContentType"); - exports2.getContentType = getContentType; - function validateRequest(ctx, request, pathPrefix) { - if (request.method !== "POST") { - const msg = `unsupported method ${request.method} (only POST is allowed)`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); + internalBinaryWrite(message, writer, options) { + if (message.value !== "0") + writer.tag(1, runtime_3.WireType.Varint).int64(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - const path2 = parseTwirpPath(request.url || ""); - if (path2.pkgService !== (ctx.packageName ? ctx.packageName + "." : "") + ctx.serviceName) { - const msg = `no handler for path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); + }; + exports2.Int64Value = new Int64Value$Type(); + var UInt64Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "UInt64Value$Type"); } - if (path2.prefix !== pathPrefix) { - const msg = `invalid path prefix ${path2.prefix}, expected ${pathPrefix}, on path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); + constructor() { + super("google.protobuf.UInt64Value", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 4 + /*ScalarType.UINT64*/ + } + ]); } - const mimeContentType = request.headers["content-type"] || ""; - if (ctx.contentType === TwirpContentType.Unknown) { - const msg = `unexpected Content-Type: ${request.headers["content-type"]}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); + /** + * Encode `UInt64Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(runtime_1.ScalarType.UINT64, message.value, "value", false, true); } - return Object.assign(Object.assign({}, path2), { mimeContentType, contentType: ctx.contentType }); - } - __name(validateRequest, "validateRequest"); - exports2.validateRequest = validateRequest; - function getRequestData(req) { - return new Promise((resolve, reject) => { - const reqWithRawBody = req; - if (reqWithRawBody.rawBody instanceof Buffer) { - resolve(reqWithRawBody.rawBody); - return; - } - const chunks = []; - req.on("data", (chunk) => chunks.push(chunk)); - req.on("end", () => __awaiter3(this, void 0, void 0, function* () { - const data = Buffer.concat(chunks); - resolve(data); - })); - req.on("error", (err) => { - if (req.aborted) { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.DeadlineExceeded, "failed to read request: deadline exceeded")); - } else { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, err.message).withCause(err)); - } - }); - req.on("close", () => { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Canceled, "failed to read request: context canceled")); - }); - }); - } - __name(getRequestData, "getRequestData"); - exports2.getRequestData = getRequestData; - function parseTwirpPath(path2) { - const parts = path2.split("/"); - if (parts.length < 2) { - return { - pkgService: "", - method: "", - prefix: "" - }; + /** + * Decode `UInt64Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.UINT64, runtime_2.LongType.STRING, "value"); + return target; } - return { - method: parts[parts.length - 1], - pkgService: parts[parts.length - 2], - prefix: parts.slice(0, parts.length - 2).join("/") - }; - } - __name(parseTwirpPath, "parseTwirpPath"); - exports2.parseTwirpPath = parseTwirpPath; - } -}); - -// ../node_modules/twirp-ts/build/twirp/server.js -var require_server = __commonJS({ - "../node_modules/twirp-ts/build/twirp/server.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + create(value) { + const message = { value: "0" }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint64 value */ + 1: + message.value = reader.uint64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value !== "0") + writer.tag(1, runtime_3.WireType.Varint).uint64(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + exports2.UInt64Value = new UInt64Value$Type(); + var Int32Value$Type = class extends runtime_7.MessageType { + static { + __name(this, "Int32Value$Type"); + } + constructor() { + super("google.protobuf.Int32Value", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 5 + /*ScalarType.INT32*/ + } + ]); + } + /** + * Encode `Int32Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(5, message.value, "value", false, true); + } + /** + * Decode `Int32Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 5, void 0, "value"); + return target; + } + create(value) { + const message = { value: 0 }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 value */ + 1: + message.value = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value !== 0) + writer.tag(1, runtime_3.WireType.Varint).int32(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.writeError = exports2.TwirpServer = void 0; - var hooks_1 = require_hooks(); - var request_1 = require_request3(); - var errors_1 = require_errors2(); - var TwirpServer = class { + exports2.Int32Value = new Int32Value$Type(); + var UInt32Value$Type = class extends runtime_7.MessageType { static { - __name(this, "TwirpServer"); + __name(this, "UInt32Value$Type"); } - constructor(options) { - this.pathPrefix = "/twirp"; - this.hooks = []; - this.interceptors = []; - this.packageName = options.packageName; - this.serviceName = options.serviceName; - this.methodList = options.methodList; - this.matchRoute = options.matchRoute; - this.service = options.service; + constructor() { + super("google.protobuf.UInt32Value", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 13 + /*ScalarType.UINT32*/ + } + ]); } /** - * Returns the prefix for this server + * Encode `UInt32Value` to JSON string. */ - get prefix() { - return this.pathPrefix; + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(13, message.value, "value", false, true); } /** - * The http handler for twirp complaint endpoints - * @param options + * Decode `UInt32Value` from JSON string. */ - httpHandler(options) { - return (req, resp) => { - if ((options === null || options === void 0 ? void 0 : options.prefix) !== void 0) { - this.withPrefix(options.prefix); + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 13, void 0, "value"); + return target; + } + create(value) { + const message = { value: 0 }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* uint32 value */ + 1: + message.value = reader.uint32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - return this._httpHandler(req, resp); - }; + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value !== 0) + writer.tag(1, runtime_3.WireType.Varint).uint32(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + exports2.UInt32Value = new UInt32Value$Type(); + var BoolValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "BoolValue$Type"); + } + constructor() { + super("google.protobuf.BoolValue", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + } + ]); } /** - * Adds interceptors or hooks to the request stack - * @param middlewares + * Encode `BoolValue` to JSON bool. */ - use(...middlewares) { - middlewares.forEach((middleware) => { - if (hooks_1.isHook(middleware)) { - this.hooks.push(middleware); - return this; - } - this.interceptors.push(middleware); - }); - return this; + internalJsonWrite(message, options) { + return message.value; } /** - * Adds a prefix to the service url path - * @param prefix + * Decode `BoolValue` from JSON bool. */ - withPrefix(prefix) { - if (prefix === false) { - this.pathPrefix = ""; - } else { - this.pathPrefix = prefix; + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 8, void 0, "value"); + return target; + } + create(value) { + const message = { value: false }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool value */ + 1: + message.value = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - return this; + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value !== false) + writer.tag(1, runtime_3.WireType.Varint).bool(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + exports2.BoolValue = new BoolValue$Type(); + var StringValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "StringValue$Type"); + } + constructor() { + super("google.protobuf.StringValue", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + } + ]); } /** - * Returns the regex matching path for this twirp server + * Encode `StringValue` to JSON string. */ - matchingPath() { - const baseRegex = this.baseURI().replace(/\./g, "\\."); - return new RegExp(`${baseRegex}/(${this.methodList.join("|")})`); + internalJsonWrite(message, options) { + return message.value; } /** - * Returns the base URI for this twirp server + * Decode `StringValue` from JSON string. */ - baseURI() { - return `${this.pathPrefix}/${this.packageName ? this.packageName + "." : ""}${this.serviceName}`; + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 9, void 0, "value"); + return target; + } + create(value) { + const message = { value: "" }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string value */ + 1: + message.value = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value !== "") + writer.tag(1, runtime_3.WireType.LengthDelimited).string(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + exports2.StringValue = new StringValue$Type(); + var BytesValue$Type = class extends runtime_7.MessageType { + static { + __name(this, "BytesValue$Type"); + } + constructor() { + super("google.protobuf.BytesValue", [ + { + no: 1, + name: "value", + kind: "scalar", + T: 12 + /*ScalarType.BYTES*/ + } + ]); } /** - * Create a twirp context - * @param req - * @param res - * @private + * Encode `BytesValue` to JSON string. */ - createContext(req, res) { - return { - packageName: this.packageName, - serviceName: this.serviceName, - methodName: "", - contentType: request_1.getContentType(req.headers["content-type"]), - req, - res - }; + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(12, message.value, "value", false, true); } /** - * Twrip server http handler implementation - * @param req - * @param resp - * @private + * Decode `BytesValue` from JSON string. */ - _httpHandler(req, resp) { - return __awaiter3(this, void 0, void 0, function* () { - const ctx = this.createContext(req, resp); - try { - yield this.invokeHook("requestReceived", ctx); - const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || ""); - const handler = this.matchRoute(method, { - onMatch: /* @__PURE__ */ __name((ctx2) => { - return this.invokeHook("requestRouted", ctx2); - }, "onMatch"), - onNotFound: /* @__PURE__ */ __name(() => { - const msg = `no handler for path ${req.url}`; - throw new errors_1.BadRouteError(msg, req.method || "", req.url || ""); - }, "onNotFound") - }); - const body = yield request_1.getRequestData(req); - const response = yield handler(ctx, this.service, body, this.interceptors); - yield Promise.all([ - this.invokeHook("responsePrepared", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestPrepared", ctx) - ]); - resp.statusCode = 200; - resp.setHeader("Content-Type", mimeContentType); - resp.end(response); - } catch (e) { - yield this.invokeHook("error", ctx, mustBeTwirpError(e)); - if (!resp.headersSent) { - writeError(resp, e); - } - } finally { - yield Promise.all([ - this.invokeHook("responseSent", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestSent", ctx) - ]); + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 12, void 0, "value"); + return target; + } + create(value) { + const message = { value: new Uint8Array(0) }; + globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_5.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes value */ + 1: + message.value = reader.bytes(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.value.length) + writer.tag(1, runtime_3.WireType.LengthDelimited).bytes(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } + }; + exports2.BytesValue = new BytesValue$Type(); + } +}); + +// ../node_modules/@actions/artifact/lib/generated/results/api/v1/artifact.js +var require_artifact = __commonJS({ + "../node_modules/@actions/artifact/lib/generated/results/api/v1/artifact.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArtifactService = exports2.DeleteArtifactResponse = exports2.DeleteArtifactRequest = exports2.GetSignedArtifactURLResponse = exports2.GetSignedArtifactURLRequest = exports2.ListArtifactsResponse_MonolithArtifact = exports2.ListArtifactsResponse = exports2.ListArtifactsRequest = exports2.FinalizeArtifactResponse = exports2.FinalizeArtifactRequest = exports2.CreateArtifactResponse = exports2.CreateArtifactRequest = void 0; + var runtime_rpc_1 = require_commonjs8(); + var runtime_1 = require_commonjs7(); + var runtime_2 = require_commonjs7(); + var runtime_3 = require_commonjs7(); + var runtime_4 = require_commonjs7(); + var runtime_5 = require_commonjs7(); + var wrappers_1 = require_wrappers(); + var wrappers_2 = require_wrappers(); + var timestamp_1 = require_timestamp2(); + var CreateArtifactRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "CreateArtifactRequest$Type"); + } + constructor() { + super("github.actions.results.api.v1.CreateArtifactRequest", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "name", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { no: 4, name: "expires_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") }, + { + no: 5, + name: "version", + kind: "scalar", + T: 5 + /*ScalarType.INT32*/ + } + ]); + } + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", version: 0 }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* string name */ + 3: + message.name = reader.string(); + break; + case /* google.protobuf.Timestamp expires_at */ + 4: + message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt); + break; + case /* int32 version */ + 5: + message.version = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - }); + } + return message; } - /** - * Invoke a hook - * @param hookName - * @param ctx - * @param err - * @protected - */ - invokeHook(hookName, ctx, err) { - return __awaiter3(this, void 0, void 0, function* () { - if (this.hooks.length === 0) { - return; - } - const chainedHooks = hooks_1.chainHooks(...this.hooks); - const hook = chainedHooks === null || chainedHooks === void 0 ? void 0 : chainedHooks[hookName]; - if (hook) { - yield hook(ctx, err || new errors_1.InternalServerError("internal server error")); - } - }); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.name !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); + if (message.expiresAt) + timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.version !== 0) + writer.tag(5, runtime_1.WireType.Varint).int32(message.version); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.TwirpServer = TwirpServer; - function writeError(res, error) { - const twirpError = mustBeTwirpError(error); - res.setHeader("Content-Type", "application/json"); - res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code); - res.end(twirpError.toJSON()); - } - __name(writeError, "writeError"); - exports2.writeError = writeError; - function mustBeTwirpError(err) { - if (err instanceof errors_1.TwirpError) { - return err; - } - return new errors_1.InternalServerErrorWith(err); - } - __name(mustBeTwirpError, "mustBeTwirpError"); - } -}); - -// ../node_modules/twirp-ts/build/twirp/interceptors.js -var require_interceptors = __commonJS({ - "../node_modules/twirp-ts/build/twirp/interceptors.js"(exports2) { - "use strict"; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + exports2.CreateArtifactRequest = new CreateArtifactRequest$Type(); + var CreateArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "CreateArtifactResponse$Type"); } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + constructor() { + super("github.actions.results.api.v1.CreateArtifactResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + }, + { + no: 2, + name: "signed_upload_url", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + ]); + } + create(value) { + const message = { ok: false, signedUploadUrl: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool ok */ + 1: + message.ok = reader.bool(); + break; + case /* string signed_upload_url */ + 2: + message.signedUploadUrl = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.signedUploadUrl !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.chainInterceptors = void 0; - function chainInterceptors(...interceptors) { - if (interceptors.length === 0) { - return; + exports2.CreateArtifactResponse = new CreateArtifactResponse$Type(); + var FinalizeArtifactRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "FinalizeArtifactRequest$Type"); } - if (interceptors.length === 1) { - return interceptors[0]; + constructor() { + super("github.actions.results.api.v1.FinalizeArtifactRequest", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "name", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 4, + name: "size", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { no: 5, name: "hash", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") } + ]); } - const first = interceptors[0]; - return (ctx, request, handler) => __awaiter3(this, void 0, void 0, function* () { - let next = handler; - for (let i = interceptors.length - 1; i > 0; i--) { - next = /* @__PURE__ */ ((next2) => (ctx2, typedRequest) => { - return interceptors[i](ctx2, typedRequest, next2); - })(next); - } - return first(ctx, request, next); - }); - } - __name(chainInterceptors, "chainInterceptors"); - exports2.chainInterceptors = chainInterceptors; - } -}); - -// ../node_modules/dot-object/index.js -var require_dot_object = __commonJS({ - "../node_modules/dot-object/index.js"(exports2, module2) { - "use strict"; - function _process(v, mod) { - var i; - var r; - if (typeof mod === "function") { - r = mod(v); - if (r !== void 0) { - v = r; - } - } else if (Array.isArray(mod)) { - for (i = 0; i < mod.length; i++) { - r = mod[i](v); - if (r !== void 0) { - v = r; + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* string name */ + 3: + message.name = reader.string(); + break; + case /* int64 size */ + 4: + message.size = reader.int64().toString(); + break; + case /* google.protobuf.StringValue hash */ + 5: + message.hash = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.hash); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } + return message; } - return v; - } - __name(_process, "_process"); - function parseKey(key, val) { - if (key[0] === "-" && Array.isArray(val) && /^-\d+$/.test(key)) { - return val.length + parseInt(key, 10); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.name !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); + if (message.size !== "0") + writer.tag(4, runtime_1.WireType.Varint).int64(message.size); + if (message.hash) + wrappers_2.StringValue.internalBinaryWrite(message.hash, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - return key; - } - __name(parseKey, "parseKey"); - function isIndex(k) { - return /^\d+$/.test(k); - } - __name(isIndex, "isIndex"); - function isObject(val) { - return Object.prototype.toString.call(val) === "[object Object]"; - } - __name(isObject, "isObject"); - function isArrayOrObject(val) { - return Object(val) === val; - } - __name(isArrayOrObject, "isArrayOrObject"); - function isEmptyObject(val) { - return Object.keys(val).length === 0; - } - __name(isEmptyObject, "isEmptyObject"); - var blacklist = ["__proto__", "prototype", "constructor"]; - var blacklistFilter = /* @__PURE__ */ __name(function(part) { - return blacklist.indexOf(part) === -1; - }, "blacklistFilter"); - function parsePath(path2, sep) { - if (path2.indexOf("[") >= 0) { - path2 = path2.replace(/\[/g, sep).replace(/]/g, ""); + }; + exports2.FinalizeArtifactRequest = new FinalizeArtifactRequest$Type(); + var FinalizeArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "FinalizeArtifactResponse$Type"); } - var parts = path2.split(sep); - var check = parts.filter(blacklistFilter); - if (check.length !== parts.length) { - throw Error("Refusing to update blacklisted property " + path2); + constructor() { + super("github.actions.results.api.v1.FinalizeArtifactResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + }, + { + no: 2, + name: "artifact_id", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + } + ]); } - return parts; - } - __name(parsePath, "parsePath"); - var hasOwnProperty = Object.prototype.hasOwnProperty; - function DotObject(separator, override, useArray, useBrackets) { - if (!(this instanceof DotObject)) { - return new DotObject(separator, override, useArray, useBrackets); + create(value) { + const message = { ok: false, artifactId: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - if (typeof override === "undefined") override = false; - if (typeof useArray === "undefined") useArray = true; - if (typeof useBrackets === "undefined") useBrackets = true; - this.separator = separator || "."; - this.override = override; - this.useArray = useArray; - this.useBrackets = useBrackets; - this.keepArray = false; - this.cleanup = []; - } - __name(DotObject, "DotObject"); - var dotDefault = new DotObject(".", false, true, true); - function wrap(method) { - return function() { - return dotDefault[method].apply(dotDefault, arguments); - }; - } - __name(wrap, "wrap"); - DotObject.prototype._fill = function(a, obj, v, mod) { - var k = a.shift(); - if (a.length > 0) { - obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {}); - if (!isArrayOrObject(obj[k])) { - if (this.override) { - obj[k] = {}; - } else { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error( - "Trying to redefine `" + k + "` which is a " + typeof obj[k] - ); - } - return; - } - } - this._fill(a, obj[k], v, mod); - } else { - if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error("Trying to redefine non-empty obj['" + k + "']"); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool ok */ + 1: + message.ok = reader.bool(); + break; + case /* int64 artifact_id */ + 2: + message.artifactId = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - return; } - obj[k] = _process(v, mod); + return message; } - }; - DotObject.prototype.object = function(obj, mods) { - var self2 = this; - Object.keys(obj).forEach(function(k) { - var mod = mods === void 0 ? null : mods[k]; - var ok = parsePath(k, self2.separator).join(self2.separator); - if (ok.indexOf(self2.separator) !== -1) { - self2._fill(ok.split(self2.separator), obj, obj[k], mod); - delete obj[k]; - } else { - obj[k] = _process(obj[k], mod); - } - }); - return obj; - }; - DotObject.prototype.str = function(path2, v, obj, mod) { - var ok = parsePath(path2, this.separator).join(this.separator); - if (path2.indexOf(this.separator) !== -1) { - this._fill(ok.split(this.separator), obj, v, mod); - } else { - obj[path2] = _process(v, mod); + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.artifactId !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - return obj; }; - DotObject.prototype.pick = function(path2, obj, remove, reindexArray) { - var i; - var keys; - var val; - var key; - var cp; - keys = parsePath(path2, this.separator); - for (i = 0; i < keys.length; i++) { - key = parseKey(keys[i], obj); - if (obj && typeof obj === "object" && key in obj) { - if (i === keys.length - 1) { - if (remove) { - val = obj[key]; - if (reindexArray && Array.isArray(obj)) { - obj.splice(key, 1); - } else { - delete obj[key]; - } - if (Array.isArray(obj)) { - cp = keys.slice(0, -1).join("."); - if (this.cleanup.indexOf(cp) === -1) { - this.cleanup.push(cp); - } - } - return val; - } else { - return obj[key]; - } - } else { - obj = obj[key]; + exports2.FinalizeArtifactResponse = new FinalizeArtifactResponse$Type(); + var ListArtifactsRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsRequest$Type"); + } + constructor() { + super("github.actions.results.api.v1.ListArtifactsRequest", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { no: 3, name: "name_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_2.StringValue, "T") }, + { no: 4, name: "id_filter", kind: "message", T: /* @__PURE__ */ __name(() => wrappers_1.Int64Value, "T") } + ]); + } + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* google.protobuf.StringValue name_filter */ + 3: + message.nameFilter = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.nameFilter); + break; + case /* google.protobuf.Int64Value id_filter */ + 4: + message.idFilter = wrappers_1.Int64Value.internalBinaryRead(reader, reader.uint32(), options, message.idFilter); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - } else { - return void 0; } + return message; } - if (remove && Array.isArray(obj)) { - obj = obj.filter(function(n) { - return n !== void 0; - }); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.nameFilter) + wrappers_2.StringValue.internalBinaryWrite(message.nameFilter, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join(); + if (message.idFilter) + wrappers_1.Int64Value.internalBinaryWrite(message.idFilter, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - return obj; - }; - DotObject.prototype.delete = function(path2, obj) { - return this.remove(path2, obj, true); }; - DotObject.prototype.remove = function(path2, obj, reindexArray) { - var i; - this.cleanup = []; - if (Array.isArray(path2)) { - for (i = 0; i < path2.length; i++) { - this.pick(path2[i], obj, true, reindexArray); - } - if (!reindexArray) { - this._cleanup(obj); - } - return obj; - } else { - return this.pick(path2, obj, true, reindexArray); + exports2.ListArtifactsRequest = new ListArtifactsRequest$Type(); + var ListArtifactsResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsResponse$Type"); } - }; - DotObject.prototype._cleanup = function(obj) { - var ret; - var i; - var keys; - var root; - if (this.cleanup.length) { - for (i = 0; i < this.cleanup.length; i++) { - keys = this.cleanup[i].split("."); - root = keys.splice(0, -1).join("."); - ret = root ? this.pick(root, obj) : obj; - ret = ret[keys[0]].filter(function(v) { - return v !== void 0; - }); - this.set(this.cleanup[i], ret, obj); + constructor() { + super("github.actions.results.api.v1.ListArtifactsResponse", [ + { no: 1, name: "artifacts", kind: "message", repeat: 1, T: /* @__PURE__ */ __name(() => exports2.ListArtifactsResponse_MonolithArtifact, "T") } + ]); + } + create(value) { + const message = { artifacts: [] }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact artifacts */ + 1: + message.artifacts.push(exports2.ListArtifactsResponse_MonolithArtifact.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } } - this.cleanup = []; + return message; } - }; - DotObject.prototype.del = DotObject.prototype.remove; - DotObject.prototype.move = function(source, target, obj, mods, merge) { - if (typeof mods === "function" || Array.isArray(mods)) { - this.set(target, _process(this.pick(source, obj, true), mods), obj, merge); - } else { - merge = mods; - this.set(target, this.pick(source, obj, true), obj, merge); + internalBinaryWrite(message, writer, options) { + for (let i = 0; i < message.artifacts.length; i++) + exports2.ListArtifactsResponse_MonolithArtifact.internalBinaryWrite(message.artifacts[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - return obj; }; - DotObject.prototype.transfer = function(source, target, obj1, obj2, mods, merge) { - if (typeof mods === "function" || Array.isArray(mods)) { - this.set( - target, - _process(this.pick(source, obj1, true), mods), - obj2, - merge - ); - } else { - merge = mods; - this.set(target, this.pick(source, obj1, true), obj2, merge); + exports2.ListArtifactsResponse = new ListArtifactsResponse$Type(); + var ListArtifactsResponse_MonolithArtifact$Type = class extends runtime_5.MessageType { + static { + __name(this, "ListArtifactsResponse_MonolithArtifact$Type"); } - return obj2; - }; - DotObject.prototype.copy = function(source, target, obj1, obj2, mods, merge) { - if (typeof mods === "function" || Array.isArray(mods)) { - this.set( - target, - _process( - // clone what is picked - JSON.parse(JSON.stringify(this.pick(source, obj1, false))), - mods - ), - obj2, - merge - ); - } else { - merge = mods; - this.set(target, this.pick(source, obj1, false), obj2, merge); + constructor() { + super("github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "database_id", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { + no: 4, + name: "name", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 5, + name: "size", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ + }, + { no: 6, name: "created_at", kind: "message", T: /* @__PURE__ */ __name(() => timestamp_1.Timestamp, "T") } + ]); } - return obj2; - }; - DotObject.prototype.set = function(path2, val, obj, merge) { - var i; - var k; - var keys; - var key; - if (typeof val === "undefined") { - return obj; + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", databaseId: "0", name: "", size: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - keys = parsePath(path2, this.separator); - for (i = 0; i < keys.length; i++) { - key = keys[i]; - if (i === keys.length - 1) { - if (merge && isObject(val) && isObject(obj[key])) { - for (k in val) { - if (hasOwnProperty.call(val, k)) { - obj[key][k] = val[k]; - } - } - } else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) { - for (var j = 0; j < val.length; j++) { - obj[keys[i]].push(val[j]); - } - } else { - obj[key] = val; - } - } else if ( - // force the value to be an object - !hasOwnProperty.call(obj, key) || !isObject(obj[key]) && !Array.isArray(obj[key]) - ) { - if (/^\d+$/.test(keys[i + 1])) { - obj[key] = []; - } else { - obj[key] = {}; + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* int64 database_id */ + 3: + message.databaseId = reader.int64().toString(); + break; + case /* string name */ + 4: + message.name = reader.string(); + break; + case /* int64 size */ + 5: + message.size = reader.int64().toString(); + break; + case /* google.protobuf.Timestamp created_at */ + 6: + message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - obj = obj[key]; + return message; } - return obj; - }; - DotObject.prototype.transform = function(recipe, obj, tgt) { - obj = obj || {}; - tgt = tgt || {}; - Object.keys(recipe).forEach( - function(key) { - this.set(recipe[key], this.pick(key, obj), tgt); - }.bind(this) - ); - return tgt; - }; - DotObject.prototype.dot = function(obj, tgt, path2) { - tgt = tgt || {}; - path2 = path2 || []; - var isArray = Array.isArray(obj); - Object.keys(obj).forEach( - function(key) { - var index = isArray && this.useBrackets ? "[" + key + "]" : key; - if (isArrayOrObject(obj[key]) && (isObject(obj[key]) && !isEmptyObject(obj[key]) || Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0)) { - if (isArray && this.useBrackets) { - var previousKey = path2[path2.length - 1] || ""; - return this.dot( - obj[key], - tgt, - path2.slice(0, -1).concat(previousKey + index) - ); - } else { - return this.dot(obj[key], tgt, path2.concat(index)); - } - } else { - if (isArray && this.useBrackets) { - tgt[path2.join(this.separator).concat("[" + key + "]")] = obj[key]; - } else { - tgt[path2.concat(index).join(this.separator)] = obj[key]; - } - } - }.bind(this) - ); - return tgt; - }; - DotObject.pick = wrap("pick"); - DotObject.move = wrap("move"); - DotObject.transfer = wrap("transfer"); - DotObject.transform = wrap("transform"); - DotObject.copy = wrap("copy"); - DotObject.object = wrap("object"); - DotObject.str = wrap("str"); - DotObject.set = wrap("set"); - DotObject.delete = wrap("delete"); - DotObject.del = DotObject.remove = wrap("remove"); - DotObject.dot = wrap("dot"); - ["override", "overwrite"].forEach(function(prop) { - Object.defineProperty(DotObject, prop, { - get: /* @__PURE__ */ __name(function() { - return dotDefault.override; - }, "get"), - set: /* @__PURE__ */ __name(function(val) { - dotDefault.override = !!val; - }, "set") - }); - }); - ["useArray", "keepArray", "useBrackets"].forEach(function(prop) { - Object.defineProperty(DotObject, prop, { - get: /* @__PURE__ */ __name(function() { - return dotDefault[prop]; - }, "get"), - set: /* @__PURE__ */ __name(function(val) { - dotDefault[prop] = val; - }, "set") - }); - }); - DotObject._process = _process; - module2.exports = DotObject; - } -}); - -// ../node_modules/twirp-ts/build/twirp/http.client.js -var require_http_client = __commonJS({ - "../node_modules/twirp-ts/build/twirp/http.client.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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)) __createBinding3(result, mod, k); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.databaseId !== "0") + writer.tag(3, runtime_1.WireType.Varint).int64(message.databaseId); + if (message.name !== "") + writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.name); + if (message.size !== "0") + writer.tag(5, runtime_1.WireType.Varint).int64(message.size); + if (message.createdAt) + timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - __setModuleDefault3(result, mod); - return result; }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + exports2.ListArtifactsResponse_MonolithArtifact = new ListArtifactsResponse_MonolithArtifact$Type(); + var GetSignedArtifactURLRequest$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetSignedArtifactURLRequest$Type"); } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.FetchRPC = exports2.wrapErrorResponseToTwirpError = exports2.NodeHttpRPC = void 0; - var http = __importStar3(require("http")); - var https = __importStar3(require("https")); - var url_1 = require("url"); - var errors_1 = require_errors2(); - var NodeHttpRPC = /* @__PURE__ */ __name((options) => ({ - request(service, method, contentType, data) { - let client; - return new Promise((resolve, rejected) => { - const responseChunks = []; - const requestData = contentType === "application/protobuf" ? Buffer.from(data) : JSON.stringify(data); - const url = new url_1.URL(options.baseUrl); - const isHttps = url.protocol === "https:"; - if (isHttps) { - client = https; - } else { - client = http; + constructor() { + super("github.actions.results.api.v1.GetSignedArtifactURLRequest", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "name", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ } - const prefix = url.pathname !== "/" ? url.pathname : ""; - const req = client.request(Object.assign(Object.assign({}, options ? options : {}), { method: "POST", protocol: url.protocol, host: url.hostname, port: url.port ? url.port : isHttps ? 443 : 80, path: `${prefix}/${service}/${method}`, headers: Object.assign(Object.assign({}, options.headers ? options.headers : {}), { "Content-Type": contentType, "Content-Length": contentType === "application/protobuf" ? Buffer.byteLength(requestData) : Buffer.from(requestData).byteLength }) }), (res) => { - res.on("data", (chunk) => responseChunks.push(chunk)); - res.on("end", () => { - const data2 = Buffer.concat(responseChunks); - if (res.statusCode != 200) { - rejected(wrapErrorResponseToTwirpError(data2.toString())); - } else { - if (contentType === "application/json") { - resolve(JSON.parse(data2.toString())); - } else { - resolve(data2); - } - } - }); - res.on("error", (err) => { - rejected(err); - }); - }).on("error", (err) => { - rejected(err); - }); - req.end(requestData); - }); + ]); + } + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - }), "NodeHttpRPC"); - exports2.NodeHttpRPC = NodeHttpRPC; - function wrapErrorResponseToTwirpError(errorResponse) { - return errors_1.TwirpError.fromObject(JSON.parse(errorResponse)); - } - __name(wrapErrorResponseToTwirpError, "wrapErrorResponseToTwirpError"); - exports2.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError; - var FetchRPC = /* @__PURE__ */ __name((options) => ({ - request(service, method, contentType, data) { - return __awaiter3(this, void 0, void 0, function* () { - const headers = new Headers(options.headers); - headers.set("content-type", contentType); - const response = yield fetch(`${options.baseUrl}/${service}/${method}`, Object.assign(Object.assign({}, options), { method: "POST", headers, body: data instanceof Uint8Array ? data : JSON.stringify(data) })); - if (response.status === 200) { - if (contentType === "application/json") { - return yield response.json(); - } - return new Uint8Array(yield response.arrayBuffer()); + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* string name */ + 3: + message.name = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - throw errors_1.TwirpError.fromObject(yield response.json()); - }); + } + return message; } - }), "FetchRPC"); - exports2.FetchRPC = FetchRPC; - } -}); - -// ../node_modules/twirp-ts/build/twirp/gateway.js -var require_gateway = __commonJS({ - "../node_modules/twirp-ts/build/twirp/gateway.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar3 = 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)) __createBinding3(result, mod, k); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.name !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - __setModuleDefault3(result, mod); - return result; }; - var __awaiter3 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + exports2.GetSignedArtifactURLRequest = new GetSignedArtifactURLRequest$Type(); + var GetSignedArtifactURLResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "GetSignedArtifactURLResponse$Type"); } - __name(adopt, "adopt"); - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + constructor() { + super("github.actions.results.api.v1.GetSignedArtifactURLResponse", [ + { + no: 1, + name: "signed_url", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ } - } - __name(fulfilled, "fulfilled"); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + ]); + } + create(value) { + const message = { signedUrl: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string signed_url */ + 1: + message.signedUrl = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - __name(rejected, "rejected"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - __name(step, "step"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __rest2 = exports2 && exports2.__rest || function(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; + return message; + } + internalBinaryWrite(message, writer, options) { + if (message.signedUrl !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.signedUrl); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Gateway = exports2.Pattern = void 0; - var querystring_1 = require("querystring"); - var dotObject = __importStar3(require_dot_object()); - var request_1 = require_request3(); - var errors_1 = require_errors2(); - var http_client_1 = require_http_client(); - var server_1 = require_server(); - var Pattern; - (function(Pattern2) { - Pattern2["POST"] = "post"; - Pattern2["GET"] = "get"; - Pattern2["PATCH"] = "patch"; - Pattern2["PUT"] = "put"; - Pattern2["DELETE"] = "delete"; - })(Pattern = exports2.Pattern || (exports2.Pattern = {})); - var Gateway = class { + exports2.GetSignedArtifactURLResponse = new GetSignedArtifactURLResponse$Type(); + var DeleteArtifactRequest$Type = class extends runtime_5.MessageType { static { - __name(this, "Gateway"); + __name(this, "DeleteArtifactRequest$Type"); } - constructor(routes) { - this.routes = routes; + constructor() { + super("github.actions.results.api.v1.DeleteArtifactRequest", [ + { + no: 1, + name: "workflow_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 2, + name: "workflow_job_run_backend_id", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + }, + { + no: 3, + name: "name", + kind: "scalar", + T: 9 + /*ScalarType.STRING*/ + } + ]); } - /** - * Middleware that rewrite the current request - * to a Twirp compliant request - */ - twirpRewrite(prefix = "/twirp") { - return (req, resp, next) => { - this.rewrite(req, resp, prefix).then(() => next()).catch((e) => { - if (e instanceof errors_1.TwirpError) { - if (e.code !== errors_1.TwirpErrorCode.NotFound) { - server_1.writeError(resp, e); - } else { - next(); - } - } - }); - }; + create(value) { + const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; } - /** - * Rewrite an incoming request to a Twirp compliant request - * @param req - * @param resp - * @param prefix - */ - rewrite(req, resp, prefix = "/twirp") { - return __awaiter3(this, void 0, void 0, function* () { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const twirpUrl = `${prefix}/${route.packageName}.${route.serviceName}/${route.methodName}`; - req.url = twirpUrl; - req.originalUrl = twirpUrl; - req.method = "POST"; - req.headers["content-type"] = "application/json"; - req.rawBody = Buffer.from(JSON.stringify(body)); - if (route.responseBodyKey) { - const endFn = resp.end.bind(resp); - resp.end = function(chunk) { - if (resp.statusCode === 200) { - endFn(`{ "${route.responseBodyKey}": ${chunk} }`); - } else { - endFn(chunk); - } - }; + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string workflow_run_backend_id */ + 1: + message.workflowRunBackendId = reader.string(); + break; + case /* string workflow_job_run_backend_id */ + 2: + message.workflowJobRunBackendId = reader.string(); + break; + case /* string name */ + 3: + message.name = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } - }); + } + return message; } - /** - * Create a reverse proxy handler to - * proxy http requests to Twirp Compliant handlers - * @param httpClientOption - */ - reverseProxy(httpClientOption) { - const client = http_client_1.NodeHttpRPC(httpClientOption); - return (req, res) => __awaiter3(this, void 0, void 0, function* () { - try { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const response = yield client.request(`${route.packageName}.${route.serviceName}`, route.methodName, "application/json", body); - res.statusCode = 200; - res.setHeader("content-type", "application/json"); - let jsonResponse; - if (route.responseBodyKey) { - jsonResponse = JSON.stringify({ [route.responseBodyKey]: response }); - } else { - jsonResponse = JSON.stringify(response); - } - res.end(jsonResponse); - } catch (e) { - server_1.writeError(res, e); - } - }); + internalBinaryWrite(message, writer, options) { + if (message.workflowRunBackendId !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId); + if (message.workflowJobRunBackendId !== "") + writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId); + if (message.name !== "") + writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } - /** - * Prepares twirp body requests using http.google.annotions - * compliant spec - * - * @param req - * @param match - * @param route - * @protected - */ - prepareTwirpBody(req, match, route) { - return __awaiter3(this, void 0, void 0, function* () { - const _a = match.params, { query_string } = _a, params = __rest2(_a, ["query_string"]); - let requestBody = Object.assign({}, params); - if (query_string && route.bodyKey !== "*") { - const queryParams = this.parseQueryString(query_string); - requestBody = Object.assign(Object.assign({}, queryParams), requestBody); - } - let body = {}; - if (route.bodyKey) { - const data = yield request_1.getRequestData(req); - try { - const jsonBody = JSON.parse(data.toString() || "{}"); - if (route.bodyKey === "*") { - body = jsonBody; - } else { - body[route.bodyKey] = jsonBody; - } - } catch (e) { - const msg = "the json request could not be decoded"; - throw new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } + }; + exports2.DeleteArtifactRequest = new DeleteArtifactRequest$Type(); + var DeleteArtifactResponse$Type = class extends runtime_5.MessageType { + static { + __name(this, "DeleteArtifactResponse$Type"); + } + constructor() { + super("github.actions.results.api.v1.DeleteArtifactResponse", [ + { + no: 1, + name: "ok", + kind: "scalar", + T: 8 + /*ScalarType.BOOL*/ + }, + { + no: 2, + name: "artifact_id", + kind: "scalar", + T: 3 + /*ScalarType.INT64*/ } - return Object.assign(Object.assign({}, body), requestBody); - }); + ]); } - /** - * Matches a route - * @param req - */ - matchRoute(req) { - var _a; - const httpMethod = (_a = req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase(); - if (!httpMethod) { - throw new errors_1.BadRouteError(`method not allowed`, req.method || "", req.url || ""); - } - const routes = this.routes[httpMethod]; - for (const route of routes) { - const match = route.matcher(req.url || "/"); - if (match) { - return [match, route]; + create(value) { + const message = { ok: false, artifactId: "0" }; + globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== void 0) + (0, runtime_3.reflectionMergePartial)(this, message, value); + return message; + } + internalBinaryRead(reader, length, options, target) { + let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool ok */ + 1: + message.ok = reader.bool(); + break; + case /* int64 artifact_id */ + 2: + message.artifactId = reader.int64().toString(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } - throw new errors_1.NotFoundError(`url ${req.url} not found`); + return message; } - /** - * Parse query string - * @param queryString - */ - parseQueryString(queryString) { - const queryParams = querystring_1.parse(queryString.replace("?", "")); - return dotObject.object(queryParams); + internalBinaryWrite(message, writer, options) { + if (message.ok !== false) + writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); + if (message.artifactId !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; } }; - exports2.Gateway = Gateway; - } -}); - -// ../node_modules/twirp-ts/build/twirp/index.js -var require_twirp = __commonJS({ - "../node_modules/twirp-ts/build/twirp/index.js"(exports2) { - "use strict"; - var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() { - return m[k]; - }, "get") }); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding3(exports3, m, p); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TwirpContentType = void 0; - __exportStar2(require_context2(), exports2); - __exportStar2(require_server(), exports2); - __exportStar2(require_interceptors(), exports2); - __exportStar2(require_hooks(), exports2); - __exportStar2(require_errors2(), exports2); - __exportStar2(require_gateway(), exports2); - __exportStar2(require_http_client(), exports2); - var request_1 = require_request3(); - Object.defineProperty(exports2, "TwirpContentType", { enumerable: true, get: /* @__PURE__ */ __name(function() { - return request_1.TwirpContentType; - }, "get") }); + exports2.DeleteArtifactResponse = new DeleteArtifactResponse$Type(); + exports2.ArtifactService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.ArtifactService", [ + { name: "CreateArtifact", options: {}, I: exports2.CreateArtifactRequest, O: exports2.CreateArtifactResponse }, + { name: "FinalizeArtifact", options: {}, I: exports2.FinalizeArtifactRequest, O: exports2.FinalizeArtifactResponse }, + { name: "ListArtifacts", options: {}, I: exports2.ListArtifactsRequest, O: exports2.ListArtifactsResponse }, + { name: "GetSignedArtifactURL", options: {}, I: exports2.GetSignedArtifactURLRequest, O: exports2.GetSignedArtifactURLResponse }, + { name: "DeleteArtifact", options: {}, I: exports2.DeleteArtifactRequest, O: exports2.DeleteArtifactResponse } + ]); } }); @@ -101238,7 +103937,7 @@ var require_generated = __commonJS({ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding3(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar2(require_timestamp(), exports2); + __exportStar2(require_timestamp2(), exports2); __exportStar2(require_wrappers(), exports2); __exportStar2(require_artifact(), exports2); __exportStar2(require_artifact_twirp(), exports2); @@ -101371,7 +104070,7 @@ The following characters are not allowed in files that are uploaded due to limit }); // ../node_modules/@actions/artifact/package.json -var require_package = __commonJS({ +var require_package2 = __commonJS({ "../node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", @@ -101441,12 +104140,12 @@ var require_package = __commonJS({ }); // ../node_modules/@actions/artifact/lib/internal/shared/user-agent.js -var require_user_agent = __commonJS({ +var require_user_agent2 = __commonJS({ "../node_modules/@actions/artifact/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; - var packageJson = require_package(); + var packageJson = require_package2(); function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } @@ -101456,7 +104155,7 @@ var require_user_agent = __commonJS({ }); // ../node_modules/@actions/artifact/lib/internal/shared/errors.js -var require_errors3 = __commonJS({ +var require_errors4 = __commonJS({ "../node_modules/@actions/artifact/lib/internal/shared/errors.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -101591,9 +104290,9 @@ var require_artifact_twirp_client = __commonJS({ var auth_1 = require_auth(); var core_1 = require_core(); var generated_1 = require_generated(); - var config_1 = require_config(); - var user_agent_1 = require_user_agent(); - var errors_1 = require_errors3(); + var config_1 = require_config2(); + var user_agent_1 = require_user_agent2(); + var errors_1 = require_errors4(); var ArtifactHttpClient = class { static { __name(this, "ArtifactHttpClient"); @@ -101917,7 +104616,7 @@ var require_util9 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = void 0; var core2 = __importStar3(require_core()); - var config_1 = require_config(); + var config_1 = require_config2(); var jwt_decode_1 = __importDefault2(require_jwt_decode_cjs()); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); function getBackendIdsFromToken() { @@ -102018,11 +104717,11 @@ var require_blob_upload = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadZipToBlobStorage = void 0; var storage_blob_1 = require_dist4(); - var config_1 = require_config(); + var config_1 = require_config2(); var core2 = __importStar3(require_core()); var crypto4 = __importStar3(require("crypto")); var stream = __importStar3(require("stream")); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { return __awaiter3(this, void 0, void 0, function* () { let uploadByteCount = 0; @@ -109639,7 +112338,7 @@ var require_util10 = __commonJS({ }); // ../node_modules/readable-stream/lib/ours/errors.js -var require_errors4 = __commonJS({ +var require_errors5 = __commonJS({ "../node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; var { format, inspect, AggregateError: CustomAggregateError } = require_util10(); @@ -109989,7 +112688,7 @@ var require_validators = __commonJS({ 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 } - } = require_errors4(); + } = require_errors5(); var { normalizeEncoding } = require_util10(); var { isAsyncFunction, isArrayBufferView } = require_util10().types; var signals = {}; @@ -110492,7 +113191,7 @@ var require_utils7 = __commonJS({ var require_end_of_stream = __commonJS({ "../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { var process2 = require_process(); - var { AbortError, codes } = require_errors4(); + var { AbortError, codes } = require_errors5(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; var { kEmptyObject, once } = require_util10(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); @@ -110752,7 +113451,7 @@ var require_destroy3 = __commonJS({ aggregateTwoErrors, codes: { ERR_MULTIPLE_CALLBACK }, AbortError - } = require_errors4(); + } = require_errors5(); var { Symbol: Symbol2 } = require_primordials(); var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils7(); var kDestroy = Symbol2("kDestroy"); @@ -111116,7 +113815,7 @@ var require_add_abort_signal = __commonJS({ "../node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(exports2, module2) { "use strict"; var { SymbolDispose } = require_primordials(); - var { AbortError, codes } = require_errors4(); + var { AbortError, codes } = require_errors5(); var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils7(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; @@ -111326,7 +114025,7 @@ var require_state2 = __commonJS({ "use strict"; var { MathFloor, NumberIsInteger } = require_primordials(); var { validateInteger } = require_validators(); - var { ERR_INVALID_ARG_VALUE } = require_errors4().codes; + var { ERR_INVALID_ARG_VALUE } = require_errors5().codes; var defaultHighWaterMarkBytes = 16 * 1024; var defaultHighWaterMarkObjectMode = 16; function highWaterMarkFrom(options, isDuplex, duplexKey) { @@ -111373,7 +114072,7 @@ 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; + var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_NULL_VALUES } = require_errors5().codes; function from(Readable, iterable, opts) { let iterator; if (typeof iterable === "string" || iterable instanceof Buffer2) { @@ -111505,7 +114204,7 @@ var require_readable4 = __commonJS({ ERR_STREAM_UNSHIFT_AFTER_END_EVENT }, AbortError - } = require_errors4(); + } = require_errors5(); var { validateObject } = require_validators(); var kPaused = Symbol2("kPaused"); var { StringDecoder } = require("string_decoder"); @@ -112497,7 +115196,7 @@ var require_writable = __commonJS({ ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING - } = require_errors4().codes; + } = require_errors5().codes; var { errorOrDestroy } = destroyImpl; ObjectSetPrototypeOf(Writable.prototype, Stream.prototype); ObjectSetPrototypeOf(Writable, Stream); @@ -113124,7 +115823,7 @@ var require_duplexify = __commonJS({ var { AbortError, codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_RETURN_VALUE } - } = require_errors4(); + } = require_errors5(); var { destroyer } = require_destroy3(); var Duplex = require_duplex(); var Readable = require_readable4(); @@ -113582,7 +116281,7 @@ var require_transform = __commonJS({ "use strict"; var { ObjectSetPrototypeOf, Symbol: Symbol2 } = require_primordials(); module2.exports = Transform; - var { ERR_METHOD_NOT_IMPLEMENTED } = require_errors4().codes; + var { ERR_METHOD_NOT_IMPLEMENTED } = require_errors5().codes; var Duplex = require_duplex(); var { getHighWaterMark } = require_state2(); ObjectSetPrototypeOf(Transform.prototype, Duplex.prototype); @@ -113720,7 +116419,7 @@ var require_pipeline = __commonJS({ ERR_STREAM_PREMATURE_CLOSE }, AbortError - } = require_errors4(); + } = require_errors5(); var { validateFunction, validateAbortSignal } = require_validators(); var { isIterable, @@ -114162,7 +116861,7 @@ var require_compose = __commonJS({ var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } - } = require_errors4(); + } = require_errors5(); var eos = require_end_of_stream(); module2.exports = /* @__PURE__ */ __name(function compose(...streams) { if (streams.length === 0) { @@ -114345,7 +117044,7 @@ var require_operators = __commonJS({ var { codes: { ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE }, AbortError - } = require_errors4(); + } = require_errors5(); var { validateAbortSignal, validateInteger, validateObject } = require_validators(); var kWeakHandler = require_primordials().Symbol("kWeak"); var kResistStopPropagation = require_primordials().Symbol("kResistStopPropagation"); @@ -114819,7 +117518,7 @@ var require_stream3 = __commonJS({ var { streamReturningOperators, promiseReturningOperators } = require_operators(); var { codes: { ERR_ILLEGAL_CONSTRUCTOR } - } = require_errors4(); + } = require_errors5(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state2(); var { pipeline } = require_pipeline(); @@ -127303,7 +130002,7 @@ var require_zip2 = __commonJS({ var promises_1 = require("fs/promises"); var archiver = __importStar3(require_archiver()); var core2 = __importStar3(require_core()); - var config_1 = require_config(); + var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { static { @@ -127451,7 +130150,7 @@ var require_upload_artifact = __commonJS({ var blob_upload_1 = require_blob_upload(); var zip_1 = require_zip2(); var generated_1 = require_generated(); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); function uploadArtifact(name, files, rootDirectory, options) { return __awaiter3(this, void 0, void 0, function* () { (0, path_and_artifact_name_validation_1.validateArtifactName)(name); @@ -131968,12 +134667,12 @@ var require_download_artifact = __commonJS({ var core2 = __importStar3(require_core()); var httpClient = __importStar3(require_lib()); var unzip_stream_1 = __importDefault2(require_unzip()); - var user_agent_1 = require_user_agent(); - var config_1 = require_config(); + var user_agent_1 = require_user_agent2(); + var config_1 = require_config2(); var artifact_twirp_client_1 = require_artifact_twirp_client(); var generated_1 = require_generated(); var util_1 = require_util9(); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); var scrubQueryParameters = /* @__PURE__ */ __name((url) => { const parsed = new URL(url); parsed.search = ""; @@ -133700,10 +136399,10 @@ var require_get_artifact = __commonJS({ var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node20(); var util_1 = require_util9(); - var user_agent_1 = require_user_agent(); + var user_agent_1 = require_user_agent2(); var artifact_twirp_client_1 = require_artifact_twirp_client(); var generated_1 = require_generated(); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { var _a; return __awaiter3(this, void 0, void 0, function* () { @@ -133821,7 +136520,7 @@ var require_delete_artifact = __commonJS({ exports2.deleteArtifactInternal = exports2.deleteArtifactPublic = void 0; var core_1 = require_core(); var github_1 = require_github2(); - var user_agent_1 = require_user_agent(); + var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); var utils_12 = require_utils9(); var plugin_request_log_1 = require_dist_node20(); @@ -133830,7 +136529,7 @@ var require_delete_artifact = __commonJS({ var util_1 = require_util9(); var generated_1 = require_generated(); var get_artifact_1 = require_get_artifact(); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { var _a; return __awaiter3(this, void 0, void 0, function* () { @@ -133933,7 +136632,7 @@ var require_list_artifacts = __commonJS({ exports2.listArtifactsInternal = exports2.listArtifactsPublic = void 0; var core_1 = require_core(); var github_1 = require_github2(); - var user_agent_1 = require_user_agent(); + var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); var utils_12 = require_utils9(); var plugin_request_log_1 = require_dist_node20(); @@ -134100,13 +136799,13 @@ var require_client2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; var core_1 = require_core(); - var config_1 = require_config(); + var config_1 = require_config2(); var upload_artifact_1 = require_upload_artifact(); var download_artifact_1 = require_download_artifact(); var delete_artifact_1 = require_delete_artifact(); var get_artifact_1 = require_get_artifact(); var list_artifacts_1 = require_list_artifacts(); - var errors_1 = require_errors3(); + var errors_1 = require_errors4(); var DefaultArtifactClient = class { static { __name(this, "DefaultArtifactClient"); @@ -134248,7 +136947,7 @@ var require_artifact2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); var client_1 = require_client2(); __exportStar2(require_interfaces(), exports2); - __exportStar2(require_errors3(), exports2); + __exportStar2(require_errors4(), exports2); __exportStar2(require_client2(), exports2); var client = new client_1.DefaultArtifactClient(); exports2.default = client; @@ -134868,7 +137567,7 @@ var require_utils10 = __commonJS({ exports2.updateComment = updateComment; exports2.putReaction = putReaction; exports2.publishGitHubCheck = publishGitHubCheck; - var cache = __importStar3(require_cache2()); + var cache = __importStar3(require_cache3()); var core2 = __importStar3(require_core()); var exec = __importStar3(require_exec()); var github2 = __importStar3(require_github()); diff --git a/scan/package.json b/scan/package.json index 0ec597c0..c6936e25 100644 --- a/scan/package.json +++ b/scan/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@actions/artifact": "^2.1.11", - "@actions/cache": "^3.3.0", + "@actions/cache": "^4.0.0", "@actions/core": "^1.11.1", "@actions/exec": "^1.1.0", "@actions/github": "^6.0.0", diff --git a/vsts/vss-extension.dev.json b/vsts/vss-extension.dev.json index 2c36ad34..3a2b349d 100644 --- a/vsts/vss-extension.dev.json +++ b/vsts/vss-extension.dev.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "qodana-dev", "name": "Qodana (Dev)", - "version": "2024.2.131", + "version": "2024.2.133", "publisher": "JetBrains", "targets": [ { From 383daeeebc49cabdb5728a1bca24e26c691129e5 Mon Sep 17 00:00:00 2001 From: tiulpin Date: Mon, 9 Dec 2024 19:21:55 +0100 Subject: [PATCH 9/9] :memo: Add CODEOWNERS --- .github/CODEOWNERS | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..f676f1be --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,31 @@ +# Each line represents a rule, followed by a list of members. +# These members are the default owners for all files that match the specified pattern. +# The pattern generally follows the same syntax used for .gitignore files. +# The last matching rule always wins; those that appear lower in the file take precedence over rules that appear higher up. +# Specify owners by their username, email, or role assignment in the project. + +# Examples: + +# Member with username "john.smith" and member with email "alex@mycompany.com" +# own any JavaScript file in repository +# *.js john.smith alex@mycompany.com + +# Bob owns all files under "subdir" directory at the repository root and all its subdirectories +# /subdir/ Bob + +# All members who are assigned the Project Collaborator role own any file under docs/ directory +# anywhere in the repository, but not further nested files +# docs/* "Project Collaborator" + +# This file itself is owned by members who are assigned the Project Admin role in this project. + +.circleci/ @tiulpin +.github/ @tiulpin +common/ @tiulpin +orb/ @tiulpin +vsts/ @tiulpin +scan/ @tiulpin +*.yml @tiulpin +*.yaml @tiulpin +gradle/ @JetBrains/qodana-developers +plugin/ @JetBrains/qodana-developers \ No newline at end of file