@servicetitan/startup 30.3.1 → 31.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/bin/index.js +5 -6
- package/dist/cli/commands/build.d.ts +10 -3
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +119 -49
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +0 -2
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +54 -36
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +6 -0
- package/dist/cli/commands/clean.d.ts.map +1 -0
- package/dist/cli/commands/clean.js +55 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/convert-eslint-config.js +163 -107
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +43 -24
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.d.ts.map +1 -1
- package/dist/cli/commands/get-command.js +50 -53
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/get-user-commands.js +21 -11
- package/dist/cli/commands/get-user-commands.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -30
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +74 -48
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +8 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +61 -23
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +48 -31
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +3 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +112 -73
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +80 -57
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +1 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +124 -70
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +83 -48
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +1 -1
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +43 -33
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/index.d.ts +3 -0
- package/dist/cli/commands/review/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.js +20 -0
- package/dist/cli/commands/review/index.js.map +1 -0
- package/dist/cli/commands/review/review.d.ts +28 -0
- package/dist/cli/commands/review/review.d.ts.map +1 -0
- package/dist/cli/commands/review/review.js +239 -0
- package/dist/cli/commands/review/review.js.map +1 -0
- package/dist/cli/commands/review/rules/index.d.ts +3 -0
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.js +30 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts +14 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js +89 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js +37 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.js +38 -0
- package/dist/cli/commands/review/rules/require-npmrc.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js +33 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts +45 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js +140 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts +20 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js +70 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js +40 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts +19 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js +103 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js +37 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -0
- package/dist/cli/commands/review/types.d.ts +72 -0
- package/dist/cli/commands/review/types.d.ts.map +1 -0
- package/dist/cli/commands/review/types.js +36 -0
- package/dist/cli/commands/review/types.js.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts +3 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.js +20 -0
- package/dist/cli/commands/review/utils/apply-filter.js.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts +29 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js +31 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts +9 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.js +137 -0
- package/dist/cli/commands/review/utils/compare-version.js.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.js +21 -0
- package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -0
- package/dist/cli/commands/review/utils/format-location.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-location.js +25 -0
- package/dist/cli/commands/review/utils/format-location.js.map +1 -0
- package/dist/cli/commands/review/utils/get-key.d.ts +3 -0
- package/dist/cli/commands/review/utils/get-key.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-key.js +20 -0
- package/dist/cli/commands/review/utils/get-key.js.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts +2 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.js +16 -0
- package/dist/cli/commands/review/utils/get-max-version.js.map +1 -0
- package/dist/cli/commands/review/utils/indent.d.ts +2 -0
- package/dist/cli/commands/review/utils/indent.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/indent.js +17 -0
- package/dist/cli/commands/review/utils/indent.js.map +1 -0
- package/dist/cli/commands/review/utils/index.d.ts +14 -0
- package/dist/cli/commands/review/utils/index.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/index.js +32 -0
- package/dist/cli/commands/review/utils/index.js.map +1 -0
- package/dist/cli/commands/review/utils/is-library.d.ts +3 -0
- package/dist/cli/commands/review/utils/is-library.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/is-library.js +15 -0
- package/dist/cli/commands/review/utils/is-library.js.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts +3 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.js +18 -0
- package/dist/cli/commands/review/utils/name-to-location.js.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts +2 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.js +15 -0
- package/dist/cli/commands/review/utils/pluralize.js.map +1 -0
- package/dist/cli/commands/review/utils/set-version.d.ts +10 -0
- package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/set-version.js +33 -0
- package/dist/cli/commands/review/utils/set-version.js.map +1 -0
- package/dist/cli/commands/review/utils/summarize.d.ts +11 -0
- package/dist/cli/commands/review/utils/summarize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/summarize.js +30 -0
- package/dist/cli/commands/review/utils/summarize.js.map +1 -0
- package/dist/cli/commands/run-task.js +50 -31
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/run-task.test.d.ts +2 -0
- package/dist/cli/commands/run-task.test.d.ts.map +1 -0
- package/dist/cli/commands/run-task.test.js +59 -0
- package/dist/cli/commands/run-task.test.js.map +1 -0
- package/dist/cli/commands/start.d.ts +11 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +158 -70
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.js +73 -59
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/tests.d.ts +1 -0
- package/dist/cli/commands/tests.d.ts.map +1 -1
- package/dist/cli/commands/tests.js +45 -28
- package/dist/cli/commands/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +1 -0
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +4 -1
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/index.js +43 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/cli-task.d.ts +0 -1
- package/dist/cli/tasks/cli-task.d.ts.map +1 -1
- package/dist/cli/tasks/cli-task.js +52 -41
- package/dist/cli/tasks/cli-task.js.map +1 -1
- package/dist/cli/tasks/swc-cli.d.js +3 -0
- package/dist/cli/tasks/swc-cli.d.js.map +1 -0
- package/dist/cli/tasks/swc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package.js +78 -34
- package/dist/cli/tasks/swc-compile-package.js.map +1 -1
- package/dist/cli/tasks/task.d.ts +0 -2
- package/dist/cli/tasks/task.d.ts.map +1 -1
- package/dist/cli/tasks/task.js +60 -65
- package/dist/cli/tasks/task.js.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.js +26 -22
- package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile.d.ts +0 -2
- package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile.js +51 -31
- package/dist/cli/tasks/tsc-compile.js.map +1 -1
- package/dist/cli/types/cpx2.d.js +3 -0
- package/dist/cli/types/cpx2.d.js.map +1 -0
- package/dist/cli/utils/bundle.d.ts +2 -4
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +136 -74
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/check-args.d.ts +6 -0
- package/dist/cli/utils/check-args.d.ts.map +1 -0
- package/dist/cli/utils/check-args.js +20 -0
- package/dist/cli/utils/check-args.js.map +1 -0
- package/dist/cli/utils/cli-git.js +23 -9
- package/dist/cli/utils/cli-git.js.map +1 -1
- package/dist/cli/utils/cli-npm.js +62 -23
- package/dist/cli/utils/cli-npm.js.map +1 -1
- package/dist/cli/utils/cli-os.js +34 -33
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/compile-less.d.ts.map +1 -1
- package/dist/cli/utils/compile-less.js +27 -11
- package/dist/cli/utils/compile-less.js.map +1 -1
- package/dist/cli/utils/compile-sass.d.ts.map +1 -1
- package/dist/cli/utils/compile-sass.js +25 -9
- package/dist/cli/utils/compile-sass.js.map +1 -1
- package/dist/cli/utils/compile.d.ts +6 -0
- package/dist/cli/utils/compile.d.ts.map +1 -0
- package/dist/cli/utils/compile.js +33 -0
- package/dist/cli/utils/compile.js.map +1 -0
- package/dist/cli/utils/copy-files.d.ts +8 -0
- package/dist/cli/utils/copy-files.d.ts.map +1 -0
- package/dist/cli/utils/copy-files.js +119 -0
- package/dist/cli/utils/copy-files.js.map +1 -0
- package/dist/cli/utils/eslint.d.ts.map +1 -1
- package/dist/cli/utils/eslint.js +22 -12
- package/dist/cli/utils/eslint.js.map +1 -1
- package/dist/cli/utils/get-module-type.d.ts.map +1 -1
- package/dist/cli/utils/get-module-type.js +12 -18
- package/dist/cli/utils/get-module-type.js.map +1 -1
- package/dist/cli/utils/index.d.ts +8 -6
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +33 -30
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-module-installed.js +11 -4
- package/dist/cli/utils/is-module-installed.js.map +1 -1
- package/dist/cli/utils/lerna-exec.d.ts +4 -3
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +40 -19
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +20 -18
- package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
- package/dist/cli/utils/pipe-stdout.d.ts +3 -0
- package/dist/cli/utils/pipe-stdout.d.ts.map +1 -0
- package/dist/cli/utils/pipe-stdout.js +19 -0
- package/dist/cli/utils/pipe-stdout.js.map +1 -0
- package/dist/cli/utils/process-tree.d.ts +14 -0
- package/dist/cli/utils/process-tree.d.ts.map +1 -0
- package/dist/cli/utils/process-tree.js +78 -0
- package/dist/cli/utils/process-tree.js.map +1 -0
- package/dist/cli/utils/publish.js +12 -6
- package/dist/cli/utils/publish.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts +2 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +39 -30
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/cli/utils/ts-config.d.ts +11 -0
- package/dist/cli/utils/ts-config.d.ts.map +1 -0
- package/dist/cli/utils/ts-config.js +80 -0
- package/dist/cli/utils/ts-config.js.map +1 -0
- package/dist/cli/utils/type-check.d.ts +7 -0
- package/dist/cli/utils/type-check.d.ts.map +1 -0
- package/dist/cli/utils/type-check.js +33 -0
- package/dist/cli/utils/type-check.js.map +1 -0
- package/dist/cli/utils/watch-stdout.d.ts +3 -0
- package/dist/cli/utils/watch-stdout.d.ts.map +1 -0
- package/dist/cli/utils/watch-stdout.js +26 -0
- package/dist/cli/utils/watch-stdout.js.map +1 -0
- package/dist/index.js +20 -18
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js +12 -4
- package/dist/jest/index.js.map +1 -1
- package/dist/utils/debug.js +23 -11
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/find-packages.d.ts.map +1 -1
- package/dist/utils/find-packages.js +46 -34
- package/dist/utils/find-packages.js.map +1 -1
- package/dist/utils/format-duration.d.ts +2 -0
- package/dist/utils/format-duration.d.ts.map +1 -0
- package/dist/utils/format-duration.js +24 -0
- package/dist/utils/format-duration.js.map +1 -0
- package/dist/utils/get-branch-configs.js +24 -8
- package/dist/utils/get-branch-configs.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +11 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +134 -52
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-destination-folders.js +25 -18
- package/dist/utils/get-destination-folders.js.map +1 -1
- package/dist/utils/get-folders.d.ts +2 -2
- package/dist/utils/get-folders.d.ts.map +1 -1
- package/dist/utils/get-folders.js +20 -13
- package/dist/utils/get-folders.js.map +1 -1
- package/dist/utils/get-jest-config.js +65 -38
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/get-package-data.js +26 -12
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/get-package-name.js +18 -8
- package/dist/utils/get-package-name.js.map +1 -1
- package/dist/utils/get-packages.d.ts +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +72 -57
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/get-startup-version.js +18 -8
- package/dist/utils/get-startup-version.js.map +1 -1
- package/dist/utils/get-tsconfig.js +19 -12
- package/dist/utils/get-tsconfig.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +34 -29
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/load-shared-dependencies.js +23 -17
- package/dist/utils/load-shared-dependencies.js.map +1 -1
- package/dist/utils/log-errors.d.ts +2 -0
- package/dist/utils/log-errors.d.ts.map +1 -0
- package/dist/utils/log-errors.js +36 -0
- package/dist/utils/log-errors.js.map +1 -0
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.d.ts.map +1 -1
- package/dist/utils/log.js +38 -43
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/pick.js +11 -3
- package/dist/utils/pick.js.map +1 -1
- package/dist/utils/read-json.js +27 -11
- package/dist/utils/read-json.js.map +1 -1
- package/dist/utils/to-array.js +13 -3
- package/dist/utils/to-array.js.map +1 -1
- package/dist/webpack/configs/amd-config.js +13 -3
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +47 -45
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.js +16 -7
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +28 -7
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.js +17 -7
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +2 -2
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js +29 -28
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +22 -14
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/index.d.ts +1 -1
- package/dist/webpack/configs/loaders/index.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/index.js +20 -19
- package/dist/webpack/configs/loaders/index.js.map +1 -1
- package/dist/webpack/configs/loaders/less-loader.js +18 -3
- package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +23 -8
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/types.js +4 -1
- package/dist/webpack/configs/loaders/types.js.map +1 -1
- package/dist/webpack/configs/module-config.js +17 -5
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.js +60 -34
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.d.ts.map +1 -1
- package/dist/webpack/configs/output-config.js +28 -13
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +23 -14
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +19 -9
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +19 -11
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +17 -7
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +13 -5
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +11 -3
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.d.ts +1 -1
- package/dist/webpack/configs/plugins/html-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +30 -22
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +24 -13
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js +26 -16
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +15 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/index.js +18 -16
- package/dist/webpack/configs/plugins/ignore-plugin/index.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +22 -12
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js +11 -4
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +0 -2
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +29 -29
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +23 -12
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +18 -8
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +44 -24
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js +23 -15
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +27 -21
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.js +16 -4
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +43 -18
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js +13 -5
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js +13 -5
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/index.d.ts +0 -1
- package/dist/webpack/configs/rules/index.d.ts.map +1 -1
- package/dist/webpack/configs/rules/index.js +24 -23
- package/dist/webpack/configs/rules/index.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +47 -7
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js +25 -9
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js +25 -9
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js +40 -20
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +34 -19
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.js +14 -4
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +1 -3
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/configs/types.js +4 -1
- package/dist/webpack/configs/types.js.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.d.ts.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.js +44 -22
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +20 -11
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js +18 -8
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
- package/dist/webpack/configs/utils/index.js +18 -16
- package/dist/webpack/configs/utils/index.js.map +1 -1
- package/dist/webpack/configs/watch-options-config.d.ts +6 -0
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -0
- package/dist/webpack/configs/watch-options-config.js +24 -0
- package/dist/webpack/configs/watch-options-config.js.map +1 -0
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +61 -50
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/index.d.ts +1 -1
- package/dist/webpack/index.d.ts.map +1 -1
- package/dist/webpack/index.js +18 -17
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/index.js +15 -15
- package/dist/webpack/loaders/expose-loader/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +5 -6
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +20 -13
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +22 -11
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/index.js +20 -18
- package/dist/webpack/loaders/expose-loader/utils/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +20 -12
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js.map +1 -1
- package/dist/webpack/types.d.ts +1 -4
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/types.js +4 -1
- package/dist/webpack/types.js.map +1 -1
- package/dist/webpack/utils/get-caller-filename.js +14 -7
- package/dist/webpack/utils/get-caller-filename.js.map +1 -1
- package/dist/webpack/utils/{bundle.d.ts → get-module-entry-path.d.ts} +1 -1
- package/dist/webpack/utils/get-module-entry-path.d.ts.map +1 -0
- package/dist/webpack/utils/get-module-entry-path.js +21 -0
- package/dist/webpack/utils/get-module-entry-path.js.map +1 -0
- package/dist/webpack/utils/index.d.ts +1 -2
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +20 -19
- package/dist/webpack/utils/index.js.map +1 -1
- package/dist/webpack/utils/split-by-entry.js +17 -7
- package/dist/webpack/utils/split-by-entry.js.map +1 -1
- package/dist/webpack/utils/testing/compile.js +12 -4
- package/dist/webpack/utils/testing/compile.js.map +1 -1
- package/dist/webpack/utils/testing/execute.js +26 -13
- package/dist/webpack/utils/testing/execute.js.map +1 -1
- package/dist/webpack/utils/testing/get-compiler.js +34 -24
- package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
- package/dist/webpack/utils/testing/get-errors.js +12 -4
- package/dist/webpack/utils/testing/get-errors.js.map +1 -1
- package/dist/webpack/utils/testing/get-module-source.js +18 -5
- package/dist/webpack/utils/testing/get-module-source.js.map +1 -1
- package/dist/webpack/utils/testing/get-warnings.js +12 -4
- package/dist/webpack/utils/testing/get-warnings.js.map +1 -1
- package/dist/webpack/utils/testing/index.js +28 -20
- package/dist/webpack/utils/testing/index.js.map +1 -1
- package/dist/webpack/utils/testing/normalize-errors.js +11 -3
- package/dist/webpack/utils/testing/normalize-errors.js.map +1 -1
- package/dist/webpack/utils/testing/read-asset.js +20 -11
- package/dist/webpack/utils/testing/read-asset.js.map +1 -1
- package/dist/webpack/utils/testing/read-assets.js +13 -5
- package/dist/webpack/utils/testing/read-assets.js.map +1 -1
- package/package.json +22 -23
- package/src/cli/commands/__tests__/build.test.ts +66 -43
- package/src/cli/commands/__tests__/clean.test.ts +32 -0
- package/src/cli/commands/__tests__/install.test.ts +50 -8
- package/src/cli/commands/__tests__/kendo-ui-license.test.ts +5 -5
- package/src/cli/commands/__tests__/lint.test.ts +4 -0
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +21 -2
- package/src/cli/commands/__tests__/mfe-publish.test.ts +19 -23
- package/src/cli/commands/__tests__/prepare-package.test.ts +6 -48
- package/src/cli/commands/__tests__/start.test.ts +77 -42
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/build.ts +71 -35
- package/src/cli/commands/bundle-package.ts +0 -4
- package/src/cli/commands/clean.ts +24 -0
- package/src/cli/commands/eslint.ts +1 -1
- package/src/cli/commands/get-command.ts +25 -35
- package/src/cli/commands/index.ts +1 -1
- package/src/cli/commands/install.ts +29 -8
- package/src/cli/commands/lint.ts +22 -17
- package/src/cli/commands/mfe-package-publish.ts +22 -5
- package/src/cli/commands/mfe-publish.ts +5 -18
- package/src/cli/commands/prepare-package.ts +5 -12
- package/src/cli/commands/review/__mocks__/expect-calls.ts +48 -0
- package/src/cli/commands/review/__mocks__/index.ts +1 -0
- package/src/cli/commands/review/__tests__/review.test.ts +483 -0
- package/src/cli/commands/review/index.ts +3 -0
- package/src/cli/commands/review/review.ts +247 -0
- package/src/cli/commands/review/rules/__mocks__/index.ts +3 -0
- package/src/cli/commands/review/rules/__mocks__/mock-config.ts +14 -0
- package/src/cli/commands/review/rules/__mocks__/mock-packages.ts +41 -0
- package/src/cli/commands/review/rules/__mocks__/mock-project.ts +11 -0
- package/src/cli/commands/review/rules/__tests__/no-typescript-entry-point.test.ts +166 -0
- package/src/cli/commands/review/rules/__tests__/require-explicit-side-effects.test.ts +113 -0
- package/src/cli/commands/review/rules/__tests__/require-npmrc.test.ts +71 -0
- package/src/cli/commands/review/rules/__tests__/require-one-anvil-uikit-contrib-version.test.ts +33 -0
- package/src/cli/commands/review/rules/__tests__/require-one-collection-version.test.ts +155 -0
- package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +135 -0
- package/src/cli/commands/review/rules/__tests__/require-one-uikit-version.ts +40 -0
- package/src/cli/commands/review/rules/__tests__/require-project-version-in-root-node-modules.test.ts +186 -0
- package/src/cli/commands/review/rules/__tests__/require-servicetitan-scope.test.ts +83 -0
- package/src/cli/commands/review/rules/index.ts +20 -0
- package/src/cli/commands/review/rules/no-typescript-entry-point.ts +78 -0
- package/src/cli/commands/review/rules/require-explicit-side-effects.ts +31 -0
- package/src/cli/commands/review/rules/require-npmrc.ts +27 -0
- package/src/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.ts +20 -0
- package/src/cli/commands/review/rules/require-one-collection-version.ts +169 -0
- package/src/cli/commands/review/rules/require-one-package-version.ts +76 -0
- package/src/cli/commands/review/rules/require-one-uikit-version.ts +27 -0
- package/src/cli/commands/review/rules/require-project-version-in-root-node-modules.ts +104 -0
- package/src/cli/commands/review/rules/require-servicetitan-scope.ts +27 -0
- package/src/cli/commands/review/types.ts +72 -0
- package/src/cli/commands/review/utils/__tests__/compare-version.test.ts +73 -0
- package/src/cli/commands/review/utils/__tests__/get-max-version.test.ts +17 -0
- package/src/cli/commands/review/utils/__tests__/indent.test.ts +41 -0
- package/src/cli/commands/review/utils/__tests__/name-to-location.test.ts +39 -0
- package/src/cli/commands/review/utils/__tests__/set-version.test.ts +84 -0
- package/src/cli/commands/review/utils/apply-filter.ts +14 -0
- package/src/cli/commands/review/utils/collate-dependencies.ts +46 -0
- package/src/cli/commands/review/utils/compare-version.ts +82 -0
- package/src/cli/commands/review/utils/format-depends-on.ts +11 -0
- package/src/cli/commands/review/utils/format-location.ts +8 -0
- package/src/cli/commands/review/utils/get-key.ts +10 -0
- package/src/cli/commands/review/utils/get-max-version.ts +5 -0
- package/src/cli/commands/review/utils/indent.ts +8 -0
- package/src/cli/commands/review/utils/index.ts +13 -0
- package/src/cli/commands/review/utils/is-library.ts +5 -0
- package/src/cli/commands/review/utils/name-to-location.ts +7 -0
- package/src/cli/commands/review/utils/pluralize.ts +3 -0
- package/src/cli/commands/review/utils/set-version.ts +26 -0
- package/src/cli/commands/review/utils/summarize.ts +21 -0
- package/src/cli/commands/run-task.test.ts +60 -0
- package/src/cli/commands/start.ts +128 -55
- package/src/cli/commands/tests.ts +2 -0
- package/src/cli/commands/types.ts +1 -0
- package/src/cli/index.ts +4 -4
- package/src/cli/tasks/__tests__/cli-task.test.ts +16 -4
- package/src/cli/tasks/__tests__/swc-compile-package.test.ts +290 -0
- package/src/cli/tasks/__tests__/tsc-compile-package.test.ts +1 -0
- package/src/cli/tasks/__tests__/tsc-compile.test.ts +12 -23
- package/src/cli/tasks/cli-task.ts +12 -18
- package/src/cli/tasks/swc-cli.d.ts +12 -1
- package/src/cli/tasks/swc-compile-package.ts +73 -46
- package/src/cli/tasks/task.ts +2 -11
- package/src/cli/tasks/tsc-compile-package.ts +0 -4
- package/src/cli/tasks/tsc-compile.ts +14 -17
- package/src/cli/types/cpx2.d.ts +8 -1
- package/src/cli/utils/__tests__/bundle.test.ts +49 -8
- package/src/cli/utils/__tests__/check-args.test.ts +34 -0
- package/src/cli/utils/__tests__/compile.test.ts +59 -0
- package/src/cli/utils/__tests__/copy-files.test.ts +157 -0
- package/src/cli/utils/__tests__/get-module-type.test.ts +19 -0
- package/src/cli/utils/__tests__/lerna-exec.test.ts +58 -11
- package/src/cli/utils/__tests__/pipe-stdout.test.ts +39 -0
- package/src/cli/utils/__tests__/process-tree.test.ts +175 -0
- package/src/cli/utils/__tests__/set-node-options.test.ts +51 -6
- package/src/cli/utils/__tests__/type-check.test.ts +47 -0
- package/src/cli/utils/__tests__/watch-stdout.test.ts +68 -0
- package/src/cli/utils/bundle.ts +32 -23
- package/src/cli/utils/check-args.ts +13 -0
- package/src/cli/utils/compile-less.ts +0 -1
- package/src/cli/utils/compile-sass.ts +0 -1
- package/src/cli/utils/compile.ts +22 -0
- package/src/cli/utils/copy-files.ts +86 -0
- package/src/cli/utils/eslint.ts +1 -0
- package/src/cli/utils/get-module-type.ts +2 -20
- package/src/cli/utils/index.ts +8 -7
- package/src/cli/utils/lerna-exec.ts +17 -10
- package/src/cli/utils/pipe-stdout.ts +10 -0
- package/src/cli/utils/process-tree.ts +57 -0
- package/src/cli/utils/set-node-options.ts +15 -12
- package/src/cli/utils/ts-config.ts +64 -0
- package/src/cli/utils/type-check.ts +19 -0
- package/src/cli/utils/watch-stdout.ts +24 -0
- package/src/utils/__tests__/format-duration.test.ts +22 -0
- package/src/utils/__tests__/get-configuration.test.ts +64 -2
- package/src/utils/__tests__/get-packages.test.ts +58 -49
- package/src/utils/__tests__/log-errors.test.ts +102 -0
- package/src/utils/__tests__/log.test.ts +1 -86
- package/src/utils/find-packages.ts +12 -6
- package/src/utils/format-duration.ts +13 -0
- package/src/utils/get-configuration.ts +31 -5
- package/src/utils/get-folders.ts +3 -1
- package/src/utils/get-packages.ts +9 -16
- package/src/utils/index.ts +3 -0
- package/src/utils/log-errors.ts +29 -0
- package/src/utils/log.ts +0 -26
- package/src/webpack/__mocks__/file-rules.ts +0 -5
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +0 -1
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +21 -33
- package/src/webpack/__tests__/create-webpack-config.test.ts +60 -150
- package/src/webpack/configs/dev-server-config.ts +4 -27
- package/src/webpack/configs/devtool-config.ts +2 -2
- package/src/webpack/configs/entry.config.ts +7 -2
- package/src/webpack/configs/index.ts +2 -2
- package/src/webpack/configs/loaders/index.ts +1 -1
- package/src/webpack/configs/optimization-config.ts +8 -8
- package/src/webpack/configs/output-config.ts +4 -2
- package/src/webpack/configs/plugins/html-plugin.ts +5 -2
- package/src/webpack/configs/plugins/index.ts +0 -2
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +18 -5
- package/src/webpack/configs/plugins-config.ts +0 -4
- package/src/webpack/configs/resolve-config.ts +1 -1
- package/src/webpack/configs/rules/index.ts +0 -1
- package/src/webpack/configs/rules/js-rules.ts +27 -2
- package/src/webpack/configs/rules-config.ts +1 -11
- package/src/webpack/configs/types.ts +1 -3
- package/src/webpack/configs/utils/__tests__/generate-metadata.test.ts +3 -1
- package/src/webpack/configs/utils/generate-metadata.ts +6 -1
- package/src/webpack/configs/watch-options-config.ts +17 -0
- package/src/webpack/create-webpack-config.ts +3 -6
- package/src/webpack/index.ts +1 -1
- package/src/webpack/types.ts +1 -4
- package/src/webpack/utils/index.ts +1 -2
- package/dist/__mocks__/create-package.d.ts +0 -3
- package/dist/__mocks__/create-package.d.ts.map +0 -1
- package/dist/__mocks__/create-package.js +0 -17
- package/dist/__mocks__/create-package.js.map +0 -1
- package/dist/__mocks__/index.d.ts +0 -2
- package/dist/__mocks__/index.d.ts.map +0 -1
- package/dist/__mocks__/index.js +0 -18
- package/dist/__mocks__/index.js.map +0 -1
- package/dist/cli/utils/assets-copy.d.ts +0 -3
- package/dist/cli/utils/assets-copy.d.ts.map +0 -1
- package/dist/cli/utils/assets-copy.js +0 -25
- package/dist/cli/utils/assets-copy.js.map +0 -1
- package/dist/cli/utils/styles-copy.d.ts +0 -3
- package/dist/cli/utils/styles-copy.d.ts.map +0 -1
- package/dist/cli/utils/styles-copy.js +0 -25
- package/dist/cli/utils/styles-copy.js.map +0 -1
- package/dist/cli/utils/tcm.d.ts +0 -3
- package/dist/cli/utils/tcm.d.ts.map +0 -1
- package/dist/cli/utils/tcm.js +0 -67
- package/dist/cli/utils/tcm.js.map +0 -1
- package/dist/cli/utils/tsc.d.ts +0 -5
- package/dist/cli/utils/tsc.d.ts.map +0 -1
- package/dist/cli/utils/tsc.js +0 -37
- package/dist/cli/utils/tsc.js.map +0 -1
- package/dist/webpack/__mocks__/file-rules.d.ts +0 -3
- package/dist/webpack/__mocks__/file-rules.d.ts.map +0 -1
- package/dist/webpack/__mocks__/file-rules.js +0 -79
- package/dist/webpack/__mocks__/file-rules.js.map +0 -1
- package/dist/webpack/__mocks__/index.d.ts +0 -3
- package/dist/webpack/__mocks__/index.d.ts.map +0 -1
- package/dist/webpack/__mocks__/index.js +0 -19
- package/dist/webpack/__mocks__/index.js.map +0 -1
- package/dist/webpack/__mocks__/style-rules.d.ts +0 -8
- package/dist/webpack/__mocks__/style-rules.d.ts.map +0 -1
- package/dist/webpack/__mocks__/style-rules.js +0 -124
- package/dist/webpack/__mocks__/style-rules.js.map +0 -1
- package/dist/webpack/configs/cache-config.d.ts +0 -6
- package/dist/webpack/configs/cache-config.d.ts.map +0 -1
- package/dist/webpack/configs/cache-config.js +0 -23
- package/dist/webpack/configs/cache-config.js.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.js +0 -13
- package/dist/webpack/configs/plugins/provide-react-plugin.js.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.js +0 -30
- package/dist/webpack/configs/plugins/ts-checker-plugin.js.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts +0 -4
- package/dist/webpack/configs/rules/tsx-rules.d.ts.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.js +0 -44
- package/dist/webpack/configs/rules/tsx-rules.js.map +0 -1
- package/dist/webpack/utils/bundle.d.ts.map +0 -1
- package/dist/webpack/utils/bundle.js +0 -19
- package/dist/webpack/utils/bundle.js.map +0 -1
- package/dist/webpack/utils/feature-cohort.d.ts +0 -5
- package/dist/webpack/utils/feature-cohort.d.ts.map +0 -1
- package/dist/webpack/utils/feature-cohort.js +0 -21
- package/dist/webpack/utils/feature-cohort.js.map +0 -1
- package/dist/webpack/utils/hash-mod.d.ts +0 -9
- package/dist/webpack/utils/hash-mod.d.ts.map +0 -1
- package/dist/webpack/utils/hash-mod.js +0 -34
- package/dist/webpack/utils/hash-mod.js.map +0 -1
- package/src/cli/tasks/__tests__/swc-compile.test.ts +0 -192
- package/src/cli/utils/__tests__/assets-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/styles-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/tcm.test.ts +0 -191
- package/src/cli/utils/__tests__/tsc.test.ts +0 -63
- package/src/cli/utils/assets-copy.ts +0 -23
- package/src/cli/utils/styles-copy.ts +0 -23
- package/src/cli/utils/tcm.ts +0 -76
- package/src/cli/utils/tsc.ts +0 -38
- package/src/webpack/configs/cache-config.ts +0 -25
- package/src/webpack/configs/plugins/provide-react-plugin.ts +0 -12
- package/src/webpack/configs/plugins/ts-checker-plugin.ts +0 -33
- package/src/webpack/configs/rules/tsx-rules.ts +0 -48
- package/src/webpack/utils/feature-cohort.ts +0 -19
- package/src/webpack/utils/hash-mod.ts +0 -32
- /package/src/webpack/utils/{bundle.ts → get-module-entry-path.ts} +0 -0
|
@@ -39,8 +39,18 @@ describe(`[startup] ${MFEPublish.name}`, () => {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
test('selects Webpack packages', async () => {
|
|
43
|
+
jest.spyOn(process.stdout, 'write').mockImplementation(jest.fn()); // suppress error output
|
|
44
|
+
try {
|
|
45
|
+
await subject();
|
|
46
|
+
} catch {
|
|
47
|
+
/* ignore */
|
|
48
|
+
}
|
|
49
|
+
expect(getPackages).toHaveBeenCalledWith({ type: PackageType.Webpack });
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
describe('with no packages', () => {
|
|
53
|
+
beforeEach(() => (packages = []));
|
|
44
54
|
|
|
45
55
|
itReportsError();
|
|
46
56
|
});
|
|
@@ -73,7 +83,7 @@ describe(`[startup] ${MFEPublish.name}`, () => {
|
|
|
73
83
|
'cmd': 'startup mfe-package-publish',
|
|
74
84
|
'scope': packages.map(({ name }) => name),
|
|
75
85
|
'stream': true,
|
|
76
|
-
'
|
|
86
|
+
'parallel': 1,
|
|
77
87
|
'--': [],
|
|
78
88
|
});
|
|
79
89
|
});
|
|
@@ -155,7 +165,7 @@ describe(`[startup] ${MFEPublish.name}`, () => {
|
|
|
155
165
|
test('runs lernaExec with {concurrency: 0}', async () => {
|
|
156
166
|
await subject();
|
|
157
167
|
|
|
158
|
-
expect(lernaExec).toHaveBeenCalledWith(expect.objectContaining({
|
|
168
|
+
expect(lernaExec).toHaveBeenCalledWith(expect.objectContaining({ parallel: 0 }));
|
|
159
169
|
});
|
|
160
170
|
});
|
|
161
171
|
|
|
@@ -184,28 +194,14 @@ describe(`[startup] ${MFEPublish.name}`, () => {
|
|
|
184
194
|
);
|
|
185
195
|
});
|
|
186
196
|
|
|
187
|
-
describe('with "{scope
|
|
188
|
-
beforeEach(() => (args.scope = packages[0].name));
|
|
197
|
+
describe('with "{scope}"', () => {
|
|
198
|
+
beforeEach(() => (args.scope = [packages[0].name]));
|
|
189
199
|
|
|
190
|
-
test('
|
|
200
|
+
test('selects specified packages', async () => {
|
|
191
201
|
await subject();
|
|
192
202
|
|
|
193
|
-
expect(
|
|
194
|
-
expect.objectContaining({ scope:
|
|
195
|
-
);
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
describe('with "{scope: Array<string>}"', () => {
|
|
200
|
-
beforeEach(() => (args.scope = packages.slice(1).map(({ name }) => name)));
|
|
201
|
-
|
|
202
|
-
test('publishes the specified packages', async () => {
|
|
203
|
-
await subject();
|
|
204
|
-
|
|
205
|
-
expect(lernaExec).toHaveBeenCalledWith(
|
|
206
|
-
expect.objectContaining({
|
|
207
|
-
scope: packages.slice(1).map(({ name }) => name),
|
|
208
|
-
})
|
|
203
|
+
expect(getPackages).toHaveBeenCalledWith(
|
|
204
|
+
expect.objectContaining({ scope: args.scope })
|
|
209
205
|
);
|
|
210
206
|
});
|
|
211
207
|
});
|
|
@@ -1,75 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
assetsCopy,
|
|
4
|
-
assetsCopyWatch,
|
|
5
|
-
stylesCopy,
|
|
6
|
-
stylesCopyWatch,
|
|
7
|
-
tcm,
|
|
8
|
-
tcmWatch,
|
|
9
|
-
} from '../../utils';
|
|
10
|
-
|
|
1
|
+
import { copyFiles } from '../../utils';
|
|
11
2
|
import { PreparePackage } from '../prepare-package';
|
|
12
3
|
|
|
13
|
-
jest.mock('../../../utils', () => ({
|
|
14
|
-
...jest.requireActual('../../../utils'),
|
|
15
|
-
isBundle: jest.fn(),
|
|
16
|
-
}));
|
|
17
|
-
|
|
18
4
|
jest.mock('../../utils', () => ({
|
|
19
5
|
...jest.requireActual('../../utils'),
|
|
20
|
-
|
|
21
|
-
assetsCopyWatch: jest.fn().mockResolvedValue(undefined),
|
|
22
|
-
stylesCopy: jest.fn().mockResolvedValue(undefined),
|
|
23
|
-
stylesCopyWatch: jest.fn().mockResolvedValue(undefined),
|
|
24
|
-
tcm: jest.fn().mockResolvedValue(undefined),
|
|
25
|
-
tcmWatch: jest.fn().mockResolvedValue(undefined),
|
|
6
|
+
copyFiles: jest.fn(),
|
|
26
7
|
}));
|
|
27
8
|
|
|
28
9
|
describe(`[startup] ${PreparePackage.name}`, () => {
|
|
29
10
|
let args: ConstructorParameters<typeof PreparePackage>[0];
|
|
30
11
|
|
|
31
12
|
beforeEach(() => {
|
|
32
|
-
jest.mocked(isBundle).mockReturnValue(true);
|
|
33
13
|
args = {};
|
|
34
14
|
});
|
|
35
15
|
|
|
36
16
|
const subject = async () => new PreparePackage(args).execute();
|
|
37
17
|
|
|
38
|
-
test('runs
|
|
18
|
+
test('runs copyFiles', async () => {
|
|
39
19
|
await subject();
|
|
40
20
|
|
|
41
|
-
expect(
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe('when package is not a bundle', () => {
|
|
45
|
-
beforeEach(() => jest.mocked(isBundle).mockReturnValue(false));
|
|
46
|
-
|
|
47
|
-
test('copies assets and styles', async () => {
|
|
48
|
-
await subject();
|
|
49
|
-
|
|
50
|
-
expect(assetsCopy).toHaveBeenCalled();
|
|
51
|
-
expect(stylesCopy).toHaveBeenCalled();
|
|
52
|
-
});
|
|
21
|
+
expect(copyFiles).toHaveBeenCalled();
|
|
53
22
|
});
|
|
54
23
|
|
|
55
24
|
describe('with "watch"', () => {
|
|
56
25
|
beforeEach(() => (args.watch = true));
|
|
57
26
|
|
|
58
|
-
test('runs
|
|
27
|
+
test('runs copyFiles in watch mode', async () => {
|
|
59
28
|
await subject();
|
|
60
29
|
|
|
61
|
-
expect(
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
describe('when package is not a bundle', () => {
|
|
65
|
-
beforeEach(() => jest.mocked(isBundle).mockReturnValue(false));
|
|
66
|
-
|
|
67
|
-
test('copies assets and styles in watch mode', async () => {
|
|
68
|
-
await subject();
|
|
69
|
-
|
|
70
|
-
expect(assetsCopyWatch).toHaveBeenCalled();
|
|
71
|
-
expect(stylesCopyWatch).toHaveBeenCalled();
|
|
72
|
-
});
|
|
30
|
+
expect(copyFiles).toHaveBeenCalledWith({ watch: true });
|
|
73
31
|
});
|
|
74
32
|
});
|
|
75
33
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Package, PackageType, getPackages } from '../../../utils';
|
|
1
|
+
import { Package, PackageType, getPackages, log } from '../../../utils';
|
|
2
2
|
import { createPackage } from '../../../__mocks__';
|
|
3
|
-
import { lernaExec,
|
|
3
|
+
import { lernaExec, compile, typeCheck, watchStdout } from '../../utils';
|
|
4
4
|
|
|
5
5
|
import { Start } from '../start';
|
|
6
6
|
|
|
@@ -8,7 +8,26 @@ jest.mock('../../../utils', () => ({
|
|
|
8
8
|
...jest.requireActual('../../../utils'),
|
|
9
9
|
getPackages: jest.fn(),
|
|
10
10
|
}));
|
|
11
|
-
jest.mock('../../utils')
|
|
11
|
+
jest.mock('../../utils', () => ({
|
|
12
|
+
...jest.requireActual('../../utils'),
|
|
13
|
+
lernaExec: jest.fn(() => Promise.resolve()),
|
|
14
|
+
compile: jest.fn(() =>
|
|
15
|
+
Object.assign(Promise.resolve(), {
|
|
16
|
+
stdout: {
|
|
17
|
+
on: jest.fn(),
|
|
18
|
+
off: jest.fn(),
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
),
|
|
22
|
+
typeCheck: jest.fn(() =>
|
|
23
|
+
Object.assign(Promise.resolve(), {
|
|
24
|
+
stdout: {
|
|
25
|
+
on: jest.fn(),
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
),
|
|
29
|
+
watchStdout: jest.fn(),
|
|
30
|
+
}));
|
|
12
31
|
|
|
13
32
|
describe(`[startup] ${Start.name}`, () => {
|
|
14
33
|
let args: ConstructorParameters<typeof Start>[0];
|
|
@@ -17,11 +36,15 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
17
36
|
beforeEach(() => {
|
|
18
37
|
args = {};
|
|
19
38
|
packages = [];
|
|
20
|
-
jest.
|
|
39
|
+
jest.clearAllMocks();
|
|
21
40
|
jest.mocked(getPackages).mockImplementation(() => packages);
|
|
41
|
+
jest.mocked(watchStdout).mockImplementation((_process, _indicator, handler) => {
|
|
42
|
+
handler(packages.length);
|
|
43
|
+
return jest.fn();
|
|
44
|
+
});
|
|
22
45
|
});
|
|
23
46
|
|
|
24
|
-
const subject =
|
|
47
|
+
const subject = () => new Start(args).execute();
|
|
25
48
|
|
|
26
49
|
function itPreparesThePackages() {
|
|
27
50
|
test('prepares the package, then again in watch mode', async () => {
|
|
@@ -43,16 +66,37 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
43
66
|
});
|
|
44
67
|
}
|
|
45
68
|
|
|
69
|
+
function itRunsCompileAndTypeCheck({ useTsc = false }: { useTsc?: boolean } = {}) {
|
|
70
|
+
test('runs compile and typeCheck', async () => {
|
|
71
|
+
await subject();
|
|
72
|
+
|
|
73
|
+
expect(compile).toHaveBeenCalledWith({
|
|
74
|
+
packages: packages.map(({ name }) => name),
|
|
75
|
+
watch: true,
|
|
76
|
+
...(useTsc ? { useTsc } : {}),
|
|
77
|
+
});
|
|
78
|
+
expect(typeCheck).toHaveBeenCalledWith({
|
|
79
|
+
packages: packages.map(({ name }) => name),
|
|
80
|
+
watch: true,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
test('command is greedy', () => {
|
|
86
|
+
expect(new Start(args).greedy).toBe(true);
|
|
87
|
+
});
|
|
88
|
+
|
|
46
89
|
describe('with TSC package', () => {
|
|
47
90
|
beforeEach(() => packages.push(createPackage({ type: PackageType.TSC })));
|
|
48
91
|
|
|
49
92
|
itPreparesThePackages();
|
|
93
|
+
itRunsCompileAndTypeCheck();
|
|
50
94
|
|
|
51
|
-
|
|
52
|
-
|
|
95
|
+
describe('with --use-tsc flag', () => {
|
|
96
|
+
beforeEach(() => (args['use-tsc'] = true));
|
|
53
97
|
|
|
54
|
-
|
|
55
|
-
|
|
98
|
+
itPreparesThePackages();
|
|
99
|
+
itRunsCompileAndTypeCheck({ useTsc: true });
|
|
56
100
|
});
|
|
57
101
|
});
|
|
58
102
|
|
|
@@ -60,6 +104,7 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
60
104
|
beforeEach(() => packages.push(createPackage({ type: PackageType.Webpack })));
|
|
61
105
|
|
|
62
106
|
itPreparesThePackages();
|
|
107
|
+
itRunsCompileAndTypeCheck();
|
|
63
108
|
|
|
64
109
|
test('bundles the package in watch mode', async () => {
|
|
65
110
|
await subject();
|
|
@@ -69,7 +114,7 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
69
114
|
'scope': packages.map(({ name }) => name),
|
|
70
115
|
'parallel': true,
|
|
71
116
|
'stream': true,
|
|
72
|
-
'--': ['--
|
|
117
|
+
'--': ['--watch'],
|
|
73
118
|
});
|
|
74
119
|
});
|
|
75
120
|
|
|
@@ -81,35 +126,7 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
81
126
|
|
|
82
127
|
expect(lernaExec).toHaveBeenCalledWith(
|
|
83
128
|
expect.objectContaining({
|
|
84
|
-
'--': ['--
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
describe('with "esbuild"', () => {
|
|
91
|
-
beforeEach(() => (args.esbuild = true));
|
|
92
|
-
|
|
93
|
-
test('enables esbuild loader', async () => {
|
|
94
|
-
await subject();
|
|
95
|
-
|
|
96
|
-
expect(lernaExec).toHaveBeenCalledWith(
|
|
97
|
-
expect.objectContaining({
|
|
98
|
-
'--': ['--color', '--watch', '--esbuild'],
|
|
99
|
-
})
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
describe('with "experimental-bundlers"', () => {
|
|
105
|
-
beforeEach(() => (args['experimental-bundlers'] = true));
|
|
106
|
-
|
|
107
|
-
test('enables swc-loader', async () => {
|
|
108
|
-
await subject();
|
|
109
|
-
|
|
110
|
-
expect(lernaExec).toHaveBeenCalledWith(
|
|
111
|
-
expect.objectContaining({
|
|
112
|
-
'--': ['--color', '--watch', '--experimental-bundlers'],
|
|
129
|
+
'--': ['--watch', '--code-coverage'],
|
|
113
130
|
})
|
|
114
131
|
);
|
|
115
132
|
});
|
|
@@ -123,7 +140,7 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
123
140
|
|
|
124
141
|
expect(lernaExec).toHaveBeenCalledWith(
|
|
125
142
|
expect.objectContaining({
|
|
126
|
-
'--': ['--
|
|
143
|
+
'--': ['--watch', `--config "${args.config}"`],
|
|
127
144
|
})
|
|
128
145
|
);
|
|
129
146
|
});
|
|
@@ -136,7 +153,9 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
136
153
|
test('selects scoped packages', async () => {
|
|
137
154
|
await subject();
|
|
138
155
|
|
|
139
|
-
expect(getPackages).toHaveBeenCalledWith(
|
|
156
|
+
expect(getPackages).toHaveBeenCalledWith(
|
|
157
|
+
expect.objectContaining({ scope: args.scope })
|
|
158
|
+
);
|
|
140
159
|
});
|
|
141
160
|
});
|
|
142
161
|
|
|
@@ -146,7 +165,23 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
146
165
|
test('selectively ignores packages', async () => {
|
|
147
166
|
await subject();
|
|
148
167
|
|
|
149
|
-
expect(getPackages).toHaveBeenCalledWith(
|
|
168
|
+
expect(getPackages).toHaveBeenCalledWith(
|
|
169
|
+
expect.objectContaining({ ignore: args.ignore })
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe.each(['esbuild', 'experimental-bundlers'])('with "%s"', arg => {
|
|
175
|
+
beforeEach(() => ((args as Record<string, any>)[arg] = true));
|
|
176
|
+
|
|
177
|
+
test('logs warning', async () => {
|
|
178
|
+
const logSpy = jest.spyOn(log, 'warning');
|
|
179
|
+
|
|
180
|
+
await subject();
|
|
181
|
+
|
|
182
|
+
expect(logSpy).toHaveBeenCalledWith(
|
|
183
|
+
expect.stringContaining(`--${arg} option is obsolete`)
|
|
184
|
+
);
|
|
150
185
|
});
|
|
151
186
|
});
|
|
152
187
|
});
|
|
@@ -22,6 +22,10 @@ describe(`[startup] ${Tests.name}`, () => {
|
|
|
22
22
|
|
|
23
23
|
const subject = async () => new Tests(args).execute();
|
|
24
24
|
|
|
25
|
+
test('command is greedy', () => {
|
|
26
|
+
expect(new Tests(args).greedy).toBe(true);
|
|
27
|
+
});
|
|
28
|
+
|
|
25
29
|
test('runs Jest CLI', async () => {
|
|
26
30
|
await subject();
|
|
27
31
|
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
import { getPackages, logErrors, PackageType
|
|
2
|
-
import { lernaExec,
|
|
3
|
-
import {
|
|
1
|
+
import { getPackages, logErrors, PackageType } from '../../utils';
|
|
2
|
+
import { checkArgs, compile, lernaExec, typeCheck, ProcessTree } from '../utils';
|
|
3
|
+
import { kendoUILicense } from './kendo-ui-license';
|
|
4
|
+
import { Command } from './types';
|
|
4
5
|
|
|
5
6
|
interface Args {
|
|
6
7
|
'cdn-path'?: string;
|
|
7
8
|
'code-coverage'?: boolean;
|
|
8
9
|
'config'?: string;
|
|
9
|
-
'esbuild'?: boolean;
|
|
10
|
-
'experimental-bundlers'?: boolean;
|
|
11
10
|
'ignore'?: string | string[];
|
|
12
11
|
'scope'?: string | string[];
|
|
13
12
|
'stat'?: boolean;
|
|
13
|
+
'use-tsc'?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum BuildProcesses {
|
|
17
|
+
'Compile',
|
|
18
|
+
'KendoUILicense',
|
|
19
|
+
'PreparePackage',
|
|
20
|
+
'TypeCheck',
|
|
21
|
+
'BundlePackage',
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
export class Build implements Command {
|
|
25
|
+
readonly greedy = true;
|
|
26
|
+
|
|
17
27
|
constructor(private args: Args) {}
|
|
18
28
|
|
|
19
29
|
description() {
|
|
@@ -22,44 +32,70 @@ export class Build implements Command {
|
|
|
22
32
|
|
|
23
33
|
@logErrors
|
|
24
34
|
async execute() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
checkArgs(this.args, { obsolete: ['--esbuild', '--experimental-bundlers'] });
|
|
36
|
+
|
|
37
|
+
const useTsc = this.args['use-tsc'];
|
|
38
|
+
|
|
39
|
+
const packages = getPackages({
|
|
40
|
+
scope: this.args.scope,
|
|
41
|
+
ignore: this.args.ignore,
|
|
42
|
+
type: [PackageType.TSC, PackageType.Webpack],
|
|
43
|
+
});
|
|
44
|
+
if (packages.length === 0) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
32
47
|
|
|
33
48
|
if (this.args['cdn-path']) {
|
|
34
49
|
process.env.CLIENT_CDN_PATH = this.args['cdn-path'];
|
|
35
50
|
}
|
|
36
51
|
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
const scope = packages.map(({ name }) => name);
|
|
53
|
+
|
|
54
|
+
const processTree = new ProcessTree<typeof BuildProcesses>();
|
|
55
|
+
|
|
56
|
+
processTree.add(BuildProcesses.Compile, () => compile({ packages: scope, useTsc }));
|
|
57
|
+
processTree.add(BuildProcesses.KendoUILicense, () => kendoUILicense());
|
|
58
|
+
processTree.add(BuildProcesses.PreparePackage, () =>
|
|
59
|
+
lernaExec({
|
|
39
60
|
cmd: 'startup prepare-package',
|
|
40
|
-
scope
|
|
61
|
+
scope,
|
|
41
62
|
stream: true,
|
|
42
|
-
})
|
|
43
|
-
|
|
63
|
+
})
|
|
64
|
+
);
|
|
65
|
+
processTree.add(BuildProcesses.TypeCheck, () => typeCheck({ packages: scope }), {
|
|
66
|
+
dependsOn: [BuildProcesses.PreparePackage],
|
|
67
|
+
});
|
|
68
|
+
processTree.add(
|
|
69
|
+
BuildProcesses.BundlePackage,
|
|
70
|
+
() => {
|
|
71
|
+
const webpackScope = packages
|
|
72
|
+
.filter(({ type }) => type === PackageType.Webpack)
|
|
73
|
+
.map(({ name }) => name);
|
|
44
74
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
75
|
+
if (webpackScope.length === 0) {
|
|
76
|
+
return Promise.resolve();
|
|
77
|
+
}
|
|
48
78
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
return lernaExec({
|
|
80
|
+
'cmd': 'startup bundle-package',
|
|
81
|
+
'scope': webpackScope,
|
|
82
|
+
'stream': true,
|
|
83
|
+
'--': [
|
|
84
|
+
...[this.args.config ? `--config "${this.args.config}"` : undefined],
|
|
85
|
+
...[this.args['code-coverage'] ? '--code-coverage' : undefined],
|
|
86
|
+
...[this.args.stat ? '--stat' : undefined],
|
|
87
|
+
].filter(item => !!item) as string[],
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
dependsOn: [
|
|
92
|
+
BuildProcesses.Compile,
|
|
93
|
+
BuildProcesses.KendoUILicense,
|
|
94
|
+
BuildProcesses.PreparePackage,
|
|
95
|
+
],
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
await processTree.run();
|
|
64
100
|
}
|
|
65
101
|
}
|
|
@@ -9,8 +9,6 @@ interface Args {
|
|
|
9
9
|
'code-coverage'?: boolean;
|
|
10
10
|
'stat'?: boolean;
|
|
11
11
|
'watch'?: boolean;
|
|
12
|
-
'esbuild'?: boolean;
|
|
13
|
-
'experimental-bundlers'?: boolean;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
export class BundlePackage implements Command {
|
|
@@ -35,8 +33,6 @@ export class BundlePackage implements Command {
|
|
|
35
33
|
const options = {
|
|
36
34
|
config,
|
|
37
35
|
codeCoverage: this.args['code-coverage'],
|
|
38
|
-
esbuild: this.args.esbuild,
|
|
39
|
-
experimentalBundlers: this.args['experimental-bundlers'],
|
|
40
36
|
};
|
|
41
37
|
|
|
42
38
|
if (!watch) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { exec, execSync } from 'child_process';
|
|
2
|
+
import { log, logErrors } from '../../utils';
|
|
3
|
+
import { Command } from './types';
|
|
4
|
+
|
|
5
|
+
export class Clean implements Command {
|
|
6
|
+
description() {
|
|
7
|
+
return 'resets project to fresh state';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@logErrors
|
|
11
|
+
async execute() {
|
|
12
|
+
['npx nx reset', 'npx jest --clearCache', 'npm cache clear --force'].forEach(command => {
|
|
13
|
+
log.info(`Running: ${command}`);
|
|
14
|
+
execSync(command, { stdio: ['ignore', 'ignore', 'inherit'] });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// Use exec() to avoid error when startup dependencies are deleted while startup is running
|
|
18
|
+
const command = 'git clean -fdX';
|
|
19
|
+
log.info(`Running: ${command}`);
|
|
20
|
+
exec(command);
|
|
21
|
+
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -2,6 +2,7 @@ import { CommandName } from '../../utils';
|
|
|
2
2
|
|
|
3
3
|
import { Build } from './build';
|
|
4
4
|
import { BundlePackage } from './bundle-package';
|
|
5
|
+
import { Clean } from './clean';
|
|
5
6
|
import { ConvertEslintConfig } from './convert-eslint-config';
|
|
6
7
|
import { ESLintCommand } from './eslint';
|
|
7
8
|
import { Init } from './init';
|
|
@@ -12,45 +13,34 @@ import { MFEPackageClean } from './mfe-package-clean';
|
|
|
12
13
|
import { MFEPackagePublish } from './mfe-package-publish';
|
|
13
14
|
import { MFEPublish } from './mfe-publish';
|
|
14
15
|
import { PreparePackage } from './prepare-package';
|
|
16
|
+
import { Review } from './review';
|
|
17
|
+
import { RunTask } from './run-task';
|
|
15
18
|
import { Start } from './start';
|
|
16
19
|
import { StylesCheck } from './styles-check';
|
|
17
|
-
import { RunTask } from './run-task';
|
|
18
20
|
import { Tests } from './tests';
|
|
19
21
|
import { Command, Newable } from './types';
|
|
20
22
|
|
|
23
|
+
const commands: Record<CommandName, Newable<Command>> = {
|
|
24
|
+
[CommandName.build]: Build,
|
|
25
|
+
[CommandName['bundle-package']]: BundlePackage,
|
|
26
|
+
[CommandName['convert-eslint-config']]: ConvertEslintConfig,
|
|
27
|
+
[CommandName.clean]: Clean,
|
|
28
|
+
[CommandName.eslint]: ESLintCommand,
|
|
29
|
+
[CommandName.init]: Init,
|
|
30
|
+
[CommandName.install]: Install,
|
|
31
|
+
[CommandName['kendo-ui-license']]: KendoUILicense,
|
|
32
|
+
[CommandName.lint]: Lint,
|
|
33
|
+
[CommandName['mfe-package-clean']]: MFEPackageClean,
|
|
34
|
+
[CommandName['mfe-package-publish']]: MFEPackagePublish,
|
|
35
|
+
[CommandName['mfe-publish']]: MFEPublish,
|
|
36
|
+
[CommandName['prepare-package']]: PreparePackage,
|
|
37
|
+
[CommandName.review]: Review,
|
|
38
|
+
[CommandName.start]: Start,
|
|
39
|
+
[CommandName['styles-check']]: StylesCheck,
|
|
40
|
+
[CommandName.test]: Tests,
|
|
41
|
+
[CommandName.task]: RunTask,
|
|
42
|
+
};
|
|
43
|
+
|
|
21
44
|
export function getCommand(name: CommandName): Newable<Command> | undefined {
|
|
22
|
-
|
|
23
|
-
case CommandName.build:
|
|
24
|
-
return Build;
|
|
25
|
-
case CommandName['bundle-package']:
|
|
26
|
-
return BundlePackage;
|
|
27
|
-
case CommandName['convert-eslint-config']:
|
|
28
|
-
return ConvertEslintConfig;
|
|
29
|
-
case CommandName.eslint:
|
|
30
|
-
return ESLintCommand;
|
|
31
|
-
case CommandName.init:
|
|
32
|
-
return Init;
|
|
33
|
-
case CommandName.install:
|
|
34
|
-
return Install;
|
|
35
|
-
case CommandName['kendo-ui-license']:
|
|
36
|
-
return KendoUILicense;
|
|
37
|
-
case CommandName.lint:
|
|
38
|
-
return Lint;
|
|
39
|
-
case CommandName['mfe-package-clean']:
|
|
40
|
-
return MFEPackageClean;
|
|
41
|
-
case CommandName['mfe-package-publish']:
|
|
42
|
-
return MFEPackagePublish;
|
|
43
|
-
case CommandName['mfe-publish']:
|
|
44
|
-
return MFEPublish;
|
|
45
|
-
case CommandName['prepare-package']:
|
|
46
|
-
return PreparePackage;
|
|
47
|
-
case CommandName.start:
|
|
48
|
-
return Start;
|
|
49
|
-
case CommandName['styles-check']:
|
|
50
|
-
return StylesCheck;
|
|
51
|
-
case CommandName.test:
|
|
52
|
-
return Tests;
|
|
53
|
-
case CommandName.task:
|
|
54
|
-
return RunTask;
|
|
55
|
-
}
|
|
45
|
+
return commands[name];
|
|
56
46
|
}
|