@visulima/storage 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/adapter/nuxt/module.d.ts +8 -8
- package/dist/ai/ai-sdk/index.d.ts +51 -59
- package/dist/ai/claude/index.d.ts +104 -119
- package/dist/ai/openai/index.d.ts +86 -99
- package/dist/ai/tanstack/index.d.ts +53 -61
- package/dist/handler/http/fetch/index.d.ts +201 -201
- package/dist/handler/http/hono/index.d.ts +59 -59
- package/dist/handler/http/nextjs/index.d.ts +54 -54
- package/dist/handler/http/node/index.d.ts +233 -246
- package/dist/handler/http/solid-start/index.d.ts +54 -54
- package/dist/index.d.ts +70 -70
- package/dist/index.js +1 -1
- package/dist/packem_shared/{AwsLightStorage-BK-WPL0h.js → AwsLightStorage-EsqkAtU5.js} +1 -1
- package/dist/packem_shared/{AzureStorage-1UvDIQZd.js → AzureStorage-DL-U7qFG.js} +1 -1
- package/dist/packem_shared/BoxMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-B8_oCz27.js} +1 -1
- package/dist/packem_shared/BunS3MetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-_PVXu_na.js} +1 -1
- package/dist/packem_shared/BunnyMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-BsoWjScH.js} +1 -1
- package/dist/packem_shared/CloudinaryMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-BNwiLF9V.js} +1 -1
- package/dist/packem_shared/{DiskStorage-CI07TVNu.js → DiskStorage-D-NtQDms.js} +1 -1
- package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-UnCtyEvs.js} +1 -1
- package/dist/packem_shared/DropboxMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BS9kj0nH.js} +1 -1
- package/dist/packem_shared/FirebaseMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-DNquii2p.js} +1 -1
- package/dist/packem_shared/FtpMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-Bd004--s.js} +1 -1
- package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-Bf4qDFB1.js} +1 -1
- package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-ChqEpgqR.js} +1 -1
- package/dist/packem_shared/GoogleDriveMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-v1glykjd.js} +1 -1
- package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-YWPBYEe7.js} +1 -1
- package/dist/packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{NetlifyBlobStorage-CkpCCoN1.js → NetlifyBlobStorage-BPyEWSnx.js} +1 -1
- package/dist/packem_shared/OneDriveMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-BJ3Kzxc5.js} +1 -1
- package/dist/packem_shared/PocketBaseMetaStorage-DnrxOQhO.js +1 -0
- package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-DqKHbbvn.js} +1 -1
- package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-BiI2k6d1.js} +1 -1
- package/dist/packem_shared/SftpMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-w8XdtZtw.js} +1 -1
- package/dist/packem_shared/SharePointMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-DpDpI7Ln.js} +1 -1
- package/dist/packem_shared/SupabaseMetaStorage-xlHfKwmR.js +1 -0
- package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-B_ugUCs7.js} +1 -1
- package/dist/packem_shared/UploadThingMetaStorage-BI9YXcwU.js +1 -0
- package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-_H45IVqX.js} +1 -1
- package/dist/packem_shared/VercelBlobMetaStorage-CHWrhgg2.js +1 -0
- package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-U1YMKeHs.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/disk-storage-BwPk2IRa.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-CQucFacO.d.ts +146 -0
- package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-DeDH3Ilt.d.ts} +2 -2
- package/dist/packem_shared/files.d-D8H_ge9Y.d.ts +655 -0
- package/dist/packem_shared/{gcs-meta-storage-B7BnctnV.js → gcs-meta-storage-DQGu_cHq.js} +1 -1
- package/dist/packem_shared/local-meta-storage-DJDcuxf1.js +11 -0
- package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-DuTEzyii.d.ts} +7 -7
- package/dist/packem_shared/media-transformer.d-CvMFjINm.d.ts +331 -0
- package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BRdTiY8y.d.ts} +32 -40
- package/dist/packem_shared/{s3-base-storage-BoTyhuzO.js → s3-base-storage-CMUui93V.js} +1 -1
- package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-Cg7m4FuH.d.ts} +64 -70
- package/dist/packem_shared/storage.d-DIav_lF1.d.ts +1163 -0
- package/dist/packem_shared/tus-base.d-BiEg5t4t.d.ts +102 -0
- package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-CAAzKiI6.d.ts} +134 -134
- package/dist/packem_shared/types.d-DgHhkCAl.d.ts +104 -0
- package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-jAs_Rp_v.d.ts} +3 -3
- package/dist/storage/aws/clients/index.d.ts +388 -388
- package/dist/storage/aws/index.d.ts +109 -113
- package/dist/storage/aws/index.js +1 -1
- package/dist/storage/aws-light/index.d.ts +63 -67
- package/dist/storage/aws-light/index.js +1 -1
- package/dist/storage/azure/index.d.ts +133 -139
- package/dist/storage/azure/index.js +1 -1
- package/dist/storage/box/index.d.ts +88 -92
- package/dist/storage/box/index.js +1 -1
- package/dist/storage/bun-s3/index.d.ts +70 -76
- package/dist/storage/bun-s3/index.js +1 -1
- package/dist/storage/bunny/index.d.ts +51 -55
- package/dist/storage/bunny/index.js +1 -1
- package/dist/storage/cloudinary/index.d.ts +53 -59
- package/dist/storage/cloudinary/index.js +1 -1
- package/dist/storage/dropbox/index.d.ts +58 -62
- package/dist/storage/dropbox/index.js +1 -1
- package/dist/storage/firebase/index.d.ts +73 -79
- package/dist/storage/firebase/index.js +1 -1
- package/dist/storage/ftp/index.d.ts +37 -43
- package/dist/storage/ftp/index.js +1 -1
- package/dist/storage/gcs/index.d.ts +89 -95
- package/dist/storage/gcs/index.js +1 -1
- package/dist/storage/google-drive/index.d.ts +68 -72
- 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/memory/index.d.ts +2 -2
- package/dist/storage/netlify-blob/index.d.ts +85 -93
- package/dist/storage/netlify-blob/index.js +1 -1
- package/dist/storage/onedrive/index.d.ts +43 -53
- package/dist/storage/onedrive/index.js +1 -1
- package/dist/storage/pocketbase/index.d.ts +66 -72
- package/dist/storage/pocketbase/index.js +1 -1
- package/dist/storage/sftp/index.d.ts +39 -45
- package/dist/storage/sftp/index.js +1 -1
- package/dist/storage/sharepoint/index.d.ts +95 -95
- package/dist/storage/sharepoint/index.js +1 -1
- package/dist/storage/supabase/index.d.ts +49 -55
- package/dist/storage/supabase/index.js +1 -1
- package/dist/storage/uploadthing/index.d.ts +33 -37
- package/dist/storage/uploadthing/index.js +1 -1
- package/dist/storage/vercel-blob/index.d.ts +109 -115
- package/dist/storage/vercel-blob/index.js +1 -1
- package/dist/transformer/audio-transformer.d.ts +96 -96
- package/dist/transformer/image-transformer.d.ts +422 -422
- package/dist/transformer/index.d.ts +34 -34
- package/dist/transformer/video-transformer.d.ts +111 -111
- package/package.json +1 -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/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/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/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/local-meta-storage-iuJnu90B.js +0 -11
- package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
- 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,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
|
|
4
4
|
import { ConnectOptions } from 'ssh2-sftp-client';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -13,41 +13,41 @@ declare class SftpMetaStorage extends LocalMetaStorage<SftpFile> {
|
|
|
13
13
|
}
|
|
14
14
|
interface SftpStorageOptions extends BaseStorageOptions {
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
* ssh2-sftp-client connection options (`host`, `port`, `username`,
|
|
17
|
+
* `password`, `privateKey`, `passphrase`, …). A fresh connection is
|
|
18
|
+
* opened and closed around every storage operation — the underlying
|
|
19
|
+
* SSH channel is not safe for concurrent use, so the adapter does not
|
|
20
|
+
* pool connections.
|
|
21
|
+
*/
|
|
22
22
|
connection: ConnectOptions;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
* Configure metafile storage. SFTP has no native arbitrary-metadata
|
|
25
|
+
* field, so upload metadata is stored as sidecar JSON on the local
|
|
26
|
+
* disk (defaults to the OS temp directory).
|
|
27
|
+
*/
|
|
28
28
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
* Logical "bucket root" — virtual keys live under this remote directory.
|
|
31
|
+
* The adapter creates intermediate directories on write. Leading/trailing
|
|
32
|
+
* slashes are normalized. Defaults to the connection's home directory.
|
|
33
|
+
*/
|
|
34
34
|
rootFolderPath?: string;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* SFTP storage backend (built on `ssh2-sftp-client`).
|
|
38
|
-
*
|
|
39
|
-
* Routes virtual keys onto remote paths under `rootFolderPath`. SFTP has no
|
|
40
|
-
* native metadata store, so upload metadata is kept as sidecar JSON on the
|
|
41
|
-
* local disk (see `SftpMetaStorage`).
|
|
42
|
-
*
|
|
43
|
-
* A fresh SFTP connection is opened and closed around every operation: the
|
|
44
|
-
* underlying SSH channel is not safe for concurrent use, so the adapter does
|
|
45
|
-
* not pool connections.
|
|
46
|
-
*
|
|
47
|
-
* **Limitations**:
|
|
48
|
-
* - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
|
|
49
|
-
* - `getReadUrl` / `getUploadUrl` are not supported — SFTP has no signed-URL concept.
|
|
50
|
-
*/
|
|
37
|
+
* SFTP storage backend (built on `ssh2-sftp-client`).
|
|
38
|
+
*
|
|
39
|
+
* Routes virtual keys onto remote paths under `rootFolderPath`. SFTP has no
|
|
40
|
+
* native metadata store, so upload metadata is kept as sidecar JSON on the
|
|
41
|
+
* local disk (see `SftpMetaStorage`).
|
|
42
|
+
*
|
|
43
|
+
* A fresh SFTP connection is opened and closed around every operation: the
|
|
44
|
+
* underlying SSH channel is not safe for concurrent use, so the adapter does
|
|
45
|
+
* not pool connections.
|
|
46
|
+
*
|
|
47
|
+
* **Limitations**:
|
|
48
|
+
* - `write()` buffers the full part in memory before uploading (no remote append), so chunked uploads overwrite rather than append.
|
|
49
|
+
* - `getReadUrl` / `getUploadUrl` are not supported — SFTP has no signed-URL concept.
|
|
50
|
+
*/
|
|
51
51
|
declare class SftpStorage extends BaseStorage<SftpFile> {
|
|
52
52
|
static override readonly name: string;
|
|
53
53
|
override checksumTypes: string[];
|
|
@@ -58,33 +58,27 @@ declare class SftpStorage extends BaseStorage<SftpFile> {
|
|
|
58
58
|
constructor(config: SftpStorageOptions);
|
|
59
59
|
create(config: FileInit, _options?: OperationOptions): Promise<SftpFile>;
|
|
60
60
|
write(part: FilePart | FileQuery | SftpFile, options?: OperationOptions): Promise<SftpFile>;
|
|
61
|
-
get({
|
|
62
|
-
id
|
|
63
|
-
}: FileQuery, options?: OperationOptions & {
|
|
61
|
+
get({ id }: FileQuery, options?: OperationOptions & {
|
|
64
62
|
range?: {
|
|
65
63
|
end?: number;
|
|
66
64
|
start: number;
|
|
67
65
|
};
|
|
68
66
|
}): Promise<FileReturn>;
|
|
69
|
-
delete({
|
|
70
|
-
id
|
|
71
|
-
}: FileQuery, options?: OperationOptions): Promise<SftpFile>;
|
|
67
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<SftpFile>;
|
|
72
68
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
73
69
|
storageClass?: string;
|
|
74
70
|
}): Promise<SftpFile>;
|
|
75
71
|
move(name: string, destination: string, options?: OperationOptions): Promise<SftpFile>;
|
|
76
72
|
override list(_limit?: number, options?: OperationOptions): Promise<SftpFile[]>;
|
|
77
|
-
override exists({
|
|
78
|
-
id
|
|
79
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
73
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
80
74
|
private walkList;
|
|
81
75
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
* Opens a fresh single-session SFTP connection for one operation.
|
|
77
|
+
* `ssh2-sftp-client` has no `AbortSignal` hook, so cancellation is
|
|
78
|
+
* best-effort: an abort ends the SSH channel via `client.end()`, which
|
|
79
|
+
* rejects any in-flight transfer. The rejection is normalized to an
|
|
80
|
+
* `AbortError`.
|
|
81
|
+
*/
|
|
88
82
|
private run;
|
|
89
83
|
private keyToPath;
|
|
90
84
|
private pathToKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/SftpFile-ClWDYnt2.js";import{default as o}from"../../packem_shared/SftpMetaStorage-
|
|
1
|
+
import{default as a}from"../../packem_shared/SftpFile-ClWDYnt2.js";import{default as o}from"../../packem_shared/SftpMetaStorage-CHWrhgg2.js";import{default as p}from"../../packem_shared/SftpStorage-w8XdtZtw.js";export{a as SftpFile,o as SftpMetaStorage,p as SftpStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-
|
|
2
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
3
|
-
import { 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 { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-DgHhkCAl.js";
|
|
2
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
|
|
3
|
+
import { L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
|
|
4
4
|
import { Readable } from 'node:stream';
|
|
5
5
|
import { Client } from '@microsoft/microsoft-graph-client';
|
|
6
6
|
import 'node:crypto';
|
|
@@ -11,125 +11,125 @@ declare class SharePointMetaStorage extends LocalMetaStorage<SharePointFile> {
|
|
|
11
11
|
constructor(config?: LocalMetaStorageOptions);
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Options for the SharePoint storage backend.
|
|
15
|
-
*
|
|
16
|
-
* A SharePoint document library is a Microsoft Graph drive. This adapter
|
|
17
|
-
* resolves a site + document library down to a `driveId` and then delegates
|
|
18
|
-
* every storage operation to an internal {@link OneDriveStorage}.
|
|
19
|
-
*
|
|
20
|
-
* **Site targeting** (resolved in this order):
|
|
21
|
-
* 1. `driveId` (env `SHAREPOINT_DRIVE_ID`) — short-circuits site resolution.
|
|
22
|
-
* 2. `siteId` (env `SHAREPOINT_SITE_ID`).
|
|
23
|
-
* 3. `siteUrl` (env `SHAREPOINT_SITE_URL`) — parsed into hostname + path.
|
|
24
|
-
* 4. `hostname` (env `SHAREPOINT_HOSTNAME`) + `sitePath`.
|
|
25
|
-
*
|
|
26
|
-
* Once the site is known, `documentLibrary` selects a specific drive from the
|
|
27
|
-
* site's drive list by display name; otherwise the site's default drive is
|
|
28
|
-
* used.
|
|
29
|
-
*
|
|
30
|
-
* **Auth** mirrors {@link OneDriveStorageOptions}. Env fallbacks resolve the
|
|
31
|
-
* `SHAREPOINT_*` variables first and then the matching `ONEDRIVE_*`
|
|
32
|
-
* variables.
|
|
33
|
-
*/
|
|
14
|
+
* Options for the SharePoint storage backend.
|
|
15
|
+
*
|
|
16
|
+
* A SharePoint document library is a Microsoft Graph drive. This adapter
|
|
17
|
+
* resolves a site + document library down to a `driveId` and then delegates
|
|
18
|
+
* every storage operation to an internal {@link OneDriveStorage}.
|
|
19
|
+
*
|
|
20
|
+
* **Site targeting** (resolved in this order):
|
|
21
|
+
* 1. `driveId` (env `SHAREPOINT_DRIVE_ID`) — short-circuits site resolution.
|
|
22
|
+
* 2. `siteId` (env `SHAREPOINT_SITE_ID`).
|
|
23
|
+
* 3. `siteUrl` (env `SHAREPOINT_SITE_URL`) — parsed into hostname + path.
|
|
24
|
+
* 4. `hostname` (env `SHAREPOINT_HOSTNAME`) + `sitePath`.
|
|
25
|
+
*
|
|
26
|
+
* Once the site is known, `documentLibrary` selects a specific drive from the
|
|
27
|
+
* site's drive list by display name; otherwise the site's default drive is
|
|
28
|
+
* used.
|
|
29
|
+
*
|
|
30
|
+
* **Auth** mirrors {@link OneDriveStorageOptions}. Env fallbacks resolve the
|
|
31
|
+
* `SHAREPOINT_*` variables first and then the matching `ONEDRIVE_*`
|
|
32
|
+
* variables.
|
|
33
|
+
*/
|
|
34
34
|
interface SharePointStorageOptions extends BaseStorageOptions {
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
* Static or dynamic access token. Pass a string for a one-shot token, or
|
|
37
|
+
* a function returning a fresh token on each call.
|
|
38
|
+
*/
|
|
39
39
|
accessToken?: string | (() => string | Promise<string>);
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
* Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
|
|
42
|
+
* callers that wire up their own `AuthenticationProvider` and also used to
|
|
43
|
+
* resolve the site/library when site targeting is required.
|
|
44
|
+
*/
|
|
45
45
|
client?: Client;
|
|
46
46
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
* Client-credentials auth — for app-only / daemon scenarios. Same shape as
|
|
48
|
+
* {@link OneDriveStorageOptions.clientCredentials}.
|
|
49
|
+
*/
|
|
50
50
|
clientCredentials?: OneDriveStorageOptions["clientCredentials"];
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
* Timeout, in milliseconds, for polling the async-copy monitor URL.
|
|
53
|
+
* Defaults to 60_000 (60s).
|
|
54
|
+
*/
|
|
55
55
|
copyTimeoutMs?: number;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
* Display name of the document library (drive) to target within the
|
|
58
|
+
* resolved site. When omitted, the site's default drive is used.
|
|
59
|
+
*/
|
|
60
60
|
documentLibrary?: string;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
* Target drive (document library) by ID. Short-circuits site resolution.
|
|
63
|
+
* Env fallback: `SHAREPOINT_DRIVE_ID`.
|
|
64
|
+
*/
|
|
65
65
|
driveId?: string;
|
|
66
66
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
* SharePoint host name (e.g. `contoso.sharepoint.com`). Combined with
|
|
68
|
+
* `sitePath` to resolve the site. Env fallback: `SHAREPOINT_HOSTNAME`.
|
|
69
|
+
*/
|
|
70
70
|
hostname?: string;
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
* Configure metafiles storage. Defaults to local tmp directory.
|
|
73
|
+
*/
|
|
74
74
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
75
75
|
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
* OAuth2 refresh-token auth — for delegated user scenarios. Same shape as
|
|
77
|
+
* {@link OneDriveStorageOptions.oauth}.
|
|
78
|
+
*/
|
|
79
79
|
oauth?: OneDriveStorageOptions["oauth"];
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
* When `true`, `getReadUrl` creates an anonymous shared link with `view`
|
|
82
|
+
* permission. Otherwise it returns the short-lived pre-authenticated
|
|
83
|
+
* `@microsoft.graph.downloadUrl` from the item metadata.
|
|
84
|
+
*/
|
|
85
85
|
publicByDefault?: boolean;
|
|
86
86
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
* Logical "bucket root" — virtual keys live under this folder path within
|
|
88
|
+
* the target drive. Must already exist. Defaults to drive root.
|
|
89
|
+
*/
|
|
90
90
|
rootFolderPath?: string;
|
|
91
91
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
* Target a SharePoint site by its Graph site ID. Env fallback:
|
|
93
|
+
* `SHAREPOINT_SITE_ID`.
|
|
94
|
+
*/
|
|
95
95
|
siteId?: string;
|
|
96
96
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
* Server-relative site path (e.g. `/sites/Marketing`). Combined with
|
|
98
|
+
* `hostname` to resolve the site.
|
|
99
|
+
*/
|
|
100
100
|
sitePath?: string;
|
|
101
101
|
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
* Full SharePoint site URL (e.g.
|
|
103
|
+
* `https://contoso.sharepoint.com/sites/Marketing`). Parsed into a host
|
|
104
|
+
* name + server-relative path. Env fallback: `SHAREPOINT_SITE_URL`.
|
|
105
|
+
*/
|
|
106
106
|
siteUrl?: string;
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* SharePoint document-library storage backend (Microsoft Graph).
|
|
110
|
-
*
|
|
111
|
-
* A SharePoint document library is a Microsoft Graph drive. This adapter
|
|
112
|
-
* resolves a site + document library to a `driveId` and then delegates every
|
|
113
|
-
* storage operation to an internal {@link OneDriveStorage}. No Graph upload
|
|
114
|
-
* logic is reimplemented here.
|
|
115
|
-
*
|
|
116
|
-
* Site resolution is lazy: the Graph client is built eagerly (so auth errors
|
|
117
|
-
* surface at construction) but the site/library → `driveId` lookup runs on the
|
|
118
|
-
* first storage operation, because resolution is async and constructors cannot
|
|
119
|
-
* be.
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* import { SharePointStorage } from "@visulima/storage/provider/sharepoint";
|
|
123
|
-
*
|
|
124
|
-
* const storage = new SharePointStorage({
|
|
125
|
-
* siteUrl: "https://contoso.sharepoint.com/sites/Marketing",
|
|
126
|
-
* documentLibrary: "Documents",
|
|
127
|
-
* clientCredentials: { tenantId, clientId, clientSecret },
|
|
128
|
-
* });
|
|
129
|
-
* ```
|
|
130
|
-
* @remarks
|
|
131
|
-
* - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
|
|
132
|
-
*/
|
|
109
|
+
* SharePoint document-library storage backend (Microsoft Graph).
|
|
110
|
+
*
|
|
111
|
+
* A SharePoint document library is a Microsoft Graph drive. This adapter
|
|
112
|
+
* resolves a site + document library to a `driveId` and then delegates every
|
|
113
|
+
* storage operation to an internal {@link OneDriveStorage}. No Graph upload
|
|
114
|
+
* logic is reimplemented here.
|
|
115
|
+
*
|
|
116
|
+
* Site resolution is lazy: the Graph client is built eagerly (so auth errors
|
|
117
|
+
* surface at construction) but the site/library → `driveId` lookup runs on the
|
|
118
|
+
* first storage operation, because resolution is async and constructors cannot
|
|
119
|
+
* be.
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { SharePointStorage } from "@visulima/storage/provider/sharepoint";
|
|
123
|
+
*
|
|
124
|
+
* const storage = new SharePointStorage({
|
|
125
|
+
* siteUrl: "https://contoso.sharepoint.com/sites/Marketing",
|
|
126
|
+
* documentLibrary: "Documents",
|
|
127
|
+
* clientCredentials: { tenantId, clientId, clientSecret },
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
* @remarks
|
|
131
|
+
* - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
|
|
132
|
+
*/
|
|
133
133
|
declare class SharePointStorage extends BaseStorage<SharePointFile> {
|
|
134
134
|
static override readonly name: string;
|
|
135
135
|
override checksumTypes: string[];
|
|
@@ -168,10 +168,10 @@ declare class SharePointStorage extends BaseStorage<SharePointFile> {
|
|
|
168
168
|
expiresIn?: number;
|
|
169
169
|
}): Promise<string>;
|
|
170
170
|
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
* Resolve the target document library to a `driveId` and construct the
|
|
172
|
+
* internal {@link OneDriveStorage}. Memoized so resolution runs at most
|
|
173
|
+
* once.
|
|
174
|
+
*/
|
|
175
175
|
private getInner;
|
|
176
176
|
private buildInner;
|
|
177
177
|
private resolveDriveId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/SharePointFile-Blz9FS4h.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/SharePointFile-Blz9FS4h.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-CHWrhgg2.js";import{default as S}from"../../packem_shared/SharePointStorage-DpDpI7Ln.js";export{t as SharePointFile,r as SharePointMetaStorage,S as SharePointStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, 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-DIav_lF1.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-DuTEzyii.js";
|
|
4
4
|
import { StorageClient } from '@supabase/storage-js';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -15,65 +15,65 @@ declare class SupabaseMetaStorage extends LocalMetaStorage<SupabaseFile> {
|
|
|
15
15
|
}
|
|
16
16
|
interface SupabaseStorageOptions extends BaseStorageOptions {
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
* Storage bucket name. Created in the Supabase dashboard. The adapter
|
|
19
|
+
* does not create or delete buckets.
|
|
20
|
+
*/
|
|
21
21
|
bucket: string;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* Pre-built `StorageClient` from `@supabase/storage-js`. Mutually
|
|
24
|
+
* exclusive with `serviceKey` + `url`. Use this when you want to share
|
|
25
|
+
* a `StorageClient` instance, customize `fetch`, or pass extra headers.
|
|
26
|
+
*/
|
|
27
27
|
client?: StorageClient;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
* Default expiry, in seconds, for `getReadUrl`. Capped at 1 week (Supabase
|
|
30
|
+
* maximum). Defaults to 3600 (1 hour).
|
|
31
|
+
*/
|
|
32
32
|
defaultUrlExpiresIn?: number;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
* Override the global `fetch` (e.g. for tests, custom timeouts, retries).
|
|
35
|
+
* Ignored when `client` is supplied.
|
|
36
|
+
*/
|
|
37
37
|
fetch?: typeof globalThis.fetch;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
40
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
41
|
+
* directory.
|
|
42
|
+
*/
|
|
43
43
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
* Supabase service-role key (or anon key with appropriate RLS).
|
|
46
|
+
* Ignored when `client` is supplied. Falls back to `SUPABASE_SERVICE_ROLE_KEY`
|
|
47
|
+
* or `SUPABASE_KEY`.
|
|
48
|
+
*/
|
|
49
49
|
serviceKey?: string;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
* Supabase project URL (e.g. `https://abc.supabase.co`). The adapter
|
|
52
|
+
* appends `/storage/v1` automatically. Ignored when `client` is supplied.
|
|
53
|
+
* Falls back to `SUPABASE_URL`.
|
|
54
|
+
*/
|
|
55
55
|
url?: string;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Supabase Storage backend.
|
|
59
|
-
*
|
|
60
|
-
* Single-shot uploads only — Supabase Storage exposes a TUS endpoint but
|
|
61
|
-
* the JS SDK's `upload()` is HTTP `POST` with the full body. This adapter
|
|
62
|
-
* buffers the part stream and uploads in one request. Use `signedUploadUrl`
|
|
63
|
-
* for direct-from-client large transfers.
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* import { SupabaseStorage } from "@visulima/storage/provider/supabase";
|
|
67
|
-
*
|
|
68
|
-
* const storage = new SupabaseStorage({
|
|
69
|
-
* url: process.env.SUPABASE_URL,
|
|
70
|
-
* serviceKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
|
|
71
|
-
* bucket: "avatars",
|
|
72
|
-
* });
|
|
73
|
-
* ```
|
|
74
|
-
* @remarks
|
|
75
|
-
* - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
|
|
76
|
-
*/
|
|
58
|
+
* Supabase Storage backend.
|
|
59
|
+
*
|
|
60
|
+
* Single-shot uploads only — Supabase Storage exposes a TUS endpoint but
|
|
61
|
+
* the JS SDK's `upload()` is HTTP `POST` with the full body. This adapter
|
|
62
|
+
* buffers the part stream and uploads in one request. Use `signedUploadUrl`
|
|
63
|
+
* for direct-from-client large transfers.
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { SupabaseStorage } from "@visulima/storage/provider/supabase";
|
|
67
|
+
*
|
|
68
|
+
* const storage = new SupabaseStorage({
|
|
69
|
+
* url: process.env.SUPABASE_URL,
|
|
70
|
+
* serviceKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
|
|
71
|
+
* bucket: "avatars",
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
* @remarks
|
|
75
|
+
* - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
|
|
76
|
+
*/
|
|
77
77
|
declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
|
|
78
78
|
static override readonly name: string;
|
|
79
79
|
override checksumTypes: string[];
|
|
@@ -85,15 +85,9 @@ declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
|
|
|
85
85
|
override get raw(): StorageClient;
|
|
86
86
|
create(config: FileInit, _options?: OperationOptions): Promise<SupabaseFile>;
|
|
87
87
|
write(part: FilePart | FileQuery | SupabaseFile, options?: OperationOptions): Promise<SupabaseFile>;
|
|
88
|
-
delete({
|
|
89
|
-
|
|
90
|
-
}: FileQuery, options?: OperationOptions): Promise<
|
|
91
|
-
override exists({
|
|
92
|
-
id
|
|
93
|
-
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
94
|
-
get({
|
|
95
|
-
id
|
|
96
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
88
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<SupabaseFile>;
|
|
89
|
+
override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
90
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
97
91
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
98
92
|
storageClass?: string;
|
|
99
93
|
}): Promise<SupabaseFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/SupabaseFile-Bo5B-vM1.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/SupabaseFile-Bo5B-vM1.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-xlHfKwmR.js";import{default as p}from"../../packem_shared/SupabaseStorage-B_ugUCs7.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { UTApi } from 'uploadthing/server';
|
|
2
|
-
import { L as LocalMetaStorageOptions, l as BaseStorageOptions, F as File, 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-
|
|
2
|
+
import { L as LocalMetaStorageOptions, l as BaseStorageOptions, F as File, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
|
|
3
3
|
import 'node:stream';
|
|
4
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
4
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
import 'lru-cache';
|
|
8
8
|
interface UploadThingStorageOptions extends BaseStorageOptions {
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
* ACL applied to uploads. Drives `getReadUrl` behavior — `"public-read"`
|
|
11
|
+
* returns the permanent CDN URL, `"private"` mints a short-lived signed
|
|
12
|
+
* URL via `generateSignedURL`. Defaults to `"public-read"`.
|
|
13
|
+
*/
|
|
14
14
|
acl?: "private" | "public-read";
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Pre-built `UTApi` instance. Use this to share an instance, customize
|
|
17
|
+
* `fetch`, or inject test stubs. Mutually exclusive with `token`.
|
|
18
|
+
*/
|
|
19
19
|
client?: UTApi;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
* Default expiry (seconds) for `getReadUrl` when `acl` is `"private"`.
|
|
22
|
+
* Capped at 7 days (UploadThing maximum). Defaults to 3600 (1 hour).
|
|
23
|
+
*/
|
|
24
24
|
defaultUrlExpiresIn?: number;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
* Configure metafiles storage for resumable-upload bookkeeping.
|
|
27
|
+
*/
|
|
28
28
|
metaStorageConfig?: LocalMetaStorageOptions;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
* UploadThing token (base64-encoded JSON: `{ apiKey, appId, regions[] }`).
|
|
31
|
+
* Falls back to `UPLOADTHING_TOKEN`. Ignored when `client` is supplied.
|
|
32
|
+
*/
|
|
33
33
|
token?: string;
|
|
34
34
|
}
|
|
35
35
|
declare class UploadThingFile extends File {
|
|
@@ -42,20 +42,20 @@ declare class UploadThingMetaStorage extends LocalMetaStorage<UploadThingFile> {
|
|
|
42
42
|
constructor(config?: LocalMetaStorageOptions);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* UploadThing storage backend.
|
|
46
|
-
*
|
|
47
|
-
* Uses `UTApi` from `uploadthing/server`. Uploads via `uploadFiles(UTFile)`,
|
|
48
|
-
* keyed by user-supplied `customId` so subsequent operations (delete, signed
|
|
49
|
-
* URL, list) round-trip on the user's key, not UploadThing's internal fileKey.
|
|
50
|
-
*
|
|
51
|
-
* **Limitations**:
|
|
52
|
-
* - No native server-side `copy` — implemented as download + re-upload.
|
|
53
|
-
* - `list` has no server-side prefix filter; prefix filtering happens client-
|
|
54
|
-
* side within a page.
|
|
55
|
-
* - No `responseContentDisposition` override on signed URLs.
|
|
56
|
-
* @remarks
|
|
57
|
-
* - ⚠️ 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.
|
|
58
|
-
*/
|
|
45
|
+
* UploadThing storage backend.
|
|
46
|
+
*
|
|
47
|
+
* Uses `UTApi` from `uploadthing/server`. Uploads via `uploadFiles(UTFile)`,
|
|
48
|
+
* keyed by user-supplied `customId` so subsequent operations (delete, signed
|
|
49
|
+
* URL, list) round-trip on the user's key, not UploadThing's internal fileKey.
|
|
50
|
+
*
|
|
51
|
+
* **Limitations**:
|
|
52
|
+
* - No native server-side `copy` — implemented as download + re-upload.
|
|
53
|
+
* - `list` has no server-side prefix filter; prefix filtering happens client-
|
|
54
|
+
* side within a page.
|
|
55
|
+
* - No `responseContentDisposition` override on signed URLs.
|
|
56
|
+
* @remarks
|
|
57
|
+
* - ⚠️ 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.
|
|
58
|
+
*/
|
|
59
59
|
declare class UploadThingStorage extends BaseStorage<UploadThingFile> {
|
|
60
60
|
static override readonly name: string;
|
|
61
61
|
override checksumTypes: string[];
|
|
@@ -68,12 +68,8 @@ declare class UploadThingStorage extends BaseStorage<UploadThingFile> {
|
|
|
68
68
|
override get raw(): UTApi;
|
|
69
69
|
create(config: FileInit, _options?: OperationOptions): Promise<UploadThingFile>;
|
|
70
70
|
write(part: FilePart | FileQuery | UploadThingFile, options?: OperationOptions): Promise<UploadThingFile>;
|
|
71
|
-
delete({
|
|
72
|
-
|
|
73
|
-
}: FileQuery, options?: OperationOptions): Promise<UploadThingFile>;
|
|
74
|
-
get({
|
|
75
|
-
id
|
|
76
|
-
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
71
|
+
delete({ id }: FileQuery, options?: OperationOptions): Promise<UploadThingFile>;
|
|
72
|
+
get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
77
73
|
copy(name: string, destination: string, options?: OperationOptions & {
|
|
78
74
|
storageClass?: string;
|
|
79
75
|
}): Promise<UploadThingFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"../../packem_shared/UploadThingFile-BTFMpcIA.js";import{default as r}from"../../packem_shared/UploadThingMetaStorage-
|
|
1
|
+
import{default as e}from"../../packem_shared/UploadThingFile-BTFMpcIA.js";import{default as r}from"../../packem_shared/UploadThingMetaStorage-BI9YXcwU.js";import{default as d}from"../../packem_shared/UploadThingStorage-_H45IVqX.js";export{e as UploadThingFile,r as UploadThingMetaStorage,d as UploadThingStorage};
|