@verii/verifgen 1.0.0-pre.1756096826 → 1.0.0-pre.1756224043
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/package.json +13 -12
- package/test/proof.test.js +2 -18
- package/jest.config.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verii/verifgen",
|
|
3
|
-
"version": "1.0.0-pre.
|
|
3
|
+
"version": "1.0.0-pre.1756224043",
|
|
4
4
|
"description": "A tool for creating verifiable credentials and verifiable presentations.",
|
|
5
5
|
"repository": "https://github.com/LFDT-Verii/core",
|
|
6
6
|
"main": "index.js",
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
"verifgen": "index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"test": "
|
|
12
|
-
"lint": "eslint
|
|
11
|
+
"test": "cross-env NODE_ENV=test node --test --test-concurrency=1 --experimental-test-module-mocks --experimental-test-coverage **/*.test.js --passWithNoTests",
|
|
12
|
+
"lint": "eslint --ext .js .",
|
|
13
|
+
"lint:ci": "eslint . --format json >> eslint-results.json",
|
|
13
14
|
"lint:fix": "eslint --fix --ext .js ."
|
|
14
15
|
},
|
|
15
16
|
"author": "Itay Podhajcer",
|
|
@@ -25,17 +26,17 @@
|
|
|
25
26
|
"eslint-plugin-import": "2.32.0",
|
|
26
27
|
"eslint-plugin-prettier": "4.2.5",
|
|
27
28
|
"eslint-watch": "7.0.0",
|
|
28
|
-
"
|
|
29
|
+
"expect": "29.7.0",
|
|
29
30
|
"prettier": "2.8.8"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@verii/blockchain-functions": "1.0.0-pre.
|
|
33
|
-
"@verii/common-functions": "1.0.0-pre.
|
|
34
|
-
"@verii/crypto": "1.0.0-pre.
|
|
35
|
-
"@verii/did-doc": "1.0.0-pre.
|
|
36
|
-
"@verii/jwt": "1.0.0-pre.
|
|
37
|
-
"@verii/vc-checks": "1.0.0-pre.
|
|
38
|
-
"@verii/verii-verification": "1.0.0-pre.
|
|
33
|
+
"@verii/blockchain-functions": "1.0.0-pre.1756224043",
|
|
34
|
+
"@verii/common-functions": "1.0.0-pre.1756224043",
|
|
35
|
+
"@verii/crypto": "1.0.0-pre.1756224043",
|
|
36
|
+
"@verii/did-doc": "1.0.0-pre.1756224043",
|
|
37
|
+
"@verii/jwt": "1.0.0-pre.1756224043",
|
|
38
|
+
"@verii/vc-checks": "1.0.0-pre.1756224043",
|
|
39
|
+
"@verii/verii-verification": "1.0.0-pre.1756224043",
|
|
39
40
|
"bs58": "~6.0.0",
|
|
40
41
|
"chalk": "~4.1.2",
|
|
41
42
|
"commander": "~13.1.0",
|
|
@@ -43,5 +44,5 @@
|
|
|
43
44
|
"lodash": "^4.17.21",
|
|
44
45
|
"nanoid": "~3.3.4"
|
|
45
46
|
},
|
|
46
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "21747614a1db416654bba4c198d1c1b883dbe6a5"
|
|
47
48
|
}
|
package/test/proof.test.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const { beforeEach, describe, it } = require('node:test');
|
|
2
|
+
const { expect } = require('expect');
|
|
2
3
|
|
|
3
4
|
const fs = require('fs').promises;
|
|
4
5
|
|
|
5
|
-
jest.mock('../src/common.js', () => {
|
|
6
|
-
const originalModule = jest.requireActual('../src/common.js');
|
|
7
|
-
return {
|
|
8
|
-
...originalModule,
|
|
9
|
-
printInfo: mockPrintInfo,
|
|
10
|
-
};
|
|
11
|
-
});
|
|
12
|
-
|
|
13
6
|
const currentDir = process.cwd();
|
|
14
7
|
|
|
15
8
|
const createPersona = async (name, body) => {
|
|
@@ -43,7 +36,6 @@ describe('Test proof cli tool', () => {
|
|
|
43
36
|
|
|
44
37
|
beforeEach(async () => {
|
|
45
38
|
await deletePersona('persona1');
|
|
46
|
-
jest.resetAllMocks();
|
|
47
39
|
keyPair = await generateKeyPair();
|
|
48
40
|
await createPersona('persona1', keyPair.privateKey);
|
|
49
41
|
});
|
|
@@ -66,10 +58,6 @@ describe('Test proof cli tool', () => {
|
|
|
66
58
|
audience: 'http://test.com',
|
|
67
59
|
});
|
|
68
60
|
expect(proof).toBeDefined();
|
|
69
|
-
expect(mockPrintInfo).toHaveBeenCalled();
|
|
70
|
-
expect(mockPrintInfo).toHaveBeenLastCalledWith(
|
|
71
|
-
`\nGenerated proof jwt:\n${proof}\n`
|
|
72
|
-
);
|
|
73
61
|
const parsedJwt = await jwtVerify(
|
|
74
62
|
proof,
|
|
75
63
|
jwkFromSecp256k1Key(keyPair.publicKey, false)
|
|
@@ -106,10 +94,6 @@ describe('Test proof cli tool', () => {
|
|
|
106
94
|
audience: 'http://test.com',
|
|
107
95
|
});
|
|
108
96
|
expect(proof).toBeDefined();
|
|
109
|
-
expect(mockPrintInfo).toHaveBeenCalled();
|
|
110
|
-
expect(mockPrintInfo).toHaveBeenLastCalledWith(
|
|
111
|
-
`\nGenerated proof jwt:\n${proof}\n`
|
|
112
|
-
);
|
|
113
97
|
const parsedJwt = await jwtVerify(proof, persona2Keypair.publicKey);
|
|
114
98
|
const expectedKid = getDidUriFromJwk(persona2Keypair.publicKey);
|
|
115
99
|
expect(parsedJwt).toStrictEqual({
|
package/jest.config.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023 Velocity Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const jestConfig = require('../../jest.config.base');
|
|
18
|
-
const pack = require('./package.json');
|
|
19
|
-
|
|
20
|
-
module.exports = jestConfig(pack.name);
|