occam-open-cli 5.0.162 → 5.0.164

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.
@@ -3,7 +3,6 @@
3
3
  const publishOperation = require("../operation/publish"),
4
4
  loadProjectOperation = require("../operation/loadProject"),
5
5
  packReleaseOperation = require("../operation/packRelease"),
6
- validateProjectOperation = require("../operation/validateProject"),
7
6
  getIdentityTokenOperation = require("../operation/getIdentityToken"),
8
7
  releaseNamePromptOperation = require("../operation/prompt/releaseName"),
9
8
  updateMetaJSONFileVersionOperation = require("../operation/updateMetaJSONFileVersion");
@@ -18,13 +17,14 @@ function publishAction(argument, dryRun, logLevel) {
18
17
  getIdentityTokenOperation,
19
18
  releaseNamePromptOperation,
20
19
  loadProjectOperation,
21
- validateProjectOperation,
22
20
  packReleaseOperation,
23
21
  publishOperation,
24
22
  updateMetaJSONFileVersionOperation
25
23
  ],
24
+ success = false,
26
25
  context = {
27
26
  dryRun,
27
+ success,
28
28
  logLevel,
29
29
  releaseName
30
30
  };
package/bin/messages.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const MISSING_README_FILE_MESSAGE = "The readme file is missing.",
4
- MISSING_META_JSON_FILE_MESSAGE = "The 'meta.json' file is missing.",
5
- PASSWORDS_DO_NOT_MATCH_MESSAGE = "The passwords do not match.",
3
+ const PASSWORDS_DO_NOT_MATCH_MESSAGE = "The passwords do not match.",
6
4
  SERVER_FAILED_TO_RESPOND_ERROR_MESSAGE = "The server did not respond in a timely or intelligible fashion. If this problem persists then please be kind enough to report it.",
7
5
  CONFIGURATION_FILE_DOES_NOT_EXIST_MESSAGE = "The action cannot be performed because the configuration file is missing. Run 'open initialise' to create one.",
8
6
  SIGN_OUT_MESSAGE = "You have been signed out.",
@@ -28,8 +26,6 @@ const MISSING_README_FILE_MESSAGE = "The readme file is missing.",
28
26
  SUCCESSFUL_SET_OPTIONS_MESSAGE = "The options have been set successfully.";
29
27
 
30
28
  module.exports = {
31
- MISSING_README_FILE_MESSAGE,
32
- MISSING_META_JSON_FILE_MESSAGE,
33
29
  PASSWORDS_DO_NOT_MATCH_MESSAGE,
34
30
  SERVER_FAILED_TO_RESPOND_ERROR_MESSAGE,
35
31
  CONFIGURATION_FILE_DOES_NOT_EXIST_MESSAGE,
@@ -9,6 +9,12 @@ function packReleaseOperation(proceed, abort, context) {
9
9
 
10
10
  release = Release.fromProject(project);
11
11
 
12
+ if (release === null) {
13
+ abort();
14
+
15
+ return;
16
+ }
17
+
12
18
  const releaseJSON = release.toJSON();
13
19
 
14
20
  release = releaseJSON; ///
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-open-cli",
3
3
  "author": "James Smith",
4
- "version": "5.0.162",
4
+ "version": "5.0.164",
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.",
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "argumentative": "^2.0.21",
14
14
  "necessary": "^11.2.0",
15
- "occam-file-system": "^5.0.123"
15
+ "occam-file-system": "^5.0.124"
16
16
  },
17
17
  "scripts": {},
18
18
  "bin": {
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- const { MISSING_README_FILE_MESSAGE, MISSING_META_JSON_FILE_MESSAGE } = require("../messages");
4
-
5
- function validateProjectOperation(proceed, abort, context) {
6
- const { project } = context,
7
- readMeFile = project.getReadmeFile(),
8
- metaJSONFile = project.getMetaJSONFile();
9
-
10
- const messages = [];
11
-
12
- if (readMeFile === null) {
13
- const message = MISSING_README_FILE_MESSAGE;
14
-
15
- messages.push(message);
16
- }
17
-
18
- if (metaJSONFile === null) {
19
- const message = MISSING_META_JSON_FILE_MESSAGE;
20
-
21
- messages.push(message);
22
- } else {
23
- const version = project.getVersion();
24
-
25
-
26
- }
27
-
28
- const messagesLength = messages.length;
29
-
30
- if (messagesLength > 0) {
31
- const success = false;
32
-
33
- Object.assign(context, {
34
- success,
35
- messages
36
- });
37
-
38
- abort();
39
-
40
- return;
41
- }
42
-
43
- debugger
44
-
45
- proceed();
46
- }
47
-
48
- module.exports = validateProjectOperation;