@zodic/shared 0.0.7 → 0.0.9
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/bun.lockb +0 -0
- package/index.ts +1 -1
- package/middleware/index.ts +1 -1
- package/package.json +3 -1
- package/types/scopes/cloudflare.ts +2 -0
package/bun.lockb
CHANGED
|
Binary file
|
package/index.ts
CHANGED
package/middleware/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ export const jwtMiddleware = async (c: AuthCtx, next: () => Promise<void>) => {
|
|
|
30
30
|
console.log('Token verified successfully. Payload:', payload);
|
|
31
31
|
c.set('jwtPayload', payload);
|
|
32
32
|
|
|
33
|
-
await next();
|
|
33
|
+
await next();
|
|
34
34
|
} catch (err: any) {
|
|
35
35
|
console.error('Token verification failed:', err.message);
|
|
36
36
|
return c.json({ error: 'Unauthorized: Invalid or expired token' }, 401);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zodic/shared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"db:up": "drizzle-kit up"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
+
"@types/inversify": "^2.0.33",
|
|
16
17
|
"bun-types": "latest"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"drizzle-kit": "^0.30.0",
|
|
24
25
|
"drizzle-orm": "^0.38.0",
|
|
25
26
|
"hono": "^4.6.13",
|
|
27
|
+
"inversify": "^6.2.1",
|
|
26
28
|
"jose": "^5.9.6"
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
R2Bucket,
|
|
6
6
|
} from '@cloudflare/workers-types';
|
|
7
7
|
import { Context, Env } from 'hono';
|
|
8
|
+
import type { Container } from 'inversify';
|
|
8
9
|
|
|
9
10
|
export type CentralBindings = {
|
|
10
11
|
TEST_IMAGES_BUCKET: R2Bucket;
|
|
@@ -56,6 +57,7 @@ export type Variables = {
|
|
|
56
57
|
email?: string;
|
|
57
58
|
roles?: string[];
|
|
58
59
|
};
|
|
60
|
+
container: Container;
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
export type BackendBindings = Env &
|