@visulima/storage 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +39 -0
- package/LICENSE.md +155 -126
- package/dist/handler/http/fetch/index.js +3 -3
- package/dist/handler/http/hono/index.js +3 -3
- package/dist/handler/http/nextjs/index.d.ts +1 -1
- 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.d.ts +1 -1
- 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-D9qWQt6q.js → AwsLightMetaStorage-BIDb5EPg.js} +1 -1
- package/dist/packem_shared/{AwsLightStorage-CEJTYBVv.js → AwsLightStorage-CMuKw4bI.js} +4 -4
- package/dist/packem_shared/{AzureFile-CesgFzps.js → AzureFile-C0kug4w4.js} +1 -1
- package/dist/packem_shared/{AzureStorage-CH6nvQx8.js → AzureStorage-98-LRZ1e.js} +7 -5
- package/dist/packem_shared/{DiskStorage-DziI2mwX.js → DiskStorage-COMe_G42.js} +5 -5
- package/dist/packem_shared/{DiskStorageWithChecksum-B_XY8_cO.js → DiskStorageWithChecksum-BVaaZiyS.js} +18 -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-FypK8Tn1.js → GCSMetaStorage-CSamGLFP.js} +1 -1
- package/dist/packem_shared/{GCStorage-CasTo9rF.js → GCStorage-Cpp5KSGP.js} +8 -6
- package/dist/packem_shared/{LocalMetaStorage-BnllcjV9.js → LocalMetaStorage-DvnZqf61.js} +1 -1
- package/dist/packem_shared/{MediaTransformer-BErvw2vE.js → MediaTransformer-BRRqYA0E.js} +9 -3
- package/dist/packem_shared/{Multipart-vxBL2VXm.js → Multipart-BzzvNxt4.js} +2 -2
- package/dist/packem_shared/{Multipart-CDDlDOs7.js → Multipart-DLtFLQ8s.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobFile-CXzyjqrD.js → NetlifyBlobFile-CfyJtGWN.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobMetaStorage-DIkZ2umW.js → NetlifyBlobMetaStorage-eJT6RFy9.js} +1 -1
- package/dist/packem_shared/{NetlifyBlobStorage-DEpx_4q-.js → NetlifyBlobStorage-nPv7iIAG.js} +4 -4
- package/dist/packem_shared/{Rest-D14vM7aJ.js → Rest-DEa7IA9R.js} +3 -3
- package/dist/packem_shared/{Rest-CEj3EhMj.js → Rest-qhMbCn5a.js} +3 -3
- package/dist/packem_shared/{S3File-DZiyk9Qt.js → S3File-BXCuJaQZ.js} +1 -1
- package/dist/packem_shared/{S3Storage-B0scgwPa.js → S3Storage-wi5XT-yu.js} +2 -2
- package/dist/packem_shared/{Tus-WOVg-YnB.js → Tus-Ck0Hdle5.js} +3 -3
- package/dist/packem_shared/{Tus-Cjz87bpz.js → Tus-_0vCdHyB.js} +1 -1
- package/dist/packem_shared/{VercelBlobFile-BCg4aTEq.js → VercelBlobFile-DkFIIb9Q.js} +1 -1
- package/dist/packem_shared/{VercelBlobMetaStorage-c0M-TvAR.js → VercelBlobMetaStorage-DjFmi4vp.js} +1 -1
- package/dist/packem_shared/{VercelBlobStorage-wOYxv8F7.js → VercelBlobStorage-CmMgiDgr.js} +4 -4
- package/dist/packem_shared/{aws-light-meta-storage-Ba2b_h-o.js → aws-light-meta-storage-BGZEiY3y.js} +2 -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-CinvR65S.js → base-handler-fetch-CitgN-Aw.js} +1 -1
- package/dist/packem_shared/{base-handler-node-c02H0AxN.js → base-handler-node-BiO2DF87.js} +3 -3
- package/dist/packem_shared/{defaultCloudStorageFileNameValidation-CGoYrGB2.js → defaultCloudStorageFileNameValidation-Brw40ZEP.js} +1 -1
- package/dist/packem_shared/{disk-storage-DeivH-J5.js → disk-storage-D9RfoKjW.js} +31 -15
- package/dist/packem_shared/{gcs-meta-storage-B0Baj0Xr.js → gcs-meta-storage-zzzem93r.js} +2 -2
- package/dist/packem_shared/{local-meta-storage-BlOk6m7F.js → local-meta-storage-D-pPc3FI.js} +12 -1
- package/dist/packem_shared/{part-match-BMNqHDYD.js → part-match-Dt738Ddb.js} +3 -3
- package/dist/packem_shared/{rest-base-D9URIFkc.js → rest-base-k1ory8uB.js} +2 -2
- package/dist/packem_shared/{restOpenApiSpec-D1zbmid7.js → restOpenApiSpec-BBJ_SiPE.js} +1 -1
- package/dist/packem_shared/{s3-base-storage-CG21uusd.js → s3-base-storage-zUO8u8Cp.js} +4 -7
- package/dist/packem_shared/{sharedGet-DAyJfjhl.js → sharedGet-CkSLSnMd.js} +6 -2
- package/dist/packem_shared/{storage-CpJpqLdn.js → storage-5XW1E7XU.js} +11 -7
- package/dist/packem_shared/{transformOpenApiSpec-BC0r6PzI.js → transformOpenApiSpec-BodFhFls.js} +1 -1
- package/dist/packem_shared/{tusOpenApiSpec-BLIjKf0s.js → tusOpenApiSpec-DzppyJTW.js} +1 -1
- package/dist/packem_shared/{xhrOpenApiSpec-kItrSAsc.js → xhrOpenApiSpec-CXz7BC5J.js} +1 -1
- package/dist/storage/aws/index.js +2 -2
- 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 +2 -2
- 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/base-transformer.d.ts +1 -1
- package/dist/transformer/index.js +1 -1
- package/dist/transformer/transformer-config.d.ts +16 -0
- package/dist/transformer/types.d.ts +2 -15
- package/dist/utils/types.d.ts +1 -1
- package/package.json +6 -6
|
@@ -131,7 +131,7 @@ export interface S3ApiOperations {
|
|
|
131
131
|
* Contains all shared business logic for S3 operations.
|
|
132
132
|
* @template TFile The file type used by this storage backend.
|
|
133
133
|
*/
|
|
134
|
-
export declare abstract class S3BaseStorage<TFile extends S3CompatibleFile = S3CompatibleFile> extends BaseStorage<TFile
|
|
134
|
+
export declare abstract class S3BaseStorage<TFile extends S3CompatibleFile = S3CompatibleFile> extends BaseStorage<TFile> {
|
|
135
135
|
checksumTypes: string[];
|
|
136
136
|
protected bucket: string;
|
|
137
137
|
protected meta: MetaStorage<TFile>;
|
|
@@ -48,7 +48,7 @@ import type { AwsError, S3StorageOptions } from "./types.d.ts";
|
|
|
48
48
|
* - ❌ getUrl: Not implemented (presigned URLs available via buildPresigned for clientDirectUpload)
|
|
49
49
|
* - ❌ getUploadUrl: Not implemented (presigned URLs available via buildPresigned for clientDirectUpload)
|
|
50
50
|
*/
|
|
51
|
-
declare class S3Storage extends S3BaseStorage
|
|
51
|
+
declare class S3Storage extends S3BaseStorage {
|
|
52
52
|
static readonly name: string;
|
|
53
53
|
private s3Api;
|
|
54
54
|
constructor(config: S3StorageOptions);
|
|
@@ -2,7 +2,6 @@ import type { ObjectCannedACL, S3Client, S3ClientConfig } from "@aws-sdk/client-
|
|
|
2
2
|
import type { ResponseMetadata } from "@aws-sdk/types";
|
|
3
3
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
4
4
|
import type { BaseStorageOptions, MetaStorageOptions } from "../types.d.ts";
|
|
5
|
-
import type S3File from "./s3-file.d.ts";
|
|
6
5
|
export type S3MetaStorageOptions = MetaStorageOptions & S3ClientConfig & {
|
|
7
6
|
bucket?: string;
|
|
8
7
|
/**
|
|
@@ -11,7 +10,7 @@ export type S3MetaStorageOptions = MetaStorageOptions & S3ClientConfig & {
|
|
|
11
10
|
client?: S3Client;
|
|
12
11
|
keyFile?: string;
|
|
13
12
|
};
|
|
14
|
-
export type S3StorageOptions = BaseStorageOptions
|
|
13
|
+
export type S3StorageOptions = BaseStorageOptions & S3ClientConfig & {
|
|
15
14
|
/**
|
|
16
15
|
* Specifying access rules for uploaded files.
|
|
17
16
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Readable } from "node:stream";
|
|
2
|
+
import type { HttpError } from "../../utils/types.d.ts";
|
|
2
3
|
import { S3BaseStorage } from "../aws/s3-base-storage.d.ts";
|
|
3
4
|
import type { FileInit, FileQuery } from "../utils/index.d.ts";
|
|
4
5
|
import AwsLightApiAdapter from "./aws-light-api-adapter.d.ts";
|
|
@@ -43,14 +44,14 @@ import type { AwsLightError, AwsLightStorageOptions } from "./types.d.ts";
|
|
|
43
44
|
* - ✅ exists: Implemented (checks metadata and S3 object)
|
|
44
45
|
* - ⚠️ getUrl/getUploadUrl: Limited presigned URL support (uses aws4fetch signing)
|
|
45
46
|
*/
|
|
46
|
-
declare class AwsLightStorage extends S3BaseStorage
|
|
47
|
+
declare class AwsLightStorage extends S3BaseStorage {
|
|
47
48
|
static readonly name: string;
|
|
48
49
|
private s3Api;
|
|
49
50
|
constructor(config: AwsLightStorageOptions);
|
|
50
51
|
/**
|
|
51
52
|
* Normalizes AWS S3 errors with S3-specific context.
|
|
52
53
|
*/
|
|
53
|
-
normalizeError(error: AwsLightError | Error):
|
|
54
|
+
normalizeError(error: AwsLightError | Error): HttpError;
|
|
54
55
|
update({ id }: FileQuery, metadata: Partial<AwsLightFile>): Promise<AwsLightFile>;
|
|
55
56
|
getStream({ id }: FileQuery): Promise<{
|
|
56
57
|
headers?: Record<string, string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as AwsLightFile } from '../../packem_shared/AwsLightFile-
|
|
2
|
-
export { A as AwsLightMetaStorage } from '../../packem_shared/aws-light-meta-storage-
|
|
3
|
-
export { default as AwsLightStorage } from '../../packem_shared/AwsLightStorage-
|
|
1
|
+
export { default as AwsLightFile } from '../../packem_shared/AwsLightFile-C-Nd5rtl.js';
|
|
2
|
+
export { A as AwsLightMetaStorage } from '../../packem_shared/aws-light-meta-storage-BGZEiY3y.js';
|
|
3
|
+
export { default as AwsLightStorage } from '../../packem_shared/AwsLightStorage-CMuKw4bI.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { BaseStorageOptions, MetaStorageOptions } from "../types.d.ts";
|
|
2
|
-
import type AwsLightFile from "./aws-light-file.d.ts";
|
|
3
2
|
export interface AwsLightClientConfig {
|
|
4
3
|
accessKeyId: string;
|
|
5
4
|
endpoint?: string;
|
|
@@ -11,7 +10,7 @@ export interface AwsLightClientConfig {
|
|
|
11
10
|
export type AwsLightMetaStorageOptions = AwsLightClientConfig & MetaStorageOptions & {
|
|
12
11
|
bucket?: string;
|
|
13
12
|
};
|
|
14
|
-
export type AwsLightStorageOptions = AwsLightClientConfig & BaseStorageOptions
|
|
13
|
+
export type AwsLightStorageOptions = AwsLightClientConfig & BaseStorageOptions & {
|
|
15
14
|
/**
|
|
16
15
|
* S3 bucket name.
|
|
17
16
|
*/
|
|
@@ -14,10 +14,10 @@ import type { AzureStorageOptions } from "./types.d.ts";
|
|
|
14
14
|
* - ❌ getUrl: Not implemented (Azure Blob URLs not supported)
|
|
15
15
|
* - ❌ getUploadUrl: Not implemented (Azure Blob upload URLs handled internally)
|
|
16
16
|
*/
|
|
17
|
-
declare class AzureStorage extends BaseStorage
|
|
17
|
+
declare class AzureStorage extends BaseStorage {
|
|
18
18
|
static readonly name: string;
|
|
19
19
|
checksumTypes: string[];
|
|
20
|
-
protected meta: MetaStorage
|
|
20
|
+
protected meta: MetaStorage;
|
|
21
21
|
private client;
|
|
22
22
|
private readonly containerClient;
|
|
23
23
|
private readonly root;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as AzureFile } from '../../packem_shared/AzureFile-
|
|
1
|
+
export { default as AzureFile } from '../../packem_shared/AzureFile-C0kug4w4.js';
|
|
2
2
|
export { default as AzureSMetaStorage } from '../../packem_shared/AzureSMetaStorage-BEbXX9Uk.js';
|
|
3
|
-
export { default as AzureStorage } from '../../packem_shared/AzureStorage-
|
|
3
|
+
export { default as AzureStorage } from '../../packem_shared/AzureStorage-98-LRZ1e.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BlobServiceClient } from "@azure/storage-blob";
|
|
2
2
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
3
3
|
import type { BaseStorageOptions, MetaStorageOptions } from "../types.d.ts";
|
|
4
|
-
import type AzureFile from "./azure-file.d.ts";
|
|
5
4
|
interface ClientConfig {
|
|
6
5
|
/**
|
|
7
6
|
* Azure account key.
|
|
@@ -38,7 +37,7 @@ interface ClientConfig {
|
|
|
38
37
|
export interface AzureMetaStorageOptions extends ClientConfig, MetaStorageOptions {
|
|
39
38
|
client?: BlobServiceClient;
|
|
40
39
|
}
|
|
41
|
-
export interface AzureStorageOptions extends BaseStorageOptions
|
|
40
|
+
export interface AzureStorageOptions extends BaseStorageOptions, ClientConfig {
|
|
42
41
|
/**
|
|
43
42
|
* Configure metafiles storage
|
|
44
43
|
* @example
|
|
@@ -27,10 +27,10 @@ import type { ClientError, GCStorageOptions } from "./types.d.ts";
|
|
|
27
27
|
* - ❌ getUrl: Not implemented (GCS public URLs not supported)
|
|
28
28
|
* - ❌ getUploadUrl: Not implemented (resumable upload URLs handled internally)
|
|
29
29
|
*/
|
|
30
|
-
declare class GCStorage extends BaseStorage
|
|
30
|
+
declare class GCStorage extends BaseStorage {
|
|
31
31
|
static readonly name: string;
|
|
32
32
|
checksumTypes: string[];
|
|
33
|
-
protected meta: MetaStorage
|
|
33
|
+
protected meta: MetaStorage;
|
|
34
34
|
private readonly bucket;
|
|
35
35
|
private authClient;
|
|
36
36
|
private readonly storageBaseURI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as GCSConfig } from '../../packem_shared/GCSConfig-vPP22kN6.js';
|
|
2
|
-
export { default as GCSFile } from '../../packem_shared/GCSFile-
|
|
3
|
-
export { G as GCSMetaStorage } from '../../packem_shared/gcs-meta-storage-
|
|
4
|
-
export { default as GCStorage } from '../../packem_shared/GCStorage-
|
|
2
|
+
export { default as GCSFile } from '../../packem_shared/GCSFile-DaDiCKE2.js';
|
|
3
|
+
export { G as GCSMetaStorage } from '../../packem_shared/gcs-meta-storage-zzzem93r.js';
|
|
4
|
+
export { default as GCStorage } from '../../packem_shared/GCStorage-Cpp5KSGP.js';
|
|
@@ -2,7 +2,6 @@ import type { RetryConfig } from "gaxios";
|
|
|
2
2
|
import type { GoogleAuth, GoogleAuthOptions } from "google-auth-library";
|
|
3
3
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
4
4
|
import type { BaseStorageOptions, MetaStorageOptions } from "../types.d.ts";
|
|
5
|
-
import type GCSFile from "./gcs-file.d.ts";
|
|
6
5
|
interface StorageSettings {
|
|
7
6
|
projectId: string;
|
|
8
7
|
retryOptions?: RetryConfig;
|
|
@@ -16,7 +15,7 @@ export interface ClientError extends Error {
|
|
|
16
15
|
config: Record<string, unknown>;
|
|
17
16
|
response?: Record<string, unknown>;
|
|
18
17
|
}
|
|
19
|
-
export interface GCStorageOptions extends BaseStorageOptions
|
|
18
|
+
export interface GCStorageOptions extends BaseStorageOptions, Omit<GoogleAuthOptions, "authClient" | "projectId">, StorageSettings {
|
|
20
19
|
/**
|
|
21
20
|
* Google Cloud Storage bucket
|
|
22
21
|
*/
|
|
@@ -25,7 +25,7 @@ import type { FileReturn } from "../utils/file/types.d.ts";
|
|
|
25
25
|
* - Metadata files use the `.META` suffix by default
|
|
26
26
|
* - File paths are resolved relative to the storage directory
|
|
27
27
|
*/
|
|
28
|
-
declare class DiskStorage<TFile extends File = File> extends BaseStorage<TFile
|
|
28
|
+
declare class DiskStorage<TFile extends File = File> extends BaseStorage<TFile> {
|
|
29
29
|
static readonly name: string;
|
|
30
30
|
checksumTypes: string[];
|
|
31
31
|
directory: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DiskStorage } from '../../packem_shared/disk-storage-
|
|
2
|
-
export { default as DiskStorageWithChecksum } from '../../packem_shared/DiskStorageWithChecksum-
|
|
3
|
-
export { L as LocalMetaStorage } from '../../packem_shared/local-meta-storage-
|
|
1
|
+
export { D as DiskStorage } from '../../packem_shared/disk-storage-D9RfoKjW.js';
|
|
2
|
+
export { default as DiskStorageWithChecksum } from '../../packem_shared/DiskStorageWithChecksum-BVaaZiyS.js';
|
|
3
|
+
export { L as LocalMetaStorage } from '../../packem_shared/local-meta-storage-D-pPc3FI.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import MetaStorage from "../meta-storage.d.ts";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LocalMetaStorageOptions } from "../meta-storage-options.d.ts";
|
|
3
3
|
import type { File } from "../utils/index.d.ts";
|
|
4
|
+
export type { LocalMetaStorageOptions } from "../meta-storage-options.d.ts";
|
|
4
5
|
/**
|
|
5
6
|
* Stores upload metafiles on local disk
|
|
6
7
|
*/
|
|
@@ -23,10 +24,4 @@ declare class LocalMetaStorage<T extends File = File> extends MetaStorage<T> {
|
|
|
23
24
|
delete(id: string): Promise<void>;
|
|
24
25
|
private accessCheck;
|
|
25
26
|
}
|
|
26
|
-
export interface LocalMetaStorageOptions extends MetaStorageOptions {
|
|
27
|
-
/**
|
|
28
|
-
* Where the upload metadata should be stored
|
|
29
|
-
*/
|
|
30
|
-
directory?: string;
|
|
31
|
-
}
|
|
32
27
|
export default LocalMetaStorage;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as NetlifyBlobFile } from '../../packem_shared/NetlifyBlobFile-
|
|
2
|
-
export { default as NetlifyBlobMetaStorage } from '../../packem_shared/NetlifyBlobMetaStorage-
|
|
3
|
-
export { default as NetlifyBlobStorage } from '../../packem_shared/NetlifyBlobStorage-
|
|
1
|
+
export { default as NetlifyBlobFile } from '../../packem_shared/NetlifyBlobFile-CfyJtGWN.js';
|
|
2
|
+
export { default as NetlifyBlobMetaStorage } from '../../packem_shared/NetlifyBlobMetaStorage-eJT6RFy9.js';
|
|
3
|
+
export { default as NetlifyBlobStorage } from '../../packem_shared/NetlifyBlobStorage-nPv7iIAG.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
2
2
|
import LocalMetaStorage from "../local/local-meta-storage.d.ts";
|
|
3
|
-
|
|
4
|
-
declare class NetlifyBlobMetaStorage extends LocalMetaStorage<NetlifyBlobFile> {
|
|
3
|
+
declare class NetlifyBlobMetaStorage extends LocalMetaStorage {
|
|
5
4
|
constructor(config?: LocalMetaStorageOptions);
|
|
6
5
|
}
|
|
7
6
|
export default NetlifyBlobMetaStorage;
|
|
@@ -22,10 +22,10 @@ import type { NetlifyBlobStorageOptions } from "./types.d.ts";
|
|
|
22
22
|
* - ❌ getUrl: Not implemented (Netlify Blob URLs available via Netlify Blob API)
|
|
23
23
|
* - ❌ getUploadUrl: Not implemented (Netlify Blob upload URLs handled internally)
|
|
24
24
|
*/
|
|
25
|
-
declare class NetlifyBlobStorage extends BaseStorage
|
|
25
|
+
declare class NetlifyBlobStorage extends BaseStorage {
|
|
26
26
|
static readonly name: string;
|
|
27
27
|
checksumTypes: string[];
|
|
28
|
-
protected meta: MetaStorage
|
|
28
|
+
protected meta: MetaStorage;
|
|
29
29
|
private readonly storeName;
|
|
30
30
|
private readonly siteID?;
|
|
31
31
|
private readonly token?;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
2
2
|
import type { BaseStorageOptions } from "../types.d.ts";
|
|
3
|
-
|
|
4
|
-
export interface NetlifyBlobStorageOptions extends BaseStorageOptions<NetlifyBlobFile> {
|
|
3
|
+
export interface NetlifyBlobStorageOptions extends BaseStorageOptions {
|
|
5
4
|
/**
|
|
6
5
|
* Configure metafiles storage
|
|
7
6
|
* @example
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -2,14 +2,10 @@ import type { Readable } from "node:stream";
|
|
|
2
2
|
import type { Cache } from "../utils/cache.d.ts";
|
|
3
3
|
import type { RetryConfig } from "../utils/retry.d.ts";
|
|
4
4
|
import type { HttpError, HttpErrorBody, Metrics, Validation } from "../utils/types.d.ts";
|
|
5
|
-
import type { LocalMetaStorageOptions } from "./local/local-meta-storage.d.ts";
|
|
6
5
|
import type MetaStorage from "./meta-storage.d.ts";
|
|
6
|
+
import type { LocalMetaStorageOptions } from "./meta-storage-options.d.ts";
|
|
7
7
|
import type { File, FileInit, FilePart, FileQuery, FileReturn, UploadFile } from "./utils/index.d.ts";
|
|
8
|
-
export
|
|
9
|
-
logger?: Console;
|
|
10
|
-
prefix?: string;
|
|
11
|
-
suffix?: string;
|
|
12
|
-
}
|
|
8
|
+
export type { MetaStorageOptions } from "./meta-storage-options.d.ts";
|
|
13
9
|
export type OnCreate<TFile extends File = File> = (file: TFile) => Promise<void> | void;
|
|
14
10
|
export type OnUpdate<TFile extends File = File> = (file: TFile) => Promise<void> | void;
|
|
15
11
|
export type OnComplete<TFile extends File = File, TResponse = unknown, TRequest = unknown> = (file: TFile, response: TResponse, request?: TRequest) => Promise<void> | void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as VercelBlobFile } from '../../packem_shared/VercelBlobFile-
|
|
2
|
-
export { default as VercelBlobMetaStorage } from '../../packem_shared/VercelBlobMetaStorage-
|
|
3
|
-
export { default as VercelBlobStorage } from '../../packem_shared/VercelBlobStorage-
|
|
1
|
+
export { default as VercelBlobFile } from '../../packem_shared/VercelBlobFile-DkFIIb9Q.js';
|
|
2
|
+
export { default as VercelBlobMetaStorage } from '../../packem_shared/VercelBlobMetaStorage-DjFmi4vp.js';
|
|
3
|
+
export { default as VercelBlobStorage } from '../../packem_shared/VercelBlobStorage-CmMgiDgr.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
2
2
|
import type { BaseStorageOptions } from "../types.d.ts";
|
|
3
|
-
|
|
4
|
-
export interface VercelBlobStorageOptions extends BaseStorageOptions<VercelBlobFile> {
|
|
3
|
+
export interface VercelBlobStorageOptions extends BaseStorageOptions {
|
|
5
4
|
/**
|
|
6
5
|
* Configure metafiles storage
|
|
7
6
|
* @example
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LocalMetaStorageOptions } from "../local/local-meta-storage.d.ts";
|
|
2
2
|
import LocalMetaStorage from "../local/local-meta-storage.d.ts";
|
|
3
|
-
|
|
4
|
-
declare class VercelBlobMetaStorage extends LocalMetaStorage<VercelBlobFile> {
|
|
3
|
+
declare class VercelBlobMetaStorage extends LocalMetaStorage {
|
|
5
4
|
constructor(config?: LocalMetaStorageOptions);
|
|
6
5
|
}
|
|
7
6
|
export default VercelBlobMetaStorage;
|
|
@@ -23,10 +23,10 @@ import VercelBlobFile from "./vercel-blob-file.d.ts";
|
|
|
23
23
|
* - ❌ getUrl: Not implemented (Vercel Blob URLs available via Vercel Blob API)
|
|
24
24
|
* - ❌ getUploadUrl: Not implemented (Vercel Blob upload URLs handled internally)
|
|
25
25
|
*/
|
|
26
|
-
declare class VercelBlobStorage extends BaseStorage
|
|
26
|
+
declare class VercelBlobStorage extends BaseStorage {
|
|
27
27
|
static readonly name: string;
|
|
28
28
|
checksumTypes: string[];
|
|
29
|
-
protected meta: MetaStorage
|
|
29
|
+
protected meta: MetaStorage;
|
|
30
30
|
private readonly token;
|
|
31
31
|
private readonly multipart;
|
|
32
32
|
constructor(config: VercelBlobStorageOptions);
|
|
@@ -2,7 +2,7 @@ import { Readable } from "node:stream";
|
|
|
2
2
|
import type { BaseStorage } from "../storage/storage.d.ts";
|
|
3
3
|
import type { File, FileReturn } from "../storage/utils/index.d.ts";
|
|
4
4
|
import type { Cache } from "../utils/cache.d.ts";
|
|
5
|
-
import type { BaseTransformerConfig } from "./
|
|
5
|
+
import type { BaseTransformerConfig } from "./transformer-config.d.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Abstract base class for all media transformers.
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as BaseTransformer } from '../packem_shared/BaseTransformer-9965D4pb.js';
|
|
2
|
-
export { default as MediaTransformer } from '../packem_shared/MediaTransformer-
|
|
2
|
+
export { default as MediaTransformer } from '../packem_shared/MediaTransformer-BRRqYA0E.js';
|
|
3
3
|
export { getFormatFromContentType, isKnownContentType, isValidMediaType, validateMediaFile } from '../packem_shared/isValidMediaType-BeDgiObq.js';
|
|
4
4
|
export { default as ValidationError } from '../packem_shared/ValidationError-BfF1aE4h.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Cache } from "../utils/cache.d.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Base transformer configuration with common properties
|
|
4
|
+
*/
|
|
5
|
+
export interface BaseTransformerConfig {
|
|
6
|
+
/** Cache instance to use for caching */
|
|
7
|
+
cache?: Cache;
|
|
8
|
+
/** Cache TTL in seconds */
|
|
9
|
+
cacheTtl?: number;
|
|
10
|
+
/** Logger instance */
|
|
11
|
+
logger?: Console;
|
|
12
|
+
/** Maximum number of cached items */
|
|
13
|
+
maxCacheSize?: number;
|
|
14
|
+
/** Supported input formats */
|
|
15
|
+
supportedFormats?: string[] | undefined;
|
|
16
|
+
}
|
|
@@ -2,6 +2,8 @@ import type { BaseStorage } from "../storage/storage.d.ts";
|
|
|
2
2
|
import type { File, FileReturn } from "../storage/utils/index.d.ts";
|
|
3
3
|
import type { Cache } from "../utils/cache.d.ts";
|
|
4
4
|
import type BaseTransformer from "./base-transformer.d.ts";
|
|
5
|
+
import type { BaseTransformerConfig } from "./transformer-config.d.ts";
|
|
6
|
+
export type { BaseTransformerConfig } from "./transformer-config.d.ts";
|
|
5
7
|
/**
|
|
6
8
|
* Supported image formats for transformation
|
|
7
9
|
*/
|
|
@@ -606,21 +608,6 @@ export interface MediaTransformQuery {
|
|
|
606
608
|
/** Whether to avoid reducing larger images */
|
|
607
609
|
withoutReduction?: boolean;
|
|
608
610
|
}
|
|
609
|
-
/**
|
|
610
|
-
* Base transformer configuration with common properties
|
|
611
|
-
*/
|
|
612
|
-
export interface BaseTransformerConfig {
|
|
613
|
-
/** Cache instance to use for caching */
|
|
614
|
-
cache?: Cache;
|
|
615
|
-
/** Cache TTL in seconds */
|
|
616
|
-
cacheTtl?: number;
|
|
617
|
-
/** Logger instance */
|
|
618
|
-
logger?: Console;
|
|
619
|
-
/** Maximum number of cached items */
|
|
620
|
-
maxCacheSize?: number;
|
|
621
|
-
/** Supported input formats */
|
|
622
|
-
supportedFormats?: string[] | undefined;
|
|
623
|
-
}
|
|
624
611
|
/**
|
|
625
612
|
* Image transformer configuration
|
|
626
613
|
*/
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export interface UploadResponse<T = ResponseBody> extends Record<string, unknown
|
|
|
70
70
|
*/
|
|
71
71
|
export interface ValidatorConfig<T> {
|
|
72
72
|
isValid?: (t: T) => Promise<boolean> | boolean;
|
|
73
|
-
response?: HttpError
|
|
73
|
+
response?: HttpError | ResponseTuple;
|
|
74
74
|
value?: unknown;
|
|
75
75
|
}
|
|
76
76
|
/** Map of rule-name -> validator configuration. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/storage",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.13",
|
|
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",
|
|
@@ -188,11 +188,11 @@
|
|
|
188
188
|
"dependencies": {
|
|
189
189
|
"@remix-run/multipart-parser": "0.15.0",
|
|
190
190
|
"@sindresorhus/fnv1a": "3.1.0",
|
|
191
|
-
"@visulima/pagination": "5.0.0-alpha.
|
|
192
|
-
"file-type": "22.0.
|
|
193
|
-
"lru-cache": "11.3.
|
|
191
|
+
"@visulima/pagination": "5.0.0-alpha.10",
|
|
192
|
+
"file-type": "22.0.1",
|
|
193
|
+
"lru-cache": "11.3.5",
|
|
194
194
|
"mime": "^4.1.0",
|
|
195
|
-
"nanoid": "5.1.
|
|
195
|
+
"nanoid": "5.1.9",
|
|
196
196
|
"path-to-regexp": "8.4.2",
|
|
197
197
|
"type-is": "^2.0.1"
|
|
198
198
|
},
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
"engines": {
|
|
280
|
-
"node": "
|
|
280
|
+
"node": "^22.14.0 || >=24.10.0"
|
|
281
281
|
},
|
|
282
282
|
"publishConfig": {
|
|
283
283
|
"access": "public",
|