two-stroke 4.1.3 → 4.1.5
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/package.json +18 -18
- package/src/index.ts +3 -3
package/package.json
CHANGED
|
@@ -9,32 +9,32 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anatine/zod-openapi": "^2.2.6",
|
|
12
|
-
"@asteasolutions/zod-to-openapi": "^7.
|
|
13
|
-
"@cloudflare/vitest-pool-workers": "^0.
|
|
14
|
-
"@cloudflare/workers-types": "^4.
|
|
15
|
-
"@sentry/cli": "^2.
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
17
|
-
"@typescript-eslint/parser": "^8.
|
|
12
|
+
"@asteasolutions/zod-to-openapi": "^7.3.0",
|
|
13
|
+
"@cloudflare/vitest-pool-workers": "^0.6.3",
|
|
14
|
+
"@cloudflare/workers-types": "^4.20250109.0",
|
|
15
|
+
"@sentry/cli": "^2.40.0",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
17
|
+
"@typescript-eslint/parser": "^8.20.0",
|
|
18
18
|
"@vitest/coverage-istanbul": "^2.1.8",
|
|
19
|
-
"eslint-config-prettier": "^
|
|
20
|
-
"eslint-config-two-stroke": "^1.1.
|
|
19
|
+
"eslint-config-prettier": "^10.0.1",
|
|
20
|
+
"eslint-config-two-stroke": "^1.1.8",
|
|
21
21
|
"eslint-config-typescript": "^3.0.0",
|
|
22
22
|
"jose": "^5.9.6",
|
|
23
23
|
"jwk-subtle": "^1.0.7",
|
|
24
|
-
"miniflare": "^3.
|
|
25
|
-
"openapi-fetch": "0.13.
|
|
26
|
-
"openapi-typescript": "^7.
|
|
24
|
+
"miniflare": "^3.20241230.2",
|
|
25
|
+
"openapi-fetch": "^0.13.4",
|
|
26
|
+
"openapi-typescript": "^7.5.2",
|
|
27
27
|
"openapi3-ts": "^4.4.0",
|
|
28
28
|
"pbkdf-subtle": "^1.0.0",
|
|
29
29
|
"toucan-js": "^4.0.0",
|
|
30
|
-
"zod": "^3.
|
|
30
|
+
"zod": "^3.24.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@sentry/cli": ">=2",
|
|
34
34
|
"eslint": ">=9",
|
|
35
35
|
"prettier": ">=3",
|
|
36
36
|
"typescript": ">=5",
|
|
37
|
-
"vitest": "
|
|
37
|
+
"vitest": "^2.1.8",
|
|
38
38
|
"wrangler": ">=3"
|
|
39
39
|
},
|
|
40
40
|
"description": "Simple Cloudflare Worker framework.",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"name": "two-stroke",
|
|
52
52
|
"packageManager": "yarn@4.3.0",
|
|
53
53
|
"type": "module",
|
|
54
|
-
"version": "4.1.
|
|
54
|
+
"version": "4.1.5",
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/eslint": "^9.6.1",
|
|
57
|
-
"@types/node": "^22.10.
|
|
58
|
-
"eslint": "^9.
|
|
59
|
-
"prettier": "^3.4.
|
|
60
|
-
"typescript": "^5.7.
|
|
57
|
+
"@types/node": "^22.10.7",
|
|
58
|
+
"eslint": "^9.18.0",
|
|
59
|
+
"prettier": "^3.4.2",
|
|
60
|
+
"typescript": "^5.7.3",
|
|
61
61
|
"vitest": "^2.1.8"
|
|
62
62
|
}
|
|
63
63
|
}
|
package/src/index.ts
CHANGED
|
@@ -274,9 +274,9 @@ export function twoStroke<T extends Env>(title: string, release: string) {
|
|
|
274
274
|
pbkdf:
|
|
275
275
|
(k: keyof T, customHeaderName: string = "Authorization") =>
|
|
276
276
|
async ({ req, env }: { req: Request; env: T }) => {
|
|
277
|
-
const [scheme, token] = (
|
|
278
|
-
" "
|
|
279
|
-
);
|
|
277
|
+
const [scheme, token] = (
|
|
278
|
+
req.headers.get(customHeaderName) ?? " "
|
|
279
|
+
).split(" ");
|
|
280
280
|
if (
|
|
281
281
|
(scheme === "token" || scheme === "Bearer") &&
|
|
282
282
|
(await pbkdfVerify(env[k] as string, token ?? ""))
|