diff --git a/apps/desktop/src/lib/cmds/index.ts b/apps/desktop/src/lib/cmds/index.ts index 8e43019..3a77a98 100644 --- a/apps/desktop/src/lib/cmds/index.ts +++ b/apps/desktop/src/lib/cmds/index.ts @@ -12,7 +12,7 @@ import { onQuickLinkSelect } from "./quick-links" const onExtCmdSelect: OnExtCmdSelect = ( ext: ExtPackageJsonExtra, - cmd: CustomUiCmd | TemplateUiCmd, + cmd: CustomUiCmd | TemplateUiCmd | HeadlessCmd, { isDev, hmr }: { isDev: boolean; hmr: boolean } ) => { switch (cmd.type) { diff --git a/apps/desktop/src/routes/app/extension/store/[identifier]/+page.ts b/apps/desktop/src/routes/app/extension/store/[identifier]/+page.ts index 443d632..7e2fa89 100644 --- a/apps/desktop/src/routes/app/extension/store/[identifier]/+page.ts +++ b/apps/desktop/src/routes/app/extension/store/[identifier]/+page.ts @@ -2,6 +2,7 @@ import { appState } from "@/stores" import { DBExtension, ExtPublish, KunkunExtManifest } from "@kksh/api/models" import { getExtensionsByIdentifier, getExtensionsLatestPublishByIdentifier } from "@kksh/sdk" import { error } from "@sveltejs/kit" +import * as v from "valibot" import type { PageLoad } from "./$types" export const load: PageLoad = ({ @@ -42,9 +43,9 @@ export const load: PageLoad = ({ }) } return { - extPublish: extPublish, + extPublish: v.parse(ExtPublish, extPublish), ext, - manifest: extPublish.manifest, + manifest: v.parse(KunkunExtManifest, extPublish.manifest), params } }) diff --git a/package.json b/package.json index a939b9b..15d46c3 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@changesets/cli": "^2.28.1", "@hey-api/client-fetch": "^0.8.3", "@iconify/svelte": "^4.2.0", - "@kksh/sdk": "^0.0.2", + "@kksh/sdk": "^0.0.3", "@supabase/supabase-js": "^2.49.1", "@tauri-apps/api": "^2.3.0", "@tauri-apps/cli": "^2.3.1", diff --git a/packages/api/src/models/manifest.ts b/packages/api/src/models/manifest.ts index 055dd88..1ea1200 100644 --- a/packages/api/src/models/manifest.ts +++ b/packages/api/src/models/manifest.ts @@ -18,7 +18,6 @@ export const OSPlatformEnum = { export const OSPlatform = v.picklist(Object.values(OSPlatformEnum)) export type OSPlatform = v.InferOutput -const allPlatforms = Object.values(OSPlatformEnum) export const TriggerCmd = v.object({ type: v.union([v.literal("text"), v.literal("regex")]), value: v.string() diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2c0d10..79586a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^4.2.0 version: 4.2.0(svelte@5.20.5) '@kksh/sdk': - specifier: ^0.0.2 - version: 0.0.2(typescript@5.7.3) + specifier: ^0.0.3 + version: 0.0.3(@hey-api/client-fetch@0.8.3)(typescript@5.7.3) '@supabase/supabase-js': specifier: ^2.49.1 version: 2.49.1 @@ -341,7 +341,7 @@ importers: version: 8.25.0(eslint@9.21.0(jiti@2.4.0))(typescript@5.6.3) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.5.3) + version: 10.4.20(postcss@8.4.49) bits-ui: specifier: 1.0.0-next.86 version: 1.0.0-next.86(svelte@5.20.5) @@ -2996,9 +2996,10 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 - '@kksh/sdk@0.0.2': - resolution: {integrity: sha512-z6OXrdWs5IvYlf1RFVzY8Drro9Ye/oDViTpmVZp/sOUPExFtNRnJZGBKvTW7zE23jv1AXByVYxRwDjLb4zI6Sg==} + '@kksh/sdk@0.0.3': + resolution: {integrity: sha512-he5/VSiIfEuXQlGWGxoIurrq/wbddbvZiHbKIGAFTS1DljCHjnAjEajueCkz9M3sbn+WGylS8VSVAFSCWdCfPg==} peerDependencies: + '@hey-api/client-fetch': ^0.8.3 typescript: ^5 '@kksh/svelte5@0.1.15': @@ -14608,8 +14609,9 @@ snapshots: - '@types/react-dom' - tailwindcss - '@kksh/sdk@0.0.2(typescript@5.7.3)': + '@kksh/sdk@0.0.3(@hey-api/client-fetch@0.8.3)(typescript@5.7.3)': dependencies: + '@hey-api/client-fetch': 0.8.3 typescript: 5.7.3 '@kksh/svelte5@0.1.15(lucide-svelte@0.469.0(svelte@5.16.6))(svelte-sonner@0.3.28(svelte@5.16.6))(svelte@5.16.6)(sveltekit-superforms@2.23.1(@sveltejs/kit@2.15.2(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.16.6)(vite@6.0.7(@types/node@22.13.1)(jiti@2.4.0)(terser@5.36.0)(yaml@2.6.1)))(svelte@5.16.6)(vite@6.0.7(@types/node@22.13.1)(jiti@2.4.0)(terser@5.36.0)(yaml@2.6.1)))(@types/json-schema@7.0.15)(svelte@5.16.6)(typescript@5.7.2))(typescript@5.7.2)': @@ -18841,16 +18843,6 @@ snapshots: postcss: 8.5.1 postcss-value-parser: 4.2.0 - autoprefixer@10.4.20(postcss@8.5.3): - dependencies: - browserslist: 4.24.2 - caniuse-lite: 1.0.30001676 - fraction.js: 4.3.7 - normalize-range: 0.1.2 - picocolors: 1.1.1 - postcss: 8.5.3 - postcss-value-parser: 4.2.0 - available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0