@meistrari/data-token 0.0.1 → 0.0.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
@@ -26,10 +26,12 @@ import { Hono } from 'hono'
26
26
  import { DataTokenContext, createDataTokenMiddleware } from '@meistrari/data-token/hono'
27
27
 
28
28
  // Combine DataTokenContext with your own context type
29
- interface MyContext {
30
- customProp: string
29
+ type Env = {
30
+ Variables: {
31
+ customProp: string
32
+ }
31
33
  }
32
- type AppContext = MyContext & DataTokenContext
34
+ type AppContext = Env & DataTokenContext
33
35
 
34
36
  const app = new Hono<AppContext>()
35
37
  const dataToken = createDataTokenMiddleware('https://some.api.com/well-known/jwks.json')
@@ -1,10 +1,10 @@
1
1
  import type { Context } from 'hono';
2
2
  import type { DataToken } from '../types';
3
- export interface DataTokenContext {
3
+ export type DataTokenContext = {
4
4
  Variables: {
5
5
  authData?: DataToken;
6
6
  };
7
- }
7
+ };
8
8
  /**
9
9
  * Create a data token middleware for Hono
10
10
  * @param url - The URL of the JWKS endpoint
package/dist/types.d.ts CHANGED
@@ -40,7 +40,7 @@ export declare const DataToken: z.ZodObject<{
40
40
  } | undefined;
41
41
  }>;
42
42
  export type DataToken = z.infer<typeof DataToken>;
43
- export interface ValidatorConfig {
43
+ export type ValidatorConfig = {
44
44
  jwksUrl: string;
45
45
  algorithms?: string[];
46
- }
46
+ };
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/data-token",
3
3
  "type": "module",
4
- "version": "0.0.1",
5
- "packageManager": "pnpm@9.0.1",
4
+ "version": "0.0.3",
6
5
  "description": "Internal library to verify and decode the API Gateway data token",
7
6
  "author": "Roz <roz@meistrari.com>",
8
7
  "license": "UNLICENSED",
@@ -24,12 +23,8 @@
24
23
  "prepare": "husky",
25
24
  "lint": "eslint src",
26
25
  "lint:fix": "eslint src --fix",
27
- "check": "pnpm run lint && pnpm tsc --noEmit",
28
- "prepack": "pnpm run build"
29
- },
30
- "peerDependencies": {
31
- "elysia": "^1.1.9",
32
- "hono": "^4.5.9"
26
+ "check": "bun run lint && bun tsc --noEmit",
27
+ "prepack": "bun run build"
33
28
  },
34
29
  "dependencies": {
35
30
  "jose": "^5.8.0",
@@ -42,7 +37,6 @@
42
37
  "hono": "^4.5.9",
43
38
  "husky": "^9.1.5",
44
39
  "lint-staged": "^15.2.9",
45
- "pnpm": "^9.9.0",
46
40
  "typescript": "^5.5.4"
47
41
  },
48
42
  "lint-staged": {