@learncard/cli 1.1.3 → 1.1.7

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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @learncard/cli
2
2
 
3
+ ## 1.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#53](https://github.com/WeLibraryOS/LearnCard/pull/53) [`7d40878`](https://github.com/WeLibraryOS/LearnCard/commit/7d40878f7f15d80b03701bdec859f2e7135559dd) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Add emptyWallet function to CLI
8
+
9
+ - Updated dependencies [[`7d40878`](https://github.com/WeLibraryOS/LearnCard/commit/7d40878f7f15d80b03701bdec859f2e7135559dd), [`7d40878`](https://github.com/WeLibraryOS/LearnCard/commit/7d40878f7f15d80b03701bdec859f2e7135559dd)]:
10
+ - @learncard/core@4.0.0
11
+
12
+ ## 1.1.6
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`60e0f5b`](https://github.com/WeLibraryOS/LearnCard/commit/60e0f5b6ddaeb124959e87ac61189b2638c0b32b)]:
17
+ - @learncard/core@3.0.0
18
+
19
+ ## 1.1.5
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [[`4c6c11f`](https://github.com/WeLibraryOS/LearnCard/commit/4c6c11f30b81b103017883d7f57bd89e2f7d623e), [`7c09ebf`](https://github.com/WeLibraryOS/LearnCard/commit/7c09ebf0106ec207ac1aa2d7bcf1437d275328d7)]:
24
+ - @learncard/core@2.1.0
25
+
26
+ ## 1.1.4
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [[`7adc30e`](https://github.com/WeLibraryOS/LearnCard/commit/7adc30eba700da4c6886a086d48c40b9820dc05a), [`b07187c`](https://github.com/WeLibraryOS/LearnCard/commit/b07187c4384152ec7f4c5be35a8f2b31a3aff079)]:
31
+ - @learncard/core@2.0.1
32
+
3
33
  ## 1.1.3
4
34
 
5
35
  ### Patch Changes
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
18
18
  const generateRandomSeed = () => crypto__default["default"].randomBytes(32).toString("hex");
19
19
 
20
20
  var name = "@learncard/cli";
21
- var version = "1.1.3";
21
+ var version = "1.1.7";
22
22
  var description = "Test out learn card!";
23
23
  var main = "dist/index.js";
24
24
  var bin = "dist/index.js";
@@ -63,6 +63,7 @@ var packageJson = {
63
63
 
64
64
  const g = {
65
65
  wallet: gradient__default["default"](["cyan", "green"])("wallet"),
66
+ emptyWallet: gradient__default["default"](["cyan", "green"])("emptyWallet"),
66
67
  walletFromKey: gradient__default["default"](["cyan", "green"])("walletFromKey"),
67
68
  seed: gradient__default["default"](["cyan", "green"])("seed"),
68
69
  generateRandomSeed: gradient__default["default"](["cyan", "green"])("generateRandomSeed")
@@ -77,6 +78,7 @@ commander.program.version(packageJson.version).argument("[seed]").action(async (
77
78
  console.log("Creating wallet...");
78
79
  globalThis.seed = seed;
79
80
  globalThis.generateRandomSeed = generateRandomSeed;
81
+ globalThis.emptyWallet = core.emptyWallet;
80
82
  globalThis.walletFromKey = core.walletFromKey;
81
83
  globalThis.wallet = await core.walletFromKey(seed);
82
84
  process.stdout.moveCursor(0, -1);
@@ -88,6 +90,7 @@ commander.program.version(packageJson.version).argument("[seed]").action(async (
88
90
  console.log("\u2502 Variable \u2502 Description \u2502");
89
91
  console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\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\u2524");
90
92
  console.log(`\u2502 ${g.wallet} \u2502 Learn Card Wallet \u2502`);
93
+ console.log(`\u2502 ${g.emptyWallet} \u2502 Wallet Instantiation Function \u2502`);
91
94
  console.log(`\u2502 ${g.walletFromKey} \u2502 Wallet Instantiation Function \u2502`);
92
95
  console.log(`\u2502 ${g.seed} \u2502 Seed used to generate wallet \u2502`);
93
96
  console.log(`\u2502 ${g.generateRandomSeed} \u2502 Generates a random seed \u2502`);
@@ -109,7 +112,7 @@ commander.program.version(packageJson.version).argument("[seed]").action(async (
109
112
  console.log("");
110
113
  repl__default["default"].start({
111
114
  colorize: (input) => {
112
- return input.replace("walletFromKey", g.walletFromKey).replace("wallet", g.wallet).replace("seed", g.seed).replace("generateRandomSeed", g.generateRandomSeed);
115
+ return input.replace("emptyWallet", g.emptyWallet).replace("walletFromKey", g.walletFromKey).replace("wallet", g.wallet).replace("seed", g.seed).replace("generateRandomSeed", g.generateRandomSeed);
113
116
  }
114
117
  });
115
118
  }).parse(process.argv);
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@learncard/cli",
3
- "version": "1.1.3",
3
+ "version": "1.1.7",
4
4
  "description": "Test out learn card!",
5
5
  "main": "dist/index.js",
6
6
  "bin": "dist/index.js",
7
7
  "author": "Learning Economy Foundation (www.learningeconomy.io)",
8
8
  "license": "MIT",
9
9
  "dependencies": {
10
- "@learncard/core": "2.0.0",
10
+ "@learncard/core": "4.0.0",
11
11
  "@learncard/types": "2.1.2",
12
12
  "@rollup/plugin-json": "^4.1.0",
13
13
  "commander": "^9.3.0",
package/src/index.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import repl from 'pretty-repl';
2
2
 
3
- import { walletFromKey } from '@learncard/core';
3
+ import { emptyWallet, walletFromKey } from '@learncard/core';
4
4
  import gradient from 'gradient-string';
5
5
  import figlet from 'figlet';
6
6
  import { program } from 'commander';
@@ -11,6 +11,7 @@ import packageJson from '../package.json';
11
11
 
12
12
  const g = {
13
13
  wallet: gradient(['cyan', 'green'])('wallet'),
14
+ emptyWallet: gradient(['cyan', 'green'])('emptyWallet'),
14
15
  walletFromKey: gradient(['cyan', 'green'])('walletFromKey'),
15
16
  seed: gradient(['cyan', 'green'])('seed'),
16
17
  generateRandomSeed: gradient(['cyan', 'green'])('generateRandomSeed'),
@@ -33,6 +34,7 @@ program
33
34
 
34
35
  globalThis.seed = seed;
35
36
  globalThis.generateRandomSeed = generateRandomSeed;
37
+ globalThis.emptyWallet = emptyWallet;
36
38
  globalThis.walletFromKey = walletFromKey;
37
39
  globalThis.wallet = await walletFromKey(seed);
38
40
 
@@ -48,6 +50,7 @@ program
48
50
  console.log('│ Variable │ Description │');
49
51
  console.log('├────────────────────┼───────────────────────────────┤');
50
52
  console.log(`│ ${g.wallet} │ Learn Card Wallet │`);
53
+ console.log(`│ ${g.emptyWallet} │ Wallet Instantiation Function │`);
51
54
  console.log(`│ ${g.walletFromKey} │ Wallet Instantiation Function │`);
52
55
  console.log(`│ ${g.seed} │ Seed used to generate wallet │`);
53
56
  console.log(`│ ${g.generateRandomSeed} │ Generates a random seed │`);
@@ -81,6 +84,7 @@ program
81
84
  repl.start({
82
85
  colorize: (input: string) => {
83
86
  return input
87
+ .replace('emptyWallet', g.emptyWallet)
84
88
  .replace('walletFromKey', g.walletFromKey)
85
89
  .replace('wallet', g.wallet)
86
90
  .replace('seed', g.seed)