@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/webpack/loaders/expose-loader/utils/stringify-request.ts"],"sourcesContent":["import path from 'path';\n\nexport function stringifyRequest(context: string, request: string) {\n const splitted = request.split('!');\n\n return JSON.stringify(\n splitted\n .map(part => {\n // First, separate singlePath from query, because the query might contain paths again\n const splittedPart = /^(.*?)(\\?.*)/.exec(part);\n const query = splittedPart ? splittedPart[2] : '';\n let singlePath = splittedPart ? splittedPart[1] : part;\n\n if (isAbsolutePath(singlePath) && context) {\n singlePath = path.relative(context, singlePath);\n }\n\n return singlePath.replace(/\\\\/g, '/') + query;\n })\n .join('!')\n );\n}\n\nfunction isAbsolutePath(str: string) {\n return path.posix.isAbsolute(str) || path.win32.isAbsolute(str);\n}\n"],"names":["stringifyRequest","context","request","splitted","split","JSON","stringify","map","part","splittedPart","exec","query","singlePath","isAbsolutePath","path","relative","replace","join","str","posix","isAbsolute","win32"],"mappings":";;;;+BAEgBA;;;eAAAA;;;6DAFC;;;;;;AAEV,SAASA,iBAAiBC,OAAe,EAAEC,OAAe;IAC7D,MAAMC,WAAWD,QAAQE,KAAK,CAAC;IAE/B,OAAOC,KAAKC,SAAS,CACjBH,SACKI,GAAG,CAACC,CAAAA;QACD,qFAAqF;QACrF,MAAMC,eAAe,eAAeC,IAAI,CAACF;QACzC,MAAMG,QAAQF,eAAeA,YAAY,CAAC,EAAE,GAAG;QAC/C,IAAIG,aAAaH,eAAeA,YAAY,CAAC,EAAE,GAAGD;QAElD,IAAIK,eAAeD,eAAeX,SAAS;YACvCW,aAAaE,aAAI,CAACC,QAAQ,CAACd,SAASW;QACxC;QAEA,OAAOA,WAAWI,OAAO,CAAC,OAAO,OAAOL;IAC5C,GACCM,IAAI,CAAC;AAElB;AAEA,SAASJ,eAAeK,GAAW;IAC/B,OAAOJ,aAAI,CAACK,KAAK,CAACC,UAAU,CAACF,QAAQJ,aAAI,CAACO,KAAK,CAACD,UAAU,CAACF;AAC/D"}
|
package/dist/webpack/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
|
|
2
1
|
import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
3
2
|
import { PluginOptions as MiniCssExtractPlugInOptions } from 'mini-css-extract-plugin';
|
|
4
3
|
import { Configuration } from 'webpack';
|
|
@@ -6,14 +5,12 @@ export interface Options {
|
|
|
6
5
|
buildStat?: boolean;
|
|
7
6
|
codeCoverage?: boolean;
|
|
8
7
|
embed?: boolean;
|
|
9
|
-
|
|
10
|
-
experimentalBundlers?: boolean;
|
|
8
|
+
headless?: boolean;
|
|
11
9
|
name?: string;
|
|
12
10
|
}
|
|
13
11
|
export interface Overrides {
|
|
14
12
|
configuration?: Configuration;
|
|
15
13
|
plugins?: {
|
|
16
|
-
ForkTsCheckerWebpackPlugin?: ForkTsCheckerWebpackPluginOptions;
|
|
17
14
|
HtmlWebpackPlugin?: HtmlWebpackPluginOptions;
|
|
18
15
|
MiniCssExtractPlugin?: MiniCssExtractPlugInOptions;
|
|
19
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webpack/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webpack/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,aAAa,IAAI,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,OAAO;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE;QACN,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;QAC7C,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;KACtD,CAAC;CACL"}
|
package/dist/webpack/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/webpack/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getCallerFile", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getCallerFile;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
4
11
|
function getCallerFile() {
|
|
5
|
-
var _a;
|
|
6
12
|
let filename = '';
|
|
7
13
|
const originalPrepareStackTrace = Error.prepareStackTrace;
|
|
8
|
-
Error.prepareStackTrace = (err, stack)
|
|
14
|
+
Error.prepareStackTrace = (err, stack)=>stack;
|
|
9
15
|
try {
|
|
16
|
+
var _err_stack;
|
|
10
17
|
const err = new Error();
|
|
11
18
|
let callerFile;
|
|
12
19
|
const currentFile = err.stack.shift().getFileName();
|
|
13
|
-
while
|
|
20
|
+
while((_err_stack = err.stack) === null || _err_stack === void 0 ? void 0 : _err_stack.length){
|
|
14
21
|
callerFile = err.stack.shift().getFileName();
|
|
15
22
|
if (currentFile !== callerFile) {
|
|
16
23
|
filename = callerFile;
|
|
17
24
|
break;
|
|
18
25
|
}
|
|
19
26
|
}
|
|
20
|
-
}
|
|
21
|
-
finally {
|
|
27
|
+
} finally{
|
|
22
28
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
23
29
|
}
|
|
24
30
|
return filename;
|
|
25
31
|
}
|
|
32
|
+
|
|
26
33
|
//# sourceMappingURL=get-caller-filename.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/utils/get-caller-filename.ts"],"sourcesContent":["export function getCallerFile() {\n let filename = '';\n\n const originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = (err, stack) => stack;\n\n try {\n const err = new Error();\n let callerFile;\n\n const currentFile = (err.stack as any).shift().getFileName();\n\n while (err.stack?.length) {\n callerFile = (err.stack as any).shift().getFileName();\n\n if (currentFile !== callerFile) {\n filename = callerFile;\n break;\n }\n }\n } finally {\n Error.prepareStackTrace = originalPrepareStackTrace;\n }\n\n return filename;\n}\n"],"names":["getCallerFile","filename","originalPrepareStackTrace","Error","prepareStackTrace","err","stack","callerFile","currentFile","shift","getFileName","length"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA;IACZ,IAAIC,WAAW;IAEf,MAAMC,4BAA4BC,MAAMC,iBAAiB;IACzDD,MAAMC,iBAAiB,GAAG,CAACC,KAAKC,QAAUA;IAE1C,IAAI;YAMOD;QALP,MAAMA,MAAM,IAAIF;QAChB,IAAII;QAEJ,MAAMC,cAAc,AAACH,IAAIC,KAAK,CAASG,KAAK,GAAGC,WAAW;QAE1D,OAAOL,aAAAA,IAAIC,KAAK,cAATD,iCAAAA,WAAWM,MAAM,CAAE;YACtBJ,aAAa,AAACF,IAAIC,KAAK,CAASG,KAAK,GAAGC,WAAW;YAEnD,IAAIF,gBAAgBD,YAAY;gBAC5BN,WAAWM;gBACX;YACJ;QACJ;IACJ,SAAU;QACNJ,MAAMC,iBAAiB,GAAGF;IAC9B;IAEA,OAAOD;AACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-module-entry-path.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/get-module-entry-path.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,UASrD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getModuleEntryPath", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getModuleEntryPath;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const path = require('path');
|
|
12
|
+
function getModuleEntryPath(packageName) {
|
|
13
|
+
const defaultPath = require.resolve(packageName);
|
|
14
|
+
const packageJson = require(`${packageName}/package.json`);
|
|
15
|
+
if (packageJson.module) {
|
|
16
|
+
return require.resolve(path.join(packageName, packageJson.module));
|
|
17
|
+
}
|
|
18
|
+
return defaultPath;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=get-module-entry-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/utils/get-module-entry-path.ts"],"sourcesContent":["const path = require('path');\n\n/**\n * require.resolve returns path to main package entry point.\n * But some packages uses 'module' field in package.json and webpack uses bundle from it\n * this method returns correct package path used in webpack entry configuration\n * @param packageName npm package name\n */\nexport function getModuleEntryPath(packageName: string) {\n const defaultPath = require.resolve(packageName);\n const packageJson = require(`${packageName}/package.json`);\n\n if (packageJson.module) {\n return require.resolve(path.join(packageName, packageJson.module));\n }\n\n return defaultPath;\n}\n"],"names":["getModuleEntryPath","path","require","packageName","defaultPath","resolve","packageJson","module","join"],"mappings":";;;;+BAQgBA;;;eAAAA;;;AARhB,MAAMC,OAAOC,QAAQ;AAQd,SAASF,mBAAmBG,WAAmB;IAClD,MAAMC,cAAcF,QAAQG,OAAO,CAACF;IACpC,MAAMG,cAAcJ,QAAQ,GAAGC,YAAY,aAAa,CAAC;IAEzD,IAAIG,YAAYC,MAAM,EAAE;QACpB,OAAOL,QAAQG,OAAO,CAACJ,KAAKO,IAAI,CAACL,aAAaG,YAAYC,MAAM;IACpE;IAEA,OAAOH;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./get-caller-filename"), exports);
|
|
6
|
+
_export_star(require("./get-module-entry-path"), exports);
|
|
7
|
+
_export_star(require("./split-by-entry"), exports);
|
|
8
|
+
function _export_star(from, to) {
|
|
9
|
+
Object.keys(from).forEach(function(k) {
|
|
10
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
11
|
+
Object.defineProperty(to, k, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return from[k];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return from;
|
|
20
|
+
}
|
|
21
|
+
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/utils/index.ts"],"sourcesContent":["export * from './get-caller-filename';\nexport * from './get-module-entry-path';\nexport * from './split-by-entry';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "splitByEntry", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return splitByEntry;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
4
11
|
function splitByEntry(compilation, entry, outputFiles) {
|
|
5
12
|
const filenames = getFiles(compilation, entry);
|
|
6
13
|
const first = [];
|
|
7
14
|
const second = [];
|
|
8
|
-
for (const output of outputFiles)
|
|
9
|
-
if (filenames.some(filename
|
|
15
|
+
for (const output of outputFiles){
|
|
16
|
+
if (filenames.some((filename)=>output.includes(filename))) {
|
|
10
17
|
first.push(output);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
18
|
+
} else {
|
|
13
19
|
second.push(output);
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
|
-
return [
|
|
22
|
+
return [
|
|
23
|
+
first,
|
|
24
|
+
second
|
|
25
|
+
];
|
|
17
26
|
}
|
|
18
27
|
function getFiles(compilation, entry) {
|
|
19
28
|
const entrypoint = compilation.entrypoints.get(entry);
|
|
@@ -22,4 +31,5 @@ function getFiles(compilation, entry) {
|
|
|
22
31
|
}
|
|
23
32
|
return entrypoint.getFiles();
|
|
24
33
|
}
|
|
34
|
+
|
|
25
35
|
//# sourceMappingURL=split-by-entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/utils/split-by-entry.ts"],"sourcesContent":["import { Compilation } from 'webpack';\n\nexport function splitByEntry(compilation: Compilation, entry: string, outputFiles: string[]) {\n const filenames = getFiles(compilation, entry);\n\n const first = [];\n const second = [];\n\n for (const output of outputFiles) {\n if (filenames.some(filename => output.includes(filename))) {\n first.push(output);\n } else {\n second.push(output);\n }\n }\n\n return [first, second] as [string[], string[]];\n}\n\nfunction getFiles(compilation: Compilation, entry: string): string[] {\n const entrypoint = compilation.entrypoints.get(entry);\n if (!entrypoint) {\n throw new TypeError(`entry ${entry} not found`);\n }\n return entrypoint.getFiles();\n}\n"],"names":["splitByEntry","compilation","entry","outputFiles","filenames","getFiles","first","second","output","some","filename","includes","push","entrypoint","entrypoints","get","TypeError"],"mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,aAAaC,WAAwB,EAAEC,KAAa,EAAEC,WAAqB;IACvF,MAAMC,YAAYC,SAASJ,aAAaC;IAExC,MAAMI,QAAQ,EAAE;IAChB,MAAMC,SAAS,EAAE;IAEjB,KAAK,MAAMC,UAAUL,YAAa;QAC9B,IAAIC,UAAUK,IAAI,CAACC,CAAAA,WAAYF,OAAOG,QAAQ,CAACD,YAAY;YACvDJ,MAAMM,IAAI,CAACJ;QACf,OAAO;YACHD,OAAOK,IAAI,CAACJ;QAChB;IACJ;IAEA,OAAO;QAACF;QAAOC;KAAO;AAC1B;AAEA,SAASF,SAASJ,WAAwB,EAAEC,KAAa;IACrD,MAAMW,aAAaZ,YAAYa,WAAW,CAACC,GAAG,CAACb;IAC/C,IAAI,CAACW,YAAY;QACb,MAAM,IAAIG,UAAU,CAAC,MAAM,EAAEd,MAAM,UAAU,CAAC;IAClD;IACA,OAAOW,WAAWR,QAAQ;AAC9B"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "compile", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return compile;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
4
11
|
function compile(compiler) {
|
|
5
|
-
return new Promise((resolve, reject)
|
|
6
|
-
compiler.run((error, stats)
|
|
12
|
+
return new Promise((resolve, reject)=>{
|
|
13
|
+
compiler.run((error, stats)=>{
|
|
7
14
|
if (!stats || error) {
|
|
8
15
|
return reject(error);
|
|
9
16
|
}
|
|
@@ -11,4 +18,5 @@ function compile(compiler) {
|
|
|
11
18
|
});
|
|
12
19
|
});
|
|
13
20
|
}
|
|
21
|
+
|
|
14
22
|
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/compile.ts"],"sourcesContent":["import { Compiler, Stats } from 'webpack';\n\nexport function compile(compiler: Compiler) {\n return new Promise<Stats>((resolve, reject) => {\n compiler.run((error, stats) => {\n if (!stats || error) {\n return reject(error);\n }\n\n return resolve(stats);\n });\n });\n}\n"],"names":["compile","compiler","Promise","resolve","reject","run","error","stats"],"mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,QAAQC,QAAkB;IACtC,OAAO,IAAIC,QAAe,CAACC,SAASC;QAChCH,SAASI,GAAG,CAAC,CAACC,OAAOC;YACjB,IAAI,CAACA,SAASD,OAAO;gBACjB,OAAOF,OAAOE;YAClB;YAEA,OAAOH,QAAQI;QACnB;IACJ;AACJ"}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "executeFactory", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return executeFactory;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _module = /*#__PURE__*/ _interop_require_default(require("module"));
|
|
12
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
9
18
|
const parentModule = module;
|
|
10
19
|
function executeFactory(cwd) {
|
|
11
|
-
return function execute(code, { before, after } = {
|
|
20
|
+
return function execute(code, { before, after } = {
|
|
21
|
+
before: 'const __export__;',
|
|
22
|
+
after: 'module.exports = __export__;'
|
|
23
|
+
}) {
|
|
12
24
|
const resource = 'test.js';
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
25
|
+
const module1 = new _module.default(resource, parentModule);
|
|
26
|
+
module1.paths = _module.default._nodeModulePaths(_path.default.resolve(cwd, './__tests__/__mocks__'));
|
|
27
|
+
module1.filename = resource;
|
|
28
|
+
module1._compile(`${before}\n${code}\n${after}`, resource);
|
|
29
|
+
return module1.exports;
|
|
18
30
|
};
|
|
19
31
|
}
|
|
32
|
+
|
|
20
33
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/execute.ts"],"sourcesContent":["import Module from 'module';\nimport path from 'path';\n\nconst parentModule = module;\n\nexport function executeFactory(cwd: string) {\n return function execute(\n code: string,\n { before, after } = { before: 'const __export__;', after: 'module.exports = __export__;' }\n ) {\n const resource = 'test.js';\n const module = new Module(resource, parentModule);\n\n module.paths = (Module as any)._nodeModulePaths(path.resolve(cwd, './__tests__/__mocks__'));\n module.filename = resource;\n\n (module as any)._compile(`${before}\\n${code}\\n${after}`, resource);\n\n return module.exports;\n };\n}\n"],"names":["executeFactory","parentModule","module","cwd","execute","code","before","after","resource","Module","paths","_nodeModulePaths","path","resolve","filename","_compile","exports"],"mappings":";;;;+BAKgBA;;;eAAAA;;;+DALG;6DACF;;;;;;AAEjB,MAAMC,eAAeC;AAEd,SAASF,eAAeG,GAAW;IACtC,OAAO,SAASC,QACZC,IAAY,EACZ,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAG;QAAED,QAAQ;QAAqBC,OAAO;IAA+B,CAAC;QAE1F,MAAMC,WAAW;QACjB,MAAMN,UAAS,IAAIO,eAAM,CAACD,UAAUP;QAEpCC,QAAOQ,KAAK,GAAG,AAACD,eAAM,CAASE,gBAAgB,CAACC,aAAI,CAACC,OAAO,CAACV,KAAK;QAClED,QAAOY,QAAQ,GAAGN;QAEjBN,QAAea,QAAQ,CAAC,GAAGT,OAAO,EAAE,EAAED,KAAK,EAAE,EAAEE,OAAO,EAAEC;QAEzD,OAAON,QAAOc,OAAO;IACzB;AACJ"}
|
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getCompilerFactory", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getCompilerFactory;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
|
+
const _webpack = /*#__PURE__*/ _interop_require_default(require("webpack"));
|
|
13
|
+
const _webpackmerge = require("webpack-merge");
|
|
14
|
+
const _memfs = require("memfs");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
11
20
|
function getCompilerFactory(cwd) {
|
|
12
21
|
return function getCompiler(entry, loaderOptions = {}, config = {}) {
|
|
13
|
-
var
|
|
14
|
-
const compiler = (0,
|
|
22
|
+
var _config_devtool;
|
|
23
|
+
const compiler = (0, _webpack.default)((0, _webpackmerge.merge)({
|
|
15
24
|
mode: 'development',
|
|
16
|
-
devtool: (
|
|
17
|
-
context:
|
|
18
|
-
entry:
|
|
25
|
+
devtool: (_config_devtool = config.devtool) !== null && _config_devtool !== void 0 ? _config_devtool : false,
|
|
26
|
+
context: _path.default.resolve(cwd, './__tests__/__mocks__'),
|
|
27
|
+
entry: _path.default.resolve(cwd, './__tests__/__mocks__', entry),
|
|
19
28
|
output: {
|
|
20
|
-
path:
|
|
29
|
+
path: _path.default.resolve(cwd, './__tests__/dist'),
|
|
21
30
|
filename: '[name].bundle.js',
|
|
22
|
-
chunkFilename: '[name].chunk.js'
|
|
31
|
+
chunkFilename: '[name].chunk.js'
|
|
23
32
|
},
|
|
24
33
|
module: {
|
|
25
34
|
rules: [
|
|
26
35
|
{
|
|
27
|
-
test: new RegExp(`\\.${
|
|
36
|
+
test: new RegExp(`\\.${_path.default.basename(cwd)}\\.\\w+$`, 'i'),
|
|
28
37
|
rules: [
|
|
29
38
|
{
|
|
30
39
|
loader: require.resolve(cwd),
|
|
31
|
-
options: loaderOptions
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
]
|
|
40
|
+
options: loaderOptions
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
36
45
|
},
|
|
37
|
-
plugins: []
|
|
46
|
+
plugins: []
|
|
38
47
|
}, config));
|
|
39
|
-
compiler.outputFileSystem = (0,
|
|
48
|
+
compiler.outputFileSystem = (0, _memfs.createFsFromVolume)(new _memfs.Volume());
|
|
40
49
|
return compiler;
|
|
41
50
|
};
|
|
42
51
|
}
|
|
52
|
+
|
|
43
53
|
//# sourceMappingURL=get-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/get-compiler.ts"],"sourcesContent":["import path from 'path';\n\nimport webpack, { Configuration } from 'webpack';\nimport { merge } from 'webpack-merge';\n\nimport { createFsFromVolume, Volume } from 'memfs';\n\nexport function getCompilerFactory(cwd: string) {\n return function getCompiler(entry: string, loaderOptions = {}, config: Configuration = {}) {\n const compiler = webpack(\n merge(\n {\n mode: 'development',\n devtool: config.devtool ?? false,\n context: path.resolve(cwd, './__tests__/__mocks__'),\n entry: path.resolve(cwd, './__tests__/__mocks__', entry),\n output: {\n path: path.resolve(cwd, './__tests__/dist'),\n filename: '[name].bundle.js',\n chunkFilename: '[name].chunk.js',\n },\n module: {\n rules: [\n {\n test: new RegExp(`\\\\.${path.basename(cwd)}\\\\.\\\\w+$`, 'i'),\n rules: [\n {\n loader: require.resolve(cwd),\n options: loaderOptions,\n },\n ],\n },\n ],\n },\n plugins: [],\n },\n config\n )\n );\n\n compiler.outputFileSystem = createFsFromVolume(new Volume()) as any;\n\n return compiler;\n };\n}\n"],"names":["getCompilerFactory","cwd","getCompiler","entry","loaderOptions","config","compiler","webpack","merge","mode","devtool","context","path","resolve","output","filename","chunkFilename","module","rules","test","RegExp","basename","loader","require","options","plugins","outputFileSystem","createFsFromVolume","Volume"],"mappings":";;;;+BAOgBA;;;eAAAA;;;6DAPC;gEAEsB;8BACjB;uBAEqB;;;;;;AAEpC,SAASA,mBAAmBC,GAAW;IAC1C,OAAO,SAASC,YAAYC,KAAa,EAAEC,gBAAgB,CAAC,CAAC,EAAEC,SAAwB,CAAC,CAAC;YAKhEA;QAJrB,MAAMC,WAAWC,IAAAA,gBAAO,EACpBC,IAAAA,mBAAK,EACD;YACIC,MAAM;YACNC,SAASL,CAAAA,kBAAAA,OAAOK,OAAO,cAAdL,6BAAAA,kBAAkB;YAC3BM,SAASC,aAAI,CAACC,OAAO,CAACZ,KAAK;YAC3BE,OAAOS,aAAI,CAACC,OAAO,CAACZ,KAAK,yBAAyBE;YAClDW,QAAQ;gBACJF,MAAMA,aAAI,CAACC,OAAO,CAACZ,KAAK;gBACxBc,UAAU;gBACVC,eAAe;YACnB;YACAC,QAAQ;gBACJC,OAAO;oBACH;wBACIC,MAAM,IAAIC,OAAO,CAAC,GAAG,EAAER,aAAI,CAACS,QAAQ,CAACpB,KAAK,QAAQ,CAAC,EAAE;wBACrDiB,OAAO;4BACH;gCACII,QAAQC,QAAQV,OAAO,CAACZ;gCACxBuB,SAASpB;4BACb;yBACH;oBACL;iBACH;YACL;YACAqB,SAAS,EAAE;QACf,GACApB;QAIRC,SAASoB,gBAAgB,GAAGC,IAAAA,yBAAkB,EAAC,IAAIC,aAAM;QAEzD,OAAOtB;IACX;AACJ"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getErrors", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getErrors;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _normalizeerrors = require("./normalize-errors");
|
|
5
12
|
function getErrors(stats) {
|
|
6
|
-
return (0,
|
|
13
|
+
return (0, _normalizeerrors.normalizeErrors)(stats.compilation.errors);
|
|
7
14
|
}
|
|
15
|
+
|
|
8
16
|
//# sourceMappingURL=get-errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/get-errors.ts"],"sourcesContent":["import { Stats } from 'webpack';\n\nimport { normalizeErrors } from './normalize-errors';\n\nexport function getErrors(stats: Stats) {\n return normalizeErrors(stats.compilation.errors);\n}\n"],"names":["getErrors","stats","normalizeErrors","compilation","errors"],"mappings":";;;;+BAIgBA;;;eAAAA;;;iCAFgB;AAEzB,SAASA,UAAUC,KAAY;IAClC,OAAOC,IAAAA,gCAAe,EAACD,MAAME,WAAW,CAACC,MAAM;AACnD"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getModuleSource", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getModuleSource;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
4
11
|
function getModuleSource(name, stats) {
|
|
5
|
-
|
|
6
|
-
|
|
12
|
+
const { modules } = stats.toJson({
|
|
13
|
+
source: true
|
|
14
|
+
});
|
|
7
15
|
if (modules) {
|
|
8
|
-
|
|
16
|
+
var _modules_find;
|
|
17
|
+
return (_modules_find = modules.find((m)=>{
|
|
18
|
+
var _m_name;
|
|
19
|
+
return (_m_name = m.name) === null || _m_name === void 0 ? void 0 : _m_name.endsWith(name);
|
|
20
|
+
})) === null || _modules_find === void 0 ? void 0 : _modules_find.source;
|
|
9
21
|
}
|
|
10
22
|
return undefined;
|
|
11
23
|
}
|
|
24
|
+
|
|
12
25
|
//# sourceMappingURL=get-module-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/get-module-source.ts"],"sourcesContent":["import { Stats } from 'webpack';\n\nexport function getModuleSource(name: string, stats: Stats) {\n const { modules } = stats.toJson({ source: true });\n\n if (modules) {\n return modules.find(m => m.name?.endsWith(name))?.source;\n }\n\n return undefined;\n}\n"],"names":["getModuleSource","name","stats","modules","toJson","source","find","m","endsWith","undefined"],"mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,IAAY,EAAEC,KAAY;IACtD,MAAM,EAAEC,OAAO,EAAE,GAAGD,MAAME,MAAM,CAAC;QAAEC,QAAQ;IAAK;IAEhD,IAAIF,SAAS;YACFA;QAAP,QAAOA,gBAAAA,QAAQG,IAAI,CAACC,CAAAA;gBAAKA;oBAAAA,UAAAA,EAAEN,IAAI,cAANM,8BAAAA,QAAQC,QAAQ,CAACP;wBAAnCE,oCAAAA,cAA2CE,MAAM;IAC5D;IAEA,OAAOI;AACX"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getWarnings", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getWarnings;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _normalizeerrors = require("./normalize-errors");
|
|
5
12
|
function getWarnings(stats) {
|
|
6
|
-
return (0,
|
|
13
|
+
return (0, _normalizeerrors.normalizeErrors)(stats.compilation.warnings);
|
|
7
14
|
}
|
|
15
|
+
|
|
8
16
|
//# sourceMappingURL=get-warnings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/utils/testing/get-warnings.ts"],"sourcesContent":["import { Stats } from 'webpack';\n\nimport { normalizeErrors } from './normalize-errors';\n\nexport function getWarnings(stats: Stats) {\n return normalizeErrors(stats.compilation.warnings);\n}\n"],"names":["getWarnings","stats","normalizeErrors","compilation","warnings"],"mappings":";;;;+BAIgBA;;;eAAAA;;;iCAFgB;AAEzB,SAASA,YAAYC,KAAY;IACpC,OAAOC,IAAAA,gCAAe,EAACD,MAAME,WAAW,CAACC,QAAQ;AACrD"}
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getUtils", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getUtils;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _compile = require("./compile");
|
|
12
|
+
const _execute = require("./execute");
|
|
13
|
+
const _getcompiler = require("./get-compiler");
|
|
14
|
+
const _geterrors = require("./get-errors");
|
|
15
|
+
const _getmodulesource = require("./get-module-source");
|
|
16
|
+
const _getwarnings = require("./get-warnings");
|
|
17
|
+
const _normalizeerrors = require("./normalize-errors");
|
|
18
|
+
const _readasset = require("./read-asset");
|
|
19
|
+
const _readassets = require("./read-assets");
|
|
13
20
|
function getUtils(cwd) {
|
|
14
21
|
return {
|
|
15
|
-
compile:
|
|
16
|
-
execute: (0,
|
|
17
|
-
getCompiler: (0,
|
|
18
|
-
getErrors:
|
|
19
|
-
getModuleSource:
|
|
20
|
-
getWarnings:
|
|
21
|
-
normalizeErrors:
|
|
22
|
-
readAsset:
|
|
23
|
-
readAssets:
|
|
22
|
+
compile: _compile.compile,
|
|
23
|
+
execute: (0, _execute.executeFactory)(cwd),
|
|
24
|
+
getCompiler: (0, _getcompiler.getCompilerFactory)(cwd),
|
|
25
|
+
getErrors: _geterrors.getErrors,
|
|
26
|
+
getModuleSource: _getmodulesource.getModuleSource,
|
|
27
|
+
getWarnings: _getwarnings.getWarnings,
|
|
28
|
+
normalizeErrors: _normalizeerrors.normalizeErrors,
|
|
29
|
+
readAsset: _readasset.readAsset,
|
|
30
|
+
readAssets: _readassets.readAssets
|
|
24
31
|
};
|
|
25
32
|
}
|
|
33
|
+
|
|
26
34
|
//# sourceMappingURL=index.js.map
|