diff --git a/.github/knip.ts b/.github/knip.ts index 17857ad..3eb78f9 100644 --- a/.github/knip.ts +++ b/.github/knip.ts @@ -6,7 +6,7 @@ const config: KnipConfig = { ignore: ["src/types/config.ts", "**/__mocks__/**", "**/__fixtures__/**"], ignoreExportsUsedInFile: true, // eslint can also be safely ignored as per the docs: https://knip.dev/guides/handling-issues#eslint--jest - ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier", "@mswjs/data"], + ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier"], eslint: true, }; diff --git a/.github/workflows/update-configuration.yml b/.github/workflows/update-configuration.yml new file mode 100644 index 0000000..2490c49 --- /dev/null +++ b/.github/workflows/update-configuration.yml @@ -0,0 +1,58 @@ +name: "Update Configuration" + +on: + workflow_dispatch: + push: + +jobs: + update: + name: "Update Configuration in manifest.json" + runs-on: ubuntu-latest + permissions: write-all + + steps: + - uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: "20.10.0" + + - name: Install deps and run configuration update + run: | + yarn install --immutable --immutable-cache --check-cache + yarn tsc --noCheck --project tsconfig.json + + - name: Update manifest configuration using GitHub Script + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const path = require('path'); + + const { pluginSettingsSchema } = require('./src/types'); + + const manifestPath = path.resolve("${{ github.workspace }}", './manifest.json'); + const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); + + const configuration = JSON.stringify(pluginSettingsSchema); + + manifest["configuration"] = JSON.parse(configuration); + + const updatedManifest = JSON.stringify(manifest, null, 2) + console.log('Updated manifest:', updatedManifest); + fs.writeFileSync(manifestPath, updatedManifest); + + - name: Commit and Push generated types + run: | + git config --global user.name 'ubiquity-os[bot]' + git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com' + git add ./manifest.json + if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then + git commit -m "chore: updated generated configuration" || echo "Lint-staged check failed" + git push origin HEAD:${{ github.ref_name }} + else + echo "No changes to commit" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/worker-deploy.yml b/.github/workflows/worker-deploy.yml index 95b9afa..ea0aab8 100644 --- a/.github/workflows/worker-deploy.yml +++ b/.github/workflows/worker-deploy.yml @@ -35,6 +35,7 @@ jobs: id: wrangler_deploy uses: cloudflare/wrangler-action@v3 with: + wranglerVersion: "3.79.0" apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} secrets: | diff --git a/manifest.json b/manifest.json index 83aa3f2..a6f2a10 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,30 @@ { "name": "ts-template", - "description": "ts-template for Ubiquibot plugins.", - "ubiquity:listeners": ["issue_comment.created"], + "description": "ts-template for UbiquityOS plugins.", + "ubiquity:listeners": [ + "issue_comment.created" + ], "commands": { "command1": { "ubiquity:example": "/command1 argument", "description": "Command 1 with an argument." } + }, + "configuration": { + "default": { + "configurableResponse": "Hello, world!" + }, + "type": "object", + "properties": { + "configurableResponse": { + "type": "string" + }, + "customStringsUrl": { + "type": "string" + } + }, + "required": [ + "configurableResponse" + ] } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 838f3e8..79ab0f1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "node": ">=20.10.0" }, "scripts": { + "build": "tsc --project tsconfig.json", "format": "run-p format:*", "format:lint": "eslint --fix .", "format:prettier": "prettier --write .", @@ -63,9 +64,9 @@ "prettier": "3.3.2", "ts-jest": "29.1.5", "tsx": "4.15.6", - "typescript": "5.4.5", + "typescript": "5.6.2", "typescript-eslint": "7.13.1", - "wrangler": "3.60.3" + "wrangler": "3.79.0" }, "lint-staged": { "*.ts": [ diff --git a/src/helpers/validator.ts b/src/helpers/validator.ts new file mode 100644 index 0000000..4d5d146 --- /dev/null +++ b/src/helpers/validator.ts @@ -0,0 +1,53 @@ +import * as github from "@actions/github"; +import { Octokit } from "@octokit/rest"; +import { TransformDecodeCheckError, TransformDecodeError, Value, ValueError } from "@sinclair/typebox/value"; +import { Env, envSchema, envValidator, PluginSettings, pluginSettingsSchema, pluginSettingsValidator } from "../types"; + +export async function returnDataToKernel(repoToken: string, stateId: string, output: object, eventType = "return-data-to-ubiquity-os-kernel") { + const octokit = new Octokit({ auth: repoToken }); + return octokit.repos.createDispatchEvent({ + owner: github.context.repo.owner, + repo: github.context.repo.repo, + event_type: eventType, + client_payload: { + state_id: stateId, + output: JSON.stringify(output), + }, + }); +} + +export function validateAndDecodeSchemas(rawEnv: object, rawSettings: object) { + const errors: ValueError[] = []; + + const env = Value.Default(envSchema, rawEnv) as Env; + if (!envValidator.test(env)) { + for (const error of envValidator.errors(env)) { + console.error(error); + errors.push(error); + } + } + + const settings = Value.Default(pluginSettingsSchema, rawSettings) as PluginSettings; + if (!pluginSettingsValidator.test(settings)) { + for (const error of pluginSettingsValidator.errors(settings)) { + console.error(error); + errors.push(error); + } + } + + if (errors.length) { + throw { errors }; + } + + try { + const decodedSettings = Value.Decode(pluginSettingsSchema, settings); + const decodedEnv = Value.Decode(envSchema, rawEnv || {}); + return { decodedEnv, decodedSettings }; + } catch (e) { + console.error("validateAndDecodeSchemas", e); + if (e instanceof TransformDecodeCheckError || e instanceof TransformDecodeError) { + throw { errors: [e.error] }; + } + throw e; + } +} diff --git a/src/plugin.ts b/src/plugin.ts index b877b2b..01fc311 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,5 @@ import { Octokit } from "@octokit/rest"; +import { returnDataToKernel } from "./helpers/validator"; import { Env, PluginInputs } from "./types"; import { Context } from "./types"; import { isIssueCommentEvent } from "./types/typeguards"; @@ -44,5 +45,6 @@ export async function plugin(inputs: PluginInputs, env: Env) { * context.adapters = createAdapters(supabase, context); */ - return runPlugin(context); + await runPlugin(context); + return returnDataToKernel(process.env.GITHUB_TOKEN, inputs.stateId, {}); } diff --git a/src/types/process-env.d.ts b/src/types/process-env.d.ts new file mode 100644 index 0000000..a2bb98f --- /dev/null +++ b/src/types/process-env.d.ts @@ -0,0 +1,9 @@ +declare global { + namespace NodeJS { + interface ProcessEnv { + GITHUB_TOKEN: string; + } + } +} + +export {}; diff --git a/src/worker.ts b/src/worker.ts index 40df400..9d224f0 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -1,17 +1,22 @@ -import { Value } from "@sinclair/typebox/value"; -import { plugin } from "./plugin"; -import { Env, envValidator, pluginSettingsSchema, pluginSettingsValidator } from "./types"; import manifest from "../manifest.json"; +import { validateAndDecodeSchemas } from "./helpers/validator"; +import { plugin } from "./plugin"; +import { Env } from "./types"; export default { async fetch(request: Request, env: Env): Promise { try { - if (request.method === "GET") { - const url = new URL(request.url); - if (url.pathname === "/manifest.json") { + const url = new URL(request.url); + if (url.pathname === "/manifest") { + if (request.method === "GET") { return new Response(JSON.stringify(manifest), { headers: { "content-type": "application/json" }, }); + } else if (request.method === "POST") { + const webhookPayload = await request.json(); + + validateAndDecodeSchemas(env, webhookPayload.settings); + return new Response(JSON.stringify({ message: "Schema is valid" }), { status: 200, headers: { "content-type": "application/json" } }); } } if (request.method !== "POST") { @@ -29,33 +34,11 @@ export default { } const webhookPayload = await request.json(); - const settings = Value.Decode(pluginSettingsSchema, Value.Default(pluginSettingsSchema, webhookPayload.settings)); - - if (!pluginSettingsValidator.test(settings)) { - const errors: string[] = []; - for (const error of pluginSettingsValidator.errors(settings)) { - console.error(error); - errors.push(`${error.path}: ${error.message}`); - } - return new Response(JSON.stringify({ error: `Error: "Invalid settings provided. ${errors.join("; ")}"` }), { - status: 400, - headers: { "content-type": "application/json" }, - }); - } - if (!envValidator.test(env)) { - const errors: string[] = []; - for (const error of envValidator.errors(env)) { - console.error(error); - errors.push(`${error.path}: ${error.message}`); - } - return new Response(JSON.stringify({ error: `Error: "Invalid environment provided. ${errors.join("; ")}"` }), { - status: 400, - headers: { "content-type": "application/json" }, - }); - } + const { decodedSettings, decodedEnv } = validateAndDecodeSchemas(env, webhookPayload.settings); - webhookPayload.settings = settings; - await plugin(webhookPayload, env); + webhookPayload.env = decodedEnv; + webhookPayload.settings = decodedSettings; + await plugin(webhookPayload, decodedEnv); return new Response(JSON.stringify("OK"), { status: 200, headers: { "content-type": "application/json" } }); } catch (error) { return handleUncaughtError(error); diff --git a/tests/main.test.ts b/tests/main.test.ts index 26e170e..e421927 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -33,7 +33,7 @@ describe("Plugin tests", () => { it("Should serve the manifest file", async () => { const worker = (await import("../src/worker")).default; - const response = await worker.fetch(new Request("http://localhost/manifest.json"), {}); + const response = await worker.fetch(new Request("http://localhost/manifest"), {}); const content = await response.json(); expect(content).toEqual(manifest); }); diff --git a/wrangler.toml b/wrangler.toml index 5a0953a..2800145 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -4,4 +4,7 @@ compatibility_date = "2024-05-23" node_compat = true [env.dev] -[env.prod] \ No newline at end of file +[env.prod] + +[observability] +enabled = true \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 85dc5db..bf75333 100644 --- a/yarn.lock +++ b/yarn.lock @@ -344,37 +344,45 @@ dependencies: statuses "^2.0.1" -"@cloudflare/kv-asset-handler@0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz#06437b75664729823ac9033b89f06a3b078e4f55" - integrity sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA== +"@cloudflare/kv-asset-handler@0.3.4": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.4.tgz#5cc152847c8ae4d280ec5d7f4f6ba8c976b585c3" + integrity sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q== dependencies: mime "^3.0.0" -"@cloudflare/workerd-darwin-64@1.20240610.1": - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240610.1.tgz#417d18708664ec9662d74280f1f78cd50c209035" - integrity sha512-YanZ1iXgMGaUWlleB5cswSE6qbzyjQ8O7ENWZcPAcZZ6BfuL7q3CWi0t9iM1cv2qx92rRztsRTyjcfq099++XQ== +"@cloudflare/workerd-darwin-64@1.20240925.0": + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240925.0.tgz#f78fe394f73540594609d8e05a2da7feb46c76c0" + integrity sha512-KdLnSXuzB65CbqZPm+qYzk+zkQ1tUNPaaRGYVd/jPYAxwwtfTUQdQ+ahDPwVVs2tmQELKy7ZjQjf2apqSWUfjw== + +"@cloudflare/workerd-darwin-arm64@1.20240925.0": + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240925.0.tgz#f03b17177744ad898bb12610d15cc0a9744abfe6" + integrity sha512-MiQ6uUmCXjsXgWNV+Ock2tp2/tYqNJGzjuaH6jFioeRF+//mz7Tv7J7EczOL4zq+TH8QFOh0/PUsLyazIWVGng== -"@cloudflare/workerd-darwin-arm64@1.20240610.1": - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240610.1.tgz#740764dc991414c247cb72dd2c74985196937fa2" - integrity sha512-bRe/y/LKjIgp3L2EHjc+CvoCzfHhf4aFTtOBkv2zW+VToNJ4KlXridndf7LvR9urfsFRRo9r4TXCssuKaU+ypQ== +"@cloudflare/workerd-linux-64@1.20240925.0": + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240925.0.tgz#fe0366b804b957acf5012d889e94163bab806a57" + integrity sha512-Rjix8jsJMfsInmq3Hm3fmiRQ+rwzuWRPV1pg/OWhMSfNP7Qp2RCU+RGkhgeR9Z5eNAje0Sn2BMrFq4RvF9/yRA== -"@cloudflare/workerd-linux-64@1.20240610.1": - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240610.1.tgz#62ed716e4b216fd9ca5e40c8fcecf20c16d8fb1b" - integrity sha512-2zDcadR7+Gs9SjcMXmwsMji2Xs+yASGNA2cEHDuFc4NMUup+eL1mkzxc/QzvFjyBck98e92rBjMZt2dVscpGKg== +"@cloudflare/workerd-linux-arm64@1.20240925.0": + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240925.0.tgz#fcf82de06def420972c661a6021c87683cd8fbdc" + integrity sha512-VYIPeMHQRtbwQoIjUwS/zULlywPxyDvo46XkTpIW5MScEChfqHvAYviQ7TzYGx6Q+gmZmN+DUB2KOMx+MEpCxA== -"@cloudflare/workerd-linux-arm64@1.20240610.1": - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240610.1.tgz#c93d924618d69c8eddfe126da321d2efc3865ed0" - integrity sha512-7y41rPi5xmIYJN8CY+t3RHnjLL0xx/WYmaTd/j552k1qSr02eTE2o/TGyWZmGUC+lWnwdPQJla0mXbvdqgRdQg== +"@cloudflare/workerd-windows-64@1.20240925.0": + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240925.0.tgz#0a5c82b95b03a94591cc8a1830f28d2e41ff7685" + integrity sha512-C8peGvaU5R51bIySi1VbyfRgwNSSRknqoFSnSbSBI3uTN3THTB3UnmRKy7GXJDmyjgXuT9Pcs1IgaWNubLtNtw== -"@cloudflare/workerd-windows-64@1.20240610.1": - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240610.1.tgz#6e55ba3c253e33c94cf0d2e2f0ac8f7e30e072bb" - integrity sha512-B0LyT3DB6rXHWNptnntYHPaoJIy0rXnGfeDBM3nEVV8JIsQrx8MEFn2F2jYioH1FkUVavsaqKO/zUosY3tZXVA== +"@cloudflare/workers-shared@0.5.4": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@cloudflare/workers-shared/-/workers-shared-0.5.4.tgz#bbf8f03b79a6bc0169ad66a6015ebe579d36753a" + integrity sha512-PNL/0TjKRdUHa1kwgVdqUNJVZ9ez4kacsi8omz+gv859EvJmsVuGiMAClY2YfJnC9LVKhKCcjqmFgKNXG9/IXA== + dependencies: + mime "^3.0.0" + zod "^3.22.3" "@commitlint/cli@19.3.0": version "19.3.0" @@ -2622,11 +2630,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -consola@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" - integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== - conventional-changelog-angular@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz#5eec8edbff15aa9b1680a8dcfbd53e2d7eb2ba7a" @@ -4892,10 +4895,10 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -miniflare@3.20240610.0: - version "3.20240610.0" - resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-3.20240610.0.tgz#6efeb60f3ba2e658a3e0395538010228fac0e719" - integrity sha512-J6aXmkII5gcq+kC4TurxKiR4rC++apPST/K8P/YjqoQQgrJ+NRPacBhf6iVh8R3ujnXYXaq+Ae+gm+LM0XHK/w== +miniflare@3.20240925.0: + version "3.20240925.0" + resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-3.20240925.0.tgz#a291998dedf90bfb4bcfdad033ba030851ff9171" + integrity sha512-2LmQbKHf0n6ertUKhT+Iltixi53giqDH7P71+wCir3OnGyXIODqYwOECx1mSDNhYThpxM2dav8UdPn6SQiMoXw== dependencies: "@cspotcode/source-map-support" "0.8.1" acorn "^8.8.0" @@ -4904,11 +4907,11 @@ miniflare@3.20240610.0: exit-hook "^2.2.1" glob-to-regexp "^0.4.1" stoppable "^1.1.0" - undici "^5.28.2" - workerd "1.20240610.1" - ws "^8.11.0" + undici "^5.28.4" + workerd "1.20240925.0" + ws "^8.17.1" youch "^3.2.2" - zod "^3.20.6" + zod "^3.22.3" minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" @@ -4994,11 +4997,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch-native@^1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" - integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== - node-forge@^1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" @@ -5088,6 +5086,11 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" +ohash@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" + integrity sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g== + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -5262,6 +5265,11 @@ path-to-regexp@^6.2.0: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== +path-to-regexp@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" + integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -5730,7 +5738,7 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -6158,15 +6166,15 @@ typescript-eslint@7.13.1: "@typescript-eslint/parser" "7.13.1" "@typescript-eslint/utils" "7.13.1" -typescript@5.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +typescript@5.6.2: + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== -ufo@^1.5.3: - version "1.5.3" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" - integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== +ufo@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" + integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== unbox-primitive@^1.0.2: version "1.0.2" @@ -6183,24 +6191,22 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici@^5.25.4, undici@^5.28.2: +undici@^5.25.4, undici@^5.28.4: version "5.28.4" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== dependencies: "@fastify/busboy" "^2.0.0" -"unenv@npm:unenv-nightly@1.10.0-1717606461.a117952": - version "1.10.0-1717606461.a117952" - resolved "https://registry.yarnpkg.com/unenv-nightly/-/unenv-nightly-1.10.0-1717606461.a117952.tgz#ff0b97e1e159f84be747271e1d55263b4b3eae7e" - integrity sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg== +"unenv@npm:unenv-nightly@2.0.0-20240919-125358-9a64854": + version "2.0.0-20240919-125358-9a64854" + resolved "https://registry.yarnpkg.com/unenv-nightly/-/unenv-nightly-2.0.0-20240919-125358-9a64854.tgz#13f6812c7b12b9521ea05c6d49259d136e093acd" + integrity sha512-XjsgUTrTHR7iw+k/SRTNjh6EQgwpC9voygnoCJo5kh4hKqsSDHUW84MhL9EsHTNfLctvVBHaSw8e2k3R2fKXsQ== dependencies: - consola "^3.2.3" defu "^6.1.4" - mime "^3.0.0" - node-fetch-native "^1.6.4" + ohash "^1.1.4" pathe "^1.1.2" - ufo "^1.5.3" + ufo "^1.5.4" unescape-js@^1.0.5: version "1.1.4" @@ -6331,36 +6337,38 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -workerd@1.20240610.1: - version "1.20240610.1" - resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20240610.1.tgz#a73718a0f2daff39b2c03e0be143ad007d13c60e" - integrity sha512-Rtut5GrsODQMh6YU43b9WZ980Wd05Ov1/ds88pT/SoetmXFBvkBzdRfiHiATv+azmGX8KveE0i/Eqzk/yI01ug== +workerd@1.20240925.0: + version "1.20240925.0" + resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20240925.0.tgz#0a2602eabfa7e1d01d89ff2b600ed359be9b515d" + integrity sha512-/Jj6+yLwfieZGEt3Kx4+5MoufuC3g/8iFaIh4MPBNGJOGYmdSKXvgCqz09m2+tVCYnysRfbq2zcbVxJRBfOCqQ== optionalDependencies: - "@cloudflare/workerd-darwin-64" "1.20240610.1" - "@cloudflare/workerd-darwin-arm64" "1.20240610.1" - "@cloudflare/workerd-linux-64" "1.20240610.1" - "@cloudflare/workerd-linux-arm64" "1.20240610.1" - "@cloudflare/workerd-windows-64" "1.20240610.1" - -wrangler@3.60.3: - version "3.60.3" - resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.60.3.tgz#1b2ebd2214e10e42a143e47b425480cbe7b7be21" - integrity sha512-a6zn/KFnYaYp3nxJR/aP0TeaBvJDkrrfI89KoxUtx28H7zpya/5/VLu3CxQ3PRspEojJGF0s6f3/pddRy3F+BQ== - dependencies: - "@cloudflare/kv-asset-handler" "0.3.2" + "@cloudflare/workerd-darwin-64" "1.20240925.0" + "@cloudflare/workerd-darwin-arm64" "1.20240925.0" + "@cloudflare/workerd-linux-64" "1.20240925.0" + "@cloudflare/workerd-linux-arm64" "1.20240925.0" + "@cloudflare/workerd-windows-64" "1.20240925.0" + +wrangler@3.79.0: + version "3.79.0" + resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.79.0.tgz#c23b08ba06bff752b650a567a7fcbe03e4036914" + integrity sha512-29wzQWc5qNKtD3bSyAEX11j/U5IIk8xy2/ZJ4wljJlS5ppff8qGqI+LtlLmqjqTSeQqFLb87xRkms0YFUgNLXg== + dependencies: + "@cloudflare/kv-asset-handler" "0.3.4" + "@cloudflare/workers-shared" "0.5.4" "@esbuild-plugins/node-globals-polyfill" "^0.2.3" "@esbuild-plugins/node-modules-polyfill" "^0.2.2" blake3-wasm "^2.1.5" chokidar "^3.5.3" esbuild "0.17.19" - miniflare "3.20240610.0" + miniflare "3.20240925.0" nanoid "^3.3.3" - path-to-regexp "^6.2.0" + path-to-regexp "^6.3.0" resolve "^1.22.8" resolve.exports "^2.0.2" selfsigned "^2.0.1" - source-map "0.6.1" - unenv "npm:unenv-nightly@1.10.0-1717606461.a117952" + source-map "^0.6.1" + unenv "npm:unenv-nightly@2.0.0-20240919-125358-9a64854" + workerd "1.20240925.0" xxhash-wasm "^1.0.1" optionalDependencies: fsevents "~2.3.2" @@ -6405,10 +6413,10 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@^8.11.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== +ws@^8.17.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== xdg-basedir@^5.1.0: version "5.1.0" @@ -6487,7 +6495,7 @@ zod-validation-error@^3.0.3: resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-3.3.0.tgz#2cfe81b62d044e0453d1aa3ae7c32a2f36dde9af" integrity sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw== -zod@^3.20.6, zod@^3.22.4: +zod@^3.22.3, zod@^3.22.4: version "3.23.8" resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==