From f6ca42a0bca8db7eba41d8720999dadb7f455bf0 Mon Sep 17 00:00:00 2001 From: whilefoo Date: Wed, 20 Nov 2024 15:11:49 +0100 Subject: [PATCH] fix: upgrade Typebox and cross-env --- package.json | 4 ++-- src/index.ts | 4 ++-- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 99b84a7..1453ce3 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prepare": "husky install", "supabase:generate:local": "supabase gen types typescript --local > src/types/database.ts", "supabase:generate:remote": "cross-env-shell \"supabase gen types typescript --project-id $SUPABASE_PROJECT_ID --schema public > src/types/database.ts\"", - "test": "jest --setupFiles dotenv/config --coverage" + "test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --setupFiles dotenv/config --coverage" }, "keywords": [ "typescript", @@ -31,7 +31,7 @@ ], "dependencies": { "@octokit/rest": "^20.1.0", - "@sinclair/typebox": "^0.33.21", + "@sinclair/typebox": "0.34.3", "@supabase/supabase-js": "2.43.2", "@ubiquity-os/plugin-sdk": "^1.0.11", "@ubiquity-os/ubiquity-os-logger": "^1.3.2", diff --git a/src/index.ts b/src/index.ts index 6f384c0..ab6f403 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ import { Database } from "./types/database"; import { Env, envSchema } from "./types/env"; import { PluginSettings, pluginSettingsSchema } from "./types/plugin-input"; import { Command } from "./types/command"; +import { Manifest } from "@ubiquity-os/plugin-sdk/manifest"; export default { async fetch(request: Request, env: Env, executionContext: ExecutionContext) { @@ -17,8 +18,7 @@ export default { const supabase = createClient(context.env.SUPABASE_URL, context.env.SUPABASE_KEY); return run({ ...context, adapters: createAdapters(supabase, context) }); }, - // @ts-expect-error strings cannot be assigned to events - manifest, + manifest as Manifest, { kernelPublicKey: env.KERNEL_PUBLIC_KEY, settingsSchema: pluginSettingsSchema, envSchema: envSchema } ).fetch(request, env, executionContext); }, diff --git a/yarn.lock b/yarn.lock index 9d2ab01..9a38372 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1808,6 +1808,11 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== +"@sinclair/typebox@0.34.3": + version "0.34.3" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.3.tgz#530e4a1a1b45985576312f2a3f4a45c6100044b0" + integrity sha512-fEgncmnqn6WGibPn34deH5PwmMTuNCZ2clwlwevgFn8rP0l38zzWRg3KVYhoOZwkZ2Ew3yhZ/STdGDuMig66oQ== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"