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.
Files changed (59) hide show
  1. package/README.md +7 -17
  2. package/bin/action/clone.js +15 -24
  3. package/bin/action/createAccount.js +41 -0
  4. package/bin/action/deprecate.js +13 -14
  5. package/bin/action/help.js +4 -14
  6. package/bin/action/initialise.js +12 -2
  7. package/bin/action/install.js +6 -6
  8. package/bin/action/publish.js +12 -11
  9. package/bin/action/resetPassword.js +11 -13
  10. package/bin/action/setOptions.js +10 -26
  11. package/bin/action/signIn.js +37 -0
  12. package/bin/action/signOut.js +16 -0
  13. package/bin/actions.js +11 -26
  14. package/bin/commands.js +8 -18
  15. package/bin/configuration/version_1_5.js +1 -22
  16. package/bin/configuration/version_2_0.js +1 -16
  17. package/bin/configuration/version_5_0.js +42 -0
  18. package/bin/configuration.js +26 -21
  19. package/bin/constants.js +2 -0
  20. package/bin/defaults.js +3 -3
  21. package/bin/descriptions.js +2 -8
  22. package/bin/messages.js +24 -50
  23. package/bin/operation/checkMetaJSONFileExists.js +0 -4
  24. package/bin/operation/checkReadmeFileExists.js +0 -4
  25. package/bin/{cloneRepository.js → operation/clone.js} +12 -8
  26. package/bin/operation/createAccount.js +33 -0
  27. package/bin/operation/createRelease.js +1 -4
  28. package/bin/operation/deflateRelease.js +1 -1
  29. package/bin/operation/deprecate.js +23 -0
  30. package/bin/operation/getIdentityToken.js +21 -0
  31. package/bin/operation/prompt/areYouSure.js +5 -5
  32. package/bin/operation/prompt/emailAddressOrUsername.js +53 -0
  33. package/bin/operation/prompt/useSSH.js +4 -4
  34. package/bin/operation/publish.js +24 -0
  35. package/bin/operation/repository.js +29 -0
  36. package/bin/operation/resetPassword.js +19 -0
  37. package/bin/operation/setIdentityToken.js +13 -0
  38. package/bin/operation/setOptions.js +25 -0
  39. package/bin/operation/signIn.js +32 -0
  40. package/bin/post.js +16 -49
  41. package/bin/uris.js +5 -15
  42. package/bin/utilities/validate.js +21 -4
  43. package/bin/versions.js +4 -2
  44. package/package.json +2 -2
  45. package/bin/action/changeEmailAddress.js +0 -38
  46. package/bin/action/changePassword.js +0 -42
  47. package/bin/action/confirmEmailAddress.js +0 -36
  48. package/bin/action/login.js +0 -41
  49. package/bin/action/logout.js +0 -26
  50. package/bin/action/register.js +0 -40
  51. package/bin/action/remove.js +0 -9
  52. package/bin/action/resendConfirmationCode.js +0 -32
  53. package/bin/action.js +0 -19
  54. package/bin/configuration/unversioned.js +0 -24
  55. package/bin/operation/prompt/confirmNewPassword.js +0 -42
  56. package/bin/operation/prompt/confirmationCode.js +0 -41
  57. package/bin/operation/prompt/newEmailAddress.js +0 -41
  58. package/bin/operation/prompt/newPassword.js +0 -41
  59. package/bin/operation/retrieveAccessToken.js +0 -24
package/README.md CHANGED
@@ -37,36 +37,26 @@ These are the commands and options:
37
37
  Commands:
38
38
 
39
39
  [help] Show this help
40
-
40
+
41
41
  [install] <package_name> Install a package
42
42
 
43
43
  initialise Create a configuration file
44
44
 
45
45
  clone <package_name> Clone a package with Git
46
46
 
47
- remove <package_name> Remove a package
48
-
49
47
  publish <package_name> Publish a package
50
48
 
51
49
  deprecate <package_name> Deprecate a package
52
50
 
53
- register [<email_address>] Register
54
-
55
- login [<email_address>] Log in
56
-
57
- logout Log out
58
-
59
- set-options Set options
60
-
61
- reset-password [<username>] Reset your password
62
-
63
- change-password [<username>] Change your password
51
+ create-account [<email_address>] Create an account
52
+
53
+ sign-in [<email_address_or_username>] Sign in
64
54
 
65
- change-email-address [<username>] Change your email address
55
+ sign-out Sign out
66
56
 
67
- confirm-email-address [<email_address>] Confirm your email address
57
+ set-options Set options
68
58
 
69
- resend-confirmation-code [<email_address>] Resend a confirmation code
59
+ reset-password [<email_address>] Reset your password
70
60
 
71
61
  Options:
72
62
 
@@ -1,41 +1,32 @@
1
1
  "use strict";
2
2
 
3
- const action = require("../action"),
4
- cloneRepository = require("../cloneRepository"),
3
+ const cloneOperation = require("../operation/clone"),
4
+ repositoryOperation = require("../operation/repository"),
5
5
  releaseNamePromptOperation = require("../operation/prompt/releaseName");
6
6
 
7
- const { CLONE_API_URI } = require("../uris"),
8
- { FAILED_CLONE_MESSAGE, SUCCESSFUL_CLONE_MESSAGE } = require("../messages");
7
+ const { executeOperations } = require("../utilities/operation"),
8
+ { SUCCESSFUL_CLONE_MESSAGE, FAILED_CLONE_MESSAGE } = require("../messages");
9
9
 
10
10
  function clone(argument) {
11
11
  const releaseName = argument, ///
12
- name = releaseName, ///
13
- uri = CLONE_API_URI,
14
12
  operations = [
15
- releaseNamePromptOperation
13
+ releaseNamePromptOperation,
14
+ repositoryOperation,
15
+ cloneOperation
16
16
  ],
17
17
  context = {
18
- name
18
+ releaseName
19
19
  };
20
20
 
21
- action(operations, uri, (json) => {
22
- const { exists } = json;
21
+ executeOperations(operations, (completed) => {
22
+ const success = completed, ///
23
+ message = success ?
24
+ SUCCESSFUL_CLONE_MESSAGE :
25
+ FAILED_CLONE_MESSAGE;
23
26
 
24
- if (!exists) {
25
- console.log(FAILED_CLONE_MESSAGE);
27
+ console.log(message);
26
28
 
27
- process.exit(1);
28
- }
29
-
30
- const { repository } = json;
31
-
32
- cloneRepository(repository, (success) => {
33
- success ?
34
- console.log(SUCCESSFUL_CLONE_MESSAGE) :
35
- console.log(FAILED_CLONE_MESSAGE);
36
-
37
- process.exit();
38
- });
29
+ process.exit();
39
30
  }, context);
40
31
  }
41
32
 
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ const createAccountOperation = require("../operation/createAccount"),
4
+ passwordPromptOperation = require("../operation/prompt/password"),
5
+ usernamePromptOperation = require("../operation/prompt/username"),
6
+ setIdentityTokenOperation = require("../operation/setIdentityToken"),
7
+ emailAddressPromptOperation = require("../operation/prompt/emailAddress");
8
+
9
+ const { executeOperations } = require("../utilities/operation"),
10
+ { FAILED_CREATE_ACCOUNT_MESSAGE, SUCCESSFUL_CREATE_ACCOUNT_MESSAGE } = require("../messages");
11
+
12
+ function createAccount(argument) {
13
+ const emailAddress = argument, ///
14
+ username = null,
15
+ password = null,
16
+ operations = [
17
+ emailAddressPromptOperation,
18
+ usernamePromptOperation,
19
+ passwordPromptOperation,
20
+ createAccountOperation,
21
+ setIdentityTokenOperation
22
+ ],
23
+ context = {
24
+ emailAddress,
25
+ username,
26
+ password
27
+ };
28
+
29
+ executeOperations(operations, (completed) => {
30
+ const success = completed, ///
31
+ message = success ?
32
+ SUCCESSFUL_CREATE_ACCOUNT_MESSAGE :
33
+ FAILED_CREATE_ACCOUNT_MESSAGE;
34
+
35
+ console.log(message);
36
+
37
+ process.exit();
38
+ }, context);
39
+ }
40
+
41
+ module.exports = createAccount;
@@ -1,35 +1,34 @@
1
1
  "use strict";
2
2
 
3
- const action = require("../action"),
4
- passwordPromptOperation = require("../operation/prompt/password"),
3
+ const deprecateOperation = require("../operation/deprecate"),
5
4
  areYouSurePromptOperation = require("../operation/prompt/areYouSure"),
6
- releaseNamePromptOperation = require("../operation/prompt/releaseName"),
7
- retrieveAccessTokenOperation = require("../operation/retrieveAccessToken");
5
+ getIdentityTokenOperation = require("../operation/getIdentityToken"),
6
+ releaseNamePromptOperation = require("../operation/prompt/releaseName");
8
7
 
9
- const { DEPRECATE_API_URI } = require("../uris"),
8
+ const { executeOperations } = require("../utilities/operation"),
10
9
  { FAILED_DEPRECATE_MESSAGE, SUCCESSFUL_DEPRECATE_MESSAGE } = require("../messages");
11
10
 
12
11
  function deprecate(argument) {
13
12
  const releaseName = argument, ///
14
13
  password = null,
15
- uri = DEPRECATE_API_URI,
16
14
  operations = [
17
- retrieveAccessTokenOperation,
15
+ getIdentityTokenOperation,
18
16
  releaseNamePromptOperation,
19
- passwordPromptOperation,
20
- areYouSurePromptOperation
17
+ areYouSurePromptOperation,
18
+ deprecateOperation
21
19
  ],
22
20
  context = {
23
21
  password,
24
22
  releaseName
25
23
  };
26
24
 
27
- action(operations, uri, (json) => {
28
- const { success } = json;
25
+ executeOperations(operations, (completed) => {
26
+ const success = completed, ///
27
+ message = success ?
28
+ SUCCESSFUL_DEPRECATE_MESSAGE :
29
+ FAILED_DEPRECATE_MESSAGE;
29
30
 
30
- success ?
31
- console.log(SUCCESSFUL_DEPRECATE_MESSAGE) :
32
- console.log(FAILED_DEPRECATE_MESSAGE);
31
+ console.log(message);
33
32
 
34
33
  process.exit();
35
34
  }, context);
@@ -15,30 +15,20 @@ Commands:
15
15
 
16
16
  clone <package_name> Clone a package with Git
17
17
 
18
- remove <package_name> Remove a package
19
-
20
18
  publish <package_name> Publish a package
21
19
 
22
20
  deprecate <package_name> Deprecate a package
23
21
 
24
- register [<email_address>] Register
22
+ create-account [<email_address>] Create an account
25
23
 
26
- login [<email_address>] Log in
24
+ sign-in [<email_address_or_username>] Sign in
27
25
 
28
- logout Log out
26
+ sign-out Sign out
29
27
 
30
28
  set-options Set options
31
29
 
32
- reset-password [<username>] Reset your password
33
-
34
- change-password [<username>] Change your password
35
-
36
- change-email-address [<username>] Change your email address
37
-
38
- confirm-email-address [<email_address>] Confirm your email address
30
+ reset-password [<email_address>] Reset your password
39
31
 
40
- resend-confirmation-code [<email_address>] Resend a confirmation code
41
-
42
32
  Options:
43
33
 
44
34
  --version|-v Show the version
@@ -4,15 +4,25 @@ const { checkConfigurationFileExists, createConfigurationFile } = require("../co
4
4
  { FAILED_INITIALISE_MESSAGE, SUCCESSFUL_INITIALISE_MESSAGE } = require("../messages");
5
5
 
6
6
  function initialise() {
7
+ let success;
8
+
7
9
  const configurationFileExists = checkConfigurationFileExists();
8
10
 
9
11
  if (configurationFileExists) {
10
- console.log(FAILED_INITIALISE_MESSAGE);
12
+ success = false;
11
13
  } else {
12
14
  createConfigurationFile();
13
15
 
14
- console.log(SUCCESSFUL_INITIALISE_MESSAGE);
16
+ success = true;
15
17
  }
18
+
19
+ const message = success ?
20
+ SUCCESSFUL_INITIALISE_MESSAGE :
21
+ FAILED_INITIALISE_MESSAGE;
22
+
23
+ console.log(message);
24
+
25
+ process.exit();
16
26
  }
17
27
 
18
28
  module.exports = initialise;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ const { INSTALL_MESSAGE } = require("../messages");
4
+
3
5
  function install(argument) {
4
- if (argument === null) {
5
- console.log("You need to specify a package name.")
6
- } else {
7
- const releaseName = argument; ///
6
+ const message = INSTALL_MESSAGE;
7
+
8
+ console.log(message);
8
9
 
9
- console.log("This functionality is not implemented yet.");
10
- }
10
+ process.exit();
11
11
  }
12
12
 
13
13
  module.exports = install;
@@ -1,37 +1,38 @@
1
1
  "use strict";
2
2
 
3
- const action = require("../action"),
3
+ const publishOperation = require("../operation/publish"),
4
4
  createReleaseOperation = require("../operation/createRelease"),
5
5
  deflateReleaseOperation = require("../operation/deflateRelease"),
6
+ getIdentityTokenOperation = require("../operation/getIdentityToken"),
6
7
  releaseNamePromptOperation = require("../operation/prompt/releaseName"),
7
- retrieveAccessTokenOperation = require("../operation/retrieveAccessToken"),
8
8
  checkReadmeFileExistsOperation = require("../operation/checkReadmeFileExists"),
9
9
  checkMetaJSONFileExistsOperation = require("../operation/checkMetaJSONFileExists");
10
10
 
11
- const { PUBLISH_API_URI } = require("../uris"),
11
+ const { executeOperations } = require("../utilities/operation"),
12
12
  { FAILED_PUBLISH_MESSAGE, SUCCESSFUL_PUBLISH_MESSAGE } = require("../messages");
13
13
 
14
14
  function publish(argument) {
15
15
  const releaseName = argument, ///
16
- uri = PUBLISH_API_URI,
17
16
  operations = [
18
- retrieveAccessTokenOperation,
17
+ getIdentityTokenOperation,
19
18
  releaseNamePromptOperation,
20
19
  createReleaseOperation,
21
20
  checkReadmeFileExistsOperation,
22
21
  checkMetaJSONFileExistsOperation,
23
- deflateReleaseOperation
22
+ deflateReleaseOperation,
23
+ publishOperation
24
24
  ],
25
25
  context = {
26
26
  releaseName
27
27
  };
28
28
 
29
- action(operations, uri, (json) => {
30
- const { success } = json;
29
+ executeOperations(operations, (completed) => {
30
+ const success = completed, ///
31
+ message = success ?
32
+ SUCCESSFUL_PUBLISH_MESSAGE :
33
+ FAILED_PUBLISH_MESSAGE;
31
34
 
32
- success ?
33
- console.log(SUCCESSFUL_PUBLISH_MESSAGE) :
34
- console.log(FAILED_PUBLISH_MESSAGE);
35
+ console.log(message);
35
36
 
36
37
  process.exit();
37
38
  }, context);
@@ -1,27 +1,25 @@
1
1
  "use strict";
2
2
 
3
- const action = require("../action"),
4
- usernamePromptOperation = require("../operation/prompt/username");
3
+ const resetPasswordOperation = require("../operation/resetPassword"),
4
+ emailAddressPromptOperation = require("../operation/prompt/emailAddress");
5
5
 
6
- const { RESET_PASSWORD_API_URI } = require("../uris"),
7
- { FAILED_RESET_PASSWORD_MESSAGE, SUCCESSFUL_RESET_PASSWORD_MESSAGE } = require("../messages");
6
+ const { executeOperations } = require("../utilities/operation"),
7
+ { RESET_PASSWORD_MESSAGE } = require("../messages");
8
8
 
9
9
  function resetPassword(argument) {
10
- const username = argument, ///
11
- uri = RESET_PASSWORD_API_URI,
10
+ const emailAddress = argument, ///
12
11
  operations = [
13
- usernamePromptOperation
12
+ emailAddressPromptOperation,
13
+ resetPasswordOperation
14
14
  ],
15
15
  context = {
16
- username
16
+ emailAddress
17
17
  };
18
18
 
19
- action(operations, uri, (json) => {
20
- const { success } = json;
19
+ executeOperations(operations, (completed) => {
20
+ const message = RESET_PASSWORD_MESSAGE;
21
21
 
22
- success ?
23
- console.log(SUCCESSFUL_RESET_PASSWORD_MESSAGE) :
24
- console.log(FAILED_RESET_PASSWORD_MESSAGE);
22
+ console.log(message);
25
23
 
26
24
  process.exit();
27
25
  }, context);
@@ -1,43 +1,27 @@
1
1
  "use strict";
2
2
 
3
- const useSSHPromptOperation = require("../operation/prompt/useSSH"),
3
+ const setOptionsOperation = require("../operation/setOptions"),
4
+ useSSHPromptOperation = require("../operation/prompt/useSSH"),
4
5
  gitHubHostNamePromptOperation = require("../operation/prompt/gitHubHostName");
5
6
 
6
- const { updateOptions } = require("../configuration"),
7
- { executeOperations } = require("../utilities/operation"),
7
+ const { executeOperations } = require("../utilities/operation"),
8
8
  { FAILED_SET_OPTIONS_MESSAGE, SUCCESSFUL_SET_OPTIONS_MESSAGE } = require("../messages");
9
9
 
10
10
  function setOptions() {
11
11
  const operations = [
12
12
  useSSHPromptOperation,
13
- gitHubHostNamePromptOperation
13
+ gitHubHostNamePromptOperation,
14
+ setOptionsOperation
14
15
  ],
15
16
  context = {};
16
17
 
17
18
  executeOperations(operations, (completed) => {
18
- if (!completed) {
19
- console.log(FAILED_SET_OPTIONS_MESSAGE);
19
+ const success = completed, ///
20
+ message = success ?
21
+ SUCCESSFUL_SET_OPTIONS_MESSAGE :
22
+ FAILED_SET_OPTIONS_MESSAGE;
20
23
 
21
- process.exit(1);
22
- }
23
-
24
- const { useSSH } = context,
25
- options = {};
26
-
27
- if (useSSH) {
28
- const { gitHubHostName } = context,
29
- ssh = {
30
- gitHubHostName
31
- };
32
-
33
- Object.assign(options, {
34
- ssh
35
- });
36
- }
37
-
38
- updateOptions(options);
39
-
40
- console.log(SUCCESSFUL_SET_OPTIONS_MESSAGE);
24
+ console.log(message);
41
25
 
42
26
  process.exit();
43
27
  }, context);
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ const signInOperation = require("../operation/signIn"),
4
+ passwordPromptOperation = require("../operation/prompt/password"),
5
+ setIdentityTokenOperation = require("../operation/setIdentityToken"),
6
+ emailAddressOrUsernamePromptOperation = require("../operation/prompt/emailAddressOrUsername");
7
+
8
+ const { executeOperations } = require("../utilities/operation"),
9
+ { FAILED_SIGN_IN_MESSAGE, SUCCESSFUL_SIGN_IN_MESSAGE } = require("../messages");
10
+
11
+ function signIn(argument) {
12
+ const emailAddressOrUsername = argument, ///
13
+ password = null,
14
+ operations = [
15
+ emailAddressOrUsernamePromptOperation,
16
+ passwordPromptOperation,
17
+ signInOperation,
18
+ setIdentityTokenOperation
19
+ ],
20
+ context = {
21
+ emailAddressOrUsername,
22
+ password
23
+ };
24
+
25
+ executeOperations(operations, (completed) => {
26
+ const success = completed, ///
27
+ message = success ?
28
+ SUCCESSFUL_SIGN_IN_MESSAGE :
29
+ FAILED_SIGN_IN_MESSAGE;
30
+
31
+ console.log(message);
32
+
33
+ process.exit();
34
+ }, context);
35
+ }
36
+
37
+ module.exports = signIn;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ const { SIGN_OUT_MESSAGE } = require("../messages"),
4
+ { removeIdentityToken } = require("../configuration");
5
+
6
+ function signOut() {
7
+ const message = SIGN_OUT_MESSAGE;
8
+
9
+ removeIdentityToken();
10
+
11
+ console.log(message);
12
+
13
+ process.exit();
14
+ }
15
+
16
+ module.exports = signOut;
package/bin/actions.js CHANGED
@@ -2,40 +2,30 @@
2
2
 
3
3
  const help = require("./action/help"),
4
4
  clone = require("./action/clone"),
5
- login = require("./action/login"),
6
- logout = require("./action/logout"),
7
- remove = require("./action/remove"),
5
+ signIn = require("./action/signIn"),
6
+ signOut = require("./action/signOut"),
8
7
  version = require("./action/version"),
9
8
  install = require("./action/install"),
10
9
  publish = require("./action/publish"),
11
- register = require("./action/register"),
12
10
  deprecate = require("./action/deprecate"),
13
11
  initialise = require("./action/initialise"),
14
12
  setOptions = require("./action/setOptions"),
15
- resetPassword = require("./action/resetPassword"),
16
- changePassword = require("./action/changePassword"),
17
- changeEmailAddress = require("./action/changeEmailAddress"),
18
- confirmEmailAddress = require("./action/confirmEmailAddress"),
19
- resendConfirmationCode = require("./action/resendConfirmationCode");
13
+ createAccount = require("./action/createAccount"),
14
+ resetPassword = require("./action/resetPassword");
20
15
 
21
16
  const { HELP_OPTION, VERSION_OPTION } = require("./options"),
22
17
  { HELP_COMMAND,
23
18
  CLONE_COMMAND,
24
- LOGIN_COMMAND,
25
- LOGOUT_COMMAND,
26
- REMOVE_COMMAND,
27
19
  VERSION_COMMAND,
28
20
  INSTALL_COMMAND,
29
21
  PUBLISH_COMMAND,
30
- REGISTER_COMMAND,
22
+ SIGN_IN_COMMAND,
23
+ SIGN_OUT_COMMAND,
31
24
  DEPRECATE_COMMAND,
32
25
  INITIALISE_COMMAND,
33
26
  SET_OPTIONS_COMMAND,
34
- RESET_PASSWORD_COMMAND,
35
- CHANGE_PASSWORD_COMMAND,
36
- CHANGE_EMAIL_ADDRESS_COMMAND,
37
- CONFIRM_EMAIL_ADDRESS_COMMAND,
38
- RESEND_CONFIRMATION_CODE_COMMAND } = require("./commands");
27
+ CREATE_ACCOUNT_COMMAND,
28
+ RESET_PASSWORD_COMMAND } = require("./commands");
39
29
 
40
30
  function actions(command, argument, options) {
41
31
  const commandMissing = (command === null),
@@ -53,21 +43,16 @@ function actions(command, argument, options) {
53
43
  switch (command) {
54
44
  case HELP_COMMAND : help(); break;
55
45
  case CLONE_COMMAND : clone(argument); break;
56
- case LOGIN_COMMAND : login(argument); break;
57
- case LOGOUT_COMMAND : logout(); break;
58
- case REMOVE_COMMAND : remove(argument); break;
59
46
  case VERSION_COMMAND : version(); break;
60
47
  case INSTALL_COMMAND : install(argument); break;
61
48
  case PUBLISH_COMMAND : publish(argument); break;
62
- case REGISTER_COMMAND : register(argument); break;
49
+ case SIGN_IN_COMMAND : signIn(argument); break;
50
+ case SIGN_OUT_COMMAND : signOut(); break;
63
51
  case DEPRECATE_COMMAND : deprecate(argument); break;
64
52
  case INITIALISE_COMMAND : initialise(); break;
65
53
  case SET_OPTIONS_COMMAND : setOptions(); break;
54
+ case CREATE_ACCOUNT_COMMAND : createAccount(argument); break;
66
55
  case RESET_PASSWORD_COMMAND : resetPassword(argument); break;
67
- case CHANGE_PASSWORD_COMMAND : changePassword(argument); break;
68
- case CHANGE_EMAIL_ADDRESS_COMMAND : changeEmailAddress(argument); break;
69
- case CONFIRM_EMAIL_ADDRESS_COMMAND : confirmEmailAddress(argument); break;
70
- case RESEND_CONFIRMATION_CODE_COMMAND : resendConfirmationCode(argument); break;
71
56
 
72
57
  default :
73
58
  argument = command; ///
package/bin/commands.js CHANGED
@@ -2,38 +2,28 @@
2
2
 
3
3
  const HELP_COMMAND = "help",
4
4
  CLONE_COMMAND = "clone",
5
- LOGIN_COMMAND = "login",
6
- LOGOUT_COMMAND = "logout",
7
- REMOVE_COMMAND = "remove",
8
5
  VERSION_COMMAND = "version",
9
6
  INSTALL_COMMAND = "install",
10
7
  PUBLISH_COMMAND = "publish",
11
- REGISTER_COMMAND = "register",
8
+ SIGN_IN_COMMAND = "sign-in",
9
+ SIGN_OUT_COMMAND = "sign-out",
12
10
  DEPRECATE_COMMAND = "deprecate",
13
11
  INITIALISE_COMMAND = "initialise",
14
12
  SET_OPTIONS_COMMAND = "set-options",
15
- RESET_PASSWORD_COMMAND = "reset-password",
16
- CHANGE_PASSWORD_COMMAND = "change-password",
17
- CHANGE_EMAIL_ADDRESS_COMMAND = "change-email-address",
18
- CONFIRM_EMAIL_ADDRESS_COMMAND = "confirm-email-address",
19
- RESEND_CONFIRMATION_CODE_COMMAND = "resend-confirmation-code";
13
+ CREATE_ACCOUNT_COMMAND = "create-account",
14
+ RESET_PASSWORD_COMMAND = "reset-password";
20
15
 
21
16
  module.exports = {
22
17
  HELP_COMMAND,
23
18
  CLONE_COMMAND,
24
- LOGIN_COMMAND,
25
- LOGOUT_COMMAND,
26
- REMOVE_COMMAND,
27
19
  VERSION_COMMAND,
28
20
  INSTALL_COMMAND,
29
21
  PUBLISH_COMMAND,
30
- REGISTER_COMMAND,
22
+ SIGN_IN_COMMAND,
23
+ SIGN_OUT_COMMAND,
31
24
  DEPRECATE_COMMAND,
32
25
  INITIALISE_COMMAND,
33
26
  SET_OPTIONS_COMMAND,
34
- RESET_PASSWORD_COMMAND,
35
- CHANGE_PASSWORD_COMMAND,
36
- CHANGE_EMAIL_ADDRESS_COMMAND,
37
- CONFIRM_EMAIL_ADDRESS_COMMAND,
38
- RESEND_CONFIRMATION_CODE_COMMAND
27
+ CREATE_ACCOUNT_COMMAND,
28
+ RESET_PASSWORD_COMMAND
39
29
  };
@@ -1,26 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  const { VERSION_1_5 } = require("../versions"),
4
- { DEFAULT_GITHUB_HOST_NAME, DEFAULT_HOST_URL } = require("../defaults");
5
-
6
- function createConfiguration() {
7
- const version = VERSION_1_5, ///
8
- options = {},
9
- hostURL = DEFAULT_HOST_URL, ///
10
- configuration = {
11
- version,
12
- options,
13
- hostURL
14
- } ;
15
-
16
- return configuration;
17
- }
4
+ { DEFAULT_GITHUB_HOST_NAME } = require("../defaults");
18
5
 
19
6
  function migrateConfigurationToVersion_1_5(configuration) {
20
7
  let { options } = configuration;
21
8
 
22
9
  const version = VERSION_1_5, ///
23
- { accessToken } = json,
24
10
  { useSSH, hostURL, hostNameSuffix } = options;
25
11
 
26
12
  options = {};
@@ -42,16 +28,9 @@ function migrateConfigurationToVersion_1_5(configuration) {
42
28
  hostURL
43
29
  };
44
30
 
45
- if (accessToken) {
46
- Object.assign(configuration, {
47
- accessToken
48
- });
49
- }
50
-
51
31
  return configuration;
52
32
  }
53
33
 
54
34
  module.exports = {
55
- createConfiguration,
56
35
  migrateConfigurationToVersion_1_5
57
36
  };