@dimah-s3/server 1.5.6 → 1.5.7
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/dist/adapters/types.d.ts +1 -1
- package/dist/api/context.d.ts +1 -1
- package/dist/api/router.d.ts +1 -1
- package/dist/api/routes/catalog.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/helpers/constraints.d.ts +1 -1
- package/dist/helpers/features.d.ts +1 -1
- package/dist/helpers/finalize-confirmed.d.ts +1 -1
- package/dist/helpers/hooks.d.ts +1 -1
- package/dist/helpers/logger.d.ts +1 -1
- package/dist/helpers/object-s3.d.ts +1 -1
- package/dist/helpers/resolve-route.d.ts +2 -2
- package/dist/helpers/resolve-target.d.ts +1 -1
- package/dist/plugin/apply-plugins.d.ts +1 -1
- package/dist/plugin/types.d.ts +1 -1
- package/dist/put.d.ts +1 -1
- package/dist/route.d.ts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/package.json +9 -9
package/dist/adapters/types.d.ts
CHANGED
package/dist/api/context.d.ts
CHANGED
package/dist/api/router.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Endpoint } from "better-call";
|
|
2
|
-
import type { ResolvedDimahS3Config } from "../types";
|
|
2
|
+
import type { ResolvedDimahS3Config } from "../types/index.d.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Internal better-call router with dimah-s3 context, OpenAPI off, and native
|
|
5
5
|
* APIError JSON. Not part of the public package surface.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RouteCatalogResponse } from "@dimah-s3/core";
|
|
2
|
-
import type { ResolvedDimahS3Config } from "../../types";
|
|
2
|
+
import type { ResolvedDimahS3Config } from "../../types/index.d.ts";
|
|
3
3
|
export declare function buildRouteCatalog(config: ResolvedDimahS3Config): RouteCatalogResponse;
|
|
4
4
|
export declare const catalog: import("better-call").StrictEndpoint<"/routes", {
|
|
5
5
|
use: import("better-call").MiddlewareHandler[];
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError, S3_ERROR_CODES, isAPIError, isS3ErrorCode } from "@dimah-s3/core";
|
|
2
|
-
import type { RouteOperation } from "./types/config";
|
|
2
|
+
import type { RouteOperation } from "./types/config.d.ts";
|
|
3
3
|
export { APIError, S3_ERROR_CODES, isAPIError, isS3ErrorCode };
|
|
4
4
|
/** English API errors with stable codes for client-side localization. */
|
|
5
5
|
export declare const errors: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UploadConfig } from "../types";
|
|
1
|
+
import type { UploadConfig } from "../types/index.d.ts";
|
|
2
2
|
/** File limits from `upload` (`fileTypes` / `maxFileSize`). */
|
|
3
3
|
export type FileConstraints = Pick<UploadConfig, "fileTypes" | "maxFileSize">;
|
|
4
4
|
/** Reject when `size` is over the route cap. No-op when `maxFileSize` is unset. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DimahS3Config, DimahS3RouteConfig, FeatureToggle, ResolvedFeature, ResolvedRoute } from "../types";
|
|
1
|
+
import type { DimahS3Config, DimahS3RouteConfig, FeatureToggle, ResolvedFeature, ResolvedRoute } from "../types/index.d.ts";
|
|
2
2
|
export declare function isEnabled<T extends {
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
}>(feature: T): feature is T & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConfirmedObjectResponse, S3ObjectAcl } from "@dimah-s3/core";
|
|
2
2
|
import type { HeadObjectCommandOutput, S3Client } from "@aws-sdk/client-s3";
|
|
3
|
-
import type { OpenedRoute, ResolvedDimahS3Config, StoredObjectContext } from "../types";
|
|
3
|
+
import type { OpenedRoute, ResolvedDimahS3Config, StoredObjectContext } from "../types/index.d.ts";
|
|
4
4
|
export type FinalizeConfirmedInput = {
|
|
5
5
|
config: ResolvedDimahS3Config;
|
|
6
6
|
route: OpenedRoute<"upload" | "multipart">;
|
package/dist/helpers/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedDimahS3Config, UploadConfig, UploadObjectContext, UploadObjectInfo } from "../types";
|
|
1
|
+
import type { ResolvedDimahS3Config, UploadConfig, UploadObjectContext, UploadObjectInfo } from "../types/index.d.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Run a guard hook. {@link isAPIError} values are preserved; plain Errors keep
|
|
4
4
|
* their English message without a library `code` so client
|
package/dist/helpers/logger.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DimahS3Logger } from "../types";
|
|
1
|
+
import type { DimahS3Logger } from "../types/index.d.ts";
|
|
2
2
|
export declare const defaultLogger: DimahS3Logger;
|
|
3
3
|
export declare function resolveLogger(logger: DimahS3Logger | false | undefined): DimahS3Logger;
|
|
4
4
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StorageClass } from "@aws-sdk/client-s3";
|
|
2
|
-
import type { ObjectS3Headers } from "../types";
|
|
2
|
+
import type { ObjectS3Headers } from "../types/index.d.ts";
|
|
3
3
|
/** URL-encoded `key=value&…` for the S3 `Tagging` / `x-amz-tagging` field. */
|
|
4
4
|
export declare function encodeObjectTagging(tagging: Record<string, string>): string;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ResolvedObject } from "./resolve-target";
|
|
2
|
-
import type { OpenedRoute, ResolvedDimahS3Config, ResolvedRoute, RouteOperation, StoredObjectContext } from "../types";
|
|
1
|
+
import { type ResolvedObject } from "./resolve-target.d.ts";
|
|
2
|
+
import type { OpenedRoute, ResolvedDimahS3Config, ResolvedRoute, RouteOperation, StoredObjectContext } from "../types/index.d.ts";
|
|
3
3
|
export type OpenedTarget<F extends RouteOperation> = {
|
|
4
4
|
route: OpenedRoute<F>;
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeObjectKey, type S3ObjectAcl } from "@dimah-s3/core";
|
|
2
|
-
import type { ObjectS3Headers, OpenedRoute, ResolvedRoute, UploadObjectContext } from "../types";
|
|
2
|
+
import type { ObjectS3Headers, OpenedRoute, ResolvedRoute, UploadObjectContext } from "../types/index.d.ts";
|
|
3
3
|
export type ResolvedObject = {
|
|
4
4
|
key: string;
|
|
5
5
|
bucket: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DimahS3Config } from "../types";
|
|
1
|
+
import type { DimahS3Config } from "../types/index.d.ts";
|
|
2
2
|
import { type AppliedPlugins, type DimahS3Plugin, type PluginContextMap } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Validate plugins, build context map, collect endpoints, validate routes,
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Endpoint } from "better-call";
|
|
2
|
-
import type { DeleteConfig, DownloadConfig, MultipartConfig, UploadConfig, DimahS3Config, ResolvedDimahS3Config } from "../types/config";
|
|
2
|
+
import type { DeleteConfig, DownloadConfig, MultipartConfig, UploadConfig, DimahS3Config, ResolvedDimahS3Config } from "../types/config.d.ts";
|
|
3
3
|
import type { FeatureHookKeyMap, MultipartHookKey } from "./hook-registry";
|
|
4
4
|
type HookFields<T, K extends keyof T> = Pick<T, K>;
|
|
5
5
|
/**
|
package/dist/put.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConfirmedObjectResponse, S3RouteName } from "@dimah-s3/core";
|
|
2
|
-
import type { ResolvedDimahS3Config } from "./types";
|
|
2
|
+
import type { ResolvedDimahS3Config } from "./types/index.d.ts";
|
|
3
3
|
export type PutObjectInput = {
|
|
4
4
|
route: S3RouteName;
|
|
5
5
|
fileName: string;
|
package/dist/route.d.ts
CHANGED
package/dist/types/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { S3Client } from "@aws-sdk/client-s3";
|
|
2
2
|
import type { S3ObjectAcl, UploadPresignMethod } from "@dimah-s3/core";
|
|
3
3
|
import type { DeleteGuardContext, DeleteOnDeletedContext, DownloadGuardContext, DownloadOnPresignedContext, DownloadResolveInfo, GuardContext, MultipartGuardContext, MultipartOnAbortContext, MultipartOnInitContext, MultipartOnListContext, RouteGuardContext, UploadConfirmGuardContext, UploadGuardContext, UploadObjectContext, UploadObjectInfo, UploadOnConfirmedContext, UploadOnPresignedContext } from "./hook-contexts";
|
|
4
|
-
import type { DimahS3Plugin } from "../plugin/types";
|
|
4
|
+
import type { DimahS3Plugin } from "../plugin/types.d.ts";
|
|
5
5
|
export type { UploadObjectContext, UploadObjectInfo, DownloadResolveInfo };
|
|
6
6
|
/** The three nested features on a named route. */
|
|
7
7
|
export declare const ROUTE_FEATURES: readonly ["upload", "download", "delete"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimah-s3/server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "Presigned S3 server — dimahS3() with HTTP handler and direct api for upload, download, delete, and multipart",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"s3",
|
|
@@ -84,23 +84,23 @@
|
|
|
84
84
|
"dist"
|
|
85
85
|
],
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@aws-sdk/s3-presigned-post": "^3.
|
|
88
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
89
|
-
"@dimah-s3/core": "1.5.
|
|
87
|
+
"@aws-sdk/s3-presigned-post": "^3.1131.0",
|
|
88
|
+
"@aws-sdk/s3-request-presigner": "^3.1131.0",
|
|
89
|
+
"@dimah-s3/core": "1.5.7",
|
|
90
90
|
"better-call": "1.4.0",
|
|
91
|
-
"zod": "^4.6.
|
|
91
|
+
"zod": "^4.6.4"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@aws-sdk/client-s3": ">=3"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@aws-sdk/client-s3": "^3.
|
|
97
|
+
"@aws-sdk/client-s3": "^3.1131.0",
|
|
98
98
|
"@types/node": "^26.5.1",
|
|
99
99
|
"@workspace/eslint-config": "0.0.1",
|
|
100
100
|
"@workspace/typescript-config": "0.0.1",
|
|
101
|
-
"@workspace/vitest-config": "0.0.
|
|
101
|
+
"@workspace/vitest-config": "0.0.7",
|
|
102
102
|
"eslint": "^10.10.0",
|
|
103
|
-
"tsc-alias": "^1.9.
|
|
103
|
+
"tsc-alias": "^1.9.5",
|
|
104
104
|
"tsup": "^8.5.1",
|
|
105
105
|
"typescript": "7.0.2",
|
|
106
106
|
"vitest": "^5.0.0"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
},
|
|
111
111
|
"scripts": {
|
|
112
112
|
"build": "tsup --config tsup.config.ts && tsc --emitDeclarationOnly -p tsconfig.build.json && tsc-alias",
|
|
113
|
-
"lint": "eslint",
|
|
113
|
+
"lint": "eslint --max-warnings 0",
|
|
114
114
|
"check-types": "tsc --noEmit",
|
|
115
115
|
"test": "vitest run"
|
|
116
116
|
}
|