Skip to content

Commit

Permalink
fix: import runtime types from @nuxthub/core (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jun 14, 2024
1 parent d0c5b5c commit 4ff9609
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/runtime/blob/app/composables/useMultipartUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/blob/app/composables/useUpload.ts
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/blob/server/utils/blob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, R2Bucket> = {}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/database/server/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/kv/server/utils/kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ff9609

Please sign in to comment.