@visulima/storage 1.0.8 → 1.0.10

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 (143) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/adapter/nuxt/module.d.ts +8 -8
  3. package/dist/ai/ai-sdk/index.d.ts +51 -59
  4. package/dist/ai/claude/index.d.ts +104 -119
  5. package/dist/ai/openai/index.d.ts +86 -99
  6. package/dist/ai/tanstack/index.d.ts +53 -61
  7. package/dist/handler/http/fetch/index.d.ts +201 -201
  8. package/dist/handler/http/hono/index.d.ts +59 -59
  9. package/dist/handler/http/nextjs/index.d.ts +54 -54
  10. package/dist/handler/http/node/index.d.ts +233 -246
  11. package/dist/handler/http/solid-start/index.d.ts +54 -54
  12. package/dist/index.d.ts +70 -70
  13. package/dist/index.js +1 -1
  14. package/dist/packem_shared/{AwsLightStorage-BK-WPL0h.js → AwsLightStorage-EsqkAtU5.js} +1 -1
  15. package/dist/packem_shared/{AzureStorage-1UvDIQZd.js → AzureStorage-DL-U7qFG.js} +1 -1
  16. package/dist/packem_shared/BoxMetaStorage-CHWrhgg2.js +1 -0
  17. package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-B8_oCz27.js} +1 -1
  18. package/dist/packem_shared/BunS3MetaStorage-CHWrhgg2.js +1 -0
  19. package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-_PVXu_na.js} +1 -1
  20. package/dist/packem_shared/BunnyMetaStorage-CHWrhgg2.js +1 -0
  21. package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-BsoWjScH.js} +1 -1
  22. package/dist/packem_shared/CloudinaryMetaStorage-BI9YXcwU.js +1 -0
  23. package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-BNwiLF9V.js} +1 -1
  24. package/dist/packem_shared/{DiskStorage-CI07TVNu.js → DiskStorage-D-NtQDms.js} +1 -1
  25. package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-UnCtyEvs.js} +1 -1
  26. package/dist/packem_shared/DropboxMetaStorage-CHWrhgg2.js +1 -0
  27. package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BS9kj0nH.js} +1 -1
  28. package/dist/packem_shared/FirebaseMetaStorage-BI9YXcwU.js +1 -0
  29. package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-DNquii2p.js} +1 -1
  30. package/dist/packem_shared/FtpMetaStorage-CHWrhgg2.js +1 -0
  31. package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-Bd004--s.js} +1 -1
  32. package/dist/packem_shared/{GCSMetaStorage-C8dxa9A7.js → GCSMetaStorage-Bf4qDFB1.js} +1 -1
  33. package/dist/packem_shared/{GCStorage-DE-XFSBe.js → GCStorage-ChqEpgqR.js} +1 -1
  34. package/dist/packem_shared/GoogleDriveMetaStorage-xlHfKwmR.js +1 -0
  35. package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-v1glykjd.js} +1 -1
  36. package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-YWPBYEe7.js} +1 -1
  37. package/dist/packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js +1 -0
  38. package/dist/packem_shared/{NetlifyBlobStorage-CkpCCoN1.js → NetlifyBlobStorage-BPyEWSnx.js} +1 -1
  39. package/dist/packem_shared/OneDriveMetaStorage-xlHfKwmR.js +1 -0
  40. package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-BJ3Kzxc5.js} +1 -1
  41. package/dist/packem_shared/PocketBaseMetaStorage-DnrxOQhO.js +1 -0
  42. package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-DqKHbbvn.js} +1 -1
  43. package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-BiI2k6d1.js} +1 -1
  44. package/dist/packem_shared/SftpMetaStorage-CHWrhgg2.js +1 -0
  45. package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-w8XdtZtw.js} +1 -1
  46. package/dist/packem_shared/SharePointMetaStorage-CHWrhgg2.js +1 -0
  47. package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-DpDpI7Ln.js} +1 -1
  48. package/dist/packem_shared/SupabaseMetaStorage-xlHfKwmR.js +1 -0
  49. package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-B_ugUCs7.js} +1 -1
  50. package/dist/packem_shared/UploadThingMetaStorage-BI9YXcwU.js +1 -0
  51. package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-_H45IVqX.js} +1 -1
  52. package/dist/packem_shared/VercelBlobMetaStorage-CHWrhgg2.js +1 -0
  53. package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-U1YMKeHs.js} +1 -1
  54. package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
  55. package/dist/packem_shared/disk-storage-BwPk2IRa.js +1 -0
  56. package/dist/packem_shared/disk-storage-with-checksum.d-CQucFacO.d.ts +146 -0
  57. package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-DeDH3Ilt.d.ts} +2 -2
  58. package/dist/packem_shared/files.d-D8H_ge9Y.d.ts +655 -0
  59. package/dist/packem_shared/{gcs-meta-storage-DpkPEXso.js → gcs-meta-storage-DQGu_cHq.js} +1 -1
  60. package/dist/packem_shared/local-meta-storage-DJDcuxf1.js +11 -0
  61. package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-DuTEzyii.d.ts} +7 -7
  62. package/dist/packem_shared/media-transformer.d-CvMFjINm.d.ts +331 -0
  63. package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BRdTiY8y.d.ts} +32 -40
  64. package/dist/packem_shared/{s3-base-storage-BoTyhuzO.js → s3-base-storage-CMUui93V.js} +1 -1
  65. package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-Cg7m4FuH.d.ts} +64 -70
  66. package/dist/packem_shared/storage.d-DIav_lF1.d.ts +1163 -0
  67. package/dist/packem_shared/tus-base.d-BiEg5t4t.d.ts +102 -0
  68. package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-CAAzKiI6.d.ts} +134 -134
  69. package/dist/packem_shared/types.d-DgHhkCAl.d.ts +104 -0
  70. package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-jAs_Rp_v.d.ts} +3 -3
  71. package/dist/storage/aws/clients/index.d.ts +388 -388
  72. package/dist/storage/aws/index.d.ts +109 -113
  73. package/dist/storage/aws/index.js +1 -1
  74. package/dist/storage/aws-light/index.d.ts +63 -67
  75. package/dist/storage/aws-light/index.js +1 -1
  76. package/dist/storage/azure/index.d.ts +133 -139
  77. package/dist/storage/azure/index.js +1 -1
  78. package/dist/storage/box/index.d.ts +88 -92
  79. package/dist/storage/box/index.js +1 -1
  80. package/dist/storage/bun-s3/index.d.ts +70 -76
  81. package/dist/storage/bun-s3/index.js +1 -1
  82. package/dist/storage/bunny/index.d.ts +51 -55
  83. package/dist/storage/bunny/index.js +1 -1
  84. package/dist/storage/cloudinary/index.d.ts +53 -59
  85. package/dist/storage/cloudinary/index.js +1 -1
  86. package/dist/storage/dropbox/index.d.ts +58 -62
  87. package/dist/storage/dropbox/index.js +1 -1
  88. package/dist/storage/firebase/index.d.ts +73 -79
  89. package/dist/storage/firebase/index.js +1 -1
  90. package/dist/storage/ftp/index.d.ts +37 -43
  91. package/dist/storage/ftp/index.js +1 -1
  92. package/dist/storage/gcs/index.d.ts +89 -95
  93. package/dist/storage/gcs/index.js +1 -1
  94. package/dist/storage/google-drive/index.d.ts +68 -72
  95. package/dist/storage/google-drive/index.js +1 -1
  96. package/dist/storage/local/index.d.ts +3 -3
  97. package/dist/storage/local/index.js +1 -1
  98. package/dist/storage/memory/index.d.ts +2 -2
  99. package/dist/storage/netlify-blob/index.d.ts +85 -93
  100. package/dist/storage/netlify-blob/index.js +1 -1
  101. package/dist/storage/onedrive/index.d.ts +43 -53
  102. package/dist/storage/onedrive/index.js +1 -1
  103. package/dist/storage/pocketbase/index.d.ts +66 -72
  104. package/dist/storage/pocketbase/index.js +1 -1
  105. package/dist/storage/sftp/index.d.ts +39 -45
  106. package/dist/storage/sftp/index.js +1 -1
  107. package/dist/storage/sharepoint/index.d.ts +95 -95
  108. package/dist/storage/sharepoint/index.js +1 -1
  109. package/dist/storage/supabase/index.d.ts +49 -55
  110. package/dist/storage/supabase/index.js +1 -1
  111. package/dist/storage/uploadthing/index.d.ts +33 -37
  112. package/dist/storage/uploadthing/index.js +1 -1
  113. package/dist/storage/vercel-blob/index.d.ts +109 -115
  114. package/dist/storage/vercel-blob/index.js +1 -1
  115. package/dist/transformer/audio-transformer.d.ts +96 -96
  116. package/dist/transformer/image-transformer.d.ts +422 -422
  117. package/dist/transformer/index.d.ts +34 -34
  118. package/dist/transformer/video-transformer.d.ts +111 -111
  119. package/package.json +1 -1
  120. package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
  121. package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
  122. package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
  123. package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
  124. package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
  125. package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
  126. package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
  127. package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
  128. package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
  129. package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
  130. package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
  131. package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
  132. package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
  133. package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
  134. package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
  135. package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
  136. package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
  137. package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
  138. package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
  139. package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
  140. package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
  141. package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
  142. package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
  143. package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
@@ -1,4 +1,4 @@
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-DIav_lF1.js";
2
2
  import 'node:stream';
3
3
  import { RetryConfig } from 'gaxios';
4
4
  import { GoogleAuthOptions, GoogleAuth } from 'google-auth-library';
@@ -25,31 +25,31 @@ interface ClientError extends Error {
25
25
  }
26
26
  interface GCStorageOptions extends BaseStorageOptions, Omit<GoogleAuthOptions, "authClient" | "projectId">, StorageSettings {
27
27
  /**
28
- * Google Cloud Storage bucket
29
- */
28
+ * Google Cloud Storage bucket
29
+ */
30
30
  bucket?: string;
31
31
  /**
32
- * Force compatible client upload directly to GCS
33
- */
32
+ * Force compatible client upload directly to GCS
33
+ */
34
34
  clientDirectUpload?: boolean;
35
35
  /**
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
- */
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
+ */
53
53
  metaStorageConfig?: GCSMetaStorageOptions | LocalMetaStorageOptions;
54
54
  }
55
55
  interface GCSMetaStorageOptions extends MetaStorageOptions, Omit<GoogleAuthOptions, "authClient" | "projectId">, StorageSettings {
@@ -71,36 +71,36 @@ declare class GCSMetaStorage<T extends File = File> extends MetaStorage<T> {
71
71
  override touch(id: string, file: T): Promise<T>;
72
72
  private accessCheck;
73
73
  /**
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
- */
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
+ */
78
78
  private getMetaPath;
79
79
  private makeRequest;
80
80
  }
81
81
  /**
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
- */
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
+ */
104
104
  declare class GCStorage extends BaseStorage<GCSFile> {
105
105
  static override readonly name: string;
106
106
  override checksumTypes: string[];
@@ -120,58 +120,52 @@ declare class GCStorage extends BaseStorage<GCSFile> {
120
120
  create(config: FileInit, options?: OperationOptions): Promise<GCSFile>;
121
121
  write(part: FilePart | FileQuery | GCSFile, options?: OperationOptions): Promise<GCSFile>;
122
122
  /**
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>;
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({ id }: FileQuery, options?: OperationOptions): Promise<GCSFile>;
132
130
  /**
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
- */
131
+ * Copies an upload file to a new location.
132
+ * @param name Source file name/ID.
133
+ * @param destination Destination file name/ID.
134
+ * @returns Promise resolving to the copied file object.
135
+ * @throws {UploadError} If the source file cannot be found.
136
+ */
139
137
  copy(name: string, destination: string, options?: OperationOptions & {
140
138
  storageClass?: string;
141
139
  }): Promise<GCSFile>;
142
140
  /**
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
- */
141
+ * Moves an upload file to a new location.
142
+ * @param name Source file name/ID.
143
+ * @param destination Destination file name/ID.
144
+ * @returns Promise resolving to the moved file object.
145
+ * @throws {UploadError} If the source file cannot be found.
146
+ */
149
147
  move(name: string, destination: string, options?: OperationOptions): Promise<GCSFile>;
150
148
  /**
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>;
149
+ * Gets an uploaded file by ID with content buffer.
150
+ * @param query File query object containing the file ID.
151
+ * @param query.id Unique identifier of the file to retrieve.
152
+ * @returns Promise resolving to file object with content buffer.
153
+ * @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND) or has expired (ERRORS.GONE).
154
+ */
155
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
160
156
  /**
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>;
157
+ * Checks if a file exists by verifying both metadata and the actual GCS object.
158
+ * Returns true only if both the metadata and the GCS object exist.
159
+ * @param query File query containing the file ID to check.
160
+ * @returns Promise resolving to true if both metadata and GCS object exist, false otherwise.
161
+ */
162
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
169
163
  override list(limit?: number, options?: OperationOptions): Promise<GCSFile[]>;
170
164
  /**
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
- */
165
+ * Directory-style listing via the GCS JSON API's native `delimiter`/`prefix` — the API returns
166
+ * the direct child objects in `items` and the common prefixes ("subdirectories") in `prefixes`,
167
+ * so the subtree is never fully walked. Pages until exhausted or `limit` files are collected.
168
+ */
175
169
  override listDirectory(options?: OperationOptions & {
176
170
  delimiter: string;
177
171
  limit?: number;
@@ -183,11 +177,11 @@ declare class GCStorage extends BaseStorage<GCSFile> {
183
177
  protected internalWrite(part: GCSFile & Partial<FilePart>, callOptions?: OperationOptions): Promise<number>;
184
178
  private internalOnComplete;
185
179
  /**
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
- */
180
+ * Merge a body-level abort signal with the caller's per-operation
181
+ * `options.signal` so gaxios cancels the in-flight request on either.
182
+ * `options.timeout` is handed to gaxios' native `timeout` instead of a
183
+ * second `AbortSignal.timeout` to avoid two competing deadlines.
184
+ */
191
185
  private static buildCallSignal;
192
186
  private makeRequest;
193
187
  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-DpkPEXso.js";import{default as l}from"../../packem_shared/GCStorage-DE-XFSBe.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-DQGu_cHq.js";import{default as l}from"../../packem_shared/GCStorage-ChqEpgqR.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
@@ -1,6 +1,6 @@
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-DIav_lF1.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-DuTEzyii.js";
4
4
  import { drive_v3 } from '@googleapis/drive';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -15,98 +15,98 @@ declare class GoogleDriveMetaStorage extends LocalMetaStorage<GoogleDriveFile> {
15
15
  }
16
16
  interface GoogleDriveStorageOptions extends BaseStorageOptions {
17
17
  /**
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
- */
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
+ */
23
23
  client?: drive_v3.Drive;
24
24
  /**
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
- */
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
+ */
29
29
  credentials?: {
30
30
  client_email: string;
31
31
  private_key: string;
32
32
  };
33
33
  /**
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
- */
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
+ */
38
38
  driveId?: string;
39
39
  /**
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
- */
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
+ */
45
45
  fileIdCacheSize?: number;
46
46
  /**
47
- * Path to a service-account JSON file. Mutually exclusive with the other
48
- * auth shapes.
49
- */
47
+ * Path to a service-account JSON file. Mutually exclusive with the other
48
+ * auth shapes.
49
+ */
50
50
  keyFilename?: string;
51
51
  /**
52
- * Configure metafiles storage. Defaults to local tmp directory.
53
- */
52
+ * Configure metafiles storage. Defaults to local tmp directory.
53
+ */
54
54
  metaStorageConfig?: LocalMetaStorageOptions;
55
55
  /**
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
- */
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
+ */
60
60
  oauth?: {
61
61
  clientId: string;
62
62
  clientSecret: string;
63
63
  refreshToken: string;
64
64
  };
65
65
  /**
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
- */
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
+ */
71
71
  publicByDefault?: boolean;
72
72
  /**
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
- */
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
+ */
77
77
  rootFolderId?: string;
78
78
  /**
79
- * Domain-wide delegation subject (the user to impersonate). Only honored
80
- * with `credentials` or `keyFilename`.
81
- */
79
+ * Domain-wide delegation subject (the user to impersonate). Only honored
80
+ * with `credentials` or `keyFilename`.
81
+ */
82
82
  subject?: string;
83
83
  }
84
84
  /**
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
- */
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
+ */
110
110
  declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
111
111
  static override readonly name: string;
112
112
  override checksumTypes: string[];
@@ -121,12 +121,8 @@ declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
121
121
  override get raw(): drive_v3.Drive;
122
122
  create(config: FileInit, _options?: OperationOptions): Promise<GoogleDriveFile>;
123
123
  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>;
124
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<GoogleDriveFile>;
125
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
130
126
  copy(name: string, destination: string, options?: OperationOptions & {
131
127
  storageClass?: string;
132
128
  }): 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-xlHfKwmR.js";import{default as f}from"../../packem_shared/GoogleDriveStorage-v1glykjd.js";export{r as GoogleDriveFile,t as GoogleDriveMetaStorage,f as GoogleDriveStorage};
@@ -1,6 +1,6 @@
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-CQucFacO.js";
2
+ export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
3
+ export type { L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-DIav_lF1.js";
4
4
  import 'node:stream';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -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{F as e}from"../../packem_shared/disk-storage-BwPk2IRa.js";import{default as t}from"../../packem_shared/DiskStorageWithChecksum-UnCtyEvs.js";import{y as f}from"../../packem_shared/local-meta-storage-DJDcuxf1.js";export{e as DiskStorage,t as DiskStorageWithChecksum,f as LocalMetaStorage};
@@ -1,6 +1,6 @@
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-BRdTiY8y.js";
2
2
  import 'node:stream';
3
- import "../../packem_shared/storage.d-CEM1upWM.js";
3
+ import "../../packem_shared/storage.d-DIav_lF1.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';