@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, R as RetryConfig, d as FileInit, O as OperationOptions, f as FileQuery, o as BatchOperationResponse, e as FilePart, 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, R as RetryConfig, d as FileInit, O as OperationOptions, f as FileQuery, o as BatchOperationResponse, e as FilePart, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DwdJrArF.js";
2
2
  import 'node:stream';
3
3
  import { TokenCredential } from '@azure/core-auth';
4
4
  import { BlobServiceClient } from '@azure/storage-blob';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -11,58 +12,58 @@ declare class AzureFile extends File {
11
12
  }
12
13
  interface ClientConfig {
13
14
  /**
14
- * Azure account key. Resolved from `AZURE_STORAGE_ACCOUNT_KEY` when omitted.
15
- */
15
+ * Azure account key. Resolved from `AZURE_STORAGE_ACCOUNT_KEY` when omitted.
16
+ */
16
17
  accountKey?: string;
17
18
  /**
18
- * Azure account name. Resolved from `AZURE_STORAGE_ACCOUNT` when omitted.
19
- */
19
+ * Azure account name. Resolved from `AZURE_STORAGE_ACCOUNT` when omitted.
20
+ */
20
21
  accountName?: string;
21
22
  /**
22
- * Azure container name.
23
- */
23
+ * Azure container name.
24
+ */
24
25
  containerName: string;
25
26
  /**
26
- * Microsoft Entra credential for Azure AD / Managed Identity workloads
27
- * (e.g. `DefaultAzureCredential` from `@azure/identity`). When supplied
28
- * without a shared key, SDK operations use token auth and signed URLs are
29
- * minted via User Delegation SAS.
30
- *
31
- * The principal must be allowed to access blob data and to call
32
- * `Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action`
33
- * (for example via Storage Blob Data Contributor + Storage Blob Delegator).
34
- */
27
+ * Microsoft Entra credential for Azure AD / Managed Identity workloads
28
+ * (e.g. `DefaultAzureCredential` from `@azure/identity`). When supplied
29
+ * without a shared key, SDK operations use token auth and signed URLs are
30
+ * minted via User Delegation SAS.
31
+ *
32
+ * The principal must be allowed to access blob data and to call
33
+ * `Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action`
34
+ * (for example via Storage Blob Data Contributor + Storage Blob Delegator).
35
+ */
35
36
  credential?: TokenCredential;
36
37
  /**
37
- * Azure endpoint.
38
- */
38
+ * Azure endpoint.
39
+ */
39
40
  endpoint?: string;
40
41
  /**
41
- * Azure root path.
42
- */
42
+ * Azure root path.
43
+ */
43
44
  root?: string;
44
45
  /**
45
- * Pre-issued SAS token (with or without a leading `?`). Resolved from
46
- * `AZURE_STORAGE_SAS_TOKEN` when omitted. SAS-token adapters can use their
47
- * configured access but cannot mint fresh signed URLs.
48
- */
46
+ * Pre-issued SAS token (with or without a leading `?`). Resolved from
47
+ * `AZURE_STORAGE_SAS_TOKEN` when omitted. SAS-token adapters can use their
48
+ * configured access but cannot mint fresh signed URLs.
49
+ */
49
50
  sasToken?: string;
50
51
  /**
51
- * Controls whether a `credential`-backed adapter mints User Delegation SAS
52
- * URLs. Defaults to `true` when `credential` is supplied; set `false` for
53
- * token-authenticated SDK operations without signed-URL support.
54
- */
52
+ * Controls whether a `credential`-backed adapter mints User Delegation SAS
53
+ * URLs. Defaults to `true` when `credential` is supplied; set `false` for
54
+ * token-authenticated SDK operations without signed-URL support.
55
+ */
55
56
  useUserDelegationSas?: boolean;
56
57
  }
57
58
  interface ClientConfig {
58
59
  connectionString?: string;
59
60
  /**
60
- * Azure container name.
61
- */
61
+ * Azure container name.
62
+ */
62
63
  containerName: string;
63
64
  /**
64
- * Azure root path.
65
- */
65
+ * Azure root path.
66
+ */
66
67
  root?: string;
67
68
  }
68
69
  interface AzureMetaStorageOptions extends ClientConfig, MetaStorageOptions {
@@ -70,23 +71,23 @@ interface AzureMetaStorageOptions extends ClientConfig, MetaStorageOptions {
70
71
  }
71
72
  interface AzureStorageOptions extends BaseStorageOptions, ClientConfig {
72
73
  /**
73
- * Configure metafiles storage
74
- * @example
75
- * ```ts
76
- * Using local metafiles
77
- * const storage = new AzureStorage({
78
- * bucket: 'upload',
79
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
80
- * })
81
- * ```
82
- * Using a separate bucket for metafiles
83
- * ```ts
84
- * const storage = new AzureStorage({
85
- * bucket: 'upload',
86
- * metaStorageConfig: { bucket: 'upload-metafiles' }
87
- * })
88
- * ```
89
- */
74
+ * Configure metafiles storage
75
+ * @example
76
+ * ```ts
77
+ * Using local metafiles
78
+ * const storage = new AzureStorage({
79
+ * bucket: 'upload',
80
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
81
+ * })
82
+ * ```
83
+ * Using a separate bucket for metafiles
84
+ * ```ts
85
+ * const storage = new AzureStorage({
86
+ * bucket: 'upload',
87
+ * metaStorageConfig: { bucket: 'upload-metafiles' }
88
+ * })
89
+ * ```
90
+ */
90
91
  metaStorageConfig?: AzureMetaStorageOptions | LocalMetaStorageOptions;
91
92
  }
92
93
  declare class AzureMetaStorage<T extends File = File> extends MetaStorage<T> {
@@ -101,18 +102,18 @@ declare class AzureMetaStorage<T extends File = File> extends MetaStorage<T> {
101
102
  list(): Promise<T[]>;
102
103
  }
103
104
  /**
104
- * Azure Blob Storage implementation.
105
- * @remarks
106
- * ## Supported Operations
107
- * - ✅ create, write, delete, get, list, update, copy, move
108
- * - ✅ Batch operations: deleteBatch (native Blob Batch API, 256/request), copyBatch + moveBatch (inherited from BaseStorage)
109
- * - ✅ exists: Implemented (checks metadata and Azure blob)
110
- * - ❌ getStream: Not implemented (use get() for file retrieval)
111
- * - ✅ getReadUrl / getUploadUrl: service SAS (shared key / connection string) or User Delegation SAS (Microsoft Entra credential). SAS-token adapters append the pre-issued token. Anonymous (public-container) adapters serve unsigned read URLs only — uploads are rejected.
112
- *
113
- * ## Authentication
114
- * Precedence: connection string, then account key + name, then Microsoft Entra `credential` (Azure AD / Managed Identity), then a pre-issued `sasToken`, then anonymous (public-container) access.
115
- */
105
+ * Azure Blob Storage implementation.
106
+ * @remarks
107
+ * ## Supported Operations
108
+ * - ✅ create, write, delete, get, list, update, copy, move
109
+ * - ✅ Batch operations: deleteBatch (native Blob Batch API, 256/request), copyBatch + moveBatch (inherited from BaseStorage)
110
+ * - ✅ exists: Implemented (checks metadata and Azure blob)
111
+ * - ❌ getStream: Not implemented (use get() for file retrieval)
112
+ * - ✅ getReadUrl / getUploadUrl: service SAS (shared key / connection string) or User Delegation SAS (Microsoft Entra credential). SAS-token adapters append the pre-issued token. Anonymous (public-container) adapters serve unsigned read URLs only — uploads are rejected.
113
+ *
114
+ * ## Authentication
115
+ * Precedence: connection string, then account key + name, then Microsoft Entra `credential` (Azure AD / Managed Identity), then a pre-issued `sasToken`, then anonymous (public-container) access.
116
+ */
116
117
  declare class AzureStorage extends BaseStorage {
117
118
  static override readonly name: string;
118
119
  override checksumTypes: string[];
@@ -131,105 +132,99 @@ declare class AzureStorage extends BaseStorage {
131
132
  protected override getRetryConfig(): RetryConfig;
132
133
  create(config: FileInit, options?: OperationOptions): Promise<AzureFile>;
133
134
  /**
134
- * Deletes an upload and its metadata.
135
- * @param query File query containing the file ID to delete.
136
- * @param query.id File ID to delete.
137
- * @returns Promise resolving to the deleted file object with status: "deleted".
138
- * @throws {UploadError} If the file metadata cannot be found.
139
- */
140
- delete({
141
- id
142
- }: FileQuery, options?: OperationOptions): Promise<AzureFile>;
143
- /**
144
- * Deletes many blobs in one round-trip using Azure's native
145
- * [Blob Batch API](https://learn.microsoft.com/rest/api/storageservices/blob-batch)
146
- * (up to 256 sub-requests per request) instead of issuing one DELETE per key.
147
- *
148
- * Sidecar metadata removal and the {@link onDelete} hook are still applied per
149
- * successfully-deleted id; a 404 sub-response is treated as success to match the
150
- * `deleteIfExists` semantics of the single-key {@link delete}. If the batch endpoint
151
- * is unavailable (e.g. an Azurite build without batch support) the call transparently
152
- * falls back to the per-key base implementation.
153
- * @param ids File ids/keys to delete.
154
- * @param options Optional per-call signal/timeout/retries.
155
- */
135
+ * Deletes an upload and its metadata.
136
+ * @param query File query containing the file ID to delete.
137
+ * @param query.id File ID to delete.
138
+ * @returns Promise resolving to the deleted file object with status: "deleted".
139
+ * @throws {UploadError} If the file metadata cannot be found.
140
+ */
141
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<AzureFile>;
142
+ /**
143
+ * Deletes many blobs in one round-trip using Azure's native
144
+ * [Blob Batch API](https://learn.microsoft.com/rest/api/storageservices/blob-batch)
145
+ * (up to 256 sub-requests per request) instead of issuing one DELETE per key.
146
+ *
147
+ * Sidecar metadata removal and the {@link onDelete} hook are still applied per
148
+ * successfully-deleted id; a 404 sub-response is treated as success to match the
149
+ * `deleteIfExists` semantics of the single-key {@link delete}. If the batch endpoint
150
+ * is unavailable (e.g. an Azurite build without batch support) the call transparently
151
+ * falls back to the per-key base implementation.
152
+ * @param ids File ids/keys to delete.
153
+ * @param options Optional per-call signal/timeout/retries.
154
+ */
156
155
  override deleteBatch(ids: string[], options?: OperationOptions): Promise<BatchOperationResponse<AzureFile>>;
157
156
  /**
158
- * Moves 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 moved file object.
162
- * @throws {UploadError} If the source file cannot be found.
163
- */
157
+ * Moves an upload file to a new location.
158
+ * @param name Source file name/ID.
159
+ * @param destination Destination file name/ID.
160
+ * @returns Promise resolving to the moved file object.
161
+ * @throws {UploadError} If the source file cannot be found.
162
+ */
164
163
  move(name: string, destination: string, options?: OperationOptions): Promise<AzureFile>;
165
164
  write(part: FilePart | FileQuery | AzureFile, options?: OperationOptions): Promise<AzureFile>;
166
- get({
167
- id
168
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
169
- /**
170
- * Checks if a file exists by verifying both metadata and the actual Azure blob.
171
- * Returns true only if both the metadata and the blob exist.
172
- * @param query File query containing the file ID to check.
173
- * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
174
- */
175
- override exists({
176
- id
177
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
178
- /**
179
- * Copies an upload file to a new location.
180
- * @param name Source file name/ID.
181
- * @param destination Destination file name/ID.
182
- * @returns Promise resolving to the copied file object.
183
- * @throws {UploadError} If the source file cannot be found.
184
- */
165
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
166
+ /**
167
+ * Checks if a file exists by verifying both metadata and the actual Azure blob.
168
+ * Returns true only if both the metadata and the blob exist.
169
+ * @param query File query containing the file ID to check.
170
+ * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
171
+ */
172
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
173
+ /**
174
+ * Copies an upload file to a new location.
175
+ * @param name Source file name/ID.
176
+ * @param destination Destination file name/ID.
177
+ * @returns Promise resolving to the copied file object.
178
+ * @throws {UploadError} If the source file cannot be found.
179
+ */
185
180
  copy(name: string, destination: string, options?: OperationOptions & {
186
181
  storageClass?: string;
187
182
  }): Promise<AzureFile>;
188
183
  override list(limit?: number, options?: OperationOptions): Promise<AzureFile[]>;
189
184
  /**
190
- * Returns a download URL for the blob at `key`.
191
- *
192
- * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
193
- * SAS. SAS-token adapters append the pre-issued token. Genuine anonymous
194
- * (public-container) adapters return the unsigned blob URL.
195
- * @param key Storage key.
196
- * @param options Optional expiry and response content overrides. Response
197
- * content overrides only apply when the adapter mints a fresh SAS; they are
198
- * rejected on the pre-issued `sasToken` and anonymous paths, which have no
199
- * signature in which to bind them.
200
- * @throws {UploadError} When the adapter has no way to authorise reads, or
201
- * when a response content override is supplied on a non-signing path.
202
- */
185
+ * Returns a download URL for the blob at `key`.
186
+ *
187
+ * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
188
+ * SAS. SAS-token adapters append the pre-issued token. Genuine anonymous
189
+ * (public-container) adapters return the unsigned blob URL.
190
+ * @param key Storage key.
191
+ * @param options Optional expiry and response content overrides. Response
192
+ * content overrides only apply when the adapter mints a fresh SAS; they are
193
+ * rejected on the pre-issued `sasToken` and anonymous paths, which have no
194
+ * signature in which to bind them.
195
+ * @throws {UploadError} When the adapter has no way to authorise reads, or
196
+ * when a response content override is supplied on a non-signing path.
197
+ */
203
198
  override getReadUrl(key: string, options?: {
204
199
  expiresIn?: number;
205
200
  responseContentDisposition?: string;
206
201
  responseContentType?: string;
207
202
  }): Promise<string>;
208
203
  /**
209
- * Returns an upload URL (HTTP PUT, `x-ms-blob-type: BlockBlob`) for `key`.
210
- *
211
- * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
212
- * SAS. SAS-token adapters append the pre-issued token. Anonymous adapters
213
- * cannot upload. The caller must send the desired `x-ms-blob-content-type`
214
- * header on the PUT — a SAS cannot pin the stored content type.
215
- * @param key Storage key.
216
- * @param options Optional expiry. `contentLength` and `contentType` are
217
- * rejected: an Azure SAS does not bind the request `Content-Type` into the
218
- * signature and has no server-enforced size limit, so accepting them would
219
- * hand the caller a guarantee that does not hold.
220
- * @throws {UploadError} When the adapter cannot authorise writes, or when an
221
- * unenforceable `contentType`/`contentLength` override is supplied.
222
- */
204
+ * Returns an upload URL (HTTP PUT, `x-ms-blob-type: BlockBlob`) for `key`.
205
+ *
206
+ * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
207
+ * SAS. SAS-token adapters append the pre-issued token. Anonymous adapters
208
+ * cannot upload. The caller must send the desired `x-ms-blob-content-type`
209
+ * header on the PUT — a SAS cannot pin the stored content type.
210
+ * @param key Storage key.
211
+ * @param options Optional expiry. `contentLength` and `contentType` are
212
+ * rejected: an Azure SAS does not bind the request `Content-Type` into the
213
+ * signature and has no server-enforced size limit, so accepting them would
214
+ * hand the caller a guarantee that does not hold.
215
+ * @throws {UploadError} When the adapter cannot authorise writes, or when an
216
+ * unenforceable `contentType`/`contentLength` override is supplied.
217
+ */
223
218
  override getUploadUrl(key: string, options?: {
224
219
  contentLength?: number;
225
220
  contentType?: string;
226
221
  expiresIn?: number;
227
222
  }): Promise<string>;
228
223
  /**
229
- * Prefixes the given filePath with the storage root location (assetFolder if configured).
230
- * @param filePath Relative file path to prefix.
231
- * @returns Full path with asset folder prefix if configured, otherwise returns original path.
232
- */
224
+ * Prefixes the given filePath with the storage root location (assetFolder if configured).
225
+ * @param filePath Relative file path to prefix.
226
+ * @returns Full path with asset folder prefix if configured, otherwise returns original path.
227
+ */
233
228
  private getFullPath;
234
229
  private accessCheck;
235
230
  }
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/AzureFile-DFSaVe25.js";import{c as t}from"../../packem_shared/azure-meta-storage-ClbEsfI4.js";import{default as u}from"../../packem_shared/AzureStorage-1UvDIQZd.js";export{a as AzureFile,t as AzureSMetaStorage,u as AzureStorage};
1
+ import{default as a}from"../../packem_shared/AzureFile-DFSaVe25.js";import{c as t}from"../../packem_shared/azure-meta-storage-ClbEsfI4.js";import{default as u}from"../../packem_shared/AzureStorage-DvKk_hhz.js";export{a as AzureFile,t as AzureSMetaStorage,u as AzureStorage};
@@ -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 { BoxClient } from 'box-typescript-sdk-gen';
5
+ import 'node:timers';
5
6
  import 'node:crypto';
6
7
  import 'node:http';
7
8
  import 'lru-cache';
@@ -15,38 +16,38 @@ declare class BoxMetaStorage extends LocalMetaStorage<BoxFile> {
15
16
  }
16
17
  interface BoxOAuthOptions {
17
18
  /**
18
- * Box application client ID.
19
- */
19
+ * Box application client ID.
20
+ */
20
21
  clientId: string;
21
22
  /**
22
- * Box application client secret.
23
- */
23
+ * Box application client secret.
24
+ */
24
25
  clientSecret: string;
25
26
  /**
26
- * Long-lived refresh token previously obtained via Box's authorization
27
- * code flow. The adapter seeds the SDK's in-memory token storage with
28
- * this value; the SDK exchanges it for a fresh access token on first
29
- * use and re-refreshes when the access token expires.
30
- */
27
+ * Long-lived refresh token previously obtained via Box's authorization
28
+ * code flow. The adapter seeds the SDK's in-memory token storage with
29
+ * this value; the SDK exchanges it for a fresh access token on first
30
+ * use and re-refreshes when the access token expires.
31
+ */
31
32
  refreshToken: string;
32
33
  }
33
34
  interface BoxCcgOptions {
34
35
  /**
35
- * Box application client ID.
36
- */
36
+ * Box application client ID.
37
+ */
37
38
  clientId: string;
38
39
  /**
39
- * Box application client secret.
40
- */
40
+ * Box application client secret.
41
+ */
41
42
  clientSecret: string;
42
43
  /**
43
- * Pass `enterpriseId` to authenticate as the service account, or `userId`
44
- * to authenticate as a managed/app user. At least one is required.
45
- */
44
+ * Pass `enterpriseId` to authenticate as the service account, or `userId`
45
+ * to authenticate as a managed/app user. At least one is required.
46
+ */
46
47
  enterpriseId?: string;
47
48
  /**
48
- * Pass `userId` to authenticate as a managed/app user.
49
- */
49
+ * Pass `userId` to authenticate as a managed/app user.
50
+ */
50
51
  userId?: string;
51
52
  }
52
53
  type BoxJwtOptions = {
@@ -56,91 +57,91 @@ type BoxJwtOptions = {
56
57
  };
57
58
  interface BoxStorageOptions extends BaseStorageOptions {
58
59
  /**
59
- * Server-side Client Credentials Grant. Mutually exclusive with
60
- * `developerToken`, `oauth`, and `jwt`.
61
- */
60
+ * Server-side Client Credentials Grant. Mutually exclusive with
61
+ * `developerToken`, `oauth`, and `jwt`.
62
+ */
62
63
  ccg?: BoxCcgOptions;
63
64
  /**
64
- * Pre-built `BoxClient`. Escape hatch for callers that already wire
65
- * auth themselves (e.g. with a custom `NetworkSession`, proxy config,
66
- * or downscoped tokens).
67
- */
65
+ * Pre-built `BoxClient`. Escape hatch for callers that already wire
66
+ * auth themselves (e.g. with a custom `NetworkSession`, proxy config,
67
+ * or downscoped tokens).
68
+ */
68
69
  client?: BoxClient;
69
70
  /**
70
- * Default expiry, in seconds, advertised to callers of `getReadUrl()`.
71
- * Box does not document a hard maximum for download URLs (they are
72
- * short-lived by API design); this value is forwarded as documentation
73
- * only — the actual lifetime is decided by Box. Defaults to 3600.
74
- */
71
+ * Default expiry, in seconds, advertised to callers of `getReadUrl()`.
72
+ * Box does not document a hard maximum for download URLs (they are
73
+ * short-lived by API design); this value is forwarded as documentation
74
+ * only — the actual lifetime is decided by Box. Defaults to 3600.
75
+ */
75
76
  defaultUrlExpiresIn?: number;
76
77
  /**
77
- * Static developer token from the Box developer console. Useful for
78
- * scripts and trying the adapter; production apps should use OAuth,
79
- * CCG, or JWT instead. Mutually exclusive with `oauth`, `ccg`, `jwt`.
80
- */
78
+ * Static developer token from the Box developer console. Useful for
79
+ * scripts and trying the adapter; production apps should use OAuth,
80
+ * CCG, or JWT instead. Mutually exclusive with `oauth`, `ccg`, `jwt`.
81
+ */
81
82
  developerToken?: string;
82
83
  /**
83
- * JWT Server Authentication, configured via the JSON blob from Box's
84
- * developer console. Mutually exclusive with the other auth modes.
85
- */
84
+ * JWT Server Authentication, configured via the JSON blob from Box's
85
+ * developer console. Mutually exclusive with the other auth modes.
86
+ */
86
87
  jwt?: BoxJwtOptions;
87
88
  /**
88
- * Configure metafiles storage. Defaults to local tmp directory.
89
- */
89
+ * Configure metafiles storage. Defaults to local tmp directory.
90
+ */
90
91
  metaStorageConfig?: LocalMetaStorageOptions;
91
92
  /**
92
- * OAuth2 user-app flow seeded with a refresh token. Mutually exclusive
93
- * with `developerToken`, `ccg`, and `jwt`.
94
- */
93
+ * OAuth2 user-app flow seeded with a refresh token. Mutually exclusive
94
+ * with `developerToken`, `ccg`, and `jwt`.
95
+ */
95
96
  oauth?: BoxOAuthOptions;
96
97
  /**
97
- * When `true`, `getReadUrl` creates (or reuses) an `open`-access shared
98
- * link instead of a short-lived signed download URL. Public shared links
99
- * may be restricted on Box Business or Enterprise plans; the adapter
100
- * surfaces Box's `access_denied_insufficient_permissions` error
101
- * unmodified in that case.
102
- */
98
+ * When `true`, `getReadUrl` creates (or reuses) an `open`-access shared
99
+ * link instead of a short-lived signed download URL. Public shared links
100
+ * may be restricted on Box Business or Enterprise plans; the adapter
101
+ * surfaces Box's `access_denied_insufficient_permissions` error
102
+ * unmodified in that case.
103
+ */
103
104
  publicByDefault?: boolean;
104
105
  /**
105
- * Logical "bucket root" — virtual keys live under this Box folder ID.
106
- * Use `"0"` (the default) to anchor at the user's root folder. The
107
- * folder must already exist; intermediate subfolders are auto-created
108
- * on upload.
109
- */
106
+ * Logical "bucket root" — virtual keys live under this Box folder ID.
107
+ * Use `"0"` (the default) to anchor at the user's root folder. The
108
+ * folder must already exist; intermediate subfolders are auto-created
109
+ * on upload.
110
+ */
110
111
  rootFolderId?: string;
111
112
  }
112
113
  /**
113
- * Box storage backend.
114
- *
115
- * Routes virtual keys onto Box folder/file IDs under `rootFolderId`. Uploads
116
- * use `uploads.uploadFile` / `uploads.uploadFileVersion` up to 50 MB and
117
- * switch to the chunked-upload session API above that threshold. Subfolders
118
- * along a key's path are auto-created on first write.
119
- *
120
- * **Auth precedence**:
121
- * 1. `client` (pre-built `BoxClient`)
122
- * 2. `developerToken` (static, from Box developer console)
123
- * 3. `oauth` (refresh-token seeded — `clientId` + `clientSecret` + `refreshToken`)
124
- * 4. `ccg` (Client Credentials Grant — `clientId` + `clientSecret` + `enterpriseId` or `userId`)
125
- * 5. `jwt` (JWT Server Auth — `configJsonString` or `configFilePath`)
126
- * 6. Env fallback: `BOX_DEVELOPER_TOKEN`
127
- *
128
- * **Limitations**:
129
- * - `metadata` is not supported on the unified API — Box exposes file metadata
130
- * via classifications and metadata templates. Use `storage.raw.fileMetadata.*`
131
- * directly if you need them.
132
- * - `cacheControl` is not supported (Box does not expose HTTP cache headers
133
- * on file content).
134
- * - `getUploadUrl` is not supported — Box uploads require a multipart `POST`
135
- * with both an `attributes` JSON part and the file bytes part, which doesn't
136
- * fit the PUT-with-raw-body presigned-URL contract.
137
- * - `responseContentDisposition` is not supported on signed download URLs.
138
- * - `write()` buffers the full part body in memory before choosing between
139
- * the simple-upload and chunked-upload paths. Each request handler runs
140
- * independently, so concurrent multi-GB writes are bounded by the host's
141
- * available memory.
142
- * - ⚠️ 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.
143
- */
114
+ * Box storage backend.
115
+ *
116
+ * Routes virtual keys onto Box folder/file IDs under `rootFolderId`. Uploads
117
+ * use `uploads.uploadFile` / `uploads.uploadFileVersion` up to 50 MB and
118
+ * switch to the chunked-upload session API above that threshold. Subfolders
119
+ * along a key's path are auto-created on first write.
120
+ *
121
+ * **Auth precedence**:
122
+ * 1. `client` (pre-built `BoxClient`)
123
+ * 2. `developerToken` (static, from Box developer console)
124
+ * 3. `oauth` (refresh-token seeded — `clientId` + `clientSecret` + `refreshToken`)
125
+ * 4. `ccg` (Client Credentials Grant — `clientId` + `clientSecret` + `enterpriseId` or `userId`)
126
+ * 5. `jwt` (JWT Server Auth — `configJsonString` or `configFilePath`)
127
+ * 6. Env fallback: `BOX_DEVELOPER_TOKEN`
128
+ *
129
+ * **Limitations**:
130
+ * - `metadata` is not supported on the unified API — Box exposes file metadata
131
+ * via classifications and metadata templates. Use `storage.raw.fileMetadata.*`
132
+ * directly if you need them.
133
+ * - `cacheControl` is not supported (Box does not expose HTTP cache headers
134
+ * on file content).
135
+ * - `getUploadUrl` is not supported — Box uploads require a multipart `POST`
136
+ * with both an `attributes` JSON part and the file bytes part, which doesn't
137
+ * fit the PUT-with-raw-body presigned-URL contract.
138
+ * - `responseContentDisposition` is not supported on signed download URLs.
139
+ * - `write()` buffers the full part body in memory before choosing between
140
+ * the simple-upload and chunked-upload paths. Each request handler runs
141
+ * independently, so concurrent multi-GB writes are bounded by the host's
142
+ * available memory.
143
+ * - ⚠️ 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.
144
+ */
144
145
  declare class BoxStorage extends BaseStorage<BoxFile> {
145
146
  static override readonly name: string;
146
147
  override checksumTypes: string[];
@@ -155,12 +156,8 @@ declare class BoxStorage extends BaseStorage<BoxFile> {
155
156
  override get raw(): BoxClient;
156
157
  create(config: FileInit, _options?: OperationOptions): Promise<BoxFile>;
157
158
  write(part: FilePart | FileQuery | BoxFile, options?: OperationOptions): Promise<BoxFile>;
158
- delete({
159
- id
160
- }: FileQuery, options?: OperationOptions): Promise<BoxFile>;
161
- get({
162
- id
163
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
159
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<BoxFile>;
160
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
164
161
  copy(name: string, destination: string, options?: OperationOptions & {
165
162
  storageClass?: string;
166
163
  }): Promise<BoxFile>;
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/BoxFile-CseIoPW1.js";import{default as r}from"../../packem_shared/BoxMetaStorage-BSn6Qfnf.js";import{default as x}from"../../packem_shared/BoxStorage-DbGqBLux.js";export{a as BoxFile,r as BoxMetaStorage,x as BoxStorage};
1
+ import{default as a}from"../../packem_shared/BoxFile-CseIoPW1.js";import{default as r}from"../../packem_shared/BoxMetaStorage-CJsyeQ63.js";import{default as x}from"../../packem_shared/BoxStorage-CmM95wi2.js";export{a as BoxFile,r as BoxMetaStorage,x as BoxStorage};