From 5414acdbd7a756b4576ae7de3913d0ae2d7f94dc Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Sun, 6 Oct 2024 20:46:15 +0900 Subject: [PATCH] fix: compile error fixes --- package.json | 15 +- src/helpers/web3.ts | 4 +- src/octokit.ts | 12 +- src/parser/content-evaluator-module.ts | 10 +- src/start.ts | 28 --- tests/parser/permit-generation-module.test.ts | 2 + tsconfig.json | 13 +- yarn.lock | 211 ++++++++++++------ 8 files changed, 178 insertions(+), 117 deletions(-) diff --git a/package.json b/package.json index 2e11fa04..47dcfc30 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,13 @@ "open-source" ], "dependencies": { - "@actions/core": "1.10.1", + "@actions/core": "1.11.1", "@actions/github": "6.0.0", - "@octokit/graphql-schema": "15.25.0", - "@octokit/plugin-paginate-graphql": "5.2.2", - "@octokit/plugin-retry": "6.0.1", - "@octokit/rest": "20.1.0", - "@octokit/webhooks": "13.2.7", + "@octokit/graphql-schema": "^15.25.0", + "@octokit/plugin-paginate-graphql": "^5.2.3", + "@octokit/plugin-retry": "^7.1.2", + "@octokit/rest": "^21.0.2", + "@octokit/webhooks": "^13.3.0", "@sinclair/typebox": "0.32.23", "@supabase/supabase-js": "2.42.0", "@ubiquibot/permit-generation": "^1.6.0", @@ -40,7 +40,7 @@ "decimal.js": "10.4.3", "dotenv": "16.4.5", "ethers": "^6.13.0", - "js-tiktoken": "1.0.14", + "js-tiktoken": "1.0.15", "jsdom": "24.0.0", "markdown-it": "14.1.0", "openai": "4.56.0", @@ -64,6 +64,7 @@ "@types/node": "20.11.28", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", + "@vercel/ncc": "0.38.2", "babel-jest": "29.7.0", "cspell": "8.3.2", "eslint": "8.56.0", diff --git a/src/helpers/web3.ts b/src/helpers/web3.ts index 49f7eac2..ca0195b7 100644 --- a/src/helpers/web3.ts +++ b/src/helpers/web3.ts @@ -1,4 +1,4 @@ -import { RPCHandler, HandlerConstructorConfig } from "@ubiquity-dao/rpc-handler/"; +import { RPCHandler, HandlerConstructorConfig } from "@ubiquity-dao/rpc-handler"; import { ethers } from "ethers"; /** @@ -12,6 +12,7 @@ export async function getERC20TokenSymbol(networkId: number, tokenAddress: strin // get fastest RPC const config: HandlerConstructorConfig = { + // @ts-expect-error expects an enum when imported through ESNext networkId: networkId, rpcTimeout: 1500, autoStorage: false, @@ -21,6 +22,7 @@ export async function getERC20TokenSymbol(networkId: number, tokenAddress: strin const provider = await handler.getFastestRpcProvider(); // fetch token symbol + // @ts-expect-error expects a contract when imported through ESNext const contract = new ethers.Contract(tokenAddress, abi, provider); return await contract.symbol(); } diff --git a/src/octokit.ts b/src/octokit.ts index 2d6a35eb..921d56e6 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -2,11 +2,15 @@ import { Octokit } from "@octokit/rest"; import { retry } from "@octokit/plugin-retry"; import program from "./parser/command-line"; import configuration from "./configuration/config-reader"; -import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; +import { paginateGraphQL, paginateGraphQLInterface } from "@octokit/plugin-paginate-graphql"; +// @ts-expect-error retry and paginateGraphql do not use latest hook types +// https://github.com/octokit/plugin-retry.js/issues/528 const customOctokit = Octokit.plugin(retry, paginateGraphQL); -let octokitInstance: InstanceType | null = null; +type OctokitInstanceType = InstanceType & paginateGraphQLInterface; + +let octokitInstance: OctokitInstanceType | null = null; function getOctokitInstance() { if (!octokitInstance) { @@ -16,9 +20,9 @@ function getOctokitInstance() { retries: configuration.dataCollection.maxAttempts, retryAfterBaseValue: configuration.dataCollection.delayMs, }, - }); + }) as OctokitInstanceType; } - return octokitInstance; + return octokitInstance as OctokitInstanceType; } export { getOctokitInstance }; diff --git a/src/parser/content-evaluator-module.ts b/src/parser/content-evaluator-module.ts index 6a0bfee4..d8d86f61 100644 --- a/src/parser/content-evaluator-module.ts +++ b/src/parser/content-evaluator-module.ts @@ -1,5 +1,4 @@ import Decimal from "decimal.js"; -import { encodingForModel, Tiktoken } from "js-tiktoken"; import OpenAI from "openai"; import configuration from "../configuration/config-reader"; import { OPENAI_API_KEY } from "../configuration/constants"; @@ -13,12 +12,13 @@ import { Value } from "@sinclair/typebox/value"; import { commentEnum, CommentKind, CommentType } from "../configuration/comment-types"; import logger from "../helpers/logger"; import { - openAiRelevanceResponseSchema, + AllComments, CommentToEvaluate, - Relevances, + openAiRelevanceResponseSchema, PrCommentToEvaluate, - AllComments, + Relevances, } from "../types/content-evaluator-module-type"; +import { encodingForModel } from "js-tiktoken"; /** * Evaluates and rates comments. @@ -140,7 +140,7 @@ export class ContentEvaluatorModule implements Module { * Will try to predict the maximum of tokens expected, to a maximum of totalTokenLimit. */ _calculateMaxTokens(prompt: string, totalTokenLimit: number = 16384) { - const tokenizer: Tiktoken = encodingForModel("gpt-4o-2024-08-06"); + const tokenizer = encodingForModel("gpt-4o-2024-08-06"); const inputTokens = tokenizer.encode(prompt).length; return Math.min(inputTokens, totalTokenLimit); } diff --git a/src/start.ts b/src/start.ts index c43f69d2..7562b170 100644 --- a/src/start.ts +++ b/src/start.ts @@ -8,7 +8,6 @@ import { GitHubPullRequestReviewState, GitHubRepository, GitHubTimelineEvent, - GitHubUser, } from "./github-types"; import { getMinimizedCommentStatus } from "./helpers/get-comment-details"; @@ -96,33 +95,6 @@ export async function getPullRequestReviewComments(pullParams: PullParams): Prom return await octokit.paginate(octokit.pulls.listReviewComments.endpoint.merge(pullParams)); } -// eslint-disable-next-line @typescript-eslint/no-unused-vars -async function getAllIssueActivity(issueParams: IssueParams) { - // @DEV: this is very useful for seeing every type of event, - // which includes the issue specification, any events, and all conversation - // that has occurred on the issue in chronological order - - const octokit = getOctokitInstance(); - const [issue, events, comments] = await Promise.all([ - octokit.issues.get(issueParams), - octokit.paginate(octokit.issues.listEvents.endpoint.merge(issueParams)), - octokit.paginate(octokit.issues.listComments.endpoint.merge(issueParams)), - ]); - - const mixedEventsAndComments = [...events, ...comments]; - mixedEventsAndComments.sort((a, b) => new Date(a.created_at).getTime() - new Date(b.created_at).getTime()); - // Prepend the issue to the events array - mixedEventsAndComments.unshift(issue.data); - return mixedEventsAndComments; -} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -async function getTimelineUsers(issueParams: IssueParams): Promise { - const timelineEvents = await getAllTimelineEvents(issueParams); - const users = timelineEvents.filter((event) => event.actor).map((event) => event.actor); - return [...new Set(users)]; -} - export async function getAllTimelineEvents(issueParams: IssueParams): Promise { const octokit = getOctokitInstance(); const options = octokit.issues.listEventsForTimeline.endpoint.merge(issueParams); diff --git a/tests/parser/permit-generation-module.test.ts b/tests/parser/permit-generation-module.test.ts index 7705a471..dd1eaee3 100644 --- a/tests/parser/permit-generation-module.test.ts +++ b/tests/parser/permit-generation-module.test.ts @@ -70,6 +70,7 @@ const resultOriginal: Result = { type: CommentKind.ISSUE, score: { reward: 10, + multiplier: 1, }, }, ], @@ -89,6 +90,7 @@ const resultOriginal: Result = { type: CommentKind.ISSUE, score: { reward: 1.12, + multiplier: 1, }, }, ], diff --git a/tsconfig.json b/tsconfig.json index 54f91018..60af739b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,11 +25,18 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "Node16" /* Specify what module code is generated. */, + "module": "ESNext" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */, // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + "paths": { + "@ubiquibot/permit-generation/core": [ + "node_modules/@ubiquibot/permit-generation/dist/core/index.d.ts" + ], + "@ubiquibot/permit-generation/utils": [ + "node_modules/@ubiquibot/permit-generation/dist/utils/index.d.ts" + ] + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ diff --git a/yarn.lock b/yarn.lock index e04917b1..2e83a680 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,15 @@ # yarn lockfile v1 -"@actions/core@1.10.1", "@actions/core@^1.10.1": +"@actions/core@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.11.1.tgz#ae683aac5112438021588030efb53b1adb86f172" + integrity sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A== + dependencies: + "@actions/exec" "^1.1.1" + "@actions/http-client" "^2.0.1" + +"@actions/core@^1.10.1": version "1.10.1" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a" integrity sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g== @@ -10,6 +18,13 @@ "@actions/http-client" "^2.0.1" uuid "^8.3.2" +"@actions/exec@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.1.1.tgz#2e43f28c54022537172819a7cf886c844221a611" + integrity sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w== + dependencies: + "@actions/io" "^1.0.1" + "@actions/github@6.0.0", "@actions/github@^6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@actions/github/-/github-6.0.0.tgz#65883433f9d81521b782a64cc1fd45eef2191ea7" @@ -28,6 +43,11 @@ tunnel "^0.0.6" undici "^5.25.4" +"@actions/io@^1.0.1": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.3.tgz#4cdb6254da7962b07473ff5c335f3da485d94d71" + integrity sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q== + "@adraffy/ens-normalize@1.10.1": version "1.10.1" resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" @@ -2559,6 +2579,11 @@ resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-4.0.0.tgz#40d203ea827b9f17f42a29c6afb93b7745ef80c7" integrity sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA== +"@octokit/auth-token@^5.0.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-5.1.1.tgz#3bbfe905111332a17f72d80bd0b51a3e2fa2cf07" + integrity sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA== + "@octokit/core@^5.0.1", "@octokit/core@^5.0.2": version "5.2.0" resolved "https://registry.yarnpkg.com/@octokit/core/-/core-5.2.0.tgz#ddbeaefc6b44a39834e1bb2e58a49a117672a7ea" @@ -2572,6 +2597,27 @@ before-after-hook "^2.2.0" universal-user-agent "^6.0.0" +"@octokit/core@^6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-6.1.2.tgz#20442d0a97c411612da206411e356014d1d1bd17" + integrity sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg== + dependencies: + "@octokit/auth-token" "^5.0.0" + "@octokit/graphql" "^8.0.0" + "@octokit/request" "^9.0.0" + "@octokit/request-error" "^6.0.1" + "@octokit/types" "^13.0.0" + before-after-hook "^3.0.2" + universal-user-agent "^7.0.0" + +"@octokit/endpoint@^10.0.0": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-10.1.1.tgz#1a9694e7aef6aa9d854dc78dd062945945869bcc" + integrity sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q== + dependencies: + "@octokit/types" "^13.0.0" + universal-user-agent "^7.0.2" + "@octokit/endpoint@^9.0.1": version "9.0.5" resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-9.0.5.tgz#e6c0ee684e307614c02fc6ac12274c50da465c44" @@ -2580,7 +2626,7 @@ "@octokit/types" "^13.1.0" universal-user-agent "^6.0.0" -"@octokit/graphql-schema@15.25.0": +"@octokit/graphql-schema@^15.25.0": version "15.25.0" resolved "https://registry.yarnpkg.com/@octokit/graphql-schema/-/graphql-schema-15.25.0.tgz#30bb8ecc494c249650991b33f2f0d9332dbe87e9" integrity sha512-aqz9WECtdxVWSqgKroUu9uu+CRt5KnfErWs0dBPKlTdrreAeWzS5NRu22ZVcGdPP7s3XDg2Gnf5iyoZPCRZWmQ== @@ -2597,6 +2643,15 @@ "@octokit/types" "^13.0.0" universal-user-agent "^6.0.0" +"@octokit/graphql@^8.0.0": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-8.1.1.tgz#3cacab5f2e55d91c733e3bf481d3a3f8a5f639c4" + integrity sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg== + dependencies: + "@octokit/request" "^9.0.0" + "@octokit/types" "^13.0.0" + universal-user-agent "^7.0.0" + "@octokit/openapi-types@^20.0.0": version "20.0.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-20.0.0.tgz#9ec2daa0090eeb865ee147636e0c00f73790c6e5" @@ -2607,20 +2662,15 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-22.2.0.tgz#75aa7dcd440821d99def6a60b5f014207ae4968e" integrity sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg== -"@octokit/openapi-webhooks-types@8.2.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-8.2.1.tgz#08b974f1e83a75c4d3ce23f798c7667b433bf4cd" - integrity sha512-msAU1oTSm0ZmvAE0xDemuF4tVs5i0xNnNGtNmr4EuATi+1Rn8cZDetj6NXioSf5LwnxEc209COa/WOSbjuhLUA== - "@octokit/openapi-webhooks-types@8.3.0": version "8.3.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-8.3.0.tgz#a7a4da00c0f27f7f5708eb3fcebefa08f8d51125" integrity sha512-vKLsoR4xQxg4Z+6rU/F65ItTUz/EXbD+j/d4mlq2GW8TsA4Tc8Kdma2JTAAJ5hrKWUQzkR/Esn2fjsqiVRYaQg== -"@octokit/plugin-paginate-graphql@5.2.2": - version "5.2.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-5.2.2.tgz#54e2afef55bb204eb945a891b85a169b9ddad1f8" - integrity sha512-7znSVvlNAOJisCqAnjN1FtEziweOHSjPGAuc5W58NeGNAr/ZB57yCsjQbXDlWsVryA7hHQaEQPcBbJYFawlkyg== +"@octokit/plugin-paginate-graphql@^5.2.3": + version "5.2.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-5.2.3.tgz#19882ff4694066b0937aea85b7e8eac512df4e9a" + integrity sha512-EzFueuXVU3VHv5FwEXbdznn9EmyF0vA5LGDX6a8fJ9YJAlDgdYHRKJMO4Ghl2PPPJBxIPMDUJMnlUHqcvP7AnQ== "@octokit/plugin-paginate-rest@11.3.1": version "11.3.1" @@ -2629,7 +2679,14 @@ dependencies: "@octokit/types" "^13.5.0" -"@octokit/plugin-paginate-rest@^9.0.0", "@octokit/plugin-paginate-rest@^9.1.5": +"@octokit/plugin-paginate-rest@^11.0.0": + version "11.3.5" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz#a1929b3ba3dc7b63bc73bb6d3c7a3faf2a9c7649" + integrity sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ== + dependencies: + "@octokit/types" "^13.6.0" + +"@octokit/plugin-paginate-rest@^9.0.0": version "9.2.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz#2e2a2f0f52c9a4b1da1a3aa17dabe3c459b9e401" integrity sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw== @@ -2641,6 +2698,11 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz#98a3ca96e0b107380664708111864cb96551f958" integrity sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA== +"@octokit/plugin-request-log@^5.3.1": + version "5.3.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz#ccb75d9705de769b2aa82bcd105cc96eb0c00f69" + integrity sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw== + "@octokit/plugin-rest-endpoint-methods@13.2.2": version "13.2.2" resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz#af8e5dd2cddfea576f92ffaf9cb84659f302a638" @@ -2648,23 +2710,30 @@ dependencies: "@octokit/types" "^13.5.0" -"@octokit/plugin-rest-endpoint-methods@^10.0.0", "@octokit/plugin-rest-endpoint-methods@^10.2.0": +"@octokit/plugin-rest-endpoint-methods@^10.0.0": version "10.4.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz#41ba478a558b9f554793075b2e20cd2ef973be17" integrity sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg== dependencies: "@octokit/types" "^12.6.0" -"@octokit/plugin-retry@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz#3257404f7cc418e1c1f13a7f2012c1db848b7693" - integrity sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog== +"@octokit/plugin-rest-endpoint-methods@^13.0.0": + version "13.2.6" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz#b9d343dbe88a6cb70cc7fa16faa98f0a29ffe654" + integrity sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw== dependencies: - "@octokit/request-error" "^5.0.0" - "@octokit/types" "^12.0.0" + "@octokit/types" "^13.6.1" + +"@octokit/plugin-retry@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-retry/-/plugin-retry-7.1.2.tgz#242e2d19a72a50b5113bb25d7d2c622ce0373fa0" + integrity sha512-XOWnPpH2kJ5VTwozsxGurw+svB2e61aWlmk5EVIYZPwFK5F9h4cyPyj9CIKRyMXMHSwpIsI3mPOdpMmrRhe7UQ== + dependencies: + "@octokit/request-error" "^6.0.0" + "@octokit/types" "^13.0.0" bottleneck "^2.15.3" -"@octokit/request-error@^5.0.0", "@octokit/request-error@^5.1.0": +"@octokit/request-error@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-5.1.0.tgz#ee4138538d08c81a60be3f320cd71063064a3b30" integrity sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q== @@ -2673,6 +2742,13 @@ deprecation "^2.0.0" once "^1.4.0" +"@octokit/request-error@^6.0.0": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-6.1.5.tgz#907099e341c4e6179db623a0328d678024f54653" + integrity sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ== + dependencies: + "@octokit/types" "^13.0.0" + "@octokit/request-error@^6.0.1": version "6.1.4" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-6.1.4.tgz#ad96e29148d19edc2ba8009fc2b5a24a36c90f16" @@ -2690,15 +2766,15 @@ "@octokit/types" "^13.1.0" universal-user-agent "^6.0.0" -"@octokit/rest@20.1.0": - version "20.1.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-20.1.0.tgz#78310528f4849a69b44b15ccd27f99c7e737bb7d" - integrity sha512-STVO3itHQLrp80lvcYB2UIKoeil5Ctsgd2s1AM+du3HqZIR35ZH7WE9HLwUOLXH0myA0y3AGNPo8gZtcgIbw0g== +"@octokit/request@^9.0.0": + version "9.1.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-9.1.3.tgz#42b693bc06238f43af3c037ebfd35621c6457838" + integrity sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA== dependencies: - "@octokit/core" "^5.0.2" - "@octokit/plugin-paginate-rest" "^9.1.5" - "@octokit/plugin-request-log" "^4.0.0" - "@octokit/plugin-rest-endpoint-methods" "^10.2.0" + "@octokit/endpoint" "^10.0.0" + "@octokit/request-error" "^6.0.1" + "@octokit/types" "^13.1.0" + universal-user-agent "^7.0.2" "@octokit/rest@^20.0.2": version "20.1.1" @@ -2710,7 +2786,17 @@ "@octokit/plugin-request-log" "^4.0.0" "@octokit/plugin-rest-endpoint-methods" "13.2.2" -"@octokit/types@^12.0.0", "@octokit/types@^12.6.0": +"@octokit/rest@^21.0.2": + version "21.0.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-21.0.2.tgz#9b767dbc1098daea8310fd8b76bf7a97215d5972" + integrity sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ== + dependencies: + "@octokit/core" "^6.1.2" + "@octokit/plugin-paginate-rest" "^11.0.0" + "@octokit/plugin-request-log" "^5.3.1" + "@octokit/plugin-rest-endpoint-methods" "^13.0.0" + +"@octokit/types@^12.6.0": version "12.6.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-12.6.0.tgz#8100fb9eeedfe083aae66473bd97b15b62aedcb2" integrity sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw== @@ -2724,22 +2810,19 @@ dependencies: "@octokit/openapi-types" "^22.2.0" +"@octokit/types@^13.6.0", "@octokit/types@^13.6.1": + version "13.6.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.1.tgz#432fc6c0aaae54318e5b2d3e15c22ac97fc9b15f" + integrity sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g== + dependencies: + "@octokit/openapi-types" "^22.2.0" + "@octokit/webhooks-methods@^5.0.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@octokit/webhooks-methods/-/webhooks-methods-5.1.0.tgz#13b6c08f89902c1ab0ddf31c6eeeec9c2772cfe6" integrity sha512-yFZa3UH11VIxYnnoOYCVoJ3q4ChuSOk2IVBBQ0O3xtKX4x9bmKb/1t+Mxixv2iUhzMdOl1qeWJqEhouXXzB3rQ== -"@octokit/webhooks@13.2.7": - version "13.2.7" - resolved "https://registry.yarnpkg.com/@octokit/webhooks/-/webhooks-13.2.7.tgz#03f89b278cd63f271eba3062f0b75ddd18a82252" - integrity sha512-sPHCyi9uZuCs1gg0yF53FFocM+GsiiBEhQQV/itGzzQ8gjyv2GMJ1YvgdDY4lC0ePZeiV3juEw4GbS6w1VHhRw== - dependencies: - "@octokit/openapi-webhooks-types" "8.2.1" - "@octokit/request-error" "^6.0.1" - "@octokit/webhooks-methods" "^5.0.0" - aggregate-error "^5.0.0" - -"@octokit/webhooks@^13.1.0": +"@octokit/webhooks@^13.1.0", "@octokit/webhooks@^13.3.0": version "13.3.0" resolved "https://registry.yarnpkg.com/@octokit/webhooks/-/webhooks-13.3.0.tgz#fd5d54d47c789c75d60a00eb04e982152d7c654a" integrity sha512-TUkJLtI163Bz5+JK0O+zDkQpn4gKwN+BovclUvCj6pI/6RXrFqQvUMRS2M+Rt8Rv0qR3wjoMoOPmpJKeOh0nBg== @@ -3353,6 +3436,11 @@ ethers "^5.7.0" tiny-invariant "^1.1.0" +"@vercel/ncc@0.38.2": + version "0.38.2" + resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.38.2.tgz#d35c3a74c671699ccf316f74bf0ecab6b60e312b" + integrity sha512-3yel3jaxUg9pHBv4+KeC9qlbdZPug+UMtUOlhvpDYCMSgcNSrS2Hv1LoqMsOV7hf2lYscx+BESfJOIla1WsmMQ== + "@zkochan/retry@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@zkochan/retry/-/retry-0.2.0.tgz#cb52c9fce1976f3eed7b1979b739e70706f4a3d2" @@ -3429,14 +3517,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -aggregate-error@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-5.0.0.tgz#ffe15045d7521c51c9d618e3d7f37c13f29b3fd3" - integrity sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw== - dependencies: - clean-stack "^5.2.0" - indent-string "^5.0.0" - ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -3722,6 +3802,11 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== +before-after-hook@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-3.0.2.tgz#d5665a5fa8b62294a5aa0a499f933f4a1016195d" + integrity sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A== + bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -3900,13 +3985,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clean-stack@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-5.2.0.tgz#c7a0c91939c7caace30a3bf254e8a8ac276d1189" - integrity sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ== - dependencies: - escape-string-regexp "5.0.0" - clear-module@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/clear-module/-/clear-module-4.1.2.tgz#5a58a5c9f8dccf363545ad7284cad3c887352a80" @@ -4700,11 +4778,6 @@ escalade@^3.1.1, escalade@^3.1.2: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -5559,11 +5632,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indent-string@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" - integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== - individual@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/individual/-/individual-3.0.0.tgz#e7ca4f85f8957b018734f285750dc22ec2f9862d" @@ -6305,10 +6373,10 @@ js-sha3@0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-tiktoken@1.0.14: - version "1.0.14" - resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.14.tgz#756f353262d559da16b58b5bcecfd93330076da2" - integrity sha512-Pk3l3WOgM9joguZY2k52+jH82RtABRgB5RdGFZNUGbOKGMVlNmafcPA3b0ITcCZPu1L9UclP1tne6aw7ZI4Myg== +js-tiktoken@1.0.15: + version "1.0.15" + resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.15.tgz#92a7d829f6950c2cfb35cc52555502e3d6e2ebac" + integrity sha512-65ruOWWXDEZHHbAo7EjOcNxOGasQKbL4Fq3jEr2xsCqSsoOo6VVSqzWQb6PRIqypFSDcma4jO90YP0w5X8qVXQ== dependencies: base64-js "^1.5.1" @@ -8605,6 +8673,11 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.1.tgz#15f20f55da3c930c57bddbf1734c6654d5fd35aa" integrity sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ== +universal-user-agent@^7.0.0, universal-user-agent@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.2.tgz#52e7d0e9b3dc4df06cc33cb2b9fd79041a54827e" + integrity sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q== + universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"