@elysiajs/jwt 0.2.0 → 0.3.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -18,12 +18,13 @@ export interface JWTOption<Name extends string | undefined = 'jwt', Schema exten
18
18
  nbf?: string | number;
19
19
  exp?: string | number;
20
20
  }
21
- export declare const jwt: <Name extends string | undefined, Schema extends TSchema | undefined = undefined>({ name, secret, alg, crit, schema, nbf, exp, ...payload }: JWTOption<Name, Schema>) => (app: Elysia) => Elysia<{
22
- store: Record<any, any> & Record<typeof import("elysia").SCHEMA, {}> & Record<typeof import("elysia").DEFS, {}>;
21
+ export declare const jwt: <Name extends string = "jwt", Schema extends TSchema | undefined = undefined>({ name, secret, alg, crit, schema, nbf, exp, ...payload }: JWTOption<Name, Schema>) => (app: Elysia) => Elysia<{
22
+ store: Record<string, unknown>;
23
23
  request: { [key in Name extends string ? Name : "jwt"]: {
24
24
  sign: (morePayload: UnwrapSchema<Schema, Record<string, string>> & JWTPayloadSpec) => Promise<string>;
25
25
  verify: (jwt?: string) => Promise<false | (UnwrapSchema<Schema, Record<string, string>> & JWTPayloadSpec)>;
26
26
  }; };
27
27
  schema: {};
28
+ meta: Record<typeof import("elysia").SCHEMA, {}> & Record<typeof import("elysia").DEFS, {}> & Record<typeof import("elysia").EXPOSED, {}>;
28
29
  }>;
29
30
  export default jwt;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elysiajs/jwt",
3
3
  "description": "Plugin for Elysia for using JWT Authentication",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "author": {
6
6
  "name": "saltyAom",
7
7
  "url": "https://github.com/SaltyAom",
@@ -35,15 +35,15 @@
35
35
  "release": "npm run build && npm run test && npm publish --access public"
36
36
  },
37
37
  "dependencies": {
38
- "jose": "^4.11.1"
38
+ "jose": "^4.12.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@elysiajs/cookie": "^0.1.1",
42
- "@sinclair/typebox": "^0.25.21",
42
+ "@sinclair/typebox": "^0.25.24",
43
43
  "@types/node": "^18.11.7",
44
- "bun-types": "^0.5.0",
44
+ "bun-types": "^0.5.7",
45
45
  "eslint": "^8.26.0",
46
- "elysia": "^0.2.7",
46
+ "elysia": "^0.3.0-rc.1",
47
47
  "typescript": "^4.9.4"
48
48
  },
49
49
  "peerDependencies": {