From 10df587d70d6ae8c260d163ce97cd0e3459f9ed5 Mon Sep 17 00:00:00 2001 From: Andrew Curtis <80860310+meisZWFLZ@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:21:18 +0000 Subject: [PATCH 01/12] chore: there's no need for bin, silly me --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index a9664e8..f66290c 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,6 @@ "semantic-release": "^22.0.8", "typescript": "^5.0.2" }, - "bin": { - "lem-link": "out/index.js" - }, "release": { "branches": [ "stable", From 8979fc1f9871f4a00d010681f9e3fa73c6f11619 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Mon, 11 Dec 2023 15:52:27 -0700 Subject: [PATCH 02/12] ci: :bug: precommit should run the precommit script --- .husky/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index a9c2314..d4a43dd 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npm run check-format +npm run pre-commit From 283b595fb08e8c64fcfb59e4166b2f6a48012955 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Mon, 11 Dec 2023 15:53:36 -0700 Subject: [PATCH 03/12] build: :heavy_plus_sign: add octokit --- package-lock.json | 888 ++++++++++++++++++++++++++++++++-------------- package.json | 3 + 2 files changed, 615 insertions(+), 276 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60b1d42..ea44c59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,11 @@ "name": "@lemlib/lemlink", "version": "0.0.0-development", "license": "MIT", + "dependencies": { + "octokit": "^3.1.2" + }, "bin": { - "lem-link": "out/main.js" + "lem-link": "out/index.js" }, "devDependencies": { "@commitlint/cli": "^18.4.3", @@ -1595,11 +1598,113 @@ "node": ">= 8" } }, + "node_modules/@octokit/app": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@octokit/app/-/app-14.0.2.tgz", + "integrity": "sha512-NCSCktSx+XmjuSUVn2dLfqQ9WIYePGP95SDJs4I9cn/0ZkeXcPkaoCLl64Us3dRKL2ozC7hArwze5Eu+/qt1tg==", + "dependencies": { + "@octokit/auth-app": "^6.0.0", + "@octokit/auth-unauthenticated": "^5.0.0", + "@octokit/core": "^5.0.0", + "@octokit/oauth-app": "^6.0.0", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/types": "^12.0.0", + "@octokit/webhooks": "^12.0.4" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-app": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-6.0.1.tgz", + "integrity": "sha512-tjCD4nzQNZgmLH62+PSnTF6eGerisFgV4v6euhqJik6yWV96e1ZiiGj+NXIqbgnpjLmtnBqVUrNyGKu3DoGEGA==", + "dependencies": { + "@octokit/auth-oauth-app": "^7.0.0", + "@octokit/auth-oauth-user": "^4.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", + "deprecation": "^2.3.1", + "lru-cache": "^10.0.0", + "universal-github-app-jwt": "^1.1.1", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-app/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@octokit/auth-oauth-app": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-7.0.1.tgz", + "integrity": "sha512-RE0KK0DCjCHXHlQBoubwlLijXEKfhMhKm9gO56xYvFmP1QTMb+vvwRPmQLLx0V+5AvV9N9I3lr1WyTzwL3rMDg==", + "dependencies": { + "@octokit/auth-oauth-device": "^6.0.0", + "@octokit/auth-oauth-user": "^4.0.0", + "@octokit/request": "^8.0.2", + "@octokit/types": "^12.0.0", + "@types/btoa-lite": "^1.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-device": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-6.0.1.tgz", + "integrity": "sha512-yxU0rkL65QkjbqQedgVx3gmW7YM5fF+r5uaSj9tM/cQGVqloXcqP2xK90eTyYvl29arFVCW8Vz4H/t47mL0ELw==", + "dependencies": { + "@octokit/oauth-methods": "^4.0.0", + "@octokit/request": "^8.0.0", + "@octokit/types": "^12.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-user": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-4.0.1.tgz", + "integrity": "sha512-N94wWW09d0hleCnrO5wt5MxekatqEJ4zf+1vSe8MKMrhZ7gAXKFOKrDEZW2INltvBWJCyDUELgGRv8gfErH1Iw==", + "dependencies": { + "@octokit/auth-oauth-device": "^6.0.0", + "@octokit/oauth-methods": "^4.0.0", + "@octokit/request": "^8.0.2", + "@octokit/types": "^12.0.0", + "btoa-lite": "^1.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/@octokit/auth-token": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "dev": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-unauthenticated": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-5.0.1.tgz", + "integrity": "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg==", + "dependencies": { + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0" + }, "engines": { "node": ">= 18" } @@ -1608,7 +1713,6 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.2.tgz", "integrity": "sha512-cZUy1gUvd4vttMic7C0lwPed8IYXWYp8kHIMatyhY8t8n3Cpw2ILczkV5pGMPqef7v0bLo0pOHrEHarsau2Ydg==", - "dev": true, "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.0.0", @@ -1626,7 +1730,6 @@ "version": "9.0.3", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.3.tgz", "integrity": "sha512-TXVX57fJV7SA6LvRkeXPIOBr8AKvKDlhwNVBP/26O9DjIFi+CkYZGFLP9WtPdVOicRIhqGHxBCC6Fdj5AWWGgQ==", - "dev": true, "dependencies": { "@octokit/types": "^12.0.0", "universal-user-agent": "^6.0.0" @@ -1639,7 +1742,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", - "dev": true, "dependencies": { "@octokit/request": "^8.0.1", "@octokit/types": "^12.0.0", @@ -1649,17 +1751,81 @@ "node": ">= 18" } }, + "node_modules/@octokit/oauth-app": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-6.0.0.tgz", + "integrity": "sha512-bNMkS+vJ6oz2hCyraT9ZfTpAQ8dZNqJJQVNaKjPLx4ue5RZiFdU1YWXguOPR8AaSHS+lKe+lR3abn2siGd+zow==", + "dependencies": { + "@octokit/auth-oauth-app": "^7.0.0", + "@octokit/auth-oauth-user": "^4.0.0", + "@octokit/auth-unauthenticated": "^5.0.0", + "@octokit/core": "^5.0.0", + "@octokit/oauth-authorization-url": "^6.0.2", + "@octokit/oauth-methods": "^4.0.0", + "@types/aws-lambda": "^8.10.83", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-authorization-url": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-6.0.2.tgz", + "integrity": "sha512-CdoJukjXXxqLNK4y/VOiVzQVjibqoj/xHgInekviUJV73y/BSIcwvJ/4aNHPBPKcPWFnd4/lO9uqRV65jXhcLA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-methods": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-4.0.1.tgz", + "integrity": "sha512-1NdTGCoBHyD6J0n2WGXg9+yDLZrRNZ0moTEex/LSPr49m530WNKcCfXDghofYptr3st3eTii+EHoG5k/o+vbtw==", + "dependencies": { + "@octokit/oauth-authorization-url": "^6.0.2", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", + "btoa-lite": "^1.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/@octokit/openapi-types": { "version": "19.0.2", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.2.tgz", - "integrity": "sha512-8li32fUDUeml/ACRp/njCWTsk5t17cfTM1jp9n08pBrqs5cDFJubtjsSnuz56r5Tad6jdEPJld7LxNp9dNcyjQ==", - "dev": true + "integrity": "sha512-8li32fUDUeml/ACRp/njCWTsk5t17cfTM1jp9n08pBrqs5cDFJubtjsSnuz56r5Tad6jdEPJld7LxNp9dNcyjQ==" + }, + "node_modules/@octokit/plugin-paginate-graphql": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-4.0.0.tgz", + "integrity": "sha512-7HcYW5tP7/Z6AETAPU14gp5H5KmCPT3hmJrS/5tO7HIgbwenYmgw4OY9Ma54FDySuxMwD+wsJlxtuGWwuZuItA==", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } }, "node_modules/@octokit/plugin-paginate-rest": { "version": "9.1.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.4.tgz", "integrity": "sha512-MvZx4WvfhBnt7PtH5XE7HORsO7bBk4er1FgRIUr1qJ89NR2I6bWjGyKsxk8z42FPQ34hFQm0Baanh4gzdZR4gQ==", - "dev": true, + "dependencies": { + "@octokit/types": "^12.3.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz", + "integrity": "sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==", "dependencies": { "@octokit/types": "^12.3.0" }, @@ -1674,7 +1840,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz", "integrity": "sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==", - "dev": true, "dependencies": { "@octokit/request-error": "^5.0.0", "@octokit/types": "^12.0.0", @@ -1691,7 +1856,6 @@ "version": "8.1.3", "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-8.1.3.tgz", "integrity": "sha512-pfyqaqpc0EXh5Cn4HX9lWYsZ4gGbjnSmUILeu4u2gnuM50K/wIk9s1Pxt3lVeVwekmITgN/nJdoh43Ka+vye8A==", - "dev": true, "dependencies": { "@octokit/types": "^12.2.0", "bottleneck": "^2.15.3" @@ -1707,7 +1871,6 @@ "version": "8.1.6", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", - "dev": true, "dependencies": { "@octokit/endpoint": "^9.0.0", "@octokit/request-error": "^5.0.0", @@ -1722,7 +1885,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", - "dev": true, "dependencies": { "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", @@ -1736,11 +1898,65 @@ "version": "12.3.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.3.0.tgz", "integrity": "sha512-nJ8X2HRr234q3w/FcovDlA+ttUU4m1eJAourvfUUtwAWeqL8AsyRqfnLvVnYn3NFbUnsmzQCzLNdFerPwdmcDQ==", - "dev": true, "dependencies": { "@octokit/openapi-types": "^19.0.2" } }, + "node_modules/@octokit/webhooks": { + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-12.0.10.tgz", + "integrity": "sha512-Q8d26l7gZ3L1SSr25NFbbP0B431sovU5r0tIqcvy8Z4PrD1LBv0cJEjvDLOieouzPSTzSzufzRIeXD7S+zAESA==", + "dependencies": { + "@octokit/request-error": "^5.0.0", + "@octokit/webhooks-methods": "^4.0.0", + "@octokit/webhooks-types": "7.1.0", + "aggregate-error": "^3.1.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/webhooks-methods": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-4.0.0.tgz", + "integrity": "sha512-M8mwmTXp+VeolOS/kfRvsDdW+IO0qJ8kYodM/sAysk093q6ApgmBXwK1ZlUvAwXVrp/YVHp6aArj4auAxUAOFw==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/webhooks-types": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.1.0.tgz", + "integrity": "sha512-y92CpG4kFFtBBjni8LHoV12IegJ+KFxLgKRengrVjKmGE5XMeCuGvlfRe75lTRrgXaG6XIWJlFpIDTlkoJsU8w==" + }, + "node_modules/@octokit/webhooks/node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@octokit/webhooks/node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@octokit/webhooks/node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, "node_modules/@pnpm/config.env-replace": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", @@ -2131,6 +2347,11 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@types/aws-lambda": { + "version": "8.10.130", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.130.tgz", + "integrity": "sha512-HxTfLeGvD1wTJqIGwcBCpNmHKenja+We1e0cuzeIDFfbEj3ixnlTInyPR/81zAe0Ss/Ip12rFK6XNeMLVucOSg==" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -2172,6 +2393,11 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/btoa-lite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/btoa-lite/-/btoa-lite-1.0.2.tgz", + "integrity": "sha512-ZYbcE2x7yrvNFJiU7xJGrpF/ihpkM7zKgw8bha3LNJSesvTtUNxbpzaT7WXBIryf6jovisrxTBvymxMeLLj1Mg==" + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -2218,6 +2444,14 @@ "dev": true, "peer": true }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", + "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", @@ -2228,7 +2462,6 @@ "version": "20.10.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", - "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -2884,14 +3117,12 @@ "node_modules/before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "dev": true + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "node_modules/bottleneck": { "version": "2.19.5", "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "dev": true + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -2956,6 +3187,16 @@ "node-int64": "^0.4.0" } }, + "node_modules/btoa-lite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "integrity": "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA==" + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -3552,8 +3793,7 @@ "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, "node_modules/detect-newline": { "version": "3.1.0", @@ -3618,6 +3858,14 @@ "readable-stream": "^2.0.2" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.594", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.594.tgz", @@ -6603,6 +6851,46 @@ "node": "*" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -6731,23 +7019,41 @@ "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==", "dev": true }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, "node_modules/lodash.isfunction": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", "dev": true }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, "node_modules/lodash.kebabcase": { "version": "4.1.1", @@ -6767,6 +7073,11 @@ "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", "dev": true }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, "node_modules/lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", @@ -6801,7 +7112,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -7024,8 +7334,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -7281,16 +7590,17 @@ }, "node_modules/npm/node_modules/@colors/colors": { "version": "1.5.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=0.1.90" } }, "node_modules/npm/node_modules/@isaacs/cliui": { "version": "8.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7307,13 +7617,13 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7330,13 +7640,13 @@ }, "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/@npmcli/agent": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7352,7 +7662,7 @@ }, "node_modules/npm/node_modules/@npmcli/arborist": { "version": "7.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7399,7 +7709,7 @@ }, "node_modules/npm/node_modules/@npmcli/config": { "version": "8.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7418,7 +7728,7 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7430,7 +7740,7 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles": { "version": "4.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7445,7 +7755,7 @@ }, "node_modules/npm/node_modules/@npmcli/fs": { "version": "3.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7457,7 +7767,7 @@ }, "node_modules/npm/node_modules/@npmcli/git": { "version": "5.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7476,7 +7786,7 @@ }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { "version": "2.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7492,7 +7802,7 @@ }, "node_modules/npm/node_modules/@npmcli/map-workspaces": { "version": "3.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7507,7 +7817,7 @@ }, "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7522,7 +7832,7 @@ }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7531,7 +7841,7 @@ }, "node_modules/npm/node_modules/@npmcli/node-gyp": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7540,7 +7850,7 @@ }, "node_modules/npm/node_modules/@npmcli/package-json": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7558,7 +7868,7 @@ }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7570,7 +7880,7 @@ }, "node_modules/npm/node_modules/@npmcli/query": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7582,7 +7892,7 @@ }, "node_modules/npm/node_modules/@npmcli/run-script": { "version": "7.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7598,16 +7908,17 @@ }, "node_modules/npm/node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=14" } }, "node_modules/npm/node_modules/@sigstore/bundle": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7619,7 +7930,7 @@ }, "node_modules/npm/node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "engines": { @@ -7628,7 +7939,7 @@ }, "node_modules/npm/node_modules/@sigstore/sign": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7642,7 +7953,7 @@ }, "node_modules/npm/node_modules/@sigstore/tuf": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7655,7 +7966,7 @@ }, "node_modules/npm/node_modules/@tufjs/canonical-json": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7664,7 +7975,7 @@ }, "node_modules/npm/node_modules/@tufjs/models": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7677,7 +7988,7 @@ }, "node_modules/npm/node_modules/abbrev": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7686,7 +7997,7 @@ }, "node_modules/npm/node_modules/abort-controller": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7698,7 +8009,7 @@ }, "node_modules/npm/node_modules/agent-base": { "version": "7.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7710,7 +8021,7 @@ }, "node_modules/npm/node_modules/aggregate-error": { "version": "3.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7723,7 +8034,7 @@ }, "node_modules/npm/node_modules/ansi-regex": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7735,7 +8046,7 @@ }, "node_modules/npm/node_modules/ansi-styles": { "version": "6.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7747,19 +8058,19 @@ }, "node_modules/npm/node_modules/aproba": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/archy": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/are-we-there-yet": { "version": "4.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7772,13 +8083,13 @@ }, "node_modules/npm/node_modules/balanced-match": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/base64-js": { "version": "1.5.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -7798,7 +8109,7 @@ }, "node_modules/npm/node_modules/bin-links": { "version": "4.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7813,7 +8124,7 @@ }, "node_modules/npm/node_modules/binary-extensions": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7822,7 +8133,7 @@ }, "node_modules/npm/node_modules/brace-expansion": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7831,7 +8142,7 @@ }, "node_modules/npm/node_modules/buffer": { "version": "6.0.3", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -7855,7 +8166,7 @@ }, "node_modules/npm/node_modules/builtins": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7864,7 +8175,7 @@ }, "node_modules/npm/node_modules/cacache": { "version": "18.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7887,7 +8198,7 @@ }, "node_modules/npm/node_modules/chalk": { "version": "5.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7899,7 +8210,7 @@ }, "node_modules/npm/node_modules/chownr": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7908,7 +8219,7 @@ }, "node_modules/npm/node_modules/ci-info": { "version": "4.0.0", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -7923,7 +8234,7 @@ }, "node_modules/npm/node_modules/cidr-regex": { "version": "4.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -7935,7 +8246,7 @@ }, "node_modules/npm/node_modules/clean-stack": { "version": "2.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7944,7 +8255,7 @@ }, "node_modules/npm/node_modules/cli-columns": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7957,7 +8268,7 @@ }, "node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7966,7 +8277,7 @@ }, "node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7978,7 +8289,7 @@ }, "node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7993,7 +8304,7 @@ }, "node_modules/npm/node_modules/clone": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8002,7 +8313,7 @@ }, "node_modules/npm/node_modules/cmd-shim": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8011,7 +8322,7 @@ }, "node_modules/npm/node_modules/color-convert": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8023,13 +8334,13 @@ }, "node_modules/npm/node_modules/color-name": { "version": "1.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/color-support": { "version": "1.1.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "bin": { @@ -8038,7 +8349,7 @@ }, "node_modules/npm/node_modules/columnify": { "version": "1.6.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8051,7 +8362,7 @@ }, "node_modules/npm/node_modules/columnify/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8060,7 +8371,7 @@ }, "node_modules/npm/node_modules/columnify/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8072,19 +8383,19 @@ }, "node_modules/npm/node_modules/common-ancestor-path": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/console-control-strings": { "version": "1.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/cross-spawn": { "version": "7.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8098,7 +8409,7 @@ }, "node_modules/npm/node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8113,7 +8424,7 @@ }, "node_modules/npm/node_modules/cssesc": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -8125,7 +8436,7 @@ }, "node_modules/npm/node_modules/debug": { "version": "4.3.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8142,13 +8453,13 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/defaults": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8160,13 +8471,13 @@ }, "node_modules/npm/node_modules/delegates": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/diff": { "version": "5.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-3-Clause", "engines": { @@ -8175,28 +8486,29 @@ }, "node_modules/npm/node_modules/eastasianwidth": { "version": "0.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/emoji-regex": { "version": "8.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/encoding": { "version": "0.1.13", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "iconv-lite": "^0.6.2" } }, "node_modules/npm/node_modules/env-paths": { "version": "2.2.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8205,13 +8517,13 @@ }, "node_modules/npm/node_modules/err-code": { "version": "2.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/event-target-shim": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8220,7 +8532,7 @@ }, "node_modules/npm/node_modules/events": { "version": "3.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8229,13 +8541,13 @@ }, "node_modules/npm/node_modules/exponential-backoff": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0" }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8244,7 +8556,7 @@ }, "node_modules/npm/node_modules/foreground-child": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8260,7 +8572,7 @@ }, "node_modules/npm/node_modules/fs-minipass": { "version": "3.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8272,7 +8584,7 @@ }, "node_modules/npm/node_modules/function-bind": { "version": "1.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "funding": { @@ -8281,7 +8593,7 @@ }, "node_modules/npm/node_modules/gauge": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8300,7 +8612,7 @@ }, "node_modules/npm/node_modules/gauge/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8309,7 +8621,7 @@ }, "node_modules/npm/node_modules/gauge/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8321,7 +8633,7 @@ }, "node_modules/npm/node_modules/glob": { "version": "10.3.10", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8343,19 +8655,19 @@ }, "node_modules/npm/node_modules/graceful-fs": { "version": "4.2.11", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/has-unicode": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/hasown": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8367,7 +8679,7 @@ }, "node_modules/npm/node_modules/hosted-git-info": { "version": "7.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8379,13 +8691,13 @@ }, "node_modules/npm/node_modules/http-cache-semantics": { "version": "4.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause" }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8398,7 +8710,7 @@ }, "node_modules/npm/node_modules/https-proxy-agent": { "version": "7.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8411,9 +8723,10 @@ }, "node_modules/npm/node_modules/iconv-lite": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -8423,7 +8736,7 @@ }, "node_modules/npm/node_modules/ieee754": { "version": "1.2.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -8443,7 +8756,7 @@ }, "node_modules/npm/node_modules/ignore-walk": { "version": "6.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8455,7 +8768,7 @@ }, "node_modules/npm/node_modules/imurmurhash": { "version": "0.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8464,7 +8777,7 @@ }, "node_modules/npm/node_modules/indent-string": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8473,7 +8786,7 @@ }, "node_modules/npm/node_modules/ini": { "version": "4.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8482,7 +8795,7 @@ }, "node_modules/npm/node_modules/init-package-json": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8500,13 +8813,13 @@ }, "node_modules/npm/node_modules/ip": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/ip-regex": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8518,7 +8831,7 @@ }, "node_modules/npm/node_modules/is-cidr": { "version": "5.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -8530,7 +8843,7 @@ }, "node_modules/npm/node_modules/is-core-module": { "version": "2.13.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8542,7 +8855,7 @@ }, "node_modules/npm/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8551,19 +8864,19 @@ }, "node_modules/npm/node_modules/is-lambda": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/isexe": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/jackspeak": { "version": "2.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8581,7 +8894,7 @@ }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8590,7 +8903,7 @@ }, "node_modules/npm/node_modules/json-stringify-nice": { "version": "1.1.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -8599,28 +8912,28 @@ }, "node_modules/npm/node_modules/jsonparse": { "version": "1.3.1", + "dev": true, "engines": [ "node >= 0.2.0" ], - "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/just-diff": { "version": "6.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/just-diff-apply": { "version": "5.5.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { "version": "8.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8633,7 +8946,7 @@ }, "node_modules/npm/node_modules/libnpmdiff": { "version": "6.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8653,7 +8966,7 @@ }, "node_modules/npm/node_modules/libnpmexec": { "version": "7.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8675,7 +8988,7 @@ }, "node_modules/npm/node_modules/libnpmfund": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8687,7 +9000,7 @@ }, "node_modules/npm/node_modules/libnpmhook": { "version": "10.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8700,7 +9013,7 @@ }, "node_modules/npm/node_modules/libnpmorg": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8713,7 +9026,7 @@ }, "node_modules/npm/node_modules/libnpmpack": { "version": "6.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8728,7 +9041,7 @@ }, "node_modules/npm/node_modules/libnpmpublish": { "version": "9.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8747,7 +9060,7 @@ }, "node_modules/npm/node_modules/libnpmsearch": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8759,7 +9072,7 @@ }, "node_modules/npm/node_modules/libnpmteam": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8772,7 +9085,7 @@ }, "node_modules/npm/node_modules/libnpmversion": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8788,7 +9101,7 @@ }, "node_modules/npm/node_modules/lru-cache": { "version": "10.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8800,7 +9113,7 @@ }, "node_modules/npm/node_modules/make-fetch-happen": { "version": "13.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8822,7 +9135,7 @@ }, "node_modules/npm/node_modules/minimatch": { "version": "9.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8837,7 +9150,7 @@ }, "node_modules/npm/node_modules/minipass": { "version": "7.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8846,7 +9159,7 @@ }, "node_modules/npm/node_modules/minipass-collect": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8858,7 +9171,7 @@ }, "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8870,7 +9183,7 @@ }, "node_modules/npm/node_modules/minipass-fetch": { "version": "3.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8887,7 +9200,7 @@ }, "node_modules/npm/node_modules/minipass-flush": { "version": "1.0.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8899,7 +9212,7 @@ }, "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8911,7 +9224,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8921,7 +9234,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8933,7 +9246,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline": { "version": "1.2.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8945,7 +9258,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8957,7 +9270,7 @@ }, "node_modules/npm/node_modules/minipass-sized": { "version": "1.0.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8969,7 +9282,7 @@ }, "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8981,7 +9294,7 @@ }, "node_modules/npm/node_modules/minizlib": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8994,7 +9307,7 @@ }, "node_modules/npm/node_modules/minizlib/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9006,7 +9319,7 @@ }, "node_modules/npm/node_modules/mkdirp": { "version": "1.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -9018,13 +9331,13 @@ }, "node_modules/npm/node_modules/ms": { "version": "2.1.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/mute-stream": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9033,7 +9346,7 @@ }, "node_modules/npm/node_modules/negotiator": { "version": "0.6.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9042,7 +9355,7 @@ }, "node_modules/npm/node_modules/node-gyp": { "version": "10.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9066,7 +9379,7 @@ }, "node_modules/npm/node_modules/nopt": { "version": "7.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9081,7 +9394,7 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9096,7 +9409,7 @@ }, "node_modules/npm/node_modules/npm-audit-report": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9105,7 +9418,7 @@ }, "node_modules/npm/node_modules/npm-bundled": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9117,7 +9430,7 @@ }, "node_modules/npm/node_modules/npm-install-checks": { "version": "6.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9129,7 +9442,7 @@ }, "node_modules/npm/node_modules/npm-normalize-package-bin": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9138,7 +9451,7 @@ }, "node_modules/npm/node_modules/npm-package-arg": { "version": "11.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9153,7 +9466,7 @@ }, "node_modules/npm/node_modules/npm-packlist": { "version": "8.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9165,7 +9478,7 @@ }, "node_modules/npm/node_modules/npm-pick-manifest": { "version": "9.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9180,7 +9493,7 @@ }, "node_modules/npm/node_modules/npm-profile": { "version": "9.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9193,7 +9506,7 @@ }, "node_modules/npm/node_modules/npm-registry-fetch": { "version": "16.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9211,7 +9524,7 @@ }, "node_modules/npm/node_modules/npm-user-validate": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "engines": { @@ -9220,7 +9533,7 @@ }, "node_modules/npm/node_modules/npmlog": { "version": "7.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9235,7 +9548,7 @@ }, "node_modules/npm/node_modules/p-map": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9250,7 +9563,7 @@ }, "node_modules/npm/node_modules/pacote": { "version": "17.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9282,7 +9595,7 @@ }, "node_modules/npm/node_modules/parse-conflict-json": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9296,7 +9609,7 @@ }, "node_modules/npm/node_modules/path-key": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9305,7 +9618,7 @@ }, "node_modules/npm/node_modules/path-scurry": { "version": "1.10.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9321,7 +9634,7 @@ }, "node_modules/npm/node_modules/postcss-selector-parser": { "version": "6.0.13", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9334,7 +9647,7 @@ }, "node_modules/npm/node_modules/proc-log": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9343,7 +9656,7 @@ }, "node_modules/npm/node_modules/process": { "version": "0.11.10", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9352,7 +9665,7 @@ }, "node_modules/npm/node_modules/promise-all-reject-late": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -9361,7 +9674,7 @@ }, "node_modules/npm/node_modules/promise-call-limit": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -9370,13 +9683,13 @@ }, "node_modules/npm/node_modules/promise-inflight": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/promise-retry": { "version": "2.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9389,7 +9702,7 @@ }, "node_modules/npm/node_modules/promzard": { "version": "1.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9401,7 +9714,7 @@ }, "node_modules/npm/node_modules/qrcode-terminal": { "version": "0.12.0", - "extraneous": true, + "dev": true, "inBundle": true, "bin": { "qrcode-terminal": "bin/qrcode-terminal.js" @@ -9409,7 +9722,7 @@ }, "node_modules/npm/node_modules/read": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9421,7 +9734,7 @@ }, "node_modules/npm/node_modules/read-cmd-shim": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9430,7 +9743,7 @@ }, "node_modules/npm/node_modules/read-package-json": { "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9445,7 +9758,7 @@ }, "node_modules/npm/node_modules/read-package-json-fast": { "version": "3.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9458,7 +9771,7 @@ }, "node_modules/npm/node_modules/readable-stream": { "version": "4.4.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9474,7 +9787,7 @@ }, "node_modules/npm/node_modules/retry": { "version": "0.12.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9483,7 +9796,7 @@ }, "node_modules/npm/node_modules/safe-buffer": { "version": "5.2.1", - "extraneous": true, + "dev": true, "funding": [ { "type": "github", @@ -9503,13 +9816,14 @@ }, "node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", - "extraneous": true, + "dev": true, "inBundle": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/npm/node_modules/semver": { "version": "7.5.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9524,7 +9838,7 @@ }, "node_modules/npm/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9536,13 +9850,13 @@ }, "node_modules/npm/node_modules/set-blocking": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/shebang-command": { "version": "2.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9554,7 +9868,7 @@ }, "node_modules/npm/node_modules/shebang-regex": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9563,7 +9877,7 @@ }, "node_modules/npm/node_modules/signal-exit": { "version": "4.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9575,7 +9889,7 @@ }, "node_modules/npm/node_modules/sigstore": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9590,7 +9904,7 @@ }, "node_modules/npm/node_modules/smart-buffer": { "version": "4.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9600,7 +9914,7 @@ }, "node_modules/npm/node_modules/socks": { "version": "2.7.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9614,7 +9928,7 @@ }, "node_modules/npm/node_modules/socks-proxy-agent": { "version": "8.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9628,7 +9942,7 @@ }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9638,13 +9952,13 @@ }, "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "CC-BY-3.0" }, "node_modules/npm/node_modules/spdx-expression-parse": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9654,13 +9968,13 @@ }, "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.16", - "extraneous": true, + "dev": true, "inBundle": true, "license": "CC0-1.0" }, "node_modules/npm/node_modules/ssri": { "version": "10.0.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9672,7 +9986,7 @@ }, "node_modules/npm/node_modules/string_decoder": { "version": "1.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9681,7 +9995,7 @@ }, "node_modules/npm/node_modules/string-width": { "version": "4.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9696,7 +10010,7 @@ "node_modules/npm/node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9710,7 +10024,7 @@ }, "node_modules/npm/node_modules/string-width-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9719,7 +10033,7 @@ }, "node_modules/npm/node_modules/string-width-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9731,7 +10045,7 @@ }, "node_modules/npm/node_modules/string-width/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9740,7 +10054,7 @@ }, "node_modules/npm/node_modules/string-width/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9752,7 +10066,7 @@ }, "node_modules/npm/node_modules/strip-ansi": { "version": "7.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9768,7 +10082,7 @@ "node_modules/npm/node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9780,7 +10094,7 @@ }, "node_modules/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9789,7 +10103,7 @@ }, "node_modules/npm/node_modules/supports-color": { "version": "9.4.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9801,7 +10115,7 @@ }, "node_modules/npm/node_modules/tar": { "version": "6.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9818,7 +10132,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9830,7 +10144,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { "version": "3.3.6", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9842,7 +10156,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/minipass": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9851,19 +10165,19 @@ }, "node_modules/npm/node_modules/text-table": { "version": "0.2.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/tiny-relative-date": { "version": "1.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/treeverse": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9872,7 +10186,7 @@ }, "node_modules/npm/node_modules/tuf-js": { "version": "2.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9886,7 +10200,7 @@ }, "node_modules/npm/node_modules/unique-filename": { "version": "3.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9898,7 +10212,7 @@ }, "node_modules/npm/node_modules/unique-slug": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9910,13 +10224,13 @@ }, "node_modules/npm/node_modules/util-deprecate": { "version": "1.0.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/validate-npm-package-license": { "version": "3.0.4", - "extraneous": true, + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9926,7 +10240,7 @@ }, "node_modules/npm/node_modules/validate-npm-package-name": { "version": "5.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9938,13 +10252,13 @@ }, "node_modules/npm/node_modules/walk-up-path": { "version": "3.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/wcwidth": { "version": "1.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9953,7 +10267,7 @@ }, "node_modules/npm/node_modules/which": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9968,7 +10282,7 @@ }, "node_modules/npm/node_modules/which/node_modules/isexe": { "version": "3.1.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9977,7 +10291,7 @@ }, "node_modules/npm/node_modules/wide-align": { "version": "1.1.5", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9986,7 +10300,7 @@ }, "node_modules/npm/node_modules/wrap-ansi": { "version": "8.1.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10004,7 +10318,7 @@ "node_modules/npm/node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10021,7 +10335,7 @@ }, "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -10030,7 +10344,7 @@ }, "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10045,7 +10359,7 @@ }, "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10057,13 +10371,13 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", - "extraneous": true, + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -10080,7 +10394,7 @@ }, "node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -10093,7 +10407,7 @@ }, "node_modules/npm/node_modules/yallist": { "version": "4.0.0", - "extraneous": true, + "dev": true, "inBundle": true, "license": "ISC" }, @@ -10185,11 +10499,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/octokit": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/octokit/-/octokit-3.1.2.tgz", + "integrity": "sha512-MG5qmrTL5y8KYwFgE1A4JWmgfQBaIETE/lOlfwNYx1QOtCQHGVxkRJmdUJltFc1HVn73d61TlMhMyNTOtMl+ng==", + "dependencies": { + "@octokit/app": "^14.0.2", + "@octokit/core": "^5.0.0", + "@octokit/oauth-app": "^6.0.0", + "@octokit/plugin-paginate-graphql": "^4.0.0", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0", + "@octokit/plugin-retry": "^6.0.0", + "@octokit/plugin-throttling": "^8.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -11108,8 +11441,7 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { "version": "1.0.0", @@ -11316,7 +11648,6 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -12145,8 +12476,7 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unicode-emoji-modifier-base": { "version": "1.0.0", @@ -12184,11 +12514,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/universal-github-app-jwt": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.1.tgz", + "integrity": "sha512-G33RTLrIBMFmlDV4u4CBF7dh71eWwykck4XgaxaIVeZKOYZRAAxvcGMRFTUclVY6xoUPQvO4Ne5wKGxYm/Yy9w==", + "dependencies": { + "@types/jsonwebtoken": "^9.0.0", + "jsonwebtoken": "^9.0.0" + } + }, "node_modules/universal-user-agent": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", - "dev": true + "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" }, "node_modules/universalify": { "version": "2.0.1", @@ -12364,8 +12702,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -12401,8 +12738,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "17.7.2", diff --git a/package.json b/package.json index a9664e8..8ca1999 100644 --- a/package.json +++ b/package.json @@ -58,5 +58,8 @@ }, "publishConfig": { "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "octokit": "^3.1.2" } } From e1e77e969f680c6072ae5f8b9a89aa66fcf13658 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Tue, 12 Dec 2023 23:09:30 -0700 Subject: [PATCH 04/12] chore: update package-lock.json --- package-lock.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea44c59..6b50cf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,6 @@ "dependencies": { "octokit": "^3.1.2" }, - "bin": { - "lem-link": "out/index.js" - }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", From ea5b3ae46ed16a15afa39d529e1139b726ad3fab Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Tue, 12 Dec 2023 23:14:06 -0700 Subject: [PATCH 05/12] build: :heavy_plus_sign: add semver --- package-lock.json | 4 +++- package.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b50cf2..bc1235a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,13 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "octokit": "^3.1.2" + "octokit": "^3.1.2", + "semver": "^7.5.4" }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", + "@types/semver": "^7.5.6", "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "^6.12.0", "@typescript-eslint/parser": "^6.12.0", diff --git a/package.json b/package.json index 3258824..ec66333 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", + "@types/semver": "^7.5.6", "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "^6.12.0", "@typescript-eslint/parser": "^6.12.0", @@ -57,6 +58,7 @@ "registry": "https://registry.npmjs.org/" }, "dependencies": { - "octokit": "^3.1.2" + "octokit": "^3.1.2", + "semver": "^7.5.4" } } From 2789962bd436c07861b32f9560aee61f3695b2b7 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Tue, 12 Dec 2023 23:16:03 -0700 Subject: [PATCH 06/12] feat: :sparkles: package retrieval api --- src/packages/package.ts | 94 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/packages/package.ts diff --git a/src/packages/package.ts b/src/packages/package.ts new file mode 100644 index 0000000..d25ef6f --- /dev/null +++ b/src/packages/package.ts @@ -0,0 +1,94 @@ +import { type Octokit } from "octokit"; +import { SemVer, parse } from "semver"; +import { createWriteStream } from "fs"; +import { type IncomingMessage } from "http"; +import { get as httpsGet } from "https"; + +export interface PackageIdentifier { + /** + * does not include @ sign + * @example lemlib + */ + readonly owner: string; + /** + * @example lemlib + */ + readonly repo: string; +} +export type PackageReleaseData = Awaited< + ReturnType +>["data"][number]; + +export class PackageVersion extends SemVer { + protected constructor( + protected readonly client: Octokit, + public readonly packId: PackageIdentifier, + public readonly data: PackageReleaseData, + version: SemVer, + ) { + super(version); + } + + public static create( + client: Octokit, + packId: PackageIdentifier, + data: PackageReleaseData, + ): PackageVersion | null { + const version = parse(data.tag_name); + if (version == null) return null; + return new PackageVersion(client, packId, data, version); + } + + public async download( + path: Path, + asset: { index: number } | { id: number } = { index: 0 }, + ): Promise { + try { + let index: number; + if ("index" in asset) index = asset.index; + else index = this.data.assets.findIndex((a) => a.id === asset.id); + + const response = await new Promise((resolve) => + httpsGet(this.data.assets[index].url, resolve), + ); + const fileStream = createWriteStream(path); + + response.pipe(fileStream); + return true; + } catch (err) { + return false; + } + } +} + +export class Package { + constructor( + protected readonly id: PackageIdentifier, + protected readonly client: Octokit, + ) {} + + public async getVersions(): Promise { + return ( + await this.client.rest.repos.listReleases({ + ...this.id, + }) + ).data + .map((release) => PackageVersion.create(this.client, this.id, release)) + .filter((release): release is PackageVersion => release != null); + } + + public async getLatest(): Promise { + return PackageVersion.create( + this.client, + this.id, + ( + await this.client.rest.repos.getLatestRelease({ + ...this.id, + }) + ).data, + ); + } +} + +/** placeholder */ +type Path = string & { __type: "path" }; From 3bc547cf78383fddc7d691b2cc61c8d4fea25c9c Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Wed, 13 Dec 2023 18:55:00 -0700 Subject: [PATCH 07/12] build: set target runtime environment in tsconfig.json --- tsconfig.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 99b64a6..368640d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,9 @@ /* Language and Environment */ "target": "es2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "lib": [ + "es2020" + ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ From cf076dc268df3b7de1f48159bb4c39586249e598 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Wed, 13 Dec 2023 19:00:03 -0700 Subject: [PATCH 08/12] refactor: :construction: detach package resolution from github --- src/packages/package.ts | 158 +++++++++++++++++++++++++++++----------- 1 file changed, 117 insertions(+), 41 deletions(-) diff --git a/src/packages/package.ts b/src/packages/package.ts index d25ef6f..5d84664 100644 --- a/src/packages/package.ts +++ b/src/packages/package.ts @@ -1,8 +1,7 @@ -import { type Octokit } from "octokit"; -import { SemVer, parse } from "semver"; -import { createWriteStream } from "fs"; +import { Octokit } from "octokit"; +import { type Range, SemVer, parse, maxSatisfying } from "semver"; import { type IncomingMessage } from "http"; -import { get as httpsGet } from "https"; +import { get as httpsGet, type RequestOptions } from "https"; export interface PackageIdentifier { /** @@ -11,74 +10,128 @@ export interface PackageIdentifier { */ readonly owner: string; /** - * @example lemlib + * @example lemlink */ readonly repo: string; } -export type PackageReleaseData = Awaited< + +export type GithubPackageReleaseData = Awaited< ReturnType >["data"][number]; -export class PackageVersion extends SemVer { +export abstract class PackageVersion + extends SemVer + implements PackageIdentifier +{ + readonly owner: string; + readonly repo: string; + public constructor(packId: PackageIdentifier, version: SemVer) { + super(version); + + this.owner = packId.owner; + this.repo = packId.repo; + } + public abstract download(): Promise; +} + +export class GithubPackageVersion extends PackageVersion { protected constructor( protected readonly client: Octokit, public readonly packId: PackageIdentifier, - public readonly data: PackageReleaseData, + public readonly data: GithubPackageReleaseData, version: SemVer, ) { - super(version); + super(packId, version); } public static create( client: Octokit, packId: PackageIdentifier, - data: PackageReleaseData, - ): PackageVersion | null { + data: GithubPackageReleaseData, + ): GithubPackageVersion | null { const version = parse(data.tag_name); if (version == null) return null; - return new PackageVersion(client, packId, data, version); + return new GithubPackageVersion(client, packId, data, version); + } + + protected getAssetIndex(): number { + return 0; + } + + public override async download(): Promise { + const index = this.getAssetIndex(); + const auth = await this.client.auth(); + const opts: RequestOptions = {}; + + if ( + typeof auth === "object" && + auth != null && + "token" in auth && + typeof auth.token === "string" + ) + opts.headers = { + Authorization: `Bearer ${auth.token}`, + }; + + const response = await new Promise((resolve) => + httpsGet(this.data.assets[index].url, opts, resolve), + ); + + return response; + } +} + +export abstract class Package< + V extends PackageVersion, + ID extends PackageIdentifier, +> implements PackageIdentifier +{ + public readonly owner: string; + public readonly repo: string; + + constructor(id: ID) { + this.owner = id.owner; + this.repo = id.repo; + } + + public abstract getVersions(): Promise; + public abstract getLatest(): Promise; + + public async getVersionsInRange(range: Range): Promise { + const versions = await this.getVersions(); + return versions.filter((v) => range.test(v)); } - public async download( - path: Path, - asset: { index: number } | { id: number } = { index: 0 }, - ): Promise { - try { - let index: number; - if ("index" in asset) index = asset.index; - else index = this.data.assets.findIndex((a) => a.id === asset.id); - - const response = await new Promise((resolve) => - httpsGet(this.data.assets[index].url, resolve), - ); - const fileStream = createWriteStream(path); - - response.pipe(fileStream); - return true; - } catch (err) { - return false; - } + public async getLatestInRange(range: Range): Promise { + return maxSatisfying(await this.getVersionsInRange(range), range); } } -export class Package { +export class GithubPackage extends Package< + GithubPackageVersion, + PackageIdentifier +> { constructor( - protected readonly id: PackageIdentifier, protected readonly client: Octokit, - ) {} + protected readonly id: PackageIdentifier, + ) { + super(id); + } - public async getVersions(): Promise { + public override async getVersions(): Promise { return ( await this.client.rest.repos.listReleases({ ...this.id, }) ).data - .map((release) => PackageVersion.create(this.client, this.id, release)) - .filter((release): release is PackageVersion => release != null); + .map((release) => + GithubPackageVersion.create(this.client, this.id, release), + ) + .filter((release): release is GithubPackageVersion => release != null); } - public async getLatest(): Promise { - return PackageVersion.create( + public async getLatest(): Promise { + return GithubPackageVersion.create( this.client, this.id, ( @@ -90,5 +143,28 @@ export class Package { } } -/** placeholder */ -type Path = string & { __type: "path" }; +export abstract class PackageResolver< + P extends Package, +> { + public abstract resolvePackage(id: PackageIdentifier): Promise

; +} + +export class GithubPackageResolver extends PackageResolver { + private static readonly client: Octokit = new Octokit(); + private static readonly singleton: GithubPackageResolver = + new GithubPackageResolver(GithubPackageResolver.client); + + protected constructor(protected readonly client: Octokit) { + super(); + } + + public static get(): GithubPackageResolver { + return GithubPackageResolver.singleton; + } + + public override async resolvePackage( + id: PackageIdentifier, + ): Promise { + return new GithubPackage(this.client, id); + } +} From fad9c81aed6dfe70e78d92023fdc8b84b679d090 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Wed, 13 Dec 2023 19:18:42 -0700 Subject: [PATCH 09/12] refactor: :truck: move github package resolution into its own directory --- src/packages/github/index.ts | 3 + src/packages/github/package.ts | 43 ++++++++++++ src/packages/github/resolver.ts | 23 +++++++ src/packages/github/version.ts | 53 +++++++++++++++ src/packages/package.ts | 112 +------------------------------- 5 files changed, 123 insertions(+), 111 deletions(-) create mode 100644 src/packages/github/index.ts create mode 100644 src/packages/github/package.ts create mode 100644 src/packages/github/resolver.ts create mode 100644 src/packages/github/version.ts diff --git a/src/packages/github/index.ts b/src/packages/github/index.ts new file mode 100644 index 0000000..a05c59a --- /dev/null +++ b/src/packages/github/index.ts @@ -0,0 +1,3 @@ +export { GithubPackage, type GithubPackageReleaseData } from "./package"; +export { GithubPackageResolver } from "./resolver"; +export { GithubPackageVersion } from "./version"; diff --git a/src/packages/github/package.ts b/src/packages/github/package.ts new file mode 100644 index 0000000..5a60656 --- /dev/null +++ b/src/packages/github/package.ts @@ -0,0 +1,43 @@ +import { type Octokit } from "octokit"; +import { Package, type PackageIdentifier } from "../package"; +import { GithubPackageVersion } from "./version"; + +export type GithubPackageReleaseData = Awaited< + ReturnType +>["data"][number]; + +export class GithubPackage extends Package< + GithubPackageVersion, + PackageIdentifier +> { + constructor( + protected readonly client: Octokit, + protected readonly id: PackageIdentifier, + ) { + super(id); + } + + public override async getVersions(): Promise { + return ( + await this.client.rest.repos.listReleases({ + ...this.id, + }) + ).data + .map((release) => + GithubPackageVersion.create(this.client, this.id, release), + ) + .filter((release): release is GithubPackageVersion => release != null); + } + + public async getLatest(): Promise { + return GithubPackageVersion.create( + this.client, + this.id, + ( + await this.client.rest.repos.getLatestRelease({ + ...this.id, + }) + ).data, + ); + } +} diff --git a/src/packages/github/resolver.ts b/src/packages/github/resolver.ts new file mode 100644 index 0000000..d1e2908 --- /dev/null +++ b/src/packages/github/resolver.ts @@ -0,0 +1,23 @@ +import { Octokit } from "octokit"; +import { type PackageIdentifier, PackageResolver } from "../package"; +import { GithubPackage } from "./package"; + +export class GithubPackageResolver extends PackageResolver { + private static readonly client: Octokit = new Octokit(); + private static readonly singleton: GithubPackageResolver = + new GithubPackageResolver(GithubPackageResolver.client); + + protected constructor(protected readonly client: Octokit) { + super(); + } + + public static get(): GithubPackageResolver { + return GithubPackageResolver.singleton; + } + + public override async resolvePackage( + id: PackageIdentifier, + ): Promise { + return new GithubPackage(this.client, id); + } +} diff --git a/src/packages/github/version.ts b/src/packages/github/version.ts new file mode 100644 index 0000000..a252c00 --- /dev/null +++ b/src/packages/github/version.ts @@ -0,0 +1,53 @@ +import { type Octokit } from "octokit"; +import { PackageVersion, type PackageIdentifier } from "../package"; +import { type SemVer, parse } from "semver"; +import { type GithubPackageReleaseData } from "./package"; +import { type IncomingMessage } from "http"; +import { get as httpsGet, type RequestOptions } from "https"; + +export class GithubPackageVersion extends PackageVersion { + protected constructor( + protected readonly client: Octokit, + public readonly packId: PackageIdentifier, + public readonly data: GithubPackageReleaseData, + version: SemVer, + ) { + super(packId, version); + } + + public static create( + client: Octokit, + packId: PackageIdentifier, + data: GithubPackageReleaseData, + ): GithubPackageVersion | null { + const version = parse(data.tag_name); + if (version == null) return null; + return new GithubPackageVersion(client, packId, data, version); + } + + protected getAssetIndex(): number { + return 0; + } + + public override async download(): Promise { + const index = this.getAssetIndex(); + const auth = await this.client.auth(); + const opts: RequestOptions = {}; + + if ( + typeof auth === "object" && + auth != null && + "token" in auth && + typeof auth.token === "string" + ) + opts.headers = { + Authorization: `Bearer ${auth.token}`, + }; + + const response = await new Promise((resolve) => + httpsGet(this.data.assets[index].url, opts, resolve), + ); + + return response; + } +} diff --git a/src/packages/package.ts b/src/packages/package.ts index 5d84664..113dea3 100644 --- a/src/packages/package.ts +++ b/src/packages/package.ts @@ -1,7 +1,4 @@ -import { Octokit } from "octokit"; -import { type Range, SemVer, parse, maxSatisfying } from "semver"; -import { type IncomingMessage } from "http"; -import { get as httpsGet, type RequestOptions } from "https"; +import { type Range, SemVer, maxSatisfying } from "semver"; export interface PackageIdentifier { /** @@ -15,10 +12,6 @@ export interface PackageIdentifier { readonly repo: string; } -export type GithubPackageReleaseData = Awaited< - ReturnType ->["data"][number]; - export abstract class PackageVersion extends SemVer implements PackageIdentifier @@ -34,53 +27,6 @@ export abstract class PackageVersion public abstract download(): Promise; } -export class GithubPackageVersion extends PackageVersion { - protected constructor( - protected readonly client: Octokit, - public readonly packId: PackageIdentifier, - public readonly data: GithubPackageReleaseData, - version: SemVer, - ) { - super(packId, version); - } - - public static create( - client: Octokit, - packId: PackageIdentifier, - data: GithubPackageReleaseData, - ): GithubPackageVersion | null { - const version = parse(data.tag_name); - if (version == null) return null; - return new GithubPackageVersion(client, packId, data, version); - } - - protected getAssetIndex(): number { - return 0; - } - - public override async download(): Promise { - const index = this.getAssetIndex(); - const auth = await this.client.auth(); - const opts: RequestOptions = {}; - - if ( - typeof auth === "object" && - auth != null && - "token" in auth && - typeof auth.token === "string" - ) - opts.headers = { - Authorization: `Bearer ${auth.token}`, - }; - - const response = await new Promise((resolve) => - httpsGet(this.data.assets[index].url, opts, resolve), - ); - - return response; - } -} - export abstract class Package< V extends PackageVersion, ID extends PackageIdentifier, @@ -107,64 +53,8 @@ export abstract class Package< } } -export class GithubPackage extends Package< - GithubPackageVersion, - PackageIdentifier -> { - constructor( - protected readonly client: Octokit, - protected readonly id: PackageIdentifier, - ) { - super(id); - } - - public override async getVersions(): Promise { - return ( - await this.client.rest.repos.listReleases({ - ...this.id, - }) - ).data - .map((release) => - GithubPackageVersion.create(this.client, this.id, release), - ) - .filter((release): release is GithubPackageVersion => release != null); - } - - public async getLatest(): Promise { - return GithubPackageVersion.create( - this.client, - this.id, - ( - await this.client.rest.repos.getLatestRelease({ - ...this.id, - }) - ).data, - ); - } -} - export abstract class PackageResolver< P extends Package, > { public abstract resolvePackage(id: PackageIdentifier): Promise

; } - -export class GithubPackageResolver extends PackageResolver { - private static readonly client: Octokit = new Octokit(); - private static readonly singleton: GithubPackageResolver = - new GithubPackageResolver(GithubPackageResolver.client); - - protected constructor(protected readonly client: Octokit) { - super(); - } - - public static get(): GithubPackageResolver { - return GithubPackageResolver.singleton; - } - - public override async resolvePackage( - id: PackageIdentifier, - ): Promise { - return new GithubPackage(this.client, id); - } -} From 5e5237fc64a303709d77132755fd895a978ea5e3 Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Mon, 18 Dec 2023 18:18:42 -0700 Subject: [PATCH 10/12] fix: :bug: github package resolution --- src/packages/github/resolver.ts | 12 ++---------- src/packages/github/version.ts | 32 ++++++++++++++------------------ src/packages/package.ts | 24 ++++++++++++------------ 3 files changed, 28 insertions(+), 40 deletions(-) diff --git a/src/packages/github/resolver.ts b/src/packages/github/resolver.ts index d1e2908..b0a253c 100644 --- a/src/packages/github/resolver.ts +++ b/src/packages/github/resolver.ts @@ -1,20 +1,12 @@ -import { Octokit } from "octokit"; +import { type Octokit } from "octokit"; import { type PackageIdentifier, PackageResolver } from "../package"; import { GithubPackage } from "./package"; export class GithubPackageResolver extends PackageResolver { - private static readonly client: Octokit = new Octokit(); - private static readonly singleton: GithubPackageResolver = - new GithubPackageResolver(GithubPackageResolver.client); - - protected constructor(protected readonly client: Octokit) { + public constructor(protected readonly client: Octokit) { super(); } - public static get(): GithubPackageResolver { - return GithubPackageResolver.singleton; - } - public override async resolvePackage( id: PackageIdentifier, ): Promise { diff --git a/src/packages/github/version.ts b/src/packages/github/version.ts index a252c00..d424c16 100644 --- a/src/packages/github/version.ts +++ b/src/packages/github/version.ts @@ -2,8 +2,6 @@ import { type Octokit } from "octokit"; import { PackageVersion, type PackageIdentifier } from "../package"; import { type SemVer, parse } from "semver"; import { type GithubPackageReleaseData } from "./package"; -import { type IncomingMessage } from "http"; -import { get as httpsGet, type RequestOptions } from "https"; export class GithubPackageVersion extends PackageVersion { protected constructor( @@ -29,25 +27,23 @@ export class GithubPackageVersion extends PackageVersion { return 0; } - public override async download(): Promise { + public override async download(): Promise { const index = this.getAssetIndex(); - const auth = await this.client.auth(); - const opts: RequestOptions = {}; - if ( - typeof auth === "object" && - auth != null && - "token" in auth && - typeof auth.token === "string" - ) - opts.headers = { - Authorization: `Bearer ${auth.token}`, - }; + const res = await this.client.rest.repos.getReleaseAsset({ + repo: this.packId.repo, + owner: this.packId.owner, + asset_id: this.data.assets[index].id, + headers: { accept: "application/octet-stream" }, + }); - const response = await new Promise((resolve) => - httpsGet(this.data.assets[index].url, opts, resolve), - ); + const data = res.data; - return response; + if (data instanceof ArrayBuffer) { + return Buffer.from(data); + } + throw new Error( + "github api response was not Array. res status: " + res.status, + ); } } diff --git a/src/packages/package.ts b/src/packages/package.ts index 113dea3..e1362df 100644 --- a/src/packages/package.ts +++ b/src/packages/package.ts @@ -1,4 +1,4 @@ -import { type Range, SemVer, maxSatisfying } from "semver"; +import { type Range, type SemVer } from "semver"; export interface PackageIdentifier { /** @@ -12,19 +12,17 @@ export interface PackageIdentifier { readonly repo: string; } -export abstract class PackageVersion - extends SemVer - implements PackageIdentifier -{ +export abstract class PackageVersion implements PackageIdentifier { readonly owner: string; readonly repo: string; - public constructor(packId: PackageIdentifier, version: SemVer) { - super(version); - + public constructor( + packId: PackageIdentifier, + public readonly version: SemVer, + ) { this.owner = packId.owner; this.repo = packId.repo; } - public abstract download(): Promise; + public abstract download(): Promise; } export abstract class Package< @@ -45,11 +43,13 @@ export abstract class Package< public async getVersionsInRange(range: Range): Promise { const versions = await this.getVersions(); - return versions.filter((v) => range.test(v)); + return versions.filter((v) => range.test(v.version)); } - public async getLatestInRange(range: Range): Promise { - return maxSatisfying(await this.getVersionsInRange(range), range); + public async getLatestInRange(range: Range): Promise { + return (await this.getVersionsInRange(range)) + .sort((a, b) => a.version.compare(b.version)) + .pop(); } } From 6877f117ca1aa9789eeb89467491ca53958420bb Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Mon, 18 Dec 2023 18:42:00 -0700 Subject: [PATCH 11/12] feat: :sparkles: add getVersion() method --- src/packages/package.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/packages/package.ts b/src/packages/package.ts index e1362df..8f6b534 100644 --- a/src/packages/package.ts +++ b/src/packages/package.ts @@ -1,4 +1,4 @@ -import { type Range, type SemVer } from "semver"; +import { eq as verEquals, type Range, type SemVer } from "semver"; export interface PackageIdentifier { /** @@ -41,6 +41,12 @@ export abstract class Package< public abstract getVersions(): Promise; public abstract getLatest(): Promise; + public async getVersion(version: SemVer): Promise { + return (await this.getVersions()).find((v) => + verEquals(v.version, version), + ); + } + public async getVersionsInRange(range: Range): Promise { const versions = await this.getVersions(); return versions.filter((v) => range.test(v.version)); From 1b4fa5c9c5947cfcd6abac557850112eb1f9e57b Mon Sep 17 00:00:00 2001 From: meisZWFLZ Date: Mon, 18 Dec 2023 18:50:44 -0700 Subject: [PATCH 12/12] build: :heavy_plus_sign: add adm-zip --- package-lock.json | 19 +++++++++++++++++++ package.json | 2 ++ 2 files changed, 21 insertions(+) diff --git a/package-lock.json b/package-lock.json index bc1235a..77b6216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,14 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { + "adm-zip": "^0.5.10", "octokit": "^3.1.2", "semver": "^7.5.4" }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", + "@types/adm-zip": "^0.5.5", "@types/semver": "^7.5.6", "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "^6.12.0", @@ -2346,6 +2348,15 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@types/adm-zip": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.5.tgz", + "integrity": "sha512-YCGstVMjc4LTY5uK9/obvxBya93axZOVOyf2GSUulADzmLhYE45u2nAssCs/fWBs1Ifq5Vat75JTPwd5XZoPJw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/aws-lambda": { "version": "8.10.130", "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.130.tgz", @@ -2714,6 +2725,14 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/adm-zip": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz", + "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==", + "engines": { + "node": ">=6.0" + } + }, "node_modules/agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", diff --git a/package.json b/package.json index ec66333..c8dc6bf 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", + "@types/adm-zip": "^0.5.5", "@types/semver": "^7.5.6", "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "^6.12.0", @@ -58,6 +59,7 @@ "registry": "https://registry.npmjs.org/" }, "dependencies": { + "adm-zip": "^0.5.10", "octokit": "^3.1.2", "semver": "^7.5.4" }