@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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +829 -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 +76 -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
|
@@ -1,283 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// constants
|
|
16
|
-
const RELEASE_TYPES = ['major', 'minor', 'patch'];
|
|
17
|
-
|
|
18
|
-
const { dryRun, nexusUser, nexusPassword } = tools.getArgs();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const getCurrentVersion = (pkg) => {
|
|
3
|
+
// inner modules
|
|
4
|
+
const packageDefault = require('./package-default');
|
|
5
|
+
const packageRemote = require('./package-remote');
|
|
6
|
+
const packageCommon = require('./package-common');
|
|
7
|
+
|
|
8
|
+
// public methods
|
|
9
|
+
module.exports.getNewVersion = (
|
|
10
|
+
pkg,
|
|
11
|
+
commits,
|
|
12
|
+
isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch,
|
|
13
|
+
envTarget
|
|
14
|
+
) => {
|
|
22
15
|
return Promise.resolve()
|
|
23
16
|
.then(() => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
tools.logTitle('Extracting current version');
|
|
27
|
-
|
|
28
|
-
if (pkg.backend) {
|
|
29
|
-
// if nodejs backend, explicitely declared
|
|
30
|
-
if (pkg.build && pkg.build.nodejs) {
|
|
31
|
-
tools.logInfo('UI package => extracting from package.json');
|
|
32
|
-
|
|
33
|
-
const pathPkgJson = path.resolve(pkg.paths.pkgDirectory, 'package.json');
|
|
34
|
-
const pkgJson = require(pathPkgJson);
|
|
35
|
-
currentVersion = pkgJson.version;
|
|
36
|
-
|
|
37
|
-
// by default maven java backend is taken into account
|
|
38
|
-
} else {
|
|
39
|
-
tools.logInfo('Backend => extracting pom.xml');
|
|
40
|
-
|
|
41
|
-
const xmlContent = tools.getXMLJsContent(path.join(pkg.paths.pkgDirectory, 'pom.xml'));
|
|
42
|
-
console.log(xmlContent);
|
|
43
|
-
|
|
44
|
-
currentVersion = xmlContent.project.version.toString();
|
|
45
|
-
}
|
|
46
|
-
|
|
17
|
+
if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
|
|
18
|
+
return packageRemote.getNewVersion(pkg, envTarget);
|
|
47
19
|
} else {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const pathPkgJson = path.resolve(pkg.paths.pkgDirectory, 'package.json');
|
|
51
|
-
const pkgJson = require(pathPkgJson);
|
|
52
|
-
currentVersion = pkgJson.version;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
tools.logSuccess('Current version found : ' + currentVersion);
|
|
56
|
-
return currentVersion;
|
|
57
|
-
})
|
|
58
|
-
.catch((e) => {
|
|
59
|
-
throw e;
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
65
|
-
return Promise.resolve()
|
|
66
|
-
.then(() => {
|
|
67
|
-
const pkgJsonFile = path.resolve(folder, 'package.json');
|
|
68
|
-
const pkgJson = require(pkgJsonFile);
|
|
69
|
-
|
|
70
|
-
let tag = 'latest';
|
|
71
|
-
|
|
72
|
-
if (isSnapshot) {
|
|
73
|
-
tag = 'snapshot';
|
|
74
|
-
}
|
|
75
|
-
if (isNextBranch) {
|
|
76
|
-
tag = 'next';
|
|
77
|
-
}
|
|
78
|
-
if (isSupportBranch) {
|
|
79
|
-
tag = 'prev';
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
pkgJson.version = newVersion;
|
|
83
|
-
pkgJson.tag = tag;
|
|
84
|
-
|
|
85
|
-
tools.logInfo(`Updating package version : ${newVersion} / tag: ${tag} for ${pkgJsonFile}`);
|
|
86
|
-
tools.writeJsonFileSync(pkgJsonFile, pkgJson);
|
|
87
|
-
})
|
|
88
|
-
.catch((e) => {
|
|
89
|
-
throw e;
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
94
|
-
return Promise.resolve()
|
|
95
|
-
.then(() => {
|
|
96
|
-
tools.logTitle('updating package version');
|
|
97
|
-
|
|
98
|
-
if (!pkg.parent) {
|
|
99
|
-
return Promise.resolve()
|
|
100
|
-
.then(() => {
|
|
101
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch);
|
|
102
|
-
})
|
|
103
|
-
.then(() => {
|
|
104
|
-
if (!pkg.element && !pkg.config) {
|
|
105
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch);
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
.catch((e) => {
|
|
109
|
-
throw e;
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
} else {
|
|
113
|
-
return Promise.resolve()
|
|
114
|
-
.then(() => {
|
|
115
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch);
|
|
116
|
-
})
|
|
117
|
-
.then(() => {
|
|
118
|
-
let linkedPackages = Object.keys(pkg.packages)
|
|
119
|
-
.map(p => {
|
|
120
|
-
const pkg = configUtils.packages.getPackage(p);
|
|
121
|
-
return pkg;
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
return tools.removeArrayDuplicates(linkedPackages, 'name');
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
.then((linkedPackages) => Promise.resolve().then(() => {
|
|
128
|
-
return linkedPackages.reduce((promise, pkg) => {
|
|
129
|
-
return promise.then(() => (
|
|
130
|
-
writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch)
|
|
131
|
-
));
|
|
132
|
-
}, Promise.resolve());
|
|
133
|
-
}))
|
|
134
|
-
|
|
135
|
-
.catch((e) => {
|
|
136
|
-
throw e;
|
|
137
|
-
})
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
.then(() => {
|
|
141
|
-
tools.logSuccess();
|
|
142
|
-
})
|
|
143
|
-
.catch((e) => {
|
|
144
|
-
throw e;
|
|
145
|
-
})
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const writePomXml = (pkg, newVersion, isSnapshot, isForceTimestamp = true) => {
|
|
151
|
-
|
|
152
|
-
tools.logTitle(`updating project pom.xml version: ${newVersion}`);
|
|
153
|
-
|
|
154
|
-
return Promise.resolve()
|
|
155
|
-
.then(() => {
|
|
156
|
-
return templateUtils.generateMavenSettings(nexusUser, nexusPassword);
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
.then((mavenSettingsFile) => {
|
|
160
|
-
|
|
161
|
-
tools.logInfo(`Executing mvn versions on : ${pkg.paths.pkgDirectory}`);
|
|
162
|
-
|
|
163
|
-
execa.shellSync('mvn versions:set -T1 -DnewVersion=' + newVersion + ' -s ' + mavenSettingsFile, { cwd: pkg.paths.pkgDirectory });
|
|
164
|
-
execa.shellSync('mvn versions:commit -T1' + ' -s ' + mavenSettingsFile, { cwd: pkg.paths.pkgDirectory });
|
|
165
|
-
|
|
166
|
-
if (isForceTimestamp) {
|
|
167
|
-
// timestamp file is forced to have at least one file to commit, as snapshot release
|
|
168
|
-
// for backend can keep the same version until its latest
|
|
169
|
-
const tsversionFile = path.resolve(pkg.paths.pkgDirectory, '.tsversion');
|
|
170
|
-
fs.writeFileSync(tsversionFile, Date.now());
|
|
171
|
-
|
|
172
|
-
const versionFile = path.resolve(pkg.paths.pkgDirectory, '.version.properties');
|
|
173
|
-
fs.writeFileSync(versionFile, newVersion);
|
|
20
|
+
return packageDefault.getNewVersion(pkg, commits, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch);
|
|
174
21
|
}
|
|
175
22
|
})
|
|
176
|
-
.then(() => {
|
|
177
|
-
tools.logSuccess();
|
|
178
|
-
})
|
|
179
|
-
.catch((e) => {
|
|
180
|
-
throw e;
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
|
|
184
23
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// PUBLIC METHODS
|
|
189
|
-
|
|
190
|
-
module.exports.getNewVersion = (pkg, commits, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
191
|
-
return Promise.resolve()
|
|
192
|
-
.then(() => {
|
|
193
|
-
return getCurrentVersion(pkg);
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
.then((currentVersion) => {
|
|
197
|
-
tools.logTitle('Extracting recommended version');
|
|
198
|
-
|
|
199
|
-
tools.logInfo(`Current version found : ${currentVersion}`);
|
|
200
|
-
|
|
201
|
-
let newVersion = '1.0.0';
|
|
202
|
-
|
|
203
|
-
if (commits) {
|
|
204
|
-
|
|
205
|
-
tools.logInfo('Commits found for processing version, extracting...');
|
|
206
|
-
|
|
207
|
-
let level = 2;
|
|
208
|
-
let breakings = 0;
|
|
209
|
-
let features = 0;
|
|
210
|
-
|
|
211
|
-
commits.forEach((commit) => {
|
|
212
|
-
if (commit.breakingChange) {
|
|
213
|
-
breakings += commit.body;
|
|
214
|
-
level = 0;
|
|
215
|
-
} else if (commit.type === 'feat') {
|
|
216
|
-
features += 1;
|
|
217
|
-
if (level === 2) {
|
|
218
|
-
level = 1;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
const release = {
|
|
224
|
-
level: level,
|
|
225
|
-
reason: 'There are ' + breakings + ' BREAKING CHANGES and ' + features + ' features',
|
|
226
|
-
releaseType: RELEASE_TYPES[level]
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
tools.logInfo('release info found : ' + JSON.stringify(release));
|
|
230
|
-
|
|
231
|
-
if (isNextBranch) {
|
|
232
|
-
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
233
|
-
} else {
|
|
234
|
-
newVersion = semver.valid(release.releaseType) || semver.inc(currentVersion, release.releaseType)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
} else {
|
|
239
|
-
tools.logInfo('No commits found for version processing...applying minor version upgrade');
|
|
240
|
-
|
|
241
|
-
if (isNextBranch) {
|
|
242
|
-
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
243
|
-
} else {
|
|
244
|
-
newVersion = semver.inc(currentVersion, 'minor');
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
tools.logInfo('probable new version : ' + newVersion);
|
|
249
|
-
|
|
250
|
-
if (isSnapshot) {
|
|
251
|
-
if (pkg.backend) {
|
|
252
|
-
if (pkg.build && pkg.build.nodejs) {
|
|
253
|
-
newVersion += '-snapshot-' + Date.now();
|
|
254
|
-
} else {
|
|
255
|
-
newVersion += '-SNAPSHOT';
|
|
256
|
-
}
|
|
257
|
-
} else {
|
|
258
|
-
newVersion += '-snapshot-' + Date.now();
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (isSupportBranch && pkg.backend) {
|
|
263
|
-
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
tools.logSuccess('new version generated : ' + newVersion);
|
|
267
|
-
|
|
268
|
-
return newVersion;
|
|
269
|
-
})
|
|
270
24
|
.catch((e) => {
|
|
271
25
|
throw e;
|
|
272
26
|
})
|
|
273
27
|
}
|
|
274
28
|
|
|
275
|
-
|
|
276
|
-
module.exports.updateVersion = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
277
|
-
if (pkg.backend) {
|
|
278
|
-
return writePomXml(pkg, newVersion, isSnapshot);
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
return writePackageJson(pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
29
|
+
module.exports.updateVersion = packageCommon.updateVersion;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// externals
|
|
4
|
-
const moment = require('moment');
|
|
5
|
-
|
|
6
|
-
// local
|
|
7
|
-
const tools = require('../../utils/tools');
|
|
8
|
-
|
|
9
3
|
// inner modules
|
|
10
4
|
const innerApp = require('./app');
|
|
5
|
+
const innerAppCommon = require('./app-common');
|
|
6
|
+
const innerAppDefault = require('./app-default');
|
|
7
|
+
const innerAppEnvTarget = require('./app-env-target');
|
|
11
8
|
const innerPackage = require('./package');
|
|
9
|
+
const innerPackageCommon = require('./package-common');
|
|
10
|
+
const innerPackageRemote = require('./package-remote');
|
|
11
|
+
const innerPackageDefault = require('./package-default');
|
|
12
12
|
|
|
13
13
|
// re-exports inner modules
|
|
14
14
|
module.exports.app = innerApp;
|
|
15
|
+
module.exports.appCommon = innerAppCommon;
|
|
16
|
+
module.exports.appDefault = innerAppDefault;
|
|
17
|
+
module.exports.appEnvTarget = innerAppEnvTarget;
|
|
15
18
|
module.exports.package = innerPackage;
|
|
16
|
-
|
|
19
|
+
module.exports.packageCommon = innerPackageCommon;
|
|
20
|
+
module.exports.packageRemote = innerPackageRemote;
|
|
21
|
+
module.exports.packageDefault = innerPackageDefault;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// LOCALS
|
|
4
|
+
const tools = require('./tools');
|
|
5
|
+
const configUtils = require('../csdr/config/config-utils');
|
|
6
|
+
|
|
7
|
+
// FETCH OPTIONS
|
|
8
|
+
const { API_HOST } = configUtils.global.getConfigOptions();
|
|
9
|
+
|
|
10
|
+
// FETCH ARGS
|
|
11
|
+
const { apiUserId, apiPassword } = tools.getArgs();
|
|
12
|
+
|
|
13
|
+
// PRIVATES
|
|
14
|
+
let authToken;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const handleResponse = (response) => {
|
|
18
|
+
tools.logDebug(JSON.stringify(response));
|
|
19
|
+
|
|
20
|
+
if (response.ok) {
|
|
21
|
+
return response.data;
|
|
22
|
+
} else {
|
|
23
|
+
throw new Error(response.message);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports.login = () => {
|
|
28
|
+
const fetch = require('node-fetch');
|
|
29
|
+
|
|
30
|
+
tools.logInfo(`API Login - userId:${apiUserId}`);
|
|
31
|
+
|
|
32
|
+
return Promise.resolve()
|
|
33
|
+
.then(() => {
|
|
34
|
+
return fetch(`${API_HOST}/auth`, {
|
|
35
|
+
method: 'post',
|
|
36
|
+
headers: { 'content-type': 'application/json' },
|
|
37
|
+
body: JSON.stringify({
|
|
38
|
+
"userid": apiUserId,
|
|
39
|
+
"password": apiPassword
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
.then((res) => {
|
|
44
|
+
tools.logDebugResponse(res);
|
|
45
|
+
return res.json();
|
|
46
|
+
})
|
|
47
|
+
.then((response) => {
|
|
48
|
+
authToken = response.token;
|
|
49
|
+
return handleResponse(response);
|
|
50
|
+
})
|
|
51
|
+
.catch(e => {
|
|
52
|
+
tools.logDebugTrace(__filename, 'login', e);
|
|
53
|
+
throw e;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
module.exports.get = (pathName) => {
|
|
59
|
+
const fetch = require('node-fetch');
|
|
60
|
+
|
|
61
|
+
tools.logInfo(`API get - pathName: ${pathName}`);
|
|
62
|
+
|
|
63
|
+
return Promise.resolve()
|
|
64
|
+
.then(() => {
|
|
65
|
+
if (!authToken) {
|
|
66
|
+
return this.login();
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
.then(() => {
|
|
70
|
+
return fetch(`${API_HOST}${pathName}`, {
|
|
71
|
+
method: 'get',
|
|
72
|
+
headers: {
|
|
73
|
+
'content-type': 'application/json',
|
|
74
|
+
'x-auth-token': authToken
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
.then((res) => {
|
|
79
|
+
tools.logDebugResponse(res);
|
|
80
|
+
return res.json();
|
|
81
|
+
})
|
|
82
|
+
.then((response) => {
|
|
83
|
+
return handleResponse(response);
|
|
84
|
+
})
|
|
85
|
+
.catch(e => {
|
|
86
|
+
tools.logDebugTrace(__filename, 'get', e);
|
|
87
|
+
throw e;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
module.exports.post = (pathName, body) => {
|
|
93
|
+
const fetch = require('node-fetch');
|
|
94
|
+
|
|
95
|
+
tools.logInfo(`API post - pathName: ${pathName} - body: ${JSON.stringify(body)}`);
|
|
96
|
+
|
|
97
|
+
return Promise.resolve()
|
|
98
|
+
.then(() => {
|
|
99
|
+
if (!authToken) {
|
|
100
|
+
return this.login();
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.then(() => {
|
|
104
|
+
return fetch(`${API_HOST}${pathName}`, {
|
|
105
|
+
method: 'post',
|
|
106
|
+
headers: {
|
|
107
|
+
'content-type': 'application/json',
|
|
108
|
+
'x-auth-token': authToken
|
|
109
|
+
},
|
|
110
|
+
body: JSON.stringify(body)
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
.then((res) => {
|
|
114
|
+
tools.logDebugResponse(res);
|
|
115
|
+
return res.json();
|
|
116
|
+
})
|
|
117
|
+
.then((response) => {
|
|
118
|
+
return handleResponse(response);
|
|
119
|
+
})
|
|
120
|
+
.catch(e => {
|
|
121
|
+
tools.logDebugTrace(__filename, 'post', e);
|
|
122
|
+
throw e;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
@@ -13,7 +13,7 @@ const preBuildUtils = require('../../pre-build/pre-build-utils');
|
|
|
13
13
|
let {
|
|
14
14
|
skipLint, skipTest, skipCompile, configuration, baseHref,
|
|
15
15
|
watch, dryRun, maxSpaceSize, statsJson, extraWebpackConfig, ci,
|
|
16
|
-
deployUrl, sourceMap
|
|
16
|
+
deployUrl, sourceMap, configEnvTarget
|
|
17
17
|
} = tools.getArgs();
|
|
18
18
|
|
|
19
19
|
|
|
@@ -33,12 +33,18 @@ const getProjectInfos = () => {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
36
|
+
module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) => {
|
|
37
37
|
|
|
38
38
|
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
39
39
|
|
|
40
40
|
const currentProject = getProjectInfos();
|
|
41
41
|
|
|
42
|
+
// checking if configEnvTarget is passed as param, if not take the global script param
|
|
43
|
+
// as this angular build method can be called in stand-alone (outside of CSDR pipeline flow)
|
|
44
|
+
if (configEnvTargetIn) {
|
|
45
|
+
configEnvTarget = configEnvTargetIn;
|
|
46
|
+
}
|
|
47
|
+
|
|
42
48
|
// getting param from project config
|
|
43
49
|
if (currentProject.build) {
|
|
44
50
|
if (currentProject.build.skipLint) {
|
|
@@ -66,7 +72,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
66
72
|
})
|
|
67
73
|
|
|
68
74
|
.then(() => {
|
|
69
|
-
return preBuildUtils.projects.preBuild(currentProject, envTarget, true);
|
|
75
|
+
return preBuildUtils.projects.preBuild(currentProject, envTarget, true, configEnvTarget);
|
|
70
76
|
})
|
|
71
77
|
|
|
72
78
|
.then(() => {
|
|
@@ -88,10 +94,6 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
88
94
|
if (!skipLint) {
|
|
89
95
|
tools.logSuccess();
|
|
90
96
|
}
|
|
91
|
-
if (!skipLint) {
|
|
92
|
-
tools.logInfo(`Styles Linting application...`);
|
|
93
|
-
return tools.runScript(`stylelint **/*.scss`, currentProject.paths.angularPath);
|
|
94
|
-
}
|
|
95
97
|
})
|
|
96
98
|
|
|
97
99
|
|
|
@@ -120,7 +122,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
120
122
|
|
|
121
123
|
tools.logInfo(`ng test : watching = ${watch || false}`);
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
tools.logInfo(`running Angular TEST with args: ${args} on :`);
|
|
124
126
|
console.log(currentProject.paths.angularPath);
|
|
125
127
|
|
|
126
128
|
if (!dryRun) {
|
|
@@ -204,7 +206,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
204
206
|
|
|
205
207
|
tools.logInfo(`ng build for configuration : ${configuration || 'production'}`);
|
|
206
208
|
|
|
207
|
-
|
|
209
|
+
tools.logInfo(`running Angular BUILD with args: ${args} on :`);
|
|
208
210
|
console.log(currentProject.paths.angularPath);
|
|
209
211
|
|
|
210
212
|
if (!dryRun && !skipCompile) {
|
|
@@ -14,19 +14,6 @@ const configUtils = require('../../../csdr/config/config-utils');
|
|
|
14
14
|
let { deps, skipClean, skipLint, skipTest, skipCompile, skipDoc } = tools.getArgs();
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
const preChecks = (pkg) => {
|
|
19
|
-
return Promise.resolve()
|
|
20
|
-
.then(() => {
|
|
21
|
-
return configUtils.angular.generateTsConfigLibProd(pkg);
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
.catch((e) => {
|
|
25
|
-
throw e;
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
17
|
module.exports.build = (pkg, isMaster) => {
|
|
31
18
|
|
|
32
19
|
tools.logInfo('Building UI Angular package...');
|
|
@@ -43,11 +30,6 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
43
30
|
}
|
|
44
31
|
|
|
45
32
|
return Promise.resolve()
|
|
46
|
-
// disabled only used for injecting tsconfig.lib.prod for disable ivy using '--prod' flag if necessary in later version of angular / node
|
|
47
|
-
// .then(() => {
|
|
48
|
-
// tools.logInfo('Executing pre-checks');
|
|
49
|
-
// return preChecks(pkg);
|
|
50
|
-
// })
|
|
51
33
|
.then(() => {
|
|
52
34
|
if (deps === true) {
|
|
53
35
|
tools.logInfo('Building dependencies...');
|
|
@@ -63,13 +45,7 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
63
45
|
.then(() => {
|
|
64
46
|
if (!skipLint) {
|
|
65
47
|
tools.logInfo('Linting...');
|
|
66
|
-
|
|
67
|
-
let tsLintPath;
|
|
68
|
-
if (pkg.build && pkg.build.euiVersion && pkg.build.euiVersion === '9.x') {
|
|
69
|
-
tsLintPath = path.join(pkg.paths.pkgRootDirectory, 'tslint-eui9.json');
|
|
70
|
-
} else {
|
|
71
|
-
tsLintPath = path.join(pkg.paths.pkgRootDirectory, 'tslint.json');
|
|
72
|
-
}
|
|
48
|
+
const tsLintPath = path.join(pkg.paths.pkgRootDirectory, 'tslint.json');
|
|
73
49
|
const tsConfigPath = path.join(pkg.paths.pkgRootDirectory, 'tsconfig.lib.json');
|
|
74
50
|
tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
|
|
75
51
|
return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath} -t verbose`);
|
|
@@ -82,11 +58,8 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
82
58
|
if (!skipTest) {
|
|
83
59
|
tools.logInfo('Testing...');
|
|
84
60
|
let args = ['--max_old_space_size=8096', ng, 'test', pkg.name];
|
|
85
|
-
|
|
86
61
|
args.push('--code-coverage');
|
|
87
|
-
|
|
88
62
|
tools.logInfo(`running ng test : with args: ${args} on folder : ${pkg.paths.pkgRootDirectory}`);
|
|
89
|
-
|
|
90
63
|
return execa('node', args, { cwd: pkg.paths.pkgRootDirectory, stdio: 'inherit' });
|
|
91
64
|
}
|
|
92
65
|
})
|
|
@@ -96,11 +69,9 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
96
69
|
}
|
|
97
70
|
if (!skipCompile) {
|
|
98
71
|
tools.logInfo('Bundling package...');
|
|
99
|
-
|
|
100
72
|
let args = ['--max_old_space_size=8096', ng, 'build', pkg.name];
|
|
101
73
|
|
|
102
74
|
tools.logInfo(`running ng build : with args: ${args} on folder : ${pkg.paths.pkgRootDirectory}`);
|
|
103
|
-
|
|
104
75
|
return execa('node', args, { cwd: pkg.paths.pkgRootDirectory, stdio: 'inherit' });
|
|
105
76
|
}
|
|
106
77
|
})
|
|
@@ -132,14 +103,17 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
132
103
|
if (!skipCompile) {
|
|
133
104
|
tools.logInfo('Copying assets...');
|
|
134
105
|
tools.copydir(path.join(pkg.paths.pkgRootDirectory, 'assets'), path.join(pkg.paths.pkgRootDirectory, 'dist', 'assets'));
|
|
106
|
+
|
|
135
107
|
tools.logInfo('Copying config...');
|
|
136
108
|
tools.copydir(path.join(pkg.paths.pkgRootDirectory, 'config'), path.join(pkg.paths.pkgRootDirectory, 'dist', 'config'));
|
|
109
|
+
|
|
137
110
|
tools.logInfo('Copying license...');
|
|
138
111
|
if (pkg.child) {
|
|
139
112
|
tools.copy(path.join(pkg.paths.pkgRootDirectory, '..', '..', 'LICENSE'), path.join(pkg.paths.pkgRootDirectory, 'dist', 'LICENSE'));
|
|
140
113
|
} else {
|
|
141
114
|
tools.copy(path.join(pkg.paths.pkgRootDirectory, 'LICENSE'), path.join(pkg.paths.pkgRootDirectory, 'dist', 'LICENSE'));
|
|
142
115
|
}
|
|
116
|
+
|
|
143
117
|
tools.logInfo('Copying readme.md...');
|
|
144
118
|
if (pkg.child) {
|
|
145
119
|
tools.copy(path.join(pkg.paths.pkgRootDirectory, '..', '..', 'README.md'), path.join(pkg.paths.pkgRootDirectory, 'dist', 'README.md'));
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// GLOBAL
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const glob = require('glob');
|
|
6
|
+
const execa = require('execa');
|
|
6
7
|
|
|
7
8
|
// LOCAL
|
|
8
9
|
const tools = require('../../tools');
|
|
9
10
|
const configUtils = require('../../../csdr/config/config-utils');
|
|
10
|
-
const notificationUtils = require('../../notification/notification-utils');
|
|
11
11
|
|
|
12
12
|
// INNER MODULES
|
|
13
13
|
const innerNodeJs = require('./nodeJs');
|
|
@@ -188,3 +188,52 @@ module.exports.postBuild = (pkg) => {
|
|
|
188
188
|
})
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
|
|
192
|
+
module.exports.buildSubEntry = (pkg, subEntry) => {
|
|
193
|
+
return Promise.resolve()
|
|
194
|
+
.then(() => {
|
|
195
|
+
tools.logInfo(`Building sub-entry : ${subEntry} of package : ${pkg.name}`);
|
|
196
|
+
// console.log(pkg);
|
|
197
|
+
return tools.getFilesGlob(pkg.paths.pkgRootDirectory, `**/package.json`);
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
.then((files) => {
|
|
201
|
+
// console.log(files);
|
|
202
|
+
|
|
203
|
+
if (files.length === 0) {
|
|
204
|
+
tools.logWarning(`no sub-entries found within package ${pkg.name}`);
|
|
205
|
+
return;
|
|
206
|
+
|
|
207
|
+
} else {
|
|
208
|
+
let subEntryPath = files.filter((f) => {
|
|
209
|
+
return f.indexOf(subEntry) > -1;
|
|
210
|
+
})[0];
|
|
211
|
+
|
|
212
|
+
if (!subEntryPath) {
|
|
213
|
+
tools.logWarning(`${subEntry} can't be found in sub-folders of package (must contains package.json file for sub-entry definition)`);
|
|
214
|
+
return;
|
|
215
|
+
|
|
216
|
+
} else {
|
|
217
|
+
subEntryPath = subEntryPath.replace('/ng-package.json', '');
|
|
218
|
+
tools.logInfo(`${subEntryPath} found... injecting angular.json for sub entry`);
|
|
219
|
+
|
|
220
|
+
return configUtils.angular.registerAngularPackageSubEntry(subEntry, subEntryPath);
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
.then(() => {
|
|
226
|
+
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
227
|
+
|
|
228
|
+
let args = ['--max_old_space_size=8096', ng, 'build', subEntry];
|
|
229
|
+
|
|
230
|
+
return execa('node', args, { cwd: pkg.paths.pkgRootDirectory, stdio: 'inherit' });
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
.then(() => {
|
|
234
|
+
tools.logSuccess();
|
|
235
|
+
})
|
|
236
|
+
.catch((e) => {
|
|
237
|
+
throw e;
|
|
238
|
+
})
|
|
239
|
+
}
|