From 655a969b7ce8c7bdf03741957c4433a039a67870 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 12:34:30 +0000 Subject: [PATCH] Update checked-in dependencies --- node_modules/.package-lock.json | 474 +++++++++--------- node_modules/@octokit/app/dist-node/index.js | 2 +- .../@octokit/app/dist-node/index.js.map | 2 +- node_modules/@octokit/app/dist-src/version.js | 2 +- .../app/dist-types/each-repository.d.ts | 34 +- .../@octokit/app/dist-types/version.d.ts | 2 +- node_modules/@octokit/app/dist-web/index.js | 2 +- .../@octokit/app/dist-web/index.js.map | 2 +- .../@octokit/auth-token/package.json | 13 +- .../@octokit/core/dist-src/version.js | 2 +- .../@octokit/core/dist-types/index.d.ts | 4 +- .../@octokit/core/dist-types/version.d.ts | 2 +- .../node_modules/@octokit/core/package.json | 24 +- .../@octokit/graphql/dist-src/version.js | 2 +- .../@octokit/graphql/dist-types/version.d.ts | 2 +- .../@octokit/graphql/package.json | 6 +- .../plugin-paginate-rest/dist-src/version.js | 2 +- .../dist-types/version.d.ts | 2 +- .../plugin-paginate-rest/package.json | 14 +- .../before-after-hook/package.json | 15 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/@octokit/app/package.json | 16 +- .../@octokit/auth-app/dist-node/index.js | 2 +- .../@octokit/auth-app/dist-node/index.js.map | 2 +- .../@octokit/auth-app/dist-src/version.js | 2 +- .../@octokit/auth-app/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/@octokit/auth-app/package.json | 14 +- .../auth-oauth-app/dist-src/version.js | 2 +- .../auth-oauth-app/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - .../@octokit/auth-oauth-app/package.json | 14 +- .../auth-oauth-device/dist-src/version.js | 2 +- .../auth-oauth-device/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - .../@octokit/auth-oauth-device/package.json | 8 +- .../auth-oauth-user/dist-src/version.js | 2 +- .../auth-oauth-user/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - .../@octokit/auth-oauth-user/package.json | 14 +- .../auth-unauthenticated/package.json | 12 +- .../@octokit/endpoint/dist-src/version.js | 2 +- .../@octokit/endpoint/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/@octokit/endpoint/package.json | 4 +- .../@octokit/oauth-app/dist-node/index.js | 2 +- .../@octokit/oauth-app/dist-node/index.js.map | 2 +- .../@octokit/oauth-app/dist-src/version.js | 2 +- .../oauth-app/dist-types/version.d.ts | 2 +- .../@octokit/auth-token/package.json | 13 +- .../@octokit/core/dist-src/version.js | 2 +- .../@octokit/core/dist-types/index.d.ts | 4 +- .../@octokit/core/dist-types/version.d.ts | 2 +- .../node_modules/@octokit/core/package.json | 24 +- .../@octokit/graphql/dist-src/version.js | 2 +- .../@octokit/graphql/dist-types/version.d.ts | 2 +- .../@octokit/graphql/package.json | 6 +- .../before-after-hook/package.json | 15 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/@octokit/oauth-app/package.json | 22 +- .../oauth-authorization-url/dist-src/index.js | 6 +- .../oauth-authorization-url/package.json | 19 +- .../oauth-methods/dist-src/version.js | 2 +- .../oauth-methods/dist-types/version.d.ts | 2 +- .../@octokit/oauth-methods/package.json | 14 +- .../@octokit/openapi-types/package.json | 4 +- .../@octokit/openapi-types/types.d.ts | 385 +++++++++----- .../openapi-webhooks-types/package.json | 2 +- .../openapi-webhooks-types/types.d.ts | 11 +- .../@octokit/request-error/package.json | 4 +- .../@octokit/request/dist-src/version.js | 2 +- .../@octokit/request/dist-types/version.d.ts | 2 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/@octokit/request/package.json | 14 +- .../types/dist-types/EndpointDefaults.d.ts | 4 +- .../types/dist-types/EndpointInterface.d.ts | 6 +- .../types/dist-types/EndpointOptions.d.ts | 4 +- .../types/dist-types/RequestInterface.d.ts | 4 +- .../@octokit/types/dist-types/VERSION.d.ts | 2 +- .../types/dist-types/generated/Endpoints.d.ts | 9 + node_modules/@octokit/types/package.json | 12 +- .../webhooks-methods/dist-node/index.js | 2 +- .../webhooks-methods/dist-node/index.js.map | 2 +- .../webhooks-methods/dist-src/version.js | 2 +- .../webhooks-methods/dist-types/version.d.ts | 2 +- .../@octokit/webhooks-methods/package.json | 12 +- .../@octokit/webhooks/dist-bundle/index.js | 455 ++++++++--------- .../webhooks/dist-bundle/index.js.map | 8 +- .../webhooks/dist-src/concat-uint8array.js | 22 + .../{createLogger.js => create-logger.js} | 0 .../webhooks/dist-src/event-handler/index.js | 2 +- .../@octokit/webhooks/dist-src/index.js | 2 +- .../dist-src/middleware/create-middleware.js | 142 ++++++ .../middleware/node/get-missing-headers.js | 11 - .../dist-src/middleware/node/get-payload.js | 35 +- .../middleware/node/get-request-header.js | 6 + .../middleware/node/handle-response.js | 11 + .../dist-src/middleware/node/index.js | 19 +- .../dist-src/middleware/node/middleware.js | 89 ---- .../node/on-unhandled-request-default.js | 13 - .../middleware/web/get-missing-headers.js | 11 - .../middleware/web/get-request-header.js | 6 + .../middleware/web/handle-response.js | 12 + .../webhooks/dist-src/middleware/web/index.js | 19 +- .../dist-src/middleware/web/middleware.js | 103 ---- .../web/on-unhandled-request-default.js | 16 - .../dist-types/concat-uint8array.d.ts | 1 + .../{createLogger.d.ts => create-logger.d.ts} | 0 .../dist-types/event-handler/index.d.ts | 2 +- .../webhooks/dist-types/event-handler/on.d.ts | 2 +- .../dist-types/event-handler/receive.d.ts | 2 +- .../event-handler/remove-listener.d.ts | 2 +- .../generated/webhook-identifiers.d.ts | 2 +- .../@octokit/webhooks/dist-types/index.d.ts | 10 +- .../middleware/create-middleware.d.ts | 11 + .../middleware/node/get-missing-headers.d.ts | 3 - .../middleware/node/get-payload.d.ts | 1 + .../middleware/node/get-request-header.d.ts | 1 + .../middleware/node/handle-response.d.ts | 1 + .../dist-types/middleware/node/index.d.ts | 6 +- .../middleware/node/middleware.d.ts | 4 - .../node/on-unhandled-request-default.d.ts | 4 - .../webhooks/dist-types/middleware/types.d.ts | 3 +- .../middleware/web/get-missing-headers.d.ts | 1 - .../middleware/web/get-request-header.d.ts | 1 + .../middleware/web/handle-response.d.ts | 1 + .../dist-types/middleware/web/index.d.ts | 6 +- .../dist-types/middleware/web/middleware.d.ts | 3 - .../web/on-unhandled-request-default.d.ts | 1 - .../@octokit/webhooks/dist-types/types.d.ts | 8 +- .../dist-types/verify-and-receive.d.ts | 4 +- node_modules/@octokit/webhooks/package.json | 17 +- .../.github/dependabot.yml | 2 +- .../.github/workflows/ci.yml | 5 +- .../.github/workflows/package-manager-ci.yml | 3 +- .../fast-content-type-parse/README.md | 2 +- .../fast-content-type-parse/package.json | 6 +- .../test/index.test.js | 166 +++--- node_modules/octokit/dist-src/version.js | 2 +- node_modules/octokit/dist-types/version.d.ts | 2 +- .../@octokit/auth-token/package.json | 13 +- .../@octokit/core/dist-src/version.js | 2 +- .../@octokit/core/dist-types/index.d.ts | 4 +- .../@octokit/core/dist-types/version.d.ts | 2 +- .../node_modules/@octokit/core/package.json | 24 +- .../@octokit/graphql/dist-src/version.js | 2 +- .../@octokit/graphql/dist-types/version.d.ts | 2 +- .../@octokit/graphql/package.json | 6 +- .../dist-src/version.js | 2 +- .../dist-types/version.d.ts | 2 +- .../plugin-paginate-graphql/package.json | 26 +- .../plugin-paginate-rest/dist-src/version.js | 2 +- .../dist-types/version.d.ts | 2 +- .../plugin-paginate-rest/package.json | 14 +- .../dist-src/version.js | 2 +- .../dist-src/version.js.map | 2 +- .../dist-types/version.d.ts | 2 +- .../plugin-rest-endpoint-methods/package.json | 6 +- .../@octokit/plugin-retry/dist-src/version.js | 2 +- .../plugin-retry/dist-types/version.d.ts | 2 +- .../@octokit/plugin-retry/package.json | 10 +- .../plugin-throttling/dist-src/version.js | 2 +- .../plugin-throttling/dist-types/version.d.ts | 2 +- .../@octokit/plugin-throttling/package.json | 16 +- .../before-after-hook/package.json | 15 +- .../.github/workflows/release.yml | 7 +- .../.github/workflows/test.yml | 38 +- .../.github/workflows/update-prettier.yml | 2 +- .../universal-user-agent/SECURITY.md | 5 + .../universal-user-agent/index.test.js | 40 ++ .../universal-user-agent/package.json | 11 +- .../node_modules/universal-user-agent/test.js | 8 - node_modules/octokit/package.json | 25 +- 221 files changed, 2272 insertions(+), 1525 deletions(-) create mode 100644 node_modules/@octokit/app/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/app/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/app/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/auth-app/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/auth-app/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/auth-app/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/oauth-app/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/oauth-app/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/oauth-app/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/test.js create mode 100644 node_modules/@octokit/webhooks/dist-src/concat-uint8array.js rename node_modules/@octokit/webhooks/dist-src/{createLogger.js => create-logger.js} (100%) create mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/create-middleware.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js create mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/node/get-request-header.js create mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/node/handle-response.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/web/get-missing-headers.js create mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/web/get-request-header.js create mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/web/handle-response.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/web/middleware.js delete mode 100644 node_modules/@octokit/webhooks/dist-src/middleware/web/on-unhandled-request-default.js create mode 100644 node_modules/@octokit/webhooks/dist-types/concat-uint8array.d.ts rename node_modules/@octokit/webhooks/dist-types/{createLogger.d.ts => create-logger.d.ts} (100%) create mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/create-middleware.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/node/get-missing-headers.d.ts create mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/node/get-request-header.d.ts create mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/node/handle-response.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/node/middleware.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/node/on-unhandled-request-default.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/web/get-missing-headers.d.ts create mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/web/get-request-header.d.ts create mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/web/handle-response.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/web/middleware.d.ts delete mode 100644 node_modules/@octokit/webhooks/dist-types/middleware/web/on-unhandled-request-default.d.ts create mode 100644 node_modules/octokit/node_modules/universal-user-agent/SECURITY.md create mode 100644 node_modules/octokit/node_modules/universal-user-agent/index.test.js delete mode 100644 node_modules/octokit/node_modules/universal-user-agent/test.js diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 0df2dde4a..7958b4ad6 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1151,165 +1151,165 @@ } }, "node_modules/@octokit/app": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@octokit/app/-/app-15.1.6.tgz", - "integrity": "sha512-WELCamoCJo9SN0lf3SWZccf68CF0sBNPQuLYmZ/n87p5qvBJDe9aBtr5dHkh7T9nxWZ608pizwsUbypSzZAiUw==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@octokit/app/-/app-16.0.1.tgz", + "integrity": "sha512-kgTeTsWmpUX+s3Fs4EK4w1K+jWCDB6ClxLSWUWTyhlw7+L3jHtuXDR4QtABu2GsmCMdk67xRhruiXotS3ay3Yw==", "dependencies": { - "@octokit/auth-app": "^7.2.1", - "@octokit/auth-unauthenticated": "^6.1.3", - "@octokit/core": "^6.1.5", - "@octokit/oauth-app": "^7.1.6", - "@octokit/plugin-paginate-rest": "^12.0.0", + "@octokit/auth-app": "^8.0.1", + "@octokit/auth-unauthenticated": "^7.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-app": "^8.0.1", + "@octokit/plugin-paginate-rest": "^13.0.0", "@octokit/types": "^14.0.0", - "@octokit/webhooks": "^13.6.1" + "@octokit/webhooks": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/app/node_modules/@octokit/auth-token": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", - "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", + "integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==", "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/app/node_modules/@octokit/core": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.5.tgz", - "integrity": "sha512-vvmsN0r7rguA+FySiCsbaTTobSftpIDIpPW81trAmsv9TGxg3YCujAxRYp/Uy8xmDgYCzzgulG62H7KYUFmeIg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.2.tgz", + "integrity": "sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/app/node_modules/@octokit/graphql": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.2.tgz", - "integrity": "sha512-Yi8hcoqsrXGdt0yObxbebHXFOiUA+2v3n53epuOg1QUgOB6c4XzvisBNVXJSl8RYA5KrDuSL2yq9Qmqe5N0ryA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz", + "integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-12.0.0.tgz", - "integrity": "sha512-MPd6WK1VtZ52lFrgZ0R2FlaoiWllzgqFHaSZxvp72NmoDeZ0m8GeJdg4oB6ctqMTYyrnDYp592Xma21mrgiyDA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.0.1.tgz", + "integrity": "sha512-m1KvHlueScy4mQJWvFDCxFBTIdXS0K1SgFGLmqHyX90mZdCIv6gWBbKRhatxRjhGlONuTK/hztYdaqrTXcFZdQ==", "dependencies": { - "@octokit/types": "^14.0.0" + "@octokit/types": "^14.1.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { "@octokit/core": ">=6" } }, "node_modules/@octokit/app/node_modules/before-after-hook": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", - "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", + "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==" }, "node_modules/@octokit/app/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/auth-app": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.2.1.tgz", - "integrity": "sha512-4jaopCVOtWN0V8qCx/1s2pkRqC6tcvIQM3kFB99eIpsP53GfsoIKO08D94b83n/V3iGihHmxWR2lXzE0NicUGg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-8.0.1.tgz", + "integrity": "sha512-P2J5pB3pjiGwtJX4WqJVYCtNkcZ+j5T2Wm14aJAEIC3WJOrv12jvBley3G1U/XI8q9o1A7QMG54LiFED2BiFlg==", "dependencies": { - "@octokit/auth-oauth-app": "^8.1.4", - "@octokit/auth-oauth-user": "^5.1.4", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-oauth-app": "^9.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", "toad-cache": "^3.7.0", "universal-github-app-jwt": "^2.2.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/auth-app/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/auth-oauth-app": { - "version": "8.1.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.4.tgz", - "integrity": "sha512-71iBa5SflSXcclk/OL3lJzdt4iFs56OJdpBGEBl1wULp7C58uiswZLV6TdRaiAzHP1LT8ezpbHlKuxADb+4NkQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-9.0.1.tgz", + "integrity": "sha512-TthWzYxuHKLAbmxdFZwFlmwVyvynpyPmjwc+2/cI3cvbT7mHtsAW9b1LvQaNnAuWL+pFnqtxdmrU8QpF633i1g==", "dependencies": { - "@octokit/auth-oauth-device": "^7.1.5", - "@octokit/auth-oauth-user": "^5.1.4", - "@octokit/request": "^9.2.3", + "@octokit/auth-oauth-device": "^8.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/auth-oauth-device": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.5.tgz", - "integrity": "sha512-lR00+k7+N6xeECj0JuXeULQ2TSBB/zjTAmNF2+vyGPDEFx1dgk1hTDmL13MjbSmzusuAmuJD8Pu39rjp9jH6yw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-8.0.1.tgz", + "integrity": "sha512-TOqId/+am5yk9zor0RGibmlqn4V0h8vzjxlw/wYr3qzkQxl8aBPur384D1EyHtqvfz0syeXji4OUvKkHvxk/Gw==", "dependencies": { - "@octokit/oauth-methods": "^5.1.5", - "@octokit/request": "^9.2.3", + "@octokit/oauth-methods": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/auth-oauth-user": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.4.tgz", - "integrity": "sha512-4tJRofMHm6ZCd3O2PVgboBbQ/lNtacREeaihet0+wCATZmvPK+jjg2K6NjBfY69An3yzQdmkcMeiaOOoxOPr7Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-6.0.0.tgz", + "integrity": "sha512-GV9IW134PHsLhtUad21WIeP9mlJ+QNpFd6V9vuPWmaiN25HEJeEQUcS4y5oRuqCm9iWDLtfIs+9K8uczBXKr6A==", "dependencies": { - "@octokit/auth-oauth-device": "^7.1.5", - "@octokit/oauth-methods": "^5.1.5", - "@octokit/request": "^9.2.3", + "@octokit/auth-oauth-device": "^8.0.1", + "@octokit/oauth-methods": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/auth-token": { "version": "4.0.0", @@ -1320,15 +1320,15 @@ } }, "node_modules/@octokit/auth-unauthenticated": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-6.1.3.tgz", - "integrity": "sha512-d5gWJla3WdSl1yjbfMpET+hUSFCE15qM0KVSB0H1shyuJihf/RL1KqWoZMIaonHvlNojkL9XtLFp8QeLe+1iwA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-7.0.1.tgz", + "integrity": "sha512-qVq1vdjLLZdE8kH2vDycNNjuJRCD1q2oet1nA/GXWaYlpDxlR7rdVhX/K/oszXslXiQIiqrQf+rdhDlA99JdTQ==", "dependencies": { - "@octokit/request-error": "^6.1.8", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/core": { @@ -1401,21 +1401,21 @@ } }, "node_modules/@octokit/endpoint": { - "version": "10.1.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.4.tgz", - "integrity": "sha512-OlYOlZIsfEVZm5HCSR8aSg02T2lbUWOsCQoPKfTXJwDzcHQBrVBGdGXb89dv2Kw2ToZaRtudp8O3ZIYoaOjKlA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz", + "integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==", "dependencies": { "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.2" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/endpoint/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/graphql": { "version": "7.1.1", @@ -1483,102 +1483,102 @@ } }, "node_modules/@octokit/oauth-app": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-7.1.6.tgz", - "integrity": "sha512-OMcMzY2WFARg80oJNFwWbY51TBUfLH4JGTy119cqiDawSFXSIBujxmpXiKbGWQlvfn0CxE6f7/+c6+Kr5hI2YA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-8.0.1.tgz", + "integrity": "sha512-QnhMYEQpnYbEPn9cae+wXL2LuPMFglmfeuDJXXsyxIXdoORwkLK8y0cHhd/5du9MbO/zdG/BXixzB7EEwU63eQ==", "dependencies": { - "@octokit/auth-oauth-app": "^8.1.3", - "@octokit/auth-oauth-user": "^5.1.3", - "@octokit/auth-unauthenticated": "^6.1.2", - "@octokit/core": "^6.1.4", - "@octokit/oauth-authorization-url": "^7.1.1", - "@octokit/oauth-methods": "^5.1.4", + "@octokit/auth-oauth-app": "^9.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/auth-unauthenticated": "^7.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-authorization-url": "^8.0.0", + "@octokit/oauth-methods": "^6.0.0", "@types/aws-lambda": "^8.10.83", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/oauth-app/node_modules/@octokit/auth-token": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", - "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", + "integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==", "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/oauth-app/node_modules/@octokit/core": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.5.tgz", - "integrity": "sha512-vvmsN0r7rguA+FySiCsbaTTobSftpIDIpPW81trAmsv9TGxg3YCujAxRYp/Uy8xmDgYCzzgulG62H7KYUFmeIg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.2.tgz", + "integrity": "sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/oauth-app/node_modules/@octokit/graphql": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.2.tgz", - "integrity": "sha512-Yi8hcoqsrXGdt0yObxbebHXFOiUA+2v3n53epuOg1QUgOB6c4XzvisBNVXJSl8RYA5KrDuSL2yq9Qmqe5N0ryA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz", + "integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/oauth-app/node_modules/before-after-hook": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", - "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", + "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==" }, "node_modules/@octokit/oauth-app/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/oauth-authorization-url": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.1.1.tgz", - "integrity": "sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-8.0.0.tgz", + "integrity": "sha512-7QoLPRh/ssEA/HuHBHdVdSgF8xNLz/Bc5m9fZkArJE5bb6NmVkDm3anKxXPmN1zh6b5WKZPRr3697xKT/yM3qQ==", "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/oauth-methods": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.5.tgz", - "integrity": "sha512-Ev7K8bkYrYLhoOSZGVAGsLEscZQyq7XQONCBBAl2JdMg7IT3PQn/y8P0KjloPoYpI5UylqYrLeUcScaYWXwDvw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-6.0.0.tgz", + "integrity": "sha512-Q8nFIagNLIZgM2odAraelMcDssapc+lF+y3OlcIPxyAU+knefO8KmozGqfnma1xegRDP4z5M73ABsamn72bOcA==", "dependencies": { - "@octokit/oauth-authorization-url": "^7.0.0", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/oauth-authorization-url": "^8.0.0", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/openapi-types": { - "version": "25.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.0.0.tgz", - "integrity": "sha512-FZvktFu7HfOIJf2BScLKIEYjDsw6RKc7rBJCdvCTfKsVnx2GEB/Nbzjr29DUdb7vQhlzS/j8qDzdditP0OC6aw==" + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.1.0.tgz", + "integrity": "sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA==" }, "node_modules/@octokit/openapi-webhooks-types": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-10.4.0.tgz", - "integrity": "sha512-HMiF7FUiVBYfp8pPijMTkWuPELQB6XkPftrnSuK1C1YXaaq2+0ganiQkorEQfXTmhtwlgHJwXT6P8miVhIyjQA==" + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-11.0.0.tgz", + "integrity": "sha512-ZBzCFj98v3SuRM7oBas6BHZMJRadlnDoeFfvm1olVxZnYeU6Vh97FhPxyS5aLh5pN51GYv2I51l/hVUAVkGBlA==" }, "node_modules/@octokit/plugin-paginate-rest": { "version": "2.21.3", @@ -1681,63 +1681,63 @@ } }, "node_modules/@octokit/request": { - "version": "9.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.3.tgz", - "integrity": "sha512-Ma+pZU8PXLOEYzsWf0cn/gY+ME57Wq8f49WTXA8FMHp2Ps9djKw//xYJ1je8Hm0pR2lU9FUGeJRWOtxq6olt4w==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz", + "integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==", "dependencies": { - "@octokit/endpoint": "^10.1.4", - "@octokit/request-error": "^6.1.8", + "@octokit/endpoint": "^11.0.0", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^2.0.0", + "fast-content-type-parse": "^3.0.0", "universal-user-agent": "^7.0.2" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/request-error": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.8.tgz", - "integrity": "sha512-WEi/R0Jmq+IJKydWlKDmryPcmdYSVjL3ekaiEL1L9eo1sUnqMJ+grqmC9cjk7CA7+b2/T397tO5d8YLOH3qYpQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz", + "integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==", "dependencies": { "@octokit/types": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/request/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/@octokit/types": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.0.0.tgz", - "integrity": "sha512-VVmZP0lEhbo2O1pdq63gZFiGCKkm8PPp8AUOijlwPO6hojEVjspA0MWKP7E4hbvGxzFKNqKr6p0IYtOH/Wf/zA==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.1.0.tgz", + "integrity": "sha512-1y6DgTy8Jomcpu33N+p5w58l6xyt55Ar2I91RPiIA0xCJBXyUAhXCcmZaDWSANiha7R9a6qJJ2CRomGPZ6f46g==", "dependencies": { - "@octokit/openapi-types": "^25.0.0" + "@octokit/openapi-types": "^25.1.0" } }, "node_modules/@octokit/webhooks": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-13.8.0.tgz", - "integrity": "sha512-3PCWyFBNbW2+Ox36VAkSqlPoIb96NZiPcICRYySHZrDTM2NuNxvrjPeaQDj2egqILs9EZFObRTHVMe4XxXJV7w==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-14.0.0.tgz", + "integrity": "sha512-IZV4vg/s1pqIpCs86a0tp5FQ/O94DUaqksMdNrXFSaE037TXsB+fIhr8OVig09oEx3WazVgE6B2U+u7/Fvdlsw==", "dependencies": { - "@octokit/openapi-webhooks-types": "10.4.0", - "@octokit/request-error": "^6.1.7", - "@octokit/webhooks-methods": "^5.1.1" + "@octokit/openapi-webhooks-types": "11.0.0", + "@octokit/request-error": "^7.0.0", + "@octokit/webhooks-methods": "^6.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@octokit/webhooks-methods": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-5.1.1.tgz", - "integrity": "sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-6.0.0.tgz", + "integrity": "sha512-MFlzzoDJVw/GcbfzVC1RLR36QqkTLUf79vLVO3D+xn7r0QgxnFoLZgtrzxiQErAjFUOdH6fas2KeQJ1yr/qaXQ==", "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/@open-draft/deferred-promise": { @@ -4994,9 +4994,9 @@ } }, "node_modules/fast-content-type-parse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", - "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz", + "integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==", "funding": [ { "type": "github", @@ -6753,143 +6753,143 @@ } }, "node_modules/octokit": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/octokit/-/octokit-4.1.3.tgz", - "integrity": "sha512-PP+EL8h4xPCE9NBo6jXq6I2/EiTXsn1cg9F0IZehHBv/qhuQpyGMFElEB17miWKciuT6vRHiFFiG9+FoXOmg6A==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/octokit/-/octokit-5.0.2.tgz", + "integrity": "sha512-WCO9Oip2F+qsrIcNMfLwm1+dL2g70oO++pkmiluisJDMXXwdO4susVaVg1iQZgZNiDtA1qcLXs5662Mdj/vqdw==", "dependencies": { - "@octokit/app": "^15.1.6", - "@octokit/core": "^6.1.5", - "@octokit/oauth-app": "^7.1.6", - "@octokit/plugin-paginate-graphql": "^5.2.4", - "@octokit/plugin-paginate-rest": "^12.0.0", - "@octokit/plugin-rest-endpoint-methods": "^14.0.0", - "@octokit/plugin-retry": "^7.2.1", - "@octokit/plugin-throttling": "^10.0.0", - "@octokit/request-error": "^6.1.8", - "@octokit/types": "^14.0.0" + "@octokit/app": "^16.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-app": "^8.0.1", + "@octokit/plugin-paginate-graphql": "^6.0.0", + "@octokit/plugin-paginate-rest": "^13.0.0", + "@octokit/plugin-rest-endpoint-methods": "^15.0.0", + "@octokit/plugin-retry": "^8.0.1", + "@octokit/plugin-throttling": "^11.0.1", + "@octokit/request-error": "^7.0.0", + "@octokit/types": "^14.0.0", + "@octokit/webhooks": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/octokit/node_modules/@octokit/auth-token": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", - "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", + "integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==", "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/octokit/node_modules/@octokit/core": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.5.tgz", - "integrity": "sha512-vvmsN0r7rguA+FySiCsbaTTobSftpIDIpPW81trAmsv9TGxg3YCujAxRYp/Uy8xmDgYCzzgulG62H7KYUFmeIg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.2.tgz", + "integrity": "sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/octokit/node_modules/@octokit/graphql": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.2.tgz", - "integrity": "sha512-Yi8hcoqsrXGdt0yObxbebHXFOiUA+2v3n53epuOg1QUgOB6c4XzvisBNVXJSl8RYA5KrDuSL2yq9Qmqe5N0ryA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.1.tgz", + "integrity": "sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" } }, "node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-5.2.4.tgz", - "integrity": "sha512-pLZES1jWaOynXKHOqdnwZ5ULeVR6tVVCMm+AUbp0htdcyXDU95WbkYdU4R2ej1wKj5Tu94Mee2Ne0PjPO9cCyA==", - "license": "MIT", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-6.0.0.tgz", + "integrity": "sha512-crfpnIoFiBtRkvPqOyLOsw12XsveYuY2ieP6uYDosoUegBJpSVxGwut9sxUgFFcll3VTOTqpUf8yGd8x1OmAkQ==", "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { "@octokit/core": ">=6" } }, "node_modules/octokit/node_modules/@octokit/plugin-paginate-rest": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-12.0.0.tgz", - "integrity": "sha512-MPd6WK1VtZ52lFrgZ0R2FlaoiWllzgqFHaSZxvp72NmoDeZ0m8GeJdg4oB6ctqMTYyrnDYp592Xma21mrgiyDA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.0.1.tgz", + "integrity": "sha512-m1KvHlueScy4mQJWvFDCxFBTIdXS0K1SgFGLmqHyX90mZdCIv6gWBbKRhatxRjhGlONuTK/hztYdaqrTXcFZdQ==", "dependencies": { - "@octokit/types": "^14.0.0" + "@octokit/types": "^14.1.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { "@octokit/core": ">=6" } }, "node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-14.0.0.tgz", - "integrity": "sha512-iQt6ovem4b7zZYZQtdv+PwgbL5VPq37th1m2x2TdkgimIDJpsi2A6Q/OI/23i/hR6z5mL0EgisNR4dcbmckSZQ==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-15.0.0.tgz", + "integrity": "sha512-db6UdWvpX7O6tNsdkPk1BttVwTeVdA4n8RDFeXOyjBCPjE2YPufIAlzWh8CyeH8hl/3dSuQXDa+qLmsBlkTY+Q==", "dependencies": { "@octokit/types": "^14.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { "@octokit/core": ">=6" } }, "node_modules/octokit/node_modules/@octokit/plugin-retry": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.2.1.tgz", - "integrity": "sha512-wUc3gv0D6vNHpGxSaR3FlqJpTXGWgqmk607N9L3LvPL4QjaxDgX/1nY2mGpT37Khn+nlIXdljczkRnNdTTV3/A==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.0.1.tgz", + "integrity": "sha512-KUoYR77BjF5O3zcwDQHRRZsUvJwepobeqiSSdCJ8lWt27FZExzb0GgVxrhhfuyF6z2B2zpO0hN5pteni1sqWiw==", "dependencies": { - "@octokit/request-error": "^6.1.8", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", "bottleneck": "^2.15.3" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { - "@octokit/core": ">=6" + "@octokit/core": ">=7" } }, "node_modules/octokit/node_modules/@octokit/plugin-throttling": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-10.0.0.tgz", - "integrity": "sha512-Kuq5/qs0DVYTHZuBAzCZStCzo2nKvVRo/TDNhCcpC2TKiOGz/DisXMCvjt3/b5kr6SCI1Y8eeeJTHBxxpFvZEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-11.0.1.tgz", + "integrity": "sha512-S+EVhy52D/272L7up58dr3FNSMXWuNZolkL4zMJBNIfIxyZuUcczsQAU4b5w6dewJXnKYVgSHSV5wxitMSW1kw==", "dependencies": { "@octokit/types": "^14.0.0", "bottleneck": "^2.15.3" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "peerDependencies": { - "@octokit/core": "^6.1.3" + "@octokit/core": "^7.0.0" } }, "node_modules/octokit/node_modules/before-after-hook": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", - "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", + "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==" }, "node_modules/octokit/node_modules/universal-user-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", - "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==" }, "node_modules/once": { "version": "1.4.0", diff --git a/node_modules/@octokit/app/dist-node/index.js b/node_modules/@octokit/app/dist-node/index.js index fb8578a41..49640bf23 100644 --- a/node_modules/@octokit/app/dist-node/index.js +++ b/node_modules/@octokit/app/dist-node/index.js @@ -4,7 +4,7 @@ import { createAppAuth as createAppAuth3 } from "@octokit/auth-app"; import { OAuthApp } from "@octokit/oauth-app"; // pkg/dist-src/version.js -var VERSION = "15.1.6"; +var VERSION = "16.0.1"; // pkg/dist-src/webhooks.js import { createAppAuth } from "@octokit/auth-app"; diff --git a/node_modules/@octokit/app/dist-node/index.js.map b/node_modules/@octokit/app/dist-node/index.js.map index eb5f0d2d8..88c1bf074 100644 --- a/node_modules/@octokit/app/dist-node/index.js.map +++ b/node_modules/@octokit/app/dist-node/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/webhooks.js", "../dist-src/each-installation.js", "../dist-src/get-installation-octokit.js", "../dist-src/each-repository.js", "../dist-src/get-installation-url.js", "../dist-src/middleware/node/index.js"], - "sourcesContent": ["import { Octokit as OctokitCore } from \"@octokit/core\";\nimport { createAppAuth } from \"@octokit/auth-app\";\nimport { OAuthApp } from \"@octokit/oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { webhooks } from \"./webhooks.js\";\nimport { eachInstallationFactory } from \"./each-installation.js\";\nimport { eachRepositoryFactory } from \"./each-repository.js\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nimport { getInstallationUrlFactory } from \"./get-installation-url.js\";\nclass App {\n static VERSION = VERSION;\n static defaults(defaults) {\n const AppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return AppWithDefaults;\n }\n octokit;\n // @ts-ignore calling app.webhooks will throw a helpful error when options.webhooks is not set\n webhooks;\n // @ts-ignore calling app.oauth will throw a helpful error when options.oauth is not set\n oauth;\n getInstallationOctokit;\n eachInstallation;\n eachRepository;\n getInstallationUrl;\n log;\n constructor(options) {\n const Octokit = options.Octokit || OctokitCore;\n const authOptions = Object.assign(\n {\n appId: options.appId,\n privateKey: options.privateKey\n },\n options.oauth ? {\n clientId: options.oauth.clientId,\n clientSecret: options.oauth.clientSecret\n } : {}\n );\n const octokitOptions = {\n authStrategy: createAppAuth,\n auth: authOptions\n };\n if (\"log\" in options && typeof options.log !== \"undefined\") {\n octokitOptions.log = options.log;\n }\n this.octokit = new Octokit(octokitOptions);\n this.log = Object.assign(\n {\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n if (options.webhooks) {\n this.webhooks = webhooks(this.octokit, options.webhooks);\n } else {\n Object.defineProperty(this, \"webhooks\", {\n get() {\n throw new Error(\"[@octokit/app] webhooks option not set\");\n }\n });\n }\n if (options.oauth) {\n this.oauth = new OAuthApp({\n ...options.oauth,\n clientType: \"github-app\",\n Octokit\n });\n } else {\n Object.defineProperty(this, \"oauth\", {\n get() {\n throw new Error(\n \"[@octokit/app] oauth.clientId / oauth.clientSecret options are not set\"\n );\n }\n });\n }\n this.getInstallationOctokit = getInstallationOctokit.bind(\n null,\n this\n );\n this.eachInstallation = eachInstallationFactory(\n this\n );\n this.eachRepository = eachRepositoryFactory(\n this\n );\n this.getInstallationUrl = getInstallationUrlFactory(this);\n }\n}\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nexport {\n App,\n createNodeMiddleware\n};\n", "const VERSION = \"15.1.6\";\nexport {\n VERSION\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { Webhooks } from \"@octokit/webhooks\";\nfunction webhooks(appOctokit, options) {\n return new Webhooks({\n secret: options.secret,\n transform: async (event) => {\n if (!(\"installation\" in event.payload) || typeof event.payload.installation !== \"object\") {\n const octokit2 = new appOctokit.constructor({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `\"installation\" key missing in webhook event payload`\n }\n });\n return {\n ...event,\n octokit: octokit2\n };\n }\n const installationId = event.payload.installation.id;\n const octokit = await appOctokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n return new auth.octokit.constructor({\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{\n auth: {\n ...auth,\n installationId\n }\n }\n });\n }\n });\n octokit.hook.before(\"request\", (options2) => {\n options2.headers[\"x-github-delivery\"] = event.id;\n });\n return {\n ...event,\n octokit\n };\n }\n });\n}\nexport {\n webhooks\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nfunction eachInstallationFactory(app) {\n return Object.assign(eachInstallation.bind(null, app), {\n iterator: eachInstallationIterator.bind(null, app)\n });\n}\nasync function eachInstallation(app, callback) {\n const i = eachInstallationIterator(app)[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n await callback(result.value);\n result = await i.next();\n }\n}\nfunction eachInstallationIterator(app) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = composePaginateRest.iterator(\n app.octokit,\n \"GET /app/installations\"\n );\n for await (const { data: installations } of iterator) {\n for (const installation of installations) {\n const installationOctokit = await getInstallationOctokit(\n app,\n installation.id\n );\n yield { octokit: installationOctokit, installation };\n }\n }\n }\n };\n}\nexport {\n eachInstallation,\n eachInstallationFactory,\n eachInstallationIterator\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nasync function getInstallationOctokit(app, installationId) {\n return app.octokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n const options = {\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{ auth: { ...auth, installationId } }\n };\n return new auth.octokit.constructor(options);\n }\n });\n}\nexport {\n getInstallationOctokit\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nfunction eachRepositoryFactory(app) {\n return Object.assign(eachRepository.bind(null, app), {\n iterator: eachRepositoryIterator.bind(null, app)\n });\n}\nasync function eachRepository(app, queryOrCallback, callback) {\n const i = eachRepositoryIterator(\n app,\n callback ? queryOrCallback : void 0\n )[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n if (callback) {\n await callback(result.value);\n } else {\n await queryOrCallback(result.value);\n }\n result = await i.next();\n }\n}\nfunction singleInstallationIterator(app, installationId) {\n return {\n async *[Symbol.asyncIterator]() {\n yield {\n octokit: await app.getInstallationOctokit(installationId)\n };\n }\n };\n}\nfunction eachRepositoryIterator(app, query) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = query ? singleInstallationIterator(app, query.installationId) : app.eachInstallation.iterator();\n for await (const { octokit } of iterator) {\n const repositoriesIterator = composePaginateRest.iterator(\n octokit,\n \"GET /installation/repositories\"\n );\n for await (const { data: repositories } of repositoriesIterator) {\n for (const repository of repositories) {\n yield { octokit, repository };\n }\n }\n }\n }\n };\n}\nexport {\n eachRepository,\n eachRepositoryFactory,\n eachRepositoryIterator\n};\n", "function getInstallationUrlFactory(app) {\n let installationUrlBasePromise;\n return async function getInstallationUrl(options = {}) {\n if (!installationUrlBasePromise) {\n installationUrlBasePromise = getInstallationUrlBase(app);\n }\n const installationUrlBase = await installationUrlBasePromise;\n const installationUrl = new URL(installationUrlBase);\n if (options.target_id !== void 0) {\n installationUrl.pathname += \"/permissions\";\n installationUrl.searchParams.append(\n \"target_id\",\n options.target_id.toFixed()\n );\n }\n if (options.state !== void 0) {\n installationUrl.searchParams.append(\"state\", options.state);\n }\n return installationUrl.href;\n };\n}\nasync function getInstallationUrlBase(app) {\n const { data: appInfo } = await app.octokit.request(\"GET /app\");\n if (!appInfo) {\n throw new Error(\"[@octokit/app] unable to fetch metadata for app\");\n }\n return `${appInfo.html_url}/installations/new`;\n}\nexport {\n getInstallationUrlFactory\n};\n", "import {\n createNodeMiddleware as oauthNodeMiddleware,\n sendNodeResponse,\n unknownRouteResponse\n} from \"@octokit/oauth-app\";\nimport { createNodeMiddleware as webhooksNodeMiddleware } from \"@octokit/webhooks\";\nfunction noop() {\n}\nfunction createNodeMiddleware(app, options = {}) {\n const log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n const optionsWithDefaults = {\n pathPrefix: \"/api/github\",\n ...options,\n log\n };\n const webhooksMiddleware = webhooksNodeMiddleware(app.webhooks, {\n path: optionsWithDefaults.pathPrefix + \"/webhooks\",\n log\n });\n const oauthMiddleware = oauthNodeMiddleware(app.oauth, {\n pathPrefix: optionsWithDefaults.pathPrefix + \"/oauth\"\n });\n return middleware.bind(\n null,\n optionsWithDefaults.pathPrefix,\n webhooksMiddleware,\n oauthMiddleware\n );\n}\nasync function middleware(pathPrefix, webhooksMiddleware, oauthMiddleware, request, response, next) {\n const { pathname } = new URL(request.url, \"http://localhost\");\n if (pathname.startsWith(`${pathPrefix}/`)) {\n if (pathname === `${pathPrefix}/webhooks`) {\n webhooksMiddleware(request, response);\n } else if (pathname.startsWith(`${pathPrefix}/oauth/`)) {\n oauthMiddleware(request, response);\n } else {\n sendNodeResponse(unknownRouteResponse(request), response);\n }\n return true;\n } else {\n next?.();\n return false;\n }\n}\nexport {\n createNodeMiddleware,\n middleware\n};\n"], + "sourcesContent": ["import { Octokit as OctokitCore } from \"@octokit/core\";\nimport { createAppAuth } from \"@octokit/auth-app\";\nimport { OAuthApp } from \"@octokit/oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { webhooks } from \"./webhooks.js\";\nimport { eachInstallationFactory } from \"./each-installation.js\";\nimport { eachRepositoryFactory } from \"./each-repository.js\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nimport { getInstallationUrlFactory } from \"./get-installation-url.js\";\nclass App {\n static VERSION = VERSION;\n static defaults(defaults) {\n const AppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return AppWithDefaults;\n }\n octokit;\n // @ts-ignore calling app.webhooks will throw a helpful error when options.webhooks is not set\n webhooks;\n // @ts-ignore calling app.oauth will throw a helpful error when options.oauth is not set\n oauth;\n getInstallationOctokit;\n eachInstallation;\n eachRepository;\n getInstallationUrl;\n log;\n constructor(options) {\n const Octokit = options.Octokit || OctokitCore;\n const authOptions = Object.assign(\n {\n appId: options.appId,\n privateKey: options.privateKey\n },\n options.oauth ? {\n clientId: options.oauth.clientId,\n clientSecret: options.oauth.clientSecret\n } : {}\n );\n const octokitOptions = {\n authStrategy: createAppAuth,\n auth: authOptions\n };\n if (\"log\" in options && typeof options.log !== \"undefined\") {\n octokitOptions.log = options.log;\n }\n this.octokit = new Octokit(octokitOptions);\n this.log = Object.assign(\n {\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n if (options.webhooks) {\n this.webhooks = webhooks(this.octokit, options.webhooks);\n } else {\n Object.defineProperty(this, \"webhooks\", {\n get() {\n throw new Error(\"[@octokit/app] webhooks option not set\");\n }\n });\n }\n if (options.oauth) {\n this.oauth = new OAuthApp({\n ...options.oauth,\n clientType: \"github-app\",\n Octokit\n });\n } else {\n Object.defineProperty(this, \"oauth\", {\n get() {\n throw new Error(\n \"[@octokit/app] oauth.clientId / oauth.clientSecret options are not set\"\n );\n }\n });\n }\n this.getInstallationOctokit = getInstallationOctokit.bind(\n null,\n this\n );\n this.eachInstallation = eachInstallationFactory(\n this\n );\n this.eachRepository = eachRepositoryFactory(\n this\n );\n this.getInstallationUrl = getInstallationUrlFactory(this);\n }\n}\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nexport {\n App,\n createNodeMiddleware\n};\n", "const VERSION = \"16.0.1\";\nexport {\n VERSION\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { Webhooks } from \"@octokit/webhooks\";\nfunction webhooks(appOctokit, options) {\n return new Webhooks({\n secret: options.secret,\n transform: async (event) => {\n if (!(\"installation\" in event.payload) || typeof event.payload.installation !== \"object\") {\n const octokit2 = new appOctokit.constructor({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `\"installation\" key missing in webhook event payload`\n }\n });\n return {\n ...event,\n octokit: octokit2\n };\n }\n const installationId = event.payload.installation.id;\n const octokit = await appOctokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n return new auth.octokit.constructor({\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{\n auth: {\n ...auth,\n installationId\n }\n }\n });\n }\n });\n octokit.hook.before(\"request\", (options2) => {\n options2.headers[\"x-github-delivery\"] = event.id;\n });\n return {\n ...event,\n octokit\n };\n }\n });\n}\nexport {\n webhooks\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nfunction eachInstallationFactory(app) {\n return Object.assign(eachInstallation.bind(null, app), {\n iterator: eachInstallationIterator.bind(null, app)\n });\n}\nasync function eachInstallation(app, callback) {\n const i = eachInstallationIterator(app)[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n await callback(result.value);\n result = await i.next();\n }\n}\nfunction eachInstallationIterator(app) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = composePaginateRest.iterator(\n app.octokit,\n \"GET /app/installations\"\n );\n for await (const { data: installations } of iterator) {\n for (const installation of installations) {\n const installationOctokit = await getInstallationOctokit(\n app,\n installation.id\n );\n yield { octokit: installationOctokit, installation };\n }\n }\n }\n };\n}\nexport {\n eachInstallation,\n eachInstallationFactory,\n eachInstallationIterator\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nasync function getInstallationOctokit(app, installationId) {\n return app.octokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n const options = {\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{ auth: { ...auth, installationId } }\n };\n return new auth.octokit.constructor(options);\n }\n });\n}\nexport {\n getInstallationOctokit\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nfunction eachRepositoryFactory(app) {\n return Object.assign(eachRepository.bind(null, app), {\n iterator: eachRepositoryIterator.bind(null, app)\n });\n}\nasync function eachRepository(app, queryOrCallback, callback) {\n const i = eachRepositoryIterator(\n app,\n callback ? queryOrCallback : void 0\n )[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n if (callback) {\n await callback(result.value);\n } else {\n await queryOrCallback(result.value);\n }\n result = await i.next();\n }\n}\nfunction singleInstallationIterator(app, installationId) {\n return {\n async *[Symbol.asyncIterator]() {\n yield {\n octokit: await app.getInstallationOctokit(installationId)\n };\n }\n };\n}\nfunction eachRepositoryIterator(app, query) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = query ? singleInstallationIterator(app, query.installationId) : app.eachInstallation.iterator();\n for await (const { octokit } of iterator) {\n const repositoriesIterator = composePaginateRest.iterator(\n octokit,\n \"GET /installation/repositories\"\n );\n for await (const { data: repositories } of repositoriesIterator) {\n for (const repository of repositories) {\n yield { octokit, repository };\n }\n }\n }\n }\n };\n}\nexport {\n eachRepository,\n eachRepositoryFactory,\n eachRepositoryIterator\n};\n", "function getInstallationUrlFactory(app) {\n let installationUrlBasePromise;\n return async function getInstallationUrl(options = {}) {\n if (!installationUrlBasePromise) {\n installationUrlBasePromise = getInstallationUrlBase(app);\n }\n const installationUrlBase = await installationUrlBasePromise;\n const installationUrl = new URL(installationUrlBase);\n if (options.target_id !== void 0) {\n installationUrl.pathname += \"/permissions\";\n installationUrl.searchParams.append(\n \"target_id\",\n options.target_id.toFixed()\n );\n }\n if (options.state !== void 0) {\n installationUrl.searchParams.append(\"state\", options.state);\n }\n return installationUrl.href;\n };\n}\nasync function getInstallationUrlBase(app) {\n const { data: appInfo } = await app.octokit.request(\"GET /app\");\n if (!appInfo) {\n throw new Error(\"[@octokit/app] unable to fetch metadata for app\");\n }\n return `${appInfo.html_url}/installations/new`;\n}\nexport {\n getInstallationUrlFactory\n};\n", "import {\n createNodeMiddleware as oauthNodeMiddleware,\n sendNodeResponse,\n unknownRouteResponse\n} from \"@octokit/oauth-app\";\nimport { createNodeMiddleware as webhooksNodeMiddleware } from \"@octokit/webhooks\";\nfunction noop() {\n}\nfunction createNodeMiddleware(app, options = {}) {\n const log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n const optionsWithDefaults = {\n pathPrefix: \"/api/github\",\n ...options,\n log\n };\n const webhooksMiddleware = webhooksNodeMiddleware(app.webhooks, {\n path: optionsWithDefaults.pathPrefix + \"/webhooks\",\n log\n });\n const oauthMiddleware = oauthNodeMiddleware(app.oauth, {\n pathPrefix: optionsWithDefaults.pathPrefix + \"/oauth\"\n });\n return middleware.bind(\n null,\n optionsWithDefaults.pathPrefix,\n webhooksMiddleware,\n oauthMiddleware\n );\n}\nasync function middleware(pathPrefix, webhooksMiddleware, oauthMiddleware, request, response, next) {\n const { pathname } = new URL(request.url, \"http://localhost\");\n if (pathname.startsWith(`${pathPrefix}/`)) {\n if (pathname === `${pathPrefix}/webhooks`) {\n webhooksMiddleware(request, response);\n } else if (pathname.startsWith(`${pathPrefix}/oauth/`)) {\n oauthMiddleware(request, response);\n } else {\n sendNodeResponse(unknownRouteResponse(request), response);\n }\n return true;\n } else {\n next?.();\n return false;\n }\n}\nexport {\n createNodeMiddleware,\n middleware\n};\n"], "mappings": ";AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,iBAAAA,sBAAqB;AAC9B,SAAS,gBAAgB;;;ACFzB,IAAM,UAAU;;;ACAhB,SAAS,qBAAqB;AAC9B,SAAS,iCAAiC;AAC1C,SAAS,gBAAgB;AACzB,SAAS,SAAS,YAAY,SAAS;AACrC,SAAO,IAAI,SAAS;AAAA,IAClB,QAAQ,QAAQ;AAAA,IAChB,WAAW,OAAO,UAAU;AAC1B,UAAI,EAAE,kBAAkB,MAAM,YAAY,OAAO,MAAM,QAAQ,iBAAiB,U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WAAK,QAAQ,IAAI,SAAS;AAAA,QACxB,GAAG,QAAQ;AAAA,QACX,YAAY;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACH,OAAO;AACL,aAAO,eAAe,MAAM,SAAS;AAAA,QACnC,MAAM;AACJ,gBAAM,IAAI;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AACA,SAAK,yBAAyB,uBAAuB;AAAA,MACnD;AAAA,MACA;AAAA,IACF;AACA,SAAK,mBAAmB;AAAA,MACtB;AAAA,IACF;AACA,SAAK,iBAAiB;AAAA,MACpB;AAAA,IACF;AACA,SAAK,qBAAqB,0BAA0B,IAAI;AAAA,EAC1D;AACF;", "names": ["createAppAuth", "createAppAuth", "composePaginateRest", "createAppAuth"] } diff --git a/node_modules/@octokit/app/dist-src/version.js b/node_modules/@octokit/app/dist-src/version.js index 64905e9f0..d08ba2ebf 100644 --- a/node_modules/@octokit/app/dist-src/version.js +++ b/node_modules/@octokit/app/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "15.1.6"; +const VERSION = "16.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/app/dist-types/each-repository.d.ts b/node_modules/@octokit/app/dist-types/each-repository.d.ts index 3b372bd00..d16ad0cde 100644 --- a/node_modules/@octokit/app/dist-types/each-repository.d.ts +++ b/node_modules/@octokit/app/dist-types/each-repository.d.ts @@ -11,14 +11,7 @@ export declare function eachRepositoryIterator(app: App, query?: EachRepositoryQ node_id: string; name: string; full_name: string; - license: { - key: string; - name: string; - url: string | null; - spdx_id: string | null; - node_id: string; - html_url?: string; - } | null; + license: import("@octokit/openapi-types").components["schemas"]["nullable-license-simple"]; forks: number; permissions?: { admin: boolean; @@ -27,30 +20,7 @@ export declare function eachRepositoryIterator(app: App, query?: EachRepositoryQ push: boolean; maintain?: boolean; }; - owner: { - name?: string | null; - email?: string | null; - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - starred_at?: string; - user_view_type?: string; - }; + owner: import("@octokit/openapi-types").components["schemas"]["simple-user"]; private: boolean; html_url: string; description: string | null; diff --git a/node_modules/@octokit/app/dist-types/version.d.ts b/node_modules/@octokit/app/dist-types/version.d.ts index 41c93c584..e5c7f6252 100644 --- a/node_modules/@octokit/app/dist-types/version.d.ts +++ b/node_modules/@octokit/app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "15.1.6"; +export declare const VERSION = "16.0.1"; diff --git a/node_modules/@octokit/app/dist-web/index.js b/node_modules/@octokit/app/dist-web/index.js index fb8578a41..49640bf23 100644 --- a/node_modules/@octokit/app/dist-web/index.js +++ b/node_modules/@octokit/app/dist-web/index.js @@ -4,7 +4,7 @@ import { createAppAuth as createAppAuth3 } from "@octokit/auth-app"; import { OAuthApp } from "@octokit/oauth-app"; // pkg/dist-src/version.js -var VERSION = "15.1.6"; +var VERSION = "16.0.1"; // pkg/dist-src/webhooks.js import { createAppAuth } from "@octokit/auth-app"; diff --git a/node_modules/@octokit/app/dist-web/index.js.map b/node_modules/@octokit/app/dist-web/index.js.map index eb5f0d2d8..88c1bf074 100644 --- a/node_modules/@octokit/app/dist-web/index.js.map +++ b/node_modules/@octokit/app/dist-web/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/webhooks.js", "../dist-src/each-installation.js", "../dist-src/get-installation-octokit.js", "../dist-src/each-repository.js", "../dist-src/get-installation-url.js", "../dist-src/middleware/node/index.js"], - "sourcesContent": ["import { Octokit as OctokitCore } from \"@octokit/core\";\nimport { createAppAuth } from \"@octokit/auth-app\";\nimport { OAuthApp } from \"@octokit/oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { webhooks } from \"./webhooks.js\";\nimport { eachInstallationFactory } from \"./each-installation.js\";\nimport { eachRepositoryFactory } from \"./each-repository.js\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nimport { getInstallationUrlFactory } from \"./get-installation-url.js\";\nclass App {\n static VERSION = VERSION;\n static defaults(defaults) {\n const AppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return AppWithDefaults;\n }\n octokit;\n // @ts-ignore calling app.webhooks will throw a helpful error when options.webhooks is not set\n webhooks;\n // @ts-ignore calling app.oauth will throw a helpful error when options.oauth is not set\n oauth;\n getInstallationOctokit;\n eachInstallation;\n eachRepository;\n getInstallationUrl;\n log;\n constructor(options) {\n const Octokit = options.Octokit || OctokitCore;\n const authOptions = Object.assign(\n {\n appId: options.appId,\n privateKey: options.privateKey\n },\n options.oauth ? {\n clientId: options.oauth.clientId,\n clientSecret: options.oauth.clientSecret\n } : {}\n );\n const octokitOptions = {\n authStrategy: createAppAuth,\n auth: authOptions\n };\n if (\"log\" in options && typeof options.log !== \"undefined\") {\n octokitOptions.log = options.log;\n }\n this.octokit = new Octokit(octokitOptions);\n this.log = Object.assign(\n {\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n if (options.webhooks) {\n this.webhooks = webhooks(this.octokit, options.webhooks);\n } else {\n Object.defineProperty(this, \"webhooks\", {\n get() {\n throw new Error(\"[@octokit/app] webhooks option not set\");\n }\n });\n }\n if (options.oauth) {\n this.oauth = new OAuthApp({\n ...options.oauth,\n clientType: \"github-app\",\n Octokit\n });\n } else {\n Object.defineProperty(this, \"oauth\", {\n get() {\n throw new Error(\n \"[@octokit/app] oauth.clientId / oauth.clientSecret options are not set\"\n );\n }\n });\n }\n this.getInstallationOctokit = getInstallationOctokit.bind(\n null,\n this\n );\n this.eachInstallation = eachInstallationFactory(\n this\n );\n this.eachRepository = eachRepositoryFactory(\n this\n );\n this.getInstallationUrl = getInstallationUrlFactory(this);\n }\n}\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nexport {\n App,\n createNodeMiddleware\n};\n", "const VERSION = \"15.1.6\";\nexport {\n VERSION\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { Webhooks } from \"@octokit/webhooks\";\nfunction webhooks(appOctokit, options) {\n return new Webhooks({\n secret: options.secret,\n transform: async (event) => {\n if (!(\"installation\" in event.payload) || typeof event.payload.installation !== \"object\") {\n const octokit2 = new appOctokit.constructor({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `\"installation\" key missing in webhook event payload`\n }\n });\n return {\n ...event,\n octokit: octokit2\n };\n }\n const installationId = event.payload.installation.id;\n const octokit = await appOctokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n return new auth.octokit.constructor({\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{\n auth: {\n ...auth,\n installationId\n }\n }\n });\n }\n });\n octokit.hook.before(\"request\", (options2) => {\n options2.headers[\"x-github-delivery\"] = event.id;\n });\n return {\n ...event,\n octokit\n };\n }\n });\n}\nexport {\n webhooks\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nfunction eachInstallationFactory(app) {\n return Object.assign(eachInstallation.bind(null, app), {\n iterator: eachInstallationIterator.bind(null, app)\n });\n}\nasync function eachInstallation(app, callback) {\n const i = eachInstallationIterator(app)[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n await callback(result.value);\n result = await i.next();\n }\n}\nfunction eachInstallationIterator(app) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = composePaginateRest.iterator(\n app.octokit,\n \"GET /app/installations\"\n );\n for await (const { data: installations } of iterator) {\n for (const installation of installations) {\n const installationOctokit = await getInstallationOctokit(\n app,\n installation.id\n );\n yield { octokit: installationOctokit, installation };\n }\n }\n }\n };\n}\nexport {\n eachInstallation,\n eachInstallationFactory,\n eachInstallationIterator\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nasync function getInstallationOctokit(app, installationId) {\n return app.octokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n const options = {\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{ auth: { ...auth, installationId } }\n };\n return new auth.octokit.constructor(options);\n }\n });\n}\nexport {\n getInstallationOctokit\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nfunction eachRepositoryFactory(app) {\n return Object.assign(eachRepository.bind(null, app), {\n iterator: eachRepositoryIterator.bind(null, app)\n });\n}\nasync function eachRepository(app, queryOrCallback, callback) {\n const i = eachRepositoryIterator(\n app,\n callback ? queryOrCallback : void 0\n )[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n if (callback) {\n await callback(result.value);\n } else {\n await queryOrCallback(result.value);\n }\n result = await i.next();\n }\n}\nfunction singleInstallationIterator(app, installationId) {\n return {\n async *[Symbol.asyncIterator]() {\n yield {\n octokit: await app.getInstallationOctokit(installationId)\n };\n }\n };\n}\nfunction eachRepositoryIterator(app, query) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = query ? singleInstallationIterator(app, query.installationId) : app.eachInstallation.iterator();\n for await (const { octokit } of iterator) {\n const repositoriesIterator = composePaginateRest.iterator(\n octokit,\n \"GET /installation/repositories\"\n );\n for await (const { data: repositories } of repositoriesIterator) {\n for (const repository of repositories) {\n yield { octokit, repository };\n }\n }\n }\n }\n };\n}\nexport {\n eachRepository,\n eachRepositoryFactory,\n eachRepositoryIterator\n};\n", "function getInstallationUrlFactory(app) {\n let installationUrlBasePromise;\n return async function getInstallationUrl(options = {}) {\n if (!installationUrlBasePromise) {\n installationUrlBasePromise = getInstallationUrlBase(app);\n }\n const installationUrlBase = await installationUrlBasePromise;\n const installationUrl = new URL(installationUrlBase);\n if (options.target_id !== void 0) {\n installationUrl.pathname += \"/permissions\";\n installationUrl.searchParams.append(\n \"target_id\",\n options.target_id.toFixed()\n );\n }\n if (options.state !== void 0) {\n installationUrl.searchParams.append(\"state\", options.state);\n }\n return installationUrl.href;\n };\n}\nasync function getInstallationUrlBase(app) {\n const { data: appInfo } = await app.octokit.request(\"GET /app\");\n if (!appInfo) {\n throw new Error(\"[@octokit/app] unable to fetch metadata for app\");\n }\n return `${appInfo.html_url}/installations/new`;\n}\nexport {\n getInstallationUrlFactory\n};\n", "import {\n createNodeMiddleware as oauthNodeMiddleware,\n sendNodeResponse,\n unknownRouteResponse\n} from \"@octokit/oauth-app\";\nimport { createNodeMiddleware as webhooksNodeMiddleware } from \"@octokit/webhooks\";\nfunction noop() {\n}\nfunction createNodeMiddleware(app, options = {}) {\n const log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n const optionsWithDefaults = {\n pathPrefix: \"/api/github\",\n ...options,\n log\n };\n const webhooksMiddleware = webhooksNodeMiddleware(app.webhooks, {\n path: optionsWithDefaults.pathPrefix + \"/webhooks\",\n log\n });\n const oauthMiddleware = oauthNodeMiddleware(app.oauth, {\n pathPrefix: optionsWithDefaults.pathPrefix + \"/oauth\"\n });\n return middleware.bind(\n null,\n optionsWithDefaults.pathPrefix,\n webhooksMiddleware,\n oauthMiddleware\n );\n}\nasync function middleware(pathPrefix, webhooksMiddleware, oauthMiddleware, request, response, next) {\n const { pathname } = new URL(request.url, \"http://localhost\");\n if (pathname.startsWith(`${pathPrefix}/`)) {\n if (pathname === `${pathPrefix}/webhooks`) {\n webhooksMiddleware(request, response);\n } else if (pathname.startsWith(`${pathPrefix}/oauth/`)) {\n oauthMiddleware(request, response);\n } else {\n sendNodeResponse(unknownRouteResponse(request), response);\n }\n return true;\n } else {\n next?.();\n return false;\n }\n}\nexport {\n createNodeMiddleware,\n middleware\n};\n"], + "sourcesContent": ["import { Octokit as OctokitCore } from \"@octokit/core\";\nimport { createAppAuth } from \"@octokit/auth-app\";\nimport { OAuthApp } from \"@octokit/oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { webhooks } from \"./webhooks.js\";\nimport { eachInstallationFactory } from \"./each-installation.js\";\nimport { eachRepositoryFactory } from \"./each-repository.js\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nimport { getInstallationUrlFactory } from \"./get-installation-url.js\";\nclass App {\n static VERSION = VERSION;\n static defaults(defaults) {\n const AppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return AppWithDefaults;\n }\n octokit;\n // @ts-ignore calling app.webhooks will throw a helpful error when options.webhooks is not set\n webhooks;\n // @ts-ignore calling app.oauth will throw a helpful error when options.oauth is not set\n oauth;\n getInstallationOctokit;\n eachInstallation;\n eachRepository;\n getInstallationUrl;\n log;\n constructor(options) {\n const Octokit = options.Octokit || OctokitCore;\n const authOptions = Object.assign(\n {\n appId: options.appId,\n privateKey: options.privateKey\n },\n options.oauth ? {\n clientId: options.oauth.clientId,\n clientSecret: options.oauth.clientSecret\n } : {}\n );\n const octokitOptions = {\n authStrategy: createAppAuth,\n auth: authOptions\n };\n if (\"log\" in options && typeof options.log !== \"undefined\") {\n octokitOptions.log = options.log;\n }\n this.octokit = new Octokit(octokitOptions);\n this.log = Object.assign(\n {\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n if (options.webhooks) {\n this.webhooks = webhooks(this.octokit, options.webhooks);\n } else {\n Object.defineProperty(this, \"webhooks\", {\n get() {\n throw new Error(\"[@octokit/app] webhooks option not set\");\n }\n });\n }\n if (options.oauth) {\n this.oauth = new OAuthApp({\n ...options.oauth,\n clientType: \"github-app\",\n Octokit\n });\n } else {\n Object.defineProperty(this, \"oauth\", {\n get() {\n throw new Error(\n \"[@octokit/app] oauth.clientId / oauth.clientSecret options are not set\"\n );\n }\n });\n }\n this.getInstallationOctokit = getInstallationOctokit.bind(\n null,\n this\n );\n this.eachInstallation = eachInstallationFactory(\n this\n );\n this.eachRepository = eachRepositoryFactory(\n this\n );\n this.getInstallationUrl = getInstallationUrlFactory(this);\n }\n}\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nexport {\n App,\n createNodeMiddleware\n};\n", "const VERSION = \"16.0.1\";\nexport {\n VERSION\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { Webhooks } from \"@octokit/webhooks\";\nfunction webhooks(appOctokit, options) {\n return new Webhooks({\n secret: options.secret,\n transform: async (event) => {\n if (!(\"installation\" in event.payload) || typeof event.payload.installation !== \"object\") {\n const octokit2 = new appOctokit.constructor({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `\"installation\" key missing in webhook event payload`\n }\n });\n return {\n ...event,\n octokit: octokit2\n };\n }\n const installationId = event.payload.installation.id;\n const octokit = await appOctokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n return new auth.octokit.constructor({\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{\n auth: {\n ...auth,\n installationId\n }\n }\n });\n }\n });\n octokit.hook.before(\"request\", (options2) => {\n options2.headers[\"x-github-delivery\"] = event.id;\n });\n return {\n ...event,\n octokit\n };\n }\n });\n}\nexport {\n webhooks\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nimport { getInstallationOctokit } from \"./get-installation-octokit.js\";\nfunction eachInstallationFactory(app) {\n return Object.assign(eachInstallation.bind(null, app), {\n iterator: eachInstallationIterator.bind(null, app)\n });\n}\nasync function eachInstallation(app, callback) {\n const i = eachInstallationIterator(app)[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n await callback(result.value);\n result = await i.next();\n }\n}\nfunction eachInstallationIterator(app) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = composePaginateRest.iterator(\n app.octokit,\n \"GET /app/installations\"\n );\n for await (const { data: installations } of iterator) {\n for (const installation of installations) {\n const installationOctokit = await getInstallationOctokit(\n app,\n installation.id\n );\n yield { octokit: installationOctokit, installation };\n }\n }\n }\n };\n}\nexport {\n eachInstallation,\n eachInstallationFactory,\n eachInstallationIterator\n};\n", "import { createAppAuth } from \"@octokit/auth-app\";\nasync function getInstallationOctokit(app, installationId) {\n return app.octokit.auth({\n type: \"installation\",\n installationId,\n factory(auth) {\n const options = {\n ...auth.octokitOptions,\n authStrategy: createAppAuth,\n ...{ auth: { ...auth, installationId } }\n };\n return new auth.octokit.constructor(options);\n }\n });\n}\nexport {\n getInstallationOctokit\n};\n", "import { composePaginateRest } from \"@octokit/plugin-paginate-rest\";\nfunction eachRepositoryFactory(app) {\n return Object.assign(eachRepository.bind(null, app), {\n iterator: eachRepositoryIterator.bind(null, app)\n });\n}\nasync function eachRepository(app, queryOrCallback, callback) {\n const i = eachRepositoryIterator(\n app,\n callback ? queryOrCallback : void 0\n )[Symbol.asyncIterator]();\n let result = await i.next();\n while (!result.done) {\n if (callback) {\n await callback(result.value);\n } else {\n await queryOrCallback(result.value);\n }\n result = await i.next();\n }\n}\nfunction singleInstallationIterator(app, installationId) {\n return {\n async *[Symbol.asyncIterator]() {\n yield {\n octokit: await app.getInstallationOctokit(installationId)\n };\n }\n };\n}\nfunction eachRepositoryIterator(app, query) {\n return {\n async *[Symbol.asyncIterator]() {\n const iterator = query ? singleInstallationIterator(app, query.installationId) : app.eachInstallation.iterator();\n for await (const { octokit } of iterator) {\n const repositoriesIterator = composePaginateRest.iterator(\n octokit,\n \"GET /installation/repositories\"\n );\n for await (const { data: repositories } of repositoriesIterator) {\n for (const repository of repositories) {\n yield { octokit, repository };\n }\n }\n }\n }\n };\n}\nexport {\n eachRepository,\n eachRepositoryFactory,\n eachRepositoryIterator\n};\n", "function getInstallationUrlFactory(app) {\n let installationUrlBasePromise;\n return async function getInstallationUrl(options = {}) {\n if (!installationUrlBasePromise) {\n installationUrlBasePromise = getInstallationUrlBase(app);\n }\n const installationUrlBase = await installationUrlBasePromise;\n const installationUrl = new URL(installationUrlBase);\n if (options.target_id !== void 0) {\n installationUrl.pathname += \"/permissions\";\n installationUrl.searchParams.append(\n \"target_id\",\n options.target_id.toFixed()\n );\n }\n if (options.state !== void 0) {\n installationUrl.searchParams.append(\"state\", options.state);\n }\n return installationUrl.href;\n };\n}\nasync function getInstallationUrlBase(app) {\n const { data: appInfo } = await app.octokit.request(\"GET /app\");\n if (!appInfo) {\n throw new Error(\"[@octokit/app] unable to fetch metadata for app\");\n }\n return `${appInfo.html_url}/installations/new`;\n}\nexport {\n getInstallationUrlFactory\n};\n", "import {\n createNodeMiddleware as oauthNodeMiddleware,\n sendNodeResponse,\n unknownRouteResponse\n} from \"@octokit/oauth-app\";\nimport { createNodeMiddleware as webhooksNodeMiddleware } from \"@octokit/webhooks\";\nfunction noop() {\n}\nfunction createNodeMiddleware(app, options = {}) {\n const log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n },\n options.log\n );\n const optionsWithDefaults = {\n pathPrefix: \"/api/github\",\n ...options,\n log\n };\n const webhooksMiddleware = webhooksNodeMiddleware(app.webhooks, {\n path: optionsWithDefaults.pathPrefix + \"/webhooks\",\n log\n });\n const oauthMiddleware = oauthNodeMiddleware(app.oauth, {\n pathPrefix: optionsWithDefaults.pathPrefix + \"/oauth\"\n });\n return middleware.bind(\n null,\n optionsWithDefaults.pathPrefix,\n webhooksMiddleware,\n oauthMiddleware\n );\n}\nasync function middleware(pathPrefix, webhooksMiddleware, oauthMiddleware, request, response, next) {\n const { pathname } = new URL(request.url, \"http://localhost\");\n if (pathname.startsWith(`${pathPrefix}/`)) {\n if (pathname === `${pathPrefix}/webhooks`) {\n webhooksMiddleware(request, response);\n } else if (pathname.startsWith(`${pathPrefix}/oauth/`)) {\n oauthMiddleware(request, response);\n } else {\n sendNodeResponse(unknownRouteResponse(request), response);\n }\n return true;\n } else {\n next?.();\n return false;\n }\n}\nexport {\n createNodeMiddleware,\n middleware\n};\n"], "mappings": ";AAAA,SAAS,WAAW,mBAAmB;AACvC,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O,QAAQ,MAAM,KAAK,OAAO;AAAA,MACnC;AAAA,MACA,QAAQ;AAAA,IACV;AACA,QAAI,QAAQ,UAAU;AACpB,WAAK,WAAW,SAAS,KAAK,SAAS,QAAQ,QAAQ;AAAA,IACzD,OAAO;AACL,aAAO,eAAe,MAAM,YAAY;AAAA,QACtC,MAAM;AACJ,gBAAM,IAAI,MAAM,wCAAwC;AAAA,QAC1D;AAAA,MACF,CAAC;AAAA,IACH;AACA,QAAI,QAAQ,OAAO;AACjB,WAAK,QAAQ,IAAI,SAAS;AAAA,QACxB,GAAG,QAAQ;AAAA,QACX,YAAY;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACH,OAAO;AACL,aAAO,eAAe,MAAM,SAAS;AAAA,QACnC,MAAM;AACJ,gBAAM,IAAI;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AACA,SAAK,yBAAyB,uBAAuB;AAAA,MACnD;AAAA,MACA;AAAA,IACF;AACA,SAAK,mBAAmB;AAAA,MACtB;AAAA,IACF;AACA,SAAK,iBAAiB;AAAA,MACpB;AAAA,IACF;AACA,SAAK,qBAAqB,0BAA0B,IAAI;AAAA,EAC1D;AACF;", "names": ["createAppAuth", "createAppAuth", "composePaginateRest", "createAppAuth"] } diff --git a/node_modules/@octokit/app/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/app/node_modules/@octokit/auth-token/package.json index c07fa98b5..075fe0725 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/auth-token/package.json +++ b/node_modules/@octokit/app/node_modules/@octokit/auth-token/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.1.2", + "version": "6.0.0", "description": "GitHub API token authentication for browsers and Node.js", "repository": "github:octokit/auth-token.js", "keywords": [ @@ -19,18 +19,17 @@ "devDependencies": { "@octokit/request": "^9.0.0", "@octokit/tsconfig": "^4.0.0", - "@octokit/types": "^13.0.0", + "@octokit/types": "^14.0.0", "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.24.0", - "fetch-mock": "^11.0.0", + "esbuild": "^0.25.0", + "fetch-mock": "^12.0.0", "glob": "^11.0.0", - "prettier": "3.4.2", - "semantic-release": "^24.0.0", + "prettier": "3.5.3", "typescript": "^5.3.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/app/node_modules/@octokit/core/dist-src/version.js b/node_modules/@octokit/app/node_modules/@octokit/core/dist-src/version.js index 2f5d3ab9d..ad9f40dea 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/core/dist-src/version.js +++ b/node_modules/@octokit/app/node_modules/@octokit/core/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "6.1.5"; +const VERSION = "7.0.2"; export { VERSION }; diff --git a/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/index.d.ts index 3f7a1da3e..8275033c3 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/index.d.ts +++ b/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/index.d.ts @@ -5,7 +5,7 @@ import type { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, U export type { OctokitOptions } from "./types.js"; export declare class Octokit { static VERSION: string; - static defaults>(this: S, defaults: OctokitOptions | Function): S; + static defaults>(this: S, defaults: OctokitOptions | Function): typeof this; static plugins: OctokitPlugin[]; /** * Attach a plugin (or many) to your Octokit instance. @@ -15,7 +15,7 @@ export declare class Octokit { */ static plugin & { plugins: any[]; - }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): typeof this & Constructor>>; constructor(options?: OctokitOptions); request: typeof request; graphql: typeof graphql; diff --git a/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/version.d.ts index eb205b9a2..d5b16a17a 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/version.d.ts +++ b/node_modules/@octokit/app/node_modules/@octokit/core/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "6.1.5"; +export declare const VERSION = "7.0.2"; diff --git a/node_modules/@octokit/app/node_modules/@octokit/core/package.json b/node_modules/@octokit/app/node_modules/@octokit/core/package.json index 551668b62..d6e340953 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/core/package.json +++ b/node_modules/@octokit/app/node_modules/@octokit/core/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/core", - "version": "6.1.5", + "version": "7.0.2", "publishConfig": { "access": "public", "provenance": true @@ -18,18 +18,18 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "devDependencies": { - "@octokit/auth-action": "^5.0.0", - "@octokit/auth-app": "^7.0.0", - "@octokit/auth-oauth-app": "^8.0.0", + "@octokit/auth-action": "^6.0.1", + "@octokit/auth-app": "^8.0.0", + "@octokit/auth-oauth-app": "^9.0.0", "@octokit/tsconfig": "^4.0.0", "@sinonjs/fake-timers": "^14.0.0", "@types/lolex": "^5.1.0", @@ -38,17 +38,15 @@ "@vitest/coverage-v8": "^3.0.5", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", "proxy": "^2.0.0", - "semantic-release": "^24.0.0", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", - "undici": "^6.0.0", + "undici": "^7.0.0", "vitest": "^3.0.5" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-src/version.js index 405990a69..19fc42329 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-src/version.js +++ b/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "8.2.2"; +const VERSION = "9.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-types/version.d.ts index 590024731..274ce0ed1 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-types/version.d.ts +++ b/node_modules/@octokit/app/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "8.2.2"; +export declare const VERSION = "9.0.1"; diff --git a/node_modules/@octokit/app/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/app/node_modules/@octokit/graphql/package.json index 8e010f302..25f51b153 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/graphql/package.json +++ b/node_modules/@octokit/app/node_modules/@octokit/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/graphql", - "version": "8.2.2", + "version": "9.0.1", "publishConfig": { "access": "public", "provenance": true @@ -17,7 +17,7 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, @@ -34,7 +34,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js index 6a68292cc..5ccbfe76e 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js +++ b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "12.0.0"; +const VERSION = "13.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts index 2521101be..d8e979a20 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts +++ b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "12.0.0"; +export declare const VERSION = "13.0.1"; diff --git a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/package.json b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/package.json index c0ce2b9c3..a021601de 100644 --- a/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/package.json +++ b/node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "12.0.0", + "version": "13.0.1", "description": "Octokit plugin to paginate REST API endpoint responses", "repository": "github:octokit/plugin-paginate-rest.js", "keywords": [ @@ -16,29 +16,29 @@ ], "license": "MIT", "dependencies": { - "@octokit/types": "^14.0.0" + "@octokit/types": "^14.1.0" }, "peerDependencies": { "@octokit/core": ">=6" }, "devDependencies": { - "@octokit/core": "^6.1.5", - "@octokit/plugin-rest-endpoint-methods": "^14.0.0", + "@octokit/core": "^7.0.0", + "@octokit/plugin-rest-endpoint-methods": "^16.0.0", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "github-openapi-graphql-query": "^4.0.0", + "github-openapi-graphql-query": "^5.0.0", "glob": "^11.0.0", - "npm-run-all2": "^7.0.0", + "npm-run-all2": "^8.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/app/node_modules/before-after-hook/package.json b/node_modules/@octokit/app/node_modules/before-after-hook/package.json index f23f655db..07bf873e2 100644 --- a/node_modules/@octokit/app/node_modules/before-after-hook/package.json +++ b/node_modules/@octokit/app/node_modules/before-after-hook/package.json @@ -1,7 +1,7 @@ { "name": "before-after-hook", "type": "module", - "version": "3.0.2", + "version": "4.0.0", "description": "asynchronous before/error/after hooks for internal functionality", "exports": "./index.js", "types": "./index.d.ts", @@ -12,12 +12,12 @@ ], "scripts": { "test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", - "test:code": "c8 --100 ava test/*.test.js", + "test:code": "c8 --100 --clean node --test", + "test:deno": "deno test --no-check", "test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", "test:tsd": "tsd", - "lint": "prettier --check \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "coverage": "c8 report --reporter html", + "lint": "prettier --check \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", + "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", "postcoverage": "open-cli coverage/index.html" }, "repository": "github:gr2m/before-after-hook", @@ -29,10 +29,9 @@ "author": "Gregor Martynus", "license": "Apache-2.0", "devDependencies": { - "ava": "^4.3.3", - "c8": "^7.12.0", + "@types/node": "^22.15.17", + "c8": "^10.1.3", "prettier": "^2.0.0", - "sinon": "^14.0.1", "tsd": "^0.24.1", "typescript": "^4.8.4" }, diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/app/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/app/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/package.json b/node_modules/@octokit/app/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/app/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/app/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/app/node_modules/universal-user-agent/test.js b/node_modules/@octokit/app/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/app/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/app/package.json b/node_modules/@octokit/app/package.json index 5192cdd62..ca758f1d6 100644 --- a/node_modules/@octokit/app/package.json +++ b/node_modules/@octokit/app/package.json @@ -5,20 +5,20 @@ "provenance": true }, "type": "module", - "version": "15.1.6", + "version": "16.0.1", "description": "GitHub Apps toolset for Node.js", "main": "./dist-node/index.js", "repository": "github:octokit/app.js", "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.2.1", - "@octokit/auth-unauthenticated": "^6.1.3", - "@octokit/core": "^6.1.5", - "@octokit/oauth-app": "^7.1.6", - "@octokit/plugin-paginate-rest": "^12.0.0", + "@octokit/auth-app": "^8.0.1", + "@octokit/auth-unauthenticated": "^7.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-app": "^8.0.1", + "@octokit/plugin-paginate-rest": "^13.0.0", "@octokit/types": "^14.0.0", - "@octokit/webhooks": "^13.6.1" + "@octokit/webhooks": "^14.0.0" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", @@ -35,7 +35,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/auth-app/dist-node/index.js b/node_modules/@octokit/auth-app/dist-node/index.js index 12fa570cb..691be4aea 100644 --- a/node_modules/@octokit/auth-app/dist-node/index.js +++ b/node_modules/@octokit/auth-app/dist-node/index.js @@ -421,7 +421,7 @@ async function sendRequestWithRetries(state, request, options, createdAt, retrie } // pkg/dist-src/version.js -var VERSION = "7.2.1"; +var VERSION = "8.0.1"; // pkg/dist-src/index.js import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; diff --git a/node_modules/@octokit/auth-app/dist-node/index.js.map b/node_modules/@octokit/auth-app/dist-node/index.js.map index a9b571b7f..18187e062 100644 --- a/node_modules/@octokit/auth-app/dist-node/index.js.map +++ b/node_modules/@octokit/auth-app/dist-node/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../dist-src/index.js", "../dist-src/get-app-authentication.js", "../dist-src/cache.js", "../dist-src/to-token-authentication.js", "../dist-src/get-installation-authentication.js", "../dist-src/auth.js", "../dist-src/hook.js", "../dist-src/requires-app-auth.js", "../dist-src/version.js"], - "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { getCache } from \"./cache.js\";\nimport { VERSION } from \"./version.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nfunction createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId is set to a falsy value\"\n );\n }\n const log = Object.assign(\n {\n warn: console.warn.bind(console)\n },\n options.log\n );\n const request = options.request || defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`\n }\n });\n const state = Object.assign(\n {\n request,\n cache: getCache()\n },\n options,\n options.installationId ? { installationId: Number(options.installationId) } : {},\n {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request\n })\n }\n );\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\nexport {\n createAppAuth,\n createOAuthUserAuth\n};\n", "import githubAppJwt from \"universal-github-app-jwt\";\nasync function getAppAuthentication({\n appId,\n privateKey,\n timeDifference\n}) {\n try {\n const authOptions = {\n id: appId,\n privateKey\n };\n if (timeDifference) {\n Object.assign(authOptions, {\n now: Math.floor(Date.now() / 1e3) + timeDifference\n });\n }\n const appAuthentication = await githubAppJwt(authOptions);\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString()\n };\n } catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\n \"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\"\n );\n } else {\n throw error;\n }\n }\n}\nexport {\n getAppAuthentication\n};\n", "import { Lru } from \"toad-cache\";\nfunction getCache() {\n return new Lru(\n // cache max. 15000 tokens, that will use less than 10mb memory\n 15e3,\n // Cache for 1 minute less than GitHub expiry\n 1e3 * 60 * 59\n );\n}\nasync function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissionsString,\n singleFileName\n ] = result.split(\"|\");\n const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => {\n if (/!$/.test(string)) {\n permissions2[string.slice(0, -1)] = \"write\";\n } else {\n permissions2[string] = \"read\";\n }\n return permissions2;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection\n };\n}\nasync function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions ? \"\" : Object.keys(data.permissions).map(\n (name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`\n ).join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({\n installationId,\n permissions = {},\n repositoryIds = [],\n repositoryNames = []\n}) {\n const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === \"read\" ? name : `${name}!`).join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString\n ].filter(Boolean).join(\"|\");\n}\nexport {\n get,\n getCache,\n optionsToCacheKey,\n set\n};\n", "function toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName\n}) {\n return Object.assign(\n {\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection\n },\n repositoryIds ? { repositoryIds } : null,\n repositoryNames ? { repositoryNames } : null,\n singleFileName ? { singleFileName } : null\n );\n}\nexport {\n toTokenAuthentication\n};\n", "import { get, optionsToCacheKey, set } from \"./cache.js\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { toTokenAuthentication } from \"./to-token-authentication.js\";\nasync function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId option is required for installation authentication.\"\n );\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options\n };\n return factory(factoryAuthOptions);\n }\n const request = customRequest || state.request;\n return getInstallationAuthenticationConcurrently(\n state,\n { ...options, installationId },\n request\n );\n}\nconst pendingPromises = /* @__PURE__ */ new Map();\nfunction getInstallationAuthenticationConcurrently(state, options, request) {\n const cacheKey = optionsToCacheKey(options);\n if (pendingPromises.has(cacheKey)) {\n return pendingPromises.get(cacheKey);\n }\n const promise = getInstallationAuthenticationImpl(\n state,\n options,\n request\n ).finally(() => pendingPromises.delete(cacheKey));\n pendingPromises.set(cacheKey, promise);\n return promise;\n}\nasync function getInstallationAuthenticationImpl(state, options, request) {\n if (!options.refresh) {\n const result = await get(state.cache, options);\n if (result) {\n const {\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2,\n repositorySelection: repositorySelection2\n } = result;\n return toTokenAuthentication({\n installationId: options.installationId,\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositorySelection: repositorySelection2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const payload = {\n installation_id: options.installationId,\n mediaType: {\n previews: [\"machine-man\"]\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`\n }\n };\n if (options.repositoryIds) {\n Object.assign(payload, { repository_ids: options.repositoryIds });\n }\n if (options.repositoryNames) {\n Object.assign(payload, {\n repositories: options.repositoryNames\n });\n }\n if (options.permissions) {\n Object.assign(payload, { permissions: options.permissions });\n }\n const {\n data: {\n token,\n expires_at: expiresAt,\n repositories,\n permissions: permissionsOptional,\n repository_selection: repositorySelectionOptional,\n single_file: singleFileName\n }\n } = await request(\n \"POST /app/installations/{installation_id}/access_tokens\",\n payload\n );\n const permissions = permissionsOptional || {};\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;\n const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;\n const createdAt = (/* @__PURE__ */ new Date()).toISOString();\n const cacheOptions = {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames\n };\n if (singleFileName) {\n Object.assign(payload, { singleFileName });\n }\n await set(state.cache, options, cacheOptions);\n const cacheData = {\n installationId: options.installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames\n };\n if (singleFileName) {\n Object.assign(cacheData, { singleFileName });\n }\n return toTokenAuthentication(cacheData);\n}\nexport {\n getInstallationAuthentication\n};\n", "import { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nasync function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\"\n });\n case \"oauth-user\":\n return state.oauthApp(authOptions);\n default:\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\nexport {\n auth\n};\n", "import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nimport { requiresAppAuth } from \"./requires-app-auth.js\";\nconst FIVE_SECONDS_IN_MS = 5 * 1e3;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(\n /'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/\n ) || error.message.match(\n /'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/\n ));\n}\nasync function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token: token2 } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token2}`;\n let response;\n try {\n response = await request(endpoint);\n } catch (error) {\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor(\n (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3\n );\n state.log.warn(error.message);\n state.log.warn(\n `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`\n );\n const { token: token3 } = await getAppAuthentication({\n ...state,\n timeDifference: diff\n });\n endpoint.headers.authorization = `bearer ${token3}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(\n state,\n // @ts-expect-error TBD\n {},\n request.defaults({ baseUrl: endpoint.baseUrl })\n );\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(\n state,\n request,\n endpoint,\n createdAt\n );\n}\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);\n try {\n return await request(options);\n } catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1e3;\n state.log.warn(\n `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`\n );\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\nexport {\n hook\n};\n", "const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/app/installation-requests\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\"\n];\nfunction routeMatcher(paths) {\n const regexes = paths.map(\n (p) => p.split(\"/\").map((c) => c.startsWith(\"{\") ? \"(?:.+?)\" : c).join(\"/\")\n );\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})$`;\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nfunction requiresAppAuth(url) {\n return !!url && REGEX.test(url.split(\"?\")[0]);\n}\nexport {\n requiresAppAuth\n};\n", "const VERSION = \"7.2.1\";\nexport {\n VERSION\n};\n"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { getCache } from \"./cache.js\";\nimport { VERSION } from \"./version.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nfunction createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId is set to a falsy value\"\n );\n }\n const log = Object.assign(\n {\n warn: console.warn.bind(console)\n },\n options.log\n );\n const request = options.request || defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`\n }\n });\n const state = Object.assign(\n {\n request,\n cache: getCache()\n },\n options,\n options.installationId ? { installationId: Number(options.installationId) } : {},\n {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request\n })\n }\n );\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\nexport {\n createAppAuth,\n createOAuthUserAuth\n};\n", "import githubAppJwt from \"universal-github-app-jwt\";\nasync function getAppAuthentication({\n appId,\n privateKey,\n timeDifference\n}) {\n try {\n const authOptions = {\n id: appId,\n privateKey\n };\n if (timeDifference) {\n Object.assign(authOptions, {\n now: Math.floor(Date.now() / 1e3) + timeDifference\n });\n }\n const appAuthentication = await githubAppJwt(authOptions);\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString()\n };\n } catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\n \"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\"\n );\n } else {\n throw error;\n }\n }\n}\nexport {\n getAppAuthentication\n};\n", "import { Lru } from \"toad-cache\";\nfunction getCache() {\n return new Lru(\n // cache max. 15000 tokens, that will use less than 10mb memory\n 15e3,\n // Cache for 1 minute less than GitHub expiry\n 1e3 * 60 * 59\n );\n}\nasync function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissionsString,\n singleFileName\n ] = result.split(\"|\");\n const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => {\n if (/!$/.test(string)) {\n permissions2[string.slice(0, -1)] = \"write\";\n } else {\n permissions2[string] = \"read\";\n }\n return permissions2;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection\n };\n}\nasync function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions ? \"\" : Object.keys(data.permissions).map(\n (name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`\n ).join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({\n installationId,\n permissions = {},\n repositoryIds = [],\n repositoryNames = []\n}) {\n const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === \"read\" ? name : `${name}!`).join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString\n ].filter(Boolean).join(\"|\");\n}\nexport {\n get,\n getCache,\n optionsToCacheKey,\n set\n};\n", "function toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName\n}) {\n return Object.assign(\n {\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection\n },\n repositoryIds ? { repositoryIds } : null,\n repositoryNames ? { repositoryNames } : null,\n singleFileName ? { singleFileName } : null\n );\n}\nexport {\n toTokenAuthentication\n};\n", "import { get, optionsToCacheKey, set } from \"./cache.js\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { toTokenAuthentication } from \"./to-token-authentication.js\";\nasync function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId option is required for installation authentication.\"\n );\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options\n };\n return factory(factoryAuthOptions);\n }\n const request = customRequest || state.request;\n return getInstallationAuthenticationConcurrently(\n state,\n { ...options, installationId },\n request\n );\n}\nconst pendingPromises = /* @__PURE__ */ new Map();\nfunction getInstallationAuthenticationConcurrently(state, options, request) {\n const cacheKey = optionsToCacheKey(options);\n if (pendingPromises.has(cacheKey)) {\n return pendingPromises.get(cacheKey);\n }\n const promise = getInstallationAuthenticationImpl(\n state,\n options,\n request\n ).finally(() => pendingPromises.delete(cacheKey));\n pendingPromises.set(cacheKey, promise);\n return promise;\n}\nasync function getInstallationAuthenticationImpl(state, options, request) {\n if (!options.refresh) {\n const result = await get(state.cache, options);\n if (result) {\n const {\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2,\n repositorySelection: repositorySelection2\n } = result;\n return toTokenAuthentication({\n installationId: options.installationId,\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositorySelection: repositorySelection2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const payload = {\n installation_id: options.installationId,\n mediaType: {\n previews: [\"machine-man\"]\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`\n }\n };\n if (options.repositoryIds) {\n Object.assign(payload, { repository_ids: options.repositoryIds });\n }\n if (options.repositoryNames) {\n Object.assign(payload, {\n repositories: options.repositoryNames\n });\n }\n if (options.permissions) {\n Object.assign(payload, { permissions: options.permissions });\n }\n const {\n data: {\n token,\n expires_at: expiresAt,\n repositories,\n permissions: permissionsOptional,\n repository_selection: repositorySelectionOptional,\n single_file: singleFileName\n }\n } = await request(\n \"POST /app/installations/{installation_id}/access_tokens\",\n payload\n );\n const permissions = permissionsOptional || {};\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;\n const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;\n const createdAt = (/* @__PURE__ */ new Date()).toISOString();\n const cacheOptions = {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames\n };\n if (singleFileName) {\n Object.assign(payload, { singleFileName });\n }\n await set(state.cache, options, cacheOptions);\n const cacheData = {\n installationId: options.installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames\n };\n if (singleFileName) {\n Object.assign(cacheData, { singleFileName });\n }\n return toTokenAuthentication(cacheData);\n}\nexport {\n getInstallationAuthentication\n};\n", "import { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nasync function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\"\n });\n case \"oauth-user\":\n return state.oauthApp(authOptions);\n default:\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\nexport {\n auth\n};\n", "import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nimport { requiresAppAuth } from \"./requires-app-auth.js\";\nconst FIVE_SECONDS_IN_MS = 5 * 1e3;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(\n /'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/\n ) || error.message.match(\n /'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/\n ));\n}\nasync function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token: token2 } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token2}`;\n let response;\n try {\n response = await request(endpoint);\n } catch (error) {\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor(\n (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3\n );\n state.log.warn(error.message);\n state.log.warn(\n `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`\n );\n const { token: token3 } = await getAppAuthentication({\n ...state,\n timeDifference: diff\n });\n endpoint.headers.authorization = `bearer ${token3}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(\n state,\n // @ts-expect-error TBD\n {},\n request.defaults({ baseUrl: endpoint.baseUrl })\n );\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(\n state,\n request,\n endpoint,\n createdAt\n );\n}\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);\n try {\n return await request(options);\n } catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1e3;\n state.log.warn(\n `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`\n );\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\nexport {\n hook\n};\n", "const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/app/installation-requests\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\"\n];\nfunction routeMatcher(paths) {\n const regexes = paths.map(\n (p) => p.split(\"/\").map((c) => c.startsWith(\"{\") ? \"(?:.+?)\" : c).join(\"/\")\n );\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})$`;\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nfunction requiresAppAuth(url) {\n return !!url && REGEX.test(url.split(\"?\")[0]);\n}\nexport {\n requiresAppAuth\n};\n", "const VERSION = \"8.0.1\";\nexport {\n VERSION\n};\n"], "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,sBAAsB;AAC1C,SAAS,0BAA0B;;;ACFnC,OAAO,kBAAkB;AACzB,eAAe,qBAAqB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI;AACF,UAAM,cAAc;AAAA,MAClB,IAAI;AAAA,MACJ;AAAA,IACF;AACA,QAAI,gBAAgB;AAClB,aAAO,OAAO,aAAa;AAAA,QACzB,KAAK,KAAK,MAAM,KAAK,IAAI,IAAI,GAAG,IAAI;AAAA,MACtC,CAAC;AAAA,IACH;AACA,UAAM,oBAAoB,MAAM,aAAa,WAAW;AACxD,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,kBAAkB;AAAA,MACzB,OAAO,kBAAkB;AAAA,MACzB,WAAW,IAAI,KAAK,kBAAkB,aAAa,GAAG,EAAE,YAAY;AAAA,IACtE;AAAA,EACF,SAAS,OAAO;AACd,QAAI,eAAe,mCAAmC;AACpD,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;;;AChCA,SAAS,WAAW;AACpB,SAAS,WAAW;AAClB,SAAO,IAAI;AAAA;AAAA,IAET;AAAA;AAAA,IAEA,MAAM,KAAK;AAAA,EACb;AACF;AACA,eAAe,IAAI,OAAO,SAAS;AACjC,QAAM,WAAW,kBAAkB,OAAO;AAC1C,QAAM,SAAS,MAAM,MAAM,IAAI,QAAQ;AACvC,MAAI,CAAC,QAAQ;AACX;AAAA,EACF;AACA,QAAM;AAAA,IACJ;A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AiB,EAAE,gBAAgB,OAAO,QAAQ,cAAc,EAAE,IAAI,CAAC;AAAA,IAC/E;AAAA,MACE;AAAA,MACA,UAAU,mBAAmB;AAAA,QAC3B,YAAY;AAAA,QACZ,UAAU,QAAQ,YAAY;AAAA,QAC9B,cAAc,QAAQ,gBAAgB;AAAA,QACtC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,IAC3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;", "names": [] } diff --git a/node_modules/@octokit/auth-app/dist-src/version.js b/node_modules/@octokit/auth-app/dist-src/version.js index 4e88e0ecf..37864959b 100644 --- a/node_modules/@octokit/auth-app/dist-src/version.js +++ b/node_modules/@octokit/auth-app/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "7.2.1"; +const VERSION = "8.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/auth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-app/dist-types/version.d.ts index 1e15d110f..f90330ad0 100644 --- a/node_modules/@octokit/auth-app/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "7.2.1"; +export declare const VERSION = "8.0.1"; diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/package.json b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/test.js b/node_modules/@octokit/auth-app/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/auth-app/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/auth-app/package.json b/node_modules/@octokit/auth-app/package.json index c5687cd20..acb6fa797 100644 --- a/node_modules/@octokit/auth-app/package.json +++ b/node_modules/@octokit/auth-app/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "7.2.1", + "version": "8.0.1", "description": "GitHub App authentication for JavaScript", "repository": "github:octokit/auth-app.js", "keywords": [ @@ -17,10 +17,10 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-oauth-app": "^8.1.4", - "@octokit/auth-oauth-user": "^5.1.4", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-oauth-app": "^9.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", "toad-cache": "^3.7.0", "universal-github-app-jwt": "^2.2.0", @@ -33,14 +33,14 @@ "@vitest/ui": "^3.0.0", "esbuild": "^0.25.0", "fetch-mock": "^11.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", + "tinyglobby": "^0.2.13", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/version.js b/node_modules/@octokit/auth-oauth-app/dist-src/version.js index e8af32ab5..19fc42329 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-src/version.js +++ b/node_modules/@octokit/auth-oauth-app/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "8.1.4"; +const VERSION = "9.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts index 25f97377b..274ce0ed1 100644 --- a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "8.1.4"; +export declare const VERSION = "9.0.1"; diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/package.json b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/test.js b/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/auth-oauth-app/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/auth-oauth-app/package.json b/node_modules/@octokit/auth-oauth-app/package.json index 37a1e0fe7..f4974869e 100644 --- a/node_modules/@octokit/auth-oauth-app/package.json +++ b/node_modules/@octokit/auth-oauth-app/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "8.1.4", + "version": "9.0.1", "description": "GitHub OAuth App authentication for JavaScript", "repository": "github:octokit/auth-oauth-app.js", "keywords": [ @@ -18,27 +18,27 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-oauth-device": "^7.1.5", - "@octokit/auth-oauth-user": "^5.1.4", - "@octokit/request": "^9.2.3", + "@octokit/auth-oauth-device": "^8.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "devDependencies": { - "@octokit/core": "^6.1.5", + "@octokit/core": "^7.0.2", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.13.1", "@vitest/coverage-v8": "^3.0.5", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", + "tinyglobby": "^0.2.13", "typescript": "^5.3.0", "vitest": "^3.0.5" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/dist-src/version.js index ef7b88a24..37864959b 100644 --- a/node_modules/@octokit/auth-oauth-device/dist-src/version.js +++ b/node_modules/@octokit/auth-oauth-device/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "7.1.5"; +const VERSION = "8.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts index cb5a94337..f90330ad0 100644 --- a/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "7.1.5"; +export declare const VERSION = "8.0.1"; diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/package.json b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/test.js b/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/auth-oauth-device/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/auth-oauth-device/package.json b/node_modules/@octokit/auth-oauth-device/package.json index d109257b2..cb70f9b6d 100644 --- a/node_modules/@octokit/auth-oauth-device/package.json +++ b/node_modules/@octokit/auth-oauth-device/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/auth-oauth-device", - "version": "7.1.5", + "version": "8.0.1", "description": "GitHub OAuth Device authentication strategy for JavaScript", "type": "module", "repository": "github:octokit/auth-oauth-device.js", @@ -13,8 +13,8 @@ "author": "Gregor Martynus (https://dev.to/gr2m)", "license": "MIT", "dependencies": { - "@octokit/oauth-methods": "^5.1.5", - "@octokit/request": "^9.2.3", + "@octokit/oauth-methods": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, @@ -35,7 +35,7 @@ "provenance": true }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/version.js b/node_modules/@octokit/auth-oauth-user/dist-src/version.js index 89ec32b4d..6b5dccdb6 100644 --- a/node_modules/@octokit/auth-oauth-user/dist-src/version.js +++ b/node_modules/@octokit/auth-oauth-user/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "5.1.4"; +const VERSION = "6.0.0"; export { VERSION }; diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts index ff561460a..392768e85 100644 --- a/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts +++ b/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "5.1.4"; +export declare const VERSION = "6.0.0"; diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/package.json b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/test.js b/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/auth-oauth-user/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/auth-oauth-user/package.json b/node_modules/@octokit/auth-oauth-user/package.json index 1aa701330..f85984608 100644 --- a/node_modules/@octokit/auth-oauth-user/package.json +++ b/node_modules/@octokit/auth-oauth-user/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.1.4", + "version": "6.0.0", "description": "Octokit authentication strategy for OAuth clients", "repository": "https://github.com/octokit/auth-oauth-user.js", "keywords": [ @@ -17,14 +17,14 @@ "author": "Gregor Martynus (https://dev.to/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-oauth-device": "^7.1.5", - "@octokit/oauth-methods": "^5.1.5", - "@octokit/request": "^9.2.3", + "@octokit/auth-oauth-device": "^8.0.1", + "@octokit/oauth-methods": "^6.0.0", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, "devDependencies": { - "@octokit/core": "^6.1.5", + "@octokit/core": "^7.0.1", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", @@ -32,13 +32,13 @@ "fetch-mock": "^11.0.0", "glob": "^11.0.0", "mockdate": "^3.0.4", - "prettier": "3.5.2", + "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/auth-unauthenticated/package.json b/node_modules/@octokit/auth-unauthenticated/package.json index b99ece0b1..db4a0db92 100644 --- a/node_modules/@octokit/auth-unauthenticated/package.json +++ b/node_modules/@octokit/auth-unauthenticated/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "6.1.3", + "version": "7.0.1", "description": "GitHub API token authentication for browsers and Node.js", "repository": "github:octokit/auth-unauthenticated.js", "keywords": [ @@ -17,24 +17,24 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/request-error": "^6.1.8", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0" }, "devDependencies": { - "@octokit/core": "^6.1.5", - "@octokit/request": "^9.2.3", + "@octokit/core": "^7.0.2", + "@octokit/request": "^10.0.2", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.13.1", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", + "tinyglobby": "^0.2.13", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js index b3d96f70c..e5f3e3b3d 100644 --- a/node_modules/@octokit/endpoint/dist-src/version.js +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "10.1.4"; +const VERSION = "11.0.0"; export { VERSION }; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts index 19394d22a..1e0c084ee 100644 --- a/node_modules/@octokit/endpoint/dist-types/version.d.ts +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "10.1.4"; +export declare const VERSION = "11.0.0"; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json index 1352198f0..38e14e622 100644 --- a/node_modules/@octokit/endpoint/package.json +++ b/node_modules/@octokit/endpoint/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/endpoint", - "version": "10.1.4", + "version": "11.0.0", "type": "module", "publishConfig": { "access": "public", @@ -33,7 +33,7 @@ "universal-user-agent": "^7.0.2" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/oauth-app/dist-node/index.js b/node_modules/@octokit/oauth-app/dist-node/index.js index 2434644db..181f5d1b0 100644 --- a/node_modules/@octokit/oauth-app/dist-node/index.js +++ b/node_modules/@octokit/oauth-app/dist-node/index.js @@ -2,7 +2,7 @@ import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; // pkg/dist-src/version.js -var VERSION = "7.1.6"; +var VERSION = "8.0.1"; // pkg/dist-src/add-event-handler.js function addEventHandler(state, eventName, eventHandler) { diff --git a/node_modules/@octokit/oauth-app/dist-node/index.js.map b/node_modules/@octokit/oauth-app/dist-node/index.js.map index 8a3f51cbb..90051970d 100644 --- a/node_modules/@octokit/oauth-app/dist-node/index.js.map +++ b/node_modules/@octokit/oauth-app/dist-node/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/add-event-handler.js", "../dist-src/oauth-app-octokit.js", "../dist-src/methods/get-user-octokit.js", "../dist-src/emit-event.js", "../dist-src/methods/get-web-flow-authorization-url.js", "../dist-src/methods/create-token.js", "../dist-src/methods/check-token.js", "../dist-src/methods/reset-token.js", "../dist-src/methods/refresh-token.js", "../dist-src/methods/scope-token.js", "../dist-src/methods/delete-token.js", "../dist-src/methods/delete-authorization.js", "../dist-src/middleware/unknown-route-response.js", "../dist-src/middleware/handle-request.js", "../dist-src/middleware/node/parse-request.js", "../dist-src/middleware/node/send-response.js", "../dist-src/middleware/node/index.js", "../dist-src/middleware/web-worker/parse-request.js", "../dist-src/middleware/web-worker/send-response.js", "../dist-src/middleware/web-worker/index.js", "../dist-src/middleware/aws-lambda/api-gateway-v2-parse-request.js", "../dist-src/middleware/aws-lambda/api-gateway-v2-send-response.js", "../dist-src/middleware/aws-lambda/api-gateway-v2.js"], - "sourcesContent": ["import { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { addEventHandler } from \"./add-event-handler.js\";\nimport { OAuthAppOctokit } from \"./oauth-app-octokit.js\";\nimport {\n getUserOctokitWithState\n} from \"./methods/get-user-octokit.js\";\nimport {\n getWebFlowAuthorizationUrlWithState\n} from \"./methods/get-web-flow-authorization-url.js\";\nimport {\n createTokenWithState\n} from \"./methods/create-token.js\";\nimport {\n checkTokenWithState\n} from \"./methods/check-token.js\";\nimport {\n resetTokenWithState\n} from \"./methods/reset-token.js\";\nimport {\n refreshTokenWithState\n} from \"./methods/refresh-token.js\";\nimport {\n scopeTokenWithState\n} from \"./methods/scope-token.js\";\nimport {\n deleteTokenWithState\n} from \"./methods/delete-token.js\";\nimport {\n deleteAuthorizationWithState\n} from \"./methods/delete-authorization.js\";\nimport { handleRequest } from \"./middleware/handle-request.js\";\nimport { unknownRouteResponse } from \"./middleware/unknown-route-response.js\";\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nimport { sendResponse } from \"./middleware/node/send-response.js\";\nimport { createWebWorkerHandler } from \"./middleware/web-worker/index.js\";\nimport { createAWSLambdaAPIGatewayV2Handler } from \"./middleware/aws-lambda/api-gateway-v2.js\";\nclass OAuthApp {\n static VERSION = VERSION;\n static defaults(defaults) {\n const OAuthAppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return OAuthAppWithDefaults;\n }\n constructor(options) {\n const Octokit = options.Octokit || OAuthAppOctokit;\n this.type = options.clientType || \"oauth-app\";\n const octokit = new Octokit({\n authStrategy: createOAuthAppAuth,\n auth: {\n clientType: this.type,\n clientId: options.clientId,\n clientSecret: options.clientSecret\n }\n });\n const state = {\n clientType: this.type,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n // @ts-expect-error defaultScopes not permitted for GitHub Apps\n defaultScopes: options.defaultScopes || [],\n allowSignup: options.allowSignup,\n baseUrl: options.baseUrl,\n redirectUrl: options.redirectUrl,\n log: options.log,\n Octokit,\n octokit,\n eventHandlers: {}\n };\n this.on = addEventHandler.bind(null, state);\n this.octokit = octokit;\n this.getUserOctokit = getUserOctokitWithState.bind(null, state);\n this.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrlWithState.bind(\n null,\n state\n );\n this.createToken = createTokenWithState.bind(\n null,\n state\n );\n this.checkToken = checkTokenWithState.bind(\n null,\n state\n );\n this.resetToken = resetTokenWithState.bind(\n null,\n state\n );\n this.refreshToken = refreshTokenWithState.bind(\n null,\n state\n );\n this.scopeToken = scopeTokenWithState.bind(\n null,\n state\n );\n this.deleteToken = deleteTokenWithState.bind(null, state);\n this.deleteAuthorization = deleteAuthorizationWithState.bind(null, state);\n }\n // assigned during constructor\n type;\n on;\n octokit;\n getUserOctokit;\n getWebFlowAuthorizationUrl;\n createToken;\n checkToken;\n resetToken;\n refreshToken;\n scopeToken;\n deleteToken;\n deleteAuthorization;\n}\nexport {\n OAuthApp,\n createAWSLambdaAPIGatewayV2Handler,\n createNodeMiddleware,\n createWebWorkerHandler,\n handleRequest,\n sendResponse as sendNodeResponse,\n unknownRouteResponse\n};\n", "const VERSION = \"7.1.6\";\nexport {\n VERSION\n};\n", "function addEventHandler(state, eventName, eventHandler) {\n if (Array.isArray(eventName)) {\n for (const singleEventName of eventName) {\n addEventHandler(state, singleEventName, eventHandler);\n }\n return;\n }\n if (!state.eventHandlers[eventName]) {\n state.eventHandlers[eventName] = [];\n }\n state.eventHandlers[eventName].push(eventHandler);\n}\nexport {\n addEventHandler\n};\n", "import { Octokit } from \"@octokit/core\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nconst OAuthAppOctokit = Octokit.defaults({\n userAgent: `octokit-oauth-app.js/${VERSION} ${getUserAgent()}`\n});\nexport {\n OAuthAppOctokit\n};\n", "import { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function getUserOctokitWithState(state, options) {\n return state.octokit.auth({\n type: \"oauth-user\",\n ...options,\n async factory(options2) {\n const octokit = new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: options2\n });\n const authentication = await octokit.auth({\n type: \"get\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"created\",\n token: authentication.token,\n scopes: authentication.scopes,\n authentication,\n octokit\n });\n return octokit;\n }\n });\n}\nexport {\n getUserOctokitWithState\n};\n", "async function emitEvent(state, context) {\n const { name, action } = context;\n if (state.eventHandlers[`${name}.${action}`]) {\n for (const eventHandler of state.eventHandlers[`${name}.${action}`]) {\n await eventHandler(context);\n }\n }\n if (state.eventHandlers[name]) {\n for (const eventHandler of state.eventHandlers[name]) {\n await eventHandler(context);\n }\n }\n}\nexport {\n emitEvent\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nfunction getWebFlowAuthorizationUrlWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n request: state.octokit.request,\n ...options,\n allowSignup: state.allowSignup ?? options.allowSignup,\n redirectUrl: options.redirectUrl ?? state.redirectUrl,\n scopes: options.scopes ?? state.defaultScopes\n };\n return OAuthMethods.getWebFlowAuthorizationUrl({\n clientType: state.clientType,\n ...optionsWithDefaults\n });\n}\nexport {\n getWebFlowAuthorizationUrlWithState\n};\n", "import * as OAuthAppAuth from \"@octokit/auth-oauth-app\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function createTokenWithState(state, options) {\n const authentication = await state.octokit.auth({\n type: \"oauth-user\",\n ...options\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"created\",\n token: authentication.token,\n scopes: authentication.scopes,\n authentication,\n octokit: new state.Octokit({\n authStrategy: OAuthAppAuth.createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: authentication.token,\n scopes: authentication.scopes,\n refreshToken: authentication.refreshToken,\n expiresAt: authentication.expiresAt,\n refreshTokenExpiresAt: authentication.refreshTokenExpiresAt\n }\n })\n });\n return { authentication };\n}\nexport {\n createTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nasync function checkTokenWithState(state, options) {\n const result = await OAuthMethods.checkToken({\n // @ts-expect-error not worth the extra code to appease TS\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n });\n Object.assign(result.authentication, { type: \"token\", tokenType: \"oauth\" });\n return result;\n}\nexport {\n checkTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { emitEvent } from \"../emit-event.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nasync function resetTokenWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n if (state.clientType === \"oauth-app\") {\n const response2 = await OAuthMethods.resetToken({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n });\n const authentication2 = Object.assign(response2.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"reset\",\n token: response2.authentication.token,\n scopes: response2.authentication.scopes || void 0,\n authentication: authentication2,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response2.authentication.token,\n scopes: response2.authentication.scopes\n }\n })\n });\n return { ...response2, authentication: authentication2 };\n }\n const response = await OAuthMethods.resetToken({\n clientType: \"github-app\",\n ...optionsWithDefaults\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"reset\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n resetTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { emitEvent } from \"../emit-event.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nasync function refreshTokenWithState(state, options) {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\n \"[@octokit/oauth-app] app.refreshToken() is not supported for OAuth Apps\"\n );\n }\n const response = await OAuthMethods.refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n refreshToken: options.refreshToken\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"refreshed\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n refreshTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function scopeTokenWithState(state, options) {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\n \"[@octokit/oauth-app] app.scopeToken() is not supported for OAuth Apps\"\n );\n }\n const response = await OAuthMethods.scopeToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"scoped\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n scopeTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function deleteTokenWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n const response = state.clientType === \"oauth-app\" ? await OAuthMethods.deleteToken({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n }) : (\n /* v8 ignore next 4 */\n await OAuthMethods.deleteToken({\n clientType: \"github-app\",\n ...optionsWithDefaults\n })\n );\n await emitEvent(state, {\n name: \"token\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"token.deleted\" event. The access for the token has been revoked.`\n }\n })\n });\n return response;\n}\nexport {\n deleteTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function deleteAuthorizationWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n const response = state.clientType === \"oauth-app\" ? await OAuthMethods.deleteAuthorization({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n }) : (\n /* v8 ignore next 4 */\n await OAuthMethods.deleteAuthorization({\n clientType: \"github-app\",\n ...optionsWithDefaults\n })\n );\n await emitEvent(state, {\n name: \"token\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"token.deleted\" event. The access for the token has been revoked.`\n }\n })\n });\n await emitEvent(state, {\n name: \"authorization\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"authorization.deleted\" event. The access for the app has been revoked.`\n }\n })\n });\n return response;\n}\nexport {\n deleteAuthorizationWithState\n};\n", "function unknownRouteResponse(request) {\n return {\n status: 404,\n headers: { \"content-type\": \"application/json\" },\n text: JSON.stringify({\n error: `Unknown route: ${request.method} ${request.url}`\n })\n };\n}\nexport {\n unknownRouteResponse\n};\n", "import { OAuthApp } from \"../index.js\";\nimport { unknownRouteResponse } from \"./unknown-route-response.js\";\nasync function handleRequest(app, { pathPrefix = \"/api/github/oauth\" }, request) {\n let { pathname } = new URL(request.url, \"http://localhost\");\n if (!pathname.startsWith(`${pathPrefix}/`)) {\n return void 0;\n }\n if (request.method === \"OPTIONS\") {\n return {\n status: 200,\n headers: {\n \"access-control-allow-origin\": \"*\",\n \"access-control-allow-methods\": \"*\",\n \"access-control-allow-headers\": \"Content-Type, User-Agent, Authorization\"\n }\n };\n }\n pathname = pathname.slice(pathPrefix.length + 1);\n const route = [request.method, pathname].join(\" \");\n const routes = {\n getLogin: `GET login`,\n getCallback: `GET callback`,\n createToken: `POST token`,\n getToken: `GET token`,\n patchToken: `PATCH token`,\n patchRefreshToken: `PATCH refresh-token`,\n scopeToken: `POST token/scoped`,\n deleteToken: `DELETE token`,\n deleteGrant: `DELETE grant`\n };\n if (!Object.values(routes).includes(route)) {\n return unknownRouteResponse(request);\n }\n let json;\n try {\n const text = await request.text();\n json = text ? JSON.parse(text) : {};\n } catch (error) {\n return {\n status: 400,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify({\n error: \"[@octokit/oauth-app] request error\"\n })\n };\n }\n const { searchParams } = new URL(request.url, \"http://localhost\");\n const query = Object.fromEntries(searchParams);\n const headers = request.headers;\n try {\n if (route === routes.getLogin) {\n const authOptions = {};\n if (query.state) {\n Object.assign(authOptions, { state: query.state });\n }\n if (query.scopes) {\n Object.assign(authOptions, { scopes: query.scopes.split(\",\") });\n }\n if (query.allowSignup) {\n Object.assign(authOptions, {\n allowSignup: query.allowSignup === \"true\"\n });\n }\n if (query.redirectUrl) {\n Object.assign(authOptions, { redirectUrl: query.redirectUrl });\n }\n const { url } = app.getWebFlowAuthorizationUrl(authOptions);\n return { status: 302, headers: { location: url } };\n }\n if (route === routes.getCallback) {\n if (query.error) {\n throw new Error(\n `[@octokit/oauth-app] ${query.error} ${query.error_description}`\n );\n }\n if (!query.code) {\n throw new Error('[@octokit/oauth-app] \"code\" parameter is required');\n }\n const {\n authentication: { token: token2 }\n } = await app.createToken({\n code: query.code\n });\n return {\n status: 200,\n headers: {\n \"content-type\": \"text/html\"\n },\n text: `

Token created successfully

\n\n

Your token is: ${token2}. Copy it now as it cannot be shown again.

`\n };\n }\n if (route === routes.createToken) {\n const { code, redirectUrl } = json;\n if (!code) {\n throw new Error('[@octokit/oauth-app] \"code\" parameter is required');\n }\n const result = await app.createToken({\n code,\n redirectUrl\n });\n delete result.authentication.clientSecret;\n return {\n status: 201,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.getToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.checkToken({\n token: token2\n });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.patchToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.resetToken({ token: token2 });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.patchRefreshToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const { refreshToken } = json;\n if (!refreshToken) {\n throw new Error(\n \"[@octokit/oauth-app] refreshToken must be sent in request body\"\n );\n }\n const result = await app.refreshToken({ refreshToken });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.scopeToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.scopeToken({\n token: token2,\n ...json\n });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.deleteToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n await app.deleteToken({\n token: token2\n });\n return {\n status: 204,\n headers: { \"access-control-allow-origin\": \"*\" }\n };\n }\n const token = headers.authorization?.substr(\"token \".length);\n if (!token) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n await app.deleteAuthorization({\n token\n });\n return {\n status: 204,\n headers: { \"access-control-allow-origin\": \"*\" }\n };\n } catch (error) {\n return {\n status: 400,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify({ error: error.message })\n };\n }\n}\nexport {\n handleRequest\n};\n", "function parseRequest(request) {\n const { method, url, headers } = request;\n async function text() {\n const text2 = await new Promise((resolve, reject) => {\n let bodyChunks = [];\n request.on(\"error\", reject).on(\"data\", (chunk) => bodyChunks.push(chunk)).on(\"end\", () => resolve(Buffer.concat(bodyChunks).toString()));\n });\n return text2;\n }\n return { method, url, headers, text };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse, response) {\n response.writeHead(octokitResponse.status, octokitResponse.headers);\n response.end(octokitResponse.text);\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./parse-request.js\";\nimport { sendResponse } from \"./send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createNodeMiddleware(app, options = {}) {\n return async function(request, response, next) {\n const octokitRequest = await parseRequest(request);\n const octokitResponse = await handleRequest(app, options, octokitRequest);\n if (octokitResponse) {\n sendResponse(octokitResponse, response);\n return true;\n } else {\n next?.();\n return false;\n }\n };\n}\nexport {\n createNodeMiddleware\n};\n", "function parseRequest(request) {\n const headers = Object.fromEntries(request.headers.entries());\n return {\n method: request.method,\n url: request.url,\n headers,\n text: () => request.text()\n };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse) {\n const responseOptions = {\n status: octokitResponse.status\n };\n if (octokitResponse.headers) {\n Object.assign(responseOptions, { headers: octokitResponse.headers });\n }\n return new Response(octokitResponse.text, responseOptions);\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./parse-request.js\";\nimport { sendResponse } from \"./send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createWebWorkerHandler(app, options = {}) {\n return async function(request) {\n const octokitRequest = await parseRequest(request);\n const octokitResponse = await handleRequest(app, options, octokitRequest);\n return octokitResponse ? sendResponse(octokitResponse) : void 0;\n };\n}\nexport {\n createWebWorkerHandler\n};\n", "function parseRequest(request) {\n const { method } = request.requestContext.http;\n let url = request.rawPath;\n const { stage } = request.requestContext;\n if (url.startsWith(\"/\" + stage)) url = url.substring(stage.length + 1);\n if (request.rawQueryString) url += \"?\" + request.rawQueryString;\n const headers = request.headers;\n const text = async () => request.body || \"\";\n return { method, url, headers, text };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse) {\n return {\n statusCode: octokitResponse.status,\n headers: octokitResponse.headers,\n body: octokitResponse.text\n };\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./api-gateway-v2-parse-request.js\";\nimport { sendResponse } from \"./api-gateway-v2-send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createAWSLambdaAPIGatewayV2Handler(app, options = {}) {\n return async function(event) {\n const request = parseRequest(event);\n const response = await handleRequest(app, options, request);\n return response ? sendResponse(response) : void 0;\n };\n}\nexport {\n createAWSLambdaAPIGatewayV2Handler\n};\n"], + "sourcesContent": ["import { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { VERSION } from \"./version.js\";\nimport { addEventHandler } from \"./add-event-handler.js\";\nimport { OAuthAppOctokit } from \"./oauth-app-octokit.js\";\nimport {\n getUserOctokitWithState\n} from \"./methods/get-user-octokit.js\";\nimport {\n getWebFlowAuthorizationUrlWithState\n} from \"./methods/get-web-flow-authorization-url.js\";\nimport {\n createTokenWithState\n} from \"./methods/create-token.js\";\nimport {\n checkTokenWithState\n} from \"./methods/check-token.js\";\nimport {\n resetTokenWithState\n} from \"./methods/reset-token.js\";\nimport {\n refreshTokenWithState\n} from \"./methods/refresh-token.js\";\nimport {\n scopeTokenWithState\n} from \"./methods/scope-token.js\";\nimport {\n deleteTokenWithState\n} from \"./methods/delete-token.js\";\nimport {\n deleteAuthorizationWithState\n} from \"./methods/delete-authorization.js\";\nimport { handleRequest } from \"./middleware/handle-request.js\";\nimport { unknownRouteResponse } from \"./middleware/unknown-route-response.js\";\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nimport { sendResponse } from \"./middleware/node/send-response.js\";\nimport { createWebWorkerHandler } from \"./middleware/web-worker/index.js\";\nimport { createAWSLambdaAPIGatewayV2Handler } from \"./middleware/aws-lambda/api-gateway-v2.js\";\nclass OAuthApp {\n static VERSION = VERSION;\n static defaults(defaults) {\n const OAuthAppWithDefaults = class extends this {\n constructor(...args) {\n super({\n ...defaults,\n ...args[0]\n });\n }\n };\n return OAuthAppWithDefaults;\n }\n constructor(options) {\n const Octokit = options.Octokit || OAuthAppOctokit;\n this.type = options.clientType || \"oauth-app\";\n const octokit = new Octokit({\n authStrategy: createOAuthAppAuth,\n auth: {\n clientType: this.type,\n clientId: options.clientId,\n clientSecret: options.clientSecret\n }\n });\n const state = {\n clientType: this.type,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n // @ts-expect-error defaultScopes not permitted for GitHub Apps\n defaultScopes: options.defaultScopes || [],\n allowSignup: options.allowSignup,\n baseUrl: options.baseUrl,\n redirectUrl: options.redirectUrl,\n log: options.log,\n Octokit,\n octokit,\n eventHandlers: {}\n };\n this.on = addEventHandler.bind(null, state);\n this.octokit = octokit;\n this.getUserOctokit = getUserOctokitWithState.bind(null, state);\n this.getWebFlowAuthorizationUrl = getWebFlowAuthorizationUrlWithState.bind(\n null,\n state\n );\n this.createToken = createTokenWithState.bind(\n null,\n state\n );\n this.checkToken = checkTokenWithState.bind(\n null,\n state\n );\n this.resetToken = resetTokenWithState.bind(\n null,\n state\n );\n this.refreshToken = refreshTokenWithState.bind(\n null,\n state\n );\n this.scopeToken = scopeTokenWithState.bind(\n null,\n state\n );\n this.deleteToken = deleteTokenWithState.bind(null, state);\n this.deleteAuthorization = deleteAuthorizationWithState.bind(null, state);\n }\n // assigned during constructor\n type;\n on;\n octokit;\n getUserOctokit;\n getWebFlowAuthorizationUrl;\n createToken;\n checkToken;\n resetToken;\n refreshToken;\n scopeToken;\n deleteToken;\n deleteAuthorization;\n}\nexport {\n OAuthApp,\n createAWSLambdaAPIGatewayV2Handler,\n createNodeMiddleware,\n createWebWorkerHandler,\n handleRequest,\n sendResponse as sendNodeResponse,\n unknownRouteResponse\n};\n", "const VERSION = \"8.0.1\";\nexport {\n VERSION\n};\n", "function addEventHandler(state, eventName, eventHandler) {\n if (Array.isArray(eventName)) {\n for (const singleEventName of eventName) {\n addEventHandler(state, singleEventName, eventHandler);\n }\n return;\n }\n if (!state.eventHandlers[eventName]) {\n state.eventHandlers[eventName] = [];\n }\n state.eventHandlers[eventName].push(eventHandler);\n}\nexport {\n addEventHandler\n};\n", "import { Octokit } from \"@octokit/core\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nconst OAuthAppOctokit = Octokit.defaults({\n userAgent: `octokit-oauth-app.js/${VERSION} ${getUserAgent()}`\n});\nexport {\n OAuthAppOctokit\n};\n", "import { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function getUserOctokitWithState(state, options) {\n return state.octokit.auth({\n type: \"oauth-user\",\n ...options,\n async factory(options2) {\n const octokit = new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: options2\n });\n const authentication = await octokit.auth({\n type: \"get\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"created\",\n token: authentication.token,\n scopes: authentication.scopes,\n authentication,\n octokit\n });\n return octokit;\n }\n });\n}\nexport {\n getUserOctokitWithState\n};\n", "async function emitEvent(state, context) {\n const { name, action } = context;\n if (state.eventHandlers[`${name}.${action}`]) {\n for (const eventHandler of state.eventHandlers[`${name}.${action}`]) {\n await eventHandler(context);\n }\n }\n if (state.eventHandlers[name]) {\n for (const eventHandler of state.eventHandlers[name]) {\n await eventHandler(context);\n }\n }\n}\nexport {\n emitEvent\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nfunction getWebFlowAuthorizationUrlWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n request: state.octokit.request,\n ...options,\n allowSignup: state.allowSignup ?? options.allowSignup,\n redirectUrl: options.redirectUrl ?? state.redirectUrl,\n scopes: options.scopes ?? state.defaultScopes\n };\n return OAuthMethods.getWebFlowAuthorizationUrl({\n clientType: state.clientType,\n ...optionsWithDefaults\n });\n}\nexport {\n getWebFlowAuthorizationUrlWithState\n};\n", "import * as OAuthAppAuth from \"@octokit/auth-oauth-app\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function createTokenWithState(state, options) {\n const authentication = await state.octokit.auth({\n type: \"oauth-user\",\n ...options\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"created\",\n token: authentication.token,\n scopes: authentication.scopes,\n authentication,\n octokit: new state.Octokit({\n authStrategy: OAuthAppAuth.createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: authentication.token,\n scopes: authentication.scopes,\n refreshToken: authentication.refreshToken,\n expiresAt: authentication.expiresAt,\n refreshTokenExpiresAt: authentication.refreshTokenExpiresAt\n }\n })\n });\n return { authentication };\n}\nexport {\n createTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nasync function checkTokenWithState(state, options) {\n const result = await OAuthMethods.checkToken({\n // @ts-expect-error not worth the extra code to appease TS\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n });\n Object.assign(result.authentication, { type: \"token\", tokenType: \"oauth\" });\n return result;\n}\nexport {\n checkTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { emitEvent } from \"../emit-event.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nasync function resetTokenWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n if (state.clientType === \"oauth-app\") {\n const response2 = await OAuthMethods.resetToken({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n });\n const authentication2 = Object.assign(response2.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"reset\",\n token: response2.authentication.token,\n scopes: response2.authentication.scopes || void 0,\n authentication: authentication2,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response2.authentication.token,\n scopes: response2.authentication.scopes\n }\n })\n });\n return { ...response2, authentication: authentication2 };\n }\n const response = await OAuthMethods.resetToken({\n clientType: \"github-app\",\n ...optionsWithDefaults\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"reset\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n resetTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { emitEvent } from \"../emit-event.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nasync function refreshTokenWithState(state, options) {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\n \"[@octokit/oauth-app] app.refreshToken() is not supported for OAuth Apps\"\n );\n }\n const response = await OAuthMethods.refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n refreshToken: options.refreshToken\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"refreshed\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n refreshTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function scopeTokenWithState(state, options) {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\n \"[@octokit/oauth-app] app.scopeToken() is not supported for OAuth Apps\"\n );\n }\n const response = await OAuthMethods.scopeToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n });\n const authentication = Object.assign(response.authentication, {\n type: \"token\",\n tokenType: \"oauth\"\n });\n await emitEvent(state, {\n name: \"token\",\n action: \"scoped\",\n token: response.authentication.token,\n authentication,\n octokit: new state.Octokit({\n authStrategy: createOAuthUserAuth,\n auth: {\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: response.authentication.token\n }\n })\n });\n return { ...response, authentication };\n}\nexport {\n scopeTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function deleteTokenWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n const response = state.clientType === \"oauth-app\" ? await OAuthMethods.deleteToken({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n }) : (\n /* v8 ignore next 4 */\n await OAuthMethods.deleteToken({\n clientType: \"github-app\",\n ...optionsWithDefaults\n })\n );\n await emitEvent(state, {\n name: \"token\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"token.deleted\" event. The access for the token has been revoked.`\n }\n })\n });\n return response;\n}\nexport {\n deleteTokenWithState\n};\n", "import * as OAuthMethods from \"@octokit/oauth-methods\";\nimport { createUnauthenticatedAuth } from \"@octokit/auth-unauthenticated\";\nimport { emitEvent } from \"../emit-event.js\";\nasync function deleteAuthorizationWithState(state, options) {\n const optionsWithDefaults = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.octokit.request,\n ...options\n };\n const response = state.clientType === \"oauth-app\" ? await OAuthMethods.deleteAuthorization({\n clientType: \"oauth-app\",\n ...optionsWithDefaults\n }) : (\n /* v8 ignore next 4 */\n await OAuthMethods.deleteAuthorization({\n clientType: \"github-app\",\n ...optionsWithDefaults\n })\n );\n await emitEvent(state, {\n name: \"token\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"token.deleted\" event. The access for the token has been revoked.`\n }\n })\n });\n await emitEvent(state, {\n name: \"authorization\",\n action: \"deleted\",\n token: options.token,\n octokit: new state.Octokit({\n authStrategy: createUnauthenticatedAuth,\n auth: {\n reason: `Handling \"authorization.deleted\" event. The access for the app has been revoked.`\n }\n })\n });\n return response;\n}\nexport {\n deleteAuthorizationWithState\n};\n", "function unknownRouteResponse(request) {\n return {\n status: 404,\n headers: { \"content-type\": \"application/json\" },\n text: JSON.stringify({\n error: `Unknown route: ${request.method} ${request.url}`\n })\n };\n}\nexport {\n unknownRouteResponse\n};\n", "import { OAuthApp } from \"../index.js\";\nimport { unknownRouteResponse } from \"./unknown-route-response.js\";\nasync function handleRequest(app, { pathPrefix = \"/api/github/oauth\" }, request) {\n let { pathname } = new URL(request.url, \"http://localhost\");\n if (!pathname.startsWith(`${pathPrefix}/`)) {\n return void 0;\n }\n if (request.method === \"OPTIONS\") {\n return {\n status: 200,\n headers: {\n \"access-control-allow-origin\": \"*\",\n \"access-control-allow-methods\": \"*\",\n \"access-control-allow-headers\": \"Content-Type, User-Agent, Authorization\"\n }\n };\n }\n pathname = pathname.slice(pathPrefix.length + 1);\n const route = [request.method, pathname].join(\" \");\n const routes = {\n getLogin: `GET login`,\n getCallback: `GET callback`,\n createToken: `POST token`,\n getToken: `GET token`,\n patchToken: `PATCH token`,\n patchRefreshToken: `PATCH refresh-token`,\n scopeToken: `POST token/scoped`,\n deleteToken: `DELETE token`,\n deleteGrant: `DELETE grant`\n };\n if (!Object.values(routes).includes(route)) {\n return unknownRouteResponse(request);\n }\n let json;\n try {\n const text = await request.text();\n json = text ? JSON.parse(text) : {};\n } catch (error) {\n return {\n status: 400,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify({\n error: \"[@octokit/oauth-app] request error\"\n })\n };\n }\n const { searchParams } = new URL(request.url, \"http://localhost\");\n const query = Object.fromEntries(searchParams);\n const headers = request.headers;\n try {\n if (route === routes.getLogin) {\n const authOptions = {};\n if (query.state) {\n Object.assign(authOptions, { state: query.state });\n }\n if (query.scopes) {\n Object.assign(authOptions, { scopes: query.scopes.split(\",\") });\n }\n if (query.allowSignup) {\n Object.assign(authOptions, {\n allowSignup: query.allowSignup === \"true\"\n });\n }\n if (query.redirectUrl) {\n Object.assign(authOptions, { redirectUrl: query.redirectUrl });\n }\n const { url } = app.getWebFlowAuthorizationUrl(authOptions);\n return { status: 302, headers: { location: url } };\n }\n if (route === routes.getCallback) {\n if (query.error) {\n throw new Error(\n `[@octokit/oauth-app] ${query.error} ${query.error_description}`\n );\n }\n if (!query.code) {\n throw new Error('[@octokit/oauth-app] \"code\" parameter is required');\n }\n const {\n authentication: { token: token2 }\n } = await app.createToken({\n code: query.code\n });\n return {\n status: 200,\n headers: {\n \"content-type\": \"text/html\"\n },\n text: `

Token created successfully

\n\n

Your token is: ${token2}. Copy it now as it cannot be shown again.

`\n };\n }\n if (route === routes.createToken) {\n const { code, redirectUrl } = json;\n if (!code) {\n throw new Error('[@octokit/oauth-app] \"code\" parameter is required');\n }\n const result = await app.createToken({\n code,\n redirectUrl\n });\n delete result.authentication.clientSecret;\n return {\n status: 201,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.getToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.checkToken({\n token: token2\n });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.patchToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.resetToken({ token: token2 });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.patchRefreshToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const { refreshToken } = json;\n if (!refreshToken) {\n throw new Error(\n \"[@octokit/oauth-app] refreshToken must be sent in request body\"\n );\n }\n const result = await app.refreshToken({ refreshToken });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.scopeToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n const result = await app.scopeToken({\n token: token2,\n ...json\n });\n delete result.authentication.clientSecret;\n return {\n status: 200,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify(result)\n };\n }\n if (route === routes.deleteToken) {\n const token2 = headers.authorization?.substr(\"token \".length);\n if (!token2) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n await app.deleteToken({\n token: token2\n });\n return {\n status: 204,\n headers: { \"access-control-allow-origin\": \"*\" }\n };\n }\n const token = headers.authorization?.substr(\"token \".length);\n if (!token) {\n throw new Error(\n '[@octokit/oauth-app] \"Authorization\" header is required'\n );\n }\n await app.deleteAuthorization({\n token\n });\n return {\n status: 204,\n headers: { \"access-control-allow-origin\": \"*\" }\n };\n } catch (error) {\n return {\n status: 400,\n headers: {\n \"content-type\": \"application/json\",\n \"access-control-allow-origin\": \"*\"\n },\n text: JSON.stringify({ error: error.message })\n };\n }\n}\nexport {\n handleRequest\n};\n", "function parseRequest(request) {\n const { method, url, headers } = request;\n async function text() {\n const text2 = await new Promise((resolve, reject) => {\n let bodyChunks = [];\n request.on(\"error\", reject).on(\"data\", (chunk) => bodyChunks.push(chunk)).on(\"end\", () => resolve(Buffer.concat(bodyChunks).toString()));\n });\n return text2;\n }\n return { method, url, headers, text };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse, response) {\n response.writeHead(octokitResponse.status, octokitResponse.headers);\n response.end(octokitResponse.text);\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./parse-request.js\";\nimport { sendResponse } from \"./send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createNodeMiddleware(app, options = {}) {\n return async function(request, response, next) {\n const octokitRequest = await parseRequest(request);\n const octokitResponse = await handleRequest(app, options, octokitRequest);\n if (octokitResponse) {\n sendResponse(octokitResponse, response);\n return true;\n } else {\n next?.();\n return false;\n }\n };\n}\nexport {\n createNodeMiddleware\n};\n", "function parseRequest(request) {\n const headers = Object.fromEntries(request.headers.entries());\n return {\n method: request.method,\n url: request.url,\n headers,\n text: () => request.text()\n };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse) {\n const responseOptions = {\n status: octokitResponse.status\n };\n if (octokitResponse.headers) {\n Object.assign(responseOptions, { headers: octokitResponse.headers });\n }\n return new Response(octokitResponse.text, responseOptions);\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./parse-request.js\";\nimport { sendResponse } from \"./send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createWebWorkerHandler(app, options = {}) {\n return async function(request) {\n const octokitRequest = await parseRequest(request);\n const octokitResponse = await handleRequest(app, options, octokitRequest);\n return octokitResponse ? sendResponse(octokitResponse) : void 0;\n };\n}\nexport {\n createWebWorkerHandler\n};\n", "function parseRequest(request) {\n const { method } = request.requestContext.http;\n let url = request.rawPath;\n const { stage } = request.requestContext;\n if (url.startsWith(\"/\" + stage)) url = url.substring(stage.length + 1);\n if (request.rawQueryString) url += \"?\" + request.rawQueryString;\n const headers = request.headers;\n const text = async () => request.body || \"\";\n return { method, url, headers, text };\n}\nexport {\n parseRequest\n};\n", "function sendResponse(octokitResponse) {\n return {\n statusCode: octokitResponse.status,\n headers: octokitResponse.headers,\n body: octokitResponse.text\n };\n}\nexport {\n sendResponse\n};\n", "import { parseRequest } from \"./api-gateway-v2-parse-request.js\";\nimport { sendResponse } from \"./api-gateway-v2-send-response.js\";\nimport { handleRequest } from \"../handle-request.js\";\nfunction createAWSLambdaAPIGatewayV2Handler(app, options = {}) {\n return async function(event) {\n const request = parseRequest(event);\n const response = await handleRequest(app, options, request);\n return response ? sendResponse(response) : void 0;\n };\n}\nexport {\n createAWSLambdaAPIGatewayV2Handler\n};\n"], "mappings": ";AAAA,SAAS,0BAA0B;;;ACAnC,IAAM,UAAU;;;ACAhB,SAAS,gBAAgB,OAAO,WAAW,cAAc;AACvD,MAAI,MAAM,QAAQ,SAAS,GAAG;AAC5B,eAAW,mBAAmB,WAAW;AACvC,sBAAgB,OAAO,iBAAiB,YAAY;AAAA,IACtD;AACA;AAAA,EACF;AAC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AK,MAAM,KAAK;AAAA,EAC1E;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;", "names": ["OAuthMethods", "OAuthMethods", "createOAuthUserAuth", "OAuthMethods", "createOAuthUserAuth", "OAuthMethods", "createOAuthUserAuth", "createOAuthUserAuth", "OAuthMethods", "OAuthMethods", "createUnauthenticatedAuth", "createUnauthenticatedAuth", "refreshToken", "parseRequest", "sendResponse", "parseRequest", "sendResponse", "parseRequest", "sendResponse", "parseRequest", "sendResponse", "Octokit"] } diff --git a/node_modules/@octokit/oauth-app/dist-src/version.js b/node_modules/@octokit/oauth-app/dist-src/version.js index a4e9f24ca..37864959b 100644 --- a/node_modules/@octokit/oauth-app/dist-src/version.js +++ b/node_modules/@octokit/oauth-app/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "7.1.6"; +const VERSION = "8.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/oauth-app/dist-types/version.d.ts b/node_modules/@octokit/oauth-app/dist-types/version.d.ts index 614c54dd2..f90330ad0 100644 --- a/node_modules/@octokit/oauth-app/dist-types/version.d.ts +++ b/node_modules/@octokit/oauth-app/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "7.1.6"; +export declare const VERSION = "8.0.1"; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/oauth-app/node_modules/@octokit/auth-token/package.json index c07fa98b5..075fe0725 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/auth-token/package.json +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/auth-token/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.1.2", + "version": "6.0.0", "description": "GitHub API token authentication for browsers and Node.js", "repository": "github:octokit/auth-token.js", "keywords": [ @@ -19,18 +19,17 @@ "devDependencies": { "@octokit/request": "^9.0.0", "@octokit/tsconfig": "^4.0.0", - "@octokit/types": "^13.0.0", + "@octokit/types": "^14.0.0", "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.24.0", - "fetch-mock": "^11.0.0", + "esbuild": "^0.25.0", + "fetch-mock": "^12.0.0", "glob": "^11.0.0", - "prettier": "3.4.2", - "semantic-release": "^24.0.0", + "prettier": "3.5.3", "typescript": "^5.3.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-src/version.js b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-src/version.js index 2f5d3ab9d..ad9f40dea 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-src/version.js +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "6.1.5"; +const VERSION = "7.0.2"; export { VERSION }; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/index.d.ts index 3f7a1da3e..8275033c3 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/index.d.ts +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/index.d.ts @@ -5,7 +5,7 @@ import type { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, U export type { OctokitOptions } from "./types.js"; export declare class Octokit { static VERSION: string; - static defaults>(this: S, defaults: OctokitOptions | Function): S; + static defaults>(this: S, defaults: OctokitOptions | Function): typeof this; static plugins: OctokitPlugin[]; /** * Attach a plugin (or many) to your Octokit instance. @@ -15,7 +15,7 @@ export declare class Octokit { */ static plugin & { plugins: any[]; - }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): typeof this & Constructor>>; constructor(options?: OctokitOptions); request: typeof request; graphql: typeof graphql; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/version.d.ts index eb205b9a2..d5b16a17a 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/version.d.ts +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "6.1.5"; +export declare const VERSION = "7.0.2"; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/package.json b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/package.json index 551668b62..d6e340953 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/core/package.json +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/core/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/core", - "version": "6.1.5", + "version": "7.0.2", "publishConfig": { "access": "public", "provenance": true @@ -18,18 +18,18 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "devDependencies": { - "@octokit/auth-action": "^5.0.0", - "@octokit/auth-app": "^7.0.0", - "@octokit/auth-oauth-app": "^8.0.0", + "@octokit/auth-action": "^6.0.1", + "@octokit/auth-app": "^8.0.0", + "@octokit/auth-oauth-app": "^9.0.0", "@octokit/tsconfig": "^4.0.0", "@sinonjs/fake-timers": "^14.0.0", "@types/lolex": "^5.1.0", @@ -38,17 +38,15 @@ "@vitest/coverage-v8": "^3.0.5", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", "proxy": "^2.0.0", - "semantic-release": "^24.0.0", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", - "undici": "^6.0.0", + "undici": "^7.0.0", "vitest": "^3.0.5" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-src/version.js index 405990a69..19fc42329 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-src/version.js +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "8.2.2"; +const VERSION = "9.0.1"; export { VERSION }; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-types/version.d.ts index 590024731..274ce0ed1 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-types/version.d.ts +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "8.2.2"; +export declare const VERSION = "9.0.1"; diff --git a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/package.json index 8e010f302..25f51b153 100644 --- a/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/package.json +++ b/node_modules/@octokit/oauth-app/node_modules/@octokit/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/graphql", - "version": "8.2.2", + "version": "9.0.1", "publishConfig": { "access": "public", "provenance": true @@ -17,7 +17,7 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, @@ -34,7 +34,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/oauth-app/node_modules/before-after-hook/package.json b/node_modules/@octokit/oauth-app/node_modules/before-after-hook/package.json index f23f655db..07bf873e2 100644 --- a/node_modules/@octokit/oauth-app/node_modules/before-after-hook/package.json +++ b/node_modules/@octokit/oauth-app/node_modules/before-after-hook/package.json @@ -1,7 +1,7 @@ { "name": "before-after-hook", "type": "module", - "version": "3.0.2", + "version": "4.0.0", "description": "asynchronous before/error/after hooks for internal functionality", "exports": "./index.js", "types": "./index.d.ts", @@ -12,12 +12,12 @@ ], "scripts": { "test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", - "test:code": "c8 --100 ava test/*.test.js", + "test:code": "c8 --100 --clean node --test", + "test:deno": "deno test --no-check", "test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", "test:tsd": "tsd", - "lint": "prettier --check \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "coverage": "c8 report --reporter html", + "lint": "prettier --check \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", + "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", "postcoverage": "open-cli coverage/index.html" }, "repository": "github:gr2m/before-after-hook", @@ -29,10 +29,9 @@ "author": "Gregor Martynus", "license": "Apache-2.0", "devDependencies": { - "ava": "^4.3.3", - "c8": "^7.12.0", + "@types/node": "^22.15.17", + "c8": "^10.1.3", "prettier": "^2.0.0", - "sinon": "^14.0.1", "tsd": "^0.24.1", "typescript": "^4.8.4" }, diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/package.json b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/test.js b/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/oauth-app/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/oauth-app/package.json b/node_modules/@octokit/oauth-app/package.json index 2c0e37497..806bda1af 100644 --- a/node_modules/@octokit/oauth-app/package.json +++ b/node_modules/@octokit/oauth-app/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/oauth-app", - "version": "7.1.6", + "version": "8.0.1", "description": "GitHub OAuth toolset for Node.js", "type": "module", "repository": "github:octokit/oauth-app.js", @@ -13,12 +13,12 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-oauth-app": "^8.1.3", - "@octokit/auth-oauth-user": "^5.1.3", - "@octokit/auth-unauthenticated": "^6.1.2", - "@octokit/core": "^6.1.4", - "@octokit/oauth-authorization-url": "^7.1.1", - "@octokit/oauth-methods": "^5.1.4", + "@octokit/auth-oauth-app": "^9.0.1", + "@octokit/auth-oauth-user": "^6.0.0", + "@octokit/auth-unauthenticated": "^7.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-authorization-url": "^8.0.0", + "@octokit/oauth-methods": "^6.0.0", "@types/aws-lambda": "^8.10.83", "universal-user-agent": "^7.0.0" }, @@ -29,10 +29,10 @@ "esbuild": "^0.25.0", "express": "^4.17.1", "fetch-mock": "^11.0.0", - "glob": "^11.0.0", "nock": "^14.0.0", - "prettier": "3.5.1", - "semantic-release-plugin-update-version-in-files": "^1.0.0", + "prettier": "3.5.3", + "semantic-release-plugin-update-version-in-files": "^2.0.0", + "tinyglobby": "^0.2.13", "typescript": "^5.0.0", "vitest": "^3.0.0" }, @@ -41,7 +41,7 @@ "provenance": true }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/oauth-authorization-url/dist-src/index.js b/node_modules/@octokit/oauth-authorization-url/dist-src/index.js index fd66f3ae6..7f66e1751 100644 --- a/node_modules/@octokit/oauth-authorization-url/dist-src/index.js +++ b/node_modules/@octokit/oauth-authorization-url/dist-src/index.js @@ -28,10 +28,8 @@ function urlBuilderAuthorize(base, options) { }; let url = base; Object.keys(map).filter((k) => options[k] !== null).filter((k) => { - if (k !== "scopes") - return true; - if (options.clientType === "github-app") - return false; + if (k !== "scopes") return true; + if (options.clientType === "github-app") return false; return !Array.isArray(options[k]) || options[k].length > 0; }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => { url += index === 0 ? `?` : "&"; diff --git a/node_modules/@octokit/oauth-authorization-url/package.json b/node_modules/@octokit/oauth-authorization-url/package.json index 40274626c..b4a6f12f5 100644 --- a/node_modules/@octokit/oauth-authorization-url/package.json +++ b/node_modules/@octokit/oauth-authorization-url/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "7.1.1", + "version": "8.0.0", "description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow", "repository": "github:octokit/oauth-authorization-url.js", "files": [ @@ -19,17 +19,16 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "devDependencies": { - "@octokit/tsconfig": "^3.0.0", - "@types/jest": "^29.0.0", - "esbuild": "^0.20.0", - "glob": "^10.2.6", - "jest": "^29.0.0", - "prettier": "3.2.5", - "ts-jest": "^29.0.0", - "typescript": "^5.0.0" + "@octokit/tsconfig": "^4.0.0", + "@vitest/coverage-v8": "^3.0.0", + "esbuild": "^0.25.0", + "glob": "^11.0.0", + "prettier": "3.5.3", + "typescript": "^5.0.0", + "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "types": "./dist-types/index.d.ts", "exports": { diff --git a/node_modules/@octokit/oauth-methods/dist-src/version.js b/node_modules/@octokit/oauth-methods/dist-src/version.js index ebb98ef28..6b5dccdb6 100644 --- a/node_modules/@octokit/oauth-methods/dist-src/version.js +++ b/node_modules/@octokit/oauth-methods/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "5.1.5"; +const VERSION = "6.0.0"; export { VERSION }; diff --git a/node_modules/@octokit/oauth-methods/dist-types/version.d.ts b/node_modules/@octokit/oauth-methods/dist-types/version.d.ts index 7e92e37d0..392768e85 100644 --- a/node_modules/@octokit/oauth-methods/dist-types/version.d.ts +++ b/node_modules/@octokit/oauth-methods/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "5.1.5"; +export declare const VERSION = "6.0.0"; diff --git a/node_modules/@octokit/oauth-methods/package.json b/node_modules/@octokit/oauth-methods/package.json index ed3ab3b6d..dd0f63bcb 100644 --- a/node_modules/@octokit/oauth-methods/package.json +++ b/node_modules/@octokit/oauth-methods/package.json @@ -1,7 +1,7 @@ { "name": "@octokit/oauth-methods", "type": "module", - "version": "5.1.5", + "version": "6.0.0", "description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", "repository": "https://github.com/octokit/oauth-methods.js", "keywords": [ @@ -14,9 +14,9 @@ "author": "Gregor Martynus (https://dev.to/gr2m)", "license": "MIT", "dependencies": { - "@octokit/oauth-authorization-url": "^7.0.0", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/oauth-authorization-url": "^8.0.0", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0" }, "devDependencies": { @@ -26,8 +26,8 @@ "esbuild": "^0.25.0", "fetch-mock": "^11.0.0", "glob": "^11.0.0", - "prettier": "3.5.1", - "semantic-release-plugin-update-version-in-files": "^1.1.0", + "prettier": "3.5.3", + "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, @@ -36,7 +36,7 @@ "provenance": true }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/openapi-types/package.json index eb58324df..d6bfc70dd 100644 --- a/node_modules/@octokit/openapi-types/package.json +++ b/node_modules/@octokit/openapi-types/package.json @@ -10,12 +10,12 @@ "access": "public", "provenance": true }, - "version": "25.0.0", + "version": "25.1.0", "main": "", "types": "types.d.ts", "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "octokit": { - "openapi-version": "19.0.0" + "openapi-version": "19.1.0" } } diff --git a/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/openapi-types/types.d.ts index 3184d5130..3c11891b2 100644 --- a/node_modules/@octokit/openapi-types/types.d.ts +++ b/node_modules/@octokit/openapi-types/types.d.ts @@ -258,6 +258,25 @@ export interface paths { */ get: operations["codes-of-conduct/get-conduct-code"]; }; + "/credentials/revoke": { + /** + * Revoke a list of credentials + * @description Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + * + * This endpoint currently accepts the following credential types: + * - Personal access tokens (classic) + * - Fine-grained personal access tokens + * + * Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + * GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + * + * To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + * + * > [!NOTE] + * > Any authenticated requests will return a 403. + */ + post: operations["credentials/revoke"]; + }; "/emojis": { /** * Get emojis @@ -2920,9 +2939,7 @@ export interface paths { "/orgs/{org}/private-registries": { /** * List private registries for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Lists all private registry configurations available at the organization-level without revealing their encrypted * values. * @@ -2931,9 +2948,7 @@ export interface paths { get: operations["private-registries/list-org-private-registries"]; /** * Create a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Creates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -2943,9 +2958,7 @@ export interface paths { "/orgs/{org}/private-registries/public-key": { /** * Get private registries public key for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -2955,9 +2968,7 @@ export interface paths { "/orgs/{org}/private-registries/{secret_name}": { /** * Get a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Get the configuration of a single private registry defined for an organization, omitting its encrypted value. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -2965,9 +2976,7 @@ export interface paths { get: operations["private-registries/get-org-private-registry"]; /** * Delete a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Delete a private registry configuration at the organization-level. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -2975,9 +2984,7 @@ export interface paths { delete: operations["private-registries/delete-org-private-registry"]; /** * Update a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Updates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -5114,11 +5121,9 @@ export interface paths { "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { /** * Rerequest a check run - * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, the `status` of the check suite it belongs to is reset to `queued` and the `conclusion` is cleared. The check run itself is not updated. GitHub apps recieving the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) with the `rerequested` action should then decide if the check run should be reset or updated and call the [update `check_run` endpoint](https://docs.github.com/rest/checks/runs#update-a-check-run) to update the check_run if desired. * * For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - * - * OAuth apps and personal access tokens (classic) cannot use this endpoint. */ post: operations["checks/rerequest-run"]; }; @@ -5170,8 +5175,6 @@ export interface paths { /** * Rerequest a check suite * @description Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * OAuth apps and personal access tokens (classic) cannot use this endpoint. */ post: operations["checks/rerequest-suite"]; }; @@ -5608,12 +5611,12 @@ export interface paths { /** * List repository collaborators * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + * There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. * * Team members will include the members of child teams. * - * The authenticated user must have push access to the repository to use this endpoint. - * + * The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. * OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. */ get: operations["repos/list-collaborators"]; @@ -5632,11 +5635,13 @@ export interface paths { get: operations["repos/check-collaborator"]; /** * Add a repository collaborator - * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + * @description Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. * - * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} @@ -5646,6 +5651,8 @@ export interface paths { * * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). * + * For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + * * **Updating an existing collaborator's permission level** * * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -5685,13 +5692,15 @@ export interface paths { "/repos/{owner}/{repo}/collaborators/{username}/permission": { /** * Get repository permissions for a user - * @description Checks the repository permission of a collaborator. The possible repository - * permissions are `admin`, `write`, `read`, and `none`. + * @description Checks the repository permission and role of a collaborator. * - * *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - * collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - * `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + * The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + * The `role_name` attribute provides the name of the assigned role, including custom roles. The + * `permission` can also be used to determine which base level of access the collaborator has to the repository. + * + * The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + * There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. */ get: operations["repos/get-collaborator-permission-level"]; }; @@ -10264,6 +10273,15 @@ export interface paths { */ get: operations["billing/get-shared-storage-billing-user"]; }; + "/users/{username}/settings/billing/usage": { + /** + * Get billing usage report for a user + * @description Gets a report of the total usage for a user. + * + * **Note:** This endpoint is only available to users with access to the enhanced billing platform. + */ + get: operations["billing/get-github-billing-usage-report-user"]; + }; "/users/{username}/social_accounts": { /** * List social accounts for a user @@ -11850,6 +11868,11 @@ export interface components { starred_at?: string; /** @description Whether anonymous git access is enabled for this repository */ anonymous_access_enabled?: boolean; + /** @description The status of the code search index for this repository */ + code_search_index_status?: { + lexical_search_ok?: boolean; + lexical_commit_sha?: string; + }; }; /** * Installation Token @@ -12394,7 +12417,11 @@ export interface components { * @description The enablement status of GitHub Advanced Security * @enum {string} */ - advanced_security?: "enabled" | "disabled"; + advanced_security?: + | "enabled" + | "disabled" + | "code_security" + | "secret_protection"; /** * @description The enablement status of Dependency Graph * @enum {string} @@ -15906,7 +15933,7 @@ export interface components { * @description Information about a Copilot Business seat assignment for a user, team, or organization. */ "copilot-seat-details": { - assignee: components["schemas"]["simple-user"]; + assignee?: components["schemas"]["nullable-simple-user"]; organization?: components["schemas"]["nullable-organization-simple"]; /** @description The team through which the assignee is granted access to GitHub Copilot, if applicable. */ assigning_team?: @@ -17647,6 +17674,11 @@ export interface components { starred_at?: string; /** @description Whether anonymous git access is enabled for this repository */ anonymous_access_enabled?: boolean; + /** @description The status of the code search index for this repository */ + code_search_index_status?: { + lexical_search_ok?: boolean; + lexical_commit_sha?: string; + }; } | null; /** * Code Of Conduct Simple @@ -25874,7 +25906,7 @@ export interface components { /** @description A boolean value representing whether or not alert is base64 encoded */ is_base64_encoded?: boolean | null; }; - /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + /** @description An optional comment when closing or reopening an alert. Cannot be updated or deleted. */ "secret-scanning-alert-resolution-comment": string | null; /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ "secret-scanning-location-commit": { @@ -27443,6 +27475,30 @@ export interface components { id: number; key: string; }; + "billing-usage-report-user": { + usageItems?: { + /** @description Date of the usage line item. */ + date: string; + /** @description Product name. */ + product: string; + /** @description SKU name. */ + sku: string; + /** @description Quantity of the usage line item. */ + quantity: number; + /** @description Unit type of the usage line item. */ + unitType: string; + /** @description Price per unit of the usage line item. */ + pricePerUnit: number; + /** @description Gross amount of the usage line item. */ + grossAmount: number; + /** @description Discount amount of the usage line item. */ + discountAmount: number; + /** @description Net amount of the usage line item. */ + netAmount: number; + /** @description Name of the repository. */ + repositoryName?: string; + }[]; + }; /** * Enterprise * @description An enterprise on GitHub. Webhook payloads contain the `enterprise` property when the webhook is configured @@ -41137,6 +41193,7 @@ export interface components { type?: "Bot" | "User" | "Organization"; /** Format: uri */ url?: string; + user_view_type?: string; } | null)[]; /** * AuthorAssociation @@ -44027,7 +44084,7 @@ export interface components { */ old_issue: { /** @enum {string|null} */ - active_lock_reason: + active_lock_reason?: | "resolved" | "off-topic" | "too heated" @@ -44071,7 +44128,7 @@ export interface components { url?: string; user_view_type?: string; } | null; - assignees: ({ + assignees?: ({ /** Format: uri */ avatar_url?: string; deleted?: boolean; @@ -44113,7 +44170,7 @@ export interface components { * @description How the author is associated with the repository. * @enum {string} */ - author_association: + author_association?: | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" @@ -44123,19 +44180,19 @@ export interface components { | "NONE" | "OWNER"; /** @description Contents of the issue */ - body: string | null; + body?: string | null; /** Format: date-time */ - closed_at: string | null; - comments: number; + closed_at?: string | null; + comments?: number; /** Format: uri */ - comments_url: string; + comments_url?: string; /** Format: date-time */ - created_at: string; + created_at?: string; draft?: boolean; /** Format: uri */ - events_url: string; + events_url?: string; /** Format: uri */ - html_url: string; + html_url?: string; /** Format: int64 */ id: number; labels?: { @@ -44154,13 +44211,13 @@ export interface components { url: string; }[]; /** Format: uri-template */ - labels_url: string; + labels_url?: string; locked?: boolean; /** * Milestone * @description A collection of related issues and pull requests. */ - milestone: { + milestone?: { /** Format: date-time */ closed_at: string | null; closed_issues: number; @@ -44228,7 +44285,7 @@ export interface components { /** Format: uri */ url: string; } | null; - node_id: string; + node_id?: string; number: number; /** * App @@ -44424,7 +44481,7 @@ export interface components { url?: string; }; /** Reactions */ - reactions: { + reactions?: { "+1": number; "-1": number; confused: number; @@ -44438,7 +44495,7 @@ export interface components { url: string; }; /** Format: uri */ - repository_url: string; + repository_url?: string; /** Sub-issues Summary */ sub_issues_summary?: { total: number; @@ -44454,16 +44511,16 @@ export interface components { /** Format: uri */ timeline_url?: string; /** @description Title of the issue */ - title: string; + title?: string; /** Format: date-time */ - updated_at: string; + updated_at?: string; /** * Format: uri * @description URL for the issue */ - url: string; + url?: string; /** User */ - user: { + user?: { /** Format: uri */ avatar_url?: string; deleted?: boolean; @@ -44501,6 +44558,7 @@ export interface components { url?: string; user_view_type?: string; } | null; + type?: components["schemas"]["issue-type"]; } | null; /** * Repository @@ -82474,6 +82532,12 @@ export interface components { "application/json": components["schemas"]["basic-error"]; }; }; + /** @description Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; /** @description Conflict */ conflict: { content: { @@ -82520,12 +82584,6 @@ export interface components { "application/json": components["schemas"]["billing-usage-report"]; }; }; - /** @description Internal Error */ - internal_error: { - content: { - "application/json": components["schemas"]["basic-error"]; - }; - }; /** @description Response */ actions_runner_jitconfig: { content: { @@ -82600,6 +82658,12 @@ export interface components { "application/json": components["schemas"]["basic-error"]; }; }; + /** @description Response if analysis could not be processed */ + unprocessable_analysis: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; /** @description Found */ found: { content: never; @@ -82628,6 +82692,12 @@ export interface components { "application/json": components["schemas"]["basic-error"]; }; }; + /** @description Response when getting a billing usage report */ + billing_usage_report_user: { + content: { + "application/json": components["schemas"]["billing-usage-report-user"]; + }; + }; }; parameters: { /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ @@ -82689,6 +82759,11 @@ export interface components { * Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. */ "dependabot-alert-comma-separated-epss"?: string; + /** + * @description Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned. + * Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. + */ + "dependabot-alert-comma-separated-has"?: string | "patch"[]; /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ "dependabot-alert-scope"?: "development" | "runtime"; /** @@ -82712,7 +82787,7 @@ export interface components { "pagination-last"?: number; /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ "secret-scanning-alert-state"?: "open" | "resolved"; - /** @description A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. */ + /** @description A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. */ "secret-scanning-alert-secret-type"?: string; /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ "secret-scanning-alert-resolution"?: string; @@ -84327,6 +84402,37 @@ export interface operations { 404: components["responses"]["not_found"]; }; }; + /** + * Revoke a list of credentials + * @description Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation. + * + * This endpoint currently accepts the following credential types: + * - Personal access tokens (classic) + * - Fine-grained personal access tokens + * + * Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users. + * GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated. + * + * To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request. + * + * > [!NOTE] + * > Any authenticated requests will return a 403. + */ + "credentials/revoke": { + requestBody: { + content: { + "application/json": { + /** @description A list of credentials to be revoked, up to 1000 per request. */ + credentials: string[]; + }; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 422: components["responses"]["validation_failed_simple"]; + 500: components["responses"]["internal_error"]; + }; + }; /** * Get emojis * @description Lists all the emojis available to use on GitHub. @@ -84397,11 +84503,15 @@ export interface operations { /** @description A description of the code security configuration */ description: string; /** - * @description The enablement status of GitHub Advanced Security + * @description The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. * @default disabled * @enum {string} */ - advanced_security?: "enabled" | "disabled"; + advanced_security?: + | "enabled" + | "disabled" + | "code_security" + | "secret_protection"; /** * @description The enablement status of Dependency Graph * @default enabled @@ -84620,10 +84730,14 @@ export interface operations { /** @description A description of the code security configuration */ description?: string; /** - * @description The enablement status of GitHub Advanced Security. Must be set to enabled if you want to enable any GHAS settings. + * @description The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. * @enum {string} */ - advanced_security?: "enabled" | "disabled"; + advanced_security?: + | "enabled" + | "disabled" + | "code_security" + | "secret_protection"; /** * @description The enablement status of Dependency Graph * @enum {string} @@ -84876,6 +84990,7 @@ export interface operations { ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; epss_percentage?: components["parameters"]["dependabot-alert-comma-separated-epss"]; + has?: components["parameters"]["dependabot-alert-comma-separated-has"]; scope?: components["parameters"]["dependabot-alert-scope"]; sort?: components["parameters"]["dependabot-alert-sort"]; direction?: components["parameters"]["direction"]; @@ -87743,6 +87858,7 @@ export interface operations { 204: { content: never; }; + 422: components["responses"]["validation_failed_simple"]; }; }; /** @@ -88973,11 +89089,15 @@ export interface operations { /** @description A description of the code security configuration */ description: string; /** - * @description The enablement status of GitHub Advanced Security + * @description The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. * @default disabled * @enum {string} */ - advanced_security?: "enabled" | "disabled"; + advanced_security?: + | "enabled" + | "disabled" + | "code_security" + | "secret_protection"; /** * @description The enablement status of Dependency Graph * @default enabled @@ -89245,10 +89365,14 @@ export interface operations { /** @description A description of the code security configuration */ description?: string; /** - * @description The enablement status of GitHub Advanced Security + * @description The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features. * @enum {string} */ - advanced_security?: "enabled" | "disabled"; + advanced_security?: + | "enabled" + | "disabled" + | "code_security" + | "secret_protection"; /** * @description The enablement status of Dependency Graph * @enum {string} @@ -90257,6 +90381,7 @@ export interface operations { ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; epss_percentage?: components["parameters"]["dependabot-alert-comma-separated-epss"]; + has?: components["parameters"]["dependabot-alert-comma-separated-has"]; scope?: components["parameters"]["dependabot-alert-scope"]; sort?: components["parameters"]["dependabot-alert-sort"]; direction?: components["parameters"]["direction"]; @@ -91708,8 +91833,8 @@ export interface operations { "orgs/list-members": { parameters: { query?: { - /** @description Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ - filter?: "2fa_disabled" | "all"; + /** @description Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. */ + filter?: "2fa_disabled" | "2fa_insecure" | "all"; /** @description Filter members returned by their role. */ role?: "all" | "admin" | "member"; per_page?: components["parameters"]["per-page"]; @@ -92515,8 +92640,8 @@ export interface operations { "orgs/list-outside-collaborators": { parameters: { query?: { - /** @description Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ - filter?: "2fa_disabled" | "all"; + /** @description Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. */ + filter?: "2fa_disabled" | "2fa_insecure" | "all"; per_page?: components["parameters"]["per-page"]; page?: components["parameters"]["page"]; }; @@ -93122,9 +93247,7 @@ export interface operations { }; /** * List private registries for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Lists all private registry configurations available at the organization-level without revealing their encrypted * values. * @@ -93159,9 +93282,7 @@ export interface operations { }; /** * Create a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Creates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -93209,9 +93330,7 @@ export interface operations { }; /** * Get private registries public key for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets. * * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -93248,9 +93367,7 @@ export interface operations { }; /** * Get a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Get the configuration of a single private registry defined for an organization, omitting its encrypted value. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -93274,9 +93391,7 @@ export interface operations { }; /** * Delete a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Delete a private registry configuration at the organization-level. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -93299,9 +93414,7 @@ export interface operations { }; /** * Update a private registry for an organization - * @description > [!NOTE] - * > This endpoint is in public preview and is subject to change. - * + * @description * Updates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. @@ -94637,7 +94750,7 @@ export interface operations { name: string; /** @description The description of the team. */ description?: string; - /** @description List GitHub IDs for organization members who will become team maintainers. */ + /** @description List GitHub usernames for organization members who will become team maintainers. */ maintainers?: string[]; /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ repo_names?: string[]; @@ -96687,6 +96800,7 @@ export interface operations { }; }; 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; }; }; /** @@ -97725,6 +97839,7 @@ export interface operations { 204: { content: never; }; + 422: components["responses"]["validation_failed_simple"]; }; }; /** @@ -100790,11 +100905,9 @@ export interface operations { }; /** * Rerequest a check run - * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, the `status` of the check suite it belongs to is reset to `queued` and the `conclusion` is cleared. The check run itself is not updated. GitHub apps recieving the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) with the `rerequested` action should then decide if the check run should be reset or updated and call the [update `check_run` endpoint](https://docs.github.com/rest/checks/runs#update-a-check-run) to update the check_run if desired. * * For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". - * - * OAuth apps and personal access tokens (classic) cannot use this endpoint. */ "checks/rerequest-run": { parameters: { @@ -100971,8 +101084,6 @@ export interface operations { /** * Rerequest a check suite * @description Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * OAuth apps and personal access tokens (classic) cannot use this endpoint. */ "checks/rerequest-suite": { parameters: { @@ -101329,6 +101440,7 @@ export interface operations { }; 403: components["responses"]["code_scanning_forbidden_read"]; 404: components["responses"]["not_found"]; + 422: components["responses"]["unprocessable_analysis"]; 503: components["responses"]["service_unavailable"]; }; }; @@ -102244,12 +102356,12 @@ export interface operations { /** * List repository collaborators * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + * There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. * * Team members will include the members of child teams. * - * The authenticated user must have push access to the repository to use this endpoint. - * + * The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization. * OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. */ "repos/list-collaborators": { @@ -102311,11 +102423,13 @@ export interface operations { }; /** * Add a repository collaborator - * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + * @description Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types. * - * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings. + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} @@ -102325,6 +102439,8 @@ export interface operations { * * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations). * + * For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise. + * * **Updating an existing collaborator's permission level** * * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. @@ -102369,7 +102485,16 @@ export interface operations { content: never; }; 403: components["responses"]["forbidden"]; - 422: components["responses"]["validation_failed"]; + /** + * @description Response when: + * - validation failed, or the endpoint has been spammed + * - an Enterprise Managed User (EMU) account was invited to a repository in an enterprise with personal user accounts + */ + 422: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; }; }; /** @@ -102416,13 +102541,15 @@ export interface operations { }; /** * Get repository permissions for a user - * @description Checks the repository permission of a collaborator. The possible repository - * permissions are `admin`, `write`, `read`, and `none`. + * @description Checks the repository permission and role of a collaborator. * - * *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the - * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the - * collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The - * `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + * The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. + * The `role_name` attribute provides the name of the assigned role, including custom roles. The + * `permission` can also be used to determine which base level of access the collaborator has to the repository. + * + * The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise. + * There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. */ "repos/get-collaborator-permission-level": { parameters: { @@ -103452,6 +103579,7 @@ export interface operations { package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; epss_percentage?: components["parameters"]["dependabot-alert-comma-separated-epss"]; + has?: components["parameters"]["dependabot-alert-comma-separated-has"]; scope?: components["parameters"]["dependabot-alert-scope"]; sort?: components["parameters"]["dependabot-alert-sort"]; direction?: components["parameters"]["direction"]; @@ -105350,7 +105478,10 @@ export interface operations { content: never; }; 409: components["responses"]["conflict"]; - 422: components["responses"]["validation_failed"]; + /** @description Validation failed, an attempt was made to delete the default branch, or the endpoint has been spammed. */ + 422: { + content: never; + }; }; }; /** @@ -117597,6 +117728,32 @@ export interface operations { }; }; }; + /** + * Get billing usage report for a user + * @description Gets a report of the total usage for a user. + * + * **Note:** This endpoint is only available to users with access to the enhanced billing platform. + */ + "billing/get-github-billing-usage-report-user": { + parameters: { + query?: { + year?: components["parameters"]["billing-usage-report-year"]; + month?: components["parameters"]["billing-usage-report-month"]; + day?: components["parameters"]["billing-usage-report-day"]; + hour?: components["parameters"]["billing-usage-report-hour"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + 200: components["responses"]["billing_usage_report_user"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; /** * List social accounts for a user * @description Lists social media accounts for a user. This endpoint is accessible by anyone. diff --git a/node_modules/@octokit/openapi-webhooks-types/package.json b/node_modules/@octokit/openapi-webhooks-types/package.json index 9da76b66f..e321fc9c1 100644 --- a/node_modules/@octokit/openapi-webhooks-types/package.json +++ b/node_modules/@octokit/openapi-webhooks-types/package.json @@ -10,7 +10,7 @@ "access": "public", "provenance": true }, - "version": "10.4.0", + "version": "11.0.0", "main": "", "types": "types.d.ts", "author": "wolfy1339 ", diff --git a/node_modules/@octokit/openapi-webhooks-types/types.d.ts b/node_modules/@octokit/openapi-webhooks-types/types.d.ts index a37b7b68d..049d40cb9 100644 --- a/node_modules/@octokit/openapi-webhooks-types/types.d.ts +++ b/node_modules/@octokit/openapi-webhooks-types/types.d.ts @@ -3796,6 +3796,10 @@ export interface components { /** @enum {string} */ status?: "enabled" | "disabled"; }; + code_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; /** @description Enable or disable Dependabot security updates for the repository. */ dependabot_security_updates?: { /** @@ -54784,12 +54788,7 @@ export interface components { parameters?: { /** @description Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. */ allowed_merge_methods?: ("merge" | "squash" | "rebase")[]; - /** - * @description > [!NOTE] - * > `automatic_copilot_code_review_enabled` is in beta and subject to change. - * - * Automatically request review from Copilot for new pull requests, if the author has access to Copilot code review. - */ + /** @description Automatically request review from Copilot for new pull requests, if the author has access to Copilot code review. */ automatic_copilot_code_review_enabled?: boolean; /** @description New, reviewable commits pushed will dismiss previous pull request review approvals. */ dismiss_stale_reviews_on_push: boolean; diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json index 50f47b9b2..1e769b313 100644 --- a/node_modules/@octokit/request-error/package.json +++ b/node_modules/@octokit/request-error/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/request-error", - "version": "6.1.8", + "version": "7.0.0", "publishConfig": { "access": "public", "provenance": true @@ -31,7 +31,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js index e9b3d2719..a9f54d8cc 100644 --- a/node_modules/@octokit/request/dist-src/version.js +++ b/node_modules/@octokit/request/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "9.2.3"; +const VERSION = "10.0.2"; export { VERSION }; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts index c50778d56..fba2b01d0 100644 --- a/node_modules/@octokit/request/dist-types/version.d.ts +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "9.2.3"; +export declare const VERSION = "10.0.2"; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/SECURITY.md b/node_modules/@octokit/request/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/index.test.js b/node_modules/@octokit/request/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/test.js b/node_modules/@octokit/request/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json index 754eed39f..c524ad776 100644 --- a/node_modules/@octokit/request/package.json +++ b/node_modules/@octokit/request/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/request", - "version": "9.2.3", + "version": "10.0.2", "type": "module", "publishConfig": { "access": "public", @@ -17,14 +17,14 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/endpoint": "^10.1.4", - "@octokit/request-error": "^6.1.8", + "@octokit/endpoint": "^11.0.0", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^2.0.0", + "fast-content-type-parse": "^3.0.0", "universal-user-agent": "^7.0.2" }, "devDependencies": { - "@octokit/auth-app": "^7.0.0", + "@octokit/auth-app": "^8.0.0", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", @@ -34,11 +34,11 @@ "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", - "undici": "^6.19.2", + "undici": "^7.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts index 998b43b81..f8e5fc2a9 100644 --- a/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts +++ b/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -6,7 +6,7 @@ import type { Url } from "./Url.js"; * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters * as well as the method property. */ -export type EndpointDefaults = RequestParameters & { +export interface EndpointDefaults extends RequestParameters { baseUrl: Url; method: RequestMethod; url?: Url; @@ -18,4 +18,4 @@ export type EndpointDefaults = RequestParameters & { format: string; previews?: string[]; }; -}; +} diff --git a/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts index 02bc6e4b9..1ef795e89 100644 --- a/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts +++ b/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -2,7 +2,7 @@ import type { EndpointDefaults } from "./EndpointDefaults.js"; import type { RequestOptions } from "./RequestOptions.js"; import type { RequestParameters } from "./RequestParameters.js"; import type { Route } from "./Route.js"; -import type { Endpoints } from "./generated/Endpoints.js"; +import type { EndpointKeys, Endpoints } from "./generated/Endpoints.js"; export interface EndpointInterface { /** * Transforms a GitHub REST API endpoint into generic request options @@ -22,7 +22,7 @@ export interface EndpointInterface { * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ - (route: keyof Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + (route: EndpointKeys | R, parameters?: P): (R extends EndpointKeys ? Endpoints[R]["request"] : RequestOptions) & Pick; /** * Object with current default route and parameters */ @@ -40,7 +40,7 @@ export interface EndpointInterface { * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. * */ - (route: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + (route: EndpointKeys | R, parameters?: P): D & (R extends EndpointKeys ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; /** * Merges current endpoint defaults with passed route and parameters, * without transforming them into request options. diff --git a/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts index 6cb08033e..f25b486ad 100644 --- a/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts +++ b/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -1,7 +1,7 @@ import type { RequestMethod } from "./RequestMethod.js"; import type { Url } from "./Url.js"; import type { RequestParameters } from "./RequestParameters.js"; -export type EndpointOptions = RequestParameters & { +export interface EndpointOptions extends RequestParameters { method: RequestMethod; url: Url; -}; +} diff --git a/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/types/dist-types/RequestInterface.d.ts index 41a884e59..6db41f2b4 100644 --- a/node_modules/@octokit/types/dist-types/RequestInterface.d.ts +++ b/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -2,7 +2,7 @@ import type { EndpointInterface } from "./EndpointInterface.js"; import type { OctokitResponse } from "./OctokitResponse.js"; import type { RequestParameters } from "./RequestParameters.js"; import type { Route } from "./Route.js"; -import type { Endpoints } from "./generated/Endpoints.js"; +import type { EndpointKeys, Endpoints } from "./generated/Endpoints.js"; export interface RequestInterface { /** * Sends a request based on endpoint options @@ -22,7 +22,7 @@ export interface RequestInterface { * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. */ - (route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + (route: EndpointKeys | R, options?: R extends EndpointKeys ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends EndpointKeys ? Promise : Promise>; /** * Returns a new `request` with updated route and parameters */ diff --git a/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/types/dist-types/VERSION.d.ts index 0b0ffa396..67f2db2fe 100644 --- a/node_modules/@octokit/types/dist-types/VERSION.d.ts +++ b/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -1 +1 @@ -export declare const VERSION = "14.0.0"; +export declare const VERSION = "14.1.0"; diff --git a/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts index 67ccb9c6c..1306f0aa1 100644 --- a/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts +++ b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -2881,6 +2881,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-a-user */ "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-report-for-a-user + */ + "GET /users/{username}/settings/billing/usage": Operation<"/users/{username}/settings/billing/usage", "get">; /** * @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user */ @@ -3173,6 +3177,10 @@ export interface Endpoints { * @see https://docs.github.com/rest/apps/apps#create-a-scoped-access-token */ "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/credentials/revoke#revoke-a-list-of-credentials + */ + "POST /credentials/revoke": Operation<"/credentials/revoke", "post">; /** * @see https://docs.github.com/rest/code-security/configurations#create-a-code-security-configuration-for-an-enterprise */ @@ -4182,4 +4190,5 @@ export interface Endpoints { */ "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; } +export type EndpointKeys = keyof Endpoints; export {}; diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json index 788d93e3f..ea03c0623 100644 --- a/node_modules/@octokit/types/package.json +++ b/node_modules/@octokit/types/package.json @@ -1,13 +1,13 @@ { "name": "@octokit/types", - "version": "14.0.0", + "version": "14.1.0", "publishConfig": { "access": "public", "provenance": true }, "description": "Shared TypeScript definitions for Octokit projects", "dependencies": { - "@octokit/openapi-types": "^25.0.0" + "@octokit/openapi-types": "^25.1.0" }, "repository": "github:octokit/types.ts", "keywords": [ @@ -21,18 +21,18 @@ "license": "MIT", "devDependencies": { "@octokit/tsconfig": "^4.0.0", - "github-openapi-graphql-query": "^4.5.0", + "github-openapi-graphql-query": "^5.0.0", "handlebars": "^4.7.6", - "npm-run-all2": "^7.0.0", + "npm-run-all2": "^8.0.0", "prettier": "^3.0.0", "semantic-release": "^24.0.0", "semantic-release-plugin-update-version-in-files": "^2.0.0", "sort-keys": "^5.0.0", - "typedoc": "^0.26.0", + "typedoc": "^0.28.0", "typescript": "^5.0.0" }, "octokit": { - "openapi-version": "19.0.0" + "openapi-version": "19.1.0" }, "files": [ "dist-types/**" diff --git a/node_modules/@octokit/webhooks-methods/dist-node/index.js b/node_modules/@octokit/webhooks-methods/dist-node/index.js index dcfaf50be..37830af7c 100644 --- a/node_modules/@octokit/webhooks-methods/dist-node/index.js +++ b/node_modules/@octokit/webhooks-methods/dist-node/index.js @@ -2,7 +2,7 @@ import { createHmac } from "node:crypto"; // pkg/dist-src/version.js -var VERSION = "5.1.1"; +var VERSION = "6.0.0"; // pkg/dist-src/node/sign.js async function sign(secret, payload) { diff --git a/node_modules/@octokit/webhooks-methods/dist-node/index.js.map b/node_modules/@octokit/webhooks-methods/dist-node/index.js.map index 84f26de17..9c385aa6e 100644 --- a/node_modules/@octokit/webhooks-methods/dist-node/index.js.map +++ b/node_modules/@octokit/webhooks-methods/dist-node/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../dist-src/node/sign.js", "../dist-src/version.js", "../dist-src/node/verify.js", "../dist-src/index.js"], - "sourcesContent": ["import { createHmac } from \"node:crypto\";\nimport { VERSION } from \"../version.js\";\nasync function sign(secret, payload) {\n if (!secret || !payload) {\n throw new TypeError(\n \"[@octokit/webhooks-methods] secret & payload required for sign()\"\n );\n }\n if (typeof payload !== \"string\") {\n throw new TypeError(\"[@octokit/webhooks-methods] payload must be a string\");\n }\n const algorithm = \"sha256\";\n return `${algorithm}=${createHmac(algorithm, secret).update(payload).digest(\"hex\")}`;\n}\nsign.VERSION = VERSION;\nexport {\n sign\n};\n", "const VERSION = \"5.1.1\";\nexport {\n VERSION\n};\n", "import { timingSafeEqual } from \"node:crypto\";\nimport { Buffer } from \"node:buffer\";\nimport { sign } from \"./sign.js\";\nimport { VERSION } from \"../version.js\";\nasync function verify(secret, eventPayload, signature) {\n if (!secret || !eventPayload || !signature) {\n throw new TypeError(\n \"[@octokit/webhooks-methods] secret, eventPayload & signature required\"\n );\n }\n if (typeof eventPayload !== \"string\") {\n throw new TypeError(\n \"[@octokit/webhooks-methods] eventPayload must be a string\"\n );\n }\n const signatureBuffer = Buffer.from(signature);\n const verificationBuffer = Buffer.from(await sign(secret, eventPayload));\n if (signatureBuffer.length !== verificationBuffer.length) {\n return false;\n }\n return timingSafeEqual(signatureBuffer, verificationBuffer);\n}\nverify.VERSION = VERSION;\nexport {\n verify\n};\n", "import { sign } from \"./node/sign.js\";\nimport { verify } from \"./node/verify.js\";\nasync function verifyWithFallback(secret, payload, signature, additionalSecrets) {\n const firstPass = await verify(secret, payload, signature);\n if (firstPass) {\n return true;\n }\n if (additionalSecrets !== void 0) {\n for (const s of additionalSecrets) {\n const v = await verify(s, payload, signature);\n if (v) {\n return v;\n }\n }\n }\n return false;\n}\nexport {\n sign,\n verify,\n verifyWithFallback\n};\n"], + "sourcesContent": ["import { createHmac } from \"node:crypto\";\nimport { VERSION } from \"../version.js\";\nasync function sign(secret, payload) {\n if (!secret || !payload) {\n throw new TypeError(\n \"[@octokit/webhooks-methods] secret & payload required for sign()\"\n );\n }\n if (typeof payload !== \"string\") {\n throw new TypeError(\"[@octokit/webhooks-methods] payload must be a string\");\n }\n const algorithm = \"sha256\";\n return `${algorithm}=${createHmac(algorithm, secret).update(payload).digest(\"hex\")}`;\n}\nsign.VERSION = VERSION;\nexport {\n sign\n};\n", "const VERSION = \"6.0.0\";\nexport {\n VERSION\n};\n", "import { timingSafeEqual } from \"node:crypto\";\nimport { Buffer } from \"node:buffer\";\nimport { sign } from \"./sign.js\";\nimport { VERSION } from \"../version.js\";\nasync function verify(secret, eventPayload, signature) {\n if (!secret || !eventPayload || !signature) {\n throw new TypeError(\n \"[@octokit/webhooks-methods] secret, eventPayload & signature required\"\n );\n }\n if (typeof eventPayload !== \"string\") {\n throw new TypeError(\n \"[@octokit/webhooks-methods] eventPayload must be a string\"\n );\n }\n const signatureBuffer = Buffer.from(signature);\n const verificationBuffer = Buffer.from(await sign(secret, eventPayload));\n if (signatureBuffer.length !== verificationBuffer.length) {\n return false;\n }\n return timingSafeEqual(signatureBuffer, verificationBuffer);\n}\nverify.VERSION = VERSION;\nexport {\n verify\n};\n", "import { sign } from \"./node/sign.js\";\nimport { verify } from \"./node/verify.js\";\nasync function verifyWithFallback(secret, payload, signature, additionalSecrets) {\n const firstPass = await verify(secret, payload, signature);\n if (firstPass) {\n return true;\n }\n if (additionalSecrets !== void 0) {\n for (const s of additionalSecrets) {\n const v = await verify(s, payload, signature);\n if (v) {\n return v;\n }\n }\n }\n return false;\n}\nexport {\n sign,\n verify,\n verifyWithFallback\n};\n"], "mappings": ";AAAA,SAAS,kBAAkB;;;ACA3B,IAAM,UAAU;;;ADEhB,eAAe,KAAK,QAAQ,SAAS;AACnC,MAAI,CAAC,UAAU,CAAC,SAAS;AACvB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAM,IAAI,UAAU,sDAAsD;AAAA,EAC5E;AACA,QAAM,YAAY;AAClB,SAAO,GAAG,SAAS,IAAI,WAAW,WAAW,MAAM,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK,CAAC;AACpF;AACA,KAAK,UAAU;;;AEdf,SAAS,uBAAuB;AAChC,SAAS,cAAc;AAGvB,eAAe,OAAO,QAAQ,cAAc,WAAW;AACrD,MAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,WAAW;AAC1C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,OAAO,iBAAiB,UAAU;AACpC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,kBAAkB,OAAO,KAAK,SAAS;AAC7C,QAAM,qBAAqB,OAAO,KAAK,MAAM,KAAK,QAAQ,YAAY,CAAC;AACvE,MAAI,gBAAgB,WAAW,mBAAmB,QAAQ;AACxD,WAAO;AAAA,EACT;AACA,SAAO,gBAAgB,iBAAiB,kBAAkB;AAC5D;AACA,OAAO,UAAU;;;ACpBjB,eAAe,mBAAmB,QAAQ,SAAS,WAAW,mBAAmB;AAC/E,QAAM,YAAY,MAAM,OAAO,QAAQ,SAAS,SAAS;AACzD,MAAI,WAAW;AACb,WAAO;AAAA,EACT;AACA,MAAI,sBAAsB,QAAQ;AAChC,eAAW,KAAK,mBAAmB;AACjC,YAAM,IAAI,MAAM,OAAO,GAAG,SAAS,SAAS;AAC5C,UAAI,GAAG;AACL,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;", "names": [] } diff --git a/node_modules/@octokit/webhooks-methods/dist-src/version.js b/node_modules/@octokit/webhooks-methods/dist-src/version.js index 7fb70fb6a..6b5dccdb6 100644 --- a/node_modules/@octokit/webhooks-methods/dist-src/version.js +++ b/node_modules/@octokit/webhooks-methods/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "5.1.1"; +const VERSION = "6.0.0"; export { VERSION }; diff --git a/node_modules/@octokit/webhooks-methods/dist-types/version.d.ts b/node_modules/@octokit/webhooks-methods/dist-types/version.d.ts index 04ceedfce..392768e85 100644 --- a/node_modules/@octokit/webhooks-methods/dist-types/version.d.ts +++ b/node_modules/@octokit/webhooks-methods/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "5.1.1"; +export declare const VERSION = "6.0.0"; diff --git a/node_modules/@octokit/webhooks-methods/package.json b/node_modules/@octokit/webhooks-methods/package.json index 949c8fa60..9aa0b5abb 100644 --- a/node_modules/@octokit/webhooks-methods/package.json +++ b/node_modules/@octokit/webhooks-methods/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.1.1", + "version": "6.0.0", "description": "Methods to handle GitHub Webhook requests", "repository": "github:octokit/webhooks-methods.js", "keywords": [ @@ -20,15 +20,15 @@ "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.24.0", - "prettier": "3.4.2", - "puppeteer": "^23.0.0", - "semantic-release-plugin-update-version-in-files": "^1.1.0", + "esbuild": "^0.25.0", + "prettier": "3.5.3", + "puppeteer": "^24.0.0", + "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**" diff --git a/node_modules/@octokit/webhooks/dist-bundle/index.js b/node_modules/@octokit/webhooks/dist-bundle/index.js index 4d60e939b..aabc7486e 100644 --- a/node_modules/@octokit/webhooks/dist-bundle/index.js +++ b/node_modules/@octokit/webhooks/dist-bundle/index.js @@ -1,4 +1,4 @@ -// pkg/dist-src/createLogger.js +// pkg/dist-src/create-logger.js var createLogger = (logger) => ({ debug: () => { }, @@ -510,289 +510,262 @@ async function verifyAndReceive(state, event) { }); } -// pkg/dist-src/middleware/node/get-missing-headers.js +// pkg/dist-src/middleware/create-middleware.js +var isApplicationJsonRE = /^\s*(application\/json)\s*(?:;|$)/u; var WEBHOOK_HEADERS = [ "x-github-event", "x-hub-signature-256", "x-github-delivery" ]; -function getMissingHeaders(request) { - return WEBHOOK_HEADERS.filter((header) => !(header in request.headers)); +function createMiddleware(options) { + const { handleResponse: handleResponse3, getRequestHeader: getRequestHeader3, getPayload: getPayload3 } = options; + return function middleware(webhooks, options2) { + return async function octokitWebhooksMiddleware(request, response, next) { + let pathname; + try { + pathname = new URL(request.url, "http://localhost").pathname; + } catch (error) { + return handleResponse3( + JSON.stringify({ + error: `Request URL could not be parsed: ${request.url}` + }), + 422, + { + "content-type": "application/json" + }, + response + ); + } + if (pathname !== options2.path) { + next?.(); + return handleResponse3(null); + } else if (request.method !== "POST") { + return handleResponse3( + JSON.stringify({ + error: `Unknown route: ${request.method} ${pathname}` + }), + 404, + { + "content-type": "application/json" + }, + response + ); + } + const contentType = getRequestHeader3(request, "content-type"); + if (typeof contentType !== "string" || !isApplicationJsonRE.test(contentType)) { + return handleResponse3( + JSON.stringify({ + error: `Unsupported "Content-Type" header value. Must be "application/json"` + }), + 415, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + const missingHeaders = WEBHOOK_HEADERS.filter((header) => { + return getRequestHeader3(request, header) == void 0; + }).join(", "); + if (missingHeaders) { + return handleResponse3( + JSON.stringify({ + error: `Required headers missing: ${missingHeaders}` + }), + 400, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + const eventName = getRequestHeader3( + request, + "x-github-event" + ); + const signature = getRequestHeader3(request, "x-hub-signature-256"); + const id = getRequestHeader3(request, "x-github-delivery"); + options2.log.debug(`${eventName} event received (id: ${id})`); + let didTimeout = false; + let timeout; + const timeoutPromise = new Promise((resolve) => { + timeout = setTimeout(() => { + didTimeout = true; + resolve( + handleResponse3( + "still processing\n", + 202, + { + "Content-Type": "text/plain", + accept: "application/json" + }, + response + ) + ); + }, options2.timeout); + }); + const processWebhook = async () => { + try { + const payload = await getPayload3(request); + await webhooks.verifyAndReceive({ + id, + name: eventName, + payload, + signature + }); + clearTimeout(timeout); + if (didTimeout) return handleResponse3(null); + return handleResponse3( + "ok\n", + 200, + { + "content-type": "text/plain", + accept: "application/json" + }, + response + ); + } catch (error) { + clearTimeout(timeout); + if (didTimeout) return handleResponse3(null); + const err = Array.from(error.errors)[0]; + const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; + const statusCode = typeof err.status !== "undefined" ? err.status : 500; + options2.log.error(error); + return handleResponse3( + JSON.stringify({ + error: errorMessage + }), + statusCode, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + }; + return await Promise.race([timeoutPromise, processWebhook()]); + }; + }; +} + +// pkg/dist-src/middleware/node/handle-response.js +function handleResponse(body, status = 200, headers = {}, response) { + if (body === null) { + return false; + } + headers["content-length"] = body.length.toString(); + response.writeHead(status, headers).end(body); + return true; +} + +// pkg/dist-src/middleware/node/get-request-header.js +function getRequestHeader(request, key) { + return request.headers[key]; +} + +// pkg/dist-src/concat-uint8array.js +function concatUint8Array(data) { + if (data.length === 0) { + return new Uint8Array(0); + } + let totalLength = 0; + for (let i = 0; i < data.length; i++) { + totalLength += data[i].length; + } + if (totalLength === 0) { + return new Uint8Array(0); + } + const result = new Uint8Array(totalLength); + let offset = 0; + for (let i = 0; i < data.length; i++) { + result.set(data[i], offset); + offset += data[i].length; + } + return result; } // pkg/dist-src/middleware/node/get-payload.js -function getPayload(request) { - if (typeof request.body === "object" && "rawBody" in request && request.rawBody instanceof Buffer) { - return Promise.resolve(request.rawBody.toString("utf8")); +var textDecoder = new TextDecoder("utf-8", { fatal: false }); +var decode = textDecoder.decode.bind(textDecoder); +async function getPayload(request) { + if (typeof request.body === "object" && "rawBody" in request && request.rawBody instanceof Uint8Array) { + return decode(request.rawBody); } else if (typeof request.body === "string") { - return Promise.resolve(request.body); + return request.body; } + const payload = await getPayloadFromRequestStream(request); + return decode(payload); +} +function getPayloadFromRequestStream(request) { return new Promise((resolve, reject) => { let data = []; request.on( "error", (error) => reject(new AggregateError([error], error.message)) ); - request.on("data", (chunk) => data.push(chunk)); - request.on( - "end", - () => ( - // setImmediate improves the throughput by reducing the pressure from - // the event loop - setImmediate( - resolve, - data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") - ) - ) - ); + request.on("data", data.push.bind(data)); + request.on("end", () => { + const result = concatUint8Array(data); + queueMicrotask(() => resolve(result)); + }); }); } -// pkg/dist-src/middleware/node/on-unhandled-request-default.js -function onUnhandledRequestDefault(request, response) { - response.writeHead(404, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - ); -} - -// pkg/dist-src/middleware/node/middleware.js -async function middleware(webhooks, options, request, response, next) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - response.writeHead(422, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }) - ); - return true; - } - if (pathname !== options.path) { - next?.(); - return false; - } else if (request.method !== "POST") { - onUnhandledRequestDefault(request, response); - return true; - } - if (!request.headers["content-type"] || !request.headers["content-type"].startsWith("application/json")) { - response.writeHead(415, { - "content-type": "application/json", - accept: "application/json" - }); - response.end( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }) - ); - return true; - } - const missingHeaders = getMissingHeaders(request).join(", "); - if (missingHeaders) { - response.writeHead(400, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }) - ); - return true; - } - const eventName = request.headers["x-github-event"]; - const signatureSHA256 = request.headers["x-hub-signature-256"]; - const id = request.headers["x-github-delivery"]; - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - const timeout = setTimeout(() => { - didTimeout = true; - response.statusCode = 202; - response.end("still processing\n"); - }, 9e3).unref(); - try { - const payload = await getPayload(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) return true; - response.end("ok\n"); - return true; - } catch (error) { - clearTimeout(timeout); - if (didTimeout) return true; - const err = Array.from(error.errors)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - response.statusCode = typeof err.status !== "undefined" ? err.status : 500; - options.log.error(error); - response.end( - JSON.stringify({ - error: errorMessage - }) - ); - return true; - } -} - // pkg/dist-src/middleware/node/index.js function createNodeMiddleware(webhooks, { path = "/api/github/webhooks", - log = createLogger() + log = createLogger(), + timeout = 9e3 } = {}) { - return middleware.bind(null, webhooks, { + return createMiddleware({ + handleResponse, + getRequestHeader, + getPayload + })(webhooks, { path, - log + log, + timeout }); } -// pkg/dist-src/middleware/web/get-missing-headers.js -var WEBHOOK_HEADERS2 = [ - "x-github-event", - "x-hub-signature-256", - "x-github-delivery" -]; -function getMissingHeaders2(request) { - return WEBHOOK_HEADERS2.filter((header) => !request.headers.has(header)); -} - // pkg/dist-src/middleware/web/get-payload.js function getPayload2(request) { return request.text(); } -// pkg/dist-src/middleware/web/on-unhandled-request-default.js -function onUnhandledRequestDefault2(request) { - return new Response( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }), - { - status: 404, - headers: { - "content-type": "application/json" - } - } - ); +// pkg/dist-src/middleware/web/get-request-header.js +function getRequestHeader2(request, key) { + return request.headers.get(key); } -// pkg/dist-src/middleware/web/middleware.js -async function middleware2(webhooks, options, request) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - return new Response( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }), - { - status: 422, - headers: { - "content-type": "application/json" - } - } - ); +// pkg/dist-src/middleware/web/handle-response.js +function handleResponse2(body, status = 200, headers = {}) { + if (body !== null) { + headers["content-length"] = body.length.toString(); } - if (pathname !== options.path || request.method !== "POST") { - return onUnhandledRequestDefault2(request); - } - if (typeof request.headers.get("content-type") !== "string" || !request.headers.get("content-type").startsWith("application/json")) { - return new Response( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }), - { - status: 415, - headers: { - "content-type": "application/json" - } - } - ); - } - const missingHeaders = getMissingHeaders2(request).join(", "); - if (missingHeaders) { - return new Response( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }), - { - status: 422, - headers: { - "content-type": "application/json" - } - } - ); - } - const eventName = request.headers.get("x-github-event"); - const signatureSHA256 = request.headers.get("x-hub-signature-256"); - const id = request.headers.get("x-github-delivery"); - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - let timeout; - const timeoutPromise = new Promise((resolve) => { - timeout = setTimeout(() => { - didTimeout = true; - resolve( - new Response("still processing\n", { - status: 202, - headers: { "Content-Type": "text/plain" } - }) - ); - }, 9e3).unref(); + return new Response(body, { + status, + headers }); - const processWebhook = async () => { - try { - const payload = await getPayload2(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) return new Response(null); - return new Response("ok\n"); - } catch (error) { - clearTimeout(timeout); - if (didTimeout) return new Response(null); - const err = Array.from(error.errors)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - options.log.error(error); - return new Response( - JSON.stringify({ - error: errorMessage - }), - { - status: typeof err.status !== "undefined" ? err.status : 500, - headers: { - "content-type": "application/json" - } - } - ); - } - }; - return await Promise.race([timeoutPromise, processWebhook()]); } // pkg/dist-src/middleware/web/index.js function createWebMiddleware(webhooks, { path = "/api/github/webhooks", - log = createLogger() + log = createLogger(), + timeout = 9e3 } = {}) { - return middleware2.bind(null, webhooks, { + return createMiddleware({ + handleResponse: handleResponse2, + getRequestHeader: getRequestHeader2, + getPayload: getPayload2 + })(webhooks, { path, - log + log, + timeout }); } diff --git a/node_modules/@octokit/webhooks/dist-bundle/index.js.map b/node_modules/@octokit/webhooks/dist-bundle/index.js.map index 73745c412..ef8b47451 100644 --- a/node_modules/@octokit/webhooks/dist-bundle/index.js.map +++ b/node_modules/@octokit/webhooks/dist-bundle/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../dist-src/createLogger.js", "../dist-src/generated/webhook-names.js", "../dist-src/event-handler/on.js", "../dist-src/event-handler/wrap-error-handler.js", "../dist-src/event-handler/receive.js", "../dist-src/event-handler/remove-listener.js", "../dist-src/event-handler/index.js", "../dist-src/index.js", "../dist-src/verify-and-receive.js", "../dist-src/middleware/node/get-missing-headers.js", "../dist-src/middleware/node/get-payload.js", "../dist-src/middleware/node/on-unhandled-request-default.js", "../dist-src/middleware/node/middleware.js", "../dist-src/middleware/node/index.js", "../dist-src/middleware/web/get-missing-headers.js", "../dist-src/middleware/web/get-payload.js", "../dist-src/middleware/web/on-unhandled-request-default.js", "../dist-src/middleware/web/middleware.js", "../dist-src/middleware/web/index.js"], - "sourcesContent": ["const createLogger = (logger) => ({\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n ...logger\n});\nexport {\n createLogger\n};\n", "const emitterEventNames = [\n \"branch_protection_configuration\",\n \"branch_protection_configuration.disabled\",\n \"branch_protection_configuration.enabled\",\n \"branch_protection_rule\",\n \"branch_protection_rule.created\",\n \"branch_protection_rule.deleted\",\n \"branch_protection_rule.edited\",\n \"check_run\",\n \"check_run.completed\",\n \"check_run.created\",\n \"check_run.requested_action\",\n \"check_run.rerequested\",\n \"check_suite\",\n \"check_suite.completed\",\n \"check_suite.requested\",\n \"check_suite.rerequested\",\n \"code_scanning_alert\",\n \"code_scanning_alert.appeared_in_branch\",\n \"code_scanning_alert.closed_by_user\",\n \"code_scanning_alert.created\",\n \"code_scanning_alert.fixed\",\n \"code_scanning_alert.reopened\",\n \"code_scanning_alert.reopened_by_user\",\n \"commit_comment\",\n \"commit_comment.created\",\n \"create\",\n \"custom_property\",\n \"custom_property.created\",\n \"custom_property.deleted\",\n \"custom_property.promote_to_enterprise\",\n \"custom_property.updated\",\n \"custom_property_values\",\n \"custom_property_values.updated\",\n \"delete\",\n \"dependabot_alert\",\n \"dependabot_alert.auto_dismissed\",\n \"dependabot_alert.auto_reopened\",\n \"dependabot_alert.created\",\n \"dependabot_alert.dismissed\",\n \"dependabot_alert.fixed\",\n \"dependabot_alert.reintroduced\",\n \"dependabot_alert.reopened\",\n \"deploy_key\",\n \"deploy_key.created\",\n \"deploy_key.deleted\",\n \"deployment\",\n \"deployment.created\",\n \"deployment_protection_rule\",\n \"deployment_protection_rule.requested\",\n \"deployment_review\",\n \"deployment_review.approved\",\n \"deployment_review.rejected\",\n \"deployment_review.requested\",\n \"deployment_status\",\n \"deployment_status.created\",\n \"discussion\",\n \"discussion.answered\",\n \"discussion.category_changed\",\n \"discussion.closed\",\n \"discussion.created\",\n \"discussion.deleted\",\n \"discussion.edited\",\n \"discussion.labeled\",\n \"discussion.locked\",\n \"discussion.pinned\",\n \"discussion.reopened\",\n \"discussion.transferred\",\n \"discussion.unanswered\",\n \"discussion.unlabeled\",\n \"discussion.unlocked\",\n \"discussion.unpinned\",\n \"discussion_comment\",\n \"discussion_comment.created\",\n \"discussion_comment.deleted\",\n \"discussion_comment.edited\",\n \"fork\",\n \"github_app_authorization\",\n \"github_app_authorization.revoked\",\n \"gollum\",\n \"installation\",\n \"installation.created\",\n \"installation.deleted\",\n \"installation.new_permissions_accepted\",\n \"installation.suspend\",\n \"installation.unsuspend\",\n \"installation_repositories\",\n \"installation_repositories.added\",\n \"installation_repositories.removed\",\n \"installation_target\",\n \"installation_target.renamed\",\n \"issue_comment\",\n \"issue_comment.created\",\n \"issue_comment.deleted\",\n \"issue_comment.edited\",\n \"issues\",\n \"issues.assigned\",\n \"issues.closed\",\n \"issues.deleted\",\n \"issues.demilestoned\",\n \"issues.edited\",\n \"issues.labeled\",\n \"issues.locked\",\n \"issues.milestoned\",\n \"issues.opened\",\n \"issues.pinned\",\n \"issues.reopened\",\n \"issues.transferred\",\n \"issues.typed\",\n \"issues.unassigned\",\n \"issues.unlabeled\",\n \"issues.unlocked\",\n \"issues.unpinned\",\n \"issues.untyped\",\n \"label\",\n \"label.created\",\n \"label.deleted\",\n \"label.edited\",\n \"marketplace_purchase\",\n \"marketplace_purchase.cancelled\",\n \"marketplace_purchase.changed\",\n \"marketplace_purchase.pending_change\",\n \"marketplace_purchase.pending_change_cancelled\",\n \"marketplace_purchase.purchased\",\n \"member\",\n \"member.added\",\n \"member.edited\",\n \"member.removed\",\n \"membership\",\n \"membership.added\",\n \"membership.removed\",\n \"merge_group\",\n \"merge_group.checks_requested\",\n \"merge_group.destroyed\",\n \"meta\",\n \"meta.deleted\",\n \"milestone\",\n \"milestone.closed\",\n \"milestone.created\",\n \"milestone.deleted\",\n \"milestone.edited\",\n \"milestone.opened\",\n \"org_block\",\n \"org_block.blocked\",\n \"org_block.unblocked\",\n \"organization\",\n \"organization.deleted\",\n \"organization.member_added\",\n \"organization.member_invited\",\n \"organization.member_removed\",\n \"organization.renamed\",\n \"package\",\n \"package.published\",\n \"package.updated\",\n \"page_build\",\n \"personal_access_token_request\",\n \"personal_access_token_request.approved\",\n \"personal_access_token_request.cancelled\",\n \"personal_access_token_request.created\",\n \"personal_access_token_request.denied\",\n \"ping\",\n \"project\",\n \"project.closed\",\n \"project.created\",\n \"project.deleted\",\n \"project.edited\",\n \"project.reopened\",\n \"project_card\",\n \"project_card.converted\",\n \"project_card.created\",\n \"project_card.deleted\",\n \"project_card.edited\",\n \"project_card.moved\",\n \"project_column\",\n \"project_column.created\",\n \"project_column.deleted\",\n \"project_column.edited\",\n \"project_column.moved\",\n \"projects_v2\",\n \"projects_v2.closed\",\n \"projects_v2.created\",\n \"projects_v2.deleted\",\n \"projects_v2.edited\",\n \"projects_v2.reopened\",\n \"projects_v2_item\",\n \"projects_v2_item.archived\",\n \"projects_v2_item.converted\",\n \"projects_v2_item.created\",\n \"projects_v2_item.deleted\",\n \"projects_v2_item.edited\",\n \"projects_v2_item.reordered\",\n \"projects_v2_item.restored\",\n \"projects_v2_status_update\",\n \"projects_v2_status_update.created\",\n \"projects_v2_status_update.deleted\",\n \"projects_v2_status_update.edited\",\n \"public\",\n \"pull_request\",\n \"pull_request.assigned\",\n \"pull_request.auto_merge_disabled\",\n \"pull_request.auto_merge_enabled\",\n \"pull_request.closed\",\n \"pull_request.converted_to_draft\",\n \"pull_request.demilestoned\",\n \"pull_request.dequeued\",\n \"pull_request.edited\",\n \"pull_request.enqueued\",\n \"pull_request.labeled\",\n \"pull_request.locked\",\n \"pull_request.milestoned\",\n \"pull_request.opened\",\n \"pull_request.ready_for_review\",\n \"pull_request.reopened\",\n \"pull_request.review_request_removed\",\n \"pull_request.review_requested\",\n \"pull_request.synchronize\",\n \"pull_request.unassigned\",\n \"pull_request.unlabeled\",\n \"pull_request.unlocked\",\n \"pull_request_review\",\n \"pull_request_review.dismissed\",\n \"pull_request_review.edited\",\n \"pull_request_review.submitted\",\n \"pull_request_review_comment\",\n \"pull_request_review_comment.created\",\n \"pull_request_review_comment.deleted\",\n \"pull_request_review_comment.edited\",\n \"pull_request_review_thread\",\n \"pull_request_review_thread.resolved\",\n \"pull_request_review_thread.unresolved\",\n \"push\",\n \"registry_package\",\n \"registry_package.published\",\n \"registry_package.updated\",\n \"release\",\n \"release.created\",\n \"release.deleted\",\n \"release.edited\",\n \"release.prereleased\",\n \"release.published\",\n \"release.released\",\n \"release.unpublished\",\n \"repository\",\n \"repository.archived\",\n \"repository.created\",\n \"repository.deleted\",\n \"repository.edited\",\n \"repository.privatized\",\n \"repository.publicized\",\n \"repository.renamed\",\n \"repository.transferred\",\n \"repository.unarchived\",\n \"repository_advisory\",\n \"repository_advisory.published\",\n \"repository_advisory.reported\",\n \"repository_dispatch\",\n \"repository_dispatch.sample.collected\",\n \"repository_import\",\n \"repository_ruleset\",\n \"repository_ruleset.created\",\n \"repository_ruleset.deleted\",\n \"repository_ruleset.edited\",\n \"repository_vulnerability_alert\",\n \"repository_vulnerability_alert.create\",\n \"repository_vulnerability_alert.dismiss\",\n \"repository_vulnerability_alert.reopen\",\n \"repository_vulnerability_alert.resolve\",\n \"secret_scanning_alert\",\n \"secret_scanning_alert.created\",\n \"secret_scanning_alert.publicly_leaked\",\n \"secret_scanning_alert.reopened\",\n \"secret_scanning_alert.resolved\",\n \"secret_scanning_alert.validated\",\n \"secret_scanning_alert_location\",\n \"secret_scanning_alert_location.created\",\n \"secret_scanning_scan\",\n \"secret_scanning_scan.completed\",\n \"security_advisory\",\n \"security_advisory.published\",\n \"security_advisory.updated\",\n \"security_advisory.withdrawn\",\n \"security_and_analysis\",\n \"sponsorship\",\n \"sponsorship.cancelled\",\n \"sponsorship.created\",\n \"sponsorship.edited\",\n \"sponsorship.pending_cancellation\",\n \"sponsorship.pending_tier_change\",\n \"sponsorship.tier_changed\",\n \"star\",\n \"star.created\",\n \"star.deleted\",\n \"status\",\n \"sub_issues\",\n \"sub_issues.parent_issue_added\",\n \"sub_issues.parent_issue_removed\",\n \"sub_issues.sub_issue_added\",\n \"sub_issues.sub_issue_removed\",\n \"team\",\n \"team.added_to_repository\",\n \"team.created\",\n \"team.deleted\",\n \"team.edited\",\n \"team.removed_from_repository\",\n \"team_add\",\n \"watch\",\n \"watch.started\",\n \"workflow_dispatch\",\n \"workflow_job\",\n \"workflow_job.completed\",\n \"workflow_job.in_progress\",\n \"workflow_job.queued\",\n \"workflow_job.waiting\",\n \"workflow_run\",\n \"workflow_run.completed\",\n \"workflow_run.in_progress\",\n \"workflow_run.requested\"\n];\nexport {\n emitterEventNames\n};\n", "import { emitterEventNames } from \"../generated/webhook-names.js\";\nfunction handleEventHandlers(state, webhookName, handler) {\n if (!state.hooks[webhookName]) {\n state.hooks[webhookName] = [];\n }\n state.hooks[webhookName].push(handler);\n}\nfunction receiverOn(state, webhookNameOrNames, handler) {\n if (Array.isArray(webhookNameOrNames)) {\n webhookNameOrNames.forEach(\n (webhookName) => receiverOn(state, webhookName, handler)\n );\n return;\n }\n if ([\"*\", \"error\"].includes(webhookNameOrNames)) {\n const webhookName = webhookNameOrNames === \"*\" ? \"any\" : webhookNameOrNames;\n const message = `Using the \"${webhookNameOrNames}\" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`;\n throw new Error(message);\n }\n if (!emitterEventNames.includes(webhookNameOrNames)) {\n state.log.warn(\n `\"${webhookNameOrNames}\" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`\n );\n }\n handleEventHandlers(state, webhookNameOrNames, handler);\n}\nfunction receiverOnAny(state, handler) {\n handleEventHandlers(state, \"*\", handler);\n}\nfunction receiverOnError(state, handler) {\n handleEventHandlers(state, \"error\", handler);\n}\nexport {\n receiverOn,\n receiverOnAny,\n receiverOnError\n};\n", "function wrapErrorHandler(handler, error) {\n let returnValue;\n try {\n returnValue = handler(error);\n } catch (error2) {\n console.log('FATAL: Error occurred in \"error\" event handler');\n console.log(error2);\n }\n if (returnValue && returnValue.catch) {\n returnValue.catch((error2) => {\n console.log('FATAL: Error occurred in \"error\" event handler');\n console.log(error2);\n });\n }\n}\nexport {\n wrapErrorHandler\n};\n", "import { wrapErrorHandler } from \"./wrap-error-handler.js\";\nfunction getHooks(state, eventPayloadAction, eventName) {\n const hooks = [state.hooks[eventName], state.hooks[\"*\"]];\n if (eventPayloadAction) {\n hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]);\n }\n return [].concat(...hooks.filter(Boolean));\n}\nfunction receiverHandle(state, event) {\n const errorHandlers = state.hooks.error || [];\n if (event instanceof Error) {\n const error = Object.assign(new AggregateError([event], event.message), {\n event\n });\n errorHandlers.forEach((handler) => wrapErrorHandler(handler, error));\n return Promise.reject(error);\n }\n if (!event || !event.name) {\n const error = new Error(\"Event name not passed\");\n throw new AggregateError([error], error.message);\n }\n if (!event.payload) {\n const error = new Error(\"Event name not passed\");\n throw new AggregateError([error], error.message);\n }\n const hooks = getHooks(\n state,\n \"action\" in event.payload ? event.payload.action : null,\n event.name\n );\n if (hooks.length === 0) {\n return Promise.resolve();\n }\n const errors = [];\n const promises = hooks.map((handler) => {\n let promise = Promise.resolve(event);\n if (state.transform) {\n promise = promise.then(state.transform);\n }\n return promise.then((event2) => {\n return handler(event2);\n }).catch((error) => errors.push(Object.assign(error, { event })));\n });\n return Promise.all(promises).then(() => {\n if (errors.length === 0) {\n return;\n }\n const error = new AggregateError(\n errors,\n errors.map((error2) => error2.message).join(\"\\n\")\n );\n Object.assign(error, {\n event\n });\n errorHandlers.forEach((handler) => wrapErrorHandler(handler, error));\n throw error;\n });\n}\nexport {\n receiverHandle\n};\n", "function removeListener(state, webhookNameOrNames, handler) {\n if (Array.isArray(webhookNameOrNames)) {\n webhookNameOrNames.forEach(\n (webhookName) => removeListener(state, webhookName, handler)\n );\n return;\n }\n if (!state.hooks[webhookNameOrNames]) {\n return;\n }\n for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) {\n if (state.hooks[webhookNameOrNames][i] === handler) {\n state.hooks[webhookNameOrNames].splice(i, 1);\n return;\n }\n }\n}\nexport {\n removeListener\n};\n", "import { createLogger } from \"../createLogger.js\";\nimport {\n receiverOn as on,\n receiverOnAny as onAny,\n receiverOnError as onError\n} from \"./on.js\";\nimport { receiverHandle as receive } from \"./receive.js\";\nimport { removeListener } from \"./remove-listener.js\";\nfunction createEventHandler(options) {\n const state = {\n hooks: {},\n log: createLogger(options && options.log)\n };\n if (options && options.transform) {\n state.transform = options.transform;\n }\n return {\n on: on.bind(null, state),\n onAny: onAny.bind(null, state),\n onError: onError.bind(null, state),\n removeListener: removeListener.bind(null, state),\n receive: receive.bind(null, state)\n };\n}\nexport {\n createEventHandler\n};\n", "import { createLogger } from \"./createLogger.js\";\nimport {\n createEventHandler\n} from \"./event-handler/index.js\";\nimport { sign, verify } from \"@octokit/webhooks-methods\";\nimport { verifyAndReceive } from \"./verify-and-receive.js\";\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nimport { createWebMiddleware } from \"./middleware/web/index.js\";\nimport { emitterEventNames } from \"./generated/webhook-names.js\";\nclass Webhooks {\n sign;\n verify;\n on;\n onAny;\n onError;\n removeListener;\n receive;\n verifyAndReceive;\n constructor(options) {\n if (!options || !options.secret) {\n throw new Error(\"[@octokit/webhooks] options.secret required\");\n }\n const state = {\n eventHandler: createEventHandler(options),\n secret: options.secret,\n additionalSecrets: options.additionalSecrets,\n hooks: {},\n log: createLogger(options.log)\n };\n this.sign = sign.bind(null, options.secret);\n this.verify = verify.bind(null, options.secret);\n this.on = state.eventHandler.on;\n this.onAny = state.eventHandler.onAny;\n this.onError = state.eventHandler.onError;\n this.removeListener = state.eventHandler.removeListener;\n this.receive = state.eventHandler.receive;\n this.verifyAndReceive = verifyAndReceive.bind(null, state);\n }\n}\nexport {\n Webhooks,\n createEventHandler,\n createNodeMiddleware,\n createWebMiddleware,\n emitterEventNames\n};\n", "import { verifyWithFallback } from \"@octokit/webhooks-methods\";\nasync function verifyAndReceive(state, event) {\n const matchesSignature = await verifyWithFallback(\n state.secret,\n event.payload,\n event.signature,\n state.additionalSecrets\n ).catch(() => false);\n if (!matchesSignature) {\n const error = new Error(\n \"[@octokit/webhooks] signature does not match event payload and secret\"\n );\n return state.eventHandler.receive(\n Object.assign(error, { event, status: 400 })\n );\n }\n let payload;\n try {\n payload = JSON.parse(event.payload);\n } catch (error) {\n error.message = \"Invalid JSON\";\n error.status = 400;\n throw new AggregateError([error], error.message);\n }\n return state.eventHandler.receive({\n id: event.id,\n name: event.name,\n payload\n });\n}\nexport {\n verifyAndReceive\n};\n", "const WEBHOOK_HEADERS = [\n \"x-github-event\",\n \"x-hub-signature-256\",\n \"x-github-delivery\"\n];\nfunction getMissingHeaders(request) {\n return WEBHOOK_HEADERS.filter((header) => !(header in request.headers));\n}\nexport {\n getMissingHeaders\n};\n", "function getPayload(request) {\n if (typeof request.body === \"object\" && \"rawBody\" in request && request.rawBody instanceof Buffer) {\n return Promise.resolve(request.rawBody.toString(\"utf8\"));\n } else if (typeof request.body === \"string\") {\n return Promise.resolve(request.body);\n }\n return new Promise((resolve, reject) => {\n let data = [];\n request.on(\n \"error\",\n (error) => reject(new AggregateError([error], error.message))\n );\n request.on(\"data\", (chunk) => data.push(chunk));\n request.on(\n \"end\",\n () => (\n // setImmediate improves the throughput by reducing the pressure from\n // the event loop\n setImmediate(\n resolve,\n data.length === 1 ? data[0].toString(\"utf8\") : Buffer.concat(data).toString(\"utf8\")\n )\n )\n );\n });\n}\nexport {\n getPayload\n};\n", "function onUnhandledRequestDefault(request, response) {\n response.writeHead(404, {\n \"content-type\": \"application/json\"\n });\n response.end(\n JSON.stringify({\n error: `Unknown route: ${request.method} ${request.url}`\n })\n );\n}\nexport {\n onUnhandledRequestDefault\n};\n", "import { getMissingHeaders } from \"./get-missing-headers.js\";\nimport { getPayload } from \"./get-payload.js\";\nimport { onUnhandledRequestDefault } from \"./on-unhandled-request-default.js\";\nasync function middleware(webhooks, options, request, response, next) {\n let pathname;\n try {\n pathname = new URL(request.url, \"http://localhost\").pathname;\n } catch (error) {\n response.writeHead(422, {\n \"content-type\": \"application/json\"\n });\n response.end(\n JSON.stringify({\n error: `Request URL could not be parsed: ${request.url}`\n })\n );\n return true;\n }\n if (pathname !== options.path) {\n next?.();\n return false;\n } else if (request.method !== \"POST\") {\n onUnhandledRequestDefault(request, response);\n return true;\n }\n if (!request.headers[\"content-type\"] || !request.headers[\"content-type\"].startsWith(\"application/json\")) {\n response.writeHead(415, {\n \"content-type\": \"application/json\",\n accept: \"application/json\"\n });\n response.end(\n JSON.stringify({\n error: `Unsupported \"Content-Type\" header value. Must be \"application/json\"`\n })\n );\n return true;\n }\n const missingHeaders = getMissingHeaders(request).join(\", \");\n if (missingHeaders) {\n response.writeHead(400, {\n \"content-type\": \"application/json\"\n });\n response.end(\n JSON.stringify({\n error: `Required headers missing: ${missingHeaders}`\n })\n );\n return true;\n }\n const eventName = request.headers[\"x-github-event\"];\n const signatureSHA256 = request.headers[\"x-hub-signature-256\"];\n const id = request.headers[\"x-github-delivery\"];\n options.log.debug(`${eventName} event received (id: ${id})`);\n let didTimeout = false;\n const timeout = setTimeout(() => {\n didTimeout = true;\n response.statusCode = 202;\n response.end(\"still processing\\n\");\n }, 9e3).unref();\n try {\n const payload = await getPayload(request);\n await webhooks.verifyAndReceive({\n id,\n name: eventName,\n payload,\n signature: signatureSHA256\n });\n clearTimeout(timeout);\n if (didTimeout) return true;\n response.end(\"ok\\n\");\n return true;\n } catch (error) {\n clearTimeout(timeout);\n if (didTimeout) return true;\n const err = Array.from(error.errors)[0];\n const errorMessage = err.message ? `${err.name}: ${err.message}` : \"Error: An Unspecified error occurred\";\n response.statusCode = typeof err.status !== \"undefined\" ? err.status : 500;\n options.log.error(error);\n response.end(\n JSON.stringify({\n error: errorMessage\n })\n );\n return true;\n }\n}\nexport {\n middleware\n};\n", "import { createLogger } from \"../../createLogger.js\";\nimport { middleware } from \"./middleware.js\";\nfunction createNodeMiddleware(webhooks, {\n path = \"/api/github/webhooks\",\n log = createLogger()\n} = {}) {\n return middleware.bind(null, webhooks, {\n path,\n log\n });\n}\nexport {\n createNodeMiddleware\n};\n", "const WEBHOOK_HEADERS = [\n \"x-github-event\",\n \"x-hub-signature-256\",\n \"x-github-delivery\"\n];\nfunction getMissingHeaders(request) {\n return WEBHOOK_HEADERS.filter((header) => !request.headers.has(header));\n}\nexport {\n getMissingHeaders\n};\n", "function getPayload(request) {\n return request.text();\n}\nexport {\n getPayload\n};\n", "function onUnhandledRequestDefault(request) {\n return new Response(\n JSON.stringify({\n error: `Unknown route: ${request.method} ${request.url}`\n }),\n {\n status: 404,\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n );\n}\nexport {\n onUnhandledRequestDefault\n};\n", "import { getMissingHeaders } from \"./get-missing-headers.js\";\nimport { getPayload } from \"./get-payload.js\";\nimport { onUnhandledRequestDefault } from \"./on-unhandled-request-default.js\";\nasync function middleware(webhooks, options, request) {\n let pathname;\n try {\n pathname = new URL(request.url, \"http://localhost\").pathname;\n } catch (error) {\n return new Response(\n JSON.stringify({\n error: `Request URL could not be parsed: ${request.url}`\n }),\n {\n status: 422,\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n );\n }\n if (pathname !== options.path || request.method !== \"POST\") {\n return onUnhandledRequestDefault(request);\n }\n if (typeof request.headers.get(\"content-type\") !== \"string\" || !request.headers.get(\"content-type\").startsWith(\"application/json\")) {\n return new Response(\n JSON.stringify({\n error: `Unsupported \"Content-Type\" header value. Must be \"application/json\"`\n }),\n {\n status: 415,\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n );\n }\n const missingHeaders = getMissingHeaders(request).join(\", \");\n if (missingHeaders) {\n return new Response(\n JSON.stringify({\n error: `Required headers missing: ${missingHeaders}`\n }),\n {\n status: 422,\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n );\n }\n const eventName = request.headers.get(\"x-github-event\");\n const signatureSHA256 = request.headers.get(\"x-hub-signature-256\");\n const id = request.headers.get(\"x-github-delivery\");\n options.log.debug(`${eventName} event received (id: ${id})`);\n let didTimeout = false;\n let timeout;\n const timeoutPromise = new Promise((resolve) => {\n timeout = setTimeout(() => {\n didTimeout = true;\n resolve(\n new Response(\"still processing\\n\", {\n status: 202,\n headers: { \"Content-Type\": \"text/plain\" }\n })\n );\n }, 9e3).unref();\n });\n const processWebhook = async () => {\n try {\n const payload = await getPayload(request);\n await webhooks.verifyAndReceive({\n id,\n name: eventName,\n payload,\n signature: signatureSHA256\n });\n clearTimeout(timeout);\n if (didTimeout) return new Response(null);\n return new Response(\"ok\\n\");\n } catch (error) {\n clearTimeout(timeout);\n if (didTimeout) return new Response(null);\n const err = Array.from(error.errors)[0];\n const errorMessage = err.message ? `${err.name}: ${err.message}` : \"Error: An Unspecified error occurred\";\n options.log.error(error);\n return new Response(\n JSON.stringify({\n error: errorMessage\n }),\n {\n status: typeof err.status !== \"undefined\" ? err.status : 500,\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n );\n }\n };\n return await Promise.race([timeoutPromise, processWebhook()]);\n}\nexport {\n middleware\n};\n", "import { createLogger } from \"../../createLogger.js\";\nimport { middleware } from \"./middleware.js\";\nfunction createWebMiddleware(webhooks, {\n path = \"/api/github/webhooks\",\n log = createLogger()\n} = {}) {\n return middleware.bind(null, webhooks, {\n path,\n log\n });\n}\nexport {\n createWebMiddleware\n};\n"], - "mappings": ";AAAA,IAAM,eAAe,CAAC,YAAY;AAAA,EAChC,OAAO,MAAM;AAAA,EACb;AAAA,EACA,MAAM,MAAM;AAAA,EACZ;AAAA,EACA,MAAM,QAAQ,KAAK,KAAK,OAAO;AAAA,EAC/B,OAAO,QAAQ,MAAM,KAAK,OAAO;AAAA,EACjC,GAAG;AACL;;;ACRA,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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AAC,WAAW,CAAC,QAAQ,QAAQ;AAC/B,YAAM,IAAI,MAAM,6CAA6C;AAAA,IAC/D;AACA,UAAM,QAAQ;AAAA,MACZ,cAAc,mBAAmB,OAAO;AAAA,MACxC,QAAQ,QAAQ;AAAA,MAChB,mBAAmB,QAAQ;AAAA,MAC3B,OAAO,CAAC;AAAA,MACR,KAAK,aAAa,QAAQ,GAAG;AAAA,IAC/B;AACA,SAAK,OAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AAC1C,SAAK,SAAS,OAAO,KAAK,MAAM,QAAQ,MAAM;AAC9C,SAAK,KAAK,MAAM,aAAa;AAC7B,SAAK,QAAQ,MAAM,aAAa;AAChC,SAAK,UAAU,MAAM,aAAa;AAClC,SAAK,iBAAiB,MAAM,aAAa;AACzC,SAAK,UAAU,MAAM,aAAa;AAClC,SAAK,mBAAmB,iBAAiB,KAAK,MAAM,KAAK;AAAA,EAC3D;AACF;", - "names": ["WEBHOOK_HEADERS", "getMissingHeaders", "getPayload", "onUnhandledRequestDefault", "middleware", "onUnhandledRequestDefault", "getMissingHeaders", "getPayload", "middleware"] + "sources": ["../dist-src/create-logger.js", "../dist-src/generated/webhook-names.js", "../dist-src/event-handler/on.js", "../dist-src/event-handler/wrap-error-handler.js", "../dist-src/event-handler/receive.js", "../dist-src/event-handler/remove-listener.js", "../dist-src/event-handler/index.js", "../dist-src/index.js", "../dist-src/verify-and-receive.js", "../dist-src/middleware/create-middleware.js", "../dist-src/middleware/node/handle-response.js", "../dist-src/middleware/node/get-request-header.js", "../dist-src/concat-uint8array.js", "../dist-src/middleware/node/get-payload.js", "../dist-src/middleware/node/index.js", "../dist-src/middleware/web/get-payload.js", "../dist-src/middleware/web/get-request-header.js", "../dist-src/middleware/web/handle-response.js", "../dist-src/middleware/web/index.js"], + "sourcesContent": ["const createLogger = (logger) => ({\n debug: () => {\n },\n info: () => {\n },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n ...logger\n});\nexport {\n createLogger\n};\n", "const emitterEventNames = [\n \"branch_protection_configuration\",\n \"branch_protection_configuration.disabled\",\n \"branch_protection_configuration.enabled\",\n \"branch_protection_rule\",\n \"branch_protection_rule.created\",\n \"branch_protection_rule.deleted\",\n \"branch_protection_rule.edited\",\n \"check_run\",\n \"check_run.completed\",\n \"check_run.created\",\n \"check_run.requested_action\",\n \"check_run.rerequested\",\n \"check_suite\",\n \"check_suite.completed\",\n \"check_suite.requested\",\n \"check_suite.rerequested\",\n \"code_scanning_alert\",\n \"code_scanning_alert.appeared_in_branch\",\n \"code_scanning_alert.closed_by_user\",\n \"code_scanning_alert.created\",\n \"code_scanning_alert.fixed\",\n \"code_scanning_alert.reopened\",\n \"code_scanning_alert.reopened_by_user\",\n \"commit_comment\",\n \"commit_comment.created\",\n \"create\",\n \"custom_property\",\n \"custom_property.created\",\n \"custom_property.deleted\",\n \"custom_property.promote_to_enterprise\",\n \"custom_property.updated\",\n \"custom_property_values\",\n \"custom_property_values.updated\",\n \"delete\",\n \"dependabot_alert\",\n \"dependabot_alert.auto_dismissed\",\n \"dependabot_alert.auto_reopened\",\n \"dependabot_alert.created\",\n \"dependabot_alert.dismissed\",\n \"dependabot_alert.fixed\",\n \"dependabot_alert.reintroduced\",\n \"dependabot_alert.reopened\",\n \"deploy_key\",\n \"deploy_key.created\",\n \"deploy_key.deleted\",\n \"deployment\",\n \"deployment.created\",\n \"deployment_protection_rule\",\n \"deployment_protection_rule.requested\",\n \"deployment_review\",\n \"deployment_review.approved\",\n \"deployment_review.rejected\",\n \"deployment_review.requested\",\n \"deployment_status\",\n \"deployment_status.created\",\n \"discussion\",\n \"discussion.answered\",\n \"discussion.category_changed\",\n \"discussion.closed\",\n \"discussion.created\",\n \"discussion.deleted\",\n \"discussion.edited\",\n \"discussion.labeled\",\n \"discussion.locked\",\n \"discussion.pinned\",\n \"discussion.reopened\",\n \"discussion.transferred\",\n \"discussion.unanswered\",\n \"discussion.unlabeled\",\n \"discussion.unlocked\",\n \"discussion.unpinned\",\n \"discussion_comment\",\n \"discussion_comment.created\",\n \"discussion_comment.deleted\",\n \"discussion_comment.edited\",\n \"fork\",\n \"github_app_authorization\",\n \"github_app_authorization.revoked\",\n \"gollum\",\n \"installation\",\n \"installation.created\",\n \"installation.deleted\",\n \"installation.new_permissions_accepted\",\n \"installation.suspend\",\n \"installation.unsuspend\",\n \"installation_repositories\",\n \"installation_repositories.added\",\n \"installation_repositories.removed\",\n \"installation_target\",\n \"installation_target.renamed\",\n \"issue_comment\",\n \"issue_comment.created\",\n \"issue_comment.deleted\",\n \"issue_comment.edited\",\n \"issues\",\n \"issues.assigned\",\n \"issues.closed\",\n \"issues.deleted\",\n \"issues.demilestoned\",\n \"issues.edited\",\n \"issues.labeled\",\n \"issues.locked\",\n \"issues.milestoned\",\n \"issues.opened\",\n \"issues.pinned\",\n \"issues.reopened\",\n \"issues.transferred\",\n \"issues.typed\",\n \"issues.unassigned\",\n \"issues.unlabeled\",\n \"issues.unlocked\",\n \"issues.unpinned\",\n \"issues.untyped\",\n \"label\",\n \"label.created\",\n \"label.deleted\",\n \"label.edited\",\n \"marketplace_purchase\",\n \"marketplace_purchase.cancelled\",\n \"marketplace_purchase.changed\",\n \"marketplace_purchase.pending_change\",\n \"marketplace_purchase.pending_change_cancelled\",\n \"marketplace_purchase.purchased\",\n \"member\",\n \"member.added\",\n \"member.edited\",\n \"member.removed\",\n \"membership\",\n \"membership.added\",\n \"membership.removed\",\n \"merge_group\",\n \"merge_group.checks_requested\",\n \"merge_group.destroyed\",\n \"meta\",\n \"meta.deleted\",\n \"milestone\",\n \"milestone.closed\",\n \"milestone.created\",\n \"milestone.deleted\",\n \"milestone.edited\",\n \"milestone.opened\",\n \"org_block\",\n \"org_block.blocked\",\n \"org_block.unblocked\",\n \"organization\",\n \"organization.deleted\",\n \"organization.member_added\",\n \"organization.member_invited\",\n \"organization.member_removed\",\n \"organization.renamed\",\n \"package\",\n \"package.published\",\n \"package.updated\",\n \"page_build\",\n \"personal_access_token_request\",\n \"personal_access_token_request.approved\",\n \"personal_access_token_request.cancelled\",\n \"personal_access_token_request.created\",\n \"personal_access_token_request.denied\",\n \"ping\",\n \"project\",\n \"project.closed\",\n \"project.created\",\n \"project.deleted\",\n \"project.edited\",\n \"project.reopened\",\n \"project_card\",\n \"project_card.converted\",\n \"project_card.created\",\n \"project_card.deleted\",\n \"project_card.edited\",\n \"project_card.moved\",\n \"project_column\",\n \"project_column.created\",\n \"project_column.deleted\",\n \"project_column.edited\",\n \"project_column.moved\",\n \"projects_v2\",\n \"projects_v2.closed\",\n \"projects_v2.created\",\n \"projects_v2.deleted\",\n \"projects_v2.edited\",\n \"projects_v2.reopened\",\n \"projects_v2_item\",\n \"projects_v2_item.archived\",\n \"projects_v2_item.converted\",\n \"projects_v2_item.created\",\n \"projects_v2_item.deleted\",\n \"projects_v2_item.edited\",\n \"projects_v2_item.reordered\",\n \"projects_v2_item.restored\",\n \"projects_v2_status_update\",\n \"projects_v2_status_update.created\",\n \"projects_v2_status_update.deleted\",\n \"projects_v2_status_update.edited\",\n \"public\",\n \"pull_request\",\n \"pull_request.assigned\",\n \"pull_request.auto_merge_disabled\",\n \"pull_request.auto_merge_enabled\",\n \"pull_request.closed\",\n \"pull_request.converted_to_draft\",\n \"pull_request.demilestoned\",\n \"pull_request.dequeued\",\n \"pull_request.edited\",\n \"pull_request.enqueued\",\n \"pull_request.labeled\",\n \"pull_request.locked\",\n \"pull_request.milestoned\",\n \"pull_request.opened\",\n \"pull_request.ready_for_review\",\n \"pull_request.reopened\",\n \"pull_request.review_request_removed\",\n \"pull_request.review_requested\",\n \"pull_request.synchronize\",\n \"pull_request.unassigned\",\n \"pull_request.unlabeled\",\n \"pull_request.unlocked\",\n \"pull_request_review\",\n \"pull_request_review.dismissed\",\n \"pull_request_review.edited\",\n \"pull_request_review.submitted\",\n \"pull_request_review_comment\",\n \"pull_request_review_comment.created\",\n \"pull_request_review_comment.deleted\",\n \"pull_request_review_comment.edited\",\n \"pull_request_review_thread\",\n \"pull_request_review_thread.resolved\",\n \"pull_request_review_thread.unresolved\",\n \"push\",\n \"registry_package\",\n \"registry_package.published\",\n \"registry_package.updated\",\n \"release\",\n \"release.created\",\n \"release.deleted\",\n \"release.edited\",\n \"release.prereleased\",\n \"release.published\",\n \"release.released\",\n \"release.unpublished\",\n \"repository\",\n \"repository.archived\",\n \"repository.created\",\n \"repository.deleted\",\n \"repository.edited\",\n \"repository.privatized\",\n \"repository.publicized\",\n \"repository.renamed\",\n \"repository.transferred\",\n \"repository.unarchived\",\n \"repository_advisory\",\n \"repository_advisory.published\",\n \"repository_advisory.reported\",\n \"repository_dispatch\",\n \"repository_dispatch.sample.collected\",\n \"repository_import\",\n \"repository_ruleset\",\n \"repository_ruleset.created\",\n \"repository_ruleset.deleted\",\n \"repository_ruleset.edited\",\n \"repository_vulnerability_alert\",\n \"repository_vulnerability_alert.create\",\n \"repository_vulnerability_alert.dismiss\",\n \"repository_vulnerability_alert.reopen\",\n \"repository_vulnerability_alert.resolve\",\n \"secret_scanning_alert\",\n \"secret_scanning_alert.created\",\n \"secret_scanning_alert.publicly_leaked\",\n \"secret_scanning_alert.reopened\",\n \"secret_scanning_alert.resolved\",\n \"secret_scanning_alert.validated\",\n \"secret_scanning_alert_location\",\n \"secret_scanning_alert_location.created\",\n \"secret_scanning_scan\",\n \"secret_scanning_scan.completed\",\n \"security_advisory\",\n \"security_advisory.published\",\n \"security_advisory.updated\",\n \"security_advisory.withdrawn\",\n \"security_and_analysis\",\n \"sponsorship\",\n \"sponsorship.cancelled\",\n \"sponsorship.created\",\n \"sponsorship.edited\",\n \"sponsorship.pending_cancellation\",\n \"sponsorship.pending_tier_change\",\n \"sponsorship.tier_changed\",\n \"star\",\n \"star.created\",\n \"star.deleted\",\n \"status\",\n \"sub_issues\",\n \"sub_issues.parent_issue_added\",\n \"sub_issues.parent_issue_removed\",\n \"sub_issues.sub_issue_added\",\n \"sub_issues.sub_issue_removed\",\n \"team\",\n \"team.added_to_repository\",\n \"team.created\",\n \"team.deleted\",\n \"team.edited\",\n \"team.removed_from_repository\",\n \"team_add\",\n \"watch\",\n \"watch.started\",\n \"workflow_dispatch\",\n \"workflow_job\",\n \"workflow_job.completed\",\n \"workflow_job.in_progress\",\n \"workflow_job.queued\",\n \"workflow_job.waiting\",\n \"workflow_run\",\n \"workflow_run.completed\",\n \"workflow_run.in_progress\",\n \"workflow_run.requested\"\n];\nexport {\n emitterEventNames\n};\n", "import { emitterEventNames } from \"../generated/webhook-names.js\";\nfunction handleEventHandlers(state, webhookName, handler) {\n if (!state.hooks[webhookName]) {\n state.hooks[webhookName] = [];\n }\n state.hooks[webhookName].push(handler);\n}\nfunction receiverOn(state, webhookNameOrNames, handler) {\n if (Array.isArray(webhookNameOrNames)) {\n webhookNameOrNames.forEach(\n (webhookName) => receiverOn(state, webhookName, handler)\n );\n return;\n }\n if ([\"*\", \"error\"].includes(webhookNameOrNames)) {\n const webhookName = webhookNameOrNames === \"*\" ? \"any\" : webhookNameOrNames;\n const message = `Using the \"${webhookNameOrNames}\" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`;\n throw new Error(message);\n }\n if (!emitterEventNames.includes(webhookNameOrNames)) {\n state.log.warn(\n `\"${webhookNameOrNames}\" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`\n );\n }\n handleEventHandlers(state, webhookNameOrNames, handler);\n}\nfunction receiverOnAny(state, handler) {\n handleEventHandlers(state, \"*\", handler);\n}\nfunction receiverOnError(state, handler) {\n handleEventHandlers(state, \"error\", handler);\n}\nexport {\n receiverOn,\n receiverOnAny,\n receiverOnError\n};\n", "function wrapErrorHandler(handler, error) {\n let returnValue;\n try {\n returnValue = handler(error);\n } catch (error2) {\n console.log('FATAL: Error occurred in \"error\" event handler');\n console.log(error2);\n }\n if (returnValue && returnValue.catch) {\n returnValue.catch((error2) => {\n console.log('FATAL: Error occurred in \"error\" event handler');\n console.log(error2);\n });\n }\n}\nexport {\n wrapErrorHandler\n};\n", "import { wrapErrorHandler } from \"./wrap-error-handler.js\";\nfunction getHooks(state, eventPayloadAction, eventName) {\n const hooks = [state.hooks[eventName], state.hooks[\"*\"]];\n if (eventPayloadAction) {\n hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]);\n }\n return [].concat(...hooks.filter(Boolean));\n}\nfunction receiverHandle(state, event) {\n const errorHandlers = state.hooks.error || [];\n if (event instanceof Error) {\n const error = Object.assign(new AggregateError([event], event.message), {\n event\n });\n errorHandlers.forEach((handler) => wrapErrorHandler(handler, error));\n return Promise.reject(error);\n }\n if (!event || !event.name) {\n const error = new Error(\"Event name not passed\");\n throw new AggregateError([error], error.message);\n }\n if (!event.payload) {\n const error = new Error(\"Event name not passed\");\n throw new AggregateError([error], error.message);\n }\n const hooks = getHooks(\n state,\n \"action\" in event.payload ? event.payload.action : null,\n event.name\n );\n if (hooks.length === 0) {\n return Promise.resolve();\n }\n const errors = [];\n const promises = hooks.map((handler) => {\n let promise = Promise.resolve(event);\n if (state.transform) {\n promise = promise.then(state.transform);\n }\n return promise.then((event2) => {\n return handler(event2);\n }).catch((error) => errors.push(Object.assign(error, { event })));\n });\n return Promise.all(promises).then(() => {\n if (errors.length === 0) {\n return;\n }\n const error = new AggregateError(\n errors,\n errors.map((error2) => error2.message).join(\"\\n\")\n );\n Object.assign(error, {\n event\n });\n errorHandlers.forEach((handler) => wrapErrorHandler(handler, error));\n throw error;\n });\n}\nexport {\n receiverHandle\n};\n", "function removeListener(state, webhookNameOrNames, handler) {\n if (Array.isArray(webhookNameOrNames)) {\n webhookNameOrNames.forEach(\n (webhookName) => removeListener(state, webhookName, handler)\n );\n return;\n }\n if (!state.hooks[webhookNameOrNames]) {\n return;\n }\n for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) {\n if (state.hooks[webhookNameOrNames][i] === handler) {\n state.hooks[webhookNameOrNames].splice(i, 1);\n return;\n }\n }\n}\nexport {\n removeListener\n};\n", "import { createLogger } from \"../create-logger.js\";\nimport {\n receiverOn as on,\n receiverOnAny as onAny,\n receiverOnError as onError\n} from \"./on.js\";\nimport { receiverHandle as receive } from \"./receive.js\";\nimport { removeListener } from \"./remove-listener.js\";\nfunction createEventHandler(options) {\n const state = {\n hooks: {},\n log: createLogger(options && options.log)\n };\n if (options && options.transform) {\n state.transform = options.transform;\n }\n return {\n on: on.bind(null, state),\n onAny: onAny.bind(null, state),\n onError: onError.bind(null, state),\n removeListener: removeListener.bind(null, state),\n receive: receive.bind(null, state)\n };\n}\nexport {\n createEventHandler\n};\n", "import { createLogger } from \"./create-logger.js\";\nimport {\n createEventHandler\n} from \"./event-handler/index.js\";\nimport { sign, verify } from \"@octokit/webhooks-methods\";\nimport { verifyAndReceive } from \"./verify-and-receive.js\";\nimport { createNodeMiddleware } from \"./middleware/node/index.js\";\nimport { createWebMiddleware } from \"./middleware/web/index.js\";\nimport { emitterEventNames } from \"./generated/webhook-names.js\";\nclass Webhooks {\n sign;\n verify;\n on;\n onAny;\n onError;\n removeListener;\n receive;\n verifyAndReceive;\n constructor(options) {\n if (!options || !options.secret) {\n throw new Error(\"[@octokit/webhooks] options.secret required\");\n }\n const state = {\n eventHandler: createEventHandler(options),\n secret: options.secret,\n additionalSecrets: options.additionalSecrets,\n hooks: {},\n log: createLogger(options.log)\n };\n this.sign = sign.bind(null, options.secret);\n this.verify = verify.bind(null, options.secret);\n this.on = state.eventHandler.on;\n this.onAny = state.eventHandler.onAny;\n this.onError = state.eventHandler.onError;\n this.removeListener = state.eventHandler.removeListener;\n this.receive = state.eventHandler.receive;\n this.verifyAndReceive = verifyAndReceive.bind(null, state);\n }\n}\nexport {\n Webhooks,\n createEventHandler,\n createNodeMiddleware,\n createWebMiddleware,\n emitterEventNames\n};\n", "import { verifyWithFallback } from \"@octokit/webhooks-methods\";\nasync function verifyAndReceive(state, event) {\n const matchesSignature = await verifyWithFallback(\n state.secret,\n event.payload,\n event.signature,\n state.additionalSecrets\n ).catch(() => false);\n if (!matchesSignature) {\n const error = new Error(\n \"[@octokit/webhooks] signature does not match event payload and secret\"\n );\n return state.eventHandler.receive(\n Object.assign(error, { event, status: 400 })\n );\n }\n let payload;\n try {\n payload = JSON.parse(event.payload);\n } catch (error) {\n error.message = \"Invalid JSON\";\n error.status = 400;\n throw new AggregateError([error], error.message);\n }\n return state.eventHandler.receive({\n id: event.id,\n name: event.name,\n payload\n });\n}\nexport {\n verifyAndReceive\n};\n", "const isApplicationJsonRE = /^\\s*(application\\/json)\\s*(?:;|$)/u;\nconst WEBHOOK_HEADERS = [\n \"x-github-event\",\n \"x-hub-signature-256\",\n \"x-github-delivery\"\n];\nfunction createMiddleware(options) {\n const { handleResponse, getRequestHeader, getPayload } = options;\n return function middleware(webhooks, options2) {\n return async function octokitWebhooksMiddleware(request, response, next) {\n let pathname;\n try {\n pathname = new URL(request.url, \"http://localhost\").pathname;\n } catch (error) {\n return handleResponse(\n JSON.stringify({\n error: `Request URL could not be parsed: ${request.url}`\n }),\n 422,\n {\n \"content-type\": \"application/json\"\n },\n response\n );\n }\n if (pathname !== options2.path) {\n next?.();\n return handleResponse(null);\n } else if (request.method !== \"POST\") {\n return handleResponse(\n JSON.stringify({\n error: `Unknown route: ${request.method} ${pathname}`\n }),\n 404,\n {\n \"content-type\": \"application/json\"\n },\n response\n );\n }\n const contentType = getRequestHeader(request, \"content-type\");\n if (typeof contentType !== \"string\" || !isApplicationJsonRE.test(contentType)) {\n return handleResponse(\n JSON.stringify({\n error: `Unsupported \"Content-Type\" header value. Must be \"application/json\"`\n }),\n 415,\n {\n \"content-type\": \"application/json\",\n accept: \"application/json\"\n },\n response\n );\n }\n const missingHeaders = WEBHOOK_HEADERS.filter((header) => {\n return getRequestHeader(request, header) == void 0;\n }).join(\", \");\n if (missingHeaders) {\n return handleResponse(\n JSON.stringify({\n error: `Required headers missing: ${missingHeaders}`\n }),\n 400,\n {\n \"content-type\": \"application/json\",\n accept: \"application/json\"\n },\n response\n );\n }\n const eventName = getRequestHeader(\n request,\n \"x-github-event\"\n );\n const signature = getRequestHeader(request, \"x-hub-signature-256\");\n const id = getRequestHeader(request, \"x-github-delivery\");\n options2.log.debug(`${eventName} event received (id: ${id})`);\n let didTimeout = false;\n let timeout;\n const timeoutPromise = new Promise((resolve) => {\n timeout = setTimeout(() => {\n didTimeout = true;\n resolve(\n handleResponse(\n \"still processing\\n\",\n 202,\n {\n \"Content-Type\": \"text/plain\",\n accept: \"application/json\"\n },\n response\n )\n );\n }, options2.timeout);\n });\n const processWebhook = async () => {\n try {\n const payload = await getPayload(request);\n await webhooks.verifyAndReceive({\n id,\n name: eventName,\n payload,\n signature\n });\n clearTimeout(timeout);\n if (didTimeout) return handleResponse(null);\n return handleResponse(\n \"ok\\n\",\n 200,\n {\n \"content-type\": \"text/plain\",\n accept: \"application/json\"\n },\n response\n );\n } catch (error) {\n clearTimeout(timeout);\n if (didTimeout) return handleResponse(null);\n const err = Array.from(error.errors)[0];\n const errorMessage = err.message ? `${err.name}: ${err.message}` : \"Error: An Unspecified error occurred\";\n const statusCode = typeof err.status !== \"undefined\" ? err.status : 500;\n options2.log.error(error);\n return handleResponse(\n JSON.stringify({\n error: errorMessage\n }),\n statusCode,\n {\n \"content-type\": \"application/json\",\n accept: \"application/json\"\n },\n response\n );\n }\n };\n return await Promise.race([timeoutPromise, processWebhook()]);\n };\n };\n}\nexport {\n createMiddleware\n};\n", "function handleResponse(body, status = 200, headers = {}, response) {\n if (body === null) {\n return false;\n }\n headers[\"content-length\"] = body.length.toString();\n response.writeHead(status, headers).end(body);\n return true;\n}\nexport {\n handleResponse\n};\n", "function getRequestHeader(request, key) {\n return request.headers[key];\n}\nexport {\n getRequestHeader\n};\n", "function concatUint8Array(data) {\n if (data.length === 0) {\n return new Uint8Array(0);\n }\n let totalLength = 0;\n for (let i = 0; i < data.length; i++) {\n totalLength += data[i].length;\n }\n if (totalLength === 0) {\n return new Uint8Array(0);\n }\n const result = new Uint8Array(totalLength);\n let offset = 0;\n for (let i = 0; i < data.length; i++) {\n result.set(data[i], offset);\n offset += data[i].length;\n }\n return result;\n}\nexport {\n concatUint8Array\n};\n", "import { concatUint8Array } from \"../../concat-uint8array.js\";\nconst textDecoder = new TextDecoder(\"utf-8\", { fatal: false });\nconst decode = textDecoder.decode.bind(textDecoder);\nasync function getPayload(request) {\n if (typeof request.body === \"object\" && \"rawBody\" in request && request.rawBody instanceof Uint8Array) {\n return decode(request.rawBody);\n } else if (typeof request.body === \"string\") {\n return request.body;\n }\n const payload = await getPayloadFromRequestStream(request);\n return decode(payload);\n}\nfunction getPayloadFromRequestStream(request) {\n return new Promise((resolve, reject) => {\n let data = [];\n request.on(\n \"error\",\n (error) => reject(new AggregateError([error], error.message))\n );\n request.on(\"data\", data.push.bind(data));\n request.on(\"end\", () => {\n const result = concatUint8Array(data);\n queueMicrotask(() => resolve(result));\n });\n });\n}\nexport {\n getPayload,\n getPayloadFromRequestStream\n};\n", "import { createLogger } from \"../../create-logger.js\";\nimport { createMiddleware } from \"../create-middleware.js\";\nimport { handleResponse } from \"./handle-response.js\";\nimport { getRequestHeader } from \"./get-request-header.js\";\nimport { getPayload } from \"./get-payload.js\";\nfunction createNodeMiddleware(webhooks, {\n path = \"/api/github/webhooks\",\n log = createLogger(),\n timeout = 9e3\n} = {}) {\n return createMiddleware({\n handleResponse,\n getRequestHeader,\n getPayload\n })(webhooks, {\n path,\n log,\n timeout\n });\n}\nexport {\n createNodeMiddleware\n};\n", "function getPayload(request) {\n return request.text();\n}\nexport {\n getPayload\n};\n", "function getRequestHeader(request, key) {\n return request.headers.get(key);\n}\nexport {\n getRequestHeader\n};\n", "function handleResponse(body, status = 200, headers = {}) {\n if (body !== null) {\n headers[\"content-length\"] = body.length.toString();\n }\n return new Response(body, {\n status,\n headers\n });\n}\nexport {\n handleResponse\n};\n", "import { createLogger } from \"../../create-logger.js\";\nimport { createMiddleware } from \"../create-middleware.js\";\nimport { getPayload } from \"./get-payload.js\";\nimport { getRequestHeader } from \"./get-request-header.js\";\nimport { handleResponse } from \"./handle-response.js\";\nfunction createWebMiddleware(webhooks, {\n path = \"/api/github/webhooks\",\n log = createLogger(),\n timeout = 9e3\n} = {}) {\n return createMiddleware({\n handleResponse,\n getRequestHeader,\n getPayload\n })(webhooks, {\n path,\n log,\n timeout\n });\n}\nexport {\n createWebMiddleware\n};\n"], + "mappings": ";AAAA,IAAM,eAAe,CAAC,YAAY;AAAA,EAChC,OAAO,MAAM;AAAA,EACb;AAAA,EACA,MAAM,MAAM;AAAA,EACZ;AAAA,EACA,MAAM,QAAQ,KAAK,KAAK,OAAO;AAAA,EAC/B,OAAO,QAAQ,MAAM,KAAK,OAAO;AAAA,EACjC,GAAG;AACL;;;ACRA,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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;AACN,SAAO,iBAAiB;AAAA,IACtB,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,EACF,CAAC,EAAE,UAAU;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;;;AXVA,IAAM,WAAN,MAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,SAAS;AACnB,QAAI,CAAC,WAAW,CAAC,QAAQ,QAAQ;AAC/B,YAAM,IAAI,MAAM,6CAA6C;AAAA,IAC/D;AACA,UAAM,QAAQ;AAAA,MACZ,cAAc,mBAAmB,OAAO;AAAA,MACxC,QAAQ,QAAQ;AAAA,MAChB,mBAAmB,QAAQ;AAAA,MAC3B,OAAO,CAAC;AAAA,MACR,KAAK,aAAa,QAAQ,GAAG;AAAA,IAC/B;AACA,SAAK,OAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AAC1C,SAAK,SAAS,OAAO,KAAK,MAAM,QAAQ,MAAM;AAC9C,SAAK,KAAK,MAAM,aAAa;AAC7B,SAAK,QAAQ,MAAM,aAAa;AAChC,SAAK,UAAU,MAAM,aAAa;AAClC,SAAK,iBAAiB,MAAM,aAAa;AACzC,SAAK,UAAU,MAAM,aAAa;AAClC,SAAK,mBAAmB,iBAAiB,KAAK,MAAM,KAAK;AAAA,EAC3D;AACF;", + "names": ["handleResponse", "getRequestHeader", "getPayload", "getPayload", "getRequestHeader", "handleResponse", "handleResponse", "getRequestHeader", "getPayload"] } diff --git a/node_modules/@octokit/webhooks/dist-src/concat-uint8array.js b/node_modules/@octokit/webhooks/dist-src/concat-uint8array.js new file mode 100644 index 000000000..45830814f --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/concat-uint8array.js @@ -0,0 +1,22 @@ +function concatUint8Array(data) { + if (data.length === 0) { + return new Uint8Array(0); + } + let totalLength = 0; + for (let i = 0; i < data.length; i++) { + totalLength += data[i].length; + } + if (totalLength === 0) { + return new Uint8Array(0); + } + const result = new Uint8Array(totalLength); + let offset = 0; + for (let i = 0; i < data.length; i++) { + result.set(data[i], offset); + offset += data[i].length; + } + return result; +} +export { + concatUint8Array +}; diff --git a/node_modules/@octokit/webhooks/dist-src/createLogger.js b/node_modules/@octokit/webhooks/dist-src/create-logger.js similarity index 100% rename from node_modules/@octokit/webhooks/dist-src/createLogger.js rename to node_modules/@octokit/webhooks/dist-src/create-logger.js diff --git a/node_modules/@octokit/webhooks/dist-src/event-handler/index.js b/node_modules/@octokit/webhooks/dist-src/event-handler/index.js index a82280869..05a1276a7 100644 --- a/node_modules/@octokit/webhooks/dist-src/event-handler/index.js +++ b/node_modules/@octokit/webhooks/dist-src/event-handler/index.js @@ -1,4 +1,4 @@ -import { createLogger } from "../createLogger.js"; +import { createLogger } from "../create-logger.js"; import { receiverOn as on, receiverOnAny as onAny, diff --git a/node_modules/@octokit/webhooks/dist-src/index.js b/node_modules/@octokit/webhooks/dist-src/index.js index f4e4f4a91..254c54646 100644 --- a/node_modules/@octokit/webhooks/dist-src/index.js +++ b/node_modules/@octokit/webhooks/dist-src/index.js @@ -1,4 +1,4 @@ -import { createLogger } from "./createLogger.js"; +import { createLogger } from "./create-logger.js"; import { createEventHandler } from "./event-handler/index.js"; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/create-middleware.js b/node_modules/@octokit/webhooks/dist-src/middleware/create-middleware.js new file mode 100644 index 000000000..2a158084e --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/middleware/create-middleware.js @@ -0,0 +1,142 @@ +const isApplicationJsonRE = /^\s*(application\/json)\s*(?:;|$)/u; +const WEBHOOK_HEADERS = [ + "x-github-event", + "x-hub-signature-256", + "x-github-delivery" +]; +function createMiddleware(options) { + const { handleResponse, getRequestHeader, getPayload } = options; + return function middleware(webhooks, options2) { + return async function octokitWebhooksMiddleware(request, response, next) { + let pathname; + try { + pathname = new URL(request.url, "http://localhost").pathname; + } catch (error) { + return handleResponse( + JSON.stringify({ + error: `Request URL could not be parsed: ${request.url}` + }), + 422, + { + "content-type": "application/json" + }, + response + ); + } + if (pathname !== options2.path) { + next?.(); + return handleResponse(null); + } else if (request.method !== "POST") { + return handleResponse( + JSON.stringify({ + error: `Unknown route: ${request.method} ${pathname}` + }), + 404, + { + "content-type": "application/json" + }, + response + ); + } + const contentType = getRequestHeader(request, "content-type"); + if (typeof contentType !== "string" || !isApplicationJsonRE.test(contentType)) { + return handleResponse( + JSON.stringify({ + error: `Unsupported "Content-Type" header value. Must be "application/json"` + }), + 415, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + const missingHeaders = WEBHOOK_HEADERS.filter((header) => { + return getRequestHeader(request, header) == void 0; + }).join(", "); + if (missingHeaders) { + return handleResponse( + JSON.stringify({ + error: `Required headers missing: ${missingHeaders}` + }), + 400, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + const eventName = getRequestHeader( + request, + "x-github-event" + ); + const signature = getRequestHeader(request, "x-hub-signature-256"); + const id = getRequestHeader(request, "x-github-delivery"); + options2.log.debug(`${eventName} event received (id: ${id})`); + let didTimeout = false; + let timeout; + const timeoutPromise = new Promise((resolve) => { + timeout = setTimeout(() => { + didTimeout = true; + resolve( + handleResponse( + "still processing\n", + 202, + { + "Content-Type": "text/plain", + accept: "application/json" + }, + response + ) + ); + }, options2.timeout); + }); + const processWebhook = async () => { + try { + const payload = await getPayload(request); + await webhooks.verifyAndReceive({ + id, + name: eventName, + payload, + signature + }); + clearTimeout(timeout); + if (didTimeout) return handleResponse(null); + return handleResponse( + "ok\n", + 200, + { + "content-type": "text/plain", + accept: "application/json" + }, + response + ); + } catch (error) { + clearTimeout(timeout); + if (didTimeout) return handleResponse(null); + const err = Array.from(error.errors)[0]; + const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; + const statusCode = typeof err.status !== "undefined" ? err.status : 500; + options2.log.error(error); + return handleResponse( + JSON.stringify({ + error: errorMessage + }), + statusCode, + { + "content-type": "application/json", + accept: "application/json" + }, + response + ); + } + }; + return await Promise.race([timeoutPromise, processWebhook()]); + }; + }; +} +export { + createMiddleware +}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js deleted file mode 100644 index 83aa6c829..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js +++ /dev/null @@ -1,11 +0,0 @@ -const WEBHOOK_HEADERS = [ - "x-github-event", - "x-hub-signature-256", - "x-github-delivery" -]; -function getMissingHeaders(request) { - return WEBHOOK_HEADERS.filter((header) => !(header in request.headers)); -} -export { - getMissingHeaders -}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js index b2d823431..901b3c7e3 100644 --- a/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js +++ b/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js @@ -1,29 +1,30 @@ -function getPayload(request) { - if (typeof request.body === "object" && "rawBody" in request && request.rawBody instanceof Buffer) { - return Promise.resolve(request.rawBody.toString("utf8")); +import { concatUint8Array } from "../../concat-uint8array.js"; +const textDecoder = new TextDecoder("utf-8", { fatal: false }); +const decode = textDecoder.decode.bind(textDecoder); +async function getPayload(request) { + if (typeof request.body === "object" && "rawBody" in request && request.rawBody instanceof Uint8Array) { + return decode(request.rawBody); } else if (typeof request.body === "string") { - return Promise.resolve(request.body); + return request.body; } + const payload = await getPayloadFromRequestStream(request); + return decode(payload); +} +function getPayloadFromRequestStream(request) { return new Promise((resolve, reject) => { let data = []; request.on( "error", (error) => reject(new AggregateError([error], error.message)) ); - request.on("data", (chunk) => data.push(chunk)); - request.on( - "end", - () => ( - // setImmediate improves the throughput by reducing the pressure from - // the event loop - setImmediate( - resolve, - data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") - ) - ) - ); + request.on("data", data.push.bind(data)); + request.on("end", () => { + const result = concatUint8Array(data); + queueMicrotask(() => resolve(result)); + }); }); } export { - getPayload + getPayload, + getPayloadFromRequestStream }; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/get-request-header.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/get-request-header.js new file mode 100644 index 000000000..f6d7ac0c3 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/middleware/node/get-request-header.js @@ -0,0 +1,6 @@ +function getRequestHeader(request, key) { + return request.headers[key]; +} +export { + getRequestHeader +}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/handle-response.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/handle-response.js new file mode 100644 index 000000000..3b6b8c751 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/middleware/node/handle-response.js @@ -0,0 +1,11 @@ +function handleResponse(body, status = 200, headers = {}, response) { + if (body === null) { + return false; + } + headers["content-length"] = body.length.toString(); + response.writeHead(status, headers).end(body); + return true; +} +export { + handleResponse +}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js index 990199168..9d2133dbe 100644 --- a/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js +++ b/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js @@ -1,12 +1,21 @@ -import { createLogger } from "../../createLogger.js"; -import { middleware } from "./middleware.js"; +import { createLogger } from "../../create-logger.js"; +import { createMiddleware } from "../create-middleware.js"; +import { handleResponse } from "./handle-response.js"; +import { getRequestHeader } from "./get-request-header.js"; +import { getPayload } from "./get-payload.js"; function createNodeMiddleware(webhooks, { path = "/api/github/webhooks", - log = createLogger() + log = createLogger(), + timeout = 9e3 } = {}) { - return middleware.bind(null, webhooks, { + return createMiddleware({ + handleResponse, + getRequestHeader, + getPayload + })(webhooks, { path, - log + log, + timeout }); } export { diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js deleted file mode 100644 index 13ff93242..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js +++ /dev/null @@ -1,89 +0,0 @@ -import { getMissingHeaders } from "./get-missing-headers.js"; -import { getPayload } from "./get-payload.js"; -import { onUnhandledRequestDefault } from "./on-unhandled-request-default.js"; -async function middleware(webhooks, options, request, response, next) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - response.writeHead(422, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }) - ); - return true; - } - if (pathname !== options.path) { - next?.(); - return false; - } else if (request.method !== "POST") { - onUnhandledRequestDefault(request, response); - return true; - } - if (!request.headers["content-type"] || !request.headers["content-type"].startsWith("application/json")) { - response.writeHead(415, { - "content-type": "application/json", - accept: "application/json" - }); - response.end( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }) - ); - return true; - } - const missingHeaders = getMissingHeaders(request).join(", "); - if (missingHeaders) { - response.writeHead(400, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }) - ); - return true; - } - const eventName = request.headers["x-github-event"]; - const signatureSHA256 = request.headers["x-hub-signature-256"]; - const id = request.headers["x-github-delivery"]; - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - const timeout = setTimeout(() => { - didTimeout = true; - response.statusCode = 202; - response.end("still processing\n"); - }, 9e3).unref(); - try { - const payload = await getPayload(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) return true; - response.end("ok\n"); - return true; - } catch (error) { - clearTimeout(timeout); - if (didTimeout) return true; - const err = Array.from(error.errors)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - response.statusCode = typeof err.status !== "undefined" ? err.status : 500; - options.log.error(error); - response.end( - JSON.stringify({ - error: errorMessage - }) - ); - return true; - } -} -export { - middleware -}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js b/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js deleted file mode 100644 index 73e4c8432..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js +++ /dev/null @@ -1,13 +0,0 @@ -function onUnhandledRequestDefault(request, response) { - response.writeHead(404, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - ); -} -export { - onUnhandledRequestDefault -}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/get-missing-headers.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/get-missing-headers.js deleted file mode 100644 index b4f7da3c9..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/web/get-missing-headers.js +++ /dev/null @@ -1,11 +0,0 @@ -const WEBHOOK_HEADERS = [ - "x-github-event", - "x-hub-signature-256", - "x-github-delivery" -]; -function getMissingHeaders(request) { - return WEBHOOK_HEADERS.filter((header) => !request.headers.has(header)); -} -export { - getMissingHeaders -}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/get-request-header.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/get-request-header.js new file mode 100644 index 000000000..5bfc500f3 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/middleware/web/get-request-header.js @@ -0,0 +1,6 @@ +function getRequestHeader(request, key) { + return request.headers.get(key); +} +export { + getRequestHeader +}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/handle-response.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/handle-response.js new file mode 100644 index 000000000..a18ee1db7 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-src/middleware/web/handle-response.js @@ -0,0 +1,12 @@ +function handleResponse(body, status = 200, headers = {}) { + if (body !== null) { + headers["content-length"] = body.length.toString(); + } + return new Response(body, { + status, + headers + }); +} +export { + handleResponse +}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/index.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/index.js index 585c687eb..3a8adc5cf 100644 --- a/node_modules/@octokit/webhooks/dist-src/middleware/web/index.js +++ b/node_modules/@octokit/webhooks/dist-src/middleware/web/index.js @@ -1,12 +1,21 @@ -import { createLogger } from "../../createLogger.js"; -import { middleware } from "./middleware.js"; +import { createLogger } from "../../create-logger.js"; +import { createMiddleware } from "../create-middleware.js"; +import { getPayload } from "./get-payload.js"; +import { getRequestHeader } from "./get-request-header.js"; +import { handleResponse } from "./handle-response.js"; function createWebMiddleware(webhooks, { path = "/api/github/webhooks", - log = createLogger() + log = createLogger(), + timeout = 9e3 } = {}) { - return middleware.bind(null, webhooks, { + return createMiddleware({ + handleResponse, + getRequestHeader, + getPayload + })(webhooks, { path, - log + log, + timeout }); } export { diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/middleware.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/middleware.js deleted file mode 100644 index d6b45cb31..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/web/middleware.js +++ /dev/null @@ -1,103 +0,0 @@ -import { getMissingHeaders } from "./get-missing-headers.js"; -import { getPayload } from "./get-payload.js"; -import { onUnhandledRequestDefault } from "./on-unhandled-request-default.js"; -async function middleware(webhooks, options, request) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - return new Response( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }), - { - status: 422, - headers: { - "content-type": "application/json" - } - } - ); - } - if (pathname !== options.path || request.method !== "POST") { - return onUnhandledRequestDefault(request); - } - if (typeof request.headers.get("content-type") !== "string" || !request.headers.get("content-type").startsWith("application/json")) { - return new Response( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }), - { - status: 415, - headers: { - "content-type": "application/json" - } - } - ); - } - const missingHeaders = getMissingHeaders(request).join(", "); - if (missingHeaders) { - return new Response( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }), - { - status: 422, - headers: { - "content-type": "application/json" - } - } - ); - } - const eventName = request.headers.get("x-github-event"); - const signatureSHA256 = request.headers.get("x-hub-signature-256"); - const id = request.headers.get("x-github-delivery"); - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - let timeout; - const timeoutPromise = new Promise((resolve) => { - timeout = setTimeout(() => { - didTimeout = true; - resolve( - new Response("still processing\n", { - status: 202, - headers: { "Content-Type": "text/plain" } - }) - ); - }, 9e3).unref(); - }); - const processWebhook = async () => { - try { - const payload = await getPayload(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) return new Response(null); - return new Response("ok\n"); - } catch (error) { - clearTimeout(timeout); - if (didTimeout) return new Response(null); - const err = Array.from(error.errors)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - options.log.error(error); - return new Response( - JSON.stringify({ - error: errorMessage - }), - { - status: typeof err.status !== "undefined" ? err.status : 500, - headers: { - "content-type": "application/json" - } - } - ); - } - }; - return await Promise.race([timeoutPromise, processWebhook()]); -} -export { - middleware -}; diff --git a/node_modules/@octokit/webhooks/dist-src/middleware/web/on-unhandled-request-default.js b/node_modules/@octokit/webhooks/dist-src/middleware/web/on-unhandled-request-default.js deleted file mode 100644 index 546befbd2..000000000 --- a/node_modules/@octokit/webhooks/dist-src/middleware/web/on-unhandled-request-default.js +++ /dev/null @@ -1,16 +0,0 @@ -function onUnhandledRequestDefault(request) { - return new Response( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }), - { - status: 404, - headers: { - "content-type": "application/json" - } - } - ); -} -export { - onUnhandledRequestDefault -}; diff --git a/node_modules/@octokit/webhooks/dist-types/concat-uint8array.d.ts b/node_modules/@octokit/webhooks/dist-types/concat-uint8array.d.ts new file mode 100644 index 000000000..7c70b9beb --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/concat-uint8array.d.ts @@ -0,0 +1 @@ +export declare function concatUint8Array(data: Uint8Array[]): Uint8Array; diff --git a/node_modules/@octokit/webhooks/dist-types/createLogger.d.ts b/node_modules/@octokit/webhooks/dist-types/create-logger.d.ts similarity index 100% rename from node_modules/@octokit/webhooks/dist-types/createLogger.d.ts rename to node_modules/@octokit/webhooks/dist-types/create-logger.d.ts diff --git a/node_modules/@octokit/webhooks/dist-types/event-handler/index.d.ts b/node_modules/@octokit/webhooks/dist-types/event-handler/index.d.ts index 2c60be3bc..a25140616 100644 --- a/node_modules/@octokit/webhooks/dist-types/event-handler/index.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/event-handler/index.d.ts @@ -1,4 +1,4 @@ -import type { EmitterWebhookEvent, EmitterWebhookEventName, HandlerFunction, Options, WebhookError, WebhookEventHandlerError } from "../types.js"; +import type { EmitterWebhookEvent, EmitterWebhookEventName, HandlerFunction, Options, WebhookError, WebhookEventHandlerError } from "../types.ts"; export interface EventHandler { on(event: E | E[], callback: HandlerFunction): void; onAny(handler: (event: TTransformed extends unknown ? EmitterWebhookEvent : EmitterWebhookEvent & TTransformed) => any): void; diff --git a/node_modules/@octokit/webhooks/dist-types/event-handler/on.d.ts b/node_modules/@octokit/webhooks/dist-types/event-handler/on.d.ts index 19cd06137..ac4df4be3 100644 --- a/node_modules/@octokit/webhooks/dist-types/event-handler/on.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/event-handler/on.d.ts @@ -1,4 +1,4 @@ -import type { EmitterWebhookEvent, EmitterWebhookEventName, State, WebhookEventHandlerError } from "../types.js"; +import type { EmitterWebhookEvent, EmitterWebhookEventName, State, WebhookEventHandlerError } from "../types.ts"; export declare function receiverOn(state: State, webhookNameOrNames: EmitterWebhookEventName | EmitterWebhookEventName[], handler: Function): void; export declare function receiverOnAny(state: State, handler: (event: TTransformed extends unknown ? EmitterWebhookEvent : EmitterWebhookEvent & TTransformed) => any): void; export declare function receiverOnError(state: State, handler: (event: WebhookEventHandlerError) => any): void; diff --git a/node_modules/@octokit/webhooks/dist-types/event-handler/receive.d.ts b/node_modules/@octokit/webhooks/dist-types/event-handler/receive.d.ts index 14cc05cc2..2e661bbf8 100644 --- a/node_modules/@octokit/webhooks/dist-types/event-handler/receive.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/event-handler/receive.d.ts @@ -1,2 +1,2 @@ -import type { EmitterWebhookEvent, State, WebhookError } from "../types.js"; +import type { EmitterWebhookEvent, State, WebhookError } from "../types.ts"; export declare function receiverHandle(state: State, event: EmitterWebhookEvent | WebhookError): Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/event-handler/remove-listener.d.ts b/node_modules/@octokit/webhooks/dist-types/event-handler/remove-listener.d.ts index e9140bf44..b337e17c1 100644 --- a/node_modules/@octokit/webhooks/dist-types/event-handler/remove-listener.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/event-handler/remove-listener.d.ts @@ -1,2 +1,2 @@ -import type { EmitterWebhookEventName, State } from "../types.js"; +import type { EmitterWebhookEventName, State } from "../types.ts"; export declare function removeListener(state: State, webhookNameOrNames: "*" | EmitterWebhookEventName | EmitterWebhookEventName[], handler: Function): void; diff --git a/node_modules/@octokit/webhooks/dist-types/generated/webhook-identifiers.d.ts b/node_modules/@octokit/webhooks/dist-types/generated/webhook-identifiers.d.ts index bfc816455..dd7e8cba5 100644 --- a/node_modules/@octokit/webhooks/dist-types/generated/webhook-identifiers.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/generated/webhook-identifiers.d.ts @@ -1,4 +1,4 @@ -import type { WebhookEventDefinition } from "../types.js"; +import type { WebhookEventDefinition } from "../types.ts"; export type EventPayloadMap = { branch_protection_configuration: WebhookEventDefinition<"branch-protection-configuration-disabled"> | WebhookEventDefinition<"branch-protection-configuration-enabled">; branch_protection_rule: WebhookEventDefinition<"branch-protection-rule-created"> | WebhookEventDefinition<"branch-protection-rule-deleted"> | WebhookEventDefinition<"branch-protection-rule-edited">; diff --git a/node_modules/@octokit/webhooks/dist-types/index.d.ts b/node_modules/@octokit/webhooks/dist-types/index.d.ts index 2bd49df78..21140ef77 100644 --- a/node_modules/@octokit/webhooks/dist-types/index.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/index.d.ts @@ -1,8 +1,8 @@ -import { createEventHandler } from "./event-handler/index.js"; -import type { EmitterWebhookEvent, EmitterWebhookEventName, HandlerFunction, RemoveHandlerFunction, Options, WebhookError, WebhookEventHandlerError, EmitterWebhookEventWithStringPayloadAndSignature } from "./types.js"; -export { createNodeMiddleware } from "./middleware/node/index.js"; -export { createWebMiddleware } from "./middleware/web/index.js"; -export { emitterEventNames } from "./generated/webhook-names.js"; +import { createEventHandler } from "./event-handler/index.ts"; +import type { EmitterWebhookEvent, EmitterWebhookEventName, HandlerFunction, RemoveHandlerFunction, Options, WebhookError, WebhookEventHandlerError, EmitterWebhookEventWithStringPayloadAndSignature } from "./types.ts"; +export { createNodeMiddleware } from "./middleware/node/index.ts"; +export { createWebMiddleware } from "./middleware/web/index.ts"; +export { emitterEventNames } from "./generated/webhook-names.ts"; declare class Webhooks { sign: (payload: string) => Promise; verify: (eventPayload: string, signature: string) => Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/create-middleware.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/create-middleware.d.ts new file mode 100644 index 000000000..79ca95cc2 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/middleware/create-middleware.d.ts @@ -0,0 +1,11 @@ +import type { Webhooks } from "../index.ts"; +import type { MiddlewareOptions } from "./types.ts"; +type CreateMiddlewareOptions = { + handleResponse: (body: string | null, status?: number, headers?: Record, response?: any) => any; + getPayload: (request: Request) => Promise; + getRequestHeader: (request: Request, key: string) => T; +}; +type IncomingMessage = any; +type ServerResponse = any; +export declare function createMiddleware(options: CreateMiddlewareOptions): (webhooks: Webhooks, options: Required) => (request: IncomingMessage, response?: ServerResponse, next?: Function) => Promise; +export {}; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/get-missing-headers.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/get-missing-headers.d.ts deleted file mode 100644 index b3042ae1b..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/node/get-missing-headers.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -type IncomingMessage = any; -export declare function getMissingHeaders(request: IncomingMessage): string[]; -export {}; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/get-payload.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/get-payload.d.ts index 5519f645a..b0f1b1f8d 100644 --- a/node_modules/@octokit/webhooks/dist-types/middleware/node/get-payload.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/middleware/node/get-payload.d.ts @@ -1,3 +1,4 @@ type IncomingMessage = any; export declare function getPayload(request: IncomingMessage): Promise; +export declare function getPayloadFromRequestStream(request: IncomingMessage): Promise; export {}; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/get-request-header.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/get-request-header.d.ts new file mode 100644 index 000000000..357f26a32 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/middleware/node/get-request-header.d.ts @@ -0,0 +1 @@ +export declare function getRequestHeader(request: any, key: string): T; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/handle-response.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/handle-response.d.ts new file mode 100644 index 000000000..74772d241 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/middleware/node/handle-response.d.ts @@ -0,0 +1 @@ +export declare function handleResponse(body: string | null, status?: number, headers?: Record, response?: any): boolean; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/index.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/index.d.ts index b453a5181..71d960d09 100644 --- a/node_modules/@octokit/webhooks/dist-types/middleware/node/index.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/middleware/node/index.d.ts @@ -1,3 +1,3 @@ -import type { Webhooks } from "../../index.js"; -import type { MiddlewareOptions } from "../types.js"; -export declare function createNodeMiddleware(webhooks: Webhooks, { path, log, }?: MiddlewareOptions): (request: import("http").IncomingMessage, response: import("http").ServerResponse, next?: Function | undefined) => Promise; +import type { Webhooks } from "../../index.ts"; +import type { MiddlewareOptions } from "../types.ts"; +export declare function createNodeMiddleware(webhooks: Webhooks, { path, log, timeout, }?: MiddlewareOptions): (request: any, response?: any, next?: Function) => Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/middleware.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/middleware.d.ts deleted file mode 100644 index 93f82ca18..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/node/middleware.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { IncomingMessage, ServerResponse } from "node:http"; -import type { Webhooks } from "../../index.js"; -import type { MiddlewareOptions } from "../types.js"; -export declare function middleware(webhooks: Webhooks, options: Required, request: IncomingMessage, response: ServerResponse, next?: Function): Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/node/on-unhandled-request-default.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/node/on-unhandled-request-default.d.ts deleted file mode 100644 index 3895815cb..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/node/on-unhandled-request-default.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -type IncomingMessage = any; -type ServerResponse = any; -export declare function onUnhandledRequestDefault(request: IncomingMessage, response: ServerResponse): void; -export {}; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/types.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/types.d.ts index ff127a7d4..ee78a1ab1 100644 --- a/node_modules/@octokit/webhooks/dist-types/middleware/types.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/middleware/types.d.ts @@ -1,5 +1,6 @@ -import type { Logger } from "../createLogger.js"; +import type { Logger } from "../create-logger.ts"; export type MiddlewareOptions = { + timeout?: number; path?: string; log?: Logger; }; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/get-missing-headers.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/get-missing-headers.d.ts deleted file mode 100644 index d84af4145..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/web/get-missing-headers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getMissingHeaders(request: Request): string[]; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/get-request-header.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/get-request-header.d.ts new file mode 100644 index 000000000..2acd57d49 --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/middleware/web/get-request-header.d.ts @@ -0,0 +1 @@ +export declare function getRequestHeader(request: Request, key: string): T; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/handle-response.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/handle-response.d.ts new file mode 100644 index 000000000..e268998ba --- /dev/null +++ b/node_modules/@octokit/webhooks/dist-types/middleware/web/handle-response.d.ts @@ -0,0 +1 @@ +export declare function handleResponse(body: string | null, status?: number, headers?: Record): import("undici-types").Response; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/index.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/index.d.ts index 280fed12f..0c195f53e 100644 --- a/node_modules/@octokit/webhooks/dist-types/middleware/web/index.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/middleware/web/index.d.ts @@ -1,3 +1,3 @@ -import type { Webhooks } from "../../index.js"; -import type { MiddlewareOptions } from "../types.js"; -export declare function createWebMiddleware(webhooks: Webhooks, { path, log, }?: MiddlewareOptions): (request: Request) => Promise; +import type { Webhooks } from "../../index.ts"; +import type { MiddlewareOptions } from "../types.ts"; +export declare function createWebMiddleware(webhooks: Webhooks, { path, log, timeout, }?: MiddlewareOptions): (request: any, response?: any, next?: Function) => Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/middleware.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/middleware.d.ts deleted file mode 100644 index c44589a12..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/web/middleware.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Webhooks } from "../../index.js"; -import type { MiddlewareOptions } from "../types.js"; -export declare function middleware(webhooks: Webhooks, options: Required, request: Request): Promise; diff --git a/node_modules/@octokit/webhooks/dist-types/middleware/web/on-unhandled-request-default.d.ts b/node_modules/@octokit/webhooks/dist-types/middleware/web/on-unhandled-request-default.d.ts deleted file mode 100644 index cb7cac9ea..000000000 --- a/node_modules/@octokit/webhooks/dist-types/middleware/web/on-unhandled-request-default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function onUnhandledRequestDefault(request: Request): import("undici-types").Response; diff --git a/node_modules/@octokit/webhooks/dist-types/types.d.ts b/node_modules/@octokit/webhooks/dist-types/types.d.ts index 1e1b95a00..366bee051 100644 --- a/node_modules/@octokit/webhooks/dist-types/types.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/types.d.ts @@ -1,9 +1,9 @@ import type { RequestError } from "@octokit/request-error"; import type { webhooks as OpenAPIWebhooks } from "@octokit/openapi-webhooks-types"; -import type { EventPayloadMap } from "./generated/webhook-identifiers.js"; -import type { Logger } from "./createLogger.js"; -import type { EventHandler } from "./event-handler/index.js"; -import type { emitterEventNames } from "./generated/webhook-names.js"; +import type { EventPayloadMap } from "./generated/webhook-identifiers.ts"; +import type { Logger } from "./create-logger.ts"; +import type { EventHandler } from "./event-handler/index.ts"; +import type { emitterEventNames } from "./generated/webhook-names.ts"; export type WebhookEventName = keyof EventPayloadMap; export type ExtractEvents = TEventName extends `${infer _TWebhookEvent}.${infer _TAction}` ? never : TEventName; export type WebhookEvents = ExtractEvents; diff --git a/node_modules/@octokit/webhooks/dist-types/verify-and-receive.d.ts b/node_modules/@octokit/webhooks/dist-types/verify-and-receive.d.ts index 1d883457d..892ea64f0 100644 --- a/node_modules/@octokit/webhooks/dist-types/verify-and-receive.d.ts +++ b/node_modules/@octokit/webhooks/dist-types/verify-and-receive.d.ts @@ -1,5 +1,5 @@ -import type { EmitterWebhookEventWithStringPayloadAndSignature, State } from "./types.js"; -import type { EventHandler } from "./event-handler/index.js"; +import type { EmitterWebhookEventWithStringPayloadAndSignature, State } from "./types.ts"; +import type { EventHandler } from "./event-handler/index.ts"; export declare function verifyAndReceive(state: State & { secret: string; eventHandler: EventHandler; diff --git a/node_modules/@octokit/webhooks/package.json b/node_modules/@octokit/webhooks/package.json index 78fb04868..fa4b87b3b 100644 --- a/node_modules/@octokit/webhooks/package.json +++ b/node_modules/@octokit/webhooks/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/webhooks", - "version": "13.8.0", + "version": "14.0.0", "description": "GitHub webhook events toolset for Node.js", "keywords": [], "repository": "github:octokit/webhooks.js", @@ -8,18 +8,19 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "type": "module", "dependencies": { - "@octokit/openapi-webhooks-types": "10.4.0", - "@octokit/request-error": "^6.1.7", - "@octokit/webhooks-methods": "^5.1.1" + "@octokit/openapi-webhooks-types": "11.0.0", + "@octokit/request-error": "^7.0.0", + "@octokit/webhooks-methods": "^6.0.0" }, "devDependencies": { - "@octokit/openapi-webhooks": "10.4.0", + "@octokit/openapi-webhooks": "11.0.0", "@octokit/tsconfig": "^4.0.0", + "@types/express": "^5.0.1", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.25.0", - "express": "^4.17.1", - "glob": "^11.0.0", + "express": "^5.1.0", + "get-port": "^7.1.0", "prettier": "3.5.3", "prettier-plugin-packagejson": "^2.2.9", "tsx": "^4.19.3", @@ -27,7 +28,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "publishConfig": { "access": "public", diff --git a/node_modules/fast-content-type-parse/.github/dependabot.yml b/node_modules/fast-content-type-parse/.github/dependabot.yml index dfa7fa6cb..35d66ca7a 100644 --- a/node_modules/fast-content-type-parse/.github/dependabot.yml +++ b/node_modules/fast-content-type-parse/.github/dependabot.yml @@ -9,5 +9,5 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "monthly" open-pull-requests-limit: 10 diff --git a/node_modules/fast-content-type-parse/.github/workflows/ci.yml b/node_modules/fast-content-type-parse/.github/workflows/ci.yml index d2c109e17..f9fae55f7 100644 --- a/node_modules/fast-content-type-parse/.github/workflows/ci.yml +++ b/node_modules/fast-content-type-parse/.github/workflows/ci.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - master - next - 'v*' paths-ignore: @@ -17,8 +16,10 @@ on: jobs: test: + permissions: + contents: write + pull-requests: write uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5 with: license-check: true lint: true - node-versions: '["16", "18", "20", "22"]' diff --git a/node_modules/fast-content-type-parse/.github/workflows/package-manager-ci.yml b/node_modules/fast-content-type-parse/.github/workflows/package-manager-ci.yml index 1ea2c6d8e..c6d598e9b 100644 --- a/node_modules/fast-content-type-parse/.github/workflows/package-manager-ci.yml +++ b/node_modules/fast-content-type-parse/.github/workflows/package-manager-ci.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - master - next - 'v*' paths-ignore: @@ -17,4 +16,6 @@ on: jobs: test: + permissions: + contents: read uses: fastify/workflows/.github/workflows/plugins-ci-package-manager.yml@v5 diff --git a/node_modules/fast-content-type-parse/README.md b/node_modules/fast-content-type-parse/README.md index 0a4eaaa0a..e613e0eb1 100644 --- a/node_modules/fast-content-type-parse/README.md +++ b/node_modules/fast-content-type-parse/README.md @@ -4,7 +4,7 @@ [![NPM version](https://img.shields.io/npm/v/fast-content-type-parse.svg?style=flat)](https://www.npmjs.com/package/fast-content-type-parse) [![NPM downloads](https://img.shields.io/npm/dm/fast-content-type-parse.svg?style=flat)](https://www.npmjs.com/package/fast-content-type-parse) -[![CI](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml) +[![CI](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml) [![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) [![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md) diff --git a/node_modules/fast-content-type-parse/package.json b/node_modules/fast-content-type-parse/package.json index c090df9a5..52c9f9980 100644 --- a/node_modules/fast-content-type-parse/package.json +++ b/node_modules/fast-content-type-parse/package.json @@ -1,6 +1,6 @@ { "name": "fast-content-type-parse", - "version": "2.0.1", + "version": "3.0.0", "description": "Parse HTTP Content-Type header according to RFC 7231", "main": "index.js", "type": "commonjs", @@ -11,7 +11,7 @@ "lint:fix": "eslint --fix", "test": "npm run test:unit && npm run test:typescript", "test:typescript": "tsd", - "test:unit": "tap" + "test:unit": "c8 --100 node --test" }, "keywords": [ "content-type", @@ -61,10 +61,10 @@ "@fastify/pre-commit": "^2.1.0", "benchmark": "^2.1.4", "busboy": "^1.6.0", + "c8": "^10.1.3", "content-type": "^1.0.4", "eslint": "^9.17.0", "neostandard": "^0.12.0", - "tap": "^19.2.5", "tsd": "^0.31.0" }, "pre-commit": [ diff --git a/node_modules/fast-content-type-parse/test/index.test.js b/node_modules/fast-content-type-parse/test/index.test.js index 5c5932be5..ecc314f8b 100644 --- a/node_modules/fast-content-type-parse/test/index.test.js +++ b/node_modules/fast-content-type-parse/test/index.test.js @@ -1,6 +1,6 @@ 'use strict' -const { test } = require('tap') +const { test } = require('node:test') const { parse, safeParse } = require('..') const invalidTypes = [ @@ -17,232 +17,232 @@ const invalidTypes = [ 'text/plain,wrong' ] -test('parse', function (t) { +test('parse', async function (t) { t.plan(13 + invalidTypes.length) - t.test('should parse basic type', function (t) { + await t.test('should parse basic type', function (t) { t.plan(1) const type = parse('text/html') - t.strictSame(type.type, 'text/html') + t.assert.deepStrictEqual(type.type, 'text/html') }) - t.test('should parse with suffix', function (t) { + await t.test('should parse with suffix', function (t) { t.plan(1) const type = parse('image/svg+xml') - t.strictSame(type.type, 'image/svg+xml') + t.assert.deepStrictEqual(type.type, 'image/svg+xml') }) - t.test('should parse basic type with surrounding OWS', function (t) { + await t.test('should parse basic type with surrounding OWS', function (t) { t.plan(1) const type = parse(' text/html ') - t.strictSame(type.type, 'text/html') + t.assert.deepStrictEqual(type.type, 'text/html') }) - t.test('should parse parameters', function (t) { + await t.test('should parse parameters', function (t) { t.plan(2) const type = parse('text/html; charset=utf-8; foo=bar') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'utf-8', foo: 'bar' }) }) - t.test('should parse parameters with extra LWS', function (t) { + await t.test('should parse parameters with extra LWS', function (t) { t.plan(2) const type = parse('text/html ; charset=utf-8 ; foo=bar') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'utf-8', foo: 'bar' }) }) - t.test('should lower-case type', function (t) { + await t.test('should lower-case type', function (t) { t.plan(1) const type = parse('IMAGE/SVG+XML') - t.strictSame(type.type, 'image/svg+xml') + t.assert.deepStrictEqual(type.type, 'image/svg+xml') }) - t.test('should lower-case parameter names', function (t) { + await t.test('should lower-case parameter names', function (t) { t.plan(2) const type = parse('text/html; Charset=UTF-8') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-8' }) }) - t.test('should unquote parameter values', function (t) { + await t.test('should unquote parameter values', function (t) { t.plan(2) const type = parse('text/html; charset="UTF-8"') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-8' }) }) - t.test('should unquote parameter values with escapes', function (t) { + await t.test('should unquote parameter values with escapes', function (t) { t.plan(2) const type = parse('text/html; charset="UT\\F-\\\\\\"8\\""') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-\\"8"' }) }) - t.test('should handle balanced quotes', function (t) { + await t.test('should handle balanced quotes', function (t) { t.plan(2) const type = parse('text/html; param="charset=\\"utf-8\\"; foo=bar"; bar=foo') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { param: 'charset="utf-8"; foo=bar', bar: 'foo' }) }) - invalidTypes.forEach(function (type) { - t.test('should throw on invalid media type ' + type, function (t) { + invalidTypes.forEach(async function (type) { + await t.test('should throw on invalid media type ' + type, function (t) { t.plan(1) - t.throws(parse.bind(null, type), 'invalid media type') + t.assert.throws(parse.bind(null, type), new TypeError('invalid media type')) }) }) - t.test('should throw on invalid parameter format', function (t) { + await t.test('should throw on invalid parameter format', function (t) { t.plan(3) - t.throws(parse.bind(null, 'text/plain; foo="bar'), 'invalid parameter format') - t.throws(parse.bind(null, 'text/plain; profile=http://localhost; foo=bar'), 'invalid parameter format') - t.throws(parse.bind(null, 'text/plain; profile=http://localhost'), 'invalid parameter format') + t.assert.throws(parse.bind(null, 'text/plain; foo="bar'), new TypeError('invalid parameter format')) + t.assert.throws(parse.bind(null, 'text/plain; profile=http://localhost; foo=bar'), new TypeError('invalid parameter format')) + t.assert.throws(parse.bind(null, 'text/plain; profile=http://localhost'), new TypeError('invalid parameter format')) }) - t.test('should require argument', function (t) { + await t.test('should require argument', function (t) { t.plan(1) // @ts-expect-error should reject non-strings - t.throws(parse.bind(null), 'argument header is required and must be a string') + t.assert.throws(parse.bind(null), new TypeError('argument header is required and must be a string')) }) - t.test('should reject non-strings', function (t) { + await t.test('should reject non-strings', function (t) { t.plan(1) // @ts-expect-error should reject non-strings - t.throws(parse.bind(null, 7), 'argument header is required and must be a string') + t.assert.throws(parse.bind(null, 7), new TypeError('argument header is required and must be a string')) }) }) -test('safeParse', function (t) { +test('safeParse', async function (t) { t.plan(13 + invalidTypes.length) - t.test('should safeParse basic type', function (t) { + await t.test('should safeParse basic type', function (t) { t.plan(1) const type = safeParse('text/html') - t.strictSame(type.type, 'text/html') + t.assert.deepStrictEqual(type.type, 'text/html') }) - t.test('should safeParse with suffix', function (t) { + await t.test('should safeParse with suffix', function (t) { t.plan(1) const type = safeParse('image/svg+xml') - t.strictSame(type.type, 'image/svg+xml') + t.assert.deepStrictEqual(type.type, 'image/svg+xml') }) - t.test('should safeParse basic type with surrounding OWS', function (t) { + await t.test('should safeParse basic type with surrounding OWS', function (t) { t.plan(1) const type = safeParse(' text/html ') - t.strictSame(type.type, 'text/html') + t.assert.deepStrictEqual(type.type, 'text/html') }) - t.test('should safeParse parameters', function (t) { + await t.test('should safeParse parameters', function (t) { t.plan(2) const type = safeParse('text/html; charset=utf-8; foo=bar') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'utf-8', foo: 'bar' }) }) - t.test('should safeParse parameters with extra LWS', function (t) { + await t.test('should safeParse parameters with extra LWS', function (t) { t.plan(2) const type = safeParse('text/html ; charset=utf-8 ; foo=bar') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'utf-8', foo: 'bar' }) }) - t.test('should lower-case type', function (t) { + await t.test('should lower-case type', function (t) { t.plan(1) const type = safeParse('IMAGE/SVG+XML') - t.strictSame(type.type, 'image/svg+xml') + t.assert.deepStrictEqual(type.type, 'image/svg+xml') }) - t.test('should lower-case parameter names', function (t) { + await t.test('should lower-case parameter names', function (t) { t.plan(2) const type = safeParse('text/html; Charset=UTF-8') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-8' }) }) - t.test('should unquote parameter values', function (t) { + await t.test('should unquote parameter values', function (t) { t.plan(2) const type = safeParse('text/html; charset="UTF-8"') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-8' }) }) - t.test('should unquote parameter values with escapes', function (t) { + await t.test('should unquote parameter values with escapes', function (t) { t.plan(2) const type = safeParse('text/html; charset="UT\\F-\\\\\\"8\\""') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { charset: 'UTF-\\"8"' }) }) - t.test('should handle balanced quotes', function (t) { + await t.test('should handle balanced quotes', function (t) { t.plan(2) const type = safeParse('text/html; param="charset=\\"utf-8\\"; foo=bar"; bar=foo') - t.strictSame(type.type, 'text/html') - t.same(type.parameters, { + t.assert.deepStrictEqual(type.type, 'text/html') + t.assert.deepEqual(type.parameters, { param: 'charset="utf-8"; foo=bar', bar: 'foo' }) }) - invalidTypes.forEach(function (type) { - t.test('should return dummyContentType on invalid media type ' + type, function (t) { + invalidTypes.forEach(async function (type) { + await t.test('should return dummyContentType on invalid media type ' + type, function (t) { t.plan(2) - t.equal(safeParse(type).type, '') - t.equal(Object.keys(safeParse(type).parameters).length, 0) + t.assert.deepStrictEqual(safeParse(type).type, '') + t.assert.deepStrictEqual(Object.keys(safeParse(type).parameters).length, 0) }) }) - t.test('should return dummyContentType on invalid parameter format', function (t) { + await t.test('should return dummyContentType on invalid parameter format', function (t) { t.plan(6) - t.equal(safeParse('text/plain; foo="bar').type, '') - t.equal(Object.keys(safeParse('text/plain; foo="bar').parameters).length, 0) + t.assert.deepStrictEqual(safeParse('text/plain; foo="bar').type, '') + t.assert.deepStrictEqual(Object.keys(safeParse('text/plain; foo="bar').parameters).length, 0) - t.equal(safeParse('text/plain; profile=http://localhost; foo=bar').type, '') - t.equal(Object.keys(safeParse('text/plain; profile=http://localhost; foo=bar').parameters).length, 0) + t.assert.deepStrictEqual(safeParse('text/plain; profile=http://localhost; foo=bar').type, '') + t.assert.deepStrictEqual(Object.keys(safeParse('text/plain; profile=http://localhost; foo=bar').parameters).length, 0) - t.equal(safeParse('text/plain; profile=http://localhost').type, '') - t.equal(Object.keys(safeParse('text/plain; profile=http://localhost').parameters).length, 0) + t.assert.deepStrictEqual(safeParse('text/plain; profile=http://localhost').type, '') + t.assert.deepStrictEqual(Object.keys(safeParse('text/plain; profile=http://localhost').parameters).length, 0) }) - t.test('should return dummyContentType on missing argument', function (t) { + await t.test('should return dummyContentType on missing argument', function (t) { t.plan(2) // @ts-expect-error should reject non-strings - t.equal(safeParse().type, '') + t.assert.deepStrictEqual(safeParse().type, '') // @ts-expect-error should reject non-strings - t.equal(Object.keys(safeParse().parameters).length, 0) + t.assert.deepStrictEqual(Object.keys(safeParse().parameters).length, 0) }) - t.test('should return dummyContentType on non-strings', function (t) { + await t.test('should return dummyContentType on non-strings', function (t) { t.plan(2) // @ts-expect-error should reject non-strings - t.equal(safeParse(null).type, '') + t.assert.deepStrictEqual(safeParse(null).type, '') // @ts-expect-error should reject non-strings - t.equal(Object.keys(safeParse(null).parameters).length, 0) + t.assert.deepStrictEqual(Object.keys(safeParse(null).parameters).length, 0) }) }) diff --git a/node_modules/octokit/dist-src/version.js b/node_modules/octokit/dist-src/version.js index 998f87bd8..57c666ee5 100644 --- a/node_modules/octokit/dist-src/version.js +++ b/node_modules/octokit/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "4.1.3"; +const VERSION = "5.0.2"; export { VERSION }; diff --git a/node_modules/octokit/dist-types/version.d.ts b/node_modules/octokit/dist-types/version.d.ts index 9cd5cb180..978bf6620 100644 --- a/node_modules/octokit/dist-types/version.d.ts +++ b/node_modules/octokit/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "4.1.3"; +export declare const VERSION = "5.0.2"; diff --git a/node_modules/octokit/node_modules/@octokit/auth-token/package.json b/node_modules/octokit/node_modules/@octokit/auth-token/package.json index c07fa98b5..075fe0725 100644 --- a/node_modules/octokit/node_modules/@octokit/auth-token/package.json +++ b/node_modules/octokit/node_modules/@octokit/auth-token/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.1.2", + "version": "6.0.0", "description": "GitHub API token authentication for browsers and Node.js", "repository": "github:octokit/auth-token.js", "keywords": [ @@ -19,18 +19,17 @@ "devDependencies": { "@octokit/request": "^9.0.0", "@octokit/tsconfig": "^4.0.0", - "@octokit/types": "^13.0.0", + "@octokit/types": "^14.0.0", "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.24.0", - "fetch-mock": "^11.0.0", + "esbuild": "^0.25.0", + "fetch-mock": "^12.0.0", "glob": "^11.0.0", - "prettier": "3.4.2", - "semantic-release": "^24.0.0", + "prettier": "3.5.3", "typescript": "^5.3.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/core/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/core/dist-src/version.js index 2f5d3ab9d..ad9f40dea 100644 --- a/node_modules/octokit/node_modules/@octokit/core/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/core/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "6.1.5"; +const VERSION = "7.0.2"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/octokit/node_modules/@octokit/core/dist-types/index.d.ts index 3f7a1da3e..8275033c3 100644 --- a/node_modules/octokit/node_modules/@octokit/core/dist-types/index.d.ts +++ b/node_modules/octokit/node_modules/@octokit/core/dist-types/index.d.ts @@ -5,7 +5,7 @@ import type { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, U export type { OctokitOptions } from "./types.js"; export declare class Octokit { static VERSION: string; - static defaults>(this: S, defaults: OctokitOptions | Function): S; + static defaults>(this: S, defaults: OctokitOptions | Function): typeof this; static plugins: OctokitPlugin[]; /** * Attach a plugin (or many) to your Octokit instance. @@ -15,7 +15,7 @@ export declare class Octokit { */ static plugin & { plugins: any[]; - }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): typeof this & Constructor>>; constructor(options?: OctokitOptions); request: typeof request; graphql: typeof graphql; diff --git a/node_modules/octokit/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/core/dist-types/version.d.ts index eb205b9a2..d5b16a17a 100644 --- a/node_modules/octokit/node_modules/@octokit/core/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/core/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "6.1.5"; +export declare const VERSION = "7.0.2"; diff --git a/node_modules/octokit/node_modules/@octokit/core/package.json b/node_modules/octokit/node_modules/@octokit/core/package.json index 551668b62..d6e340953 100644 --- a/node_modules/octokit/node_modules/@octokit/core/package.json +++ b/node_modules/octokit/node_modules/@octokit/core/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/core", - "version": "6.1.5", + "version": "7.0.2", "publishConfig": { "access": "public", "provenance": true @@ -18,18 +18,18 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.1", + "@octokit/request": "^10.0.2", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", - "before-after-hook": "^3.0.2", + "before-after-hook": "^4.0.0", "universal-user-agent": "^7.0.0" }, "devDependencies": { - "@octokit/auth-action": "^5.0.0", - "@octokit/auth-app": "^7.0.0", - "@octokit/auth-oauth-app": "^8.0.0", + "@octokit/auth-action": "^6.0.1", + "@octokit/auth-app": "^8.0.0", + "@octokit/auth-oauth-app": "^9.0.0", "@octokit/tsconfig": "^4.0.0", "@sinonjs/fake-timers": "^14.0.0", "@types/lolex": "^5.1.0", @@ -38,17 +38,15 @@ "@vitest/coverage-v8": "^3.0.5", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "glob": "^11.0.0", "prettier": "3.5.3", "proxy": "^2.0.0", - "semantic-release": "^24.0.0", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", - "undici": "^6.0.0", + "undici": "^7.0.0", "vitest": "^3.0.5" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/graphql/dist-src/version.js index 405990a69..19fc42329 100644 --- a/node_modules/octokit/node_modules/@octokit/graphql/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/graphql/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "8.2.2"; +const VERSION = "9.0.1"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts index 590024731..274ce0ed1 100644 --- a/node_modules/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "8.2.2"; +export declare const VERSION = "9.0.1"; diff --git a/node_modules/octokit/node_modules/@octokit/graphql/package.json b/node_modules/octokit/node_modules/@octokit/graphql/package.json index 8e010f302..25f51b153 100644 --- a/node_modules/octokit/node_modules/@octokit/graphql/package.json +++ b/node_modules/octokit/node_modules/@octokit/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/graphql", - "version": "8.2.2", + "version": "9.0.1", "publishConfig": { "access": "public", "provenance": true @@ -17,7 +17,7 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/request": "^9.2.3", + "@octokit/request": "^10.0.2", "@octokit/types": "^14.0.0", "universal-user-agent": "^7.0.0" }, @@ -34,7 +34,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-src/version.js index 3d81afab3..6b5dccdb6 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "5.2.4"; +const VERSION = "6.0.0"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-types/version.d.ts index 21bf93cee..392768e85 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "5.2.4"; +export declare const VERSION = "6.0.0"; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/package.json b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/package.json index 78228a534..0fa2ff190 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/package.json +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-graphql/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "5.2.4", + "version": "6.0.0", "description": "Octokit plugin to paginate GraphQL API endpoint responses", "repository": "github:octokit/plugin-paginate-graphql.js", "keywords": [ @@ -19,24 +19,22 @@ "@octokit/core": ">=6" }, "devDependencies": { - "@octokit/core": "^6.0.0", - "@octokit/plugin-rest-endpoint-methods": "^13.0.0", + "@octokit/core": "^6.1.5", + "@octokit/plugin-rest-endpoint-methods": "^14.0.0", "@octokit/tsconfig": "^4.0.0", - "@types/fetch-mock": "^7.3.1", - "@types/jest": "^29.0.0", - "@types/node": "^20.0.0", - "esbuild": "^0.24.0", - "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "@types/node": "^22.0.0", + "@vitest/coverage-v8": "^3.0.0", + "esbuild": "^0.25.0", + "fetch-mock": "^12.0.0", "glob": "^10.2.6", - "jest": "^29.0.0", - "npm-run-all2": "^6.0.0", - "prettier": "3.3.3", - "semantic-release-plugin-update-version-in-files": "^1.0.0", + "prettier": "3.5.3", + "semantic-release-plugin-update-version-in-files": "^2.0.0", "ts-jest": "^29.0.0", - "typescript": "^5.0.0" + "typescript": "^5.0.0", + "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js index 6a68292cc..5ccbfe76e 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "12.0.0"; +const VERSION = "13.0.1"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts index 2521101be..d8e979a20 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "12.0.0"; +export declare const VERSION = "13.0.1"; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/package.json b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/package.json index c0ce2b9c3..a021601de 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/package.json +++ b/node_modules/octokit/node_modules/@octokit/plugin-paginate-rest/package.json @@ -5,7 +5,7 @@ "provenance": true }, "type": "module", - "version": "12.0.0", + "version": "13.0.1", "description": "Octokit plugin to paginate REST API endpoint responses", "repository": "github:octokit/plugin-paginate-rest.js", "keywords": [ @@ -16,29 +16,29 @@ ], "license": "MIT", "dependencies": { - "@octokit/types": "^14.0.0" + "@octokit/types": "^14.1.0" }, "peerDependencies": { "@octokit/core": ">=6" }, "devDependencies": { - "@octokit/core": "^6.1.5", - "@octokit/plugin-rest-endpoint-methods": "^14.0.0", + "@octokit/core": "^7.0.0", + "@octokit/plugin-rest-endpoint-methods": "^16.0.0", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "github-openapi-graphql-query": "^4.0.0", + "github-openapi-graphql-query": "^5.0.0", "glob": "^11.0.0", - "npm-run-all2": "^7.0.0", + "npm-run-all2": "^8.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js index 025c69365..63b58b130 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "14.0.0"; +const VERSION = "15.0.0"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map index 68b8649bd..c81ae7e21 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +++ b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../src/version.ts"], - "sourcesContent": ["export const VERSION = \"14.0.0\";\n"], + "sourcesContent": ["export const VERSION = \"15.0.0\";\n"], "mappings": "AAAO,MAAM,UAAU;", "names": [] } diff --git a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts index 0b0ffa396..b6e2ac185 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "14.0.0"; +export declare const VERSION = "15.0.0"; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json index 006a42e58..d2e1f8f63 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json +++ b/node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/plugin-rest-endpoint-methods", - "version": "14.0.0", + "version": "15.0.0", "type": "module", "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", "repository": "github:octokit/plugin-rest-endpoint-methods.js", @@ -23,7 +23,7 @@ "camelcase": "^8.0.0", "esbuild": "^0.25.0", "fetch-mock": "^12.0.0", - "github-openapi-graphql-query": "^4.3.1", + "github-openapi-graphql-query": "^5.0.0", "glob": "^11.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", @@ -41,7 +41,7 @@ "provenance": true }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**" diff --git a/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-src/version.js index 4e88e0ecf..37864959b 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "7.2.1"; +const VERSION = "8.0.1"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-types/version.d.ts index 1e15d110f..f90330ad0 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "7.2.1"; +export declare const VERSION = "8.0.1"; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-retry/package.json b/node_modules/octokit/node_modules/@octokit/plugin-retry/package.json index e789c263f..ccf07c82b 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-retry/package.json +++ b/node_modules/octokit/node_modules/@octokit/plugin-retry/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/plugin-retry", - "version": "7.2.1", + "version": "8.0.1", "publishConfig": { "access": "public", "provenance": true @@ -11,15 +11,15 @@ "author": "Simon Grondin (http://github.com/SGrondin)", "license": "MIT", "dependencies": { - "@octokit/request-error": "^6.1.8", + "@octokit/request-error": "^7.0.0", "@octokit/types": "^14.0.0", "bottleneck": "^2.15.3" }, "peerDependencies": { - "@octokit/core": ">=6" + "@octokit/core": ">=7" }, "devDependencies": { - "@octokit/core": "^6.1.5", + "@octokit/core": "^7.0.0", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", @@ -32,7 +32,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-src/version.js b/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-src/version.js index e17e8e096..a4ac6ab2a 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-src/version.js +++ b/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-src/version.js @@ -1,4 +1,4 @@ -const VERSION = "10.0.0"; +const VERSION = "11.0.1"; export { VERSION }; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts b/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts index 05f704714..6d65805e4 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts +++ b/node_modules/octokit/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts @@ -1 +1 @@ -export declare const VERSION = "10.0.0"; +export declare const VERSION = "11.0.1"; diff --git a/node_modules/octokit/node_modules/@octokit/plugin-throttling/package.json b/node_modules/octokit/node_modules/@octokit/plugin-throttling/package.json index 94b35cb94..7e8e22fa8 100644 --- a/node_modules/octokit/node_modules/@octokit/plugin-throttling/package.json +++ b/node_modules/octokit/node_modules/@octokit/plugin-throttling/package.json @@ -1,6 +1,6 @@ { "name": "@octokit/plugin-throttling", - "version": "10.0.0", + "version": "11.0.1", "publishConfig": { "access": "public", "provenance": true @@ -15,26 +15,26 @@ "bottleneck": "^2.15.3" }, "peerDependencies": { - "@octokit/core": "^6.1.3" + "@octokit/core": "^7.0.0" }, "devDependencies": { - "@octokit/auth-app": "^7.2.0", - "@octokit/core": "^6.1.3", - "@octokit/request-error": "^6.1.6", + "@octokit/auth-app": "^8.0.0", + "@octokit/core": "^7.0.0", + "@octokit/request-error": "^7.0.0", "@octokit/tsconfig": "^4.0.0", "@types/node": "^22.0.0", "@vitest/coverage-v8": "^3.0.0", "esbuild": "^0.25.0", - "github-openapi-graphql-query": "^4.0.0", + "github-openapi-graphql-query": "^5.0.0", "glob": "^11.0.0", - "npm-run-all2": "^7.0.0", + "npm-run-all2": "^8.0.0", "prettier": "3.5.3", "semantic-release-plugin-update-version-in-files": "^2.0.0", "typescript": "^5.0.0", "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "files": [ "dist-*/**", diff --git a/node_modules/octokit/node_modules/before-after-hook/package.json b/node_modules/octokit/node_modules/before-after-hook/package.json index f23f655db..07bf873e2 100644 --- a/node_modules/octokit/node_modules/before-after-hook/package.json +++ b/node_modules/octokit/node_modules/before-after-hook/package.json @@ -1,7 +1,7 @@ { "name": "before-after-hook", "type": "module", - "version": "3.0.2", + "version": "4.0.0", "description": "asynchronous before/error/after hooks for internal functionality", "exports": "./index.js", "types": "./index.d.ts", @@ -12,12 +12,12 @@ ], "scripts": { "test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", - "test:code": "c8 --100 ava test/*.test.js", + "test:code": "c8 --100 --clean node --test", + "test:deno": "deno test --no-check", "test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", "test:tsd": "tsd", - "lint": "prettier --check \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \".github/**/*.yml\"", - "coverage": "c8 report --reporter html", + "lint": "prettier --check \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", + "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \"test//*.{js,json,ts,md}\" \".github/**/*.yml\"", "postcoverage": "open-cli coverage/index.html" }, "repository": "github:gr2m/before-after-hook", @@ -29,10 +29,9 @@ "author": "Gregor Martynus", "license": "Apache-2.0", "devDependencies": { - "ava": "^4.3.3", - "c8": "^7.12.0", + "@types/node": "^22.15.17", + "c8": "^10.1.3", "prettier": "^2.0.0", - "sinon": "^14.0.1", "tsd": "^0.24.1", "typescript": "^4.8.4" }, diff --git a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/release.yml b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/release.yml index 1f75564eb..a74184d8e 100644 --- a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/release.yml +++ b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -"on": +on: push: branches: - master @@ -8,6 +8,11 @@ name: Release - "*.x" jobs: release: + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance name: release runs-on: ubuntu-latest steps: diff --git a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/test.yml b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/test.yml index 439cb0ef3..c9efe52f8 100644 --- a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/test.yml +++ b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/test.yml @@ -7,9 +7,30 @@ on: types: - opened - synchronize + - reopened jobs: - test_matrix: + test-deno: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x # Run with latest stable Deno. + - run: deno install + - run: deno test + + test-bun: + runs-on: ubuntu-latest + needs: test-node + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun test + + test-node: runs-on: ubuntu-latest strategy: matrix: @@ -17,20 +38,27 @@ jobs: - 12 - 14 - 16 + - 18 + - 20 + - 22 + - 24 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} - uses: uses: actions/setup-node@v3 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - - run: npm run test:code + - run: npm run test:node - test: + test-types: runs-on: ubuntu-latest - needs: test_matrix + needs: + - test-node + - test-deno + - test-bun steps: - uses: actions/checkout@v2 - run: npm ci diff --git a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml index d740d657e..6b246c0f2 100644 --- a/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml +++ b/node_modules/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -1,5 +1,5 @@ name: Update Prettier -"on": +on: push: branches: - renovate/prettier-* diff --git a/node_modules/octokit/node_modules/universal-user-agent/SECURITY.md b/node_modules/octokit/node_modules/universal-user-agent/SECURITY.md new file mode 100644 index 000000000..da9c516dd --- /dev/null +++ b/node_modules/octokit/node_modules/universal-user-agent/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/octokit/node_modules/universal-user-agent/index.test.js b/node_modules/octokit/node_modules/universal-user-agent/index.test.js new file mode 100644 index 000000000..2629862ad --- /dev/null +++ b/node_modules/octokit/node_modules/universal-user-agent/index.test.js @@ -0,0 +1,40 @@ +import { getUserAgent } from "./index.js"; + +if (getUserAgent instanceof Function === false) { + throw new Error("getUserAgent is not a function"); +} + +if (typeof getUserAgent() !== "string") { + throw new Error("getUserAgent does not return a string"); +} + +if ("Deno" in globalThis) { + if (/Deno\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Deno" + ); + } +} else if ("Bun" in globalThis) { + if (/Bun\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Bun" + ); + } +} else { + if (/Node\.js\//.test(getUserAgent()) === false) { + throw new Error( + "getUserAgent does not return the correct user agent for Node.js" + ); + } +} + +delete globalThis.navigator; +delete globalThis.process; + +if (getUserAgent() !== "") { + throw new Error( + "getUserAgent does not return the correct user agent for undetectable environment" + ); +} + +console.info("getUserAgent test passed"); diff --git a/node_modules/octokit/node_modules/universal-user-agent/package.json b/node_modules/octokit/node_modules/universal-user-agent/package.json index 0386f7528..9a886f60e 100644 --- a/node_modules/octokit/node_modules/universal-user-agent/package.json +++ b/node_modules/octokit/node_modules/universal-user-agent/package.json @@ -1,6 +1,6 @@ { "name": "universal-user-agent", - "version": "7.0.2", + "version": "7.0.3", "type": "module", "description": "Get a user agent string across all JavaScript Runtime Environments", "exports": "./index.js", @@ -12,12 +12,17 @@ "scripts": { "lint": "prettier --check '*.{js,json,md}'", "lint:fix": "prettier --write '*.{js,json,md}'", - "test": "npm run test:code && npm run test:types", - "test:code": "node test.js", + "test": "npm run test:node && npm run test:types", + "test:bun": "bun test", + "test:node": "node index.test.js", + "test:deno": "deno test", "test:types": "tsd" }, "devDependencies": { "prettier": "^2.0.0", "tsd": "^0.17.0" + }, + "publishConfig": { + "provenance": true } } diff --git a/node_modules/octokit/node_modules/universal-user-agent/test.js b/node_modules/octokit/node_modules/universal-user-agent/test.js deleted file mode 100644 index c24cdc77f..000000000 --- a/node_modules/octokit/node_modules/universal-user-agent/test.js +++ /dev/null @@ -1,8 +0,0 @@ -import assert from "node:assert"; - -import { getUserAgent } from "./index.js"; - -assert(getUserAgent instanceof Function, "getUserAgent is a function"); -assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); - -console.log("ok"); diff --git a/node_modules/octokit/package.json b/node_modules/octokit/package.json index 8a824c5f7..cc0136ed4 100644 --- a/node_modules/octokit/package.json +++ b/node_modules/octokit/package.json @@ -1,6 +1,6 @@ { "name": "octokit", - "version": "4.1.3", + "version": "5.0.2", "type": "module", "description": "The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno", "keywords": [ @@ -13,16 +13,17 @@ "repository": "github:octokit/octokit.js", "license": "MIT", "dependencies": { - "@octokit/app": "^15.1.6", - "@octokit/core": "^6.1.5", - "@octokit/oauth-app": "^7.1.6", - "@octokit/plugin-paginate-graphql": "^5.2.4", - "@octokit/plugin-paginate-rest": "^12.0.0", - "@octokit/plugin-rest-endpoint-methods": "^14.0.0", - "@octokit/plugin-retry": "^7.2.1", - "@octokit/plugin-throttling": "^10.0.0", - "@octokit/request-error": "^6.1.8", - "@octokit/types": "^14.0.0" + "@octokit/app": "^16.0.1", + "@octokit/core": "^7.0.2", + "@octokit/oauth-app": "^8.0.1", + "@octokit/plugin-paginate-graphql": "^6.0.0", + "@octokit/plugin-paginate-rest": "^13.0.0", + "@octokit/plugin-rest-endpoint-methods": "^15.0.0", + "@octokit/plugin-retry": "^8.0.1", + "@octokit/plugin-throttling": "^11.0.1", + "@octokit/request-error": "^7.0.0", + "@octokit/types": "^14.0.0", + "@octokit/webhooks": "^14.0.0" }, "devDependencies": { "@octokit/tsconfig": "^4.0.0", @@ -38,7 +39,7 @@ "vitest": "^3.0.0" }, "engines": { - "node": ">= 18" + "node": ">= 20" }, "publishConfig": { "provenance": true