occam-open-cli 4.0.35 → 4.0.36
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/changeEmailAddress.js +10 -10
- package/bin/action/changePassword.js +12 -12
- package/bin/action/clone.js +4 -4
- package/bin/action/confirmEmailAddress.js +8 -8
- package/bin/action/deprecate.js +10 -10
- package/bin/action/login.js +6 -6
- package/bin/action/logout.js +4 -4
- package/bin/action/publish.js +14 -14
- package/bin/action/register.js +10 -10
- package/bin/action/resendConfirmationCode.js +6 -6
- package/bin/action/resetPassword.js +4 -4
- package/bin/action/setOptions.js +7 -7
- package/bin/action.js +3 -3
- package/bin/{callback → operation}/checkMetaJSONFileExists.js +2 -2
- package/bin/{callback → operation}/checkReadmeFileExists.js +2 -2
- package/bin/{callback → operation}/createRelease.js +2 -2
- package/bin/{callback → operation}/deflateRelease.js +2 -2
- package/bin/{callback → operation}/prompt/areYouSure.js +2 -2
- package/bin/{callback → operation}/prompt/confirmNewPassword.js +2 -2
- package/bin/{callback → operation}/prompt/confirmPassword.js +2 -2
- package/bin/{callback → operation}/prompt/confirmationCode.js +2 -2
- package/bin/{callback → operation}/prompt/emailAddress.js +2 -2
- package/bin/{callback → operation}/prompt/gitHubHostName.js +2 -2
- package/bin/{callback → operation}/prompt/newEmailAddress.js +2 -2
- package/bin/{callback → operation}/prompt/newPassword.js +2 -2
- package/bin/{callback → operation}/prompt/password.js +2 -2
- package/bin/{callback → operation}/prompt/releaseName.js +2 -2
- package/bin/{callback → operation}/prompt/useSSH.js +2 -2
- package/bin/{callback → operation}/prompt/username.js +2 -2
- package/bin/{callback → operation}/retrieveAccessToken.js +2 -2
- package/bin/utilities/{callback.js → operation.js} +11 -11
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
usernamePromptOperation = require("../operation/prompt/username"),
|
|
5
|
+
emailAddressPromptOperation = require("../operation/prompt/emailAddress"),
|
|
6
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken"),
|
|
7
|
+
newEmailAddressPromptOperation = require("../operation/prompt/newEmailAddress");
|
|
8
8
|
|
|
9
9
|
const { CHANGE_EMAIL_ADDRESS_API_URI } = require("../uris"),
|
|
10
10
|
{ FAILED_CHANGE_EMAIL_ADDRESS_MESSAGE, SUCCESSFUL_CHANGE_EMAIL_ADDRESS_MESSAGE } = require("../messages");
|
|
@@ -13,18 +13,18 @@ function changeEmailAddress(argument) {
|
|
|
13
13
|
const username = argument, ///
|
|
14
14
|
emailAddress = null,
|
|
15
15
|
uri = CHANGE_EMAIL_ADDRESS_API_URI,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
operations = [
|
|
17
|
+
retrieveAccessTokenOperation,
|
|
18
|
+
usernamePromptOperation,
|
|
19
|
+
emailAddressPromptOperation,
|
|
20
|
+
newEmailAddressPromptOperation
|
|
21
21
|
],
|
|
22
22
|
context = {
|
|
23
23
|
username,
|
|
24
24
|
emailAddress
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
action(
|
|
27
|
+
action(operations, uri, (json) => {
|
|
28
28
|
const { success } = json;
|
|
29
29
|
|
|
30
30
|
success ?
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
usernamePromptOperation = require("../operation/prompt/username"),
|
|
5
|
+
passwordPromptOperation = require("../operation/prompt/password"),
|
|
6
|
+
newPasswordPromptOperation = require("../operation/prompt/newPassword"),
|
|
7
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken"),
|
|
8
|
+
confirmNewPasswordPromptOperation = require("../operation/prompt/confirmNewPassword");
|
|
9
9
|
|
|
10
10
|
const { CHANGE_PASSWORD_API_URI } = require("../uris"),
|
|
11
11
|
{ FAILED_CHANGE_PASSWORD_MESSAGE, SUCCESSFUL_CHANGE_PASSWORD_MESSAGE } = require("../messages");
|
|
@@ -15,12 +15,12 @@ function changePassword(argument) {
|
|
|
15
15
|
oldPassword = null,
|
|
16
16
|
newPassword = null,
|
|
17
17
|
uri = CHANGE_PASSWORD_API_URI,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
operations = [
|
|
19
|
+
retrieveAccessTokenOperation,
|
|
20
|
+
usernamePromptOperation,
|
|
21
|
+
passwordPromptOperation,
|
|
22
|
+
newPasswordPromptOperation,
|
|
23
|
+
confirmNewPasswordPromptOperation
|
|
24
24
|
],
|
|
25
25
|
context = {
|
|
26
26
|
username,
|
|
@@ -28,7 +28,7 @@ function changePassword(argument) {
|
|
|
28
28
|
newPassword
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
action(
|
|
31
|
+
action(operations, uri, (json) => {
|
|
32
32
|
const { success } = json;
|
|
33
33
|
|
|
34
34
|
success ?
|
package/bin/action/clone.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
4
|
cloneRepository = require("../cloneRepository"),
|
|
5
|
-
|
|
5
|
+
releaseNamePromptOperation = require("../operation/prompt/releaseName");
|
|
6
6
|
|
|
7
7
|
const { CLONE_API_URI } = require("../uris"),
|
|
8
8
|
{ FAILED_CLONE_MESSAGE, SUCCESSFUL_CLONE_MESSAGE } = require("../messages");
|
|
@@ -11,14 +11,14 @@ function clone(argument) {
|
|
|
11
11
|
const releaseName = argument, ///
|
|
12
12
|
name = releaseName, ///
|
|
13
13
|
uri = CLONE_API_URI,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
operations = [
|
|
15
|
+
releaseNamePromptOperation
|
|
16
16
|
],
|
|
17
17
|
context = {
|
|
18
18
|
name
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
action(
|
|
21
|
+
action(operations, uri, (json) => {
|
|
22
22
|
const { exists } = json;
|
|
23
23
|
|
|
24
24
|
if (!exists) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
emailAddressPromptOperation = require("../operation/prompt/emailAddress"),
|
|
5
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken"),
|
|
6
|
+
confirmationCodePromptOperation = require("../operation/prompt/confirmationCode");
|
|
7
7
|
|
|
8
8
|
const { CONFIRM_EMAIL_ADDRESS_API_URI } = require("../uris"),
|
|
9
9
|
{ FAILED_CONFIRM_EMAIL_ADDRESS_MESSAGE, SUCCESSFUL_CONFIRM_EMAIL_ADDRESS_MESSAGE } = require("../messages");
|
|
@@ -12,17 +12,17 @@ function confirmEmailAddress(argument) {
|
|
|
12
12
|
const emailAddress = argument, ///
|
|
13
13
|
confirmationCode = null,
|
|
14
14
|
uri = CONFIRM_EMAIL_ADDRESS_API_URI,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
operations = [
|
|
16
|
+
retrieveAccessTokenOperation,
|
|
17
|
+
emailAddressPromptOperation,
|
|
18
|
+
confirmationCodePromptOperation
|
|
19
19
|
],
|
|
20
20
|
context = {
|
|
21
21
|
emailAddress,
|
|
22
22
|
confirmationCode
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
action(
|
|
25
|
+
action(operations, uri, (json) => {
|
|
26
26
|
const { success } = json;
|
|
27
27
|
|
|
28
28
|
success ?
|
package/bin/action/deprecate.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
passwordPromptOperation = require("../operation/prompt/password"),
|
|
5
|
+
areYouSurePromptOperation = require("../operation/prompt/areYouSure"),
|
|
6
|
+
releaseNamePromptOperation = require("../operation/prompt/releaseName"),
|
|
7
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken");
|
|
8
8
|
|
|
9
9
|
const { DEPRECATE_API_URI } = require("../uris"),
|
|
10
10
|
{ FAILED_DEPRECATE_MESSAGE, SUCCESSFUL_DEPRECATE_MESSAGE } = require("../messages");
|
|
@@ -13,18 +13,18 @@ function deprecate(argument) {
|
|
|
13
13
|
const releaseName = argument, ///
|
|
14
14
|
password = null,
|
|
15
15
|
uri = DEPRECATE_API_URI,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
operations = [
|
|
17
|
+
retrieveAccessTokenOperation,
|
|
18
|
+
releaseNamePromptOperation,
|
|
19
|
+
passwordPromptOperation,
|
|
20
|
+
areYouSurePromptOperation
|
|
21
21
|
],
|
|
22
22
|
context = {
|
|
23
23
|
password,
|
|
24
24
|
releaseName
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
action(
|
|
27
|
+
action(operations, uri, (json) => {
|
|
28
28
|
const { success } = json;
|
|
29
29
|
|
|
30
30
|
success ?
|
package/bin/action/login.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
passwordPromptOperation = require("../operation/prompt/password"),
|
|
5
|
+
emailAddressPromptOperation = require("../operation/prompt/emailAddress");
|
|
6
6
|
|
|
7
7
|
const { LOGIN_API_URI } = require("../uris"),
|
|
8
8
|
{ addAccessToken } = require("../configuration"),
|
|
@@ -12,16 +12,16 @@ function login(argument) {
|
|
|
12
12
|
const emailAddress = argument, ///
|
|
13
13
|
password = null,
|
|
14
14
|
uri = LOGIN_API_URI,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
operations = [
|
|
16
|
+
emailAddressPromptOperation,
|
|
17
|
+
passwordPromptOperation
|
|
18
18
|
],
|
|
19
19
|
context = {
|
|
20
20
|
emailAddress,
|
|
21
21
|
password
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
action(
|
|
24
|
+
action(operations, uri, (json) => {
|
|
25
25
|
const { success } = json;
|
|
26
26
|
|
|
27
27
|
success ?
|
package/bin/action/logout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
4
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken");
|
|
5
5
|
|
|
6
6
|
const { LOGOUT_API_URI } = require("../uris"),
|
|
7
7
|
{ removeAccessToken } = require("../configuration"),
|
|
@@ -9,12 +9,12 @@ const { LOGOUT_API_URI } = require("../uris"),
|
|
|
9
9
|
|
|
10
10
|
function logout() {
|
|
11
11
|
const uri = LOGOUT_API_URI,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
operations = [
|
|
13
|
+
retrieveAccessTokenOperation
|
|
14
14
|
],
|
|
15
15
|
context = {};
|
|
16
16
|
|
|
17
|
-
action(
|
|
17
|
+
action(operations, uri, (json) => {
|
|
18
18
|
removeAccessToken();
|
|
19
19
|
|
|
20
20
|
console.log(LOGGED_OUT_MESSAGE);
|
package/bin/action/publish.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
createReleaseOperation = require("../operation/createRelease"),
|
|
5
|
+
deflateReleaseOperation = require("../operation/deflateRelease"),
|
|
6
|
+
releaseNamePromptOperation = require("../operation/prompt/releaseName"),
|
|
7
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken"),
|
|
8
|
+
checkReadmeFileExistsOperation = require("../operation/checkReadmeFileExists"),
|
|
9
|
+
checkMetaJSONFileExistsOperation = require("../operation/checkMetaJSONFileExists");
|
|
10
10
|
|
|
11
11
|
const { PUBLISH_API_URI } = require("../uris"),
|
|
12
12
|
{ FAILED_PUBLISH_MESSAGE, SUCCESSFUL_PUBLISH_MESSAGE } = require("../messages");
|
|
@@ -14,19 +14,19 @@ const { PUBLISH_API_URI } = require("../uris"),
|
|
|
14
14
|
function publish(argument) {
|
|
15
15
|
const releaseName = argument, ///
|
|
16
16
|
uri = PUBLISH_API_URI,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
operations = [
|
|
18
|
+
retrieveAccessTokenOperation,
|
|
19
|
+
releaseNamePromptOperation,
|
|
20
|
+
createReleaseOperation,
|
|
21
|
+
checkReadmeFileExistsOperation,
|
|
22
|
+
checkMetaJSONFileExistsOperation,
|
|
23
|
+
deflateReleaseOperation
|
|
24
24
|
],
|
|
25
25
|
context = {
|
|
26
26
|
releaseName
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
action(
|
|
29
|
+
action(operations, uri, (json) => {
|
|
30
30
|
const { success } = json;
|
|
31
31
|
|
|
32
32
|
success ?
|
package/bin/action/register.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
usernamePromptOperation = require("../operation/prompt/username"),
|
|
5
|
+
passwordPromptOperation = require("../operation/prompt/password"),
|
|
6
|
+
emailAddressPromptOperation = require("../operation/prompt/emailAddress"),
|
|
7
|
+
confirmPasswordPromptOperation = require("../operation/prompt/confirmPassword");
|
|
8
8
|
|
|
9
9
|
const { REGISTER_API_URI } = require("../uris"),
|
|
10
10
|
{ FAILED_REGISTER_MESSAGE, SUCCESSFUL_REGISTER_MESSAGE } = require("../messages");
|
|
@@ -14,11 +14,11 @@ function register(argument) {
|
|
|
14
14
|
username = null,
|
|
15
15
|
password = null,
|
|
16
16
|
uri = REGISTER_API_URI,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
operations = [
|
|
18
|
+
emailAddressPromptOperation,
|
|
19
|
+
usernamePromptOperation,
|
|
20
|
+
passwordPromptOperation,
|
|
21
|
+
confirmPasswordPromptOperation
|
|
22
22
|
],
|
|
23
23
|
context = {
|
|
24
24
|
username,
|
|
@@ -26,7 +26,7 @@ function register(argument) {
|
|
|
26
26
|
emailAddress
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
action(
|
|
29
|
+
action(operations, uri, (json) => {
|
|
30
30
|
const { success } = json;
|
|
31
31
|
|
|
32
32
|
success ?
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
emailAddressPromptOperation = require("../operation/prompt/emailAddress"),
|
|
5
|
+
retrieveAccessTokenOperation = require("../operation/retrieveAccessToken");
|
|
6
6
|
|
|
7
7
|
const { RESEND_CONFIRMATION_CODE_API_URI } = require("../uris"),
|
|
8
8
|
{ SUCCESSFUL_RESEND_CONFIRMATION_CODE_MESSAGE, FAILED_RESEND_CONFIRMATION_CODE_MESSAGE } = require("../messages");
|
|
@@ -10,15 +10,15 @@ const { RESEND_CONFIRMATION_CODE_API_URI } = require("../uris"),
|
|
|
10
10
|
function resendConfirmationCode(argument) {
|
|
11
11
|
const emailAddress = argument, ///
|
|
12
12
|
uri = RESEND_CONFIRMATION_CODE_API_URI,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
operations = [
|
|
14
|
+
retrieveAccessTokenOperation,
|
|
15
|
+
emailAddressPromptOperation
|
|
16
16
|
],
|
|
17
17
|
context = {
|
|
18
18
|
emailAddress
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
action(
|
|
21
|
+
action(operations, uri, (json) => {
|
|
22
22
|
const { success } = json;
|
|
23
23
|
|
|
24
24
|
success ?
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const action = require("../action"),
|
|
4
|
-
|
|
4
|
+
usernamePromptOperation = require("../operation/prompt/username");
|
|
5
5
|
|
|
6
6
|
const { RESET_PASSWORD_API_URI } = require("../uris"),
|
|
7
7
|
{ FAILED_RESET_PASSWORD_MESSAGE, SUCCESSFUL_RESET_PASSWORD_MESSAGE } = require("../messages");
|
|
@@ -9,14 +9,14 @@ const { RESET_PASSWORD_API_URI } = require("../uris"),
|
|
|
9
9
|
function resetPassword(argument) {
|
|
10
10
|
const username = argument, ///
|
|
11
11
|
uri = RESET_PASSWORD_API_URI,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
operations = [
|
|
13
|
+
usernamePromptOperation
|
|
14
14
|
],
|
|
15
15
|
context = {
|
|
16
16
|
username
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
action(
|
|
19
|
+
action(operations, uri, (json) => {
|
|
20
20
|
const { success } = json;
|
|
21
21
|
|
|
22
22
|
success ?
|
package/bin/action/setOptions.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const useSSHPromptOperation = require("../operation/prompt/useSSH"),
|
|
4
|
+
gitHubHostNamePromptOperation = require("../operation/prompt/gitHubHostName");
|
|
5
5
|
|
|
6
6
|
const { updateOptions } = require("../configuration"),
|
|
7
|
-
{
|
|
7
|
+
{ executeOperations } = require("../utilities/operation"),
|
|
8
8
|
{ FAILED_SET_OPTIONS_MESSAGE, SUCCESSFUL_SET_OPTIONS_MESSAGE } = require("../messages");
|
|
9
9
|
|
|
10
10
|
function setOptions() {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const operations = [
|
|
12
|
+
useSSHPromptOperation,
|
|
13
|
+
gitHubHostNamePromptOperation
|
|
14
14
|
],
|
|
15
15
|
context = {};
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
executeOperations(operations, (completed) => {
|
|
18
18
|
if (!completed) {
|
|
19
19
|
console.log(FAILED_SET_OPTIONS_MESSAGE);
|
|
20
20
|
|
package/bin/action.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const post = require("./post");
|
|
4
4
|
|
|
5
|
-
const {
|
|
5
|
+
const { executeOperations } = require("./utilities/operation");
|
|
6
6
|
|
|
7
|
-
function action(
|
|
8
|
-
|
|
7
|
+
function action(operations, uri, callback, context) {
|
|
8
|
+
executeOperations(operations, (completed) => {
|
|
9
9
|
if (!completed) {
|
|
10
10
|
process.exit(1);
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { META_JSON_FILE_DOES_NOT_EXIST_MESSAGE } = require("../messages");
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function checkMetaJSONFileExistsOperation(proceed, abort, context) {
|
|
6
6
|
const { release } = context,
|
|
7
7
|
metaJSONFile = release.getMetaJSONFile(),
|
|
8
8
|
metaJSONFileExists = (metaJSONFile !== null);
|
|
@@ -18,4 +18,4 @@ function checkMetaJSONFileExistsCallback(proceed, abort, context) {
|
|
|
18
18
|
proceed();
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
module.exports =
|
|
21
|
+
module.exports = checkMetaJSONFileExistsOperation;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { README_FILE_DOES_NOT_EXIST_MESSAGE } = require("../messages");
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function checkReadmeFileExistsOperation(proceed, abort, context) {
|
|
6
6
|
const { release } = context,
|
|
7
7
|
readmeFile = release.getReadmeFile(),
|
|
8
8
|
readmeFileExists = (readmeFile !== null);
|
|
@@ -18,4 +18,4 @@ function checkReadmeFileExistsCallback(proceed, abort, context) {
|
|
|
18
18
|
proceed();
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
module.exports =
|
|
21
|
+
module.exports = checkReadmeFileExistsOperation;
|
|
@@ -5,7 +5,7 @@ const { fileSystemUtilities } = require("../../lib/main"), ///
|
|
|
5
5
|
|
|
6
6
|
const { releaseFromName } = fileSystemUtilities;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
function createReleaseOperation(proceed, abort, context) {
|
|
9
9
|
const { releaseName } = context,
|
|
10
10
|
name = releaseName, ///
|
|
11
11
|
release = releaseFromName(name);
|
|
@@ -25,4 +25,4 @@ function createReleaseCallback(proceed, abort, context) {
|
|
|
25
25
|
proceed();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
module.exports =
|
|
28
|
+
module.exports = createReleaseOperation;
|
|
@@ -4,7 +4,7 @@ const { deflate } = require("zlib");
|
|
|
4
4
|
|
|
5
5
|
const { BASE64 } = require("../constants");
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function deflateReleaseOperation(proceed, abort, context) {
|
|
8
8
|
const { release } = context,
|
|
9
9
|
releaseJSON = release.toJSON(),
|
|
10
10
|
releaseJSONString = JSON.stringify(releaseJSON);
|
|
@@ -28,4 +28,4 @@ function deflateRelease(proceed, abort, context) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
module.exports =
|
|
31
|
+
module.exports = deflateReleaseOperation;
|
|
@@ -9,7 +9,7 @@ const { validateAnswer } = require("../../utilities/validate"),
|
|
|
9
9
|
|
|
10
10
|
const { prompt } = shellUtilities;
|
|
11
11
|
|
|
12
|
-
function
|
|
12
|
+
function areYouSurePromptOperation(proceed, abort, context) {
|
|
13
13
|
const description = ARE_YOU_SURE_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_ANSWER_MESSAGE,
|
|
15
15
|
validationFunction = validateAnswer, ///
|
|
@@ -36,4 +36,4 @@ function areYouSurePromptCallback(proceed, abort, context) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
module.exports =
|
|
39
|
+
module.exports = areYouSurePromptOperation;
|
|
@@ -7,7 +7,7 @@ const { PASSWORDS_DO_NOT_MATCH_MESSAGE } = require("../../messages"),
|
|
|
7
7
|
|
|
8
8
|
const { prompt } = shellUtilities;
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function confirmNewPasswordPromptOperation(proceed, abort, context) {
|
|
11
11
|
const { newPassword } = context,
|
|
12
12
|
hidden = true,
|
|
13
13
|
description = CONFIRM_NEW_PASSWORD_DESCRIPTION,
|
|
@@ -39,4 +39,4 @@ function confirmNewPasswordPromptCallback(proceed, abort, context) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
module.exports =
|
|
42
|
+
module.exports = confirmNewPasswordPromptOperation;
|
|
@@ -7,7 +7,7 @@ const { CONFIRM_PASSWORD_DESCRIPTION } = require("../../descriptions"),
|
|
|
7
7
|
|
|
8
8
|
const { prompt } = shellUtilities;
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function confirmPasswordPromptOperation(proceed, abort, context) {
|
|
11
11
|
const { password } = context,
|
|
12
12
|
hidden = true,
|
|
13
13
|
description = CONFIRM_PASSWORD_DESCRIPTION,
|
|
@@ -39,4 +39,4 @@ function confirmPasswordPromptCallback(proceed, abort, context) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
module.exports =
|
|
42
|
+
module.exports = confirmPasswordPromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validateConfirmationCode } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function confirmationCodePromptOperation(proceed, abort, context) {
|
|
12
12
|
const hidden = true,
|
|
13
13
|
description = CONFIRMATION_CODE_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_CONFIRMATION_CODE_MESSAGE,
|
|
@@ -38,4 +38,4 @@ function confirmationCodePromptCallback(proceed, abort, context) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
module.exports =
|
|
41
|
+
module.exports = confirmationCodePromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validateEmailAddress } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function emailAddressPromptOperation(proceed, abort, context) {
|
|
12
12
|
const { emailAddress } = context,
|
|
13
13
|
errorMessage = INVALID_EMAIL_ADDRESS_MESSAGE;
|
|
14
14
|
|
|
@@ -50,4 +50,4 @@ function emailAddressPromptCallback(proceed, abort, context) {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
module.exports =
|
|
53
|
+
module.exports = emailAddressPromptOperation;
|
|
@@ -10,7 +10,7 @@ const { validateGitHubHostName } = require("../../utilities/validate"),
|
|
|
10
10
|
|
|
11
11
|
const { prompt } = shellUtilities;
|
|
12
12
|
|
|
13
|
-
function
|
|
13
|
+
function gitHubHostNamePromptOperation(proceed, abort, context) {
|
|
14
14
|
const { useSSH } = context;
|
|
15
15
|
|
|
16
16
|
if (!useSSH) {
|
|
@@ -51,4 +51,4 @@ function gitHubHostNamePromptCallback(proceed, abort, context) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
module.exports =
|
|
54
|
+
module.exports = gitHubHostNamePromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validateEmailAddress } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function newEmailAddressPromptOperation(proceed, abort, context) {
|
|
12
12
|
const hidden = false,
|
|
13
13
|
description = NEW_EMAIL_ADDRESS_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_EMAIL_ADDRESS_MESSAGE,
|
|
@@ -38,4 +38,4 @@ function newEmailAddressPromptCallback(proceed, abort, context) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
module.exports =
|
|
41
|
+
module.exports = newEmailAddressPromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validatePassword } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function newPasswordPromptOperation(proceed, abort, context) {
|
|
12
12
|
const hidden = true,
|
|
13
13
|
description = NEW_PASSWORD_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_PASSWORD_MESSAGE,
|
|
@@ -38,4 +38,4 @@ function newPasswordPromptCallback(proceed, abort, context) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
module.exports =
|
|
41
|
+
module.exports = newPasswordPromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validatePassword } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function passwordPromptOperation(proceed, abort, context) {
|
|
12
12
|
const hidden = true,
|
|
13
13
|
description = PASSWORD_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_PASSWORD_MESSAGE,
|
|
@@ -38,4 +38,4 @@ function passwordPromptCallback(proceed, abort, context) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
module.exports =
|
|
41
|
+
module.exports = passwordPromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validateReleaseName } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function releaseNamePromptOperation(proceed, abort, context) {
|
|
12
12
|
const { releaseName } = context,
|
|
13
13
|
errorMessage = INVALID_RELEASE_NAME_MESSAGE;
|
|
14
14
|
|
|
@@ -50,4 +50,4 @@ function releaseNamePromptCallback(proceed, abort, context) {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
module.exports =
|
|
53
|
+
module.exports = releaseNamePromptOperation;
|
|
@@ -9,7 +9,7 @@ const { validateAnswer } = require("../../utilities/validate"),
|
|
|
9
9
|
|
|
10
10
|
const { prompt } = shellUtilities;
|
|
11
11
|
|
|
12
|
-
function
|
|
12
|
+
function useSSHPromptOperation(proceed, abort, context) {
|
|
13
13
|
const description = USE_SSH_DESCRIPTION,
|
|
14
14
|
errorMessage = INVALID_ANSWER_MESSAGE,
|
|
15
15
|
validationFunction = validateAnswer, ///
|
|
@@ -39,4 +39,4 @@ function useSSHPromptCallback(proceed, abort, context) {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
module.exports =
|
|
42
|
+
module.exports = useSSHPromptOperation;
|
|
@@ -8,7 +8,7 @@ const { validateUsername } = require("../../utilities/validate"),
|
|
|
8
8
|
|
|
9
9
|
const { prompt } = shellUtilities;
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function usernamePromptOperation(proceed, abort, context) {
|
|
12
12
|
const { username } = context,
|
|
13
13
|
errorMessage = INVALID_USERNAME_MESSAGE;
|
|
14
14
|
|
|
@@ -50,4 +50,4 @@ function usernamePromptCallback(proceed, abort, context) {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
module.exports =
|
|
53
|
+
module.exports = usernamePromptOperation;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { retrieveAccessToken } = require("../configuration"),
|
|
4
4
|
{ NOT_LOGGED_IN_MESSAGE } = require("../messages");
|
|
5
5
|
|
|
6
|
-
function
|
|
6
|
+
function retrieveAccessTokenOperation(proceed, abort, context) {
|
|
7
7
|
const accessToken = retrieveAccessToken();
|
|
8
8
|
|
|
9
9
|
if (!accessToken) {
|
|
@@ -21,4 +21,4 @@ function retrieveAccessTokenCallback(proceed, abort, context) {
|
|
|
21
21
|
proceed();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
module.exports =
|
|
24
|
+
module.exports = retrieveAccessTokenOperation;
|
|
@@ -4,18 +4,18 @@ const { asynchronousUtilities } = require("necessary");
|
|
|
4
4
|
|
|
5
5
|
const { whilst } = asynchronousUtilities;
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function executeOperations(operations, callback, context) {
|
|
8
8
|
const completed = true;
|
|
9
9
|
|
|
10
10
|
Object.assign(context, {
|
|
11
|
-
|
|
11
|
+
operations,
|
|
12
12
|
completed
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
whilst(
|
|
15
|
+
whilst(executeOperation, () => {
|
|
16
16
|
const { completed } = context;
|
|
17
17
|
|
|
18
|
-
delete context.
|
|
18
|
+
delete context.operations;
|
|
19
19
|
|
|
20
20
|
delete context.completed;
|
|
21
21
|
|
|
@@ -24,13 +24,13 @@ function executeCallbacks(callbacks, callback, context) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
module.exports = {
|
|
27
|
-
|
|
27
|
+
executeOperations
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
function
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
lastIndex =
|
|
30
|
+
function executeOperation(next, done, context, index) {
|
|
31
|
+
const { operations } = context,
|
|
32
|
+
operationsLength = operations.length,
|
|
33
|
+
lastIndex = operationsLength - 1;
|
|
34
34
|
|
|
35
35
|
if (index > lastIndex) {
|
|
36
36
|
done();
|
|
@@ -38,9 +38,9 @@ function executeCallback(next, done, context, index) {
|
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const operation = operations[index];
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
operation(proceed, abort, context);
|
|
44
44
|
|
|
45
45
|
function proceed() {
|
|
46
46
|
next();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "occam-open-cli",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.36",
|
|
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.15",
|
|
14
14
|
"mkdirp": "^0.5.1",
|
|
15
|
-
"necessary": "^10.0.
|
|
15
|
+
"necessary": "^10.0.4",
|
|
16
16
|
"occam-parsers": "^14.0.57"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|