occam-open-cli 6.0.149 → 6.0.150
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/bin/action/clone.js +0 -2
- package/bin/action/createAccount.js +0 -2
- package/bin/action/help.js +0 -2
- package/bin/action/initialise.js +0 -2
- package/bin/action/open.js +0 -2
- package/bin/action/publish.js +0 -2
- package/bin/action/resetPassword.js +0 -2
- package/bin/action/setOptions.js +0 -2
- package/bin/action/signIn.js +0 -2
- package/bin/action/signOut.js +0 -2
- package/bin/action/withdraw.js +0 -2
- package/bin/configure.js +5 -3
- package/bin/main.js +0 -2
- package/bin/post.js +3 -5
- package/package.json +1 -1
package/bin/action/clone.js
CHANGED
package/bin/action/help.js
CHANGED
package/bin/action/initialise.js
CHANGED
package/bin/action/open.js
CHANGED
package/bin/action/publish.js
CHANGED
package/bin/action/setOptions.js
CHANGED
package/bin/action/signIn.js
CHANGED
package/bin/action/signOut.js
CHANGED
package/bin/action/withdraw.js
CHANGED
package/bin/configure.js
CHANGED
|
@@ -4,8 +4,8 @@ const { pathUtilities } = require("necessary");
|
|
|
4
4
|
|
|
5
5
|
const { DOUBLE_DOTS } = require("./constants"),
|
|
6
6
|
{ DEFAULT_HELP, DEFAULT_VERSION } = require("./defaults"),
|
|
7
|
-
{
|
|
8
|
-
{
|
|
7
|
+
{ migrateConfigurationFile, checkConfigurationFileExists } = require("./configuration"),
|
|
8
|
+
{ HELP_COMMAND, VERSION_COMMAND, PUBLISH_COMMAND, INITIALISE_COMMAND } = require("./commands");
|
|
9
9
|
|
|
10
10
|
const { bottommostNameFromPath } = pathUtilities;
|
|
11
11
|
|
|
@@ -48,7 +48,9 @@ function configure(command, argument, options, main) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
if (command !== INITIALISE_COMMAND) {
|
|
52
|
+
migrateConfigurationFile();
|
|
53
|
+
}
|
|
52
54
|
|
|
53
55
|
main(command, argument, options);
|
|
54
56
|
}
|
package/bin/main.js
CHANGED
package/bin/post.js
CHANGED
|
@@ -32,7 +32,7 @@ function post(uri, json, callback) {
|
|
|
32
32
|
if (error) {
|
|
33
33
|
console.log(SERVER_FAILED_TO_RESPOND_ERROR_MESSAGE);
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
return;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const { statusCode } = response;
|
|
@@ -42,11 +42,11 @@ function post(uri, json, callback) {
|
|
|
42
42
|
|
|
43
43
|
console.log(`The server responded with '${statusMessage}'.`);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
return;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
contentFromResponse(response, (content) => {
|
|
49
|
-
let json;
|
|
49
|
+
let json = null;
|
|
50
50
|
|
|
51
51
|
try {
|
|
52
52
|
const jsonString = content; ///
|
|
@@ -55,8 +55,6 @@ function post(uri, json, callback) {
|
|
|
55
55
|
} catch (error) {
|
|
56
56
|
if (error) {
|
|
57
57
|
console.log(SERVER_FAILED_TO_RESPOND_ERROR_MESSAGE);
|
|
58
|
-
|
|
59
|
-
process.exit();
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
|
package/package.json
CHANGED