@visulima/storage 1.0.0-alpha.32 → 1.0.0-alpha.34
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 +38 -0
- package/README.md +1 -1
- package/dist/adapter/nuxt/module.d.ts +4 -4
- package/dist/adapter/nuxt/node_modules/.bin/nuxi +2 -2
- package/dist/adapter/nuxt/node_modules/.bin/nuxt +2 -2
- package/dist/ai/ai-sdk/index.d.ts +3 -3
- package/dist/ai/ai-sdk/index.js +1 -1
- package/dist/ai/claude/index.d.ts +2 -2
- package/dist/ai/claude/index.js +1 -1
- package/dist/ai/openai/index.d.ts +3 -3
- package/dist/ai/openai/index.js +1 -1
- package/dist/ai/tanstack/index.d.ts +2 -2
- package/dist/ai/tanstack/index.js +1 -1
- package/dist/handler/http/fetch/index.d.ts +7 -7
- package/dist/handler/http/fetch/index.js +1 -1
- package/dist/handler/http/hono/index.d.ts +4 -4
- package/dist/handler/http/hono/index.js +1 -1
- package/dist/handler/http/nextjs/index.d.ts +4 -4
- package/dist/handler/http/nextjs/index.js +1 -1
- package/dist/handler/http/node/index.d.ts +7 -7
- package/dist/handler/http/node/index.js +1 -1
- package/dist/handler/http/solid-start/index.d.ts +4 -4
- package/dist/handler/http/solid-start/index.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/packem_shared/{AwsLightMetaStorage-B-iQbToR.js → AwsLightMetaStorage-Cj7ym1qI.js} +1 -1
- package/dist/packem_shared/{AwsLightStorage-B1jNF7sv.js → AwsLightStorage-CWBRVcn5.js} +1 -1
- package/dist/packem_shared/AzureSMetaStorage-YCj-X8a1.js +1 -0
- package/dist/packem_shared/AzureStorage-nhAojuEU.js +1 -0
- package/dist/packem_shared/{BoxMetaStorage-nESVquA1.js → BoxMetaStorage-XMZn5yvp.js} +1 -1
- package/dist/packem_shared/{BoxStorage-CHYDrcxw.js → BoxStorage-C3--16du.js} +1 -1
- package/dist/packem_shared/{BunS3MetaStorage-BkZx5q4w.js → BunS3MetaStorage-DomG8mVK.js} +1 -1
- package/dist/packem_shared/BunS3Storage-0oYNi2Os.js +1 -0
- package/dist/packem_shared/{BunnyMetaStorage-bB8NXGUI.js → BunnyMetaStorage-luemw1pL.js} +1 -1
- package/dist/packem_shared/BunnyStorage-CIkpp1Rc.js +1 -0
- package/dist/packem_shared/{CloudinaryMetaStorage-BzibHydK.js → CloudinaryMetaStorage-DpxjshXZ.js} +1 -1
- package/dist/packem_shared/{CloudinaryStorage-Cj00ZXWV.js → CloudinaryStorage-9Y1Gq0gr.js} +1 -1
- package/dist/packem_shared/DiskStorage-BkP8c0MY.js +1 -0
- package/dist/packem_shared/{DiskStorageWithChecksum-BX85CHJ6.js → DiskStorageWithChecksum-CUXj5mE9.js} +1 -1
- package/dist/packem_shared/{DropboxMetaStorage-Bfm5bblb.js → DropboxMetaStorage-h0eTJuk5.js} +1 -1
- package/dist/packem_shared/{DropboxStorage-Btz9h9Mj.js → DropboxStorage-CuA9MkpH.js} +1 -1
- package/dist/packem_shared/ERRORS-vMSqlI69.js +1 -0
- package/dist/packem_shared/{FirebaseMetaStorage-CshnJMb0.js → FirebaseMetaStorage-CCBnEE8_.js} +1 -1
- package/dist/packem_shared/FirebaseStorage-DUskfjh_.js +2 -0
- package/dist/packem_shared/{FtpMetaStorage-CoyWJafY.js → FtpMetaStorage-DxHcXk9x.js} +1 -1
- package/dist/packem_shared/FtpStorage-DMpDY7oG.js +1 -0
- package/dist/packem_shared/{GCSMetaStorage-CfZj52hQ.js → GCSMetaStorage-DCBR02C7.js} +1 -1
- package/dist/packem_shared/GCStorage-RCw58CoD.js +1 -0
- package/dist/packem_shared/{GoogleDriveMetaStorage-CBSdEQr6.js → GoogleDriveMetaStorage-koEiYfFw.js} +1 -1
- package/dist/packem_shared/GoogleDriveStorage-DNlVE5Uo.js +1 -0
- package/dist/packem_shared/LocalMetaStorage-BKC34woF.js +1 -0
- package/dist/packem_shared/MemoryStorage-CgEFb9yw.js +1 -0
- package/dist/packem_shared/{Multipart-qaEOWKz1.js → Multipart-D2eF0kMq.js} +1 -1
- package/dist/packem_shared/{Multipart-kQ5wJQaV.js → Multipart-mlcj2Wm8.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobMetaStorage-CqluIgV0.js → NetlifyBlobMetaStorage-DLJLr0fD.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobStorage-CkMw9Uyv.js → NetlifyBlobStorage-DqeW_OGE.js} +1 -1
- package/dist/packem_shared/{OneDriveMetaStorage-DPTNMpeq.js → OneDriveMetaStorage-Cuw5g3cr.js} +1 -1
- package/dist/packem_shared/OneDriveStorage-D41BZtkz.js +1 -0
- package/dist/packem_shared/{PocketBaseMetaStorage-CemTT_01.js → PocketBaseMetaStorage-BkzeMDP0.js} +1 -1
- package/dist/packem_shared/{PocketBaseStorage-BZNzWj09.js → PocketBaseStorage-CdvEL3YX.js} +1 -1
- package/dist/packem_shared/{Rest-BAcUFAgk.js → Rest-08Oi3-WZ.js} +1 -1
- package/dist/packem_shared/{Rest-DukkeDZe.js → Rest-BpyZYW-e.js} +1 -1
- package/dist/packem_shared/S3Storage-adY1XLfH.js +1 -0
- package/dist/packem_shared/{SftpMetaStorage-Cs8b7uBO.js → SftpMetaStorage-DN00oxqH.js} +1 -1
- package/dist/packem_shared/SftpStorage-CDKtnw6a.js +1 -0
- package/dist/packem_shared/{SharePointMetaStorage-DTVKAx6f.js → SharePointMetaStorage-WkQcni-I.js} +1 -1
- package/dist/packem_shared/{SharePointStorage-D1cWu-14.js → SharePointStorage-CZkO7FSl.js} +1 -1
- package/dist/packem_shared/{SupabaseMetaStorage-D_fGv0d6.js → SupabaseMetaStorage-FaEVpmT5.js} +1 -1
- package/dist/packem_shared/SupabaseStorage-O29RNXWx.js +1 -0
- package/dist/packem_shared/{Tus-BYTcw17H.js → Tus-B7k9LUeY.js} +1 -1
- package/dist/packem_shared/{Tus-BrP4RFTg.js → Tus-BZT2Jhl5.js} +1 -1
- package/dist/packem_shared/UploadControl-jgusdgDN.js +1 -0
- package/dist/packem_shared/{UploadThingMetaStorage-CAQ1uTfv.js → UploadThingMetaStorage-CdDfhiyy.js} +1 -1
- package/dist/packem_shared/UploadThingStorage-ByryGerX.js +1 -0
- package/dist/packem_shared/{VercelBlobMetaStorage-DY4zAB6M.js → VercelBlobMetaStorage-CC1zy35k.js} +1 -1
- package/dist/packem_shared/{VercelBlobStorage-u6xmp8ox.js → VercelBlobStorage-C4QUjBfu.js} +1 -1
- package/dist/packem_shared/{agentsListFiles-R-CnGKc4.js → agentsListFiles-Bl2TOnMy.js} +1 -1
- package/dist/packem_shared/aws-light-meta-storage-CXIZfLXR.js +4 -0
- package/dist/packem_shared/{azure-meta-storage-C4SrMtT2.js → azure-meta-storage-B-D-tBVw.js} +1 -1
- package/dist/packem_shared/{base-handler-core-Ccvdhx-k.js → base-handler-core-ty4J6Ji6.js} +1 -1
- package/dist/packem_shared/{base-handler-fetch-DzbThEWy.js → base-handler-fetch-BAjJyP84.js} +1 -1
- package/dist/packem_shared/{base-handler-node-CmCpLlBt.js → base-handler-node-BCqhH22o.js} +1 -1
- package/dist/packem_shared/{claudeListFiles-DAezbKEi.js → claudeListFiles-yLqM5iFS.js} +1 -1
- package/dist/packem_shared/{createResponsesFileTools-BCep-qdO.js → createResponsesFileTools-DFFHq35s.js} +1 -1
- package/dist/packem_shared/{defaultCloudStorageFileNameValidation-DwDn0XB5.js → defaultCloudStorageFileNameValidation-DSAf6C4S.js} +1 -1
- package/dist/packem_shared/detect-file-type-DRWGvQW4.js +1 -0
- package/dist/packem_shared/disk-storage-DJ2Nic2v.js +1 -0
- package/dist/packem_shared/{disk-storage-with-checksum.d-aYBmkg45.d.ts → disk-storage-with-checksum.d-BT_ll5b8.d.ts} +1 -1
- package/dist/packem_shared/executors-MzQbS9FT.js +1 -0
- package/dist/packem_shared/{executors.d-WGJGPSZs.d.ts → executors.d-D8esmhum.d.ts} +1 -1
- package/dist/packem_shared/{gcs-meta-storage-COq32th7.js → gcs-meta-storage-BXcsC7xV.js} +1 -1
- package/dist/packem_shared/{index.d-CYdFIB-w.d.ts → index.d-DB1VD8RP.d.ts} +229 -12
- package/dist/packem_shared/{listFiles-BtP6VnUp.js → listFiles-BNGQbV_d.js} +1 -1
- package/dist/packem_shared/{listFiles-B6VF05d-.js → listFiles-BdBngq3i.js} +1 -1
- package/dist/packem_shared/local-meta-storage-tayO1ARY.js +1 -0
- package/dist/packem_shared/{local-meta-storage.d-CuvN-KQ3.d.ts → local-meta-storage.d-DUuLtPik.d.ts} +1 -1
- package/dist/packem_shared/{media-transformer.d-DfU7VbFl.d.ts → media-transformer.d-B9dfBdoV.d.ts} +2 -2
- package/dist/packem_shared/{memory-storage.d-DRbE0WMO.d.ts → memory-storage.d-BpxSYO-D.d.ts} +1 -1
- package/dist/packem_shared/{path-D7rMc9nq-CPbxyMDy.js → path-D7rMc9nq-B718mbm6.js} +1 -1
- package/dist/packem_shared/{rest-base-xrnOBxS9.js → rest-base-BG0e-6E0.js} +1 -1
- package/dist/packem_shared/s3-base-storage-FiC4s91g.js +1 -0
- package/dist/packem_shared/{s3-base-storage.d-BrHiKWFw.d.ts → s3-base-storage.d-CoYAf_hG.d.ts} +21 -1
- package/dist/packem_shared/storage-CI88PmRw.js +1 -0
- package/dist/packem_shared/{storage.d-X6TimMHY.d.ts → storage.d-C6HtvSoY.d.ts} +43 -1
- package/dist/packem_shared/{tus-base.d-Ds7xYAJC.d.ts → tus-base.d-Dv25OXL0.d.ts} +3 -3
- package/dist/packem_shared/{types.d-a1grKnaX.d.ts → types.d-Cd2-3e-F.d.ts} +1 -1
- package/dist/packem_shared/{types.d-B72PbsLY.d.ts → types.d-CmBrgo0d.d.ts} +2 -2
- package/dist/packem_shared/{types.d-C4QumoP1.d.ts → types.d-CmT_ubPu.d.ts} +2 -2
- package/dist/storage/aws/index.d.ts +7 -2
- package/dist/storage/aws/index.js +1 -1
- package/dist/storage/aws-light/index.d.ts +7 -2
- package/dist/storage/aws-light/index.js +1 -1
- package/dist/storage/azure/index.d.ts +26 -7
- package/dist/storage/azure/index.js +1 -1
- package/dist/storage/box/index.d.ts +2 -2
- package/dist/storage/box/index.js +1 -1
- package/dist/storage/bun-s3/index.d.ts +2 -2
- package/dist/storage/bun-s3/index.js +1 -1
- package/dist/storage/bunny/index.d.ts +2 -2
- package/dist/storage/bunny/index.js +1 -1
- package/dist/storage/cloudinary/index.d.ts +2 -2
- package/dist/storage/cloudinary/index.js +1 -1
- package/dist/storage/dropbox/index.d.ts +2 -2
- package/dist/storage/dropbox/index.js +1 -1
- package/dist/storage/firebase/index.d.ts +2 -2
- package/dist/storage/firebase/index.js +1 -1
- package/dist/storage/ftp/index.d.ts +9 -3
- package/dist/storage/ftp/index.js +1 -1
- package/dist/storage/gcs/index.d.ts +15 -1
- package/dist/storage/gcs/index.js +1 -1
- package/dist/storage/google-drive/index.d.ts +2 -2
- 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/memory/index.js +1 -1
- package/dist/storage/netlify-blob/index.d.ts +2 -2
- package/dist/storage/netlify-blob/index.js +1 -1
- package/dist/storage/onedrive/index.d.ts +4 -4
- package/dist/storage/onedrive/index.js +1 -1
- package/dist/storage/pocketbase/index.d.ts +2 -2
- package/dist/storage/pocketbase/index.js +1 -1
- package/dist/storage/sftp/index.d.ts +9 -3
- package/dist/storage/sftp/index.js +1 -1
- package/dist/storage/sharepoint/index.d.ts +3 -3
- package/dist/storage/sharepoint/index.js +1 -1
- package/dist/storage/supabase/index.d.ts +3 -3
- package/dist/storage/supabase/index.js +1 -1
- package/dist/storage/uploadthing/index.d.ts +2 -2
- package/dist/storage/uploadthing/index.js +1 -1
- package/dist/storage/vercel-blob/index.d.ts +2 -2
- package/dist/storage/vercel-blob/index.js +1 -1
- package/dist/transformer/audio-transformer.d.ts +2 -2
- package/dist/transformer/image-transformer.d.ts +2 -2
- package/dist/transformer/index.d.ts +3 -3
- package/dist/transformer/video-transformer.d.ts +2 -2
- package/package.json +2 -2
- package/dist/packem_shared/AzureSMetaStorage-CR-lfQNQ.js +0 -1
- package/dist/packem_shared/AzureStorage-B4E6VLn5.js +0 -1
- package/dist/packem_shared/BunS3Storage-BopE7kmX.js +0 -1
- package/dist/packem_shared/BunnyStorage-C3IBxJqr.js +0 -1
- package/dist/packem_shared/DiskStorage-BrAb28Je.js +0 -1
- package/dist/packem_shared/ERRORS-CyOuSMLY.js +0 -1
- package/dist/packem_shared/Files-tnc_buzM.js +0 -1
- package/dist/packem_shared/FirebaseStorage-Y9P6Dx8I.js +0 -2
- package/dist/packem_shared/FtpStorage-DCKPMX0z.js +0 -1
- package/dist/packem_shared/GCStorage-hfL1u2KQ.js +0 -1
- package/dist/packem_shared/GoogleDriveStorage-C7iuV7qb.js +0 -1
- package/dist/packem_shared/LocalMetaStorage-DSwsmdt7.js +0 -1
- package/dist/packem_shared/OneDriveStorage-CEGYb6OC.js +0 -1
- package/dist/packem_shared/S3Storage-7hG3izjU.js +0 -1
- package/dist/packem_shared/SftpStorage-DnigT9GT.js +0 -1
- package/dist/packem_shared/SupabaseStorage-DbIUa6NZ.js +0 -1
- package/dist/packem_shared/UploadThingStorage-B1qw1GrM.js +0 -1
- package/dist/packem_shared/aws-light-meta-storage-CstQBYXG.js +0 -4
- package/dist/packem_shared/default-BrhEhSqN.js +0 -1
- package/dist/packem_shared/detect-file-type-5JhzC9RU.js +0 -1
- package/dist/packem_shared/disk-storage-fWizVrge.js +0 -1
- package/dist/packem_shared/executors-DG6hGtvm.js +0 -1
- package/dist/packem_shared/local-meta-storage-Dr891Iy7.js +0 -1
- package/dist/packem_shared/s3-base-storage-CqAyWHR6.js +0 -1
- package/dist/packem_shared/storage-uhIhcN-O.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var q=Object.defineProperty;var f=(t,e)=>q(t,"name",{value:e,configurable:!0});import{Readable as X}from"node:stream";import{setInterval as J}from"node:timers";import{inspect as Q}from"node:util";import{L as ee,O as I}from"./path-D7rMc9nq-B718mbm6.js";import te from"type-is";import re from"./NoOpMetrics-Dky06sf1.js";import{N as oe}from"./cache-qV_5Umeq.js";import{ErrorMap as N,throwErrorCode as v,ERRORS as E}from"./ERRORS-vMSqlI69.js";import{randomUUID as se}from"node:crypto";import{LRUCache as ae}from"lru-cache";import{retry as ie}from"./isRetryableError-CBZ65V6T.js";import{o as ne}from"./is-expired-1JuZjDtb.js";var ce=Object.defineProperty,le=f((t,e)=>ce(t,"name",{value:e,configurable:!0}),"y$3"),ue=Object.defineProperty,me=le((t,e)=>ue(t,"name",{value:e,configurable:!0}),"y"),ge=Object.defineProperty,C=me((t,e)=>ge(t,"name",{value:e,configurable:!0}),"a");const de=/^(?<value>-?\d+(?:[.,]\d+)*) *(?<type>[a-z]+)?$/i,he=/^KIBI/,pe=/^MIBI/,fe=/^GIBI/,ye=/^TEBI/,be=/^PEBI/,we=/^EXBI/,ve=/^ZEBI/,Ee=/^YIBI/,$e=/^(.)IB$/,_={iec:[{long:"Bytes",short:"B"},{long:"Kibibytes",short:"KiB"},{long:"Mebibytes",short:"MiB"},{long:"Gibibytes",short:"GiB"},{long:"Tebibytes",short:"TiB"},{long:"Pebibytes",short:"PiB"},{long:"Exbibytes",short:"EiB"},{long:"Zebibytes",short:"ZiB"},{long:"Yobibytes",short:"YiB"}],iec_octet:[{long:"Octets",short:"o"},{long:"Kibioctets",short:"Kio"},{long:"Mebioctets",short:"Mio"},{long:"Gibioctets",short:"Gio"},{long:"Tebioctets",short:"Tio"},{long:"Pebioctets",short:"Pio"},{long:"Exbioctets",short:"Eio"},{long:"Zebioctets",short:"Zio"},{long:"Yobioctets",short:"Yio"}],metric:[{long:"Bytes",short:"Bytes"},{long:"Kilobytes",short:"KB"},{long:"Megabytes",short:"MB"},{long:"Gigabytes",short:"GB"},{long:"Terabytes",short:"TB"},{long:"Petabytes",short:"PB"},{long:"Exabytes",short:"EB"},{long:"Zettabytes",short:"ZB"},{long:"Yottabytes",short:"YB"}],metric_octet:[{long:"Octets",short:"o"},{long:"Kilo-octets",short:"ko"},{long:"Mega-octets",short:"Mo"},{long:"Giga-octets",short:"Go"},{long:"Tera-octets",short:"To"},{long:"Peta-octets",short:"Po"},{long:"Exa-octets",short:"Eo"},{long:"Zetta-octets",short:"Zo"},{long:"Yotta-octets",short:"Yo"}]},xe=C((t,e)=>{const r=new Intl.NumberFormat(e).format(11111).replaceAll(new RegExp("\\p{Number}","gu"),""),o=new Intl.NumberFormat(e).format(1.1).replaceAll(new RegExp("\\p{Number}","gu"),"");return Number.parseFloat(t.replaceAll(new RegExp(`\\${r}`,"g"),"").replace(new RegExp(`\\${o}`),"."))},"parseLocalizedNumber"),R=C(t=>{switch(t){case 2:return 1024;case 10:return 1e3;default:throw new Error("Unsupported base.")}},"fromBase"),z=C((t,e)=>{const r={base:2,locale:"en-US",units:"metric",...e};if(typeof t!="string"||t.length===0)throw new TypeError("Value is not a string or is empty.");if(t.length>100)throw new TypeError("Value exceeds the maximum length of 100 characters.");const o=de.exec(t)?.groups;if(!o)return Number.NaN;const s=xe(o.value,r.locale),a=(o.type??"Bytes").toUpperCase().replace(he,"KILO").replace(pe,"MEGA").replace(fe,"GIGA").replace(ye,"TERA").replace(be,"PETA").replace(we,"EXA").replace(ve,"ZETTA").replace(Ee,"YOTTA").replace($e,"$1B"),i=_[r.units].findIndex(l=>l.short.toUpperCase()===a||l.long.toUpperCase()===a);if(i===-1)return Number.NaN;const u=R(r.base);return s*u**i},"parseBytes");C((t,e)=>{if(typeof t!="number"||!Number.isFinite(t))throw new TypeError("Bytesize is not a number.");const{base:r,decimals:o,locale:s,long:a,unit:i,units:u,...l}={base:2,decimals:0,locale:"en-US",long:!1,units:"metric",...e},n=R(r),m=Math.abs(t),d=e?.space??!0?" ":"",c=_[u],h=c.findIndex(M=>M.short===i);if(t===0){const M=h===-1?0:Math.min(h,c.length-1);return"0"+d+c[M][a?"long":"short"]}const g=h===-1?Math.min(Math.floor(Math.log(m)/Math.log(n)),c.length-1):h,O=c[g][a?"long":"short"],x=t/n**g,$=o<0?void 0:o;return new Intl.NumberFormat(s,{maximumFractionDigits:$,minimumFractionDigits:$,...l}).format(x)+d+O},"formatBytes");var Me=Object.defineProperty,Ne=f((t,e)=>Me(t,"name",{value:e,configurable:!0}),"u$3"),Oe=Object.defineProperty,Ae=Ne((t,e)=>Oe(t,"name",{value:e,configurable:!0}),"v"),Te=Object.defineProperty,Ce=Ae((t,e)=>Te(t,"name",{value:e,configurable:!0}),"D");const Se=Ce((t,e,r,o,s,a,i,u,l,n,m,d,c,h)=>{const g={d:o,h:s,m:a,mo:e,ms:u,s:i,w:r,y:t};return l!==void 0&&(g.future=l),n!==void 0&&(g.past=n),m!==void 0&&(g.decimal=m),d!==void 0&&(g.unitMap=d),c!==void 0&&(g.groupSeparator=c),h!==void 0&&(g.placeholderSeparator=h),g},"createDurationLanguage"),F={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},Ie=Se(t=>`year${t===1?"":"s"}`,t=>`month${t===1?"":"s"}`,t=>`week${t===1?"":"s"}`,t=>`day${t===1?"":"s"}`,t=>`hour${t===1?"":"s"}`,t=>`minute${t===1?"":"s"}`,t=>`second${t===1?"":"s"}`,t=>`millisecond${t===1?"":"s"}`,"in %s","%s ago",".",F,",","_");var Pe=Object.defineProperty,Be=f((t,e)=>Pe(t,"name",{value:e,configurable:!0}),"o"),De=Object.defineProperty,Ue=Be((t,e)=>De(t,"name",{value:e,configurable:!0}),"o"),ze=Object.defineProperty,je=Ue((t,e)=>ze(t,"name",{value:e,configurable:!0}),"o");const ke=je(t=>{const e=["y","mo","w","d","h","m","s","ms","future","past"];for(const o of e)if(!Object.hasOwn(t,o))throw new TypeError(`Missing required property: ${o}`);if(typeof t.future!="string"||typeof t.past!="string")throw new TypeError("Properties future and past must be of type string");const r=["y","mo","w","d","h","m","s","ms"];for(const o of r)if(typeof t[o]!="string"&&typeof t[o]!="function")throw new TypeError(`Property ${o} must be of type string or function`);if(t.decimal&&typeof t.decimal!="string")throw new TypeError("Property decimal must be of type string");if(t.delimiter&&typeof t.delimiter!="string")throw new TypeError("Property delimiter must be of type string");if(t._digitReplacements&&!Array.isArray(t._digitReplacements))throw new TypeError("Property _digitReplacements must be an array");if(t._numberFirst&&typeof t._numberFirst!="boolean")throw new TypeError("Property _numberFirst must be of type boolean");if(t.unitMap&&typeof t.unitMap!="object")throw new TypeError("Property unitMap must be an object");if(t.unitMap&&Object.values(t.unitMap).some(o=>typeof o!="string"))throw new TypeError("All values in unitMap must be of type string")},"validateDurationLanguage");var _e=Object.defineProperty,Re=f((t,e)=>_e(t,"name",{value:e,configurable:!0}),"w"),Fe=Object.defineProperty,Le=Re((t,e)=>Fe(t,"name",{value:e,configurable:!0}),"v"),Ve=Object.defineProperty,Ge=Le((t,e)=>Ve(t,"name",{value:e,configurable:!0}),"h");const j={d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},A=/[-/\\^$*+?.()|[\]{}]/g,k=new WeakMap,Ye=/^PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$/i,Ze=/^(?:(\d+):)?(?:(\d+):)?(\d+)$/,Ke=/^[+-]?\d+(?:\.\d+)?$/,We=/^[-+]/,He=Ge((t,e)=>{if(typeof t!="string"||t.length===0)return;const{defaultUnit:r="ms",language:o=Ie}=e??{};ke(o);const s=o.decimal??".",a=o.groupSeparator??",",i=o.placeholderSeparator??"_",u=s.replaceAll(A,String.raw`\$&`),l=a.replaceAll(A,String.raw`\$&`),n=i.replaceAll(A,String.raw`\$&`),m=o.unitMap??F;let d=t.replaceAll(new RegExp(String.raw`(\d)[${n}${l}](\d)`,"g"),"$1$2");if(s!=="."&&(d=d.replace(u,".")),Ke.test(t)){const y=Number.parseFloat(d.trim());if(!Number.isNaN(y)){const p=m[r];if(p!==void 0)return y*j[p]}return}const c=Ye.exec(t);if(c&&(c[1]!==void 0||c[2]!==void 0||c[3]!==void 0)){const y=Number.parseInt(c[1]??"0",10),p=Number.parseInt(c[2]??"0",10),w=Number.parseInt(c[3]??"0",10);return y*36e5+p*6e4+w*1e3}const h=Ze.exec(t);if(h){let y=0,p=0;h[2]!==void 0?(y=Number.parseInt(h[1]??"0",10),p=Number.parseInt(h[2],10)):h[1]!==void 0&&(p=Number.parseInt(h[1],10));const w=Number.parseInt(h[3]??"0",10);return y*36e5+p*6e4+w*1e3}let g=k.get(m);if(g===void 0){const y=Object.keys(m).toSorted((p,w)=>w.length-p.length).map(p=>p.replaceAll(A,String.raw`\$&`)).join("|");g=new RegExp(String.raw`(-?\d*\.?\d+)\s*(${y})`,"gi"),k.set(m,g)}let O=0,x,$=!1,M=-1,B=0;for(g.lastIndex=0;(x=g.exec(d))!==null;){$||(M=x.index),$=!0;const y=x[1],p=x[2];if(!y||!p)continue;const w=y.trim(),K=w.startsWith("-")?-1:1,W=w.replace(We,""),D=Number.parseFloat(W),U=m[p.toLowerCase()];if(U===void 0)continue;const H=j[U];if(Number.isNaN(D))return;O+=K*D*H,B=g.lastIndex}const Y=d.slice(0,M).trim(),Z=d.slice(B).trim();if(!($&&(Y.length>0||Z.length>0))&&$)return O},"parseDuration");var qe=Object.defineProperty,Xe=f((t,e)=>qe(t,"name",{value:e,configurable:!0}),"n$1");let Je=class extends ae{static{f(this,"u")}static{Xe(this,"Locker")}constructor(e){super({ttl:3e4,ttlAutopurge:!0,...e})}lock(e){if(this.get(e)!==void 0)throw new Error(`${e} is locked`);const r=se();return this.set(e,r),r}unlock(e,r){return this.get(e)!==r?!1:this.delete(e)}};var Qe=Object.defineProperty,et=f((t,e)=>Qe(t,"name",{value:e,configurable:!0}),"e$1");const T=et(t=>{if(t===Number(t))return t;if(!t)return;const e=He(t);if(e!==void 0)return e},"toMilliseconds");var tt=Object.defineProperty,rt=f((t,e)=>tt(t,"name",{value:e,configurable:!0}),"t");let ot=class extends Error{static{f(this,"d")}static{rt(this,"ValidationError")}code;statusCode;body;headers;name="ValidationError";constructor(e,r,o,s){const a=typeof o=="string"?o:o?.message||"Validation error";super(a),this.code=e,this.statusCode=r,this.body=o,this.headers=s}};var st=Object.defineProperty,S=f((t,e)=>st(t,"name",{value:e,configurable:!0}),"e");const at=S(t=>t&&t[0].toUpperCase()+t.slice(1),"capitalize"),it=S(t=>{if(!Array.isArray(t))return t;const[e,r,o]=t;return{body:r,headers:o,statusCode:e}},"toResponse");class nt{static{f(this,"Validator")}constructor(e="ValidationError"){this.prefix=e}prefix;static{S(this,"Validator")}validators={};add(e){Object.entries(e).forEach(([r,o])=>{const s=`${this.prefix}${at(r)}`;if(this.validators[s]={...this.validators[s],...o},typeof this.validators[s].isValid!="function")throw new TypeError('Validation config "isValid" is missing, or it is not a function!')})}async verify(e){for(const[r,o]of Object.entries(this.validators))if(!await o.isValid(e)){const s=o.response||(r in N?N[r]:N.UnknownError),a=it(s),{body:i,headers:u,message:l,statusCode:n}=a;throw new ot(r,n,i||l,u)}}}const St=S(t=>t.name==="ValidationError","isValidationError");var ct=Object.defineProperty,P=f((t,e)=>ct(t,"name",{value:e,configurable:!0}),"i");const lt=P(t=>{if(typeof t.name=="string")return t.name;if(typeof t.title=="string")return t.title;if(typeof t.originalName=="string")return t.originalName;if(typeof t.filename=="string")return t.filename},"extractOriginalName"),L=P((t,e)=>{const r={...t};return Object.keys(e).forEach(o=>{const s=e[o];if(s!==null&&typeof s=="object"&&!Array.isArray(s)){const a=r[o],i=a&&typeof a=="object"&&!Array.isArray(a)?a:{};r[o]=L(i,s)}else r[o]=s}),r},"deepMerge"),ut=P((t,e)=>{const r=L(t,e);Object.assign(t,r),t.originalName=lt(t.metadata)||t.originalName},"updateMetadata");var mt=Object.defineProperty,b=f((t,e)=>mt(t,"name",{value:e,configurable:!0}),"d");const gt=/(secret|password|passwd|pwd|token|api[_-]?key|credential|authorization|sas|signature|sessiontoken|connectionstring)/i,V=b(t=>{const e={};for(const[r,o]of Object.entries(t))typeof o=="string"&>.test(r)?e[r]="[REDACTED]":o&&typeof o=="object"&&!Array.isArray(o)&&o.constructor===Object?e[r]=V(o):e[r]=o;return e},"redactSecrets"),dt={allowMIME:["*/*"],filename:b(({id:t})=>t,"filename"),maxMetadataSize:"8MB",maxUploadSize:"5TB",onComplete:b(()=>{},"onComplete"),onCreate:b(()=>{},"onCreate"),onDelete:b(()=>{},"onDelete"),onError:b(()=>{},"onError"),onUpdate:b(()=>{},"onUpdate"),useRelativeLocation:!1,validation:{}},ht=b(t=>!t||t.length<3||t.length>255||I(t)?!1:!(t.toUpperCase().includes("../")||t.includes("\0")),"defaultCloudStorageFileNameValidation"),It=b(t=>{if(!t||t.length<3||t.length>255||I(t))return!1;const e=t.toUpperCase();return!['"',"*",":","<",">","?","\\","|","../","\0"].some(r=>e.includes(r))},"defaultFilesystemFileNameValidation");class G{static{f(this,"BaseStorage")}static{b(this,"BaseStorage")}onCreate;onUpdate;onComplete;onDelete;onError;isReady=!0;errorResponses={};cache;logger;metrics;genericConfig;maxMetadataSize;checksumTypes=[];supportsRange=!1;supportsMetadata=!0;supportsCacheControl=!1;supportsDelimiter=!1;reportsUploadProgress=!1;maxUploadSize;expiration;locker;namingFunction;validation=new nt;assetFolder=void 0;concurrency;constructor(e){const r={...dt,...e};this.onCreate=r.onCreate,this.onUpdate=r.onUpdate,this.onComplete=r.onComplete,this.onDelete=r.onDelete,this.onError=r.onError,this.namingFunction=r.filename,this.maxUploadSize=typeof r.maxUploadSize=="string"?z(r.maxUploadSize):r.maxUploadSize,this.maxMetadataSize=typeof r.maxMetadataSize=="string"?z(r.maxMetadataSize):r.maxMetadataSize,this.expiration=r.expiration,this.genericConfig=r,r.assetFolder!==void 0&&(this.assetFolder=ee(r.assetFolder)),this.locker=new Je({max:1e3,ttl:3e4,ttlAutopurge:!0}),this.cache=r.cache??new oe,this.logger=r.logger,this.metrics=r.metrics??new re,this.logger?.debug(`${this.constructor.name} config: ${Q(V({...e,logger:this.logger.constructor}))}`);const o=T(r.expiration?.purgeInterval);o&&this.startAutoPurge(o);const s={isValid(l){if(l.size===void 0)return!0;const n=l.size;if(n==null)return!1;const m=typeof n=="number"?n:Number(n);if(Number.isNaN(m)||m<0)return!1;const d=typeof this.value=="number"?this.value:Number(this.value);return!Number.isNaN(d)&&m<=d},response:N.RequestEntityTooLarge,value:this.maxUploadSize},a={isValid(l){return!!te.is(l.contentType,this.value)},response:N.UnsupportedMediaType,value:r.allowMIME},i=r.fileNameValidation??ht,u={isValid(l){return i(l.name)},response:N.InvalidFileName};this.validation.add({filename:u,mime:a,size:s}),this.validation.add({...r.validation})}get raw(){}async getReadUrl(e,r){return v(E.METHOD_NOT_ALLOWED,`${this.constructor.name} does not implement getReadUrl()`)}async getUploadUrl(e,r){return v(E.METHOD_NOT_ALLOWED,`${this.constructor.name} does not implement getUploadUrl()`)}get tusExtension(){const e=["creation","creation-with-upload","termination","checksum","creation-defer-length","concatenation"];return this.expiration&&e.push("expiration"),e}async validate(e){await this.validation.verify(e)}async exists(e,r){return this.instrumentOperation("exists",async()=>{try{return await this.getMeta(e.id,r),!0}catch{return!1}})}normalizeError(e){const r={code:e.name,message:e.message,name:e.name,statusCode:500};return{...r,message:`[${this.constructor.name}] ${r.message}`}}get config(){return this.genericConfig}async saveMeta(e){return G.assertSafeId(e.id),this.updateTimestamps(e),this.cache.set(e.id,e),this.meta.save(e.id,e)}static assertSafeId(e){(!e||typeof e!="string"||e.includes("\0")||e.includes("../")||e.includes("..\\")||e===".."||e.startsWith("../")||e.startsWith("..\\")||I(e)||/^[A-Z]:[/\\]/i.test(e))&&v(E.INVALID_FILE_NAME,`Invalid file id: "${e}"`)}async deleteMeta(e){return this.cache.delete(e),this.meta.delete(e)}async getMeta(e,r){try{const o=await this.meta.get(e);return this.cache.set(o.id,o),{...o}}catch(o){const s=this.normalizeError(o instanceof Error?o:new Error(String(o)));return await this.onError(s),v(E.FILE_NOT_FOUND)}}async checkIfExpired(e){return ne(e)?(this.delete(e).catch(()=>{}),this.deleteMeta(e.id).catch(()=>{}),v(E.GONE)):e}async purge(e){return this.instrumentOperation("purge",async()=>{const r=T(e||this.expiration?.maxAge),o={items:[],maxAgeMs:r};if(r){const s=Date.now()-r,a=(await this.list()).filter(i=>Number(new Date(this.expiration?.rolling&&i.modifiedAt||i.createdAt))<s);for await(const{id:i,...u}of a)try{const l=await this.delete({id:i});o.items.push({...l,...u})}catch(l){this.logger?.warn(`Failed to delete file ${i} during purge: ${l instanceof Error?l.message:String(l)}`)}o.items.length>0&&(this.logger?.info(`Purge: removed ${o.items.length} uploads`),this.metrics.gauge("storage.operations.purge.items_count",o.items.length,{storage:this.constructor.name.toLowerCase().replace("storage","")}))}return o})}async getStream({id:e}){return this.instrumentOperation("getStream",async()=>{const r=await this.get({id:e}),o=X.from(r.content);return{headers:{"Content-Length":String(r.size),"Content-Type":r.contentType,...r.ETag&&{ETag:r.ETag},...r.modifiedAt&&{"Last-Modified":r.modifiedAt.toString()}},size:typeof r.size=="number"?r.size:void 0,stream:o}})}async list(e=1e3,r){return this.instrumentOperation("list",async()=>{throw new Error("Not implemented")})}async listDirectory(e){return v(E.METHOD_NOT_ALLOWED,`${this.constructor.name} does not implement listDirectory()`)}async update({id:e},r){return this.instrumentOperation("update",async()=>{const o=await this.getMeta(e),s={...r};if("ttl"in s&&s.ttl!==void 0){const i=s.ttl,u=typeof i=="string"?T(i):i;u!==void 0&&(s.expiredAt=Date.now()+u),delete s.ttl}ut(o,s),await this.saveMeta(o);const a={...o,status:"updated"};return await this.onUpdate(a),a})}async deleteBatch(e,r){const o=Date.now(),s=this.constructor.name.toLowerCase().replace("storage","");this.metrics.increment("storage.operations.batch.delete.count",1,{batch_size:e.length,storage:s});const a=[],i=[],u=e.map(async m=>{try{return{file:await this.delete({id:m},r),id:m,success:!0}}catch(d){const c=d instanceof Error?d.message:"Delete failed";return this.metrics.increment("storage.operations.delete.error.count",1,{error:c,storage:s}),{error:c,id:m,success:!1}}}),l=await Promise.allSettled(u);for(const m of l)m.status==="fulfilled"?m.value.success?a.push(m.value.file):i.push({error:m.value.error,id:m.value.id}):i.push({error:m.reason?.message||"Delete failed",id:""});const n=Date.now()-o;return this.metrics.timing("storage.operations.batch.delete.duration",n,{batch_size:e.length,storage:s}),this.metrics.gauge("storage.operations.batch.delete.success_count",a.length,{storage:s}),this.metrics.gauge("storage.operations.batch.delete.failed_count",i.length,{storage:s}),{failed:i,failedCount:i.length,successful:a,successfulCount:a.length}}async copyBatch(e){const r=Date.now(),o=this.constructor.name.toLowerCase().replace("storage","");this.metrics.increment("storage.operations.batch.copy.count",1,{batch_size:e.length,storage:o});const s=[],a=[],i=e.map(async({destination:n,options:m,source:d})=>{try{return{file:await this.copy(d,n,m),id:n,success:!0}}catch(c){const h=c instanceof Error?c.message:"Copy failed";return this.metrics.increment("storage.operations.copy.error.count",1,{error:h,storage:o}),{error:h,id:n,success:!1}}}),u=await Promise.allSettled(i);for(const n of u)n.status==="fulfilled"?n.value.success&&n.value.file?s.push(n.value.file):a.push({error:n.value.error||"Copy failed",id:n.value.id}):a.push({error:n.reason?.message||"Copy failed",id:""});const l=Date.now()-r;return this.metrics.timing("storage.operations.batch.copy.duration",l,{batch_size:e.length,storage:o}),this.metrics.gauge("storage.operations.batch.copy.success_count",s.length,{storage:o}),this.metrics.gauge("storage.operations.batch.copy.failed_count",a.length,{storage:o}),{failed:a,failedCount:a.length,successful:s,successfulCount:s.length}}async moveBatch(e){const r=Date.now(),o=this.constructor.name.toLowerCase().replace("storage","");this.metrics.increment("storage.operations.batch.move.count",1,{batch_size:e.length,storage:o});const s=[],a=[],i=e.map(async({destination:n,source:m})=>{try{return{file:await this.move(m,n),id:n,success:!0}}catch(d){const c=d instanceof Error?d.message:"Move failed";return this.metrics.increment("storage.operations.move.error.count",1,{error:c,storage:o}),{error:c,id:n,success:!1}}}),u=await Promise.allSettled(i);for(const n of u)n.status==="fulfilled"?n.value.success&&n.value.file?s.push(n.value.file):a.push({error:n.value.error||"Move failed",id:n.value.id}):a.push({error:n.reason?.message||"Move failed",id:n.reason?.id||""});const l=Date.now()-r;return this.metrics.timing("storage.operations.batch.move.duration",l,{batch_size:e.length,storage:o}),this.metrics.gauge("storage.operations.batch.move.success_count",s.length,{storage:o}),this.metrics.gauge("storage.operations.batch.move.failed_count",a.length,{storage:o}),{failed:a,failedCount:a.length,successful:s,successfulCount:s.length}}async lock(e){const r=[...this.locker.keys()];return r.includes(e)?v(E.FILE_LOCKED):this.config.concurrency&&typeof this.config.concurrency=="number"&&this.config.concurrency<=r.length?v(E.STORAGE_BUSY):this.locker.lock(e)}async unlock(e,r){if(r===void 0){this.locker.delete(e);return}this.locker.unlock(e,r)}async withLock(e,r){const o=await this.lock(e);try{return await r()}finally{await this.unlock(e,o)}}isUnsupportedChecksum(e=""){return!!e&&!this.checksumTypes.includes(e)}startAutoPurge(e){if(e>=2147483647)throw new Error("“purgeInterval” must be less than 2147483647 ms");J(()=>{this.purge().catch(r=>this.logger?.error(r))},e)}updateTimestamps(e){e.createdAt??=new Date().toISOString();const r=T(this.expiration?.maxAge);return r&&!e.expiredAt&&(e.expiredAt=this.expiration?.rolling?Date.now()+r:+new Date(e.createdAt)+r),e}getRetryConfig(){}runOperation(e,r,o){let s;typeof e?.retries=="number"?s={maxRetries:e.retries}:e?.retries&&(s=e.retries);const a={...this.getRetryConfig(),...s};o?.replayable===!1&&(a.maxRetries=0);const i=[];this.genericConfig.defaultSignal&&i.push(this.genericConfig.defaultSignal),e?.signal&&i.push(e.signal);let u;i.length===1?[u]=i:i.length>1&&(u=AbortSignal.any(i));const l=typeof e?.timeout=="number"?e.timeout:this.genericConfig.defaultTimeout,n=typeof l=="number"&&l>0?l:void 0,m=a.shouldRetry;a.shouldRetry=c=>u?.aborted||c instanceof Error&&c.name==="AbortError"?!1:m?m(c):!1;const d=b(c=>{if(c instanceof Error&&c.name==="AbortError")return c;const h=c instanceof Error&&c.message?c.message:"The operation was aborted",g=new Error(h,{cause:c});return g.name="AbortError",g},"toAbortError");return ie(async()=>{if(u?.aborted)throw d(u.reason);let c,h;if(n===void 0)h=u;else{const g=new AbortController;c=setTimeout(()=>{g.abort(new DOMException(`The operation timed out after ${n}ms`,"TimeoutError"))},n),h=u?AbortSignal.any([u,g.signal]):g.signal}try{return await r(h)}catch(g){throw h?.aborted?d(g):g}finally{c&&clearTimeout(c)}},a)}async instrumentOperation(e,r,o){const s=Date.now(),a={storage:this.constructor.name.toLowerCase().replace("storage",""),...o};try{this.metrics.increment(`storage.operations.${e}.count`,1,a);const i=await r(),u=Date.now()-s;return this.metrics.timing(`storage.operations.${e}.duration`,u,a),i&&typeof i=="object"&&"size"in i&&typeof i.size=="number"&&this.metrics.gauge("storage.files.size",i.size,{...a,operation:e}),i}catch(i){const u=Date.now()-s,l=i instanceof Error?i.message:"Unknown error";throw this.metrics.timing(`storage.operations.${e}.duration`,u,{...a,error:"true"}),this.metrics.increment(`storage.operations.${e}.error.count`,1,{...a,error:l}),i}}}export{z as $,G as B,It as a,ot as b,He as c,ht as d,St as i,T as t,ut as u};
|
|
@@ -154,6 +154,7 @@ declare enum ERRORS {
|
|
|
154
154
|
INVALID_RANGE = "InvalidRange",
|
|
155
155
|
INVALID_TYPE = "Invalidtype",
|
|
156
156
|
METHOD_NOT_ALLOWED = "MethodNotAllowed",
|
|
157
|
+
READ_ONLY = "ReadOnly",
|
|
157
158
|
REQUEST_ABORTED = "RequestAborted",
|
|
158
159
|
REQUEST_ENTITY_TOO_LARGE = "RequestEntityTooLarge",
|
|
159
160
|
STORAGE_BUSY = "StorageBusy",
|
|
@@ -797,6 +798,29 @@ declare abstract class BaseStorage<TFile extends File = File, TFileReturn extend
|
|
|
797
798
|
*/
|
|
798
799
|
readonly supportsRange: boolean;
|
|
799
800
|
/**
|
|
801
|
+
* Adapter capability flag: when `true`, the adapter persists user-supplied
|
|
802
|
+
* key/value metadata alongside the object and returns it on `get`/`head`.
|
|
803
|
+
* Defaults to `true` — most backends carry metadata. Adapters that drop or
|
|
804
|
+
* ignore custom metadata override this to `false`; the `Files` facade reads
|
|
805
|
+
* it via {@link Files.capabilities} so callers can fail fast instead of
|
|
806
|
+
* silently losing metadata.
|
|
807
|
+
*/
|
|
808
|
+
readonly supportsMetadata: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Adapter capability flag: when `true`, the adapter honours an object
|
|
811
|
+
* `cacheControl` directive on write. Defaults to `false` — most backends
|
|
812
|
+
* have no cache-control concept. Exposed through {@link Files.capabilities}.
|
|
813
|
+
*/
|
|
814
|
+
readonly supportsCacheControl: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* Adapter capability flag: when `true`, the adapter implements
|
|
817
|
+
* {@link BaseStorage.listDirectory} so the provider collapses keys into
|
|
818
|
+
* common prefixes server-side. The `Files` facade prefers this native path
|
|
819
|
+
* for `list({ delimiter })`; adapters that leave it `false` fall back to
|
|
820
|
+
* synthesizing the directory view from a full listing in the facade.
|
|
821
|
+
*/
|
|
822
|
+
readonly supportsDelimiter: boolean;
|
|
823
|
+
/**
|
|
800
824
|
* Adapter capability flag: when `true`, the adapter reports its own
|
|
801
825
|
* byte-level `onProgress` events during `write`. The `Files` facade skips
|
|
802
826
|
* its coarse "start/done" emission for adapters that report progress
|
|
@@ -964,6 +988,24 @@ declare abstract class BaseStorage<TFile extends File = File, TFileReturn extend
|
|
|
964
988
|
*/
|
|
965
989
|
list(_limit?: number, _options?: OperationOptions): Promise<TFile[]>;
|
|
966
990
|
/**
|
|
991
|
+
* Directory-style listing: collapse keys that share a path segment into common prefixes,
|
|
992
|
+
* server-side, instead of returning every object. Adapters that can push the `delimiter` down to
|
|
993
|
+
* the provider (S3 family, GCS, Azure) override this and set
|
|
994
|
+
* {@link BaseStorage.supportsDelimiter} to `true`; the default throws so the `Files` facade knows
|
|
995
|
+
* to fall back to synthesizing the view from {@link BaseStorage.list}.
|
|
996
|
+
* @param _options Listing options — `delimiter` (required), plus optional `prefix`/`limit` and the usual per-call signal/timeout/retries.
|
|
997
|
+
* @returns Direct-child files and the common prefixes one delimiter level below `prefix`.
|
|
998
|
+
* @throws {UploadError} `METHOD_NOT_ALLOWED` when the adapter has no native delimiter support.
|
|
999
|
+
*/
|
|
1000
|
+
listDirectory(_options?: OperationOptions & {
|
|
1001
|
+
delimiter: string;
|
|
1002
|
+
limit?: number;
|
|
1003
|
+
prefix?: string;
|
|
1004
|
+
}): Promise<{
|
|
1005
|
+
files: TFile[];
|
|
1006
|
+
prefixes: string[];
|
|
1007
|
+
}>;
|
|
1008
|
+
/**
|
|
967
1009
|
* Updates file metadata with user-provided key-value pairs.
|
|
968
1010
|
* @param query File query containing the file ID to update.
|
|
969
1011
|
* @param query.id File ID to update.
|
|
@@ -1130,4 +1172,4 @@ declare abstract class BaseStorage<TFile extends File = File, TFileReturn extend
|
|
|
1130
1172
|
*/
|
|
1131
1173
|
protected instrumentOperation<T>(operation: string, function_: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
|
|
1132
1174
|
}
|
|
1133
|
-
export { throwErrorCode as $, RangeChecksum as A, BaseStorage as B, RangeHasher as C, DiskStorageOptions as D, ERRORS as E, File as F, ResponseBody as G, HttpError as H, IncomingMessageWithBody as I, ResponseTuple as J, UploadResponse as K, LocalMetaStorageOptions as L, MetaStorage as M, ValidationError as N, OperationOptions as O, PurgeList as P, ValidatorConfig as Q, RetryConfig as R, defaultCloudStorageFileNameValidation as S, defaultFilesystemFileNameValidation as T, UploadFile as U, Validation as V, extractHttpStatus as W, isRetryableError as X, isUploadError as Y, mapStatusToErrorCode as Z, retry as _, FileReturn as a, wrapStorageError as a0, Cache as a1,
|
|
1175
|
+
export { throwErrorCode as $, RangeChecksum as A, BaseStorage as B, RangeHasher as C, DiskStorageOptions as D, ERRORS as E, File as F, ResponseBody as G, HttpError as H, IncomingMessageWithBody as I, ResponseTuple as J, UploadResponse as K, LocalMetaStorageOptions as L, MetaStorage as M, ValidationError as N, OperationOptions as O, PurgeList as P, ValidatorConfig as Q, RetryConfig as R, defaultCloudStorageFileNameValidation as S, defaultFilesystemFileNameValidation as T, UploadFile as U, Validation as V, extractHttpStatus as W, isRetryableError as X, isUploadError as Y, mapStatusToErrorCode as Z, retry as _, FileReturn as a, wrapStorageError as a0, Cache as a1, FileInit as b, createRetryWrapper as c, FilePart as d, FileQuery as e, UploadError as f, UploadEventType as g, DiskStorageWithChecksumOptions as h, MetaStorageOptions as i, BaseStorageOptions as j, ResponseBodyType as k, ErrorResponses as l, Metrics as m, BatchOperationResponse as n, BatchOperationResult as o, ErrorMap as p, ExpirationOptions as q, Header as r, Headers as s, HttpErrorBody as t, Metadata as u, OnComplete as v, OnCreate as w, OnDelete as x, OnError as y, OnUpdate as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
-
import { U as UploadFile, k as ResponseBodyType, B as BaseStorage, l as ErrorResponses } from "./storage.d-
|
|
2
|
+
import { U as UploadFile, k as ResponseBodyType, B as BaseStorage, l as ErrorResponses } from "./storage.d-C6HtvSoY.js";
|
|
3
3
|
import 'node:stream';
|
|
4
|
-
import { M as MediaTransformer } from "./media-transformer.d-
|
|
5
|
-
import { U as UploadOptions } from "./types.d-
|
|
4
|
+
import { M as MediaTransformer } from "./media-transformer.d-B9dfBdoV.js";
|
|
5
|
+
import { U as UploadOptions } from "./types.d-CmBrgo0d.js";
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
import 'node:http';
|
|
8
8
|
import 'lru-cache';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions } from "./storage.d-C6HtvSoY.js";
|
|
2
2
|
import 'node:stream';
|
|
3
3
|
import { Client } from '@microsoft/microsoft-graph-client';
|
|
4
4
|
declare class OneDriveFile extends File {
|
|
@@ -2,8 +2,8 @@ import { EventEmitter } from 'node:events';
|
|
|
2
2
|
import { IncomingMessage } from 'node:http';
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
4
|
import { PaginationResult } from '@visulima/pagination';
|
|
5
|
-
import { U as UploadFile,
|
|
6
|
-
import { M as MediaTransformer } from "./media-transformer.d-
|
|
5
|
+
import { U as UploadFile, f as UploadError, g as UploadEventType, B as BaseStorage } from "./storage.d-C6HtvSoY.js";
|
|
6
|
+
import { M as MediaTransformer } from "./media-transformer.d-B9dfBdoV.js";
|
|
7
7
|
type WebRequest = globalThis.Request;
|
|
8
8
|
type WebResponse = globalThis.Response;
|
|
9
9
|
interface BaseResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a1 as Cache, F as File, a as FileReturn, B as BaseStorage } from "./storage.d-
|
|
1
|
+
import { a1 as Cache, F as File, a as FileReturn, B as BaseStorage } from "./storage.d-C6HtvSoY.js";
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
/**
|
|
4
4
|
* Base transformer configuration with common properties
|
|
@@ -717,4 +717,4 @@ interface AudioTransformerConfig extends BaseTransformerConfig {
|
|
|
717
717
|
/** Maximum audio size to process (in bytes) */
|
|
718
718
|
maxAudioSize?: number;
|
|
719
719
|
}
|
|
720
|
-
export { AudioTransformerConfig as A, BaseTransformer as B, CropOptions as C,
|
|
720
|
+
export { AudioTransformerConfig as A, BaseTransformer as B, CropOptions as C, DilateOptions as D, ExtractChannelOptions as E, ToColourspaceOptions as F, GreyscaleOptions as G, RemoveAlphaOptions as H, ImageTransformerConfig as I, JoinChannelOptions as J, EnsureAlphaOptions as K, LinearOptions as L, MedianOptions as M, TransformationStep as N, MediaTransformerConfig as O, PipelineColourspaceOptions as P, MediaTransformResult as Q, ResizeOptions as R, SharpenOptions as S, TransformResult as T, MediaTransformQuery as U, VideoTransformerConfig as V, MediaTransformationStep as W, AudioTransformResult as a, AudioResampleOptions as b, AudioChannelMixOptions as c, AudioTransformOptions as d, AudioTransformationStep as e, VideoTransformResult as f, VideoResizeOptions as g, VideoCropOptions as h, VideoRotateOptions as i, VideoTransformOptions as j, VideoTransformationStep as k, RotateOptions as l, ImageFormat as m, TransformOptions as n, BlurOptions as o, CLAHEOptions as p, ConvolveOptions as q, ThresholdOptions as r, BooleanOptions as s, RecombineOptions as t, ModulateOptions as u, TintOptions as v, ColourspaceOptions as w, BandboolOptions as x, AffineOptions as y, ErodeOptions as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File,
|
|
1
|
+
import { F as File, i as MetaStorageOptions, j as BaseStorageOptions, L as LocalMetaStorageOptions, M as MetaStorage, H as HttpError, e as FileQuery, O as OperationOptions, b as FileInit } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
|
-
import { P as Part, S as S3CallOptions, a as S3ApiOperations, b as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-
|
|
3
|
+
import { P as Part, S as S3CallOptions, a as S3ApiOperations, b as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-CoYAf_hG.js";
|
|
4
4
|
import { S3ClientConfig, ObjectCannedACL, S3Client } from '@aws-sdk/client-s3';
|
|
5
5
|
import { ResponseMetadata } from '@aws-sdk/types';
|
|
6
6
|
import 'node:crypto';
|
|
@@ -221,8 +221,13 @@ declare class S3ClientAdapter implements S3ApiOperations {
|
|
|
221
221
|
listObjectsV2(params: {
|
|
222
222
|
Bucket: string;
|
|
223
223
|
ContinuationToken?: string;
|
|
224
|
+
Delimiter?: string;
|
|
224
225
|
MaxKeys?: number;
|
|
226
|
+
Prefix?: string;
|
|
225
227
|
}, options?: S3CallOptions): Promise<{
|
|
228
|
+
CommonPrefixes?: {
|
|
229
|
+
Prefix?: string;
|
|
230
|
+
}[];
|
|
226
231
|
Contents?: {
|
|
227
232
|
Key?: string;
|
|
228
233
|
LastModified?: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/S3File-BfmCOET4.js";import{default as r}from"../../packem_shared/S3MetaStorage-vcriiosn.js";import{default as S}from"../../packem_shared/S3Storage-
|
|
1
|
+
import{default as t}from"../../packem_shared/S3File-BfmCOET4.js";import{default as r}from"../../packem_shared/S3MetaStorage-vcriiosn.js";import{default as S}from"../../packem_shared/S3Storage-adY1XLfH.js";export{t as S3File,r as S3MetaStorage,S as S3Storage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Part, S as S3CallOptions, a as S3ApiOperations, b as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-
|
|
2
|
-
import { F as File,
|
|
1
|
+
import { P as Part, S as S3CallOptions, a as S3ApiOperations, b as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-CoYAf_hG.js";
|
|
2
|
+
import { F as File, i as MetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, H as HttpError, e as FileQuery, O as OperationOptions, b as FileInit } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
4
|
import { AwsClient } from 'aws4fetch';
|
|
5
5
|
import 'node:crypto';
|
|
@@ -152,8 +152,13 @@ declare class AwsLightApiAdapter implements S3ApiOperations {
|
|
|
152
152
|
listObjectsV2(params: {
|
|
153
153
|
Bucket: string;
|
|
154
154
|
ContinuationToken?: string;
|
|
155
|
+
Delimiter?: string;
|
|
155
156
|
MaxKeys?: number;
|
|
157
|
+
Prefix?: string;
|
|
156
158
|
}, options?: S3CallOptions): Promise<{
|
|
159
|
+
CommonPrefixes?: {
|
|
160
|
+
Prefix?: string;
|
|
161
|
+
}[];
|
|
157
162
|
Contents?: {
|
|
158
163
|
Key?: string;
|
|
159
164
|
LastModified?: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/AwsLightFile-BSqjc_rD.js";import{l as r}from"../../packem_shared/aws-light-meta-storage-
|
|
1
|
+
import{default as a}from"../../packem_shared/AwsLightFile-BSqjc_rD.js";import{l as r}from"../../packem_shared/aws-light-meta-storage-CXIZfLXR.js";import{default as f}from"../../packem_shared/AwsLightStorage-CWBRVcn5.js";export{a as AwsLightFile,r as AwsLightMetaStorage,f as AwsLightStorage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as File,
|
|
1
|
+
import { F as File, i as MetaStorageOptions, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, R as RetryConfig, b as FileInit, O as OperationOptions, e as FileQuery, n as BatchOperationResponse, d as FilePart, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
2
2
|
import 'node:stream';
|
|
3
3
|
import { TokenCredential } from '@azure/core-auth';
|
|
4
4
|
import { BlobServiceClient } from '@azure/storage-blob';
|
|
@@ -105,7 +105,7 @@ declare class AzureMetaStorage<T extends File = File> extends MetaStorage<T> {
|
|
|
105
105
|
* @remarks
|
|
106
106
|
* ## Supported Operations
|
|
107
107
|
* - ✅ create, write, delete, get, list, update, copy, move
|
|
108
|
-
* - ✅ Batch operations: deleteBatch,
|
|
108
|
+
* - ✅ Batch operations: deleteBatch (native Blob Batch API, 256/request), copyBatch + moveBatch (inherited from BaseStorage)
|
|
109
109
|
* - ✅ exists: Implemented (checks metadata and Azure blob)
|
|
110
110
|
* - ❌ getStream: Not implemented (use get() for file retrieval)
|
|
111
111
|
* - ✅ getReadUrl / getUploadUrl: service SAS (shared key / connection string) or User Delegation SAS (Microsoft Entra credential). SAS-token adapters append the pre-issued token. Anonymous (public-container) adapters serve unsigned read URLs only — uploads are rejected.
|
|
@@ -141,6 +141,20 @@ declare class AzureStorage extends BaseStorage {
|
|
|
141
141
|
id
|
|
142
142
|
}: FileQuery, options?: OperationOptions): Promise<AzureFile>;
|
|
143
143
|
/**
|
|
144
|
+
* Deletes many blobs in one round-trip using Azure's native
|
|
145
|
+
* [Blob Batch API](https://learn.microsoft.com/rest/api/storageservices/blob-batch)
|
|
146
|
+
* (up to 256 sub-requests per request) instead of issuing one DELETE per key.
|
|
147
|
+
*
|
|
148
|
+
* Sidecar metadata removal and the {@link onDelete} hook are still applied per
|
|
149
|
+
* successfully-deleted id; a 404 sub-response is treated as success to match the
|
|
150
|
+
* `deleteIfExists` semantics of the single-key {@link delete}. If the batch endpoint
|
|
151
|
+
* is unavailable (e.g. an Azurite build without batch support) the call transparently
|
|
152
|
+
* falls back to the per-key base implementation.
|
|
153
|
+
* @param ids File ids/keys to delete.
|
|
154
|
+
* @param options Optional per-call signal/timeout/retries.
|
|
155
|
+
*/
|
|
156
|
+
override deleteBatch(ids: string[], options?: OperationOptions): Promise<BatchOperationResponse<AzureFile>>;
|
|
157
|
+
/**
|
|
144
158
|
* Moves an upload file to a new location.
|
|
145
159
|
* @param name Source file name/ID.
|
|
146
160
|
* @param destination Destination file name/ID.
|
|
@@ -180,8 +194,11 @@ declare class AzureStorage extends BaseStorage {
|
|
|
180
194
|
* (public-container) adapters return the unsigned blob URL.
|
|
181
195
|
* @param key Storage key.
|
|
182
196
|
* @param options Optional expiry and response content overrides. Response
|
|
183
|
-
* content overrides only apply when the adapter mints a fresh SAS
|
|
184
|
-
*
|
|
197
|
+
* content overrides only apply when the adapter mints a fresh SAS; they are
|
|
198
|
+
* rejected on the pre-issued `sasToken` and anonymous paths, which have no
|
|
199
|
+
* signature in which to bind them.
|
|
200
|
+
* @throws {UploadError} When the adapter has no way to authorise reads, or
|
|
201
|
+
* when a response content override is supplied on a non-signing path.
|
|
185
202
|
*/
|
|
186
203
|
override getReadUrl(key: string, options?: {
|
|
187
204
|
expiresIn?: number;
|
|
@@ -197,9 +214,11 @@ declare class AzureStorage extends BaseStorage {
|
|
|
197
214
|
* header on the PUT — a SAS cannot pin the stored content type.
|
|
198
215
|
* @param key Storage key.
|
|
199
216
|
* @param options Optional expiry. `contentLength` and `contentType` are
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
217
|
+
* rejected: an Azure SAS does not bind the request `Content-Type` into the
|
|
218
|
+
* signature and has no server-enforced size limit, so accepting them would
|
|
219
|
+
* hand the caller a guarantee that does not hold.
|
|
220
|
+
* @throws {UploadError} When the adapter cannot authorise writes, or when an
|
|
221
|
+
* unenforceable `contentType`/`contentLength` override is supplied.
|
|
203
222
|
*/
|
|
204
223
|
override getUploadUrl(key: string, options?: {
|
|
205
224
|
contentLength?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/AzureFile-Dgj2Tef4.js";import{b as t}from"../../packem_shared/azure-meta-storage-
|
|
1
|
+
import{default as a}from"../../packem_shared/AzureFile-Dgj2Tef4.js";import{b as t}from"../../packem_shared/azure-meta-storage-B-D-tBVw.js";import{default as u}from"../../packem_shared/AzureStorage-nhAojuEU.js";export{a as AzureFile,t as AzureSMetaStorage,u as AzureStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { BoxClient } from 'box-typescript-sdk-gen';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/BoxFile-Be0S4N1L.js";import{default as r}from"../../packem_shared/BoxMetaStorage-
|
|
1
|
+
import{default as a}from"../../packem_shared/BoxFile-Be0S4N1L.js";import{default as r}from"../../packem_shared/BoxMetaStorage-XMZn5yvp.js";import{default as x}from"../../packem_shared/BoxStorage-C3--16du.js";export{a as BoxFile,r as BoxMetaStorage,x as BoxStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
2
2
|
import { Readable } from '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-DUuLtPik.js";
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import 'lru-cache';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/BunS3File-D-SRiyrm.js";import{default as r}from"../../packem_shared/BunS3MetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/BunS3File-D-SRiyrm.js";import{default as r}from"../../packem_shared/BunS3MetaStorage-DomG8mVK.js";import{default as u}from"../../packem_shared/BunS3Storage-0oYNi2Os.js";export{t as BunS3File,r as BunS3MetaStorage,u as BunS3Storage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import * as BunnyStorageSDK from '@bunny.net/storage-sdk';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/BunnyFile-Dotl-lO9.js";import{default as r}from"../../packem_shared/BunnyMetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/BunnyFile-Dotl-lO9.js";import{default as r}from"../../packem_shared/BunnyMetaStorage-luemw1pL.js";import{default as n}from"../../packem_shared/BunnyStorage-CIkpp1Rc.js";export{t as BunnyFile,r as BunnyMetaStorage,n as BunnyStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { v2 } from 'cloudinary';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"../../packem_shared/CloudinaryFile-B5-m33eS.js";import{default as t}from"../../packem_shared/CloudinaryMetaStorage-
|
|
1
|
+
import{default as r}from"../../packem_shared/CloudinaryFile-B5-m33eS.js";import{default as t}from"../../packem_shared/CloudinaryMetaStorage-DpxjshXZ.js";import{default as d}from"../../packem_shared/CloudinaryStorage-9Y1Gq0gr.js";export{r as CloudinaryFile,t as CloudinaryMetaStorage,d as CloudinaryStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { Dropbox } from 'dropbox';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"../../packem_shared/DropboxFile-BGVG2kXM.js";import{default as t}from"../../packem_shared/DropboxMetaStorage-
|
|
1
|
+
import{default as e}from"../../packem_shared/DropboxFile-BGVG2kXM.js";import{default as t}from"../../packem_shared/DropboxMetaStorage-h0eTJuk5.js";import{default as p}from"../../packem_shared/DropboxStorage-CuA9MkpH.js";export{e as DropboxFile,t as DropboxMetaStorage,p as DropboxStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import 'lru-cache';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"../../packem_shared/FirebaseFile-JEu3plMP.js";import{default as o}from"../../packem_shared/FirebaseMetaStorage-
|
|
1
|
+
import{default as r}from"../../packem_shared/FirebaseFile-JEu3plMP.js";import{default as o}from"../../packem_shared/FirebaseMetaStorage-CCBnEE8_.js";import{default as s}from"../../packem_shared/FirebaseStorage-DUskfjh_.js";export{r as FirebaseFile,o as FirebaseMetaStorage,s as FirebaseStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { AccessOptions } from 'basic-ftp';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -50,6 +50,7 @@ interface FtpStorageOptions extends BaseStorageOptions {
|
|
|
50
50
|
declare class FtpStorage extends BaseStorage<FtpFile> {
|
|
51
51
|
static override readonly name: string;
|
|
52
52
|
override checksumTypes: string[];
|
|
53
|
+
override readonly supportsRange: boolean;
|
|
53
54
|
protected meta: MetaStorage<FtpFile>;
|
|
54
55
|
private readonly connection;
|
|
55
56
|
private readonly rootFolderPath;
|
|
@@ -58,7 +59,12 @@ declare class FtpStorage extends BaseStorage<FtpFile> {
|
|
|
58
59
|
write(part: FilePart | FileQuery | FtpFile, options?: OperationOptions): Promise<FtpFile>;
|
|
59
60
|
get({
|
|
60
61
|
id
|
|
61
|
-
}: FileQuery, options?: OperationOptions
|
|
62
|
+
}: FileQuery, options?: OperationOptions & {
|
|
63
|
+
range?: {
|
|
64
|
+
end?: number;
|
|
65
|
+
start: number;
|
|
66
|
+
};
|
|
67
|
+
}): Promise<FileReturn>;
|
|
62
68
|
delete({
|
|
63
69
|
id
|
|
64
70
|
}: FileQuery, options?: OperationOptions): Promise<FtpFile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/FtpFile-B8jaICTB.js";import{default as r}from"../../packem_shared/FtpMetaStorage-
|
|
1
|
+
import{default as a}from"../../packem_shared/FtpFile-B8jaICTB.js";import{default as r}from"../../packem_shared/FtpMetaStorage-DxHcXk9x.js";import{default as p}from"../../packem_shared/FtpStorage-DMpDY7oG.js";export{a as FtpFile,r as FtpMetaStorage,p as FtpStorage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as File,
|
|
1
|
+
import { F as File, i as MetaStorageOptions, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, H as HttpError, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
2
2
|
import 'node:stream';
|
|
3
3
|
import { RetryConfig } from 'gaxios';
|
|
4
4
|
import { GoogleAuthOptions, GoogleAuth } from 'google-auth-library';
|
|
@@ -104,6 +104,7 @@ declare class GCSMetaStorage<T extends File = File> extends MetaStorage<T> {
|
|
|
104
104
|
declare class GCStorage extends BaseStorage<GCSFile> {
|
|
105
105
|
static override readonly name: string;
|
|
106
106
|
override checksumTypes: string[];
|
|
107
|
+
override readonly supportsDelimiter: boolean;
|
|
107
108
|
override get raw(): GoogleAuth;
|
|
108
109
|
protected meta: MetaStorage;
|
|
109
110
|
private readonly bucket;
|
|
@@ -166,6 +167,19 @@ declare class GCStorage extends BaseStorage<GCSFile> {
|
|
|
166
167
|
id
|
|
167
168
|
}: FileQuery, options?: OperationOptions): Promise<boolean>;
|
|
168
169
|
override list(limit?: number, options?: OperationOptions): Promise<GCSFile[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Directory-style listing via the GCS JSON API's native `delimiter`/`prefix` — the API returns
|
|
172
|
+
* the direct child objects in `items` and the common prefixes ("subdirectories") in `prefixes`,
|
|
173
|
+
* so the subtree is never fully walked. Pages until exhausted or `limit` files are collected.
|
|
174
|
+
*/
|
|
175
|
+
override listDirectory(options?: OperationOptions & {
|
|
176
|
+
delimiter: string;
|
|
177
|
+
limit?: number;
|
|
178
|
+
prefix?: string;
|
|
179
|
+
}): Promise<{
|
|
180
|
+
files: GCSFile[];
|
|
181
|
+
prefixes: string[];
|
|
182
|
+
}>;
|
|
169
183
|
protected internalWrite(part: GCSFile & Partial<FilePart>, callOptions?: OperationOptions): Promise<number>;
|
|
170
184
|
private internalOnComplete;
|
|
171
185
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CDQ6IWAz.js";import{E as C}from"../../packem_shared/gcs-meta-storage-
|
|
1
|
+
import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CDQ6IWAz.js";import{E as C}from"../../packem_shared/gcs-meta-storage-BXcsC7xV.js";import{default as l}from"../../packem_shared/GCStorage-RCw58CoD.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { drive_v3 } from '@googleapis/drive';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"../../packem_shared/GoogleDriveFile-D0aGfGbL.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-
|
|
1
|
+
import{default as r}from"../../packem_shared/GoogleDriveFile-D0aGfGbL.js";import{default as t}from"../../packem_shared/GoogleDriveMetaStorage-koEiYfFw.js";import{default as f}from"../../packem_shared/GoogleDriveStorage-DNlVE5Uo.js";export{r as GoogleDriveFile,t as GoogleDriveMetaStorage,f as GoogleDriveStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-
|
|
2
|
-
export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
3
|
-
export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-
|
|
1
|
+
export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-BT_ll5b8.js";
|
|
2
|
+
export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DUuLtPik.js";
|
|
3
|
+
export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"../../packem_shared/disk-storage-
|
|
1
|
+
import{p as e}from"../../packem_shared/disk-storage-DJ2Nic2v.js";import{default as t}from"../../packem_shared/DiskStorageWithChecksum-CUXj5mE9.js";import{v as f}from"../../packem_shared/local-meta-storage-tayO1ARY.js";export{e as DiskStorage,t as DiskStorageWithChecksum,f as LocalMetaStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { M as MemoryMetaStorage, a as MemoryStorage, type b as MemoryStorageOptions, a as default } from "../../packem_shared/memory-storage.d-
|
|
1
|
+
export { M as MemoryMetaStorage, a as MemoryStorage, type b as MemoryStorageOptions, a as default } from "../../packem_shared/memory-storage.d-BpxSYO-D.js";
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
import "../../packem_shared/storage.d-
|
|
3
|
+
import "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import 'lru-cache';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as o}from"../../packem_shared/MemoryMetaStorage-DEzfBNgL.js";import{default as t,default as f}from"../../packem_shared/
|
|
1
|
+
import{default as o}from"../../packem_shared/MemoryMetaStorage-DEzfBNgL.js";import{default as t,default as f}from"../../packem_shared/MemoryStorage-CgEFb9yw.js";export{o as MemoryMetaStorage,t as MemoryStorage,f as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, R as RetryConfig, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import { getStore } from '@netlify/blobs';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as o}from"../../packem_shared/NetlifyBlobFile-PMZLJ8AC.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-
|
|
1
|
+
import{default as o}from"../../packem_shared/NetlifyBlobFile-PMZLJ8AC.js";import{default as a}from"../../packem_shared/NetlifyBlobMetaStorage-DLJLr0fD.js";import{default as r}from"../../packem_shared/NetlifyBlobStorage-DqeW_OGE.js";export{o as NetlifyBlobFile,a as NetlifyBlobMetaStorage,r as NetlifyBlobStorage};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-
|
|
2
|
-
export { type b as OneDriveClientCredentialsAuth, type c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-
|
|
3
|
-
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-
|
|
4
|
-
import { L as LocalMetaStorageOptions, M as MetaStorage,
|
|
1
|
+
import { O as OneDriveFile, a as OneDriveStorageOptions } from "../../packem_shared/types.d-Cd2-3e-F.js";
|
|
2
|
+
export { type b as OneDriveClientCredentialsAuth, type c as OneDriveOAuthRefreshAuth } from "../../packem_shared/types.d-Cd2-3e-F.js";
|
|
3
|
+
import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DUuLtPik.js";
|
|
4
|
+
import { L as LocalMetaStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.js";
|
|
5
5
|
import { Client } from '@microsoft/microsoft-graph-client';
|
|
6
6
|
import 'node:stream';
|
|
7
7
|
import 'node:crypto';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"../../packem_shared/OneDriveFile-XbVVKIJh.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-
|
|
1
|
+
import{default as a}from"../../packem_shared/OneDriveFile-XbVVKIJh.js";import{default as o}from"../../packem_shared/OneDriveMetaStorage-Cuw5g3cr.js";import{default as i}from"../../packem_shared/OneDriveStorage-D41BZtkz.js";export{a as OneDriveFile,o as OneDriveMetaStorage,i as OneDriveStorage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as File, L as LocalMetaStorageOptions,
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, j as BaseStorageOptions, M as MetaStorage, b as FileInit, O as OperationOptions, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-C6HtvSoY.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-DUuLtPik.js";
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import 'lru-cache';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as t}from"../../packem_shared/PocketBaseFile-CkAiSBb0.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-
|
|
1
|
+
import{default as t}from"../../packem_shared/PocketBaseFile-CkAiSBb0.js";import{default as r}from"../../packem_shared/PocketBaseMetaStorage-BkzeMDP0.js";import{default as s}from"../../packem_shared/PocketBaseStorage-CdvEL3YX.js";export{t as PocketBaseFile,r as PocketBaseMetaStorage,s as PocketBaseStorage};
|