@visulima/storage 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/adapter/nuxt/module.d.ts +9 -8
  3. package/dist/ai/ai-sdk/index.d.ts +52 -59
  4. package/dist/ai/claude/index.d.ts +105 -119
  5. package/dist/ai/openai/index.d.ts +87 -99
  6. package/dist/ai/tanstack/index.d.ts +54 -61
  7. package/dist/handler/http/fetch/index.d.ts +202 -201
  8. package/dist/handler/http/fetch/index.js +1 -1
  9. package/dist/handler/http/hono/index.d.ts +60 -59
  10. package/dist/handler/http/hono/index.js +1 -1
  11. package/dist/handler/http/nextjs/index.d.ts +55 -54
  12. package/dist/handler/http/nextjs/index.js +1 -1
  13. package/dist/handler/http/node/index.d.ts +234 -246
  14. package/dist/handler/http/node/index.js +1 -1
  15. package/dist/handler/http/solid-start/index.d.ts +55 -54
  16. package/dist/handler/http/solid-start/index.js +1 -1
  17. package/dist/index.d.ts +71 -70
  18. package/dist/index.js +1 -1
  19. package/dist/packem_shared/{AbstractBaseStorage-CiPEMcuo.js → AbstractBaseStorage-CLsYmMZg.js} +1 -1
  20. package/dist/packem_shared/AwsLightStorage-DGSPFUqr.js +1 -0
  21. package/dist/packem_shared/AzureStorage-DvKk_hhz.js +1 -0
  22. package/dist/packem_shared/BoxMetaStorage-CJsyeQ63.js +1 -0
  23. package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-CmM95wi2.js} +1 -1
  24. package/dist/packem_shared/BunS3MetaStorage-CJsyeQ63.js +1 -0
  25. package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-B_roVJ29.js} +1 -1
  26. package/dist/packem_shared/BunnyMetaStorage-CJsyeQ63.js +1 -0
  27. package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-eZ1QDVaY.js} +1 -1
  28. package/dist/packem_shared/CloudinaryMetaStorage-Bv_YCZ0Q.js +1 -0
  29. package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-CpH2f0Fv.js} +1 -1
  30. package/dist/packem_shared/DiskStorage-DzjjqCzo.js +1 -0
  31. package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-MZkDEyts.js} +1 -1
  32. package/dist/packem_shared/DropboxMetaStorage-CJsyeQ63.js +1 -0
  33. package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BB9NoWK2.js} +1 -1
  34. package/dist/packem_shared/{Files-CpIcMjP0.js → Files-DyMJ9FPN.js} +1 -1
  35. package/dist/packem_shared/FirebaseMetaStorage-Bv_YCZ0Q.js +1 -0
  36. package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-BgbxzYNC.js} +1 -1
  37. package/dist/packem_shared/FtpMetaStorage-CJsyeQ63.js +1 -0
  38. package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-CNqXDz7P.js} +1 -1
  39. package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-gEhWlpfS.js} +1 -1
  40. package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-CRd5vjok.js} +1 -1
  41. package/dist/packem_shared/GoogleDriveMetaStorage-B0gLF7Io.js +1 -0
  42. package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-Du7uBhSm.js} +1 -1
  43. package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-CcGfFG39.js} +1 -1
  44. package/dist/packem_shared/{MemoryStorage-9gbWd09l.js → MemoryStorage-ChKyI6OY.js} +1 -1
  45. package/dist/packem_shared/{Multipart-D0ok6BBy.js → Multipart-C35TR2qL.js} +1 -1
  46. package/dist/packem_shared/{Multipart-CQjYqU--.js → Multipart-V64Bg5dt.js} +1 -1
  47. package/dist/packem_shared/NetlifyBlobMetaStorage-Bv_YCZ0Q.js +1 -0
  48. package/dist/packem_shared/NetlifyBlobStorage-CZsr_0DF.js +1 -0
  49. package/dist/packem_shared/OneDriveMetaStorage-B0gLF7Io.js +1 -0
  50. package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-B8qFgMq1.js} +1 -1
  51. package/dist/packem_shared/PocketBaseMetaStorage-Cm3v8g1-.js +1 -0
  52. package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-D2vMN-oY.js} +1 -1
  53. package/dist/packem_shared/{Rest-CI_BiZPv.js → Rest-B7g1sgkq.js} +1 -1
  54. package/dist/packem_shared/{Rest-DvfN4-kf.js → Rest-BrEMYgxZ.js} +1 -1
  55. package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-CTe_BMDl.js} +1 -1
  56. package/dist/packem_shared/SftpMetaStorage-CJsyeQ63.js +1 -0
  57. package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-BKeAzuej.js} +1 -1
  58. package/dist/packem_shared/SharePointMetaStorage-CJsyeQ63.js +1 -0
  59. package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-Dtnt5-wk.js} +1 -1
  60. package/dist/packem_shared/SupabaseMetaStorage-B0gLF7Io.js +1 -0
  61. package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-CmGQjqXf.js} +1 -1
  62. package/dist/packem_shared/{Tus-BlBZykIL.js → Tus-CJBgnJrn.js} +1 -1
  63. package/dist/packem_shared/{Tus-BBVt2ky3.js → Tus-D9c7KDnl.js} +1 -1
  64. package/dist/packem_shared/UploadThingMetaStorage-Bv_YCZ0Q.js +1 -0
  65. package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-DZ4zNvDH.js} +1 -1
  66. package/dist/packem_shared/VercelBlobMetaStorage-CJsyeQ63.js +1 -0
  67. package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-DDNEofR3.js} +1 -1
  68. package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
  69. package/dist/packem_shared/{base-handler-core-D-9Ku1h-.js → base-handler-core-BJP9jHCE.js} +1 -1
  70. package/dist/packem_shared/{base-handler-fetch-CfkNakv8.js → base-handler-fetch-yrYrukwL.js} +1 -1
  71. package/dist/packem_shared/base-handler-node-C8P9rkaH.js +1 -0
  72. package/dist/packem_shared/{createRetryWrapper-CxgiV_hH.js → createRetryWrapper-DgmeHPNF.js} +1 -1
  73. package/dist/packem_shared/disk-storage-DqnnFQAQ.js +1 -0
  74. package/dist/packem_shared/disk-storage-with-checksum.d-Dgwyza8a.d.ts +146 -0
  75. package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-B9dIy3NT.d.ts} +3 -2
  76. package/dist/packem_shared/files.d-CmSZi3M0.d.ts +655 -0
  77. package/dist/packem_shared/gcs-meta-storage-C9F78Sqq.js +1 -0
  78. package/dist/packem_shared/local-meta-storage-BELb1YwO.js +11 -0
  79. package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-cRTXr1kb.d.ts} +7 -7
  80. package/dist/packem_shared/media-transformer.d-C8tn4J2Z.d.ts +331 -0
  81. package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BNZvDG1b.d.ts} +32 -40
  82. package/dist/packem_shared/path-C-OWflAo-_mqb5p5d.js +1 -0
  83. package/dist/packem_shared/{rest-base-e0reNDE_.js → rest-base-BQ_dhWyV.js} +1 -1
  84. package/dist/packem_shared/s3-base-storage-CX94H-Za.js +1 -0
  85. package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-ks99NSs-.d.ts} +64 -70
  86. package/dist/packem_shared/storage-DR7qdwBN.js +1 -0
  87. package/dist/packem_shared/storage.d-DwdJrArF.d.ts +1186 -0
  88. package/dist/packem_shared/tus-base.d-BKBoJVy0.d.ts +103 -0
  89. package/dist/packem_shared/types.d-B1_xZIhu.d.ts +104 -0
  90. package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-BEUv414z.d.ts} +134 -134
  91. package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-D7Zlz5RE.d.ts} +3 -3
  92. package/dist/storage/aws/clients/index.d.ts +388 -388
  93. package/dist/storage/aws/index.d.ts +110 -113
  94. package/dist/storage/aws/index.js +1 -1
  95. package/dist/storage/aws-light/index.d.ts +64 -67
  96. package/dist/storage/aws-light/index.js +1 -1
  97. package/dist/storage/azure/index.d.ts +134 -139
  98. package/dist/storage/azure/index.js +1 -1
  99. package/dist/storage/box/index.d.ts +89 -92
  100. package/dist/storage/box/index.js +1 -1
  101. package/dist/storage/bun-s3/index.d.ts +71 -76
  102. package/dist/storage/bun-s3/index.js +1 -1
  103. package/dist/storage/bunny/index.d.ts +52 -55
  104. package/dist/storage/bunny/index.js +1 -1
  105. package/dist/storage/cloudinary/index.d.ts +54 -59
  106. package/dist/storage/cloudinary/index.js +1 -1
  107. package/dist/storage/dropbox/index.d.ts +59 -62
  108. package/dist/storage/dropbox/index.js +1 -1
  109. package/dist/storage/firebase/index.d.ts +74 -79
  110. package/dist/storage/firebase/index.js +1 -1
  111. package/dist/storage/ftp/index.d.ts +38 -43
  112. package/dist/storage/ftp/index.js +1 -1
  113. package/dist/storage/gcs/index.d.ts +90 -95
  114. package/dist/storage/gcs/index.js +1 -1
  115. package/dist/storage/google-drive/index.d.ts +69 -72
  116. package/dist/storage/google-drive/index.js +1 -1
  117. package/dist/storage/local/index.d.ts +4 -3
  118. package/dist/storage/local/index.js +1 -1
  119. package/dist/storage/memory/index.d.ts +3 -2
  120. package/dist/storage/memory/index.js +1 -1
  121. package/dist/storage/netlify-blob/index.d.ts +86 -93
  122. package/dist/storage/netlify-blob/index.js +1 -1
  123. package/dist/storage/onedrive/index.d.ts +44 -53
  124. package/dist/storage/onedrive/index.js +1 -1
  125. package/dist/storage/pocketbase/index.d.ts +67 -72
  126. package/dist/storage/pocketbase/index.js +1 -1
  127. package/dist/storage/sftp/index.d.ts +40 -45
  128. package/dist/storage/sftp/index.js +1 -1
  129. package/dist/storage/sharepoint/index.d.ts +96 -95
  130. package/dist/storage/sharepoint/index.js +1 -1
  131. package/dist/storage/supabase/index.d.ts +50 -55
  132. package/dist/storage/supabase/index.js +1 -1
  133. package/dist/storage/uploadthing/index.d.ts +34 -37
  134. package/dist/storage/uploadthing/index.js +1 -1
  135. package/dist/storage/vercel-blob/index.d.ts +110 -115
  136. package/dist/storage/vercel-blob/index.js +1 -1
  137. package/dist/transformer/audio-transformer.d.ts +97 -96
  138. package/dist/transformer/image-transformer.d.ts +423 -422
  139. package/dist/transformer/index.d.ts +35 -34
  140. package/dist/transformer/video-transformer.d.ts +112 -111
  141. package/package.json +2 -2
  142. package/dist/packem_shared/AwsLightStorage-BK-WPL0h.js +0 -1
  143. package/dist/packem_shared/AzureStorage-1UvDIQZd.js +0 -1
  144. package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
  145. package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
  146. package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
  147. package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
  148. package/dist/packem_shared/DiskStorage-CI07TVNu.js +0 -1
  149. package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
  150. package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
  151. package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
  152. package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
  153. package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
  154. package/dist/packem_shared/NetlifyBlobStorage-CkpCCoN1.js +0 -1
  155. package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
  156. package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
  157. package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
  158. package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
  159. package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
  160. package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
  161. package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
  162. package/dist/packem_shared/base-handler-node-BF1v1qDa.js +0 -1
  163. package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
  164. package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
  165. package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
  166. package/dist/packem_shared/gcs-meta-storage-B7BnctnV.js +0 -1
  167. package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
  168. package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
  169. package/dist/packem_shared/path-0oTTdkvl-DvWvbDbh.js +0 -1
  170. package/dist/packem_shared/s3-base-storage-BoTyhuzO.js +0 -1
  171. package/dist/packem_shared/storage-0j5nCAUp.js +0 -1
  172. package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
  173. package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
  174. package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
@@ -1,7 +1,8 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DwdJrArF.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
4
4
  import { ConnectOptions } from 'ssh2-sftp-client';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -13,41 +14,41 @@ declare class SftpMetaStorage extends LocalMetaStorage<SftpFile> {
13
14
  }
14
15
  interface SftpStorageOptions extends BaseStorageOptions {
15
16
  /**
16
- * ssh2-sftp-client connection options (`host`, `port`, `username`,
17
- * `password`, `privateKey`, `passphrase`, …). A fresh connection is
18
- * opened and closed around every storage operation — the underlying
19
- * SSH channel is not safe for concurrent use, so the adapter does not
20
- * pool connections.
21
- */
17
+ * ssh2-sftp-client connection options (`host`, `port`, `username`,
18
+ * `password`, `privateKey`, `passphrase`, …). A fresh connection is
19
+ * opened and closed around every storage operation — the underlying
20
+ * SSH channel is not safe for concurrent use, so the adapter does not
21
+ * pool connections.
22
+ */
22
23
  connection: ConnectOptions;
23
24
  /**
24
- * Configure metafile storage. SFTP has no native arbitrary-metadata
25
- * field, so upload metadata is stored as sidecar JSON on the local
26
- * disk (defaults to the OS temp directory).
27
- */
25
+ * Configure metafile storage. SFTP has no native arbitrary-metadata
26
+ * field, so upload metadata is stored as sidecar JSON on the local
27
+ * disk (defaults to the OS temp directory).
28
+ */
28
29
  metaStorageConfig?: LocalMetaStorageOptions;
29
30
  /**
30
- * Logical "bucket root" — virtual keys live under this remote directory.
31
- * The adapter creates intermediate directories on write. Leading/trailing
32
- * slashes are normalized. Defaults to the connection's home directory.
33
- */
31
+ * Logical "bucket root" — virtual keys live under this remote directory.
32
+ * The adapter creates intermediate directories on write. Leading/trailing
33
+ * slashes are normalized. Defaults to the connection's home directory.
34
+ */
34
35
  rootFolderPath?: string;
35
36
  }
36
37
  /**
37
- * SFTP storage backend (built on `ssh2-sftp-client`).
38
- *
39
- * Routes virtual keys onto remote paths under `rootFolderPath`. SFTP has no
40
- * native metadata store, so upload metadata is kept as sidecar JSON on the
41
- * local disk (see `SftpMetaStorage`).
42
- *
43
- * A fresh SFTP connection is opened and closed around every operation: the
44
- * underlying SSH channel is not safe for concurrent use, so the adapter does
45
- * not pool connections.
46
- *
47
- * **Limitations**:
48
- * - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
49
- * - `getReadUrl` / `getUploadUrl` are not supported — SFTP has no signed-URL concept.
50
- */
38
+ * SFTP storage backend (built on `ssh2-sftp-client`).
39
+ *
40
+ * Routes virtual keys onto remote paths under `rootFolderPath`. SFTP has no
41
+ * native metadata store, so upload metadata is kept as sidecar JSON on the
42
+ * local disk (see `SftpMetaStorage`).
43
+ *
44
+ * A fresh SFTP connection is opened and closed around every operation: the
45
+ * underlying SSH channel is not safe for concurrent use, so the adapter does
46
+ * not pool connections.
47
+ *
48
+ * **Limitations**:
49
+ * - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
50
+ * - `getReadUrl` / `getUploadUrl` are not supported — SFTP has no signed-URL concept.
51
+ */
51
52
  declare class SftpStorage extends BaseStorage<SftpFile> {
52
53
  static override readonly name: string;
53
54
  override checksumTypes: string[];
@@ -58,33 +59,27 @@ declare class SftpStorage extends BaseStorage<SftpFile> {
58
59
  constructor(config: SftpStorageOptions);
59
60
  create(config: FileInit, _options?: OperationOptions): Promise<SftpFile>;
60
61
  write(part: FilePart | FileQuery | SftpFile, options?: OperationOptions): Promise<SftpFile>;
61
- get({
62
- id
63
- }: FileQuery, options?: OperationOptions & {
62
+ get({ id }: FileQuery, options?: OperationOptions & {
64
63
  range?: {
65
64
  end?: number;
66
65
  start: number;
67
66
  };
68
67
  }): Promise<FileReturn>;
69
- delete({
70
- id
71
- }: FileQuery, options?: OperationOptions): Promise<SftpFile>;
68
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<SftpFile>;
72
69
  copy(name: string, destination: string, options?: OperationOptions & {
73
70
  storageClass?: string;
74
71
  }): Promise<SftpFile>;
75
72
  move(name: string, destination: string, options?: OperationOptions): Promise<SftpFile>;
76
73
  override list(_limit?: number, options?: OperationOptions): Promise<SftpFile[]>;
77
- override exists({
78
- id
79
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
74
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
80
75
  private walkList;
81
76
  /**
82
- * Opens a fresh single-session SFTP connection for one operation.
83
- * `ssh2-sftp-client` has no `AbortSignal` hook, so cancellation is
84
- * best-effort: an abort ends the SSH channel via `client.end()`, which
85
- * rejects any in-flight transfer. The rejection is normalized to an
86
- * `AbortError`.
87
- */
77
+ * Opens a fresh single-session SFTP connection for one operation.
78
+ * `ssh2-sftp-client` has no `AbortSignal` hook, so cancellation is
79
+ * best-effort: an abort ends the SSH channel via `client.end()`, which
80
+ * rejects any in-flight transfer. The rejection is normalized to an
81
+ * `AbortError`.
82
+ */
88
83
  private run;
89
84
  private keyToPath;
90
85
  private pathToKey;
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/SftpFile-ClWDYnt2.js";import{default as o}from"../../packem_shared/SftpMetaStorage-BSn6Qfnf.js";import{default as p}from"../../packem_shared/SftpStorage-2Hz396Xr.js";export{a as SftpFile,o as SftpMetaStorage,p as SftpStorage};
1
+ import{default as a}from"../../packem_shared/SftpFile-ClWDYnt2.js";import{default as o}from"../../packem_shared/SftpMetaStorage-CJsyeQ63.js";import{default as p}from"../../packem_shared/SftpStorage-BKeAzuej.js";export{a as SftpFile,o as SftpMetaStorage,p as SftpStorage};
@@ -1,8 +1,9 @@
1
- import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-Bon9GVVe.js";
2
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
- import { L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-B1_xZIhu.js";
2
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
3
+ import { L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DwdJrArF.js";
4
4
  import { Readable } from 'node:stream';
5
5
  import { Client } from '@microsoft/microsoft-graph-client';
6
+ import 'node:timers';
6
7
  import 'node:crypto';
7
8
  import 'node:http';
8
9
  import 'lru-cache';
@@ -11,125 +12,125 @@ declare class SharePointMetaStorage extends LocalMetaStorage<SharePointFile> {
11
12
  constructor(config?: LocalMetaStorageOptions);
12
13
  }
13
14
  /**
14
- * Options for the SharePoint storage backend.
15
- *
16
- * A SharePoint document library is a Microsoft Graph drive. This adapter
17
- * resolves a site + document library down to a `driveId` and then delegates
18
- * every storage operation to an internal {@link OneDriveStorage}.
19
- *
20
- * **Site targeting** (resolved in this order):
21
- * 1. `driveId` (env `SHAREPOINT_DRIVE_ID`) — short-circuits site resolution.
22
- * 2. `siteId` (env `SHAREPOINT_SITE_ID`).
23
- * 3. `siteUrl` (env `SHAREPOINT_SITE_URL`) — parsed into hostname + path.
24
- * 4. `hostname` (env `SHAREPOINT_HOSTNAME`) + `sitePath`.
25
- *
26
- * Once the site is known, `documentLibrary` selects a specific drive from the
27
- * site's drive list by display name; otherwise the site's default drive is
28
- * used.
29
- *
30
- * **Auth** mirrors {@link OneDriveStorageOptions}. Env fallbacks resolve the
31
- * `SHAREPOINT_*` variables first and then the matching `ONEDRIVE_*`
32
- * variables.
33
- */
15
+ * Options for the SharePoint storage backend.
16
+ *
17
+ * A SharePoint document library is a Microsoft Graph drive. This adapter
18
+ * resolves a site + document library down to a `driveId` and then delegates
19
+ * every storage operation to an internal {@link OneDriveStorage}.
20
+ *
21
+ * **Site targeting** (resolved in this order):
22
+ * 1. `driveId` (env `SHAREPOINT_DRIVE_ID`) — short-circuits site resolution.
23
+ * 2. `siteId` (env `SHAREPOINT_SITE_ID`).
24
+ * 3. `siteUrl` (env `SHAREPOINT_SITE_URL`) — parsed into hostname + path.
25
+ * 4. `hostname` (env `SHAREPOINT_HOSTNAME`) + `sitePath`.
26
+ *
27
+ * Once the site is known, `documentLibrary` selects a specific drive from the
28
+ * site's drive list by display name; otherwise the site's default drive is
29
+ * used.
30
+ *
31
+ * **Auth** mirrors {@link OneDriveStorageOptions}. Env fallbacks resolve the
32
+ * `SHAREPOINT_*` variables first and then the matching `ONEDRIVE_*`
33
+ * variables.
34
+ */
34
35
  interface SharePointStorageOptions extends BaseStorageOptions {
35
36
  /**
36
- * Static or dynamic access token. Pass a string for a one-shot token, or
37
- * a function returning a fresh token on each call.
38
- */
37
+ * Static or dynamic access token. Pass a string for a one-shot token, or
38
+ * a function returning a fresh token on each call.
39
+ */
39
40
  accessToken?: string | (() => string | Promise<string>);
40
41
  /**
41
- * Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
42
- * callers that wire up their own `AuthenticationProvider` and also used to
43
- * resolve the site/library when site targeting is required.
44
- */
42
+ * Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
43
+ * callers that wire up their own `AuthenticationProvider` and also used to
44
+ * resolve the site/library when site targeting is required.
45
+ */
45
46
  client?: Client;
46
47
  /**
47
- * Client-credentials auth — for app-only / daemon scenarios. Same shape as
48
- * {@link OneDriveStorageOptions.clientCredentials}.
49
- */
48
+ * Client-credentials auth — for app-only / daemon scenarios. Same shape as
49
+ * {@link OneDriveStorageOptions.clientCredentials}.
50
+ */
50
51
  clientCredentials?: OneDriveStorageOptions["clientCredentials"];
51
52
  /**
52
- * Timeout, in milliseconds, for polling the async-copy monitor URL.
53
- * Defaults to 60_000 (60s).
54
- */
53
+ * Timeout, in milliseconds, for polling the async-copy monitor URL.
54
+ * Defaults to 60_000 (60s).
55
+ */
55
56
  copyTimeoutMs?: number;
56
57
  /**
57
- * Display name of the document library (drive) to target within the
58
- * resolved site. When omitted, the site's default drive is used.
59
- */
58
+ * Display name of the document library (drive) to target within the
59
+ * resolved site. When omitted, the site's default drive is used.
60
+ */
60
61
  documentLibrary?: string;
61
62
  /**
62
- * Target drive (document library) by ID. Short-circuits site resolution.
63
- * Env fallback: `SHAREPOINT_DRIVE_ID`.
64
- */
63
+ * Target drive (document library) by ID. Short-circuits site resolution.
64
+ * Env fallback: `SHAREPOINT_DRIVE_ID`.
65
+ */
65
66
  driveId?: string;
66
67
  /**
67
- * SharePoint host name (e.g. `contoso.sharepoint.com`). Combined with
68
- * `sitePath` to resolve the site. Env fallback: `SHAREPOINT_HOSTNAME`.
69
- */
68
+ * SharePoint host name (e.g. `contoso.sharepoint.com`). Combined with
69
+ * `sitePath` to resolve the site. Env fallback: `SHAREPOINT_HOSTNAME`.
70
+ */
70
71
  hostname?: string;
71
72
  /**
72
- * Configure metafiles storage. Defaults to local tmp directory.
73
- */
73
+ * Configure metafiles storage. Defaults to local tmp directory.
74
+ */
74
75
  metaStorageConfig?: LocalMetaStorageOptions;
75
76
  /**
76
- * OAuth2 refresh-token auth — for delegated user scenarios. Same shape as
77
- * {@link OneDriveStorageOptions.oauth}.
78
- */
77
+ * OAuth2 refresh-token auth — for delegated user scenarios. Same shape as
78
+ * {@link OneDriveStorageOptions.oauth}.
79
+ */
79
80
  oauth?: OneDriveStorageOptions["oauth"];
80
81
  /**
81
- * When `true`, `getReadUrl` creates an anonymous shared link with `view`
82
- * permission. Otherwise it returns the short-lived pre-authenticated
83
- * `@microsoft.graph.downloadUrl` from the item metadata.
84
- */
82
+ * When `true`, `getReadUrl` creates an anonymous shared link with `view`
83
+ * permission. Otherwise it returns the short-lived pre-authenticated
84
+ * `@microsoft.graph.downloadUrl` from the item metadata.
85
+ */
85
86
  publicByDefault?: boolean;
86
87
  /**
87
- * Logical "bucket root" — virtual keys live under this folder path within
88
- * the target drive. Must already exist. Defaults to drive root.
89
- */
88
+ * Logical "bucket root" — virtual keys live under this folder path within
89
+ * the target drive. Must already exist. Defaults to drive root.
90
+ */
90
91
  rootFolderPath?: string;
91
92
  /**
92
- * Target a SharePoint site by its Graph site ID. Env fallback:
93
- * `SHAREPOINT_SITE_ID`.
94
- */
93
+ * Target a SharePoint site by its Graph site ID. Env fallback:
94
+ * `SHAREPOINT_SITE_ID`.
95
+ */
95
96
  siteId?: string;
96
97
  /**
97
- * Server-relative site path (e.g. `/sites/Marketing`). Combined with
98
- * `hostname` to resolve the site.
99
- */
98
+ * Server-relative site path (e.g. `/sites/Marketing`). Combined with
99
+ * `hostname` to resolve the site.
100
+ */
100
101
  sitePath?: string;
101
102
  /**
102
- * Full SharePoint site URL (e.g.
103
- * `https://contoso.sharepoint.com/sites/Marketing`). Parsed into a host
104
- * name + server-relative path. Env fallback: `SHAREPOINT_SITE_URL`.
105
- */
103
+ * Full SharePoint site URL (e.g.
104
+ * `https://contoso.sharepoint.com/sites/Marketing`). Parsed into a host
105
+ * name + server-relative path. Env fallback: `SHAREPOINT_SITE_URL`.
106
+ */
106
107
  siteUrl?: string;
107
108
  }
108
109
  /**
109
- * SharePoint document-library storage backend (Microsoft Graph).
110
- *
111
- * A SharePoint document library is a Microsoft Graph drive. This adapter
112
- * resolves a site + document library to a `driveId` and then delegates every
113
- * storage operation to an internal {@link OneDriveStorage}. No Graph upload
114
- * logic is reimplemented here.
115
- *
116
- * Site resolution is lazy: the Graph client is built eagerly (so auth errors
117
- * surface at construction) but the site/library → `driveId` lookup runs on the
118
- * first storage operation, because resolution is async and constructors cannot
119
- * be.
120
- * @example
121
- * ```ts
122
- * import { SharePointStorage } from "@visulima/storage/provider/sharepoint";
123
- *
124
- * const storage = new SharePointStorage({
125
- * siteUrl: "https://contoso.sharepoint.com/sites/Marketing",
126
- * documentLibrary: "Documents",
127
- * clientCredentials: { tenantId, clientId, clientSecret },
128
- * });
129
- * ```
130
- * @remarks
131
- * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
132
- */
110
+ * SharePoint document-library storage backend (Microsoft Graph).
111
+ *
112
+ * A SharePoint document library is a Microsoft Graph drive. This adapter
113
+ * resolves a site + document library to a `driveId` and then delegates every
114
+ * storage operation to an internal {@link OneDriveStorage}. No Graph upload
115
+ * logic is reimplemented here.
116
+ *
117
+ * Site resolution is lazy: the Graph client is built eagerly (so auth errors
118
+ * surface at construction) but the site/library → `driveId` lookup runs on the
119
+ * first storage operation, because resolution is async and constructors cannot
120
+ * be.
121
+ * @example
122
+ * ```ts
123
+ * import { SharePointStorage } from "@visulima/storage/provider/sharepoint";
124
+ *
125
+ * const storage = new SharePointStorage({
126
+ * siteUrl: "https://contoso.sharepoint.com/sites/Marketing",
127
+ * documentLibrary: "Documents",
128
+ * clientCredentials: { tenantId, clientId, clientSecret },
129
+ * });
130
+ * ```
131
+ * @remarks
132
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
133
+ */
133
134
  declare class SharePointStorage extends BaseStorage<SharePointFile> {
134
135
  static override readonly name: string;
135
136
  override checksumTypes: string[];
@@ -168,10 +169,10 @@ declare class SharePointStorage extends BaseStorage<SharePointFile> {
168
169
  expiresIn?: number;
169
170
  }): Promise<string>;
170
171
  /**
171
- * Resolve the target document library to a `driveId` and construct the
172
- * internal {@link OneDriveStorage}. Memoized so resolution runs at most
173
- * once.
174
- */
172
+ * Resolve the target document library to a `driveId` and construct the
173
+ * internal {@link OneDriveStorage}. Memoized so resolution runs at most
174
+ * once.
175
+ */
175
176
  private getInner;
176
177
  private buildInner;
177
178
  private resolveDriveId;
@@ -1 +1 @@
1
- import{default as t}from"../../packem_shared/SharePointFile-Blz9FS4h.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-BSn6Qfnf.js";import{default as S}from"../../packem_shared/SharePointStorage-CrX2Pk6C.js";export{t as SharePointFile,r as SharePointMetaStorage,S as SharePointStorage};
1
+ import{default as t}from"../../packem_shared/SharePointFile-Blz9FS4h.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-CJsyeQ63.js";import{default as S}from"../../packem_shared/SharePointStorage-Dtnt5-wk.js";export{t as SharePointFile,r as SharePointMetaStorage,S as SharePointStorage};
@@ -1,7 +1,8 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DwdJrArF.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
4
4
  import { StorageClient } from '@supabase/storage-js';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -15,65 +16,65 @@ declare class SupabaseMetaStorage extends LocalMetaStorage<SupabaseFile> {
15
16
  }
16
17
  interface SupabaseStorageOptions extends BaseStorageOptions {
17
18
  /**
18
- * Storage bucket name. Created in the Supabase dashboard. The adapter
19
- * does not create or delete buckets.
20
- */
19
+ * Storage bucket name. Created in the Supabase dashboard. The adapter
20
+ * does not create or delete buckets.
21
+ */
21
22
  bucket: string;
22
23
  /**
23
- * Pre-built `StorageClient` from `@supabase/storage-js`. Mutually
24
- * exclusive with `serviceKey` + `url`. Use this when you want to share
25
- * a `StorageClient` instance, customize `fetch`, or pass extra headers.
26
- */
24
+ * Pre-built `StorageClient` from `@supabase/storage-js`. Mutually
25
+ * exclusive with `serviceKey` + `url`. Use this when you want to share
26
+ * a `StorageClient` instance, customize `fetch`, or pass extra headers.
27
+ */
27
28
  client?: StorageClient;
28
29
  /**
29
- * Default expiry, in seconds, for `getReadUrl`. Capped at 1 week (Supabase
30
- * maximum). Defaults to 3600 (1 hour).
31
- */
30
+ * Default expiry, in seconds, for `getReadUrl`. Capped at 1 week (Supabase
31
+ * maximum). Defaults to 3600 (1 hour).
32
+ */
32
33
  defaultUrlExpiresIn?: number;
33
34
  /**
34
- * Override the global `fetch` (e.g. for tests, custom timeouts, retries).
35
- * Ignored when `client` is supplied.
36
- */
35
+ * Override the global `fetch` (e.g. for tests, custom timeouts, retries).
36
+ * Ignored when `client` is supplied.
37
+ */
37
38
  fetch?: typeof globalThis.fetch;
38
39
  /**
39
- * Configure metafiles storage. Used for TUS-style resumable upload
40
- * bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
41
- * directory.
42
- */
40
+ * Configure metafiles storage. Used for TUS-style resumable upload
41
+ * bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
42
+ * directory.
43
+ */
43
44
  metaStorageConfig?: LocalMetaStorageOptions;
44
45
  /**
45
- * Supabase service-role key (or anon key with appropriate RLS).
46
- * Ignored when `client` is supplied. Falls back to `SUPABASE_SERVICE_ROLE_KEY`
47
- * or `SUPABASE_KEY`.
48
- */
46
+ * Supabase service-role key (or anon key with appropriate RLS).
47
+ * Ignored when `client` is supplied. Falls back to `SUPABASE_SERVICE_ROLE_KEY`
48
+ * or `SUPABASE_KEY`.
49
+ */
49
50
  serviceKey?: string;
50
51
  /**
51
- * Supabase project URL (e.g. `https://abc.supabase.co`). The adapter
52
- * appends `/storage/v1` automatically. Ignored when `client` is supplied.
53
- * Falls back to `SUPABASE_URL`.
54
- */
52
+ * Supabase project URL (e.g. `https://abc.supabase.co`). The adapter
53
+ * appends `/storage/v1` automatically. Ignored when `client` is supplied.
54
+ * Falls back to `SUPABASE_URL`.
55
+ */
55
56
  url?: string;
56
57
  }
57
58
  /**
58
- * Supabase Storage backend.
59
- *
60
- * Single-shot uploads only — Supabase Storage exposes a TUS endpoint but
61
- * the JS SDK's `upload()` is HTTP `POST` with the full body. This adapter
62
- * buffers the part stream and uploads in one request. Use `signedUploadUrl`
63
- * for direct-from-client large transfers.
64
- * @example
65
- * ```ts
66
- * import { SupabaseStorage } from "@visulima/storage/provider/supabase";
67
- *
68
- * const storage = new SupabaseStorage({
69
- * url: process.env.SUPABASE_URL,
70
- * serviceKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
71
- * bucket: "avatars",
72
- * });
73
- * ```
74
- * @remarks
75
- * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
76
- */
59
+ * Supabase Storage backend.
60
+ *
61
+ * Single-shot uploads only — Supabase Storage exposes a TUS endpoint but
62
+ * the JS SDK's `upload()` is HTTP `POST` with the full body. This adapter
63
+ * buffers the part stream and uploads in one request. Use `signedUploadUrl`
64
+ * for direct-from-client large transfers.
65
+ * @example
66
+ * ```ts
67
+ * import { SupabaseStorage } from "@visulima/storage/provider/supabase";
68
+ *
69
+ * const storage = new SupabaseStorage({
70
+ * url: process.env.SUPABASE_URL,
71
+ * serviceKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
72
+ * bucket: "avatars",
73
+ * });
74
+ * ```
75
+ * @remarks
76
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
77
+ */
77
78
  declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
78
79
  static override readonly name: string;
79
80
  override checksumTypes: string[];
@@ -85,15 +86,9 @@ declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
85
86
  override get raw(): StorageClient;
86
87
  create(config: FileInit, _options?: OperationOptions): Promise<SupabaseFile>;
87
88
  write(part: FilePart | FileQuery | SupabaseFile, options?: OperationOptions): Promise<SupabaseFile>;
88
- delete({
89
- id
90
- }: FileQuery, options?: OperationOptions): Promise<SupabaseFile>;
91
- override exists({
92
- id
93
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
94
- get({
95
- id
96
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
89
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<SupabaseFile>;
90
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
91
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
97
92
  copy(name: string, destination: string, options?: OperationOptions & {
98
93
  storageClass?: string;
99
94
  }): Promise<SupabaseFile>;
@@ -1 +1 @@
1
- import{default as t}from"../../packem_shared/SupabaseFile-Bo5B-vM1.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-Cbwa1CHV.js";import{default as p}from"../../packem_shared/SupabaseStorage-Dc_DBX29.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};
1
+ import{default as t}from"../../packem_shared/SupabaseFile-Bo5B-vM1.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-B0gLF7Io.js";import{default as p}from"../../packem_shared/SupabaseStorage-CmGQjqXf.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};
@@ -1,35 +1,36 @@
1
1
  import { UTApi } from 'uploadthing/server';
2
- import { L as LocalMetaStorageOptions, l as BaseStorageOptions, F as File, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
2
+ import { L as LocalMetaStorageOptions, l as BaseStorageOptions, F as File, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DwdJrArF.js";
3
3
  import 'node:stream';
4
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
4
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
8
9
  interface UploadThingStorageOptions extends BaseStorageOptions {
9
10
  /**
10
- * ACL applied to uploads. Drives `getReadUrl` behavior — `"public-read"`
11
- * returns the permanent CDN URL, `"private"` mints a short-lived signed
12
- * URL via `generateSignedURL`. Defaults to `"public-read"`.
13
- */
11
+ * ACL applied to uploads. Drives `getReadUrl` behavior — `"public-read"`
12
+ * returns the permanent CDN URL, `"private"` mints a short-lived signed
13
+ * URL via `generateSignedURL`. Defaults to `"public-read"`.
14
+ */
14
15
  acl?: "private" | "public-read";
15
16
  /**
16
- * Pre-built `UTApi` instance. Use this to share an instance, customize
17
- * `fetch`, or inject test stubs. Mutually exclusive with `token`.
18
- */
17
+ * Pre-built `UTApi` instance. Use this to share an instance, customize
18
+ * `fetch`, or inject test stubs. Mutually exclusive with `token`.
19
+ */
19
20
  client?: UTApi;
20
21
  /**
21
- * Default expiry (seconds) for `getReadUrl` when `acl` is `"private"`.
22
- * Capped at 7 days (UploadThing maximum). Defaults to 3600 (1 hour).
23
- */
22
+ * Default expiry (seconds) for `getReadUrl` when `acl` is `"private"`.
23
+ * Capped at 7 days (UploadThing maximum). Defaults to 3600 (1 hour).
24
+ */
24
25
  defaultUrlExpiresIn?: number;
25
26
  /**
26
- * Configure metafiles storage for resumable-upload bookkeeping.
27
- */
27
+ * Configure metafiles storage for resumable-upload bookkeeping.
28
+ */
28
29
  metaStorageConfig?: LocalMetaStorageOptions;
29
30
  /**
30
- * UploadThing token (base64-encoded JSON: `{ apiKey, appId, regions[] }`).
31
- * Falls back to `UPLOADTHING_TOKEN`. Ignored when `client` is supplied.
32
- */
31
+ * UploadThing token (base64-encoded JSON: `{ apiKey, appId, regions[] }`).
32
+ * Falls back to `UPLOADTHING_TOKEN`. Ignored when `client` is supplied.
33
+ */
33
34
  token?: string;
34
35
  }
35
36
  declare class UploadThingFile extends File {
@@ -42,20 +43,20 @@ declare class UploadThingMetaStorage extends LocalMetaStorage<UploadThingFile> {
42
43
  constructor(config?: LocalMetaStorageOptions);
43
44
  }
44
45
  /**
45
- * UploadThing storage backend.
46
- *
47
- * Uses `UTApi` from `uploadthing/server`. Uploads via `uploadFiles(UTFile)`,
48
- * keyed by user-supplied `customId` so subsequent operations (delete, signed
49
- * URL, list) round-trip on the user's key, not UploadThing's internal fileKey.
50
- *
51
- * **Limitations**:
52
- * - No native server-side `copy` — implemented as download + re-upload.
53
- * - `list` has no server-side prefix filter; prefix filtering happens client-
54
- * side within a page.
55
- * - No `responseContentDisposition` override on signed URLs.
56
- * @remarks
57
- * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
58
- */
46
+ * UploadThing storage backend.
47
+ *
48
+ * Uses `UTApi` from `uploadthing/server`. Uploads via `uploadFiles(UTFile)`,
49
+ * keyed by user-supplied `customId` so subsequent operations (delete, signed
50
+ * URL, list) round-trip on the user's key, not UploadThing's internal fileKey.
51
+ *
52
+ * **Limitations**:
53
+ * - No native server-side `copy` — implemented as download + re-upload.
54
+ * - `list` has no server-side prefix filter; prefix filtering happens client-
55
+ * side within a page.
56
+ * - No `responseContentDisposition` override on signed URLs.
57
+ * @remarks
58
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
59
+ */
59
60
  declare class UploadThingStorage extends BaseStorage<UploadThingFile> {
60
61
  static override readonly name: string;
61
62
  override checksumTypes: string[];
@@ -68,12 +69,8 @@ declare class UploadThingStorage extends BaseStorage<UploadThingFile> {
68
69
  override get raw(): UTApi;
69
70
  create(config: FileInit, _options?: OperationOptions): Promise<UploadThingFile>;
70
71
  write(part: FilePart | FileQuery | UploadThingFile, options?: OperationOptions): Promise<UploadThingFile>;
71
- delete({
72
- id
73
- }: FileQuery, options?: OperationOptions): Promise<UploadThingFile>;
74
- get({
75
- id
76
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
72
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<UploadThingFile>;
73
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
77
74
  copy(name: string, destination: string, options?: OperationOptions & {
78
75
  storageClass?: string;
79
76
  }): Promise<UploadThingFile>;
@@ -1 +1 @@
1
- import{default as e}from"../../packem_shared/UploadThingFile-BTFMpcIA.js";import{default as r}from"../../packem_shared/UploadThingMetaStorage-DPVnmNe5.js";import{default as d}from"../../packem_shared/UploadThingStorage-BChykYSe.js";export{e as UploadThingFile,r as UploadThingMetaStorage,d as UploadThingStorage};
1
+ import{default as e}from"../../packem_shared/UploadThingFile-BTFMpcIA.js";import{default as r}from"../../packem_shared/UploadThingMetaStorage-Bv_YCZ0Q.js";import{default as d}from"../../packem_shared/UploadThingStorage-DZ4zNvDH.js";export{e as UploadThingFile,r as UploadThingMetaStorage,d as UploadThingStorage};