occam-open-cli 6.0.231 → 6.0.233

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.
@@ -21,7 +21,7 @@ function publishOperation(proceed, abort, context) {
21
21
  post(uri, json, (json) => {
22
22
  const { success, messages } = json
23
23
 
24
- let { version } = json;
24
+ let { version = null } = json;
25
25
 
26
26
  if (version !== null) {
27
27
  const string = version; ///
package/bin/post.js CHANGED
@@ -35,16 +35,6 @@ function post(uri, json, callback) {
35
35
  return;
36
36
  }
37
37
 
38
- const { statusCode } = response;
39
-
40
- if (statusCode !== OK_200_STATUS_CODE) {
41
- const statusMessage = statusMessageFromStatusCode(statusCode);
42
-
43
- console.log(`The server responded with '${statusMessage}'.`);
44
-
45
- return;
46
- }
47
-
48
38
  contentFromResponse(response, (content) => {
49
39
  let json = null;
50
40
 
@@ -58,6 +48,22 @@ function post(uri, json, callback) {
58
48
  }
59
49
  }
60
50
 
51
+ const { statusCode } = response;
52
+
53
+ if (statusCode !== OK_200_STATUS_CODE) {
54
+ const statusMessage = statusMessageFromStatusCode(statusCode);
55
+
56
+ console.log(`The server responded with '${statusMessage}'.`);
57
+
58
+ const { messages = [] } = json;
59
+
60
+ messages.forEach((message) => {
61
+ console.log(message);
62
+ });
63
+
64
+ return;
65
+ }
66
+
61
67
  callback(json);
62
68
  });
63
69
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-open-cli",
3
3
  "author": "James Smith",
4
- "version": "6.0.231",
4
+ "version": "6.0.233",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-open-cli",
7
7
  "description": "Occam's command line package management tool.",
@@ -11,9 +11,9 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "argumentative": "^2.0.32",
14
- "necessary": "^14.0.1",
15
- "occam-entities": "^1.0.173",
16
- "occam-file-system": "^6.0.210"
14
+ "necessary": "^14.1.6",
15
+ "occam-entities": "^1.0.174",
16
+ "occam-file-system": "^6.0.211"
17
17
  },
18
18
  "scripts": {},
19
19
  "bin": {