@eui/tools 5.0.0-rc.9 → 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 +829 -21
  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 +19 -10
  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
@@ -1,94 +0,0 @@
1
- 'use strict';
2
-
3
- const tools = require('../utils/tools');
4
- const path = require('path');
5
- const fs = require('fs');
6
- const glob = require('glob');
7
- const eol = require('eol');
8
-
9
- const sourcePath = path.join(process.cwd(), 'packages', 'eui', 'packages');
10
-
11
- const migrateFilesWithExtensions = () => {
12
- return Promise.resolve()
13
- .then(() => {
14
- return new Promise((resolve, reject) => {
15
- glob(sourcePath + "/**/*.eui8",
16
- function (err, files) {
17
- if (err) {
18
- return reject(err);
19
- } else {
20
- var processed = 0;
21
- files.forEach(function (file) {
22
- const dir = path.dirname(file);
23
- const filename = path.basename(file);
24
- tools.logInfo('replacing eUI8 file : ' + filename + ' in ' + dir);
25
- const filenameUpdate = filename.substr(0, filename.indexOf('.eui8'));
26
- fs.renameSync(file, dir + "/" + filenameUpdate);
27
- processed++;
28
- });
29
- console.log(processed + " files processed");
30
- resolve();
31
- }
32
- });
33
- })
34
- })
35
- .catch((e) => {
36
- throw e;
37
- })
38
- }
39
-
40
-
41
- const migrateFilesWithComments = () => {
42
- return new Promise((resolve, reject) => {
43
- glob('**/*.ts', { cwd: sourcePath, nodir: true, follow: true, dot: true }, (err, files) => {
44
- if (err) reject(err);
45
- files.forEach(file => {
46
- const inFile = path.join(sourcePath, file);
47
-
48
- return Promise.resolve()
49
- .then(() => {
50
- return fs.readFileSync(inFile, { encoding: 'utf8' });
51
- })
52
- .then((content) => {
53
- if (content.indexOf('EUI8-REMOVE') === -1) {
54
- return;
55
- }
56
- return Promise.resolve()
57
- .then(() => {
58
- content = eol.lf(content.toString());
59
- return content.replace(/^.*EUI8-REMOVE.*$/mg, '// EUI8-REPLACE\n// tslint:disable-next-line');
60
- })
61
- .then((content) => {
62
- return content.replace(/\/\* EUI8-KEEP\n((?:.*\n)*)(?: *\*\/)/gm, '$1\n// tslint:disable-next-line');
63
- })
64
- .then((content) => {
65
- console.log('..processing ' + inFile);
66
- return fs.writeFileSync(inFile, content);
67
- })
68
- .catch((e) => {
69
- throw e;
70
- })
71
- })
72
- .catch((e) => {
73
- throw e;
74
- })
75
- });
76
- resolve();
77
- })
78
- });
79
- }
80
-
81
-
82
- return Promise.resolve()
83
- .then(() => {
84
- return migrateFilesWithComments();
85
- })
86
- .then(() => {
87
- return migrateFilesWithExtensions();
88
- })
89
- .catch((e) => {
90
- console.log(e);
91
- process.exit(1);
92
- })
93
-
94
-
@@ -1,191 +0,0 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
- const replace = require('replace-in-file');
5
- const glob = require('glob');
6
- const semver = require('semver');
7
- const fs = require('fs');
8
-
9
- const tools = require('./tools');
10
- const configUtils = require('../config/config-utils');
11
-
12
-
13
-
14
-
15
- const migratePackage = (pkgName) => {
16
-
17
- const pkg = configUtils.packages.getPackage(pkgName);
18
-
19
- console.log(pkg);
20
-
21
- tools.logTitle(`Migrating package ${pkg.name}`);
22
-
23
- const sourcePath = path.join(process.cwd(), 'packages', pkg.name);
24
- const targetPath = path.join(process.cwd(), 'packages', pkg.name + '_7')
25
- const samplePath = path.join(process.cwd(), 'packages/eui/tools/migration/sample-package');
26
-
27
- return Promise.resolve()
28
- .then(() => {
29
- console.log(pkg);
30
- console.log(sourcePath);
31
- console.log(targetPath);
32
- console.log(samplePath);
33
- })
34
- .then(() => {
35
- return tools.copydir(samplePath, targetPath);
36
- })
37
- .then(() => {
38
- const pkgVersion = require(path.join(sourcePath, 'package.json')).version;
39
- const newVersion = semver.inc(pkgVersion, 'major');
40
- console.log('NEW VERSION : ' + newVersion);
41
- return replace({
42
- files: [targetPath + '/**/*.*'], from: /%VERSION%/g, to: newVersion
43
- })
44
- })
45
- .then(() => {
46
- return tools.copy(path.join(sourcePath, 'src/lib', 'index.ts'), path.join(targetPath, 'src', 'index.ts'));
47
- })
48
- .then(() => {
49
- return tools.copy(path.join(sourcePath, 'tslint.json.eui7'), path.join(targetPath, 'tslint.json'));
50
- })
51
- .then(() => {
52
- return tools.copy(path.join(sourcePath, 'CHANGELOG.md'), path.join(targetPath, 'CHANGELOG.md'));
53
- })
54
- .then(() => {
55
- return tools.copydir(path.join(sourcePath, 'src/lib/src'), path.join(targetPath, 'src/lib'));
56
- })
57
- .then(() => {
58
- return tools.copydir(path.join(sourcePath, 'assets'), path.join(targetPath, 'assets'));
59
- })
60
- .then(() => {
61
- return replace({
62
- files: [targetPath + '/**/*.*'], from: /%PACKAGE_NAME%/g, to: pkg.name
63
- })
64
- })
65
- .then(() => {
66
- return replace({
67
- files: [targetPath + '/**/*.*'], from: /%NAME%/g, to: pkg.npmPkgName
68
- })
69
- })
70
- .then(() => {
71
- return replace({
72
- files: [targetPath + '/**/*.*'], from: /%SCOPE%/g, to: pkg.npmPkgScope.substr(1)
73
- })
74
- })
75
- .then(() => {
76
- return replace({
77
- files: [targetPath + '/**/*.*'], from: /@eui\/ux-core/g, to: '@eui/core'
78
- })
79
- })
80
- .then(() => {
81
- return replace({
82
- files: [targetPath + '/**/*.*'], from: /@eui\/ux-commons/g, to: '@eui/core'
83
- })
84
- })
85
- .then(() => {
86
- return replace({
87
- files: [targetPath + '/**/*.*'], from: /angular2-moment/g, to: 'ngx-moment'
88
- })
89
- })
90
-
91
-
92
- // KNOWN COMMON MIGRATION rxjs / ngRx
93
- .then(() => {
94
- return replace({
95
- files: [targetPath + '/**/*.*'], from: /new ErrorObservable\(/g, to: 'Observable.throwError('
96
- })
97
- })
98
- .then(() => {
99
- return replace({
100
- files: [targetPath + '/**/*.*'], from: /ErrorObservable {/g, to: 'Observable<any> {'
101
- })
102
- })
103
- // .then(() => {
104
- // return replace({
105
- // files: [targetPath + '/**/*.*'],from: / } from \'@ngrx\/effects\'/g,to: ', ofType } from \'@ngrx/effects\''})
106
- // })
107
-
108
- .then(() => {
109
- return replace({
110
- files: [path.join(targetPath, 'src', 'index.ts')], from: /.\/src/g, to: './lib'
111
- })
112
- })
113
-
114
- .then(() => {
115
- return tools.rmdirFull(sourcePath, false);
116
- })
117
- .then(() => {
118
- return tools.rimraf(path.join(sourcePath,'src'));
119
- })
120
- .then(() => {
121
- return tools.rimraf(path.join(sourcePath,'assets'));
122
- })
123
- .then(() => {
124
- return tools.rimraf(path.join(sourcePath,'.scannerwork'));
125
- })
126
- .then(() => {
127
- return tools.copydir(targetPath, sourcePath);
128
- })
129
- .then(() => {
130
- return tools.rimraf(targetPath);
131
- })
132
- .then(() => {
133
- return new Promise((resolve, reject) => {
134
- glob(sourcePath + "/**/*.eui7",
135
- function (err, files) {
136
- if (err) {
137
- return reject(err);
138
- } else {
139
- var processed = 0;
140
- files.forEach(function (file) {
141
- const dir = path.dirname(file);
142
- const filename = path.basename(file);
143
- tools.logInfo('replacing eUI7 file : ' + filename + ' in ' + dir);
144
- const filenameUpdate = filename.substr(0, filename.indexOf('.eui7'));
145
- fs.renameSync(file, dir + "/" + filenameUpdate);
146
- processed++;
147
- });
148
- console.log(processed + " files processed");
149
- resolve();
150
- }
151
- });
152
- })
153
- })
154
-
155
- .then(() => {
156
- tools.logSuccess('OK => package migrated');
157
- })
158
-
159
- .catch((e) => {
160
- throw e;
161
- })
162
- }
163
-
164
-
165
- module.exports.migratePackages = () => {
166
- tools.logTitle('Migrating packages');
167
-
168
- const packages = configUtils.packages.getPackages();
169
-
170
- return Promise.resolve()
171
- .then(() => Promise.resolve().then(() => {
172
- return packages.reduce((promise, pkg) => {
173
- return promise.then(() => (
174
- migratePackage(pkg)
175
- ));
176
- }, Promise.resolve());
177
- }))
178
-
179
- .then(() => {
180
- tools.logSuccess('OK => all packages successfully migrated');
181
- })
182
-
183
- .catch((e) => {
184
- throw e;
185
- })
186
- }
187
-
188
-
189
- // EXPORTS
190
-
191
- module.exports.migratePackage = migratePackage;
@@ -1,126 +0,0 @@
1
- 'use strict';
2
-
3
- var Confluence = require("confluence-api");
4
-
5
- const tools = require('./tools');
6
- const configUtils = require('../csdr/config/config-utils');
7
-
8
- const { jiraUser, jiraPassword, dryRun } = tools.getArgs();
9
-
10
- const updatePageContent = (pageId, pageContent) => {
11
-
12
- const config = configUtils.global.getConfig();
13
-
14
- const confluenceHost = config.confluence && config.confluence.host;
15
- const confluenceProjectName = config.confluence && config.confluence.projectName;
16
-
17
- const confluenceConfig = {
18
- username: jiraUser,
19
- password: jiraPassword,
20
- baseUrl: confluenceHost,
21
- version: 6 // Confluence major version, optional
22
- };
23
-
24
- tools.logTitle('Update confluence DEVOPS page...');
25
-
26
- if (dryRun) {
27
- return Promise.resolve();
28
- }
29
-
30
- var confluence = new Confluence(confluenceConfig);
31
-
32
- return Promise.resolve()
33
- .then(() => {
34
- return new Promise((resolve, reject) => {
35
- confluence.getContentById(
36
- pageId
37
- , function (err, response) {
38
- if (err) {
39
- return reject(err);
40
- } else {
41
- return resolve(response);
42
- }
43
- })
44
- })
45
- })
46
- .then((content) => {
47
- const newVersion = content.version.number + 1;
48
-
49
- return new Promise((resolve, reject) => {
50
- confluence.putContent(
51
- confluenceProjectName,
52
- pageId,
53
- newVersion,
54
- content.title,
55
- pageContent
56
- , function (err, response) {
57
- if (err) {
58
- return reject(err);
59
- } else {
60
- return resolve(response);
61
- }
62
- })
63
- })
64
- })
65
- .then(() => {
66
- tools.logSuccess();
67
- })
68
- .catch((e) => {
69
- // error is not thrown as this failure to update is just a side-effect of the pipeline
70
- tools.logError('ERROR!!! error encountered while trying to publish on Confluence');
71
- console.log(e);
72
- })
73
- }
74
-
75
-
76
- const getContentByPageTitle = (pageTitle) => {
77
-
78
- const config = configUtils.global.getConfig();
79
-
80
- const confluenceHost = config.confluence && config.confluence.host;
81
- const confluenceProjectName = config.confluence && config.confluence.projectName;
82
-
83
- const confluenceConfig = {
84
- username: jiraUser,
85
- password: jiraPassword,
86
- baseUrl: confluenceHost,
87
- version: 6 // Confluence major version, optional
88
- };
89
-
90
- var confluence = new Confluence(confluenceConfig);
91
-
92
- return Promise.resolve()
93
- .then(() => {
94
- return new Promise((resolve, reject) => {
95
- confluence.getContentByPageTitle(
96
- confluenceProjectName,
97
- pageTitle
98
- , function (err, response) {
99
- if (err) {
100
- return reject(err);
101
- } else {
102
- return resolve(response);
103
- }
104
- })
105
- })
106
- })
107
- }
108
-
109
-
110
-
111
- const updatePackagesHistoryPageContent = (tableContent) => {
112
- const config = configUtils.global.getConfig();
113
- const confluencePackagesHistoryPageId = config.confluence && config.confluence.packagesHistoryPageId;
114
-
115
- return updatePageContent(confluencePackagesHistoryPageId, tableContent);
116
- }
117
-
118
-
119
-
120
- // EXPORTS
121
-
122
- module.exports = {
123
- getContentByPageTitle,
124
- updatePageContent,
125
- updatePackagesHistoryPageContent,
126
- }