From 03242349f62aeddc995e12c6fbcea3b87697873f Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Fri, 27 Sep 2024 08:39:15 +0800 Subject: [PATCH] feat: OCI 1.1 support (#82) Signed-off-by: Patrick Zheng --- .github/workflows/e2e-test-sign.yml | 98 ++++++ .github/workflows/e2e-test-verify.yml | 15 +- dist/setup.js | 28 +- dist/setup.js.map | 2 +- dist/sign.js | 44 ++- dist/sign.js.map | 2 +- dist/verify.js | 10 +- dist/verify.js.map | 2 +- node_modules/.package-lock.json | 14 +- .../@actions/http-client/lib/index.js | 2 +- .../@actions/http-client/lib/index.js.map | 2 +- .../@actions/http-client/lib/proxy.js | 17 +- .../@actions/http-client/lib/proxy.js.map | 2 +- .../@actions/http-client/package.json | 2 +- node_modules/@types/node/README.md | 2 +- .../@types/node/diagnostics_channel.d.ts | 8 +- node_modules/@types/node/globals.d.ts | 18 +- node_modules/@types/node/http.d.ts | 10 +- node_modules/@types/node/http2.d.ts | 291 +++++++++++++----- node_modules/@types/node/https.d.ts | 22 +- node_modules/@types/node/inspector.d.ts | 270 ++++++++++++++++ node_modules/@types/node/net.d.ts | 22 +- node_modules/@types/node/package.json | 4 +- node_modules/@types/node/stream.d.ts | 19 ++ node_modules/@types/node/test.d.ts | 85 ++++- node_modules/@types/node/util.d.ts | 13 +- package-lock.json | 16 +- package.json | 2 +- sign/action.yml | 10 + src/setup.ts | 29 +- src/sign.ts | 42 ++- src/verify.ts | 11 +- verify/action.yml | 2 + 33 files changed, 943 insertions(+), 173 deletions(-) diff --git a/.github/workflows/e2e-test-sign.yml b/.github/workflows/e2e-test-sign.yml index beeb888..d43ad71 100644 --- a/.github/workflows/e2e-test-sign.yml +++ b/.github/workflows/e2e-test-sign.yml @@ -117,6 +117,69 @@ jobs: timestamp_url: http://timestamp.digicert.com timestamp_root_cert: ./tests/e2e/sign/tsaRootCert/DigiCertTSARootSHA384.cer + - name: Sign artifact with force_referrers_tag set to true + uses: ./sign + with: + plugin_name: e2e-test-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + force_referrers_tag: 'true' + + - name: Sign artifact with force_referrers_tag set to false + uses: ./sign + with: + plugin_name: e2e-test-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + force_referrers_tag: 'false' + + - name: Sign artifact with allow_referrers_api set to true + uses: ./sign + env: + NOTATION_EXPERIMENTAL: 1 + with: + plugin_name: e2e-test-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + allow_referrers_api: 'true' + + - name: Sign with force_referrers_tag set to invalid value + continue-on-error: true + id: invalid-force_referrers_tag + uses: ./sign + env: + E2E_SIGNING_KEY: ${{ secrets.E2E_SIGNING_KEY }} + with: + plugin_name: invalid-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + force_referrers_tag: 'invalid' + - name: 'Should Fail: Sign with force_referrers_tag set to invalid value' + if: steps.invalid-force_referrers_tag.outcome != 'failure' + run: | + echo "Sign with force_referrers_tag set to invalid value should fail, but succeeded." + exit 1 + - name: Sign artifact with invalid plugin name continue-on-error: true id: invalid-plugin-name @@ -291,6 +354,21 @@ jobs: plugin_config: |- keyFile=${{ env.E2E_KEY }} + - name: Sign with older Notation and allow_referrers_api set to true + uses: ./sign + env: + NOTATION_EXPERIMENTAL: 1 + with: + plugin_name: e2e-test-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + allow_referrers_api: 'true' + - name: Sign artifact with timestamping using older Notation continue-on-error: true id: timestamping-with-older-notation @@ -310,4 +388,24 @@ jobs: if: steps.timestamping-with-older-notation.outcome != 'failure' run: | echo "Sign artifact with timestamping using older Notation should fail, but succeeded." + exit 1 + + - name: Sign artifact with force_referrers_tag set using older Notation + continue-on-error: true + id: force_referrers_tag-set-with-older-notation + uses: ./sign + with: + plugin_name: e2e-test-plugin + plugin_url: https://github.com/notaryproject/notation-action/raw/e2e-test-plugin/tests/plugin_binaries/notation-e2e-test-plugin_0.1.0_linux_amd64.tar.gz + plugin_checksum: be8d035024d3a96afb4118af32f2e201f126c7254b02f7bcffb3e3149d744fd2 + key_id: ${{ env.E2E_CERT }} + target_artifact_reference: ${{ env.target_artifact_reference }} + signature_format: cose + plugin_config: |- + keyFile=${{ env.E2E_KEY }} + force_referrers_tag: 'false' + - name: 'Should Fail: Sign artifact with force_referrers_tag set using older Notation' + if: steps.force_referrers_tag-set-with-older-notation.outcome != 'failure' + run: | + echo "Sign artifact with force_referrers_tag set using older Notation should fail, but succeeded." exit 1 \ No newline at end of file diff --git a/.github/workflows/e2e-test-verify.yml b/.github/workflows/e2e-test-verify.yml index 25d8a40..a0a461e 100644 --- a/.github/workflows/e2e-test-verify.yml +++ b/.github/workflows/e2e-test-verify.yml @@ -79,6 +79,7 @@ jobs: keyFile=${{ env.E2E_KEY }} timestamp_url: http://timestamp.digicert.com timestamp_root_cert: ./tests/e2e/sign/tsaRootCert/DigiCertTSARootSHA384.cer + force_referrers_tag: 'false' # E2E test cases on Notation Verify - name: Verify released artifact @@ -110,6 +111,18 @@ jobs: ${{ env.target_artifact_reference2 }} trust_policy: ./tests/e2e/verify/trustpolicy/trustpolicy.json trust_store: ./tests/e2e/verify/truststore + + - name: Verify with allow_referrers_api set to true + uses: ./verify + env: + NOTATION_EXPERIMENTAL: 1 + with: + target_artifact_reference: |- + ${{ env.target_artifact_reference }} + ${{ env.target_artifact_reference2 }} + trust_policy: ./tests/e2e/verify/trustpolicy/trustpolicy.json + trust_store: ./tests/e2e/verify/truststore + allow_referrers_api: 'true' - name: Verify multiple released artifacts with timestamp verification enabled uses: ./verify @@ -118,7 +131,7 @@ jobs: ${{ env.target_artifact_reference }} ${{ env.target_artifact_reference2 }} trust_policy: ./tests/e2e/verify/trustpolicy/timestampVerificationEnabled.json - trust_store: ./tests/e2e/verify/truststore + trust_store: ./tests/e2e/verify/truststore - name: Verify released artifact missing target artifact reference continue-on-error: true diff --git a/dist/setup.js b/dist/setup.js index f9d33fe..30eb049 100644 --- a/dist/setup.js +++ b/dist/setup.js @@ -45,8 +45,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.notationCLIVersion = void 0; +exports.setup = setup; const core = __importStar(require("@actions/core")); +const exec = __importStar(require("@actions/exec")); const tc = __importStar(require("@actions/tool-cache")); +const semver = __importStar(require("semver")); const checksum_1 = require("./lib/checksum"); const install_1 = require("./lib/install"); // setup sets up the Notation CLI. @@ -88,8 +93,29 @@ function setup() { } }); } +// notationCLIVersion returns the semantic version of Notation CLI +const notationCLIVersion = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: stdout } = yield exec.getExecOutput('notation', ['version']); + let versionOutput = stdout.split("\n"); + let version = ""; + for (let line of versionOutput) { + let arr = line.split(":"); + if (arr[0].toLowerCase() === "version") { + // found the version line + if (arr.length < 2) { + throw new Error("Notation CLI version is empty"); + } + version = arr[1].trim(); + break; + } + } + if (version === "") { + throw new Error("Notation CLI version is empty"); + } + return String(semver.clean(version)); +}); +exports.notationCLIVersion = notationCLIVersion; if (require.main === module) { setup(); } -module.exports = setup; //# sourceMappingURL=setup.js.map \ No newline at end of file diff --git a/dist/setup.js.map b/dist/setup.js.map index bd7c7fb..3ee54b6 100644 --- a/dist/setup.js.map +++ b/dist/setup.js.map @@ -1 +1 @@ -{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AACtC,wDAA0C;AAC1C,6CAAyD;AACzD,2CAAuD;AAEvD,kCAAkC;AAClC,SAAe,KAAK;;QAChB,IAAI,CAAC;YACD,mBAAmB;YACnB,MAAM,OAAO,GAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACjD,MAAM,YAAY,GAAW,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;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AW,EAAE,KAAK,SAAS,EAAE,CAAC;YACrC,yBAAyB;YACzB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;YACpD,CAAC;YACD,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACxB,MAAM;QACV,CAAC;IACL,CAAC;IACD,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;IACpD,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACzC,CAAC,CAAA,CAAA;AAnBY,QAAA,kBAAkB,sBAmB9B;AAGD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/dist/sign.js b/dist/sign.js index 559e25d..35c0bb7 100644 --- a/dist/sign.js +++ b/dist/sign.js @@ -53,6 +53,7 @@ const fs = __importStar(require("fs")); const semver = __importStar(require("semver")); const checksum_1 = require("./lib/checksum"); const install_1 = require("./lib/install"); +const setup_1 = require("./setup"); // plugin inputs from user const plugin_name = core.getInput('plugin_name'); if (!plugin_name) { @@ -71,6 +72,9 @@ const notationPluginBinary = `notation-${plugin_name}` + (0, install_1.getBinary function sign() { return __awaiter(this, void 0, void 0, function* () { try { + // notation CLI version + const notationVersion = yield (0, setup_1.notationCLIVersion)(); + console.log("Notation CLI version is ", notationVersion); // inputs from user const key_id = core.getInput('key_id'); const plugin_config = core.getInput('plugin_config'); @@ -79,6 +83,7 @@ function sign() { const allow_referrers_api = core.getInput('allow_referrers_api'); const timestamp_url = core.getInput('timestamp_url'); const timestamp_root_cert = core.getInput('timestamp_root_cert'); + const force_referrers_tag = core.getInput('force_referrers_tag'); // sanity check if (!key_id) { throw new Error("input key_id is required"); @@ -92,6 +97,12 @@ function sign() { if (timestamp_root_cert && !timestamp_url) { throw new Error("timestamp_root_cert is set, missing input timestamp_url"); } + if (force_referrers_tag && semver.lt(notationVersion, '1.2.0')) { + throw new Error("force_referrers_tag is only valid for Notation v1.2.0 or later"); + } + if (force_referrers_tag && force_referrers_tag.toLowerCase() !== 'true' && force_referrers_tag.toLowerCase() !== 'false') { + throw new Error(`force_referrers_tag must be set to 'true' or 'false'. Got '${force_referrers_tag}'`); + } // get list of target artifact references const targetArtifactReferenceList = []; for (let ref of target_artifact_ref.split(/\r?\n/)) { @@ -104,15 +115,33 @@ function sign() { throw new Error("input target_artifact_reference does not contain any valid reference"); } // setting up notation signing plugin - yield setupPlugin(); + yield setupPlugin(notationVersion); yield exec.getExecOutput('notation', ['plugin', 'ls']); // sign core process const pluginConfigList = getPluginConfigList(plugin_config); let notationCommand = ['sign', '--signature-format', signature_format, '--id', key_id, '--plugin', plugin_name, ...pluginConfigList]; - if (allow_referrers_api.toLowerCase() === 'true') { + if (force_referrers_tag.toLowerCase() === 'true') { + console.log("'force_referrers_tag' set to true, use referrers tag schema only"); + // use referrers tag schema only + notationCommand.push('--force-referrers-tag=true'); + } + else if (force_referrers_tag.toLowerCase() === 'false') { + console.log("'force_referrers_tag' set to false, try referrers api first"); + // try referrers api first + notationCommand.push('--force-referrers-tag=false'); + } + else if (allow_referrers_api.toLowerCase() === 'true') { // if process.env.NOTATION_EXPERIMENTAL is not set, notation would // fail the command as expected. - notationCommand.push('--allow-referrers-api'); + if (semver.lt(notationVersion, '1.2.0')) { + console.log("'allow_referrers_api' set to true, try referrers api first"); + notationCommand.push('--allow-referrers-api'); + } + else { + // Deprecated for Notation v1.2.0 or later. + console.log("'allow_referrers_api' is deprecated. Use 'force_referrers_tag' instead, try referrers api first"); + notationCommand.push('--force-referrers-tag=false'); + } } if (timestamp_url) { // sign with timestamping @@ -136,7 +165,7 @@ function sign() { }); } // setupPlugin sets up the Notation signing plugin. -function setupPlugin() { +function setupPlugin(notationVersion) { return __awaiter(this, void 0, void 0, function* () { try { console.log(`input plugin_name is ${plugin_name}`); @@ -148,11 +177,8 @@ function setupPlugin() { console.log(`plugin ${plugin_name} is already installed`); return; } - // downoad signign plugin via Notation - const { stdout: stdout } = yield exec.getExecOutput('notation', ['version']); - let versionOutput = stdout.split("\n"); - let notationVersion = semver.clean(versionOutput[2].split(":")[1].trim()); - if (semver.gte(String(notationVersion), '1.1.0')) { + // downoad signing plugin via Notation + if (semver.gte(notationVersion, '1.1.0')) { console.log("installing signing plugin via Notation..."); yield exec.getExecOutput('notation', ['plugin', 'install', '--url', plugin_url, '--sha256sum', plugin_checksum]); return; diff --git a/dist/sign.js.map b/dist/sign.js.map index 9c55574..1d15fa3 100644 --- a/dist/sign.js.map +++ b/dist/sign.js.map @@ -1 +1 @@ -{"version":3,"file":"sign.js","sourceRoot":"","sources":["../src/sign.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AACtC,oDAAsC;AACtC,wDAA0C;AAC1C,2CAA6B;AAC7B,uCAAyB;AACzB,+CAAiC;AACjC,6CAAoC;AACpC,2CAAgE;AAEhE,0BAA0B;AAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AACjD,IAAI,CAAC,WAAW,EAAE,CAAC;IACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACrD,CAAC;AACD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;IACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACpD,CAAC;AACD,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,CAAC;AACvE,IAAI,CAAC,eAAe,EAAE,CAAC;IACnB,MAAM,IAAI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EAAE,CAAC;IAC1B,IAAI,EAAE,CAAC;AACX,CAAC;AAJD,iBAAS,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/verify.js b/dist/verify.js index e3be46e..1a504b4 100644 --- a/dist/verify.js +++ b/dist/verify.js @@ -49,12 +49,17 @@ const core = __importStar(require("@actions/core")); const exec = __importStar(require("@actions/exec")); const fs = __importStar(require("fs")); const path = __importStar(require("path")); +const semver = __importStar(require("semver")); const install_1 = require("./lib/install"); +const setup_1 = require("./setup"); const X509 = "x509"; // verify verifies the target artifact with Notation function verify() { return __awaiter(this, void 0, void 0, function* () { try { + // notation CLI version + const notationVersion = yield (0, setup_1.notationCLIVersion)(); + console.log("Notation CLI version is ", notationVersion); // inputs from user const target_artifact_ref = core.getInput('target_artifact_reference'); const trust_policy = core.getInput('trust_policy'); // .github/trustpolicy/trustpolicy.json @@ -89,9 +94,12 @@ function verify() { yield exec.getExecOutput('notation', ['cert', 'ls']); // verify core process let notationCommand = ['verify', '-v']; - if (allow_referrers_api.toLowerCase() === 'true') { + if (allow_referrers_api.toLowerCase() === 'true' && semver.lt(notationVersion, '1.2.0')) { // if process.env.NOTATION_EXPERIMENTAL is not set, notation would // fail the command as expected. + // + // Deprecated for Notation v1.2.0 or later. + console.log("'allow_referrers_api' set to true, try referrers api first"); notationCommand.push('--allow-referrers-api'); } for (const ref of targetArtifactReferenceList) { diff --git a/dist/verify.js.map b/dist/verify.js.map index ada9579..282076a 100644 --- a/dist/verify.js.map +++ b/dist/verify.js.map @@ -1 +1 @@ -{"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AACtC,oDAAsC;AACtC,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA4C;AAE5C,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,oDAAoD;AACpD,SAAe,MAAM;;QACjB,IAAI,CAAC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AC;SAClC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,4DAA4D;AAC5D,SAAS,cAAc,CAAC,GAAW;IAC/B,OAAO,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAC,CAAC;SAC9D,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;SACnC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC;AAID,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,CAAC;AACb,CAAC;AAJD,iBAAS,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 0e3e760..23e7023 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "notation", - "version": "1.0.0", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { @@ -22,9 +22,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz", - "integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", + "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" @@ -66,9 +66,9 @@ } }, "node_modules/@types/node": { - "version": "22.5.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", - "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.0.tgz", + "integrity": "sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==", "dependencies": { "undici-types": "~6.19.2" } diff --git a/node_modules/@actions/http-client/lib/index.js b/node_modules/@actions/http-client/lib/index.js index f627c6a..c337ca6 100644 --- a/node_modules/@actions/http-client/lib/index.js +++ b/node_modules/@actions/http-client/lib/index.js @@ -561,7 +561,7 @@ class HttpClient { } const usingSsl = parsedUrl.protocol === 'https:'; proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `${proxyUrl.username}:${proxyUrl.password}` + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` }))); this._proxyAgentDispatcher = proxyAgent; if (usingSsl && this._ignoreSslError) { diff --git a/node_modules/@actions/http-client/lib/index.js.map b/node_modules/@actions/http-client/lib/index.js.map index 1fce6fc..2a0d1a8 100644 --- a/node_modules/@actions/http-client/lib/index.js.map +++ b/node_modules/@actions/http-client/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,2CAA4B;AAC5B,6CAA8B;AAG9B,4CAA6B;AAC7B,+CAAgC;AAChC,mCAAiC;AAEjC,IAAY,SA4BX;AA5BD,WAAY,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M,CAAA;oBAE5B,MAAM,CAAC,GAAG,CAAC,CAAA;iBACZ;qBAAM;oBACL,OAAO,CAAC,QAAQ,CAAC,CAAA;iBAClB;YACH,CAAC,CAAA,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AA7rBD,gCA6rBC;AAED,MAAM,aAAa,GAAG,CAAC,GAA2B,EAAO,EAAE,CACzD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js index d9c43ad..fac1cfc 100644 --- a/node_modules/@actions/http-client/lib/proxy.js +++ b/node_modules/@actions/http-client/lib/proxy.js @@ -16,11 +16,11 @@ function getProxyUrl(reqUrl) { })(); if (proxyVar) { try { - return new URL(proxyVar); + return new DecodedURL(proxyVar); } catch (_a) { if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new URL(`http://${proxyVar}`); + return new DecodedURL(`http://${proxyVar}`); } } else { @@ -79,4 +79,17 @@ function isLoopbackAddress(host) { hostLower.startsWith('[::1]') || hostLower.startsWith('[0:0:0:0:0:0:0:1]')); } +class DecodedURL extends URL { + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } +} //# sourceMappingURL=proxy.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.js.map b/node_modules/@actions/http-client/lib/proxy.js.map index 585c17d..0d7f8cc 100644 --- a/node_modules/@actions/http-client/lib/proxy.js.map +++ b/node_modules/@actions/http-client/lib/proxy.js.map @@ -1 +1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Q,CAAC,IAAI,gBAAgB,EAAE,CAAC;gBAClC,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC;oBAC/B,CAAC,CAAC,QAAQ,CAAC,GAAG,gBAAgB,EAAE,CAAC,CAAC,CACvC,EACD;YACA,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAnDD,kCAmDC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,CACL,SAAS,KAAK,WAAW;QACzB,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5B,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;QAC7B,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAC1C,CAAA;AACH,CAAC;AAED,MAAM,UAAW,SAAQ,GAAG;IAI1B,YAAY,GAAiB,EAAE,IAAmB;QAChD,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAChB,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QAC1D,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json index 0ae89c3..3960a83 100644 --- a/node_modules/@actions/http-client/package.json +++ b/node_modules/@actions/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@actions/http-client", - "version": "2.2.1", + "version": "2.2.3", "description": "Actions Http Client", "keywords": [ "github", diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index 955dbaf..6f726ee 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/). Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Wed, 04 Sep 2024 21:35:57 GMT + * Last updated: Wed, 25 Sep 2024 00:56:18 GMT * Dependencies: [undici-types](https://npmjs.com/package/undici-types) # Credits diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts index 180acba..1cc7486 100644 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -540,11 +540,11 @@ declare module "diagnostics_channel" { * @param args Optional arguments to pass to the function * @return The return value of the given function */ - traceCallback any>( + traceCallback any>( fn: Fn, - position: number | undefined, - context: ContextType | undefined, - thisArg: any, + position?: number, + context?: ContextType, + thisArg?: any, ...args: Parameters ): void; } diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts index ecb4f72..ed7d2d8 100644 --- a/node_modules/@types/node/globals.d.ts +++ b/node_modules/@types/node/globals.d.ts @@ -168,10 +168,26 @@ declare global { // Same as module.exports var exports: any; + interface GCFunction { + (options: { + execution?: "sync"; + flavor?: "regular" | "last-resort"; + type?: "major-snapshot" | "major" | "minor"; + filename?: string; + }): void; + (options: { + execution: "async"; + flavor?: "regular" | "last-resort"; + type?: "major-snapshot" | "major" | "minor"; + filename?: string; + }): Promise; + (options?: boolean): void; + } + /** * Only available if `--expose-gc` is passed to the process. */ - var gc: undefined | (() => void); + var gc: undefined | GCFunction; // #region borrowed // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts index b790c00..938312c 100644 --- a/node_modules/@types/node/http.d.ts +++ b/node_modules/@types/node/http.d.ts @@ -231,7 +231,7 @@ declare module "http" { } interface ServerOptions< Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse = typeof ServerResponse, + Response extends typeof ServerResponse> = typeof ServerResponse, > { /** * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. @@ -315,14 +315,14 @@ declare module "http" { } type RequestListener< Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse = typeof ServerResponse, + Response extends typeof ServerResponse> = typeof ServerResponse, > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; /** * @since v0.1.17 */ class Server< Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse = typeof ServerResponse, + Response extends typeof ServerResponse> = typeof ServerResponse, > extends NetServer { constructor(requestListener?: RequestListener); constructor(options: ServerOptions, requestListener?: RequestListener); @@ -1553,11 +1553,11 @@ declare module "http" { */ function createServer< Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse = typeof ServerResponse, + Response extends typeof ServerResponse> = typeof ServerResponse, >(requestListener?: RequestListener): Server; function createServer< Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse = typeof ServerResponse, + Response extends typeof ServerResponse> = typeof ServerResponse, >( options: ServerOptions, requestListener?: RequestListener, diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 3e98e0d..9500b08 100644 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -408,9 +408,9 @@ declare module "http2" { * }); * ``` * - * Initiates a response. When the `options.waitForTrailers` option is set, the`'wantTrailers'` event will be emitted immediately after queuing the last chunk - * of payload data to be sent. The `http2stream.sendTrailers()` method can then be - * used to sent trailing header fields to the peer. + * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. * * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. @@ -459,8 +459,8 @@ declare module "http2" { * * The optional `options.statCheck` function may be specified to give user code * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will perform an `fs.fstat()` call to - * collect details on the provided file descriptor. + * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will + * perform an `fs.fstat()` call to collect details on the provided file descriptor. * * The `offset` and `length` options may be used to limit the response to a * specific range subset. This can be used, for instance, to support HTTP Range @@ -478,7 +478,8 @@ declare module "http2" { * header fields to the peer. * * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` + * or `http2stream.close()` to close the `Http2Stream`. * * ```js * const http2 = require('node:http2'); @@ -521,9 +522,9 @@ declare module "http2" { * an opportunity to set additional content headers based on the `fs.Stat` details * of the given file: * - * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. If the `onError` callback is - * defined, then it will be called. Otherwise - * the stream will be destroyed. + * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an + * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. * * Example using a file path: * @@ -677,7 +678,8 @@ declare module "http2" { */ readonly encrypted?: boolean | undefined; /** - * A prototype-less object describing the current local settings of this `Http2Session`. The local settings are local to _this_`Http2Session` instance. + * A prototype-less object describing the current local settings of this `Http2Session`. + * The local settings are local to _this_`Http2Session` instance. * @since v8.4.0 */ readonly localSettings: Settings; @@ -692,12 +694,14 @@ declare module "http2" { readonly originSet?: string[] | undefined; /** * Indicates whether the `Http2Session` is currently waiting for acknowledgment of - * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. Will be `false` once all sent `SETTINGS` frames have been acknowledged. + * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. + * Will be `false` once all sent `SETTINGS` frames have been acknowledged. * @since v8.4.0 */ readonly pendingSettingsAck: boolean; /** - * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer. + * A prototype-less object describing the current remote settings of this`Http2Session`. + * The remote settings are set by the _connected_ HTTP/2 peer. * @since v8.4.0 */ readonly remoteSettings: Settings; @@ -1048,8 +1052,15 @@ declare module "http2" { export interface AlternativeServiceOptions { origin: number | string | url.URL; } - export interface ServerHttp2Session extends Http2Session { - readonly server: Http2Server | Http2SecureServer; + export interface ServerHttp2Session< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2Session { + readonly server: + | Http2Server + | Http2SecureServer; /** * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. * @@ -1144,17 +1155,30 @@ declare module "http2" { ): void; addListener( event: "connect", - listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + listener: ( + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ) => void, ): this; addListener( event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, ): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit( + event: "connect", + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ): boolean; emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; emit(event: string | symbol, ...args: any[]): boolean; - on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on( + event: "connect", + listener: ( + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ) => void, + ): this; on( event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, @@ -1162,7 +1186,10 @@ declare module "http2" { on(event: string | symbol, listener: (...args: any[]) => void): this; once( event: "connect", - listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + listener: ( + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ) => void, ): this; once( event: "stream", @@ -1171,7 +1198,10 @@ declare module "http2" { once(event: string | symbol, listener: (...args: any[]) => void): this; prependListener( event: "connect", - listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + listener: ( + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ) => void, ): this; prependListener( event: "stream", @@ -1180,7 +1210,10 @@ declare module "http2" { prependListener(event: string | symbol, listener: (...args: any[]) => void): this; prependOnceListener( event: "connect", - listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + listener: ( + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ) => void, ): this; prependOnceListener( event: "stream", @@ -1213,16 +1246,36 @@ declare module "http2" { createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; protocol?: "http:" | "https:" | undefined; } - export interface ServerSessionOptions extends SessionOptions { - Http1IncomingMessage?: typeof IncomingMessage | undefined; - Http1ServerResponse?: typeof ServerResponse | undefined; - Http2ServerRequest?: typeof Http2ServerRequest | undefined; - Http2ServerResponse?: typeof Http2ServerResponse | undefined; + export interface ServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SessionOptions { + Http1IncomingMessage?: Http1Request | undefined; + Http1ServerResponse?: Http1Response | undefined; + Http2ServerRequest?: Http2Request | undefined; + Http2ServerResponse?: Http2Response | undefined; } export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} - export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {} - export interface ServerOptions extends ServerSessionOptions {} - export interface SecureServerOptions extends SecureServerSessionOptions { + export interface SecureServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions, tls.TlsOptions {} + export interface ServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions {} + export interface SecureServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SecureServerSessionOptions { allowHTTP1?: boolean | undefined; origins?: string[] | undefined; } @@ -1234,16 +1287,24 @@ declare module "http2" { */ updateSettings(settings: Settings): void; } - export interface Http2Server extends net.Server, HTTP2ServerCommon { + export interface Http2Server< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.Server, HTTP2ServerCommon { addListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; addListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + addListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; addListener(event: "sessionError", listener: (err: Error) => void): this; addListener( event: "stream", @@ -1251,19 +1312,32 @@ declare module "http2" { ): this; addListener(event: "timeout", listener: () => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; + emit( + event: "checkContinue", + request: InstanceType, + response: InstanceType, + ): boolean; + emit(event: "request", request: InstanceType, response: InstanceType): boolean; + emit( + event: "session", + session: ServerHttp2Session, + ): boolean; emit(event: "sessionError", err: Error): boolean; emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; emit(event: "timeout"): boolean; emit(event: string | symbol, ...args: any[]): boolean; on( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + on( + event: "request", + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + on( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; on(event: "sessionError", listener: (err: Error) => void): this; on( event: "stream", @@ -1273,10 +1347,16 @@ declare module "http2" { on(event: string | symbol, listener: (...args: any[]) => void): this; once( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + once( + event: "request", + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + once( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; once(event: "sessionError", listener: (err: Error) => void): this; once( event: "stream", @@ -1286,13 +1366,16 @@ declare module "http2" { once(event: string | symbol, listener: (...args: any[]) => void): this; prependListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; prependListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + prependListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; prependListener(event: "sessionError", listener: (err: Error) => void): this; prependListener( event: "stream", @@ -1302,13 +1385,16 @@ declare module "http2" { prependListener(event: string | symbol, listener: (...args: any[]) => void): this; prependOnceListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; prependOnceListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + prependOnceListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; prependOnceListener( event: "stream", @@ -1317,16 +1403,24 @@ declare module "http2" { prependOnceListener(event: "timeout", listener: () => void): this; prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; } - export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon { + export interface Http2SecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.Server, HTTP2ServerCommon { addListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; addListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + addListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; addListener(event: "sessionError", listener: (err: Error) => void): this; addListener( event: "stream", @@ -1335,9 +1429,16 @@ declare module "http2" { addListener(event: "timeout", listener: () => void): this; addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; + emit( + event: "checkContinue", + request: InstanceType, + response: InstanceType, + ): boolean; + emit(event: "request", request: InstanceType, response: InstanceType): boolean; + emit( + event: "session", + session: ServerHttp2Session, + ): boolean; emit(event: "sessionError", err: Error): boolean; emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; emit(event: "timeout"): boolean; @@ -1345,10 +1446,16 @@ declare module "http2" { emit(event: string | symbol, ...args: any[]): boolean; on( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + on( + event: "request", + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + on( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; on(event: "sessionError", listener: (err: Error) => void): this; on( event: "stream", @@ -1359,10 +1466,16 @@ declare module "http2" { on(event: string | symbol, listener: (...args: any[]) => void): this; once( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + once( + event: "request", + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + once( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; once(event: "sessionError", listener: (err: Error) => void): this; once( event: "stream", @@ -1373,13 +1486,16 @@ declare module "http2" { once(event: string | symbol, listener: (...args: any[]) => void): this; prependListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; prependListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + prependListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; prependListener(event: "sessionError", listener: (err: Error) => void): this; prependListener( event: "stream", @@ -1390,13 +1506,16 @@ declare module "http2" { prependListener(event: string | symbol, listener: (...args: any[]) => void): this; prependOnceListener( event: "checkContinue", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, ): this; prependOnceListener( event: "request", - listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + listener: (request: InstanceType, response: InstanceType) => void, + ): this; + prependOnceListener( + event: "session", + listener: (session: ServerHttp2Session) => void, ): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; prependOnceListener( event: "stream", @@ -1652,7 +1771,7 @@ declare module "http2" { * passed as the second parameter to the `'request'` event. * @since v8.4.0 */ - export class Http2ServerResponse extends stream.Writable { + export class Http2ServerResponse extends stream.Writable { constructor(stream: ServerHttp2Stream); /** * See `response.socket`. @@ -1698,7 +1817,7 @@ declare module "http2" { * A reference to the original HTTP2 `request` object. * @since v15.7.0 */ - readonly req: Http2ServerRequest; + readonly req: Request; /** * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but * applies getters, setters, and methods based on HTTP/2 logic. @@ -2341,10 +2460,15 @@ declare module "http2" { export function createServer( onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, ): Http2Server; - export function createServer( - options: ServerOptions, - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2Server; + export function createServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: ServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2Server; /** * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. * @@ -2376,10 +2500,15 @@ declare module "http2" { export function createSecureServer( onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, ): Http2SecureServer; - export function createSecureServer( - options: SecureServerOptions, - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2SecureServer; + export function createSecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: SecureServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2SecureServer; /** * Returns a `ClientHttp2Session` instance. * @@ -2411,7 +2540,15 @@ declare module "http2" { * @param options Any `{@link createServer}` options can be provided. * @since v20.12.0 */ - export function performServerHandshake(socket: stream.Duplex, options?: ServerOptions): ServerHttp2Session; + export function performServerHandshake< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + socket: stream.Duplex, + options?: ServerOptions, + ): ServerHttp2Session; } declare module "node:http2" { export * from "http2"; diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts index 3a821e3..71689eb 100644 --- a/node_modules/@types/node/https.d.ts +++ b/node_modules/@types/node/https.d.ts @@ -10,7 +10,7 @@ declare module "https" { import { URL } from "node:url"; type ServerOptions< Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse = typeof http.ServerResponse, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; type RequestOptions = & http.RequestOptions @@ -34,7 +34,7 @@ declare module "https" { } interface Server< Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse = typeof http.ServerResponse, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, > extends http.Server {} /** * See `http.Server` for more information. @@ -42,7 +42,7 @@ declare module "https" { */ class Server< Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse = typeof http.ServerResponse, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, > extends tls.Server { constructor(requestListener?: http.RequestListener); constructor( @@ -119,25 +119,19 @@ declare module "https" { emit( event: "checkContinue", req: InstanceType, - res: InstanceType & { - req: InstanceType; - }, + res: InstanceType, ): boolean; emit( event: "checkExpectation", req: InstanceType, - res: InstanceType & { - req: InstanceType; - }, + res: InstanceType, ): boolean; emit(event: "clientError", err: Error, socket: Duplex): boolean; emit(event: "connect", req: InstanceType, socket: Duplex, head: Buffer): boolean; emit( event: "request", req: InstanceType, - res: InstanceType & { - req: InstanceType; - }, + res: InstanceType, ): boolean; emit(event: "upgrade", req: InstanceType, socket: Duplex, head: Buffer): boolean; on(event: string, listener: (...args: any[]) => void): this; @@ -312,11 +306,11 @@ declare module "https" { */ function createServer< Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse = typeof http.ServerResponse, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, >(requestListener?: http.RequestListener): Server; function createServer< Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse = typeof http.ServerResponse, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, >( options: ServerOptions, requestListener?: http.RequestListener, diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts index a27ab04..32d9ba4 100644 --- a/node_modules/@types/node/inspector.d.ts +++ b/node_modules/@types/node/inspector.d.ts @@ -1703,6 +1703,110 @@ declare module 'inspector' { message: string; } } + namespace Network { + /** + * Resource type as it was perceived by the rendering engine. + */ + type ResourceType = string; + /** + * Unique request identifier. + */ + type RequestId = string; + /** + * UTC time in seconds, counted from January 1, 1970. + */ + type TimeSinceEpoch = number; + /** + * Monotonically increasing time in seconds since an arbitrary point in the past. + */ + type MonotonicTime = number; + /** + * HTTP request data. + */ + interface Request { + url: string; + method: string; + headers: Headers; + } + /** + * HTTP response data. + */ + interface Response { + url: string; + status: number; + statusText: string; + headers: Headers; + } + /** + * Request / response headers as keys / values of JSON object. + */ + interface Headers { + } + interface RequestWillBeSentEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Request data. + */ + request: Request; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Timestamp. + */ + wallTime: TimeSinceEpoch; + } + interface ResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Response data. + */ + response: Response; + } + interface LoadingFailedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Error message. + */ + errorText: string; + } + interface LoadingFinishedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + } namespace NodeRuntime { interface NotifyWhenWaitingForDisconnectParameterType { enabled: boolean; @@ -2076,6 +2180,14 @@ declare module 'inspector' { */ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: 'Network.disable', callback?: (err: Error | null) => void): void; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: 'Network.enable', callback?: (err: Error | null) => void): void; /** * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. */ @@ -2185,6 +2297,16 @@ declare module 'inspector' { * (session ID is provided in attachedToWorker notification). */ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -2224,6 +2346,10 @@ declare module 'inspector' { emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; + emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; + emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; + emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; emit(event: 'NodeRuntime.waitingForDebugger'): boolean; on(event: string, listener: (...args: any[]) => void): this; @@ -2321,6 +2447,16 @@ declare module 'inspector' { * (session ID is provided in attachedToWorker notification). */ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -2428,6 +2564,16 @@ declare module 'inspector' { * (session ID is provided in attachedToWorker notification). */ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -2535,6 +2681,16 @@ declare module 'inspector' { * (session ID is provided in attachedToWorker notification). */ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -2642,6 +2798,16 @@ declare module 'inspector' { * (session ID is provided in attachedToWorker notification). */ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -2737,6 +2903,46 @@ declare module 'inspector' { * @since v11.0.0 */ const console: InspectorConsole; + + // DevTools protocol event broadcast methods + namespace Network { + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that + * the application is about to send an HTTP request. + * @since v22.6.0 + * @experimental + */ + function requestWillBeSent(params: RequestWillBeSentEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that + * HTTP response is available. + * @since v22.6.0 + * @experimental + */ + function responseReceived(params: ResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that + * HTTP request has finished loading. + * @since v22.6.0 + * @experimental + */ + function loadingFinished(params: LoadingFinishedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that + * HTTP request has failed to load. + * @since v22.7.0 + * @experimental + */ + function loadingFailed(params: LoadingFailedEventDataType): void; + } } /** @@ -2770,6 +2976,7 @@ declare module 'inspector/promises' { HeapProfiler, NodeTracing, NodeWorker, + Network, NodeRuntime, } from 'inspector'; @@ -3087,6 +3294,14 @@ declare module 'inspector/promises' { * Detached from the worker with given sessionId. */ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType): Promise; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: 'Network.disable'): Promise; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: 'Network.enable'): Promise; /** * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. */ @@ -3195,6 +3410,16 @@ declare module 'inspector/promises' { * (session ID is provided in attachedToWorker notification). */ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -3234,6 +3459,10 @@ declare module 'inspector/promises' { emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; + emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; + emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; + emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; emit(event: 'NodeRuntime.waitingForDebugger'): boolean; on(event: string, listener: (...args: any[]) => void): this; @@ -3331,6 +3560,16 @@ declare module 'inspector/promises' { * (session ID is provided in attachedToWorker notification). */ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -3438,6 +3677,16 @@ declare module 'inspector/promises' { * (session ID is provided in attachedToWorker notification). */ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -3545,6 +3794,16 @@ declare module 'inspector/promises' { * (session ID is provided in attachedToWorker notification). */ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -3652,6 +3911,16 @@ declare module 'inspector/promises' { * (session ID is provided in attachedToWorker notification). */ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; /** * This event is fired instead of `Runtime.executionContextDestroyed` when * enabled. @@ -3682,6 +3951,7 @@ declare module 'inspector/promises' { HeapProfiler, NodeTracing, NodeWorker, + Network, NodeRuntime, }; } diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index 15ed7b7..2a0148f 100644 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -29,6 +29,7 @@ declare module "net" { interface SocketConstructorOpts { fd?: number | undefined; allowHalfOpen?: boolean | undefined; + onread?: OnReadOpts | undefined; readable?: boolean | undefined; writable?: boolean | undefined; signal?: AbortSignal; @@ -37,20 +38,15 @@ declare module "net" { buffer: Uint8Array | (() => Uint8Array); /** * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. - * Return false from this function to implicitly pause() the socket. + * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. + * Return `false` from this function to implicitly `pause()` the socket. */ - callback(bytesWritten: number, buf: Uint8Array): boolean; - } - interface ConnectOpts { - /** - * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. - * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will - * still be emitted as normal and methods like pause() and resume() will also behave as expected. - */ - onread?: OnReadOpts | undefined; + callback(bytesWritten: number, buffer: Uint8Array): boolean; } - interface TcpSocketConnectOpts extends ConnectOpts { + // TODO: remove empty ConnectOpts placeholder at next major @types/node version. + /** @deprecated */ + interface ConnectOpts {} + interface TcpSocketConnectOpts { port: number; host?: string | undefined; localAddress?: string | undefined; @@ -70,7 +66,7 @@ declare module "net" { */ autoSelectFamilyAttemptTimeout?: number | undefined; } - interface IpcSocketConnectOpts extends ConnectOpts { + interface IpcSocketConnectOpts { path: string; } type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index d0b303a..00d2887 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "22.5.4", + "version": "22.7.0", "description": "TypeScript definitions for node", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "license": "MIT", @@ -212,6 +212,6 @@ "dependencies": { "undici-types": "~6.19.2" }, - "typesPublisherContentHash": "6ee9a11eba834031423800320320aa873d6bf2b6f33603c13a2aa9d90b3803ee", + "typesPublisherContentHash": "067d27779cf5362265af613cf9443a3b325093b3f6d8f87681436e663d5e5e04", "typeScriptVersion": "4.8" } \ No newline at end of file diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index a5f6ede..483d30f 100644 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -1250,6 +1250,25 @@ declare module "stream" { removeListener(event: "unpipe", listener: (src: Readable) => void): this; removeListener(event: string | symbol, listener: (...args: any[]) => void): this; } + /** + * The utility function `duplexPair` returns an Array with two items, + * each being a `Duplex` stream connected to the other side: + * + * ```js + * const [ sideA, sideB ] = duplexPair(); + * ``` + * + * Whatever is written to one stream is made readable on the other. It provides + * behavior analogous to a network connection, where the data written by the client + * becomes readable by the server, and vice-versa. + * + * The Duplex streams are symmetrical; one or the other may be used without any + * difference in behavior. + * @param options A value to pass to both {@link Duplex} constructors, + * to set options such as buffering. + * @since v22.6.0 + */ + function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; type TransformCallback = (error?: Error | null, data?: any) => void; interface TransformOptions extends DuplexOptions { construct?(this: Transform, callback: (error?: Error | null) => void): void; diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts index 91524dc..e24cfef 100644 --- a/node_modules/@types/node/test.d.ts +++ b/node_modules/@types/node/test.d.ts @@ -331,6 +331,13 @@ declare module "node:test" { * @default false */ forceExit?: boolean | undefined; + /** + * An array containing the list of glob patterns to match test files. + * This option cannot be used together with `files`. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model). + * @since v22.6.0 + */ + globPatterns?: readonly string[] | undefined; /** * Sets inspector port of test child process. * If a nullish value is provided, each process gets its own port, @@ -479,7 +486,7 @@ declare module "node:test" { /** * An object containing assertion methods bound to the test context. * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. - * @since v22.2.0 + * @since v22.2.0, v20.15.0 */ readonly assert: TestContextAssert; /** @@ -528,6 +535,12 @@ declare module "node:test" { * @param message Message to be reported. */ diagnostic(message: string): void; + /** + * The absolute path of the test file that created the current test. If a test file imports + * additional modules that generate tests, the imported tests will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; /** * The name of the test and each of its ancestors, separated by `>`. * @since v22.3.0 @@ -657,6 +670,22 @@ declare module "node:test" { deepEqual: typeof import("node:assert").deepEqual; /** * Identical to the `deepStrictEqual` function from the `node:assert` module, but bound to the test context. + * + * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a + * type annotation, otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.deepStrictEqual(actual, expected); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. + * }); + * ``` */ deepStrictEqual: typeof import("node:assert").deepStrictEqual; /** @@ -681,6 +710,22 @@ declare module "node:test" { fail: typeof import("node:assert").fail; /** * Identical to the `ifError` function from the `node:assert` module, but bound to the test context. + * + * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a + * type annotation, otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.ifError(err); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.ifError(err); // Error: 't' needs an explicit type annotation. + * }); + * ``` */ ifError: typeof import("node:assert").ifError; /** @@ -705,6 +750,22 @@ declare module "node:test" { notStrictEqual: typeof import("node:assert").notStrictEqual; /** * Identical to the `ok` function from the `node:assert` module, but bound to the test context. + * + * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a + * type annotation, otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.ok(condition); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.ok(condition)); // Error: 't' needs an explicit type annotation. + * }); + * ``` */ ok: typeof import("node:assert").ok; /** @@ -713,6 +774,22 @@ declare module "node:test" { rejects: typeof import("node:assert").rejects; /** * Identical to the `strictEqual` function from the `node:assert` module, but bound to the test context. + * + * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a + * type annotation, otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.strictEqual(actual, expected); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.strictEqual(actual, expected); // Error: 't' needs an explicit type annotation. + * }); + * ``` */ strictEqual: typeof import("node:assert").strictEqual; /** @@ -758,6 +835,12 @@ declare module "node:test" { * @since v18.7.0, v16.17.0 */ class SuiteContext { + /** + * The absolute path of the test file that created the current suite. If a test file imports + * additional modules that generate suites, the imported suites will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; /** * The name of the suite. * @since v18.8.0, v16.18.0 diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts index ab1f609..275cd6e 100644 --- a/node_modules/@types/node/util.d.ts +++ b/node_modules/@types/node/util.d.ts @@ -1520,11 +1520,14 @@ declare module "util" { type ParsedValues = & IfDefaultsTrue & (T["options"] extends ParseArgsOptionsConfig ? { - -readonly [LongOption in keyof T["options"]]: IfDefaultsFalse< - T["options"][LongOption]["multiple"], - undefined | Array>, - undefined | ExtractOptionValue - >; + -readonly [LongOption in keyof T["options"]]: + // when "default" is not undefined, the value will be present + | (T["options"][LongOption]["default"] extends {} ? never : undefined) + | IfDefaultsFalse< + T["options"][LongOption]["multiple"], + Array>, + ExtractOptionValue + >; } : {}); diff --git a/package-lock.json b/package-lock.json index aefe0b3..614d55e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "notation", - "version": "1.0.0", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "notation", - "version": "1.0.0", + "version": "1.2.0", "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.10.0", @@ -34,9 +34,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz", - "integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", + "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" @@ -78,9 +78,9 @@ } }, "node_modules/@types/node": { - "version": "22.5.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", - "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.0.tgz", + "integrity": "sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==", "dependencies": { "undici-types": "~6.19.2" } diff --git a/package.json b/package.json index d1fe2b4..e69d782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notation", - "version": "1.0.0", + "version": "1.2.0", "description": "Notation Github Actions", "scripts": { "build": "tsc --build" diff --git a/sign/action.yml b/sign/action.yml index 71b4058..6bf684c 100644 --- a/sign/action.yml +++ b/sign/action.yml @@ -63,6 +63,8 @@ inputs: ``` required: false allow_referrers_api: + deprecationMessage: |- + This field is deprecated for Notation v1.2.0 or later, and will be removed in a future release. Use 'force_referrers_tag' instead. description: |- if 'true', use the [Referrers API](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers) to store signatures in the registry, if Referrers API is not supported, automatically fallback to the [Referrers tag schema](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#referrers-tag-schema); @@ -71,6 +73,14 @@ inputs: options: 'true', 'false' required: false default: 'false' + force_referrers_tag: + description: |- + This field is only valid for Notation v1.2.0 or later. When set, ignores 'allow_referrers_api'. + if 'true' or not set (default), use the [Referrers tag schema](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#referrers-tag-schema) to store signatures in the registry; + if 'false', use the [Referrers API](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers) first, if Referrers API is not supported, + automatically fallback to the Referrers tag schema. + options: 'true', 'false' + required: false timestamp_url: description: |- RFC 3161 Timestamp Authority (TSA) server URL. diff --git a/src/setup.ts b/src/setup.ts index 8ff23b2..0ccc136 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -14,12 +14,14 @@ */ import * as core from '@actions/core'; +import * as exec from '@actions/exec'; import * as tc from '@actions/tool-cache'; +import * as semver from 'semver'; import {hash, getNotationCheckSum} from './lib/checksum'; import { getNotationDownloadURL } from './lib/install'; // setup sets up the Notation CLI. -async function setup(): Promise { +export async function setup(): Promise { try { // inputs from user const version: string = core.getInput('version'); @@ -57,8 +59,29 @@ async function setup(): Promise { } } } - -export = setup; + +// notationCLIVersion returns the semantic version of Notation CLI +export const notationCLIVersion = async (): Promise => { + const {stdout: stdout} = await exec.getExecOutput('notation', ['version']); + let versionOutput = stdout.split("\n"); + let version:string = ""; + for (let line of versionOutput) { + let arr = line.split(":") + if (arr[0].toLowerCase() === "version") { + // found the version line + if (arr.length < 2) { + throw new Error("Notation CLI version is empty") + } + version = arr[1].trim(); + break; + } + } + if (version === "") { + throw new Error("Notation CLI version is empty") + } + return String(semver.clean(version)); +} + if (require.main === module) { setup(); diff --git a/src/sign.ts b/src/sign.ts index 2cf0d2f..b4212ff 100644 --- a/src/sign.ts +++ b/src/sign.ts @@ -21,6 +21,7 @@ import * as fs from 'fs'; import * as semver from 'semver'; import {hash} from './lib/checksum'; import {getConfigHome, getBinaryExtension} from './lib/install'; +import { notationCLIVersion } from './setup'; // plugin inputs from user const plugin_name = core.getInput('plugin_name'); @@ -40,6 +41,10 @@ const notationPluginBinary = `notation-${plugin_name}` + getBinaryExtension(); // sign signs the target artifact with Notation. async function sign(): Promise { try { + // notation CLI version + const notationVersion = await notationCLIVersion(); + console.log("Notation CLI version is ", notationVersion); + // inputs from user const key_id = core.getInput('key_id'); const plugin_config = core.getInput('plugin_config'); @@ -48,6 +53,7 @@ async function sign(): Promise { const allow_referrers_api = core.getInput('allow_referrers_api'); const timestamp_url = core.getInput('timestamp_url'); const timestamp_root_cert = core.getInput('timestamp_root_cert'); + const force_referrers_tag = core.getInput('force_referrers_tag'); // sanity check if (!key_id) { @@ -62,6 +68,12 @@ async function sign(): Promise { if (timestamp_root_cert && !timestamp_url) { throw new Error("timestamp_root_cert is set, missing input timestamp_url"); } + if (force_referrers_tag && semver.lt(notationVersion, '1.2.0')) { + throw new Error("force_referrers_tag is only valid for Notation v1.2.0 or later"); + } + if (force_referrers_tag && force_referrers_tag.toLowerCase() !== 'true' && force_referrers_tag.toLowerCase() !== 'false') { + throw new Error(`force_referrers_tag must be set to 'true' or 'false'. Got '${force_referrers_tag}'`); + } // get list of target artifact references const targetArtifactReferenceList: string[] = []; @@ -76,16 +88,31 @@ async function sign(): Promise { } // setting up notation signing plugin - await setupPlugin(); + await setupPlugin(notationVersion); await exec.getExecOutput('notation', ['plugin', 'ls']); // sign core process const pluginConfigList = getPluginConfigList(plugin_config); let notationCommand: string[] = ['sign', '--signature-format', signature_format, '--id', key_id, '--plugin', plugin_name, ...pluginConfigList]; - if (allow_referrers_api.toLowerCase() === 'true') { + if (force_referrers_tag.toLowerCase() === 'true') { + console.log("'force_referrers_tag' set to true, use referrers tag schema only"); + // use referrers tag schema only + notationCommand.push('--force-referrers-tag=true'); + } else if (force_referrers_tag.toLowerCase() === 'false') { + console.log("'force_referrers_tag' set to false, try referrers api first"); + // try referrers api first + notationCommand.push('--force-referrers-tag=false'); + } else if (allow_referrers_api.toLowerCase() === 'true') { // if process.env.NOTATION_EXPERIMENTAL is not set, notation would // fail the command as expected. - notationCommand.push('--allow-referrers-api'); + if (semver.lt(notationVersion, '1.2.0')) { + console.log("'allow_referrers_api' set to true, try referrers api first"); + notationCommand.push('--allow-referrers-api'); + } else { + // Deprecated for Notation v1.2.0 or later. + console.log("'allow_referrers_api' is deprecated. Use 'force_referrers_tag' instead, try referrers api first"); + notationCommand.push('--force-referrers-tag=false'); + } } if (timestamp_url) { // sign with timestamping @@ -107,7 +134,7 @@ async function sign(): Promise { } // setupPlugin sets up the Notation signing plugin. -async function setupPlugin() { +async function setupPlugin(notationVersion: string) { try { console.log(`input plugin_name is ${plugin_name}`); console.log(`input plugin url is ${plugin_url}`); @@ -120,11 +147,8 @@ async function setupPlugin() { return; } - // downoad signign plugin via Notation - const {stdout: stdout} = await exec.getExecOutput('notation', ['version']); - let versionOutput = stdout.split("\n"); - let notationVersion = semver.clean(versionOutput[2].split(":")[1].trim()); - if (semver.gte(String(notationVersion), '1.1.0')) { + // downoad signing plugin via Notation + if (semver.gte(notationVersion, '1.1.0')) { console.log("installing signing plugin via Notation..."); await exec.getExecOutput('notation', ['plugin', 'install', '--url', plugin_url, '--sha256sum', plugin_checksum]); return; diff --git a/src/verify.ts b/src/verify.ts index 014006f..b142475 100644 --- a/src/verify.ts +++ b/src/verify.ts @@ -17,13 +17,19 @@ import * as core from '@actions/core'; import * as exec from '@actions/exec'; import * as fs from 'fs'; import * as path from 'path'; +import * as semver from 'semver'; import {getConfigHome} from './lib/install'; +import { notationCLIVersion } from './setup'; const X509 = "x509"; // verify verifies the target artifact with Notation async function verify(): Promise { try { + // notation CLI version + const notationVersion = await notationCLIVersion(); + console.log("Notation CLI version is ", notationVersion); + // inputs from user const target_artifact_ref = core.getInput('target_artifact_reference'); const trust_policy = core.getInput('trust_policy'); // .github/trustpolicy/trustpolicy.json @@ -63,9 +69,12 @@ async function verify(): Promise { // verify core process let notationCommand: string[] = ['verify', '-v']; - if (allow_referrers_api.toLowerCase() === 'true') { + if (allow_referrers_api.toLowerCase() === 'true' && semver.lt(notationVersion, '1.2.0')) { // if process.env.NOTATION_EXPERIMENTAL is not set, notation would // fail the command as expected. + // + // Deprecated for Notation v1.2.0 or later. + console.log("'allow_referrers_api' set to true, try referrers api first"); notationCommand.push('--allow-referrers-api'); } for (const ref of targetArtifactReferenceList) { diff --git a/verify/action.yml b/verify/action.yml index e5678b4..f1402bd 100644 --- a/verify/action.yml +++ b/verify/action.yml @@ -55,6 +55,8 @@ inputs: └── required: true allow_referrers_api: + deprecationMessage: |- + This field is deprecated for Notation v1.2.0 or later, and will be removed in a future release. Verify will always use the Referrers API first, if Referrers API is not supported, automatically fallback to the Referrers tag schema. description: | if 'true', use the [Referrers API](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#listing-referrers) to verify signatures, if Referrers API is not supported, automatically fallback to the [Referrers tag schema](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#referrers-tag-schema);