@visulima/storage 1.0.0-alpha.8 → 1.0.0
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 +578 -0
- package/LICENSE.md +237 -568
- package/README.md +82 -466
- package/dist/adapter/nuxt/module.d.ts +41 -34
- package/dist/adapter/nuxt/module.js +1 -93
- package/dist/adapter/nuxt/package.json +0 -6
- package/dist/ai/ai-sdk/index.d.ts +113 -0
- package/dist/ai/ai-sdk/index.js +1 -0
- package/dist/ai/claude/index.d.ts +177 -0
- package/dist/ai/claude/index.js +1 -0
- package/dist/ai/openai/index.d.ts +205 -0
- package/dist/ai/openai/index.js +1 -0
- package/dist/ai/tanstack/index.d.ts +115 -0
- package/dist/ai/tanstack/index.js +1 -0
- package/dist/handler/http/fetch/index.d.ts +303 -4
- package/dist/handler/http/fetch/index.js +1 -4
- package/dist/handler/http/hono/index.d.ts +73 -64
- package/dist/handler/http/hono/index.js +1 -65
- package/dist/handler/http/nextjs/index.d.ts +66 -58
- package/dist/handler/http/nextjs/index.js +1 -37
- package/dist/handler/http/node/index.d.ts +368 -4
- package/dist/handler/http/node/index.js +1 -8
- package/dist/handler/http/solid-start/index.d.ts +66 -57
- package/dist/handler/http/solid-start/index.js +1 -44
- package/dist/index.d.ts +106 -17
- package/dist/index.js +1 -13
- package/dist/openapi/index.d.ts +24 -5
- package/dist/openapi/index.js +1 -5
- package/dist/packem_shared/AbstractBaseStorage-Ba7cLu-t.js +1 -0
- package/dist/packem_shared/AwsLightFile-CpZrubaV.js +1 -0
- package/dist/packem_shared/AwsLightMetaStorage-DPqJ9LTr.js +1 -0
- package/dist/packem_shared/AwsLightStorage-DTBVxHXO.js +1 -0
- package/dist/packem_shared/AzureFile-DFSaVe25.js +1 -0
- package/dist/packem_shared/AzureSMetaStorage-ByzM6Aix.js +1 -0
- package/dist/packem_shared/AzureStorage-BFsD4qbF.js +1 -0
- package/dist/packem_shared/BaseTransformer-Buw5lX_3.js +1 -0
- package/dist/packem_shared/BoxFile-CseIoPW1.js +1 -0
- package/dist/packem_shared/BoxMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BoxStorage-B_t-OVzf.js +1 -0
- package/dist/packem_shared/BunS3File-BcYmsz1n.js +1 -0
- package/dist/packem_shared/BunS3MetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BunS3Storage-CB_pZWlV.js +1 -0
- package/dist/packem_shared/BunnyFile-BgEOlcYI.js +1 -0
- package/dist/packem_shared/BunnyMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BunnyStorage-CILSK4_Z.js +1 -0
- package/dist/packem_shared/CloudinaryFile-Bo5B-vM1.js +1 -0
- package/dist/packem_shared/CloudinaryMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/CloudinaryStorage-DiCbdAi_.js +1 -0
- package/dist/packem_shared/DiskStorage-Kp5t3vnF.js +1 -0
- package/dist/packem_shared/DiskStorageWithChecksum-Bh6w-Iu8.js +1 -0
- package/dist/packem_shared/DropboxFile-BFb7eOzy.js +1 -0
- package/dist/packem_shared/DropboxMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/DropboxStorage-H8bd8hEz.js +1 -0
- package/dist/packem_shared/ERRORS-BIBxE2oR.js +1 -0
- package/dist/packem_shared/File-W8aOo15X.js +1 -0
- package/dist/packem_shared/Files-BA3mpDwz.js +1 -0
- package/dist/packem_shared/FirebaseFile-BLaBxa2A.js +1 -0
- package/dist/packem_shared/FirebaseMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/FirebaseStorage-Dgk4XyMr.js +2 -0
- package/dist/packem_shared/FtpFile-ClWDYnt2.js +1 -0
- package/dist/packem_shared/FtpMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/FtpStorage-g_DjiR-C.js +1 -0
- package/dist/packem_shared/GCSConfig-BQ0OpVhe.js +1 -0
- package/dist/packem_shared/GCSFile-Cero7qZN.js +1 -0
- package/dist/packem_shared/GCSMetaStorage-3fLTlRd4.js +1 -0
- package/dist/packem_shared/GCStorage-DUfwVFd3.js +1 -0
- package/dist/packem_shared/GoogleDriveFile-DHpLhzg9.js +1 -0
- package/dist/packem_shared/GoogleDriveMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/GoogleDriveStorage-D0-5egHE.js +1 -0
- package/dist/packem_shared/LocalMetaStorage-Bp5mVc76.js +1 -0
- package/dist/packem_shared/MediaTransformer-D2kUsklW.js +1 -0
- package/dist/packem_shared/MemoryMetaStorage-Ksgh9pe7.js +1 -0
- package/dist/packem_shared/MemoryStorage-DzSTdlAq.js +1 -0
- package/dist/packem_shared/MetaStorage-DPEUyWgN.js +1 -0
- package/dist/packem_shared/Metadata-B7CcBueg.js +1 -0
- package/dist/packem_shared/Multipart-Btj2mo9r.js +1 -0
- package/dist/packem_shared/Multipart-C4GpuHMU.js +1 -0
- package/dist/packem_shared/NetlifyBlobFile-DoFhkzaH.js +1 -0
- package/dist/packem_shared/NetlifyBlobMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/NetlifyBlobStorage-DZdCmOVW.js +1 -0
- package/dist/packem_shared/NoOpMetrics-BLo6u4NY.js +1 -0
- package/dist/packem_shared/OneDriveFile-CNNJYI43.js +1 -0
- package/dist/packem_shared/OneDriveMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/OneDriveStorage-CvJetV7_.js +1 -0
- package/dist/packem_shared/OpenTelemetryMetrics-DJDQsNKp.js +1 -0
- package/dist/packem_shared/PocketBaseFile-DpJpxl3e.js +1 -0
- package/dist/packem_shared/PocketBaseMetaStorage-CpvDRnSu.js +1 -0
- package/dist/packem_shared/PocketBaseStorage-BPil-koe.js +1 -0
- package/dist/packem_shared/Rest-BehVaxbl.js +1 -0
- package/dist/packem_shared/Rest-ymPCZkKR.js +1 -0
- package/dist/packem_shared/S3File-CpZrubaV.js +1 -0
- package/dist/packem_shared/S3MetaStorage-CMonflzp.js +1 -0
- package/dist/packem_shared/S3Storage-wslqssvr.js +1 -0
- package/dist/packem_shared/SftpFile-ClWDYnt2.js +1 -0
- package/dist/packem_shared/SftpMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/SftpStorage-BVbMtS2b.js +1 -0
- package/dist/packem_shared/SharePointFile-Blz9FS4h.js +1 -0
- package/dist/packem_shared/SharePointMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/SharePointStorage-DWjvR5oZ.js +1 -0
- package/dist/packem_shared/SupabaseFile-Bo5B-vM1.js +1 -0
- package/dist/packem_shared/SupabaseMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/SupabaseStorage-BiKmYKb6.js +1 -0
- package/dist/packem_shared/TUS_RESUMABLE-CyTSRvPU.js +1 -0
- package/dist/packem_shared/Tus-BgbON_wQ.js +1 -0
- package/dist/packem_shared/Tus-v6jzkaIO.js +1 -0
- package/dist/packem_shared/UploadControl-DZJhI9Wh.js +1 -0
- package/dist/packem_shared/UploadThingFile-BTFMpcIA.js +1 -0
- package/dist/packem_shared/UploadThingMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/UploadThingStorage-jrEnANC5.js +1 -0
- package/dist/packem_shared/ValidationError-3B06DFyE.js +1 -0
- package/dist/packem_shared/VercelBlobFile-CVQwKlZk.js +1 -0
- package/dist/packem_shared/VercelBlobMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/VercelBlobStorage-Y-cDgH30.js +1 -0
- package/dist/packem_shared/_commonjsHelpers-CWAkuNXM.js +1 -0
- package/dist/packem_shared/agentsCopyFile-Dl5iffdH.js +1 -0
- package/dist/packem_shared/akamai-DthkaFul.js +1 -0
- package/dist/packem_shared/alibaba-BEi25O1g.js +1 -0
- package/dist/packem_shared/approval-fVHwBp7u.js +1 -0
- package/dist/packem_shared/approval.d-CMAYH9GF.d.ts +75 -0
- package/dist/packem_shared/aws-light-meta-storage-DGrn72VJ.js +4 -0
- package/dist/packem_shared/azure-meta-storage-ClbEsfI4.js +1 -0
- package/dist/packem_shared/backblaze-m1N5NZ9q.js +1 -0
- package/dist/packem_shared/base-handler-core-EeV8gZck.js +1 -0
- package/dist/packem_shared/base-handler-fetch-CHzsgb7C.js +1 -0
- package/dist/packem_shared/base-handler-node-BjpW8pGi.js +1 -0
- package/dist/packem_shared/cache-Cw3QjoVN.js +1 -0
- package/dist/packem_shared/claudeCopyFile-BX9O4ORk.js +1 -0
- package/dist/packem_shared/cloudflare-CdUTErlo.js +1 -0
- package/dist/packem_shared/copyFile-49FtxXcm.js +1 -0
- package/dist/packem_shared/copyFile-BUPezT_c.js +1 -0
- package/dist/packem_shared/createResponsesFileTools-6Tvt2PNr.js +1 -0
- package/dist/packem_shared/createRetryWrapper-CxgiV_hH.js +1 -0
- package/dist/packem_shared/detect-file-type-BA7UBLKA.js +1 -0
- package/dist/packem_shared/digitalOcean-B2uB6pgz.js +1 -0
- package/dist/packem_shared/disk-storage-DIn-VnCh.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +156 -0
- package/dist/packem_shared/executors-BDzMjc4y.js +1 -0
- package/dist/packem_shared/executors.d-BZP2rWo3.d.ts +69 -0
- package/dist/packem_shared/exoscale-BDa1Gjth.js +1 -0
- package/dist/packem_shared/filebase-CsFYJIwB.js +1 -0
- package/dist/packem_shared/files.d-CH0iLBNC.d.ts +655 -0
- package/dist/packem_shared/gcs-meta-storage-Dy37wCjI.js +1 -0
- package/dist/packem_shared/get-file-status-y3wTtDQs.js +1 -0
- package/dist/packem_shared/getFormatFromContentType-DCTTPQHm.js +1 -0
- package/dist/packem_shared/has-content-50BsqrWw.js +1 -0
- package/dist/packem_shared/headers-BAiAKekR.js +26 -0
- package/dist/packem_shared/hetzner-BGGFiRGD.js +1 -0
- package/dist/packem_shared/ibmCos-j-3TfJ5p.js +1 -0
- package/dist/packem_shared/idriveE2-C6pQ5pQ0.js +1 -0
- package/dist/packem_shared/index-nZWCQrSe.js +5 -0
- package/dist/packem_shared/internal-D_cZIFwI.js +1 -0
- package/dist/packem_shared/is-expired-CBEk6XBi.js +1 -0
- package/dist/packem_shared/local-meta-storage-C2T92TYb.js +11 -0
- package/dist/packem_shared/local-meta-storage.d-D9PBfkn6.d.ts +21 -0
- package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +331 -0
- package/dist/packem_shared/memory-storage.d-4EU1cMt1.d.ts +101 -0
- package/dist/packem_shared/minio-NKquuBfS.js +1 -0
- package/dist/packem_shared/multipart-base-BOzY19lb.js +1 -0
- package/dist/packem_shared/oauth-refresh-EdGzlcOZ.js +1 -0
- package/dist/packem_shared/oracleCloud-DslqNpn6.js +1 -0
- package/dist/packem_shared/ovhCloud-CMHE6uLV.js +1 -0
- package/dist/packem_shared/part-match-D-9dGX42.js +1 -0
- package/dist/packem_shared/path-0oTTdkvl-BVg7lYf5.js +1 -0
- package/dist/packem_shared/posix-dirname-CfpH5wZi.js +1 -0
- package/dist/packem_shared/response-builder-CbSA8qPa.js +1 -0
- package/dist/packem_shared/rest-base-CynUg0mH.js +1 -0
- package/dist/packem_shared/restOpenApiSpec-Csv513qf.js +1 -0
- package/dist/packem_shared/s3-base-storage-DXZYN24h.js +1 -0
- package/dist/packem_shared/s3-base-storage.d-BQgP5B-t.d.ts +287 -0
- package/dist/packem_shared/scaleway-U1In3v70.js +1 -0
- package/dist/packem_shared/sharedErrorSchemaObject-YN65aAKj.js +1 -0
- package/dist/packem_shared/storage-Cyy73Y6r.js +1 -0
- package/dist/packem_shared/storage.d-CEM1upWM.d.ts +1176 -0
- package/dist/packem_shared/storj-Cb59q9kF.js +1 -0
- package/dist/packem_shared/sync-DhR3536K.js +1 -0
- package/dist/packem_shared/tencent-Q1y2GENc.js +1 -0
- package/dist/packem_shared/tigris-BELKoyyp.js +1 -0
- package/dist/packem_shared/transformOpenApiSpec-CIEAgpBD.js +1 -0
- package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +106 -0
- package/dist/packem_shared/tusOpenApiSpec-D96B03t5.js +1 -0
- package/dist/packem_shared/types.d-Bon9GVVe.d.ts +104 -0
- package/dist/packem_shared/types.d-CggTCgXr.d.ts +49 -0
- package/dist/packem_shared/types.d-CrUWY4On.d.ts +720 -0
- package/dist/packem_shared/update-size-DuNuLyxj.js +1 -0
- package/dist/packem_shared/vultr-B491cQ4e.js +1 -0
- package/dist/packem_shared/waitForStorage-ByQmG4xF.js +1 -0
- package/dist/packem_shared/wasabi-DFrwIoab.js +1 -0
- package/dist/packem_shared/xhrOpenApiSpec-DQR4h6M8.js +1 -0
- package/dist/packem_shared/yandex-CwzHuEKP.js +1 -0
- package/dist/storage/aws/clients/index.d.ts +612 -6
- package/dist/storage/aws/clients/index.js +1 -6
- package/dist/storage/aws/index.d.ts +332 -4
- package/dist/storage/aws/index.js +1 -3
- package/dist/storage/aws-light/index.d.ts +259 -4
- package/dist/storage/aws-light/index.js +1 -3
- package/dist/storage/azure/index.d.ts +236 -4
- package/dist/storage/azure/index.js +1 -3
- package/dist/storage/box/index.d.ts +189 -0
- package/dist/storage/box/index.js +1 -0
- 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 +119 -0
- package/dist/storage/bunny/index.js +1 -0
- package/dist/storage/cloudinary/index.d.ts +121 -0
- package/dist/storage/cloudinary/index.js +1 -0
- package/dist/storage/dropbox/index.d.ts +132 -0
- package/dist/storage/dropbox/index.js +1 -0
- package/dist/storage/firebase/index.d.ts +192 -0
- package/dist/storage/firebase/index.js +1 -0
- package/dist/storage/ftp/index.d.ts +91 -0
- package/dist/storage/ftp/index.js +1 -0
- package/dist/storage/gcs/index.d.ts +195 -5
- package/dist/storage/gcs/index.js +1 -4
- package/dist/storage/google-drive/index.d.ts +148 -0
- package/dist/storage/google-drive/index.js +1 -0
- package/dist/storage/local/index.d.ts +7 -4
- package/dist/storage/local/index.js +1 -3
- package/dist/storage/memory/index.d.ts +6 -0
- package/dist/storage/memory/index.js +1 -0
- package/dist/storage/netlify-blob/index.d.ts +147 -4
- package/dist/storage/netlify-blob/index.js +1 -3
- package/dist/storage/onedrive/index.d.ts +103 -0
- package/dist/storage/onedrive/index.js +1 -0
- package/dist/storage/pocketbase/index.d.ts +172 -0
- package/dist/storage/pocketbase/index.js +1 -0
- package/dist/storage/sftp/index.d.ts +92 -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 +115 -0
- package/dist/storage/supabase/index.js +1 -0
- package/dist/storage/uploadthing/index.d.ts +95 -0
- package/dist/storage/uploadthing/index.js +1 -0
- package/dist/storage/vercel-blob/index.d.ts +189 -4
- package/dist/storage/vercel-blob/index.js +1 -3
- package/dist/transformer/audio-transformer.d.ts +127 -125
- package/dist/transformer/audio-transformer.js +1 -278
- package/dist/transformer/image-transformer.d.ts +573 -568
- package/dist/transformer/image-transformer.js +1 -1100
- package/dist/transformer/index.d.ts +62 -5
- package/dist/transformer/index.js +1 -4
- package/dist/transformer/video-transformer.d.ts +144 -142
- package/dist/transformer/video-transformer.js +1 -310
- package/package.json +202 -50
- package/dist/handler/base/base-handler-core.d.ts +0 -91
- package/dist/handler/base/base-handler-fetch.d.ts +0 -76
- package/dist/handler/base/base-handler-node.d.ts +0 -137
- package/dist/handler/multipart/multipart-base.d.ts +0 -84
- package/dist/handler/multipart/multipart-fetch.d.ts +0 -64
- package/dist/handler/multipart/multipart.d.ts +0 -49
- package/dist/handler/rest/rest-base.d.ts +0 -106
- package/dist/handler/rest/rest-fetch.d.ts +0 -88
- package/dist/handler/rest/rest.d.ts +0 -93
- package/dist/handler/tus/tus-base.d.ts +0 -152
- package/dist/handler/tus/tus-fetch.d.ts +0 -72
- package/dist/handler/tus/tus.d.ts +0 -78
- package/dist/handler/types.d.ts +0 -53
- package/dist/handler/utils/request-parser.d.ts +0 -72
- package/dist/handler/utils/response-builder.d.ts +0 -83
- package/dist/handler/utils/storage-utils.d.ts +0 -10
- package/dist/handler/utils/stream-utils.d.ts +0 -29
- package/dist/handler/utils/upload-handlers.d.ts +0 -76
- package/dist/metrics/index.d.ts +0 -2
- package/dist/metrics/no-op-metrics.d.ts +0 -15
- package/dist/metrics/opentelemetry-metrics.d.ts +0 -55
- package/dist/openapi/rest.d.ts +0 -7
- package/dist/openapi/shared.d.ts +0 -13
- package/dist/openapi/transform.d.ts +0 -3
- package/dist/openapi/tus.d.ts +0 -7
- package/dist/openapi/xhr.d.ts +0 -7
- package/dist/packem_shared/AwsLightFile-tTneXZgG.js +0 -11
- package/dist/packem_shared/AwsLightMetaStorage-BWSOtVaN.js +0 -4
- package/dist/packem_shared/AwsLightStorage-Blv-GP4v.js +0 -133
- package/dist/packem_shared/AzureFile-CesgFzps.js +0 -8
- package/dist/packem_shared/AzureSMetaStorage-CFs-OYJT.js +0 -88
- package/dist/packem_shared/AzureStorage-B0v048hG.js +0 -357
- package/dist/packem_shared/BaseTransformer-C2gLib6v.js +0 -82
- package/dist/packem_shared/DiskStorage-BlltBst6.js +0 -12
- package/dist/packem_shared/DiskStorageWithChecksum-BJTmMklc.js +0 -238
- package/dist/packem_shared/ERRORS-D0apMqnc.js +0 -97
- package/dist/packem_shared/File-Bb3P23dr.js +0 -69
- package/dist/packem_shared/GCSConfig-vPP22kN6.js +0 -11
- package/dist/packem_shared/GCSFile-BIEunhAN.js +0 -8
- package/dist/packem_shared/GCSMetaStorage-BYhwecZl.js +0 -7
- package/dist/packem_shared/GCStorage-BmnoK7Rz.js +0 -406
- package/dist/packem_shared/LocalMetaStorage-CZHhKkMd.js +0 -7
- package/dist/packem_shared/MediaTransformer-D6658DL1.js +0 -1197
- package/dist/packem_shared/MetaStorage-pECeFOad.js +0 -46
- package/dist/packem_shared/Metadata-DRLXeJ0F.js +0 -89
- package/dist/packem_shared/Multipart-5Xpy7WhY.js +0 -163
- package/dist/packem_shared/Multipart-C-iU9LXj.js +0 -128
- package/dist/packem_shared/NetlifyBlobFile-CXzyjqrD.js +0 -14
- package/dist/packem_shared/NetlifyBlobMetaStorage-DxZ5aDvD.js +0 -9
- package/dist/packem_shared/NetlifyBlobStorage-CLPtjHqd.js +0 -376
- package/dist/packem_shared/NoOpMetrics-DhAk5rXc.js +0 -10
- package/dist/packem_shared/OpenTelemetryMetrics-BnxhqIaH.js +0 -67
- package/dist/packem_shared/Rest-DO7OslCs.js +0 -267
- package/dist/packem_shared/Rest-DTaszQ6n.js +0 -228
- package/dist/packem_shared/S3File-DZiyk9Qt.js +0 -11
- package/dist/packem_shared/S3MetaStorage-Dz9aDabA.js +0 -76
- package/dist/packem_shared/S3Storage-DHmTk-hU.js +0 -316
- package/dist/packem_shared/TUS_RESUMABLE-BfguFdM1.js +0 -434
- package/dist/packem_shared/Tus-BQItPVAC.js +0 -200
- package/dist/packem_shared/Tus-BibjweWH.js +0 -195
- package/dist/packem_shared/ValidationError-BfF1aE4h.js +0 -26
- package/dist/packem_shared/VercelBlobFile-BCg4aTEq.js +0 -18
- package/dist/packem_shared/VercelBlobMetaStorage-Bd9F-VFm.js +0 -9
- package/dist/packem_shared/VercelBlobStorage-DD9LMOS6.js +0 -261
- package/dist/packem_shared/_commonjsHelpers-B85MJLTf.js +0 -5
- package/dist/packem_shared/aws-light-meta-storage-DKJBgbR6.js +0 -446
- package/dist/packem_shared/backblaze-BlMnIcBC.js +0 -20
- package/dist/packem_shared/base-handler-core-DLEVHemv.js +0 -303
- package/dist/packem_shared/base-handler-fetch-A7V0N6AJ.js +0 -291
- package/dist/packem_shared/base-handler-node-Dx7ce3sU.js +0 -730
- package/dist/packem_shared/cache-B88MXQ_2.js +0 -18
- package/dist/packem_shared/cloudflare-Bi1q8wXE.js +0 -21
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-DUuacjWv.js +0 -11
- package/dist/packem_shared/digitalOcean-CWQRJM3L.js +0 -21
- package/dist/packem_shared/disk-storage-Bh2wy3YW.js +0 -810
- package/dist/packem_shared/gcs-meta-storage-DqNjM7DP.js +0 -158
- package/dist/packem_shared/has-content-CY66ehMK.js +0 -3
- package/dist/packem_shared/headers-C9DasoT1.js +0 -1318
- package/dist/packem_shared/is-expired-CTThU1q5.js +0 -8
- package/dist/packem_shared/isRetryableError-Dycp7127.js +0 -82
- package/dist/packem_shared/isValidMediaType-BeDgiObq.js +0 -35
- package/dist/packem_shared/local-meta-storage-By-3SNBI.js +0 -649
- package/dist/packem_shared/minio-C2YBZQOw.js +0 -22
- package/dist/packem_shared/multipart-base-BY0rhkw5.js +0 -102
- package/dist/packem_shared/part-match-BMNqHDYD.js +0 -96
- package/dist/packem_shared/path-CR6YkPXX-7R1-9CMk.js +0 -161
- package/dist/packem_shared/response-builder-BtnRiBUI.js +0 -45
- package/dist/packem_shared/rest-base-Bt9Np3M8.js +0 -457
- package/dist/packem_shared/restOpenApiSpec-D1JC_Jto.js +0 -800
- package/dist/packem_shared/s3-base-storage-C1DIHTYY.js +0 -510
- package/dist/packem_shared/sharedGet-Cpo7QUyu.js +0 -1019
- package/dist/packem_shared/storage-C6NSXb8h.js +0 -1175
- package/dist/packem_shared/tigris-Hac8TKnX.js +0 -21
- package/dist/packem_shared/transformOpenApiSpec-DWM5WtnN.js +0 -975
- package/dist/packem_shared/tusOpenApiSpec-mBZkl7he.js +0 -740
- package/dist/packem_shared/update-size-CCGm6i1J.js +0 -8
- package/dist/packem_shared/validator-BeX_lJet.js +0 -78
- package/dist/packem_shared/waitForStorage-Cscw85sx.js +0 -18
- package/dist/packem_shared/wasabi-DIyflHSd.js +0 -21
- package/dist/packem_shared/xhrOpenApiSpec-B1V5Dxrj.js +0 -264
- package/dist/storage/aws/clients/backblaze.d.ts +0 -12
- package/dist/storage/aws/clients/cloudflare.d.ts +0 -13
- package/dist/storage/aws/clients/digital-ocean.d.ts +0 -12
- package/dist/storage/aws/clients/minio.d.ts +0 -13
- package/dist/storage/aws/clients/tigris.d.ts +0 -12
- package/dist/storage/aws/clients/types.d.ts +0 -95
- package/dist/storage/aws/clients/wasabi.d.ts +0 -12
- package/dist/storage/aws/s3-base-storage.d.ts +0 -248
- package/dist/storage/aws/s3-client-adapter.d.ts +0 -110
- package/dist/storage/aws/s3-file.d.ts +0 -10
- package/dist/storage/aws/s3-meta-storage.d.ts +0 -15
- package/dist/storage/aws/s3-storage.d.ts +0 -70
- package/dist/storage/aws/types.d.ts +0 -119
- package/dist/storage/aws-light/aws-light-api-adapter.d.ts +0 -130
- package/dist/storage/aws-light/aws-light-file.d.ts +0 -10
- package/dist/storage/aws-light/aws-light-meta-storage.d.ts +0 -19
- package/dist/storage/aws-light/aws-light-storage.d.ts +0 -65
- package/dist/storage/aws-light/types.d.ts +0 -37
- package/dist/storage/azure/azure-file.d.ts +0 -6
- package/dist/storage/azure/azure-meta-storage.d.ts +0 -15
- package/dist/storage/azure/azure-storage.d.ts +0 -69
- package/dist/storage/azure/types.d.ts +0 -62
- package/dist/storage/gcs/fetch-error.d.ts +0 -11
- package/dist/storage/gcs/gcs-config.d.ts +0 -2
- package/dist/storage/gcs/gcs-file.d.ts +0 -6
- package/dist/storage/gcs/gcs-meta-storage.d.ts +0 -27
- package/dist/storage/gcs/gcs-storage.d.ts +0 -91
- package/dist/storage/gcs/types.d.ts +0 -55
- package/dist/storage/gcs/utils.d.ts +0 -7
- package/dist/storage/local/disk-storage-with-checksum.d.ts +0 -15
- package/dist/storage/local/disk-storage.d.ts +0 -135
- package/dist/storage/local/local-meta-storage.d.ts +0 -32
- package/dist/storage/meta-storage.d.ts +0 -30
- package/dist/storage/netlify-blob/netlify-blob-file.d.ts +0 -12
- package/dist/storage/netlify-blob/netlify-blob-meta-storage.d.ts +0 -7
- package/dist/storage/netlify-blob/netlify-blob-storage.d.ts +0 -93
- package/dist/storage/netlify-blob/types.d.ts +0 -30
- package/dist/storage/storage.d.ts +0 -353
- package/dist/storage/types.d.ts +0 -221
- package/dist/storage/utils/file/file.d.ts +0 -25
- package/dist/storage/utils/file/get-file-status.d.ts +0 -9
- package/dist/storage/utils/file/has-content.d.ts +0 -9
- package/dist/storage/utils/file/index.d.ts +0 -10
- package/dist/storage/utils/file/is-expired.d.ts +0 -8
- package/dist/storage/utils/file/metadata.d.ts +0 -18
- package/dist/storage/utils/file/part-match.d.ts +0 -11
- package/dist/storage/utils/file/types.d.ts +0 -37
- package/dist/storage/utils/file/update-metadata.d.ts +0 -10
- package/dist/storage/utils/file/update-size.d.ts +0 -10
- package/dist/storage/vercel-blob/types.d.ts +0 -32
- package/dist/storage/vercel-blob/vercel-blob-file.d.ts +0 -16
- package/dist/storage/vercel-blob/vercel-blob-meta-storage.d.ts +0 -7
- package/dist/storage/vercel-blob/vercel-blob-storage.d.ts +0 -76
- package/dist/transformer/base-transformer.d.ts +0 -63
- package/dist/transformer/media-transformer.d.ts +0 -332
- package/dist/transformer/types.d.ts +0 -652
- package/dist/transformer/utils.d.ts +0 -33
- package/dist/transformer/validation-error.d.ts +0 -23
- package/dist/utils/cache.d.ts +0 -32
- package/dist/utils/chunked-upload.d.ts +0 -65
- package/dist/utils/detect-file-type.d.ts +0 -28
- package/dist/utils/errors.d.ts +0 -74
- package/dist/utils/file-path-url-matcher.d.ts +0 -18
- package/dist/utils/headers.d.ts +0 -111
- package/dist/utils/http.d.ts +0 -92
- package/dist/utils/locker.d.ts +0 -26
- package/dist/utils/pipes/stream-checksum.d.ts +0 -47
- package/dist/utils/pipes/stream-length.d.ts +0 -22
- package/dist/utils/primitives/get-last-one.d.ts +0 -3
- package/dist/utils/primitives/is-record.d.ts +0 -2
- package/dist/utils/primitives/map-values.d.ts +0 -9
- package/dist/utils/primitives/pick.d.ts +0 -2
- package/dist/utils/primitives/to-milliseconds.d.ts +0 -12
- package/dist/utils/primitives/to-seconds.d.ts +0 -12
- package/dist/utils/range-checksum.d.ts +0 -33
- package/dist/utils/range-hasher.d.ts +0 -46
- package/dist/utils/retry.d.ts +0 -64
- package/dist/utils/types.d.ts +0 -108
- package/dist/utils/validation-error.d.ts +0 -22
- package/dist/utils/validator.d.ts +0 -36
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
|
|
2
|
+
import 'node:stream';
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
|
|
4
|
+
import 'node:crypto';
|
|
5
|
+
import 'node:http';
|
|
6
|
+
import 'lru-cache';
|
|
7
|
+
declare class PocketBaseFile extends File {
|
|
8
|
+
bucket?: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
publicUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class PocketBaseMetaStorage extends LocalMetaStorage<PocketBaseFile> {
|
|
13
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Minimal structural type for the PocketBase client used by the adapter.
|
|
17
|
+
* Declared locally so the package does not require `pocketbase` to be
|
|
18
|
+
* installed for type-checking (it is an optional peer dependency).
|
|
19
|
+
*/
|
|
20
|
+
interface PocketBaseClientLike {
|
|
21
|
+
authStore: {
|
|
22
|
+
isValid: boolean;
|
|
23
|
+
save: (token: string, model: unknown) => void;
|
|
24
|
+
};
|
|
25
|
+
collection: (name: string) => {
|
|
26
|
+
authWithPassword: (email: string, password: string) => Promise<unknown>;
|
|
27
|
+
create: (body: unknown) => Promise<PocketBaseRecord>;
|
|
28
|
+
delete: (id: string) => Promise<boolean>;
|
|
29
|
+
getFirstListItem: (filter: string) => Promise<PocketBaseRecord>;
|
|
30
|
+
getList: (page: number, perPage: number) => Promise<{
|
|
31
|
+
items: PocketBaseRecord[];
|
|
32
|
+
}>;
|
|
33
|
+
update: (id: string, body: unknown) => Promise<PocketBaseRecord>;
|
|
34
|
+
};
|
|
35
|
+
files: {
|
|
36
|
+
getToken: () => Promise<string>;
|
|
37
|
+
getURL?: (record: PocketBaseRecord, filename: string, options?: {
|
|
38
|
+
token?: string;
|
|
39
|
+
}) => string;
|
|
40
|
+
getUrl?: (record: PocketBaseRecord, filename: string, options?: {
|
|
41
|
+
token?: string;
|
|
42
|
+
}) => string;
|
|
43
|
+
};
|
|
44
|
+
filter: (raw: string, parameters?: Record<string, unknown>) => string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Minimal structural type for a PocketBase record. The file field holds the
|
|
48
|
+
* stored filename string; the key field holds the logical object key.
|
|
49
|
+
*/
|
|
50
|
+
interface PocketBaseRecord {
|
|
51
|
+
[field: string]: unknown;
|
|
52
|
+
id: string;
|
|
53
|
+
}
|
|
54
|
+
interface PocketBaseStorageOptions extends BaseStorageOptions {
|
|
55
|
+
/**
|
|
56
|
+
* Superuser email used for lazy authentication. Ignored when `client` or
|
|
57
|
+
* `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_EMAIL`.
|
|
58
|
+
*/
|
|
59
|
+
adminEmail?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Superuser password used for lazy authentication. Ignored when `client`
|
|
62
|
+
* or `authToken` is supplied. Falls back to `POCKETBASE_ADMIN_PASSWORD`.
|
|
63
|
+
*/
|
|
64
|
+
adminPassword?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Pre-saved auth token stored on the client's `authStore`. Ignored when
|
|
67
|
+
* `client` is supplied. Falls back to `POCKETBASE_AUTH_TOKEN`.
|
|
68
|
+
*/
|
|
69
|
+
authToken?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Pre-built `PocketBase` instance. Mutually exclusive with `url`. When
|
|
72
|
+
* supplied it is used as-is and no authentication is performed.
|
|
73
|
+
*/
|
|
74
|
+
client?: PocketBaseClientLike;
|
|
75
|
+
/**
|
|
76
|
+
* Collection name backing the object store. Each record holds exactly one
|
|
77
|
+
* file. Required — the adapter does not create the collection.
|
|
78
|
+
*/
|
|
79
|
+
collection: string;
|
|
80
|
+
/**
|
|
81
|
+
* Default expiry, in seconds, for `getReadUrl`. PocketBase file tokens are
|
|
82
|
+
* short-lived; a fresh token is requested per call. Defaults to 3600.
|
|
83
|
+
*/
|
|
84
|
+
defaultUrlExpiresIn?: number;
|
|
85
|
+
/**
|
|
86
|
+
* File field on the collection holding the stored file. Defaults to `file`.
|
|
87
|
+
*/
|
|
88
|
+
fileField?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Text field on the collection holding the logical object key. Defaults
|
|
91
|
+
* to `key`.
|
|
92
|
+
*/
|
|
93
|
+
keyField?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
96
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
97
|
+
* directory.
|
|
98
|
+
*/
|
|
99
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
100
|
+
/**
|
|
101
|
+
* Public base URL for served files. When set, `getReadUrl` returns
|
|
102
|
+
* `${publicBaseUrl}/${key}` without requesting a file token.
|
|
103
|
+
*/
|
|
104
|
+
publicBaseUrl?: string;
|
|
105
|
+
/**
|
|
106
|
+
* PocketBase instance URL (e.g. `https://pb.example.com`). Ignored when
|
|
107
|
+
* `client` is supplied. Falls back to `POCKETBASE_URL`.
|
|
108
|
+
*/
|
|
109
|
+
url?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* PocketBase storage backend.
|
|
113
|
+
*
|
|
114
|
+
* PocketBase is record-based: a collection where each record holds exactly
|
|
115
|
+
* one file. This adapter maps the object store onto such a collection,
|
|
116
|
+
* keying records by a text field (`keyField`) and storing bytes in a file
|
|
117
|
+
* field (`fileField`). Uploads are single-shot — the part stream is buffered
|
|
118
|
+
* and sent as one multipart request.
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* import { PocketBaseStorage } from "@visulima/storage/provider/pocketbase";
|
|
122
|
+
*
|
|
123
|
+
* const storage = new PocketBaseStorage({
|
|
124
|
+
* url: process.env.POCKETBASE_URL,
|
|
125
|
+
* adminEmail: process.env.POCKETBASE_ADMIN_EMAIL,
|
|
126
|
+
* adminPassword: process.env.POCKETBASE_ADMIN_PASSWORD,
|
|
127
|
+
* collection: "uploads",
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
* @remarks
|
|
131
|
+
* - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
|
|
132
|
+
*/
|
|
133
|
+
declare class PocketBaseStorage extends BaseStorage<PocketBaseFile> {
|
|
134
|
+
static override readonly name: string;
|
|
135
|
+
override checksumTypes: string[];
|
|
136
|
+
protected meta: MetaStorage<PocketBaseFile>;
|
|
137
|
+
private readonly client;
|
|
138
|
+
private readonly collectionName;
|
|
139
|
+
private readonly defaultUrlExpiresIn;
|
|
140
|
+
private readonly fileField;
|
|
141
|
+
private readonly keyField;
|
|
142
|
+
private readonly publicBaseUrl?;
|
|
143
|
+
private ensureAuth;
|
|
144
|
+
constructor(config: PocketBaseStorageOptions);
|
|
145
|
+
override get raw(): PocketBaseClientLike;
|
|
146
|
+
create(config: FileInit, _options?: OperationOptions): Promise<PocketBaseFile>;
|
|
147
|
+
write(part: FilePart | FileQuery | PocketBaseFile, options?: OperationOptions): Promise<PocketBaseFile>;
|
|
148
|
+
delete({
|
|
149
|
+
id
|
|
150
|
+
}: FileQuery, options?: OperationOptions): Promise<PocketBaseFile>;
|
|
151
|
+
override exists({
|
|
152
|
+
id
|
|
153
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
154
|
+
get({
|
|
155
|
+
id
|
|
156
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
157
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
158
|
+
storageClass?: string;
|
|
159
|
+
}): Promise<PocketBaseFile>;
|
|
160
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<PocketBaseFile>;
|
|
161
|
+
override list(limit?: number, options?: OperationOptions): Promise<PocketBaseFile[]>;
|
|
162
|
+
override getReadUrl(key: string, options?: {
|
|
163
|
+
expiresIn?: number;
|
|
164
|
+
responseContentDisposition?: string;
|
|
165
|
+
responseContentType?: string;
|
|
166
|
+
}): Promise<string>;
|
|
167
|
+
private findRecord;
|
|
168
|
+
private putRecord;
|
|
169
|
+
private getMetaSafe;
|
|
170
|
+
private internalOnComplete;
|
|
171
|
+
}
|
|
172
|
+
export { PocketBaseFile, PocketBaseMetaStorage, PocketBaseStorage, type PocketBaseStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as t}from"../../packem_shared/PocketBaseFile-DpJpxl3e.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-CpvDRnSu.js";import{default as s}from"../../packem_shared/PocketBaseStorage-BPil-koe.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
|
|
2
|
+
import 'node:stream';
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
|
|
4
|
+
import { ConnectOptions } from 'ssh2-sftp-client';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'node:http';
|
|
7
|
+
import 'lru-cache';
|
|
8
|
+
declare class SftpFile extends File {
|
|
9
|
+
path?: string;
|
|
10
|
+
}
|
|
11
|
+
declare class SftpMetaStorage extends LocalMetaStorage<SftpFile> {
|
|
12
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
13
|
+
}
|
|
14
|
+
interface SftpStorageOptions extends BaseStorageOptions {
|
|
15
|
+
/**
|
|
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
|
+
connection: ConnectOptions;
|
|
23
|
+
/**
|
|
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
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
29
|
+
/**
|
|
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
|
+
rootFolderPath?: string;
|
|
35
|
+
}
|
|
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
|
+
*/
|
|
51
|
+
declare class SftpStorage extends BaseStorage<SftpFile> {
|
|
52
|
+
static override readonly name: string;
|
|
53
|
+
override checksumTypes: string[];
|
|
54
|
+
override readonly supportsRange: boolean;
|
|
55
|
+
protected meta: MetaStorage<SftpFile>;
|
|
56
|
+
private readonly connection;
|
|
57
|
+
private readonly rootFolderPath;
|
|
58
|
+
constructor(config: SftpStorageOptions);
|
|
59
|
+
create(config: FileInit, _options?: OperationOptions): Promise<SftpFile>;
|
|
60
|
+
write(part: FilePart | FileQuery | SftpFile, options?: OperationOptions): Promise<SftpFile>;
|
|
61
|
+
get({
|
|
62
|
+
id
|
|
63
|
+
}: FileQuery, options?: OperationOptions & {
|
|
64
|
+
range?: {
|
|
65
|
+
end?: number;
|
|
66
|
+
start: number;
|
|
67
|
+
};
|
|
68
|
+
}): Promise<FileReturn>;
|
|
69
|
+
delete({
|
|
70
|
+
id
|
|
71
|
+
}: FileQuery, options?: OperationOptions): Promise<SftpFile>;
|
|
72
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
73
|
+
storageClass?: string;
|
|
74
|
+
}): Promise<SftpFile>;
|
|
75
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<SftpFile>;
|
|
76
|
+
override list(_limit?: number, options?: OperationOptions): Promise<SftpFile[]>;
|
|
77
|
+
override exists({
|
|
78
|
+
id
|
|
79
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
80
|
+
private walkList;
|
|
81
|
+
/**
|
|
82
|
+
* Opens a fresh single-session SFTP connection for one operation.
|
|
83
|
+
* `ssh2-sftp-client` has no `AbortSignal` hook, so cancellation is
|
|
84
|
+
* best-effort: an abort ends the SSH channel via `client.end()`, which
|
|
85
|
+
* rejects any in-flight transfer. The rejection is normalized to an
|
|
86
|
+
* `AbortError`.
|
|
87
|
+
*/
|
|
88
|
+
private run;
|
|
89
|
+
private keyToPath;
|
|
90
|
+
private pathToKey;
|
|
91
|
+
}
|
|
92
|
+
export { SftpFile, SftpMetaStorage, SftpStorage, type SftpStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as a}from"../../packem_shared/SftpFile-ClWDYnt2.js";import{default as o}from"../../packem_shared/SftpMetaStorage-DFwhEI9C.js";import{default as p}from"../../packem_shared/SftpStorage-BVbMtS2b.js";export{a as SftpFile,o as SftpMetaStorage,p as SftpStorage};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-Bon9GVVe.js";
|
|
2
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.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-CEM1upWM.js";
|
|
4
|
+
import { Readable } from 'node:stream';
|
|
5
|
+
import { Client } from '@microsoft/microsoft-graph-client';
|
|
6
|
+
import 'node:crypto';
|
|
7
|
+
import 'node:http';
|
|
8
|
+
import 'lru-cache';
|
|
9
|
+
declare class SharePointFile extends OneDriveFile {}
|
|
10
|
+
declare class SharePointMetaStorage extends LocalMetaStorage<SharePointFile> {
|
|
11
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
12
|
+
}
|
|
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
|
+
*/
|
|
34
|
+
interface SharePointStorageOptions extends BaseStorageOptions {
|
|
35
|
+
/**
|
|
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
|
+
accessToken?: string | (() => string | Promise<string>);
|
|
40
|
+
/**
|
|
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
|
+
client?: Client;
|
|
46
|
+
/**
|
|
47
|
+
* Client-credentials auth — for app-only / daemon scenarios. Same shape as
|
|
48
|
+
* {@link OneDriveStorageOptions.clientCredentials}.
|
|
49
|
+
*/
|
|
50
|
+
clientCredentials?: OneDriveStorageOptions["clientCredentials"];
|
|
51
|
+
/**
|
|
52
|
+
* Timeout, in milliseconds, for polling the async-copy monitor URL.
|
|
53
|
+
* Defaults to 60_000 (60s).
|
|
54
|
+
*/
|
|
55
|
+
copyTimeoutMs?: number;
|
|
56
|
+
/**
|
|
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
|
+
documentLibrary?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Target drive (document library) by ID. Short-circuits site resolution.
|
|
63
|
+
* Env fallback: `SHAREPOINT_DRIVE_ID`.
|
|
64
|
+
*/
|
|
65
|
+
driveId?: string;
|
|
66
|
+
/**
|
|
67
|
+
* SharePoint host name (e.g. `contoso.sharepoint.com`). Combined with
|
|
68
|
+
* `sitePath` to resolve the site. Env fallback: `SHAREPOINT_HOSTNAME`.
|
|
69
|
+
*/
|
|
70
|
+
hostname?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Configure metafiles storage. Defaults to local tmp directory.
|
|
73
|
+
*/
|
|
74
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
75
|
+
/**
|
|
76
|
+
* OAuth2 refresh-token auth — for delegated user scenarios. Same shape as
|
|
77
|
+
* {@link OneDriveStorageOptions.oauth}.
|
|
78
|
+
*/
|
|
79
|
+
oauth?: OneDriveStorageOptions["oauth"];
|
|
80
|
+
/**
|
|
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
|
+
publicByDefault?: boolean;
|
|
86
|
+
/**
|
|
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
|
+
rootFolderPath?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Target a SharePoint site by its Graph site ID. Env fallback:
|
|
93
|
+
* `SHAREPOINT_SITE_ID`.
|
|
94
|
+
*/
|
|
95
|
+
siteId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Server-relative site path (e.g. `/sites/Marketing`). Combined with
|
|
98
|
+
* `hostname` to resolve the site.
|
|
99
|
+
*/
|
|
100
|
+
sitePath?: string;
|
|
101
|
+
/**
|
|
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
|
+
siteUrl?: string;
|
|
107
|
+
}
|
|
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
|
+
*/
|
|
133
|
+
declare class SharePointStorage extends BaseStorage<SharePointFile> {
|
|
134
|
+
static override readonly name: string;
|
|
135
|
+
override checksumTypes: string[];
|
|
136
|
+
protected meta: MetaStorage<SharePointFile>;
|
|
137
|
+
private readonly client;
|
|
138
|
+
private inner?;
|
|
139
|
+
private innerPromise?;
|
|
140
|
+
private readonly oneDriveAuth;
|
|
141
|
+
private readonly resolvedConfig;
|
|
142
|
+
constructor(config: SharePointStorageOptions);
|
|
143
|
+
override get raw(): Client;
|
|
144
|
+
create(config: FileInit, options?: OperationOptions): Promise<SharePointFile>;
|
|
145
|
+
write(part: FilePart | FileQuery | SharePointFile, options?: OperationOptions): Promise<SharePointFile>;
|
|
146
|
+
delete(query: FileQuery, options?: OperationOptions): Promise<SharePointFile>;
|
|
147
|
+
get(query: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
148
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
149
|
+
storageClass?: string;
|
|
150
|
+
}): Promise<SharePointFile>;
|
|
151
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<SharePointFile>;
|
|
152
|
+
override exists(query: FileQuery, _options?: OperationOptions): Promise<boolean>;
|
|
153
|
+
override list(limit?: number, options?: OperationOptions): Promise<SharePointFile[]>;
|
|
154
|
+
override update(query: FileQuery, metadata: Partial<SharePointFile>, _options?: OperationOptions): Promise<SharePointFile>;
|
|
155
|
+
override getStream(query: FileQuery, _options?: OperationOptions): Promise<{
|
|
156
|
+
headers?: Record<string, string>;
|
|
157
|
+
size?: number;
|
|
158
|
+
stream: Readable;
|
|
159
|
+
}>;
|
|
160
|
+
override getReadUrl(key: string, options?: {
|
|
161
|
+
expiresIn?: number;
|
|
162
|
+
responseContentDisposition?: string;
|
|
163
|
+
responseContentType?: string;
|
|
164
|
+
}): Promise<string>;
|
|
165
|
+
override getUploadUrl(key: string, options?: {
|
|
166
|
+
contentLength?: number;
|
|
167
|
+
contentType?: string;
|
|
168
|
+
expiresIn?: number;
|
|
169
|
+
}): Promise<string>;
|
|
170
|
+
/**
|
|
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
|
+
private getInner;
|
|
176
|
+
private buildInner;
|
|
177
|
+
private resolveDriveId;
|
|
178
|
+
private resolveSiteId;
|
|
179
|
+
}
|
|
180
|
+
export { SharePointFile, SharePointMetaStorage, SharePointStorage, type SharePointStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as t}from"../../packem_shared/SharePointFile-Blz9FS4h.js";import{default as r}from"../../packem_shared/SharePointMetaStorage-DFwhEI9C.js";import{default as S}from"../../packem_shared/SharePointStorage-DWjvR5oZ.js";export{t as SharePointFile,r as SharePointMetaStorage,S as SharePointStorage};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
|
|
2
|
+
import 'node:stream';
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
|
|
4
|
+
import { StorageClient } from '@supabase/storage-js';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'node:http';
|
|
7
|
+
import 'lru-cache';
|
|
8
|
+
declare class SupabaseFile extends File {
|
|
9
|
+
bucket?: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
publicUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
declare class SupabaseMetaStorage extends LocalMetaStorage<SupabaseFile> {
|
|
14
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
15
|
+
}
|
|
16
|
+
interface SupabaseStorageOptions extends BaseStorageOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Storage bucket name. Created in the Supabase dashboard. The adapter
|
|
19
|
+
* does not create or delete buckets.
|
|
20
|
+
*/
|
|
21
|
+
bucket: string;
|
|
22
|
+
/**
|
|
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
|
+
client?: StorageClient;
|
|
28
|
+
/**
|
|
29
|
+
* Default expiry, in seconds, for `getReadUrl`. Capped at 1 week (Supabase
|
|
30
|
+
* maximum). Defaults to 3600 (1 hour).
|
|
31
|
+
*/
|
|
32
|
+
defaultUrlExpiresIn?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Override the global `fetch` (e.g. for tests, custom timeouts, retries).
|
|
35
|
+
* Ignored when `client` is supplied.
|
|
36
|
+
*/
|
|
37
|
+
fetch?: typeof globalThis.fetch;
|
|
38
|
+
/**
|
|
39
|
+
* Configure metafiles storage. Used for TUS-style resumable upload
|
|
40
|
+
* bookkeeping. Defaults to {@link LocalMetaStorage} under the OS tmp
|
|
41
|
+
* directory.
|
|
42
|
+
*/
|
|
43
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
44
|
+
/**
|
|
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
|
+
serviceKey?: string;
|
|
50
|
+
/**
|
|
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
|
+
url?: string;
|
|
56
|
+
}
|
|
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
|
+
*/
|
|
77
|
+
declare class SupabaseStorage extends BaseStorage<SupabaseFile> {
|
|
78
|
+
static override readonly name: string;
|
|
79
|
+
override checksumTypes: string[];
|
|
80
|
+
protected meta: MetaStorage<SupabaseFile>;
|
|
81
|
+
private readonly bucket;
|
|
82
|
+
private readonly defaultUrlExpiresIn;
|
|
83
|
+
private readonly storageClient;
|
|
84
|
+
constructor(config: SupabaseStorageOptions);
|
|
85
|
+
override get raw(): StorageClient;
|
|
86
|
+
create(config: FileInit, _options?: OperationOptions): Promise<SupabaseFile>;
|
|
87
|
+
write(part: FilePart | FileQuery | SupabaseFile, options?: OperationOptions): Promise<SupabaseFile>;
|
|
88
|
+
delete({
|
|
89
|
+
id
|
|
90
|
+
}: FileQuery, options?: OperationOptions): Promise<SupabaseFile>;
|
|
91
|
+
override exists({
|
|
92
|
+
id
|
|
93
|
+
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
94
|
+
get({
|
|
95
|
+
id
|
|
96
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
97
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
98
|
+
storageClass?: string;
|
|
99
|
+
}): Promise<SupabaseFile>;
|
|
100
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<SupabaseFile>;
|
|
101
|
+
override list(limit?: number, options?: OperationOptions): Promise<SupabaseFile[]>;
|
|
102
|
+
override getReadUrl(key: string, options?: {
|
|
103
|
+
expiresIn?: number;
|
|
104
|
+
responseContentDisposition?: string;
|
|
105
|
+
responseContentType?: string;
|
|
106
|
+
}): Promise<string>;
|
|
107
|
+
override getUploadUrl(key: string, options?: {
|
|
108
|
+
contentLength?: number;
|
|
109
|
+
contentType?: string;
|
|
110
|
+
expiresIn?: number;
|
|
111
|
+
}): Promise<string>;
|
|
112
|
+
private getMetaSafe;
|
|
113
|
+
private internalOnComplete;
|
|
114
|
+
}
|
|
115
|
+
export { SupabaseFile, SupabaseMetaStorage, SupabaseStorage, type SupabaseStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as t}from"../../packem_shared/SupabaseFile-Bo5B-vM1.js";import{default as r}from"../../packem_shared/SupabaseMetaStorage-DqkgoE46.js";import{default as p}from"../../packem_shared/SupabaseStorage-BiKmYKb6.js";export{t as SupabaseFile,r as SupabaseMetaStorage,p as SupabaseStorage};
|
|
@@ -0,0 +1,95 @@
|
|
|
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-CEM1upWM.js";
|
|
3
|
+
import 'node:stream';
|
|
4
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'node:http';
|
|
7
|
+
import 'lru-cache';
|
|
8
|
+
interface UploadThingStorageOptions extends BaseStorageOptions {
|
|
9
|
+
/**
|
|
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
|
+
acl?: "private" | "public-read";
|
|
15
|
+
/**
|
|
16
|
+
* Pre-built `UTApi` instance. Use this to share an instance, customize
|
|
17
|
+
* `fetch`, or inject test stubs. Mutually exclusive with `token`.
|
|
18
|
+
*/
|
|
19
|
+
client?: UTApi;
|
|
20
|
+
/**
|
|
21
|
+
* Default expiry (seconds) for `getReadUrl` when `acl` is `"private"`.
|
|
22
|
+
* Capped at 7 days (UploadThing maximum). Defaults to 3600 (1 hour).
|
|
23
|
+
*/
|
|
24
|
+
defaultUrlExpiresIn?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Configure metafiles storage for resumable-upload bookkeeping.
|
|
27
|
+
*/
|
|
28
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
29
|
+
/**
|
|
30
|
+
* UploadThing token (base64-encoded JSON: `{ apiKey, appId, regions[] }`).
|
|
31
|
+
* Falls back to `UPLOADTHING_TOKEN`. Ignored when `client` is supplied.
|
|
32
|
+
*/
|
|
33
|
+
token?: string;
|
|
34
|
+
}
|
|
35
|
+
declare class UploadThingFile extends File {
|
|
36
|
+
customId?: string;
|
|
37
|
+
fileHash?: string;
|
|
38
|
+
ufsKey?: string;
|
|
39
|
+
url?: string;
|
|
40
|
+
}
|
|
41
|
+
declare class UploadThingMetaStorage extends LocalMetaStorage<UploadThingFile> {
|
|
42
|
+
constructor(config?: LocalMetaStorageOptions);
|
|
43
|
+
}
|
|
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
|
+
*/
|
|
59
|
+
declare class UploadThingStorage extends BaseStorage<UploadThingFile> {
|
|
60
|
+
static override readonly name: string;
|
|
61
|
+
override checksumTypes: string[];
|
|
62
|
+
protected meta: MetaStorage<UploadThingFile>;
|
|
63
|
+
private readonly acl;
|
|
64
|
+
private readonly appId;
|
|
65
|
+
private readonly defaultUrlExpiresIn;
|
|
66
|
+
private readonly utapi;
|
|
67
|
+
constructor(config: UploadThingStorageOptions);
|
|
68
|
+
override get raw(): UTApi;
|
|
69
|
+
create(config: FileInit, _options?: OperationOptions): Promise<UploadThingFile>;
|
|
70
|
+
write(part: FilePart | FileQuery | UploadThingFile, options?: OperationOptions): Promise<UploadThingFile>;
|
|
71
|
+
delete({
|
|
72
|
+
id
|
|
73
|
+
}: FileQuery, options?: OperationOptions): Promise<UploadThingFile>;
|
|
74
|
+
get({
|
|
75
|
+
id
|
|
76
|
+
}: FileQuery, options?: OperationOptions): Promise<FileReturn>;
|
|
77
|
+
copy(name: string, destination: string, options?: OperationOptions & {
|
|
78
|
+
storageClass?: string;
|
|
79
|
+
}): Promise<UploadThingFile>;
|
|
80
|
+
move(name: string, destination: string, options?: OperationOptions): Promise<UploadThingFile>;
|
|
81
|
+
override list(limit?: number, options?: OperationOptions): Promise<UploadThingFile[]>;
|
|
82
|
+
override getReadUrl(key: string, options?: {
|
|
83
|
+
expiresIn?: number;
|
|
84
|
+
responseContentDisposition?: string;
|
|
85
|
+
responseContentType?: string;
|
|
86
|
+
}): Promise<string>;
|
|
87
|
+
override getUploadUrl(_key: string, _options?: {
|
|
88
|
+
contentLength?: number;
|
|
89
|
+
contentType?: string;
|
|
90
|
+
expiresIn?: number;
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
private resolveFetchUrl;
|
|
93
|
+
private internalOnComplete;
|
|
94
|
+
}
|
|
95
|
+
export { UploadThingFile, UploadThingMetaStorage, UploadThingStorage, type UploadThingStorageOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as e}from"../../packem_shared/UploadThingFile-BTFMpcIA.js";import{default as r}from"../../packem_shared/UploadThingMetaStorage-D_vNzewL.js";import{default as d}from"../../packem_shared/UploadThingStorage-jrEnANC5.js";export{e as UploadThingFile,r as UploadThingMetaStorage,d as UploadThingStorage};
|