mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-12 09:49:42 +00:00
feat: enhance command handling and update SDK version
This commit is contained in:
parent
0c9d9d5373
commit
acc1e7ffae
@ -12,7 +12,7 @@ import { onQuickLinkSelect } from "./quick-links"
|
|||||||
|
|
||||||
const onExtCmdSelect: OnExtCmdSelect = (
|
const onExtCmdSelect: OnExtCmdSelect = (
|
||||||
ext: ExtPackageJsonExtra,
|
ext: ExtPackageJsonExtra,
|
||||||
cmd: CustomUiCmd | TemplateUiCmd,
|
cmd: CustomUiCmd | TemplateUiCmd | HeadlessCmd,
|
||||||
{ isDev, hmr }: { isDev: boolean; hmr: boolean }
|
{ isDev, hmr }: { isDev: boolean; hmr: boolean }
|
||||||
) => {
|
) => {
|
||||||
switch (cmd.type) {
|
switch (cmd.type) {
|
||||||
|
@ -2,6 +2,7 @@ import { appState } from "@/stores"
|
|||||||
import { DBExtension, ExtPublish, KunkunExtManifest } from "@kksh/api/models"
|
import { DBExtension, ExtPublish, KunkunExtManifest } from "@kksh/api/models"
|
||||||
import { getExtensionsByIdentifier, getExtensionsLatestPublishByIdentifier } from "@kksh/sdk"
|
import { getExtensionsByIdentifier, getExtensionsLatestPublishByIdentifier } from "@kksh/sdk"
|
||||||
import { error } from "@sveltejs/kit"
|
import { error } from "@sveltejs/kit"
|
||||||
|
import * as v from "valibot"
|
||||||
import type { PageLoad } from "./$types"
|
import type { PageLoad } from "./$types"
|
||||||
|
|
||||||
export const load: PageLoad = ({
|
export const load: PageLoad = ({
|
||||||
@ -42,9 +43,9 @@ export const load: PageLoad = ({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
extPublish: extPublish,
|
extPublish: v.parse(ExtPublish, extPublish),
|
||||||
ext,
|
ext,
|
||||||
manifest: extPublish.manifest,
|
manifest: v.parse(KunkunExtManifest, extPublish.manifest),
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
"@changesets/cli": "^2.28.1",
|
"@changesets/cli": "^2.28.1",
|
||||||
"@hey-api/client-fetch": "^0.8.3",
|
"@hey-api/client-fetch": "^0.8.3",
|
||||||
"@iconify/svelte": "^4.2.0",
|
"@iconify/svelte": "^4.2.0",
|
||||||
"@kksh/sdk": "^0.0.2",
|
"@kksh/sdk": "^0.0.3",
|
||||||
"@supabase/supabase-js": "^2.49.1",
|
"@supabase/supabase-js": "^2.49.1",
|
||||||
"@tauri-apps/api": "^2.3.0",
|
"@tauri-apps/api": "^2.3.0",
|
||||||
"@tauri-apps/cli": "^2.3.1",
|
"@tauri-apps/cli": "^2.3.1",
|
||||||
|
@ -18,7 +18,6 @@ export const OSPlatformEnum = {
|
|||||||
|
|
||||||
export const OSPlatform = v.picklist(Object.values(OSPlatformEnum))
|
export const OSPlatform = v.picklist(Object.values(OSPlatformEnum))
|
||||||
export type OSPlatform = v.InferOutput<typeof OSPlatform>
|
export type OSPlatform = v.InferOutput<typeof OSPlatform>
|
||||||
const allPlatforms = Object.values(OSPlatformEnum)
|
|
||||||
export const TriggerCmd = v.object({
|
export const TriggerCmd = v.object({
|
||||||
type: v.union([v.literal("text"), v.literal("regex")]),
|
type: v.union([v.literal("text"), v.literal("regex")]),
|
||||||
value: v.string()
|
value: v.string()
|
||||||
|
24
pnpm-lock.yaml
generated
24
pnpm-lock.yaml
generated
@ -18,8 +18,8 @@ importers:
|
|||||||
specifier: ^4.2.0
|
specifier: ^4.2.0
|
||||||
version: 4.2.0(svelte@5.20.5)
|
version: 4.2.0(svelte@5.20.5)
|
||||||
'@kksh/sdk':
|
'@kksh/sdk':
|
||||||
specifier: ^0.0.2
|
specifier: ^0.0.3
|
||||||
version: 0.0.2(typescript@5.7.3)
|
version: 0.0.3(@hey-api/client-fetch@0.8.3)(typescript@5.7.3)
|
||||||
'@supabase/supabase-js':
|
'@supabase/supabase-js':
|
||||||
specifier: ^2.49.1
|
specifier: ^2.49.1
|
||||||
version: 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)
|
version: 8.25.0(eslint@9.21.0(jiti@2.4.0))(typescript@5.6.3)
|
||||||
autoprefixer:
|
autoprefixer:
|
||||||
specifier: ^10.4.20
|
specifier: ^10.4.20
|
||||||
version: 10.4.20(postcss@8.5.3)
|
version: 10.4.20(postcss@8.4.49)
|
||||||
bits-ui:
|
bits-ui:
|
||||||
specifier: 1.0.0-next.86
|
specifier: 1.0.0-next.86
|
||||||
version: 1.0.0-next.86(svelte@5.20.5)
|
version: 1.0.0-next.86(svelte@5.20.5)
|
||||||
@ -2996,9 +2996,10 @@ packages:
|
|||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
react-dom: ^18.2.0
|
react-dom: ^18.2.0
|
||||||
|
|
||||||
'@kksh/sdk@0.0.2':
|
'@kksh/sdk@0.0.3':
|
||||||
resolution: {integrity: sha512-z6OXrdWs5IvYlf1RFVzY8Drro9Ye/oDViTpmVZp/sOUPExFtNRnJZGBKvTW7zE23jv1AXByVYxRwDjLb4zI6Sg==}
|
resolution: {integrity: sha512-he5/VSiIfEuXQlGWGxoIurrq/wbddbvZiHbKIGAFTS1DljCHjnAjEajueCkz9M3sbn+WGylS8VSVAFSCWdCfPg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
'@hey-api/client-fetch': ^0.8.3
|
||||||
typescript: ^5
|
typescript: ^5
|
||||||
|
|
||||||
'@kksh/svelte5@0.1.15':
|
'@kksh/svelte5@0.1.15':
|
||||||
@ -14608,8 +14609,9 @@ snapshots:
|
|||||||
- '@types/react-dom'
|
- '@types/react-dom'
|
||||||
- tailwindcss
|
- 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:
|
dependencies:
|
||||||
|
'@hey-api/client-fetch': 0.8.3
|
||||||
typescript: 5.7.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)':
|
'@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: 8.5.1
|
||||||
postcss-value-parser: 4.2.0
|
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:
|
available-typed-arrays@1.0.7:
|
||||||
dependencies:
|
dependencies:
|
||||||
possible-typed-array-names: 1.0.0
|
possible-typed-array-names: 1.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user