@learncard/cli 3.3.124 → 3.3.126
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/CHANGELOG.md +16 -0
- package/dist/index.js +9 -1
- package/package.json +3 -2
- package/project.json +2 -1
- package/src/index.tsx +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @learncard/cli
|
|
2
2
|
|
|
3
|
+
## 3.3.126
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#786](https://github.com/learningeconomy/LearnCard/pull/786) [`632f516a38aed4397f68abecc89cd7c6c6fa5fcf`](https://github.com/learningeconomy/LearnCard/commit/632f516a38aed4397f68abecc89cd7c6c6fa5fcf) Thanks [@Custard7](https://github.com/Custard7)! - [LC-1293] - feat: Add OpenBadgeV2 SDK Plugin
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`632f516a38aed4397f68abecc89cd7c6c6fa5fcf`](https://github.com/learningeconomy/LearnCard/commit/632f516a38aed4397f68abecc89cd7c6c6fa5fcf)]:
|
|
10
|
+
- @learncard/open-badge-v2-plugin@1.0.1
|
|
11
|
+
|
|
12
|
+
## 3.3.125
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies []:
|
|
17
|
+
- @learncard/init@2.0.41
|
|
18
|
+
|
|
3
19
|
## 3.3.124
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var repl = require('pretty-repl');
|
|
|
7
7
|
var core = require('@learncard/core');
|
|
8
8
|
var init = require('@learncard/init');
|
|
9
9
|
var simpleSigningPlugin = require('@learncard/simple-signing-plugin');
|
|
10
|
+
var openBadgeV2Plugin = require('@learncard/open-badge-v2-plugin');
|
|
10
11
|
var types = require('@learncard/types');
|
|
11
12
|
var gradient = require('gradient-string');
|
|
12
13
|
var figlet = require('figlet');
|
|
@@ -28,7 +29,7 @@ var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
|
|
28
29
|
const generateRandomSeed = () => crypto__default["default"].randomBytes(32).toString("hex");
|
|
29
30
|
|
|
30
31
|
var name = "@learncard/cli";
|
|
31
|
-
var version = "3.3.
|
|
32
|
+
var version = "3.3.126";
|
|
32
33
|
var description = "Test out learn card!";
|
|
33
34
|
var main = "dist/index.js";
|
|
34
35
|
var bin = "dist/index.js";
|
|
@@ -43,6 +44,7 @@ var dependencies = {
|
|
|
43
44
|
"@learncard/didkit-plugin": "workspace:^",
|
|
44
45
|
"@learncard/init": "workspace:^",
|
|
45
46
|
"@learncard/learn-cloud-plugin": "workspace:*",
|
|
47
|
+
"@learncard/open-badge-v2-plugin": "workspace:*",
|
|
46
48
|
"@learncard/simple-signing-plugin": "workspace:*",
|
|
47
49
|
"@learncard/types": "workspace:*",
|
|
48
50
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -124,6 +126,9 @@ commander.program.version(packageJson.version).argument("[seed]").action(async (
|
|
|
124
126
|
globalThis.learnCard = await _learnCard.addPlugin(
|
|
125
127
|
await simpleSigningPlugin.getSimpleSigningPlugin(_learnCard, "https://api.learncard.app/trpc")
|
|
126
128
|
);
|
|
129
|
+
globalThis.learnCard = await globalThis.learnCard.addPlugin(
|
|
130
|
+
openBadgeV2Plugin.openBadgeV2Plugin(globalThis.learnCard)
|
|
131
|
+
);
|
|
127
132
|
globalThis.types = types__default["default"];
|
|
128
133
|
globalThis.getTestCache = core.getTestCache;
|
|
129
134
|
globalThis.copy = copyFunction;
|
|
@@ -169,6 +174,9 @@ commander.program.version(packageJson.version).argument("[seed]").action(async (
|
|
|
169
174
|
console.log(
|
|
170
175
|
`\u2502 Verify a signed VP \u2502 await ${g.learnCard}.invoke.verifyPresentation(vp); \u2502`
|
|
171
176
|
);
|
|
177
|
+
console.log(
|
|
178
|
+
`\u2502 Wrap OpenBadge v2 JSON \u2502 await ${g.learnCard}.invoke.wrapOpenBadgeV2(urlOrObj); \u2502`
|
|
179
|
+
);
|
|
172
180
|
console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
|
|
173
181
|
console.log("");
|
|
174
182
|
repl__default["default"].start({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/cli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.126",
|
|
4
4
|
"description": "Test out learn card!",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": "dist/index.js",
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"rollup-plugin-esbuild": "^4.9.1",
|
|
18
18
|
"@learncard/core": "9.3.35",
|
|
19
19
|
"@learncard/didkit-plugin": "^1.5.27",
|
|
20
|
-
"@learncard/init": "^2.0.
|
|
20
|
+
"@learncard/init": "^2.0.41",
|
|
21
21
|
"@learncard/learn-cloud-plugin": "2.1.40",
|
|
22
|
+
"@learncard/open-badge-v2-plugin": "1.0.1",
|
|
22
23
|
"@learncard/simple-signing-plugin": "1.0.25",
|
|
23
24
|
"@learncard/types": "5.8.3"
|
|
24
25
|
},
|
package/project.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import repl from 'pretty-repl';
|
|
|
5
5
|
import { getTestCache } from '@learncard/core';
|
|
6
6
|
import { initLearnCard, emptyLearnCard, learnCardFromSeed } from '@learncard/init';
|
|
7
7
|
import { getSimpleSigningPlugin } from '@learncard/simple-signing-plugin';
|
|
8
|
+
import { openBadgeV2Plugin } from '@learncard/open-badge-v2-plugin';
|
|
8
9
|
import types from '@learncard/types';
|
|
9
10
|
import gradient from 'gradient-string';
|
|
10
11
|
import figlet from 'figlet';
|
|
@@ -78,6 +79,11 @@ program
|
|
|
78
79
|
await getSimpleSigningPlugin(_learnCard, 'https://api.learncard.app/trpc')
|
|
79
80
|
);
|
|
80
81
|
|
|
82
|
+
// Add OpenBadge v2 wrapper plugin for backwards-compatible OBv2 -> VC wrapping
|
|
83
|
+
globalThis.learnCard = await globalThis.learnCard.addPlugin(
|
|
84
|
+
openBadgeV2Plugin(globalThis.learnCard)
|
|
85
|
+
);
|
|
86
|
+
|
|
81
87
|
globalThis.types = types;
|
|
82
88
|
globalThis.getTestCache = getTestCache;
|
|
83
89
|
|
|
@@ -133,6 +139,9 @@ program
|
|
|
133
139
|
console.log(
|
|
134
140
|
`│ Verify a signed VP │ await ${g.learnCard}.invoke.verifyPresentation(vp); │`
|
|
135
141
|
);
|
|
142
|
+
console.log(
|
|
143
|
+
`│ Wrap OpenBadge v2 JSON │ await ${g.learnCard}.invoke.wrapOpenBadgeV2(urlOrObj); │`
|
|
144
|
+
);
|
|
136
145
|
console.log('└─────────────────────────┴────────────────────────────────────────────────┘');
|
|
137
146
|
|
|
138
147
|
console.log('');
|