occam-open-cli 4.0.68 → 5.0.1
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/README.md +7 -17
- package/bin/action/clone.js +15 -24
- package/bin/action/createAccount.js +41 -0
- package/bin/action/deprecate.js +13 -14
- package/bin/action/help.js +4 -14
- package/bin/action/initialise.js +12 -2
- package/bin/action/install.js +6 -6
- package/bin/action/publish.js +12 -11
- package/bin/action/resetPassword.js +11 -13
- package/bin/action/setOptions.js +10 -26
- package/bin/action/signIn.js +37 -0
- package/bin/action/signOut.js +16 -0
- package/bin/actions.js +11 -26
- package/bin/commands.js +8 -18
- package/bin/configuration/version_1_5.js +1 -22
- package/bin/configuration/version_2_0.js +1 -16
- package/bin/configuration/version_5_0.js +42 -0
- package/bin/configuration.js +26 -21
- package/bin/constants.js +2 -0
- package/bin/defaults.js +3 -3
- package/bin/descriptions.js +2 -8
- package/bin/messages.js +24 -50
- package/bin/operation/checkMetaJSONFileExists.js +0 -4
- package/bin/operation/checkReadmeFileExists.js +0 -4
- package/bin/{cloneRepository.js → operation/clone.js} +12 -8
- package/bin/operation/createAccount.js +33 -0
- package/bin/operation/createRelease.js +1 -4
- package/bin/operation/deflateRelease.js +1 -1
- package/bin/operation/deprecate.js +23 -0
- package/bin/operation/getIdentityToken.js +21 -0
- package/bin/operation/prompt/areYouSure.js +5 -5
- package/bin/operation/prompt/emailAddressOrUsername.js +53 -0
- package/bin/operation/prompt/useSSH.js +4 -4
- package/bin/operation/publish.js +24 -0
- package/bin/operation/repository.js +29 -0
- package/bin/operation/resetPassword.js +19 -0
- package/bin/operation/setIdentityToken.js +13 -0
- package/bin/operation/setOptions.js +25 -0
- package/bin/operation/signIn.js +32 -0
- package/bin/post.js +16 -49
- package/bin/uris.js +5 -15
- package/bin/utilities/validate.js +21 -4
- package/bin/versions.js +4 -2
- package/package.json +2 -2
- package/bin/action/changeEmailAddress.js +0 -38
- package/bin/action/changePassword.js +0 -42
- package/bin/action/confirmEmailAddress.js +0 -36
- package/bin/action/login.js +0 -41
- package/bin/action/logout.js +0 -26
- package/bin/action/register.js +0 -40
- package/bin/action/remove.js +0 -9
- package/bin/action/resendConfirmationCode.js +0 -32
- package/bin/action.js +0 -19
- package/bin/configuration/unversioned.js +0 -24
- package/bin/operation/prompt/confirmNewPassword.js +0 -42
- package/bin/operation/prompt/confirmationCode.js +0 -41
- package/bin/operation/prompt/newEmailAddress.js +0 -41
- package/bin/operation/prompt/newPassword.js +0 -41
- package/bin/operation/retrieveAccessToken.js +0 -24
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { shellUtilities } = require("necessary");
|
|
4
|
-
|
|
5
|
-
const { PASSWORDS_DO_NOT_MATCH_MESSAGE } = require("../../messages"),
|
|
6
|
-
{ CONFIRM_NEW_PASSWORD_DESCRIPTION } = require("../../descriptions");
|
|
7
|
-
|
|
8
|
-
const { prompt } = shellUtilities;
|
|
9
|
-
|
|
10
|
-
function confirmNewPasswordPromptOperation(proceed, abort, context) {
|
|
11
|
-
const { newPassword } = context,
|
|
12
|
-
hidden = true,
|
|
13
|
-
description = CONFIRM_NEW_PASSWORD_DESCRIPTION,
|
|
14
|
-
errorMessage = PASSWORDS_DO_NOT_MATCH_MESSAGE,
|
|
15
|
-
options = {
|
|
16
|
-
hidden,
|
|
17
|
-
description,
|
|
18
|
-
errorMessage,
|
|
19
|
-
validationFunction
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
prompt(options, (answer) => {
|
|
23
|
-
const newPassword = answer, ///
|
|
24
|
-
valid = (newPassword !== null);
|
|
25
|
-
|
|
26
|
-
if (valid) {
|
|
27
|
-
proceed();
|
|
28
|
-
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
abort();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
function validationFunction(value) {
|
|
36
|
-
const valid = (value === newPassword); ///
|
|
37
|
-
|
|
38
|
-
return valid;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
module.exports = confirmNewPasswordPromptOperation;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { shellUtilities } = require("necessary");
|
|
4
|
-
|
|
5
|
-
const { validateConfirmationCode } = require("../../utilities/validate"),
|
|
6
|
-
{ CONFIRMATION_CODE_DESCRIPTION } = require("../../descriptions"),
|
|
7
|
-
{ INVALID_CONFIRMATION_CODE_MESSAGE } = require("../../messages");
|
|
8
|
-
|
|
9
|
-
const { prompt } = shellUtilities;
|
|
10
|
-
|
|
11
|
-
function confirmationCodePromptOperation(proceed, abort, context) {
|
|
12
|
-
const hidden = true,
|
|
13
|
-
description = CONFIRMATION_CODE_DESCRIPTION,
|
|
14
|
-
errorMessage = INVALID_CONFIRMATION_CODE_MESSAGE,
|
|
15
|
-
validationFunction = validateConfirmationCode, ///
|
|
16
|
-
options = {
|
|
17
|
-
hidden,
|
|
18
|
-
description,
|
|
19
|
-
errorMessage,
|
|
20
|
-
validationFunction
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
prompt(options, (answer) => {
|
|
24
|
-
const confirmationCode = answer, ///
|
|
25
|
-
valid = (confirmationCode !== null);
|
|
26
|
-
|
|
27
|
-
if (valid) {
|
|
28
|
-
Object.assign(context, {
|
|
29
|
-
confirmationCode
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
proceed();
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
abort();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
module.exports = confirmationCodePromptOperation;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { shellUtilities } = require("necessary");
|
|
4
|
-
|
|
5
|
-
const { validateEmailAddress } = require("../../utilities/validate"),
|
|
6
|
-
{ INVALID_EMAIL_ADDRESS_MESSAGE } = require("../../messages"),
|
|
7
|
-
{ NEW_EMAIL_ADDRESS_DESCRIPTION } = require("../../descriptions");
|
|
8
|
-
|
|
9
|
-
const { prompt } = shellUtilities;
|
|
10
|
-
|
|
11
|
-
function newEmailAddressPromptOperation(proceed, abort, context) {
|
|
12
|
-
const hidden = false,
|
|
13
|
-
description = NEW_EMAIL_ADDRESS_DESCRIPTION,
|
|
14
|
-
errorMessage = INVALID_EMAIL_ADDRESS_MESSAGE,
|
|
15
|
-
validationFunction = validateEmailAddress, ///
|
|
16
|
-
options = {
|
|
17
|
-
hidden,
|
|
18
|
-
description,
|
|
19
|
-
errorMessage,
|
|
20
|
-
validationFunction
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
prompt(options, (answer) => {
|
|
24
|
-
const newEmailAddress = answer, ///
|
|
25
|
-
valid = (newEmailAddress !== null);
|
|
26
|
-
|
|
27
|
-
if (valid) {
|
|
28
|
-
Object.assign(context, {
|
|
29
|
-
newEmailAddress
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
proceed();
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
abort();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
module.exports = newEmailAddressPromptOperation;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { shellUtilities } = require("necessary");
|
|
4
|
-
|
|
5
|
-
const { validatePassword } = require("../../utilities/validate"),
|
|
6
|
-
{ INVALID_PASSWORD_MESSAGE } = require("../../messages"),
|
|
7
|
-
{ NEW_PASSWORD_DESCRIPTION } = require("../../descriptions");
|
|
8
|
-
|
|
9
|
-
const { prompt } = shellUtilities;
|
|
10
|
-
|
|
11
|
-
function newPasswordPromptOperation(proceed, abort, context) {
|
|
12
|
-
const hidden = true,
|
|
13
|
-
description = NEW_PASSWORD_DESCRIPTION,
|
|
14
|
-
errorMessage = INVALID_PASSWORD_MESSAGE,
|
|
15
|
-
validationFunction = validatePassword, ///
|
|
16
|
-
options = {
|
|
17
|
-
hidden,
|
|
18
|
-
description,
|
|
19
|
-
errorMessage,
|
|
20
|
-
validationFunction
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
prompt(options, (answer) => {
|
|
24
|
-
const newPassword = answer, ///
|
|
25
|
-
valid = (newPassword !== null);
|
|
26
|
-
|
|
27
|
-
if (valid) {
|
|
28
|
-
Object.assign(context, {
|
|
29
|
-
newPassword
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
proceed();
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
abort();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
module.exports = newPasswordPromptOperation;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { retrieveAccessToken } = require("../configuration"),
|
|
4
|
-
{ NOT_LOGGED_IN_MESSAGE } = require("../messages");
|
|
5
|
-
|
|
6
|
-
function retrieveAccessTokenOperation(proceed, abort, context) {
|
|
7
|
-
const accessToken = retrieveAccessToken();
|
|
8
|
-
|
|
9
|
-
if (!accessToken) {
|
|
10
|
-
console.log(NOT_LOGGED_IN_MESSAGE);
|
|
11
|
-
|
|
12
|
-
abort();
|
|
13
|
-
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
Object.assign(context, {
|
|
18
|
-
accessToken
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
proceed();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = retrieveAccessTokenOperation;
|