@visulima/storage 1.0.0-alpha.27 → 1.0.0-alpha.29

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 (190) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +2 -2
  3. package/dist/adapter/nuxt/module.d.ts +4 -4
  4. package/dist/adapter/nuxt/node_modules/.bin/nuxi +2 -2
  5. package/dist/adapter/nuxt/node_modules/.bin/nuxt +2 -2
  6. package/dist/ai/ai-sdk/index.d.ts +3 -3
  7. package/dist/ai/claude/index.d.ts +2 -2
  8. package/dist/ai/openai/index.d.ts +3 -3
  9. package/dist/ai/tanstack/index.d.ts +2 -2
  10. package/dist/handler/http/fetch/index.d.ts +7 -7
  11. package/dist/handler/http/fetch/index.js +1 -1
  12. package/dist/handler/http/hono/index.d.ts +4 -4
  13. package/dist/handler/http/hono/index.js +1 -1
  14. package/dist/handler/http/nextjs/index.d.ts +4 -4
  15. package/dist/handler/http/nextjs/index.js +1 -1
  16. package/dist/handler/http/node/index.d.ts +7 -7
  17. package/dist/handler/http/node/index.js +1 -1
  18. package/dist/handler/http/solid-start/index.d.ts +4 -4
  19. package/dist/handler/http/solid-start/index.js +1 -1
  20. package/dist/index.d.ts +5 -5
  21. package/dist/index.js +1 -1
  22. package/dist/packem_shared/{AwsLightMetaStorage-DHz1nf_H.js → AwsLightMetaStorage-B-iQbToR.js} +1 -1
  23. package/dist/packem_shared/AwsLightStorage-w21RxjUm.js +1 -0
  24. package/dist/packem_shared/AzureSMetaStorage-CR-lfQNQ.js +1 -0
  25. package/dist/packem_shared/AzureStorage-2kl7JDXs.js +1 -0
  26. package/dist/packem_shared/BoxMetaStorage-DLdXbZaV.js +1 -0
  27. package/dist/packem_shared/BoxStorage-BUeEJoGL.js +1 -0
  28. package/dist/packem_shared/BunS3File-D-SRiyrm.js +1 -0
  29. package/dist/packem_shared/BunS3MetaStorage-Bv_CTTMz.js +1 -0
  30. package/dist/packem_shared/BunS3Storage-WM3rF6Fw.js +1 -0
  31. package/dist/packem_shared/BunnyMetaStorage-DNMTSeoN.js +1 -0
  32. package/dist/packem_shared/BunnyStorage-D3s2fRB3.js +1 -0
  33. package/dist/packem_shared/CloudinaryFile-B5-m33eS.js +1 -0
  34. package/dist/packem_shared/CloudinaryMetaStorage-DEBk5eQy.js +1 -0
  35. package/dist/packem_shared/CloudinaryStorage-BBE2-aVz.js +1 -0
  36. package/dist/packem_shared/DiskStorage-DL0GiG6k.js +1 -0
  37. package/dist/packem_shared/{DiskStorageWithChecksum-CbXWpSOr.js → DiskStorageWithChecksum-BvUTn7O-.js} +1 -1
  38. package/dist/packem_shared/{DropboxMetaStorage-CICuUZ1n.js → DropboxMetaStorage-C6vj1QDA.js} +1 -1
  39. package/dist/packem_shared/DropboxStorage-BL3OIdE_.js +1 -0
  40. package/dist/packem_shared/{Files-B7hlJcB4.js → Files-CJh9_N-9.js} +1 -1
  41. package/dist/packem_shared/FirebaseFile-JEu3plMP.js +1 -0
  42. package/dist/packem_shared/FirebaseMetaStorage-CzyOim-J.js +1 -0
  43. package/dist/packem_shared/FirebaseStorage-lXMXy3Pm.js +2 -0
  44. package/dist/packem_shared/FtpFile-B8jaICTB.js +1 -0
  45. package/dist/packem_shared/FtpMetaStorage-1Njy0DpU.js +1 -0
  46. package/dist/packem_shared/FtpStorage-Dw94efNW.js +1 -0
  47. package/dist/packem_shared/{GCSMetaStorage-CqP9ifYB.js → GCSMetaStorage-DvRxZhmq.js} +1 -1
  48. package/dist/packem_shared/GCStorage-U4f4WsWC.js +1 -0
  49. package/dist/packem_shared/{GoogleDriveMetaStorage-rghGy3Fa.js → GoogleDriveMetaStorage-WGuUZPyx.js} +1 -1
  50. package/dist/packem_shared/GoogleDriveStorage-C0NhBBWH.js +1 -0
  51. package/dist/packem_shared/{LocalMetaStorage-B5uh1snG.js → LocalMetaStorage-QMKL7McF.js} +1 -1
  52. package/dist/packem_shared/{Multipart-7FSSy2n1.js → Multipart-CIFfQksD.js} +1 -1
  53. package/dist/packem_shared/{Multipart-DACQFsrn.js → Multipart-D9WIud9R.js} +1 -1
  54. package/dist/packem_shared/NetlifyBlobMetaStorage-ClIFdTkT.js +1 -0
  55. package/dist/packem_shared/NetlifyBlobStorage-CO89TGvF.js +1 -0
  56. package/dist/packem_shared/OneDriveMetaStorage-DS4f83X2.js +1 -0
  57. package/dist/packem_shared/OneDriveStorage-jAN46vRm.js +1 -0
  58. package/dist/packem_shared/PocketBaseFile-CkAiSBb0.js +1 -0
  59. package/dist/packem_shared/PocketBaseMetaStorage-B6utPncj.js +1 -0
  60. package/dist/packem_shared/PocketBaseStorage-DpOjOKAt.js +1 -0
  61. package/dist/packem_shared/{Rest-5NwM1xYj.js → Rest-BuD3ySAg.js} +1 -1
  62. package/dist/packem_shared/{Rest-y8Vz2Rt0.js → Rest-URrQ5FYM.js} +1 -1
  63. package/dist/packem_shared/S3Storage-n1ohEZj4.js +1 -0
  64. package/dist/packem_shared/SftpFile-CQCxZNVq.js +1 -0
  65. package/dist/packem_shared/SftpMetaStorage-DYqXwCdM.js +1 -0
  66. package/dist/packem_shared/SftpStorage-Ban-WN8v.js +1 -0
  67. package/dist/packem_shared/SharePointFile-BA6X9Sxr.js +1 -0
  68. package/dist/packem_shared/SharePointMetaStorage-DVM5-X6g.js +1 -0
  69. package/dist/packem_shared/SharePointStorage-BY90zh1c.js +1 -0
  70. package/dist/packem_shared/SupabaseMetaStorage-ivXoYVUu.js +1 -0
  71. package/dist/packem_shared/SupabaseStorage-pNbHAE1Y.js +1 -0
  72. package/dist/packem_shared/{Tus-CJMcygk7.js → Tus-Fp_hx5ug.js} +1 -1
  73. package/dist/packem_shared/{Tus-BCVAbJIi.js → Tus-TNG9HAY8.js} +1 -1
  74. package/dist/packem_shared/UploadThingMetaStorage-BvKNzgm7.js +1 -0
  75. package/dist/packem_shared/UploadThingStorage-BcmIE2dI.js +1 -0
  76. package/dist/packem_shared/{VercelBlobMetaStorage-Do9ZoKrl.js → VercelBlobMetaStorage-CwaqWucZ.js} +1 -1
  77. package/dist/packem_shared/VercelBlobStorage-C89IUiQ1.js +1 -0
  78. package/dist/packem_shared/alibaba-BJQ6ijoK.js +1 -0
  79. package/dist/packem_shared/aws-light-meta-storage-CstQBYXG.js +4 -0
  80. package/dist/packem_shared/azure-meta-storage-C4SrMtT2.js +1 -0
  81. package/dist/packem_shared/{base-handler-core-BfwZ1RS1.js → base-handler-core-BYDQditz.js} +1 -1
  82. package/dist/packem_shared/{base-handler-fetch-CLxqXTQf.js → base-handler-fetch-DWzsPkmV.js} +1 -1
  83. package/dist/packem_shared/{base-handler-node-DBZjcqsp.js → base-handler-node-Dety2rQB.js} +1 -1
  84. package/dist/packem_shared/defaultCloudStorageFileNameValidation-shIZX_7L.js +1 -0
  85. package/dist/packem_shared/disk-storage-CKAJvhcj.js +1 -0
  86. package/dist/packem_shared/{disk-storage-with-checksum.d-BQMXA4Wl.d.ts → disk-storage-with-checksum.d-mHcg2uLw.d.ts} +1 -1
  87. package/dist/packem_shared/{executors.d-UtkeCbk1.d.ts → executors.d-X4hz3zfu.d.ts} +1 -1
  88. package/dist/packem_shared/exoscale-O0HzxoDz.js +1 -0
  89. package/dist/packem_shared/filebase-D-urO4Ob.js +1 -0
  90. package/dist/packem_shared/{gcs-meta-storage-XB-UPJn6.js → gcs-meta-storage-Br_I-m9X.js} +1 -1
  91. package/dist/packem_shared/ibmCos-Rx_yku4H.js +1 -0
  92. package/dist/packem_shared/idriveE2-BFhw0Vwy.js +1 -0
  93. package/dist/packem_shared/index-B4ETk0Lu.js +5 -0
  94. package/dist/packem_shared/{index.d-DotjipuX.d.ts → index.d-C4Fivh4I.d.ts} +7 -2
  95. package/dist/packem_shared/isRetryableError-BhizNeAz.js +1 -0
  96. package/dist/packem_shared/{local-meta-storage-CT1audnK.js → local-meta-storage-Bi0mK6gD.js} +1 -1
  97. package/dist/packem_shared/{local-meta-storage.d-B5R1nswK.d.ts → local-meta-storage.d-B11vHYNm.d.ts} +1 -1
  98. package/dist/packem_shared/{media-transformer.d-DK7NJncf.d.ts → media-transformer.d-j1W9HAXw.d.ts} +2 -2
  99. package/dist/packem_shared/oracleCloud-D5T9s4JV.js +1 -0
  100. package/dist/packem_shared/ovhCloud-DCwef2fe.js +1 -0
  101. package/dist/packem_shared/posix-dirname-CiHXPPnw.js +1 -0
  102. package/dist/packem_shared/{rest-base-CCv78k7h.js → rest-base-DI7xFXr5.js} +1 -1
  103. package/dist/packem_shared/s3-base-storage-Dbexfg7p.js +1 -0
  104. package/dist/packem_shared/{s3-base-storage.d-BROGYJ4F.d.ts → s3-base-storage.d-V3N2nKCt.d.ts} +31 -22
  105. package/dist/packem_shared/scaleway-ygRXOss9.js +1 -0
  106. package/dist/packem_shared/storage-Dh0tJh7j.js +1 -0
  107. package/dist/packem_shared/{storage.d-Cr6f2lac.d.ts → storage.d-RteRC-cG.d.ts} +131 -65
  108. package/dist/packem_shared/tencent-CAcAGaIW.js +1 -0
  109. package/dist/packem_shared/{tus-base.d-4-ZfDQwl.d.ts → tus-base.d-wZsb3umJ.d.ts} +3 -3
  110. package/dist/packem_shared/{types.d-C8eSxqX9.d.ts → types.d-B5qPfCr5.d.ts} +2 -2
  111. package/dist/packem_shared/types.d-ChNXbbHG.d.ts +104 -0
  112. package/dist/packem_shared/{types.d-BgCmSE94.d.ts → types.d-DzPvh74p.d.ts} +2 -2
  113. package/dist/packem_shared/vultr-lK9L-sFk.js +1 -0
  114. package/dist/packem_shared/yandex-ZwvE77v4.js +1 -0
  115. package/dist/storage/aws/clients/index.d.ts +372 -1
  116. package/dist/storage/aws/clients/index.js +1 -1
  117. package/dist/storage/aws/index.d.ts +13 -13
  118. package/dist/storage/aws/index.js +1 -1
  119. package/dist/storage/aws-light/index.d.ts +13 -13
  120. package/dist/storage/aws-light/index.js +1 -1
  121. package/dist/storage/azure/index.d.ts +82 -14
  122. package/dist/storage/azure/index.js +1 -1
  123. package/dist/storage/box/index.d.ts +12 -9
  124. package/dist/storage/box/index.js +1 -1
  125. package/dist/storage/bun-s3/index.d.ts +200 -0
  126. package/dist/storage/bun-s3/index.js +1 -0
  127. package/dist/storage/bunny/index.d.ts +13 -10
  128. package/dist/storage/bunny/index.js +1 -1
  129. package/dist/storage/cloudinary/index.d.ts +121 -0
  130. package/dist/storage/cloudinary/index.js +1 -0
  131. package/dist/storage/dropbox/index.d.ts +13 -10
  132. package/dist/storage/dropbox/index.js +1 -1
  133. package/dist/storage/firebase/index.d.ts +192 -0
  134. package/dist/storage/firebase/index.js +1 -0
  135. package/dist/storage/ftp/index.d.ts +85 -0
  136. package/dist/storage/ftp/index.js +1 -0
  137. package/dist/storage/gcs/index.d.ts +19 -10
  138. package/dist/storage/gcs/index.js +1 -1
  139. package/dist/storage/google-drive/index.d.ts +12 -9
  140. package/dist/storage/google-drive/index.js +1 -1
  141. package/dist/storage/local/index.d.ts +3 -3
  142. package/dist/storage/local/index.js +1 -1
  143. package/dist/storage/netlify-blob/index.d.ts +15 -12
  144. package/dist/storage/netlify-blob/index.js +1 -1
  145. package/dist/storage/onedrive/index.d.ts +22 -111
  146. package/dist/storage/onedrive/index.js +1 -1
  147. package/dist/storage/pocketbase/index.d.ts +172 -0
  148. package/dist/storage/pocketbase/index.js +1 -0
  149. package/dist/storage/sftp/index.d.ts +86 -0
  150. package/dist/storage/sftp/index.js +1 -0
  151. package/dist/storage/sharepoint/index.d.ts +180 -0
  152. package/dist/storage/sharepoint/index.js +1 -0
  153. package/dist/storage/supabase/index.d.ts +14 -10
  154. package/dist/storage/supabase/index.js +1 -1
  155. package/dist/storage/uploadthing/index.d.ts +14 -10
  156. package/dist/storage/uploadthing/index.js +1 -1
  157. package/dist/storage/vercel-blob/index.d.ts +13 -10
  158. package/dist/storage/vercel-blob/index.js +1 -1
  159. package/dist/transformer/audio-transformer.d.ts +2 -2
  160. package/dist/transformer/image-transformer.d.ts +2 -2
  161. package/dist/transformer/index.d.ts +3 -3
  162. package/dist/transformer/video-transformer.d.ts +2 -2
  163. package/package.json +55 -3
  164. package/dist/packem_shared/AwsLightStorage-SH7j-myh.js +0 -1
  165. package/dist/packem_shared/AzureSMetaStorage-DV2tNjKh.js +0 -1
  166. package/dist/packem_shared/AzureStorage-BVYMFEBP.js +0 -1
  167. package/dist/packem_shared/BoxMetaStorage-BUe5Qmqe.js +0 -1
  168. package/dist/packem_shared/BoxStorage-CgC81_So.js +0 -1
  169. package/dist/packem_shared/BunnyMetaStorage-D0mT6veJ.js +0 -1
  170. package/dist/packem_shared/BunnyStorage-Bl4usdVT.js +0 -1
  171. package/dist/packem_shared/DiskStorage-B5uIDVXr.js +0 -1
  172. package/dist/packem_shared/DropboxStorage-CPjhDN5B.js +0 -1
  173. package/dist/packem_shared/GCStorage-XSBKVx90.js +0 -1
  174. package/dist/packem_shared/GoogleDriveStorage-DuB6glUk.js +0 -1
  175. package/dist/packem_shared/NetlifyBlobMetaStorage-BcRFPky8.js +0 -1
  176. package/dist/packem_shared/NetlifyBlobStorage-C4qkJv1R.js +0 -1
  177. package/dist/packem_shared/OneDriveMetaStorage-B_BkGLzW.js +0 -1
  178. package/dist/packem_shared/OneDriveStorage-Cu0cGcrh.js +0 -1
  179. package/dist/packem_shared/S3Storage-D8dopWoO.js +0 -1
  180. package/dist/packem_shared/SupabaseMetaStorage-BR1UGqnj.js +0 -1
  181. package/dist/packem_shared/SupabaseStorage-CCtMTiN5.js +0 -1
  182. package/dist/packem_shared/UploadThingMetaStorage-DyGNyaAq.js +0 -1
  183. package/dist/packem_shared/UploadThingStorage-B_fNzNFO.js +0 -1
  184. package/dist/packem_shared/VercelBlobStorage-D5zy4PPQ.js +0 -1
  185. package/dist/packem_shared/aws-light-meta-storage-TPyQwLvk.js +0 -4
  186. package/dist/packem_shared/defaultCloudStorageFileNameValidation-6URTv-Mp.js +0 -1
  187. package/dist/packem_shared/disk-storage-CbSSPnOf.js +0 -5
  188. package/dist/packem_shared/isRetryableError-B6ZS_-5I.js +0 -1
  189. package/dist/packem_shared/s3-base-storage-f_EyFAAt.js +0 -1
  190. package/dist/packem_shared/storage-CoyB2O-Y.js +0 -1
@@ -1,113 +1,15 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-Cr6f2lac.js";
2
- import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B5R1nswK.js";
1
+ import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-ChNXbbHG.js";
2
+ export { type b as OneDriveClientCredentialsAuth, type c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-ChNXbbHG.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
4
+ import { L as LocalMetaStorageOptions, M as MetaStorage, e as FileInit, O as OperationOptions, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-RteRC-cG.js";
4
5
  import { Client } from '@microsoft/microsoft-graph-client';
6
+ import 'node:stream';
5
7
  import 'node:crypto';
6
8
  import 'node:http';
7
9
  import 'lru-cache';
8
- declare class OneDriveFile extends File {
9
- driveItemId?: string;
10
- eTag?: string;
11
- webUrl?: string;
12
- }
13
10
  declare class OneDriveMetaStorage extends LocalMetaStorage<OneDriveFile> {
14
11
  constructor(config?: LocalMetaStorageOptions);
15
12
  }
16
- interface OneDriveClientCredentialsAuth {
17
- /**
18
- * Microsoft Entra (Azure AD) application (client) ID.
19
- */
20
- clientId: string;
21
- /**
22
- * Application (client) secret.
23
- */
24
- clientSecret: string;
25
- /**
26
- * Microsoft Entra tenant ID (GUID or domain name).
27
- */
28
- tenantId: string;
29
- }
30
- interface OneDriveOAuthRefreshAuth {
31
- /**
32
- * Microsoft Entra application (client) ID.
33
- */
34
- clientId: string;
35
- /**
36
- * Application client secret. Required for confidential clients (default).
37
- * Public clients may omit it if the app registration allows.
38
- */
39
- clientSecret?: string;
40
- /**
41
- * OAuth2 refresh token obtained from an interactive sign-in flow.
42
- */
43
- refreshToken: string;
44
- /**
45
- * Tenant ID — `"common"`, `"consumers"`, `"organizations"`, or a tenant
46
- * GUID/domain. Defaults to `"common"`.
47
- */
48
- tenantId?: string;
49
- }
50
- interface OneDriveStorageOptions extends BaseStorageOptions {
51
- /**
52
- * Static or dynamic access token. Pass a string for a one-shot token, or
53
- * a function returning a fresh token on each call.
54
- */
55
- accessToken?: string | (() => string | Promise<string>);
56
- /**
57
- * Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
58
- * callers that wire up their own `AuthenticationProvider` (e.g. with
59
- * `@azure/identity` or `@azure/msal-node`).
60
- */
61
- client?: Client;
62
- /**
63
- * Client-credentials auth — for app-only / daemon scenarios.
64
- * Cannot be used with `/me/drive`; you must target via `driveId`,
65
- * `siteId`, or `userId`.
66
- */
67
- clientCredentials?: OneDriveClientCredentialsAuth;
68
- /**
69
- * Timeout, in milliseconds, for polling the async-copy monitor URL.
70
- * Defaults to 60_000 (60s).
71
- */
72
- copyTimeoutMs?: number;
73
- /**
74
- * Target drive by ID. Mutually exclusive with `siteId` and `userId`.
75
- */
76
- driveId?: string;
77
- /**
78
- * Configure metafiles storage. Defaults to local tmp directory.
79
- */
80
- metaStorageConfig?: LocalMetaStorageOptions;
81
- /**
82
- * OAuth2 refresh-token auth — for delegated user scenarios. Exchanges
83
- * the refresh token at the Microsoft identity platform and caches the
84
- * resulting access token until ~60s before expiry.
85
- */
86
- oauth?: OneDriveOAuthRefreshAuth;
87
- /**
88
- * When `true`, `getReadUrl` creates an anonymous shared link with
89
- * `view` permission. Otherwise it returns the short-lived pre-authenticated
90
- * `@microsoft.graph.downloadUrl` from the item metadata.
91
- */
92
- publicByDefault?: boolean;
93
- /**
94
- * Logical "bucket root" — virtual keys live under this folder path within
95
- * the target drive. Must already exist; the adapter does not create
96
- * folders. Defaults to drive root.
97
- */
98
- rootFolderPath?: string;
99
- /**
100
- * Target a SharePoint site's default drive. Mutually exclusive with
101
- * `driveId` and `userId`.
102
- */
103
- siteId?: string;
104
- /**
105
- * Target a specific user's drive. Mutually exclusive with `driveId` and
106
- * `siteId`. Required when using `clientCredentials` auth (Graph does not
107
- * accept `/me/drive` for app-only tokens).
108
- */
109
- userId?: string;
110
- }
111
13
  /**
112
14
  * OneDrive / SharePoint storage backend (Microsoft Graph).
113
15
  *
@@ -140,6 +42,7 @@ interface OneDriveStorageOptions extends BaseStorageOptions {
140
42
  * simple `PUT :/content` and upload-session paths. For multi-GB transfers
141
43
  * prefer `getUploadUrl()` and stream chunks directly to the returned
142
44
  * upload-session URL from the client.
45
+ * - ⚠️ 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
46
  */
144
47
  declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
145
48
  static override readonly name: string;
@@ -152,17 +55,19 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
152
55
  private readonly rootFolderPath;
153
56
  constructor(config: OneDriveStorageOptions);
154
57
  override get raw(): Client;
155
- create(config: FileInit): Promise<OneDriveFile>;
156
- write(part: FilePart | FileQuery | OneDriveFile): Promise<OneDriveFile>;
58
+ create(config: FileInit, _options?: OperationOptions): Promise<OneDriveFile>;
59
+ write(part: FilePart | FileQuery | OneDriveFile, options?: OperationOptions): Promise<OneDriveFile>;
157
60
  delete({
158
61
  id
159
- }: FileQuery): Promise<OneDriveFile>;
62
+ }: FileQuery, options?: OperationOptions): Promise<OneDriveFile>;
160
63
  get({
161
64
  id
162
- }: FileQuery): Promise<FileReturn>;
163
- copy(name: string, destination: string): Promise<OneDriveFile>;
164
- move(name: string, destination: string): Promise<OneDriveFile>;
165
- override list(limit?: number): Promise<OneDriveFile[]>;
65
+ }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
66
+ copy(name: string, destination: string, options?: OperationOptions & {
67
+ storageClass?: string;
68
+ }): Promise<OneDriveFile>;
69
+ move(name: string, destination: string, options?: OperationOptions): Promise<OneDriveFile>;
70
+ override list(limit?: number, options?: OperationOptions): Promise<OneDriveFile[]>;
166
71
  override getReadUrl(key: string, options?: {
167
72
  expiresIn?: number;
168
73
  responseContentDisposition?: string;
@@ -189,4 +94,10 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
189
94
  private pollCopyMonitor;
190
95
  private internalOnComplete;
191
96
  }
192
- export { type OneDriveClientCredentialsAuth, OneDriveFile, OneDriveMetaStorage, type OneDriveOAuthRefreshAuth, OneDriveStorage, type OneDriveStorageOptions };
97
+ /**
98
+ * Builds a Microsoft Graph `Client` from the OneDrive auth options (same
99
+ * precedence as the constructor). Exposed so the SharePoint adapter can
100
+ * resolve a site/document library to a `driveId` before delegating to an
101
+ * inner `OneDriveStorage`, without duplicating the auth-building logic.
102
+ */
103
+ export { OneDriveFile, OneDriveMetaStorage, OneDriveStorage, type OneDriveStorageOptions };
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/OneDriveFile-XbVVKIJh.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-B_BkGLzW.js";import{default as i}from"../../packem_shared/OneDriveStorage-Cu0cGcrh.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
1
+ import{default as a}from"../../packem_shared/OneDriveFile-XbVVKIJh.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-DS4f83X2.js";import{default as i}from"../../packem_shared/OneDriveStorage-jAN46vRm.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
@@ -0,0 +1,172 @@
1
+ import { F as File, L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, e as FileInit, O as OperationOptions, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-RteRC-cG.js";
2
+ import 'node:stream';
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
4
+ import 'node:crypto';
5
+ import 'node:http';
6
+ import 'lru-cache';
7
+ declare class PocketBaseFile extends File {
8
+ bucket?: string;
9
+ path?: string;
10
+ publicUrl?: string;
11
+ }
12
+ declare class PocketBaseMetaStorage extends LocalMetaStorage<PocketBaseFile> {
13
+ constructor(config?: LocalMetaStorageOptions);
14
+ }
15
+ /**
16
+ * Minimal structural type for the PocketBase client used by the adapter.
17
+ * Declared locally so the package does not require `pocketbase` to be
18
+ * installed for type-checking (it is an optional peer dependency).
19
+ */
20
+ interface PocketBaseClientLike {
21
+ authStore: {
22
+ isValid: boolean;
23
+ save: (token: string, model: unknown) => void;
24
+ };
25
+ collection: (name: string) => {
26
+ authWithPassword: (email: string, password: string) => Promise<unknown>;
27
+ create: (body: unknown) => Promise<PocketBaseRecord>;
28
+ delete: (id: string) => Promise<boolean>;
29
+ getFirstListItem: (filter: string) => Promise<PocketBaseRecord>;
30
+ getList: (page: number, perPage: number) => Promise<{
31
+ items: PocketBaseRecord[];
32
+ }>;
33
+ update: (id: string, body: unknown) => Promise<PocketBaseRecord>;
34
+ };
35
+ files: {
36
+ getToken: () => Promise<string>;
37
+ getURL?: (record: PocketBaseRecord, filename: string, options?: {
38
+ token?: string;
39
+ }) => string;
40
+ getUrl?: (record: PocketBaseRecord, filename: string, options?: {
41
+ token?: string;
42
+ }) => string;
43
+ };
44
+ filter: (raw: string, parameters?: Record<string, unknown>) => string;
45
+ }
46
+ /**
47
+ * Minimal structural type for a PocketBase record. The file field holds the
48
+ * stored filename string; the key field holds the logical object key.
49
+ */
50
+ interface PocketBaseRecord {
51
+ [field: string]: unknown;
52
+ id: string;
53
+ }
54
+ interface PocketBaseStorageOptions extends BaseStorageOptions {
55
+ /**
56
+ * Superuser email used for lazy authentication. Ignored when `client` or
57
+ * `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_EMAIL`.
58
+ */
59
+ adminEmail?: string;
60
+ /**
61
+ * Superuser password used for lazy authentication. Ignored when `client`
62
+ * or `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_PASSWORD`.
63
+ */
64
+ adminPassword?: string;
65
+ /**
66
+ * Pre-saved auth token stored on the client's `authStore`. Ignored when
67
+ * `client` is supplied. Falls back to `POCKETBASE_AUTH_TOKEN`.
68
+ */
69
+ authToken?: string;
70
+ /**
71
+ * Pre-built `PocketBase` instance. Mutually exclusive with `url`. When
72
+ * supplied it is used as-is and no authentication is performed.
73
+ */
74
+ client?: PocketBaseClientLike;
75
+ /**
76
+ * Collection name backing the object store. Each record holds exactly one
77
+ * file. Required — the adapter does not create the collection.
78
+ */
79
+ collection: string;
80
+ /**
81
+ * Default expiry, in seconds, for `getReadUrl`. PocketBase file tokens are
82
+ * short-lived; a fresh token is requested per call. Defaults to 3600.
83
+ */
84
+ defaultUrlExpiresIn?: number;
85
+ /**
86
+ * File field on the collection holding the stored file. Defaults to `file`.
87
+ */
88
+ fileField?: string;
89
+ /**
90
+ * Text field on the collection holding the logical object key. Defaults
91
+ * to `key`.
92
+ */
93
+ keyField?: string;
94
+ /**
95
+ * Configure metafiles storage. Used for TUS-style resumable upload
96
+ * bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
97
+ * directory.
98
+ */
99
+ metaStorageConfig?: LocalMetaStorageOptions;
100
+ /**
101
+ * Public base URL for served files. When set, `getReadUrl` returns
102
+ * `${publicBaseUrl}/${key}` without requesting a file token.
103
+ */
104
+ publicBaseUrl?: string;
105
+ /**
106
+ * PocketBase instance URL (e.g. `https://pb.example.com`). Ignored when
107
+ * `client` is supplied. Falls back to `POCKETBASE_URL`.
108
+ */
109
+ url?: string;
110
+ }
111
+ /**
112
+ * PocketBase storage backend.
113
+ *
114
+ * PocketBase is record-based: a collection where each record holds exactly
115
+ * one file. This adapter maps the object store onto such a collection,
116
+ * keying records by a text field (`keyField`) and storing bytes in a file
117
+ * field (`fileField`). Uploads are single-shot — the part stream is buffered
118
+ * and sent as one multipart request.
119
+ * @example
120
+ * ```ts
121
+ * import { PocketBaseStorage } from "@visulima/storage/provider/pocketbase";
122
+ *
123
+ * const storage = new PocketBaseStorage({
124
+ * url: process.env.POCKETBASE_URL,
125
+ * adminEmail: process.env.POCKETBASE_ADMIN_EMAIL,
126
+ * adminPassword: process.env.POCKETBASE_ADMIN_PASSWORD,
127
+ * collection: "uploads",
128
+ * });
129
+ * ```
130
+ * @remarks
131
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
132
+ */
133
+ declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
134
+ static override readonly name: string;
135
+ override checksumTypes: string[];
136
+ protected meta: MetaStorage<PocketBaseFile>;
137
+ private readonly client;
138
+ private readonly collectionName;
139
+ private readonly defaultUrlExpiresIn;
140
+ private readonly fileField;
141
+ private readonly keyField;
142
+ private readonly publicBaseUrl?;
143
+ private ensureAuth;
144
+ constructor(config: PocketBaseStorageOptions);
145
+ override get raw(): PocketBaseClientLike;
146
+ create(config: FileInit, _options?: OperationOptions): Promise<PocketBaseFile>;
147
+ write(part: FilePart | FileQuery | PocketBaseFile, options?: OperationOptions): Promise<PocketBaseFile>;
148
+ delete({
149
+ id
150
+ }: FileQuery, options?: OperationOptions): Promise<PocketBaseFile>;
151
+ override exists({
152
+ id
153
+ }: FileQuery, options?: OperationOptions): Promise<boolean>;
154
+ get({
155
+ id
156
+ }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
157
+ copy(name: string, destination: string, options?: OperationOptions & {
158
+ storageClass?: string;
159
+ }): Promise<PocketBaseFile>;
160
+ move(name: string, destination: string, options?: OperationOptions): Promise<PocketBaseFile>;
161
+ override list(limit?: number, options?: OperationOptions): Promise<PocketBaseFile[]>;
162
+ override getReadUrl(key: string, options?: {
163
+ expiresIn?: number;
164
+ responseContentDisposition?: string;
165
+ responseContentType?: string;
166
+ }): Promise<string>;
167
+ private findRecord;
168
+ private putRecord;
169
+ private getMetaSafe;
170
+ private internalOnComplete;
171
+ }
172
+ export { PocketBaseFile, PocketBaseMetaStorage, PocketBaseStorage, type PocketBaseStorageOptions };
@@ -0,0 +1 @@
1
+ import{default as t}from"../../packem_shared/PocketBaseFile-CkAiSBb0.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-B6utPncj.js";import{default as s}from"../../packem_shared/PocketBaseStorage-DpOjOKAt.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};
@@ -0,0 +1,86 @@
1
+ import { F as File, L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, e as FileInit, O as OperationOptions, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-RteRC-cG.js";
2
+ import 'node:stream';
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
4
+ import { ConnectOptions } from 'ssh2-sftp-client';
5
+ import 'node:crypto';
6
+ import 'node:http';
7
+ import 'lru-cache';
8
+ declare class SftpFile extends File {
9
+ path?: string;
10
+ }
11
+ declare class SftpMetaStorage extends LocalMetaStorage<SftpFile> {
12
+ constructor(config?: LocalMetaStorageOptions);
13
+ }
14
+ interface SftpStorageOptions extends BaseStorageOptions {
15
+ /**
16
+ * ssh2-sftp-client connection options (`host`, `port`, `username`,
17
+ * `password`, `privateKey`, `passphrase`, …). A fresh connection is
18
+ * opened and closed around every storage operation — the underlying
19
+ * SSH channel is not safe for concurrent use, so the adapter does not
20
+ * pool connections.
21
+ */
22
+ connection: ConnectOptions;
23
+ /**
24
+ * Configure metafile storage. SFTP has no native arbitrary-metadata
25
+ * field, so upload metadata is stored as sidecar JSON on the local
26
+ * disk (defaults to the OS temp directory).
27
+ */
28
+ metaStorageConfig?: LocalMetaStorageOptions;
29
+ /**
30
+ * Logical "bucket root" — virtual keys live under this remote directory.
31
+ * The adapter creates intermediate directories on write. Leading/trailing
32
+ * slashes are normalized. Defaults to the connection's home directory.
33
+ */
34
+ rootFolderPath?: string;
35
+ }
36
+ /**
37
+ * SFTP storage backend (built on `ssh2-sftp-client`).
38
+ *
39
+ * Routes virtual keys onto remote paths under `rootFolderPath`. SFTP has no
40
+ * native metadata store, so upload metadata is kept as sidecar JSON on the
41
+ * local disk (see `SftpMetaStorage`).
42
+ *
43
+ * A fresh SFTP connection is opened and closed around every operation: the
44
+ * underlying SSH channel is not safe for concurrent use, so the adapter does
45
+ * not pool connections.
46
+ *
47
+ * **Limitations**:
48
+ * - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
49
+ * - `getReadUrl` / `getUploadUrl` are not supported — SFTP has no signed-URL concept.
50
+ */
51
+ declare class SftpStorage extends BaseStorage<SftpFile> {
52
+ static override readonly name: string;
53
+ override checksumTypes: string[];
54
+ protected meta: MetaStorage<SftpFile>;
55
+ private readonly connection;
56
+ private readonly rootFolderPath;
57
+ constructor(config: SftpStorageOptions);
58
+ create(config: FileInit, _options?: OperationOptions): Promise<SftpFile>;
59
+ write(part: FilePart | FileQuery | SftpFile, options?: OperationOptions): Promise<SftpFile>;
60
+ get({
61
+ id
62
+ }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
63
+ delete({
64
+ id
65
+ }: FileQuery, options?: OperationOptions): Promise<SftpFile>;
66
+ copy(name: string, destination: string, options?: OperationOptions & {
67
+ storageClass?: string;
68
+ }): Promise<SftpFile>;
69
+ move(name: string, destination: string, options?: OperationOptions): Promise<SftpFile>;
70
+ override list(_limit?: number, options?: OperationOptions): Promise<SftpFile[]>;
71
+ override exists({
72
+ id
73
+ }: FileQuery, options?: OperationOptions): Promise<boolean>;
74
+ private walkList;
75
+ /**
76
+ * Opens a fresh single-session SFTP connection for one operation.
77
+ * `ssh2-sftp-client` has no `AbortSignal` hook, so cancellation is
78
+ * best-effort: an abort ends the SSH channel via `client.end()`, which
79
+ * rejects any in-flight transfer. The rejection is normalized to an
80
+ * `AbortError`.
81
+ */
82
+ private run;
83
+ private keyToPath;
84
+ private pathToKey;
85
+ }
86
+ export { SftpFile, SftpMetaStorage, SftpStorage, type SftpStorageOptions };
@@ -0,0 +1 @@
1
+ import{default as a}from"../../packem_shared/SftpFile-CQCxZNVq.js";import{default as o}from"../../packem_shared/SftpMetaStorage-DYqXwCdM.js";import{default as p}from"../../packem_shared/SftpStorage-Ban-WN8v.js";export{a as SftpFile,o as SftpMetaStorage,p as SftpStorage};
@@ -0,0 +1,180 @@
1
+ import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-ChNXbbHG.js";
2
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
3
+ import { L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, e as FileInit, O as OperationOptions, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-RteRC-cG.js";
4
+ import { Readable } from 'node:stream';
5
+ import { Client } from '@microsoft/microsoft-graph-client';
6
+ import 'node:crypto';
7
+ import 'node:http';
8
+ import 'lru-cache';
9
+ declare class SharePointFile extends OneDriveFile {}
10
+ declare class SharePointMetaStorage extends LocalMetaStorage<SharePointFile> {
11
+ constructor(config?: LocalMetaStorageOptions);
12
+ }
13
+ /**
14
+ * Options for the SharePoint storage backend.
15
+ *
16
+ * A SharePoint document library is a Microsoft Graph drive. This adapter
17
+ * resolves a site + document library down to a `driveId` and then delegates
18
+ * every storage operation to an internal {@link OneDriveStorage}.
19
+ *
20
+ * **Site targeting** (resolved in this order):
21
+ * 1. `driveId` (env `SHAREPOINT_DRIVE_ID`) — short-circuits site resolution.
22
+ * 2. `siteId` (env `SHAREPOINT_SITE_ID`).
23
+ * 3. `siteUrl` (env `SHAREPOINT_SITE_URL`) — parsed into hostname + path.
24
+ * 4. `hostname` (env `SHAREPOINT_HOSTNAME`) + `sitePath`.
25
+ *
26
+ * Once the site is known, `documentLibrary` selects a specific drive from the
27
+ * site's drive list by display name; otherwise the site's default drive is
28
+ * used.
29
+ *
30
+ * **Auth** mirrors {@link OneDriveStorageOptions}. Env fallbacks resolve the
31
+ * `SHAREPOINT_*` variables first and then the matching `ONEDRIVE_*`
32
+ * variables.
33
+ */
34
+ interface SharePointStorageOptions extends BaseStorageOptions {
35
+ /**
36
+ * Static or dynamic access token. Pass a string for a one-shot token, or
37
+ * a function returning a fresh token on each call.
38
+ */
39
+ accessToken?: string | (() => string | Promise<string>);
40
+ /**
41
+ * Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
42
+ * callers that wire up their own `AuthenticationProvider` and also used to
43
+ * resolve the site/library when site targeting is required.
44
+ */
45
+ client?: Client;
46
+ /**
47
+ * Client-credentials auth — for app-only / daemon scenarios. Same shape as
48
+ * {@link OneDriveStorageOptions.clientCredentials}.
49
+ */
50
+ clientCredentials?: OneDriveStorageOptions["clientCredentials"];
51
+ /**
52
+ * Timeout, in milliseconds, for polling the async-copy monitor URL.
53
+ * Defaults to 60_000 (60s).
54
+ */
55
+ copyTimeoutMs?: number;
56
+ /**
57
+ * Display name of the document library (drive) to target within the
58
+ * resolved site. When omitted, the site's default drive is used.
59
+ */
60
+ documentLibrary?: string;
61
+ /**
62
+ * Target drive (document library) by ID. Short-circuits site resolution.
63
+ * Env fallback: `SHAREPOINT_DRIVE_ID`.
64
+ */
65
+ driveId?: string;
66
+ /**
67
+ * SharePoint host name (e.g. `contoso.sharepoint.com`). Combined with
68
+ * `sitePath` to resolve the site. Env fallback: `SHAREPOINT_HOSTNAME`.
69
+ */
70
+ hostname?: string;
71
+ /**
72
+ * Configure metafiles storage. Defaults to local tmp directory.
73
+ */
74
+ metaStorageConfig?: LocalMetaStorageOptions;
75
+ /**
76
+ * OAuth2 refresh-token auth — for delegated user scenarios. Same shape as
77
+ * {@link OneDriveStorageOptions.oauth}.
78
+ */
79
+ oauth?: OneDriveStorageOptions["oauth"];
80
+ /**
81
+ * When `true`, `getReadUrl` creates an anonymous shared link with `view`
82
+ * permission. Otherwise it returns the short-lived pre-authenticated
83
+ * `@microsoft.graph.downloadUrl` from the item metadata.
84
+ */
85
+ publicByDefault?: boolean;
86
+ /**
87
+ * Logical "bucket root" — virtual keys live under this folder path within
88
+ * the target drive. Must already exist. Defaults to drive root.
89
+ */
90
+ rootFolderPath?: string;
91
+ /**
92
+ * Target a SharePoint site by its Graph site ID. Env fallback:
93
+ * `SHAREPOINT_SITE_ID`.
94
+ */
95
+ siteId?: string;
96
+ /**
97
+ * Server-relative site path (e.g. `/sites/Marketing`). Combined with
98
+ * `hostname` to resolve the site.
99
+ */
100
+ sitePath?: string;
101
+ /**
102
+ * Full SharePoint site URL (e.g.
103
+ * `https://contoso.sharepoint.com/sites/Marketing`). Parsed into a host
104
+ * name + server-relative path. Env fallback: `SHAREPOINT_SITE_URL`.
105
+ */
106
+ siteUrl?: string;
107
+ }
108
+ /**
109
+ * SharePoint document-library storage backend (Microsoft Graph).
110
+ *
111
+ * A SharePoint document library is a Microsoft Graph drive. This adapter
112
+ * resolves a site + document library to a `driveId` and then delegates every
113
+ * storage operation to an internal {@link OneDriveStorage}. No Graph upload
114
+ * logic is reimplemented here.
115
+ *
116
+ * Site resolution is lazy: the Graph client is built eagerly (so auth errors
117
+ * surface at construction) but the site/library → `driveId` lookup runs on the
118
+ * first storage operation, because resolution is async and constructors cannot
119
+ * be.
120
+ * @example
121
+ * ```ts
122
+ * import { SharePointStorage } from "@visulima/storage/provider/sharepoint";
123
+ *
124
+ * const storage = new SharePointStorage({
125
+ * siteUrl: "https://contoso.sharepoint.com/sites/Marketing",
126
+ * documentLibrary: "Documents",
127
+ * clientCredentials: { tenantId, clientId, clientSecret },
128
+ * });
129
+ * ```
130
+ * @remarks
131
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
132
+ */
133
+ declare class SharePointStorage extends BaseStorage<SharePointFile> {
134
+ static override readonly name: string;
135
+ override checksumTypes: string[];
136
+ protected meta: MetaStorage<SharePointFile>;
137
+ private readonly client;
138
+ private inner?;
139
+ private innerPromise?;
140
+ private readonly oneDriveAuth;
141
+ private readonly resolvedConfig;
142
+ constructor(config: SharePointStorageOptions);
143
+ override get raw(): Client;
144
+ create(config: FileInit, options?: OperationOptions): Promise<SharePointFile>;
145
+ write(part: FilePart | FileQuery | SharePointFile, options?: OperationOptions): Promise<SharePointFile>;
146
+ delete(query: FileQuery, options?: OperationOptions): Promise<SharePointFile>;
147
+ get(query: FileQuery, options?: OperationOptions): Promise<FileReturn>;
148
+ copy(name: string, destination: string, options?: OperationOptions & {
149
+ storageClass?: string;
150
+ }): Promise<SharePointFile>;
151
+ move(name: string, destination: string, options?: OperationOptions): Promise<SharePointFile>;
152
+ override exists(query: FileQuery, _options?: OperationOptions): Promise<boolean>;
153
+ override list(limit?: number, options?: OperationOptions): Promise<SharePointFile[]>;
154
+ override update(query: FileQuery, metadata: Partial<SharePointFile>, _options?: OperationOptions): Promise<SharePointFile>;
155
+ override getStream(query: FileQuery, _options?: OperationOptions): Promise<{
156
+ headers?: Record<string, string>;
157
+ size?: number;
158
+ stream: Readable;
159
+ }>;
160
+ override getReadUrl(key: string, options?: {
161
+ expiresIn?: number;
162
+ responseContentDisposition?: string;
163
+ responseContentType?: string;
164
+ }): Promise<string>;
165
+ override getUploadUrl(key: string, options?: {
166
+ contentLength?: number;
167
+ contentType?: string;
168
+ expiresIn?: number;
169
+ }): Promise<string>;
170
+ /**
171
+ * Resolve the target document library to a `driveId` and construct the
172
+ * internal {@link OneDriveStorage}. Memoized so resolution runs at most
173
+ * once.
174
+ */
175
+ private getInner;
176
+ private buildInner;
177
+ private resolveDriveId;
178
+ private resolveSiteId;
179
+ }
180
+ export { SharePointFile, SharePointMetaStorage, SharePointStorage, type SharePointStorageOptions };
@@ -0,0 +1 @@
1
+ import{default as t}from"../../packem_shared/SharePointFile-BA6X9Sxr.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-DVM5-X6g.js";import{default as S}from"../../packem_shared/SharePointStorage-BY90zh1c.js";export{t as SharePointFile,r as SharePointMetaStorage,S as SharePointStorage};
@@ -1,6 +1,6 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-Cr6f2lac.js";
1
+ import { F as File, L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, e as FileInit, O as OperationOptions, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-RteRC-cG.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B5R1nswK.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
4
4
  import { StorageClient } from '@supabase/storage-js';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -71,6 +71,8 @@ interface SupabaseStorageOptions extends BaseStorageOptions {
71
71
  * bucket: "avatars",
72
72
  * });
73
73
  * ```
74
+ * @remarks
75
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
74
76
  */
75
77
  declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
76
78
  static override readonly name: string;
@@ -81,20 +83,22 @@ declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
81
83
  private readonly storageClient;
82
84
  constructor(config: SupabaseStorageOptions);
83
85
  override get raw(): StorageClient;
84
- create(config: FileInit): Promise<SupabaseFile>;
85
- write(part: FilePart | FileQuery | SupabaseFile): Promise<SupabaseFile>;
86
+ create(config: FileInit, _options?: OperationOptions): Promise<SupabaseFile>;
87
+ write(part: FilePart | FileQuery | SupabaseFile, options?: OperationOptions): Promise<SupabaseFile>;
86
88
  delete({
87
89
  id
88
- }: FileQuery): Promise<SupabaseFile>;
90
+ }: FileQuery, options?: OperationOptions): Promise<SupabaseFile>;
89
91
  override exists({
90
92
  id
91
- }: FileQuery): Promise<boolean>;
93
+ }: FileQuery, options?: OperationOptions): Promise<boolean>;
92
94
  get({
93
95
  id
94
- }: FileQuery): Promise<FileReturn>;
95
- copy(name: string, destination: string): Promise<SupabaseFile>;
96
- move(name: string, destination: string): Promise<SupabaseFile>;
97
- override list(limit?: number): Promise<SupabaseFile[]>;
96
+ }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
97
+ copy(name: string, destination: string, options?: OperationOptions & {
98
+ storageClass?: string;
99
+ }): Promise<SupabaseFile>;
100
+ move(name: string, destination: string, options?: OperationOptions): Promise<SupabaseFile>;
101
+ override list(limit?: number, options?: OperationOptions): Promise<SupabaseFile[]>;
98
102
  override getReadUrl(key: string, options?: {
99
103
  expiresIn?: number;
100
104
  responseContentDisposition?: string;
@@ -1 +1 @@
1
- import{default as t}from"../../packem_shared/SupabaseFile-DZ1iv9gM.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-BR1UGqnj.js";import{default as p}from"../../packem_shared/SupabaseStorage-CCtMTiN5.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};
1
+ import{default as t}from"../../packem_shared/SupabaseFile-DZ1iv9gM.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-ivXoYVUu.js";import{default as p}from"../../packem_shared/SupabaseStorage-pNbHAE1Y.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};