@visulima/storage 1.0.0-alpha.23 → 1.0.0-alpha.25

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/adapter/nuxt/module.d.ts +4 -4
  3. package/dist/handler/http/fetch/index.d.ts +7 -7
  4. package/dist/handler/http/hono/index.d.ts +4 -4
  5. package/dist/handler/http/nextjs/index.d.ts +4 -4
  6. package/dist/handler/http/node/index.d.ts +7 -7
  7. package/dist/handler/http/solid-start/index.d.ts +4 -4
  8. package/dist/index.d.ts +4 -4
  9. package/dist/packem_shared/{GCSMetaStorage-Cao8xx64.js → GCSMetaStorage-BQkYQUDn.js} +1 -1
  10. package/dist/packem_shared/{GCStorage-JsWySw04.js → GCStorage-C8hxSNLM.js} +1 -1
  11. package/dist/packem_shared/{disk-storage-with-checksum.d-hEoe2ugb.d.ts → disk-storage-with-checksum.d-B5D9I_CA.d.ts} +1 -1
  12. package/dist/packem_shared/{gcs-meta-storage-BO113yMU.js → gcs-meta-storage-CNiEWerS.js} +1 -1
  13. package/dist/packem_shared/{local-meta-storage.d-Dop9RP9k.d.ts → local-meta-storage.d-rO44cnQ5.d.ts} +1 -1
  14. package/dist/packem_shared/{media-transformer.d-CwcLDvvA.d.ts → media-transformer.d-BXjTN5Qv.d.ts} +2 -2
  15. package/dist/packem_shared/{s3-base-storage.d-CczjSe98.d.ts → s3-base-storage.d-Ccatb1dO.d.ts} +1 -1
  16. package/dist/packem_shared/{storage.d-BOMUJD96.d.ts → storage.d-sc8gn16g.d.ts} +75 -75
  17. package/dist/packem_shared/{tus-base.d-jyNxFk1K.d.ts → tus-base.d-BX3mSWL6.d.ts} +3 -3
  18. package/dist/packem_shared/{types.d-7yAizORn.d.ts → types.d-Cor8FV54.d.ts} +2 -2
  19. package/dist/packem_shared/{types.d-CS7AtuZD.d.ts → types.d-b0WcdT0x.d.ts} +2 -2
  20. package/dist/storage/aws/index.d.ts +2 -2
  21. package/dist/storage/aws-light/index.d.ts +2 -2
  22. package/dist/storage/azure/index.d.ts +1 -1
  23. package/dist/storage/gcs/index.d.ts +1 -1
  24. package/dist/storage/gcs/index.js +1 -1
  25. package/dist/storage/local/index.d.ts +3 -3
  26. package/dist/storage/netlify-blob/index.d.ts +2 -2
  27. package/dist/storage/vercel-blob/index.d.ts +2 -2
  28. package/dist/transformer/audio-transformer.d.ts +2 -2
  29. package/dist/transformer/image-transformer.d.ts +2 -2
  30. package/dist/transformer/index.d.ts +3 -3
  31. package/dist/transformer/video-transformer.d.ts +2 -2
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## @visulima/storage [1.0.0-alpha.25](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.24...@visulima/storage@1.0.0-alpha.25) (2026-05-11)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.20
7
+
8
+ ## @visulima/storage [1.0.0-alpha.24](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.23...@visulima/storage@1.0.0-alpha.24) (2026-05-10)
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.19
14
+
1
15
  ## @visulima/storage [1.0.0-alpha.23](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.22...@visulima/storage@1.0.0-alpha.23) (2026-05-10)
2
16
 
3
17
 
@@ -1,11 +1,11 @@
1
- import { U as UploadOptions } from "../../packem_shared/types.d-7yAizORn.js";
2
- import { U as UploadFile, B as BaseStorage } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { U as UploadOptions } from "../../packem_shared/types.d-Cor8FV54.js";
2
+ import { U as UploadFile, B as BaseStorage } from "../../packem_shared/storage.d-sc8gn16g.js";
3
3
  import 'node:stream';
4
4
  import 'node:events';
5
5
  import 'node:http';
6
6
  import '@visulima/pagination';
7
- import "../../packem_shared/media-transformer.d-CwcLDvvA.js";
8
- import "../../packem_shared/types.d-CS7AtuZD.js";
7
+ import "../../packem_shared/media-transformer.d-BXjTN5Qv.js";
8
+ import "../../packem_shared/types.d-b0WcdT0x.js";
9
9
  import 'node:crypto';
10
10
  import 'lru-cache';
11
11
  /**
@@ -1,16 +1,16 @@
1
- import { U as UploadFile, l as UploadResponse } from "../../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { U as UploadFile, l as UploadResponse } from "../../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
- import { H as Handlers, R as ResponseFile, a as ResponseList, U as UploadOptions } from "../../../packem_shared/types.d-7yAizORn.js";
4
- export { type A as AsyncHandler, type B as BaseHandler, type M as MethodHandler, type b as RequestEvent, type c as UploadErrorEvent, type d as UploadEvent } from "../../../packem_shared/types.d-7yAizORn.js";
5
- import { B as BaseHandlerCore } from "../../../packem_shared/tus-base.d-jyNxFk1K.js";
6
- export { T as TUS_RESUMABLE, a as TUS_VERSION } from "../../../packem_shared/tus-base.d-jyNxFk1K.js";
3
+ import { H as Handlers, R as ResponseFile, a as ResponseList, U as UploadOptions } from "../../../packem_shared/types.d-Cor8FV54.js";
4
+ export { type A as AsyncHandler, type B as BaseHandler, type M as MethodHandler, type b as RequestEvent, type c as UploadErrorEvent, type d as UploadEvent } from "../../../packem_shared/types.d-Cor8FV54.js";
5
+ import { B as BaseHandlerCore } from "../../../packem_shared/tus-base.d-BX3mSWL6.js";
6
+ export { T as TUS_RESUMABLE, a as TUS_VERSION } from "../../../packem_shared/tus-base.d-BX3mSWL6.js";
7
7
  import 'node:crypto';
8
8
  import 'node:http';
9
9
  import 'lru-cache';
10
10
  import 'node:events';
11
11
  import '@visulima/pagination';
12
- import "../../../packem_shared/media-transformer.d-CwcLDvvA.js";
13
- import "../../../packem_shared/types.d-CS7AtuZD.js";
12
+ import "../../../packem_shared/media-transformer.d-BXjTN5Qv.js";
13
+ import "../../../packem_shared/types.d-b0WcdT0x.js";
14
14
  /**
15
15
  * Base handler for Web API Fetch platform (Request/Response).
16
16
  * Extends BaseHandlerCore with Fetch-specific request/response handling.
@@ -1,13 +1,13 @@
1
- import { U as UploadFile } from "../../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { U as UploadFile } from "../../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
- import { U as UploadOptions } from "../../../packem_shared/types.d-7yAizORn.js";
3
+ import { U as UploadOptions } from "../../../packem_shared/types.d-Cor8FV54.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';
7
7
  import 'node:events';
8
8
  import '@visulima/pagination';
9
- import "../../../packem_shared/media-transformer.d-CwcLDvvA.js";
10
- import "../../../packem_shared/types.d-CS7AtuZD.js";
9
+ import "../../../packem_shared/media-transformer.d-BXjTN5Qv.js";
10
+ import "../../../packem_shared/types.d-b0WcdT0x.js";
11
11
  declare const GET_MATCH_RESULT: unique symbol;
12
12
  /**
13
13
  * Interface representing a router.
@@ -1,14 +1,14 @@
1
1
  import { NextRequest, NextResponse } from 'next/server.js';
2
- import { U as UploadFile } from "../../../packem_shared/storage.d-BOMUJD96.js";
2
+ import { U as UploadFile } from "../../../packem_shared/storage.d-sc8gn16g.js";
3
3
  import 'node:stream';
4
- import { U as UploadOptions } from "../../../packem_shared/types.d-7yAizORn.js";
4
+ import { U as UploadOptions } from "../../../packem_shared/types.d-Cor8FV54.js";
5
5
  import 'node:crypto';
6
6
  import 'node:http';
7
7
  import 'lru-cache';
8
8
  import 'node:events';
9
9
  import '@visulima/pagination';
10
- import "../../../packem_shared/media-transformer.d-CwcLDvvA.js";
11
- import "../../../packem_shared/types.d-CS7AtuZD.js";
10
+ import "../../../packem_shared/media-transformer.d-BXjTN5Qv.js";
11
+ import "../../../packem_shared/types.d-b0WcdT0x.js";
12
12
  /**
13
13
  * Configuration for Next.js handler.
14
14
  */
@@ -1,16 +1,16 @@
1
1
  import { IncomingMessage, ServerResponse } from 'node:http';
2
- import { U as UploadFile, l as UploadResponse } from "../../../packem_shared/storage.d-BOMUJD96.js";
2
+ import { U as UploadFile, l as UploadResponse } from "../../../packem_shared/storage.d-sc8gn16g.js";
3
3
  import { Readable } from 'node:stream';
4
- import { H as Handlers, A as AsyncHandler, U as UploadOptions, R as ResponseFile, a as ResponseList, M as MethodHandler } from "../../../packem_shared/types.d-7yAizORn.js";
5
- export { type B as BaseHandler, type b as RequestEvent, type c as UploadErrorEvent, type d as UploadEvent } from "../../../packem_shared/types.d-7yAizORn.js";
6
- import { B as BaseHandlerCore } from "../../../packem_shared/tus-base.d-jyNxFk1K.js";
7
- export { T as TUS_RESUMABLE, a as TUS_VERSION } from "../../../packem_shared/tus-base.d-jyNxFk1K.js";
4
+ import { H as Handlers, A as AsyncHandler, U as UploadOptions, R as ResponseFile, a as ResponseList, M as MethodHandler } from "../../../packem_shared/types.d-Cor8FV54.js";
5
+ export { type B as BaseHandler, type b as RequestEvent, type c as UploadErrorEvent, type d as UploadEvent } from "../../../packem_shared/types.d-Cor8FV54.js";
6
+ import { B as BaseHandlerCore } from "../../../packem_shared/tus-base.d-BX3mSWL6.js";
7
+ export { T as TUS_RESUMABLE, a as TUS_VERSION } from "../../../packem_shared/tus-base.d-BX3mSWL6.js";
8
8
  import 'node:crypto';
9
9
  import 'lru-cache';
10
10
  import 'node:events';
11
11
  import '@visulima/pagination';
12
- import "../../../packem_shared/media-transformer.d-CwcLDvvA.js";
13
- import "../../../packem_shared/types.d-CS7AtuZD.js";
12
+ import "../../../packem_shared/media-transformer.d-BXjTN5Qv.js";
13
+ import "../../../packem_shared/types.d-b0WcdT0x.js";
14
14
  /**
15
15
  * Base handler for Node.js platform (IncomingMessage/ServerResponse).
16
16
  * Extends BaseHandlerCore with Node.js-specific request/response handling.
@@ -1,14 +1,14 @@
1
1
  import { APIEvent } from '@solidjs/start/server';
2
- import { U as UploadFile } from "../../../packem_shared/storage.d-BOMUJD96.js";
2
+ import { U as UploadFile } from "../../../packem_shared/storage.d-sc8gn16g.js";
3
3
  import 'node:stream';
4
- import { U as UploadOptions } from "../../../packem_shared/types.d-7yAizORn.js";
4
+ import { U as UploadOptions } from "../../../packem_shared/types.d-Cor8FV54.js";
5
5
  import 'node:crypto';
6
6
  import 'node:http';
7
7
  import 'lru-cache';
8
8
  import 'node:events';
9
9
  import '@visulima/pagination';
10
- import "../../../packem_shared/media-transformer.d-CwcLDvvA.js";
11
- import "../../../packem_shared/types.d-CS7AtuZD.js";
10
+ import "../../../packem_shared/media-transformer.d-BXjTN5Qv.js";
11
+ import "../../../packem_shared/types.d-b0WcdT0x.js";
12
12
  /**
13
13
  * Configuration for SolidStart handler.
14
14
  */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { n as Metrics } from "./packem_shared/storage.d-BOMUJD96.js";
2
- export { B as AbstractBaseStorage, type k as BaseStorageOptions, type o as BatchOperationResponse, type p as BatchOperationResult, type D as DiskStorageOptions, type h as DiskStorageWithChecksumOptions, E as ERRORS, q as ErrorMap, type r as ExpirationOptions, F as File, type b as FileInit, type d as FilePart, type e as FileQuery, type s as Header, type t as Headers, type H as HttpError, type u as HttpErrorBody, type I as IncomingMessageWithBody, type L as LocalMetaStorageOptions, M as MetaStorage, type m as MetaStorageOptions, v as Metadata, type O as OnComplete, type w as OnCreate, type x as OnDelete, type y as OnError, type z as OnUpdate, type P as PurgeList, type A as RangeChecksum, type G as RangeHasher, type J as ResponseBody, type i as ResponseBodyType, type K as ResponseTuple, type R as RetryConfig, f as UploadError, type g as UploadEventType, type U as UploadFile, type l as UploadResponse, type V as Validation, type N as ValidationError, type Q as ValidatorConfig, c as createRetryWrapper, S as defaultCloudStorageFileNameValidation, T as defaultFilesystemFileNameValidation, W as isRetryableError, X as isUploadError, Y as retry, Z as throwErrorCode } from "./packem_shared/storage.d-BOMUJD96.js";
3
- export { D as DiskStorage, a as DiskStorageWithChecksum } from "./packem_shared/disk-storage-with-checksum.d-hEoe2ugb.js";
4
- export { L as LocalMetaStorage } from "./packem_shared/local-meta-storage.d-Dop9RP9k.js";
1
+ import { n as Metrics } from "./packem_shared/storage.d-sc8gn16g.js";
2
+ export { B as AbstractBaseStorage, type k as BaseStorageOptions, type o as BatchOperationResponse, type p as BatchOperationResult, type D as DiskStorageOptions, type h as DiskStorageWithChecksumOptions, E as ERRORS, q as ErrorMap, type r as ExpirationOptions, F as File, type e as FileInit, type f as FilePart, type g as FileQuery, type s as Header, type t as Headers, type H as HttpError, type u as HttpErrorBody, type I as IncomingMessageWithBody, type L as LocalMetaStorageOptions, M as MetaStorage, type m as MetaStorageOptions, v as Metadata, type O as OnComplete, type w as OnCreate, type x as OnDelete, type y as OnError, type z as OnUpdate, type P as PurgeList, type A as RangeChecksum, type G as RangeHasher, type J as ResponseBody, type i as ResponseBodyType, type K as ResponseTuple, type R as RetryConfig, b as UploadError, type c as UploadEventType, type U as UploadFile, type l as UploadResponse, type V as Validation, type N as ValidationError, type Q as ValidatorConfig, d as createRetryWrapper, S as defaultCloudStorageFileNameValidation, T as defaultFilesystemFileNameValidation, W as isRetryableError, X as isUploadError, Y as retry, Z as throwErrorCode } from "./packem_shared/storage.d-sc8gn16g.js";
3
+ export { D as DiskStorage, a as DiskStorageWithChecksum } from "./packem_shared/disk-storage-with-checksum.d-B5D9I_CA.js";
4
+ export { L as LocalMetaStorage } from "./packem_shared/local-meta-storage.d-rO44cnQ5.js";
5
5
  export { type AnyWebReadableByteStreamWithFileType, type AnyWebReadableStream, type Detector, type FileTypeOptions, type FileTypeParser, type FileTypeResult, type StreamOptions, type TokenizerPositionError, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromTokenizer, supportedExtensions, supportedMimeTypes } from 'file-type';
6
6
  import 'node:stream';
7
7
  import 'node:crypto';
@@ -1 +1 @@
1
- import"node:crypto";import"gaxios";import"google-auth-library";import{E as f}from"./gcs-meta-storage-BO113yMU.js";import"./MetaStorage-Y4m1dWgd.js";import"./Metadata-B6Ir0KO7.js";import"./GCSConfig-BQ0OpVhe.js";export{f as default};
1
+ import"node:crypto";import"gaxios";import"google-auth-library";import{E as f}from"./gcs-meta-storage-CNiEWerS.js";import"./MetaStorage-Y4m1dWgd.js";import"./Metadata-B6Ir0KO7.js";import"./GCSConfig-BQ0OpVhe.js";export{f as default};
@@ -1 +1 @@
1
- var g=Object.defineProperty;var d=(c,t)=>g(c,"name",{value:t,configurable:!0});import{randomUUID as f}from"node:crypto";import{request as y}from"gaxios";import{GoogleAuth as w}from"google-auth-library";import{r as C,E,b as R,g as b,d as l}from"./gcs-meta-storage-BO113yMU.js";import{r as U,d as k,o as $}from"./part-match-DqD5U7An.js";import{throwErrorCode as I,ERRORS as O}from"./ERRORS-B9jkvKwx.js";import{B as S,t as T}from"./storage-m_Cxgiih.js";import{O as v}from"./local-meta-storage-Bkwqi_gi.js";import m from"./GCSConfig-BQ0OpVhe.js";import A from"./GCSFile-CHjX_fJk.js";import{o as B}from"./has-content-Bx2p8Okx.js";var P=Object.defineProperty,j=d((c,t)=>P(c,"name",{value:t,configurable:!0}),"e");class x extends Error{static{d(this,"o")}constructor(t,e,r){super(t),this.code=e,this.config=r}code;config;static{j(this,"FetchError")}name="FetchError"}var G=Object.defineProperty,p=d((c,t)=>G(c,"name",{value:t,configurable:!0}),"m");const q=p(c=>c>=200&&c<300||c===308||c===499,"validateStatus");class Q extends S{static name="gcs";checksumTypes=["md5","crc32c"];meta;bucket;authClient;storageBaseURI;uploadBaseURI;isCustomEndpoint=!1;retryOptions={};useAuthWithCustomEndpoint;userProject;constructor(t){super(t);const e=t.bucket||process.env.GCS_BUCKET;if(!e)throw new Error("GCS bucket is not defined");if(!t.projectId)throw new Error("Sorry, we cannot connect to Cloud Services without a project ID.");this.bucket=e,this.storageBaseURI=`${t.storageAPI||m.storageAPI}/${this.bucket}/o`,this.uploadBaseURI=`${t.uploadAPI||m.uploadAPI}/${this.bucket}/o`,this.isCustomEndpoint=new URL(this.storageBaseURI).hostname!=="storage.googleapis.com";const{retryOptions:r,useAuthWithCustomEndpoint:s,userProject:o}=t;this.userProject=o,this.useAuthWithCustomEndpoint=s||!1,this.retryOptions={...C,...r},t.scopes||=m.authScopes,this.authClient=new w(t);const{bucket:i,metaStorage:n,metaStorageConfig:a,projectId:h}=t;if(n)this.meta=n;else{let u={...t,...a,logger:this.logger};"directory"in u?(this.logger?.debug("Using local meta storage"),this.meta=new v(u)):(i===u.bucket&&h===u.projectId&&(u={...u,authClient:this.authClient}),this.meta=new E(u))}this.isReady=!1,this.accessCheck().then(()=>{this.isReady=!0}).catch(u=>{this.logger?.error("Storage access check failed: %O",u)})}normalizeError(t){if(t.config){const e=+t.code||500;return{code:`GCS${e}`,message:t.message,name:t.name,retryable:e>=499,statusCode:e}}return{code:"GenericUploadError",message:`[${this.constructor.name}] ${t.message}`,name:t.name,statusCode:500}}async create(t){return this.instrumentOperation("create",async()=>{const e={...t};if(t.ttl){const a=typeof t.ttl=="string"?T(t.ttl):t.ttl;a!==void 0&&(e.expiredAt=Date.now()+a)}const r=new A(e);r.name=this.namingFunction(r),await this.validate(r);try{const a=await this.getMeta(r.id);return a.bytesWritten=await this.internalWrite(a),a}catch{}const s={"Content-Type":"application/json; charset=utf-8","X-Goog-Upload-Command":"start","X-Goog-Upload-Protocol":"resumable","X-Upload-Content-Length":r.size.toString(),"X-Upload-Content-Type":r.contentType},o={body:JSON.stringify({metadata:r.metadata}),headers:s,method:"POST",params:{name:r.name,size:r.size,uploadType:"resumable"},url:this.uploadBaseURI},i=await this.makeRequest(o);if(i.status!==200)throw new Error("Expected 200 response from GCS");const n=i.headers.get("X-Goog-Upload-Status")||i.headers.get("x-goog-upload-status");if(n!=="active")throw new Error(`X-Goog-Upload-Status response header expected 'active' got: ${n}`);return r.uri=i.headers.get("location"),this.config.clientDirectUpload?(r.GCSUploadURI=r.uri,this.logger?.debug("send uploadURI to client: %s",r.GCSUploadURI),r.status="created",r):(r.bytesWritten=0,await this.saveMeta(r),r.status="created",await this.onCreate(r),r)})}async write(t){return this.instrumentOperation("write",async()=>{let e;if("contentType"in t&&"metadata"in t&&!("body"in t)&&!("start"in t)?e=t:(e=await this.getMeta(t.id),await this.checkIfExpired(e)),e.status==="completed")return e;if(!U(t,e))return I(O.FILE_CONFLICT);await this.lock(t.id);try{if(B(t)&&(e.bytesWritten===0||Number.isNaN(e.bytesWritten))&&(!e.contentType||e.contentType==="application/octet-stream"))try{const{fileType:r,stream:s}=await k(t.body);r?.mime&&(e.contentType=r.mime),t.body=s}catch{}e.bytesWritten=await this.internalWrite({...e,...t}),e.status=$(e),e.status==="completed"&&(e.uri=`${this.storageBaseURI}/${e.name}`,await this.internalOnComplete(e))}finally{await this.unlock(t.id)}return e})}async delete({id:t}){return this.instrumentOperation("delete",async()=>{const e=await this.getMeta(t);if(!e.uri)throw new Error(`File ${t} does not have a valid URI`);e.status="deleted",await Promise.all([this.makeRequest({method:"DELETE",url:e.uri,validateStatus:q}),this.deleteMeta(e.id)]);const r={...e};return await this.onDelete(r),r})}async copy(t,e){return this.instrumentOperation("copy",async()=>{const r=new URL(`/${this.bucket}/${t}`,"file://"),s=new URL(encodeURI(e),r).pathname,[,o,...i]=s.split("/"),n=i.join("/"),a=`${this.storageBaseURI}/${t}/rewriteTo/b/${o}/o/${n}`;let h={};const u={body:"",headers:{"Content-Type":"application/json"},method:"POST",url:a};do u.body=h.rewriteToken?JSON.stringify({rewriteToken:h.rewriteToken}):"",h=(await this.makeRequest(u)).data||{};while(h.rewriteToken);return await this.getMeta(e)})}async move(t,e){return this.instrumentOperation("move",async()=>{const r=await this.copy(t,e),s=`${this.storageBaseURI}/${t}`;return await this.makeRequest({method:"DELETE",url:s}),r})}async get({id:t}){return this.instrumentOperation("get",async()=>{const{data:e}=await this.makeRequest({params:{alt:"json"},url:`${this.storageBaseURI}/${t}`});if(await this.checkIfExpired({expiredAt:e.timeDeleted}),!e.uri)throw new Error("File URI not found");const r=(await this.makeRequest({params:{alt:"media"},url:e.uri})).data;let s;if(typeof r=="string")s=Buffer.from(r,"utf8");else if(r&&typeof r=="object"&&"data"in r){const o=r.data;s=Buffer.from(o)}else s=Buffer.from(r);return{...e,content:s}})}async exists({id:t}){return this.instrumentOperation("exists",async()=>{try{return await this.getMeta(t),await this.makeRequest({method:"HEAD",url:`${this.storageBaseURI}/${t}`}),!0}catch{return!1}})}async list(t=1e3){return this.instrumentOperation("list",async()=>{const e=[];let r=!0,s={params:{maxResults:t},url:this.storageBaseURI};for(;r;)try{const{data:o}=await this.makeRequest(s);(o?.items||[]).forEach(({name:i,timeCreated:n,updated:a})=>{e.push({createdAt:n,id:i,modifiedAt:a})}),r=o?.nextPageToken!==void 0,r&&(s={...s,params:{...s.params,pageToken:o.nextPageToken}})}catch(o){const i=this.normalizeError(o instanceof Error?o:new Error(String(o)));throw await this.onError(i),o}return e},{limit:t})}async internalWrite(t){const{body:e,bytesWritten:r,size:s,uri:o=""}=t,i=R(t),n={method:"PUT"};if(e?.on){const a=new AbortController;e.on("aborted",()=>{a.abort()}),n.body=e,n.signal=a.signal}n.headers={Accept:"application/json","Content-Range":i,...s===r?{"X-Goog-Upload-Command":"upload, finalize"}:{}};try{const a=await this.makeRequest({url:o,...n});if(a.status===308){const h=a.headers.get("range");return h?b(h):0}if(a.status===200)return this.logger?.debug("uploaded %O",a.data),s;throw new x(String(a.data),`GCS${a.status}`,{uri:o})}catch(a){this.logger?.error(o,a);const h=this.normalizeError(a instanceof Error?a:new Error(String(a)));throw await this.onError(h),a}}internalOnComplete=p(t=>this.deleteMeta(t.id),"internalOnComplete");async makeRequest(t){return typeof t.url=="string"&&(t.url=t.url.replaceAll("/:",":")),t={...t,headers:{"User-Agent":`${l.name}/${l.version}`,"x-goog-api-client":`gl-node/${process.versions.node} gccl/${l.version} gccl-invocation-id/${f()}`},params:{...this.userProject===void 0?{}:{userProject:this.userProject}},retry:!0,retryConfig:this.retryOptions,timeout:6e4},this.isCustomEndpoint&&!this.useAuthWithCustomEndpoint?y(t):this.authClient.request(t)}async accessCheck(){return this.makeRequest({url:this.storageBaseURI.replace("/o","")})}}export{Q as default};
1
+ var g=Object.defineProperty;var d=(c,t)=>g(c,"name",{value:t,configurable:!0});import{randomUUID as f}from"node:crypto";import{request as y}from"gaxios";import{GoogleAuth as w}from"google-auth-library";import{r as C,E,b as R,g as b,d as l}from"./gcs-meta-storage-CNiEWerS.js";import{r as U,d as k,o as $}from"./part-match-DqD5U7An.js";import{throwErrorCode as I,ERRORS as O}from"./ERRORS-B9jkvKwx.js";import{B as S,t as T}from"./storage-m_Cxgiih.js";import{O as v}from"./local-meta-storage-Bkwqi_gi.js";import m from"./GCSConfig-BQ0OpVhe.js";import A from"./GCSFile-CHjX_fJk.js";import{o as B}from"./has-content-Bx2p8Okx.js";var P=Object.defineProperty,j=d((c,t)=>P(c,"name",{value:t,configurable:!0}),"e");class x extends Error{static{d(this,"o")}constructor(t,e,r){super(t),this.code=e,this.config=r}code;config;static{j(this,"FetchError")}name="FetchError"}var G=Object.defineProperty,p=d((c,t)=>G(c,"name",{value:t,configurable:!0}),"m");const q=p(c=>c>=200&&c<300||c===308||c===499,"validateStatus");class Q extends S{static name="gcs";checksumTypes=["md5","crc32c"];meta;bucket;authClient;storageBaseURI;uploadBaseURI;isCustomEndpoint=!1;retryOptions={};useAuthWithCustomEndpoint;userProject;constructor(t){super(t);const e=t.bucket||process.env.GCS_BUCKET;if(!e)throw new Error("GCS bucket is not defined");if(!t.projectId)throw new Error("Sorry, we cannot connect to Cloud Services without a project ID.");this.bucket=e,this.storageBaseURI=`${t.storageAPI||m.storageAPI}/${this.bucket}/o`,this.uploadBaseURI=`${t.uploadAPI||m.uploadAPI}/${this.bucket}/o`,this.isCustomEndpoint=new URL(this.storageBaseURI).hostname!=="storage.googleapis.com";const{retryOptions:r,useAuthWithCustomEndpoint:s,userProject:o}=t;this.userProject=o,this.useAuthWithCustomEndpoint=s||!1,this.retryOptions={...C,...r},t.scopes||=m.authScopes,this.authClient=new w(t);const{bucket:i,metaStorage:n,metaStorageConfig:a,projectId:h}=t;if(n)this.meta=n;else{let u={...t,...a,logger:this.logger};"directory"in u?(this.logger?.debug("Using local meta storage"),this.meta=new v(u)):(i===u.bucket&&h===u.projectId&&(u={...u,authClient:this.authClient}),this.meta=new E(u))}this.isReady=!1,this.accessCheck().then(()=>{this.isReady=!0}).catch(u=>{this.logger?.error("Storage access check failed: %O",u)})}normalizeError(t){if(t.config){const e=+t.code||500;return{code:`GCS${e}`,message:t.message,name:t.name,retryable:e>=499,statusCode:e}}return{code:"GenericUploadError",message:`[${this.constructor.name}] ${t.message}`,name:t.name,statusCode:500}}async create(t){return this.instrumentOperation("create",async()=>{const e={...t};if(t.ttl){const a=typeof t.ttl=="string"?T(t.ttl):t.ttl;a!==void 0&&(e.expiredAt=Date.now()+a)}const r=new A(e);r.name=this.namingFunction(r),await this.validate(r);try{const a=await this.getMeta(r.id);return a.bytesWritten=await this.internalWrite(a),a}catch{}const s={"Content-Type":"application/json; charset=utf-8","X-Goog-Upload-Command":"start","X-Goog-Upload-Protocol":"resumable","X-Upload-Content-Length":r.size.toString(),"X-Upload-Content-Type":r.contentType},o={body:JSON.stringify({metadata:r.metadata}),headers:s,method:"POST",params:{name:r.name,size:r.size,uploadType:"resumable"},url:this.uploadBaseURI},i=await this.makeRequest(o);if(i.status!==200)throw new Error("Expected 200 response from GCS");const n=i.headers.get("X-Goog-Upload-Status")||i.headers.get("x-goog-upload-status");if(n!=="active")throw new Error(`X-Goog-Upload-Status response header expected 'active' got: ${n}`);return r.uri=i.headers.get("location"),this.config.clientDirectUpload?(r.GCSUploadURI=r.uri,this.logger?.debug("send uploadURI to client: %s",r.GCSUploadURI),r.status="created",r):(r.bytesWritten=0,await this.saveMeta(r),r.status="created",await this.onCreate(r),r)})}async write(t){return this.instrumentOperation("write",async()=>{let e;if("contentType"in t&&"metadata"in t&&!("body"in t)&&!("start"in t)?e=t:(e=await this.getMeta(t.id),await this.checkIfExpired(e)),e.status==="completed")return e;if(!U(t,e))return I(O.FILE_CONFLICT);await this.lock(t.id);try{if(B(t)&&(e.bytesWritten===0||Number.isNaN(e.bytesWritten))&&(!e.contentType||e.contentType==="application/octet-stream"))try{const{fileType:r,stream:s}=await k(t.body);r?.mime&&(e.contentType=r.mime),t.body=s}catch{}e.bytesWritten=await this.internalWrite({...e,...t}),e.status=$(e),e.status==="completed"&&(e.uri=`${this.storageBaseURI}/${e.name}`,await this.internalOnComplete(e))}finally{await this.unlock(t.id)}return e})}async delete({id:t}){return this.instrumentOperation("delete",async()=>{const e=await this.getMeta(t);if(!e.uri)throw new Error(`File ${t} does not have a valid URI`);e.status="deleted",await Promise.all([this.makeRequest({method:"DELETE",url:e.uri,validateStatus:q}),this.deleteMeta(e.id)]);const r={...e};return await this.onDelete(r),r})}async copy(t,e){return this.instrumentOperation("copy",async()=>{const r=new URL(`/${this.bucket}/${t}`,"file://"),s=new URL(encodeURI(e),r).pathname,[,o,...i]=s.split("/"),n=i.join("/"),a=`${this.storageBaseURI}/${t}/rewriteTo/b/${o}/o/${n}`;let h={};const u={body:"",headers:{"Content-Type":"application/json"},method:"POST",url:a};do u.body=h.rewriteToken?JSON.stringify({rewriteToken:h.rewriteToken}):"",h=(await this.makeRequest(u)).data||{};while(h.rewriteToken);return await this.getMeta(e)})}async move(t,e){return this.instrumentOperation("move",async()=>{const r=await this.copy(t,e),s=`${this.storageBaseURI}/${t}`;return await this.makeRequest({method:"DELETE",url:s}),r})}async get({id:t}){return this.instrumentOperation("get",async()=>{const{data:e}=await this.makeRequest({params:{alt:"json"},url:`${this.storageBaseURI}/${t}`});if(await this.checkIfExpired({expiredAt:e.timeDeleted}),!e.uri)throw new Error("File URI not found");const r=(await this.makeRequest({params:{alt:"media"},url:e.uri})).data;let s;if(typeof r=="string")s=Buffer.from(r,"utf8");else if(r&&typeof r=="object"&&"data"in r){const o=r.data;s=Buffer.from(o)}else s=Buffer.from(r);return{...e,content:s}})}async exists({id:t}){return this.instrumentOperation("exists",async()=>{try{return await this.getMeta(t),await this.makeRequest({method:"HEAD",url:`${this.storageBaseURI}/${t}`}),!0}catch{return!1}})}async list(t=1e3){return this.instrumentOperation("list",async()=>{const e=[];let r=!0,s={params:{maxResults:t},url:this.storageBaseURI};for(;r;)try{const{data:o}=await this.makeRequest(s);(o?.items||[]).forEach(({name:i,timeCreated:n,updated:a})=>{e.push({createdAt:n,id:i,modifiedAt:a})}),r=o?.nextPageToken!==void 0,r&&(s={...s,params:{...s.params,pageToken:o.nextPageToken}})}catch(o){const i=this.normalizeError(o instanceof Error?o:new Error(String(o)));throw await this.onError(i),o}return e},{limit:t})}async internalWrite(t){const{body:e,bytesWritten:r,size:s,uri:o=""}=t,i=R(t),n={method:"PUT"};if(e?.on){const a=new AbortController;e.on("aborted",()=>{a.abort()}),n.body=e,n.signal=a.signal}n.headers={Accept:"application/json","Content-Range":i,...s===r?{"X-Goog-Upload-Command":"upload, finalize"}:{}};try{const a=await this.makeRequest({url:o,...n});if(a.status===308){const h=a.headers.get("range");return h?b(h):0}if(a.status===200)return this.logger?.debug("uploaded %O",a.data),s;throw new x(String(a.data),`GCS${a.status}`,{uri:o})}catch(a){this.logger?.error(o,a);const h=this.normalizeError(a instanceof Error?a:new Error(String(a)));throw await this.onError(h),a}}internalOnComplete=p(t=>this.deleteMeta(t.id),"internalOnComplete");async makeRequest(t){return typeof t.url=="string"&&(t.url=t.url.replaceAll("/:",":")),t={...t,headers:{"User-Agent":`${l.name}/${l.version}`,"x-goog-api-client":`gl-node/${process.versions.node} gccl/${l.version} gccl-invocation-id/${f()}`},params:{...this.userProject===void 0?{}:{userProject:this.userProject}},retry:!0,retryConfig:this.retryOptions,timeout:6e4},this.isCustomEndpoint&&!this.useAuthWithCustomEndpoint?y(t):this.authClient.request(t)}async accessCheck(){return this.makeRequest({url:this.storageBaseURI.replace("/o","")})}}export{Q as default};
@@ -1,4 +1,4 @@
1
- import { F as File, M as MetaStorage, D as DiskStorageOptions, H as HttpError, b as FileInit, d as FilePart, e as FileQuery, a as FileReturn, E as ERRORS, B as BaseStorage, h as DiskStorageWithChecksumOptions } from "./storage.d-BOMUJD96.js";
1
+ import { F as File, M as MetaStorage, D as DiskStorageOptions, H as HttpError, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, E as ERRORS, B as BaseStorage, h as DiskStorageWithChecksumOptions } from "./storage.d-sc8gn16g.js";
2
2
  import { Readable } from 'node:stream';
3
3
  /**
4
4
  * Local disk-based storage implementation.
@@ -1 +1 @@
1
- var g=Object.defineProperty;var o=(s,t)=>g(s,"name",{value:t,configurable:!0});import{randomUUID as y}from"node:crypto";import{request as f}from"gaxios";import{GoogleAuth as C}from"google-auth-library";import v from"./MetaStorage-Y4m1dWgd.js";import{stringifyMetadata as R,parseMetadata as E}from"./Metadata-B6Ir0KO7.js";import n from"./GCSConfig-BQ0OpVhe.js";import{o as $}from"./has-content-Bx2p8Okx.js";var I="@visulima/storage",P="1.0.0-alpha.22";const i={name:I,version:P};var A=Object.defineProperty,u=o((s,t)=>A(s,"name",{value:t,configurable:!0}),"n");const T=u(s=>{const t=s.match(/(\d+)-(\d+)/),e=t?.[2]?+t[2]:0;return e>0?e+1:0},"getRangeEnd"),G=u(s=>{if($(s)){const t=s.contentLength?s.start+s.contentLength-1:"*";return`bytes ${s.start}-${t}/${s.size??"*"}`}return`bytes */${s.size??"*"}`},"buildContentRange"),U=u(s=>{if(s.response!==void 0){const{response:t}=s;return t?.data?.error?.errors?.map(({reason:e=""})=>e==="rateLimitExceeded"||e==="userRateLimitExceeded"?!0:!!(e&&e.includes("EAI_AGAIN"))).includes(!0)}return!1},"shouldRetry"),w={retry:3,shouldRetry:U,statusCodesToRetry:[[408,429,500,502,503,504],[100,199],[429],[500,599]]};var b=Object.defineProperty,j=o((s,t)=>b(s,"name",{value:t,configurable:!0}),"p");class N extends v{static{o(this,"E")}constructor(t){super(t),this.config=t;const{authClient:e,...a}=t,r=a.bucket||process.env.GCS_BUCKET;if(e===void 0){if(!r)throw new Error("GCS bucket is not defined");if(!a.projectId)throw new Error("Sorry, we cannot connect to Cloud Services without a project ID.");a.scopes||=n.authScopes,this.authClient=new C(a)}else this.authClient=e;this.storageBaseURI=`${a.storageAPI||n.storageAPI}/${r}/o`,this.uploadBaseURI=`${a.uploadAPI||n.uploadAPI}/${r}/o`;const h=["storage.googleapis.com"],d=new URL(this.storageBaseURI).hostname;this.isCustomEndpoint=!h.includes(d);const{retryOptions:m,useAuthWithCustomEndpoint:p,userProject:l}=t;this.userProject=l,this.useAuthWithCustomEndpoint=p||!1,this.retryOptions={...w,...m},e===void 0&&this.accessCheck().catch(c=>{throw c.code==="404"?new Error(`Bucket ${r} does not exist`):c})}config;static{j(this,"GCSMetaStorage")}authClient;storageBaseURI;uploadBaseURI;isCustomEndpoint=!1;retryOptions={};useAuthWithCustomEndpoint;userProject;async save(t,e){const a={...e};return a.metadata&&(a.metadata=R(e.metadata)),await this.makeRequest({body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"},method:"POST",params:{name:encodeURIComponent(this.getMetaName(t)),uploadType:"media"},url:this.uploadBaseURI}),e}async delete(t){const e=this.getMetaPath(t);await this.makeRequest({method:"DELETE",url:e})}async get(t){const e=this.getMetaPath(t),{data:a}=await this.makeRequest({params:{alt:"media"},url:e});return a.metadata&&typeof a.metadata=="string"&&(a.metadata=E(a.metadata)),a}async touch(t,e){return this.save(t,e)}async accessCheck(){return this.makeRequest({url:this.storageBaseURI.replace("/o","")})}getMetaPath(t){return`${this.storageBaseURI}/${this.getMetaName(t)}`}async makeRequest(t){return typeof t.url=="string"&&(t.url=t.url.replaceAll("/:",":")),t={...t,headers:{"User-Agent":`${i.name}/${i.version}`,"x-goog-api-client":`gl-node/${process.versions.node} gccl/${i.version} gccl-invocation-id/${y()}`},params:{...this.userProject===void 0?{}:{userProject:this.userProject}},retry:!0,retryConfig:this.retryOptions,timeout:6e4},this.isCustomEndpoint&&!this.useAuthWithCustomEndpoint?f(t):this.authClient.request(t)}}export{N as E,G as b,i as d,T as g,w as r};
1
+ var g=Object.defineProperty;var o=(s,t)=>g(s,"name",{value:t,configurable:!0});import{randomUUID as y}from"node:crypto";import{request as f}from"gaxios";import{GoogleAuth as C}from"google-auth-library";import v from"./MetaStorage-Y4m1dWgd.js";import{stringifyMetadata as R,parseMetadata as E}from"./Metadata-B6Ir0KO7.js";import n from"./GCSConfig-BQ0OpVhe.js";import{o as $}from"./has-content-Bx2p8Okx.js";var I="@visulima/storage",P="1.0.0-alpha.24";const i={name:I,version:P};var A=Object.defineProperty,u=o((s,t)=>A(s,"name",{value:t,configurable:!0}),"n");const T=u(s=>{const t=s.match(/(\d+)-(\d+)/),e=t?.[2]?+t[2]:0;return e>0?e+1:0},"getRangeEnd"),G=u(s=>{if($(s)){const t=s.contentLength?s.start+s.contentLength-1:"*";return`bytes ${s.start}-${t}/${s.size??"*"}`}return`bytes */${s.size??"*"}`},"buildContentRange"),U=u(s=>{if(s.response!==void 0){const{response:t}=s;return t?.data?.error?.errors?.map(({reason:e=""})=>e==="rateLimitExceeded"||e==="userRateLimitExceeded"?!0:!!(e&&e.includes("EAI_AGAIN"))).includes(!0)}return!1},"shouldRetry"),w={retry:3,shouldRetry:U,statusCodesToRetry:[[408,429,500,502,503,504],[100,199],[429],[500,599]]};var b=Object.defineProperty,j=o((s,t)=>b(s,"name",{value:t,configurable:!0}),"p");class N extends v{static{o(this,"E")}constructor(t){super(t),this.config=t;const{authClient:e,...a}=t,r=a.bucket||process.env.GCS_BUCKET;if(e===void 0){if(!r)throw new Error("GCS bucket is not defined");if(!a.projectId)throw new Error("Sorry, we cannot connect to Cloud Services without a project ID.");a.scopes||=n.authScopes,this.authClient=new C(a)}else this.authClient=e;this.storageBaseURI=`${a.storageAPI||n.storageAPI}/${r}/o`,this.uploadBaseURI=`${a.uploadAPI||n.uploadAPI}/${r}/o`;const h=["storage.googleapis.com"],d=new URL(this.storageBaseURI).hostname;this.isCustomEndpoint=!h.includes(d);const{retryOptions:m,useAuthWithCustomEndpoint:p,userProject:l}=t;this.userProject=l,this.useAuthWithCustomEndpoint=p||!1,this.retryOptions={...w,...m},e===void 0&&this.accessCheck().catch(c=>{throw c.code==="404"?new Error(`Bucket ${r} does not exist`):c})}config;static{j(this,"GCSMetaStorage")}authClient;storageBaseURI;uploadBaseURI;isCustomEndpoint=!1;retryOptions={};useAuthWithCustomEndpoint;userProject;async save(t,e){const a={...e};return a.metadata&&(a.metadata=R(e.metadata)),await this.makeRequest({body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"},method:"POST",params:{name:encodeURIComponent(this.getMetaName(t)),uploadType:"media"},url:this.uploadBaseURI}),e}async delete(t){const e=this.getMetaPath(t);await this.makeRequest({method:"DELETE",url:e})}async get(t){const e=this.getMetaPath(t),{data:a}=await this.makeRequest({params:{alt:"media"},url:e});return a.metadata&&typeof a.metadata=="string"&&(a.metadata=E(a.metadata)),a}async touch(t,e){return this.save(t,e)}async accessCheck(){return this.makeRequest({url:this.storageBaseURI.replace("/o","")})}getMetaPath(t){return`${this.storageBaseURI}/${this.getMetaName(t)}`}async makeRequest(t){return typeof t.url=="string"&&(t.url=t.url.replaceAll("/:",":")),t={...t,headers:{"User-Agent":`${i.name}/${i.version}`,"x-goog-api-client":`gl-node/${process.versions.node} gccl/${i.version} gccl-invocation-id/${y()}`},params:{...this.userProject===void 0?{}:{userProject:this.userProject}},retry:!0,retryConfig:this.retryOptions,timeout:6e4},this.isCustomEndpoint&&!this.useAuthWithCustomEndpoint?f(t):this.authClient.request(t)}}export{N as E,G as b,i as d,T as g,w as r};
@@ -1,4 +1,4 @@
1
- import { F as File, L as LocalMetaStorageOptions, M as MetaStorage } from "./storage.d-BOMUJD96.js";
1
+ import { F as File, L as LocalMetaStorageOptions, M as MetaStorage } from "./storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
3
  /**
4
4
  * Stores upload metafiles on local disk
@@ -1,5 +1,5 @@
1
- import { F as File, a as FileReturn, B as BaseStorage } from "./storage.d-BOMUJD96.js";
2
- import { O as MediaTransformerConfig, Q as MediaTransformResult } from "./types.d-CS7AtuZD.js";
1
+ import { F as File, a as FileReturn, B as BaseStorage } from "./storage.d-sc8gn16g.js";
2
+ import { O as MediaTransformerConfig, Q as MediaTransformResult } from "./types.d-b0WcdT0x.js";
3
3
  /**
4
4
  * Unified media transformer that automatically detects media type and routes to appropriate transformer.
5
5
  * @template TFile The file type used by this transformer.
@@ -1,5 +1,5 @@
1
1
  import { Readable } from 'node:stream';
2
- import { F as File, M as MetaStorage, c as createRetryWrapper, b as FileInit, B as BaseStorage, R as RetryConfig, d as FilePart, e as FileQuery, a as FileReturn } from "./storage.d-BOMUJD96.js";
2
+ import { F as File, M as MetaStorage, d as createRetryWrapper, e as FileInit, B as BaseStorage, R as RetryConfig, f as FilePart, g as FileQuery, a as FileReturn } from "./storage.d-sc8gn16g.js";
3
3
  /**
4
4
  * Part interface for multipart uploads.
5
5
  */
@@ -3,6 +3,28 @@ import { BinaryToTextEncoding, Hash } from 'node:crypto';
3
3
  import { IncomingMessage } from 'node:http';
4
4
  import { LRUCache } from 'lru-cache';
5
5
  /**
6
+ * Simple cache interface that any cache implementation can follow
7
+ */
8
+ interface Cache<K = string, V = unknown> {
9
+ /** Clear all cache entries */
10
+ clear: () => void | Promise<void>;
11
+ /** Delete a value from cache */
12
+ delete: (key: K) => boolean | Promise<boolean>;
13
+ /** Get a value from cache */
14
+ get: (key: K) => V | undefined | Promise<V | undefined>;
15
+ /** Check if a key exists in cache */
16
+ has: (key: K) => boolean | Promise<boolean>;
17
+ /** Set a value in cache */
18
+ set: (key: K, value: V, options?: CacheOptions) => boolean | Promise<boolean>;
19
+ }
20
+ /**
21
+ * Options for cache operations
22
+ */
23
+ interface CacheOptions {
24
+ /** TTL in milliseconds */
25
+ ttl?: number;
26
+ }
27
+ /**
6
28
  * Transform that computes a rolling checksum for a stream while passing
7
29
  * data through unchanged.
8
30
  */
@@ -177,6 +199,58 @@ declare const isUploadError: (error: unknown) => error is UploadError;
177
199
  * @throws UploadError with the specified code and message
178
200
  */
179
201
  declare const throwErrorCode: (UploadErrorCode: ERRORS | string, detail?: string) => never;
202
+ /**
203
+ * A simple lock map keyed by strings, backed by LRUCache. Locks
204
+ * automatically expire according to the configured TTL preventing deadlocks.
205
+ */
206
+ declare class Locker<K extends string = string, V extends string = string> extends LRUCache<K, V, number> {
207
+ /**
208
+ * Creates a new Locker instance with configurable TTL and cache options.
209
+ * @param options LRU cache configuration options
210
+ */
211
+ constructor(options?: LRUCache.Options<K, V, number>);
212
+ /**
213
+ * Acquires a lock for the specified key.
214
+ * Throws an error if the key is already locked.
215
+ * @param key The key to lock
216
+ * @returns The lock token (same as the key)
217
+ * @throws Error if the key is already locked
218
+ */
219
+ lock(key: K): string;
220
+ /**
221
+ * Releases the lock for the specified key.
222
+ * @param key The key to unlock
223
+ */
224
+ unlock(key: K): void;
225
+ }
226
+ /**
227
+ * Configurable validation system for file upload constraints.
228
+ * Supports multiple validation rules with custom error responses.
229
+ * @template T - The type being validated
230
+ */
231
+ declare class Validator<T> {
232
+ private prefix;
233
+ private validators;
234
+ /**
235
+ * Creates a new Validator instance.
236
+ * @param prefix Prefix for generated error codes (default: "ValidationError")
237
+ */
238
+ constructor(prefix?: string);
239
+ /**
240
+ * Adds validation rules to the validator.
241
+ * Each rule must include an `isValid` function.
242
+ * @param config Validation configuration object
243
+ * @throws TypeError if any validator is missing the isValid function
244
+ */
245
+ add(config: Validation<T>): void;
246
+ /**
247
+ * Verifies an object against all configured validation rules.
248
+ * Throws ValidationError on first validation failure.
249
+ * @param t Object to validate
250
+ * @throws ValidationError if validation fails
251
+ */
252
+ verify(t: T): Promise<never | void>;
253
+ }
180
254
  interface MetaStorageOptions {
181
255
  logger?: Console;
182
256
  prefix?: string;
@@ -291,80 +365,6 @@ declare class MetaStorage<T extends File = File> {
291
365
  getIdFromMetaName(name: string): string;
292
366
  }
293
367
  /**
294
- * Simple cache interface that any cache implementation can follow
295
- */
296
- interface Cache<K = string, V = unknown> {
297
- /** Clear all cache entries */
298
- clear: () => void | Promise<void>;
299
- /** Delete a value from cache */
300
- delete: (key: K) => boolean | Promise<boolean>;
301
- /** Get a value from cache */
302
- get: (key: K) => V | undefined | Promise<V | undefined>;
303
- /** Check if a key exists in cache */
304
- has: (key: K) => boolean | Promise<boolean>;
305
- /** Set a value in cache */
306
- set: (key: K, value: V, options?: CacheOptions) => boolean | Promise<boolean>;
307
- }
308
- /**
309
- * Options for cache operations
310
- */
311
- interface CacheOptions {
312
- /** TTL in milliseconds */
313
- ttl?: number;
314
- }
315
- /**
316
- * A simple lock map keyed by strings, backed by LRUCache. Locks
317
- * automatically expire according to the configured TTL preventing deadlocks.
318
- */
319
- declare class Locker<K extends string = string, V extends string = string> extends LRUCache<K, V, number> {
320
- /**
321
- * Creates a new Locker instance with configurable TTL and cache options.
322
- * @param options LRU cache configuration options
323
- */
324
- constructor(options?: LRUCache.Options<K, V, number>);
325
- /**
326
- * Acquires a lock for the specified key.
327
- * Throws an error if the key is already locked.
328
- * @param key The key to lock
329
- * @returns The lock token (same as the key)
330
- * @throws Error if the key is already locked
331
- */
332
- lock(key: K): string;
333
- /**
334
- * Releases the lock for the specified key.
335
- * @param key The key to unlock
336
- */
337
- unlock(key: K): void;
338
- }
339
- /**
340
- * Configurable validation system for file upload constraints.
341
- * Supports multiple validation rules with custom error responses.
342
- * @template T - The type being validated
343
- */
344
- declare class Validator<T> {
345
- private prefix;
346
- private validators;
347
- /**
348
- * Creates a new Validator instance.
349
- * @param prefix Prefix for generated error codes (default: "ValidationError")
350
- */
351
- constructor(prefix?: string);
352
- /**
353
- * Adds validation rules to the validator.
354
- * Each rule must include an `isValid` function.
355
- * @param config Validation configuration object
356
- * @throws TypeError if any validator is missing the isValid function
357
- */
358
- add(config: Validation<T>): void;
359
- /**
360
- * Verifies an object against all configured validation rules.
361
- * Throws ValidationError on first validation failure.
362
- * @param t Object to validate
363
- * @throws ValidationError if validation fails
364
- */
365
- verify(t: T): Promise<never | void>;
366
- }
367
- /**
368
368
  * Retry configuration options for storage operations
369
369
  */
370
370
  interface RetryConfig {
@@ -936,4 +936,4 @@ declare abstract class BaseStorage<TFile extends File = File, TFileReturn extend
936
936
  */
937
937
  protected instrumentOperation<T>(operation: string, function_: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
938
938
  }
939
- export { RangeChecksum as A, BaseStorage as B, Cache as C, DiskStorageOptions as D, ERRORS as E, File as F, RangeHasher as G, HttpError as H, IncomingMessageWithBody as I, ResponseBody as J, ResponseTuple as K, LocalMetaStorageOptions as L, MetaStorage as M, ValidationError as N, OnComplete as O, PurgeList as P, ValidatorConfig as Q, RetryConfig as R, defaultCloudStorageFileNameValidation as S, defaultFilesystemFileNameValidation as T, UploadFile as U, Validation as V, isRetryableError as W, isUploadError as X, retry as Y, throwErrorCode as Z, FileReturn as a, FileInit as b, createRetryWrapper as c, FilePart as d, FileQuery as e, UploadError as f, UploadEventType as g, DiskStorageWithChecksumOptions as h, ResponseBodyType as i, ErrorResponses as j, BaseStorageOptions as k, UploadResponse as l, MetaStorageOptions as m, Metrics as n, BatchOperationResponse as o, BatchOperationResult as p, ErrorMap as q, ExpirationOptions as r, Header as s, Headers as t, HttpErrorBody as u, Metadata as v, OnCreate as w, OnDelete as x, OnError as y, OnUpdate as z };
939
+ export { RangeChecksum as A, BaseStorage as B, Cache as C, DiskStorageOptions as D, ERRORS as E, File as F, RangeHasher as G, HttpError as H, IncomingMessageWithBody as I, ResponseBody as J, ResponseTuple as K, LocalMetaStorageOptions as L, MetaStorage as M, ValidationError as N, OnComplete as O, PurgeList as P, ValidatorConfig as Q, RetryConfig as R, defaultCloudStorageFileNameValidation as S, defaultFilesystemFileNameValidation as T, UploadFile as U, Validation as V, isRetryableError as W, isUploadError as X, retry as Y, throwErrorCode as Z, FileReturn as a, UploadError as b, UploadEventType as c, createRetryWrapper as d, FileInit as e, FilePart as f, FileQuery as g, DiskStorageWithChecksumOptions as h, ResponseBodyType as i, ErrorResponses as j, BaseStorageOptions as k, UploadResponse as l, MetaStorageOptions as m, Metrics as n, BatchOperationResponse as o, BatchOperationResult as p, ErrorMap as q, ExpirationOptions as r, Header as s, Headers as t, HttpErrorBody as u, Metadata 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, i as ResponseBodyType, B as BaseStorage, j as ErrorResponses } from "./storage.d-BOMUJD96.js";
2
+ import { U as UploadFile, i as ResponseBodyType, B as BaseStorage, j as ErrorResponses } from "./storage.d-sc8gn16g.js";
3
3
  import 'node:stream';
4
- import { M as MediaTransformer } from "./media-transformer.d-CwcLDvvA.js";
5
- import { U as UploadOptions } from "./types.d-7yAizORn.js";
4
+ import { M as MediaTransformer } from "./media-transformer.d-BXjTN5Qv.js";
5
+ import { U as UploadOptions } from "./types.d-Cor8FV54.js";
6
6
  import 'node:crypto';
7
7
  import 'node:http';
8
8
  import 'lru-cache';
@@ -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, B as BaseStorage, f as UploadError, g as UploadEventType } from "./storage.d-BOMUJD96.js";
6
- import { M as MediaTransformer } from "./media-transformer.d-CwcLDvvA.js";
5
+ import { U as UploadFile, B as BaseStorage, b as UploadError, c as UploadEventType } from "./storage.d-sc8gn16g.js";
6
+ import { M as MediaTransformer } from "./media-transformer.d-BXjTN5Qv.js";
7
7
  type WebRequest = globalThis.Request;
8
8
  type WebResponse = globalThis.Response;
9
9
  interface BaseResponse {
@@ -1,4 +1,4 @@
1
- import { C as Cache, F as File, a as FileReturn, B as BaseStorage } from "./storage.d-BOMUJD96.js";
1
+ import { C as Cache, F as File, a as FileReturn, B as BaseStorage } from "./storage.d-sc8gn16g.js";
2
2
  import { Readable } from 'node:stream';
3
3
  /**
4
4
  * Base transformer configuration with common properties
@@ -705,4 +705,4 @@ interface AudioTransformerConfig extends BaseTransformerConfig {
705
705
  /** Maximum audio size to process (in bytes) */
706
706
  maxAudioSize?: number;
707
707
  }
708
- export { AffineOptions as A, BlurOptions as B, CropOptions as C, DilateOptions as D, ExtractChannelOptions as E, VideoCropOptions as F, GreyscaleOptions as G, VideoRotateOptions as H, ImageTransformerConfig as I, JoinChannelOptions as J, VideoTransformOptions as K, LinearOptions as L, MedianOptions as M, VideoTransformationStep 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, RotateOptions as a, ImageFormat as b, TransformOptions as c, CLAHEOptions as d, ConvolveOptions as e, ThresholdOptions as f, BooleanOptions as g, RecombineOptions as h, ModulateOptions as i, TintOptions as j, ColourspaceOptions as k, BandboolOptions as l, ErodeOptions as m, ToColourspaceOptions as n, RemoveAlphaOptions as o, EnsureAlphaOptions as p, TransformationStep as q, BaseTransformer as r, AudioTransformerConfig as s, AudioTransformResult as t, AudioResampleOptions as u, AudioChannelMixOptions as v, AudioTransformOptions as w, AudioTransformationStep as x, VideoTransformResult as y, VideoResizeOptions as z };
708
+ export { AffineOptions as A, BlurOptions as B, CropOptions as C, DilateOptions as D, ExtractChannelOptions as E, AudioResampleOptions as F, GreyscaleOptions as G, AudioChannelMixOptions as H, ImageTransformerConfig as I, JoinChannelOptions as J, AudioTransformOptions as K, LinearOptions as L, MedianOptions as M, AudioTransformationStep 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, RotateOptions as a, ImageFormat as b, TransformOptions as c, CLAHEOptions as d, ConvolveOptions as e, ThresholdOptions as f, BooleanOptions as g, RecombineOptions as h, ModulateOptions as i, TintOptions as j, ColourspaceOptions as k, BandboolOptions as l, ErodeOptions as m, ToColourspaceOptions as n, RemoveAlphaOptions as o, EnsureAlphaOptions as p, TransformationStep as q, BaseTransformer as r, VideoTransformResult as s, VideoResizeOptions as t, VideoCropOptions as u, VideoRotateOptions as v, VideoTransformOptions as w, VideoTransformationStep as x, AudioTransformerConfig as y, AudioTransformResult as z };
@@ -1,6 +1,6 @@
1
- import { F as File, m as MetaStorageOptions, k as BaseStorageOptions, L as LocalMetaStorageOptions, M as MetaStorage, H as HttpError, e as FileQuery, b as FileInit } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { F as File, m as MetaStorageOptions, k as BaseStorageOptions, L as LocalMetaStorageOptions, M as MetaStorage, H as HttpError, g as FileQuery, e as FileInit } from "../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import { Readable } from 'node:stream';
3
- import { P as Part, S as S3ApiOperations, a as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-CczjSe98.js";
3
+ import { P as Part, S as S3ApiOperations, a as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-Ccatb1dO.js";
4
4
  import { S as S3ClientConfig, O as ObjectCannedACL, a as S3Client } from "../../packem_shared/S3Client.d-CZ62Jztg.js";
5
5
  import { ResponseMetadata } from '@smithy/types';
6
6
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { P as Part, S as S3ApiOperations, a as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-CczjSe98.js";
2
- import { F as File, m as MetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, H as HttpError, e as FileQuery, b as FileInit } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { P as Part, S as S3ApiOperations, a as S3BaseStorage } from "../../packem_shared/s3-base-storage.d-Ccatb1dO.js";
2
+ import { F as File, m as MetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, H as HttpError, g as FileQuery, e as FileInit } from "../../packem_shared/storage.d-sc8gn16g.js";
3
3
  import { Readable } from 'node:stream';
4
4
  import 'node:crypto';
5
5
  import 'node:http';
@@ -1,4 +1,4 @@
1
- import { F as File, m as MetaStorageOptions, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, b as FileInit, e as FileQuery, d as FilePart, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { F as File, m as MetaStorageOptions, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, e as FileInit, g as FileQuery, f as FilePart, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import { Readable } from 'node:stream';
3
3
  import { TokenCredential } from '@azure/core-auth';
4
4
  import { AbortSignalLike } from '@azure/abort-controller';
@@ -1,4 +1,4 @@
1
- import { F as File$1, m as MetaStorageOptions, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, H as HttpError, b as FileInit, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { F as File$1, m as MetaStorageOptions, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, H as HttpError, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
3
  import * as _$undici_types0 from 'undici-types';
4
4
  import { Agent } from 'http';
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CHjX_fJk.js";import{E as C}from"../../packem_shared/gcs-meta-storage-BO113yMU.js";import{default as l}from"../../packem_shared/GCStorage-JsWySw04.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
1
+ import{default as a}from"../../packem_shared/GCSConfig-BQ0OpVhe.js";import{default as t}from"../../packem_shared/GCSFile-CHjX_fJk.js";import{E as C}from"../../packem_shared/gcs-meta-storage-CNiEWerS.js";import{default as l}from"../../packem_shared/GCStorage-C8hxSNLM.js";export{a as GCSConfig,t as GCSFile,C as GCSMetaStorage,l as GCStorage};
@@ -1,6 +1,6 @@
1
- export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-hEoe2ugb.js";
2
- export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-Dop9RP9k.js";
3
- export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ export { D as DiskStorage, a as DiskStorageWithChecksum } from "../../packem_shared/disk-storage-with-checksum.d-B5D9I_CA.js";
2
+ export { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-rO44cnQ5.js";
3
+ export { type L as LocalMetaStorageOptions } from "../../packem_shared/storage.d-sc8gn16g.js";
4
4
  import 'node:stream';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -1,6 +1,6 @@
1
- import { F as File, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, b as FileInit, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { F as File, L as LocalMetaStorageOptions, k as BaseStorageOptions, M as MetaStorage, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-Dop9RP9k.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-rO44cnQ5.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';
@@ -1,6 +1,6 @@
1
- import { L as LocalMetaStorageOptions, k as BaseStorageOptions, F as File, M as MetaStorage, b as FileInit, d as FilePart, e as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-BOMUJD96.js";
1
+ import { L as LocalMetaStorageOptions, k as BaseStorageOptions, F as File, M as MetaStorage, e as FileInit, f as FilePart, g as FileQuery, a as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-sc8gn16g.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-Dop9RP9k.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-rO44cnQ5.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';
@@ -1,5 +1,5 @@
1
- import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-BOMUJD96.js";
2
- import { s as AudioTransformerConfig, t as AudioTransformResult, u as AudioResampleOptions, v as AudioChannelMixOptions, w as AudioTransformOptions, x as AudioTransformationStep, r as BaseTransformer } from "../packem_shared/types.d-CS7AtuZD.js";
1
+ import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-sc8gn16g.js";
2
+ import { y as AudioTransformerConfig, z as AudioTransformResult, F as AudioResampleOptions, H as AudioChannelMixOptions, K as AudioTransformOptions, N as AudioTransformationStep, r as BaseTransformer } from "../packem_shared/types.d-b0WcdT0x.js";
3
3
  import 'node:stream';
4
4
  import 'node:crypto';
5
5
  import 'node:http';
@@ -1,6 +1,6 @@
1
1
  import { Readable } from 'node:stream';
2
- import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-BOMUJD96.js";
3
- import { I as ImageTransformerConfig, T as TransformResult, R as ResizeOptions, C as CropOptions, a as RotateOptions, b as ImageFormat, c as TransformOptions, S as SharpenOptions, B as BlurOptions, M as MedianOptions, d as CLAHEOptions, e as ConvolveOptions, f as ThresholdOptions, g as BooleanOptions, L as LinearOptions, h as RecombineOptions, i as ModulateOptions, j as TintOptions, G as GreyscaleOptions, k as ColourspaceOptions, E as ExtractChannelOptions, J as JoinChannelOptions, l as BandboolOptions, A as AffineOptions, D as DilateOptions, m as ErodeOptions, P as PipelineColourspaceOptions, n as ToColourspaceOptions, o as RemoveAlphaOptions, p as EnsureAlphaOptions, q as TransformationStep, r as BaseTransformer } from "../packem_shared/types.d-CS7AtuZD.js";
2
+ import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-sc8gn16g.js";
3
+ import { I as ImageTransformerConfig, T as TransformResult, R as ResizeOptions, C as CropOptions, a as RotateOptions, b as ImageFormat, c as TransformOptions, S as SharpenOptions, B as BlurOptions, M as MedianOptions, d as CLAHEOptions, e as ConvolveOptions, f as ThresholdOptions, g as BooleanOptions, L as LinearOptions, h as RecombineOptions, i as ModulateOptions, j as TintOptions, G as GreyscaleOptions, k as ColourspaceOptions, E as ExtractChannelOptions, J as JoinChannelOptions, l as BandboolOptions, A as AffineOptions, D as DilateOptions, m as ErodeOptions, P as PipelineColourspaceOptions, n as ToColourspaceOptions, o as RemoveAlphaOptions, p as EnsureAlphaOptions, q as TransformationStep, r as BaseTransformer } from "../packem_shared/types.d-b0WcdT0x.js";
4
4
  import 'node:crypto';
5
5
  import 'node:http';
6
6
  import 'lru-cache';
@@ -1,6 +1,6 @@
1
- export { type v as AudioChannelMixOptions, type u as AudioResampleOptions, type w as AudioTransformOptions, type t as AudioTransformResult, type x as AudioTransformationStep, type s as AudioTransformerConfig, r as BaseTransformer, type C as CropOptions, type b as ImageFormat, type I as ImageTransformerConfig, type U as MediaTransformQuery, type Q as MediaTransformResult, type W as MediaTransformationStep, type O as MediaTransformerConfig, type R as ResizeOptions, type a as RotateOptions, type c as TransformOptions, type T as TransformResult, type q as TransformationStep, type F as VideoCropOptions, type z as VideoResizeOptions, type H as VideoRotateOptions, type K as VideoTransformOptions, type y as VideoTransformResult, type N as VideoTransformationStep, type V as VideoTransformerConfig } from "../packem_shared/types.d-CS7AtuZD.js";
2
- export { M as MediaTransformer } from "../packem_shared/media-transformer.d-CwcLDvvA.js";
3
- import { a as FileReturn } from "../packem_shared/storage.d-BOMUJD96.js";
1
+ export { type H as AudioChannelMixOptions, type F as AudioResampleOptions, type K as AudioTransformOptions, type z as AudioTransformResult, type N as AudioTransformationStep, type y as AudioTransformerConfig, r as BaseTransformer, type C as CropOptions, type b as ImageFormat, type I as ImageTransformerConfig, type U as MediaTransformQuery, type Q as MediaTransformResult, type W as MediaTransformationStep, type O as MediaTransformerConfig, type R as ResizeOptions, type a as RotateOptions, type c as TransformOptions, type T as TransformResult, type q as TransformationStep, type u as VideoCropOptions, type t as VideoResizeOptions, type v as VideoRotateOptions, type w as VideoTransformOptions, type s as VideoTransformResult, type x as VideoTransformationStep, type V as VideoTransformerConfig } from "../packem_shared/types.d-b0WcdT0x.js";
2
+ export { M as MediaTransformer } from "../packem_shared/media-transformer.d-BXjTN5Qv.js";
3
+ import { a as FileReturn } from "../packem_shared/storage.d-sc8gn16g.js";
4
4
  import 'node:stream';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -1,5 +1,5 @@
1
- import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-BOMUJD96.js";
2
- import { V as VideoTransformerConfig, y as VideoTransformResult, z as VideoResizeOptions, F as VideoCropOptions, H as VideoRotateOptions, K as VideoTransformOptions, N as VideoTransformationStep, r as BaseTransformer } from "../packem_shared/types.d-CS7AtuZD.js";
1
+ import { F as File, a as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-sc8gn16g.js";
2
+ import { V as VideoTransformerConfig, s as VideoTransformResult, t as VideoResizeOptions, u as VideoCropOptions, v as VideoRotateOptions, w as VideoTransformOptions, x as VideoTransformationStep, r as BaseTransformer } from "../packem_shared/types.d-b0WcdT0x.js";
3
3
  import 'node:stream';
4
4
  import 'node:crypto';
5
5
  import 'node:http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/storage",
3
- "version": "1.0.0-alpha.23",
3
+ "version": "1.0.0-alpha.25",
4
4
  "description": "Visulima upload - Store files in a web-accessible location via a simplified API. Can automatically scale and rotate images. Includes S3, Azure, GCS and local filesystem-based backends with the most convenient features of each.",
5
5
  "keywords": [
6
6
  "anolilab",