@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.
- package/CHANGELOG.md +17 -0
- package/dist/adapter/nuxt/module.d.ts +9 -8
- package/dist/ai/ai-sdk/index.d.ts +52 -59
- package/dist/ai/claude/index.d.ts +105 -119
- package/dist/ai/openai/index.d.ts +87 -99
- package/dist/ai/tanstack/index.d.ts +54 -61
- package/dist/handler/http/fetch/index.d.ts +202 -201
- package/dist/handler/http/fetch/index.js +1 -1
- package/dist/handler/http/hono/index.d.ts +60 -59
- package/dist/handler/http/hono/index.js +1 -1
- package/dist/handler/http/nextjs/index.d.ts +55 -54
- package/dist/handler/http/nextjs/index.js +1 -1
- package/dist/handler/http/node/index.d.ts +234 -246
- package/dist/handler/http/node/index.js +1 -1
- package/dist/handler/http/solid-start/index.d.ts +55 -54
- package/dist/handler/http/solid-start/index.js +1 -1
- package/dist/index.d.ts +71 -70
- package/dist/index.js +1 -1
- package/dist/packem_shared/{AbstractBaseStorage-CiPEMcuo.js → AbstractBaseStorage-CLsYmMZg.js} +1 -1
- package/dist/packem_shared/AwsLightStorage-DGSPFUqr.js +1 -0
- package/dist/packem_shared/AzureStorage-DvKk_hhz.js +1 -0
- package/dist/packem_shared/BoxMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-CmM95wi2.js} +1 -1
- package/dist/packem_shared/BunS3MetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-B_roVJ29.js} +1 -1
- package/dist/packem_shared/BunnyMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-eZ1QDVaY.js} +1 -1
- package/dist/packem_shared/CloudinaryMetaStorage-Bv_YCZ0Q.js +1 -0
- package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-CpH2f0Fv.js} +1 -1
- package/dist/packem_shared/DiskStorage-DzjjqCzo.js +1 -0
- package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-MZkDEyts.js} +1 -1
- package/dist/packem_shared/DropboxMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BB9NoWK2.js} +1 -1
- package/dist/packem_shared/{Files-CpIcMjP0.js → Files-DyMJ9FPN.js} +1 -1
- package/dist/packem_shared/FirebaseMetaStorage-Bv_YCZ0Q.js +1 -0
- package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-BgbxzYNC.js} +1 -1
- package/dist/packem_shared/FtpMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-CNqXDz7P.js} +1 -1
- package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-gEhWlpfS.js} +1 -1
- package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-CRd5vjok.js} +1 -1
- package/dist/packem_shared/GoogleDriveMetaStorage-B0gLF7Io.js +1 -0
- package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-Du7uBhSm.js} +1 -1
- package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-CcGfFG39.js} +1 -1
- package/dist/packem_shared/{MemoryStorage-9gbWd09l.js → MemoryStorage-ChKyI6OY.js} +1 -1
- package/dist/packem_shared/{Multipart-D0ok6BBy.js → Multipart-C35TR2qL.js} +1 -1
- package/dist/packem_shared/{Multipart-CQjYqU--.js → Multipart-V64Bg5dt.js} +1 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-Bv_YCZ0Q.js +1 -0
- package/dist/packem_shared/NetlifyBlobStorage-CZsr_0DF.js +1 -0
- package/dist/packem_shared/OneDriveMetaStorage-B0gLF7Io.js +1 -0
- package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-B8qFgMq1.js} +1 -1
- package/dist/packem_shared/PocketBaseMetaStorage-Cm3v8g1-.js +1 -0
- package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-D2vMN-oY.js} +1 -1
- package/dist/packem_shared/{Rest-CI_BiZPv.js → Rest-B7g1sgkq.js} +1 -1
- package/dist/packem_shared/{Rest-DvfN4-kf.js → Rest-BrEMYgxZ.js} +1 -1
- package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-CTe_BMDl.js} +1 -1
- package/dist/packem_shared/SftpMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-BKeAzuej.js} +1 -1
- package/dist/packem_shared/SharePointMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-Dtnt5-wk.js} +1 -1
- package/dist/packem_shared/SupabaseMetaStorage-B0gLF7Io.js +1 -0
- package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-CmGQjqXf.js} +1 -1
- package/dist/packem_shared/{Tus-BlBZykIL.js → Tus-CJBgnJrn.js} +1 -1
- package/dist/packem_shared/{Tus-BBVt2ky3.js → Tus-D9c7KDnl.js} +1 -1
- package/dist/packem_shared/UploadThingMetaStorage-Bv_YCZ0Q.js +1 -0
- package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-DZ4zNvDH.js} +1 -1
- package/dist/packem_shared/VercelBlobMetaStorage-CJsyeQ63.js +1 -0
- package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-DDNEofR3.js} +1 -1
- package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
- package/dist/packem_shared/{base-handler-core-D-9Ku1h-.js → base-handler-core-BJP9jHCE.js} +1 -1
- package/dist/packem_shared/{base-handler-fetch-CfkNakv8.js → base-handler-fetch-yrYrukwL.js} +1 -1
- package/dist/packem_shared/base-handler-node-C8P9rkaH.js +1 -0
- package/dist/packem_shared/{createRetryWrapper-CxgiV_hH.js → createRetryWrapper-DgmeHPNF.js} +1 -1
- package/dist/packem_shared/disk-storage-DqnnFQAQ.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-Dgwyza8a.d.ts +146 -0
- package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-B9dIy3NT.d.ts} +3 -2
- package/dist/packem_shared/files.d-CmSZi3M0.d.ts +655 -0
- package/dist/packem_shared/gcs-meta-storage-C9F78Sqq.js +1 -0
- package/dist/packem_shared/local-meta-storage-BELb1YwO.js +11 -0
- package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-cRTXr1kb.d.ts} +7 -7
- package/dist/packem_shared/media-transformer.d-C8tn4J2Z.d.ts +331 -0
- package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BNZvDG1b.d.ts} +32 -40
- package/dist/packem_shared/path-C-OWflAo-_mqb5p5d.js +1 -0
- package/dist/packem_shared/{rest-base-e0reNDE_.js → rest-base-BQ_dhWyV.js} +1 -1
- package/dist/packem_shared/s3-base-storage-CX94H-Za.js +1 -0
- package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-ks99NSs-.d.ts} +64 -70
- package/dist/packem_shared/storage-DR7qdwBN.js +1 -0
- package/dist/packem_shared/storage.d-DwdJrArF.d.ts +1186 -0
- package/dist/packem_shared/tus-base.d-BKBoJVy0.d.ts +103 -0
- package/dist/packem_shared/types.d-B1_xZIhu.d.ts +104 -0
- package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-BEUv414z.d.ts} +134 -134
- package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-D7Zlz5RE.d.ts} +3 -3
- package/dist/storage/aws/clients/index.d.ts +388 -388
- package/dist/storage/aws/index.d.ts +110 -113
- package/dist/storage/aws/index.js +1 -1
- package/dist/storage/aws-light/index.d.ts +64 -67
- package/dist/storage/aws-light/index.js +1 -1
- package/dist/storage/azure/index.d.ts +134 -139
- package/dist/storage/azure/index.js +1 -1
- package/dist/storage/box/index.d.ts +89 -92
- package/dist/storage/box/index.js +1 -1
- package/dist/storage/bun-s3/index.d.ts +71 -76
- package/dist/storage/bun-s3/index.js +1 -1
- package/dist/storage/bunny/index.d.ts +52 -55
- package/dist/storage/bunny/index.js +1 -1
- package/dist/storage/cloudinary/index.d.ts +54 -59
- package/dist/storage/cloudinary/index.js +1 -1
- package/dist/storage/dropbox/index.d.ts +59 -62
- package/dist/storage/dropbox/index.js +1 -1
- package/dist/storage/firebase/index.d.ts +74 -79
- package/dist/storage/firebase/index.js +1 -1
- package/dist/storage/ftp/index.d.ts +38 -43
- package/dist/storage/ftp/index.js +1 -1
- package/dist/storage/gcs/index.d.ts +90 -95
- package/dist/storage/gcs/index.js +1 -1
- package/dist/storage/google-drive/index.d.ts +69 -72
- package/dist/storage/google-drive/index.js +1 -1
- package/dist/storage/local/index.d.ts +4 -3
- package/dist/storage/local/index.js +1 -1
- package/dist/storage/memory/index.d.ts +3 -2
- package/dist/storage/memory/index.js +1 -1
- package/dist/storage/netlify-blob/index.d.ts +86 -93
- package/dist/storage/netlify-blob/index.js +1 -1
- package/dist/storage/onedrive/index.d.ts +44 -53
- package/dist/storage/onedrive/index.js +1 -1
- package/dist/storage/pocketbase/index.d.ts +67 -72
- package/dist/storage/pocketbase/index.js +1 -1
- package/dist/storage/sftp/index.d.ts +40 -45
- package/dist/storage/sftp/index.js +1 -1
- package/dist/storage/sharepoint/index.d.ts +96 -95
- package/dist/storage/sharepoint/index.js +1 -1
- package/dist/storage/supabase/index.d.ts +50 -55
- package/dist/storage/supabase/index.js +1 -1
- package/dist/storage/uploadthing/index.d.ts +34 -37
- package/dist/storage/uploadthing/index.js +1 -1
- package/dist/storage/vercel-blob/index.d.ts +110 -115
- package/dist/storage/vercel-blob/index.js +1 -1
- package/dist/transformer/audio-transformer.d.ts +97 -96
- package/dist/transformer/image-transformer.d.ts +423 -422
- package/dist/transformer/index.d.ts +35 -34
- package/dist/transformer/video-transformer.d.ts +112 -111
- package/package.json +2 -2
- package/dist/packem_shared/AwsLightStorage-BK-WPL0h.js +0 -1
- package/dist/packem_shared/AzureStorage-1UvDIQZd.js +0 -1
- package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/DiskStorage-CI07TVNu.js +0 -1
- package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/NetlifyBlobStorage-CkpCCoN1.js +0 -1
- package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
- package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
- package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
- package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
- package/dist/packem_shared/base-handler-node-BF1v1qDa.js +0 -1
- package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
- package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
- package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
- package/dist/packem_shared/gcs-meta-storage-B7BnctnV.js +0 -1
- package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
- package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
- package/dist/packem_shared/path-0oTTdkvl-DvWvbDbh.js +0 -1
- package/dist/packem_shared/s3-base-storage-BoTyhuzO.js +0 -1
- package/dist/packem_shared/storage-0j5nCAUp.js +0 -1
- package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
- package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
- package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
|
@@ -1,18 +1,19 @@
|
|
|
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-
|
|
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-DwdJrArF.js";
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
|
|
4
4
|
import { getStore } from '@netlify/blobs';
|
|
5
|
+
import 'node:timers';
|
|
5
6
|
import 'node:crypto';
|
|
6
7
|
import 'node:http';
|
|
7
8
|
import 'lru-cache';
|
|
8
9
|
declare class NetlifyBlobFile extends File {
|
|
9
10
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
* The blob's public URL
|
|
12
|
+
*/
|
|
12
13
|
url?: string;
|
|
13
14
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
* The blob's pathname within the store
|
|
16
|
+
*/
|
|
16
17
|
pathname?: string;
|
|
17
18
|
}
|
|
18
19
|
declare class NetlifyBlobMetaStorage extends LocalMetaStorage {
|
|
@@ -20,50 +21,50 @@ declare class NetlifyBlobMetaStorage extends LocalMetaStorage {
|
|
|
20
21
|
}
|
|
21
22
|
interface NetlifyBlobStorageOptions extends BaseStorageOptions {
|
|
22
23
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
* Configure metafiles storage
|
|
25
|
+
* @example
|
|
26
|
+
* Using local metafiles
|
|
27
|
+
* ```ts
|
|
28
|
+
* const storage = new NetlifyBlobStorage({
|
|
29
|
+
* storeName: 'uploads',
|
|
30
|
+
* metaStorageConfig: { directory: '/tmp/upload-metafiles' }
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
33
34
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
34
35
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
* Netlify site ID (optional, used for explicit store access)
|
|
37
|
+
*/
|
|
37
38
|
siteID?: string;
|
|
38
39
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
* Netlify Blob store name
|
|
41
|
+
* @default 'default'
|
|
42
|
+
*/
|
|
42
43
|
storeName?: string;
|
|
43
44
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
* Netlify API token (optional, can use environment variable NETLIFY_TOKEN)
|
|
46
|
+
*/
|
|
46
47
|
token?: string;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
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
|
-
*/
|
|
50
|
+
* Netlify Blob storage based backend.
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const storage = new NetlifyBlobStorage({
|
|
54
|
+
* storeName: 'uploads',
|
|
55
|
+
* metaStorageConfig: { directory: '/tmp/upload-metafiles' }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
* @remarks
|
|
59
|
+
* ## Supported Operations
|
|
60
|
+
* - ✅ create, write, delete, get, list, copy, move
|
|
61
|
+
* - ✅ Batch operations: deleteBatch, copyBatch, moveBatch (inherited from BaseStorage)
|
|
62
|
+
* - ✅ exists: Implemented (checks metadata and Netlify Blob)
|
|
63
|
+
* - ✅ update: Implemented (updates metadata file, Netlify Blob API doesn't support blob metadata updates)
|
|
64
|
+
* - ❌ getStream: Not implemented (use get() for file retrieval)
|
|
65
|
+
* - ❌ getUrl: Not implemented (Netlify Blob URLs available via Netlify Blob API)
|
|
66
|
+
* - ❌ getUploadUrl: Not implemented (Netlify Blob upload URLs handled internally)
|
|
67
|
+
*/
|
|
67
68
|
declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
68
69
|
static override readonly name: string;
|
|
69
70
|
override checksumTypes: string[];
|
|
@@ -79,69 +80,61 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
79
80
|
create(config: FileInit, _options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
80
81
|
write(part: FilePart | FileQuery | NetlifyBlobFile, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
81
82
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
delete({
|
|
89
|
-
id
|
|
90
|
-
}: FileQuery, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
83
|
+
* Deletes an upload and its metadata.
|
|
84
|
+
* @param query File query containing the file ID to delete.
|
|
85
|
+
* @param query.id File ID to delete.
|
|
86
|
+
* @returns Promise resolving to the deleted file object with status: "deleted".
|
|
87
|
+
* @throws {UploadError} If the file metadata cannot be found.
|
|
88
|
+
*/
|
|
89
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
91
90
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
override exists({
|
|
98
|
-
|
|
99
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
100
|
-
get({
|
|
101
|
-
id
|
|
102
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
91
|
+
* Checks if a file exists by verifying both metadata and the actual Netlify Blob.
|
|
92
|
+
* Returns true only if both the metadata and the blob exist.
|
|
93
|
+
* @param query File query containing the file ID to check.
|
|
94
|
+
* @returns Promise resolving to true if both metadata and blob exist, false otherwise.
|
|
95
|
+
*/
|
|
96
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
97
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
103
98
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
* Copies an upload file to a new location.
|
|
100
|
+
* @param name Source file name/ID.
|
|
101
|
+
* @param destination Destination file name/ID.
|
|
102
|
+
* @returns Promise resolving to the copied file object.
|
|
103
|
+
* @throws {UploadError} If the source file cannot be found.
|
|
104
|
+
*/
|
|
110
105
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
111
106
|
storageClass?: string;
|
|
112
107
|
}): Promise<NetlifyBlobFile>;
|
|
113
108
|
/**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
* Moves an upload file to a new location.
|
|
110
|
+
* @param name Source file name/ID.
|
|
111
|
+
* @param destination Destination file name/ID.
|
|
112
|
+
* @returns Promise resolving to the moved file object.
|
|
113
|
+
* @throws {UploadError} If the source file cannot be found.
|
|
114
|
+
*/
|
|
120
115
|
move(name: string, destination: string, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
121
116
|
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
override update({
|
|
136
|
-
id
|
|
137
|
-
}: FileQuery, metadata: Partial<NetlifyBlobFile>, _options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
117
|
+
* Updates file metadata with user-provided key-value pairs.
|
|
118
|
+
* Updates the metadata file (overwrites it) but does not update Netlify Blob metadata
|
|
119
|
+
* since the Netlify Blob API doesn't support metadata updates.
|
|
120
|
+
* @param query File query containing the file ID to update.
|
|
121
|
+
* @param query.id File ID to update.
|
|
122
|
+
* @param metadata Partial file object containing fields to update.
|
|
123
|
+
* @returns Promise resolving to the updated file object.
|
|
124
|
+
* @throws {UploadError} If the file cannot be found (ERRORS.FILE_NOT_FOUND).
|
|
125
|
+
* @remarks
|
|
126
|
+
* Supports TTL (time-to-live) option: if metadata contains a 'ttl' field,
|
|
127
|
+
* it will be converted to an 'expiredAt' timestamp.
|
|
128
|
+
* TTL can be a number (milliseconds) or string (e.g., "1h", "30m", "7d").
|
|
129
|
+
*/
|
|
130
|
+
override update({ id }: FileQuery, metadata: Partial<NetlifyBlobFile>, _options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
138
131
|
override list(limit?: number, options?: OperationOptions): Promise<NetlifyBlobFile[]>;
|
|
139
132
|
private internalOnComplete;
|
|
140
133
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
134
|
+
* Generate a URL for a blob in Netlify Blob store
|
|
135
|
+
* Note: Netlify Blob doesn't provide direct public URLs like Vercel Blob
|
|
136
|
+
* In production, you would typically serve these through Netlify Functions or Edge Functions
|
|
137
|
+
*/
|
|
145
138
|
private getBlobUrl;
|
|
146
139
|
}
|
|
147
140
|
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-
|
|
1
|
+
import{default as o}from"../../packem_shared/NetlifyBlobFile-DoFhkzaH.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-Bv_YCZ0Q.js";import{default as r}from"../../packem_shared/NetlifyBlobStorage-CZsr_0DF.js";export{o as NetlifyBlobFile,a as NetlifyBlobMetaStorage,r as NetlifyBlobStorage};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-
|
|
2
|
-
export type { b as OneDriveClientCredentialsAuth, c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-
|
|
3
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
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-
|
|
1
|
+
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-B1_xZIhu.js";
|
|
2
|
+
export type { b as OneDriveClientCredentialsAuth, c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-B1_xZIhu.js";
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.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-DwdJrArF.js";
|
|
5
5
|
import { Client } from '@microsoft/microsoft-graph-client';
|
|
6
6
|
import 'node:stream';
|
|
7
|
+
import 'node:timers';
|
|
7
8
|
import 'node:crypto';
|
|
8
9
|
import 'node:http';
|
|
9
10
|
import 'lru-cache';
|
|
@@ -11,39 +12,39 @@ declare class OneDriveMetaStorage extends LocalMetaStorage<OneDriveFile> {
|
|
|
11
12
|
constructor(config?: LocalMetaStorageOptions);
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
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<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
|
-
*/
|
|
15
|
+
* OneDrive / SharePoint storage backend (Microsoft Graph).
|
|
16
|
+
*
|
|
17
|
+
* Routes virtual keys onto items under `rootFolderPath` in the target drive.
|
|
18
|
+
* Uploads use a single `PUT :/content` request up to 250 MB and switch to
|
|
19
|
+
* Microsoft Graph upload sessions above that threshold.
|
|
20
|
+
*
|
|
21
|
+
* **Auth precedence**:
|
|
22
|
+
* 1. `client` (pre-built `@microsoft/microsoft-graph-client` `Client`)
|
|
23
|
+
* 2. `accessToken` (string or `() => string | Promise<string>`)
|
|
24
|
+
* 3. `clientCredentials` (`tenantId` + `clientId` + `clientSecret`) — app-only
|
|
25
|
+
* 4. `oauth` (`refreshToken` + `clientId` [+ `clientSecret`, `tenantId`]) — delegated
|
|
26
|
+
* 5. Env fallback: `ONEDRIVE_ACCESS_TOKEN`; or `ONEDRIVE_REFRESH_TOKEN` +
|
|
27
|
+
* `ONEDRIVE_CLIENT_ID` (+ optional `ONEDRIVE_CLIENT_SECRET`, `ONEDRIVE_TENANT_ID`);
|
|
28
|
+
* or `ONEDRIVE_CLIENT_ID` + `ONEDRIVE_CLIENT_SECRET` + `ONEDRIVE_TENANT_ID`.
|
|
29
|
+
*
|
|
30
|
+
* **Targeting**: at most one of `driveId`, `siteId`, `userId`. With no
|
|
31
|
+
* targeting and delegated auth, defaults to `/me/drive`. App-only auth
|
|
32
|
+
* (`clientCredentials`) cannot use `/me/drive` — pick a target explicitly.
|
|
33
|
+
*
|
|
34
|
+
* **Limitations**:
|
|
35
|
+
* - `cacheControl` is not supported.
|
|
36
|
+
* - `metadata` is preserved via the local metafile only; Graph does not store
|
|
37
|
+
* arbitrary key/value metadata on `driveItem`.
|
|
38
|
+
* - `getUploadUrl` returns an upload-session URL — clients should `PUT` chunks
|
|
39
|
+
* directly to it with `Content-Range` headers (not a PUT-with-body URL).
|
|
40
|
+
* - `responseContentDisposition` and `responseContentType` are not supported
|
|
41
|
+
* on signed download URLs (Graph downloadUrls have no overrides).
|
|
42
|
+
* - `write()` buffers the full part body in memory before deciding between
|
|
43
|
+
* simple `PUT :/content` and upload-session paths. For multi-GB transfers
|
|
44
|
+
* prefer `getUploadUrl()` and stream chunks directly to the returned
|
|
45
|
+
* upload-session URL from the client.
|
|
46
|
+
* - ⚠️ 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.
|
|
47
|
+
*/
|
|
47
48
|
declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
|
|
48
49
|
static override readonly name: string;
|
|
49
50
|
override checksumTypes: string[];
|
|
@@ -57,12 +58,8 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
|
|
|
57
58
|
override get raw(): Client;
|
|
58
59
|
create(config: FileInit, _options?: OperationOptions): Promise<OneDriveFile>;
|
|
59
60
|
write(part: FilePart | FileQuery | OneDriveFile, options?: OperationOptions): Promise<OneDriveFile>;
|
|
60
|
-
delete({
|
|
61
|
-
|
|
62
|
-
}: FileQuery, options?: OperationOptions): Promise<OneDriveFile>;
|
|
63
|
-
get({
|
|
64
|
-
id
|
|
65
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
61
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<OneDriveFile>;
|
|
62
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
66
63
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
67
64
|
storageClass?: string;
|
|
68
65
|
}): Promise<OneDriveFile>;
|
|
@@ -83,10 +80,10 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
|
|
|
83
80
|
private itemActionPath;
|
|
84
81
|
private folderListChildrenPath;
|
|
85
82
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
* Build a `parentReference.path` for move/copy. Microsoft Graph requires
|
|
84
|
+
* this path to be relative to the drive, prefixed with `/drive/root:` —
|
|
85
|
+
* **not** with the configured base path (`/me/drive`, `/drives/{id}`, …).
|
|
86
|
+
*/
|
|
90
87
|
private parentReferencePath;
|
|
91
88
|
private itemPathToKey;
|
|
92
89
|
private uploadSimple;
|
|
@@ -94,10 +91,4 @@ declare class OneDriveStorage extends BaseStorage<OneDriveFile> {
|
|
|
94
91
|
private pollCopyMonitor;
|
|
95
92
|
private internalOnComplete;
|
|
96
93
|
}
|
|
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
94
|
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-
|
|
1
|
+
import{default as a}from"../../packem_shared/OneDriveFile-CNNJYI43.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-B0gLF7Io.js";import{default as i}from"../../packem_shared/OneDriveStorage-B8qFgMq1.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
|
|
@@ -1,6 +1,7 @@
|
|
|
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-
|
|
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-
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-cRTXr1kb.js";
|
|
4
|
+
import 'node:timers';
|
|
4
5
|
import 'node:crypto';
|
|
5
6
|
import 'node:http';
|
|
6
7
|
import 'lru-cache';
|
|
@@ -13,10 +14,10 @@ declare class PocketBaseMetaStorage extends LocalMetaStorage<PocketBaseFile> {
|
|
|
13
14
|
constructor(config?: LocalMetaStorageOptions);
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
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
|
-
*/
|
|
17
|
+
* Minimal structural type for the PocketBase client used by the adapter.
|
|
18
|
+
* Declared locally so the package does not require `pocketbase` to be
|
|
19
|
+
* installed for type-checking (it is an optional peer dependency).
|
|
20
|
+
*/
|
|
20
21
|
interface PocketBaseClientLike {
|
|
21
22
|
authStore: {
|
|
22
23
|
isValid: boolean;
|
|
@@ -44,92 +45,92 @@ interface PocketBaseClientLike {
|
|
|
44
45
|
filter: (raw: string, parameters?: Record<string, unknown>) => string;
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
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
|
-
*/
|
|
48
|
+
* Minimal structural type for a PocketBase record. The file field holds the
|
|
49
|
+
* stored filename string; the key field holds the logical object key.
|
|
50
|
+
*/
|
|
50
51
|
interface PocketBaseRecord {
|
|
51
52
|
[field: string]: unknown;
|
|
52
53
|
id: string;
|
|
53
54
|
}
|
|
54
55
|
interface PocketBaseStorageOptions extends BaseStorageOptions {
|
|
55
56
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
* Superuser email used for lazy authentication. Ignored when `client` or
|
|
58
|
+
* `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_EMAIL`.
|
|
59
|
+
*/
|
|
59
60
|
adminEmail?: string;
|
|
60
61
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
* Superuser password used for lazy authentication. Ignored when `client`
|
|
63
|
+
* or `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_PASSWORD`.
|
|
64
|
+
*/
|
|
64
65
|
adminPassword?: string;
|
|
65
66
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
* Pre-saved auth token stored on the client's `authStore`. Ignored when
|
|
68
|
+
* `client` is supplied. Falls back to `POCKETBASE_AUTH_TOKEN`.
|
|
69
|
+
*/
|
|
69
70
|
authToken?: string;
|
|
70
71
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
* Pre-built `PocketBase` instance. Mutually exclusive with `url`. When
|
|
73
|
+
* supplied it is used as-is and no authentication is performed.
|
|
74
|
+
*/
|
|
74
75
|
client?: PocketBaseClientLike;
|
|
75
76
|
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
* Collection name backing the object store. Each record holds exactly one
|
|
78
|
+
* file. Required — the adapter does not create the collection.
|
|
79
|
+
*/
|
|
79
80
|
collection: string;
|
|
80
81
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
* Default expiry, in seconds, for `getReadUrl`. PocketBase file tokens are
|
|
83
|
+
* short-lived; a fresh token is requested per call. Defaults to 3600.
|
|
84
|
+
*/
|
|
84
85
|
defaultUrlExpiresIn?: number;
|
|
85
86
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
* File field on the collection holding the stored file. Defaults to `file`.
|
|
88
|
+
*/
|
|
88
89
|
fileField?: string;
|
|
89
90
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* Text field on the collection holding the logical object key. Defaults
|
|
92
|
+
* to `key`.
|
|
93
|
+
*/
|
|
93
94
|
keyField?: string;
|
|
94
95
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
97
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
98
|
+
* directory.
|
|
99
|
+
*/
|
|
99
100
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
100
101
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
* Public base URL for served files. When set, `getReadUrl` returns
|
|
103
|
+
* `${publicBaseUrl}/${key}` without requesting a file token.
|
|
104
|
+
*/
|
|
104
105
|
publicBaseUrl?: string;
|
|
105
106
|
/**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
* PocketBase instance URL (e.g. `https://pb.example.com`). Ignored when
|
|
108
|
+
* `client` is supplied. Falls back to `POCKETBASE_URL`.
|
|
109
|
+
*/
|
|
109
110
|
url?: string;
|
|
110
111
|
}
|
|
111
112
|
/**
|
|
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
|
-
*/
|
|
113
|
+
* PocketBase storage backend.
|
|
114
|
+
*
|
|
115
|
+
* PocketBase is record-based: a collection where each record holds exactly
|
|
116
|
+
* one file. This adapter maps the object store onto such a collection,
|
|
117
|
+
* keying records by a text field (`keyField`) and storing bytes in a file
|
|
118
|
+
* field (`fileField`). Uploads are single-shot — the part stream is buffered
|
|
119
|
+
* and sent as one multipart request.
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { PocketBaseStorage } from "@visulima/storage/provider/pocketbase";
|
|
123
|
+
*
|
|
124
|
+
* const storage = new PocketBaseStorage({
|
|
125
|
+
* url: process.env.POCKETBASE_URL,
|
|
126
|
+
* adminEmail: process.env.POCKETBASE_ADMIN_EMAIL,
|
|
127
|
+
* adminPassword: process.env.POCKETBASE_ADMIN_PASSWORD,
|
|
128
|
+
* collection: "uploads",
|
|
129
|
+
* });
|
|
130
|
+
* ```
|
|
131
|
+
* @remarks
|
|
132
|
+
* - ⚠️ 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.
|
|
133
|
+
*/
|
|
133
134
|
declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
|
|
134
135
|
static override readonly name: string;
|
|
135
136
|
override checksumTypes: string[];
|
|
@@ -145,15 +146,9 @@ declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
|
|
|
145
146
|
override get raw(): PocketBaseClientLike;
|
|
146
147
|
create(config: FileInit, _options?: OperationOptions): Promise<PocketBaseFile>;
|
|
147
148
|
write(part: FilePart | FileQuery | PocketBaseFile, options?: OperationOptions): Promise<PocketBaseFile>;
|
|
148
|
-
delete({
|
|
149
|
-
|
|
150
|
-
}: FileQuery, options?: OperationOptions): Promise<
|
|
151
|
-
override exists({
|
|
152
|
-
id
|
|
153
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
154
|
-
get({
|
|
155
|
-
id
|
|
156
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
149
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<PocketBaseFile>;
|
|
150
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
151
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
157
152
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
158
153
|
storageClass?: string;
|
|
159
154
|
}): Promise<PocketBaseFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/PocketBaseFile-DpJpxl3e.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/PocketBaseFile-DpJpxl3e.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-Cm3v8g1-.js";import{default as s}from"../../packem_shared/PocketBaseStorage-D2vMN-oY.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};
|