diff --git a/package.json b/package.json index 729f6ab8..4e83a6f2 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "@nuxt/module-builder": "^0.7.1", "@nuxt/schema": "^3.12.1", "@nuxt/test-utils": "^3.13.1", + "@nuxthub/core": "link:.", "@types/node": "^20.14.2", "changelogen": "^0.5.5", "eslint": "^9.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4739615..71e01359 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: '@nuxt/test-utils': specifier: ^3.13.1 version: 3.13.1(h3@1.11.1)(happy-dom@14.12.0)(nitropack@2.9.6(encoding@0.1.13))(playwright-core@1.44.1)(rollup@4.14.0)(vite@5.2.13(@types/node@20.14.2)(sass@1.77.2)(terser@5.29.1))(vitest@1.6.0(@types/node@20.14.2)(happy-dom@14.12.0)(sass@1.77.2)(terser@5.29.1))(vue-router@4.3.3(vue@3.4.27(typescript@5.4.5)))(vue@3.4.27(typescript@5.4.5)) + '@nuxthub/core': + specifier: link:. + version: 'link:' '@types/node': specifier: ^20.14.2 version: 20.14.2 diff --git a/src/runtime/blob/app/composables/useMultipartUpload.ts b/src/runtime/blob/app/composables/useMultipartUpload.ts index 17a1adab..3a17b7d8 100644 --- a/src/runtime/blob/app/composables/useMultipartUpload.ts +++ b/src/runtime/blob/app/composables/useMultipartUpload.ts @@ -3,7 +3,7 @@ import { ofetch, type FetchOptions } from 'ofetch' import { joinURL } from 'ufo' import { readonly, ref, type Ref } from 'vue' import type { SerializeObject } from 'nitropack' -import type { BlobUploadedPart, BlobObject } from '../../../../types/blob' +import type { BlobUploadedPart, BlobObject } from '@nuxthub/core' /** * Create a multipart uploader. diff --git a/src/runtime/blob/app/composables/useUpload.ts b/src/runtime/blob/app/composables/useUpload.ts index 33b22829..fee9f88d 100644 --- a/src/runtime/blob/app/composables/useUpload.ts +++ b/src/runtime/blob/app/composables/useUpload.ts @@ -1,6 +1,6 @@ import { createError } from 'h3' import type { FetchOptions } from 'ofetch' -import type { BlobObject } from '../../../../types/blob' +import type { BlobObject } from '@nuxthub/core' interface UploadOptions extends FetchOptions { /** diff --git a/src/runtime/blob/server/utils/blob.ts b/src/runtime/blob/server/utils/blob.ts index b64fbd6f..65631569 100644 --- a/src/runtime/blob/server/utils/blob.ts +++ b/src/runtime/blob/server/utils/blob.ts @@ -8,9 +8,9 @@ import { defu } from 'defu' import { randomUUID } from 'uncrypto' import { parse } from 'pathe' import { joinURL } from 'ufo' +import type { BlobType, FileSizeUnit, BlobUploadedPart, BlobListResult, BlobMultipartUpload, HandleMPUResponse, BlobMultipartOptions, BlobUploadOptions, BlobPutOptions, BlobEnsureOptions, BlobObject, BlobListOptions } from '@nuxthub/core' import { streamToArrayBuffer } from '../../../utils/stream' import { requireNuxtHubFeature } from '../../../utils/features' -import type { BlobType, FileSizeUnit, BlobUploadedPart, BlobListResult, BlobMultipartUpload, HandleMPUResponse, BlobMultipartOptions, BlobUploadOptions, BlobPutOptions, BlobEnsureOptions, BlobObject, BlobListOptions } from '../../../../types/blob' import { useRuntimeConfig } from '#imports' const _r2_buckets: Record = {} diff --git a/src/runtime/database/server/utils/database.ts b/src/runtime/database/server/utils/database.ts index 7345fa05..83d8b13e 100644 --- a/src/runtime/database/server/utils/database.ts +++ b/src/runtime/database/server/utils/database.ts @@ -2,8 +2,8 @@ import { ofetch } from 'ofetch' import { joinURL } from 'ufo' import { createError } from 'h3' import type { H3Error } from 'h3' +import type { D1Database } from '@nuxthub/core' import { requireNuxtHubFeature } from '../../../utils/features' -import type { D1Database } from '../../../../types/database' import { useRuntimeConfig } from '#imports' let _db: D1Database diff --git a/src/runtime/kv/server/utils/kv.ts b/src/runtime/kv/server/utils/kv.ts index e45125d1..38b5618a 100644 --- a/src/runtime/kv/server/utils/kv.ts +++ b/src/runtime/kv/server/utils/kv.ts @@ -3,8 +3,8 @@ import httpDriver from 'unstorage/drivers/http' import cloudflareKVBindingDriver from 'unstorage/drivers/cloudflare-kv-binding' import { joinURL } from 'ufo' import { createError } from 'h3' +import type { HubKV } from '@nuxthub/core' import { requireNuxtHubFeature } from '../../../utils/features' -import type { HubKV } from '../../../../types/kv' import { useRuntimeConfig } from '#imports' let _kv: HubKV