Forráskód Böngészése

fix(build): align file upload project faces

creatixchu 1 hónapja
szülő
commit
3b8245afc3

+ 1 - 1
packages/api/remotes/tsconfig.client.json

@@ -21,7 +21,7 @@
       "path": "../../client/connection/tsconfig.client.json"
     },
     {
-      "path": "../../client/file-upload/tsconfig.host.json"
+      "path": "../../client/file-upload/tsconfig.client.json"
     },
     {
       "path": "../../credentials/credentials"

+ 3 - 13
packages/client/file-upload/src/client/contract.ts

@@ -1,3 +1,5 @@
+import type { Context } from '@deepseek-ai/cordis'
+
 /** Browser request body accepted by the background file-upload service. */
 export type FileUploadBody = Blob | ReadableStream<Uint8Array>
 
@@ -32,16 +34,4 @@ export interface FileUploadService {
   >>
 }
 
-/**
- * Fetch-shaped carrier installed by a page that owns its Host transport.
- * @param input - absolute same-origin upload URL.
- * @param init - raw request body, headers, and cancellation signal.
- * @returns the Host response.
- */
-export type FileUploadFetch = (input: URL, init: RequestInit) => Promise<Response>
-
-/** Pre-Cordis hook supplied by a page whose Host runs in another execution context. */
-export interface ClientFileUploadHooks {
-  readonly fetch: FileUploadFetch
-}
-import type { Context } from '@deepseek-ai/cordis'
+export type { ClientFileUploadHooks, FileUploadFetch } from '../types.ts'

+ 13 - 0
packages/client/file-upload/src/types.ts

@@ -20,3 +20,16 @@ export interface FileUploadValue {
 
 /** Host-minted authority for one staged file upload in one Agent scope. */
 export type FileUploadReceiptId = Branded<'file-upload-receipt-id'>
+
+/**
+ * Fetch-shaped carrier installed by a page that owns its Host transport.
+ * @param input - absolute same-origin upload URL.
+ * @param init - raw request body, headers, and cancellation signal.
+ * @returns the Host response.
+ */
+export type FileUploadFetch = (input: URL, init: RequestInit) => Promise<Response>
+
+/** Pre-Cordis hook supplied by a page whose Host runs in another execution context. */
+export interface ClientFileUploadHooks {
+  readonly fetch: FileUploadFetch
+}

+ 1 - 1
packages/experimental/webworker-runtime/src/client/index.ts

@@ -9,7 +9,7 @@
  * @module @deepseek-ai/dsh-experimental-webworker-runtime/client
  */
 import { IMAGE_FILE_NAME } from '../image-layout.ts'
-import type { ClientFileUploadHooks } from '@deepseek-ai/dsh-client-file-upload/client'
+import type { ClientFileUploadHooks } from '@deepseek-ai/dsh-client-file-upload/types'
 import { PREVIEW_FIXTURE_MANIFEST_FILE } from '../fixture-manifest.ts'
 import { WorkerTunnel, type TunnelFetch } from './client.ts'
 import { applyIndexInjections } from './apply-injections.ts'

+ 1 - 1
packages/experimental/webworker-runtime/tsconfig.json

@@ -30,7 +30,7 @@
       "path": "../../client/connection/tsconfig.host.json"
     },
     {
-      "path": "../../client/file-upload/tsconfig.client.json"
+      "path": "../../client/file-upload/tsconfig.host.json"
     },
     {
       "path": "../../host/webserver"