@eui/tools 5.0.0-rc.2 → 5.0.0-rc.20

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 (260) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +746 -5
  3. package/bin/eui-scripts.js +6 -6
  4. package/bin/scripts/build-package-sub.js +20 -0
  5. package/bin/scripts/version.js +12 -0
  6. package/global.test.js +61 -45
  7. package/package.json +18 -21
  8. package/sandbox.js +169 -6
  9. package/scripts/csdr/audit/audit-utils.js +2 -2
  10. package/scripts/csdr/cli/app.js +43 -5
  11. package/scripts/csdr/cli/package.js +93 -9
  12. package/scripts/csdr/cli/skeletons/app-eui10/angular-config.json +20 -0
  13. package/scripts/csdr/cli/skeletons/app-eui10/dependencies-base.json +2 -0
  14. package/scripts/csdr/cli/skeletons/app-eui10/dependencies-composite.json +5 -0
  15. package/scripts/csdr/cli/skeletons/app-eui10/gitignore_TO_REPLACE +63 -0
  16. package/scripts/csdr/cli/skeletons/app-eui10/mock/app/models/user.js +8 -0
  17. package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/index.js +5 -0
  18. package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/user_routes.js +24 -0
  19. package/scripts/csdr/cli/skeletons/app-eui10/mock/db/db.json +12 -0
  20. package/scripts/csdr/cli/skeletons/app-eui10/mock/server.js +16 -0
  21. package/scripts/csdr/cli/skeletons/app-eui10/package.json +6 -0
  22. package/scripts/csdr/cli/skeletons/app-eui10/scripts.json +5 -0
  23. package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-routing.module.ts +18 -0
  24. package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-starter.service.ts +68 -0
  25. package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.html +29 -0
  26. package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.ts +55 -0
  27. package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.module.ts +27 -0
  28. package/scripts/{utils/pre-build/translations/common.js → csdr/cli/skeletons/app-eui10/src/app/core/components/.gitkeep} +0 -0
  29. package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/core.module.ts +84 -0
  30. package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/reducers/index.ts +33 -0
  31. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home-routing.module.ts +15 -0
  32. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.html +7 -0
  33. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.ts +19 -0
  34. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.module.ts +18 -0
  35. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.html +7 -0
  36. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.ts +7 -0
  37. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.html +7 -0
  38. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.ts +7 -0
  39. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts +18 -0
  40. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.html +7 -0
  41. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.ts +8 -0
  42. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.module.ts +21 -0
  43. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts +16 -0
  44. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.html +8 -0
  45. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.ts +7 -0
  46. package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.module.ts +17 -0
  47. package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/shared.module.ts +21 -0
  48. package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/testing/router.mock.ts +18 -0
  49. package/scripts/csdr/cli/skeletons/app-eui10/src/assets/config/env-json-config.json +8 -0
  50. package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/en.json +7 -0
  51. package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/fr.json +7 -0
  52. package/scripts/csdr/cli/skeletons/app-eui10/src/config/global.ts +20 -0
  53. package/scripts/csdr/cli/skeletons/app-eui10/src/config/index.ts +8 -0
  54. package/scripts/csdr/cli/skeletons/app-eui10/src/config/modules.ts +4 -0
  55. package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.prod.ts +9 -0
  56. package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.ts +9 -0
  57. package/scripts/csdr/cli/skeletons/app-eui10/src/index.html +21 -0
  58. package/scripts/csdr/cli/skeletons/app-eui10/src/styles.scss +1 -0
  59. package/scripts/csdr/cli/skeletons/app-eui10/tslint.json +17 -0
  60. package/scripts/csdr/cli/skeletons/app-showcase/angular-config.json +98 -33
  61. package/scripts/csdr/cli/skeletons/app-showcase/dependencies-composite.json +1 -1
  62. package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.component.html +16 -18
  63. package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.routes.ts +1 -1
  64. package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.module.ts +2 -2
  65. package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
  66. package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
  67. package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
  68. package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
  69. package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
  70. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
  71. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
  72. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
  73. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
  74. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
  75. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
  76. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
  77. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
  78. package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/app/features/shared/shared.module.ts +0 -0
  79. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
  80. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
  81. package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/index.html +0 -0
  82. package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/en.json +3 -0
  83. package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/fr.json +3 -0
  84. package/scripts/csdr/cli/skeletons/package/frontend-eui10/gitignore_TO_REPLACE +46 -0
  85. package/scripts/csdr/cli/skeletons/package/frontend-eui10/karma.conf.js +7 -0
  86. package/scripts/csdr/cli/skeletons/package/frontend-eui10/ng-package.json +7 -0
  87. package/scripts/csdr/cli/skeletons/package/frontend-eui10/package.json +4 -0
  88. package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/dummy.spec.ts.TO_REPLACE +5 -0
  89. package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/index.ts +1 -0
  90. package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/lib/module.ts +11 -0
  91. package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/test.ts.TO_REPLACE +21 -0
  92. package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +32 -0
  93. package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.spec.json +17 -0
  94. package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +17 -0
  95. package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.html +1 -0
  96. package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +25 -0
  97. package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.ts +14 -0
  98. package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +3 -3
  99. package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +1 -0
  100. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +3 -0
  101. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +6 -0
  102. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +62 -28
  103. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +44 -39
  104. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +23 -9
  105. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +1 -0
  106. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +1 -0
  107. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +6 -5
  108. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +1 -1
  109. package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +3 -1
  110. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +90 -0
  111. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +10 -0
  112. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +2 -0
  113. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +6 -0
  114. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +64 -0
  115. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +7 -0
  116. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +8 -0
  117. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +3 -0
  118. package/scripts/csdr/cli/skeletons/package/{frontend-remote/src/app/dummy.spec.ts.TO_REPLACE → frontend-remote-eui10/src/app/dummy.spec.ts} +0 -0
  119. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/fallback.component.ts +11 -0
  120. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +90 -0
  121. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +219 -0
  122. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +28 -0
  123. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +42 -0
  124. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +55 -0
  125. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/assets/.gitkeep +0 -0
  126. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +31 -0
  127. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +20 -0
  128. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +3 -0
  129. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +3 -0
  130. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +15 -0
  131. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/favicon.ico +0 -0
  132. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/index.html +10 -0
  133. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +12 -0
  134. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +86 -0
  135. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +20 -0
  136. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +20 -0
  137. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +18 -0
  138. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +7 -0
  139. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +17 -0
  140. package/scripts/csdr/cli/skeletons/package/{frontend-remote → frontend-remote-eui10}/webpack.extra.js +0 -0
  141. package/scripts/csdr/config/angular.js +734 -47
  142. package/scripts/csdr/config/global.js +43 -6
  143. package/scripts/csdr/config/packages.js +64 -1
  144. package/scripts/csdr/config/projects.js +24 -6
  145. package/scripts/csdr/config/projects.test.js +11 -9
  146. package/scripts/csdr/config/sync.js +6 -3
  147. package/scripts/csdr/init/init-utils.js +72 -0
  148. package/scripts/csdr/init/init.js +6 -0
  149. package/scripts/csdr/init/prompt.js +3 -1
  150. package/scripts/csdr/init/resources/10.x/yarn.lock +16428 -0
  151. package/scripts/csdr/init/resources/13.x/browserslistrc +6 -0
  152. package/scripts/csdr/init/resources/13.x/resolutions.json +6 -0
  153. package/scripts/csdr/init/resources/14.x/browserslistrc +6 -0
  154. package/scripts/csdr/init/resources/14.x/resolutions.json +5 -0
  155. package/scripts/csdr/install/build-app.js +6 -38
  156. package/scripts/csdr/install/build-package.js +16 -157
  157. package/scripts/csdr/install/common.js +21 -13
  158. package/scripts/csdr/install/composite-core.js +256 -0
  159. package/scripts/csdr/install/install-utils.js +8 -4
  160. package/scripts/csdr/install/local-dev.js +5 -3
  161. package/scripts/csdr/install/packages.js +90 -0
  162. package/scripts/csdr/install/projects.js +76 -0
  163. package/scripts/csdr/install/{remote.js → remotes.js} +46 -51
  164. package/scripts/csdr/metadata/app-envs.js +1 -39
  165. package/scripts/csdr/metadata/app-history.js +1 -66
  166. package/scripts/csdr/metadata/app-versions.js +2 -12
  167. package/scripts/csdr/metadata/app.js +49 -9
  168. package/scripts/csdr/metadata/common.js +21 -45
  169. package/scripts/csdr/metadata/metadata-utils.js +2 -0
  170. package/scripts/csdr/metadata/package-envs.js +71 -0
  171. package/scripts/csdr/metadata/package-history.js +5 -1
  172. package/scripts/csdr/metadata/package-versions.js +79 -0
  173. package/scripts/csdr/metadata/package.js +169 -101
  174. package/scripts/csdr/metadata/stats.js +9 -5
  175. package/scripts/csdr/release/app/release-app.js +16 -21
  176. package/scripts/csdr/release/package/backend.js +26 -0
  177. package/scripts/csdr/release/package/common.js +220 -18
  178. package/scripts/csdr/release/package/release-package.js +41 -7
  179. package/scripts/csdr/release/package/remote.js +2 -17
  180. package/scripts/csdr/release/package/ui.js +86 -3
  181. package/scripts/csdr/sync/sync-utils.js +9 -2
  182. package/scripts/csdr/version/app-common.js +32 -0
  183. package/scripts/csdr/version/app-env-target.js +5 -295
  184. package/scripts/csdr/version/app.js +5 -3
  185. package/scripts/csdr/version/common.js +282 -0
  186. package/scripts/csdr/version/{app-env-target.test.js → common.test.js} +48 -36
  187. package/scripts/csdr/version/package-common.js +158 -0
  188. package/scripts/csdr/version/package-default.js +144 -0
  189. package/scripts/csdr/version/package-remote.js +51 -0
  190. package/scripts/csdr/version/package.js +16 -270
  191. package/scripts/csdr/version/version-utils.js +12 -7
  192. package/scripts/utils/api-utils.js +90 -0
  193. package/scripts/utils/build/app/build-app-utils.js +11 -9
  194. package/scripts/utils/build/package/angular.js +4 -30
  195. package/scripts/utils/build/package/build-package-utils.js +50 -1
  196. package/scripts/utils/build/package/element.js +17 -18
  197. package/scripts/utils/build/package/nodeJs.js +2 -1
  198. package/scripts/utils/build/package/skeletons/elements/index.html +9 -0
  199. package/scripts/utils/build/package/styles.js +83 -86
  200. package/scripts/utils/git-utils.js +69 -6
  201. package/scripts/utils/index.js +0 -2
  202. package/scripts/utils/notification/common.js +5 -0
  203. package/scripts/utils/notification/mail-utils.js +3 -0
  204. package/scripts/utils/notification/mailstack.js +3 -5
  205. package/scripts/utils/notification/package.js +0 -2
  206. package/scripts/utils/notification/slack-utils.js +6 -7
  207. package/scripts/utils/pre-build/elements.js +8 -4
  208. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/app/app.module.ts +1 -1
  209. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/tsconfig.app.json +1 -2
  210. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
  211. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
  212. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
  213. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
  214. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
  215. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
  216. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
  217. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
  218. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
  219. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
  220. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
  221. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
  222. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
  223. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
  224. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
  225. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
  226. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/app.module.ts +52 -0
  227. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/core/reducers/index.ts +40 -0
  228. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/global.ts +4 -0
  229. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/index.ts +8 -0
  230. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/modules.ts +4 -0
  231. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.dev.ts +9 -0
  232. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.prod.ts +9 -0
  233. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.ts +21 -0
  234. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/favicon.ico +0 -0
  235. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/karma.conf.js +7 -0
  236. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/main.ts +21 -0
  237. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/polyfills.ts +86 -0
  238. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts +33 -0
  239. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +19 -0
  240. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.spec.json +9 -0
  241. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tslint.json +17 -0
  242. package/scripts/utils/pre-build/injection/config.js +30 -31
  243. package/scripts/utils/pre-build/injection/externals.js +70 -72
  244. package/scripts/utils/pre-build/injection/injection-utils.js +2 -0
  245. package/scripts/utils/pre-build/injection/routes-replacement.js +318 -0
  246. package/scripts/utils/pre-build/injection/skeletons.js +9 -3
  247. package/scripts/utils/pre-build/projects.js +28 -15
  248. package/scripts/utils/pre-build/translations/elements.js +21 -11
  249. package/scripts/utils/serve/app.js +7 -4
  250. package/scripts/utils/test/test-utils.js +39 -1
  251. package/scripts/utils/tools.js +370 -285
  252. package/bin/scripts/csdr-jira-update.js +0 -12
  253. package/bin/scripts/csdr-migrate-package.js +0 -17
  254. package/bin/scripts/e2e-app.js +0 -62
  255. package/scripts/csdr/install/composite-utils.js +0 -292
  256. package/scripts/csdr/jira/jira-utils.js +0 -169
  257. package/scripts/csdr/jira/update.js +0 -153
  258. package/scripts/migration/eui8-migration.js +0 -94
  259. package/scripts/migration/migrate-utils.js +0 -191
  260. package/scripts/utils/confluence-utils.js +0 -126
@@ -10,7 +10,7 @@ const configUtils = require('../config/config-utils');
10
10
  const metadataUtils = require('../metadata/metadata-utils');
11
11
 
12
12
  // FETCH ARGS
13
- const { dryRun } = tools.getArgs();
13
+ const { dryRun, skipClone } = tools.getArgs();
14
14
 
15
15
 
16
16
  const groupBy = (xs, f) => {
@@ -29,7 +29,7 @@ module.exports.run = () => {
29
29
 
30
30
  return Promise.resolve()
31
31
  .then(() => {
32
- if (!dryRun) {
32
+ if (!dryRun && !skipClone) {
33
33
  return metadataUtils.common.cloneMetadataRepo();
34
34
  }
35
35
  })
@@ -45,6 +45,8 @@ module.exports.run = () => {
45
45
 
46
46
  // Accumulating all packages metadata in one single object
47
47
  packages.forEach((p) => {
48
+ console.log(`Processing package : ${p.name}`);
49
+
48
50
  const metadataRoot = path.join(process.cwd(), 'packages', 'devops-metadata');
49
51
  const pkgMetadata = tools.getJsonFileContent(path.join(metadataRoot, p.devopsMetadataFile));
50
52
  const pkgMetadataVersions = tools.getJsonFileContent(path.join(metadataRoot, p.devopsVersionsMetadataFile));
@@ -52,9 +54,11 @@ module.exports.run = () => {
52
54
  const gitCommits = [];
53
55
  if (pkgMetadata.versions) {
54
56
  pkgMetadata.versions.forEach((v) => {
55
- v.gitMetadata.commits.forEach((c) => {
56
- gitCommits.push(c);
57
- });
57
+ if (v.gitMetadata.commits) {
58
+ v.gitMetadata.commits.forEach((c) => {
59
+ gitCommits.push(c);
60
+ });
61
+ }
58
62
  });
59
63
  }
60
64
 
@@ -20,7 +20,7 @@ module.exports.run = () => {
20
20
  const project = configUtils.projects.getProject();
21
21
 
22
22
  // fetching command parameters
23
- var { branch, dryRun, envTarget, compositeType } = utils.tools.getArgs();
23
+ var { branch, dryRun, envTarget, compositeType, configEnvTarget } = utils.tools.getArgs();
24
24
 
25
25
  // checking branch and envTarget types
26
26
  if (branch && typeof (branch) === 'boolean') {
@@ -29,6 +29,9 @@ module.exports.run = () => {
29
29
  if (envTarget && typeof (envTarget) === 'boolean') {
30
30
  envTarget = null;
31
31
  }
32
+ if (configEnvTarget && typeof (configEnvTarget) === 'boolean') {
33
+ configEnvTarget = null;
34
+ }
32
35
 
33
36
  // globals
34
37
  if (!branch && !envTarget) {
@@ -37,11 +40,13 @@ module.exports.run = () => {
37
40
  }
38
41
 
39
42
  // Getting branch flags
43
+ var isSupportSnapshotBranch;
40
44
  var isSupportBranch;
41
45
  var isSnapshot;
42
46
 
43
47
  if (branch) {
44
- isSupportBranch = (branch !== 'master' && branch.indexOf('support/') > -1);
48
+ isSupportSnapshotBranch = (branch !== 'master' && branch.indexOf('support/develop') > -1);
49
+ isSupportBranch = (branch !== 'master' && !isSupportSnapshotBranch && branch.indexOf('support/') > -1);
45
50
  isSnapshot = (branch !== 'master' && !isSupportBranch);
46
51
  }
47
52
 
@@ -56,7 +61,7 @@ module.exports.run = () => {
56
61
 
57
62
  // for traditional app build using develop / master branch
58
63
  } else {
59
- if (isSnapshot) {
64
+ if (isSnapshot || isSupportSnapshotBranch) {
60
65
  envTargetGen = 'DEV';
61
66
  } else {
62
67
  envTargetGen = 'TST';
@@ -78,6 +83,9 @@ module.exports.run = () => {
78
83
 
79
84
  // Starting the release process
80
85
  return Promise.resolve()
86
+ .then(() => {
87
+ utils.tools.logVersion();
88
+ })
81
89
 
82
90
  // *****************************************************************
83
91
  // RELEASE PACKAGE START
@@ -142,7 +150,7 @@ module.exports.run = () => {
142
150
  .then(() => {
143
151
  utils.tools.logTitle('Getting app new version...');
144
152
 
145
- return versionUtils.app.getNewVersion(project, isSnapshot, isSupportBranch, envTarget);
153
+ return versionUtils.app.getNewVersion(project, (isSnapshot || isSupportSnapshotBranch), isSupportBranch, envTarget);
146
154
  })
147
155
  .then((version) => {
148
156
  // set the new version found for later use
@@ -196,7 +204,7 @@ module.exports.run = () => {
196
204
  // *****************************************************************
197
205
  .then(() => {
198
206
  // process v1 - diff report is generated on MASTER / TST release
199
- if (!isSnapshot && !envTarget) {
207
+ if (!isSnapshot && !isSupportSnapshotBranch && !envTarget) {
200
208
  return metadataUtils.appHistory.generateDiffReport(project, newVersion, isSupportBranch);
201
209
  }
202
210
 
@@ -253,7 +261,7 @@ module.exports.run = () => {
253
261
  // BUILD ANGULAR APPLICATION
254
262
  // *****************************************************************
255
263
  .then(() => {
256
- return utils.buildApp.angular(envTarget, isSnapshot, newVersion);
264
+ return utils.buildApp.angular(envTarget, (isSnapshot || isSupportSnapshotBranch), newVersion, configEnvTarget);
257
265
  })
258
266
 
259
267
 
@@ -282,7 +290,7 @@ module.exports.run = () => {
282
290
  if (project.build && project.build.distribution) {
283
291
  return Promise.resolve()
284
292
  .then(() => {
285
- return utils.buildApp.generateProjectDistributionFile(project, isSnapshot);
293
+ return utils.buildApp.generateProjectDistributionFile(project, (isSnapshot || isSupportSnapshotBranch));
286
294
  })
287
295
  .catch((e) => {
288
296
  throw e;
@@ -335,7 +343,7 @@ module.exports.run = () => {
335
343
  .then(() => {
336
344
  // for env-target based builds, no need to merge anything back as it only contains a master branch for sources
337
345
  if (!envTarget) {
338
- if (!isSnapshot && !isSupportBranch) {
346
+ if (!isSnapshot && !isSupportBranch && !isSupportSnapshotBranch) {
339
347
  return utils.git.mergeMasterToDevelop(project, project.folder);
340
348
  }
341
349
  }
@@ -357,19 +365,6 @@ module.exports.run = () => {
357
365
 
358
366
 
359
367
 
360
- // *****************************************************************
361
- // GENERATE VERSION HISTORY PAGE ON CONFLUENCE
362
- // *****************************************************************
363
- .then(() => {
364
- if (envTargetGen !== 'DEV') {
365
- return metadataUtils.common.publishMetadata(project);
366
- }
367
- })
368
-
369
-
370
-
371
-
372
-
373
368
  // *****************************************************************
374
369
  // SEND SLACK SUCCESS
375
370
  // *****************************************************************
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ // GLOBAL
4
+ const path = require('path');
5
+
6
+ // LOCAL
7
+ const installUtils = require('../../install/install-utils');
8
+ const configUtils = require('../../config/config-utils');
9
+
10
+ module.exports.install = (pkg) => {
11
+ return Promise.resolve()
12
+
13
+ // FETCHING CURRENT PACKAGES & INSTALL
14
+ .then(() => {
15
+ // fetch related project if passed as arguments
16
+ const prj = configUtils.projects.getProject();
17
+
18
+ // install the dependencies for current package build
19
+ return installUtils.buildPackage.install(prj, pkg);
20
+ })
21
+
22
+ .catch((e) => {
23
+ throw e;
24
+ })
25
+ }
26
+
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  // GLOBAL
4
+ const path = require('path');
4
5
 
5
6
  // UTILS
6
7
  const utils = require('../../../utils');
@@ -14,14 +15,15 @@ const { dryRun } = utils.tools.getArgs();
14
15
 
15
16
 
16
17
 
17
- module.exports.getBranches = () => {
18
+ const getBranches = module.exports.getBranches = () => {
18
19
  const { branch } = utils.tools.getArgs();
19
20
 
20
21
  const isSnapshot = (branch === 'develop');
21
22
  const isMaster = (branch === 'master');
22
- const isSupport = (!isMaster && !isSnapshot && branch.indexOf('support/') > -1);
23
- const isNext = (!isMaster && !isSnapshot && !isSupport && branch.indexOf('next/') > -1);
24
- const isSupportSnapshot = (!isMaster && !isSnapshot && !isSupport && !isNext);
23
+ const isSupportSnapshot = (!isMaster && !isSnapshot && branch.indexOf('support/develop') > -1);
24
+ const isSupport = (!isMaster && !isSnapshot && !isSupportSnapshot && branch.indexOf('support/') > -1);
25
+ const isHotfix = (!isMaster && !isSnapshot && !isSupportSnapshot && !isSupport && branch.indexOf('hotfix/') > -1);
26
+ const isNext = (!isMaster && !isSnapshot && !isSupport && !isSupportSnapshot && !isHotfix && branch.indexOf('next/') > -1);
25
27
 
26
28
  return {
27
29
  isSupport: isSupport,
@@ -29,12 +31,56 @@ module.exports.getBranches = () => {
29
31
  isNext: isNext,
30
32
  isSnapshot: isSnapshot,
31
33
  isMaster: isMaster,
34
+ isHotfix: isHotfix,
32
35
  branch: branch
33
36
  }
34
37
  }
35
38
 
39
+ module.exports.getEnvTarget = () => {
40
+ const { envTarget } = utils.tools.getArgs();
36
41
 
37
- module.exports.init = (pkg) => {
42
+ // Initialize composite type
43
+ if (envTarget && typeof (envTarget) === 'boolean') {
44
+ envTarget = null;
45
+ }
46
+
47
+ let envTargetGen;
48
+
49
+ // when envTarget is provided this take the lead
50
+ if (envTarget) {
51
+ envTargetGen = envTarget;
52
+
53
+ // otherwise the envTarget is derived from branches develop = DEV/ master = TST
54
+ } else {
55
+ const branches = getBranches();
56
+ if (branches.isSnapshot || branches.isSupportSnapshotBranch) {
57
+ envTargetGen = 'DEV';
58
+ } else {
59
+ envTargetGen = 'TST';
60
+ }
61
+ }
62
+
63
+ return envTargetGen;
64
+ }
65
+
66
+ module.exports.getCompositeType = () => {
67
+ let { compositeType } = utils.tools.getArgs();
68
+
69
+ // Initialize composite type
70
+ if (compositeType && typeof (compositeType) === 'boolean') {
71
+ compositeType = null;
72
+ }
73
+
74
+ if (!compositeType) {
75
+ compositeType = 'DEFAULT';
76
+ }
77
+
78
+ return compositeType;
79
+ }
80
+
81
+
82
+ module.exports.init = (pkg, envTarget, compositeType) => {
83
+ utils.tools.logBanner('INIT');
38
84
 
39
85
  const branches = this.getBranches();
40
86
 
@@ -59,9 +105,17 @@ module.exports.init = (pkg) => {
59
105
 
60
106
  console.log(pkg);
61
107
 
108
+ let launchMessage = ':arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward:';
109
+
110
+ if (pkg.remote) {
111
+ launchMessage += ` Launching remote *${pkg.name}* release for ENV: *${envTarget}* - compositeType: *${compositeType}*`;
112
+ } else {
113
+ launchMessage += ` Launching *${pkg.name}* release for branch *${branches.branch}*`;
114
+ }
115
+
62
116
  return utils.notification.package.sendPackageMessage({
63
117
  package: pkg,
64
- text: `:arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward: Launching *${pkg.name}* release for branch *${branches.branch}*`
118
+ text: launchMessage
65
119
  });
66
120
  })
67
121
 
@@ -71,6 +125,11 @@ module.exports.init = (pkg) => {
71
125
  return metadataUtils.common.cloneMetadataRepo();
72
126
  })
73
127
 
128
+ // CLONE METADATA LOCKS REPO
129
+ .then(() => {
130
+ return metadataUtils.common.cloneMetadataLocksRepo();
131
+ })
132
+
74
133
  .catch((e) => {
75
134
  throw e;
76
135
  })
@@ -82,6 +141,8 @@ module.exports.init = (pkg) => {
82
141
 
83
142
 
84
143
  module.exports.preReleaseChecks = (pkg) => {
144
+ utils.tools.logBanner('PRE-RELEASE checks');
145
+
85
146
  return Promise.resolve()
86
147
 
87
148
  // GET AND CHECK DEVOPS CONFIG
@@ -112,6 +173,8 @@ module.exports.preReleaseChecks = (pkg) => {
112
173
 
113
174
 
114
175
  module.exports.commitMetadataChecks = (pkg) => {
176
+ utils.tools.logBanner('COMMIT METADATA CHECKS');
177
+
115
178
  utils.tools.logTitle('Checking package commit metadata');
116
179
  let pkgMetadata;
117
180
 
@@ -146,6 +209,8 @@ module.exports.commitMetadataChecks = (pkg) => {
146
209
 
147
210
 
148
211
  module.exports.preBuild = (pkg) => {
212
+ utils.tools.logBanner('PRE-BUILD');
213
+
149
214
  return Promise.resolve()
150
215
  .then(() => {
151
216
  return utils.buildPackage.preBuild(pkg);
@@ -159,7 +224,8 @@ module.exports.preBuild = (pkg) => {
159
224
 
160
225
 
161
226
 
162
- module.exports.updateVersion = (pkg, pkgMetadata) => {
227
+ module.exports.updateVersion = (pkg, pkgMetadata, envTarget) => {
228
+ utils.tools.logBanner('UPDATE VERSION');
163
229
 
164
230
  // getting branch flags
165
231
  const branches = this.getBranches();
@@ -171,7 +237,15 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
171
237
 
172
238
  // GET NEW VERSION from VALID commits found in metadata
173
239
  .then(() => {
174
- return versionUtils.package.getNewVersion(pkg, pkgMetadata.commits, branches.isSnapshot, branches.isNext, branches.isSupport);
240
+ return versionUtils.package.getNewVersion(
241
+ pkg,
242
+ pkgMetadata.commits,
243
+ (branches.isSnapshot || branches.isSupportSnapshot),
244
+ branches.isNext,
245
+ branches.isSupport,
246
+ branches.isHotfix,
247
+ envTarget
248
+ );
175
249
  })
176
250
 
177
251
 
@@ -179,9 +253,14 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
179
253
  .then((version) => {
180
254
  newVersion = version;
181
255
 
182
- if (!dryRun) {
183
- return versionUtils.package.updateVersion(pkg, version, branches.isSnapshot, branches.isNext, branches.isSupport);
184
- }
256
+ return versionUtils.package.updateVersion(
257
+ pkg,
258
+ version,
259
+ (branches.isSnapshot || branches.isSupportSnapshot),
260
+ branches.isNext,
261
+ branches.isSupport,
262
+ branches.isHotfix
263
+ );
185
264
  })
186
265
 
187
266
  // returning new version generated
@@ -198,6 +277,8 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
198
277
 
199
278
 
200
279
  module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
280
+ utils.tools.logBanner('GENERATE CHANGELOG');
281
+
201
282
  return Promise.resolve()
202
283
 
203
284
  // GENERATE CHANGELOG
@@ -232,6 +313,8 @@ module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
232
313
 
233
314
 
234
315
  module.exports.postBuild = (pkg, version) => {
316
+ utils.tools.logBanner('POST BUILD');
317
+
235
318
  return Promise.resolve()
236
319
  // all packages
237
320
  .then(() => {
@@ -252,12 +335,25 @@ module.exports.postBuild = (pkg, version) => {
252
335
  }
253
336
 
254
337
 
255
- module.exports.runGitOperations = (pkg, version) => {
256
-
257
- const branches = this.getBranches();
338
+ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
339
+ utils.tools.logBanner('STORE METADATA ASSETS');
258
340
 
259
341
  return Promise.resolve()
342
+ .then(() => {
343
+ if (pkg.remote) {
344
+ return metadataUtils.package.storeMetadataAssets(pkg, pkgCompositeDeps);
345
+ }
346
+ })
347
+
348
+ .catch((e) => {
349
+ throw e;
350
+ })
351
+ }
352
+
353
+
354
+ const commitPackage = (pkg, version, branches) => {
260
355
  // COMMIT and PUSH UPDATED FILES ON PACKAGE REPOSITORY
356
+ return Promise.resolve()
261
357
  .then(() => {
262
358
  return utils.git.commitAndPush(
263
359
  branches.branch,
@@ -265,10 +361,17 @@ module.exports.runGitOperations = (pkg, version) => {
265
361
  pkg.paths.pkgDirectory
266
362
  );
267
363
  })
364
+ .catch((e) => {
365
+ throw e;
366
+ })
367
+ }
368
+
268
369
 
370
+ const tagAndMerge = (pkg, version, branches) => {
371
+ return Promise.resolve()
269
372
  // TAG THE NEW RELEASE (MASTER) for MASTER and SUPPORT
270
373
  .then(() => {
271
- if (!branches.isSnapshot) {
374
+ if (!branches.isSnapshot && !branches.isSupportSnapshot) {
272
375
  return utils.git.tagVersion(
273
376
  version, branches.branch,
274
377
  `chore(release): tagging ${version} - from CI server`,
@@ -280,10 +383,19 @@ module.exports.runGitOperations = (pkg, version) => {
280
383
  // MERGE BACK ON DEVELOP for MASTER / LATEST RELEASE
281
384
  .then(() => {
282
385
  if (branches.isMaster) {
386
+ utils.tools.logInfo('Branch is master merge back to develop');
283
387
  return utils.git.mergeMasterToDevelop(pkg, pkg.paths.pkgDirectory, version);
284
388
  }
285
389
  })
286
390
 
391
+ // MERGE BACK ON support/develop for support release for package that has a support/develop branch active
392
+ .then(() => {
393
+ if (branches.isSupport && pkg.build && pkg.build.supportSnapshotBranch) {
394
+ utils.tools.logInfo('Branch is support / supportSnapshotBranch config detected');
395
+ return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportSnapshotBranch);
396
+ }
397
+ })
398
+
287
399
  .catch((e) => {
288
400
  throw e;
289
401
  })
@@ -291,16 +403,54 @@ module.exports.runGitOperations = (pkg, version) => {
291
403
 
292
404
 
293
405
 
294
- module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, duration) => {
406
+ module.exports.runGitOperations = (pkg, version) => {
407
+ utils.tools.logBanner('RUN GIT OPERATIONS');
408
+
409
+ const branches = this.getBranches();
410
+ console.log(branches);
411
+
412
+ if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
413
+ utils.tools.logInfo('Remote - with envTargetActive set - commit package only');
414
+
415
+ return Promise.resolve()
416
+ .then(() => {
417
+ return commitPackage(pkg, version, branches);
418
+ })
419
+ .catch((e) => {
420
+ throw e;
421
+ })
422
+
423
+ } else {
424
+ utils.tools.logInfo('Normal UI package - commit package, tagging and do merge operations if needed');
425
+
426
+ return Promise.resolve()
427
+ .then(() => {
428
+ return commitPackage(pkg, version, branches);
429
+ })
430
+ .then(() => {
431
+ return tagAndMerge(pkg, version, branches);
432
+ })
433
+ .catch((e) => {
434
+ throw e;
435
+ })
436
+ }
437
+ }
438
+
439
+
440
+
441
+ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, duration, envTarget) => {
442
+ utils.tools.logBanner('STORE METADATA');
443
+
295
444
  const branches = this.getBranches();
296
445
 
297
446
  return Promise.resolve()
298
447
  .then(() => {
299
448
  return metadataUtils.package.storeMetadata(
300
449
  pkg, version, pkgMetadata,
301
- branches.isSnapshot, branches.isMaster, branches.isSupport, branches.isNext, branches.isSupportSnapshot,
450
+ branches.isSnapshot, branches.isMaster, branches.isSupport, branches.isNext, branches.isSupportSnapshot, branches.isHotfix,
302
451
  pkgCompositeDeps,
303
- duration
452
+ duration,
453
+ envTarget
304
454
  );
305
455
  })
306
456
 
@@ -310,7 +460,53 @@ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, dur
310
460
  }
311
461
 
312
462
 
463
+ module.exports.exportPipelineVariables = (pkg, compositeType) => {
464
+ utils.tools.logBanner('EXPORT PIPELINE VARIABLES');
465
+
466
+ let variablesContent = '';
467
+
468
+ return Promise.resolve()
469
+ .then(() => {
470
+ if (pkg.remote) {
471
+ utils.tools.logTitle('Exporting pkg remote variables');
472
+
473
+ utils.tools.logInfo('Exporting APP_TARGET');
474
+
475
+ let appTarget = 'MWP_ONLY';
476
+
477
+ if (pkg.build && pkg.build.appTarget) {
478
+ appTarget = pkg.build.appTarget;
479
+ }
480
+
481
+ utils.tools.logInfo(`appTarget generated : ${appTarget}`);
482
+
483
+ variablesContent += `export APP_TARGET=${appTarget}\n`;
484
+
485
+ if (compositeType) {
486
+ utils.tools.logInfo(`Exporting COMPOSITE_TYPE : ${compositeType}`);
487
+ variablesContent += `export COMPOSITE_TYPE=${compositeType}\n`;
488
+ }
489
+
490
+ if (dryRun) {
491
+ utils.tools.logWarning('dryRun...skipping export');
492
+ } else {
493
+ utils.tools.logInfo('Exporting appTarget variable');
494
+ return utils.pipeline.setVariables(pkg.paths.rootDirectory, variablesContent);
495
+ }
496
+ }
497
+ })
498
+
499
+ .catch((e) => {
500
+ throw e;
501
+ })
502
+ }
503
+
504
+
505
+
506
+
313
507
  module.exports.generateDiffReport = (pkg, newVersion) => {
508
+ utils.tools.logBanner('GENERATE DIFF REPORT');
509
+
314
510
  const branches = this.getBranches();
315
511
 
316
512
  return Promise.resolve()
@@ -346,6 +542,8 @@ module.exports.generateDiffReport = (pkg, newVersion) => {
346
542
 
347
543
 
348
544
  module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
545
+ utils.tools.logBanner('SEND SUCCESS NOTIFICATION');
546
+
349
547
  return Promise.resolve()
350
548
  .then(() => {
351
549
  utils.tools.logTitle('Sending slack success');
@@ -381,6 +579,10 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
381
579
 
382
580
 
383
581
  module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
582
+ utils.tools.logBanner('SEND ERROR NOTIFICATION');
583
+
584
+ // console.log(pkgMetadata);
585
+
384
586
  return Promise.resolve()
385
587
  .then(() => {
386
588
  utils.tools.logTitle('ERROR !!!!! an unexpected error occured....');
@@ -8,11 +8,13 @@ const utils = require('../../../utils');
8
8
 
9
9
  // CSDR RELATED
10
10
  const configUtils = require('../../config/config-utils');
11
+ const metadataUtils = require('../../metadata/metadata-utils');
11
12
 
12
13
  // INNER MODULES
13
14
  const innerCommon = require('./common');
14
15
  const innerUi = require('./ui');
15
16
  const innerRemote = require('./remote');
17
+ const innerBackend = require('./backend');
16
18
 
17
19
 
18
20
  module.exports.run = () => {
@@ -29,16 +31,26 @@ module.exports.run = () => {
29
31
  // Get branches flags
30
32
  const branches = innerCommon.getBranches();
31
33
 
34
+ // Get envTarget (used by remotes)
35
+ const envTarget = innerCommon.getEnvTarget();
36
+
37
+ // Get compositeType (used by remotes)
38
+ const compositeType = innerCommon.getCompositeType();
39
+
40
+
32
41
  // local saved vars
33
42
  var newVersion, pkgMetadata, pkgCompositeDeps;
34
43
 
35
44
 
36
-
37
45
  return Promise.resolve()
46
+ .then(() => {
47
+ utils.tools.logVersion();
48
+ })
49
+
38
50
 
39
51
  // RELEASE PACKAGE START
40
52
  .then(() => {
41
- return innerCommon.init(pkg);
53
+ return innerCommon.init(pkg, envTarget, compositeType);
42
54
  })
43
55
 
44
56
 
@@ -47,12 +59,19 @@ module.exports.run = () => {
47
59
  return innerCommon.preReleaseChecks(pkg);
48
60
  })
49
61
 
62
+ // FETCHING COMMITS METADATA
63
+ .then(() => {
64
+ return metadataUtils.commit.getMetadata(pkg);
65
+ })
66
+ .then((metadata) => {
67
+ pkgMetadata = metadata;
68
+ })
69
+
50
70
  // COMMIT METADATA CHECKS
51
71
  .then(() => {
52
72
  return innerCommon.commitMetadataChecks(pkg);
53
73
  })
54
74
  .then((metadata) => {
55
- // storing commitMetadata for later use
56
75
  pkgMetadata = metadata;
57
76
  })
58
77
 
@@ -66,10 +85,13 @@ module.exports.run = () => {
66
85
  // INSTALL dependencies by type
67
86
  .then(() => {
68
87
  if (pkg.remote) {
69
- return innerRemote.install(pkg, branches.isMaster);
88
+ return innerRemote.install(pkg, envTarget, compositeType);
89
+
90
+ } else if (pkg.backend) {
91
+ return innerBackend.install(pkg);
70
92
 
71
93
  } else {
72
- return innerUi.install(pkg, branches.isMaster);
94
+ return innerUi.install(pkg);
73
95
  }
74
96
  })
75
97
  .then((compositeDeps) => {
@@ -92,7 +114,7 @@ module.exports.run = () => {
92
114
 
93
115
  // GENERATE and UPDATE new version
94
116
  .then(() => {
95
- return innerCommon.updateVersion(pkg, pkgMetadata);
117
+ return innerCommon.updateVersion(pkg, pkgMetadata, envTarget);
96
118
  })
97
119
  .then((version) => {
98
120
  // storing version for later use
@@ -114,6 +136,12 @@ module.exports.run = () => {
114
136
  })
115
137
 
116
138
 
139
+ // STORING METADATA ASSETS
140
+ .then(() => {
141
+ return innerCommon.storeMetadataAssets(pkg, pkgCompositeDeps);
142
+ })
143
+
144
+
117
145
  // PUBLISH PACKAGE
118
146
  .then(() => {
119
147
  return utils.publish.publish(pkg);
@@ -136,7 +164,7 @@ module.exports.run = () => {
136
164
  .then(() => {
137
165
  // get run duration
138
166
  const duration = utils.pipeline.getTimerDuration();
139
- return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration);
167
+ return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
140
168
  })
141
169
 
142
170
 
@@ -148,6 +176,12 @@ module.exports.run = () => {
148
176
  })
149
177
 
150
178
 
179
+ // EXPORT ADDITIONAL PIPELINE VARIABLES
180
+ .then(() => {
181
+ return innerCommon.exportPipelineVariables(pkg, compositeType);
182
+ })
183
+
184
+
151
185
  // SEND SUCCESS NOTIFICATION
152
186
  .then(() => {
153
187
  return innerCommon.sendSuccessNotification(pkg, newVersion, pkgMetadata)