occam-open-cli 6.0.178 → 6.0.180
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/open.js +3 -2
- package/bin/main.js +1 -1
- package/bin/operation/openDependencies.js +14 -0
- package/bin/operation/openReleases.js +11 -14
- package/package.json +3 -3
package/bin/action/open.js
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
const openOperation = require("../operation/open"),
|
|
4
4
|
openReleasesOperation = require("../operation/openReleases"),
|
|
5
|
+
openDependenciesOperation = require("../operation/openDependencies"),
|
|
5
6
|
releaseNamePromptOperation = require("../operation/prompt/releaseName");
|
|
6
7
|
|
|
7
8
|
const { executeOperations } = require("../utilities/operation"),
|
|
8
9
|
{ SUCCESSFUL_OPEN_MESSAGE, FAILED_OPEN_MESSAGE } = require("../messages");
|
|
9
10
|
|
|
10
|
-
function openAction(releaseName, quietly,
|
|
11
|
+
function openAction(releaseName, quietly, no) {
|
|
11
12
|
const operations = [
|
|
12
13
|
releaseNamePromptOperation,
|
|
14
|
+
openDependenciesOperation,
|
|
13
15
|
openOperation,
|
|
14
16
|
openReleasesOperation
|
|
15
17
|
],
|
|
16
18
|
context = {
|
|
17
19
|
no,
|
|
18
|
-
yes,
|
|
19
20
|
quietly,
|
|
20
21
|
releaseName
|
|
21
22
|
};
|
package/bin/main.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function openDependenciesOperation(proceed, abort, context) {
|
|
4
|
+
const { no } = context,
|
|
5
|
+
openDependencies = !no;
|
|
6
|
+
|
|
7
|
+
Object.assign(context, {
|
|
8
|
+
openDependencies
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
proceed();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = openDependenciesOperation;
|
|
@@ -21,7 +21,17 @@ function openReleasesOperation(proceed, abort, context) {
|
|
|
21
21
|
|
|
22
22
|
module.exports = openReleasesOperation;
|
|
23
23
|
|
|
24
|
-
function openReleasePromptOperation(release, next, done, context) {
|
|
24
|
+
function openReleasePromptOperation(release, next, done, context, index) {
|
|
25
|
+
const { openDependencies } = context;
|
|
26
|
+
|
|
27
|
+
if (!openDependencies) {
|
|
28
|
+
if (index > 0) {
|
|
29
|
+
next();
|
|
30
|
+
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
const { name, quietly } = release,
|
|
26
36
|
entryPath = name, ///
|
|
27
37
|
entryExists = checkEntryExists(entryPath);
|
|
@@ -46,23 +56,10 @@ function openReleasePromptOperation(release, next, done, context) {
|
|
|
46
56
|
return;
|
|
47
57
|
}
|
|
48
58
|
|
|
49
|
-
let answer = null;
|
|
50
|
-
|
|
51
|
-
const { yes, no } = context;
|
|
52
|
-
|
|
53
|
-
if (yes) {
|
|
54
|
-
answer = YES;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (no) {
|
|
58
|
-
answer = NO;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
59
|
const description = `Overwrite the existing '${name}' package? (y)es (n)o: `,
|
|
62
60
|
errorMessage = INVALID_ANSWER_MESSAGE,
|
|
63
61
|
validationFunction = validateAnswer, ///
|
|
64
62
|
options = {
|
|
65
|
-
answer,
|
|
66
63
|
description,
|
|
67
64
|
errorMessage,
|
|
68
65
|
validationFunction
|
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.
|
|
4
|
+
"version": "6.0.180",
|
|
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,8 +12,8 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"argumentative": "^2.0.28",
|
|
14
14
|
"necessary": "^14.0.1",
|
|
15
|
-
"occam-entities": "^1.0.
|
|
16
|
-
"occam-file-system": "^6.0.
|
|
15
|
+
"occam-entities": "^1.0.125",
|
|
16
|
+
"occam-file-system": "^6.0.167"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {},
|
|
19
19
|
"bin": {
|