@servicetitan/startup 30.3.0 → 31.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +5 -6
- package/dist/cli/commands/build.d.ts +10 -3
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +124 -48
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +0 -2
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +54 -36
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +6 -0
- package/dist/cli/commands/clean.d.ts.map +1 -0
- package/dist/cli/commands/clean.js +55 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/convert-eslint-config.js +163 -107
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +43 -24
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.d.ts.map +1 -1
- package/dist/cli/commands/get-command.js +50 -53
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/get-user-commands.js +21 -11
- package/dist/cli/commands/get-user-commands.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -30
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +74 -48
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +8 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +61 -23
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +48 -31
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +3 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +112 -73
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +80 -57
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +1 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +124 -70
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +83 -48
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +3 -2
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +44 -32
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts +23 -0
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts.map +1 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts +2 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.d.ts +3 -0
- package/dist/cli/commands/review/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.js +20 -0
- package/dist/cli/commands/review/index.js.map +1 -0
- package/dist/cli/commands/review/review.d.ts +28 -0
- package/dist/cli/commands/review/review.d.ts.map +1 -0
- package/dist/cli/commands/review/review.js +239 -0
- package/dist/cli/commands/review/review.js.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts +4 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts +7 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts +21 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts +3 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.d.ts +3 -0
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.js +30 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts +14 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js +89 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js +37 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.js +38 -0
- package/dist/cli/commands/review/rules/require-npmrc.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js +33 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts +45 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js +140 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts +20 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js +70 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js +40 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts +19 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js +103 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js +37 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -0
- package/dist/cli/commands/review/types.d.ts +72 -0
- package/dist/cli/commands/review/types.d.ts.map +1 -0
- package/dist/cli/commands/review/types.js +36 -0
- package/dist/cli/commands/review/types.js.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts +3 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.js +20 -0
- package/dist/cli/commands/review/utils/apply-filter.js.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts +29 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js +31 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts +9 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.js +137 -0
- package/dist/cli/commands/review/utils/compare-version.js.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.js +21 -0
- package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -0
- package/dist/cli/commands/review/utils/format-location.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-location.js +25 -0
- package/dist/cli/commands/review/utils/format-location.js.map +1 -0
- package/dist/cli/commands/review/utils/get-key.d.ts +3 -0
- package/dist/cli/commands/review/utils/get-key.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-key.js +20 -0
- package/dist/cli/commands/review/utils/get-key.js.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts +2 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.js +16 -0
- package/dist/cli/commands/review/utils/get-max-version.js.map +1 -0
- package/dist/cli/commands/review/utils/indent.d.ts +2 -0
- package/dist/cli/commands/review/utils/indent.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/indent.js +17 -0
- package/dist/cli/commands/review/utils/indent.js.map +1 -0
- package/dist/cli/commands/review/utils/index.d.ts +14 -0
- package/dist/cli/commands/review/utils/index.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/index.js +32 -0
- package/dist/cli/commands/review/utils/index.js.map +1 -0
- package/dist/cli/commands/review/utils/is-library.d.ts +3 -0
- package/dist/cli/commands/review/utils/is-library.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/is-library.js +15 -0
- package/dist/cli/commands/review/utils/is-library.js.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts +3 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.js +18 -0
- package/dist/cli/commands/review/utils/name-to-location.js.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts +2 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.js +15 -0
- package/dist/cli/commands/review/utils/pluralize.js.map +1 -0
- package/dist/cli/commands/review/utils/set-version.d.ts +10 -0
- package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/set-version.js +33 -0
- package/dist/cli/commands/review/utils/set-version.js.map +1 -0
- package/dist/cli/commands/review/utils/summarize.d.ts +11 -0
- package/dist/cli/commands/review/utils/summarize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/summarize.js +30 -0
- package/dist/cli/commands/review/utils/summarize.js.map +1 -0
- package/dist/cli/commands/run-task.js +50 -31
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/run-task.test.d.ts +2 -0
- package/dist/cli/commands/run-task.test.d.ts.map +1 -0
- package/dist/cli/commands/start.d.ts +11 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +166 -69
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.js +73 -59
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/tests.d.ts +1 -0
- package/dist/cli/commands/tests.d.ts.map +1 -1
- package/dist/cli/commands/tests.js +45 -28
- package/dist/cli/commands/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +1 -0
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +4 -1
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/index.js +43 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/cli-task.d.ts +0 -1
- package/dist/cli/tasks/cli-task.d.ts.map +1 -1
- package/dist/cli/tasks/cli-task.js +52 -41
- package/dist/cli/tasks/cli-task.js.map +1 -1
- package/dist/cli/tasks/swc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package.js +75 -34
- package/dist/cli/tasks/swc-compile-package.js.map +1 -1
- package/dist/cli/tasks/task.d.ts +0 -2
- package/dist/cli/tasks/task.d.ts.map +1 -1
- package/dist/cli/tasks/task.js +60 -65
- package/dist/cli/tasks/task.js.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.js +26 -22
- package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile.d.ts +0 -2
- package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile.js +51 -31
- package/dist/cli/tasks/tsc-compile.js.map +1 -1
- package/dist/cli/utils/bundle.d.ts +0 -2
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +118 -70
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/check-args.d.ts +6 -0
- package/dist/cli/utils/check-args.d.ts.map +1 -0
- package/dist/cli/utils/check-args.js +20 -0
- package/dist/cli/utils/check-args.js.map +1 -0
- package/dist/cli/utils/cli-git.js +23 -9
- package/dist/cli/utils/cli-git.js.map +1 -1
- package/dist/cli/utils/cli-npm.js +62 -23
- package/dist/cli/utils/cli-npm.js.map +1 -1
- package/dist/cli/utils/cli-os.js +34 -33
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/compile-less.d.ts.map +1 -1
- package/dist/cli/utils/compile-less.js +27 -11
- package/dist/cli/utils/compile-less.js.map +1 -1
- package/dist/cli/utils/compile-sass.d.ts.map +1 -1
- package/dist/cli/utils/compile-sass.js +25 -9
- package/dist/cli/utils/compile-sass.js.map +1 -1
- package/dist/cli/utils/compile.d.ts +6 -0
- package/dist/cli/utils/compile.d.ts.map +1 -0
- package/dist/cli/utils/compile.js +33 -0
- package/dist/cli/utils/compile.js.map +1 -0
- package/dist/cli/utils/copy-files.d.ts +8 -0
- package/dist/cli/utils/copy-files.d.ts.map +1 -0
- package/dist/cli/utils/copy-files.js +112 -0
- package/dist/cli/utils/copy-files.js.map +1 -0
- package/dist/cli/utils/eslint.d.ts.map +1 -1
- package/dist/cli/utils/eslint.js +22 -12
- package/dist/cli/utils/eslint.js.map +1 -1
- package/dist/cli/utils/get-module-type.d.ts.map +1 -1
- package/dist/cli/utils/get-module-type.js +21 -13
- package/dist/cli/utils/get-module-type.js.map +1 -1
- package/dist/cli/utils/index.d.ts +7 -5
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +33 -30
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-module-installed.js +11 -4
- package/dist/cli/utils/is-module-installed.js.map +1 -1
- package/dist/cli/utils/lerna-exec.d.ts +4 -3
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +40 -19
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +20 -18
- package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
- package/dist/cli/utils/pipe-stdout.d.ts +3 -0
- package/dist/cli/utils/pipe-stdout.d.ts.map +1 -0
- package/dist/cli/utils/pipe-stdout.js +19 -0
- package/dist/cli/utils/pipe-stdout.js.map +1 -0
- package/dist/cli/utils/process-tree.d.ts +14 -0
- package/dist/cli/utils/process-tree.d.ts.map +1 -0
- package/dist/cli/utils/process-tree.js +78 -0
- package/dist/cli/utils/process-tree.js.map +1 -0
- package/dist/cli/utils/publish.js +12 -6
- package/dist/cli/utils/publish.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts +2 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +39 -30
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/cli/utils/style-extensions.d.ts +2 -0
- package/dist/cli/utils/style-extensions.d.ts.map +1 -0
- package/dist/cli/utils/style-extensions.js +17 -0
- package/dist/cli/utils/style-extensions.js.map +1 -0
- package/dist/cli/utils/tcm.d.ts +5 -2
- package/dist/cli/utils/tcm.d.ts.map +1 -1
- package/dist/cli/utils/tcm.js +51 -46
- package/dist/cli/utils/tcm.js.map +1 -1
- package/dist/cli/utils/type-check.d.ts +7 -0
- package/dist/cli/utils/type-check.d.ts.map +1 -0
- package/dist/cli/utils/type-check.js +33 -0
- package/dist/cli/utils/type-check.js.map +1 -0
- package/dist/cli/utils/watch-stdout.d.ts +3 -0
- package/dist/cli/utils/watch-stdout.d.ts.map +1 -0
- package/dist/cli/utils/watch-stdout.js +26 -0
- package/dist/cli/utils/watch-stdout.js.map +1 -0
- package/dist/index.js +20 -18
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js +12 -4
- package/dist/jest/index.js.map +1 -1
- package/dist/utils/debug.js +23 -11
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/find-packages.d.ts.map +1 -1
- package/dist/utils/find-packages.js +46 -34
- package/dist/utils/find-packages.js.map +1 -1
- package/dist/utils/format-duration.d.ts +2 -0
- package/dist/utils/format-duration.d.ts.map +1 -0
- package/dist/utils/format-duration.js +24 -0
- package/dist/utils/format-duration.js.map +1 -0
- package/dist/utils/get-branch-configs.js +24 -8
- package/dist/utils/get-branch-configs.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +10 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +120 -52
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-destination-folders.js +25 -18
- package/dist/utils/get-destination-folders.js.map +1 -1
- package/dist/utils/get-folders.d.ts +2 -2
- package/dist/utils/get-folders.d.ts.map +1 -1
- package/dist/utils/get-folders.js +20 -13
- package/dist/utils/get-folders.js.map +1 -1
- package/dist/utils/get-jest-config.js +65 -38
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/get-package-data.js +26 -12
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/get-package-name.js +18 -8
- package/dist/utils/get-package-name.js.map +1 -1
- package/dist/utils/get-packages.d.ts +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +72 -57
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/get-startup-version.js +18 -8
- package/dist/utils/get-startup-version.js.map +1 -1
- package/dist/utils/get-tsconfig.js +19 -12
- package/dist/utils/get-tsconfig.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +34 -29
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/load-shared-dependencies.js +23 -17
- package/dist/utils/load-shared-dependencies.js.map +1 -1
- package/dist/utils/log-errors.d.ts +2 -0
- package/dist/utils/log-errors.d.ts.map +1 -0
- package/dist/utils/log-errors.js +36 -0
- package/dist/utils/log-errors.js.map +1 -0
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.d.ts.map +1 -1
- package/dist/utils/log.js +38 -43
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/pick.js +11 -3
- package/dist/utils/pick.js.map +1 -1
- package/dist/utils/read-json.js +27 -11
- package/dist/utils/read-json.js.map +1 -1
- package/dist/utils/to-array.js +13 -3
- package/dist/utils/to-array.js.map +1 -1
- package/dist/webpack/__mocks__/file-rules.d.ts.map +1 -1
- package/dist/webpack/configs/amd-config.js +13 -3
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/cache-config.js +20 -9
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +47 -45
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.js +16 -7
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +28 -7
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.js +17 -7
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +2 -1
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js +30 -28
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +22 -14
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/index.d.ts +1 -1
- package/dist/webpack/configs/loaders/index.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/index.js +20 -19
- package/dist/webpack/configs/loaders/index.js.map +1 -1
- package/dist/webpack/configs/loaders/less-loader.js +18 -3
- package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +23 -8
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/types.js +4 -1
- package/dist/webpack/configs/loaders/types.js.map +1 -1
- package/dist/webpack/configs/module-config.js +17 -5
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.js +54 -28
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.js +26 -12
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +23 -14
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +19 -9
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +19 -11
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +17 -7
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +13 -5
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +11 -3
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +28 -20
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +24 -13
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js +26 -16
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +15 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/index.js +18 -16
- package/dist/webpack/configs/plugins/ignore-plugin/index.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +22 -12
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js +11 -4
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +0 -2
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +29 -29
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +23 -12
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +18 -8
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +32 -22
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js +23 -15
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +27 -21
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.js +16 -4
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +43 -18
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js +13 -5
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js +13 -5
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/index.d.ts +0 -1
- package/dist/webpack/configs/rules/index.d.ts.map +1 -1
- package/dist/webpack/configs/rules/index.js +24 -23
- package/dist/webpack/configs/rules/index.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +47 -7
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js +25 -9
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js +25 -9
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js +40 -20
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +34 -19
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.js +14 -4
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +1 -3
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/configs/types.js +4 -1
- package/dist/webpack/configs/types.js.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.js +40 -22
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +20 -11
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js +18 -8
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
- package/dist/webpack/configs/utils/index.js +18 -16
- package/dist/webpack/configs/utils/index.js.map +1 -1
- package/dist/webpack/configs/watch-options-config.d.ts +6 -0
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -0
- package/dist/webpack/configs/watch-options-config.js +24 -0
- package/dist/webpack/configs/watch-options-config.js.map +1 -0
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +62 -50
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/index.d.ts +1 -1
- package/dist/webpack/index.d.ts.map +1 -1
- package/dist/webpack/index.js +18 -17
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/index.js +15 -15
- package/dist/webpack/loaders/expose-loader/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +5 -6
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +20 -13
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +22 -11
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/index.js +20 -18
- package/dist/webpack/loaders/expose-loader/utils/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +20 -12
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js.map +1 -1
- package/dist/webpack/types.d.ts +0 -4
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/types.js +4 -1
- package/dist/webpack/types.js.map +1 -1
- package/dist/webpack/utils/feature-cohort.js +17 -12
- package/dist/webpack/utils/feature-cohort.js.map +1 -1
- package/dist/webpack/utils/get-caller-filename.js +14 -7
- package/dist/webpack/utils/get-caller-filename.js.map +1 -1
- package/dist/webpack/utils/{bundle.d.ts → get-module-entry-path.d.ts} +1 -1
- package/dist/webpack/utils/get-module-entry-path.d.ts.map +1 -0
- package/dist/webpack/utils/get-module-entry-path.js +21 -0
- package/dist/webpack/utils/get-module-entry-path.js.map +1 -0
- package/dist/webpack/utils/hash-mod.js +16 -11
- package/dist/webpack/utils/hash-mod.js.map +1 -1
- package/dist/webpack/utils/index.d.ts +1 -1
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +21 -19
- package/dist/webpack/utils/index.js.map +1 -1
- package/dist/webpack/utils/split-by-entry.js +17 -7
- package/dist/webpack/utils/split-by-entry.js.map +1 -1
- package/dist/webpack/utils/testing/compile.js +12 -4
- package/dist/webpack/utils/testing/compile.js.map +1 -1
- package/dist/webpack/utils/testing/execute.js +26 -13
- package/dist/webpack/utils/testing/execute.js.map +1 -1
- package/dist/webpack/utils/testing/get-compiler.js +34 -24
- package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
- package/dist/webpack/utils/testing/get-errors.js +12 -4
- package/dist/webpack/utils/testing/get-errors.js.map +1 -1
- package/dist/webpack/utils/testing/get-module-source.js +18 -5
- package/dist/webpack/utils/testing/get-module-source.js.map +1 -1
- package/dist/webpack/utils/testing/get-warnings.js +12 -4
- package/dist/webpack/utils/testing/get-warnings.js.map +1 -1
- package/dist/webpack/utils/testing/index.js +28 -20
- package/dist/webpack/utils/testing/index.js.map +1 -1
- package/dist/webpack/utils/testing/normalize-errors.js +11 -3
- package/dist/webpack/utils/testing/normalize-errors.js.map +1 -1
- package/dist/webpack/utils/testing/read-asset.js +20 -11
- package/dist/webpack/utils/testing/read-asset.js.map +1 -1
- package/dist/webpack/utils/testing/read-assets.js +13 -5
- package/dist/webpack/utils/testing/read-assets.js.map +1 -1
- package/package.json +20 -20
- package/src/cli/commands/__tests__/build.test.ts +69 -44
- package/src/cli/commands/__tests__/clean.test.ts +32 -0
- package/src/cli/commands/__tests__/install.test.ts +50 -8
- package/src/cli/commands/__tests__/kendo-ui-license.test.ts +5 -5
- package/src/cli/commands/__tests__/lint.test.ts +4 -0
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +21 -2
- package/src/cli/commands/__tests__/mfe-publish.test.ts +19 -23
- package/src/cli/commands/__tests__/prepare-package.test.ts +17 -36
- package/src/cli/commands/__tests__/start.test.ts +81 -44
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/build.ts +73 -35
- package/src/cli/commands/bundle-package.ts +0 -4
- package/src/cli/commands/clean.ts +24 -0
- package/src/cli/commands/eslint.ts +1 -1
- package/src/cli/commands/get-command.ts +25 -35
- package/src/cli/commands/index.ts +1 -1
- package/src/cli/commands/install.ts +29 -8
- package/src/cli/commands/lint.ts +22 -17
- package/src/cli/commands/mfe-package-publish.ts +22 -5
- package/src/cli/commands/mfe-publish.ts +5 -18
- package/src/cli/commands/prepare-package.ts +8 -12
- package/src/cli/commands/review/__mocks__/expect-calls.ts +48 -0
- package/src/cli/commands/review/__mocks__/index.ts +1 -0
- package/src/cli/commands/review/__tests__/review.test.ts +483 -0
- package/src/cli/commands/review/index.ts +3 -0
- package/src/cli/commands/review/review.ts +247 -0
- package/src/cli/commands/review/rules/__mocks__/index.ts +3 -0
- package/src/cli/commands/review/rules/__mocks__/mock-config.ts +14 -0
- package/src/cli/commands/review/rules/__mocks__/mock-packages.ts +41 -0
- package/src/cli/commands/review/rules/__mocks__/mock-project.ts +11 -0
- package/src/cli/commands/review/rules/__tests__/no-typescript-entry-point.test.ts +166 -0
- package/src/cli/commands/review/rules/__tests__/require-explicit-side-effects.test.ts +113 -0
- package/src/cli/commands/review/rules/__tests__/require-npmrc.test.ts +71 -0
- package/src/cli/commands/review/rules/__tests__/require-one-anvil-uikit-contrib-version.test.ts +33 -0
- package/src/cli/commands/review/rules/__tests__/require-one-collection-version.test.ts +155 -0
- package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +135 -0
- package/src/cli/commands/review/rules/__tests__/require-one-uikit-version.ts +40 -0
- package/src/cli/commands/review/rules/__tests__/require-project-version-in-root-node-modules.test.ts +186 -0
- package/src/cli/commands/review/rules/__tests__/require-servicetitan-scope.test.ts +83 -0
- package/src/cli/commands/review/rules/index.ts +20 -0
- package/src/cli/commands/review/rules/no-typescript-entry-point.ts +78 -0
- package/src/cli/commands/review/rules/require-explicit-side-effects.ts +31 -0
- package/src/cli/commands/review/rules/require-npmrc.ts +27 -0
- package/src/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.ts +20 -0
- package/src/cli/commands/review/rules/require-one-collection-version.ts +169 -0
- package/src/cli/commands/review/rules/require-one-package-version.ts +76 -0
- package/src/cli/commands/review/rules/require-one-uikit-version.ts +27 -0
- package/src/cli/commands/review/rules/require-project-version-in-root-node-modules.ts +104 -0
- package/src/cli/commands/review/rules/require-servicetitan-scope.ts +27 -0
- package/src/cli/commands/review/types.ts +72 -0
- package/src/cli/commands/review/utils/__tests__/compare-version.test.ts +73 -0
- package/src/cli/commands/review/utils/__tests__/get-max-version.test.ts +17 -0
- package/src/cli/commands/review/utils/__tests__/indent.test.ts +41 -0
- package/src/cli/commands/review/utils/__tests__/name-to-location.test.ts +39 -0
- package/src/cli/commands/review/utils/__tests__/set-version.test.ts +84 -0
- package/src/cli/commands/review/utils/apply-filter.ts +14 -0
- package/src/cli/commands/review/utils/collate-dependencies.ts +46 -0
- package/src/cli/commands/review/utils/compare-version.ts +82 -0
- package/src/cli/commands/review/utils/format-depends-on.ts +11 -0
- package/src/cli/commands/review/utils/format-location.ts +8 -0
- package/src/cli/commands/review/utils/get-key.ts +10 -0
- package/src/cli/commands/review/utils/get-max-version.ts +5 -0
- package/src/cli/commands/review/utils/indent.ts +8 -0
- package/src/cli/commands/review/utils/index.ts +13 -0
- package/src/cli/commands/review/utils/is-library.ts +5 -0
- package/src/cli/commands/review/utils/name-to-location.ts +7 -0
- package/src/cli/commands/review/utils/pluralize.ts +3 -0
- package/src/cli/commands/review/utils/set-version.ts +26 -0
- package/src/cli/commands/review/utils/summarize.ts +21 -0
- package/src/cli/commands/run-task.test.ts +60 -0
- package/src/cli/commands/start.ts +130 -55
- package/src/cli/commands/tests.ts +2 -0
- package/src/cli/commands/types.ts +1 -0
- package/src/cli/index.ts +4 -4
- package/src/cli/tasks/__tests__/cli-task.test.ts +16 -4
- package/src/cli/tasks/__tests__/{swc-compile.test.ts → swc-compile-package.test.ts} +75 -36
- package/src/cli/tasks/__tests__/tsc-compile-package.test.ts +1 -0
- package/src/cli/tasks/__tests__/tsc-compile.test.ts +12 -23
- package/src/cli/tasks/cli-task.ts +12 -18
- package/src/cli/tasks/swc-cli.d.ts +12 -1
- package/src/cli/tasks/swc-compile-package.ts +71 -45
- package/src/cli/tasks/task.ts +2 -11
- package/src/cli/tasks/tsc-compile-package.ts +0 -4
- package/src/cli/tasks/tsc-compile.ts +14 -17
- package/src/cli/types/cpx2.d.ts +8 -1
- package/src/cli/utils/__tests__/bundle.test.ts +1 -1
- package/src/cli/utils/__tests__/check-args.test.ts +34 -0
- package/src/cli/utils/__tests__/compile.test.ts +59 -0
- package/src/cli/utils/__tests__/copy-files.test.ts +157 -0
- package/src/cli/utils/__tests__/get-module-type.test.ts +19 -0
- package/src/cli/utils/__tests__/lerna-exec.test.ts +58 -11
- package/src/cli/utils/__tests__/pipe-stdout.test.ts +39 -0
- package/src/cli/utils/__tests__/process-tree.test.ts +175 -0
- package/src/cli/utils/__tests__/set-node-options.test.ts +51 -6
- package/src/cli/utils/__tests__/tcm.test.ts +90 -86
- package/src/cli/utils/__tests__/type-check.test.ts +47 -0
- package/src/cli/utils/__tests__/watch-stdout.test.ts +68 -0
- package/src/cli/utils/bundle.ts +5 -18
- package/src/cli/utils/check-args.ts +13 -0
- package/src/cli/utils/compile-less.ts +0 -1
- package/src/cli/utils/compile-sass.ts +0 -1
- package/src/cli/utils/compile.ts +22 -0
- package/src/cli/utils/copy-files.ts +76 -0
- package/src/cli/utils/eslint.ts +1 -0
- package/src/cli/utils/get-module-type.ts +4 -6
- package/src/cli/utils/index.ts +7 -6
- package/src/cli/utils/lerna-exec.ts +17 -10
- package/src/cli/utils/pipe-stdout.ts +10 -0
- package/src/cli/utils/process-tree.ts +57 -0
- package/src/cli/utils/set-node-options.ts +15 -12
- package/src/cli/utils/style-extensions.ts +1 -0
- package/src/cli/utils/tcm.ts +22 -32
- package/src/cli/utils/type-check.ts +19 -0
- package/src/cli/utils/watch-stdout.ts +24 -0
- package/src/utils/__tests__/format-duration.test.ts +22 -0
- package/src/utils/__tests__/get-configuration.test.ts +44 -2
- package/src/utils/__tests__/get-packages.test.ts +58 -49
- package/src/utils/__tests__/log-errors.test.ts +102 -0
- package/src/utils/__tests__/log.test.ts +1 -86
- package/src/utils/find-packages.ts +12 -6
- package/src/utils/format-duration.ts +13 -0
- package/src/utils/get-configuration.ts +19 -5
- package/src/utils/get-folders.ts +3 -1
- package/src/utils/get-packages.ts +9 -16
- package/src/utils/index.ts +3 -0
- package/src/utils/log-errors.ts +29 -0
- package/src/utils/log.ts +0 -26
- package/src/webpack/__mocks__/file-rules.ts +0 -5
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +4 -5
- package/src/webpack/__tests__/create-webpack-config.test.ts +33 -112
- package/src/webpack/configs/dev-server-config.ts +4 -27
- package/src/webpack/configs/devtool-config.ts +2 -2
- package/src/webpack/configs/entry.config.ts +7 -2
- package/src/webpack/configs/index.ts +2 -1
- package/src/webpack/configs/loaders/index.ts +1 -1
- package/src/webpack/configs/optimization-config.ts +2 -2
- package/src/webpack/configs/plugins/index.ts +0 -2
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +3 -3
- package/src/webpack/configs/plugins-config.ts +0 -4
- package/src/webpack/configs/resolve-config.ts +1 -1
- package/src/webpack/configs/rules/index.ts +0 -1
- package/src/webpack/configs/rules/js-rules.ts +27 -2
- package/src/webpack/configs/rules-config.ts +1 -11
- package/src/webpack/configs/types.ts +1 -3
- package/src/webpack/configs/watch-options-config.ts +17 -0
- package/src/webpack/create-webpack-config.ts +3 -4
- package/src/webpack/index.ts +1 -1
- package/src/webpack/types.ts +0 -4
- package/src/webpack/utils/index.ts +1 -1
- package/dist/__mocks__/create-package.js +0 -17
- package/dist/__mocks__/create-package.js.map +0 -1
- package/dist/__mocks__/index.js +0 -18
- package/dist/__mocks__/index.js.map +0 -1
- package/dist/cli/utils/assets-copy.d.ts +0 -3
- package/dist/cli/utils/assets-copy.d.ts.map +0 -1
- package/dist/cli/utils/assets-copy.js +0 -25
- package/dist/cli/utils/assets-copy.js.map +0 -1
- package/dist/cli/utils/styles-copy.d.ts +0 -3
- package/dist/cli/utils/styles-copy.d.ts.map +0 -1
- package/dist/cli/utils/styles-copy.js +0 -25
- package/dist/cli/utils/styles-copy.js.map +0 -1
- package/dist/cli/utils/tsc.d.ts +0 -5
- package/dist/cli/utils/tsc.d.ts.map +0 -1
- package/dist/cli/utils/tsc.js +0 -37
- package/dist/cli/utils/tsc.js.map +0 -1
- package/dist/webpack/__mocks__/file-rules.js +0 -79
- package/dist/webpack/__mocks__/file-rules.js.map +0 -1
- package/dist/webpack/__mocks__/index.js +0 -19
- package/dist/webpack/__mocks__/index.js.map +0 -1
- package/dist/webpack/__mocks__/style-rules.js +0 -124
- package/dist/webpack/__mocks__/style-rules.js.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.js +0 -13
- package/dist/webpack/configs/plugins/provide-react-plugin.js.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.js +0 -30
- package/dist/webpack/configs/plugins/ts-checker-plugin.js.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts +0 -4
- package/dist/webpack/configs/rules/tsx-rules.d.ts.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.js +0 -44
- package/dist/webpack/configs/rules/tsx-rules.js.map +0 -1
- package/dist/webpack/utils/bundle.d.ts.map +0 -1
- package/dist/webpack/utils/bundle.js +0 -19
- package/dist/webpack/utils/bundle.js.map +0 -1
- package/src/cli/utils/__tests__/assets-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/styles-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/tsc.test.ts +0 -63
- package/src/cli/utils/assets-copy.ts +0 -23
- package/src/cli/utils/styles-copy.ts +0 -23
- package/src/cli/utils/tsc.ts +0 -38
- package/src/webpack/configs/plugins/provide-react-plugin.ts +0 -12
- package/src/webpack/configs/plugins/ts-checker-plugin.ts +0 -33
- package/src/webpack/configs/rules/tsx-rules.ts +0 -48
- /package/src/webpack/utils/{bundle.ts → get-module-entry-path.ts} +0 -0
|
@@ -1,86 +1,183 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
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 Start () {
|
|
13
|
+
return Start;
|
|
14
|
+
},
|
|
15
|
+
get StartProcesses () {
|
|
16
|
+
return StartProcesses;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _utils = require("../../utils");
|
|
20
|
+
const _utils1 = require("../utils");
|
|
21
|
+
function _define_property(obj, key, value) {
|
|
22
|
+
if (key in obj) {
|
|
23
|
+
Object.defineProperty(obj, key, {
|
|
24
|
+
value: value,
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
obj[key] = value;
|
|
31
|
+
}
|
|
32
|
+
return obj;
|
|
33
|
+
}
|
|
34
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
3
35
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
36
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for
|
|
37
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
38
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
}
|
|
8
|
-
|
|
39
|
+
}
|
|
40
|
+
function _ts_metadata(k, v) {
|
|
9
41
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
42
|
+
}
|
|
43
|
+
var StartProcesses = /*#__PURE__*/ function(StartProcesses) {
|
|
44
|
+
StartProcesses[StartProcesses["Compile"] = 0] = "Compile";
|
|
45
|
+
StartProcesses[StartProcesses["KendoUILicense"] = 1] = "KendoUILicense";
|
|
46
|
+
StartProcesses[StartProcesses["PreparePackage"] = 2] = "PreparePackage";
|
|
47
|
+
StartProcesses[StartProcesses["PreparePackageWatch"] = 3] = "PreparePackageWatch";
|
|
48
|
+
StartProcesses[StartProcesses["TypeCheck"] = 4] = "TypeCheck";
|
|
49
|
+
StartProcesses[StartProcesses["BundlePackage"] = 5] = "BundlePackage";
|
|
50
|
+
return StartProcesses;
|
|
51
|
+
}({});
|
|
15
52
|
class Start {
|
|
16
|
-
constructor(args) {
|
|
17
|
-
Object.defineProperty(this, "args", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true,
|
|
21
|
-
value: args
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
53
|
description() {
|
|
25
54
|
return 'run project in development mode';
|
|
26
55
|
}
|
|
27
56
|
async execute() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
57
|
+
(0, _utils1.checkArgs)(this.args, {
|
|
58
|
+
obsolete: [
|
|
59
|
+
'--esbuild',
|
|
60
|
+
'--experimental-bundlers'
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
const useTsc = this.args['use-tsc'];
|
|
64
|
+
const packages = (0, _utils.getPackages)({
|
|
65
|
+
scope: this.args.scope,
|
|
66
|
+
ignore: this.args.ignore,
|
|
67
|
+
type: [
|
|
68
|
+
_utils.PackageType.TSC,
|
|
69
|
+
_utils.PackageType.Webpack
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
if (packages.length === 0) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const scope = packages.map(({ name })=>name);
|
|
76
|
+
const processTree = new _utils1.ProcessTree();
|
|
77
|
+
processTree.add(0, ()=>{
|
|
78
|
+
const process = (0, _utils1.compile)({
|
|
79
|
+
packages: scope,
|
|
80
|
+
watch: true,
|
|
81
|
+
useTsc
|
|
82
|
+
});
|
|
83
|
+
(0, _utils1.pipeStdout)(process);
|
|
84
|
+
const onComplete = new Promise((resolve)=>{
|
|
85
|
+
let counter = 0;
|
|
86
|
+
let timeout;
|
|
87
|
+
if (!useTsc) {
|
|
88
|
+
/*
|
|
89
|
+
* Running the timer as a fallback
|
|
90
|
+
* In case there are no files in the package swc will not print out completion indicator
|
|
91
|
+
*/ timeout = setTimeout(()=>{
|
|
92
|
+
_utils.log.warning('Compilation timeout exceeded. Proceeding without waiting.');
|
|
93
|
+
resolve();
|
|
94
|
+
unwatch();
|
|
95
|
+
}, 30000);
|
|
96
|
+
}
|
|
97
|
+
const unwatch = (0, _utils1.watchStdout)(process, useTsc ? 'Initial tsc-compile-package task completed' : 'Initial swc-compile-package task completed', (count)=>{
|
|
98
|
+
counter += count;
|
|
99
|
+
if (counter === scope.length) {
|
|
100
|
+
resolve();
|
|
101
|
+
clearTimeout(timeout);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
return {
|
|
106
|
+
process,
|
|
107
|
+
onComplete
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
processTree.add(2, ()=>(0, _utils1.lernaExec)({
|
|
35
111
|
cmd: 'startup prepare-package',
|
|
36
|
-
|
|
112
|
+
parallel: true,
|
|
113
|
+
scope,
|
|
37
114
|
stream: true,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
: []),
|
|
55
|
-
...(packages[utils_1.PackageType.TSC].length ? [(0, utils_2.tscWatch)(packages[utils_1.PackageType.TSC])] : []),
|
|
56
|
-
...(packages[utils_1.PackageType.Webpack].length
|
|
57
|
-
? [
|
|
58
|
-
(0, utils_2.lernaExec)({
|
|
59
|
-
'cmd': 'startup bundle-package',
|
|
60
|
-
'scope': packages[utils_1.PackageType.Webpack].map(({ name }) => name),
|
|
61
|
-
'parallel': true,
|
|
62
|
-
'stream': true,
|
|
63
|
-
'--': [
|
|
64
|
-
'--color',
|
|
65
|
-
'--watch',
|
|
66
|
-
this.args.config ? `--config "${this.args.config}"` : undefined,
|
|
67
|
-
this.args['code-coverage'] ? '--code-coverage' : undefined,
|
|
68
|
-
this.args.esbuild ? '--esbuild' : undefined,
|
|
69
|
-
this.args['experimental-bundlers']
|
|
70
|
-
? '--experimental-bundlers'
|
|
71
|
-
: undefined,
|
|
72
|
-
].filter(item => !!item),
|
|
73
|
-
}),
|
|
115
|
+
...useTsc ? {
|
|
116
|
+
'--': [
|
|
117
|
+
'--copy-files'
|
|
118
|
+
]
|
|
119
|
+
} : {}
|
|
120
|
+
}));
|
|
121
|
+
processTree.add(3, ()=>(0, _utils1.lernaExec)({
|
|
122
|
+
'cmd': 'startup prepare-package',
|
|
123
|
+
scope,
|
|
124
|
+
'parallel': true,
|
|
125
|
+
'stream': true,
|
|
126
|
+
'--': [
|
|
127
|
+
'--watch',
|
|
128
|
+
...useTsc ? [
|
|
129
|
+
'--copy-files'
|
|
130
|
+
] : []
|
|
74
131
|
]
|
|
75
|
-
|
|
76
|
-
|
|
132
|
+
}), {
|
|
133
|
+
dependsOn: [
|
|
134
|
+
2
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
processTree.add(4, ()=>(0, _utils1.typeCheck)({
|
|
138
|
+
packages: scope,
|
|
139
|
+
watch: true
|
|
140
|
+
}), {
|
|
141
|
+
dependsOn: [
|
|
142
|
+
2
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
processTree.add(5, ()=>{
|
|
146
|
+
const webpackScope = packages.filter(({ type })=>type === _utils.PackageType.Webpack).map(({ name })=>name);
|
|
147
|
+
if (webpackScope.length === 0) {
|
|
148
|
+
return Promise.resolve();
|
|
149
|
+
}
|
|
150
|
+
return (0, _utils1.lernaExec)({
|
|
151
|
+
'cmd': 'startup bundle-package',
|
|
152
|
+
'scope': webpackScope,
|
|
153
|
+
'parallel': true,
|
|
154
|
+
'stream': true,
|
|
155
|
+
'--': [
|
|
156
|
+
'--watch',
|
|
157
|
+
this.args.config ? `--config "${this.args.config}"` : undefined,
|
|
158
|
+
this.args['code-coverage'] ? '--code-coverage' : undefined
|
|
159
|
+
].filter((item)=>!!item)
|
|
160
|
+
});
|
|
161
|
+
}, {
|
|
162
|
+
dependsOn: [
|
|
163
|
+
0,
|
|
164
|
+
2
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
await processTree.run();
|
|
168
|
+
}
|
|
169
|
+
constructor(args){
|
|
170
|
+
_define_property(this, "args", void 0);
|
|
171
|
+
_define_property(this, "greedy", void 0);
|
|
172
|
+
this.args = args;
|
|
173
|
+
this.greedy = true;
|
|
77
174
|
}
|
|
78
175
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
__metadata("design:returntype", Promise)
|
|
176
|
+
_ts_decorate([
|
|
177
|
+
_utils.logErrors,
|
|
178
|
+
_ts_metadata("design:type", Function),
|
|
179
|
+
_ts_metadata("design:paramtypes", []),
|
|
180
|
+
_ts_metadata("design:returntype", Promise)
|
|
85
181
|
], Start.prototype, "execute", null);
|
|
182
|
+
|
|
86
183
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/start.ts"],"sourcesContent":["import { getPackages, log, logErrors, PackageType } from '../../utils';\nimport {\n checkArgs,\n lernaExec,\n compile,\n typeCheck,\n pipeStdout,\n watchStdout,\n ProcessTree,\n} from '../utils';\nimport { Command } from './types';\n\ninterface Args {\n 'config'?: string;\n 'code-coverage'?: boolean;\n 'ignore'?: string | string[];\n 'scope'?: string | string[];\n 'use-tsc'?: boolean;\n}\n\nexport enum StartProcesses {\n Compile,\n KendoUILicense,\n PreparePackage,\n PreparePackageWatch,\n TypeCheck,\n BundlePackage,\n}\n\nexport class Start implements Command {\n readonly greedy = true;\n\n constructor(private args: Args) {}\n\n description() {\n return 'run project in development mode';\n }\n\n @logErrors\n async execute() {\n checkArgs(this.args, { obsolete: ['--esbuild', '--experimental-bundlers'] });\n\n const useTsc = this.args['use-tsc'];\n\n const packages = getPackages({\n scope: this.args.scope,\n ignore: this.args.ignore,\n type: [PackageType.TSC, PackageType.Webpack],\n });\n if (packages.length === 0) {\n return;\n }\n\n const scope = packages.map(({ name }) => name);\n\n const processTree = new ProcessTree<typeof StartProcesses>();\n\n processTree.add(StartProcesses.Compile, () => {\n const process = compile({\n packages: scope,\n watch: true,\n useTsc,\n });\n\n pipeStdout(process);\n\n const onComplete = new Promise<void>(resolve => {\n let counter = 0;\n let timeout: NodeJS.Timeout;\n\n if (!useTsc) {\n /*\n * Running the timer as a fallback\n * In case there are no files in the package swc will not print out completion indicator\n */\n timeout = setTimeout(() => {\n log.warning('Compilation timeout exceeded. Proceeding without waiting.');\n resolve();\n unwatch();\n }, 30000);\n }\n\n const unwatch = watchStdout(\n process,\n useTsc\n ? 'Initial tsc-compile-package task completed'\n : 'Initial swc-compile-package task completed',\n count => {\n counter += count;\n\n if (counter === scope.length) {\n resolve();\n clearTimeout(timeout);\n }\n }\n );\n });\n\n return { process, onComplete };\n });\n processTree.add(StartProcesses.PreparePackage, () =>\n lernaExec({\n cmd: 'startup prepare-package',\n parallel: true,\n scope,\n stream: true,\n ...(useTsc ? { '--': ['--copy-files'] } : {}),\n })\n );\n processTree.add(\n StartProcesses.PreparePackageWatch,\n () =>\n lernaExec({\n 'cmd': 'startup prepare-package',\n scope,\n 'parallel': true,\n 'stream': true,\n '--': ['--watch', ...(useTsc ? ['--copy-files'] : [])],\n }),\n { dependsOn: [StartProcesses.PreparePackage] }\n );\n processTree.add(\n StartProcesses.TypeCheck,\n () => typeCheck({ packages: scope, watch: true }),\n { dependsOn: [StartProcesses.PreparePackage] }\n );\n processTree.add(\n StartProcesses.BundlePackage,\n () => {\n const webpackScope = packages\n .filter(({ type }) => type === PackageType.Webpack)\n .map(({ name }) => name);\n if (webpackScope.length === 0) {\n return Promise.resolve();\n }\n return lernaExec({\n 'cmd': 'startup bundle-package',\n 'scope': webpackScope,\n 'parallel': true,\n 'stream': true,\n '--': [\n '--watch',\n this.args.config ? `--config \"${this.args.config}\"` : undefined,\n this.args['code-coverage'] ? '--code-coverage' : undefined,\n ].filter(item => !!item) as string[],\n });\n },\n { dependsOn: [StartProcesses.Compile, StartProcesses.PreparePackage] }\n );\n\n await processTree.run();\n }\n}\n"],"names":["Start","StartProcesses","description","execute","checkArgs","args","obsolete","useTsc","packages","getPackages","scope","ignore","type","PackageType","TSC","Webpack","length","map","name","processTree","ProcessTree","add","process","compile","watch","pipeStdout","onComplete","Promise","resolve","counter","timeout","setTimeout","log","warning","unwatch","watchStdout","count","clearTimeout","lernaExec","cmd","parallel","stream","dependsOn","typeCheck","webpackScope","filter","config","undefined","item","run","constructor","greedy"],"mappings":"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"}
|
|
@@ -1,63 +1,79 @@
|
|
|
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, "StylesCheck", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return StylesCheck;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
12
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
|
+
const _process = /*#__PURE__*/ _interop_require_default(require("process"));
|
|
14
|
+
const _utils = require("../../utils");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
11
20
|
const styleCheckError = [
|
|
12
21
|
'!!!!!!!!!!!!! STYLE CHECK ERROR !!!!!!!!!!!!!',
|
|
13
|
-
'Style check failed with following errors:'
|
|
22
|
+
'Style check failed with following errors:'
|
|
14
23
|
];
|
|
15
24
|
const designSystem = 'design-system.css';
|
|
16
|
-
var PackageType
|
|
17
|
-
(function (PackageType) {
|
|
25
|
+
var PackageType = /*#__PURE__*/ function(PackageType) {
|
|
18
26
|
PackageType["App"] = "app";
|
|
19
27
|
PackageType["WebComponent"] = "web_component";
|
|
20
|
-
|
|
28
|
+
return PackageType;
|
|
29
|
+
}(PackageType || {});
|
|
21
30
|
function readDir(startPath, filter) {
|
|
22
31
|
let out = [];
|
|
23
|
-
if (!
|
|
32
|
+
if (!_fs.default.existsSync(startPath)) {
|
|
24
33
|
return out;
|
|
25
34
|
}
|
|
26
|
-
const files =
|
|
27
|
-
for (const file of files)
|
|
28
|
-
const filename =
|
|
29
|
-
const stat =
|
|
35
|
+
const files = _fs.default.readdirSync(startPath);
|
|
36
|
+
for (const file of files){
|
|
37
|
+
const filename = _path.default.join(startPath, file);
|
|
38
|
+
const stat = _fs.default.lstatSync(filename);
|
|
30
39
|
if (stat.isDirectory()) {
|
|
31
|
-
out = [
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
out = [
|
|
41
|
+
...out,
|
|
42
|
+
...readDir(filename, filter)
|
|
43
|
+
];
|
|
44
|
+
} else if (filter.some((f)=>filename.endsWith(f))) {
|
|
34
45
|
out.push(filename);
|
|
35
46
|
}
|
|
36
47
|
}
|
|
37
48
|
return out;
|
|
38
49
|
}
|
|
39
|
-
const findStyleFiles = (basePath, sourceFolder)
|
|
40
|
-
const sourcePath =
|
|
41
|
-
const files = readDir(sourcePath, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
const findStyleFiles = (basePath, sourceFolder)=>{
|
|
51
|
+
const sourcePath = _path.default.join(basePath, sourceFolder);
|
|
52
|
+
const files = readDir(sourcePath, [
|
|
53
|
+
'.css',
|
|
54
|
+
'.less'
|
|
55
|
+
]);
|
|
56
|
+
return files.map((f)=>({
|
|
57
|
+
path: f,
|
|
58
|
+
relativePath: f.replace(sourcePath, '').substring(1)
|
|
59
|
+
}));
|
|
46
60
|
};
|
|
47
|
-
const checkStyleFiles = (files, packageType)
|
|
61
|
+
const checkStyleFiles = (files, packageType)=>{
|
|
48
62
|
const errors = [];
|
|
49
63
|
const patterns = [
|
|
50
64
|
"@import '~@servicetitan/tokens/core/tokens.css';",
|
|
51
65
|
"@import '~@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';",
|
|
52
|
-
"@import '~@servicetitan/design-system/dist/system.min.css';"
|
|
66
|
+
"@import '~@servicetitan/design-system/dist/system.min.css';"
|
|
53
67
|
];
|
|
54
|
-
for (const file of files)
|
|
55
|
-
if ([
|
|
56
|
-
|
|
68
|
+
for (const file of files){
|
|
69
|
+
if ([
|
|
70
|
+
"app",
|
|
71
|
+
"web_component"
|
|
72
|
+
].includes(packageType) && file.relativePath === designSystem) {
|
|
57
73
|
continue;
|
|
58
74
|
}
|
|
59
|
-
const content =
|
|
60
|
-
for (const pattern of patterns)
|
|
75
|
+
const content = _fs.default.readFileSync(file.path);
|
|
76
|
+
for (const pattern of patterns){
|
|
61
77
|
if (content.includes(pattern)) {
|
|
62
78
|
errors.push(`file ${file.relativePath} contains link to "${pattern}"`);
|
|
63
79
|
}
|
|
@@ -65,28 +81,28 @@ const checkStyleFiles = (files, packageType) => {
|
|
|
65
81
|
}
|
|
66
82
|
return errors.length ? errors : undefined;
|
|
67
83
|
};
|
|
68
|
-
const checkErrors = (errors)
|
|
84
|
+
const checkErrors = (errors)=>{
|
|
69
85
|
if (!errors) {
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
_utils.log.info('style check: OK');
|
|
87
|
+
} else {
|
|
88
|
+
_utils.log.error([
|
|
89
|
+
...styleCheckError,
|
|
90
|
+
...errors
|
|
91
|
+
].join('\n'));
|
|
74
92
|
throw new Error('style check error, please check logs above');
|
|
75
93
|
}
|
|
76
94
|
};
|
|
77
95
|
function checkStylesLib(_files) {
|
|
78
|
-
|
|
79
|
-
}
|
|
96
|
+
/* ToDo: add checks for libraries */ }
|
|
80
97
|
function checkStylesApp(files) {
|
|
81
|
-
const { dependencies, sharedDependencies } = (0,
|
|
82
|
-
if ((0,
|
|
83
|
-
|
|
84
|
-
utils_1.log.warning("application doesn't have design-system.css. Please check https://docs.st.dev/docs/frontend/micro-frontends#host-configuration");
|
|
98
|
+
const { dependencies, sharedDependencies } = (0, _utils.getPackageData)();
|
|
99
|
+
if ((0, _utils.loadSharedDependencies)(dependencies, sharedDependencies)['@servicetitan/design-system'] && !files.some((f)=>f.relativePath === designSystem)) {
|
|
100
|
+
_utils.log.warning("application doesn't have design-system.css. Please check https://docs.st.dev/docs/frontend/micro-frontends#host-configuration");
|
|
85
101
|
}
|
|
86
|
-
checkErrors(checkStyleFiles(files,
|
|
102
|
+
checkErrors(checkStyleFiles(files, "app"));
|
|
87
103
|
}
|
|
88
104
|
function checkStylesWebComponent(files) {
|
|
89
|
-
checkErrors(checkStyleFiles(files,
|
|
105
|
+
checkErrors(checkStyleFiles(files, "web_component"));
|
|
90
106
|
}
|
|
91
107
|
class StylesCheck {
|
|
92
108
|
description() {
|
|
@@ -94,25 +110,23 @@ class StylesCheck {
|
|
|
94
110
|
}
|
|
95
111
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
96
112
|
async execute() {
|
|
97
|
-
if ((0,
|
|
113
|
+
if ((0, _utils.isLegacy)()) {
|
|
98
114
|
return;
|
|
99
115
|
}
|
|
100
|
-
if ((0,
|
|
101
|
-
|
|
116
|
+
if ((0, _utils.isStyleCheckDisabled)()) {
|
|
117
|
+
_utils.log.info('style check is disabled');
|
|
102
118
|
return;
|
|
103
119
|
}
|
|
104
|
-
const projectFolders = (0,
|
|
105
|
-
const files = findStyleFiles(
|
|
106
|
-
if (!(0,
|
|
120
|
+
const projectFolders = (0, _utils.getFolders)();
|
|
121
|
+
const files = findStyleFiles(_process.default.cwd(), projectFolders.source);
|
|
122
|
+
if (!(0, _utils.isBundle)()) {
|
|
107
123
|
checkStylesLib(files);
|
|
108
|
-
}
|
|
109
|
-
else if ((0, utils_1.isWebComponent)()) {
|
|
124
|
+
} else if ((0, _utils.isWebComponent)()) {
|
|
110
125
|
checkStylesWebComponent(files);
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
126
|
+
} else {
|
|
113
127
|
checkStylesApp(files);
|
|
114
128
|
}
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
|
-
|
|
131
|
+
|
|
118
132
|
//# sourceMappingURL=styles-check.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/styles-check.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport process from 'process';\nimport {\n getFolders,\n getPackageData,\n isBundle,\n isLegacy,\n isStyleCheckDisabled,\n isWebComponent,\n loadSharedDependencies,\n log,\n} from '../../utils';\nimport { Command } from './index';\n\ninterface FileInfo {\n path: string;\n relativePath: string;\n}\n\nconst styleCheckError = [\n '!!!!!!!!!!!!! STYLE CHECK ERROR !!!!!!!!!!!!!',\n 'Style check failed with following errors:',\n];\nconst designSystem = 'design-system.css';\n\nenum PackageType {\n App = 'app',\n WebComponent = 'web_component',\n}\n\nfunction readDir(startPath: string, filter: string[]): string[] {\n let out: string[] = [];\n\n if (!fs.existsSync(startPath)) {\n return out;\n }\n\n const files = fs.readdirSync(startPath);\n for (const file of files) {\n const filename = path.join(startPath, file);\n const stat = fs.lstatSync(filename);\n\n if (stat.isDirectory()) {\n out = [...out, ...readDir(filename, filter)];\n } else if (filter.some(f => filename.endsWith(f))) {\n out.push(filename);\n }\n }\n\n return out;\n}\n\nconst findStyleFiles = (basePath: string, sourceFolder: string): FileInfo[] => {\n const sourcePath = path.join(basePath, sourceFolder);\n const files = readDir(sourcePath, ['.css', '.less']);\n\n return files.map(f => ({\n path: f,\n relativePath: f.replace(sourcePath, '').substring(1),\n }));\n};\n\nconst checkStyleFiles = (files: FileInfo[], packageType: PackageType): string[] | undefined => {\n const errors = [];\n const patterns = [\n \"@import '~@servicetitan/tokens/core/tokens.css';\",\n \"@import '~@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';\",\n \"@import '~@servicetitan/design-system/dist/system.min.css';\",\n ];\n\n for (const file of files) {\n if (\n [PackageType.App, PackageType.WebComponent].includes(packageType) &&\n file.relativePath === designSystem\n ) {\n continue;\n }\n\n const content = fs.readFileSync(file.path);\n\n for (const pattern of patterns) {\n if (content.includes(pattern)) {\n errors.push(`file ${file.relativePath} contains link to \"${pattern}\"`);\n }\n }\n }\n\n return errors.length ? errors : undefined;\n};\n\nconst checkErrors = (errors: string[] | undefined) => {\n if (!errors) {\n log.info('style check: OK');\n } else {\n log.error([...styleCheckError, ...errors].join('\\n'));\n throw new Error('style check error, please check logs above');\n }\n};\n\nfunction checkStylesLib(_files: FileInfo[]) {\n /* ToDo: add checks for libraries */\n}\n\nfunction checkStylesApp(files: FileInfo[]) {\n const { dependencies, sharedDependencies } = getPackageData();\n if (\n loadSharedDependencies(dependencies, sharedDependencies)['@servicetitan/design-system'] &&\n !files.some(f => f.relativePath === designSystem)\n ) {\n log.warning(\n \"application doesn't have design-system.css. Please check https://docs.st.dev/docs/frontend/micro-frontends#host-configuration\"\n );\n }\n\n checkErrors(checkStyleFiles(files, PackageType.App));\n}\n\nfunction checkStylesWebComponent(files: FileInfo[]) {\n checkErrors(checkStyleFiles(files, PackageType.WebComponent));\n}\n\nexport class StylesCheck implements Command {\n description() {\n return undefined;\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async execute() {\n if (isLegacy()) {\n return;\n }\n\n if (isStyleCheckDisabled()) {\n log.info('style check is disabled');\n\n return;\n }\n\n const projectFolders = getFolders();\n const files = findStyleFiles(process.cwd(), projectFolders.source);\n\n if (!isBundle()) {\n checkStylesLib(files);\n } else if (isWebComponent()) {\n checkStylesWebComponent(files);\n } else {\n checkStylesApp(files);\n }\n }\n}\n"],"names":["StylesCheck","styleCheckError","designSystem","PackageType","readDir","startPath","filter","out","fs","existsSync","files","readdirSync","file","filename","path","join","stat","lstatSync","isDirectory","some","f","endsWith","push","findStyleFiles","basePath","sourceFolder","sourcePath","map","relativePath","replace","substring","checkStyleFiles","packageType","errors","patterns","includes","content","readFileSync","pattern","length","undefined","checkErrors","log","info","error","Error","checkStylesLib","_files","checkStylesApp","dependencies","sharedDependencies","getPackageData","loadSharedDependencies","warning","checkStylesWebComponent","description","execute","isLegacy","isStyleCheckDisabled","projectFolders","getFolders","process","cwd","source","isBundle","isWebComponent"],"mappings":";;;;+BA0HaA;;;eAAAA;;;2DA1HE;6DACE;gEACG;uBAUb;;;;;;AAQP,MAAMC,kBAAkB;IACpB;IACA;CACH;AACD,MAAMC,eAAe;AAErB,IAAA,AAAKC,qCAAAA;;;WAAAA;EAAAA;AAKL,SAASC,QAAQC,SAAiB,EAAEC,MAAgB;IAChD,IAAIC,MAAgB,EAAE;IAEtB,IAAI,CAACC,WAAE,CAACC,UAAU,CAACJ,YAAY;QAC3B,OAAOE;IACX;IAEA,MAAMG,QAAQF,WAAE,CAACG,WAAW,CAACN;IAC7B,KAAK,MAAMO,QAAQF,MAAO;QACtB,MAAMG,WAAWC,aAAI,CAACC,IAAI,CAACV,WAAWO;QACtC,MAAMI,OAAOR,WAAE,CAACS,SAAS,CAACJ;QAE1B,IAAIG,KAAKE,WAAW,IAAI;YACpBX,MAAM;mBAAIA;mBAAQH,QAAQS,UAAUP;aAAQ;QAChD,OAAO,IAAIA,OAAOa,IAAI,CAACC,CAAAA,IAAKP,SAASQ,QAAQ,CAACD,KAAK;YAC/Cb,IAAIe,IAAI,CAACT;QACb;IACJ;IAEA,OAAON;AACX;AAEA,MAAMgB,iBAAiB,CAACC,UAAkBC;IACtC,MAAMC,aAAaZ,aAAI,CAACC,IAAI,CAACS,UAAUC;IACvC,MAAMf,QAAQN,QAAQsB,YAAY;QAAC;QAAQ;KAAQ;IAEnD,OAAOhB,MAAMiB,GAAG,CAACP,CAAAA,IAAM,CAAA;YACnBN,MAAMM;YACNQ,cAAcR,EAAES,OAAO,CAACH,YAAY,IAAII,SAAS,CAAC;QACtD,CAAA;AACJ;AAEA,MAAMC,kBAAkB,CAACrB,OAAmBsB;IACxC,MAAMC,SAAS,EAAE;IACjB,MAAMC,WAAW;QACb;QACA;QACA;KACH;IAED,KAAK,MAAMtB,QAAQF,MAAO;QACtB,IACI;;;SAA2C,CAACyB,QAAQ,CAACH,gBACrDpB,KAAKgB,YAAY,KAAK1B,cACxB;YACE;QACJ;QAEA,MAAMkC,UAAU5B,WAAE,CAAC6B,YAAY,CAACzB,KAAKE,IAAI;QAEzC,KAAK,MAAMwB,WAAWJ,SAAU;YAC5B,IAAIE,QAAQD,QAAQ,CAACG,UAAU;gBAC3BL,OAAOX,IAAI,CAAC,CAAC,KAAK,EAAEV,KAAKgB,YAAY,CAAC,mBAAmB,EAAEU,QAAQ,CAAC,CAAC;YACzE;QACJ;IACJ;IAEA,OAAOL,OAAOM,MAAM,GAAGN,SAASO;AACpC;AAEA,MAAMC,cAAc,CAACR;IACjB,IAAI,CAACA,QAAQ;QACTS,UAAG,CAACC,IAAI,CAAC;IACb,OAAO;QACHD,UAAG,CAACE,KAAK,CAAC;eAAI3C;eAAoBgC;SAAO,CAAClB,IAAI,CAAC;QAC/C,MAAM,IAAI8B,MAAM;IACpB;AACJ;AAEA,SAASC,eAAeC,MAAkB;AACtC,kCAAkC,GACtC;AAEA,SAASC,eAAetC,KAAiB;IACrC,MAAM,EAAEuC,YAAY,EAAEC,kBAAkB,EAAE,GAAGC,IAAAA,qBAAc;IAC3D,IACIC,IAAAA,6BAAsB,EAACH,cAAcC,mBAAmB,CAAC,8BAA8B,IACvF,CAACxC,MAAMS,IAAI,CAACC,CAAAA,IAAKA,EAAEQ,YAAY,KAAK1B,eACtC;QACEwC,UAAG,CAACW,OAAO,CACP;IAER;IAEAZ,YAAYV,gBAAgBrB;AAChC;AAEA,SAAS4C,wBAAwB5C,KAAiB;IAC9C+B,YAAYV,gBAAgBrB;AAChC;AAEO,MAAMV;IACTuD,cAAc;QACV,OAAOf;IACX;IAEA,4DAA4D;IAC5D,MAAMgB,UAAU;QACZ,IAAIC,IAAAA,eAAQ,KAAI;YACZ;QACJ;QAEA,IAAIC,IAAAA,2BAAoB,KAAI;YACxBhB,UAAG,CAACC,IAAI,CAAC;YAET;QACJ;QAEA,MAAMgB,iBAAiBC,IAAAA,iBAAU;QACjC,MAAMlD,QAAQa,eAAesC,gBAAO,CAACC,GAAG,IAAIH,eAAeI,MAAM;QAEjE,IAAI,CAACC,IAAAA,eAAQ,KAAI;YACblB,eAAepC;QACnB,OAAO,IAAIuD,IAAAA,qBAAc,KAAI;YACzBX,wBAAwB5C;QAC5B,OAAO;YACHsC,eAAetC;QACnB;IACJ;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;AAE5B;;GAEG;AACH,qBAAa,KAAM,YAAW,OAAO;
|
|
1
|
+
{"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC;AAE5B;;GAEG;AACH,qBAAa,KAAM,YAAW,OAAO;IAGrB,OAAO,CAAC,IAAI;IAFxB,QAAQ,CAAC,MAAM,QAAQ;gBAEH,IAAI,EAAE,MAAM,CAAC,IAAI;IAErC,WAAW;IAKL,OAAO;CAWhB"}
|
|
@@ -1,46 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Tests", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Tests;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _core = require("@jest/core");
|
|
12
|
+
const _utils = require("../../utils");
|
|
13
|
+
function _define_property(obj, key, value) {
|
|
14
|
+
if (key in obj) {
|
|
15
|
+
Object.defineProperty(obj, key, {
|
|
16
|
+
value: value,
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
obj[key] = value;
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
3
27
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
28
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for
|
|
29
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
30
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
}
|
|
8
|
-
|
|
31
|
+
}
|
|
32
|
+
function _ts_metadata(k, v) {
|
|
9
33
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Tests = void 0;
|
|
13
|
-
const core_1 = require("@jest/core");
|
|
14
|
-
const utils_1 = require("../../utils");
|
|
15
|
-
/**
|
|
16
|
-
* Named as tests to exclude it from the Jest pattern
|
|
17
|
-
*/
|
|
34
|
+
}
|
|
18
35
|
class Tests {
|
|
19
|
-
constructor(args) {
|
|
20
|
-
Object.defineProperty(this, "args", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: args
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
36
|
description() {
|
|
28
37
|
return 'run tests';
|
|
29
38
|
}
|
|
30
39
|
async execute() {
|
|
31
|
-
const jestConfig = (0,
|
|
32
|
-
const { results: { success }
|
|
40
|
+
const jestConfig = (0, _utils.getJestConfigCLI)(this.args);
|
|
41
|
+
const { results: { success } } = await (0, _core.runCLI)(jestConfig, [
|
|
42
|
+
process.cwd()
|
|
43
|
+
]);
|
|
33
44
|
if (!success) {
|
|
34
45
|
// eslint-disable-next-line require-atomic-updates
|
|
35
46
|
process.exitCode = 1;
|
|
36
47
|
}
|
|
37
48
|
}
|
|
49
|
+
constructor(args){
|
|
50
|
+
_define_property(this, "args", void 0);
|
|
51
|
+
_define_property(this, "greedy", void 0);
|
|
52
|
+
this.args = args;
|
|
53
|
+
this.greedy = true;
|
|
54
|
+
}
|
|
38
55
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
__metadata("design:returntype", Promise)
|
|
56
|
+
_ts_decorate([
|
|
57
|
+
_utils.logErrors,
|
|
58
|
+
_ts_metadata("design:type", Function),
|
|
59
|
+
_ts_metadata("design:paramtypes", []),
|
|
60
|
+
_ts_metadata("design:returntype", Promise)
|
|
45
61
|
], Tests.prototype, "execute", null);
|
|
62
|
+
|
|
46
63
|
//# sourceMappingURL=tests.js.map
|