@dimah-s3/server 0.1.0
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/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/adapters/next.d.ts +18 -0
- package/dist/adapters/next.d.ts.map +1 -0
- package/dist/adapters/next.js +12 -0
- package/dist/adapters/next.js.map +1 -0
- package/dist/adapters/node.d.ts +16 -0
- package/dist/adapters/node.d.ts.map +1 -0
- package/dist/adapters/node.js +116 -0
- package/dist/adapters/node.js.map +1 -0
- package/dist/api.d.ts +5 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/dimah-s3.d.ts +36 -0
- package/dist/dimah-s3.d.ts.map +1 -0
- package/dist/errors.d.ts +34 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/handler.d.ts +5 -0
- package/dist/handler.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/is-aws-not-found.d.ts +3 -0
- package/dist/helpers/is-aws-not-found.d.ts.map +1 -0
- package/dist/helpers/is-aws-not-found.test.d.ts +2 -0
- package/dist/helpers/is-aws-not-found.test.d.ts.map +1 -0
- package/dist/helpers/resolve-object-acl.d.ts +10 -0
- package/dist/helpers/resolve-object-acl.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1047 -0
- package/dist/index.js.map +1 -0
- package/dist/internal-helpers.d.ts +23 -0
- package/dist/internal-helpers.d.ts.map +1 -0
- package/dist/internal-helpers.test.d.ts +2 -0
- package/dist/internal-helpers.test.d.ts.map +1 -0
- package/dist/plugin/apply-plugins.d.ts +11 -0
- package/dist/plugin/apply-plugins.d.ts.map +1 -0
- package/dist/plugin/apply-plugins.test.d.ts +2 -0
- package/dist/plugin/apply-plugins.test.d.ts.map +1 -0
- package/dist/plugin/chain-hooks.d.ts +18 -0
- package/dist/plugin/chain-hooks.d.ts.map +1 -0
- package/dist/plugin/create-endpoint.d.ts +20 -0
- package/dist/plugin/create-endpoint.d.ts.map +1 -0
- package/dist/plugin/define-plugin.d.ts +17 -0
- package/dist/plugin/define-plugin.d.ts.map +1 -0
- package/dist/plugin/hook-registry.d.ts +12 -0
- package/dist/plugin/hook-registry.d.ts.map +1 -0
- package/dist/plugin/index.d.ts +8 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/types.d.ts +101 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/procedures/confirm.d.ts +8 -0
- package/dist/procedures/confirm.d.ts.map +1 -0
- package/dist/procedures/delete.d.ts +8 -0
- package/dist/procedures/delete.d.ts.map +1 -0
- package/dist/procedures/download.d.ts +10 -0
- package/dist/procedures/download.d.ts.map +1 -0
- package/dist/procedures/multipart/abort.d.ts +13 -0
- package/dist/procedures/multipart/abort.d.ts.map +1 -0
- package/dist/procedures/multipart/complete.d.ts +12 -0
- package/dist/procedures/multipart/complete.d.ts.map +1 -0
- package/dist/procedures/multipart/init.d.ts +13 -0
- package/dist/procedures/multipart/init.d.ts.map +1 -0
- package/dist/procedures/multipart/list-parts.d.ts +9 -0
- package/dist/procedures/multipart/list-parts.d.ts.map +1 -0
- package/dist/procedures/multipart/part.d.ts +12 -0
- package/dist/procedures/multipart/part.d.ts.map +1 -0
- package/dist/procedures/registry.d.ts +78 -0
- package/dist/procedures/registry.d.ts.map +1 -0
- package/dist/procedures/upload.d.ts +14 -0
- package/dist/procedures/upload.d.ts.map +1 -0
- package/dist/types/config.d.ts +87 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/hook-contexts.d.ts +147 -0
- package/dist/types/hook-contexts.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MultipartPartResponse } from "@dimah-s3/core";
|
|
2
|
+
import type { DimahS3Config } from "../../types";
|
|
3
|
+
export type MultipartSignPartInput = {
|
|
4
|
+
key: string;
|
|
5
|
+
uploadId: string;
|
|
6
|
+
partNumber: number;
|
|
7
|
+
partSize?: number;
|
|
8
|
+
bucket?: string;
|
|
9
|
+
expiresIn?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function multipartSignPart(config: DimahS3Config, input: MultipartSignPartInput, request: Request): Promise<MultipartPartResponse>;
|
|
12
|
+
//# sourceMappingURL=part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../../../src/procedures/multipart/part.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,qBAAqB,CAAC,CAiDhC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { DimahS3Config } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for core procedures shared by the HTTP handler and
|
|
4
|
+
* direct `createServerApi`. Keys match {@link S3_API_ROUTES}.
|
|
5
|
+
*/
|
|
6
|
+
export type ProcedureEntry = {
|
|
7
|
+
/** Relative path under `basePath` (same as `S3_API_ROUTES` values). */
|
|
8
|
+
path: string;
|
|
9
|
+
method: "GET" | "POST" | "DELETE";
|
|
10
|
+
/** Optional HTTP status for successful JSON responses. */
|
|
11
|
+
status?: number;
|
|
12
|
+
/** Feature flag — disabled → 404 from both handler and `api`. */
|
|
13
|
+
isEnabled: (config: DimahS3Config) => boolean | undefined;
|
|
14
|
+
run: (config: DimahS3Config, input: unknown, request: Request) => Promise<unknown>;
|
|
15
|
+
};
|
|
16
|
+
export declare const PROCEDURE_REGISTRY: {
|
|
17
|
+
readonly upload: {
|
|
18
|
+
readonly path: "presign/upload";
|
|
19
|
+
readonly method: "POST";
|
|
20
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
21
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").UploadPresignResponse>;
|
|
22
|
+
};
|
|
23
|
+
readonly uploadConfirm: {
|
|
24
|
+
readonly path: "presign/upload/confirm";
|
|
25
|
+
readonly method: "POST";
|
|
26
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
27
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").UploadConfirmResponse>;
|
|
28
|
+
};
|
|
29
|
+
readonly download: {
|
|
30
|
+
readonly path: "presign/download";
|
|
31
|
+
readonly method: "GET";
|
|
32
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
33
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").PresignResponse>;
|
|
34
|
+
};
|
|
35
|
+
readonly delete: {
|
|
36
|
+
readonly path: "delete";
|
|
37
|
+
readonly method: "DELETE";
|
|
38
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
39
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").DeleteResponse>;
|
|
40
|
+
};
|
|
41
|
+
readonly multipartInit: {
|
|
42
|
+
readonly path: "presign/multipart/init";
|
|
43
|
+
readonly method: "POST";
|
|
44
|
+
readonly status: 201;
|
|
45
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
46
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").MultipartInitResponse>;
|
|
47
|
+
};
|
|
48
|
+
readonly multipartPart: {
|
|
49
|
+
readonly path: "presign/multipart/part";
|
|
50
|
+
readonly method: "POST";
|
|
51
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
52
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").MultipartPartResponse>;
|
|
53
|
+
};
|
|
54
|
+
readonly multipartComplete: {
|
|
55
|
+
readonly path: "presign/multipart/complete";
|
|
56
|
+
readonly method: "POST";
|
|
57
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
58
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").MultipartCompleteResponse>;
|
|
59
|
+
};
|
|
60
|
+
readonly multipartAbort: {
|
|
61
|
+
readonly path: "presign/multipart/abort";
|
|
62
|
+
readonly method: "POST";
|
|
63
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
64
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").MultipartAbortResponse & {
|
|
65
|
+
bucket: string;
|
|
66
|
+
key: string;
|
|
67
|
+
uploadId: string;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
70
|
+
readonly multipartListParts: {
|
|
71
|
+
readonly path: "presign/multipart/parts";
|
|
72
|
+
readonly method: "GET";
|
|
73
|
+
readonly isEnabled: (c: DimahS3Config) => boolean | undefined;
|
|
74
|
+
readonly run: (config: DimahS3Config, input: unknown, request: Request) => Promise<import("@dimah-s3/core").MultipartListPartsResponse>;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export type ProcedureKey = keyof typeof PROCEDURE_REGISTRY;
|
|
78
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAW9C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,GAAG,SAAS,CAAC;IAC1D,GAAG,EAAE,CACH,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yBAGnB,MAAM;;;;;;yBAON,MAAM;;;;;;yBAON,KAAK;;;;;;yBAOL,QAAQ;;;;;;yBAWR,MAAM;yBACN,GAAG;;;;;;yBAWH,MAAM;;;;;;yBAWN,MAAM;;;;;;yBAWN,MAAM;;;;;;;;;;yBAWN,KAAK;;;;CASsD,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UploadPresignResponse } from "@dimah-s3/core";
|
|
2
|
+
import type { DimahS3Config } from "../types";
|
|
3
|
+
export type UploadInput = {
|
|
4
|
+
key: string;
|
|
5
|
+
contentType?: string;
|
|
6
|
+
fileSize?: number;
|
|
7
|
+
metadata?: Record<string, string>;
|
|
8
|
+
bucket?: string;
|
|
9
|
+
expiresIn?: number;
|
|
10
|
+
acl?: "private" | "public-read";
|
|
11
|
+
fileName?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function upload(config: DimahS3Config, input: UploadInput, request: Request): Promise<UploadPresignResponse>;
|
|
14
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/procedures/upload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAQ5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,qBAAqB,CAAC,CAgIhC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { S3Client } from "@aws-sdk/client-s3";
|
|
2
|
+
import type { UploadPresignMethod } from "@dimah-s3/core";
|
|
3
|
+
import type { DeleteGuardContext, DeleteOnDeletedContext, DownloadOnPresignedContext, DownloadPresignGuardContext, GuardContext, MultipartAbortGuardContext, MultipartCompleteGuardContext, MultipartInitGuardContext, MultipartListGuardContext, MultipartOnAbortContext, MultipartOnCompleteContext, MultipartOnInitContext, MultipartOnListContext, MultipartPartGuardContext, UploadConfirmGuardContext, UploadOnConfirmedContext, UploadOnPresignedContext, UploadPresignGuardContext } from "./hook-contexts";
|
|
4
|
+
import type { DimahS3Plugin } from "../plugin/types";
|
|
5
|
+
/** Upload feature. Set `enabled: true` to activate. */
|
|
6
|
+
export type UploadConfig = {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
method?: UploadPresignMethod;
|
|
9
|
+
requireFileSize?: boolean;
|
|
10
|
+
presignGuard?: (context: UploadPresignGuardContext) => Promise<void> | void;
|
|
11
|
+
onPresigned?: (context: UploadOnPresignedContext) => Promise<void> | void;
|
|
12
|
+
confirmGuard?: (context: UploadConfirmGuardContext) => Promise<void> | void;
|
|
13
|
+
onConfirmed?: (context: UploadOnConfirmedContext) => Promise<void> | void;
|
|
14
|
+
};
|
|
15
|
+
/** Download feature. Set `enabled: true` to activate. */
|
|
16
|
+
export type DownloadConfig = {
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
presignGuard?: (context: DownloadPresignGuardContext) => Promise<void> | void;
|
|
19
|
+
onPresigned?: (context: DownloadOnPresignedContext) => Promise<void> | void;
|
|
20
|
+
};
|
|
21
|
+
/** Delete feature. Set `enabled: true` to activate. */
|
|
22
|
+
export type DeleteConfig = {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
guard?: (context: DeleteGuardContext) => Promise<void> | void;
|
|
25
|
+
onDeleted?: (context: DeleteOnDeletedContext) => Promise<void> | void;
|
|
26
|
+
};
|
|
27
|
+
/** Multipart feature. Off unless you need large files. */
|
|
28
|
+
export type MultipartConfig = {
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
requireFileSize?: boolean;
|
|
31
|
+
initGuard?: (context: MultipartInitGuardContext) => Promise<void> | void;
|
|
32
|
+
partGuard?: (context: MultipartPartGuardContext) => Promise<void> | void;
|
|
33
|
+
completeGuard?: (context: MultipartCompleteGuardContext) => Promise<void> | void;
|
|
34
|
+
abortGuard?: (context: MultipartAbortGuardContext) => Promise<void> | void;
|
|
35
|
+
listGuard?: (context: MultipartListGuardContext) => Promise<void> | void;
|
|
36
|
+
onInit?: (context: MultipartOnInitContext) => Promise<void> | void;
|
|
37
|
+
onComplete?: (context: MultipartOnCompleteContext) => Promise<void> | void;
|
|
38
|
+
onAbort?: (context: MultipartOnAbortContext) => Promise<void> | void;
|
|
39
|
+
onList?: (context: MultipartOnListContext) => Promise<void> | void;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Options for {@link dimahS3}.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* export const s3 = dimahS3({
|
|
47
|
+
* s3: s3Client,
|
|
48
|
+
* defaultBucket: "my-bucket",
|
|
49
|
+
* upload: { enabled: true },
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export type DimahS3Config = {
|
|
54
|
+
/** AWS SDK v3 S3Client. */
|
|
55
|
+
s3: S3Client;
|
|
56
|
+
/** Bucket when the request omits one. */
|
|
57
|
+
defaultBucket: string;
|
|
58
|
+
/**
|
|
59
|
+
* API path prefix for the HTTP `handler`.
|
|
60
|
+
* Must match `createS3Client({ basePath })` on the client.
|
|
61
|
+
* @default "/api/s3"
|
|
62
|
+
*/
|
|
63
|
+
basePath?: string;
|
|
64
|
+
/**
|
|
65
|
+
* When enabled, confirmation procedures call GetObjectAcl to infer whether
|
|
66
|
+
* the object is public-read or private.
|
|
67
|
+
*
|
|
68
|
+
* Keep disabled unless you need ACL inference in responses/hooks —
|
|
69
|
+
* it adds one extra S3 request per upload confirmation.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
resolveObjectAcl?: boolean;
|
|
74
|
+
/** Runs before every operation. Throw to reject. */
|
|
75
|
+
guard?: (context: GuardContext) => Promise<void> | void;
|
|
76
|
+
upload?: UploadConfig;
|
|
77
|
+
download?: DownloadConfig;
|
|
78
|
+
delete?: DeleteConfig;
|
|
79
|
+
multipart?: MultipartConfig;
|
|
80
|
+
/**
|
|
81
|
+
* Optional server plugins (e.g. `db()` from `@dimah-s3/db`).
|
|
82
|
+
* Plugin hooks merge ahead of user hooks; contexts land on `s3.context[id]`
|
|
83
|
+
* and are flattened onto the instance (`s3[id]`).
|
|
84
|
+
*/
|
|
85
|
+
plugins?: readonly DimahS3Plugin[];
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,uDAAuD;AACvD,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5E,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1E,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5E,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3E,CAAC;AAE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EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3E,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACrE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACpE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,2BAA2B;IAC3B,EAAE,EAAE,QAAQ,CAAC;IACb,yCAAyC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oDAAoD;IACpD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { MultipartCompletedPartRef, MultipartPartInfo, S3ObjectAcl } from "@dimah-s3/core";
|
|
2
|
+
/** Context for the global `guard` hook. */
|
|
3
|
+
export type GuardContext = {
|
|
4
|
+
/** The incoming HTTP request. */
|
|
5
|
+
request: Request;
|
|
6
|
+
};
|
|
7
|
+
type ObjectContext = GuardContext & {
|
|
8
|
+
/** S3 object key. */
|
|
9
|
+
key: string;
|
|
10
|
+
/** Target bucket. */
|
|
11
|
+
bucket: string;
|
|
12
|
+
};
|
|
13
|
+
/** Context for `upload.presignGuard`. Client-declared values are not verified by S3. */
|
|
14
|
+
export type UploadPresignGuardContext = ObjectContext & {
|
|
15
|
+
/** Declared MIME type. */
|
|
16
|
+
contentType?: string;
|
|
17
|
+
/** Declared size in bytes. */
|
|
18
|
+
fileSize?: number;
|
|
19
|
+
/** Custom object metadata. */
|
|
20
|
+
metadata?: Record<string, string>;
|
|
21
|
+
/** Requested ACL. */
|
|
22
|
+
acl?: S3ObjectAcl;
|
|
23
|
+
/** Original filename for `Content-Disposition`. */
|
|
24
|
+
fileName?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Context for `upload.onPresigned`. */
|
|
27
|
+
export type UploadOnPresignedContext = UploadPresignGuardContext & {
|
|
28
|
+
/** Presigned upload URL. */
|
|
29
|
+
url: string;
|
|
30
|
+
/** Validity in seconds. */
|
|
31
|
+
expiresIn: number;
|
|
32
|
+
};
|
|
33
|
+
/** Context for `upload.confirmGuard`. */
|
|
34
|
+
export type UploadConfirmGuardContext = ObjectContext;
|
|
35
|
+
/**
|
|
36
|
+
* Context for `upload.onConfirmed`.
|
|
37
|
+
* `contentLength` and `eTag` are verified by S3 via HeadObject.
|
|
38
|
+
*/
|
|
39
|
+
export type UploadOnConfirmedContext = GuardContext & {
|
|
40
|
+
/** S3 object key. */
|
|
41
|
+
key: string;
|
|
42
|
+
/** Target bucket. */
|
|
43
|
+
bucket: string;
|
|
44
|
+
/** MIME type from HeadObject. */
|
|
45
|
+
contentType?: string;
|
|
46
|
+
/** Verified size in bytes. */
|
|
47
|
+
contentLength: number;
|
|
48
|
+
/** ETag from HeadObject. */
|
|
49
|
+
eTag?: string;
|
|
50
|
+
/** Object metadata. */
|
|
51
|
+
metadata?: Record<string, string>;
|
|
52
|
+
/** Resolved ACL. Omitted when ACL lookup is disabled or unsupported. */
|
|
53
|
+
acl?: S3ObjectAcl;
|
|
54
|
+
/** Stored filename. */
|
|
55
|
+
fileName?: string;
|
|
56
|
+
/** S3 version ID. */
|
|
57
|
+
versionId?: string;
|
|
58
|
+
/** Last modified timestamp. */
|
|
59
|
+
lastModified?: string;
|
|
60
|
+
};
|
|
61
|
+
/** @deprecated Use {@link UploadOnConfirmedContext}. */
|
|
62
|
+
export type UploadOnUploadConfirmedContext = UploadOnConfirmedContext;
|
|
63
|
+
/** Context for `download.presignGuard`. */
|
|
64
|
+
export type DownloadPresignGuardContext = ObjectContext & {
|
|
65
|
+
/** Download filename for Content-Disposition. */
|
|
66
|
+
fileName?: string;
|
|
67
|
+
};
|
|
68
|
+
/** Context for `download.onPresigned`. */
|
|
69
|
+
export type DownloadOnPresignedContext = DownloadPresignGuardContext & {
|
|
70
|
+
/** Presigned GET URL. */
|
|
71
|
+
url: string;
|
|
72
|
+
/** Validity in seconds. */
|
|
73
|
+
expiresIn: number;
|
|
74
|
+
};
|
|
75
|
+
/** Context for `delete.guard`. */
|
|
76
|
+
export type DeleteGuardContext = ObjectContext;
|
|
77
|
+
/** Context for `delete.onDeleted`. */
|
|
78
|
+
export type DeleteOnDeletedContext = ObjectContext;
|
|
79
|
+
/** Shared base for multipart operations that already have an upload id. */
|
|
80
|
+
export type MultipartUploadContext = ObjectContext & {
|
|
81
|
+
/** Multipart upload ID. */
|
|
82
|
+
uploadId: string;
|
|
83
|
+
};
|
|
84
|
+
/** Context for `multipart.initGuard`. */
|
|
85
|
+
export type MultipartInitGuardContext = ObjectContext & {
|
|
86
|
+
/** Declared byte size of the file — available during init only. */
|
|
87
|
+
fileSize?: number;
|
|
88
|
+
};
|
|
89
|
+
/** @deprecated Use {@link MultipartInitGuardContext}. */
|
|
90
|
+
export type MultipartGuardContext = MultipartInitGuardContext;
|
|
91
|
+
/** Context for `multipart.partGuard`. */
|
|
92
|
+
export type MultipartPartGuardContext = MultipartUploadContext & {
|
|
93
|
+
/** 1-based part number. */
|
|
94
|
+
partNumber: number;
|
|
95
|
+
/** Byte size locked into the presigned URL signature. */
|
|
96
|
+
partSize?: number;
|
|
97
|
+
};
|
|
98
|
+
/** Context for `multipart.completeGuard`. */
|
|
99
|
+
export type MultipartCompleteGuardContext = MultipartUploadContext & {
|
|
100
|
+
/** Parts to assemble. */
|
|
101
|
+
parts: MultipartCompletedPartRef[];
|
|
102
|
+
};
|
|
103
|
+
/** Context for `multipart.abortGuard`. */
|
|
104
|
+
export type MultipartAbortGuardContext = MultipartUploadContext;
|
|
105
|
+
/** Context for `multipart.listGuard`. */
|
|
106
|
+
export type MultipartListGuardContext = MultipartUploadContext;
|
|
107
|
+
/** Context for `multipart.onInit`. */
|
|
108
|
+
export type MultipartOnInitContext = MultipartInitGuardContext & {
|
|
109
|
+
/** Multipart upload ID. */
|
|
110
|
+
uploadId: string;
|
|
111
|
+
/** Declared MIME type. */
|
|
112
|
+
contentType?: string;
|
|
113
|
+
/** Custom object metadata. */
|
|
114
|
+
metadata?: Record<string, string>;
|
|
115
|
+
/** Requested ACL. */
|
|
116
|
+
acl?: S3ObjectAcl;
|
|
117
|
+
/** Original filename for `Content-Disposition`. */
|
|
118
|
+
fileName?: string;
|
|
119
|
+
};
|
|
120
|
+
/** Context for `multipart.onComplete`. */
|
|
121
|
+
export type MultipartOnCompleteContext = MultipartUploadContext & {
|
|
122
|
+
/** Verified size in bytes. */
|
|
123
|
+
contentLength: number;
|
|
124
|
+
/** MIME type from HeadObject. */
|
|
125
|
+
contentType?: string;
|
|
126
|
+
/** ETag from HeadObject. */
|
|
127
|
+
eTag?: string;
|
|
128
|
+
/** Object metadata. */
|
|
129
|
+
metadata: Record<string, string>;
|
|
130
|
+
/** Resolved ACL. Omitted when ACL lookup is disabled or unsupported. */
|
|
131
|
+
acl?: S3ObjectAcl;
|
|
132
|
+
/** Stored filename. */
|
|
133
|
+
fileName?: string;
|
|
134
|
+
/** S3 version ID. */
|
|
135
|
+
versionId?: string;
|
|
136
|
+
/** Last modified timestamp. */
|
|
137
|
+
lastModified?: string;
|
|
138
|
+
};
|
|
139
|
+
/** Context for `multipart.onAbort`. */
|
|
140
|
+
export type MultipartOnAbortContext = MultipartUploadContext;
|
|
141
|
+
/** Context for `multipart.onList`. */
|
|
142
|
+
export type MultipartOnListContext = MultipartUploadContext & {
|
|
143
|
+
/** Parts already uploaded to S3. */
|
|
144
|
+
parts: MultipartPartInfo[];
|
|
145
|
+
};
|
|
146
|
+
export {};
|
|
147
|
+
//# sourceMappingURL=hook-contexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-contexts.d.ts","sourceRoot":"","sources":["../../src/types/hook-contexts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG;IACzB,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG,YAAY,GAAG;IAClC,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG;IACtD,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,qBAAqB;IACrB,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wCAAwC;AACxC,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG;IACjE,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,SAAS,E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IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,wEAAwE;IACxE,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,uCAAuC;AACvC,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,CAAC;AAE7D,sCAAsC;AACtC,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,GAAG;IAC5D,oCAAoC;IACpC,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { GuardContext, UploadPresignGuardContext, UploadOnPresignedContext, UploadConfirmGuardContext, UploadOnConfirmedContext, UploadOnUploadConfirmedContext, DownloadPresignGuardContext, DownloadOnPresignedContext, DeleteGuardContext, DeleteOnDeletedContext, MultipartUploadContext, MultipartInitGuardContext, MultipartGuardContext, MultipartPartGuardContext, MultipartCompleteGuardContext, MultipartAbortGuardContext, MultipartListGuardContext, MultipartOnInitContext, MultipartOnCompleteContext, MultipartOnAbortContext, MultipartOnListContext, } from "./hook-contexts";
|
|
2
|
+
export type { DimahS3Config, UploadConfig, DownloadConfig, DeleteConfig, MultipartConfig, } from "./config";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,EAC1B,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,MAAM,UAAU,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dimah-s3/server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Presigned S3 server — dimahS3() with HTTP handler and direct api for upload, download, delete, and multipart",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"s3",
|
|
7
|
+
"server",
|
|
8
|
+
"presigned-url",
|
|
9
|
+
"upload",
|
|
10
|
+
"download",
|
|
11
|
+
"multipart",
|
|
12
|
+
"framework-agnostic"
|
|
13
|
+
],
|
|
14
|
+
"author": "Hamidrezakz",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/dimah-kz/dimah-s3.git",
|
|
19
|
+
"directory": "packages/server"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/dimah-kz/dimah-s3/tree/main/packages/server",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/dimah-kz/dimah-s3/issues"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"type": "module",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./next": {
|
|
33
|
+
"types": "./dist/adapters/next.d.ts",
|
|
34
|
+
"default": "./dist/adapters/next.js"
|
|
35
|
+
},
|
|
36
|
+
"./node": {
|
|
37
|
+
"types": "./dist/adapters/node.d.ts",
|
|
38
|
+
"default": "./dist/adapters/node.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@aws-sdk/s3-presigned-post": "^3.1101.0",
|
|
46
|
+
"@aws-sdk/s3-request-presigner": "^3.1101.0",
|
|
47
|
+
"@dimah-s3/core": "0.1.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@aws-sdk/client-s3": ">=3"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@aws-sdk/client-s3": "^3.1101.0",
|
|
54
|
+
"@types/node": "^26.1.2",
|
|
55
|
+
"eslint": "^10.8.0",
|
|
56
|
+
"tsc-alias": "^1.9.1",
|
|
57
|
+
"tsup": "^8.5.1",
|
|
58
|
+
"typescript": "7.0.2",
|
|
59
|
+
"vitest": "^4.1.10",
|
|
60
|
+
"@workspace/typescript-config": "0.0.1",
|
|
61
|
+
"@workspace/eslint-config": "0.0.1"
|
|
62
|
+
},
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsup --config tsup.config.ts && tsc --emitDeclarationOnly && tsc-alias",
|
|
68
|
+
"lint": "eslint",
|
|
69
|
+
"check-types": "tsc --noEmit",
|
|
70
|
+
"test": "vitest run"
|
|
71
|
+
}
|
|
72
|
+
}
|