@eui/tools 5.0.0-rc.9 → 5.1.2
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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +848 -21
- package/bin/eui-scripts.js +6 -6
- package/bin/scripts/build-package-sub.js +20 -0
- package/bin/scripts/version.js +12 -0
- package/global.test.js +61 -45
- package/package.json +14 -13
- package/sandbox.js +229 -6
- package/scripts/csdr/audit/audit-utils.js +2 -2
- package/scripts/csdr/cli/app.js +43 -5
- package/scripts/csdr/cli/package.js +93 -9
- package/scripts/csdr/cli/skeletons/app-eui10/angular-config.json +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/gitignore_TO_REPLACE +63 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/models/user.js +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/index.js +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/user_routes.js +24 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/db/db.json +12 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/server.js +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-eui10/scripts.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-starter.service.ts +68 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.html +29 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.ts +55 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.module.ts +27 -0
- package/scripts/{utils/pre-build/translations/common.js → csdr/cli/skeletons/app-eui10/src/app/core/components/.gitkeep} +0 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/core.module.ts +84 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/reducers/index.ts +33 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.html +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/shared.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/testing/router.mock.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/config/env-json-config.json +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/en.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/fr.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/global.ts +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/index.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/modules.ts +4 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.prod.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/index.html +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/styles.scss +1 -0
- package/scripts/csdr/cli/skeletons/app-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/app-showcase/angular-config.json +98 -28
- package/scripts/csdr/cli/skeletons/app-showcase/dependencies-composite.json +1 -1
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.component.html +16 -18
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/app.routes.ts +1 -1
- package/scripts/csdr/cli/skeletons/app-showcase/src/app/features/_home/home.module.ts +2 -2
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/app/features/shared/shared.module.ts +0 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
- package/scripts/csdr/cli/skeletons/{app-showcase → app-showcase-eui13}/src/index.html +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/en.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/fr.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/lib/module.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +25 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +3 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +62 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +44 -39
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +23 -9
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +6 -5
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +3 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +64 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +3 -0
- 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
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/fallback.component.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +219 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +55 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +31 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +15 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/index.html +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +12 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +86 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +18 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/{frontend-remote → frontend-remote-eui10}/webpack.extra.js +0 -0
- package/scripts/csdr/config/angular.js +724 -83
- package/scripts/csdr/config/global.js +43 -6
- package/scripts/csdr/config/packages.js +64 -1
- package/scripts/csdr/config/projects.js +24 -6
- package/scripts/csdr/config/projects.test.js +11 -9
- package/scripts/csdr/config/sync.js +6 -3
- package/scripts/csdr/init/init-utils.js +108 -0
- package/scripts/csdr/init/init.js +11 -0
- package/scripts/csdr/init/prompt.js +3 -1
- package/scripts/csdr/init/resources/10.x/yarn.lock +16428 -0
- package/scripts/csdr/init/resources/13.x/browserslistrc +6 -0
- package/scripts/csdr/init/resources/13.x/resolutions.json +6 -0
- package/scripts/csdr/init/resources/14.x/browserslistrc +6 -0
- package/scripts/csdr/init/resources/14.x/resolutions.json +5 -0
- package/scripts/csdr/init/resources/nodejs-10.x/resolutions.json +8 -0
- package/scripts/csdr/install/build-app.js +6 -38
- package/scripts/csdr/install/build-package.js +16 -157
- package/scripts/csdr/install/common.js +19 -10
- package/scripts/csdr/install/composite-core.js +256 -0
- package/scripts/csdr/install/install-utils.js +8 -4
- package/scripts/csdr/install/local-dev.js +6 -4
- package/scripts/csdr/install/packages.js +90 -0
- package/scripts/csdr/install/projects.js +77 -0
- package/scripts/csdr/install/{remote.js → remotes.js} +46 -51
- package/scripts/csdr/metadata/app-envs.js +0 -39
- package/scripts/csdr/metadata/app-history.js +0 -66
- package/scripts/csdr/metadata/app-versions.js +2 -12
- package/scripts/csdr/metadata/app.js +49 -9
- package/scripts/csdr/metadata/common.js +23 -47
- package/scripts/csdr/metadata/metadata-utils.js +2 -0
- package/scripts/csdr/metadata/package-envs.js +71 -0
- package/scripts/csdr/metadata/package-history.js +5 -0
- package/scripts/csdr/metadata/package-versions.js +79 -0
- package/scripts/csdr/metadata/package.js +95 -105
- package/scripts/csdr/metadata/stats.js +9 -5
- package/scripts/csdr/metadata/v2/app/_app.js +21 -0
- package/scripts/csdr/metadata/v2/app/app.js +25 -0
- package/scripts/csdr/metadata/v2/app/index.js +3 -0
- package/scripts/csdr/metadata/v2/global/_global.js +21 -0
- package/scripts/csdr/metadata/v2/global/global.js +25 -0
- package/scripts/csdr/metadata/v2/global/index.js +3 -0
- package/scripts/csdr/metadata/v2/index.js +5 -0
- package/scripts/csdr/metadata/v2/migrate-devops-metadata.js +207 -0
- package/scripts/csdr/metadata/v2/package/_package.js +21 -0
- package/scripts/csdr/metadata/v2/package/index.js +3 -0
- package/scripts/csdr/metadata/v2/package/package.js +25 -0
- package/scripts/csdr/release/app/release-app.js +16 -21
- package/scripts/csdr/release/package/backend.js +26 -0
- package/scripts/csdr/release/package/common.js +220 -18
- package/scripts/csdr/release/package/release-package.js +28 -10
- package/scripts/csdr/release/package/remote.js +2 -17
- package/scripts/csdr/release/package/ui.js +86 -3
- package/scripts/csdr/sync/sync-utils.js +6 -0
- package/scripts/csdr/templates/maven-settings.template +13 -0
- package/scripts/csdr/version/app-common.js +32 -0
- package/scripts/csdr/version/app-env-target.js +5 -295
- package/scripts/csdr/version/app.js +5 -3
- package/scripts/csdr/version/common.js +282 -0
- package/scripts/csdr/version/{app-env-target.test.js → common.test.js} +48 -36
- package/scripts/csdr/version/package-common.js +158 -0
- package/scripts/csdr/version/package-default.js +144 -0
- package/scripts/csdr/version/package-remote.js +51 -0
- package/scripts/csdr/version/package.js +16 -270
- package/scripts/csdr/version/version-utils.js +12 -7
- package/scripts/utils/api-utils.js +126 -0
- package/scripts/utils/build/app/build-app-utils.js +11 -9
- package/scripts/utils/build/package/angular.js +4 -30
- package/scripts/utils/build/package/build-package-utils.js +50 -1
- package/scripts/utils/build/package/element.js +17 -18
- package/scripts/utils/build/package/nodeJs.js +2 -1
- package/scripts/utils/build/package/skeletons/elements/index.html +9 -0
- package/scripts/utils/build/package/styles.js +92 -92
- package/scripts/utils/git-utils.js +76 -6
- package/scripts/utils/index.js +3 -4
- package/scripts/utils/notification/common.js +5 -0
- package/scripts/utils/notification/mail-utils.js +3 -0
- package/scripts/utils/notification/mailstack.js +3 -5
- package/scripts/utils/notification/package.js +0 -2
- package/scripts/utils/notification/slack-utils.js +6 -7
- package/scripts/utils/pre-build/elements.js +8 -4
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/app/app.module.ts +1 -1
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/tsconfig.app.json +1 -2
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/config.js +30 -31
- package/scripts/utils/pre-build/injection/externals.js +70 -72
- package/scripts/utils/pre-build/injection/injection-utils.js +2 -0
- package/scripts/utils/pre-build/injection/routes-replacement.js +322 -0
- package/scripts/utils/pre-build/injection/skeletons.js +9 -3
- package/scripts/utils/pre-build/projects.js +20 -15
- package/scripts/utils/pre-build/translations/elements.js +21 -11
- package/scripts/utils/serve/app.js +7 -4
- package/scripts/utils/test/test-utils.js +39 -1
- package/scripts/utils/tools.js +402 -290
- package/bin/scripts/csdr-jira-update.js +0 -12
- package/bin/scripts/csdr-migrate-package.js +0 -17
- package/bin/scripts/e2e-app.js +0 -62
- package/scripts/csdr/install/composite-utils.js +0 -292
- package/scripts/csdr/jira/jira-utils.js +0 -169
- package/scripts/csdr/jira/update.js +0 -153
- package/scripts/migration/eui8-migration.js +0 -94
- package/scripts/migration/migrate-utils.js +0 -191
- package/scripts/utils/confluence-utils.js +0 -126
package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts
ADDED
|
@@ -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
|
+
}
|
|
@@ -15,42 +15,41 @@ const injectConfig = (project) => {
|
|
|
15
15
|
return Promise.resolve()
|
|
16
16
|
.then(() => {
|
|
17
17
|
if (!project.config.npmPkg) {
|
|
18
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
// if local package is found
|
|
31
|
+
if (localPackage) {
|
|
32
|
+
pkgAssetsPath = path.join(process.cwd(), 'packages', localPackage.name, 'assets');
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
46
|
+
tools.logInfo(`${project.config.npmPkg}/assets - injecting in ${projectAssetsPath}`);
|
|
47
|
+
tools.copydir(pkgAssetsPath, projectAssetsPath);
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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(
|
|
107
|
-
|
|
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.
|
|
132
|
+
module.exports.injectElementExternalSources = (pkg) => {
|
|
119
133
|
|
|
120
|
-
tools.
|
|
134
|
+
tools.logTitle(`Injecting package external sources for : ${pkg.name}`);
|
|
121
135
|
|
|
122
136
|
return Promise.resolve()
|
|
123
137
|
.then(() => {
|
|
124
|
-
if (!
|
|
125
|
-
tools.logInfo('No external
|
|
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
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
})
|
|
135
|
-
}
|
|
152
|
+
let externalSourcesSrcPath;
|
|
153
|
+
const pkgSrcPath = path.join(pkg.paths.pkgRootDirectory, 'src');
|
|
136
154
|
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
-
|
|
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;
|