@visulima/storage 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/adapter/nuxt/module.d.ts +8 -8
  3. package/dist/ai/ai-sdk/index.d.ts +51 -59
  4. package/dist/ai/claude/index.d.ts +104 -119
  5. package/dist/ai/openai/index.d.ts +86 -99
  6. package/dist/ai/tanstack/index.d.ts +53 -61
  7. package/dist/handler/http/fetch/index.d.ts +201 -201
  8. package/dist/handler/http/hono/index.d.ts +59 -59
  9. package/dist/handler/http/nextjs/index.d.ts +54 -54
  10. package/dist/handler/http/node/index.d.ts +233 -246
  11. package/dist/handler/http/solid-start/index.d.ts +54 -54
  12. package/dist/index.d.ts +70 -70
  13. package/dist/index.js +1 -1
  14. package/dist/packem_shared/{AwsLightStorage-BK-WPL0h.js → AwsLightStorage-EsqkAtU5.js} +1 -1
  15. package/dist/packem_shared/{AzureStorage-1UvDIQZd.js → AzureStorage-DL-U7qFG.js} +1 -1
  16. package/dist/packem_shared/BoxMetaStorage-CHWrhgg2.js +1 -0
  17. package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-B8_oCz27.js} +1 -1
  18. package/dist/packem_shared/BunS3MetaStorage-CHWrhgg2.js +1 -0
  19. package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-_PVXu_na.js} +1 -1
  20. package/dist/packem_shared/BunnyMetaStorage-CHWrhgg2.js +1 -0
  21. package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-BsoWjScH.js} +1 -1
  22. package/dist/packem_shared/CloudinaryMetaStorage-BI9YXcwU.js +1 -0
  23. package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-BNwiLF9V.js} +1 -1
  24. package/dist/packem_shared/{DiskStorage-CI07TVNu.js → DiskStorage-D-NtQDms.js} +1 -1
  25. package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-UnCtyEvs.js} +1 -1
  26. package/dist/packem_shared/DropboxMetaStorage-CHWrhgg2.js +1 -0
  27. package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BS9kj0nH.js} +1 -1
  28. package/dist/packem_shared/FirebaseMetaStorage-BI9YXcwU.js +1 -0
  29. package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-DNquii2p.js} +1 -1
  30. package/dist/packem_shared/FtpMetaStorage-CHWrhgg2.js +1 -0
  31. package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-Bd004--s.js} +1 -1
  32. package/dist/packem_shared/{GCSMetaStorage-C8dxa9A7.js → GCSMetaStorage-Bf4qDFB1.js} +1 -1
  33. package/dist/packem_shared/{GCStorage-DE-XFSBe.js → GCStorage-ChqEpgqR.js} +1 -1
  34. package/dist/packem_shared/GoogleDriveMetaStorage-xlHfKwmR.js +1 -0
  35. package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-v1glykjd.js} +1 -1
  36. package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-YWPBYEe7.js} +1 -1
  37. package/dist/packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js +1 -0
  38. package/dist/packem_shared/{NetlifyBlobStorage-CkpCCoN1.js → NetlifyBlobStorage-BPyEWSnx.js} +1 -1
  39. package/dist/packem_shared/OneDriveMetaStorage-xlHfKwmR.js +1 -0
  40. package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-BJ3Kzxc5.js} +1 -1
  41. package/dist/packem_shared/PocketBaseMetaStorage-DnrxOQhO.js +1 -0
  42. package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-DqKHbbvn.js} +1 -1
  43. package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-BiI2k6d1.js} +1 -1
  44. package/dist/packem_shared/SftpMetaStorage-CHWrhgg2.js +1 -0
  45. package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-w8XdtZtw.js} +1 -1
  46. package/dist/packem_shared/SharePointMetaStorage-CHWrhgg2.js +1 -0
  47. package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-DpDpI7Ln.js} +1 -1
  48. package/dist/packem_shared/SupabaseMetaStorage-xlHfKwmR.js +1 -0
  49. package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-B_ugUCs7.js} +1 -1
  50. package/dist/packem_shared/UploadThingMetaStorage-BI9YXcwU.js +1 -0
  51. package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-_H45IVqX.js} +1 -1
  52. package/dist/packem_shared/VercelBlobMetaStorage-CHWrhgg2.js +1 -0
  53. package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-U1YMKeHs.js} +1 -1
  54. package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
  55. package/dist/packem_shared/disk-storage-BwPk2IRa.js +1 -0
  56. package/dist/packem_shared/disk-storage-with-checksum.d-CQucFacO.d.ts +146 -0
  57. package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-DeDH3Ilt.d.ts} +2 -2
  58. package/dist/packem_shared/files.d-D8H_ge9Y.d.ts +655 -0
  59. package/dist/packem_shared/{gcs-meta-storage-DpkPEXso.js → gcs-meta-storage-DQGu_cHq.js} +1 -1
  60. package/dist/packem_shared/local-meta-storage-DJDcuxf1.js +11 -0
  61. package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-DuTEzyii.d.ts} +7 -7
  62. package/dist/packem_shared/media-transformer.d-CvMFjINm.d.ts +331 -0
  63. package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BRdTiY8y.d.ts} +32 -40
  64. package/dist/packem_shared/{s3-base-storage-BoTyhuzO.js → s3-base-storage-CMUui93V.js} +1 -1
  65. package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-Cg7m4FuH.d.ts} +64 -70
  66. package/dist/packem_shared/storage.d-DIav_lF1.d.ts +1163 -0
  67. package/dist/packem_shared/tus-base.d-BiEg5t4t.d.ts +102 -0
  68. package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-CAAzKiI6.d.ts} +134 -134
  69. package/dist/packem_shared/types.d-DgHhkCAl.d.ts +104 -0
  70. package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-jAs_Rp_v.d.ts} +3 -3
  71. package/dist/storage/aws/clients/index.d.ts +388 -388
  72. package/dist/storage/aws/index.d.ts +109 -113
  73. package/dist/storage/aws/index.js +1 -1
  74. package/dist/storage/aws-light/index.d.ts +63 -67
  75. package/dist/storage/aws-light/index.js +1 -1
  76. package/dist/storage/azure/index.d.ts +133 -139
  77. package/dist/storage/azure/index.js +1 -1
  78. package/dist/storage/box/index.d.ts +88 -92
  79. package/dist/storage/box/index.js +1 -1
  80. package/dist/storage/bun-s3/index.d.ts +70 -76
  81. package/dist/storage/bun-s3/index.js +1 -1
  82. package/dist/storage/bunny/index.d.ts +51 -55
  83. package/dist/storage/bunny/index.js +1 -1
  84. package/dist/storage/cloudinary/index.d.ts +53 -59
  85. package/dist/storage/cloudinary/index.js +1 -1
  86. package/dist/storage/dropbox/index.d.ts +58 -62
  87. package/dist/storage/dropbox/index.js +1 -1
  88. package/dist/storage/firebase/index.d.ts +73 -79
  89. package/dist/storage/firebase/index.js +1 -1
  90. package/dist/storage/ftp/index.d.ts +37 -43
  91. package/dist/storage/ftp/index.js +1 -1
  92. package/dist/storage/gcs/index.d.ts +89 -95
  93. package/dist/storage/gcs/index.js +1 -1
  94. package/dist/storage/google-drive/index.d.ts +68 -72
  95. package/dist/storage/google-drive/index.js +1 -1
  96. package/dist/storage/local/index.d.ts +3 -3
  97. package/dist/storage/local/index.js +1 -1
  98. package/dist/storage/memory/index.d.ts +2 -2
  99. package/dist/storage/netlify-blob/index.d.ts +85 -93
  100. package/dist/storage/netlify-blob/index.js +1 -1
  101. package/dist/storage/onedrive/index.d.ts +43 -53
  102. package/dist/storage/onedrive/index.js +1 -1
  103. package/dist/storage/pocketbase/index.d.ts +66 -72
  104. package/dist/storage/pocketbase/index.js +1 -1
  105. package/dist/storage/sftp/index.d.ts +39 -45
  106. package/dist/storage/sftp/index.js +1 -1
  107. package/dist/storage/sharepoint/index.d.ts +95 -95
  108. package/dist/storage/sharepoint/index.js +1 -1
  109. package/dist/storage/supabase/index.d.ts +49 -55
  110. package/dist/storage/supabase/index.js +1 -1
  111. package/dist/storage/uploadthing/index.d.ts +33 -37
  112. package/dist/storage/uploadthing/index.js +1 -1
  113. package/dist/storage/vercel-blob/index.d.ts +109 -115
  114. package/dist/storage/vercel-blob/index.js +1 -1
  115. package/dist/transformer/audio-transformer.d.ts +96 -96
  116. package/dist/transformer/image-transformer.d.ts +422 -422
  117. package/dist/transformer/index.d.ts +34 -34
  118. package/dist/transformer/video-transformer.d.ts +111 -111
  119. package/package.json +1 -1
  120. package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
  121. package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
  122. package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
  123. package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
  124. package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
  125. package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
  126. package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
  127. package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
  128. package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
  129. package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
  130. package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
  131. package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
  132. package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
  133. package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
  134. package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
  135. package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
  136. package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
  137. package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
  138. package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
  139. package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
  140. package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
  141. package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
  142. package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
  143. package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
@@ -1,18 +1,18 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, R as RetryConfig, 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, R as RetryConfig, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
4
4
  import { getStore } from '@netlify/blobs';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
7
7
  import 'lru-cache';
8
8
  declare class NetlifyBlobFile extends File {
9
9
  /**
10
- * The blob's public URL
11
- */
10
+ * The blob's public URL
11
+ */
12
12
  url?: string;
13
13
  /**
14
- * The blob's pathname within the store
15
- */
14
+ * The blob's pathname within the store
15
+ */
16
16
  pathname?: string;
17
17
  }
18
18
  declare class NetlifyBlobMetaStorage extends LocalMetaStorage {
@@ -20,50 +20,50 @@ declare class NetlifyBlobMetaStorage extends LocalMetaStorage {
20
20
  }
21
21
  interface NetlifyBlobStorageOptions extends BaseStorageOptions {
22
22
  /**
23
- * Configure metafiles storage
24
- * @example
25
- * Using local metafiles
26
- * ```ts
27
- * const storage = new NetlifyBlobStorage({
28
- * storeName: 'uploads',
29
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
30
- * })
31
- * ```
32
- */
23
+ * Configure metafiles storage
24
+ * @example
25
+ * Using local metafiles
26
+ * ```ts
27
+ * const storage = new NetlifyBlobStorage({
28
+ * storeName: 'uploads',
29
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
30
+ * })
31
+ * ```
32
+ */
33
33
  metaStorageConfig?: LocalMetaStorageOptions;
34
34
  /**
35
- * Netlify site ID (optional, used for explicit store access)
36
- */
35
+ * Netlify site ID (optional, used for explicit store access)
36
+ */
37
37
  siteID?: string;
38
38
  /**
39
- * Netlify Blob store name
40
- * @default 'default'
41
- */
39
+ * Netlify Blob store name
40
+ * @default 'default'
41
+ */
42
42
  storeName?: string;
43
43
  /**
44
- * Netlify API token (optional, can use environment variable NETLIFY_TOKEN)
45
- */
44
+ * Netlify API token (optional, can use environment variable NETLIFY_TOKEN)
45
+ */
46
46
  token?: string;
47
47
  }
48
48
  /**
49
- * Netlify Blob storage based backend.
50
- * @example
51
- * ```ts
52
- * const storage = new NetlifyBlobStorage({
53
- * storeName: 'uploads',
54
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
55
- * });
56
- * ```
57
- * @remarks
58
- * ## Supported Operations
59
- * - ✅ create, write, delete, get, list, copy, move
60
- * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
61
- * - ✅ exists: Implemented (checks metadata and Netlify Blob)
62
- * - ✅ update: Implemented (updates metadata file, Netlify Blob API doesn't support blob metadata updates)
63
- * - ❌ getStream: Not implemented (use get() for file retrieval)
64
- * - ❌ getUrl: Not implemented (Netlify Blob URLs available via Netlify Blob API)
65
- * - ❌ getUploadUrl: Not implemented (Netlify Blob upload URLs handled internally)
66
- */
49
+ * Netlify Blob storage based backend.
50
+ * @example
51
+ * ```ts
52
+ * const storage = new NetlifyBlobStorage({
53
+ * storeName: 'uploads',
54
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
55
+ * });
56
+ * ```
57
+ * @remarks
58
+ * ## Supported Operations
59
+ * - ✅ create, write, delete, get, list, copy, move
60
+ * - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
61
+ * - ✅ exists: Implemented (checks metadata and Netlify Blob)
62
+ * - ✅ update: Implemented (updates metadata file, Netlify Blob API doesn't support blob metadata updates)
63
+ * - ❌ getStream: Not implemented (use get() for file retrieval)
64
+ * - ❌ getUrl: Not implemented (Netlify Blob URLs available via Netlify Blob API)
65
+ * - ❌ getUploadUrl: Not implemented (Netlify Blob upload URLs handled internally)
66
+ */
67
67
  declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
68
68
  static override readonly name: string;
69
69
  override checksumTypes: string[];
@@ -79,69 +79,61 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
79
79
  create(config: FileInit, _options?: OperationOptions): Promise<NetlifyBlobFile>;
80
80
  write(part: FilePart | FileQuery | NetlifyBlobFile, options?: OperationOptions): Promise<NetlifyBlobFile>;
81
81
  /**
82
- * Deletes an upload and its metadata.
83
- * @param query File query containing the file ID to delete.
84
- * @param query.id File ID to delete.
85
- * @returns Promise resolving to the deleted file object with status: "deleted".
86
- * @throws {UploadError} If the file metadata cannot be found.
87
- */
88
- delete({
89
- id
90
- }: FileQuery, options?: OperationOptions): Promise<NetlifyBlobFile>;
82
+ * Deletes an upload and its metadata.
83
+ * @param query File query containing the file ID to delete.
84
+ * @param query.id File ID to delete.
85
+ * @returns Promise resolving to the deleted file object with status: "deleted".
86
+ * @throws {UploadError} If the file metadata cannot be found.
87
+ */
88
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<NetlifyBlobFile>;
91
89
  /**
92
- * Checks if a file exists by verifying both metadata and the actual Netlify Blob.
93
- * Returns true only if both the metadata and the blob exist.
94
- * @param query File query containing the file ID to check.
95
- * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
96
- */
97
- override exists({
98
- id
99
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
100
- get({
101
- id
102
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
90
+ * Checks if a file exists by verifying both metadata and the actual Netlify Blob.
91
+ * Returns true only if both the metadata and the blob exist.
92
+ * @param query File query containing the file ID to check.
93
+ * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
94
+ */
95
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
96
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
103
97
  /**
104
- * Copies an upload file to a new location.
105
- * @param name Source file name/ID.
106
- * @param destination Destination file name/ID.
107
- * @returns Promise resolving to the copied file object.
108
- * @throws {UploadError} If the source file cannot be found.
109
- */
98
+ * Copies an upload file to a new location.
99
+ * @param name Source file name/ID.
100
+ * @param destination Destination file name/ID.
101
+ * @returns Promise resolving to the copied file object.
102
+ * @throws {UploadError} If the source file cannot be found.
103
+ */
110
104
  copy(name: string, destination: string, options?: OperationOptions & {
111
105
  storageClass?: string;
112
106
  }): Promise<NetlifyBlobFile>;
113
107
  /**
114
- * Moves an upload file to a new location.
115
- * @param name Source file name/ID.
116
- * @param destination Destination file name/ID.
117
- * @returns Promise resolving to the moved file object.
118
- * @throws {UploadError} If the source file cannot be found.
119
- */
108
+ * Moves an upload file to a new location.
109
+ * @param name Source file name/ID.
110
+ * @param destination Destination file name/ID.
111
+ * @returns Promise resolving to the moved file object.
112
+ * @throws {UploadError} If the source file cannot be found.
113
+ */
120
114
  move(name: string, destination: string, options?: OperationOptions): Promise<NetlifyBlobFile>;
121
115
  /**
122
- * Updates file metadata with user-provided key-value pairs.
123
- * Updates the metadata file (overwrites it) but does not update Netlify Blob metadata
124
- * since the Netlify Blob API doesn't support metadata updates.
125
- * @param query File query containing the file ID to update.
126
- * @param query.id File ID to update.
127
- * @param metadata Partial file object containing fields to update.
128
- * @returns Promise resolving to the updated file object.
129
- * @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND).
130
- * @remarks
131
- * Supports TTL (time-to-live) option: if metadata contains a 'ttl' field,
132
- * it will be converted to an 'expiredAt' timestamp.
133
- * TTL can be a number (milliseconds) or string (e.g., "1h", "30m", "7d").
134
- */
135
- override update({
136
- id
137
- }: FileQuery, metadata: Partial<NetlifyBlobFile>, _options?: OperationOptions): Promise<NetlifyBlobFile>;
116
+ * Updates file metadata with user-provided key-value pairs.
117
+ * Updates the metadata file (overwrites it) but does not update Netlify Blob metadata
118
+ * since the Netlify Blob API doesn't support metadata updates.
119
+ * @param query File query containing the file ID to update.
120
+ * @param query.id File ID to update.
121
+ * @param metadata Partial file object containing fields to update.
122
+ * @returns Promise resolving to the updated file object.
123
+ * @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND).
124
+ * @remarks
125
+ * Supports TTL (time-to-live) option: if metadata contains a 'ttl' field,
126
+ * it will be converted to an 'expiredAt' timestamp.
127
+ * TTL can be a number (milliseconds) or string (e.g., "1h", "30m", "7d").
128
+ */
129
+ override update({ id }: FileQuery, metadata: Partial<NetlifyBlobFile>, _options?: OperationOptions): Promise<NetlifyBlobFile>;
138
130
  override list(limit?: number, options?: OperationOptions): Promise<NetlifyBlobFile[]>;
139
131
  private internalOnComplete;
140
132
  /**
141
- * Generate a URL for a blob in Netlify Blob store
142
- * Note: Netlify Blob doesn't provide direct public URLs like Vercel Blob
143
- * In production, you would typically serve these through Netlify Functions or Edge Functions
144
- */
133
+ * Generate a URL for a blob in Netlify Blob store
134
+ * Note: Netlify Blob doesn't provide direct public URLs like Vercel Blob
135
+ * In production, you would typically serve these through Netlify Functions or Edge Functions
136
+ */
145
137
  private getBlobUrl;
146
138
  }
147
139
  export { NetlifyBlobFile, NetlifyBlobMetaStorage, NetlifyBlobStorage, type NetlifyBlobStorageOptions };
@@ -1 +1 @@
1
- import{default as o}from"../../packem_shared/NetlifyBlobFile-DoFhkzaH.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js";import{default as r}from"../../packem_shared/NetlifyBlobStorage-CkpCCoN1.js";export{o as NetlifyBlobFile,a as NetlifyBlobMetaStorage,r as NetlifyBlobStorage};
1
+ import{default as o}from"../../packem_shared/NetlifyBlobFile-DoFhkzaH.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js";import{default as r}from"../../packem_shared/NetlifyBlobStorage-BPyEWSnx.js";export{o as NetlifyBlobFile,a as NetlifyBlobMetaStorage,r as NetlifyBlobStorage};
@@ -1,7 +1,7 @@
1
- import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-Bon9GVVe.js";
2
- export type { b as OneDriveClientCredentialsAuth, c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-Bon9GVVe.js";
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
4
- import { L as LocalMetaStorageOptions, 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 { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-DgHhkCAl.js";
2
+ export type { b as OneDriveClientCredentialsAuth, c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-DgHhkCAl.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
4
+ import { L as LocalMetaStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
5
5
  import { Client } from '@microsoft/microsoft-graph-client';
6
6
  import 'node:stream';
7
7
  import 'node:crypto';
@@ -11,39 +11,39 @@ declare class OneDriveMetaStorage extends LocalMetaStorage<OneDriveFile> {
11
11
  constructor(config?: LocalMetaStorageOptions);
12
12
  }
13
13
  /**
14
- * OneDrive / SharePoint storage backend (Microsoft Graph).
15
- *
16
- * Routes virtual keys onto items under `rootFolderPath` in the target drive.
17
- * Uploads use a single `PUT :/content` request up to 250 MB and switch to
18
- * Microsoft Graph upload sessions above that threshold.
19
- *
20
- * **Auth precedence**:
21
- * 1. `client` (pre-built `@microsoft/microsoft-graph-client` `Client`)
22
- * 2. `accessToken` (string or `() => string | Promise&lt;string>`)
23
- * 3. `clientCredentials` (`tenantId` + `clientId` + `clientSecret`) — app-only
24
- * 4. `oauth` (`refreshToken` + `clientId` [+ `clientSecret`, `tenantId`]) — delegated
25
- * 5. Env fallback: `ONEDRIVE_ACCESS_TOKEN`; or `ONEDRIVE_REFRESH_TOKEN` +
26
- * `ONEDRIVE_CLIENT_ID` (+ optional `ONEDRIVE_CLIENT_SECRET`, `ONEDRIVE_TENANT_ID`);
27
- * or `ONEDRIVE_CLIENT_ID` + `ONEDRIVE_CLIENT_SECRET` + `ONEDRIVE_TENANT_ID`.
28
- *
29
- * **Targeting**: at most one of `driveId`, `siteId`, `userId`. With no
30
- * targeting and delegated auth, defaults to `/me/drive`. App-only auth
31
- * (`clientCredentials`) cannot use `/me/drive` — pick a target explicitly.
32
- *
33
- * **Limitations**:
34
- * - `cacheControl` is not supported.
35
- * - `metadata` is preserved via the local metafile only; Graph does not store
36
- * arbitrary key/value metadata on `driveItem`.
37
- * - `getUploadUrl` returns an upload-session URL — clients should `PUT` chunks
38
- * directly to it with `Content-Range` headers (not a PUT-with-body URL).
39
- * - `responseContentDisposition` and `responseContentType` are not supported
40
- * on signed download URLs (Graph downloadUrls have no overrides).
41
- * - `write()` buffers the full part body in memory before deciding between
42
- * simple `PUT :/content` and upload-session paths. For multi-GB transfers
43
- * prefer `getUploadUrl()` and stream chunks directly to the returned
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.
46
- */
14
+ * OneDrive / SharePoint storage backend (Microsoft Graph).
15
+ *
16
+ * Routes virtual keys onto items under `rootFolderPath` in the target drive.
17
+ * Uploads use a single `PUT :/content` request up to 250 MB and switch to
18
+ * Microsoft Graph upload sessions above that threshold.
19
+ *
20
+ * **Auth precedence**:
21
+ * 1. `client` (pre-built `@microsoft/microsoft-graph-client` `Client`)
22
+ * 2. `accessToken` (string or `() => string | Promise&lt;string>`)
23
+ * 3. `clientCredentials` (`tenantId` + `clientId` + `clientSecret`) — app-only
24
+ * 4. `oauth` (`refreshToken` + `clientId` [+ `clientSecret`, `tenantId`]) — delegated
25
+ * 5. Env fallback: `ONEDRIVE_ACCESS_TOKEN`; or `ONEDRIVE_REFRESH_TOKEN` +
26
+ * `ONEDRIVE_CLIENT_ID` (+ optional `ONEDRIVE_CLIENT_SECRET`, `ONEDRIVE_TENANT_ID`);
27
+ * or `ONEDRIVE_CLIENT_ID` + `ONEDRIVE_CLIENT_SECRET` + `ONEDRIVE_TENANT_ID`.
28
+ *
29
+ * **Targeting**: at most one of `driveId`, `siteId`, `userId`. With no
30
+ * targeting and delegated auth, defaults to `/me/drive`. App-only auth
31
+ * (`clientCredentials`) cannot use `/me/drive` — pick a target explicitly.
32
+ *
33
+ * **Limitations**:
34
+ * - `cacheControl` is not supported.
35
+ * - `metadata` is preserved via the local metafile only; Graph does not store
36
+ * arbitrary key/value metadata on `driveItem`.
37
+ * - `getUploadUrl` returns an upload-session URL — clients should `PUT` chunks
38
+ * directly to it with `Content-Range` headers (not a PUT-with-body URL).
39
+ * - `responseContentDisposition` and `responseContentType` are not supported
40
+ * on signed download URLs (Graph downloadUrls have no overrides).
41
+ * - `write()` buffers the full part body in memory before deciding between
42
+ * simple `PUT :/content` and upload-session paths. For multi-GB transfers
43
+ * prefer `getUploadUrl()` and stream chunks directly to the returned
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.
46
+ */
47
47
  declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
48
48
  static override readonly name: string;
49
49
  override checksumTypes: string[];
@@ -57,12 +57,8 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
57
57
  override get raw(): Client;
58
58
  create(config: FileInit, _options?: OperationOptions): Promise<OneDriveFile>;
59
59
  write(part: FilePart | FileQuery | OneDriveFile, options?: OperationOptions): Promise<OneDriveFile>;
60
- delete({
61
- id
62
- }: FileQuery, options?: OperationOptions): Promise<OneDriveFile>;
63
- get({
64
- id
65
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
60
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<OneDriveFile>;
61
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
66
62
  copy(name: string, destination: string, options?: OperationOptions & {
67
63
  storageClass?: string;
68
64
  }): Promise<OneDriveFile>;
@@ -83,10 +79,10 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
83
79
  private itemActionPath;
84
80
  private folderListChildrenPath;
85
81
  /**
86
- * Build a `parentReference.path` for move/copy. Microsoft Graph requires
87
- * this path to be relative to the drive, prefixed with `/drive/root:` —
88
- * **not** with the configured base path (`/me/drive`, `/drives/{id}`, …).
89
- */
82
+ * Build a `parentReference.path` for move/copy. Microsoft Graph requires
83
+ * this path to be relative to the drive, prefixed with `/drive/root:` —
84
+ * **not** with the configured base path (`/me/drive`, `/drives/{id}`, …).
85
+ */
90
86
  private parentReferencePath;
91
87
  private itemPathToKey;
92
88
  private uploadSimple;
@@ -94,10 +90,4 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
94
90
  private pollCopyMonitor;
95
91
  private internalOnComplete;
96
92
  }
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
93
  export { OneDriveFile, OneDriveMetaStorage, OneDriveStorage, type OneDriveStorageOptions };
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/OneDriveFile-CNNJYI43.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-Cbwa1CHV.js";import{default as i}from"../../packem_shared/OneDriveStorage-CP6MvGAa.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
1
+ import{default as a}from"../../packem_shared/OneDriveFile-CNNJYI43.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-xlHfKwmR.js";import{default as i}from"../../packem_shared/OneDriveStorage-BJ3Kzxc5.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
@@ -1,6 +1,6 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';
@@ -13,10 +13,10 @@ declare class PocketBaseMetaStorage extends LocalMetaStorage<PocketBaseFile> {
13
13
  constructor(config?: LocalMetaStorageOptions);
14
14
  }
15
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
- */
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
20
  interface PocketBaseClientLike {
21
21
  authStore: {
22
22
  isValid: boolean;
@@ -44,92 +44,92 @@ interface PocketBaseClientLike {
44
44
  filter: (raw: string, parameters?: Record<string, unknown>) => string;
45
45
  }
46
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
- */
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
50
  interface PocketBaseRecord {
51
51
  [field: string]: unknown;
52
52
  id: string;
53
53
  }
54
54
  interface PocketBaseStorageOptions extends BaseStorageOptions {
55
55
  /**
56
- * Superuser email used for lazy authentication. Ignored when `client` or
57
- * `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_EMAIL`.
58
- */
56
+ * Superuser email used for lazy authentication. Ignored when `client` or
57
+ * `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_EMAIL`.
58
+ */
59
59
  adminEmail?: string;
60
60
  /**
61
- * Superuser password used for lazy authentication. Ignored when `client`
62
- * or `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_PASSWORD`.
63
- */
61
+ * Superuser password used for lazy authentication. Ignored when `client`
62
+ * or `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_PASSWORD`.
63
+ */
64
64
  adminPassword?: string;
65
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
- */
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
69
  authToken?: string;
70
70
  /**
71
- * Pre-built `PocketBase` instance. Mutually exclusive with `url`. When
72
- * supplied it is used as-is and no authentication is performed.
73
- */
71
+ * Pre-built `PocketBase` instance. Mutually exclusive with `url`. When
72
+ * supplied it is used as-is and no authentication is performed.
73
+ */
74
74
  client?: PocketBaseClientLike;
75
75
  /**
76
- * Collection name backing the object store. Each record holds exactly one
77
- * file. Required — the adapter does not create the collection.
78
- */
76
+ * Collection name backing the object store. Each record holds exactly one
77
+ * file. Required — the adapter does not create the collection.
78
+ */
79
79
  collection: string;
80
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
- */
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
84
  defaultUrlExpiresIn?: number;
85
85
  /**
86
- * File field on the collection holding the stored file. Defaults to `file`.
87
- */
86
+ * File field on the collection holding the stored file. Defaults to `file`.
87
+ */
88
88
  fileField?: string;
89
89
  /**
90
- * Text field on the collection holding the logical object key. Defaults
91
- * to `key`.
92
- */
90
+ * Text field on the collection holding the logical object key. Defaults
91
+ * to `key`.
92
+ */
93
93
  keyField?: string;
94
94
  /**
95
- * Configure metafiles storage. Used for TUS-style resumable upload
96
- * bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
97
- * directory.
98
- */
95
+ * Configure metafiles storage. Used for TUS-style resumable upload
96
+ * bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
97
+ * directory.
98
+ */
99
99
  metaStorageConfig?: LocalMetaStorageOptions;
100
100
  /**
101
- * Public base URL for served files. When set, `getReadUrl` returns
102
- * `${publicBaseUrl}/${key}` without requesting a file token.
103
- */
101
+ * Public base URL for served files. When set, `getReadUrl` returns
102
+ * `${publicBaseUrl}/${key}` without requesting a file token.
103
+ */
104
104
  publicBaseUrl?: string;
105
105
  /**
106
- * PocketBase instance URL (e.g. `https://pb.example.com`). Ignored when
107
- * `client` is supplied. Falls back to `POCKETBASE_URL`.
108
- */
106
+ * PocketBase instance URL (e.g. `https://pb.example.com`). Ignored when
107
+ * `client` is supplied. Falls back to `POCKETBASE_URL`.
108
+ */
109
109
  url?: string;
110
110
  }
111
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
- */
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
133
  declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
134
134
  static override readonly name: string;
135
135
  override checksumTypes: string[];
@@ -145,15 +145,9 @@ declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
145
145
  override get raw(): PocketBaseClientLike;
146
146
  create(config: FileInit, _options?: OperationOptions): Promise<PocketBaseFile>;
147
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>;
148
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<PocketBaseFile>;
149
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
150
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
157
151
  copy(name: string, destination: string, options?: OperationOptions & {
158
152
  storageClass?: string;
159
153
  }): Promise<PocketBaseFile>;
@@ -1 +1 @@
1
- import{default as t}from"../../packem_shared/PocketBaseFile-DpJpxl3e.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-DOTLwVE7.js";import{default as s}from"../../packem_shared/PocketBaseStorage-2qhbI2PW.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};
1
+ import{default as t}from"../../packem_shared/PocketBaseFile-DpJpxl3e.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-DnrxOQhO.js";import{default as s}from"../../packem_shared/PocketBaseStorage-DqKHbbvn.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};