@tsed/jwks 7.0.0-beta.2 → 7.0.0-beta.5
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/jest.config.js +14 -0
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/package.json +3 -0
- package/package.json +6 -4
- package/readme.md +5 -5
- package/tsconfig.compile.esm.json +1 -12
package/jest.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// For a detailed explanation regarding each configuration property, visit:
|
|
2
|
+
// https://jestjs.io/docs/en/configuration.html
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
...require("@tsed/jest-config")(__dirname, "jwk"),
|
|
6
|
+
coverageThreshold: {
|
|
7
|
+
global: {
|
|
8
|
+
statements: 100,
|
|
9
|
+
branches: 85.71,
|
|
10
|
+
functions: 100,
|
|
11
|
+
lines: 100
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
tslib_1.__exportStar(require("jose2"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./getJwks"), exports);
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,oDAA0B","sourcesContent":["export * from \"jose2\";\nexport * from \"./getJwks\";\n"]}
|
package/lib/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/jwks",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.5",
|
|
4
4
|
"description": "Utils to generate jwks pair keys",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
7
|
+
"module": "./lib/esm/index.js",
|
|
7
8
|
"typings": "./lib/types/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
"types": "./lib/types/index.d.ts",
|
|
@@ -15,12 +16,13 @@
|
|
|
15
16
|
"build": "yarn run build:esm && yarn run build:cjs",
|
|
16
17
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
17
18
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
19
|
+
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2",
|
|
18
20
|
"start": "ts-node -r tsconfig-paths/register test/app/index.ts"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"fs-extra": "^
|
|
23
|
+
"fs-extra": "^10.0.1",
|
|
22
24
|
"jose2": "npm:jose@^2.0.4",
|
|
23
|
-
"tslib": "2.
|
|
25
|
+
"tslib": "2.3.1"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {},
|
|
26
28
|
"peerDependencies": {},
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
"bugs": {
|
|
29
31
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
30
32
|
},
|
|
31
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
33
|
+
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/security/jwks",
|
|
32
34
|
"author": "Romain Lenzotti",
|
|
33
35
|
"license": "MIT"
|
|
34
36
|
}
|
package/readme.md
CHANGED
|
@@ -43,12 +43,12 @@ npm install --save @tsed/jwks
|
|
|
43
43
|
import {generateJwks} from "./getJwks";
|
|
44
44
|
|
|
45
45
|
// Generate only jwks
|
|
46
|
-
const jwks = generateJwks()
|
|
46
|
+
const jwks = generateJwks();
|
|
47
47
|
|
|
48
48
|
// Create keys.json file if not exists
|
|
49
49
|
const jwks = getJwks({
|
|
50
50
|
path: "path/to/keys.json"
|
|
51
|
-
})
|
|
51
|
+
});
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
Outputs:
|
|
@@ -81,16 +81,16 @@ const jwks = generateJwks({
|
|
|
81
81
|
{path: "path/keys/sig.rsa.pub.pem", alg: "RS256", use: "sig", kid: "key-0"},
|
|
82
82
|
{path: "path/keys/enc.rsa.pub.pem", alg: "RS256", use: "enc", kid: "key-1"}
|
|
83
83
|
]
|
|
84
|
-
})
|
|
84
|
+
});
|
|
85
85
|
|
|
86
86
|
// Create keys.json file if not exists
|
|
87
87
|
const jwks = getJwks({
|
|
88
88
|
path: "path/to/keys.json",
|
|
89
89
|
certificates: [
|
|
90
90
|
{path: "path/keys/sig.rsa.pub.pem", alg: "RS256", use: "sig", kid: "key-0"},
|
|
91
|
-
{path: "path/keys/enc.rsa.pub.pem", alg: "RS256", use: "enc", kid: "key-1"}
|
|
91
|
+
{path: "path/keys/enc.rsa.pub.pem", alg: "RS256", use: "enc", kid: "key-1"}
|
|
92
92
|
]
|
|
93
|
-
})
|
|
93
|
+
});
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
## Contributors
|
|
@@ -8,16 +8,5 @@
|
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"declarationDir": "./lib/types"
|
|
10
10
|
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"node_modules",
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
11
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
12
|
}
|