nebulon-escrow-cli 0.1.0 → 0.8.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/README.md +95 -4
- package/package.json +2 -2
- package/src/cli.js +2 -2
- package/src/commands/contract.js +422 -1239
- package/src/commands/init.js +11 -15
- package/src/constants.js +8 -7
- package/src/version.js +5 -0
package/src/commands/init.js
CHANGED
|
@@ -14,6 +14,7 @@ const {
|
|
|
14
14
|
setActiveWallet,
|
|
15
15
|
} = require("../wallets");
|
|
16
16
|
const { banner, successMessage } = require("../ui");
|
|
17
|
+
const { VERSION } = require("../version");
|
|
17
18
|
|
|
18
19
|
const isPromptCancel = (error) => {
|
|
19
20
|
if (!error) {
|
|
@@ -122,6 +123,7 @@ const runInit = async (options = {}, capsuleName) => {
|
|
|
122
123
|
try {
|
|
123
124
|
if (!options.noBanner) {
|
|
124
125
|
banner();
|
|
126
|
+
console.log(chalk.gray(`Version: ${VERSION}`));
|
|
125
127
|
}
|
|
126
128
|
if (capsuleName) {
|
|
127
129
|
try {
|
|
@@ -138,21 +140,15 @@ const runInit = async (options = {}, capsuleName) => {
|
|
|
138
140
|
let backendAnswer = { backendUrl: config.backendUrl };
|
|
139
141
|
let backendSource = config.backendSource || "custom";
|
|
140
142
|
let backendNetwork = null;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
name: "server",
|
|
147
|
-
message: "
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
{ name: "custom", message: "Custom server" },
|
|
151
|
-
],
|
|
152
|
-
});
|
|
153
|
-
} catch (error) {
|
|
154
|
-
serverChoice = { server: "custom" };
|
|
155
|
-
}
|
|
143
|
+
const serverChoice = await prompt({
|
|
144
|
+
type: "select",
|
|
145
|
+
name: "server",
|
|
146
|
+
message: "Use official server or custom?",
|
|
147
|
+
choices: [
|
|
148
|
+
{ name: "official", message: "Official server" },
|
|
149
|
+
{ name: "custom", message: "Custom server" },
|
|
150
|
+
],
|
|
151
|
+
});
|
|
156
152
|
|
|
157
153
|
if (serverChoice.server === "custom") {
|
|
158
154
|
backendAnswer = await prompt({
|
package/src/constants.js
CHANGED
|
@@ -53,13 +53,14 @@ const DEFAULT_CONFIG = {
|
|
|
53
53
|
contractKeys: {},
|
|
54
54
|
},
|
|
55
55
|
auth: {
|
|
56
|
-
token: null,
|
|
57
|
-
wallet: null,
|
|
58
|
-
handle: null,
|
|
59
|
-
role: null,
|
|
60
|
-
lastAuthAt: null,
|
|
61
|
-
},
|
|
62
|
-
|
|
56
|
+
token: null,
|
|
57
|
+
wallet: null,
|
|
58
|
+
handle: null,
|
|
59
|
+
role: null,
|
|
60
|
+
lastAuthAt: null,
|
|
61
|
+
},
|
|
62
|
+
skipPermissionChecks: false,
|
|
63
|
+
};
|
|
63
64
|
|
|
64
65
|
module.exports = {
|
|
65
66
|
DEFAULT_CONFIG,
|