@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
package/dist/cli/utils/cli-os.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 runCommand () {
|
|
13
|
+
return runCommand;
|
|
14
|
+
},
|
|
15
|
+
get runCommandOutput () {
|
|
16
|
+
return runCommandOutput;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _child_process = require("child_process");
|
|
20
|
+
const _utils = require("../../utils");
|
|
21
|
+
const runCommand = (command, { quiet, ...spawnOptions } = {})=>{
|
|
22
|
+
return new Promise((resolve, reject)=>{
|
|
23
|
+
const commandArray = Array.isArray(command) ? command.filter((c)=>!!c).map((c)=>c.toString()).join(' ').split(' ') : command.split(' ');
|
|
15
24
|
const fullCommand = commandArray.join(' ');
|
|
16
25
|
const commandName = commandArray.shift();
|
|
17
26
|
if (!commandName) {
|
|
@@ -19,49 +28,41 @@ const runCommand = (command, { quiet, ...spawnOptions } = {}) => {
|
|
|
19
28
|
return;
|
|
20
29
|
}
|
|
21
30
|
if (!quiet) {
|
|
22
|
-
|
|
31
|
+
_utils.log.info(`run command ${fullCommand}`);
|
|
23
32
|
}
|
|
24
|
-
const proc = (0,
|
|
33
|
+
const proc = (0, _child_process.spawn)(commandName, commandArray, {
|
|
25
34
|
shell: process.platform === 'win32',
|
|
26
|
-
...spawnOptions
|
|
35
|
+
...spawnOptions
|
|
27
36
|
});
|
|
28
37
|
proc.stdout.pipe(process.stdout);
|
|
29
38
|
proc.stderr.pipe(process.stderr);
|
|
30
|
-
proc.on('exit', function
|
|
39
|
+
proc.on('exit', function(code) {
|
|
31
40
|
if (!quiet) {
|
|
32
|
-
|
|
41
|
+
_utils.log.info(`command finished with code ${code}`, fullCommand);
|
|
33
42
|
}
|
|
34
43
|
if (code) {
|
|
35
44
|
reject(new Error(`command exited with code: ${code}`));
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
45
|
+
} else {
|
|
38
46
|
resolve();
|
|
39
47
|
}
|
|
40
48
|
});
|
|
41
49
|
});
|
|
42
50
|
};
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const commandArray = Array.isArray(command)
|
|
46
|
-
? command
|
|
47
|
-
.filter(c => !!c)
|
|
48
|
-
.map(c => c.toString())
|
|
49
|
-
.join(' ')
|
|
50
|
-
.split(' ')
|
|
51
|
-
: command.split(' ');
|
|
51
|
+
const runCommandOutput = (command, { quiet, ...execSyncOptions } = {})=>{
|
|
52
|
+
const commandArray = Array.isArray(command) ? command.filter((c)=>!!c).map((c)=>c.toString()).join(' ').split(' ') : command.split(' ');
|
|
52
53
|
const fullCommand = commandArray.join(' ');
|
|
53
54
|
const commandName = commandArray.shift();
|
|
54
55
|
if (!commandName) {
|
|
55
56
|
throw new Error();
|
|
56
57
|
}
|
|
57
58
|
if (!quiet) {
|
|
58
|
-
|
|
59
|
+
_utils.log.info(`run command ${fullCommand}`);
|
|
59
60
|
}
|
|
60
|
-
const result = (0,
|
|
61
|
+
const result = (0, _child_process.execSync)(fullCommand, execSyncOptions).toString();
|
|
61
62
|
if (!quiet) {
|
|
62
|
-
|
|
63
|
+
_utils.log.info('command finished', result);
|
|
63
64
|
}
|
|
64
65
|
return result;
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
|
|
67
68
|
//# sourceMappingURL=cli-os.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/cli-os.ts"],"sourcesContent":["import {\n execSync,\n ExecSyncOptionsWithBufferEncoding,\n spawn,\n SpawnOptionsWithoutStdio,\n} from 'child_process';\nimport { log } from '../../utils';\n\ntype RunCommandOptions = SpawnOptionsWithoutStdio & { quiet?: boolean };\n\nexport const runCommand = (\n command: string | (string | false)[],\n { quiet, ...spawnOptions }: RunCommandOptions = {}\n): Promise<void> => {\n return new Promise((resolve, reject) => {\n const commandArray: string[] = Array.isArray(command)\n ? command\n .filter(c => !!c)\n .map(c => c.toString())\n .join(' ')\n .split(' ')\n : command.split(' ');\n const fullCommand = commandArray.join(' ');\n\n const commandName = commandArray.shift();\n\n if (!commandName) {\n reject(new Error('invalid command'));\n\n return;\n }\n\n if (!quiet) {\n log.info(`run command ${fullCommand}`);\n }\n\n const proc = spawn(commandName, commandArray, {\n shell: process.platform === 'win32',\n ...spawnOptions,\n });\n\n proc.stdout.pipe(process.stdout);\n proc.stderr.pipe(process.stderr);\n\n proc.on('exit', function (code: any) {\n if (!quiet) {\n log.info(`command finished with code ${code}`, fullCommand);\n }\n\n if (code) {\n reject(new Error(`command exited with code: ${code}`));\n } else {\n resolve();\n }\n });\n });\n};\n\ntype RunCommandOutputOptions = ExecSyncOptionsWithBufferEncoding & { quiet?: boolean };\n\nexport const runCommandOutput = (\n command: string | (string | false)[],\n { quiet, ...execSyncOptions }: RunCommandOutputOptions = {}\n): string => {\n const commandArray: string[] = Array.isArray(command)\n ? command\n .filter(c => !!c)\n .map(c => c.toString())\n .join(' ')\n .split(' ')\n : command.split(' ');\n const fullCommand = commandArray.join(' ');\n\n const commandName = commandArray.shift();\n\n if (!commandName) {\n throw new Error();\n }\n\n if (!quiet) {\n log.info(`run command ${fullCommand}`);\n }\n\n const result = execSync(fullCommand, execSyncOptions).toString();\n\n if (!quiet) {\n log.info('command finished', result);\n }\n\n return result;\n};\n"],"names":["runCommand","runCommandOutput","command","quiet","spawnOptions","Promise","resolve","reject","commandArray","Array","isArray","filter","c","map","toString","join","split","fullCommand","commandName","shift","Error","log","info","proc","spawn","shell","process","platform","stdout","pipe","stderr","on","code","execSyncOptions","result","execSync"],"mappings":";;;;;;;;;;;QAUaA;eAAAA;;QAkDAC;eAAAA;;;+BAvDN;uBACa;AAIb,MAAMD,aAAa,CACtBE,SACA,EAAEC,KAAK,EAAE,GAAGC,cAAiC,GAAG,CAAC,CAAC;IAElD,OAAO,IAAIC,QAAQ,CAACC,SAASC;QACzB,MAAMC,eAAyBC,MAAMC,OAAO,CAACR,WACvCA,QACKS,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA,GACdC,GAAG,CAACD,CAAAA,IAAKA,EAAEE,QAAQ,IACnBC,IAAI,CAAC,KACLC,KAAK,CAAC,OACXd,QAAQc,KAAK,CAAC;QACpB,MAAMC,cAAcT,aAAaO,IAAI,CAAC;QAEtC,MAAMG,cAAcV,aAAaW,KAAK;QAEtC,IAAI,CAACD,aAAa;YACdX,OAAO,IAAIa,MAAM;YAEjB;QACJ;QAEA,IAAI,CAACjB,OAAO;YACRkB,UAAG,CAACC,IAAI,CAAC,CAAC,YAAY,EAAEL,aAAa;QACzC;QAEA,MAAMM,OAAOC,IAAAA,oBAAK,EAACN,aAAaV,cAAc;YAC1CiB,OAAOC,QAAQC,QAAQ,KAAK;YAC5B,GAAGvB,YAAY;QACnB;QAEAmB,KAAKK,MAAM,CAACC,IAAI,CAACH,QAAQE,MAAM;QAC/BL,KAAKO,MAAM,CAACD,IAAI,CAACH,QAAQI,MAAM;QAE/BP,KAAKQ,EAAE,CAAC,QAAQ,SAAUC,IAAS;YAC/B,IAAI,CAAC7B,OAAO;gBACRkB,UAAG,CAACC,IAAI,CAAC,CAAC,2BAA2B,EAAEU,MAAM,EAAEf;YACnD;YAEA,IAAIe,MAAM;gBACNzB,OAAO,IAAIa,MAAM,CAAC,0BAA0B,EAAEY,MAAM;YACxD,OAAO;gBACH1B;YACJ;QACJ;IACJ;AACJ;AAIO,MAAML,mBAAmB,CAC5BC,SACA,EAAEC,KAAK,EAAE,GAAG8B,iBAA0C,GAAG,CAAC,CAAC;IAE3D,MAAMzB,eAAyBC,MAAMC,OAAO,CAACR,WACvCA,QACKS,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA,GACdC,GAAG,CAACD,CAAAA,IAAKA,EAAEE,QAAQ,IACnBC,IAAI,CAAC,KACLC,KAAK,CAAC,OACXd,QAAQc,KAAK,CAAC;IACpB,MAAMC,cAAcT,aAAaO,IAAI,CAAC;IAEtC,MAAMG,cAAcV,aAAaW,KAAK;IAEtC,IAAI,CAACD,aAAa;QACd,MAAM,IAAIE;IACd;IAEA,IAAI,CAACjB,OAAO;QACRkB,UAAG,CAACC,IAAI,CAAC,CAAC,YAAY,EAAEL,aAAa;IACzC;IAEA,MAAMiB,SAASC,IAAAA,uBAAQ,EAAClB,aAAagB,iBAAiBnB,QAAQ;IAE9D,IAAI,CAACX,OAAO;QACRkB,UAAG,CAACC,IAAI,CAAC,oBAAoBY;IACjC;IAEA,OAAOA;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-less.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/compile-less.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile-less.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/compile-less.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,mBAQjD"}
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "compileLess", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return compileLess;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
12
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
|
+
const _less = /*#__PURE__*/ _interop_require_default(require("less"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
10
19
|
const lessPackageImporter = require('less-plugin-npm-import');
|
|
11
20
|
async function compileLess(filePath) {
|
|
12
|
-
const result = await
|
|
13
|
-
paths: [
|
|
21
|
+
const result = await _less.default.render(_fs.default.readFileSync(filePath, 'utf8'), {
|
|
22
|
+
paths: [
|
|
23
|
+
_path.default.dirname(filePath)
|
|
24
|
+
],
|
|
14
25
|
math: 'always',
|
|
15
|
-
plugins: [
|
|
26
|
+
plugins: [
|
|
27
|
+
new lessPackageImporter({
|
|
28
|
+
prefix: '~'
|
|
29
|
+
})
|
|
30
|
+
]
|
|
16
31
|
});
|
|
17
32
|
return result.css;
|
|
18
33
|
}
|
|
34
|
+
|
|
19
35
|
//# sourceMappingURL=compile-less.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/compile-less.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport less from 'less';\nconst lessPackageImporter = require('less-plugin-npm-import');\n\nexport async function compileLess(filePath: string) {\n const result = await less.render(fs.readFileSync(filePath, 'utf8'), {\n paths: [path.dirname(filePath)],\n math: 'always',\n plugins: [new lessPackageImporter({ prefix: '~' })],\n });\n\n return result.css;\n}\n"],"names":["compileLess","lessPackageImporter","require","filePath","result","less","render","fs","readFileSync","paths","path","dirname","math","plugins","prefix","css"],"mappings":";;;;+BAKsBA;;;eAAAA;;;2DALP;6DACE;6DACA;;;;;;AACjB,MAAMC,sBAAsBC,QAAQ;AAE7B,eAAeF,YAAYG,QAAgB;IAC9C,MAAMC,SAAS,MAAMC,aAAI,CAACC,MAAM,CAACC,WAAE,CAACC,YAAY,CAACL,UAAU,SAAS;QAChEM,OAAO;YAACC,aAAI,CAACC,OAAO,CAACR;SAAU;QAC/BS,MAAM;QACNC,SAAS;YAAC,IAAIZ,oBAAoB;gBAAEa,QAAQ;YAAI;SAAG;IACvD;IAEA,OAAOV,OAAOW,GAAG;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-sass.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/compile-sass.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile-sass.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/compile-sass.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,mBAIjD"}
|
|
@@ -1,14 +1,30 @@
|
|
|
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, "compileSass", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return compileSass;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
|
+
const _sass = /*#__PURE__*/ _interop_require_default(require("sass"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
9
18
|
async function compileSass(filePath) {
|
|
10
|
-
const loadPaths = [
|
|
11
|
-
|
|
19
|
+
const loadPaths = [
|
|
20
|
+
_path.default.dirname(filePath),
|
|
21
|
+
'../../node_modules',
|
|
22
|
+
'node_modules'
|
|
23
|
+
];
|
|
24
|
+
const result = await _sass.default.compileAsync(filePath, {
|
|
25
|
+
loadPaths
|
|
26
|
+
});
|
|
12
27
|
return result.css.toString();
|
|
13
28
|
}
|
|
29
|
+
|
|
14
30
|
//# sourceMappingURL=compile-sass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/compile-sass.ts"],"sourcesContent":["import path from 'path';\nimport sass from 'sass';\n\nexport async function compileSass(filePath: string) {\n const loadPaths = [path.dirname(filePath), '../../node_modules', 'node_modules'];\n const result = await sass.compileAsync(filePath, { loadPaths });\n return result.css.toString();\n}\n"],"names":["compileSass","filePath","loadPaths","path","dirname","result","sass","compileAsync","css","toString"],"mappings":";;;;+BAGsBA;;;eAAAA;;;6DAHL;6DACA;;;;;;AAEV,eAAeA,YAAYC,QAAgB;IAC9C,MAAMC,YAAY;QAACC,aAAI,CAACC,OAAO,CAACH;QAAW;QAAsB;KAAe;IAChF,MAAMI,SAAS,MAAMC,aAAI,CAACC,YAAY,CAACN,UAAU;QAAEC;IAAU;IAC7D,OAAOG,OAAOG,GAAG,CAACC,QAAQ;AAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/compile.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,KAAa,EACb,MAAc,GACjB,EAAE;IACC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,6CAUA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
});
|
|
11
|
+
const _utils = require("../../utils");
|
|
12
|
+
const _lernaexec = require("./lerna-exec");
|
|
13
|
+
function compile({ packages, watch = false, useTsc = false }) {
|
|
14
|
+
_utils.log.info('Compiling TypeScript files...');
|
|
15
|
+
return (0, _lernaexec.lernaExec)({
|
|
16
|
+
cmd: useTsc ? 'startup task tsc-compile-package' : 'startup task swc-compile-package',
|
|
17
|
+
parallel: true,
|
|
18
|
+
scope: packages,
|
|
19
|
+
stream: true,
|
|
20
|
+
stdio: watch ? [
|
|
21
|
+
'inherit',
|
|
22
|
+
'pipe',
|
|
23
|
+
'inherit'
|
|
24
|
+
] : 'inherit',
|
|
25
|
+
...watch ? {
|
|
26
|
+
'--': [
|
|
27
|
+
'--watch'
|
|
28
|
+
]
|
|
29
|
+
} : {}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/compile.ts"],"sourcesContent":["import { log } from '../../utils';\nimport { lernaExec } from './lerna-exec';\n\nexport function compile({\n packages,\n watch = false,\n useTsc = false,\n}: {\n packages: string[];\n watch?: boolean;\n useTsc?: boolean;\n}) {\n log.info('Compiling TypeScript files...');\n return lernaExec({\n cmd: useTsc ? 'startup task tsc-compile-package' : 'startup task swc-compile-package',\n parallel: true,\n scope: packages,\n stream: true,\n stdio: watch ? ['inherit', 'pipe', 'inherit'] : 'inherit',\n ...(watch ? { '--': ['--watch'] } : {}),\n });\n}\n"],"names":["compile","packages","watch","useTsc","log","info","lernaExec","cmd","parallel","scope","stream","stdio"],"mappings":";;;;+BAGgBA;;;eAAAA;;;uBAHI;2BACM;AAEnB,SAASA,QAAQ,EACpBC,QAAQ,EACRC,QAAQ,KAAK,EACbC,SAAS,KAAK,EAKjB;IACGC,UAAG,CAACC,IAAI,CAAC;IACT,OAAOC,IAAAA,oBAAS,EAAC;QACbC,KAAKJ,SAAS,qCAAqC;QACnDK,UAAU;QACVC,OAAOR;QACPS,QAAQ;QACRC,OAAOT,QAAQ;YAAC;YAAW;YAAQ;SAAU,GAAG;QAChD,GAAIA,QAAQ;YAAE,MAAM;gBAAC;aAAU;QAAC,IAAI,CAAC,CAAC;IAC1C;AACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const styleExtensions: string[];
|
|
2
|
+
export declare const supportedExtensions: string[];
|
|
3
|
+
interface CopyFilesOptions {
|
|
4
|
+
watch?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function copyFiles({ watch }: CopyFilesOptions): Promise<void>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=copy-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-files.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/copy-files.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,UAA0B,CAAC;AAGvD,eAAO,MAAM,mBAAmB,UAKxB,CAAC;AAIT,UAAU,gBAAgB;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,iBAiD1D"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
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 copyFiles () {
|
|
13
|
+
return copyFiles;
|
|
14
|
+
},
|
|
15
|
+
get styleExtensions () {
|
|
16
|
+
return styleExtensions;
|
|
17
|
+
},
|
|
18
|
+
get supportedExtensions () {
|
|
19
|
+
return supportedExtensions;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _cpx2 = /*#__PURE__*/ _interop_require_default(require("cpx2"));
|
|
23
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
24
|
+
const _glob = require("glob");
|
|
25
|
+
const _typedcssmodules = /*#__PURE__*/ _interop_require_default(require("typed-css-modules"));
|
|
26
|
+
const _utils = require("../../utils");
|
|
27
|
+
const _compileless = require("./compile-less");
|
|
28
|
+
const _compilesass = require("./compile-sass");
|
|
29
|
+
function _interop_require_default(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const assetExtensions = [
|
|
35
|
+
'eot',
|
|
36
|
+
'gif',
|
|
37
|
+
'jpg',
|
|
38
|
+
'otf',
|
|
39
|
+
'png',
|
|
40
|
+
'svg',
|
|
41
|
+
'ttf',
|
|
42
|
+
'woff',
|
|
43
|
+
'woff2'
|
|
44
|
+
];
|
|
45
|
+
const resourceExtensions = [
|
|
46
|
+
'json'
|
|
47
|
+
];
|
|
48
|
+
const styleExtensions = [
|
|
49
|
+
'css',
|
|
50
|
+
'less',
|
|
51
|
+
'scss'
|
|
52
|
+
];
|
|
53
|
+
const styleTypeDefinitionExtensions = styleExtensions.map((ext)=>`${ext}.d.ts`);
|
|
54
|
+
const supportedExtensions = [
|
|
55
|
+
assetExtensions,
|
|
56
|
+
resourceExtensions,
|
|
57
|
+
styleExtensions,
|
|
58
|
+
styleTypeDefinitionExtensions
|
|
59
|
+
].flat();
|
|
60
|
+
const styleModuleRegex = new RegExp(`\\.module\\.(${styleExtensions.join('|')})$`);
|
|
61
|
+
async function copyFiles({ watch }) {
|
|
62
|
+
const { source, destination } = (0, _utils.getFolders)();
|
|
63
|
+
if (!_fs.default.existsSync(source)) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const filesPattern = `${source}/**/*.{${supportedExtensions.join()}}`;
|
|
67
|
+
const creator = new _typedcssmodules.default({
|
|
68
|
+
camelCase: true,
|
|
69
|
+
namedExports: true
|
|
70
|
+
});
|
|
71
|
+
const generateDefinitions = async (file)=>{
|
|
72
|
+
try {
|
|
73
|
+
const css = await compile(file);
|
|
74
|
+
const content = await creator.create(file, css, !!watch);
|
|
75
|
+
await content.writeFile();
|
|
76
|
+
} catch (error) {
|
|
77
|
+
_utils.log.error(String(error));
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
if (!watch) {
|
|
81
|
+
const modulesPattern = `${source}/**/*.module.{${styleExtensions.join()}}`;
|
|
82
|
+
_utils.log.info(`Generating types for ${modulesPattern}`);
|
|
83
|
+
const modules = await (0, _glob.glob)(modulesPattern);
|
|
84
|
+
await Promise.all(modules.map(generateDefinitions));
|
|
85
|
+
_utils.log.info(`Copying ${filesPattern} -> ${destination}`);
|
|
86
|
+
_cpx2.default.copySync(filesPattern, destination);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
_utils.log.info(`Watching ${filesPattern} -> ${destination}`);
|
|
90
|
+
_cpx2.default.watch(filesPattern, destination, {
|
|
91
|
+
initialCopy: false,
|
|
92
|
+
// Optimization so cpx2 doesn't waste resources watching irrelevant files
|
|
93
|
+
ignore: [
|
|
94
|
+
'__tests__',
|
|
95
|
+
'__mocks__',
|
|
96
|
+
'*.*',
|
|
97
|
+
...supportedExtensions.map((ext)=>`!*.${ext}`)
|
|
98
|
+
]
|
|
99
|
+
}).on('copy', async ({ srcPath, dstPath })=>{
|
|
100
|
+
_utils.log.info(`Copied ${srcPath} -> ${dstPath}`);
|
|
101
|
+
if (styleModuleRegex.test(srcPath)) {
|
|
102
|
+
_utils.log.info(`Generating types for ${srcPath}`);
|
|
103
|
+
await generateDefinitions(srcPath);
|
|
104
|
+
}
|
|
105
|
+
}).on('watch-error', (error)=>_utils.log.error(String(error)));
|
|
106
|
+
/* istanbul ignore next: not executed in test environment */ if (process.env.NODE_ENV !== 'test') {
|
|
107
|
+
await new Promise(()=>{});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async function compile(filePath) {
|
|
111
|
+
if (filePath.endsWith('.less')) {
|
|
112
|
+
return (0, _compileless.compileLess)(filePath);
|
|
113
|
+
}
|
|
114
|
+
if (filePath.endsWith('.scss')) {
|
|
115
|
+
return (0, _compilesass.compileSass)(filePath);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=copy-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/copy-files.ts"],"sourcesContent":["import cpx from 'cpx2';\nimport fs from 'fs';\nimport { glob } from 'glob';\nimport DtsCreator from 'typed-css-modules';\n\nimport { getFolders, log } from '../../utils';\nimport { compileLess } from './compile-less';\nimport { compileSass } from './compile-sass';\n\nconst assetExtensions = ['eot', 'gif', 'jpg', 'otf', 'png', 'svg', 'ttf', 'woff', 'woff2'];\nconst resourceExtensions = ['json'];\nexport const styleExtensions = ['css', 'less', 'scss'];\nconst styleTypeDefinitionExtensions = styleExtensions.map(ext => `${ext}.d.ts`);\n\nexport const supportedExtensions = [\n assetExtensions,\n resourceExtensions,\n styleExtensions,\n styleTypeDefinitionExtensions,\n].flat();\n\nconst styleModuleRegex = new RegExp(`\\\\.module\\\\.(${styleExtensions.join('|')})$`);\n\ninterface CopyFilesOptions {\n watch?: boolean;\n}\n\nexport async function copyFiles({ watch }: CopyFilesOptions) {\n const { source, destination } = getFolders();\n if (!fs.existsSync(source)) {\n return;\n }\n\n const filesPattern = `${source}/**/*.{${supportedExtensions.join()}}`;\n const creator = new DtsCreator({ camelCase: true, namedExports: true });\n const generateDefinitions = async (file: string) => {\n try {\n const css = await compile(file);\n const content = await creator.create(file, css, !!watch);\n await content.writeFile();\n } catch (error) {\n log.error(String(error));\n }\n };\n\n if (!watch) {\n const modulesPattern = `${source}/**/*.module.{${styleExtensions.join()}}`;\n log.info(`Generating types for ${modulesPattern}`);\n const modules = await glob(modulesPattern);\n await Promise.all(modules.map(generateDefinitions));\n\n log.info(`Copying ${filesPattern} -> ${destination}`);\n cpx.copySync(filesPattern, destination);\n\n return;\n }\n\n log.info(`Watching ${filesPattern} -> ${destination}`);\n cpx.watch(filesPattern, destination, {\n initialCopy: false,\n // Optimization so cpx2 doesn't waste resources watching irrelevant files\n ignore: ['__tests__', '__mocks__', '*.*', ...supportedExtensions.map(ext => `!*.${ext}`)],\n })\n .on('copy', async ({ srcPath, dstPath }: { srcPath: string; dstPath: string }) => {\n log.info(`Copied ${srcPath} -> ${dstPath}`);\n if (styleModuleRegex.test(srcPath)) {\n log.info(`Generating types for ${srcPath}`);\n await generateDefinitions(srcPath);\n }\n })\n .on('watch-error', (error: unknown) => log.error(String(error)));\n\n /* istanbul ignore next: not executed in test environment */\n if (process.env.NODE_ENV !== 'test') {\n await new Promise<void>(() => {});\n }\n}\n\nasync function compile(filePath: string) {\n if (filePath.endsWith('.less')) {\n return compileLess(filePath);\n }\n if (filePath.endsWith('.scss')) {\n return compileSass(filePath);\n }\n}\n"],"names":["copyFiles","styleExtensions","supportedExtensions","assetExtensions","resourceExtensions","styleTypeDefinitionExtensions","map","ext","flat","styleModuleRegex","RegExp","join","watch","source","destination","getFolders","fs","existsSync","filesPattern","creator","DtsCreator","camelCase","namedExports","generateDefinitions","file","css","compile","content","create","writeFile","error","log","String","modulesPattern","info","modules","glob","Promise","all","cpx","copySync","initialCopy","ignore","on","srcPath","dstPath","test","process","env","NODE_ENV","filePath","endsWith","compileLess","compileSass"],"mappings":";;;;;;;;;;;QA2BsBA;eAAAA;;QAhBTC;eAAAA;;QAGAC;eAAAA;;;6DAdG;2DACD;sBACM;wEACE;uBAES;6BACJ;6BACA;;;;;;AAE5B,MAAMC,kBAAkB;IAAC;IAAO;IAAO;IAAO;IAAO;IAAO;IAAO;IAAO;IAAQ;CAAQ;AAC1F,MAAMC,qBAAqB;IAAC;CAAO;AAC5B,MAAMH,kBAAkB;IAAC;IAAO;IAAQ;CAAO;AACtD,MAAMI,gCAAgCJ,gBAAgBK,GAAG,CAACC,CAAAA,MAAO,GAAGA,IAAI,KAAK,CAAC;AAEvE,MAAML,sBAAsB;IAC/BC;IACAC;IACAH;IACAI;CACH,CAACG,IAAI;AAEN,MAAMC,mBAAmB,IAAIC,OAAO,CAAC,aAAa,EAAET,gBAAgBU,IAAI,CAAC,KAAK,EAAE,CAAC;AAM1E,eAAeX,UAAU,EAAEY,KAAK,EAAoB;IACvD,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAE,GAAGC,IAAAA,iBAAU;IAC1C,IAAI,CAACC,WAAE,CAACC,UAAU,CAACJ,SAAS;QACxB;IACJ;IAEA,MAAMK,eAAe,GAAGL,OAAO,OAAO,EAAEX,oBAAoBS,IAAI,GAAG,CAAC,CAAC;IACrE,MAAMQ,UAAU,IAAIC,wBAAU,CAAC;QAAEC,WAAW;QAAMC,cAAc;IAAK;IACrE,MAAMC,sBAAsB,OAAOC;QAC/B,IAAI;YACA,MAAMC,MAAM,MAAMC,QAAQF;YAC1B,MAAMG,UAAU,MAAMR,QAAQS,MAAM,CAACJ,MAAMC,KAAK,CAAC,CAACb;YAClD,MAAMe,QAAQE,SAAS;QAC3B,EAAE,OAAOC,OAAO;YACZC,UAAG,CAACD,KAAK,CAACE,OAAOF;QACrB;IACJ;IAEA,IAAI,CAAClB,OAAO;QACR,MAAMqB,iBAAiB,GAAGpB,OAAO,cAAc,EAAEZ,gBAAgBU,IAAI,GAAG,CAAC,CAAC;QAC1EoB,UAAG,CAACG,IAAI,CAAC,CAAC,qBAAqB,EAAED,gBAAgB;QACjD,MAAME,UAAU,MAAMC,IAAAA,UAAI,EAACH;QAC3B,MAAMI,QAAQC,GAAG,CAACH,QAAQ7B,GAAG,CAACiB;QAE9BQ,UAAG,CAACG,IAAI,CAAC,CAAC,QAAQ,EAAEhB,aAAa,IAAI,EAAEJ,aAAa;QACpDyB,aAAG,CAACC,QAAQ,CAACtB,cAAcJ;QAE3B;IACJ;IAEAiB,UAAG,CAACG,IAAI,CAAC,CAAC,SAAS,EAAEhB,aAAa,IAAI,EAAEJ,aAAa;IACrDyB,aAAG,CAAC3B,KAAK,CAACM,cAAcJ,aAAa;QACjC2B,aAAa;QACb,yEAAyE;QACzEC,QAAQ;YAAC;YAAa;YAAa;eAAUxC,oBAAoBI,GAAG,CAACC,CAAAA,MAAO,CAAC,GAAG,EAAEA,KAAK;SAAE;IAC7F,GACKoC,EAAE,CAAC,QAAQ,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAwC;QACzEd,UAAG,CAACG,IAAI,CAAC,CAAC,OAAO,EAAEU,QAAQ,IAAI,EAAEC,SAAS;QAC1C,IAAIpC,iBAAiBqC,IAAI,CAACF,UAAU;YAChCb,UAAG,CAACG,IAAI,CAAC,CAAC,qBAAqB,EAAEU,SAAS;YAC1C,MAAMrB,oBAAoBqB;QAC9B;IACJ,GACCD,EAAE,CAAC,eAAe,CAACb,QAAmBC,UAAG,CAACD,KAAK,CAACE,OAAOF;IAE5D,0DAA0D,GAC1D,IAAIiB,QAAQC,GAAG,CAACC,QAAQ,KAAK,QAAQ;QACjC,MAAM,IAAIZ,QAAc,KAAO;IACnC;AACJ;AAEA,eAAeX,QAAQwB,QAAgB;IACnC,IAAIA,SAASC,QAAQ,CAAC,UAAU;QAC5B,OAAOC,IAAAA,wBAAW,EAACF;IACvB;IACA,IAAIA,SAASC,QAAQ,CAAC,UAAU;QAC5B,OAAOE,IAAAA,wBAAW,EAACH;IACvB;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/eslint.ts"],"names":[],"mappings":"AAIA,UAAU,IAAI;IACV,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAsB,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/eslint.ts"],"names":[],"mappings":"AAIA,UAAU,IAAI;IACV,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAsB,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,IAAI,iBA4ChD"}
|
package/dist/cli/utils/eslint.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "eslint", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return eslint;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _eslint = require("eslint");
|
|
12
|
+
const _utils = require("../../utils");
|
|
6
13
|
async function eslint({ fix, paths }) {
|
|
7
|
-
const { disabled, ...config } = (0,
|
|
14
|
+
const { disabled, ...config } = (0, _utils.getESLintConfiguration)();
|
|
8
15
|
if (disabled) {
|
|
9
16
|
return;
|
|
10
17
|
}
|
|
@@ -17,25 +24,28 @@ async function eslint({ fix, paths }) {
|
|
|
17
24
|
'**/*.css.d.ts',
|
|
18
25
|
'**/*.scss.d.ts',
|
|
19
26
|
'**/*.less.d.ts',
|
|
20
|
-
...(0,
|
|
27
|
+
...(0, _utils.getDestinationFolders)()
|
|
21
28
|
],
|
|
22
29
|
fix,
|
|
23
|
-
...config
|
|
30
|
+
...config
|
|
24
31
|
};
|
|
25
|
-
|
|
26
|
-
const eslint = new
|
|
32
|
+
/* istanbul ignore next: debug only */ _utils.log.debug('eslint-options', ()=>JSON.stringify(options, null, 2));
|
|
33
|
+
const eslint = new _eslint.ESLint(options);
|
|
27
34
|
let files = paths;
|
|
28
35
|
if (files.length === 0) {
|
|
29
|
-
files = [
|
|
36
|
+
files = [
|
|
37
|
+
process.cwd()
|
|
38
|
+
];
|
|
30
39
|
}
|
|
31
40
|
const results = await eslint.lintFiles(files);
|
|
32
41
|
if (fix) {
|
|
33
|
-
await
|
|
42
|
+
await _eslint.ESLint.outputFixes(results);
|
|
34
43
|
}
|
|
35
44
|
const formatter = await eslint.loadFormatter('stylish');
|
|
36
45
|
process.stdout.write(formatter.format(results));
|
|
37
|
-
if (
|
|
46
|
+
if (_eslint.ESLint.getErrorResults(results).length) {
|
|
38
47
|
process.exitCode = 1;
|
|
39
48
|
}
|
|
40
49
|
}
|
|
50
|
+
|
|
41
51
|
//# sourceMappingURL=eslint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/eslint.ts"],"sourcesContent":["import { ESLint } from 'eslint';\n\nimport { getDestinationFolders, getESLintConfiguration, log } from '../../utils';\n\ninterface Args {\n fix?: boolean;\n paths: string[];\n}\n\nexport async function eslint({ fix, paths }: Args) {\n const { disabled, ...config } = getESLintConfiguration();\n\n if (disabled) {\n return;\n }\n\n const options: ESLint.Options = {\n errorOnUnmatchedPattern: false,\n ignorePatterns: [\n // **/node_modules/ is excluded by default\n '.vscode/',\n '**/.yalc/',\n '**/*.css.d.ts',\n '**/*.scss.d.ts',\n '**/*.less.d.ts',\n ...getDestinationFolders(),\n ],\n fix,\n ...config,\n };\n\n /* istanbul ignore next: debug only */\n log.debug('eslint-options', () => JSON.stringify(options, null, 2));\n\n const eslint = new ESLint(options);\n\n let files = paths;\n if (files.length === 0) {\n files = [process.cwd()];\n }\n\n const results = await eslint.lintFiles(files);\n\n if (fix) {\n await ESLint.outputFixes(results);\n }\n\n const formatter = await eslint.loadFormatter('stylish');\n process.stdout.write(formatter.format(results) as string);\n\n if (ESLint.getErrorResults(results).length) {\n process.exitCode = 1;\n }\n}\n"],"names":["eslint","fix","paths","disabled","config","getESLintConfiguration","options","errorOnUnmatchedPattern","ignorePatterns","getDestinationFolders","log","debug","JSON","stringify","ESLint","files","length","process","cwd","results","lintFiles","outputFixes","formatter","loadFormatter","stdout","write","format","getErrorResults","exitCode"],"mappings":";;;;+BASsBA;;;eAAAA;;;wBATC;uBAE4C;AAO5D,eAAeA,OAAO,EAAEC,GAAG,EAAEC,KAAK,EAAQ;IAC7C,MAAM,EAAEC,QAAQ,EAAE,GAAGC,QAAQ,GAAGC,IAAAA,6BAAsB;IAEtD,IAAIF,UAAU;QACV;IACJ;IAEA,MAAMG,UAA0B;QAC5BC,yBAAyB;QACzBC,gBAAgB;YACZ,0CAA0C;YAC1C;YACA;YACA;YACA;YACA;eACGC,IAAAA,4BAAqB;SAC3B;QACDR;QACA,GAAGG,MAAM;IACb;IAEA,oCAAoC,GACpCM,UAAG,CAACC,KAAK,CAAC,kBAAkB,IAAMC,KAAKC,SAAS,CAACP,SAAS,MAAM;IAEhE,MAAMN,SAAS,IAAIc,cAAM,CAACR;IAE1B,IAAIS,QAAQb;IACZ,IAAIa,MAAMC,MAAM,KAAK,GAAG;QACpBD,QAAQ;YAACE,QAAQC,GAAG;SAAG;IAC3B;IAEA,MAAMC,UAAU,MAAMnB,OAAOoB,SAAS,CAACL;IAEvC,IAAId,KAAK;QACL,MAAMa,cAAM,CAACO,WAAW,CAACF;IAC7B;IAEA,MAAMG,YAAY,MAAMtB,OAAOuB,aAAa,CAAC;IAC7CN,QAAQO,MAAM,CAACC,KAAK,CAACH,UAAUI,MAAM,CAACP;IAEtC,IAAIL,cAAM,CAACa,eAAe,CAACR,SAASH,MAAM,EAAE;QACxCC,QAAQW,QAAQ,GAAG;IACvB;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-module-type.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/get-module-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-module-type.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/get-module-type.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function getModuleType(configPath) {
|
|
10
|
-
var _a;
|
|
11
|
-
const config = (0, utils_1.readJson)(configPath);
|
|
12
|
-
if ((_a = config.compilerOptions) === null || _a === void 0 ? void 0 : _a.module) {
|
|
13
|
-
return config.compilerOptions.module.toLowerCase();
|
|
14
|
-
}
|
|
15
|
-
if (config.extends) {
|
|
16
|
-
return getModuleType(require.resolve(config.extends.startsWith('./') || config.extends.startsWith('../')
|
|
17
|
-
? path_1.default.join(path_1.default.dirname(configPath), config.extends)
|
|
18
|
-
: config.extends));
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getModuleType", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getModuleType;
|
|
19
9
|
}
|
|
20
|
-
|
|
10
|
+
});
|
|
11
|
+
const _tsconfig = require("./ts-config");
|
|
12
|
+
function getModuleType(configPath) {
|
|
13
|
+
return new _tsconfig.TSConfig(configPath).getValue('compilerOptions.module', 'commonjs');
|
|
21
14
|
}
|
|
15
|
+
|
|
22
16
|
//# sourceMappingURL=get-module-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/get-module-type.ts"],"sourcesContent":["import { TSConfig } from './ts-config';\n\nexport function getModuleType(configPath: string): string {\n return new TSConfig(configPath).getValue('compilerOptions.module', 'commonjs');\n}\n"],"names":["getModuleType","configPath","TSConfig","getValue"],"mappings":";;;;+BAEgBA;;;eAAAA;;;0BAFS;AAElB,SAASA,cAAcC,UAAkB;IAC5C,OAAO,IAAIC,kBAAQ,CAACD,YAAYE,QAAQ,CAAC,0BAA0B;AACvE"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export declare const assetExtensions: string[];
|
|
2
|
-
export declare const styleExtensions: string[];
|
|
3
|
-
export * from './assets-copy';
|
|
4
1
|
export * from './bundle';
|
|
2
|
+
export * from './check-args';
|
|
3
|
+
export * from './compile';
|
|
5
4
|
export * from './compile-less';
|
|
6
5
|
export * from './compile-sass';
|
|
6
|
+
export * from './copy-files';
|
|
7
7
|
export * from './eslint';
|
|
8
8
|
export * from './get-module-type';
|
|
9
9
|
export * from './is-module-installed';
|
|
10
10
|
export * from './lerna-exec';
|
|
11
|
+
export * from './pipe-stdout';
|
|
12
|
+
export * from './process-tree';
|
|
11
13
|
export * from './set-node-options';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './ts-config';
|
|
15
|
+
export * from './type-check';
|
|
16
|
+
export * from './watch-stdout';
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|