@clickview/ship-it 0.0.25 → 0.0.26

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 (109) hide show
  1. package/Dockerfile +33 -0
  2. package/README.md +48 -48
  3. package/config.json +19 -10
  4. package/lib/config.json +20 -11
  5. package/lib/src/api-clients/git-lab/GitLabApiClient.js +404 -404
  6. package/lib/src/api-clients/git-lab/GitLabMapper.js +81 -81
  7. package/lib/src/api-clients/index.js +20 -18
  8. package/lib/src/api-clients/slack/SlackApiClient.js +206 -0
  9. package/lib/src/api-clients/team-city/TeamCityApiClient.js +100 -100
  10. package/lib/src/api-clients/trello/TrelloApiClient.js +145 -0
  11. package/lib/src/commands/BumpPackagesCommand.js +84 -84
  12. package/lib/src/commands/CreateBranchCommand.js +100 -100
  13. package/lib/src/commands/CreateMergeRequestCommand.js +107 -107
  14. package/lib/src/commands/CreateReleaseNotesCommand.js +84 -84
  15. package/lib/src/commands/CreateTestingNotesCommand.js +84 -84
  16. package/lib/src/commands/{StartConsumingProjectBuildsCommand.js → CreateTrelloCardsCommand.js} +77 -76
  17. package/lib/src/commands/InstallPackagesCommand.js +76 -76
  18. package/lib/src/commands/ListProjectsCommand.js +76 -76
  19. package/lib/src/commands/ReleaseCommand.js +129 -129
  20. package/lib/src/commands/StartProjectBuildsCommand.js +76 -76
  21. package/lib/src/commands/StatusCommand.js +88 -88
  22. package/lib/src/commands/TagMasterCommand.js +76 -76
  23. package/lib/src/commands/ValidateMergeRequestCommand.js +76 -76
  24. package/lib/src/commands/VersionCommand.js +76 -76
  25. package/lib/src/commands/index.js +30 -29
  26. package/lib/src/constants/CommandTypeMapping.js +20 -19
  27. package/lib/src/constants/GitLabMemberIds.js +6 -6
  28. package/lib/src/constants/MonorepoPackageJsonFiles.js +17 -17
  29. package/lib/src/constants/MonorepoProjectNames.js +16 -16
  30. package/lib/src/constants/ProjectNames.js +67 -67
  31. package/lib/src/constants/SlackUserEmailList.js +13 -0
  32. package/lib/src/constants/TeamCityBuildIDs.js +44 -44
  33. package/lib/src/constants/index.js +19 -19
  34. package/lib/src/errors/ShipItError.js +32 -32
  35. package/lib/src/errors/index.js +17 -17
  36. package/lib/src/index.js +18 -18
  37. package/lib/src/interfaces/Config.js +2 -2
  38. package/lib/src/interfaces/MergeRequestState.js +2 -2
  39. package/lib/src/interfaces/ProjectNames.js +2 -2
  40. package/lib/src/interfaces/ShipItCommand.js +2 -2
  41. package/lib/src/interfaces/ShipItTask.js +2 -2
  42. package/lib/src/interfaces/VersionType.js +2 -2
  43. package/lib/src/interfaces/command-cli-options/MilestoneCommandCliOptions.js +2 -2
  44. package/lib/src/interfaces/command-cli-options/ReleaseCommandCliOptions.js +2 -2
  45. package/lib/src/interfaces/command-cli-options/StatusCommandCliOptions.js +2 -0
  46. package/lib/src/interfaces/command-cli-options/index.js +19 -18
  47. package/lib/src/interfaces/command-options/BaseCommandOptions.js +2 -2
  48. package/lib/src/interfaces/command-options/BumpPackagesCommandOptions.js +2 -2
  49. package/lib/src/interfaces/command-options/DockerMilestoneCommandOptions.js +2 -2
  50. package/lib/src/interfaces/command-options/MilestoneCommandOptions.js +2 -2
  51. package/lib/src/interfaces/command-options/ReleaseCommandOptions.js +2 -2
  52. package/lib/src/interfaces/command-options/StatusCommandOptions.js +2 -0
  53. package/lib/src/interfaces/command-options/ValidateMRCommandOptions.js +2 -2
  54. package/lib/src/interfaces/command-options/index.js +22 -21
  55. package/lib/src/interfaces/index.js +26 -26
  56. package/lib/src/interfaces/models/Branch.js +2 -2
  57. package/lib/src/interfaces/models/Commit.js +2 -2
  58. package/lib/src/interfaces/models/CommitFile.js +2 -2
  59. package/lib/src/interfaces/models/File.js +2 -2
  60. package/lib/src/interfaces/models/Label.js +2 -2
  61. package/lib/src/interfaces/models/MergeRequest.js +2 -2
  62. package/lib/src/interfaces/models/Milestone.js +2 -2
  63. package/lib/src/interfaces/models/Project.js +2 -2
  64. package/lib/src/interfaces/models/ProjectConfig.js +9 -9
  65. package/lib/src/interfaces/models/Release.js +2 -2
  66. package/lib/src/interfaces/models/Tag.js +2 -2
  67. package/lib/src/interfaces/models/index.js +26 -26
  68. package/lib/src/interfaces/view-models/MilestoneProject.js +2 -2
  69. package/lib/src/interfaces/view-models/index.js +17 -17
  70. package/lib/src/inversify.config.js +75 -67
  71. package/lib/src/services/GitLabService.js +498 -498
  72. package/lib/src/services/SlackService.js +142 -0
  73. package/lib/src/services/TeamCityService.js +37 -37
  74. package/lib/src/services/TrelloService.js +84 -0
  75. package/lib/src/services/index.js +20 -18
  76. package/lib/src/startup/AddMilestoneCommand.js +95 -95
  77. package/lib/src/startup/GetAction.js +68 -68
  78. package/lib/src/startup/SetupCommands.js +166 -128
  79. package/lib/src/tasks/BumpPackagesTask.js +229 -229
  80. package/lib/src/tasks/BumpVersionTxtTask.js +110 -110
  81. package/lib/src/tasks/CommitPackageVersionsTask.js +116 -116
  82. package/lib/src/tasks/CreateBranchTask.js +104 -104
  83. package/lib/src/tasks/CreateMergeRequestTask.js +118 -118
  84. package/lib/src/tasks/CreateReleaseNotesTask.js +144 -122
  85. package/lib/src/tasks/CreateTestingNotesTask.js +135 -135
  86. package/lib/src/tasks/InstallPackagesTask.js +407 -407
  87. package/lib/src/tasks/ListProjectsTask.js +87 -87
  88. package/lib/src/tasks/PopulateTrelloBoardTask.js +140 -0
  89. package/lib/src/tasks/StartMonorepoBuildTask.js +109 -109
  90. package/lib/src/tasks/StartProjectBuildsTask.js +149 -149
  91. package/lib/src/tasks/TagMasterTask.js +121 -121
  92. package/lib/src/tasks/ValidateCommitsTask.js +143 -119
  93. package/lib/src/tasks/ValidateDescriptionsTask.js +178 -151
  94. package/lib/src/tasks/ValidateMergeRequestTask.js +115 -115
  95. package/lib/src/tasks/ValidateTask.js +344 -240
  96. package/lib/src/tasks/VersionTask.js +98 -98
  97. package/lib/src/tasks/index.js +34 -33
  98. package/lib/src/types.js +57 -49
  99. package/lib/src/utils/BranchNames.js +11 -11
  100. package/lib/src/utils/Commits.js +55 -55
  101. package/lib/src/utils/Csv.js +54 -54
  102. package/lib/src/utils/Descriptions.js +237 -237
  103. package/lib/src/utils/GroupIds.js +6 -6
  104. package/lib/src/utils/Logger.js +62 -62
  105. package/lib/src/utils/ProjectIds.js +47 -47
  106. package/lib/src/utils/Versions.js +20 -20
  107. package/lib/src/utils/index.js +22 -22
  108. package/package.json +50 -47
  109. package/lib/src/tasks/StartConsumingProjectBuildsTask.js +0 -149
@@ -1,21 +1,22 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./BumpPackagesCommandOptions"), exports);
18
- __exportStar(require("./DockerMilestoneCommandOptions"), exports);
19
- __exportStar(require("./MilestoneCommandOptions"), exports);
20
- __exportStar(require("./ValidateMRCommandOptions"), exports);
21
- __exportStar(require("./ReleaseCommandOptions"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BumpPackagesCommandOptions"), exports);
18
+ __exportStar(require("./DockerMilestoneCommandOptions"), exports);
19
+ __exportStar(require("./MilestoneCommandOptions"), exports);
20
+ __exportStar(require("./ValidateMRCommandOptions"), exports);
21
+ __exportStar(require("./ReleaseCommandOptions"), exports);
22
+ __exportStar(require("./StatusCommandOptions"), exports);
@@ -1,26 +1,26 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./command-cli-options"), exports);
18
- __exportStar(require("./command-options"), exports);
19
- __exportStar(require("./models"), exports);
20
- __exportStar(require("./view-models"), exports);
21
- __exportStar(require("./Config"), exports);
22
- __exportStar(require("./MergeRequestState"), exports);
23
- __exportStar(require("./ShipItCommand"), exports);
24
- __exportStar(require("./ShipItTask"), exports);
25
- __exportStar(require("./VersionType"), exports);
26
- __exportStar(require("./ProjectNames"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./command-cli-options"), exports);
18
+ __exportStar(require("./command-options"), exports);
19
+ __exportStar(require("./models"), exports);
20
+ __exportStar(require("./view-models"), exports);
21
+ __exportStar(require("./Config"), exports);
22
+ __exportStar(require("./MergeRequestState"), exports);
23
+ __exportStar(require("./ShipItCommand"), exports);
24
+ __exportStar(require("./ShipItTask"), exports);
25
+ __exportStar(require("./VersionType"), exports);
26
+ __exportStar(require("./ProjectNames"), exports);
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultProjectConfig = void 0;
4
- exports.DefaultProjectConfig = {
5
- monorepo: {
6
- enabled: false,
7
- validSubProjects: []
8
- }
9
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultProjectConfig = void 0;
4
+ exports.DefaultProjectConfig = {
5
+ monorepo: {
6
+ enabled: false,
7
+ validSubProjects: []
8
+ }
9
+ };
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +1,26 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Branch"), exports);
18
- __exportStar(require("./Commit"), exports);
19
- __exportStar(require("./CommitFile"), exports);
20
- __exportStar(require("./File"), exports);
21
- __exportStar(require("./Label"), exports);
22
- __exportStar(require("./MergeRequest"), exports);
23
- __exportStar(require("./Milestone"), exports);
24
- __exportStar(require("./Project"), exports);
25
- __exportStar(require("./Release"), exports);
26
- __exportStar(require("./Tag"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Branch"), exports);
18
+ __exportStar(require("./Commit"), exports);
19
+ __exportStar(require("./CommitFile"), exports);
20
+ __exportStar(require("./File"), exports);
21
+ __exportStar(require("./Label"), exports);
22
+ __exportStar(require("./MergeRequest"), exports);
23
+ __exportStar(require("./Milestone"), exports);
24
+ __exportStar(require("./Project"), exports);
25
+ __exportStar(require("./Release"), exports);
26
+ __exportStar(require("./Tag"), exports);
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +1,17 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./MilestoneProject"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./MilestoneProject"), exports);
@@ -1,67 +1,75 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createContainer = void 0;
4
- var inversify_1 = require("inversify");
5
- var api_clients_1 = require("./api-clients");
6
- var services_1 = require("./services");
7
- var commands_1 = require("./commands");
8
- var tasks_1 = require("./tasks");
9
- var types_1 = require("./types");
10
- function createContainer(config) {
11
- var container = new inversify_1.Container();
12
- /**
13
- * Misc
14
- */
15
- container.bind(types_1.MISC.GitLabConfig).toConstantValue(config.gitLab);
16
- container.bind(types_1.MISC.TeamCityConfig).toConstantValue(config.teamCity);
17
- /**
18
- * Clients
19
- */
20
- container.bind(types_1.API_CLIENTS.GitLabApiClient).to(api_clients_1.GitLabApiClient);
21
- container.bind(types_1.API_CLIENTS.TeamCityApiClient).to(api_clients_1.TeamCityApiClient);
22
- /**
23
- * Services
24
- */
25
- container.bind(types_1.SERVICES.GitLabService).to(services_1.GitLabService).inSingletonScope();
26
- container.bind(types_1.SERVICES.TeamCityService).to(services_1.TeamCityService).inSingletonScope();
27
- /**
28
- * Tasks
29
- */
30
- container.bind(types_1.TASKS.ValidateTask).to(tasks_1.ValidateTask);
31
- container.bind(types_1.TASKS.VersionTask).to(tasks_1.VersionTask);
32
- container.bind(types_1.TASKS.CreateBranchTask).to(tasks_1.CreateBranchTask);
33
- container.bind(types_1.TASKS.ValidateCommitsTask).to(tasks_1.ValidateCommitsTask);
34
- container.bind(types_1.TASKS.BumpVersionTxtTask).to(tasks_1.BumpVersionTxtTask);
35
- container.bind(types_1.TASKS.CreateMergeRequestTask).to(tasks_1.CreateMergeRequestTask);
36
- container.bind(types_1.TASKS.ValidateDescriptionsTask).to(tasks_1.ValidateDescriptionsTask);
37
- container.bind(types_1.TASKS.CreateReleaseNotesTask).to(tasks_1.CreateReleaseNotesTask);
38
- container.bind(types_1.TASKS.CreateTestingNotesTask).to(tasks_1.CreateTestingNotesTask);
39
- container.bind(types_1.TASKS.InstallPackagesTask).to(tasks_1.InstallPackagesTask);
40
- container.bind(types_1.TASKS.BumpPackagesTask).to(tasks_1.BumpPackagesTask);
41
- container.bind(types_1.TASKS.CommitPackageVersionsTask).to(tasks_1.CommitPackageVersionsTask);
42
- container.bind(types_1.TASKS.ValidateMergeRequestTask).to(tasks_1.ValidateMergeRequestTask);
43
- container.bind(types_1.TASKS.StartMonorepoBuildTask).to(tasks_1.StartMonorepoBuildTask);
44
- container.bind(types_1.TASKS.TagMasterTask).to(tasks_1.TagMasterTask);
45
- container.bind(types_1.TASKS.ListProjectsTask).to(tasks_1.ListProjectsTask);
46
- container.bind(types_1.TASKS.StartProjectBuildsTask)
47
- .to(tasks_1.StartProjectBuildsTask);
48
- /**
49
- * Commands
50
- */
51
- container.bind(types_1.COMMANDS.StatusCommand).to(commands_1.StatusCommand);
52
- container.bind(types_1.COMMANDS.VersionCommand).to(commands_1.VersionCommand);
53
- container.bind(types_1.COMMANDS.CreateBranchCommand).to(commands_1.CreateBranchCommand);
54
- container.bind(types_1.COMMANDS.CreateMergeRequestCommand).to(commands_1.CreateMergeRequestCommand);
55
- container.bind(types_1.COMMANDS.ReleaseCommand).to(commands_1.ReleaseCommand);
56
- container.bind(types_1.COMMANDS.CreateReleaseNotesCommand).to(commands_1.CreateReleaseNotesCommand);
57
- container.bind(types_1.COMMANDS.CreateTestingNotesCommand).to(commands_1.CreateTestingNotesCommand);
58
- container.bind(types_1.COMMANDS.InstallPackagesCommand).to(commands_1.InstallPackagesCommand);
59
- container.bind(types_1.COMMANDS.BumpPackagesCommand).to(commands_1.BumpPackagesCommand);
60
- container.bind(types_1.COMMANDS.ValidateMergeRequestCommand).to(commands_1.ValidateMergeRequestCommand);
61
- container.bind(types_1.COMMANDS.TagMasterCommand).to(commands_1.TagMasterCommand);
62
- container.bind(types_1.COMMANDS.ListProjectsCommand).to(commands_1.ListProjectsCommand);
63
- container.bind(types_1.COMMANDS.StartProjectBuildsCommand)
64
- .to(commands_1.StartProjectBuildsCommand);
65
- return container;
66
- }
67
- exports.createContainer = createContainer;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createContainer = void 0;
4
+ var inversify_1 = require("inversify");
5
+ var api_clients_1 = require("./api-clients");
6
+ var services_1 = require("./services");
7
+ var commands_1 = require("./commands");
8
+ var tasks_1 = require("./tasks");
9
+ var types_1 = require("./types");
10
+ function createContainer(config) {
11
+ var container = new inversify_1.Container();
12
+ /**
13
+ * Misc
14
+ */
15
+ container.bind(types_1.MISC.GitLabConfig).toConstantValue(config.gitLab);
16
+ container.bind(types_1.MISC.TeamCityConfig).toConstantValue(config.teamCity);
17
+ container.bind(types_1.MISC.SlackConfig).toConstantValue(config.slack);
18
+ container.bind(types_1.MISC.TrelloConfig).toConstantValue(config.trello);
19
+ /**
20
+ * Clients
21
+ */
22
+ container.bind(types_1.API_CLIENTS.GitLabApiClient).to(api_clients_1.GitLabApiClient);
23
+ container.bind(types_1.API_CLIENTS.TeamCityApiClient).to(api_clients_1.TeamCityApiClient);
24
+ container.bind(types_1.API_CLIENTS.SlackApiClient).to(api_clients_1.SlackApiClient);
25
+ container.bind(types_1.API_CLIENTS.TrelloApiClient).to(api_clients_1.TrelloApiClient);
26
+ /**
27
+ * Services
28
+ */
29
+ container.bind(types_1.SERVICES.GitLabService).to(services_1.GitLabService).inSingletonScope();
30
+ container.bind(types_1.SERVICES.TeamCityService).to(services_1.TeamCityService).inSingletonScope();
31
+ container.bind(types_1.SERVICES.SlackService).to(services_1.SlackService).inSingletonScope();
32
+ container.bind(types_1.SERVICES.TrelloService).to(services_1.TrelloService).inSingletonScope();
33
+ /**
34
+ * Tasks
35
+ */
36
+ container.bind(types_1.TASKS.ValidateTask).to(tasks_1.ValidateTask);
37
+ container.bind(types_1.TASKS.VersionTask).to(tasks_1.VersionTask);
38
+ container.bind(types_1.TASKS.CreateBranchTask).to(tasks_1.CreateBranchTask);
39
+ container.bind(types_1.TASKS.ValidateCommitsTask).to(tasks_1.ValidateCommitsTask);
40
+ container.bind(types_1.TASKS.BumpVersionTxtTask).to(tasks_1.BumpVersionTxtTask);
41
+ container.bind(types_1.TASKS.CreateMergeRequestTask).to(tasks_1.CreateMergeRequestTask);
42
+ container.bind(types_1.TASKS.ValidateDescriptionsTask).to(tasks_1.ValidateDescriptionsTask);
43
+ container.bind(types_1.TASKS.CreateReleaseNotesTask).to(tasks_1.CreateReleaseNotesTask);
44
+ container.bind(types_1.TASKS.CreateTestingNotesTask).to(tasks_1.CreateTestingNotesTask);
45
+ container.bind(types_1.TASKS.InstallPackagesTask).to(tasks_1.InstallPackagesTask);
46
+ container.bind(types_1.TASKS.BumpPackagesTask).to(tasks_1.BumpPackagesTask);
47
+ container.bind(types_1.TASKS.CommitPackageVersionsTask).to(tasks_1.CommitPackageVersionsTask);
48
+ container.bind(types_1.TASKS.ValidateMergeRequestTask).to(tasks_1.ValidateMergeRequestTask);
49
+ container.bind(types_1.TASKS.StartMonorepoBuildTask).to(tasks_1.StartMonorepoBuildTask);
50
+ container.bind(types_1.TASKS.TagMasterTask).to(tasks_1.TagMasterTask);
51
+ container.bind(types_1.TASKS.ListProjectsTask).to(tasks_1.ListProjectsTask);
52
+ container.bind(types_1.TASKS.PopulateTrelloBoardTask).to(tasks_1.PopulateTrelloBoardTask);
53
+ container.bind(types_1.TASKS.StartProjectBuildsTask)
54
+ .to(tasks_1.StartProjectBuildsTask);
55
+ /**
56
+ * Commands
57
+ */
58
+ container.bind(types_1.COMMANDS.StatusCommand).to(commands_1.StatusCommand);
59
+ container.bind(types_1.COMMANDS.VersionCommand).to(commands_1.VersionCommand);
60
+ container.bind(types_1.COMMANDS.CreateBranchCommand).to(commands_1.CreateBranchCommand);
61
+ container.bind(types_1.COMMANDS.CreateMergeRequestCommand).to(commands_1.CreateMergeRequestCommand);
62
+ container.bind(types_1.COMMANDS.ReleaseCommand).to(commands_1.ReleaseCommand);
63
+ container.bind(types_1.COMMANDS.CreateReleaseNotesCommand).to(commands_1.CreateReleaseNotesCommand);
64
+ container.bind(types_1.COMMANDS.CreateTestingNotesCommand).to(commands_1.CreateTestingNotesCommand);
65
+ container.bind(types_1.COMMANDS.InstallPackagesCommand).to(commands_1.InstallPackagesCommand);
66
+ container.bind(types_1.COMMANDS.BumpPackagesCommand).to(commands_1.BumpPackagesCommand);
67
+ container.bind(types_1.COMMANDS.ValidateMergeRequestCommand).to(commands_1.ValidateMergeRequestCommand);
68
+ container.bind(types_1.COMMANDS.TagMasterCommand).to(commands_1.TagMasterCommand);
69
+ container.bind(types_1.COMMANDS.ListProjectsCommand).to(commands_1.ListProjectsCommand);
70
+ container.bind(types_1.COMMANDS.CreateTrelloCardsCommand).to(commands_1.CreateTrelloCardsCommand);
71
+ container.bind(types_1.COMMANDS.StartProjectBuildsCommand)
72
+ .to(commands_1.StartProjectBuildsCommand);
73
+ return container;
74
+ }
75
+ exports.createContainer = createContainer;