@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, k as MetaStorageOptions, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, H as HttpError, 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, k as MetaStorageOptions, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, H as HttpError, 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
3
  import { RetryConfig } from 'gaxios';
4
4
  import { GoogleAuthOptions, GoogleAuth } from 'google-auth-library';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -25,31 +26,31 @@ interface ClientError extends Error {
25
26
  }
26
27
  interface GCStorageOptions extends BaseStorageOptions, Omit<GoogleAuthOptions, "authClient" | "projectId">, StorageSettings {
27
28
  /**
28
- * Google Cloud Storage bucket
29
- */
29
+ * Google Cloud Storage bucket
30
+ */
30
31
  bucket?: string;
31
32
  /**
32
- * Force compatible client upload directly to GCS
33
- */
33
+ * Force compatible client upload directly to GCS
34
+ */
34
35
  clientDirectUpload?: boolean;
35
36
  /**
36
- * Configure metafiles storage
37
- * @example
38
- * ```ts
39
- * Using local metafiles
40
- * const storage = new GCStorage({
41
- * bucket: 'upload',
42
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
43
- * })
44
- * ```
45
- * Using a separate bucket for metafiles
46
- * ```ts
47
- * const storage = new GCStorage({
48
- * bucket: 'upload',
49
- * metaStorageConfig: { bucket: 'upload-metafiles' }
50
- * })
51
- * ```
52
- */
37
+ * Configure metafiles storage
38
+ * @example
39
+ * ```ts
40
+ * Using local metafiles
41
+ * const storage = new GCStorage({
42
+ * bucket: 'upload',
43
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
44
+ * })
45
+ * ```
46
+ * Using a separate bucket for metafiles
47
+ * ```ts
48
+ * const storage = new GCStorage({
49
+ * bucket: 'upload',
50
+ * metaStorageConfig: { bucket: 'upload-metafiles' }
51
+ * })
52
+ * ```
53
+ */
53
54
  metaStorageConfig?: GCSMetaStorageOptions | LocalMetaStorageOptions;
54
55
  }
55
56
  interface GCSMetaStorageOptions extends MetaStorageOptions, Omit<GoogleAuthOptions, "authClient" | "projectId">, StorageSettings {
@@ -71,36 +72,36 @@ declare class GCSMetaStorage<T extends File = File> extends MetaStorage<T> {
71
72
  override touch(id: string, file: T): Promise<T>;
72
73
  private accessCheck;
73
74
  /**
74
- * Returns metafile URL path for the given upload ID.
75
- * @param id Upload ID to get metafile path for
76
- * @returns Full URL path to the metafile in GCS
77
- */
75
+ * Returns metafile URL path for the given upload ID.
76
+ * @param id Upload ID to get metafile path for
77
+ * @returns Full URL path to the metafile in GCS
78
+ */
78
79
  private getMetaPath;
79
80
  private makeRequest;
80
81
  }
81
82
  /**
82
- * Google cloud storage based backend.
83
- * @example
84
- * ```ts
85
- * const storage = new GCStorage({
86
- * bucket: <YOUR_BUCKET>,
87
- * keyFile: <PATH_TO_KEY_FILE>,
88
- * metaStorage: new MetaStorage(),
89
- * clientDirectUpload: true,
90
- * maxUploadSize: '15GB',
91
- * allowMIME: ['video/*', 'image/*'],
92
- * filename: file => file.originalName
93
- * });
94
- * ```
95
- * @remarks
96
- * ## Supported Operations
97
- * - ✅ create, write, delete, get, list, update, copy, move
98
- * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
99
- * - ✅ exists: Implemented (checks metadata and GCS object)
100
- * - ❌ getStream: Not implemented (use get() for file retrieval)
101
- * - ❌ getUrl: Not implemented (GCS public URLs not supported)
102
- * - ❌ getUploadUrl: Not implemented (resumable upload URLs handled internally)
103
- */
83
+ * Google cloud storage based backend.
84
+ * @example
85
+ * ```ts
86
+ * const storage = new GCStorage({
87
+ * bucket: <YOUR_BUCKET>,
88
+ * keyFile: <PATH_TO_KEY_FILE>,
89
+ * metaStorage: new MetaStorage(),
90
+ * clientDirectUpload: true,
91
+ * maxUploadSize: '15GB',
92
+ * allowMIME: ['video/*', 'image/*'],
93
+ * filename: file => file.originalName
94
+ * });
95
+ * ```
96
+ * @remarks
97
+ * ## Supported Operations
98
+ * - ✅ create, write, delete, get, list, update, copy, move
99
+ * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
100
+ * - ✅ exists: Implemented (checks metadata and GCS object)
101
+ * - ❌ getStream: Not implemented (use get() for file retrieval)
102
+ * - ❌ getUrl: Not implemented (GCS public URLs not supported)
103
+ * - ❌ getUploadUrl: Not implemented (resumable upload URLs handled internally)
104
+ */
104
105
  declare class GCStorage extends BaseStorage<GCSFile> {
105
106
  static override readonly name: string;
106
107
  override checksumTypes: string[];
@@ -120,58 +121,52 @@ declare class GCStorage extends BaseStorage<GCSFile> {
120
121
  create(config: FileInit, options?: OperationOptions): Promise<GCSFile>;
121
122
  write(part: FilePart | FileQuery | GCSFile, options?: OperationOptions): Promise<GCSFile>;
122
123
  /**
123
- * Deletes an upload and its metadata.
124
- * @param query File query containing the file ID to delete.
125
- * @param query.id File ID to delete.
126
- * @returns Promise resolving to the deleted file object with status: "deleted".
127
- * @throws {UploadError} If the file metadata cannot be found.
128
- */
129
- delete({
130
- id
131
- }: FileQuery, options?: OperationOptions): Promise<GCSFile>;
124
+ * Deletes an upload and its metadata.
125
+ * @param query File query containing the file ID to delete.
126
+ * @param query.id File ID to delete.
127
+ * @returns Promise resolving to the deleted file object with status: "deleted".
128
+ * @throws {UploadError} If the file metadata cannot be found.
129
+ */
130
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<GCSFile>;
132
131
  /**
133
- * Copies an upload file to a new location.
134
- * @param name Source file name/ID.
135
- * @param destination Destination file name/ID.
136
- * @returns Promise resolving to the copied file object.
137
- * @throws {UploadError} If the source file cannot be found.
138
- */
132
+ * Copies an upload file to a new location.
133
+ * @param name Source file name/ID.
134
+ * @param destination Destination file name/ID.
135
+ * @returns Promise resolving to the copied file object.
136
+ * @throws {UploadError} If the source file cannot be found.
137
+ */
139
138
  copy(name: string, destination: string, options?: OperationOptions & {
140
139
  storageClass?: string;
141
140
  }): Promise<GCSFile>;
142
141
  /**
143
- * Moves an upload file to a new location.
144
- * @param name Source file name/ID.
145
- * @param destination Destination file name/ID.
146
- * @returns Promise resolving to the moved file object.
147
- * @throws {UploadError} If the source file cannot be found.
148
- */
142
+ * Moves an upload file to a new location.
143
+ * @param name Source file name/ID.
144
+ * @param destination Destination file name/ID.
145
+ * @returns Promise resolving to the moved file object.
146
+ * @throws {UploadError} If the source file cannot be found.
147
+ */
149
148
  move(name: string, destination: string, options?: OperationOptions): Promise<GCSFile>;
150
149
  /**
151
- * Gets an uploaded file by ID with content buffer.
152
- * @param query File query object containing the file ID.
153
- * @param query.id Unique identifier of the file to retrieve.
154
- * @returns Promise resolving to file object with content buffer.
155
- * @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND) or has expired (ERRORS.GONE).
156
- */
157
- get({
158
- id
159
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
150
+ * Gets an uploaded file by ID with content buffer.
151
+ * @param query File query object containing the file ID.
152
+ * @param query.id Unique identifier of the file to retrieve.
153
+ * @returns Promise resolving to file object with content buffer.
154
+ * @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND) or has expired (ERRORS.GONE).
155
+ */
156
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
160
157
  /**
161
- * Checks if a file exists by verifying both metadata and the actual GCS object.
162
- * Returns true only if both the metadata and the GCS object exist.
163
- * @param query File query containing the file ID to check.
164
- * @returns Promise resolving to true if both metadata and GCS object exist, false otherwise.
165
- */
166
- override exists({
167
- id
168
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
158
+ * Checks if a file exists by verifying both metadata and the actual GCS object.
159
+ * Returns true only if both the metadata and the GCS object exist.
160
+ * @param query File query containing the file ID to check.
161
+ * @returns Promise resolving to true if both metadata and GCS object exist, false otherwise.
162
+ */
163
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
169
164
  override list(limit?: number, options?: OperationOptions): Promise<GCSFile[]>;
170
165
  /**
171
- * Directory-style listing via the GCS JSON API's native `delimiter`/`prefix` — the API returns
172
- * the direct child objects in `items` and the common prefixes ("subdirectories") in `prefixes`,
173
- * so the subtree is never fully walked. Pages until exhausted or `limit` files are collected.
174
- */
166
+ * Directory-style listing via the GCS JSON API's native `delimiter`/`prefix` — the API returns
167
+ * the direct child objects in `items` and the common prefixes ("subdirectories") in `prefixes`,
168
+ * so the subtree is never fully walked. Pages until exhausted or `limit` files are collected.
169
+ */
175
170
  override listDirectory(options?: OperationOptions & {
176
171
  delimiter: string;
177
172
  limit?: number;
@@ -183,11 +178,11 @@ declare class GCStorage extends BaseStorage<GCSFile> {
183
178
  protected internalWrite(part: GCSFile & Partial<FilePart>, callOptions?: OperationOptions): Promise<number>;
184
179
  private internalOnComplete;
185
180
  /**
186
- * Merge a body-level abort signal with the caller's per-operation
187
- * `options.signal` so gaxios cancels the in-flight request on either.
188
- * `options.timeout` is handed to gaxios' native `timeout` instead of a
189
- * second `AbortSignal.timeout` to avoid two competing deadlines.
190
- */
181
+ * Merge a body-level abort signal with the caller's per-operation
182
+ * `options.signal` so gaxios cancels the in-flight request on either.
183
+ * `options.timeout` is handed to gaxios' native `timeout` instead of a
184
+ * second `AbortSignal.timeout` to avoid two competing deadlines.
185
+ */
191
186
  private static buildCallSignal;
192
187
  private makeRequest;
193
188
  private accessCheck;
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-Cero7qZN.js";import{v as C}from"../../packem_shared/gcs-meta-storage-B7BnctnV.js";import{default as l}from"../../packem_shared/GCStorage-6BHkFlEs.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
1
+ import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-Cero7qZN.js";import{v as C}from"../../packem_shared/gcs-meta-storage-C9F78Sqq.js";import{default as l}from"../../packem_shared/GCStorage-CRd5vjok.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
@@ -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 { drive_v3 } from '@googleapis/drive';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -15,98 +16,98 @@ declare class GoogleDriveMetaStorage extends LocalMetaStorage<GoogleDriveFile> {
15
16
  }
16
17
  interface GoogleDriveStorageOptions extends BaseStorageOptions {
17
18
  /**
18
- * Pre-built `@googleapis/drive` v3 client. Escape hatch for callers that
19
- * have already wired auth (workload identity, ADC, etc.). When set, the
20
- * adapter uses it directly and `getUploadUrl()` will throw because there's
21
- * no stable way to recover the underlying auth handle.
22
- */
19
+ * Pre-built `@googleapis/drive` v3 client. Escape hatch for callers that
20
+ * have already wired auth (workload identity, ADC, etc.). When set, the
21
+ * adapter uses it directly and `getUploadUrl()` will throw because there's
22
+ * no stable way to recover the underlying auth handle.
23
+ */
23
24
  client?: drive_v3.Drive;
24
25
  /**
25
- * Inline service-account credentials. Mints a `JWT` auth client with
26
- * `https://www.googleapis.com/auth/drive` scope. Mutually exclusive with
27
- * the other auth shapes.
28
- */
26
+ * Inline service-account credentials. Mints a `JWT` auth client with
27
+ * `https://www.googleapis.com/auth/drive` scope. Mutually exclusive with
28
+ * the other auth shapes.
29
+ */
29
30
  credentials?: {
30
31
  client_email: string;
31
32
  private_key: string;
32
33
  };
33
34
  /**
34
- * Shared Drive id. **Strongly recommended for service-account auth** —
35
- * service accounts have a 15 GB personal quota; production workloads
36
- * should target a Shared Drive with the service account added as a member.
37
- */
35
+ * Shared Drive id. **Strongly recommended for service-account auth** —
36
+ * service accounts have a 15 GB personal quota; production workloads
37
+ * should target a Shared Drive with the service account added as a member.
38
+ */
38
39
  driveId?: string;
39
40
  /**
40
- * LRU capacity for the in-memory virtual-key → fileId cache. Drive has
41
- * no native key field; every read after the first round-trips a
42
- * `files.list` to resolve the id, which the cache amortizes. Defaults to
43
- * 1024.
44
- */
41
+ * LRU capacity for the in-memory virtual-key → fileId cache. Drive has
42
+ * no native key field; every read after the first round-trips a
43
+ * `files.list` to resolve the id, which the cache amortizes. Defaults to
44
+ * 1024.
45
+ */
45
46
  fileIdCacheSize?: number;
46
47
  /**
47
- * Path to a service-account JSON file. Mutually exclusive with the other
48
- * auth shapes.
49
- */
48
+ * Path to a service-account JSON file. Mutually exclusive with the other
49
+ * auth shapes.
50
+ */
50
51
  keyFilename?: string;
51
52
  /**
52
- * Configure metafiles storage. Defaults to local tmp directory.
53
- */
53
+ * Configure metafiles storage. Defaults to local tmp directory.
54
+ */
54
55
  metaStorageConfig?: LocalMetaStorageOptions;
55
56
  /**
56
- * OAuth refresh token (3-legged OAuth, end-user Drive). The adapter mints
57
- * fresh access tokens against `clientId`/`clientSecret`. Mutually
58
- * exclusive with the other auth shapes.
59
- */
57
+ * OAuth refresh token (3-legged OAuth, end-user Drive). The adapter mints
58
+ * fresh access tokens against `clientId`/`clientSecret`. Mutually
59
+ * exclusive with the other auth shapes.
60
+ */
60
61
  oauth?: {
61
62
  clientId: string;
62
63
  clientSecret: string;
63
64
  refreshToken: string;
64
65
  };
65
66
  /**
66
- * When `true`, `write()` also creates an "anyone with link, reader"
67
- * permission and `getReadUrl()` returns the Drive public download URL.
68
- * When `false` (default), `getReadUrl()` throws — Drive has no signed-URL
69
- * primitive.
70
- */
67
+ * When `true`, `write()` also creates an "anyone with link, reader"
68
+ * permission and `getReadUrl()` returns the Drive public download URL.
69
+ * When `false` (default), `getReadUrl()` throws — Drive has no signed-URL
70
+ * primitive.
71
+ */
71
72
  publicByDefault?: boolean;
72
73
  /**
73
- * Logical "bucket root" — virtual keys live under this folder. Defaults
74
- * to `"root"` (My Drive root) or, when `driveId` is set, the Shared
75
- * Drive root id should be used here.
76
- */
74
+ * Logical "bucket root" — virtual keys live under this folder. Defaults
75
+ * to `"root"` (My Drive root) or, when `driveId` is set, the Shared
76
+ * Drive root id should be used here.
77
+ */
77
78
  rootFolderId?: string;
78
79
  /**
79
- * Domain-wide delegation subject (the user to impersonate). Only honored
80
- * with `credentials` or `keyFilename`.
81
- */
80
+ * Domain-wide delegation subject (the user to impersonate). Only honored
81
+ * with `credentials` or `keyFilename`.
82
+ */
82
83
  subject?: string;
83
84
  }
84
85
  /**
85
- * Google Drive storage backend.
86
- *
87
- * Drive is **not** a key-value store — it organizes files by `fileId`, and a
88
- * single virtual key (e.g. `"docs/report.pdf"`) can map to multiple Drive
89
- * files. The adapter routes by `appProperties.fsdkKey`, which it sets on
90
- * every upload and resolves via `files.list` on every read. An LRU cache
91
- * amortizes the resolve cost.
92
- *
93
- * **Auth precedence**:
94
- * 1. `client` (pre-built `drive_v3.Drive`)
95
- * 2. `credentials` (inline service account)
96
- * 3. `keyFilename` (service-account JSON path)
97
- * 4. `oauth` (refresh token + clientId/clientSecret)
98
- * 5. Env fallback: `GOOGLE_DRIVE_CLIENT_EMAIL` + `GOOGLE_DRIVE_PRIVATE_KEY`, or
99
- * `GOOGLE_DRIVE_KEY_FILE` (optional: `GOOGLE_DRIVE_SUBJECT` for DWD).
100
- *
101
- * **Limitations**:
102
- * - `getReadUrl()` only works with `publicByDefault: true` — Drive has no
103
- * signed-URL primitive.
104
- * - `responseContentDisposition` is not supported.
105
- * - `getUploadUrl()` requires explicit `credentials`/`keyFilename`/`oauth`
106
- * (not a pre-built `client`) so we can mint access tokens for the
107
- * resumable session.
108
- * - ⚠️ 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.
109
- */
86
+ * Google Drive storage backend.
87
+ *
88
+ * Drive is **not** a key-value store — it organizes files by `fileId`, and a
89
+ * single virtual key (e.g. `"docs/report.pdf"`) can map to multiple Drive
90
+ * files. The adapter routes by `appProperties.fsdkKey`, which it sets on
91
+ * every upload and resolves via `files.list` on every read. An LRU cache
92
+ * amortizes the resolve cost.
93
+ *
94
+ * **Auth precedence**:
95
+ * 1. `client` (pre-built `drive_v3.Drive`)
96
+ * 2. `credentials` (inline service account)
97
+ * 3. `keyFilename` (service-account JSON path)
98
+ * 4. `oauth` (refresh token + clientId/clientSecret)
99
+ * 5. Env fallback: `GOOGLE_DRIVE_CLIENT_EMAIL` + `GOOGLE_DRIVE_PRIVATE_KEY`, or
100
+ * `GOOGLE_DRIVE_KEY_FILE` (optional: `GOOGLE_DRIVE_SUBJECT` for DWD).
101
+ *
102
+ * **Limitations**:
103
+ * - `getReadUrl()` only works with `publicByDefault: true` — Drive has no
104
+ * signed-URL primitive.
105
+ * - `responseContentDisposition` is not supported.
106
+ * - `getUploadUrl()` requires explicit `credentials`/`keyFilename`/`oauth`
107
+ * (not a pre-built `client`) so we can mint access tokens for the
108
+ * resumable session.
109
+ * - ⚠️ 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.
110
+ */
110
111
  declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
111
112
  static override readonly name: string;
112
113
  override checksumTypes: string[];
@@ -121,12 +122,8 @@ declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
121
122
  override get raw(): drive_v3.Drive;
122
123
  create(config: FileInit, _options?: OperationOptions): Promise<GoogleDriveFile>;
123
124
  write(part: FilePart | FileQuery | GoogleDriveFile, options?: OperationOptions): Promise<GoogleDriveFile>;
124
- delete({
125
- id
126
- }: FileQuery, options?: OperationOptions): Promise<GoogleDriveFile>;
127
- get({
128
- id
129
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
125
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<GoogleDriveFile>;
126
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
130
127
  copy(name: string, destination: string, options?: OperationOptions & {
131
128
  storageClass?: string;
132
129
  }): Promise<GoogleDriveFile>;
@@ -1 +1 @@
1
- import{default as r}from"../../packem_shared/GoogleDriveFile-DHpLhzg9.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js";import{default as f}from"../../packem_shared/GoogleDriveStorage-Bklsz7Bh.js";export{r as GoogleDriveFile,t as GoogleDriveMetaStorage,f as GoogleDriveStorage};
1
+ import{default as r}from"../../packem_shared/GoogleDriveFile-DHpLhzg9.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-B0gLF7Io.js";import{default as f}from"../../packem_shared/GoogleDriveStorage-Du7uBhSm.js";export{r as GoogleDriveFile,t as GoogleDriveMetaStorage,f as GoogleDriveStorage};
@@ -1,7 +1,8 @@
1
- export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-B-VGEsfl.js";
2
- export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
- export type { L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-Dgwyza8a.js";
2
+ export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
3
+ export type { L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-DwdJrArF.js";
4
4
  import 'node:stream';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -1 +1 @@
1
- import{F as e}from"../../packem_shared/disk-storage-CsQcYW3s.js";import{default as t}from"../../packem_shared/DiskStorageWithChecksum-vFCubS6K.js";import{y as f}from"../../packem_shared/local-meta-storage-iuJnu90B.js";export{e as DiskStorage,t as DiskStorageWithChecksum,f as LocalMetaStorage};
1
+ import{w as e}from"../../packem_shared/disk-storage-DqnnFQAQ.js";import{default as t}from"../../packem_shared/DiskStorageWithChecksum-MZkDEyts.js";import{y as f}from"../../packem_shared/local-meta-storage-BELb1YwO.js";export{e as DiskStorage,t as DiskStorageWithChecksum,f as LocalMetaStorage};
@@ -1,6 +1,7 @@
1
- export { M as MemoryMetaStorage, a as MemoryStorage, type b as MemoryStorageOptions, a as default } from "../../packem_shared/memory-storage.d-4EU1cMt1.js";
1
+ export { M as MemoryMetaStorage, a as MemoryStorage, type b as MemoryStorageOptions, a as default } from "../../packem_shared/memory-storage.d-BNZvDG1b.js";
2
2
  import 'node:stream';
3
- import "../../packem_shared/storage.d-CEM1upWM.js";
3
+ import "../../packem_shared/storage.d-DwdJrArF.js";
4
+ import 'node:timers';
4
5
  import 'node:crypto';
5
6
  import 'node:http';
6
7
  import 'lru-cache';
@@ -1 +1 @@
1
- import{default as o}from"../../packem_shared/MemoryMetaStorage-Ksgh9pe7.js";import{default as t,default as f}from"../../packem_shared/MemoryStorage-9gbWd09l.js";export{o as MemoryMetaStorage,t as MemoryStorage,f as default};
1
+ import{default as o}from"../../packem_shared/MemoryMetaStorage-Ksgh9pe7.js";import{default as t,default as f}from"../../packem_shared/MemoryStorage-ChKyI6OY.js";export{o as MemoryMetaStorage,t as MemoryStorage,f as default};