@lsby/ts-jwt 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 +3 -0
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/index.d.cts +3 -1
- package/dist/esm/index.d.ts +3 -1
- package/package.json +10 -6
package/README.md
ADDED
package/dist/cjs/index.cjs
CHANGED
|
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
JWT\u7BA1\u7406\u5668: () => JWT\u7BA1\u7406\u5668
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
var import_jsonwebtoken = __toESM(require("jsonwebtoken"), 1);
|
|
37
37
|
var JWT\u7BA1\u7406\u5668 = class {
|
|
38
38
|
constructor(secret, expiresIn) {
|
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/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lsby/ts-jwt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/lsby/ts-jwt.git"
|
|
7
|
+
},
|
|
4
8
|
"type": "module",
|
|
5
9
|
"exports": {
|
|
6
10
|
"require": "./dist/cjs/index.cjs",
|
|
@@ -24,13 +28,14 @@
|
|
|
24
28
|
},
|
|
25
29
|
"dependencies": {
|
|
26
30
|
"jsonwebtoken": "^9.0.2",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
31
|
+
"ms": "^2.1.3",
|
|
32
|
+
"vitest": "^2.0.2"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
|
32
|
-
"@lsby/eslint-config": "^0.0
|
|
36
|
+
"@lsby/eslint-config": "^0.1.0",
|
|
33
37
|
"@types/jsonwebtoken": "^9.0.6",
|
|
38
|
+
"@types/ms": "^2.1.0",
|
|
34
39
|
"@types/node": "^20.12.10",
|
|
35
40
|
"@vitest/coverage-v8": "^2.0.2",
|
|
36
41
|
"bumpp": "^9.4.1",
|
|
@@ -38,7 +43,6 @@
|
|
|
38
43
|
"prettier": "3.2.5",
|
|
39
44
|
"prettier-plugin-packagejson": "^2.5.0",
|
|
40
45
|
"tsup": "^8.0.2",
|
|
41
|
-
"tsx": "^4.9.3",
|
|
42
46
|
"typescript": "^5.4.5"
|
|
43
47
|
}
|
|
44
|
-
}
|
|
48
|
+
}
|