@dimah-s3/server 0.7.1 → 0.7.3
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/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Presigned S3 handlers with HTTP `handler`, direct `api`, and an optional `plugins` array.
|
|
4
4
|
|
|
5
|
-
Full documentation: [dimah-s3.vercel.app](https://dimah-s3.vercel.app/docs/server)
|
|
5
|
+
Full documentation: [dimah-s3.vercel.app/docs/server](https://dimah-s3.vercel.app/docs/server) ·
|
|
6
|
+
[llms.txt](https://dimah-s3.vercel.app/llms.txt)
|
|
6
7
|
|
|
7
8
|
## Install
|
|
8
9
|
|
|
@@ -41,7 +42,7 @@ export const { GET, POST, DELETE } = toNextJsHandler(s3);
|
|
|
41
42
|
// Node http — @dimah-s3/server/node → toNodeHandler
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
See [
|
|
45
|
+
See [Server setup](https://dimah-s3.vercel.app/docs/server/setup) for full examples.
|
|
45
46
|
|
|
46
47
|
Server-side (no HTTP):
|
|
47
48
|
|
|
@@ -12,9 +12,9 @@ type ObjectContext = GuardContext & {
|
|
|
12
12
|
};
|
|
13
13
|
/** Context for `upload.presignGuard`. Client-declared values are not verified by S3. */
|
|
14
14
|
export type UploadPresignGuardContext = ObjectContext & {
|
|
15
|
-
/**
|
|
15
|
+
/** MIME type the client sent — not verified until `onConfirmed`. */
|
|
16
16
|
contentType?: string;
|
|
17
|
-
/**
|
|
17
|
+
/** Size the client sent — not verified until `onConfirmed`. */
|
|
18
18
|
fileSize?: number;
|
|
19
19
|
/** Custom object metadata. */
|
|
20
20
|
metadata?: Record<string, string>;
|
|
@@ -43,7 +43,7 @@ export type UploadOnConfirmedContext = GuardContext & {
|
|
|
43
43
|
bucket: string;
|
|
44
44
|
/** MIME type from HeadObject. */
|
|
45
45
|
contentType?: string;
|
|
46
|
-
/**
|
|
46
|
+
/** Size from HeadObject — trust this, not the presign `fileSize`. */
|
|
47
47
|
contentLength: number;
|
|
48
48
|
/** ETag from HeadObject. */
|
|
49
49
|
eTag?: string;
|
|
@@ -1 +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,
|
|
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,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE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,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,GAAG;IAChE,8BAA8B;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;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"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimah-s3/server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
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",
|
|
7
|
-
"server",
|
|
8
7
|
"presigned-url",
|
|
8
|
+
"file-upload",
|
|
9
|
+
"cloudflare-r2",
|
|
10
|
+
"aws-s3",
|
|
11
|
+
"minio",
|
|
12
|
+
"nextjs",
|
|
9
13
|
"upload",
|
|
10
14
|
"download",
|
|
11
15
|
"multipart",
|
|
12
|
-
"
|
|
16
|
+
"object-storage",
|
|
17
|
+
"typescript"
|
|
13
18
|
],
|
|
14
19
|
"author": "Hamidrezakz",
|
|
15
20
|
"license": "MIT",
|
|
@@ -18,7 +23,7 @@
|
|
|
18
23
|
"url": "https://github.com/dimah-kz/dimah-s3.git",
|
|
19
24
|
"directory": "packages/server"
|
|
20
25
|
},
|
|
21
|
-
"homepage": "https://
|
|
26
|
+
"homepage": "https://dimah-s3.vercel.app/docs/server",
|
|
22
27
|
"bugs": {
|
|
23
28
|
"url": "https://github.com/dimah-kz/dimah-s3/issues"
|
|
24
29
|
},
|
|
@@ -62,15 +67,15 @@
|
|
|
62
67
|
"dist"
|
|
63
68
|
],
|
|
64
69
|
"dependencies": {
|
|
65
|
-
"@aws-sdk/s3-presigned-post": "^3.
|
|
66
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
67
|
-
"@dimah-s3/core": "0.7.
|
|
70
|
+
"@aws-sdk/s3-presigned-post": "^3.1109.0",
|
|
71
|
+
"@aws-sdk/s3-request-presigner": "^3.1109.0",
|
|
72
|
+
"@dimah-s3/core": "0.7.3"
|
|
68
73
|
},
|
|
69
74
|
"peerDependencies": {
|
|
70
75
|
"@aws-sdk/client-s3": ">=3"
|
|
71
76
|
},
|
|
72
77
|
"devDependencies": {
|
|
73
|
-
"@aws-sdk/client-s3": "^3.
|
|
78
|
+
"@aws-sdk/client-s3": "^3.1109.0",
|
|
74
79
|
"@types/node": "^26.2.0",
|
|
75
80
|
"eslint": "^10.8.1",
|
|
76
81
|
"tsc-alias": "^1.9.1",
|