@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,104 +1,105 @@
1
- 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";
1
+ 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";
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 { copy, del, list, put } from '@vercel/blob';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
8
9
  interface VercelBlobStorageOptions extends BaseStorageOptions {
9
10
  /**
10
- * Visibility for uploaded blobs. Vercel Blob currently exposes only
11
- * `"public"` in its SDK, but this option is here so callers can pass
12
- * through any future value without forking. Defaults to `"public"`.
13
- */
11
+ * Visibility for uploaded blobs. Vercel Blob currently exposes only
12
+ * `"public"` in its SDK, but this option is here so callers can pass
13
+ * through any future value without forking. Defaults to `"public"`.
14
+ */
14
15
  access?: "public";
15
16
  /**
16
- * Configure metafiles storage
17
- * @example
18
- * Using local metafiles
19
- * ```ts
20
- * const storage = new VercelBlobStorage({
21
- * token: process.env.BLOB_READ_WRITE_TOKEN,
22
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
23
- * })
24
- * ```
25
- */
17
+ * Configure metafiles storage
18
+ * @example
19
+ * Using local metafiles
20
+ * ```ts
21
+ * const storage = new VercelBlobStorage({
22
+ * token: process.env.BLOB_READ_WRITE_TOKEN,
23
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
24
+ * })
25
+ * ```
26
+ */
26
27
  metaStorageConfig?: LocalMetaStorageOptions;
27
28
  /**
28
- * Enable multipart uploads for large files
29
- * Can be a boolean to always use multipart, or a number (in bytes) as threshold
30
- * @default false
31
- * @example
32
- * // Always use multipart uploads
33
- * multipart: true
34
- * // Use multipart for files larger than 100MB
35
- * multipart: 100 * 1024 * 1024
36
- */
29
+ * Enable multipart uploads for large files
30
+ * Can be a boolean to always use multipart, or a number (in bytes) as threshold
31
+ * @default false
32
+ * @example
33
+ * // Always use multipart uploads
34
+ * multipart: true
35
+ * // Use multipart for files larger than 100MB
36
+ * multipart: 100 * 1024 * 1024
37
+ */
37
38
  multipart?: boolean | number;
38
39
  /**
39
- * Vercel OIDC token (`VERCEL_OIDC_TOKEN`). Short-lived, auto-rotated, and the
40
- * recommended auth path for projects running on Vercel. Must be paired with
41
- * {@link VercelBlobStorageOptions.storeId} (or `BLOB_STORE_ID` env). Provide
42
- * explicitly for runtimes that don't expose `process.env` (e.g. Vite).
43
- * @see https://vercel.com/docs/vercel-blob/using-blob-sdk#oidc-tokens-recommended
44
- */
40
+ * Vercel OIDC token (`VERCEL_OIDC_TOKEN`). Short-lived, auto-rotated, and the
41
+ * recommended auth path for projects running on Vercel. Must be paired with
42
+ * {@link VercelBlobStorageOptions.storeId} (or `BLOB_STORE_ID` env). Provide
43
+ * explicitly for runtimes that don't expose `process.env` (e.g. Vite).
44
+ * @see https://vercel.com/docs/vercel-blob/using-blob-sdk#oidc-tokens-recommended
45
+ */
45
46
  oidcToken?: string;
46
47
  /**
47
- * Vercel Blob store ID (`BLOB_STORE_ID`). Accepted in either `store_{id}`
48
- * or `{id}` form — the `store_` prefix is stripped automatically. Required
49
- * when authenticating via {@link VercelBlobStorageOptions.oidcToken}.
50
- */
48
+ * Vercel Blob store ID (`BLOB_STORE_ID`). Accepted in either `store_{id}`
49
+ * or `{id}` form — the `store_` prefix is stripped automatically. Required
50
+ * when authenticating via {@link VercelBlobStorageOptions.oidcToken}.
51
+ */
51
52
  storeId?: string;
52
53
  /**
53
- * Vercel Blob read-write token (`BLOB_READ_WRITE_TOKEN`). Long-lived; prefer
54
- * {@link VercelBlobStorageOptions.oidcToken} on Vercel. Always wins over OIDC
55
- * when both are supplied.
56
- */
54
+ * Vercel Blob read-write token (`BLOB_READ_WRITE_TOKEN`). Long-lived; prefer
55
+ * {@link VercelBlobStorageOptions.oidcToken} on Vercel. Always wins over OIDC
56
+ * when both are supplied.
57
+ */
57
58
  token?: string;
58
59
  }
59
60
  declare class VercelBlobFile extends File {
60
61
  /**
61
- * The blob's public URL
62
- */
62
+ * The blob's public URL
63
+ */
63
64
  url?: string;
64
65
  /**
65
- * The blob's download URL (may be different from url for private blobs)
66
- */
66
+ * The blob's download URL (may be different from url for private blobs)
67
+ */
67
68
  downloadUrl?: string;
68
69
  /**
69
- * The blob's pathname within the store
70
- */
70
+ * The blob's pathname within the store
71
+ */
71
72
  pathname?: string;
72
73
  }
73
74
  declare class VercelBlobMetaStorage extends LocalMetaStorage {
74
75
  constructor(config?: LocalMetaStorageOptions);
75
76
  }
76
77
  /**
77
- * Vercel Blob storage based backend.
78
- * @example
79
- * ```ts
80
- * const storage = new VercelBlobStorage({
81
- * token: process.env.BLOB_READ_WRITE_TOKEN,
82
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
83
- * });
84
- * ```
85
- * @remarks
86
- * ## Supported Operations
87
- * - ✅ create, write, delete, get, copy, move
88
- * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
89
- * - ✅ exists: Implemented (checks metadata and Vercel Blob)
90
- * - ❌ getStream: Not implemented (use get() for file retrieval)
91
- * - ❌ list: Not implemented (Vercel Blob API doesn't support listing)
92
- * - ❌ update: Not implemented (Vercel Blob API doesn't support metadata updates)
93
- * - ❌ getUrl: Not implemented (Vercel Blob URLs available via Vercel Blob API)
94
- * - ❌ getUploadUrl: Not implemented (Vercel Blob upload URLs handled internally)
95
- * - ⚠️ 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.
96
- */
78
+ * Vercel Blob storage based backend.
79
+ * @example
80
+ * ```ts
81
+ * const storage = new VercelBlobStorage({
82
+ * token: process.env.BLOB_READ_WRITE_TOKEN,
83
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
84
+ * });
85
+ * ```
86
+ * @remarks
87
+ * ## Supported Operations
88
+ * - ✅ create, write, delete, get, copy, move
89
+ * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
90
+ * - ✅ exists: Implemented (checks metadata and Vercel Blob)
91
+ * - ❌ getStream: Not implemented (use get() for file retrieval)
92
+ * - ❌ list: Not implemented (Vercel Blob API doesn't support listing)
93
+ * - ❌ update: Not implemented (Vercel Blob API doesn't support metadata updates)
94
+ * - ❌ getUrl: Not implemented (Vercel Blob URLs available via Vercel Blob API)
95
+ * - ❌ getUploadUrl: Not implemented (Vercel Blob upload URLs handled internally)
96
+ * - ⚠️ 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.
97
+ */
97
98
  /**
98
- * Auth credentials resolved at construction and forwarded verbatim to every
99
- * `@vercel/blob` SDK call. Mirrors the SDK's `BlobCommandOptions` shape so
100
- * env-based auto-pickup is never required.
101
- */
99
+ * Auth credentials resolved at construction and forwarded verbatim to every
100
+ * `@vercel/blob` SDK call. Mirrors the SDK's `BlobCommandOptions` shape so
101
+ * env-based auto-pickup is never required.
102
+ */
102
103
  type VercelBlobCredentials = {
103
104
  oidcToken: string;
104
105
  storeId: string;
@@ -124,66 +125,60 @@ declare class VercelBlobStorage extends BaseStorage<VercelBlobFile> {
124
125
  private readonly access;
125
126
  constructor(config: VercelBlobStorageOptions);
126
127
  /**
127
- * Resolves auth credentials in the same precedence as `@vercel/blob`:
128
- *
129
- * 1. Explicit `token` (RW or client token) — always wins.
130
- * 2. OIDC pair (`oidcToken` + `storeId`), from options or env.
131
- * 3. `BLOB_READ_WRITE_TOKEN` / `VERCEL_BLOB_TOKEN` env.
132
- *
133
- * Throws if no credentials are found, or if OIDC config is partial (one of
134
- * the two values present without the other) so callers fail loudly instead
135
- * of silently dropping to anonymous calls that 401 at runtime.
136
- */
128
+ * Resolves auth credentials in the same precedence as `@vercel/blob`:
129
+ *
130
+ * 1. Explicit `token` (RW or client token) — always wins.
131
+ * 2. OIDC pair (`oidcToken` + `storeId`), from options or env.
132
+ * 3. `BLOB_READ_WRITE_TOKEN` / `VERCEL_BLOB_TOKEN` env.
133
+ *
134
+ * Throws if no credentials are found, or if OIDC config is partial (one of
135
+ * the two values present without the other) so callers fail loudly instead
136
+ * of silently dropping to anonymous calls that 401 at runtime.
137
+ */
137
138
  private static resolveCredentials;
138
139
  create(config: FileInit, _options?: OperationOptions): Promise<VercelBlobFile>;
139
140
  write(part: FilePart | FileQuery | VercelBlobFile, options?: OperationOptions): Promise<VercelBlobFile>;
140
141
  /**
141
- * Deletes an upload and its metadata.
142
- * @param query File query containing the file ID to delete.
143
- * @param query.id File ID to delete.
144
- * @returns Promise resolving to the deleted file object with status: "deleted".
145
- * @throws {UploadError} If the file metadata cannot be found.
146
- */
147
- delete({
148
- id
149
- }: FileQuery, options?: OperationOptions): Promise<VercelBlobFile>;
142
+ * Deletes an upload and its metadata.
143
+ * @param query File query containing the file ID to delete.
144
+ * @param query.id File ID to delete.
145
+ * @returns Promise resolving to the deleted file object with status: "deleted".
146
+ * @throws {UploadError} If the file metadata cannot be found.
147
+ */
148
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<VercelBlobFile>;
150
149
  /**
151
- * Checks if a file exists by verifying both metadata and the actual Vercel Blob.
152
- * Returns true only if both the metadata and the blob exist.
153
- * @param query File query containing the file ID to check.
154
- * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
155
- */
156
- override exists({
157
- id
158
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
159
- get({
160
- id
161
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
150
+ * Checks if a file exists by verifying both metadata and the actual Vercel Blob.
151
+ * Returns true only if both the metadata and the blob exist.
152
+ * @param query File query containing the file ID to check.
153
+ * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
154
+ */
155
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
156
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
162
157
  /**
163
- * Copies an upload file to a new location.
164
- * @param name Source file name/ID.
165
- * @param destination Destination file name/ID.
166
- * @returns Promise resolving to the copied file object.
167
- * @throws {UploadError} If the source file cannot be found.
168
- */
158
+ * Copies an upload file to a new location.
159
+ * @param name Source file name/ID.
160
+ * @param destination Destination file name/ID.
161
+ * @returns Promise resolving to the copied file object.
162
+ * @throws {UploadError} If the source file cannot be found.
163
+ */
169
164
  copy(name: string, destination: string, options?: OperationOptions & {
170
165
  storageClass?: string;
171
166
  }): Promise<VercelBlobFile>;
172
167
  /**
173
- * Moves an upload file to a new location.
174
- * @param name Source file name/ID.
175
- * @param destination Destination file name/ID.
176
- * @returns Promise resolving to the moved file object.
177
- * @throws {UploadError} If the source file cannot be found.
178
- */
168
+ * Moves an upload file to a new location.
169
+ * @param name Source file name/ID.
170
+ * @param destination Destination file name/ID.
171
+ * @returns Promise resolving to the moved file object.
172
+ * @throws {UploadError} If the source file cannot be found.
173
+ */
179
174
  move(name: string, destination: string, options?: OperationOptions): Promise<VercelBlobFile>;
180
175
  override list(limit?: number, options?: OperationOptions): Promise<VercelBlobFile[]>;
181
176
  private internalOnComplete;
182
177
  /**
183
- * Determines if multipart upload should be used for the given file.
184
- * @param file File object to check.
185
- * @returns True if multipart upload should be used, false otherwise.
186
- */
178
+ * Determines if multipart upload should be used for the given file.
179
+ * @param file File object to check.
180
+ * @returns True if multipart upload should be used, false otherwise.
181
+ */
187
182
  private shouldUseMultipart;
188
183
  }
189
184
  export { VercelBlobFile, VercelBlobMetaStorage, VercelBlobStorage, type VercelBlobStorageOptions };
@@ -1 +1 @@
1
- import{default as r}from"../../packem_shared/VercelBlobFile-CVQwKlZk.js";import{default as a}from"../../packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js";import{default as f}from"../../packem_shared/VercelBlobStorage-CsRyPfw3.js";export{r as VercelBlobFile,a as VercelBlobMetaStorage,f as VercelBlobStorage};
1
+ import{default as r}from"../../packem_shared/VercelBlobFile-CVQwKlZk.js";import{default as a}from"../../packem_shared/VercelBlobMetaStorage-CJsyeQ63.js";import{default as f}from"../../packem_shared/VercelBlobStorage-DDNEofR3.js";export{r as VercelBlobFile,a as VercelBlobMetaStorage,f as VercelBlobStorage};
@@ -1,130 +1,131 @@
1
- import { F as File, g as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-CEM1upWM.js";
2
- import { A as AudioTransformerConfig, b as AudioTransformResult, c as AudioResampleOptions, d as AudioChannelMixOptions, e as AudioTransformOptions, f as AudioTransformationStep, B as BaseTransformer } from "../packem_shared/types.d-CrUWY4On.js";
1
+ import { F as File, g as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-DwdJrArF.js";
2
+ import { A as AudioTransformerConfig, b as AudioTransformResult, c as AudioResampleOptions, d as AudioChannelMixOptions, e as AudioTransformOptions, f as AudioTransformationStep, B as BaseTransformer } from "../packem_shared/types.d-BEUv414z.js";
3
3
  import 'node:stream';
4
+ import 'node:timers';
4
5
  import 'node:crypto';
5
6
  import 'node:http';
6
7
  import 'lru-cache';
7
8
  /**
8
- * Audio transformer that uses storage backends and Mediabunny to retrieve and transform audio files
9
- *
10
- * Supports audio transformations with query parameters for on-demand audio processing.
11
- * @example
12
- * ```ts
13
- * const transformer = new AudioTransformer(storage, {
14
- * maxAudioSize: 50 * 1024 * 1024, // 50MB
15
- * cache: new Map()
16
- * });
17
- *
18
- * // Programmatic usage - resample audio
19
- * const result = await transformer.resample('audio-id', {
20
- * sampleRate: 44100
21
- * });
22
- *
23
- * // URL-based transformations
24
- * // GET /files/audio-id?sampleRate=48000&codec=aac&bitrate=128000
25
- * // GET /files/audio-id?numberOfChannels=1&format=mp3
26
- * ```
27
- *
28
- * ## Supported Query Parameters
29
- *
30
- * - `sampleRate`: Sample rate in Hz (Number)
31
- * - `numberOfChannels`: Number of channels (Number)
32
- * - `codec`: Audio codec - aac/opus/mp3/vorbis/flac
33
- * - `bitrate`: Audio bitrate in bits per second (Number)
34
- * - `format`: Output format - mp3/wav/ogg/aac/flac
35
- */
9
+ * Audio transformer that uses storage backends and Mediabunny to retrieve and transform audio files
10
+ *
11
+ * Supports audio transformations with query parameters for on-demand audio processing.
12
+ * @example
13
+ * ```ts
14
+ * const transformer = new AudioTransformer(storage, {
15
+ * maxAudioSize: 50 * 1024 * 1024, // 50MB
16
+ * cache: new Map()
17
+ * });
18
+ *
19
+ * // Programmatic usage - resample audio
20
+ * const result = await transformer.resample('audio-id', {
21
+ * sampleRate: 44100
22
+ * });
23
+ *
24
+ * // URL-based transformations
25
+ * // GET /files/audio-id?sampleRate=48000&codec=aac&bitrate=128000
26
+ * // GET /files/audio-id?numberOfChannels=1&format=mp3
27
+ * ```
28
+ *
29
+ * ## Supported Query Parameters
30
+ *
31
+ * - `sampleRate`: Sample rate in Hz (Number)
32
+ * - `numberOfChannels`: Number of channels (Number)
33
+ * - `codec`: Audio codec - aac/opus/mp3/vorbis/flac
34
+ * - `bitrate`: Audio bitrate in bits per second (Number)
35
+ * - `format`: Output format - mp3/wav/ogg/aac/flac
36
+ */
36
37
  declare class AudioTransformer<TFile extends File = File, TFileReturn extends FileReturn = FileReturn> extends BaseTransformer<AudioTransformerConfig, AudioTransformResult<TFileReturn>, TFile, TFileReturn> {
37
38
  /**
38
- * Creates a new AudioTransformer instance.
39
- * @param storage The storage backend for retrieving and storing audio files.
40
- * @param config Configuration options for audio transformation including cache settings, codec defaults, and size limits.
41
- */
39
+ * Creates a new AudioTransformer instance.
40
+ * @param storage The storage backend for retrieving and storing audio files.
41
+ * @param config Configuration options for audio transformation including cache settings, codec defaults, and size limits.
42
+ */
42
43
  constructor(storage: BaseStorage<TFile, TFileReturn>, config?: AudioTransformerConfig);
43
44
  /**
44
- * Resamples audio to different sample rate.
45
- * @param fileId Unique identifier of the audio file to resample.
46
- * @param options Resample options including target sample rate.
47
- * @returns Promise resolving to transformed audio result.
48
- */
45
+ * Resamples audio to different sample rate.
46
+ * @param fileId Unique identifier of the audio file to resample.
47
+ * @param options Resample options including target sample rate.
48
+ * @returns Promise resolving to transformed audio result.
49
+ */
49
50
  resample(fileId: string, options: AudioResampleOptions): Promise<AudioTransformResult<TFileReturn>>;
50
51
  /**
51
- * Changes number of channels (up/downmixing).
52
- * @param fileId Unique identifier of the audio file to process.
53
- * @param options Channel mix options including target number of channels.
54
- * @returns Promise resolving to transformed audio result.
55
- */
52
+ * Changes number of channels (up/downmixing).
53
+ * @param fileId Unique identifier of the audio file to process.
54
+ * @param options Channel mix options including target number of channels.
55
+ * @returns Promise resolving to transformed audio result.
56
+ */
56
57
  mixChannels(fileId: string, options: AudioChannelMixOptions): Promise<AudioTransformResult<TFileReturn>>;
57
58
  /**
58
- * Converts audio format or codec.
59
- * @param fileId Unique identifier of the audio file to convert.
60
- * @param format Target audio format (e.g., "mp3", "wav", "ogg").
61
- * @param options Additional transform options.
62
- * @returns Promise resolving to transformed audio result.
63
- */
59
+ * Converts audio format or codec.
60
+ * @param fileId Unique identifier of the audio file to convert.
61
+ * @param format Target audio format (e.g., "mp3", "wav", "ogg").
62
+ * @param options Additional transform options.
63
+ * @returns Promise resolving to transformed audio result.
64
+ */
64
65
  convertFormat(fileId: string, format: string, options?: AudioTransformOptions): Promise<AudioTransformResult<TFileReturn>>;
65
66
  /**
66
- * Transcodes audio to different codec.
67
- * @param fileId Unique identifier of the audio file to transcode.
68
- * @param codec Target audio codec (e.g., "aac", "opus", "mp3").
69
- * @param options Additional transform options.
70
- * @returns Promise resolving to transformed audio result.
71
- */
67
+ * Transcodes audio to different codec.
68
+ * @param fileId Unique identifier of the audio file to transcode.
69
+ * @param codec Target audio codec (e.g., "aac", "opus", "mp3").
70
+ * @param options Additional transform options.
71
+ * @returns Promise resolving to transformed audio result.
72
+ */
72
73
  transcode(fileId: string, codec: AudioTransformOptions["codec"], options?: Omit<AudioTransformOptions, "codec">): Promise<AudioTransformResult<TFileReturn>>;
73
74
  /**
74
- * Applies a custom transformation pipeline to an audio file.
75
- * @param fileId Unique identifier of the audio file to transform.
76
- * @param steps Array of transformation steps to apply in sequence.
77
- * @returns Promise resolving to transformed audio result.
78
- */
75
+ * Applies a custom transformation pipeline to an audio file.
76
+ * @param fileId Unique identifier of the audio file to transform.
77
+ * @param steps Array of transformation steps to apply in sequence.
78
+ * @returns Promise resolving to transformed audio result.
79
+ */
79
80
  transform(fileId: string, steps: AudioTransformationStep[]): Promise<AudioTransformResult<TFileReturn>>;
80
81
  /**
81
- * Apply multiple transformations in sequence using Mediabunny
82
- */
82
+ * Apply multiple transformations in sequence using Mediabunny
83
+ */
83
84
  private applyTransformations;
84
85
  /**
85
- * Convert transformation steps to Mediabunny audio options
86
- * @param steps Array of audio transformation steps to convert
87
- * @returns Mediabunny audio options object for conversion
88
- * @private
89
- */
86
+ * Convert transformation steps to Mediabunny audio options
87
+ * @param steps Array of audio transformation steps to convert
88
+ * @returns Mediabunny audio options object for conversion
89
+ * @private
90
+ */
90
91
  private stepsToAudioOptions;
91
92
  /**
92
- * Determine output format based on transformation steps
93
- * @param steps Array of audio transformation steps
94
- * @returns Mediabunny output format instance (defaults to MP3)
95
- * @private
96
- */
93
+ * Determine output format based on transformation steps
94
+ * @param steps Array of audio transformation steps
95
+ * @returns Mediabunny output format instance (defaults to MP3)
96
+ * @private
97
+ */
97
98
  private determineOutputFormat;
98
99
  /**
99
- * Convert format string to Mediabunny output format
100
- * @param format Audio format string (aac, flac, mp3, ogg, wav)
101
- * @returns Mediabunny output format instance
102
- * @private
103
- */
100
+ * Convert format string to Mediabunny output format
101
+ * @param format Audio format string (aac, flac, mp3, ogg, wav)
102
+ * @returns Mediabunny output format instance
103
+ * @private
104
+ */
104
105
  private formatStringToOutputFormat;
105
106
  /**
106
- * Validate that the file is a supported audio file
107
- * @param file The file to validate
108
- * @returns Promise that resolves if validation passes
109
- * @throws Error if file size exceeds limits, wrong content type, unsupported format, or invalid audio
110
- * @private
111
- */
107
+ * Validate that the file is a supported audio file
108
+ * @param file The file to validate
109
+ * @returns Promise that resolves if validation passes
110
+ * @throws Error if file size exceeds limits, wrong content type, unsupported format, or invalid audio
111
+ * @private
112
+ */
112
113
  private validateAudio;
113
114
  /**
114
- * Create transformation result with metadata
115
- * @param buffer The transformed audio buffer
116
- * @param originalFile The original file information
117
- * @returns Audio transformation result with metadata
118
- * @private
119
- */
115
+ * Create transformation result with metadata
116
+ * @param buffer The transformed audio buffer
117
+ * @param originalFile The original file information
118
+ * @returns Audio transformation result with metadata
119
+ * @private
120
+ */
120
121
  private createTransformResult;
121
122
  /**
122
- * Generate cache key for transformation
123
- * @param fileId The file identifier
124
- * @param steps Array of transformation steps
125
- * @returns Unique cache key string
126
- * @private
127
- */
123
+ * Generate cache key for transformation
124
+ * @param fileId The file identifier
125
+ * @param steps Array of transformation steps
126
+ * @returns Unique cache key string
127
+ * @private
128
+ */
128
129
  private generateCacheKey;
129
130
  }
130
131
  export { AudioTransformer as default };