Skip to content

Commit

Permalink
feat: add api and middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
cptchloroplast committed Sep 6, 2024
1 parent 55fe965 commit 49b79bd
Show file tree
Hide file tree
Showing 10 changed files with 256 additions and 33 deletions.
157 changes: 127 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@okkema/worker",
"version": "2.0.1",
"version": "2.1.0",
"description": "Cloudflare Workers Toolkit",
"files": [
"dist"
Expand All @@ -15,6 +15,9 @@
"crypto": [
"./dist/crypto/index.d.ts"
],
"middleware": [
"./dist/middleware/index.d.ts"
],
"utils": [
"./dist/utils/index.d.ts"
]
Expand All @@ -24,6 +27,7 @@
".": "./dist/core/index.js",
"./auth": "./dist/auth/index.js",
"./crypto": "./dist/crypto/index.js",
"./middleware": "./dist/middleware/index.js",
"./utils": "./dist/utils/index.js"
},
"scripts": {
Expand Down Expand Up @@ -76,6 +80,8 @@
},
"dependencies": {
"@cloudflare/workers-types": "^4.20240222.0",
"chanfana": "^2.0.4",
"hono": "^4.5.11",
"npm-run-all": "^4.1.5",
"rfc4648": "^1.5.2",
"typescript": "^5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions src/auth/jwt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const createJWT = () => ({
typ: "JWT",
},
payload: {
aud: ["audience"],
aud: ["https://audience/"],
exp: Date.now() / 1000 + 1000,
iss: "issuer",
sub: "subject",
},
signature: "",
signature: new Uint8Array(),
},
raw: {
header: "",
Expand Down
Loading

0 comments on commit 49b79bd

Please sign in to comment.