@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,7 +1,8 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-
|
|
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
4
|
import { Dropbox } from 'dropbox';
|
|
5
|
+
import 'node:timers';
|
|
5
6
|
import 'node:crypto';
|
|
6
7
|
import 'node:http';
|
|
7
8
|
import 'lru-cache';
|
|
@@ -15,79 +16,79 @@ declare class DropboxMetaStorage extends LocalMetaStorage<DropboxFile> {
|
|
|
15
16
|
}
|
|
16
17
|
interface DropboxStorageOptions extends BaseStorageOptions {
|
|
17
18
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
* Static or dynamic access token. Pass a string for a one-shot token, or
|
|
20
|
+
* a function returning a fresh token on each call. The adapter does not
|
|
21
|
+
* cache the result of a callable — your callable is responsible for
|
|
22
|
+
* caching/refresh.
|
|
23
|
+
*/
|
|
23
24
|
accessToken?: string | (() => string | Promise<string>);
|
|
24
25
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
* Dropbox app key (client_id). Required when `refreshToken` is set.
|
|
27
|
+
*/
|
|
27
28
|
appKey?: string;
|
|
28
29
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
* Dropbox app secret (client_secret). Required for confidential clients.
|
|
31
|
+
*/
|
|
31
32
|
appSecret?: string;
|
|
32
33
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
* Pre-built `Dropbox` client. Escape hatch for callers that already wire
|
|
35
|
+
* auth themselves (e.g. with team-space `pathRoot`, custom headers, or a
|
|
36
|
+
* shared `DropboxAuth`).
|
|
37
|
+
*/
|
|
37
38
|
client?: Dropbox;
|
|
38
39
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
* Default expiry, in seconds, for temporary download links from
|
|
41
|
+
* `getReadUrl()`. Capped at 14400 (4 hours, the Dropbox maximum).
|
|
42
|
+
* Defaults to 3600 (1 hour).
|
|
43
|
+
*/
|
|
43
44
|
defaultUrlExpiresIn?: number;
|
|
44
45
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
* Configure metafiles storage. Defaults to local tmp directory.
|
|
47
|
+
*/
|
|
47
48
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
48
49
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
* When `true`, `getReadUrl` creates a public shared link instead of a
|
|
51
|
+
* temporary 4-hour link. The link is rewritten to `?dl=1` so it serves
|
|
52
|
+
* raw bytes directly.
|
|
53
|
+
*/
|
|
53
54
|
publicByDefault?: boolean;
|
|
54
55
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
* OAuth2 refresh token. When set, the adapter exchanges it for fresh
|
|
57
|
+
* access tokens at `https://api.dropboxapi.com/oauth2/token` and caches
|
|
58
|
+
* them until ~60s before expiry. Requires `appKey` (PKCE) or `appKey` +
|
|
59
|
+
* `appSecret` (confidential client).
|
|
60
|
+
*/
|
|
60
61
|
refreshToken?: string;
|
|
61
62
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
* Logical "bucket root" — virtual keys live under this folder path. Must
|
|
64
|
+
* already exist; the adapter does not create folders. Path is normalized:
|
|
65
|
+
* leading slash is added, trailing slashes stripped. Defaults to account
|
|
66
|
+
* root.
|
|
67
|
+
*/
|
|
67
68
|
rootFolderPath?: string;
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
* Dropbox storage backend.
|
|
71
|
-
*
|
|
72
|
-
* Routes virtual keys onto Dropbox paths under `rootFolderPath`. Uploads use
|
|
73
|
-
* the simple `filesUpload` endpoint up to 150 MB and switch to chunked
|
|
74
|
-
* upload sessions above that threshold.
|
|
75
|
-
*
|
|
76
|
-
* **Auth precedence**:
|
|
77
|
-
* 1. `client` (pre-built `Dropbox`)
|
|
78
|
-
* 2. `accessToken` (string or `() => string | Promise<string>`)
|
|
79
|
-
* 3. `refreshToken` + `appKey` (+ optional `appSecret`)
|
|
80
|
-
* 4. Env fallback: `DROPBOX_ACCESS_TOKEN`, or `DROPBOX_REFRESH_TOKEN` +
|
|
81
|
-
* `DROPBOX_APP_KEY` (+ optional `DROPBOX_APP_SECRET`)
|
|
82
|
-
*
|
|
83
|
-
* **Limitations**:
|
|
84
|
-
* - `metadata` and `cacheControl` are not supported (Dropbox files have no
|
|
85
|
-
* native arbitrary-metadata field, and no HTTP cache-header overrides).
|
|
86
|
-
* - `getUploadUrl` is not supported — Dropbox's `files/get_temporary_upload_link`
|
|
87
|
-
* requires a `POST` with raw body, which doesn't fit a presigned-PUT contract.
|
|
88
|
-
* - `responseContentDisposition` is not supported on signed URLs.
|
|
89
|
-
* - ⚠️ 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.
|
|
90
|
-
*/
|
|
71
|
+
* Dropbox storage backend.
|
|
72
|
+
*
|
|
73
|
+
* Routes virtual keys onto Dropbox paths under `rootFolderPath`. Uploads use
|
|
74
|
+
* the simple `filesUpload` endpoint up to 150 MB and switch to chunked
|
|
75
|
+
* upload sessions above that threshold.
|
|
76
|
+
*
|
|
77
|
+
* **Auth precedence**:
|
|
78
|
+
* 1. `client` (pre-built `Dropbox`)
|
|
79
|
+
* 2. `accessToken` (string or `() => string | Promise<string>`)
|
|
80
|
+
* 3. `refreshToken` + `appKey` (+ optional `appSecret`)
|
|
81
|
+
* 4. Env fallback: `DROPBOX_ACCESS_TOKEN`, or `DROPBOX_REFRESH_TOKEN` +
|
|
82
|
+
* `DROPBOX_APP_KEY` (+ optional `DROPBOX_APP_SECRET`)
|
|
83
|
+
*
|
|
84
|
+
* **Limitations**:
|
|
85
|
+
* - `metadata` and `cacheControl` are not supported (Dropbox files have no
|
|
86
|
+
* native arbitrary-metadata field, and no HTTP cache-header overrides).
|
|
87
|
+
* - `getUploadUrl` is not supported — Dropbox's `files/get_temporary_upload_link`
|
|
88
|
+
* requires a `POST` with raw body, which doesn't fit a presigned-PUT contract.
|
|
89
|
+
* - `responseContentDisposition` is not supported on signed URLs.
|
|
90
|
+
* - ⚠️ 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.
|
|
91
|
+
*/
|
|
91
92
|
declare class DropboxStorage extends BaseStorage<DropboxFile> {
|
|
92
93
|
static override readonly name: string;
|
|
93
94
|
override checksumTypes: string[];
|
|
@@ -101,12 +102,8 @@ declare class DropboxStorage extends BaseStorage<DropboxFile> {
|
|
|
101
102
|
override get raw(): Dropbox;
|
|
102
103
|
create(config: FileInit, _options?: OperationOptions): Promise<DropboxFile>;
|
|
103
104
|
write(part: FilePart | FileQuery | DropboxFile, options?: OperationOptions): Promise<DropboxFile>;
|
|
104
|
-
delete({
|
|
105
|
-
|
|
106
|
-
}: FileQuery, options?: OperationOptions): Promise<DropboxFile>;
|
|
107
|
-
get({
|
|
108
|
-
id
|
|
109
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
105
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<DropboxFile>;
|
|
106
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
110
107
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
111
108
|
storageClass?: string;
|
|
112
109
|
}): Promise<DropboxFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"../../packem_shared/DropboxFile-BFb7eOzy.js";import{default as t}from"../../packem_shared/DropboxMetaStorage-
|
|
1
|
+
import{default as e}from"../../packem_shared/DropboxFile-BFb7eOzy.js";import{default as t}from"../../packem_shared/DropboxMetaStorage-CJsyeQ63.js";import{default as p}from"../../packem_shared/DropboxStorage-BB9NoWK2.js";export{e as DropboxFile,t as DropboxMetaStorage,p as DropboxStorage};
|
|
@@ -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,11 +14,11 @@ declare class FirebaseMetaStorage extends LocalMetaStorage<FirebaseFile> {
|
|
|
13
14
|
constructor(config?: LocalMetaStorageOptions);
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
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
|
-
*/
|
|
17
|
+
* Minimal structural type for a `@google-cloud/storage` `File` as returned by
|
|
18
|
+
* `firebase-admin`'s `getStorage(app).bucket().file()`. Declared locally so the
|
|
19
|
+
* adapter type-checks without `firebase-admin` / `@google-cloud/storage`
|
|
20
|
+
* installed (optional peer dependency).
|
|
21
|
+
*/
|
|
21
22
|
interface FirebaseGcsFile {
|
|
22
23
|
copy: (destination: FirebaseGcsFile | string) => Promise<unknown>;
|
|
23
24
|
delete: (options?: {
|
|
@@ -50,9 +51,9 @@ interface FirebaseSignedUrlOptions {
|
|
|
50
51
|
version?: "v2" | "v4";
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
|
-
* Minimal structural type for a `@google-cloud/storage` `Bucket` as returned by
|
|
54
|
-
* `firebase-admin`'s `getStorage(app).bucket()`.
|
|
55
|
-
*/
|
|
54
|
+
* Minimal structural type for a `@google-cloud/storage` `Bucket` as returned by
|
|
55
|
+
* `firebase-admin`'s `getStorage(app).bucket()`.
|
|
56
|
+
*/
|
|
56
57
|
interface FirebaseBucket {
|
|
57
58
|
file: (key: string) => FirebaseGcsFile;
|
|
58
59
|
getFiles: (options?: {
|
|
@@ -62,93 +63,93 @@ interface FirebaseBucket {
|
|
|
62
63
|
name?: string;
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
65
|
-
* Structural type for a `firebase-admin` `App`. Only the shape needed by
|
|
66
|
-
* `getStorage()` is declared.
|
|
67
|
-
*/
|
|
66
|
+
* Structural type for a `firebase-admin` `App`. Only the shape needed by
|
|
67
|
+
* `getStorage()` is declared.
|
|
68
|
+
*/
|
|
68
69
|
interface FirebaseApp {
|
|
69
70
|
name: string;
|
|
70
71
|
}
|
|
71
72
|
interface FirebaseStorageOptions extends BaseStorageOptions {
|
|
72
73
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
* Pre-built `firebase-admin` {@link FirebaseApp} or an already-built
|
|
75
|
+
* `@google-cloud/storage` `Bucket`. When a Bucket is supplied (detected by
|
|
76
|
+
* the presence of `.file()` and `.getFiles()`), it is used directly and no
|
|
77
|
+
* Firebase app is initialized. Use this to share an instance, run tests, or
|
|
78
|
+
* customize the underlying GCS client.
|
|
79
|
+
*/
|
|
79
80
|
app?: FirebaseApp | FirebaseBucket;
|
|
80
81
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
* Named `firebase-admin` app to reuse/create. Defaults to the SDK default
|
|
83
|
+
* app. Ignored when `app` is supplied.
|
|
84
|
+
*/
|
|
84
85
|
appName?: string;
|
|
85
86
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
* Storage bucket name (e.g. `my-project.appspot.com`). Falls back to
|
|
88
|
+
* `FIREBASE_STORAGE_BUCKET`. Required unless a pre-built Bucket is passed
|
|
89
|
+
* via `app`.
|
|
90
|
+
*/
|
|
90
91
|
bucket?: string;
|
|
91
92
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
* Service-account credentials. Ignored when `app` is supplied or
|
|
94
|
+
* `serviceAccountPath` is used. Falls back to `FIREBASE_CLIENT_EMAIL` /
|
|
95
|
+
* `FIREBASE_PRIVATE_KEY`.
|
|
96
|
+
*/
|
|
96
97
|
credentials?: {
|
|
97
98
|
clientEmail: string;
|
|
98
99
|
privateKey: string;
|
|
99
100
|
};
|
|
100
101
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
* Default expiry, in seconds, for `getReadUrl` / `getUploadUrl` signed
|
|
103
|
+
* URLs. Defaults to 3600 (1 hour).
|
|
104
|
+
*/
|
|
104
105
|
defaultUrlExpiresIn?: number;
|
|
105
106
|
/**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
108
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
109
|
+
* directory.
|
|
110
|
+
*/
|
|
110
111
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
111
112
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
* Google Cloud project id. Falls back to `FIREBASE_PROJECT_ID`,
|
|
114
|
+
* `GOOGLE_CLOUD_PROJECT`, or `GCLOUD_PROJECT`.
|
|
115
|
+
*/
|
|
115
116
|
projectId?: string;
|
|
116
117
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
* When set, `getReadUrl` returns `${publicBaseUrl}/${key}` instead of a
|
|
119
|
+
* signed URL. Use for objects served through a public bucket or CDN.
|
|
120
|
+
*/
|
|
120
121
|
publicBaseUrl?: string;
|
|
121
122
|
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
* Path to a service-account JSON key file. Ignored when `app` or
|
|
124
|
+
* `credentials` is supplied. Falls back to
|
|
125
|
+
* `GOOGLE_APPLICATION_CREDENTIALS`.
|
|
126
|
+
*/
|
|
126
127
|
serviceAccountPath?: string;
|
|
127
128
|
}
|
|
128
129
|
/**
|
|
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
|
-
*/
|
|
130
|
+
* Firebase Storage backend.
|
|
131
|
+
*
|
|
132
|
+
* Firebase Storage is a Google Cloud Storage bucket under the hood; this
|
|
133
|
+
* adapter resolves a `firebase-admin` app, obtains its `@google-cloud/storage`
|
|
134
|
+
* `Bucket`, and drives single-shot uploads through it. The part stream is
|
|
135
|
+
* buffered and uploaded in one `file.save()` call. Use `getUploadUrl` for
|
|
136
|
+
* direct-from-client large transfers.
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* import { FirebaseStorage } from "@visulima/storage/provider/firebase";
|
|
140
|
+
*
|
|
141
|
+
* const storage = new FirebaseStorage({
|
|
142
|
+
* bucket: "my-project.appspot.com",
|
|
143
|
+
* projectId: process.env.FIREBASE_PROJECT_ID,
|
|
144
|
+
* credentials: {
|
|
145
|
+
* clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
|
|
146
|
+
* privateKey: process.env.FIREBASE_PRIVATE_KEY,
|
|
147
|
+
* },
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
* @remarks
|
|
151
|
+
* - ⚠️ 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.
|
|
152
|
+
*/
|
|
152
153
|
declare class FirebaseStorage extends BaseStorage<FirebaseFile> {
|
|
153
154
|
static override readonly name: string;
|
|
154
155
|
override checksumTypes: string[];
|
|
@@ -161,15 +162,9 @@ declare class FirebaseStorage extends BaseStorage<FirebaseFile> {
|
|
|
161
162
|
override get raw(): FirebaseBucket;
|
|
162
163
|
create(config: FileInit, _options?: OperationOptions): Promise<FirebaseFile>;
|
|
163
164
|
write(part: FilePart | FileQuery | FirebaseFile, options?: OperationOptions): Promise<FirebaseFile>;
|
|
164
|
-
delete({
|
|
165
|
-
|
|
166
|
-
}: FileQuery, options?: OperationOptions): Promise<
|
|
167
|
-
override exists({
|
|
168
|
-
id
|
|
169
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
170
|
-
get({
|
|
171
|
-
id
|
|
172
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
165
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<FirebaseFile>;
|
|
166
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
167
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
173
168
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
174
169
|
storageClass?: string;
|
|
175
170
|
}): Promise<FirebaseFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"../../packem_shared/FirebaseFile-BLaBxa2A.js";import{default as o}from"../../packem_shared/FirebaseMetaStorage-
|
|
1
|
+
import{default as r}from"../../packem_shared/FirebaseFile-BLaBxa2A.js";import{default as o}from"../../packem_shared/FirebaseMetaStorage-Bv_YCZ0Q.js";import{default as s}from"../../packem_shared/FirebaseStorage-BgbxzYNC.js";export{r as FirebaseFile,o as FirebaseMetaStorage,s as FirebaseStorage};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-
|
|
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
4
|
import { AccessOptions } from 'basic-ftp';
|
|
5
|
+
import 'node:timers';
|
|
5
6
|
import 'node:crypto';
|
|
6
7
|
import 'node:http';
|
|
7
8
|
import 'lru-cache';
|
|
@@ -13,40 +14,40 @@ declare class FtpMetaStorage extends LocalMetaStorage<FtpFile> {
|
|
|
13
14
|
}
|
|
14
15
|
interface FtpStorageOptions extends BaseStorageOptions {
|
|
15
16
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
* `basic-ftp` access options (`host`, `port`, `user`, `password`,
|
|
18
|
+
* `secure` for FTPS, …). A fresh connection is opened and closed around
|
|
19
|
+
* every storage operation — an FTP control connection is single-session,
|
|
20
|
+
* so the adapter does not pool connections.
|
|
21
|
+
*/
|
|
21
22
|
connection: AccessOptions;
|
|
22
23
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
* Configure metafile storage. FTP has no native arbitrary-metadata
|
|
25
|
+
* field, so upload metadata is stored as sidecar JSON on the local
|
|
26
|
+
* disk (defaults to the OS temp directory).
|
|
27
|
+
*/
|
|
27
28
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
28
29
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
* Logical "bucket root" — virtual keys live under this remote directory.
|
|
31
|
+
* The adapter creates intermediate directories on write. Leading/trailing
|
|
32
|
+
* slashes are normalized. Defaults to the connection's working directory.
|
|
33
|
+
*/
|
|
33
34
|
rootFolderPath?: string;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
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
|
-
*/
|
|
37
|
+
* FTP / FTPS storage backend (built on `basic-ftp`).
|
|
38
|
+
*
|
|
39
|
+
* Routes virtual keys onto remote paths under `rootFolderPath`. FTP has no
|
|
40
|
+
* native metadata store, so upload metadata is kept as sidecar JSON on the
|
|
41
|
+
* local disk (see `FtpMetaStorage`).
|
|
42
|
+
*
|
|
43
|
+
* A fresh FTP connection is opened and closed around every operation: an FTP
|
|
44
|
+
* control connection is single-session, so the adapter does not pool
|
|
45
|
+
* connections.
|
|
46
|
+
*
|
|
47
|
+
* **Limitations**:
|
|
48
|
+
* - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
|
|
49
|
+
* - `getReadUrl` / `getUploadUrl` are not supported — FTP has no signed-URL concept.
|
|
50
|
+
*/
|
|
50
51
|
declare class FtpStorage extends BaseStorage<FtpFile> {
|
|
51
52
|
static override readonly name: string;
|
|
52
53
|
override checksumTypes: string[];
|
|
@@ -57,32 +58,26 @@ declare class FtpStorage extends BaseStorage<FtpFile> {
|
|
|
57
58
|
constructor(config: FtpStorageOptions);
|
|
58
59
|
create(config: FileInit, _options?: OperationOptions): Promise<FtpFile>;
|
|
59
60
|
write(part: FilePart | FileQuery | FtpFile, options?: OperationOptions): Promise<FtpFile>;
|
|
60
|
-
get({
|
|
61
|
-
id
|
|
62
|
-
}: FileQuery, options?: OperationOptions & {
|
|
61
|
+
get({ id }: FileQuery, options?: OperationOptions & {
|
|
63
62
|
range?: {
|
|
64
63
|
end?: number;
|
|
65
64
|
start: number;
|
|
66
65
|
};
|
|
67
66
|
}): Promise<FileReturn>;
|
|
68
|
-
delete({
|
|
69
|
-
id
|
|
70
|
-
}: FileQuery, options?: OperationOptions): Promise<FtpFile>;
|
|
67
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<FtpFile>;
|
|
71
68
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
72
69
|
storageClass?: string;
|
|
73
70
|
}): Promise<FtpFile>;
|
|
74
71
|
move(name: string, destination: string, options?: OperationOptions): Promise<FtpFile>;
|
|
75
72
|
override list(_limit?: number, options?: OperationOptions): Promise<FtpFile[]>;
|
|
76
|
-
override exists({
|
|
77
|
-
id
|
|
78
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
73
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
79
74
|
private walkList;
|
|
80
75
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
* Opens a fresh single-session FTP connection for one operation. `basic-ftp`
|
|
77
|
+
* has no `AbortSignal` hook, so cancellation is best-effort: an abort
|
|
78
|
+
* destroys the control/data connection via `client.close()`, which rejects
|
|
79
|
+
* any in-flight transfer. The rejection is normalized to an `AbortError`.
|
|
80
|
+
*/
|
|
86
81
|
private run;
|
|
87
82
|
private ensureRemoteDirectory;
|
|
88
83
|
private keyToPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/FtpFile-ClWDYnt2.js";import{default as r}from"../../packem_shared/FtpMetaStorage-
|
|
1
|
+
import{default as a}from"../../packem_shared/FtpFile-ClWDYnt2.js";import{default as r}from"../../packem_shared/FtpMetaStorage-CJsyeQ63.js";import{default as p}from"../../packem_shared/FtpStorage-CNqXDz7P.js";export{a as FtpFile,r as FtpMetaStorage,p as FtpStorage};
|