@eui/tools 5.0.0-rc.8 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +846 -19
  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 -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 -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 +724 -83
  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 +6 -0
  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
@@ -0,0 +1,33 @@
1
+ // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
+
3
+ import 'zone.js/dist/long-stack-trace-zone';
4
+ import 'zone.js/dist/proxy.js';
5
+ import 'zone.js/dist/sync-test';
6
+ import 'zone.js/dist/jasmine-patch';
7
+ import 'zone.js/dist/async-test';
8
+ import 'zone.js/dist/fake-async-test';
9
+ import { APP_BASE_HREF } from '@angular/common';
10
+ import { getTestBed } from '@angular/core/testing';
11
+ import {
12
+ BrowserDynamicTestingModule,
13
+ platformBrowserDynamicTesting,
14
+ } from '@angular/platform-browser-dynamic/testing';
15
+
16
+ // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
17
+ declare const __karma__: any;
18
+ declare const require: any;
19
+
20
+ // Prevent Karma from running prematurely.
21
+ __karma__.loaded = function () {};
22
+
23
+ // First, initialize the Angular testing environment.
24
+ getTestBed().initTestEnvironment(
25
+ BrowserDynamicTestingModule,
26
+ platformBrowserDynamicTesting([{ provide: APP_BASE_HREF, useValue: '/' }]),
27
+ );
28
+ // Then we find all the tests.
29
+ const context = require.context('./', true, /\.spec\.ts$/);
30
+ // And load the modules.
31
+ context.keys().map(context);
32
+ // Finally, start Karma to run the tests.
33
+ __karma__.start();
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": [],
6
+ "module": "ESNext",
7
+ "target": "ES2016",
8
+ "lib": ["es2020", "dom"]
9
+ },
10
+ "exclude": [
11
+ "test.ts",
12
+ "**/*.spec.ts",
13
+ "_todo/**/*.ts",
14
+ "**/_todo/**/*.ts",
15
+ "src/assets/samples/**/*.ts",
16
+ "dist/assets/samples/**/*.ts"
17
+ ],
18
+ "include": ["**/*.ts"]
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": ["jasmine", "node"]
6
+ },
7
+ "files": ["src/test.ts", "src/polyfills.ts"],
8
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
9
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../../tslint.json",
3
+ "rules": {
4
+ "directive-selector": [
5
+ true,
6
+ "attribute",
7
+ "app",
8
+ "camelCase"
9
+ ],
10
+ "component-selector": [
11
+ true,
12
+ "element",
13
+ "app",
14
+ "kebab-case"
15
+ ]
16
+ }
17
+ }
@@ -15,42 +15,41 @@ const injectConfig = (project) => {
15
15
  return Promise.resolve()
16
16
  .then(() => {
17
17
  if (!project.config.npmPkg) {
18
- return tools.logWarning('No linked config package found in project config');
18
+ tools.logWarning('No linked config package found in project config');
19
+ return;
20
+ }
21
+ // check if package is locally cloned
22
+ const localPackage = configUtils.packages.getPackages().filter((p) => {
23
+ return p.npmPkg === project.config.npmPkg
24
+ })[0];
19
25
 
20
- } else {
21
- // check if package is locally cloned
22
- const localPackage = configUtils.packages.getPackages().filter((p) => {
23
- return p.npmPkg === project.config.npmPkg
24
- })[0];
26
+ var pkgAssetsPath;
27
+ const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
28
+ const projectEnvironmentsPath = path.join(process.cwd(), project.folder, 'src', 'environments');
25
29
 
26
- var pkgAssetsPath;
27
- const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
28
- const projectEnvironmentsPath = path.join(process.cwd(), project.folder, 'src', 'environments');
30
+ // if local package is found
31
+ if (localPackage) {
32
+ pkgAssetsPath = path.join(process.cwd(), 'packages', localPackage.name, 'assets');
29
33
 
30
- // if local package is found
31
- if (localPackage) {
32
- pkgAssetsPath = path.join(process.cwd(), 'packages', localPackage.name, 'assets');
34
+ // if not sources are taken from the npm package def in node_modules
35
+ } else {
36
+ const npmPkgScope = project.config.npmPkg.substr(0, project.config.npmPkg.indexOf('/'));
37
+ const npmPkgName = project.config.npmPkg.substr(project.config.npmPkg.indexOf('/') + 1);
38
+ pkgAssetsPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName, 'assets');
39
+ }
33
40
 
34
- // if not sources are taken from the npm package def in node_modules
35
- } else {
36
- const npmPkgScope = project.config.npmPkg.substr(0, project.config.npmPkg.indexOf('/'));
37
- const npmPkgName = project.config.npmPkg.substr(project.config.npmPkg.indexOf('/') + 1);
38
- pkgAssetsPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName, 'assets');
39
- }
41
+ if (!tools.isDirExists(pkgAssetsPath)) {
42
+ tools.logWarning(`Linked config pkg : ${project.config.npmPkg} cannot be found in node_modules`);
43
+ return;
44
+ }
40
45
 
41
- if (!tools.isDirExists(pkgAssetsPath)) {
42
- return tools.logWarning(`Linked config pkg : ${project.config.npmPkg} cannot be found in node_modules`);
46
+ tools.logInfo(`${project.config.npmPkg}/assets - injecting in ${projectAssetsPath}`);
47
+ tools.copydir(pkgAssetsPath, projectAssetsPath);
43
48
 
44
- } else {
45
- tools.logInfo(`${project.config.npmPkg}/assets - injecting in ${projectAssetsPath}`);
46
- tools.copydir(pkgAssetsPath, projectAssetsPath);
47
-
48
- const pkgEnvironmentsPath = path.join(pkgAssetsPath, 'environments');
49
- if (tools.isDirExists(pkgEnvironmentsPath)) {
50
- tools.logInfo(`${project.config.npmPkg}/assets/environments - injecting in ${projectEnvironmentsPath}`);
51
- tools.copydir(pkgEnvironmentsPath, projectEnvironmentsPath);
52
- }
53
- }
49
+ const pkgEnvironmentsPath = path.join(pkgAssetsPath, 'environments');
50
+ if (tools.isDirExists(pkgEnvironmentsPath)) {
51
+ tools.logInfo(`${project.config.npmPkg}/assets/environments - injecting in ${projectEnvironmentsPath}`);
52
+ tools.copydir(pkgEnvironmentsPath, projectEnvironmentsPath);
54
53
  }
55
54
  })
56
55
 
@@ -71,7 +70,7 @@ const injectPackagesConfig = (project) => {
71
70
 
72
71
  // fetching current project linked composite packages dependencies
73
72
  .then(() => {
74
- return installUtils.compositeUtils.getLocalProjectsDeps(project);
73
+ return installUtils.common.getLocalProjectsDeps(project);
75
74
  })
76
75
 
77
76
 
@@ -9,7 +9,7 @@ const configUtils = require('../../../csdr/config/config-utils');
9
9
 
10
10
  module.exports.injectExternalFeatures = (project) => {
11
11
 
12
- tools.logInfo(`Injecting project external features for : ${project.name}`);
12
+ tools.logTitle(`Injecting project external features for : ${project.name}`);
13
13
 
14
14
  return Promise.resolve()
15
15
  .then(() => {
@@ -49,6 +49,9 @@ module.exports.injectExternalFeatures = (project) => {
49
49
  throw new Error('External features not found');
50
50
 
51
51
  } else {
52
+ tools.logInfo(`Removing ${projectSrcPath} content`);
53
+ tools.rmdirFull(projectSrcPath, false);
54
+
52
55
  tools.logInfo(`${featuresSrcPath} injecting in ${projectSrcPath}`);
53
56
  return tools.copydir(featuresSrcPath, projectSrcPath, true);
54
57
  }
@@ -63,7 +66,7 @@ module.exports.injectExternalFeatures = (project) => {
63
66
 
64
67
  module.exports.injectExternalAppSources = (project) => {
65
68
 
66
- tools.logInfo(`Injecting project external application sources for : ${project.name}`);
69
+ tools.logTitle(`Injecting project external application sources for : ${project.name}`);
67
70
 
68
71
  return Promise.resolve()
69
72
  .then(() => {
@@ -103,8 +106,19 @@ module.exports.injectExternalAppSources = (project) => {
103
106
  throw new Error('External features not found');
104
107
 
105
108
  } else {
106
- tools.logInfo(`${appSourcesSrcPath} injecting in ${projectSrcPath}`);
107
- return tools.copydir(appSourcesSrcPath, projectSrcPath, true);
109
+ tools.logInfo(`Removing ${projectSrcPath} content`);
110
+
111
+ return Promise.resolve()
112
+ .then(() => {
113
+ return tools.rmdirFull(projectSrcPath, false);
114
+ })
115
+ .then(() => {
116
+ tools.logInfo(`${appSourcesSrcPath} injecting in ${projectSrcPath}`);
117
+ return tools.copydir(appSourcesSrcPath, projectSrcPath, true);
118
+ })
119
+ .catch((e) => {
120
+ throw e;
121
+ })
108
122
  }
109
123
  }
110
124
  })
@@ -115,94 +129,78 @@ module.exports.injectExternalAppSources = (project) => {
115
129
  }
116
130
 
117
131
 
118
- module.exports.injectExternalMock = (project) => {
132
+ module.exports.injectElementExternalSources = (pkg) => {
119
133
 
120
- tools.logInfo(`Injecting project external mock for : ${project.name}`);
134
+ tools.logTitle(`Injecting package external sources for : ${pkg.name}`);
121
135
 
122
136
  return Promise.resolve()
123
137
  .then(() => {
124
- if (!(project.mock && project.mock.external)) {
125
- tools.logInfo('No external mock setup...skipping')
138
+ if (!pkg.externalSources) {
139
+ tools.logInfo('No external sources setup...skipping');
140
+ return;
141
+ }
142
+
143
+ if (!pkg.externalSources.npmPkg || !pkg.externalSources.folder) {
144
+ return tools.logWarning('External sources use requires a source [npmPkg] and a [folder] declared');
126
145
 
127
146
  } else {
128
- return gitUtils.cloneRepo(project.mock.repository, project.mock.folder);
129
- }
130
- })
147
+ // check if package is locally cloned
148
+ const localPackage = configUtils.packages.getPackages().filter((p) => {
149
+ return p.npmPkg === pkg.externalSources.npmPkg
150
+ })[0];
131
151
 
132
- .catch((e) => {
133
- throw e;
134
- })
135
- }
152
+ let externalSourcesSrcPath;
153
+ const pkgSrcPath = path.join(pkg.paths.pkgRootDirectory, 'src');
136
154
 
137
- module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
138
- tools.logInfo(`Remapping routes by env config for ${envTarget}`);
155
+ // if local package is found
156
+ if (localPackage) {
157
+ tools.logInfo('local pkg found, copying from local');
158
+ externalSourcesSrcPath = path.join(process.cwd(), 'packages', localPackage.name, pkg.externalSources.folder);
139
159
 
140
- return Promise.resolve()
141
- .then(() => {
142
- // getting config file
143
- const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
144
- let configFile;
145
-
146
- // build - envTarget based
147
- if (build) {
148
- let envTargetFinal = envTarget.toLowerCase();
149
- // dirty fix as openid files do not respect envTarget names
150
- if (envTargetFinal === 'tst') {
151
- envTargetFinal = 'test';
160
+ // if not sources are taken from the npm package def in node_modules
161
+ } else {
162
+ tools.logInfo('remote pkg found, copying from remote');
163
+ const npmPkgScope = pkg.externalSources.npmPkg.substr(0, pkg.externalSources.npmPkg.indexOf('/'));
164
+ const npmPkgName = pkg.externalSources.npmPkg.substr(pkg.externalSources.npmPkg.indexOf('/') + 1);
165
+
166
+ externalSourcesSrcPath = path.join(pkg.paths.pkgRootDirectory, 'node_modules', npmPkgScope, npmPkgName, pkg.externalSources.folder);
152
167
  }
153
- configFile = path.join(projectAssetsPath, 'openid-login-config.' + envTargetFinal + '.json');
154
168
 
155
- // serve configuration based
156
- } else {
157
- if (envTarget.indexOf('local') > -1) {
158
- configFile = path.join(projectAssetsPath, 'openid-login-config.' + envTarget.replace('-openid', '') + '.json');
169
+ if (!tools.isDirExists(externalSourcesSrcPath)) {
170
+ tools.logWarning(`External sources location : ${externalSourcesSrcPath} cannot be found in node_modules`);
171
+ throw new Error('External sources not found');
172
+
159
173
  } else {
160
- configFile = path.join(projectAssetsPath, 'openid-login-config.local-' + envTarget + '.json');
174
+ if (tools.isDirExists(pkgSrcPath)) {
175
+ tools.logInfo(`Removing ${pkgSrcPath} content`);
176
+ tools.rmdirFull(pkgSrcPath, false);
177
+ }
178
+
179
+ tools.logInfo(`${externalSourcesSrcPath} injecting in ${pkgSrcPath}`);
180
+ return tools.copydir(externalSourcesSrcPath, pkgSrcPath, true);
161
181
  }
162
182
  }
183
+ })
163
184
 
164
- tools.logInfo(`checking ${configFile}`);
165
- if (!tools.isFileExists(configFile)) {
166
- tools.logError(`config file for ${envTarget} do not exists`);
167
- return;
168
- }
185
+ .catch((e) => {
186
+ throw e;
187
+ })
188
+ }
169
189
 
170
- // getting config file content and checking if routesRemapping is set
171
- const config = require(configFile);
172
- const routesRemapping = config.routesRemapping;
173
- if (!routesRemapping) {
174
- tools.logWarning('No routes remapping found in current config...skipping');
175
- return;
176
- }
177
190
 
178
- // checking is routes path declared
179
- if (!project.appSources.routesFilePath) {
180
- tools.logError('project appSources.routesFilePath is not declared in apps config');
181
- return;
182
- }
183
191
 
184
- // checking is routes file exists
185
- const routesFilePath = path.join(project.paths.rootPath, project.appSources.routesFilePath);
186
- if (!tools.isFileExists(routesFilePath)) {
187
- tools.logError(`Unable to find routes files : ${routesFilePath}`);
188
- return;
189
- }
192
+ module.exports.injectExternalMock = (project) => {
190
193
 
191
- // get routes file content and replace tokens
192
- let routesFileContent = tools.getFileContent(routesFilePath);
193
- routesRemapping.forEach((route) => {
194
- tools.logInfo(`checking replacement for : ${JSON.stringify(route)}`);
195
- // const tokenToSearch = `@${route.featureModule}.routeModuleDef@`;
196
- const tokenToSearch = `./features/${route.featureModule}-lib.module#Module`;
197
- if (routesFileContent.indexOf(tokenToSearch) > -1) {
198
- tools.logInfo(`token ${tokenToSearch} found...replacing`);
199
- routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.routeModuleDef);
200
- }
201
- })
202
- return tools.writeFileContent(routesFilePath, routesFileContent);
203
- })
194
+ tools.logTitle(`Injecting project external mock for : ${project.name}`);
195
+
196
+ return Promise.resolve()
204
197
  .then(() => {
205
- tools.logSuccess();
198
+ if (!(project.mock && project.mock.external)) {
199
+ tools.logInfo('No external mock setup...skipping')
200
+
201
+ } else {
202
+ return gitUtils.cloneRepo(project.mock.repository, project.mock.folder);
203
+ }
206
204
  })
207
205
 
208
206
  .catch((e) => {
@@ -4,8 +4,10 @@
4
4
  const innerConfig = require('./config');
5
5
  const innerSkeletons = require('./skeletons');
6
6
  const innerExternals = require('./externals');
7
+ const innerRoutesReplacement = require('./routes-replacement');
7
8
 
8
9
  // re-exports inner modules
9
10
  module.exports.config = innerConfig;
10
11
  module.exports.skeletons = innerSkeletons;
11
12
  module.exports.externals = innerExternals;
13
+ module.exports.routesReplacement = innerRoutesReplacement;