@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,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
|
-
}
|