aws-delivlib 14.4.2 → 14.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/publishing/github/node_modules/.yarn-integrity +42 -36
- package/lib/publishing/github/node_modules/@octokit/app/dist-node/index.js +146 -106
- package/lib/publishing/github/node_modules/@octokit/app/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/each-installation.js +34 -23
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/each-repository.js +46 -38
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/get-installation-octokit.js +16 -13
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/index.js +76 -63
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/middleware/node/index.js +48 -41
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/middleware/node/on-unhandled-request-default.js +12 -7
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/webhooks.js +44 -51
- package/lib/publishing/github/node_modules/@octokit/app/dist-types/each-installation.d.ts +6 -3
- package/lib/publishing/github/node_modules/@octokit/app/dist-types/each-repository.d.ts +1 -0
- package/lib/publishing/github/node_modules/@octokit/app/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/app/dist-web/index.js +306 -0
- package/lib/publishing/github/node_modules/@octokit/app/dist-web/index.js.map +7 -0
- package/lib/publishing/github/node_modules/@octokit/app/package.json +22 -21
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-node/index.js +239 -180
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/auth.js +27 -24
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/cache.js +73 -66
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js +28 -21
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js +96 -74
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/hook.js +79 -75
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/index.js +51 -39
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js +30 -47
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js +29 -11
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/auth.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/cache.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/hook.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/index.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/types.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-web/index.js +405 -360
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/package.json +24 -25
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-node/index.js +15 -17
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts +17 -17
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-web/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-app/package.json +3 -3
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-node/index.js +23 -31
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts +12 -12
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-web/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-device/package.json +5 -5
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/README.md +23 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-node/index.js +40 -39
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-src/auth.js +8 -0
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js +3 -0
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-src/index.js +2 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts +38 -34
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-web/index.js +14 -2
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-oauth-user/package.json +5 -5
- package/lib/publishing/github/node_modules/@octokit/auth-token/README.md +5 -10
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-node/index.js +44 -20
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-src/auth.js +13 -17
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-src/hook.js +10 -4
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-src/index.js +16 -11
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js +8 -10
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-types/auth.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-types/hook.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-types/index.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-types/types.d.ts +13 -13
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-web/index.js +42 -45
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-token/package.json +23 -27
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-node/index.js +47 -22
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/auth.js +8 -5
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/hook.js +33 -24
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/index.js +12 -7
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/is-abuse-limit-error.js +8 -5
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/is-rate-limit-error.js +11 -9
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-types/index.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-types/types.d.ts +9 -9
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-web/index.js +62 -50
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/package.json +22 -23
- package/lib/publishing/github/node_modules/@octokit/core/README.md +4 -4
- package/lib/publishing/github/node_modules/@octokit/core/dist-node/index.js +119 -100
- package/lib/publishing/github/node_modules/@octokit/core/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/core/dist-src/index.js +114 -112
- package/lib/publishing/github/node_modules/@octokit/core/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/core/dist-types/types.d.ts +7 -7
- package/lib/publishing/github/node_modules/@octokit/core/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/core/dist-web/index.js +124 -122
- package/lib/publishing/github/node_modules/@octokit/core/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/core/package.json +26 -27
- package/lib/publishing/github/node_modules/@octokit/endpoint/README.md +3 -3
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-node/index.js +22 -62
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-web/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/endpoint/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/endpoint/package.json +4 -4
- package/lib/publishing/github/node_modules/@octokit/graphql/README.md +1 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-node/index.js +81 -39
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/error.js +17 -17
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/graphql.js +55 -44
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/index.js +17 -12
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/with-defaults.js +12 -9
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/error.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/graphql.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/index.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/types.d.ts +7 -7
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-web/index.js +103 -90
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/package.json +23 -24
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-node/index.js +290 -263
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/add-event-handler.js +13 -10
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/emit-event.js +13 -10
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/index.js +108 -64
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/check-token.js +14 -11
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/create-token.js +27 -24
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/delete-authorization.js +43 -40
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/delete-token.js +32 -29
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/get-oauth-client-code.js +5 -2
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/get-user-octokit.js +29 -24
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/get-web-flow-authorization-url.js +16 -28
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/refresh-token.js +34 -29
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/reset-token.js +58 -55
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/methods/scope-token.js +34 -29
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/aws-lambda/api-gateway-v2-parse-request.js +14 -11
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/aws-lambda/api-gateway-v2-send-response.js +9 -6
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/aws-lambda/api-gateway-v2.js +21 -13
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/handle-request.js +217 -210
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/node/index.js +30 -20
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/node/parse-request.js +13 -13
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/node/send-response.js +6 -3
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/on-unhandled-request-default.js +11 -8
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/web-worker/index.js +31 -19
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/web-worker/parse-request.js +11 -9
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/web-worker/send-response.js +8 -5
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/oauth-app-octokit.js +5 -2
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-types/middleware/web-worker/index.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/package.json +20 -20
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-node/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts +11 -11
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts +8 -8
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/types.d.ts +9 -9
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-methods/package.json +7 -7
- package/lib/publishing/github/node_modules/@octokit/openapi-types/package.json +2 -2
- package/lib/publishing/github/node_modules/@octokit/openapi-types/types.d.ts +77450 -13127
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js +292 -57
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js +5 -2
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js +226 -213
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js +17 -12
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js +36 -37
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js +29 -45
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js +31 -21
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js +14 -9
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts +183 -111
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts +3 -4
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts +29 -29
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js +334 -334
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/package.json +24 -26
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js +99 -39
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +197 -77
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts +1419 -661
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts +359 -119
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js +198 -78
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-rest-endpoint-methods/package.json +9 -9
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-node/index.js +80 -35
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-src/error-request.js +12 -13
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-src/index.js +29 -22
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-src/wrap-request.js +31 -15
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-types/error-request.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-types/wrap-request.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-web/index.js +68 -54
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-retry/package.json +21 -22
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-node/index.js +18 -11
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-src/index.js +21 -14
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-src/version.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-types/index.d.ts +6 -0
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-types/types.d.ts +13 -12
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-web/index.js +22 -15
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-web/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-throttling/package.json +7 -7
- package/lib/publishing/github/node_modules/@octokit/request/README.md +3 -3
- package/lib/publishing/github/node_modules/@octokit/request/dist-node/index.js +105 -77
- package/lib/publishing/github/node_modules/@octokit/request/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/request/dist-src/fetch-wrapper.js +111 -108
- package/lib/publishing/github/node_modules/@octokit/request/dist-src/get-buffer-response.js +5 -2
- package/lib/publishing/github/node_modules/@octokit/request/dist-src/index.js +7 -4
- package/lib/publishing/github/node_modules/@octokit/request/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/request/dist-src/with-defaults.js +23 -18
- package/lib/publishing/github/node_modules/@octokit/request/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/request/dist-web/index.js +148 -138
- package/lib/publishing/github/node_modules/@octokit/request/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/request/package.json +23 -24
- package/lib/publishing/github/node_modules/@octokit/request-error/dist-node/index.js +10 -19
- package/lib/publishing/github/node_modules/@octokit/request-error/dist-node/index.js.map +1 -1
- package/lib/publishing/github/node_modules/@octokit/request-error/dist-types/types.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/request-error/package.json +4 -4
- package/lib/publishing/github/node_modules/@octokit/tsconfig/LICENSE +7 -0
- package/lib/publishing/github/node_modules/@octokit/tsconfig/README.md +31 -0
- package/lib/publishing/github/node_modules/@octokit/tsconfig/package.json +28 -0
- package/lib/publishing/github/node_modules/@octokit/types/dist-node/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-src/VERSION.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/Fetch.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestError.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestMethod.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestOptions.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestParameters.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/Route.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/Signal.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/Url.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/VERSION.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts +464 -332
- package/lib/publishing/github/node_modules/@octokit/types/dist-web/index.js +1 -1
- package/lib/publishing/github/node_modules/@octokit/types/package.json +10 -10
- package/lib/publishing/github/node_modules/@octokit/webhooks/README.md +68 -64
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-node/index.js +467 -97
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/createLogger.js +11 -6
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/event-handler/index.js +23 -16
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/event-handler/on.js +31 -22
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/event-handler/receive.js +51 -49
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/event-handler/remove-listener.js +18 -15
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/event-handler/wrap-error-handler.js +17 -18
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/generated/webhook-names.js +262 -254
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/index.js +40 -22
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js +8 -6
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js +27 -22
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js +19 -6
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js +86 -72
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js +12 -7
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/sign.js +8 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/to-normalized-json-string.js +8 -8
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/verify-and-receive.js +22 -16
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/verify.js +9 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/event-handler/on.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/event-handler/remove-listener.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/generated/webhook-names.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/index.d.ts +14 -4
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/get-missing-headers.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/get-payload.d.ts +3 -3
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/index.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/middleware.d.ts +4 -4
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/on-unhandled-request-default.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/middleware/node/types.d.ts +5 -4
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/to-normalized-json-string.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/types.d.ts +12 -11
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-types/verify-and-receive.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-web/index.js +609 -533
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/package.json +20 -22
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/README.md +84 -3
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-node/index.js +89 -48
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/index.js +22 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/node/sign.js +19 -16
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/node/verify.js +18 -14
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/types.js +8 -5
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/utils.js +5 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-src/web.js +62 -44
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-types/index.d.ts +3 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-types/node/sign.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-types/types.d.ts +2 -2
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-types/web.d.ts +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-web/index.js +71 -53
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-methods/package.json +36 -25
- package/lib/publishing/github/node_modules/@octokit/webhooks-types/package.json +1 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks-types/schema.d.ts +670 -35
- package/lib/publishing/github/node_modules/@types/aws-lambda/README.md +2 -2
- package/lib/publishing/github/node_modules/@types/aws-lambda/index.d.ts +3 -2
- package/lib/publishing/github/node_modules/@types/aws-lambda/package.json +3 -8
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts +38 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +75 -1
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +4 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/codecommit.d.ts +36 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +8 -4
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts +49 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +11 -1
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +26 -1
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/msk.d.ts +7 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts +27 -0
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/sns.d.ts +2 -2
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/sqs.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/index.d.ts +14 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +135 -75
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +67 -38
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +220 -101
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +87 -58
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +25 -29
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +5 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +873 -249
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +16 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +52 -8
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +27 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dom-events.d.ts +126 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +6 -5
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +166 -93
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +149 -74
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +288 -121
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +22 -13
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +453 -125
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +74 -46
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +103 -53
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +6 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +20 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +6 -4
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +106 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +36 -14
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +15 -3
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +37 -26
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +96 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +53 -50
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +6 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +145 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +51 -175
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +21 -21
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +2 -14
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +983 -824
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +6 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +1052 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +26 -1
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +125 -4
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +149 -50
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +30 -9
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/buffer.d.ts +2351 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/crypto.d.ts +3961 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/fs.d.ts +4043 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/net.d.ts +886 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/process.d.ts +1485 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/tty.d.ts +205 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +7 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +66 -56
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +528 -70
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +271 -14
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +421 -34
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +13 -19
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +81 -37
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +11 -11
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/package.json +3 -3
- package/lib/publishing/github/node_modules/@types/node/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/node/child_process.d.ts +41 -2
- package/lib/publishing/github/node_modules/@types/node/crypto.d.ts +77 -7
- package/lib/publishing/github/node_modules/@types/node/fs/promises.d.ts +15 -12
- package/lib/publishing/github/node_modules/@types/node/globals.d.ts +5 -3
- package/lib/publishing/github/node_modules/@types/node/http.d.ts +142 -53
- package/lib/publishing/github/node_modules/@types/node/http2.d.ts +1 -2
- package/lib/publishing/github/node_modules/@types/node/https.d.ts +192 -62
- package/lib/publishing/github/node_modules/@types/node/index.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/node/inspector.d.ts +1 -1
- package/lib/publishing/github/node_modules/@types/node/net.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/node/os.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/node/package.json +10 -3
- package/lib/publishing/github/node_modules/@types/node/path.d.ts +32 -21
- package/lib/publishing/github/node_modules/@types/node/stream.d.ts +99 -0
- package/lib/publishing/github/node_modules/@types/node/tls.d.ts +13 -13
- package/lib/publishing/github/node_modules/@types/node/ts4.8/assert.d.ts +128 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/async_hooks.d.ts +229 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/buffer.d.ts +89 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/child_process.d.ts +553 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/cluster.d.ts +265 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/console.d.ts +142 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/crypto.d.ts +1283 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/dgram.d.ts +144 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/dns.d.ts +387 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/domain.d.ts +27 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/events.d.ts +82 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/fs/promises.d.ts +572 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/fs.d.ts +2281 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/globals.d.ts +746 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/http.d.ts +580 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/http2.d.ts +961 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/https.d.ts +272 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/index.d.ts +53 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/inspector.d.ts +3051 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/module.d.ts +56 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/net.d.ts +309 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/os.d.ts +243 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/path.d.ts +168 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/perf_hooks.d.ts +274 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/process.d.ts +413 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/punycode.d.ts +78 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/querystring.d.ts +31 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/readline.d.ts +174 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/repl.d.ts +398 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/stream.d.ts +458 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/string_decoder.d.ts +10 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/timers.d.ts +19 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/tls.d.ts +784 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/trace_events.d.ts +64 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/tty.d.ts +69 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/url.d.ts +177 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/util.d.ts +216 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/v8.d.ts +190 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/vm.d.ts +155 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/wasi.d.ts +89 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/worker_threads.d.ts +241 -0
- package/lib/publishing/github/node_modules/@types/node/ts4.8/zlib.d.ts +364 -0
- package/lib/publishing/github/node_modules/@types/node/url.d.ts +28 -0
- package/lib/publishing/github/node_modules/before-after-hook/README.md +1 -3
- package/lib/publishing/github/node_modules/before-after-hook/index.d.ts +48 -48
- package/lib/publishing/github/node_modules/before-after-hook/index.js +43 -39
- package/lib/publishing/github/node_modules/before-after-hook/package.json +15 -10
- package/lib/publishing/github/node_modules/lru-cache/LICENSE +1 -1
- package/lib/publishing/github/node_modules/lru-cache/README.md +1127 -104
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.d.ts +834 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.d.ts.map +1 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.js +1395 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.js.map +1 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.min.js +2 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/index.min.js.map +7 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/cjs/package.json +3 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.d.ts +834 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.d.ts.map +1 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.js +1391 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.js.map +1 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.min.js +2 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/index.min.js.map +7 -0
- package/lib/publishing/github/node_modules/lru-cache/dist/mjs/package.json +3 -0
- package/lib/publishing/github/node_modules/lru-cache/package.json +86 -12
- package/lib/publishing/github/node_modules/node-fetch/README.md +43 -0
- package/lib/publishing/github/node_modules/node-fetch/browser.js +7 -7
- package/lib/publishing/github/node_modules/node-fetch/lib/index.es.js +92 -2
- package/lib/publishing/github/node_modules/node-fetch/lib/index.js +92 -2
- package/lib/publishing/github/node_modules/node-fetch/lib/index.mjs +92 -2
- package/lib/publishing/github/node_modules/node-fetch/package.json +16 -3
- package/lib/publishing/github/node_modules/octokit/README.md +4 -4
- package/lib/publishing/github/node_modules/octokit/dist-node/index.js +60 -33
- package/lib/publishing/github/node_modules/octokit/dist-node/index.js.map +7 -1
- package/lib/publishing/github/node_modules/octokit/dist-src/app.js +8 -3
- package/lib/publishing/github/node_modules/octokit/dist-src/index.js +8 -2
- package/lib/publishing/github/node_modules/octokit/dist-src/octokit.js +28 -20
- package/lib/publishing/github/node_modules/octokit/dist-src/version.js +4 -1
- package/lib/publishing/github/node_modules/octokit/dist-types/app.d.ts +2 -2
- package/lib/publishing/github/node_modules/octokit/dist-types/octokit.d.ts +1 -1
- package/lib/publishing/github/node_modules/octokit/dist-types/version.d.ts +1 -1
- package/lib/publishing/github/node_modules/octokit/dist-web/index.js +46 -34
- package/lib/publishing/github/node_modules/octokit/dist-web/index.js.map +7 -1
- package/lib/publishing/github/node_modules/octokit/package.json +26 -28
- package/lib/publishing/github/node_modules/semver/README.md +67 -0
- package/lib/publishing/github/node_modules/semver/bin/semver.js +16 -2
- package/lib/publishing/github/node_modules/semver/classes/comparator.js +37 -33
- package/lib/publishing/github/node_modules/semver/classes/range.js +6 -2
- package/lib/publishing/github/node_modules/semver/classes/semver.js +27 -14
- package/lib/publishing/github/node_modules/semver/functions/diff.js +48 -17
- package/lib/publishing/github/node_modules/semver/functions/inc.js +3 -2
- package/lib/publishing/github/node_modules/semver/functions/parse.js +5 -22
- package/lib/publishing/github/node_modules/semver/index.js +1 -0
- package/lib/publishing/github/node_modules/semver/internal/constants.js +15 -2
- package/lib/publishing/github/node_modules/semver/internal/parse-options.js +14 -10
- package/lib/publishing/github/node_modules/semver/node_modules/lru-cache/LICENSE +15 -0
- package/lib/publishing/github/node_modules/semver/node_modules/lru-cache/README.md +166 -0
- package/lib/publishing/github/node_modules/semver/node_modules/lru-cache/package.json +34 -0
- package/lib/publishing/github/node_modules/semver/package.json +7 -6
- package/lib/publishing/github/node_modules/semver/ranges/intersects.js +1 -1
- package/lib/publishing/github/node_modules/semver/ranges/subset.js +6 -3
- package/lib/publishing/github/node_modules/typescript/lib/tsc.js +8 -3
- package/lib/publishing/github/node_modules/typescript/lib/tsserver.js +13 -3
- package/lib/publishing/github/node_modules/typescript/lib/tsserverlibrary.js +13 -3
- package/lib/publishing/github/node_modules/typescript/lib/typescript.js +13 -3
- package/lib/publishing/github/node_modules/typescript/lib/typescriptServices.js +13 -3
- package/lib/publishing/github/node_modules/typescript/lib/typingsInstaller.js +13 -3
- package/lib/publishing/github/node_modules/typescript/package.json +1 -1
- package/lib/publishing/github/package-lock.json +675 -0
- package/lib/publishing/github/package.json +1 -1
- package/lib/publishing/github/publish.sh +3 -1
- package/package.json +1 -1
- package/lib/publishing/github/node_modules/@octokit/app/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/auth-app/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/auth-token/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/auth-unauthenticated/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/core/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/graphql/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/middleware/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/oauth-app/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/plugin-paginate-rest/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/middleware/node/types.js +0 -1
- package/lib/publishing/github/node_modules/@octokit/webhooks/dist-src/types.js +0 -1
- package/lib/publishing/github/node_modules/@types/lru-cache/LICENSE +0 -21
- package/lib/publishing/github/node_modules/@types/lru-cache/README.md +0 -16
- package/lib/publishing/github/node_modules/@types/lru-cache/index.d.ts +0 -193
- package/lib/publishing/github/node_modules/@types/lru-cache/package.json +0 -30
- package/lib/publishing/github/yarn.lock +0 -473
- /package/lib/publishing/github/node_modules/{lru-cache → semver/node_modules/lru-cache}/index.js +0 -0
|
@@ -6,7 +6,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var BottleneckLight = _interopDefault(require('bottleneck/light'));
|
|
8
8
|
|
|
9
|
-
const VERSION = "
|
|
9
|
+
const VERSION = "5.2.3";
|
|
10
10
|
|
|
11
11
|
const noop = () => Promise.resolve();
|
|
12
12
|
// @ts-expect-error
|
|
@@ -135,20 +135,31 @@ function throttling(octokit, octokitOptions) {
|
|
|
135
135
|
if (groups.global == null) {
|
|
136
136
|
createGroups(Bottleneck, common);
|
|
137
137
|
}
|
|
138
|
+
if (octokitOptions.throttle && octokitOptions.throttle.minimalSecondaryRateRetryAfter) {
|
|
139
|
+
octokit.log.warn("[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead");
|
|
140
|
+
octokitOptions.throttle.fallbackSecondaryRateRetryAfter = octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
141
|
+
delete octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
142
|
+
}
|
|
143
|
+
if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) {
|
|
144
|
+
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
145
|
+
// @ts-ignore types don't allow for both properties to be set
|
|
146
|
+
octokitOptions.throttle.onSecondaryRateLimit = octokitOptions.throttle.onAbuseLimit;
|
|
147
|
+
// @ts-ignore
|
|
148
|
+
delete octokitOptions.throttle.onAbuseLimit;
|
|
149
|
+
}
|
|
138
150
|
const state = Object.assign({
|
|
139
151
|
clustering: connection != null,
|
|
140
152
|
triggersNotification,
|
|
141
|
-
|
|
153
|
+
fallbackSecondaryRateRetryAfter: 60,
|
|
142
154
|
retryAfterBaseValue: 1000,
|
|
143
155
|
retryLimiter: new Bottleneck(),
|
|
144
156
|
id,
|
|
145
157
|
...groups
|
|
146
158
|
}, octokitOptions.throttle);
|
|
147
|
-
|
|
148
|
-
if (typeof (isUsingDeprecatedOnAbuseLimitHandler ? state.onAbuseLimit : state.onSecondaryRateLimit) !== "function" || typeof state.onRateLimit !== "function") {
|
|
159
|
+
if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") {
|
|
149
160
|
throw new Error(`octokit/plugin-throttling error:
|
|
150
161
|
You must pass the onSecondaryRateLimit and onRateLimit error handlers.
|
|
151
|
-
See https://github.
|
|
162
|
+
See https://octokit.github.io/rest.js/#throttling
|
|
152
163
|
|
|
153
164
|
const octokit = new Octokit({
|
|
154
165
|
throttle: {
|
|
@@ -161,11 +172,7 @@ function throttling(octokit, octokitOptions) {
|
|
|
161
172
|
const events = {};
|
|
162
173
|
const emitter = new Bottleneck.Events(events);
|
|
163
174
|
// @ts-expect-error
|
|
164
|
-
events.on("secondary-limit",
|
|
165
|
-
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
166
|
-
// @ts-expect-error
|
|
167
|
-
return state.onAbuseLimit(...args);
|
|
168
|
-
} : state.onSecondaryRateLimit);
|
|
175
|
+
events.on("secondary-limit", state.onSecondaryRateLimit);
|
|
169
176
|
// @ts-expect-error
|
|
170
177
|
events.on("rate-limit", state.onRateLimit);
|
|
171
178
|
// @ts-expect-error
|
|
@@ -193,7 +200,7 @@ function throttling(octokit, octokitOptions) {
|
|
|
193
200
|
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
|
|
194
201
|
// The Retry-After header can sometimes be blank when hitting a secondary rate limit,
|
|
195
202
|
// but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.
|
|
196
|
-
const retryAfter =
|
|
203
|
+
const retryAfter = Number(error.response.headers["retry-after"]) || state.fallbackSecondaryRateRetryAfter;
|
|
197
204
|
const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit, retryCount);
|
|
198
205
|
return {
|
|
199
206
|
wantRetry,
|
package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/wrap-request.js","../dist-src/generated/triggers-notification-paths.js","../dist-src/route-matcher.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.3.2\";\n","const noop = () => Promise.resolve();\n// @ts-expect-error\nexport function wrapRequest(state, request, options) {\n return state.retryLimiter.schedule(doRequest, state, request, options);\n}\n// @ts-expect-error\nasync function doRequest(state, request, options) {\n const isWrite = options.method !== \"GET\" && options.method !== \"HEAD\";\n const { pathname } = new URL(options.url, \"http://github.test\");\n const isSearch = options.method === \"GET\" && pathname.startsWith(\"/search/\");\n const isGraphQL = pathname.startsWith(\"/graphql\");\n const retryCount = ~~request.retryCount;\n const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {};\n if (state.clustering) {\n // Remove a job from Redis if it has not completed or failed within 60s\n // Examples: Node process terminated, client disconnected, etc.\n // @ts-expect-error\n jobOptions.expiration = 1000 * 60;\n }\n // Guarantee at least 1000ms between writes\n // GraphQL can also trigger writes\n if (isWrite || isGraphQL) {\n await state.write.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 3000ms between requests that trigger notifications\n if (isWrite && state.triggersNotification(pathname)) {\n await state.notifications.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 2000ms between search requests\n if (isSearch) {\n await state.search.key(state.id).schedule(jobOptions, noop);\n }\n const req = state.global.key(state.id).schedule(jobOptions, request, options);\n if (isGraphQL) {\n const res = await req;\n if (res.data.errors != null &&\n // @ts-expect-error\n res.data.errors.some((error) => error.type === \"RATE_LIMITED\")) {\n const error = Object.assign(new Error(\"GraphQL Rate Limit Exceeded\"), {\n response: res,\n data: res.data,\n });\n throw error;\n }\n }\n return req;\n}\n","export default [\n \"/orgs/{org}/invitations\",\n \"/orgs/{org}/invitations/{invitation_id}\",\n \"/orgs/{org}/teams/{team_slug}/discussions\",\n \"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"/repos/{owner}/{repo}/collaborators/{username}\",\n \"/repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"/repos/{owner}/{repo}/issues\",\n \"/repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"/repos/{owner}/{repo}/pulls\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/merge\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"/repos/{owner}/{repo}/releases\",\n \"/teams/{team_id}/discussions\",\n \"/teams/{team_id}/discussions/{discussion_number}/comments\",\n];\n","export function routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((path) => path\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\n","// @ts-expect-error\nimport BottleneckLight from \"bottleneck/light\";\nimport { VERSION } from \"./version\";\nimport { wrapRequest } from \"./wrap-request\";\nimport triggersNotificationPaths from \"./generated/triggers-notification-paths\";\nimport { routeMatcher } from \"./route-matcher\";\n// Workaround to allow tests to directly access the triggersNotification function.\nconst regex = routeMatcher(triggersNotificationPaths);\nconst triggersNotification = regex.test.bind(regex);\nconst groups = {};\n// @ts-expect-error\nconst createGroups = function (Bottleneck, common) {\n groups.global = new Bottleneck.Group({\n id: \"octokit-global\",\n maxConcurrent: 10,\n ...common,\n });\n groups.search = new Bottleneck.Group({\n id: \"octokit-search\",\n maxConcurrent: 1,\n minTime: 2000,\n ...common,\n });\n groups.write = new Bottleneck.Group({\n id: \"octokit-write\",\n maxConcurrent: 1,\n minTime: 1000,\n ...common,\n });\n groups.notifications = new Bottleneck.Group({\n id: \"octokit-notifications\",\n maxConcurrent: 1,\n minTime: 3000,\n ...common,\n });\n};\nexport function throttling(octokit, octokitOptions) {\n const { enabled = true, Bottleneck = BottleneckLight, id = \"no-id\", timeout = 1000 * 60 * 2, // Redis TTL: 2 minutes\n connection, } = octokitOptions.throttle || {};\n if (!enabled) {\n return {};\n }\n const common = { connection, timeout };\n if (groups.global == null) {\n createGroups(Bottleneck, common);\n }\n const state = Object.assign({\n clustering: connection != null,\n triggersNotification,\n minimumSecondaryRateRetryAfter: 5,\n retryAfterBaseValue: 1000,\n retryLimiter: new Bottleneck(),\n id,\n ...groups,\n }, octokitOptions.throttle);\n const isUsingDeprecatedOnAbuseLimitHandler = typeof state.onAbuseLimit === \"function\" && state.onAbuseLimit;\n if (typeof (isUsingDeprecatedOnAbuseLimitHandler\n ? state.onAbuseLimit\n : state.onSecondaryRateLimit) !== \"function\" ||\n typeof state.onRateLimit !== \"function\") {\n throw new Error(`octokit/plugin-throttling error:\n You must pass the onSecondaryRateLimit and onRateLimit error handlers.\n See https://github.com/octokit/rest.js#throttling\n\n const octokit = new Octokit({\n throttle: {\n onSecondaryRateLimit: (retryAfter, options) => {/* ... */},\n onRateLimit: (retryAfter, options) => {/* ... */}\n }\n })\n `);\n }\n const events = {};\n const emitter = new Bottleneck.Events(events);\n // @ts-expect-error\n events.on(\"secondary-limit\", isUsingDeprecatedOnAbuseLimitHandler\n ? function (...args) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead\");\n // @ts-expect-error\n return state.onAbuseLimit(...args);\n }\n : state.onSecondaryRateLimit);\n // @ts-expect-error\n events.on(\"rate-limit\", state.onRateLimit);\n // @ts-expect-error\n events.on(\"error\", (e) => octokit.log.warn(\"Error in throttling-plugin limit handler\", e));\n // @ts-expect-error\n state.retryLimiter.on(\"failed\", async function (error, info) {\n const [state, request, options] = info.args;\n const { pathname } = new URL(options.url, \"http://github.test\");\n const shouldRetryGraphQL = pathname.startsWith(\"/graphql\") && error.status !== 401;\n if (!(shouldRetryGraphQL || error.status === 403)) {\n return;\n }\n const retryCount = ~~request.retryCount;\n request.retryCount = retryCount;\n // backward compatibility\n options.request.retryCount = retryCount;\n const { wantRetry, retryAfter = 0 } = await (async function () {\n if (/\\bsecondary rate\\b/i.test(error.message)) {\n // The user has hit the secondary rate limit. (REST and GraphQL)\n // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits\n // The Retry-After header can sometimes be blank when hitting a secondary rate limit,\n // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.\n const retryAfter = Math.max(~~error.response.headers[\"retry-after\"], state.minimumSecondaryRateRetryAfter);\n const wantRetry = await emitter.trigger(\"secondary-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n if (error.response.headers != null &&\n error.response.headers[\"x-ratelimit-remaining\"] === \"0\") {\n // The user has used all their allowed calls for the current time period (REST and GraphQL)\n // https://docs.github.com/en/rest/reference/rate-limit (REST)\n // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL)\n const rateLimitReset = new Date(~~error.response.headers[\"x-ratelimit-reset\"] * 1000).getTime();\n const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0);\n const wantRetry = await emitter.trigger(\"rate-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n return {};\n })();\n if (wantRetry) {\n request.retryCount++;\n return retryAfter * state.retryAfterBaseValue;\n }\n });\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n return {};\n}\nthrottling.VERSION = VERSION;\nthrottling.triggersNotification = triggersNotification;\n"],"names":["VERSION","noop","Promise","resolve","wrapRequest","state","request","options","retryLimiter","schedule","doRequest","isWrite","method","pathname","URL","url","isSearch","startsWith","isGraphQL","retryCount","jobOptions","priority","weight","clustering","expiration","write","key","id","triggersNotification","notifications","search","req","global","res","data","errors","some","error","type","Object","assign","Error","response","routeMatcher","paths","regexes","map","path","split","c","join","regex","r","RegExp","triggersNotificationPaths","test","bind","groups","createGroups","Bottleneck","common","Group","maxConcurrent","minTime","throttling","octokit","octokitOptions","enabled","BottleneckLight","timeout","connection","throttle","minimumSecondaryRateRetryAfter","retryAfterBaseValue","isUsingDeprecatedOnAbuseLimitHandler","onAbuseLimit","onSecondaryRateLimit","onRateLimit","events","emitter","Events","on","args","log","warn","e","info","shouldRetryGraphQL","status","wantRetry","retryAfter","message","Math","max","headers","trigger","rateLimitReset","Date","getTime","ceil","now","hook","wrap"],"mappings":";;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA1C,MAAMC,IAAI,GAAG,MAAMC,OAAO,CAACC,OAAO,EAAE;AACpC;AACA,AAAO,SAASC,WAAW,CAACC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAE;EACjD,OAAOF,KAAK,CAACG,YAAY,CAACC,QAAQ,CAACC,SAAS,EAAEL,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC;AAC1E;AACA;AACA,eAAeG,SAAS,CAACL,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAE;EAC9C,MAAMI,OAAO,GAAGJ,OAAO,CAACK,MAAM,KAAK,KAAK,IAAIL,OAAO,CAACK,MAAM,KAAK,MAAM;EACrE,MAAM;IAAEC;GAAU,GAAG,IAAIC,GAAG,CAACP,OAAO,CAACQ,GAAG,EAAE,oBAAoB,CAAC;EAC/D,MAAMC,QAAQ,GAAGT,OAAO,CAACK,MAAM,KAAK,KAAK,IAAIC,QAAQ,CAACI,UAAU,CAAC,UAAU,CAAC;EAC5E,MAAMC,SAAS,GAAGL,QAAQ,CAACI,UAAU,CAAC,UAAU,CAAC;EACjD,MAAME,UAAU,GAAG,CAAC,CAACb,OAAO,CAACa,UAAU;EACvC,MAAMC,UAAU,GAAGD,UAAU,GAAG,CAAC,GAAG;IAAEE,QAAQ,EAAE,CAAC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MV,OAAO,CAACgB,OAAO,CAAC,YAAY,EAAEL,UAAU,EAAEnF,OAAO,EAAE0D,OAAO,EAAE9C,UAAU,CAAC;QAC/F,OAAO;UAAEsE,SAAS;UAAEC;SAAY;;MAEpC,OAAO,EAAE;KACZ,EAAG;IACJ,IAAID,SAAS,EAAE;MACXnF,OAAO,CAACa,UAAU,EAAE;MACpB,OAAOuE,UAAU,GAAGrF,KAAK,CAACoE,mBAAmB;;GAEpD,CAAC;EACFR,OAAO,CAACoC,IAAI,CAACC,IAAI,CAAC,SAAS,EAAElG,WAAW,CAACoD,IAAI,CAAC,IAAI,EAAEnD,KAAK,CAAC,CAAC;EAC3D,OAAO,EAAE;AACb;AACA2D,UAAU,CAAChE,OAAO,GAAGA,OAAO;AAC5BgE,UAAU,CAACpC,oBAAoB,GAAGA,oBAAoB;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/wrap-request.js","../dist-src/generated/triggers-notification-paths.js","../dist-src/route-matcher.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.2.3\";\n","const noop = () => Promise.resolve();\n// @ts-expect-error\nexport function wrapRequest(state, request, options) {\n return state.retryLimiter.schedule(doRequest, state, request, options);\n}\n// @ts-expect-error\nasync function doRequest(state, request, options) {\n const isWrite = options.method !== \"GET\" && options.method !== \"HEAD\";\n const { pathname } = new URL(options.url, \"http://github.test\");\n const isSearch = options.method === \"GET\" && pathname.startsWith(\"/search/\");\n const isGraphQL = pathname.startsWith(\"/graphql\");\n const retryCount = ~~request.retryCount;\n const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {};\n if (state.clustering) {\n // Remove a job from Redis if it has not completed or failed within 60s\n // Examples: Node process terminated, client disconnected, etc.\n // @ts-expect-error\n jobOptions.expiration = 1000 * 60;\n }\n // Guarantee at least 1000ms between writes\n // GraphQL can also trigger writes\n if (isWrite || isGraphQL) {\n await state.write.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 3000ms between requests that trigger notifications\n if (isWrite && state.triggersNotification(pathname)) {\n await state.notifications.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 2000ms between search requests\n if (isSearch) {\n await state.search.key(state.id).schedule(jobOptions, noop);\n }\n const req = state.global.key(state.id).schedule(jobOptions, request, options);\n if (isGraphQL) {\n const res = await req;\n if (res.data.errors != null &&\n // @ts-expect-error\n res.data.errors.some((error) => error.type === \"RATE_LIMITED\")) {\n const error = Object.assign(new Error(\"GraphQL Rate Limit Exceeded\"), {\n response: res,\n data: res.data,\n });\n throw error;\n }\n }\n return req;\n}\n","export default [\n \"/orgs/{org}/invitations\",\n \"/orgs/{org}/invitations/{invitation_id}\",\n \"/orgs/{org}/teams/{team_slug}/discussions\",\n \"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"/repos/{owner}/{repo}/collaborators/{username}\",\n \"/repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"/repos/{owner}/{repo}/issues\",\n \"/repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"/repos/{owner}/{repo}/pulls\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/merge\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"/repos/{owner}/{repo}/releases\",\n \"/teams/{team_id}/discussions\",\n \"/teams/{team_id}/discussions/{discussion_number}/comments\",\n];\n","export function routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((path) => path\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\n","// @ts-expect-error\nimport BottleneckLight from \"bottleneck/light\";\nimport { VERSION } from \"./version\";\nimport { wrapRequest } from \"./wrap-request\";\nimport triggersNotificationPaths from \"./generated/triggers-notification-paths\";\nimport { routeMatcher } from \"./route-matcher\";\n// Workaround to allow tests to directly access the triggersNotification function.\nconst regex = routeMatcher(triggersNotificationPaths);\nconst triggersNotification = regex.test.bind(regex);\nconst groups = {};\n// @ts-expect-error\nconst createGroups = function (Bottleneck, common) {\n groups.global = new Bottleneck.Group({\n id: \"octokit-global\",\n maxConcurrent: 10,\n ...common,\n });\n groups.search = new Bottleneck.Group({\n id: \"octokit-search\",\n maxConcurrent: 1,\n minTime: 2000,\n ...common,\n });\n groups.write = new Bottleneck.Group({\n id: \"octokit-write\",\n maxConcurrent: 1,\n minTime: 1000,\n ...common,\n });\n groups.notifications = new Bottleneck.Group({\n id: \"octokit-notifications\",\n maxConcurrent: 1,\n minTime: 3000,\n ...common,\n });\n};\nexport function throttling(octokit, octokitOptions) {\n const { enabled = true, Bottleneck = BottleneckLight, id = \"no-id\", timeout = 1000 * 60 * 2, // Redis TTL: 2 minutes\n connection, } = octokitOptions.throttle || {};\n if (!enabled) {\n return {};\n }\n const common = { connection, timeout };\n if (groups.global == null) {\n createGroups(Bottleneck, common);\n }\n if (octokitOptions.throttle &&\n octokitOptions.throttle.minimalSecondaryRateRetryAfter) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead\");\n octokitOptions.throttle.fallbackSecondaryRateRetryAfter =\n octokitOptions.throttle.minimalSecondaryRateRetryAfter;\n delete octokitOptions.throttle.minimalSecondaryRateRetryAfter;\n }\n if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead\");\n // @ts-ignore types don't allow for both properties to be set\n octokitOptions.throttle.onSecondaryRateLimit =\n octokitOptions.throttle.onAbuseLimit;\n // @ts-ignore\n delete octokitOptions.throttle.onAbuseLimit;\n }\n const state = Object.assign({\n clustering: connection != null,\n triggersNotification,\n fallbackSecondaryRateRetryAfter: 60,\n retryAfterBaseValue: 1000,\n retryLimiter: new Bottleneck(),\n id,\n ...groups,\n }, octokitOptions.throttle);\n if (typeof state.onSecondaryRateLimit !== \"function\" ||\n typeof state.onRateLimit !== \"function\") {\n throw new Error(`octokit/plugin-throttling error:\n You must pass the onSecondaryRateLimit and onRateLimit error handlers.\n See https://octokit.github.io/rest.js/#throttling\n\n const octokit = new Octokit({\n throttle: {\n onSecondaryRateLimit: (retryAfter, options) => {/* ... */},\n onRateLimit: (retryAfter, options) => {/* ... */}\n }\n })\n `);\n }\n const events = {};\n const emitter = new Bottleneck.Events(events);\n // @ts-expect-error\n events.on(\"secondary-limit\", state.onSecondaryRateLimit);\n // @ts-expect-error\n events.on(\"rate-limit\", state.onRateLimit);\n // @ts-expect-error\n events.on(\"error\", (e) => octokit.log.warn(\"Error in throttling-plugin limit handler\", e));\n // @ts-expect-error\n state.retryLimiter.on(\"failed\", async function (error, info) {\n const [state, request, options] = info.args;\n const { pathname } = new URL(options.url, \"http://github.test\");\n const shouldRetryGraphQL = pathname.startsWith(\"/graphql\") && error.status !== 401;\n if (!(shouldRetryGraphQL || error.status === 403)) {\n return;\n }\n const retryCount = ~~request.retryCount;\n request.retryCount = retryCount;\n // backward compatibility\n options.request.retryCount = retryCount;\n const { wantRetry, retryAfter = 0 } = await (async function () {\n if (/\\bsecondary rate\\b/i.test(error.message)) {\n // The user has hit the secondary rate limit. (REST and GraphQL)\n // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits\n // The Retry-After header can sometimes be blank when hitting a secondary rate limit,\n // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.\n const retryAfter = Number(error.response.headers[\"retry-after\"]) ||\n state.fallbackSecondaryRateRetryAfter;\n const wantRetry = await emitter.trigger(\"secondary-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n if (error.response.headers != null &&\n error.response.headers[\"x-ratelimit-remaining\"] === \"0\") {\n // The user has used all their allowed calls for the current time period (REST and GraphQL)\n // https://docs.github.com/en/rest/reference/rate-limit (REST)\n // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL)\n const rateLimitReset = new Date(~~error.response.headers[\"x-ratelimit-reset\"] * 1000).getTime();\n const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0);\n const wantRetry = await emitter.trigger(\"rate-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n return {};\n })();\n if (wantRetry) {\n request.retryCount++;\n return retryAfter * state.retryAfterBaseValue;\n }\n });\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n return {};\n}\nthrottling.VERSION = VERSION;\nthrottling.triggersNotification = triggersNotification;\n"],"names":["VERSION","noop","Promise","resolve","wrapRequest","state","request","options","retryLimiter","schedule","doRequest","isWrite","method","pathname","URL","url","isSearch","startsWith","isGraphQL","retryCount","jobOptions","priority","weight","clustering","expiration","write","key","id","triggersNotification","notifications","search","req","global","res","data","errors","some","error","type","Object","assign","Error","response","routeMatcher","paths","regexes","map","path","split","c","join","regex","r","RegExp","triggersNotificationPaths","test","bind","groups","createGroups","Bottleneck","common","Group","maxConcurrent","minTime","throttling","octokit","octokitOptions","enabled","BottleneckLight","timeout","connection","throttle","minimalSecondaryRateRetryAfter","log","warn","fallbackSecondaryRateRetryAfter","onAbuseLimit","onSecondaryRateLimit","retryAfterBaseValue","onRateLimit","events","emitter","Events","on","e","info","args","shouldRetryGraphQL","status","wantRetry","retryAfter","message","Number","headers","trigger","rateLimitReset","Date","getTime","Math","max","ceil","now","hook","wrap"],"mappings":";;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAmB;;ACA1C,MAAMC,IAAI,GAAGA,MAAMC,OAAO,CAACC,OAAO,EAAE;AACpC;AACA,AAAO,SAASC,WAAWA,CAACC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAE;EACjD,OAAOF,KAAK,CAACG,YAAY,CAACC,QAAQ,CAACC,SAAS,EAAEL,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC;AAC1E;AACA;AACA,eAAeG,SAASA,CAACL,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAE;EAC9C,MAAMI,OAAO,GAAGJ,OAAO,CAACK,MAAM,KAAK,KAAK,IAAIL,OAAO,CAACK,MAAM,KAAK,MAAM;EACrE,MAAM;IAAEC;GAAU,GAAG,IAAIC,GAAG,CAACP,OAAO,CAACQ,GAAG,EAAE,oBAAoB,CAAC;EAC/D,MAAMC,QAAQ,GAAGT,OAAO,CAACK,MAAM,KAAK,KAAK,IAAIC,QAAQ,CAACI,UAAU,CAAC,UAAU,CAAC;EAC5E,MAAMC,SAAS,GAAGL,QAAQ,CAACI,UAAU,CAAC,UAAU,CAAC;EACjD,MAAME,UAAU,GAAG,CAAC,CAACb,OAAO,CAACa,UAAU;EACvC,MAAMC,UAAU,GAAGD,UAAU,GAAG,CAAC,GAAG;IAAEE,QAAQ,EAAE,CAAC;IAAEC,MAAM,EAAE;GAAG,GAAG,EAAE;EACnE,IAAIjB,KAAK,CAACkB,UAAU,EAAE;;;;IAIlBH,UAAU,CAACI,UAAU,GAAG,IAAI,GAAG,EAAE;;;;EAIrC,IAAIb,OAAO,IAAIO,SAA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,MAAMZ,SAAS,GAAG,MAAMR,OAAO,CAACa,OAAO,CAAC,YAAY,EAAEJ,UAAU,EAAEnF,OAAO,EAAE0D,OAAO,EAAE9C,UAAU,CAAC;QAC/F,OAAO;UAAEsE,SAAS;UAAEC;SAAY;;MAEpC,OAAO,EAAE;KACZ,EAAG;IACJ,IAAID,SAAS,EAAE;MACXnF,OAAO,CAACa,UAAU,EAAE;MACpB,OAAOuE,UAAU,GAAGrF,KAAK,CAACyE,mBAAmB;;GAEpD,CAAC;EACFb,OAAO,CAACqC,IAAI,CAACC,IAAI,CAAC,SAAS,EAAEnG,WAAW,CAACoD,IAAI,CAAC,IAAI,EAAEnD,KAAK,CAAC,CAAC;EAC3D,OAAO,EAAE;AACb;AACA2D,UAAU,CAAChE,OAAO,GAAGA,OAAO;AAC5BgE,UAAU,CAACpC,oBAAoB,GAAGA,oBAAoB;;;;"}
|
|
@@ -44,23 +44,35 @@ export function throttling(octokit, octokitOptions) {
|
|
|
44
44
|
if (groups.global == null) {
|
|
45
45
|
createGroups(Bottleneck, common);
|
|
46
46
|
}
|
|
47
|
+
if (octokitOptions.throttle &&
|
|
48
|
+
octokitOptions.throttle.minimalSecondaryRateRetryAfter) {
|
|
49
|
+
octokit.log.warn("[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead");
|
|
50
|
+
octokitOptions.throttle.fallbackSecondaryRateRetryAfter =
|
|
51
|
+
octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
52
|
+
delete octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
53
|
+
}
|
|
54
|
+
if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) {
|
|
55
|
+
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
56
|
+
// @ts-ignore types don't allow for both properties to be set
|
|
57
|
+
octokitOptions.throttle.onSecondaryRateLimit =
|
|
58
|
+
octokitOptions.throttle.onAbuseLimit;
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
delete octokitOptions.throttle.onAbuseLimit;
|
|
61
|
+
}
|
|
47
62
|
const state = Object.assign({
|
|
48
63
|
clustering: connection != null,
|
|
49
64
|
triggersNotification,
|
|
50
|
-
|
|
65
|
+
fallbackSecondaryRateRetryAfter: 60,
|
|
51
66
|
retryAfterBaseValue: 1000,
|
|
52
67
|
retryLimiter: new Bottleneck(),
|
|
53
68
|
id,
|
|
54
69
|
...groups,
|
|
55
70
|
}, octokitOptions.throttle);
|
|
56
|
-
|
|
57
|
-
if (typeof (isUsingDeprecatedOnAbuseLimitHandler
|
|
58
|
-
? state.onAbuseLimit
|
|
59
|
-
: state.onSecondaryRateLimit) !== "function" ||
|
|
71
|
+
if (typeof state.onSecondaryRateLimit !== "function" ||
|
|
60
72
|
typeof state.onRateLimit !== "function") {
|
|
61
73
|
throw new Error(`octokit/plugin-throttling error:
|
|
62
74
|
You must pass the onSecondaryRateLimit and onRateLimit error handlers.
|
|
63
|
-
See https://github.
|
|
75
|
+
See https://octokit.github.io/rest.js/#throttling
|
|
64
76
|
|
|
65
77
|
const octokit = new Octokit({
|
|
66
78
|
throttle: {
|
|
@@ -73,13 +85,7 @@ export function throttling(octokit, octokitOptions) {
|
|
|
73
85
|
const events = {};
|
|
74
86
|
const emitter = new Bottleneck.Events(events);
|
|
75
87
|
// @ts-expect-error
|
|
76
|
-
events.on("secondary-limit",
|
|
77
|
-
? function (...args) {
|
|
78
|
-
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
79
|
-
// @ts-expect-error
|
|
80
|
-
return state.onAbuseLimit(...args);
|
|
81
|
-
}
|
|
82
|
-
: state.onSecondaryRateLimit);
|
|
88
|
+
events.on("secondary-limit", state.onSecondaryRateLimit);
|
|
83
89
|
// @ts-expect-error
|
|
84
90
|
events.on("rate-limit", state.onRateLimit);
|
|
85
91
|
// @ts-expect-error
|
|
@@ -102,7 +108,8 @@ export function throttling(octokit, octokitOptions) {
|
|
|
102
108
|
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
|
|
103
109
|
// The Retry-After header can sometimes be blank when hitting a secondary rate limit,
|
|
104
110
|
// but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.
|
|
105
|
-
const retryAfter =
|
|
111
|
+
const retryAfter = Number(error.response.headers["retry-after"]) ||
|
|
112
|
+
state.fallbackSecondaryRateRetryAfter;
|
|
106
113
|
const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit, retryCount);
|
|
107
114
|
return { wantRetry, retryAfter };
|
|
108
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "
|
|
1
|
+
export const VERSION = "5.2.3";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Octokit } from "@octokit/core";
|
|
2
2
|
import { OctokitOptions } from "@octokit/core/dist-types/types.d";
|
|
3
|
+
import { ThrottlingOptions } from "./types";
|
|
3
4
|
export declare function throttling(octokit: Octokit, octokitOptions: OctokitOptions): {};
|
|
4
5
|
export declare namespace throttling {
|
|
5
6
|
var VERSION: string;
|
|
6
7
|
var triggersNotification: (string: string) => boolean;
|
|
7
8
|
}
|
|
9
|
+
declare module "@octokit/core/dist-types/types.d" {
|
|
10
|
+
interface OctokitOptions {
|
|
11
|
+
throttle?: ThrottlingOptions;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { Octokit } from "@octokit/core";
|
|
2
2
|
import Bottleneck from "bottleneck";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
throttle?: ThrottlingOptions;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
declare type LimitHandler = (retryAfter: number, options: object, octokit: Octokit, retryCount: number) => void;
|
|
9
|
-
export declare type AbuseLimitHandler = {
|
|
3
|
+
type LimitHandler = (retryAfter: number, options: object, octokit: Octokit, retryCount: number) => void;
|
|
4
|
+
export type AbuseLimitHandler = {
|
|
10
5
|
/**
|
|
11
6
|
* @deprecated "[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"
|
|
12
7
|
*/
|
|
13
8
|
onAbuseLimit: LimitHandler;
|
|
14
9
|
onSecondaryRateLimit?: never;
|
|
15
10
|
};
|
|
16
|
-
export
|
|
11
|
+
export type SecondaryLimitHandler = {
|
|
17
12
|
/**
|
|
18
13
|
* @deprecated "[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"
|
|
19
14
|
*/
|
|
20
15
|
onAbuseLimit?: never;
|
|
21
16
|
onSecondaryRateLimit: LimitHandler;
|
|
22
17
|
};
|
|
23
|
-
export
|
|
18
|
+
export type ThrottlingOptionsBase = {
|
|
24
19
|
enabled?: boolean;
|
|
25
20
|
Bottleneck?: typeof Bottleneck;
|
|
26
21
|
id?: string;
|
|
27
22
|
timeout?: number;
|
|
28
23
|
connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection;
|
|
29
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated use `fallbackSecondaryRateRetryAfter`
|
|
26
|
+
*/
|
|
27
|
+
minimalSecondaryRateRetryAfter?: number;
|
|
28
|
+
fallbackSecondaryRateRetryAfter?: number;
|
|
30
29
|
retryAfterBaseValue?: number;
|
|
31
30
|
write?: Bottleneck.Group;
|
|
32
31
|
search?: Bottleneck.Group;
|
|
33
32
|
notifications?: Bottleneck.Group;
|
|
34
33
|
onRateLimit: LimitHandler;
|
|
35
34
|
};
|
|
36
|
-
export
|
|
37
|
-
|
|
35
|
+
export type ThrottlingOptions = (ThrottlingOptionsBase & (AbuseLimitHandler | SecondaryLimitHandler)) | (Partial<ThrottlingOptionsBase & (AbuseLimitHandler | SecondaryLimitHandler)> & {
|
|
36
|
+
enabled: false;
|
|
37
|
+
});
|
|
38
|
+
export type Groups = {
|
|
38
39
|
global?: Bottleneck.Group;
|
|
39
40
|
write?: Bottleneck.Group;
|
|
40
41
|
search?: Bottleneck.Group;
|
package/lib/publishing/github/node_modules/@octokit/plugin-throttling/dist-types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "5.2.3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BottleneckLight from 'bottleneck/light';
|
|
2
2
|
|
|
3
|
-
const VERSION = "
|
|
3
|
+
const VERSION = "5.2.3";
|
|
4
4
|
|
|
5
5
|
const noop = () => Promise.resolve();
|
|
6
6
|
// @ts-expect-error
|
|
@@ -137,23 +137,35 @@ function throttling(octokit, octokitOptions) {
|
|
|
137
137
|
if (groups.global == null) {
|
|
138
138
|
createGroups(Bottleneck, common);
|
|
139
139
|
}
|
|
140
|
+
if (octokitOptions.throttle &&
|
|
141
|
+
octokitOptions.throttle.minimalSecondaryRateRetryAfter) {
|
|
142
|
+
octokit.log.warn("[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead");
|
|
143
|
+
octokitOptions.throttle.fallbackSecondaryRateRetryAfter =
|
|
144
|
+
octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
145
|
+
delete octokitOptions.throttle.minimalSecondaryRateRetryAfter;
|
|
146
|
+
}
|
|
147
|
+
if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) {
|
|
148
|
+
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
149
|
+
// @ts-ignore types don't allow for both properties to be set
|
|
150
|
+
octokitOptions.throttle.onSecondaryRateLimit =
|
|
151
|
+
octokitOptions.throttle.onAbuseLimit;
|
|
152
|
+
// @ts-ignore
|
|
153
|
+
delete octokitOptions.throttle.onAbuseLimit;
|
|
154
|
+
}
|
|
140
155
|
const state = Object.assign({
|
|
141
156
|
clustering: connection != null,
|
|
142
157
|
triggersNotification,
|
|
143
|
-
|
|
158
|
+
fallbackSecondaryRateRetryAfter: 60,
|
|
144
159
|
retryAfterBaseValue: 1000,
|
|
145
160
|
retryLimiter: new Bottleneck(),
|
|
146
161
|
id,
|
|
147
162
|
...groups,
|
|
148
163
|
}, octokitOptions.throttle);
|
|
149
|
-
|
|
150
|
-
if (typeof (isUsingDeprecatedOnAbuseLimitHandler
|
|
151
|
-
? state.onAbuseLimit
|
|
152
|
-
: state.onSecondaryRateLimit) !== "function" ||
|
|
164
|
+
if (typeof state.onSecondaryRateLimit !== "function" ||
|
|
153
165
|
typeof state.onRateLimit !== "function") {
|
|
154
166
|
throw new Error(`octokit/plugin-throttling error:
|
|
155
167
|
You must pass the onSecondaryRateLimit and onRateLimit error handlers.
|
|
156
|
-
See https://github.
|
|
168
|
+
See https://octokit.github.io/rest.js/#throttling
|
|
157
169
|
|
|
158
170
|
const octokit = new Octokit({
|
|
159
171
|
throttle: {
|
|
@@ -166,13 +178,7 @@ function throttling(octokit, octokitOptions) {
|
|
|
166
178
|
const events = {};
|
|
167
179
|
const emitter = new Bottleneck.Events(events);
|
|
168
180
|
// @ts-expect-error
|
|
169
|
-
events.on("secondary-limit",
|
|
170
|
-
? function (...args) {
|
|
171
|
-
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
|
|
172
|
-
// @ts-expect-error
|
|
173
|
-
return state.onAbuseLimit(...args);
|
|
174
|
-
}
|
|
175
|
-
: state.onSecondaryRateLimit);
|
|
181
|
+
events.on("secondary-limit", state.onSecondaryRateLimit);
|
|
176
182
|
// @ts-expect-error
|
|
177
183
|
events.on("rate-limit", state.onRateLimit);
|
|
178
184
|
// @ts-expect-error
|
|
@@ -195,7 +201,8 @@ function throttling(octokit, octokitOptions) {
|
|
|
195
201
|
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
|
|
196
202
|
// The Retry-After header can sometimes be blank when hitting a secondary rate limit,
|
|
197
203
|
// but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.
|
|
198
|
-
const retryAfter =
|
|
204
|
+
const retryAfter = Number(error.response.headers["retry-after"]) ||
|
|
205
|
+
state.fallbackSecondaryRateRetryAfter;
|
|
199
206
|
const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit, retryCount);
|
|
200
207
|
return { wantRetry, retryAfter };
|
|
201
208
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/wrap-request.js","../dist-src/generated/triggers-notification-paths.js","../dist-src/route-matcher.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.3.2\";\n","const noop = () => Promise.resolve();\n// @ts-expect-error\nexport function wrapRequest(state, request, options) {\n return state.retryLimiter.schedule(doRequest, state, request, options);\n}\n// @ts-expect-error\nasync function doRequest(state, request, options) {\n const isWrite = options.method !== \"GET\" && options.method !== \"HEAD\";\n const { pathname } = new URL(options.url, \"http://github.test\");\n const isSearch = options.method === \"GET\" && pathname.startsWith(\"/search/\");\n const isGraphQL = pathname.startsWith(\"/graphql\");\n const retryCount = ~~request.retryCount;\n const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {};\n if (state.clustering) {\n // Remove a job from Redis if it has not completed or failed within 60s\n // Examples: Node process terminated, client disconnected, etc.\n // @ts-expect-error\n jobOptions.expiration = 1000 * 60;\n }\n // Guarantee at least 1000ms between writes\n // GraphQL can also trigger writes\n if (isWrite || isGraphQL) {\n await state.write.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 3000ms between requests that trigger notifications\n if (isWrite && state.triggersNotification(pathname)) {\n await state.notifications.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 2000ms between search requests\n if (isSearch) {\n await state.search.key(state.id).schedule(jobOptions, noop);\n }\n const req = state.global.key(state.id).schedule(jobOptions, request, options);\n if (isGraphQL) {\n const res = await req;\n if (res.data.errors != null &&\n // @ts-expect-error\n res.data.errors.some((error) => error.type === \"RATE_LIMITED\")) {\n const error = Object.assign(new Error(\"GraphQL Rate Limit Exceeded\"), {\n response: res,\n data: res.data,\n });\n throw error;\n }\n }\n return req;\n}\n","export default [\n \"/orgs/{org}/invitations\",\n \"/orgs/{org}/invitations/{invitation_id}\",\n \"/orgs/{org}/teams/{team_slug}/discussions\",\n \"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"/repos/{owner}/{repo}/collaborators/{username}\",\n \"/repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"/repos/{owner}/{repo}/issues\",\n \"/repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"/repos/{owner}/{repo}/pulls\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/merge\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"/repos/{owner}/{repo}/releases\",\n \"/teams/{team_id}/discussions\",\n \"/teams/{team_id}/discussions/{discussion_number}/comments\",\n];\n","export function routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((path) => path\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\n","// @ts-expect-error\nimport BottleneckLight from \"bottleneck/light\";\nimport { VERSION } from \"./version\";\nimport { wrapRequest } from \"./wrap-request\";\nimport triggersNotificationPaths from \"./generated/triggers-notification-paths\";\nimport { routeMatcher } from \"./route-matcher\";\n// Workaround to allow tests to directly access the triggersNotification function.\nconst regex = routeMatcher(triggersNotificationPaths);\nconst triggersNotification = regex.test.bind(regex);\nconst groups = {};\n// @ts-expect-error\nconst createGroups = function (Bottleneck, common) {\n groups.global = new Bottleneck.Group({\n id: \"octokit-global\",\n maxConcurrent: 10,\n ...common,\n });\n groups.search = new Bottleneck.Group({\n id: \"octokit-search\",\n maxConcurrent: 1,\n minTime: 2000,\n ...common,\n });\n groups.write = new Bottleneck.Group({\n id: \"octokit-write\",\n maxConcurrent: 1,\n minTime: 1000,\n ...common,\n });\n groups.notifications = new Bottleneck.Group({\n id: \"octokit-notifications\",\n maxConcurrent: 1,\n minTime: 3000,\n ...common,\n });\n};\nexport function throttling(octokit, octokitOptions) {\n const { enabled = true, Bottleneck = BottleneckLight, id = \"no-id\", timeout = 1000 * 60 * 2, // Redis TTL: 2 minutes\n connection, } = octokitOptions.throttle || {};\n if (!enabled) {\n return {};\n }\n const common = { connection, timeout };\n if (groups.global == null) {\n createGroups(Bottleneck, common);\n }\n const state = Object.assign({\n clustering: connection != null,\n triggersNotification,\n minimumSecondaryRateRetryAfter: 5,\n retryAfterBaseValue: 1000,\n retryLimiter: new Bottleneck(),\n id,\n ...groups,\n }, octokitOptions.throttle);\n const isUsingDeprecatedOnAbuseLimitHandler = typeof state.onAbuseLimit === \"function\" && state.onAbuseLimit;\n if (typeof (isUsingDeprecatedOnAbuseLimitHandler\n ? state.onAbuseLimit\n : state.onSecondaryRateLimit) !== \"function\" ||\n typeof state.onRateLimit !== \"function\") {\n throw new Error(`octokit/plugin-throttling error:\n You must pass the onSecondaryRateLimit and onRateLimit error handlers.\n See https://github.com/octokit/rest.js#throttling\n\n const octokit = new Octokit({\n throttle: {\n onSecondaryRateLimit: (retryAfter, options) => {/* ... */},\n onRateLimit: (retryAfter, options) => {/* ... */}\n }\n })\n `);\n }\n const events = {};\n const emitter = new Bottleneck.Events(events);\n // @ts-expect-error\n events.on(\"secondary-limit\", isUsingDeprecatedOnAbuseLimitHandler\n ? function (...args) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead\");\n // @ts-expect-error\n return state.onAbuseLimit(...args);\n }\n : state.onSecondaryRateLimit);\n // @ts-expect-error\n events.on(\"rate-limit\", state.onRateLimit);\n // @ts-expect-error\n events.on(\"error\", (e) => octokit.log.warn(\"Error in throttling-plugin limit handler\", e));\n // @ts-expect-error\n state.retryLimiter.on(\"failed\", async function (error, info) {\n const [state, request, options] = info.args;\n const { pathname } = new URL(options.url, \"http://github.test\");\n const shouldRetryGraphQL = pathname.startsWith(\"/graphql\") && error.status !== 401;\n if (!(shouldRetryGraphQL || error.status === 403)) {\n return;\n }\n const retryCount = ~~request.retryCount;\n request.retryCount = retryCount;\n // backward compatibility\n options.request.retryCount = retryCount;\n const { wantRetry, retryAfter = 0 } = await (async function () {\n if (/\\bsecondary rate\\b/i.test(error.message)) {\n // The user has hit the secondary rate limit. (REST and GraphQL)\n // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits\n // The Retry-After header can sometimes be blank when hitting a secondary rate limit,\n // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.\n const retryAfter = Math.max(~~error.response.headers[\"retry-after\"], state.minimumSecondaryRateRetryAfter);\n const wantRetry = await emitter.trigger(\"secondary-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n if (error.response.headers != null &&\n error.response.headers[\"x-ratelimit-remaining\"] === \"0\") {\n // The user has used all their allowed calls for the current time period (REST and GraphQL)\n // https://docs.github.com/en/rest/reference/rate-limit (REST)\n // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL)\n const rateLimitReset = new Date(~~error.response.headers[\"x-ratelimit-reset\"] * 1000).getTime();\n const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0);\n const wantRetry = await emitter.trigger(\"rate-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n return {};\n })();\n if (wantRetry) {\n request.retryCount++;\n return retryAfter * state.retryAfterBaseValue;\n }\n });\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n return {};\n}\nthrottling.VERSION = VERSION;\nthrottling.triggersNotification = triggersNotification;\n"],"names":[],"mappings":";;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC;AACA,AAAO,SAAS,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;AACrD,IAAI,OAAO,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC;AACD;AACA,eAAe,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;AAClD,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;AAC1E,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;AACpE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E,CAAC;AAChH,gBAAgB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAChG,gBAAgB,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAChH,gBAAgB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AACjD,aAAa;AACb,YAAY,OAAO,EAAE,CAAC;AACtB,SAAS,GAAG,CAAC;AACb,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,OAAO,CAAC,UAAU,EAAE,CAAC;AACjC,YAAY,OAAO,UAAU,GAAG,KAAK,CAAC,mBAAmB,CAAC;AAC1D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,IAAI,OAAO,EAAE,CAAC;AACd,CAAC;AACD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,UAAU,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/wrap-request.js","../dist-src/generated/triggers-notification-paths.js","../dist-src/route-matcher.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.2.3\";\n","const noop = () => Promise.resolve();\n// @ts-expect-error\nexport function wrapRequest(state, request, options) {\n return state.retryLimiter.schedule(doRequest, state, request, options);\n}\n// @ts-expect-error\nasync function doRequest(state, request, options) {\n const isWrite = options.method !== \"GET\" && options.method !== \"HEAD\";\n const { pathname } = new URL(options.url, \"http://github.test\");\n const isSearch = options.method === \"GET\" && pathname.startsWith(\"/search/\");\n const isGraphQL = pathname.startsWith(\"/graphql\");\n const retryCount = ~~request.retryCount;\n const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {};\n if (state.clustering) {\n // Remove a job from Redis if it has not completed or failed within 60s\n // Examples: Node process terminated, client disconnected, etc.\n // @ts-expect-error\n jobOptions.expiration = 1000 * 60;\n }\n // Guarantee at least 1000ms between writes\n // GraphQL can also trigger writes\n if (isWrite || isGraphQL) {\n await state.write.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 3000ms between requests that trigger notifications\n if (isWrite && state.triggersNotification(pathname)) {\n await state.notifications.key(state.id).schedule(jobOptions, noop);\n }\n // Guarantee at least 2000ms between search requests\n if (isSearch) {\n await state.search.key(state.id).schedule(jobOptions, noop);\n }\n const req = state.global.key(state.id).schedule(jobOptions, request, options);\n if (isGraphQL) {\n const res = await req;\n if (res.data.errors != null &&\n // @ts-expect-error\n res.data.errors.some((error) => error.type === \"RATE_LIMITED\")) {\n const error = Object.assign(new Error(\"GraphQL Rate Limit Exceeded\"), {\n response: res,\n data: res.data,\n });\n throw error;\n }\n }\n return req;\n}\n","export default [\n \"/orgs/{org}/invitations\",\n \"/orgs/{org}/invitations/{invitation_id}\",\n \"/orgs/{org}/teams/{team_slug}/discussions\",\n \"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"/repos/{owner}/{repo}/collaborators/{username}\",\n \"/repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"/repos/{owner}/{repo}/issues\",\n \"/repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"/repos/{owner}/{repo}/pulls\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/merge\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"/repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"/repos/{owner}/{repo}/releases\",\n \"/teams/{team_id}/discussions\",\n \"/teams/{team_id}/discussions/{discussion_number}/comments\",\n];\n","export function routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((path) => path\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\n","// @ts-expect-error\nimport BottleneckLight from \"bottleneck/light\";\nimport { VERSION } from \"./version\";\nimport { wrapRequest } from \"./wrap-request\";\nimport triggersNotificationPaths from \"./generated/triggers-notification-paths\";\nimport { routeMatcher } from \"./route-matcher\";\n// Workaround to allow tests to directly access the triggersNotification function.\nconst regex = routeMatcher(triggersNotificationPaths);\nconst triggersNotification = regex.test.bind(regex);\nconst groups = {};\n// @ts-expect-error\nconst createGroups = function (Bottleneck, common) {\n groups.global = new Bottleneck.Group({\n id: \"octokit-global\",\n maxConcurrent: 10,\n ...common,\n });\n groups.search = new Bottleneck.Group({\n id: \"octokit-search\",\n maxConcurrent: 1,\n minTime: 2000,\n ...common,\n });\n groups.write = new Bottleneck.Group({\n id: \"octokit-write\",\n maxConcurrent: 1,\n minTime: 1000,\n ...common,\n });\n groups.notifications = new Bottleneck.Group({\n id: \"octokit-notifications\",\n maxConcurrent: 1,\n minTime: 3000,\n ...common,\n });\n};\nexport function throttling(octokit, octokitOptions) {\n const { enabled = true, Bottleneck = BottleneckLight, id = \"no-id\", timeout = 1000 * 60 * 2, // Redis TTL: 2 minutes\n connection, } = octokitOptions.throttle || {};\n if (!enabled) {\n return {};\n }\n const common = { connection, timeout };\n if (groups.global == null) {\n createGroups(Bottleneck, common);\n }\n if (octokitOptions.throttle &&\n octokitOptions.throttle.minimalSecondaryRateRetryAfter) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead\");\n octokitOptions.throttle.fallbackSecondaryRateRetryAfter =\n octokitOptions.throttle.minimalSecondaryRateRetryAfter;\n delete octokitOptions.throttle.minimalSecondaryRateRetryAfter;\n }\n if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) {\n octokit.log.warn(\"[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead\");\n // @ts-ignore types don't allow for both properties to be set\n octokitOptions.throttle.onSecondaryRateLimit =\n octokitOptions.throttle.onAbuseLimit;\n // @ts-ignore\n delete octokitOptions.throttle.onAbuseLimit;\n }\n const state = Object.assign({\n clustering: connection != null,\n triggersNotification,\n fallbackSecondaryRateRetryAfter: 60,\n retryAfterBaseValue: 1000,\n retryLimiter: new Bottleneck(),\n id,\n ...groups,\n }, octokitOptions.throttle);\n if (typeof state.onSecondaryRateLimit !== \"function\" ||\n typeof state.onRateLimit !== \"function\") {\n throw new Error(`octokit/plugin-throttling error:\n You must pass the onSecondaryRateLimit and onRateLimit error handlers.\n See https://octokit.github.io/rest.js/#throttling\n\n const octokit = new Octokit({\n throttle: {\n onSecondaryRateLimit: (retryAfter, options) => {/* ... */},\n onRateLimit: (retryAfter, options) => {/* ... */}\n }\n })\n `);\n }\n const events = {};\n const emitter = new Bottleneck.Events(events);\n // @ts-expect-error\n events.on(\"secondary-limit\", state.onSecondaryRateLimit);\n // @ts-expect-error\n events.on(\"rate-limit\", state.onRateLimit);\n // @ts-expect-error\n events.on(\"error\", (e) => octokit.log.warn(\"Error in throttling-plugin limit handler\", e));\n // @ts-expect-error\n state.retryLimiter.on(\"failed\", async function (error, info) {\n const [state, request, options] = info.args;\n const { pathname } = new URL(options.url, \"http://github.test\");\n const shouldRetryGraphQL = pathname.startsWith(\"/graphql\") && error.status !== 401;\n if (!(shouldRetryGraphQL || error.status === 403)) {\n return;\n }\n const retryCount = ~~request.retryCount;\n request.retryCount = retryCount;\n // backward compatibility\n options.request.retryCount = retryCount;\n const { wantRetry, retryAfter = 0 } = await (async function () {\n if (/\\bsecondary rate\\b/i.test(error.message)) {\n // The user has hit the secondary rate limit. (REST and GraphQL)\n // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits\n // The Retry-After header can sometimes be blank when hitting a secondary rate limit,\n // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.\n const retryAfter = Number(error.response.headers[\"retry-after\"]) ||\n state.fallbackSecondaryRateRetryAfter;\n const wantRetry = await emitter.trigger(\"secondary-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n if (error.response.headers != null &&\n error.response.headers[\"x-ratelimit-remaining\"] === \"0\") {\n // The user has used all their allowed calls for the current time period (REST and GraphQL)\n // https://docs.github.com/en/rest/reference/rate-limit (REST)\n // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL)\n const rateLimitReset = new Date(~~error.response.headers[\"x-ratelimit-reset\"] * 1000).getTime();\n const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0);\n const wantRetry = await emitter.trigger(\"rate-limit\", retryAfter, options, octokit, retryCount);\n return { wantRetry, retryAfter };\n }\n return {};\n })();\n if (wantRetry) {\n request.retryCount++;\n return retryAfter * state.retryAfterBaseValue;\n }\n });\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n return {};\n}\nthrottling.VERSION = VERSION;\nthrottling.triggersNotification = triggersN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;AACb,YAAY,OAAO,EAAE,CAAC;AACtB,SAAS,GAAG,CAAC;AACb,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,OAAO,CAAC,UAAU,EAAE,CAAC;AACjC,YAAY,OAAO,UAAU,GAAG,KAAK,CAAC,mBAAmB,CAAC;AAC1D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,IAAI,OAAO,EAAE,CAAC;AACd,CAAC;AACD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,UAAU,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octokit/plugin-throttling",
|
|
3
3
|
"description": "Octokit plugin for GitHub's recommended request throttling",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.2.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist
|
|
8
|
-
"bin
|
|
7
|
+
"dist-*/**",
|
|
8
|
+
"bin/**"
|
|
9
9
|
],
|
|
10
10
|
"source": "dist-src/index.js",
|
|
11
11
|
"types": "dist-types/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"repository": "github:octokit/plugin-throttling.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@octokit/types": "^
|
|
18
|
+
"@octokit/types": "^9.0.0",
|
|
19
19
|
"bottleneck": "^2.15.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@types/jest": "^29.0.0",
|
|
33
33
|
"@types/node": "^18.0.0",
|
|
34
34
|
"fetch-mock": "^9.0.0",
|
|
35
|
-
"github-openapi-graphql-query": "^
|
|
35
|
+
"github-openapi-graphql-query": "^4.0.0",
|
|
36
36
|
"jest": "^29.0.0",
|
|
37
37
|
"npm-run-all": "^4.1.5",
|
|
38
|
-
"prettier": "2.
|
|
38
|
+
"prettier": "2.8.8",
|
|
39
39
|
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
|
40
40
|
"ts-jest": "^29.0.0",
|
|
41
|
-
"typescript": "^
|
|
41
|
+
"typescript": "^5.0.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">= 14"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@octokit/request)
|
|
6
|
-
[](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%
|
|
6
|
+
[](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain)
|
|
7
7
|
|
|
8
8
|
`@octokit/request` is a request library for browsers & node that makes it easier
|
|
9
9
|
to interact with [GitHub’s REST API](https://developer.github.com/v3/) and
|
|
@@ -71,10 +71,10 @@ request("POST /repos/{owner}/{repo}/issues/{number}/labels", {
|
|
|
71
71
|
Browsers
|
|
72
72
|
</th><td width=100%>
|
|
73
73
|
Load <code>@octokit/request</code> directly from <a href="https://cdn.skypack.dev">cdn.skypack.dev</a>
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
```html
|
|
76
76
|
<script type="module">
|
|
77
|
-
import { request } from "https://cdn.skypack.dev/@octokit/request";
|
|
77
|
+
import { request } from "https://cdn.skypack.dev/@octokit/request";
|
|
78
78
|
</script>
|
|
79
79
|
```
|
|
80
80
|
|