@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.
- package/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/dist/adapter/nuxt/module.d.ts +4 -4
- package/dist/adapter/nuxt/node_modules/.bin/nuxi +2 -2
- package/dist/adapter/nuxt/node_modules/.bin/nuxt +2 -2
- package/dist/ai/ai-sdk/index.d.ts +3 -3
- package/dist/ai/claude/index.d.ts +2 -2
- package/dist/ai/openai/index.d.ts +3 -3
- package/dist/ai/tanstack/index.d.ts +2 -2
- package/dist/handler/http/fetch/index.d.ts +7 -7
- package/dist/handler/http/fetch/index.js +1 -1
- package/dist/handler/http/hono/index.d.ts +4 -4
- package/dist/handler/http/hono/index.js +1 -1
- package/dist/handler/http/nextjs/index.d.ts +4 -4
- package/dist/handler/http/nextjs/index.js +1 -1
- package/dist/handler/http/node/index.d.ts +7 -7
- package/dist/handler/http/node/index.js +1 -1
- package/dist/handler/http/solid-start/index.d.ts +4 -4
- package/dist/handler/http/solid-start/index.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/packem_shared/{AwsLightMetaStorage-DHz1nf_H.js → AwsLightMetaStorage-B-iQbToR.js} +1 -1
- package/dist/packem_shared/AwsLightStorage-w21RxjUm.js +1 -0
- package/dist/packem_shared/AzureSMetaStorage-CR-lfQNQ.js +1 -0
- package/dist/packem_shared/AzureStorage-2kl7JDXs.js +1 -0
- package/dist/packem_shared/BoxMetaStorage-DLdXbZaV.js +1 -0
- package/dist/packem_shared/BoxStorage-BUeEJoGL.js +1 -0
- package/dist/packem_shared/BunS3File-D-SRiyrm.js +1 -0
- package/dist/packem_shared/BunS3MetaStorage-Bv_CTTMz.js +1 -0
- package/dist/packem_shared/BunS3Storage-WM3rF6Fw.js +1 -0
- package/dist/packem_shared/BunnyMetaStorage-DNMTSeoN.js +1 -0
- package/dist/packem_shared/BunnyStorage-D3s2fRB3.js +1 -0
- package/dist/packem_shared/CloudinaryFile-B5-m33eS.js +1 -0
- package/dist/packem_shared/CloudinaryMetaStorage-DEBk5eQy.js +1 -0
- package/dist/packem_shared/CloudinaryStorage-BBE2-aVz.js +1 -0
- package/dist/packem_shared/DiskStorage-DL0GiG6k.js +1 -0
- package/dist/packem_shared/{DiskStorageWithChecksum-CbXWpSOr.js → DiskStorageWithChecksum-BvUTn7O-.js} +1 -1
- package/dist/packem_shared/{DropboxMetaStorage-CICuUZ1n.js → DropboxMetaStorage-C6vj1QDA.js} +1 -1
- package/dist/packem_shared/DropboxStorage-BL3OIdE_.js +1 -0
- package/dist/packem_shared/{Files-B7hlJcB4.js → Files-CJh9_N-9.js} +1 -1
- package/dist/packem_shared/FirebaseFile-JEu3plMP.js +1 -0
- package/dist/packem_shared/FirebaseMetaStorage-CzyOim-J.js +1 -0
- package/dist/packem_shared/FirebaseStorage-lXMXy3Pm.js +2 -0
- package/dist/packem_shared/FtpFile-B8jaICTB.js +1 -0
- package/dist/packem_shared/FtpMetaStorage-1Njy0DpU.js +1 -0
- package/dist/packem_shared/FtpStorage-Dw94efNW.js +1 -0
- package/dist/packem_shared/{GCSMetaStorage-CqP9ifYB.js → GCSMetaStorage-DvRxZhmq.js} +1 -1
- package/dist/packem_shared/GCStorage-U4f4WsWC.js +1 -0
- package/dist/packem_shared/{GoogleDriveMetaStorage-rghGy3Fa.js → GoogleDriveMetaStorage-WGuUZPyx.js} +1 -1
- package/dist/packem_shared/GoogleDriveStorage-C0NhBBWH.js +1 -0
- package/dist/packem_shared/{LocalMetaStorage-B5uh1snG.js → LocalMetaStorage-QMKL7McF.js} +1 -1
- package/dist/packem_shared/{Multipart-7FSSy2n1.js → Multipart-CIFfQksD.js} +1 -1
- package/dist/packem_shared/{Multipart-DACQFsrn.js → Multipart-D9WIud9R.js} +1 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-ClIFdTkT.js +1 -0
- package/dist/packem_shared/NetlifyBlobStorage-CO89TGvF.js +1 -0
- package/dist/packem_shared/OneDriveMetaStorage-DS4f83X2.js +1 -0
- package/dist/packem_shared/OneDriveStorage-jAN46vRm.js +1 -0
- package/dist/packem_shared/PocketBaseFile-CkAiSBb0.js +1 -0
- package/dist/packem_shared/PocketBaseMetaStorage-B6utPncj.js +1 -0
- package/dist/packem_shared/PocketBaseStorage-DpOjOKAt.js +1 -0
- package/dist/packem_shared/{Rest-5NwM1xYj.js → Rest-BuD3ySAg.js} +1 -1
- package/dist/packem_shared/{Rest-y8Vz2Rt0.js → Rest-URrQ5FYM.js} +1 -1
- package/dist/packem_shared/S3Storage-n1ohEZj4.js +1 -0
- package/dist/packem_shared/SftpFile-CQCxZNVq.js +1 -0
- package/dist/packem_shared/SftpMetaStorage-DYqXwCdM.js +1 -0
- package/dist/packem_shared/SftpStorage-Ban-WN8v.js +1 -0
- package/dist/packem_shared/SharePointFile-BA6X9Sxr.js +1 -0
- package/dist/packem_shared/SharePointMetaStorage-DVM5-X6g.js +1 -0
- package/dist/packem_shared/SharePointStorage-BY90zh1c.js +1 -0
- package/dist/packem_shared/SupabaseMetaStorage-ivXoYVUu.js +1 -0
- package/dist/packem_shared/SupabaseStorage-pNbHAE1Y.js +1 -0
- package/dist/packem_shared/{Tus-CJMcygk7.js → Tus-Fp_hx5ug.js} +1 -1
- package/dist/packem_shared/{Tus-BCVAbJIi.js → Tus-TNG9HAY8.js} +1 -1
- package/dist/packem_shared/UploadThingMetaStorage-BvKNzgm7.js +1 -0
- package/dist/packem_shared/UploadThingStorage-BcmIE2dI.js +1 -0
- package/dist/packem_shared/{VercelBlobMetaStorage-Do9ZoKrl.js → VercelBlobMetaStorage-CwaqWucZ.js} +1 -1
- package/dist/packem_shared/VercelBlobStorage-C89IUiQ1.js +1 -0
- package/dist/packem_shared/alibaba-BJQ6ijoK.js +1 -0
- package/dist/packem_shared/aws-light-meta-storage-CstQBYXG.js +4 -0
- package/dist/packem_shared/azure-meta-storage-C4SrMtT2.js +1 -0
- package/dist/packem_shared/{base-handler-core-BfwZ1RS1.js → base-handler-core-BYDQditz.js} +1 -1
- package/dist/packem_shared/{base-handler-fetch-CLxqXTQf.js → base-handler-fetch-DWzsPkmV.js} +1 -1
- package/dist/packem_shared/{base-handler-node-DBZjcqsp.js → base-handler-node-Dety2rQB.js} +1 -1
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-shIZX_7L.js +1 -0
- package/dist/packem_shared/disk-storage-CKAJvhcj.js +1 -0
- package/dist/packem_shared/{disk-storage-with-checksum.d-BQMXA4Wl.d.ts → disk-storage-with-checksum.d-mHcg2uLw.d.ts} +1 -1
- package/dist/packem_shared/{executors.d-UtkeCbk1.d.ts → executors.d-X4hz3zfu.d.ts} +1 -1
- package/dist/packem_shared/exoscale-O0HzxoDz.js +1 -0
- package/dist/packem_shared/filebase-D-urO4Ob.js +1 -0
- package/dist/packem_shared/{gcs-meta-storage-XB-UPJn6.js → gcs-meta-storage-Br_I-m9X.js} +1 -1
- package/dist/packem_shared/ibmCos-Rx_yku4H.js +1 -0
- package/dist/packem_shared/idriveE2-BFhw0Vwy.js +1 -0
- package/dist/packem_shared/index-B4ETk0Lu.js +5 -0
- package/dist/packem_shared/{index.d-DotjipuX.d.ts → index.d-C4Fivh4I.d.ts} +7 -2
- package/dist/packem_shared/isRetryableError-BhizNeAz.js +1 -0
- package/dist/packem_shared/{local-meta-storage-CT1audnK.js → local-meta-storage-Bi0mK6gD.js} +1 -1
- package/dist/packem_shared/{local-meta-storage.d-B5R1nswK.d.ts → local-meta-storage.d-B11vHYNm.d.ts} +1 -1
- package/dist/packem_shared/{media-transformer.d-DK7NJncf.d.ts → media-transformer.d-j1W9HAXw.d.ts} +2 -2
- package/dist/packem_shared/oracleCloud-D5T9s4JV.js +1 -0
- package/dist/packem_shared/ovhCloud-DCwef2fe.js +1 -0
- package/dist/packem_shared/posix-dirname-CiHXPPnw.js +1 -0
- package/dist/packem_shared/{rest-base-CCv78k7h.js → rest-base-DI7xFXr5.js} +1 -1
- package/dist/packem_shared/s3-base-storage-Dbexfg7p.js +1 -0
- package/dist/packem_shared/{s3-base-storage.d-BROGYJ4F.d.ts → s3-base-storage.d-V3N2nKCt.d.ts} +31 -22
- package/dist/packem_shared/scaleway-ygRXOss9.js +1 -0
- package/dist/packem_shared/storage-Dh0tJh7j.js +1 -0
- package/dist/packem_shared/{storage.d-Cr6f2lac.d.ts → storage.d-RteRC-cG.d.ts} +131 -65
- package/dist/packem_shared/tencent-CAcAGaIW.js +1 -0
- package/dist/packem_shared/{tus-base.d-4-ZfDQwl.d.ts → tus-base.d-wZsb3umJ.d.ts} +3 -3
- package/dist/packem_shared/{types.d-C8eSxqX9.d.ts → types.d-B5qPfCr5.d.ts} +2 -2
- package/dist/packem_shared/types.d-ChNXbbHG.d.ts +104 -0
- package/dist/packem_shared/{types.d-BgCmSE94.d.ts → types.d-DzPvh74p.d.ts} +2 -2
- package/dist/packem_shared/vultr-lK9L-sFk.js +1 -0
- package/dist/packem_shared/yandex-ZwvE77v4.js +1 -0
- package/dist/storage/aws/clients/index.d.ts +372 -1
- package/dist/storage/aws/clients/index.js +1 -1
- package/dist/storage/aws/index.d.ts +13 -13
- package/dist/storage/aws/index.js +1 -1
- package/dist/storage/aws-light/index.d.ts +13 -13
- package/dist/storage/aws-light/index.js +1 -1
- package/dist/storage/azure/index.d.ts +82 -14
- package/dist/storage/azure/index.js +1 -1
- package/dist/storage/box/index.d.ts +12 -9
- package/dist/storage/box/index.js +1 -1
- package/dist/storage/bun-s3/index.d.ts +200 -0
- package/dist/storage/bun-s3/index.js +1 -0
- package/dist/storage/bunny/index.d.ts +13 -10
- package/dist/storage/bunny/index.js +1 -1
- package/dist/storage/cloudinary/index.d.ts +121 -0
- package/dist/storage/cloudinary/index.js +1 -0
- package/dist/storage/dropbox/index.d.ts +13 -10
- package/dist/storage/dropbox/index.js +1 -1
- package/dist/storage/firebase/index.d.ts +192 -0
- package/dist/storage/firebase/index.js +1 -0
- package/dist/storage/ftp/index.d.ts +85 -0
- package/dist/storage/ftp/index.js +1 -0
- package/dist/storage/gcs/index.d.ts +19 -10
- package/dist/storage/gcs/index.js +1 -1
- package/dist/storage/google-drive/index.d.ts +12 -9
- package/dist/storage/google-drive/index.js +1 -1
- package/dist/storage/local/index.d.ts +3 -3
- package/dist/storage/local/index.js +1 -1
- package/dist/storage/netlify-blob/index.d.ts +15 -12
- package/dist/storage/netlify-blob/index.js +1 -1
- package/dist/storage/onedrive/index.d.ts +22 -111
- package/dist/storage/onedrive/index.js +1 -1
- package/dist/storage/pocketbase/index.d.ts +172 -0
- package/dist/storage/pocketbase/index.js +1 -0
- package/dist/storage/sftp/index.d.ts +86 -0
- package/dist/storage/sftp/index.js +1 -0
- package/dist/storage/sharepoint/index.d.ts +180 -0
- package/dist/storage/sharepoint/index.js +1 -0
- package/dist/storage/supabase/index.d.ts +14 -10
- package/dist/storage/supabase/index.js +1 -1
- package/dist/storage/uploadthing/index.d.ts +14 -10
- package/dist/storage/uploadthing/index.js +1 -1
- package/dist/storage/vercel-blob/index.d.ts +13 -10
- package/dist/storage/vercel-blob/index.js +1 -1
- package/dist/transformer/audio-transformer.d.ts +2 -2
- package/dist/transformer/image-transformer.d.ts +2 -2
- package/dist/transformer/index.d.ts +3 -3
- package/dist/transformer/video-transformer.d.ts +2 -2
- package/package.json +55 -3
- package/dist/packem_shared/AwsLightStorage-SH7j-myh.js +0 -1
- package/dist/packem_shared/AzureSMetaStorage-DV2tNjKh.js +0 -1
- package/dist/packem_shared/AzureStorage-BVYMFEBP.js +0 -1
- package/dist/packem_shared/BoxMetaStorage-BUe5Qmqe.js +0 -1
- package/dist/packem_shared/BoxStorage-CgC81_So.js +0 -1
- package/dist/packem_shared/BunnyMetaStorage-D0mT6veJ.js +0 -1
- package/dist/packem_shared/BunnyStorage-Bl4usdVT.js +0 -1
- package/dist/packem_shared/DiskStorage-B5uIDVXr.js +0 -1
- package/dist/packem_shared/DropboxStorage-CPjhDN5B.js +0 -1
- package/dist/packem_shared/GCStorage-XSBKVx90.js +0 -1
- package/dist/packem_shared/GoogleDriveStorage-DuB6glUk.js +0 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-BcRFPky8.js +0 -1
- package/dist/packem_shared/NetlifyBlobStorage-C4qkJv1R.js +0 -1
- package/dist/packem_shared/OneDriveMetaStorage-B_BkGLzW.js +0 -1
- package/dist/packem_shared/OneDriveStorage-Cu0cGcrh.js +0 -1
- package/dist/packem_shared/S3Storage-D8dopWoO.js +0 -1
- package/dist/packem_shared/SupabaseMetaStorage-BR1UGqnj.js +0 -1
- package/dist/packem_shared/SupabaseStorage-CCtMTiN5.js +0 -1
- package/dist/packem_shared/UploadThingMetaStorage-DyGNyaAq.js +0 -1
- package/dist/packem_shared/UploadThingStorage-B_fNzNFO.js +0 -1
- package/dist/packem_shared/VercelBlobStorage-D5zy4PPQ.js +0 -1
- package/dist/packem_shared/aws-light-meta-storage-TPyQwLvk.js +0 -4
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-6URTv-Mp.js +0 -1
- package/dist/packem_shared/disk-storage-CbSSPnOf.js +0 -5
- package/dist/packem_shared/isRetryableError-B6ZS_-5I.js +0 -1
- package/dist/packem_shared/s3-base-storage-f_EyFAAt.js +0 -1
- package/dist/packem_shared/storage-CoyB2O-Y.js +0 -1
|
@@ -0,0 +1,192 @@
|
|
|
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 FirebaseFile extends File {
|
|
8
|
+
bucket?: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
publicUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class FirebaseMetaStorage extends LocalMetaStorage<FirebaseFile> {
|
|
13
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Minimal structural type for a `@google-cloud/storage` `File` as returned by
|
|
17
|
+
* `firebase-admin`'s `getStorage(app).bucket().file()`. Declared locally so the
|
|
18
|
+
* adapter type-checks without `firebase-admin` / `@google-cloud/storage`
|
|
19
|
+
* installed (optional peer dependency).
|
|
20
|
+
*/
|
|
21
|
+
interface FirebaseGcsFile {
|
|
22
|
+
copy: (destination: FirebaseGcsFile | string) => Promise<unknown>;
|
|
23
|
+
delete: (options?: {
|
|
24
|
+
ignoreNotFound?: boolean;
|
|
25
|
+
}) => Promise<unknown>;
|
|
26
|
+
download: () => Promise<[Buffer]>;
|
|
27
|
+
exists: () => Promise<[boolean]>;
|
|
28
|
+
getMetadata: () => Promise<[FirebaseGcsFileMetadata]>;
|
|
29
|
+
getSignedUrl: (options: FirebaseSignedUrlOptions) => Promise<[string]>;
|
|
30
|
+
move: (destination: FirebaseGcsFile | string) => Promise<unknown>;
|
|
31
|
+
name: string;
|
|
32
|
+
save: (data: Buffer, options?: {
|
|
33
|
+
contentType?: string;
|
|
34
|
+
resumable?: boolean;
|
|
35
|
+
}) => Promise<unknown>;
|
|
36
|
+
}
|
|
37
|
+
interface FirebaseGcsFileMetadata {
|
|
38
|
+
contentType?: string;
|
|
39
|
+
etag?: string;
|
|
40
|
+
md5Hash?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
size?: number | string;
|
|
43
|
+
timeCreated?: string;
|
|
44
|
+
updated?: string;
|
|
45
|
+
}
|
|
46
|
+
interface FirebaseSignedUrlOptions {
|
|
47
|
+
action: "delete" | "read" | "resumable" | "write";
|
|
48
|
+
contentType?: string;
|
|
49
|
+
expires: Date | number | string;
|
|
50
|
+
version?: "v2" | "v4";
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Minimal structural type for a `@google-cloud/storage` `Bucket` as returned by
|
|
54
|
+
* `firebase-admin`'s `getStorage(app).bucket()`.
|
|
55
|
+
*/
|
|
56
|
+
interface FirebaseBucket {
|
|
57
|
+
file: (key: string) => FirebaseGcsFile;
|
|
58
|
+
getFiles: (options?: {
|
|
59
|
+
maxResults?: number;
|
|
60
|
+
prefix?: string;
|
|
61
|
+
}) => Promise<[FirebaseGcsFile[]]>;
|
|
62
|
+
name?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Structural type for a `firebase-admin` `App`. Only the shape needed by
|
|
66
|
+
* `getStorage()` is declared.
|
|
67
|
+
*/
|
|
68
|
+
interface FirebaseApp {
|
|
69
|
+
name: string;
|
|
70
|
+
}
|
|
71
|
+
interface FirebaseStorageOptions extends BaseStorageOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Pre-built `firebase-admin` {@link FirebaseApp} or an already-built
|
|
74
|
+
* `@google-cloud/storage` `Bucket`. When a Bucket is supplied (detected by
|
|
75
|
+
* the presence of `.file()` and `.getFiles()`), it is used directly and no
|
|
76
|
+
* Firebase app is initialized. Use this to share an instance, run tests, or
|
|
77
|
+
* customize the underlying GCS client.
|
|
78
|
+
*/
|
|
79
|
+
app?: FirebaseApp | FirebaseBucket;
|
|
80
|
+
/**
|
|
81
|
+
* Named `firebase-admin` app to reuse/create. Defaults to the SDK default
|
|
82
|
+
* app. Ignored when `app` is supplied.
|
|
83
|
+
*/
|
|
84
|
+
appName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Storage bucket name (e.g. `my-project.appspot.com`). Falls back to
|
|
87
|
+
* `FIREBASE_STORAGE_BUCKET`. Required unless a pre-built Bucket is passed
|
|
88
|
+
* via `app`.
|
|
89
|
+
*/
|
|
90
|
+
bucket?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Service-account credentials. Ignored when `app` is supplied or
|
|
93
|
+
* `serviceAccountPath` is used. Falls back to `FIREBASE_CLIENT_EMAIL` /
|
|
94
|
+
* `FIREBASE_PRIVATE_KEY`.
|
|
95
|
+
*/
|
|
96
|
+
credentials?: {
|
|
97
|
+
clientEmail: string;
|
|
98
|
+
privateKey: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Default expiry, in seconds, for `getReadUrl` / `getUploadUrl` signed
|
|
102
|
+
* URLs. Defaults to 3600 (1 hour).
|
|
103
|
+
*/
|
|
104
|
+
defaultUrlExpiresIn?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
107
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
108
|
+
* directory.
|
|
109
|
+
*/
|
|
110
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
111
|
+
/**
|
|
112
|
+
* Google Cloud project id. Falls back to `FIREBASE_PROJECT_ID`,
|
|
113
|
+
* `GOOGLE_CLOUD_PROJECT`, or `GCLOUD_PROJECT`.
|
|
114
|
+
*/
|
|
115
|
+
projectId?: string;
|
|
116
|
+
/**
|
|
117
|
+
* When set, `getReadUrl` returns `${publicBaseUrl}/${key}` instead of a
|
|
118
|
+
* signed URL. Use for objects served through a public bucket or CDN.
|
|
119
|
+
*/
|
|
120
|
+
publicBaseUrl?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Path to a service-account JSON key file. Ignored when `app` or
|
|
123
|
+
* `credentials` is supplied. Falls back to
|
|
124
|
+
* `GOOGLE_APPLICATION_CREDENTIALS`.
|
|
125
|
+
*/
|
|
126
|
+
serviceAccountPath?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Firebase Storage backend.
|
|
130
|
+
*
|
|
131
|
+
* Firebase Storage is a Google Cloud Storage bucket under the hood; this
|
|
132
|
+
* adapter resolves a `firebase-admin` app, obtains its `@google-cloud/storage`
|
|
133
|
+
* `Bucket`, and drives single-shot uploads through it. The part stream is
|
|
134
|
+
* buffered and uploaded in one `file.save()` call. Use `getUploadUrl` for
|
|
135
|
+
* direct-from-client large transfers.
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* import { FirebaseStorage } from "@visulima/storage/provider/firebase";
|
|
139
|
+
*
|
|
140
|
+
* const storage = new FirebaseStorage({
|
|
141
|
+
* bucket: "my-project.appspot.com",
|
|
142
|
+
* projectId: process.env.FIREBASE_PROJECT_ID,
|
|
143
|
+
* credentials: {
|
|
144
|
+
* clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
|
|
145
|
+
* privateKey: process.env.FIREBASE_PRIVATE_KEY,
|
|
146
|
+
* },
|
|
147
|
+
* });
|
|
148
|
+
* ```
|
|
149
|
+
* @remarks
|
|
150
|
+
* - ⚠️ 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.
|
|
151
|
+
*/
|
|
152
|
+
declare class FirebaseStorage extends BaseStorage<FirebaseFile> {
|
|
153
|
+
static override readonly name: string;
|
|
154
|
+
override checksumTypes: string[];
|
|
155
|
+
protected meta: MetaStorage<FirebaseFile>;
|
|
156
|
+
private readonly bucket;
|
|
157
|
+
private readonly bucketName;
|
|
158
|
+
private readonly defaultUrlExpiresIn;
|
|
159
|
+
private readonly publicBaseUrl?;
|
|
160
|
+
constructor(config: FirebaseStorageOptions);
|
|
161
|
+
override get raw(): FirebaseBucket;
|
|
162
|
+
create(config: FileInit, _options?: OperationOptions): Promise<FirebaseFile>;
|
|
163
|
+
write(part: FilePart | FileQuery | FirebaseFile, options?: OperationOptions): Promise<FirebaseFile>;
|
|
164
|
+
delete({
|
|
165
|
+
id
|
|
166
|
+
}: FileQuery, options?: OperationOptions): Promise<FirebaseFile>;
|
|
167
|
+
override exists({
|
|
168
|
+
id
|
|
169
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
170
|
+
get({
|
|
171
|
+
id
|
|
172
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
173
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
174
|
+
storageClass?: string;
|
|
175
|
+
}): Promise<FirebaseFile>;
|
|
176
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<FirebaseFile>;
|
|
177
|
+
override list(limit?: number, options?: OperationOptions): Promise<FirebaseFile[]>;
|
|
178
|
+
override getReadUrl(key: string, options?: {
|
|
179
|
+
expiresIn?: number;
|
|
180
|
+
responseContentDisposition?: string;
|
|
181
|
+
responseContentType?: string;
|
|
182
|
+
}): Promise<string>;
|
|
183
|
+
override getUploadUrl(key: string, options?: {
|
|
184
|
+
contentLength?: number;
|
|
185
|
+
contentType?: string;
|
|
186
|
+
expiresIn?: number;
|
|
187
|
+
}): Promise<string>;
|
|
188
|
+
private static resolveApp;
|
|
189
|
+
private getMetaSafe;
|
|
190
|
+
private internalOnComplete;
|
|
191
|
+
}
|
|
192
|
+
export { FirebaseFile, FirebaseMetaStorage, FirebaseStorage, type FirebaseStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as r}from"../../packem_shared/FirebaseFile-JEu3plMP.js";import{default as o}from"../../packem_shared/FirebaseMetaStorage-CzyOim-J.js";import{default as s}from"../../packem_shared/FirebaseStorage-lXMXy3Pm.js";export{r as FirebaseFile,o as FirebaseMetaStorage,s as FirebaseStorage};
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { AccessOptions } from 'basic-ftp';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'node:http';
|
|
7
|
+
import 'lru-cache';
|
|
8
|
+
declare class FtpFile extends File {
|
|
9
|
+
path?: string;
|
|
10
|
+
}
|
|
11
|
+
declare class FtpMetaStorage extends LocalMetaStorage<FtpFile> {
|
|
12
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
13
|
+
}
|
|
14
|
+
interface FtpStorageOptions extends BaseStorageOptions {
|
|
15
|
+
/**
|
|
16
|
+
* `basic-ftp` access options (`host`, `port`, `user`, `password`,
|
|
17
|
+
* `secure` for FTPS, …). A fresh connection is opened and closed around
|
|
18
|
+
* every storage operation — an FTP control connection is single-session,
|
|
19
|
+
* so the adapter does not pool connections.
|
|
20
|
+
*/
|
|
21
|
+
connection: AccessOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Configure metafile storage. FTP has no native arbitrary-metadata
|
|
24
|
+
* field, so upload metadata is stored as sidecar JSON on the local
|
|
25
|
+
* disk (defaults to the OS temp directory).
|
|
26
|
+
*/
|
|
27
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
28
|
+
/**
|
|
29
|
+
* Logical "bucket root" — virtual keys live under this remote directory.
|
|
30
|
+
* The adapter creates intermediate directories on write. Leading/trailing
|
|
31
|
+
* slashes are normalized. Defaults to the connection's working directory.
|
|
32
|
+
*/
|
|
33
|
+
rootFolderPath?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* FTP / FTPS storage backend (built on `basic-ftp`).
|
|
37
|
+
*
|
|
38
|
+
* Routes virtual keys onto remote paths under `rootFolderPath`. FTP has no
|
|
39
|
+
* native metadata store, so upload metadata is kept as sidecar JSON on the
|
|
40
|
+
* local disk (see `FtpMetaStorage`).
|
|
41
|
+
*
|
|
42
|
+
* A fresh FTP connection is opened and closed around every operation: an FTP
|
|
43
|
+
* control connection is single-session, so the adapter does not pool
|
|
44
|
+
* connections.
|
|
45
|
+
*
|
|
46
|
+
* **Limitations**:
|
|
47
|
+
* - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
|
|
48
|
+
* - `getReadUrl` / `getUploadUrl` are not supported — FTP has no signed-URL concept.
|
|
49
|
+
*/
|
|
50
|
+
declare class FtpStorage extends BaseStorage<FtpFile> {
|
|
51
|
+
static override readonly name: string;
|
|
52
|
+
override checksumTypes: string[];
|
|
53
|
+
protected meta: MetaStorage<FtpFile>;
|
|
54
|
+
private readonly connection;
|
|
55
|
+
private readonly rootFolderPath;
|
|
56
|
+
constructor(config: FtpStorageOptions);
|
|
57
|
+
create(config: FileInit, _options?: OperationOptions): Promise<FtpFile>;
|
|
58
|
+
write(part: FilePart | FileQuery | FtpFile, options?: OperationOptions): Promise<FtpFile>;
|
|
59
|
+
get({
|
|
60
|
+
id
|
|
61
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
62
|
+
delete({
|
|
63
|
+
id
|
|
64
|
+
}: FileQuery, options?: OperationOptions): Promise<FtpFile>;
|
|
65
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
66
|
+
storageClass?: string;
|
|
67
|
+
}): Promise<FtpFile>;
|
|
68
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<FtpFile>;
|
|
69
|
+
override list(_limit?: number, options?: OperationOptions): Promise<FtpFile[]>;
|
|
70
|
+
override exists({
|
|
71
|
+
id
|
|
72
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
73
|
+
private walkList;
|
|
74
|
+
/**
|
|
75
|
+
* Opens a fresh single-session FTP connection for one operation. `basic-ftp`
|
|
76
|
+
* has no `AbortSignal` hook, so cancellation is best-effort: an abort
|
|
77
|
+
* destroys the control/data connection via `client.close()`, which rejects
|
|
78
|
+
* any in-flight transfer. The rejection is normalized to an `AbortError`.
|
|
79
|
+
*/
|
|
80
|
+
private run;
|
|
81
|
+
private ensureRemoteDirectory;
|
|
82
|
+
private keyToPath;
|
|
83
|
+
private pathToKey;
|
|
84
|
+
}
|
|
85
|
+
export { FtpFile, FtpMetaStorage, FtpStorage, type FtpStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as a}from"../../packem_shared/FtpFile-B8jaICTB.js";import{default as r}from"../../packem_shared/FtpMetaStorage-1Njy0DpU.js";import{default as p}from"../../packem_shared/FtpStorage-Dw94efNW.js";export{a as FtpFile,r as FtpMetaStorage,p as FtpStorage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as File, t as MetaStorageOptions, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, t as MetaStorageOptions, L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, H as HttpError, 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
3
|
import { RetryConfig } from 'gaxios';
|
|
4
4
|
import { GoogleAuthOptions, GoogleAuth } from 'google-auth-library';
|
|
@@ -116,8 +116,8 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
116
116
|
private readonly userProject;
|
|
117
117
|
constructor(config: GCStorageOptions);
|
|
118
118
|
override normalizeError(error: ClientError): HttpError;
|
|
119
|
-
create(config: FileInit): Promise<GCSFile>;
|
|
120
|
-
write(part: FilePart | FileQuery | GCSFile): Promise<GCSFile>;
|
|
119
|
+
create(config: FileInit, options?: OperationOptions): Promise<GCSFile>;
|
|
120
|
+
write(part: FilePart | FileQuery | GCSFile, options?: OperationOptions): Promise<GCSFile>;
|
|
121
121
|
/**
|
|
122
122
|
* Deletes an upload and its metadata.
|
|
123
123
|
* @param query File query containing the file ID to delete.
|
|
@@ -127,7 +127,7 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
127
127
|
*/
|
|
128
128
|
delete({
|
|
129
129
|
id
|
|
130
|
-
}: FileQuery): Promise<GCSFile>;
|
|
130
|
+
}: FileQuery, options?: OperationOptions): Promise<GCSFile>;
|
|
131
131
|
/**
|
|
132
132
|
* Copies an upload file to a new location.
|
|
133
133
|
* @param name Source file name/ID.
|
|
@@ -135,7 +135,9 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
135
135
|
* @returns Promise resolving to the copied file object.
|
|
136
136
|
* @throws {UploadError} If the source file cannot be found.
|
|
137
137
|
*/
|
|
138
|
-
copy(name: string, destination: string
|
|
138
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
139
|
+
storageClass?: string;
|
|
140
|
+
}): Promise<GCSFile>;
|
|
139
141
|
/**
|
|
140
142
|
* Moves an upload file to a new location.
|
|
141
143
|
* @param name Source file name/ID.
|
|
@@ -143,7 +145,7 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
143
145
|
* @returns Promise resolving to the moved file object.
|
|
144
146
|
* @throws {UploadError} If the source file cannot be found.
|
|
145
147
|
*/
|
|
146
|
-
move(name: string, destination: string): Promise<GCSFile>;
|
|
148
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<GCSFile>;
|
|
147
149
|
/**
|
|
148
150
|
* Gets an uploaded file by ID with content buffer.
|
|
149
151
|
* @param query File query object containing the file ID.
|
|
@@ -153,7 +155,7 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
153
155
|
*/
|
|
154
156
|
get({
|
|
155
157
|
id
|
|
156
|
-
}: FileQuery): Promise<FileReturn>;
|
|
158
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
157
159
|
/**
|
|
158
160
|
* Checks if a file exists by verifying both metadata and the actual GCS object.
|
|
159
161
|
* Returns true only if both the metadata and the GCS object exist.
|
|
@@ -162,10 +164,17 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
162
164
|
*/
|
|
163
165
|
override exists({
|
|
164
166
|
id
|
|
165
|
-
}: FileQuery): Promise<boolean>;
|
|
166
|
-
override list(limit?: number): Promise<GCSFile[]>;
|
|
167
|
-
protected internalWrite(part: GCSFile & Partial<FilePart
|
|
167
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
168
|
+
override list(limit?: number, options?: OperationOptions): Promise<GCSFile[]>;
|
|
169
|
+
protected internalWrite(part: GCSFile & Partial<FilePart>, callOptions?: OperationOptions): Promise<number>;
|
|
168
170
|
private internalOnComplete;
|
|
171
|
+
/**
|
|
172
|
+
* Merge a body-level abort signal with the caller's per-operation
|
|
173
|
+
* `options.signal` so gaxios cancels the in-flight request on either.
|
|
174
|
+
* `options.timeout` is handed to gaxios' native `timeout` instead of a
|
|
175
|
+
* second `AbortSignal.timeout` to avoid two competing deadlines.
|
|
176
|
+
*/
|
|
177
|
+
private static buildCallSignal;
|
|
169
178
|
private makeRequest;
|
|
170
179
|
private accessCheck;
|
|
171
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CDQ6IWAz.js";import{E as C}from"../../packem_shared/gcs-meta-storage-
|
|
1
|
+
import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CDQ6IWAz.js";import{E as C}from"../../packem_shared/gcs-meta-storage-Br_I-m9X.js";import{default as l}from"../../packem_shared/GCStorage-U4f4WsWC.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
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-
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
|
|
4
4
|
import { drive_v3 } from '@googleapis/drive';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -105,6 +105,7 @@ interface GoogleDriveStorageOptions extends BaseStorageOptions {
|
|
|
105
105
|
* - `getUploadUrl()` requires explicit `credentials`/`keyFilename`/`oauth`
|
|
106
106
|
* (not a pre-built `client`) so we can mint access tokens for the
|
|
107
107
|
* resumable session.
|
|
108
|
+
* - ⚠️ 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.
|
|
108
109
|
*/
|
|
109
110
|
declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
|
|
110
111
|
static override readonly name: string;
|
|
@@ -118,17 +119,19 @@ declare class GoogleDriveStorage extends BaseStorage<GoogleDriveFile> {
|
|
|
118
119
|
private readonly sharedDriveParams;
|
|
119
120
|
constructor(config: GoogleDriveStorageOptions);
|
|
120
121
|
override get raw(): drive_v3.Drive;
|
|
121
|
-
create(config: FileInit): Promise<GoogleDriveFile>;
|
|
122
|
-
write(part: FilePart | FileQuery | GoogleDriveFile): Promise<GoogleDriveFile>;
|
|
122
|
+
create(config: FileInit, _options?: OperationOptions): Promise<GoogleDriveFile>;
|
|
123
|
+
write(part: FilePart | FileQuery | GoogleDriveFile, options?: OperationOptions): Promise<GoogleDriveFile>;
|
|
123
124
|
delete({
|
|
124
125
|
id
|
|
125
|
-
}: FileQuery): Promise<GoogleDriveFile>;
|
|
126
|
+
}: FileQuery, options?: OperationOptions): Promise<GoogleDriveFile>;
|
|
126
127
|
get({
|
|
127
128
|
id
|
|
128
|
-
}: FileQuery): Promise<FileReturn>;
|
|
129
|
-
copy(name: string, destination: string
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
130
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
131
|
+
storageClass?: string;
|
|
132
|
+
}): Promise<GoogleDriveFile>;
|
|
133
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<GoogleDriveFile>;
|
|
134
|
+
override list(limit?: number, options?: OperationOptions): Promise<GoogleDriveFile[]>;
|
|
132
135
|
override getReadUrl(key: string, options?: {
|
|
133
136
|
expiresIn?: number;
|
|
134
137
|
responseContentDisposition?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"../../packem_shared/GoogleDriveFile-D0aGfGbL.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-
|
|
1
|
+
import{default as r}from"../../packem_shared/GoogleDriveFile-D0aGfGbL.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-WGuUZPyx.js";import{default as f}from"../../packem_shared/GoogleDriveStorage-C0NhBBWH.js";export{r as GoogleDriveFile,t as GoogleDriveMetaStorage,f as GoogleDriveStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-
|
|
2
|
-
export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
3
|
-
export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-
|
|
1
|
+
export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-mHcg2uLw.js";
|
|
2
|
+
export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
|
|
3
|
+
export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-RteRC-cG.js";
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e}from"../../packem_shared/disk-storage-
|
|
1
|
+
import{f as e}from"../../packem_shared/disk-storage-CKAJvhcj.js";import{default as t}from"../../packem_shared/DiskStorageWithChecksum-BvUTn7O-.js";import{v as f}from"../../packem_shared/local-meta-storage-Bi0mK6gD.js";export{e as DiskStorage,t as DiskStorageWithChecksum,f as LocalMetaStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, i as BaseStorageOptions, M as MetaStorage, R as RetryConfig, 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-
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-B11vHYNm.js";
|
|
4
4
|
import { getStore } from '@netlify/blobs';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -73,10 +73,11 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
73
73
|
private readonly siteID?;
|
|
74
74
|
private readonly token?;
|
|
75
75
|
private store;
|
|
76
|
-
private readonly
|
|
76
|
+
private readonly resolvedRetryConfig;
|
|
77
77
|
constructor(config: NetlifyBlobStorageOptions);
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
protected override getRetryConfig(): RetryConfig;
|
|
79
|
+
create(config: FileInit, _options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
80
|
+
write(part: FilePart | FileQuery | NetlifyBlobFile, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
80
81
|
/**
|
|
81
82
|
* Deletes an upload and its metadata.
|
|
82
83
|
* @param query File query containing the file ID to delete.
|
|
@@ -86,7 +87,7 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
86
87
|
*/
|
|
87
88
|
delete({
|
|
88
89
|
id
|
|
89
|
-
}: FileQuery): Promise<NetlifyBlobFile>;
|
|
90
|
+
}: FileQuery, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
90
91
|
/**
|
|
91
92
|
* Checks if a file exists by verifying both metadata and the actual Netlify Blob.
|
|
92
93
|
* Returns true only if both the metadata and the blob exist.
|
|
@@ -95,10 +96,10 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
95
96
|
*/
|
|
96
97
|
override exists({
|
|
97
98
|
id
|
|
98
|
-
}: FileQuery): Promise<boolean>;
|
|
99
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
99
100
|
get({
|
|
100
101
|
id
|
|
101
|
-
}: FileQuery): Promise<FileReturn>;
|
|
102
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
102
103
|
/**
|
|
103
104
|
* Copies an upload file to a new location.
|
|
104
105
|
* @param name Source file name/ID.
|
|
@@ -106,7 +107,9 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
106
107
|
* @returns Promise resolving to the copied file object.
|
|
107
108
|
* @throws {UploadError} If the source file cannot be found.
|
|
108
109
|
*/
|
|
109
|
-
copy(name: string, destination: string
|
|
110
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
111
|
+
storageClass?: string;
|
|
112
|
+
}): Promise<NetlifyBlobFile>;
|
|
110
113
|
/**
|
|
111
114
|
* Moves an upload file to a new location.
|
|
112
115
|
* @param name Source file name/ID.
|
|
@@ -114,7 +117,7 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
114
117
|
* @returns Promise resolving to the moved file object.
|
|
115
118
|
* @throws {UploadError} If the source file cannot be found.
|
|
116
119
|
*/
|
|
117
|
-
move(name: string, destination: string): Promise<NetlifyBlobFile>;
|
|
120
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
118
121
|
/**
|
|
119
122
|
* Updates file metadata with user-provided key-value pairs.
|
|
120
123
|
* Updates the metadata file (overwrites it) but does not update Netlify Blob metadata
|
|
@@ -131,8 +134,8 @@ declare class NetlifyBlobStorage extends BaseStorage<NetlifyBlobFile> {
|
|
|
131
134
|
*/
|
|
132
135
|
override update({
|
|
133
136
|
id
|
|
134
|
-
}: FileQuery, metadata: Partial<NetlifyBlobFile
|
|
135
|
-
override list(limit?: number): Promise<NetlifyBlobFile[]>;
|
|
137
|
+
}: FileQuery, metadata: Partial<NetlifyBlobFile>, _options?: OperationOptions): Promise<NetlifyBlobFile>;
|
|
138
|
+
override list(limit?: number, options?: OperationOptions): Promise<NetlifyBlobFile[]>;
|
|
136
139
|
private internalOnComplete;
|
|
137
140
|
/**
|
|
138
141
|
* Generate a URL for a blob in Netlify Blob store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as o}from"../../packem_shared/NetlifyBlobFile-PMZLJ8AC.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-
|
|
1
|
+
import{default as o}from"../../packem_shared/NetlifyBlobFile-PMZLJ8AC.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-ClIFdTkT.js";import{default as r}from"../../packem_shared/NetlifyBlobStorage-CO89TGvF.js";export{o as NetlifyBlobFile,a as NetlifyBlobMetaStorage,r as NetlifyBlobStorage};
|