@lsby/ts-jwt 0.0.2 → 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/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +3 -1
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +1 -1
- package/package.json +48 -46
package/dist/cjs/index.cjs
CHANGED
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { StringValue } from 'ms';
|
|
2
|
+
|
|
1
3
|
declare class JWT管理器<JWT负载 extends string | object | Buffer> {
|
|
2
4
|
private secret;
|
|
3
5
|
private expiresIn;
|
|
4
|
-
constructor(secret: string, expiresIn:
|
|
6
|
+
constructor(secret: string, expiresIn: number | StringValue);
|
|
5
7
|
签名(负载: JWT负载): string;
|
|
6
8
|
解析(token: string | undefined): JWT负载 | undefined;
|
|
7
9
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { StringValue } from 'ms';
|
|
2
|
+
|
|
1
3
|
declare class JWT管理器<JWT负载 extends string | object | Buffer> {
|
|
2
4
|
private secret;
|
|
3
5
|
private expiresIn;
|
|
4
|
-
constructor(secret: string, expiresIn:
|
|
6
|
+
constructor(secret: string, expiresIn: number | StringValue);
|
|
5
7
|
签名(负载: JWT负载): string;
|
|
6
8
|
解析(token: string | undefined): JWT负载 | undefined;
|
|
7
9
|
}
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lsby/ts-jwt",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "https://github.com/lsby/ts-jwt.git"
|
|
7
|
-
},
|
|
8
|
-
"type": "module",
|
|
9
|
-
"exports": {
|
|
10
|
-
"require": "./dist/cjs/index.cjs",
|
|
11
|
-
"import": "./dist/esm/index.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build:all": "npm run build:cjs && npm run build:esm",
|
|
18
|
-
"build:cjs": "tsup src/**/*.ts --format cjs --clean --dts -d dist/cjs",
|
|
19
|
-
"build:esm": "tsup src/**/*.ts --format esm --clean --dts -d dist/esm",
|
|
20
|
-
"check:all": "npm run check:format && npm run check:lint && npm run check:type",
|
|
21
|
-
"check:format": "prettier --write .",
|
|
22
|
-
"check:lint": "eslint . --fix",
|
|
23
|
-
"check:type": "tsc --noEmit",
|
|
24
|
-
"check:type:watch": "tsc --noEmit -w",
|
|
25
|
-
"pub:public": "npm run check:all && npm run test:base && npm run build:all && bumpp && npm publish --access public",
|
|
26
|
-
"test:base": "npm run check:all && vitest run",
|
|
27
|
-
"test:coverage": "npm run check:all && vitest run --coverage && open-cli ./coverage/index.html"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"jsonwebtoken": "^9.0.2",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@types/
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@lsby/ts-jwt",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/lsby/ts-jwt.git"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"require": "./dist/cjs/index.cjs",
|
|
11
|
+
"import": "./dist/esm/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build:all": "npm run build:cjs && npm run build:esm",
|
|
18
|
+
"build:cjs": "tsup src/**/*.ts --format cjs --clean --dts -d dist/cjs",
|
|
19
|
+
"build:esm": "tsup src/**/*.ts --format esm --clean --dts -d dist/esm",
|
|
20
|
+
"check:all": "npm run check:format && npm run check:lint && npm run check:type",
|
|
21
|
+
"check:format": "prettier --write .",
|
|
22
|
+
"check:lint": "eslint . --fix",
|
|
23
|
+
"check:type": "tsc --noEmit",
|
|
24
|
+
"check:type:watch": "tsc --noEmit -w",
|
|
25
|
+
"pub:public": "npm run check:all && npm run test:base && npm run build:all && bumpp && npm publish --access public",
|
|
26
|
+
"test:base": "npm run check:all && vitest run",
|
|
27
|
+
"test:coverage": "npm run check:all && vitest run --coverage && open-cli ./coverage/index.html"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"jsonwebtoken": "^9.0.2",
|
|
31
|
+
"ms": "^2.1.3",
|
|
32
|
+
"vitest": "^2.0.2"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
|
36
|
+
"@lsby/eslint-config": "^0.1.0",
|
|
37
|
+
"@types/jsonwebtoken": "^9.0.6",
|
|
38
|
+
"@types/ms": "^2.1.0",
|
|
39
|
+
"@types/node": "^20.12.10",
|
|
40
|
+
"@vitest/coverage-v8": "^2.0.2",
|
|
41
|
+
"bumpp": "^9.4.1",
|
|
42
|
+
"open-cli": "^8.0.0",
|
|
43
|
+
"prettier": "3.2.5",
|
|
44
|
+
"prettier-plugin-packagejson": "^2.5.0",
|
|
45
|
+
"tsup": "^8.0.2",
|
|
46
|
+
"typescript": "^5.4.5"
|
|
47
|
+
}
|
|
48
|
+
}
|