@servicetitan/startup 30.3.0 → 31.0.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 +124 -48
- 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 +3 -2
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +44 -32
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts +23 -0
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts.map +1 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts +2 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts.map +1 -0
- 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/__mocks__/index.d.ts +4 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts +7 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts +21 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts +3 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts.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/start.d.ts +11 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +166 -69
- 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-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 +75 -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/utils/bundle.d.ts +0 -2
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +118 -70
- 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 +112 -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 +21 -13
- package/dist/cli/utils/get-module-type.js.map +1 -1
- package/dist/cli/utils/index.d.ts +7 -5
- 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/style-extensions.d.ts +2 -0
- package/dist/cli/utils/style-extensions.d.ts.map +1 -0
- package/dist/cli/utils/style-extensions.js +17 -0
- package/dist/cli/utils/style-extensions.js.map +1 -0
- package/dist/cli/utils/tcm.d.ts +5 -2
- package/dist/cli/utils/tcm.d.ts.map +1 -1
- package/dist/cli/utils/tcm.js +51 -46
- package/dist/cli/utils/tcm.js.map +1 -1
- 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 +10 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +120 -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/__mocks__/file-rules.d.ts.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/cache-config.js +20 -9
- package/dist/webpack/configs/cache-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 -1
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js +30 -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 +54 -28
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.js +26 -12
- 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.js +28 -20
- 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 +32 -22
- 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.js +40 -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 +62 -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 +0 -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/feature-cohort.js +17 -12
- package/dist/webpack/utils/feature-cohort.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/hash-mod.js +16 -11
- package/dist/webpack/utils/hash-mod.js.map +1 -1
- package/dist/webpack/utils/index.d.ts +1 -1
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +21 -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 +20 -20
- package/src/cli/commands/__tests__/build.test.ts +69 -44
- 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 +17 -36
- package/src/cli/commands/__tests__/start.test.ts +81 -44
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/build.ts +73 -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 +8 -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 +130 -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.test.ts → swc-compile-package.test.ts} +75 -36
- 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 +71 -45
- 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 +1 -1
- 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__/tcm.test.ts +90 -86
- 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 +5 -18
- 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 +76 -0
- package/src/cli/utils/eslint.ts +1 -0
- package/src/cli/utils/get-module-type.ts +4 -6
- package/src/cli/utils/index.ts +7 -6
- 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/style-extensions.ts +1 -0
- package/src/cli/utils/tcm.ts +22 -32
- 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 +44 -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 +19 -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-web-component.test.ts +4 -5
- package/src/webpack/__tests__/create-webpack-config.test.ts +33 -112
- 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 -1
- package/src/webpack/configs/loaders/index.ts +1 -1
- package/src/webpack/configs/optimization-config.ts +2 -2
- package/src/webpack/configs/plugins/index.ts +0 -2
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +3 -3
- 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/watch-options-config.ts +17 -0
- package/src/webpack/create-webpack-config.ts +3 -4
- package/src/webpack/index.ts +1 -1
- package/src/webpack/types.ts +0 -4
- package/src/webpack/utils/index.ts +1 -1
- package/dist/__mocks__/create-package.js +0 -17
- package/dist/__mocks__/create-package.js.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/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.js +0 -79
- package/dist/webpack/__mocks__/file-rules.js.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.js +0 -124
- package/dist/webpack/__mocks__/style-rules.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/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__/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/tsc.ts +0 -38
- 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/{bundle.ts → get-module-entry-path.ts} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from '@jest/types';
|
|
2
|
+
import { swcDir } from '@swc/cli';
|
|
2
3
|
import { ESLint } from 'eslint';
|
|
3
4
|
import { LinterOptions } from 'stylelint';
|
|
4
|
-
import {
|
|
5
|
+
import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
|
|
6
|
+
import { ReviewConfiguration } from '../cli/commands/review';
|
|
5
7
|
export declare const allowedWebpackDevServerOptions: readonly ["headers", "port", "proxy", "static"];
|
|
6
8
|
type ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;
|
|
7
9
|
export interface MinifyJSOptions {
|
|
@@ -37,6 +39,7 @@ export interface NodeConfiguration {
|
|
|
37
39
|
export declare enum CommandName {
|
|
38
40
|
'build' = "build",
|
|
39
41
|
'bundle-package' = "bundle-package",
|
|
42
|
+
'clean' = "clean",
|
|
40
43
|
'convert-eslint-config' = "convert-eslint-config",
|
|
41
44
|
'eslint' = "eslint",
|
|
42
45
|
'init' = "init",
|
|
@@ -47,6 +50,7 @@ export declare enum CommandName {
|
|
|
47
50
|
'mfe-package-publish' = "mfe-package-publish",
|
|
48
51
|
'mfe-publish' = "mfe-publish",
|
|
49
52
|
'prepare-package' = "prepare-package",
|
|
53
|
+
'review' = "review",
|
|
50
54
|
'start' = "start",
|
|
51
55
|
'styles-check' = "styles-check",
|
|
52
56
|
'test' = "test",
|
|
@@ -69,6 +73,8 @@ type Configuration = {
|
|
|
69
73
|
eslint: ESLintConfiguration;
|
|
70
74
|
stylelint: StylelintConfiguration;
|
|
71
75
|
};
|
|
76
|
+
'review'?: ReviewConfiguration;
|
|
77
|
+
'swc-compile-package'?: Parameters<typeof swcDir>[0];
|
|
72
78
|
'test'?: JestConfiguration;
|
|
73
79
|
'web-component'?: boolean | string | WebComponentOptions;
|
|
74
80
|
'webpack'?: false | WebpackConfiguration;
|
|
@@ -80,10 +86,12 @@ export declare function getConfiguration(locationOrJson?: LocationOrJson): Confi
|
|
|
80
86
|
export declare function getConfigurationSafe(locationOrJson?: LocationOrJson): Configuration;
|
|
81
87
|
export declare function getESLintConfiguration(): ESLintConfiguration;
|
|
82
88
|
export declare function getJestConfiguration(): JestConfiguration & NodeConfiguration;
|
|
89
|
+
export declare function getReviewConfiguration(): ReviewConfiguration & NodeConfiguration;
|
|
83
90
|
export declare function getStylelintConfiguration(): StylelintConfiguration;
|
|
84
91
|
export declare function getWebpackConfiguration(locationOrJson?: LocationOrJson): WebpackConfiguration;
|
|
85
92
|
export declare function getWebComponentConfiguration(locationOrJson?: LocationOrJson): WebComponentOptions | undefined;
|
|
86
93
|
export declare function getWebComponentBranchConfigs(locationOrJson?: LocationOrJson): Record<string, WebComponentBranchConfigs> | undefined;
|
|
94
|
+
export declare function getSwcCompilePackageConfiguration(): import("@swc/cli").Options;
|
|
87
95
|
export declare function isBundle(locationOrJson?: LocationOrJson): boolean;
|
|
88
96
|
export declare function isCustomStyleRules(): boolean;
|
|
89
97
|
export declare function isDevServerDisabled(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,IAAI,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAI7D,eAAO,MAAM,8BAA8B,iDAAkD,CAAC;AAE9F,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,KAAK,CAAC;AAErF,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;CAAG;AAEpC,MAAM,WAAW,aAAa;IAC1B,GAAG,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACjC,EAAE,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,oBACb,SAAQ,IAAI,CACR,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAC,EACvF,OAAO,CACV;IACD,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACrD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,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AAc,WAEvD;AAED,wBAAgB,YAAY,YAE3B;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,cAAc,CAAC,cAAc,GAAE,cAAqB,WAEnE"}
|
|
@@ -1,35 +1,94 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get CommandName () {
|
|
13
|
+
return CommandName;
|
|
14
|
+
},
|
|
15
|
+
get allowedWebpackDevServerOptions () {
|
|
16
|
+
return allowedWebpackDevServerOptions;
|
|
17
|
+
},
|
|
18
|
+
get getConfiguration () {
|
|
19
|
+
return getConfiguration;
|
|
20
|
+
},
|
|
21
|
+
get getConfigurationSafe () {
|
|
22
|
+
return getConfigurationSafe;
|
|
23
|
+
},
|
|
24
|
+
get getESLintConfiguration () {
|
|
25
|
+
return getESLintConfiguration;
|
|
26
|
+
},
|
|
27
|
+
get getJestConfiguration () {
|
|
28
|
+
return getJestConfiguration;
|
|
29
|
+
},
|
|
30
|
+
get getReviewConfiguration () {
|
|
31
|
+
return getReviewConfiguration;
|
|
32
|
+
},
|
|
33
|
+
get getStylelintConfiguration () {
|
|
34
|
+
return getStylelintConfiguration;
|
|
35
|
+
},
|
|
36
|
+
get getSwcCompilePackageConfiguration () {
|
|
37
|
+
return getSwcCompilePackageConfiguration;
|
|
38
|
+
},
|
|
39
|
+
get getWebComponentBranchConfigs () {
|
|
40
|
+
return getWebComponentBranchConfigs;
|
|
41
|
+
},
|
|
42
|
+
get getWebComponentConfiguration () {
|
|
43
|
+
return getWebComponentConfiguration;
|
|
44
|
+
},
|
|
45
|
+
get getWebpackConfiguration () {
|
|
46
|
+
return getWebpackConfiguration;
|
|
47
|
+
},
|
|
48
|
+
get isBundle () {
|
|
49
|
+
return isBundle;
|
|
50
|
+
},
|
|
51
|
+
get isCustomStyleRules () {
|
|
52
|
+
return isCustomStyleRules;
|
|
53
|
+
},
|
|
54
|
+
get isDevServerDisabled () {
|
|
55
|
+
return isDevServerDisabled;
|
|
56
|
+
},
|
|
57
|
+
get isExposeSharedDependencies () {
|
|
58
|
+
return isExposeSharedDependencies;
|
|
59
|
+
},
|
|
60
|
+
get isLegacy () {
|
|
61
|
+
return isLegacy;
|
|
62
|
+
},
|
|
63
|
+
get isLegacyRoot () {
|
|
64
|
+
return isLegacyRoot;
|
|
65
|
+
},
|
|
66
|
+
get isStyleCheckDisabled () {
|
|
67
|
+
return isStyleCheckDisabled;
|
|
68
|
+
},
|
|
69
|
+
get isWebComponent () {
|
|
70
|
+
return isWebComponent;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
74
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
75
|
+
const _log = require("./log");
|
|
76
|
+
const _readjson = require("./read-json");
|
|
77
|
+
function _interop_require_default(obj) {
|
|
78
|
+
return obj && obj.__esModule ? obj : {
|
|
79
|
+
default: obj
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const allowedWebpackDevServerOptions = [
|
|
83
|
+
'headers',
|
|
84
|
+
'port',
|
|
85
|
+
'proxy',
|
|
86
|
+
'static'
|
|
87
|
+
];
|
|
88
|
+
var CommandName = /*#__PURE__*/ function(CommandName) {
|
|
31
89
|
CommandName["build"] = "build";
|
|
32
90
|
CommandName["bundle-package"] = "bundle-package";
|
|
91
|
+
CommandName["clean"] = "clean";
|
|
33
92
|
CommandName["convert-eslint-config"] = "convert-eslint-config";
|
|
34
93
|
CommandName["eslint"] = "eslint";
|
|
35
94
|
CommandName["init"] = "init";
|
|
@@ -40,36 +99,40 @@ var CommandName;
|
|
|
40
99
|
CommandName["mfe-package-publish"] = "mfe-package-publish";
|
|
41
100
|
CommandName["mfe-publish"] = "mfe-publish";
|
|
42
101
|
CommandName["prepare-package"] = "prepare-package";
|
|
102
|
+
CommandName["review"] = "review";
|
|
43
103
|
CommandName["start"] = "start";
|
|
44
104
|
CommandName["styles-check"] = "styles-check";
|
|
45
105
|
CommandName["test"] = "test";
|
|
46
106
|
CommandName["task"] = "task";
|
|
47
|
-
|
|
107
|
+
return CommandName;
|
|
108
|
+
}({});
|
|
48
109
|
function getConfiguration(locationOrJson = './') {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
: locationOrJson;
|
|
53
|
-
return (_a = json === null || json === void 0 ? void 0 : json.cli) !== null && _a !== void 0 ? _a : {};
|
|
110
|
+
const json = typeof locationOrJson === 'string' ? (0, _readjson.readJson)(_path.default.join(locationOrJson, 'package.json')) : locationOrJson;
|
|
111
|
+
var _json_cli;
|
|
112
|
+
return (_json_cli = json === null || json === void 0 ? void 0 : json.cli) !== null && _json_cli !== void 0 ? _json_cli : {};
|
|
54
113
|
}
|
|
55
114
|
function getConfigurationSafe(locationOrJson = './') {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: locationOrJson;
|
|
60
|
-
return (_a = json === null || json === void 0 ? void 0 : json.cli) !== null && _a !== void 0 ? _a : {};
|
|
115
|
+
const json = typeof locationOrJson === 'string' ? (0, _readjson.readJsonSafe)(_path.default.join(locationOrJson, 'package.json')) : locationOrJson;
|
|
116
|
+
var _json_cli;
|
|
117
|
+
return (_json_cli = json === null || json === void 0 ? void 0 : json.cli) !== null && _json_cli !== void 0 ? _json_cli : {};
|
|
61
118
|
}
|
|
62
119
|
function getESLintConfiguration() {
|
|
63
|
-
var
|
|
64
|
-
|
|
120
|
+
var _getConfiguration_lint;
|
|
121
|
+
var _getConfiguration_lint_eslint;
|
|
122
|
+
return (_getConfiguration_lint_eslint = (_getConfiguration_lint = getConfiguration().lint) === null || _getConfiguration_lint === void 0 ? void 0 : _getConfiguration_lint.eslint) !== null && _getConfiguration_lint_eslint !== void 0 ? _getConfiguration_lint_eslint : {};
|
|
65
123
|
}
|
|
66
124
|
function getJestConfiguration() {
|
|
67
|
-
var
|
|
68
|
-
return (
|
|
125
|
+
var _getConfiguration_test;
|
|
126
|
+
return (_getConfiguration_test = getConfiguration().test) !== null && _getConfiguration_test !== void 0 ? _getConfiguration_test : {};
|
|
127
|
+
}
|
|
128
|
+
function getReviewConfiguration() {
|
|
129
|
+
var _getConfiguration_review;
|
|
130
|
+
return (_getConfiguration_review = getConfiguration().review) !== null && _getConfiguration_review !== void 0 ? _getConfiguration_review : {};
|
|
69
131
|
}
|
|
70
132
|
function getStylelintConfiguration() {
|
|
71
|
-
var
|
|
72
|
-
|
|
133
|
+
var _getConfiguration_lint;
|
|
134
|
+
var _getConfiguration_lint_stylelint;
|
|
135
|
+
return (_getConfiguration_lint_stylelint = (_getConfiguration_lint = getConfiguration().lint) === null || _getConfiguration_lint === void 0 ? void 0 : _getConfiguration_lint.stylelint) !== null && _getConfiguration_lint_stylelint !== void 0 ? _getConfiguration_lint_stylelint : {};
|
|
73
136
|
}
|
|
74
137
|
function getWebpackConfiguration(locationOrJson) {
|
|
75
138
|
const { webpack } = getConfiguration(locationOrJson);
|
|
@@ -84,11 +147,11 @@ function getWebComponentConfiguration(locationOrJson = './') {
|
|
|
84
147
|
return config;
|
|
85
148
|
}
|
|
86
149
|
if (typeof config === 'string') {
|
|
87
|
-
const configPath =
|
|
88
|
-
if (
|
|
89
|
-
return require(
|
|
150
|
+
const configPath = _path.default.resolve(typeof locationOrJson === 'string' ? _path.default.join(locationOrJson, config) : config);
|
|
151
|
+
if (_fs.default.existsSync(configPath)) {
|
|
152
|
+
return require(_path.default.resolve(configPath));
|
|
90
153
|
}
|
|
91
|
-
|
|
154
|
+
_log.log.warning(`could not find web-component configuration: "${config}"`);
|
|
92
155
|
return undefined;
|
|
93
156
|
}
|
|
94
157
|
}
|
|
@@ -96,6 +159,10 @@ function getWebComponentBranchConfigs(locationOrJson = './') {
|
|
|
96
159
|
const config = getWebComponentConfiguration(locationOrJson);
|
|
97
160
|
return config === null || config === void 0 ? void 0 : config.branches;
|
|
98
161
|
}
|
|
162
|
+
function getSwcCompilePackageConfiguration() {
|
|
163
|
+
var _getConfiguration_swccompilepackage;
|
|
164
|
+
return (_getConfiguration_swccompilepackage = getConfiguration()['swc-compile-package']) !== null && _getConfiguration_swccompilepackage !== void 0 ? _getConfiguration_swccompilepackage : {};
|
|
165
|
+
}
|
|
99
166
|
function isBundle(locationOrJson) {
|
|
100
167
|
return getConfiguration(locationOrJson).webpack !== false;
|
|
101
168
|
}
|
|
@@ -113,8 +180,8 @@ function isLegacy(locationOrJson) {
|
|
|
113
180
|
return getConfiguration(locationOrJson).legacy === true;
|
|
114
181
|
}
|
|
115
182
|
function isLegacyRoot() {
|
|
116
|
-
var
|
|
117
|
-
return ((
|
|
183
|
+
var _getWebComponentConfiguration;
|
|
184
|
+
return ((_getWebComponentConfiguration = getWebComponentConfiguration()) === null || _getWebComponentConfiguration === void 0 ? void 0 : _getWebComponentConfiguration.legacyRoot) === true;
|
|
118
185
|
}
|
|
119
186
|
function isStyleCheckDisabled() {
|
|
120
187
|
return getWebpackConfiguration()['disable-style-check'] === true;
|
|
@@ -122,4 +189,5 @@ function isStyleCheckDisabled() {
|
|
|
122
189
|
function isWebComponent(locationOrJson = './') {
|
|
123
190
|
return !!getWebComponentConfiguration(locationOrJson);
|
|
124
191
|
}
|
|
192
|
+
|
|
125
193
|
//# sourceMappingURL=get-configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-configuration.js","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":";;;;;;AAsGA,4CAMC;AAED,oDAMC;AAED,wDAEC;AAED,oDAEC;AAED,8DAEC;AAED,0DAGC;AAED,oEAwBC;AAED,oEAIC;AAED,4BAEC;AAED,gDAEC;AAED,kDAGC;AAED,gEAEC;AAED,4BAEC;AAED,oCAEC;AAED,oDAEC;AAED,wCAEC;AAtMD,4CAAoB;AACpB,gDAAwB;AAMxB,2CAAqD;AACrD,+BAA4B;AAEf,QAAA,8BAA8B,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AA8C9F,yDAAyD;AACzD,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACnB,8BAAiB,CAAA;IACjB,gDAAmC,CAAA;IACnC,8DAAiD,CAAA;IACjD,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,kCAAqB,CAAA;IACrB,oDAAuC,CAAA;IACvC,4BAAe,CAAA;IACf,sDAAyC,CAAA;IACzC,0DAA6C,CAAA;IAC7C,0CAA6B,CAAA;IAC7B,kDAAqC,CAAA;IACrC,8BAAiB,CAAA;IACjB,4CAA+B,CAAA;IAC/B,4BAAe,CAAA;IACf,4BAAe,CAAA;AACnB,CAAC,EAjBW,WAAW,2BAAX,WAAW,QAiBtB;AA4BD,SAAgB,gBAAgB,CAAC,iBAAiC,IAAI;;IAClE,MAAM,IAAI,GACN,OAAO,cAAc,KAAK,QAAQ;QAC9B,CAAC,CAAC,IAAA,oBAAQ,EAAC,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;QACrD,CAAC,CAAC,cAAc,CAAC;IACzB,OAAO,MAAA,IAAI,aAAJ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CAAE,UAAU,MAAK,IAAI,CAAC;AAC/D,CAAC;AAED,SAAgB,oBAAoB;IAChC,OAAO,uBAAuB,EAAE,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAC;AACrE,CAAC;AAED,SAAgB,cAAc,CAAC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAAC,4BAA4B,CAAC,cAAc,CAAC,CAAC;AAC1D,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import { Config } from '@jest/types';\nimport { swcDir } from '@swc/cli';\nimport { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport { LinterOptions } from 'stylelint';\nimport { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\n\nimport { ReviewConfiguration } from '../cli/commands/review';\nimport { log } from './log';\nimport { readJson, readJsonSafe } from './read-json';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration\n extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n > {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport type JestConfiguration = Omit<Config.Argv, '_' | '$0'>;\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-publish' = 'mfe-publish',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]: NodeConfiguration;\n} & NodeConfiguration;\n\ntype LocationOrJson = string | Record<string, any>;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n return getConfiguration().test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).webpack !== false;\n}\n\nexport function isCustomStyleRules() {\n return getWebpackConfiguration()['custom-style-rules'] === true;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return getWebpackConfiguration()['expose-shared-dependencies'] === true;\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","isBundle","isCustomStyleRules","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","test","review","stylelint","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","webpackConfiguration","devServer","legacy","legacyRoot"],"mappings":";;;;;;;;;;;QA2DYA;eAAAA;;QA/CCC;eAAAA;;QAgGGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAyCAC;eAAAA;;QANAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAyCAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;;2DA/MD;6DACE;qBAKG;0BACmB;;;;;;AAEhC,MAAMlB,iCAAiC;IAAC;IAAW;IAAQ;IAAS;CAAS;AA+C7E,IAAA,AAAKD,qCAAAA;;;;;;;;;;;;;;;;;;;WAAAA;;AAiDL,SAASE,iBAAiBkB,iBAAiC,IAAI;IAClE,MAAMC,OACF,OAAOD,mBAAmB,WACpBE,IAAAA,kBAAQ,EAACC,aAAI,CAACC,IAAI,CAACJ,gBAAgB,mBACnCA;QACHC;IAAP,OAAOA,CAAAA,YAAAA,iBAAAA,2BAAAA,KAAMI,GAAG,cAATJ,uBAAAA,YAAa,CAAC;AACzB;AAEO,SAASlB,qBAAqBiB,iBAAiC,IAAI;IACtE,MAAMC,OACF,OA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Property(exports, "getDestinationFolders", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getDestinationFolders;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
12
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
|
+
const _ = require(".");
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
13
19
|
function getDestinationFolders() {
|
|
14
|
-
const packages = (0,
|
|
20
|
+
const packages = (0, _.getPackages)();
|
|
15
21
|
const cwd = process.cwd();
|
|
16
|
-
return packages.reduce((result, { location })
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const { outDir } = (
|
|
22
|
+
return packages.reduce((result, { location })=>{
|
|
23
|
+
const tsConfigPath = _path.default.join(location, 'tsconfig.json');
|
|
24
|
+
if (_fs.default.existsSync(tsConfigPath)) {
|
|
25
|
+
var _readJson_compilerOptions;
|
|
26
|
+
const { outDir } = (_readJson_compilerOptions = (0, _.readJson)(tsConfigPath).compilerOptions) !== null && _readJson_compilerOptions !== void 0 ? _readJson_compilerOptions : {};
|
|
21
27
|
if (outDir) {
|
|
22
|
-
result.push(
|
|
28
|
+
result.push(_path.default.join(_path.default.relative(cwd, location), outDir, '/').replace(/\\/g, '/'));
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
return result;
|
|
26
32
|
}, []);
|
|
27
33
|
}
|
|
34
|
+
|
|
28
35
|
//# sourceMappingURL=get-destination-folders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-destination-folders.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport { getPackages, readJson } from '.';\n\n/**\n * Returns compilation targets for all packages\n */\nexport function getDestinationFolders() {\n const packages = getPackages();\n const cwd = process.cwd();\n\n return packages.reduce<string[]>((result, { location }) => {\n const tsConfigPath = path.join(location, 'tsconfig.json');\n if (fs.existsSync(tsConfigPath)) {\n const { outDir } = readJson(tsConfigPath).compilerOptions ?? {};\n if (outDir) {\n result.push(\n path.join(path.relative(cwd, location), outDir, '/').replace(/\\\\/g, '/')\n );\n }\n }\n return result;\n }, []);\n}\n"],"names":["getDestinationFolders","packages","getPackages","cwd","process","reduce","result","location","tsConfigPath","path","join","fs","existsSync","readJson","outDir","compilerOptions","push","relative","replace"],"mappings":";;;;+BAQgBA;;;eAAAA;;;2DARD;6DACE;kBAEqB;;;;;;AAK/B,SAASA;IACZ,MAAMC,WAAWC,IAAAA,aAAW;IAC5B,MAAMC,MAAMC,QAAQD,GAAG;IAEvB,OAAOF,SAASI,MAAM,CAAW,CAACC,QAAQ,EAAEC,QAAQ,EAAE;QAClD,MAAMC,eAAeC,aAAI,CAACC,IAAI,CAACH,UAAU;QACzC,IAAII,WAAE,CAACC,UAAU,CAACJ,eAAe;gBACVK;YAAnB,MAAM,EAAEC,MAAM,EAAE,GAAGD,CAAAA,4BAAAA,IAAAA,UAAQ,EAACL,cAAcO,eAAe,cAAtCF,uCAAAA,4BAA0C,CAAC;YAC9D,IAAIC,QAAQ;gBACRR,OAAOU,IAAI,CACPP,aAAI,CAACC,IAAI,CAACD,aAAI,CAACQ,QAAQ,CAACd,KAAKI,WAAWO,QAAQ,KAAKI,OAAO,CAAC,OAAO;YAE5E;QACJ;QACA,OAAOZ;IACX,GAAG,EAAE;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-folders.d.ts","sourceRoot":"","sources":["../../src/utils/get-folders.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,SAAO;;;
|
|
1
|
+
{"version":3,"file":"get-folders.d.ts","sourceRoot":"","sources":["../../src/utils/get-folders.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,SAAO;;;EAkBzC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getFolders", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getFolders;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
|
+
const _readjson = require("./read-json");
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
12
18
|
function getFolders(location = './') {
|
|
13
|
-
var
|
|
14
|
-
const { rootDir, outDir } = (
|
|
19
|
+
var _readJson_compilerOptions;
|
|
20
|
+
const { rootDir, outDir } = (_readJson_compilerOptions = (0, _readjson.readJson)(_path.default.join(location, 'tsconfig.json')).compilerOptions) !== null && _readJson_compilerOptions !== void 0 ? _readJson_compilerOptions : {};
|
|
15
21
|
if (!rootDir) {
|
|
16
22
|
throw new Error('"compilerOptions.rootDir" must be defined in the "tsconfig.json"!');
|
|
17
23
|
}
|
|
@@ -20,7 +26,8 @@ function getFolders(location = './') {
|
|
|
20
26
|
}
|
|
21
27
|
return {
|
|
22
28
|
source: rootDir,
|
|
23
|
-
destination: outDir
|
|
29
|
+
destination: outDir
|
|
24
30
|
};
|
|
25
31
|
}
|
|
32
|
+
|
|
26
33
|
//# sourceMappingURL=get-folders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-folders.ts"],"sourcesContent":["import path from 'path';\n\nimport { readJson } from './read-json';\n\n/**\n * Returns folders of sources and compilation target\n */\nexport function getFolders(location = './') {\n const { rootDir, outDir } =\n readJson<{ compilerOptions: { rootDir?: string; outDir?: string } }>(\n path.join(location, 'tsconfig.json')\n ).compilerOptions ?? {};\n\n if (!rootDir) {\n throw new Error('\"compilerOptions.rootDir\" must be defined in the \"tsconfig.json\"!');\n }\n\n if (!outDir) {\n throw new Error('\"compilerOptions.outDir\" must be defined in the \"tsconfig.json\"!');\n }\n\n return {\n source: rootDir,\n destination: outDir,\n };\n}\n"],"names":["getFolders","location","readJson","rootDir","outDir","path","join","compilerOptions","Error","source","destination"],"mappings":";;;;+BAOgBA;;;eAAAA;;;6DAPC;0BAEQ;;;;;;AAKlB,SAASA,WAAWC,WAAW,IAAI;QAElCC;IADJ,MAAM,EAAEC,OAAO,EAAEC,MAAM,EAAE,GACrBF,CAAAA,4BAAAA,IAAAA,kBAAQ,EACJG,aAAI,CAACC,IAAI,CAACL,UAAU,kBACtBM,eAAe,cAFjBL,uCAAAA,4BAEqB,CAAC;IAE1B,IAAI,CAACC,SAAS;QACV,MAAM,IAAIK,MAAM;IACpB;IAEA,IAAI,CAACJ,QAAQ;QACT,MAAM,IAAII,MAAM;IACpB;IAEA,OAAO;QACHC,QAAQN;QACRO,aAAaN;IACjB;AACJ"}
|
|
@@ -1,72 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get getJestConfig () {
|
|
13
|
+
return getJestConfig;
|
|
14
|
+
},
|
|
15
|
+
get getJestConfigCLI () {
|
|
16
|
+
return getJestConfigCLI;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
20
|
+
const _getconfiguration = require("./get-configuration");
|
|
21
|
+
const _getdestinationfolders = require("./get-destination-folders");
|
|
22
|
+
const _toarray = require("./to-array");
|
|
23
|
+
function _interop_require_default(obj) {
|
|
24
|
+
return obj && obj.__esModule ? obj : {
|
|
25
|
+
default: obj
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const getJestConfigBase = ({ coveragePathIgnorePatterns = [], setupFiles = [], testPathIgnorePatterns = [] })=>{
|
|
12
29
|
const moduleNameMapper = {
|
|
13
|
-
'\\.(css|scss|less|png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$': 'identity-obj-proxy'
|
|
30
|
+
'\\.(css|scss|less|png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$': 'identity-obj-proxy'
|
|
14
31
|
};
|
|
15
32
|
return {
|
|
16
33
|
verbose: true,
|
|
17
34
|
testEnvironment: 'jsdom',
|
|
18
35
|
testRunner: 'jest-circus/runner',
|
|
19
|
-
transformIgnorePatterns: [
|
|
20
|
-
|
|
36
|
+
transformIgnorePatterns: [
|
|
37
|
+
'node_modules/(?!(@servicetitan|@react-hook|nanoid|axios)/)'
|
|
38
|
+
],
|
|
39
|
+
modulePathIgnorePatterns: [
|
|
40
|
+
'<rootDir>/.*/__mocks__'
|
|
41
|
+
],
|
|
21
42
|
moduleNameMapper,
|
|
22
43
|
testPathIgnorePatterns: [
|
|
23
44
|
'\\.yalc',
|
|
24
|
-
...(0,
|
|
25
|
-
...(0,
|
|
45
|
+
...(0, _getdestinationfolders.getDestinationFolders)(),
|
|
46
|
+
...(0, _toarray.toArray)(testPathIgnorePatterns)
|
|
47
|
+
],
|
|
48
|
+
setupFiles: [
|
|
49
|
+
_path.default.join(__dirname, '../../jest/setup.js'),
|
|
50
|
+
...(0, _toarray.toArray)(setupFiles)
|
|
51
|
+
],
|
|
52
|
+
coveragePathIgnorePatterns: [
|
|
53
|
+
'^.+\\.d\\.ts$',
|
|
54
|
+
...coveragePathIgnorePatterns
|
|
55
|
+
],
|
|
56
|
+
coverageReporters: [
|
|
57
|
+
'html-spa',
|
|
58
|
+
'text',
|
|
59
|
+
'json',
|
|
60
|
+
'cobertura',
|
|
61
|
+
'lcov'
|
|
62
|
+
],
|
|
63
|
+
collectCoverageFrom: [
|
|
64
|
+
'**/*.{ts,tsx}'
|
|
26
65
|
],
|
|
27
|
-
|
|
28
|
-
coveragePathIgnorePatterns: ['^.+\\.d\\.ts$', ...coveragePathIgnorePatterns],
|
|
29
|
-
coverageReporters: ['html-spa', 'text', 'json', 'cobertura', 'lcov'],
|
|
30
|
-
collectCoverageFrom: ['**/*.{ts,tsx}'],
|
|
31
|
-
preset: path_1.default.join(__dirname, '../../jest'),
|
|
66
|
+
preset: _path.default.join(__dirname, '../../jest')
|
|
32
67
|
};
|
|
33
68
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* Jest config files.
|
|
37
|
-
*/
|
|
38
|
-
const getJestConfig = () => {
|
|
39
|
-
const { coveragePathIgnorePatterns, setupFiles, testPathIgnorePatterns, ...config } = (0, get_configuration_1.getJestConfiguration)();
|
|
69
|
+
const getJestConfig = ()=>{
|
|
70
|
+
const { coveragePathIgnorePatterns, setupFiles, testPathIgnorePatterns, ...config } = (0, _getconfiguration.getJestConfiguration)();
|
|
40
71
|
return {
|
|
41
72
|
...getJestConfigBase({
|
|
42
73
|
coveragePathIgnorePatterns,
|
|
43
74
|
setupFiles,
|
|
44
|
-
testPathIgnorePatterns
|
|
75
|
+
testPathIgnorePatterns
|
|
45
76
|
}),
|
|
46
|
-
...config
|
|
77
|
+
...config
|
|
47
78
|
};
|
|
48
79
|
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Get Jest config for running it using jest CLI (see jest runCLI function)
|
|
52
|
-
*/
|
|
53
|
-
const getJestConfigCLI = (args) => {
|
|
80
|
+
const getJestConfigCLI = (args)=>{
|
|
54
81
|
const { coveragePathIgnorePatterns, setupFiles, testPathIgnorePatterns, globals, ...config } = {
|
|
55
|
-
...(0,
|
|
56
|
-
...args
|
|
82
|
+
...(0, _getconfiguration.getJestConfiguration)(),
|
|
83
|
+
...args
|
|
57
84
|
};
|
|
58
85
|
const { collectCoverageFrom, moduleNameMapper, ...rest } = getJestConfigBase({
|
|
59
86
|
coveragePathIgnorePatterns,
|
|
60
87
|
setupFiles,
|
|
61
|
-
testPathIgnorePatterns
|
|
88
|
+
testPathIgnorePatterns
|
|
62
89
|
});
|
|
63
90
|
return {
|
|
64
91
|
collectCoverageFrom: JSON.stringify(collectCoverageFrom),
|
|
65
92
|
globals: JSON.stringify(globals),
|
|
66
93
|
moduleNameMapper: JSON.stringify(moduleNameMapper),
|
|
67
94
|
...rest,
|
|
68
|
-
...config
|
|
95
|
+
...config
|
|
69
96
|
};
|
|
70
97
|
};
|
|
71
|
-
|
|
98
|
+
|
|
72
99
|
//# sourceMappingURL=get-jest-config.js.map
|