@visulima/storage 1.0.0-alpha.10 → 1.0.0-alpha.12
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 +50 -0
- package/dist/handler/http/fetch/index.js +3 -3
- package/dist/handler/http/hono/index.js +3 -3
- package/dist/handler/http/nextjs/index.js +3 -3
- package/dist/handler/http/node/index.js +3 -3
- package/dist/handler/http/solid-start/index.js +3 -3
- package/dist/handler/utils/upload-handlers.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/openapi/index.js +5 -5
- package/dist/packem_shared/{AwsLightFile-tTneXZgG.js → AwsLightFile-C-Nd5rtl.js} +1 -1
- package/dist/packem_shared/{AwsLightMetaStorage-BWSOtVaN.js → AwsLightMetaStorage-BIDb5EPg.js} +1 -1
- package/dist/packem_shared/{AwsLightStorage-Blv-GP4v.js → AwsLightStorage-C893xyaW.js} +4 -4
- package/dist/packem_shared/{AzureFile-CesgFzps.js → AzureFile-C0kug4w4.js} +1 -1
- package/dist/packem_shared/{AzureSMetaStorage-CFs-OYJT.js → AzureSMetaStorage-BEbXX9Uk.js} +1 -0
- package/dist/packem_shared/{AzureStorage-B0v048hG.js → AzureStorage-CpvzFT4y.js} +9 -7
- package/dist/packem_shared/{BaseTransformer-C2gLib6v.js → BaseTransformer-9965D4pb.js} +1 -0
- package/dist/packem_shared/DiskStorage-BF10kayx.js +12 -0
- package/dist/packem_shared/{DiskStorageWithChecksum-BRl-V5x2.js → DiskStorageWithChecksum-pu9u6IF7.js} +20 -9
- package/dist/packem_shared/{File-Bb3P23dr.js → File-CPUhj3DI.js} +1 -1
- package/dist/packem_shared/{GCSFile-BIEunhAN.js → GCSFile-DaDiCKE2.js} +1 -1
- package/dist/packem_shared/{GCSMetaStorage-CNX_Nc7d.js → GCSMetaStorage-BH6j7TM2.js} +1 -1
- package/dist/packem_shared/{GCStorage-kdkXVebX.js → GCStorage-BBHFEg7F.js} +10 -6
- package/dist/packem_shared/{LocalMetaStorage-CZHhKkMd.js → LocalMetaStorage-BnllcjV9.js} +2 -2
- package/dist/packem_shared/{MediaTransformer-D6658DL1.js → MediaTransformer-BRRqYA0E.js} +9 -4
- package/dist/packem_shared/{Multipart-CRV21AUU.js → Multipart-BzzvNxt4.js} +3 -3
- package/dist/packem_shared/{Multipart-D2ryPMjD.js → Multipart-DLtFLQ8s.js} +2 -2
- package/dist/packem_shared/{NetlifyBlobFile-CXzyjqrD.js → NetlifyBlobFile-CfyJtGWN.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobMetaStorage-DxZ5aDvD.js → NetlifyBlobMetaStorage-DIkZ2umW.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobStorage-CLPtjHqd.js → NetlifyBlobStorage-pZX0_VdO.js} +4 -4
- package/dist/packem_shared/{Rest-DjwU3puo.js → Rest-DEa7IA9R.js} +3 -3
- package/dist/packem_shared/{Rest-DcxBMBjU.js → Rest-qhMbCn5a.js} +3 -3
- package/dist/packem_shared/{S3File-DZiyk9Qt.js → S3File-BXCuJaQZ.js} +1 -1
- package/dist/packem_shared/{S3MetaStorage-Dz9aDabA.js → S3MetaStorage-yT4CznlV.js} +1 -0
- package/dist/packem_shared/{S3Storage-DHmTk-hU.js → S3Storage-2ZiheyWz.js} +4 -3
- package/dist/packem_shared/{Tus-DaN0FmOy.js → Tus-Ck0Hdle5.js} +3 -3
- package/dist/packem_shared/{Tus-DFVlZHaX.js → Tus-_0vCdHyB.js} +1 -1
- package/dist/packem_shared/{VercelBlobFile-BCg4aTEq.js → VercelBlobFile-DkFIIb9Q.js} +1 -1
- package/dist/packem_shared/{VercelBlobMetaStorage-Bd9F-VFm.js → VercelBlobMetaStorage-c0M-TvAR.js} +1 -1
- package/dist/packem_shared/{VercelBlobStorage-DD9LMOS6.js → VercelBlobStorage-CwgI91cP.js} +4 -4
- package/dist/packem_shared/{aws-light-meta-storage-DKJBgbR6.js → aws-light-meta-storage-BGZEiY3y.js} +3 -2
- package/dist/packem_shared/{base-handler-core-BoAqTyz7.js → base-handler-core-lVB-D59L.js} +6 -3
- package/dist/packem_shared/{base-handler-fetch-D4u2xits.js → base-handler-fetch-CitgN-Aw.js} +2 -2
- package/dist/packem_shared/{base-handler-node-DGzcHHAy.js → base-handler-node-BiO2DF87.js} +6 -5
- package/dist/packem_shared/{defaultCloudStorageFileNameValidation-DUuacjWv.js → defaultCloudStorageFileNameValidation-CGoYrGB2.js} +3 -3
- package/dist/packem_shared/{disk-storage-CD47QI30.js → disk-storage-CC6-FUG9.js} +36 -21
- package/dist/packem_shared/{gcs-meta-storage-BiQ1dySn.js → gcs-meta-storage-MsUrkgP6.js} +3 -2
- package/dist/packem_shared/{local-meta-storage-By-3SNBI.js → local-meta-storage-BlOk6m7F.js} +5 -7
- package/dist/packem_shared/{part-match-BMNqHDYD.js → part-match-Dt738Ddb.js} +3 -3
- package/dist/packem_shared/{path-CR6YkPXX-7R1-9CMk.js → path-aV9lMdcn-DMU5H1-h.js} +4 -3
- package/dist/packem_shared/{rest-base-D9URIFkc.js → rest-base-k1ory8uB.js} +2 -2
- package/dist/packem_shared/{restOpenApiSpec-D1JC_Jto.js → restOpenApiSpec-BBJ_SiPE.js} +1 -1
- package/dist/packem_shared/{s3-base-storage-C1DIHTYY.js → s3-base-storage-DSMObtht.js} +3 -3
- package/dist/packem_shared/{sharedGet-Cpo7QUyu.js → sharedGet-CkSLSnMd.js} +6 -3
- package/dist/packem_shared/{storage-C6NSXb8h.js → storage-CpJpqLdn.js} +21 -12
- package/dist/packem_shared/{transformOpenApiSpec-DWM5WtnN.js → transformOpenApiSpec-BodFhFls.js} +1 -1
- package/dist/packem_shared/{tusOpenApiSpec-mBZkl7he.js → tusOpenApiSpec-DzppyJTW.js} +1 -1
- package/dist/packem_shared/{validator-BeX_lJet.js → validator-DuO17wFF.js} +1 -0
- package/dist/packem_shared/{xhrOpenApiSpec-B1V5Dxrj.js → xhrOpenApiSpec-CXz7BC5J.js} +1 -1
- package/dist/storage/aws/index.js +3 -3
- package/dist/storage/aws/s3-base-storage.d.ts +1 -1
- package/dist/storage/aws/s3-storage.d.ts +1 -1
- package/dist/storage/aws/types.d.ts +1 -2
- package/dist/storage/aws-light/aws-light-storage.d.ts +3 -2
- package/dist/storage/aws-light/index.js +3 -3
- package/dist/storage/aws-light/types.d.ts +1 -2
- package/dist/storage/azure/azure-storage.d.ts +2 -2
- package/dist/storage/azure/index.js +3 -3
- package/dist/storage/azure/types.d.ts +1 -2
- package/dist/storage/gcs/gcs-storage.d.ts +2 -2
- package/dist/storage/gcs/index.js +3 -3
- package/dist/storage/gcs/types.d.ts +1 -2
- package/dist/storage/local/disk-storage.d.ts +1 -1
- package/dist/storage/local/index.js +3 -3
- package/dist/storage/local/local-meta-storage.d.ts +2 -7
- package/dist/storage/meta-storage-options.d.ts +11 -0
- package/dist/storage/meta-storage.d.ts +1 -1
- package/dist/storage/netlify-blob/index.js +3 -3
- package/dist/storage/netlify-blob/netlify-blob-meta-storage.d.ts +1 -2
- package/dist/storage/netlify-blob/netlify-blob-storage.d.ts +2 -2
- package/dist/storage/netlify-blob/types.d.ts +1 -2
- package/dist/storage/types.d.ts +2 -6
- package/dist/storage/vercel-blob/index.js +3 -3
- package/dist/storage/vercel-blob/types.d.ts +1 -2
- package/dist/storage/vercel-blob/vercel-blob-meta-storage.d.ts +1 -2
- package/dist/storage/vercel-blob/vercel-blob-storage.d.ts +2 -2
- package/dist/transformer/audio-transformer.js +1 -1
- package/dist/transformer/base-transformer.d.ts +1 -1
- package/dist/transformer/image-transformer.js +1 -1
- package/dist/transformer/index.js +2 -2
- package/dist/transformer/transformer-config.d.ts +16 -0
- package/dist/transformer/types.d.ts +2 -15
- package/dist/transformer/video-transformer.js +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/package.json +8 -9
- package/dist/packem_shared/DiskStorage-Ck5yGQsq.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
## @visulima/storage [1.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.11...@visulima/storage@1.0.0-alpha.12) (2026-04-21)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **storage:** parameterize BaseStorage with subclass file type for gcs/netlify/vercel ([4d26390](https://github.com/visulima/visulima/commit/4d26390c75023edba40dc38d1291808e0722fdeb))
|
|
6
|
+
* **storage:** pass concrete file types as BaseStorage generics ([6a4e8f7](https://github.com/visulima/visulima/commit/6a4e8f7bba252be24cf8f9763abb0f63f6d25832))
|
|
7
|
+
* **storage:** resolve eslint and formatting issues ([31e5078](https://github.com/visulima/visulima/commit/31e5078beb640bfca419c144ca22fbfef56926cd))
|
|
8
|
+
* **tui:** inline component and hook barrel exports in ink entry ([1cf8dd2](https://github.com/visulima/visulima/commit/1cf8dd25c91a2001268fb9d964d95df649bf7832))
|
|
9
|
+
|
|
10
|
+
### Miscellaneous Chores
|
|
11
|
+
|
|
12
|
+
* bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
|
|
13
|
+
* fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
|
|
14
|
+
* **storage:** apply formatter and lint fixes ([093d35e](https://github.com/visulima/visulima/commit/093d35edc53ed4e8f48c86b48a74e4062a7e539e))
|
|
15
|
+
* **storage:** apply pending changes ([89a3f64](https://github.com/visulima/visulima/commit/89a3f647d2836a0c48b224d28658ac912e9e1af2))
|
|
16
|
+
* **storage:** enforce curly braces and apply lint fixes ([2093253](https://github.com/visulima/visulima/commit/20932531885ae51604907008f730b9edbc06b962))
|
|
17
|
+
|
|
18
|
+
### Code Refactoring
|
|
19
|
+
|
|
20
|
+
* **crud:** break handler <-> types circular imports ([#613](https://github.com/visulima/visulima/issues/613)) ([a3c7692](https://github.com/visulima/visulima/commit/a3c7692a5c47cb6ce2284cef7507f4fb992ad3a3))
|
|
21
|
+
* replace inline import() types with top-level imports ([4569a4c](https://github.com/visulima/visulima/commit/4569a4ca04723da069f985855dcfab292f7347e1))
|
|
22
|
+
* **storage:** format code with prettier ([21477ce](https://github.com/visulima/visulima/commit/21477ce4354f83f68fbcbd11e07621e3329357e2))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.9
|
|
28
|
+
|
|
29
|
+
## @visulima/storage [1.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.10...@visulima/storage@1.0.0-alpha.11) (2026-04-08)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
|
|
34
|
+
* **storage:** fix tsconfig.eslint.json to extend local tsconfig ([af2628a](https://github.com/visulima/visulima/commit/af2628ae8a8bc6f10693a96c9280feb81da2c0eb))
|
|
35
|
+
|
|
36
|
+
### Miscellaneous Chores
|
|
37
|
+
|
|
38
|
+
* **storage:** apply prettier formatting ([b2fa58d](https://github.com/visulima/visulima/commit/b2fa58d4364fa580b321b2df47a4264fd22eb070))
|
|
39
|
+
* **storage:** expand inline if-return to block syntax ([29671ac](https://github.com/visulima/visulima/commit/29671ac54f22ae01029f40be73dbd745a1e9a8f9))
|
|
40
|
+
* **storage:** migrate .prettierrc.cjs to prettier.config.js ([98b0fe6](https://github.com/visulima/visulima/commit/98b0fe60cd98ea4c33b8a54ee0b2229ad3c1d4c1))
|
|
41
|
+
* **storage:** remove empty dependency objects from package.json ([ddfeb08](https://github.com/visulima/visulima/commit/ddfeb08fd392ad2553a1ce833dd331540ecc8b09))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Dependencies
|
|
45
|
+
|
|
46
|
+
* **@visulima/pagination:** upgraded to 5.0.0-alpha.9
|
|
47
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.7
|
|
48
|
+
* **@visulima/humanizer:** upgraded to 3.0.0-alpha.9
|
|
49
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
50
|
+
|
|
1
51
|
## @visulima/storage [1.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/storage@1.0.0-alpha.9...@visulima/storage@1.0.0-alpha.10) (2026-03-26)
|
|
2
52
|
|
|
3
53
|
### Features
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Multipart } from '../../../packem_shared/Multipart-
|
|
2
|
-
export { default as Rest } from '../../../packem_shared/Rest-
|
|
3
|
-
export { Tus } from '../../../packem_shared/Tus-
|
|
1
|
+
export { default as Multipart } from '../../../packem_shared/Multipart-DLtFLQ8s.js';
|
|
2
|
+
export { default as Rest } from '../../../packem_shared/Rest-DEa7IA9R.js';
|
|
3
|
+
export { Tus } from '../../../packem_shared/Tus-_0vCdHyB.js';
|
|
4
4
|
export { TUS_RESUMABLE, TUS_VERSION } from '../../../packem_shared/TUS_RESUMABLE-Dtfsffnj.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Multipart from '../../../packem_shared/Multipart-
|
|
2
|
-
import RestFetch from '../../../packem_shared/Rest-
|
|
3
|
-
import { Tus } from '../../../packem_shared/Tus-
|
|
1
|
+
import Multipart from '../../../packem_shared/Multipart-DLtFLQ8s.js';
|
|
2
|
+
import RestFetch from '../../../packem_shared/Rest-DEa7IA9R.js';
|
|
3
|
+
import { Tus } from '../../../packem_shared/Tus-_0vCdHyB.js';
|
|
4
4
|
|
|
5
5
|
const createHandlerFunction = (handler) => async (c) => {
|
|
6
6
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server.js';
|
|
2
|
-
import Multipart from '../../../packem_shared/Multipart-
|
|
3
|
-
import RestFetch from '../../../packem_shared/Rest-
|
|
4
|
-
import { Tus } from '../../../packem_shared/Tus-
|
|
2
|
+
import Multipart from '../../../packem_shared/Multipart-DLtFLQ8s.js';
|
|
3
|
+
import RestFetch from '../../../packem_shared/Rest-DEa7IA9R.js';
|
|
4
|
+
import { Tus } from '../../../packem_shared/Tus-_0vCdHyB.js';
|
|
5
5
|
|
|
6
6
|
const createHandler = (config) => {
|
|
7
7
|
let handler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Multipart from '../../../packem_shared/Multipart-
|
|
2
|
-
import Rest from '../../../packem_shared/Rest-
|
|
3
|
-
import { Tus } from '../../../packem_shared/Tus-
|
|
1
|
+
import Multipart from '../../../packem_shared/Multipart-BzzvNxt4.js';
|
|
2
|
+
import Rest from '../../../packem_shared/Rest-qhMbCn5a.js';
|
|
3
|
+
import { Tus } from '../../../packem_shared/Tus-Ck0Hdle5.js';
|
|
4
4
|
export { TUS_RESUMABLE, TUS_VERSION } from '../../../packem_shared/TUS_RESUMABLE-Dtfsffnj.js';
|
|
5
5
|
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Multipart from '../../../packem_shared/Multipart-
|
|
2
|
-
import RestFetch from '../../../packem_shared/Rest-
|
|
3
|
-
import { Tus } from '../../../packem_shared/Tus-
|
|
1
|
+
import Multipart from '../../../packem_shared/Multipart-DLtFLQ8s.js';
|
|
2
|
+
import RestFetch from '../../../packem_shared/Rest-DEa7IA9R.js';
|
|
3
|
+
import { Tus } from '../../../packem_shared/Tus-_0vCdHyB.js';
|
|
4
4
|
|
|
5
5
|
const createSolidStartHandler = (config) => {
|
|
6
6
|
let handler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
2
|
import type { Readable } from "node:stream";
|
|
3
3
|
import type { UploadFile } from "../../storage/utils/index.d.ts";
|
|
4
|
-
import type {
|
|
4
|
+
import type { UploadResponse } from "../../utils/types.d.ts";
|
|
5
5
|
import type { ResponseFile, ResponseList } from "../types.d.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Handles HEAD/OPTIONS requests.
|
|
@@ -22,7 +22,7 @@ export declare const handleHeadOptionsRequest: <TFile extends UploadFile, NodeRe
|
|
|
22
22
|
* @param sendStream Function to send stream response
|
|
23
23
|
* @param parseRangeHeader Function to parse range header
|
|
24
24
|
*/
|
|
25
|
-
export declare const handleGetRequest: <TFile extends UploadFile, NodeResponse extends ServerResponse>(file: ResponseFile<TFile> | ResponseList<TFile>, request: IncomingMessage, response: NodeResponse, next: (() => void) | undefined, send: (response: NodeResponse, data: UploadResponse
|
|
25
|
+
export declare const handleGetRequest: <TFile extends UploadFile, NodeResponse extends ServerResponse>(file: ResponseFile<TFile> | ResponseList<TFile>, request: IncomingMessage, response: NodeResponse, next: (() => void) | undefined, send: (response: NodeResponse, data: UploadResponse) => void, sendStream: (response: NodeResponse, stream: Readable, options: {
|
|
26
26
|
headers: Record<string, string | number>;
|
|
27
27
|
range?: {
|
|
28
28
|
end: number;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { waitForStorage } from './packem_shared/waitForStorage-Cscw85sx.js';
|
|
2
|
-
export { D as DiskStorage } from './packem_shared/disk-storage-
|
|
3
|
-
export { default as DiskStorageWithChecksum } from './packem_shared/DiskStorageWithChecksum-
|
|
4
|
-
export { L as LocalMetaStorage } from './packem_shared/local-meta-storage-
|
|
2
|
+
export { D as DiskStorage } from './packem_shared/disk-storage-CC6-FUG9.js';
|
|
3
|
+
export { default as DiskStorageWithChecksum } from './packem_shared/DiskStorageWithChecksum-pu9u6IF7.js';
|
|
4
|
+
export { L as LocalMetaStorage } from './packem_shared/local-meta-storage-BlOk6m7F.js';
|
|
5
5
|
export { default as MetaStorage } from './packem_shared/MetaStorage-pECeFOad.js';
|
|
6
|
-
export { B as AbstractBaseStorage, d as defaultCloudStorageFileNameValidation, a as defaultFilesystemFileNameValidation } from './packem_shared/storage-
|
|
6
|
+
export { B as AbstractBaseStorage, d as defaultCloudStorageFileNameValidation, a as defaultFilesystemFileNameValidation } from './packem_shared/storage-CpJpqLdn.js';
|
|
7
7
|
export { ERRORS, ErrorMap, UploadError, isUploadError, throwErrorCode } from './packem_shared/ERRORS-D0apMqnc.js';
|
|
8
8
|
export { createRetryWrapper, isRetryableError, retry } from './packem_shared/isRetryableError-Dycp7127.js';
|
|
9
9
|
export { fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromTokenizer, supportedExtensions, supportedMimeTypes } from 'file-type';
|
|
10
|
-
export { default as File } from './packem_shared/File-
|
|
10
|
+
export { default as File } from './packem_shared/File-CPUhj3DI.js';
|
|
11
11
|
export { default as NoOpMetrics } from './packem_shared/NoOpMetrics-DhAk5rXc.js';
|
|
12
12
|
export { default as OpenTelemetryMetrics } from './packem_shared/OpenTelemetryMetrics-BnxhqIaH.js';
|
|
13
13
|
export { Metadata } from './packem_shared/Metadata-DRLXeJ0F.js';
|
package/dist/openapi/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as restOpenApiSpec } from '../packem_shared/restOpenApiSpec-
|
|
2
|
-
export { sharedErrorSchemaObject, sharedFileMetaExampleObject, sharedFileMetaSchemaObject, sharedGet, sharedGetList } from '../packem_shared/sharedGet-
|
|
3
|
-
export { default as transformOpenApiSpec } from '../packem_shared/transformOpenApiSpec-
|
|
4
|
-
export { default as tusOpenApiSpec } from '../packem_shared/tusOpenApiSpec-
|
|
5
|
-
export { default as xhrOpenApiSpec } from '../packem_shared/xhrOpenApiSpec-
|
|
1
|
+
export { default as restOpenApiSpec } from '../packem_shared/restOpenApiSpec-BBJ_SiPE.js';
|
|
2
|
+
export { sharedErrorSchemaObject, sharedFileMetaExampleObject, sharedFileMetaSchemaObject, sharedGet, sharedGetList } from '../packem_shared/sharedGet-CkSLSnMd.js';
|
|
3
|
+
export { default as transformOpenApiSpec } from '../packem_shared/transformOpenApiSpec-BodFhFls.js';
|
|
4
|
+
export { default as tusOpenApiSpec } from '../packem_shared/tusOpenApiSpec-DzppyJTW.js';
|
|
5
|
+
export { default as xhrOpenApiSpec } from '../packem_shared/xhrOpenApiSpec-CXz7BC5J.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
-
import { S as S3BaseStorage } from './s3-base-storage-
|
|
3
|
-
import { a as AwsLightApiAdapter, A as AwsLightMetaStorage } from './aws-light-meta-storage-
|
|
4
|
-
import AwsLightFile from './AwsLightFile-
|
|
2
|
+
import { S as S3BaseStorage } from './s3-base-storage-DSMObtht.js';
|
|
3
|
+
import { a as AwsLightApiAdapter, A as AwsLightMetaStorage } from './aws-light-meta-storage-BGZEiY3y.js';
|
|
4
|
+
import AwsLightFile from './AwsLightFile-C-Nd5rtl.js';
|
|
5
5
|
|
|
6
6
|
class AwsLightStorage extends S3BaseStorage {
|
|
7
7
|
static name = "aws-light";
|
|
8
8
|
s3Api;
|
|
9
9
|
constructor(config) {
|
|
10
|
-
const { bucket = process.env.S3_BUCKET || process.env.AWS_S3_BUCKET, region
|
|
10
|
+
const { bucket = process.env.S3_BUCKET || process.env.AWS_S3_BUCKET, region } = config;
|
|
11
11
|
if (!bucket) {
|
|
12
12
|
throw new Error("S3 bucket is not defined");
|
|
13
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BlobServiceClient, StorageSharedKeyCredential } from '@azure/storage-blob';
|
|
2
|
-
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-
|
|
2
|
+
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-Dt738Ddb.js';
|
|
3
3
|
import { throwErrorCode, ERRORS } from './ERRORS-D0apMqnc.js';
|
|
4
|
-
import { B as BaseStorage, t as toMilliseconds } from './storage-
|
|
4
|
+
import { B as BaseStorage, t as toMilliseconds } from './storage-CpJpqLdn.js';
|
|
5
5
|
import { createRetryWrapper } from './isRetryableError-Dycp7127.js';
|
|
6
|
-
import { L as LocalMetaStorage } from './local-meta-storage-
|
|
7
|
-
import AzureFile from './AzureFile-
|
|
8
|
-
import AzureMetaStorage from './AzureSMetaStorage-
|
|
9
|
-
import { n as normalize } from './path-
|
|
6
|
+
import { L as LocalMetaStorage } from './local-meta-storage-BlOk6m7F.js';
|
|
7
|
+
import AzureFile from './AzureFile-C0kug4w4.js';
|
|
8
|
+
import AzureMetaStorage from './AzureSMetaStorage-BEbXX9Uk.js';
|
|
9
|
+
import { n as normalize } from './path-aV9lMdcn-DMU5H1-h.js';
|
|
10
10
|
import { h as hasContent } from './has-content-CY66ehMK.js';
|
|
11
11
|
|
|
12
12
|
class AzureStorage extends BaseStorage {
|
|
@@ -198,7 +198,9 @@ class AzureStorage extends BaseStorage {
|
|
|
198
198
|
}
|
|
199
199
|
const blobClient = this.containerClient.getBlockBlobClient(this.getFullPath(file.name));
|
|
200
200
|
const abortController = new AbortController();
|
|
201
|
-
part.body.on("error", () =>
|
|
201
|
+
part.body.on("error", () => {
|
|
202
|
+
abortController.abort();
|
|
203
|
+
});
|
|
202
204
|
const response = await this.retry(
|
|
203
205
|
() => blobClient.uploadStream(part.body, void 0, void 0, {
|
|
204
206
|
abortSignal: abortController.signal,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import 'node:fs';
|
|
2
|
+
import 'node:fs/promises';
|
|
3
|
+
import 'node:stream';
|
|
4
|
+
export { D as default } from './disk-storage-CC6-FUG9.js';
|
|
5
|
+
import './part-match-Dt738Ddb.js';
|
|
6
|
+
import './ERRORS-D0apMqnc.js';
|
|
7
|
+
import './storage-CpJpqLdn.js';
|
|
8
|
+
import './local-meta-storage-BlOk6m7F.js';
|
|
9
|
+
import './File-CPUhj3DI.js';
|
|
10
|
+
import './update-size-CCGm6i1J.js';
|
|
11
|
+
import './has-content-CY66ehMK.js';
|
|
12
|
+
import './path-aV9lMdcn-DMU5H1-h.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createReadStream, createWriteStream } from 'node:fs';
|
|
2
2
|
import { truncate } from 'node:fs/promises';
|
|
3
3
|
import { Transform, pipeline } from 'node:stream';
|
|
4
|
-
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-
|
|
4
|
+
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-Dt738Ddb.js';
|
|
5
5
|
import { throwErrorCode, ERRORS } from './ERRORS-D0apMqnc.js';
|
|
6
|
-
import { D as DiskStorage, e as ensureFile, S as StreamLength, s as streamChecksum } from './disk-storage-
|
|
6
|
+
import { D as DiskStorage, e as ensureFile, S as StreamLength, s as streamChecksum } from './disk-storage-CC6-FUG9.js';
|
|
7
7
|
import { LRUCache } from 'lru-cache';
|
|
8
8
|
import { createHash } from 'node:crypto';
|
|
9
|
-
import { r as remove } from './local-meta-storage-
|
|
9
|
+
import { r as remove } from './local-meta-storage-BlOk6m7F.js';
|
|
10
10
|
import { u as updateSize } from './update-size-CCGm6i1J.js';
|
|
11
11
|
import { h as hasContent } from './has-content-CY66ehMK.js';
|
|
12
12
|
|
|
@@ -23,6 +23,7 @@ class RangeChecksum extends Transform {
|
|
|
23
23
|
this.hash = this.hashes.get(path) || createHash(this.hashes.algorithm);
|
|
24
24
|
this.hashCopy = this.hash.copy();
|
|
25
25
|
}
|
|
26
|
+
path;
|
|
26
27
|
hash;
|
|
27
28
|
hashCopy;
|
|
28
29
|
hashes;
|
|
@@ -67,6 +68,7 @@ class RangeHasher extends LRUCache {
|
|
|
67
68
|
});
|
|
68
69
|
this.algorithm = algorithm;
|
|
69
70
|
}
|
|
71
|
+
algorithm;
|
|
70
72
|
/**
|
|
71
73
|
* Returns the hex-encoded digest for a previously initialized path.
|
|
72
74
|
* @param path File path identifier
|
|
@@ -113,7 +115,9 @@ class RangeHasher extends LRUCache {
|
|
|
113
115
|
if (initial !== void 0) {
|
|
114
116
|
digester.hash = initial;
|
|
115
117
|
}
|
|
116
|
-
createReadStream(path, { start }).on("error", reject).on("end", () =>
|
|
118
|
+
createReadStream(path, { start }).on("error", reject).on("end", () => {
|
|
119
|
+
resolve(digester.hash);
|
|
120
|
+
}).pipe(digester).resume();
|
|
117
121
|
});
|
|
118
122
|
}
|
|
119
123
|
}
|
|
@@ -221,15 +225,22 @@ class DiskStorageWithChecksum extends DiskStorage {
|
|
|
221
225
|
destination.close();
|
|
222
226
|
resolve([Number.NaN, code]);
|
|
223
227
|
};
|
|
224
|
-
lengthChecker.on("error", () =>
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
lengthChecker.on("error", () => {
|
|
229
|
+
failWithCode(ERRORS.FILE_CONFLICT);
|
|
230
|
+
});
|
|
231
|
+
checksumChecker.on("error", () => {
|
|
232
|
+
failWithCode(ERRORS.CHECKSUM_MISMATCH);
|
|
233
|
+
});
|
|
234
|
+
part.body.on("aborted", () => {
|
|
235
|
+
failWithCode(keepPartial ? void 0 : ERRORS.REQUEST_ABORTED);
|
|
236
|
+
});
|
|
227
237
|
pipeline(part.body, lengthChecker, checksumChecker, digester, destination, (error) => {
|
|
228
238
|
if (error) {
|
|
229
239
|
digester.reset();
|
|
230
|
-
|
|
240
|
+
reject(error);
|
|
241
|
+
return;
|
|
231
242
|
}
|
|
232
|
-
|
|
243
|
+
resolve([part.start + destination.bytesWritten]);
|
|
233
244
|
});
|
|
234
245
|
});
|
|
235
246
|
}
|
|
@@ -49,7 +49,7 @@ class File {
|
|
|
49
49
|
hash;
|
|
50
50
|
content;
|
|
51
51
|
ETag;
|
|
52
|
-
constructor({ contentType, expiredAt, metadata
|
|
52
|
+
constructor({ contentType, expiredAt, metadata, originalName, size }) {
|
|
53
53
|
this.metadata = metadata;
|
|
54
54
|
this.originalName = originalName || extractOriginalName(metadata) || (this.id = nanoid());
|
|
55
55
|
this.contentType = contentType || extractMimeType(metadata) || "application/octet-stream";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:crypto';
|
|
2
2
|
import 'gaxios';
|
|
3
3
|
import 'google-auth-library';
|
|
4
|
-
export { G as default } from './gcs-meta-storage-
|
|
4
|
+
export { G as default } from './gcs-meta-storage-MsUrkgP6.js';
|
|
5
5
|
import './MetaStorage-pECeFOad.js';
|
|
6
6
|
import './Metadata-DRLXeJ0F.js';
|
|
7
7
|
import './GCSConfig-vPP22kN6.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { request } from 'gaxios';
|
|
3
3
|
import { GoogleAuth } from 'google-auth-library';
|
|
4
|
-
import { r as retryOptions, G as GCSMetaStorage, g as getRangeEnd, p as package_, b as buildContentRange } from './gcs-meta-storage-
|
|
5
|
-
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-
|
|
4
|
+
import { r as retryOptions, G as GCSMetaStorage, g as getRangeEnd, p as package_, b as buildContentRange } from './gcs-meta-storage-MsUrkgP6.js';
|
|
5
|
+
import { p as partMatch, d as detectFileTypeFromStream, g as getFileStatus } from './part-match-Dt738Ddb.js';
|
|
6
6
|
import { throwErrorCode, ERRORS } from './ERRORS-D0apMqnc.js';
|
|
7
|
-
import { B as BaseStorage, t as toMilliseconds } from './storage-
|
|
8
|
-
import { L as LocalMetaStorage } from './local-meta-storage-
|
|
7
|
+
import { B as BaseStorage, t as toMilliseconds } from './storage-CpJpqLdn.js';
|
|
8
|
+
import { L as LocalMetaStorage } from './local-meta-storage-BlOk6m7F.js';
|
|
9
9
|
import GCSConfig from './GCSConfig-vPP22kN6.js';
|
|
10
|
-
import GCSFile from './GCSFile-
|
|
10
|
+
import GCSFile from './GCSFile-DaDiCKE2.js';
|
|
11
11
|
import { h as hasContent } from './has-content-CY66ehMK.js';
|
|
12
12
|
|
|
13
13
|
class FetchError extends Error {
|
|
@@ -16,6 +16,8 @@ class FetchError extends Error {
|
|
|
16
16
|
this.code = code;
|
|
17
17
|
this.config = config;
|
|
18
18
|
}
|
|
19
|
+
code;
|
|
20
|
+
config;
|
|
19
21
|
name = "FetchError";
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -348,7 +350,9 @@ class GCStorage extends BaseStorage {
|
|
|
348
350
|
const options = { method: "PUT" };
|
|
349
351
|
if (body?.on) {
|
|
350
352
|
const abortController = new AbortController();
|
|
351
|
-
body.on("aborted", () =>
|
|
353
|
+
body.on("aborted", () => {
|
|
354
|
+
abortController.abort();
|
|
355
|
+
});
|
|
352
356
|
options.body = body;
|
|
353
357
|
options.signal = abortController.signal;
|
|
354
358
|
}
|
|
@@ -3,5 +3,5 @@ import 'node:os';
|
|
|
3
3
|
import './ERRORS-D0apMqnc.js';
|
|
4
4
|
import './MetaStorage-pECeFOad.js';
|
|
5
5
|
import './Metadata-DRLXeJ0F.js';
|
|
6
|
-
import './path-
|
|
7
|
-
export { L as default } from './local-meta-storage-
|
|
6
|
+
import './path-aV9lMdcn-DMU5H1-h.js';
|
|
7
|
+
export { L as default } from './local-meta-storage-BlOk6m7F.js';
|
|
@@ -83,6 +83,7 @@ class MediaTransformer {
|
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
storage;
|
|
86
87
|
imageTransformer;
|
|
87
88
|
videoTransformer;
|
|
88
89
|
audioTransformer;
|
|
@@ -208,12 +209,15 @@ class MediaTransformer {
|
|
|
208
209
|
image: this.imageTransformer?.getCacheStats(),
|
|
209
210
|
video: this.videoTransformer?.getCacheStats()
|
|
210
211
|
};
|
|
211
|
-
if (stats.image === void 0)
|
|
212
|
+
if (stats.image === void 0) {
|
|
212
213
|
delete stats.image;
|
|
213
|
-
|
|
214
|
+
}
|
|
215
|
+
if (stats.video === void 0) {
|
|
214
216
|
delete stats.video;
|
|
215
|
-
|
|
217
|
+
}
|
|
218
|
+
if (stats.audio === void 0) {
|
|
216
219
|
delete stats.audio;
|
|
220
|
+
}
|
|
217
221
|
return stats;
|
|
218
222
|
}
|
|
219
223
|
/**
|
|
@@ -908,8 +912,9 @@ class MediaTransformer {
|
|
|
908
912
|
*/
|
|
909
913
|
// eslint-disable-next-line class-methods-use-this
|
|
910
914
|
parseBooleanParameter(value) {
|
|
911
|
-
if (value === null)
|
|
915
|
+
if (value === null) {
|
|
912
916
|
return void 0;
|
|
917
|
+
}
|
|
913
918
|
return value === "true" || value === "1";
|
|
914
919
|
}
|
|
915
920
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { parseMultipartRequest, MaxFileSizeExceededError, MultipartParseError } from '@remix-run/multipart-parser/node';
|
|
3
3
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
4
|
-
import { g as getIdFromRequest } from './base-handler-core-
|
|
5
|
-
import { V as ValidationError } from './validator-
|
|
6
|
-
import { B as BaseHandlerNode } from './base-handler-node-
|
|
4
|
+
import { g as getIdFromRequest } from './base-handler-core-lVB-D59L.js';
|
|
5
|
+
import { V as ValidationError } from './validator-DuO17wFF.js';
|
|
6
|
+
import { B as BaseHandlerNode } from './base-handler-node-BiO2DF87.js';
|
|
7
7
|
import { M as MultipartBase } from './multipart-base-C994naBi.js';
|
|
8
8
|
|
|
9
9
|
const RE_MIME = /^multipart\/.+|application\/x-www-form-urlencoded$/i;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { parseMultipartRequest, MaxFileSizeExceededError, MultipartParseError } from '@remix-run/multipart-parser';
|
|
3
3
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
4
|
-
import { V as ValidationError } from './validator-
|
|
5
|
-
import { B as BaseHandlerFetch } from './base-handler-fetch-
|
|
4
|
+
import { V as ValidationError } from './validator-DuO17wFF.js';
|
|
5
|
+
import { B as BaseHandlerFetch } from './base-handler-fetch-CitgN-Aw.js';
|
|
6
6
|
import { M as MultipartBase } from './multipart-base-C994naBi.js';
|
|
7
7
|
|
|
8
8
|
const RE_MIME = /^multipart\/.+|application\/x-www-form-urlencoded$/i;
|
package/dist/packem_shared/{NetlifyBlobStorage-CLPtjHqd.js → NetlifyBlobStorage-pZX0_VdO.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getStore } from '@netlify/blobs';
|
|
2
|
-
import { g as getFileStatus, p as partMatch, a as detectFileTypeFromBuffer } from './part-match-
|
|
3
|
-
import { B as BaseStorage, t as toMilliseconds, u as updateMetadata } from './storage-
|
|
2
|
+
import { g as getFileStatus, p as partMatch, a as detectFileTypeFromBuffer } from './part-match-Dt738Ddb.js';
|
|
3
|
+
import { B as BaseStorage, t as toMilliseconds, u as updateMetadata } from './storage-CpJpqLdn.js';
|
|
4
4
|
import { createRetryWrapper } from './isRetryableError-Dycp7127.js';
|
|
5
|
-
import { L as LocalMetaStorage } from './local-meta-storage-
|
|
6
|
-
import NetlifyBlobFile from './NetlifyBlobFile-
|
|
5
|
+
import { L as LocalMetaStorage } from './local-meta-storage-BlOk6m7F.js';
|
|
6
|
+
import NetlifyBlobFile from './NetlifyBlobFile-CfyJtGWN.js';
|
|
7
7
|
import { u as updateSize } from './update-size-CCGm6i1J.js';
|
|
8
8
|
import { h as hasContent } from './has-content-CY66ehMK.js';
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
2
2
|
import { ERRORS } from './ERRORS-D0apMqnc.js';
|
|
3
|
-
import { b as getRequestStream } from './base-handler-core-
|
|
4
|
-
import { B as BaseHandlerFetch } from './base-handler-fetch-
|
|
5
|
-
import { R as RestBase, c as parseContentDispositionValue } from './rest-base-
|
|
3
|
+
import { b as getRequestStream } from './base-handler-core-lVB-D59L.js';
|
|
4
|
+
import { B as BaseHandlerFetch } from './base-handler-fetch-CitgN-Aw.js';
|
|
5
|
+
import { R as RestBase, c as parseContentDispositionValue } from './rest-base-k1ory8uB.js';
|
|
6
6
|
|
|
7
7
|
class RestFetch extends BaseHandlerFetch {
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
2
2
|
import { hasBody } from 'type-is';
|
|
3
|
-
import { a as getHeader, b as getRequestStream, g as getIdFromRequest, r as readBody } from './base-handler-core-
|
|
4
|
-
import { B as BaseHandlerNode } from './base-handler-node-
|
|
5
|
-
import { R as RestBase, v as validateRequestBody, a as validateContentLength, e as extractFileInit, p as parseContentDisposition, b as parseChunkHeaders } from './rest-base-
|
|
3
|
+
import { a as getHeader, b as getRequestStream, g as getIdFromRequest, r as readBody } from './base-handler-core-lVB-D59L.js';
|
|
4
|
+
import { B as BaseHandlerNode } from './base-handler-node-BiO2DF87.js';
|
|
5
|
+
import { R as RestBase, v as validateRequestBody, a as validateContentLength, e as extractFileInit, p as parseContentDisposition, b as parseChunkHeaders } from './rest-base-k1ory8uB.js';
|
|
6
6
|
|
|
7
7
|
class Rest extends BaseHandlerNode {
|
|
8
8
|
/**
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { CreateMultipartUploadCommand, UploadPartCommand, CompleteMultipartUploadCommand, AbortMultipartUploadCommand, ListPartsCommand, GetObjectCommand, HeadObjectCommand, DeleteObjectCommand, CopyObjectCommand, ListObjectsV2Command, waitUntilBucketExists, S3Client } from '@aws-sdk/client-s3';
|
|
3
3
|
import { fromIni } from '@aws-sdk/credential-providers';
|
|
4
|
-
import { S as S3BaseStorage } from './s3-base-storage-
|
|
4
|
+
import { S as S3BaseStorage } from './s3-base-storage-DSMObtht.js';
|
|
5
5
|
import { ReadableStream } from 'node:stream/web';
|
|
6
6
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
|
7
|
-
import S3File from './S3File-
|
|
8
|
-
import S3MetaStorage from './S3MetaStorage-
|
|
7
|
+
import S3File from './S3File-BXCuJaQZ.js';
|
|
8
|
+
import S3MetaStorage from './S3MetaStorage-yT4CznlV.js';
|
|
9
9
|
|
|
10
10
|
class S3ClientAdapter {
|
|
11
11
|
constructor(client, _bucket) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
client;
|
|
14
15
|
async createMultipartUpload(params) {
|
|
15
16
|
const command = new CreateMultipartUploadCommand({
|
|
16
17
|
ACL: params.ACL,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { format } from 'node:url';
|
|
2
2
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
3
|
-
import { a as getHeader, b as getRequestStream, g as getIdFromRequest, c as getBaseUrl } from './base-handler-core-
|
|
4
|
-
import { B as BaseHandlerNode } from './base-handler-node-
|
|
3
|
+
import { a as getHeader, b as getRequestStream, g as getIdFromRequest, c as getBaseUrl } from './base-handler-core-lVB-D59L.js';
|
|
4
|
+
import { B as BaseHandlerNode } from './base-handler-node-BiO2DF87.js';
|
|
5
5
|
import { TusBase } from './TUS_RESUMABLE-Dtfsffnj.js';
|
|
6
6
|
export { TUS_RESUMABLE, TUS_VERSION } from './TUS_RESUMABLE-Dtfsffnj.js';
|
|
7
7
|
|
|
@@ -188,7 +188,7 @@ class Tus extends BaseHandlerNode {
|
|
|
188
188
|
const { pathname } = url;
|
|
189
189
|
const query = Object.fromEntries(url.searchParams.entries());
|
|
190
190
|
const relative = format({ pathname: `${pathname}/${file.id}`, query });
|
|
191
|
-
return
|
|
191
|
+
return this.storage.config.useRelativeLocation ? relative : getBaseUrl({ }) + relative;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createHttpError } from './headers-YLRp1dLo.js';
|
|
2
|
-
import { B as BaseHandlerFetch } from './base-handler-fetch-
|
|
2
|
+
import { B as BaseHandlerFetch } from './base-handler-fetch-CitgN-Aw.js';
|
|
3
3
|
import { TusBase } from './TUS_RESUMABLE-Dtfsffnj.js';
|
|
4
4
|
export { TUS_RESUMABLE, TUS_VERSION } from './TUS_RESUMABLE-Dtfsffnj.js';
|
|
5
5
|
|