diff --git a/.bunfig.toml b/.bunfig.toml new file mode 100644 index 0000000..7e51f12 --- /dev/null +++ b/.bunfig.toml @@ -0,0 +1,2 @@ +[install] +registry = "https://registry.npmmirror.com/" \ No newline at end of file diff --git a/README.md b/README.md index 8253342..0c08638 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,9 @@ ## 试试grpc,实现node与python通信,扩展更多的功能。 https://grpc.org.cn/docs/languages/node/quickstart/ -https://www.doubao.com/chat/23869592666505474 \ No newline at end of file +https://www.doubao.com/chat/23869592666505474 + + +## 要求 + +bun < 1.2.0 \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 359f9cc..d7ccca7 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/client/auto-imports.d.ts b/packages/client/auto-imports.d.ts index 3bea22b..7e54a22 100644 --- a/packages/client/auto-imports.d.ts +++ b/packages/client/auto-imports.d.ts @@ -6,114 +6,114 @@ // biome-ignore lint: disable export {} declare global { - const $fetch: typeof import('ofetch')['$fetch'] - const AIProviderNoImplementedChatError: typeof import('./src/composables/useChat/modules/error')['AIProviderNoImplementedChatError'] - const AIProviderNoImplementedPaintError: typeof import('./src/composables/useChat/modules/error')['AIProviderNoImplementedPaintError'] - const ApiError: typeof import('./src/composables/useChat/modules/error')['ApiError'] - const BaseError: typeof import('./src/composables/useChat/modules/error')['BaseError'] - const Chat: typeof import('./src/composables/useChat/Chat')['Chat'] - const ChatboxAIAPIError: typeof import('./src/composables/useChat/modules/error')['ChatboxAIAPIError'] - const EffectScope: typeof import('vue')['EffectScope'] - const MessageHelper: typeof import('./src/composables/useChat/modules/MessageHelper')['MessageHelper'] - const NetworkError: typeof import('./src/composables/useChat/modules/error')['NetworkError'] - const Ollama: typeof import('./src/composables/useChat/provider/Ollama')['Ollama'] - const OpenAI: typeof import('./src/composables/useChat/provider/Openai')['OpenAI'] - const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] - const clearSSRContext: typeof import('../../internal/x/composables/ssrContext')['clearSSRContext'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const createPinia: typeof import('pinia')['createPinia'] - const createSSRContext: typeof import('../../internal/x/composables/ssrContext')['createSSRContext'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const defineStore: typeof import('pinia')['defineStore'] - const effectScope: typeof import('vue')['effectScope'] - const getActivePinia: typeof import('pinia')['getActivePinia'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const getCurrentWatcher: typeof import('vue')['getCurrentWatcher'] - const h: typeof import('vue')['h'] - const hydrateSSRContext: typeof import('../../internal/x/composables/ssrContext')['hydrateSSRContext'] - const inject: typeof import('vue')['inject'] - const injectHead: typeof import('@unhead/vue')['injectHead'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const isShallow: typeof import('vue')['isShallow'] - const mapActions: typeof import('pinia')['mapActions'] - const mapGetters: typeof import('pinia')['mapGetters'] - const mapState: typeof import('pinia')['mapState'] - const mapStores: typeof import('pinia')['mapStores'] - const mapWritableState: typeof import('pinia')['mapWritableState'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] - const parseCookieHeader: typeof import('../../internal/x/composables/cookieUtils')['parseCookieHeader'] - const parseDocumentCookies: typeof import('../../internal/x/composables/cookieUtils')['parseDocumentCookies'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const render: typeof import('../../internal/x/composables/README.md')['render'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveSSRContext: typeof import('../../internal/x/composables/ssrContext')['resolveSSRContext'] - const serializeCookie: typeof import('../../internal/x/composables/cookieUtils')['serializeCookie'] - const setActivePinia: typeof import('pinia')['setActivePinia'] - const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const storeToRefs: typeof import('pinia')['storeToRefs'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const toValue: typeof import('vue')['toValue'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useAuthStore: typeof import('./src/store/auth')['useAuthStore'] - const useChat: typeof import('./src/composables/useChat/index')['useChat'] - const useCookie: typeof import('../../internal/x/composables/useCookie')['useCookie'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useFetch: typeof import('../../internal/x/composables/useFetch')['useFetch'] - const useGlobal: typeof import('./src/composables/useGlobal/index')['useGlobal'] - const useHead: typeof import('@unhead/vue')['useHead'] - const useHeadSafe: typeof import('@unhead/vue')['useHeadSafe'] - const useId: typeof import('vue')['useId'] - const useLink: typeof import('vue-router')['useLink'] - const useModel: typeof import('vue')['useModel'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] - const useScroll: typeof import('./src/composables/useScroll/index')['useScroll'] - const useSeoMeta: typeof import('@unhead/vue')['useSeoMeta'] - const useServerHead: typeof import('@unhead/vue')['useServerHead'] - const useServerHeadSafe: typeof import('@unhead/vue')['useServerHeadSafe'] - const useServerSeoMeta: typeof import('@unhead/vue')['useServerSeoMeta'] - const useShareCache: typeof import('../../internal/x/composables/useShareContext')['useShareCache'] - const useSlots: typeof import('vue')['useSlots'] - const useTemplateRef: typeof import('vue')['useTemplateRef'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] + const $fetch: typeof import('ofetch').$fetch + const AIProviderNoImplementedChatError: typeof import('./src/composables/useChat/modules/error').AIProviderNoImplementedChatError + const AIProviderNoImplementedPaintError: typeof import('./src/composables/useChat/modules/error').AIProviderNoImplementedPaintError + const ApiError: typeof import('./src/composables/useChat/modules/error').ApiError + const BaseError: typeof import('./src/composables/useChat/modules/error').BaseError + const Chat: typeof import('./src/composables/useChat/Chat').Chat + const ChatboxAIAPIError: typeof import('./src/composables/useChat/modules/error').ChatboxAIAPIError + const EffectScope: typeof import('vue').EffectScope + const MessageHelper: typeof import('./src/composables/useChat/modules/MessageHelper').MessageHelper + const NetworkError: typeof import('./src/composables/useChat/modules/error').NetworkError + const Ollama: typeof import('./src/composables/useChat/provider/Ollama').Ollama + const OpenAI: typeof import('./src/composables/useChat/provider/Openai').OpenAI + const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate + const clearSSRContext: typeof import('../../internal/x/composables/ssrContext').clearSSRContext + const computed: typeof import('vue').computed + const createApp: typeof import('vue').createApp + const createPinia: typeof import('pinia').createPinia + const createSSRContext: typeof import('../../internal/x/composables/ssrContext').createSSRContext + const customRef: typeof import('vue').customRef + const defineAsyncComponent: typeof import('vue').defineAsyncComponent + const defineComponent: typeof import('vue').defineComponent + const defineStore: typeof import('pinia').defineStore + const effectScope: typeof import('vue').effectScope + const getActivePinia: typeof import('pinia').getActivePinia + const getCurrentInstance: typeof import('vue').getCurrentInstance + const getCurrentScope: typeof import('vue').getCurrentScope + const getCurrentWatcher: typeof import('vue').getCurrentWatcher + const h: typeof import('vue').h + const hydrateSSRContext: typeof import('../../internal/x/composables/ssrContext').hydrateSSRContext + const inject: typeof import('vue').inject + const injectHead: typeof import('@unhead/vue').injectHead + const isProxy: typeof import('vue').isProxy + const isReactive: typeof import('vue').isReactive + const isReadonly: typeof import('vue').isReadonly + const isRef: typeof import('vue').isRef + const isShallow: typeof import('vue').isShallow + const mapActions: typeof import('pinia').mapActions + const mapGetters: typeof import('pinia').mapGetters + const mapState: typeof import('pinia').mapState + const mapStores: typeof import('pinia').mapStores + const mapWritableState: typeof import('pinia').mapWritableState + const markRaw: typeof import('vue').markRaw + const nextTick: typeof import('vue').nextTick + const onActivated: typeof import('vue').onActivated + const onBeforeMount: typeof import('vue').onBeforeMount + const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave + const onBeforeRouteUpdate: typeof import('vue-router').onBeforeRouteUpdate + const onBeforeUnmount: typeof import('vue').onBeforeUnmount + const onBeforeUpdate: typeof import('vue').onBeforeUpdate + const onDeactivated: typeof import('vue').onDeactivated + const onErrorCaptured: typeof import('vue').onErrorCaptured + const onMounted: typeof import('vue').onMounted + const onRenderTracked: typeof import('vue').onRenderTracked + const onRenderTriggered: typeof import('vue').onRenderTriggered + const onScopeDispose: typeof import('vue').onScopeDispose + const onServerPrefetch: typeof import('vue').onServerPrefetch + const onUnmounted: typeof import('vue').onUnmounted + const onUpdated: typeof import('vue').onUpdated + const onWatcherCleanup: typeof import('vue').onWatcherCleanup + const parseCookieHeader: typeof import('../../internal/x/composables/cookieUtils').parseCookieHeader + const parseDocumentCookies: typeof import('../../internal/x/composables/cookieUtils').parseDocumentCookies + const provide: typeof import('vue').provide + const reactive: typeof import('vue').reactive + const readonly: typeof import('vue').readonly + const ref: typeof import('vue').ref + const render: typeof import('../../internal/x/composables/README.md').render + const resolveComponent: typeof import('vue').resolveComponent + const resolveSSRContext: typeof import('../../internal/x/composables/ssrContext').resolveSSRContext + const serializeCookie: typeof import('../../internal/x/composables/cookieUtils').serializeCookie + const setActivePinia: typeof import('pinia').setActivePinia + const setMapStoreSuffix: typeof import('pinia').setMapStoreSuffix + const shallowReactive: typeof import('vue').shallowReactive + const shallowReadonly: typeof import('vue').shallowReadonly + const shallowRef: typeof import('vue').shallowRef + const storeToRefs: typeof import('pinia').storeToRefs + const toRaw: typeof import('vue').toRaw + const toRef: typeof import('vue').toRef + const toRefs: typeof import('vue').toRefs + const toValue: typeof import('vue').toValue + const triggerRef: typeof import('vue').triggerRef + const unref: typeof import('vue').unref + const useAttrs: typeof import('vue').useAttrs + const useAuthStore: typeof import('./src/store/auth').useAuthStore + const useChat: typeof import('./src/composables/useChat/index').useChat + const useCookie: typeof import('../../internal/x/composables/useCookie').useCookie + const useCssModule: typeof import('vue').useCssModule + const useCssVars: typeof import('vue').useCssVars + const useFetch: typeof import('../../internal/x/composables/useFetch').useFetch + const useGlobal: typeof import('./src/composables/useGlobal/index').useGlobal + const useHead: typeof import('@unhead/vue').useHead + const useHeadSafe: typeof import('@unhead/vue').useHeadSafe + const useId: typeof import('vue').useId + const useLink: typeof import('vue-router').useLink + const useModel: typeof import('vue').useModel + const useRoute: typeof import('vue-router').useRoute + const useRouter: typeof import('vue-router').useRouter + const useScroll: typeof import('./src/composables/useScroll/index').useScroll + const useSeoMeta: typeof import('@unhead/vue').useSeoMeta + const useServerHead: typeof import('@unhead/vue').useServerHead + const useServerHeadSafe: typeof import('@unhead/vue').useServerHeadSafe + const useServerSeoMeta: typeof import('@unhead/vue').useServerSeoMeta + const useShareCache: typeof import('../../internal/x/composables/useShareContext').useShareCache + const useSlots: typeof import('vue').useSlots + const useTemplateRef: typeof import('vue').useTemplateRef + const watch: typeof import('vue').watch + const watchEffect: typeof import('vue').watchEffect + const watchPostEffect: typeof import('vue').watchPostEffect + const watchSyncEffect: typeof import('vue').watchSyncEffect } // for type re-export declare global { diff --git a/tsup.config.ts b/tsup.config.ts index fe50bdd..01725b4 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -6,8 +6,6 @@ import fg from "fast-glob" const jobsEntries = await fg(["packages/server/src/jobs/**/*.ts"], { }); const modulesEntries = await fg(["packages/server/src/modules/**/*.ts"], { }); -console.log(process.env.NODE_ENV); - export default defineConfig({ entry: [...jobsEntries, ...modulesEntries, "packages/server/src/booststap.ts"], format: "esm",