@eui/tools 5.0.0-rc.7 → 5.1.0

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 (273) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +846 -15
  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 +14 -13
  8. package/sandbox.js +229 -5
  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 -28
  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 +729 -82
  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 +108 -0
  148. package/scripts/csdr/init/init.js +11 -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/init/resources/nodejs-10.x/resolutions.json +8 -0
  156. package/scripts/csdr/install/build-app.js +6 -38
  157. package/scripts/csdr/install/build-package.js +16 -157
  158. package/scripts/csdr/install/common.js +21 -9
  159. package/scripts/csdr/install/composite-core.js +256 -0
  160. package/scripts/csdr/install/install-utils.js +8 -4
  161. package/scripts/csdr/install/local-dev.js +6 -4
  162. package/scripts/csdr/install/packages.js +90 -0
  163. package/scripts/csdr/install/projects.js +76 -0
  164. package/scripts/csdr/install/{remote.js → remotes.js} +46 -51
  165. package/scripts/csdr/metadata/app-envs.js +0 -39
  166. package/scripts/csdr/metadata/app-history.js +0 -66
  167. package/scripts/csdr/metadata/app-versions.js +2 -12
  168. package/scripts/csdr/metadata/app.js +49 -9
  169. package/scripts/csdr/metadata/common.js +23 -47
  170. package/scripts/csdr/metadata/metadata-utils.js +2 -0
  171. package/scripts/csdr/metadata/package-envs.js +71 -0
  172. package/scripts/csdr/metadata/package-history.js +5 -0
  173. package/scripts/csdr/metadata/package-versions.js +79 -0
  174. package/scripts/csdr/metadata/package.js +95 -105
  175. package/scripts/csdr/metadata/stats.js +9 -5
  176. package/scripts/csdr/metadata/v2/app/_app.js +21 -0
  177. package/scripts/csdr/metadata/v2/app/app.js +25 -0
  178. package/scripts/csdr/metadata/v2/app/index.js +3 -0
  179. package/scripts/csdr/metadata/v2/global/_global.js +21 -0
  180. package/scripts/csdr/metadata/v2/global/global.js +25 -0
  181. package/scripts/csdr/metadata/v2/global/index.js +3 -0
  182. package/scripts/csdr/metadata/v2/index.js +5 -0
  183. package/scripts/csdr/metadata/v2/migrate-devops-metadata.js +207 -0
  184. package/scripts/csdr/metadata/v2/package/_package.js +21 -0
  185. package/scripts/csdr/metadata/v2/package/index.js +3 -0
  186. package/scripts/csdr/metadata/v2/package/package.js +25 -0
  187. package/scripts/csdr/release/app/release-app.js +16 -21
  188. package/scripts/csdr/release/package/backend.js +26 -0
  189. package/scripts/csdr/release/package/common.js +220 -18
  190. package/scripts/csdr/release/package/release-package.js +28 -10
  191. package/scripts/csdr/release/package/remote.js +2 -17
  192. package/scripts/csdr/release/package/ui.js +86 -3
  193. package/scripts/csdr/sync/sync-utils.js +12 -2
  194. package/scripts/csdr/templates/maven-settings.template +13 -0
  195. package/scripts/csdr/version/app-common.js +32 -0
  196. package/scripts/csdr/version/app-env-target.js +5 -295
  197. package/scripts/csdr/version/app.js +5 -3
  198. package/scripts/csdr/version/common.js +282 -0
  199. package/scripts/csdr/version/{app-env-target.test.js → common.test.js} +48 -36
  200. package/scripts/csdr/version/package-common.js +158 -0
  201. package/scripts/csdr/version/package-default.js +144 -0
  202. package/scripts/csdr/version/package-remote.js +51 -0
  203. package/scripts/csdr/version/package.js +16 -270
  204. package/scripts/csdr/version/version-utils.js +12 -7
  205. package/scripts/utils/api-utils.js +126 -0
  206. package/scripts/utils/build/app/build-app-utils.js +11 -9
  207. package/scripts/utils/build/package/angular.js +4 -30
  208. package/scripts/utils/build/package/build-package-utils.js +50 -1
  209. package/scripts/utils/build/package/element.js +17 -18
  210. package/scripts/utils/build/package/nodeJs.js +2 -1
  211. package/scripts/utils/build/package/skeletons/elements/index.html +9 -0
  212. package/scripts/utils/build/package/styles.js +92 -92
  213. package/scripts/utils/git-utils.js +76 -6
  214. package/scripts/utils/index.js +3 -4
  215. package/scripts/utils/notification/common.js +5 -0
  216. package/scripts/utils/notification/mail-utils.js +3 -0
  217. package/scripts/utils/notification/mailstack.js +3 -5
  218. package/scripts/utils/notification/package.js +0 -2
  219. package/scripts/utils/notification/slack-utils.js +6 -7
  220. package/scripts/utils/pre-build/elements.js +8 -4
  221. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/app/app.module.ts +1 -1
  222. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/tsconfig.app.json +1 -2
  223. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
  224. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
  225. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
  226. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
  227. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
  228. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
  229. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
  230. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
  231. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
  232. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
  233. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
  234. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
  235. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
  236. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
  237. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
  238. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
  239. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/app.module.ts +52 -0
  240. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/core/reducers/index.ts +40 -0
  241. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/global.ts +4 -0
  242. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/index.ts +8 -0
  243. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/modules.ts +4 -0
  244. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.dev.ts +9 -0
  245. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.prod.ts +9 -0
  246. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.ts +21 -0
  247. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/favicon.ico +0 -0
  248. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/karma.conf.js +7 -0
  249. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/main.ts +21 -0
  250. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/polyfills.ts +86 -0
  251. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts +33 -0
  252. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +19 -0
  253. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.spec.json +9 -0
  254. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tslint.json +17 -0
  255. package/scripts/utils/pre-build/injection/config.js +30 -31
  256. package/scripts/utils/pre-build/injection/externals.js +70 -72
  257. package/scripts/utils/pre-build/injection/injection-utils.js +2 -0
  258. package/scripts/utils/pre-build/injection/routes-replacement.js +322 -0
  259. package/scripts/utils/pre-build/injection/skeletons.js +9 -3
  260. package/scripts/utils/pre-build/projects.js +20 -15
  261. package/scripts/utils/pre-build/translations/elements.js +21 -11
  262. package/scripts/utils/serve/app.js +7 -4
  263. package/scripts/utils/test/test-utils.js +39 -1
  264. package/scripts/utils/tools.js +402 -290
  265. package/bin/scripts/csdr-jira-update.js +0 -12
  266. package/bin/scripts/csdr-migrate-package.js +0 -17
  267. package/bin/scripts/e2e-app.js +0 -62
  268. package/scripts/csdr/install/composite-utils.js +0 -292
  269. package/scripts/csdr/jira/jira-utils.js +0 -169
  270. package/scripts/csdr/jira/update.js +0 -153
  271. package/scripts/migration/eui8-migration.js +0 -94
  272. package/scripts/migration/migrate-utils.js +0 -191
  273. package/scripts/utils/confluence-utils.js +0 -126
@@ -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....');
@@ -14,6 +14,7 @@ const metadataUtils = require('../../metadata/metadata-utils');
14
14
  const innerCommon = require('./common');
15
15
  const innerUi = require('./ui');
16
16
  const innerRemote = require('./remote');
17
+ const innerBackend = require('./backend');
17
18
 
18
19
 
19
20
  module.exports.run = () => {
@@ -30,16 +31,26 @@ module.exports.run = () => {
30
31
  // Get branches flags
31
32
  const branches = innerCommon.getBranches();
32
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
+
33
41
  // local saved vars
34
42
  var newVersion, pkgMetadata, pkgCompositeDeps;
35
43
 
36
44
 
37
-
38
45
  return Promise.resolve()
46
+ .then(() => {
47
+ utils.tools.logVersion();
48
+ })
49
+
39
50
 
40
51
  // RELEASE PACKAGE START
41
52
  .then(() => {
42
- return innerCommon.init(pkg);
53
+ return innerCommon.init(pkg, envTarget, compositeType);
43
54
  })
44
55
 
45
56
 
@@ -74,10 +85,13 @@ module.exports.run = () => {
74
85
  // INSTALL dependencies by type
75
86
  .then(() => {
76
87
  if (pkg.remote) {
77
- return innerRemote.install(pkg, branches.isMaster);
88
+ return innerRemote.install(pkg, envTarget, compositeType);
89
+
90
+ } else if (pkg.backend) {
91
+ return innerBackend.install(pkg);
78
92
 
79
93
  } else {
80
- return innerUi.install(pkg, branches.isMaster);
94
+ return innerUi.install(pkg);
81
95
  }
82
96
  })
83
97
  .then((compositeDeps) => {
@@ -100,7 +114,7 @@ module.exports.run = () => {
100
114
 
101
115
  // GENERATE and UPDATE new version
102
116
  .then(() => {
103
- return innerCommon.updateVersion(pkg, pkgMetadata);
117
+ return innerCommon.updateVersion(pkg, pkgMetadata, envTarget);
104
118
  })
105
119
  .then((version) => {
106
120
  // storing version for later use
@@ -122,6 +136,12 @@ module.exports.run = () => {
122
136
  })
123
137
 
124
138
 
139
+ // STORING METADATA ASSETS
140
+ .then(() => {
141
+ return innerCommon.storeMetadataAssets(pkg, pkgCompositeDeps);
142
+ })
143
+
144
+
125
145
  // PUBLISH PACKAGE
126
146
  .then(() => {
127
147
  return utils.publish.publish(pkg);
@@ -144,15 +164,13 @@ module.exports.run = () => {
144
164
  .then(() => {
145
165
  // get run duration
146
166
  const duration = utils.pipeline.getTimerDuration();
147
- return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration);
167
+ return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
148
168
  })
149
169
 
150
170
 
151
- // GENERATE DIFF REPORT
171
+ // EXPORT ADDITIONAL PIPELINE VARIABLES
152
172
  .then(() => {
153
- if (branches.isMaster && pkg.remote) {
154
- return innerCommon.generateDiffReport(pkg, newVersion);
155
- }
173
+ return innerCommon.exportPipelineVariables(pkg, compositeType);
156
174
  })
157
175
 
158
176
 
@@ -2,42 +2,27 @@
2
2
 
3
3
  // GLOBAL
4
4
  const path = require('path');
5
-
6
- // LOCAL
7
5
  const installUtils = require('../../install/install-utils');
8
- const configUtils = require('../../config/config-utils');
9
- const auditUtils = require('../../audit/audit-utils');
10
-
11
6
 
12
- module.exports.install = (pkg, isMaster) => {
7
+ module.exports.install = (pkg, envTarget, compositeType) => {
13
8
  var pkgCompositeDeps = {};
14
9
 
15
10
  return Promise.resolve()
16
11
 
17
12
  // FETCHING CURRENT PACKAGES & INSTALL
18
13
  .then(() => {
19
- // fetch related project if passed as arguments
20
- const prj = configUtils.projects.getProject();
21
-
22
14
  // install the dependencies for current package build
23
- return installUtils.buildPackage.install(prj, pkg, isMaster);
15
+ return installUtils.buildPackage.installRemote(pkg, envTarget, compositeType);
24
16
  })
25
17
  .then((compositeDeps) => {
26
18
  // save composite deps for later exports
27
19
  pkgCompositeDeps = compositeDeps;
28
20
  })
29
21
 
30
-
31
- // AUDIT DEPENDENCIES
32
- .then(() => {
33
- return auditUtils.audit(pkg);
34
- })
35
-
36
22
  .then(() => {
37
23
  return pkgCompositeDeps;
38
24
  })
39
25
 
40
-
41
26
  .catch((e) => {
42
27
  throw e;
43
28
  })
@@ -2,14 +2,17 @@
2
2
 
3
3
  // GLOBAL
4
4
  const path = require('path');
5
+ const glob = require('glob');
5
6
 
6
7
  // LOCAL
7
8
  const installUtils = require('../../install/install-utils');
8
9
  const configUtils = require('../../config/config-utils');
9
10
  const auditUtils = require('../../audit/audit-utils');
11
+ const notificationUtils = require('../../../utils/notification/notification-utils');
12
+ const tools = require('../../../utils/tools');
10
13
 
11
14
 
12
- module.exports.install = (pkg, isMaster) => {
15
+ module.exports.install = (pkg) => {
13
16
  return Promise.resolve()
14
17
 
15
18
  // FETCHING CURRENT PACKAGES & INSTALL
@@ -18,13 +21,13 @@ module.exports.install = (pkg, isMaster) => {
18
21
  const prj = configUtils.projects.getProject();
19
22
 
20
23
  // install the dependencies for current package build
21
- return installUtils.buildPackage.install(prj, pkg, isMaster);
24
+ return installUtils.buildPackage.installPackage(prj, pkg);
22
25
  })
23
26
 
24
27
 
25
28
  // CHECK INTERNAL DEPENDENCIES
26
29
  .then(() => {
27
- return installUtils.buildPackage.checkDeps(pkg);
30
+ return checkDeps(pkg);
28
31
  })
29
32
 
30
33
 
@@ -38,3 +41,83 @@ module.exports.install = (pkg, isMaster) => {
38
41
  throw e;
39
42
  })
40
43
  }
44
+
45
+
46
+ const checkDeps = (pkg) => {
47
+ tools.logTitle('Checking package internal dependencies');
48
+
49
+ return Promise.resolve()
50
+ .then(() => {
51
+ var depsFound = [];
52
+ var files = glob.sync('**/*.ts', { cwd: pkg.paths.pkgLibFolder, nodir: true, follow: true, dot: true });
53
+ files.forEach(file => {
54
+ const filePath = path.join(pkg.paths.pkgLibFolder, file);
55
+ const fileContent = tools.getFileContent(filePath);
56
+ var regex = /@cc\/|@mywp\/|@opsys\/|@sfc\//gi, result, indices = [];
57
+ while ( (result = regex.exec(fileContent)) ) {
58
+ indices.push(result.index);
59
+ }
60
+ if (indices.length !== 0) {
61
+ // tools.logInfo(`Number of occurences found : ${indices.length}`);
62
+ indices.forEach((i) => {
63
+ const endPos = fileContent.substr(i, 40).indexOf("'");
64
+ const dep = fileContent.substr(i, endPos);
65
+ if (endPos > -1) {
66
+ // tools.logInfo(`dep found on : ${dep}`);
67
+ depsFound.push(dep);
68
+
69
+ } else {
70
+ tools.logInfo(`Potential wrong import detected on file : ${file}`);
71
+ const subContent = fileContent.substr(i, 40);
72
+ const detectMultiSlashes = subContent.match(/\//g);
73
+ if (detectMultiSlashes.length > 0) {
74
+ tools.logError('Multislashes on import : ');
75
+ console.log(subContent);
76
+ }
77
+ }
78
+ })
79
+ }
80
+ });
81
+ depsFound = tools.removeArrayDuplicates(depsFound);
82
+ tools.logWarning(`Dependencies found : ${depsFound.length}`);
83
+ console.log(depsFound);
84
+
85
+ return depsFound;
86
+ })
87
+
88
+ .then((depsFound) => {
89
+ var depsLevel;
90
+
91
+ switch(true) {
92
+ case (depsFound.length === 1):
93
+ depsLevel = 'LOW (1)';
94
+ break;
95
+ case (depsFound.length > 1 && depsFound.length <= 3):
96
+ depsLevel = 'MEDIUM (between 1 and 3)';
97
+ break;
98
+ case (depsFound.length > 3 && depsFound.length <= 5):
99
+ depsLevel = 'HIGH (between 3 and 5)';
100
+ break;
101
+ case (depsFound.length > 5):
102
+ depsLevel = 'VERY HIGH (>5)';
103
+ break;
104
+ default:
105
+ depsLevel = 'NONE';
106
+ }
107
+
108
+ var message = `Internal dependencies detected : ${depsFound.length} - deps level: ${depsLevel}\n`;
109
+ message += depsFound.join('\n');
110
+
111
+
112
+ return notificationUtils.package.sendPackageMessage({
113
+ package: pkg,
114
+ text: message
115
+ });
116
+ })
117
+
118
+ .catch((e) => {
119
+ console.log(e);
120
+ })
121
+
122
+ }
123
+
@@ -8,6 +8,8 @@ const configUtils = require('../config/config-utils');
8
8
 
9
9
  const tools = require('../../utils/tools');
10
10
 
11
+ const { skipPull } = tools.getArgs();
12
+
11
13
  module.exports.sync = () => {
12
14
  return Promise.resolve()
13
15
  .then(() => {
@@ -22,8 +24,10 @@ module.exports.sync = () => {
22
24
  tools.logSuccess();
23
25
  })
24
26
  .then(() => {
25
- tools.logInfo(`Pulling root folder ...`);
26
- return execa.shellSync(`git pull`, { cwd: path.join(process.cwd()), stdio: 'inherit' });
27
+ if (!skipPull) {
28
+ tools.logInfo(`Pulling root folder ...`);
29
+ return execa.shellSync(`git pull`, { cwd: path.join(process.cwd()), stdio: 'inherit' });
30
+ }
27
31
  })
28
32
  .then(() => {
29
33
  tools.logSuccess();
@@ -49,6 +53,12 @@ module.exports.sync = () => {
49
53
  .then(() => {
50
54
  return initUtils.meta.init();
51
55
  })
56
+ .then(() => {
57
+ return initUtils.processLocalEuiVersions();
58
+ })
59
+ .then(() => {
60
+ return initUtils.processResolutionsForNodeVersion();
61
+ })
52
62
  .catch((e) => {
53
63
  throw e;
54
64
  })