sigflint 1.0.0 → 1.0.2
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 +15 -0
- package/README.md +26 -8
- package/dist/bun.js +267 -142
- package/dist/node.js +281 -151
- package/index.d.ts +8 -2
- package/package.json +47 -38
- package/src/base.js +264 -60
- package/src/bun.js +11 -0
- package/src/chunks.js +66 -17
- package/src/ecdsa-node.js +16 -1
- package/src/events.js +44 -6
- package/src/node.js +30 -4
- package/src/presign.js +80 -13
- package/src/v4a.js +89 -19
- package/src/web.js +195 -30
- package/types/base.d.ts +82 -35
- package/types/chunks.d.ts +37 -11
- package/types/ecdsa-node.d.ts +7 -2
- package/types/events.d.ts +26 -6
- package/types/presign.d.ts +20 -10
- package/types/v4a.d.ts +42 -13
package/index.d.ts
CHANGED
|
@@ -26,13 +26,19 @@ export interface EventSigner {
|
|
|
26
26
|
* Node.js, Bun and Deno return the headers directly. Cloudflare Workers and browsers have only promise-based
|
|
27
27
|
* WebCrypto and return a promise. Always `await` the result and the same code runs everywhere.
|
|
28
28
|
*/
|
|
29
|
-
export function getAuthHeaders(
|
|
29
|
+
export function getAuthHeaders(
|
|
30
|
+
request: SignRequest,
|
|
31
|
+
credentials: Credentials,
|
|
32
|
+
): MaybePromise<AuthHeaders>;
|
|
30
33
|
|
|
31
34
|
/** A presigned URL: the original URL with the authentication parameters and the signature added. `request.expires` is the lifetime in seconds (default 3600). */
|
|
32
35
|
export function presign(request: SignRequest, credentials: Credentials): MaybePromise<string>;
|
|
33
36
|
|
|
34
37
|
/** SigV4a (multi-region) headers; `request.regionSet` is required, for example 'us-east-1,us-west-2' or '*'. */
|
|
35
|
-
export function getAuthHeadersV4a(
|
|
38
|
+
export function getAuthHeadersV4a(
|
|
39
|
+
request: SignRequestV4a,
|
|
40
|
+
credentials: Credentials,
|
|
41
|
+
): MaybePromise<AuthHeaders>;
|
|
36
42
|
|
|
37
43
|
/** A SigV4a presigned URL; `request.regionSet` is required. */
|
|
38
44
|
export function presignV4a(request: SignRequestV4a, credentials: Credentials): MaybePromise<string>;
|
package/package.json
CHANGED
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigflint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Fast, dependency-free AWS Signature Version 4 signing for every AWS service: headers, presigned URLs, SigV4a, chunked uploads and event streams. Node.js, Bun, Deno, Cloudflare Workers and browsers.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"authorization",
|
|
6
7
|
"aws",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"bun",
|
|
9
|
+
"cloudflare-workers",
|
|
10
|
+
"deno",
|
|
10
11
|
"presigned-url",
|
|
12
|
+
"s3",
|
|
11
13
|
"signature",
|
|
12
14
|
"signing",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"deno",
|
|
16
|
-
"cloudflare-workers"
|
|
15
|
+
"sigv4",
|
|
16
|
+
"sigv4a"
|
|
17
17
|
],
|
|
18
|
+
"homepage": "https://github.com/bompus/sigflint#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/bompus/sigflint/issues"
|
|
21
|
+
},
|
|
18
22
|
"license": "MIT",
|
|
19
23
|
"author": "bompus",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/bompus/sigflint.git"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"src",
|
|
30
|
+
"dist",
|
|
31
|
+
"types",
|
|
32
|
+
"index.d.ts",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"CHANGELOG.md"
|
|
36
|
+
],
|
|
20
37
|
"type": "module",
|
|
21
38
|
"sideEffects": false,
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=22.12.0"
|
|
24
|
-
},
|
|
25
39
|
"main": "./dist/node.js",
|
|
26
40
|
"types": "./index.d.ts",
|
|
27
41
|
"exports": {
|
|
@@ -40,44 +54,39 @@
|
|
|
40
54
|
},
|
|
41
55
|
"./package.json": "./package.json"
|
|
42
56
|
},
|
|
43
|
-
"files": [
|
|
44
|
-
"src",
|
|
45
|
-
"dist",
|
|
46
|
-
"types",
|
|
47
|
-
"index.d.ts",
|
|
48
|
-
"README.md",
|
|
49
|
-
"LICENSE",
|
|
50
|
-
"CHANGELOG.md"
|
|
51
|
-
],
|
|
52
57
|
"scripts": {
|
|
53
|
-
"build": "
|
|
58
|
+
"build": "bun build src/node.js --target=node --outfile=dist/node.js && bun build src/bun.js --target=bun --outfile=dist/bun.js",
|
|
54
59
|
"pretest": "npm run build",
|
|
55
60
|
"test": "node --test \"test/*.test.js\"",
|
|
56
61
|
"pretest:bun": "npm run build",
|
|
57
62
|
"test:bun": "bun test test/",
|
|
58
|
-
"types": "tsc &&
|
|
63
|
+
"types": "tsc -p tsconfig.build.json && bun --check --tsconfig-override tsconfig.json && bun --check --tsconfig-override test/types/tsconfig.json",
|
|
64
|
+
"pretypes:streams": "npm ci --prefix conformance/streams",
|
|
65
|
+
"types:streams": "bun --check --tsconfig-override conformance/streams/tsconfig.json",
|
|
66
|
+
"pretypes:bench": "npm ci --prefix bench",
|
|
67
|
+
"types:bench": "bun --check --tsconfig-override bench/tsconfig.json",
|
|
59
68
|
"conformance": "node conformance/build.mjs && node conformance/build-more.mjs",
|
|
60
|
-
"prepack": "tsc && npm run build",
|
|
61
|
-
"lint": "
|
|
62
|
-
"format": "
|
|
63
|
-
"check:style": "npm run lint &&
|
|
64
|
-
"check": "npm
|
|
69
|
+
"prepack": "tsc -p tsconfig.build.json && npm run build",
|
|
70
|
+
"lint": "tsc -p tsconfig.build.json && oxlint --deny-warnings",
|
|
71
|
+
"format": "bun fmt --no-script && ruff format . && git ls-files -z '*.sh' | xargs -0 shfmt -w",
|
|
72
|
+
"check:style": "bun fmt --no-script --check && npm run lint && npm run check:py && npm run check:sh",
|
|
73
|
+
"check": "npm run check:style && npm run types && npm run types:streams && npm run types:bench && npm test && npm run check:package",
|
|
65
74
|
"check:benchmarked": "node bench/check-benchmarked.mjs",
|
|
66
|
-
"check:
|
|
75
|
+
"check:py": "ruff format --check . && ruff check .",
|
|
76
|
+
"check:sh": "git ls-files -z '*.sh' | xargs -0 shellcheck && git ls-files -z '*.sh' | xargs -0 shfmt -d -i 2 -bn -ci",
|
|
77
|
+
"check:package": "tsc -p tsconfig.build.json && npm run build && publint && attw --pack . --profile esm-only"
|
|
67
78
|
},
|
|
68
79
|
"devDependencies": {
|
|
69
80
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
81
|
+
"@types/bun": "1.4.3",
|
|
70
82
|
"@types/node": "^26.6.5",
|
|
71
|
-
"
|
|
83
|
+
"oxfmt": "0.73.0",
|
|
84
|
+
"oxlint": "1.88.0",
|
|
85
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
72
86
|
"publint": "^0.3.25",
|
|
73
|
-
"typescript": "
|
|
74
|
-
},
|
|
75
|
-
"repository": {
|
|
76
|
-
"type": "git",
|
|
77
|
-
"url": "git+https://github.com/bompus/sigflint.git"
|
|
87
|
+
"typescript": "7.1.0-beta"
|
|
78
88
|
},
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
}
|
|
82
|
-
"homepage": "https://github.com/bompus/sigflint#readme"
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">=22.12.0"
|
|
91
|
+
}
|
|
83
92
|
}
|