@servicetitan/startup 35.2.0-far-1776.0 → 35.2.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/dist/cli/commands/build.d.ts +2 -70
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +0 -49
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +2 -54
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +0 -40
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +2 -3
- package/dist/cli/commands/clean.d.ts.map +1 -1
- package/dist/cli/commands/clean.js +0 -15
- package/dist/cli/commands/clean.js.map +1 -1
- package/dist/cli/commands/convert-eslint-config.d.ts +2 -3
- package/dist/cli/commands/convert-eslint-config.d.ts.map +1 -1
- package/dist/cli/commands/convert-eslint-config.js +0 -2
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts +2 -34
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +0 -30
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -16
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +0 -22
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +2 -36
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +0 -32
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.d.ts +2 -3
- package/dist/cli/commands/kendo-ui-license.d.ts.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +0 -15
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +2 -70
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +0 -49
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-check.d.ts +2 -44
- package/dist/cli/commands/mfe-check.d.ts.map +1 -1
- package/dist/cli/commands/mfe-check.js +0 -36
- package/dist/cli/commands/mfe-check.js.map +1 -1
- package/dist/cli/commands/mfe-generate-metadata.d.ts +2 -16
- package/dist/cli/commands/mfe-generate-metadata.d.ts.map +1 -1
- package/dist/cli/commands/mfe-generate-metadata.js +4 -28
- package/dist/cli/commands/mfe-generate-metadata.js.map +1 -1
- package/dist/cli/commands/mfe-list.d.ts +2 -70
- package/dist/cli/commands/mfe-list.d.ts.map +1 -1
- package/dist/cli/commands/mfe-list.js +0 -49
- package/dist/cli/commands/mfe-list.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.d.ts +2 -53
- package/dist/cli/commands/mfe-package-clean.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +3 -51
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +2 -91
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +3 -70
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-package-rollback.d.ts +2 -43
- package/dist/cli/commands/mfe-package-rollback.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-rollback.js +3 -46
- package/dist/cli/commands/mfe-package-rollback.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts +9 -47
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +0 -69
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/mfe-purge-cache.d.ts +2 -46
- package/dist/cli/commands/mfe-purge-cache.d.ts.map +1 -1
- package/dist/cli/commands/mfe-purge-cache.js +0 -36
- package/dist/cli/commands/mfe-purge-cache.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +2 -14
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +0 -20
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/registry/build.d.ts +38 -0
- package/dist/cli/commands/registry/build.d.ts.map +1 -0
- package/dist/cli/commands/registry/build.js +50 -0
- package/dist/cli/commands/registry/build.js.map +1 -0
- package/dist/cli/commands/registry/bundle-package.d.ts +29 -0
- package/dist/cli/commands/registry/bundle-package.d.ts.map +1 -0
- package/dist/cli/commands/registry/bundle-package.js +41 -0
- package/dist/cli/commands/registry/bundle-package.js.map +1 -0
- package/dist/cli/commands/registry/clean.d.ts +5 -0
- package/dist/cli/commands/registry/clean.d.ts.map +1 -0
- package/dist/cli/commands/registry/clean.js +17 -0
- package/dist/cli/commands/registry/clean.js.map +1 -0
- package/dist/cli/commands/registry/command-registry.d.ts +509 -0
- package/dist/cli/commands/registry/command-registry.d.ts.map +1 -0
- package/dist/cli/commands/registry/command-registry.js +138 -0
- package/dist/cli/commands/registry/command-registry.js.map +1 -0
- package/dist/cli/commands/registry/convert-eslint-config.d.ts +5 -0
- package/dist/cli/commands/registry/convert-eslint-config.d.ts.map +1 -0
- package/dist/cli/commands/registry/convert-eslint-config.js +17 -0
- package/dist/cli/commands/registry/convert-eslint-config.js.map +1 -0
- package/dist/cli/commands/registry/define-entry.d.ts +7 -0
- package/dist/cli/commands/registry/define-entry.d.ts.map +1 -0
- package/dist/cli/commands/registry/define-entry.js +15 -0
- package/dist/cli/commands/registry/define-entry.js.map +1 -0
- package/dist/cli/commands/registry/eslint.d.ts +19 -0
- package/dist/cli/commands/registry/eslint.d.ts.map +1 -0
- package/dist/cli/commands/registry/eslint.js +31 -0
- package/dist/cli/commands/registry/eslint.js.map +1 -0
- package/dist/cli/commands/registry/index.d.ts +3 -0
- package/dist/cli/commands/registry/index.d.ts.map +1 -0
- package/dist/cli/commands/registry/index.js +13 -0
- package/dist/cli/commands/registry/index.js.map +1 -0
- package/dist/cli/commands/registry/init.d.ts +11 -0
- package/dist/cli/commands/registry/init.d.ts.map +1 -0
- package/dist/cli/commands/registry/init.js +23 -0
- package/dist/cli/commands/registry/init.js.map +1 -0
- package/dist/cli/commands/registry/install.d.ts +21 -0
- package/dist/cli/commands/registry/install.d.ts.map +1 -0
- package/dist/cli/commands/registry/install.js +33 -0
- package/dist/cli/commands/registry/install.js.map +1 -0
- package/dist/cli/commands/registry/kendo-ui-license.d.ts +5 -0
- package/dist/cli/commands/registry/kendo-ui-license.d.ts.map +1 -0
- package/dist/cli/commands/registry/kendo-ui-license.js +17 -0
- package/dist/cli/commands/registry/kendo-ui-license.js.map +1 -0
- package/dist/cli/commands/registry/lint.d.ts +38 -0
- package/dist/cli/commands/registry/lint.d.ts.map +1 -0
- package/dist/cli/commands/registry/lint.js +50 -0
- package/dist/cli/commands/registry/lint.js.map +1 -0
- package/dist/cli/commands/registry/mfe-check.d.ts +25 -0
- package/dist/cli/commands/registry/mfe-check.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-check.js +37 -0
- package/dist/cli/commands/registry/mfe-check.js.map +1 -0
- package/dist/cli/commands/registry/mfe-generate-metadata.d.ts +11 -0
- package/dist/cli/commands/registry/mfe-generate-metadata.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-generate-metadata.js +23 -0
- package/dist/cli/commands/registry/mfe-generate-metadata.js.map +1 -0
- package/dist/cli/commands/registry/mfe-list.d.ts +38 -0
- package/dist/cli/commands/registry/mfe-list.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-list.js +50 -0
- package/dist/cli/commands/registry/mfe-list.js.map +1 -0
- package/dist/cli/commands/registry/mfe-package-clean.d.ts +29 -0
- package/dist/cli/commands/registry/mfe-package-clean.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-package-clean.js +41 -0
- package/dist/cli/commands/registry/mfe-package-clean.js.map +1 -0
- package/dist/cli/commands/registry/mfe-package-publish.d.ts +48 -0
- package/dist/cli/commands/registry/mfe-package-publish.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-package-publish.js +60 -0
- package/dist/cli/commands/registry/mfe-package-publish.js.map +1 -0
- package/dist/cli/commands/registry/mfe-package-rollback.d.ts +24 -0
- package/dist/cli/commands/registry/mfe-package-rollback.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-package-rollback.js +36 -0
- package/dist/cli/commands/registry/mfe-package-rollback.js.map +1 -0
- package/dist/cli/commands/registry/mfe-publish.d.ts +24 -0
- package/dist/cli/commands/registry/mfe-publish.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-publish.js +72 -0
- package/dist/cli/commands/registry/mfe-publish.js.map +1 -0
- package/dist/cli/commands/registry/mfe-purge-cache.d.ts +25 -0
- package/dist/cli/commands/registry/mfe-purge-cache.d.ts.map +1 -0
- package/dist/cli/commands/registry/mfe-purge-cache.js +37 -0
- package/dist/cli/commands/registry/mfe-purge-cache.js.map +1 -0
- package/dist/cli/commands/registry/prepare-package.d.ts +9 -0
- package/dist/cli/commands/registry/prepare-package.d.ts.map +1 -0
- package/dist/cli/commands/registry/prepare-package.js +21 -0
- package/dist/cli/commands/registry/prepare-package.js.map +1 -0
- package/dist/cli/commands/registry/review.d.ts +16 -0
- package/dist/cli/commands/registry/review.d.ts.map +1 -0
- package/dist/cli/commands/registry/review.js +28 -0
- package/dist/cli/commands/registry/review.js.map +1 -0
- package/dist/cli/commands/registry/start.d.ts +30 -0
- package/dist/cli/commands/registry/start.d.ts.map +1 -0
- package/dist/cli/commands/registry/start.js +42 -0
- package/dist/cli/commands/registry/start.js.map +1 -0
- package/dist/cli/commands/registry/stylelint.d.ts +19 -0
- package/dist/cli/commands/registry/stylelint.d.ts.map +1 -0
- package/dist/cli/commands/registry/stylelint.js +31 -0
- package/dist/cli/commands/registry/stylelint.js.map +1 -0
- package/dist/cli/commands/registry/styles-check.d.ts +2 -0
- package/dist/cli/commands/registry/styles-check.d.ts.map +1 -0
- package/dist/cli/commands/registry/styles-check.js +14 -0
- package/dist/cli/commands/registry/styles-check.js.map +1 -0
- package/dist/cli/commands/registry/task.d.ts +19 -0
- package/dist/cli/commands/registry/task.d.ts.map +1 -0
- package/dist/cli/commands/registry/task.js +31 -0
- package/dist/cli/commands/registry/task.js.map +1 -0
- package/dist/cli/commands/registry/test-command.d.ts +22 -0
- package/dist/cli/commands/registry/test-command.d.ts.map +1 -0
- package/dist/cli/commands/registry/test-command.js +38 -0
- package/dist/cli/commands/registry/test-command.js.map +1 -0
- package/dist/cli/commands/registry/upload-sourcemaps.d.ts +15 -0
- package/dist/cli/commands/registry/upload-sourcemaps.d.ts.map +1 -0
- package/dist/cli/commands/registry/upload-sourcemaps.js +27 -0
- package/dist/cli/commands/registry/upload-sourcemaps.js.map +1 -0
- package/dist/cli/commands/review/review.d.ts +2 -26
- package/dist/cli/commands/review/review.d.ts.map +1 -1
- package/dist/cli/commands/review/review.js +0 -14
- package/dist/cli/commands/review/review.js.map +1 -1
- package/dist/cli/commands/run-task.d.ts +2 -34
- package/dist/cli/commands/run-task.d.ts.map +1 -1
- package/dist/cli/commands/run-task.js +0 -30
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/start.d.ts +2 -54
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +0 -41
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/stylelint.d.ts +2 -34
- package/dist/cli/commands/stylelint.d.ts.map +1 -1
- package/dist/cli/commands/stylelint.js +0 -30
- package/dist/cli/commands/stylelint.js.map +1 -1
- package/dist/cli/commands/styles-check.d.ts +2 -1
- package/dist/cli/commands/styles-check.d.ts.map +1 -1
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/test/tests.d.ts +2 -38
- package/dist/cli/commands/test/tests.d.ts.map +1 -1
- package/dist/cli/commands/test/tests.js +0 -36
- package/dist/cli/commands/test/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +9 -7
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +0 -4
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/commands/upload-sourcemaps.d.ts +2 -26
- package/dist/cli/commands/upload-sourcemaps.d.ts.map +1 -1
- package/dist/cli/commands/upload-sourcemaps.js +0 -26
- package/dist/cli/commands/upload-sourcemaps.js.map +1 -1
- package/dist/cli/index.js +17 -16
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/swc-compile-package/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package/swc-compile-package.js +1 -7
- package/dist/cli/tasks/swc-compile-package/swc-compile-package.js.map +1 -1
- package/dist/cli/utils/bundle.js +1 -1
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/check-startup-location.d.ts +2 -2
- package/dist/cli/utils/check-startup-location.d.ts.map +1 -1
- package/dist/cli/utils/check-startup-location.js +1 -2
- package/dist/cli/utils/check-startup-location.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts +3 -3
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +1 -2
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/utils/find-up.js +4 -4
- package/dist/utils/find-up.js.map +1 -1
- package/dist/utils/get-package-data.d.ts.map +1 -1
- package/dist/utils/get-package-data.js +1 -28
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/webpack/configs/cache-config.d.ts.map +1 -1
- package/dist/webpack/configs/cache-config.js +14 -1
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.d.ts.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +11 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.d.ts.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js +7 -5
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
- package/package.json +12 -17
- package/src/cli/commands/__tests__/build.test.ts +2 -1
- package/src/cli/commands/__tests__/clean.test.ts +2 -1
- package/src/cli/commands/__tests__/convert-eslint-config.test.ts +2 -1
- package/src/cli/commands/__tests__/init.test.ts +4 -3
- package/src/cli/commands/__tests__/install.test.ts +2 -1
- package/src/cli/commands/__tests__/kendo-ui-license.test.ts +3 -2
- package/src/cli/commands/__tests__/lint.test.ts +3 -1
- package/src/cli/commands/__tests__/mfe-check.test.ts +2 -1
- package/src/cli/commands/__tests__/mfe-generate-metadata.test.ts +6 -24
- package/src/cli/commands/__tests__/mfe-list.test.ts +2 -1
- package/src/cli/commands/__tests__/mfe-publish.test.ts +8 -7
- package/src/cli/commands/__tests__/start.test.ts +2 -1
- package/src/cli/commands/build.ts +3 -16
- package/src/cli/commands/bundle-package.ts +3 -12
- package/src/cli/commands/clean.ts +2 -4
- package/src/cli/commands/convert-eslint-config.ts +2 -4
- package/src/cli/commands/eslint.ts +3 -10
- package/src/cli/commands/init.ts +3 -10
- package/src/cli/commands/install.ts +3 -12
- package/src/cli/commands/kendo-ui-license.ts +2 -4
- package/src/cli/commands/lint.ts +3 -15
- package/src/cli/commands/mfe-check.ts +3 -28
- package/src/cli/commands/mfe-generate-metadata.ts +9 -19
- package/src/cli/commands/mfe-list.ts +3 -23
- package/src/cli/commands/mfe-package-clean.ts +3 -27
- package/src/cli/commands/mfe-package-publish.ts +3 -46
- package/src/cli/commands/mfe-package-rollback.ts +3 -26
- package/src/cli/commands/mfe-publish.ts +11 -73
- package/src/cli/commands/mfe-purge-cache.ts +3 -27
- package/src/cli/commands/prepare-package.ts +3 -7
- package/src/cli/commands/registry/__tests__/command-registry.test.ts +13 -0
- package/src/cli/commands/registry/build.ts +16 -0
- package/src/cli/commands/registry/bundle-package.ts +13 -0
- package/src/cli/commands/registry/clean.ts +7 -0
- package/src/cli/commands/registry/command-registry.ts +98 -0
- package/src/cli/commands/registry/convert-eslint-config.ts +7 -0
- package/src/cli/commands/registry/define-entry.ts +11 -0
- package/src/cli/commands/registry/eslint.ts +12 -0
- package/src/cli/commands/registry/index.ts +2 -0
- package/src/cli/commands/registry/init.ts +10 -0
- package/src/cli/commands/registry/install.ts +12 -0
- package/src/cli/commands/registry/kendo-ui-license.ts +7 -0
- package/src/cli/commands/registry/lint.ts +17 -0
- package/src/cli/commands/registry/mfe-check.ts +28 -0
- package/src/cli/commands/registry/mfe-generate-metadata.ts +13 -0
- package/src/cli/commands/registry/mfe-list.ts +25 -0
- package/src/cli/commands/registry/mfe-package-clean.ts +27 -0
- package/src/cli/commands/registry/mfe-package-publish.ts +46 -0
- package/src/cli/commands/registry/mfe-package-rollback.ts +26 -0
- package/src/cli/commands/registry/mfe-publish.ts +55 -0
- package/src/cli/commands/registry/mfe-purge-cache.ts +27 -0
- package/src/cli/commands/registry/prepare-package.ts +8 -0
- package/src/cli/commands/registry/review.ts +11 -0
- package/src/cli/commands/registry/start.ts +14 -0
- package/src/cli/commands/registry/stylelint.ts +12 -0
- package/src/cli/commands/registry/styles-check.ts +4 -0
- package/src/cli/commands/registry/task.ts +12 -0
- package/src/cli/commands/registry/test-command.ts +19 -0
- package/src/cli/commands/registry/upload-sourcemaps.ts +14 -0
- package/src/cli/commands/review/__tests__/review.test.ts +2 -1
- package/src/cli/commands/review/review.ts +3 -11
- package/src/cli/commands/run-task.ts +3 -10
- package/src/cli/commands/start.ts +3 -14
- package/src/cli/commands/stylelint.ts +3 -10
- package/src/cli/commands/styles-check.ts +2 -1
- package/src/cli/commands/test/__tests__/tests.test.ts +2 -1
- package/src/cli/commands/test/tests.ts +3 -16
- package/src/cli/commands/types.ts +8 -6
- package/src/cli/commands/upload-sourcemaps.ts +3 -13
- package/src/cli/index.ts +21 -20
- package/src/cli/tasks/swc-compile-package/__tests__/swc-compile-package.test.ts +1 -8
- package/src/cli/tasks/swc-compile-package/swc-compile-package.ts +1 -11
- package/src/cli/utils/__tests__/bundle.test.ts +17 -0
- package/src/cli/utils/__tests__/check-startup-location.test.ts +5 -17
- package/src/cli/utils/__tests__/set-node-options.test.ts +5 -19
- package/src/cli/utils/bundle.ts +1 -1
- package/src/cli/utils/check-startup-location.ts +5 -3
- package/src/cli/utils/set-node-options.ts +3 -4
- package/src/utils/__tests__/get-package-data.test.ts +26 -97
- package/src/utils/find-up.ts +1 -1
- package/src/utils/get-package-data.ts +2 -27
- package/src/utils/index.ts +0 -2
- package/src/webpack/configs/cache-config.ts +10 -1
- package/src/webpack/configs/utils/__tests__/get-launchdarkly-sdk-version.test.ts +8 -24
- package/src/webpack/configs/utils/__tests__/get-web-components-version.test.ts +10 -30
- package/src/webpack/configs/utils/get-launchdarkly-sdk-version.ts +12 -2
- package/src/webpack/configs/utils/get-web-components-version.ts +5 -8
- package/dist/cli/commands/get-command.d.ts +0 -4
- package/dist/cli/commands/get-command.d.ts.map +0 -1
- package/dist/cli/commands/get-command.js +0 -68
- package/dist/cli/commands/get-command.js.map +0 -1
- package/dist/cli/commands/index.d.ts +0 -15
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/index.js +0 -32
- package/dist/cli/commands/index.js.map +0 -1
- package/dist/utils/find-package-lock.d.ts +0 -2
- package/dist/utils/find-package-lock.d.ts.map +0 -1
- package/dist/utils/find-package-lock.js +0 -26
- package/dist/utils/find-package-lock.js.map +0 -1
- package/dist/utils/get-package-version.d.ts +0 -2
- package/dist/utils/get-package-version.d.ts.map +0 -1
- package/dist/utils/get-package-version.js +0 -31
- package/dist/utils/get-package-version.js.map +0 -1
- package/src/cli/commands/__tests__/get-command.test.ts +0 -19
- package/src/cli/commands/get-command.ts +0 -59
- package/src/cli/commands/index.ts +0 -14
- package/src/utils/__tests__/find-package-lock.test.ts +0 -35
- package/src/utils/__tests__/get-package-version.test.ts +0 -120
- package/src/utils/find-package-lock.ts +0 -10
- package/src/utils/get-package-version.ts +0 -31
|
@@ -2,6 +2,7 @@ import { fs, vol } from 'memfs';
|
|
|
2
2
|
import { exec, ExecException, execSync } from 'node:child_process';
|
|
3
3
|
import { log } from '../../../utils';
|
|
4
4
|
import { Clean } from '../clean';
|
|
5
|
+
import { entry } from '../registry/clean';
|
|
5
6
|
|
|
6
7
|
jest.mock('node:fs', () => fs);
|
|
7
8
|
jest.mock('node:child_process', () => ({
|
|
@@ -41,7 +42,7 @@ describe(`[startup] ${Clean.name}`, () => {
|
|
|
41
42
|
const subject = async () => new Clean({}).execute();
|
|
42
43
|
|
|
43
44
|
test('allows running from global location', () => {
|
|
44
|
-
expect(
|
|
45
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
function itLogsError(expectedMessage: string) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fs, vol } from 'memfs';
|
|
2
2
|
import { prettify } from '../../../utils';
|
|
3
3
|
import { ConvertEslintConfig } from '../convert-eslint-config';
|
|
4
|
+
import { entry } from '../registry/convert-eslint-config';
|
|
4
5
|
|
|
5
6
|
jest.mock('fs', () => fs);
|
|
6
7
|
jest.mock('../../../utils', () => ({
|
|
@@ -41,7 +42,7 @@ describe(`[startup] ${ConvertEslintConfig.name}`, () => {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
test('allows running from global location', () => {
|
|
44
|
-
expect(
|
|
45
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
describe(`when ${eslintrcFile} does not exist`, () => {
|
|
@@ -2,13 +2,15 @@ import { gitCloneRepo, gitIsReachable } from '@servicetitan/install';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { vol } from 'memfs';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
import { log } from '../../../utils';
|
|
6
5
|
import { Init } from '../init';
|
|
6
|
+
import { entry } from '../registry/init';
|
|
7
7
|
|
|
8
8
|
jest.mock('@servicetitan/install');
|
|
9
9
|
jest.mock('fs', () => require('memfs').fs);
|
|
10
10
|
jest.mock('../../../utils', () => ({
|
|
11
|
+
...jest.requireActual('../../../utils'),
|
|
11
12
|
log: { debug: jest.fn(), error: jest.fn(), info: jest.fn() },
|
|
13
|
+
logErrors: () => {},
|
|
12
14
|
}));
|
|
13
15
|
|
|
14
16
|
describe(`[startup] ${Init.name}`, () => {
|
|
@@ -20,13 +22,12 @@ describe(`[startup] ${Init.name}`, () => {
|
|
|
20
22
|
jest.mocked(gitCloneRepo).mockReturnValue(true);
|
|
21
23
|
jest.spyOn(fs, 'mkdirSync').mockImplementation(jest.fn());
|
|
22
24
|
jest.spyOn(fs, 'rmSync').mockImplementation(jest.fn());
|
|
23
|
-
jest.spyOn(log, 'error').mockImplementation(jest.fn()); // suppress error output
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
const subject = async () => new Init(args).execute();
|
|
27
28
|
|
|
28
29
|
test('allows running from global location', () => {
|
|
29
|
-
expect(
|
|
30
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
test('clones "frontend-example" to current directory', async () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
2
|
import { getStartupVersion, log } from '../../../utils';
|
|
3
3
|
import { Install } from '../install';
|
|
4
|
+
import { entry } from '../registry/install';
|
|
4
5
|
|
|
5
6
|
jest.mock('child_process', () => ({ execSync: jest.fn() }));
|
|
6
7
|
jest.mock('../../../utils', () => ({
|
|
@@ -22,7 +23,7 @@ describe(`${Install.name}`, () => {
|
|
|
22
23
|
const subject = async () => new Install(args).execute();
|
|
23
24
|
|
|
24
25
|
test('allows running from global location', () => {
|
|
25
|
-
expect(
|
|
26
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
test('runs install', async () => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
2
|
import { log } from '../../../utils';
|
|
3
3
|
import { isModuleInstalled } from '../../utils';
|
|
4
|
-
import {
|
|
4
|
+
import { kendoUILicense } from '../kendo-ui-license';
|
|
5
|
+
import { entry } from '../registry/kendo-ui-license';
|
|
5
6
|
|
|
6
7
|
jest.mock('execa', () => jest.fn());
|
|
7
8
|
|
|
@@ -24,7 +25,7 @@ describe(`${kendoUILicense.name}`, () => {
|
|
|
24
25
|
const subject = async () => kendoUILicense();
|
|
25
26
|
|
|
26
27
|
test('allows running from global location', () => {
|
|
27
|
-
expect(
|
|
28
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
test('activates license', async () => {
|
|
@@ -2,12 +2,14 @@ import { getPackages } from '../../../utils';
|
|
|
2
2
|
import { eslint, lernaExec } from '../../utils';
|
|
3
3
|
import { stylelint } from '../../utils/stylelint';
|
|
4
4
|
import { Lint } from '../lint';
|
|
5
|
+
import { entry } from '../registry/lint';
|
|
5
6
|
|
|
6
7
|
jest.mock('stylelint', () => ({ lint: jest.fn() }));
|
|
7
8
|
|
|
8
9
|
jest.mock('../../utils');
|
|
9
10
|
jest.mock('../../utils/stylelint');
|
|
10
11
|
jest.mock('../../../utils', () => ({
|
|
12
|
+
...jest.requireActual('../../../utils'),
|
|
11
13
|
log: { debug: jest.fn(), info: jest.fn() },
|
|
12
14
|
getConfiguration: jest.fn(() => ({})),
|
|
13
15
|
getDestinationFolders: jest.fn(() => []),
|
|
@@ -69,7 +71,7 @@ describe(`[startup] ${Lint.name}`, () => {
|
|
|
69
71
|
});
|
|
70
72
|
|
|
71
73
|
test('command is greedy', () => {
|
|
72
|
-
expect(
|
|
74
|
+
expect(entry.greedy).toBe(true);
|
|
73
75
|
});
|
|
74
76
|
|
|
75
77
|
test('runs eslint directly', async () => {
|
|
@@ -2,6 +2,7 @@ import { fs, vol } from 'memfs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import * as utils from '../../../utils';
|
|
4
4
|
import { MfeCheck } from '../mfe-check';
|
|
5
|
+
import { entry } from '../registry/mfe-check';
|
|
5
6
|
|
|
6
7
|
jest.mock('fs', () => fs);
|
|
7
8
|
jest.mock('../../../utils', () => ({
|
|
@@ -77,7 +78,7 @@ describe(`[startup] ${MfeCheck.name}`, () => {
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
test('allows running from global location', () => {
|
|
80
|
-
expect(
|
|
81
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
describe('when compatible', () => {
|
|
@@ -4,6 +4,7 @@ import { getPackageData, getStartupVersion, loadSharedDependencies, log } from '
|
|
|
4
4
|
import { getLaunchDarklySdkVersion } from '../../../webpack/configs/utils/get-launchdarkly-sdk-version';
|
|
5
5
|
import { getWebComponentsVersion } from '../../../webpack/configs/utils/get-web-components-version';
|
|
6
6
|
import { MfeGenerateMetadata } from '../mfe-generate-metadata';
|
|
7
|
+
import { entry } from '../registry/mfe-generate-metadata';
|
|
7
8
|
|
|
8
9
|
jest.mock('fs', () => fs);
|
|
9
10
|
jest.mock('../../../utils', () => ({
|
|
@@ -35,7 +36,6 @@ describe(`[startup] ${MfeGenerateMetadata.name}`, () => {
|
|
|
35
36
|
|
|
36
37
|
const mockParentPackageJson = {
|
|
37
38
|
name: 'parent-package',
|
|
38
|
-
workspaces: ['packages/*'],
|
|
39
39
|
dependencies: { 'some-dep': '^1.0.0' },
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -77,7 +77,7 @@ describe(`[startup] ${MfeGenerateMetadata.name}`, () => {
|
|
|
77
77
|
const subject = () => new MfeGenerateMetadata({ ...mfeGenerateMetadataArgs }).execute();
|
|
78
78
|
|
|
79
79
|
test('allows running from global location', () => {
|
|
80
|
-
expect(
|
|
80
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
test('outputs valid JSON metadata', async () => {
|
|
@@ -110,28 +110,10 @@ describe(`[startup] ${MfeGenerateMetadata.name}`, () => {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
test('
|
|
114
|
-
await expect(subject()).
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
describe('when tsconfig.json does not exist', () => {
|
|
119
|
-
beforeEach(() => {
|
|
120
|
-
vol.reset();
|
|
121
|
-
vol.fromJSON({
|
|
122
|
-
'./package.json': JSON.stringify(mockPackageJson),
|
|
123
|
-
'../../package.json': JSON.stringify(mockParentPackageJson),
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
test('does not throw error', async () => {
|
|
128
|
-
await expect(subject()).resolves.not.toThrow();
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
test('outputs metadata with empty entrypoints', async () => {
|
|
132
|
-
await subject();
|
|
133
|
-
|
|
134
|
-
expect(getMetadataFromStdout().entrypoints).toEqual({});
|
|
113
|
+
test('throws error', async () => {
|
|
114
|
+
await expect(subject()).rejects.toThrow(
|
|
115
|
+
'this command must be run inside a web-component directory'
|
|
116
|
+
);
|
|
135
117
|
});
|
|
136
118
|
});
|
|
137
119
|
|
|
@@ -6,6 +6,7 @@ import { createInterface } from 'readline/promises';
|
|
|
6
6
|
import { formatRelativeDate, toArray } from '../../../utils';
|
|
7
7
|
import { isTTY, npmView, runCommand } from '../../utils';
|
|
8
8
|
import { MFEList } from '../mfe-list';
|
|
9
|
+
import { entry } from '../registry/mfe-list';
|
|
9
10
|
|
|
10
11
|
jest.mock('@servicetitan/install');
|
|
11
12
|
jest.mock('cli-table3');
|
|
@@ -152,7 +153,7 @@ describe(`[startup] ${MFEList.name}`, () => {
|
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
test('allows running from global location', () => {
|
|
155
|
-
expect(
|
|
156
|
+
expect(entry.allowRunFromGlobal).toBe(true);
|
|
156
157
|
});
|
|
157
158
|
|
|
158
159
|
test(`outputs table with last ${DEFAULT_LIMIT} published versions`, async () => {
|
|
@@ -2,10 +2,11 @@ import { fs, vol } from 'memfs';
|
|
|
2
2
|
import { createPackage } from '../../../__mocks__';
|
|
3
3
|
import { Package, PackageType, getPackages } from '../../../utils';
|
|
4
4
|
import { lernaExec } from '../../utils';
|
|
5
|
-
import { MFEPackageClean } from '../mfe-package-clean';
|
|
6
|
-
import { MFEPackagePublish } from '../mfe-package-publish';
|
|
7
|
-
import { MFEPackageRollback } from '../mfe-package-rollback';
|
|
8
5
|
import { MFEPublish } from '../mfe-publish';
|
|
6
|
+
import { entry as mfePackageClean } from '../registry/mfe-package-clean';
|
|
7
|
+
import { entry as mfePackagePublish } from '../registry/mfe-package-publish';
|
|
8
|
+
import { entry as mfePackageRollback } from '../registry/mfe-package-rollback';
|
|
9
|
+
import { entry as mfePublish } from '../registry/mfe-publish';
|
|
9
10
|
|
|
10
11
|
jest.mock('fs', () => fs);
|
|
11
12
|
|
|
@@ -260,25 +261,25 @@ describe(`[startup] ${MFEPublish.name}`, () => {
|
|
|
260
261
|
});
|
|
261
262
|
|
|
262
263
|
describe('options', () => {
|
|
263
|
-
const subject = () =>
|
|
264
|
+
const subject = () => mfePublish.options;
|
|
264
265
|
|
|
265
266
|
test('groups publish, clean, and rollback options', () => {
|
|
266
267
|
expect(subject()).toEqual(
|
|
267
268
|
expect.objectContaining({
|
|
268
269
|
...Object.fromEntries(
|
|
269
|
-
Object.entries(
|
|
270
|
+
Object.entries(mfePackagePublish.options).map(([key, value]) => [
|
|
270
271
|
key,
|
|
271
272
|
{ group: 'Publish Options:', ...value },
|
|
272
273
|
])
|
|
273
274
|
),
|
|
274
275
|
...Object.fromEntries(
|
|
275
|
-
Object.entries(
|
|
276
|
+
Object.entries(mfePackageClean.options).map(([key, value]) => [
|
|
276
277
|
`${key}\u00A0`,
|
|
277
278
|
{ group: 'Clean Options:', ...value },
|
|
278
279
|
])
|
|
279
280
|
),
|
|
280
281
|
...Object.fromEntries(
|
|
281
|
-
Object.entries(
|
|
282
|
+
Object.entries(mfePackageRollback.options)
|
|
282
283
|
.filter(([key]) => key !== 'scope')
|
|
283
284
|
.map(([key, value]) => {
|
|
284
285
|
const optionProps = Object.fromEntries(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createPackage } from '../../../__mocks__';
|
|
2
2
|
import { Package, PackageType, getPackages, log } from '../../../utils';
|
|
3
3
|
import { compile, lernaExec, typeCheck, watchStdout } from '../../utils';
|
|
4
|
+
import { entry } from '../registry/start';
|
|
4
5
|
import { Start } from '../start';
|
|
5
6
|
|
|
6
7
|
jest.mock('../../../utils', () => ({
|
|
@@ -101,7 +102,7 @@ describe(`[startup] ${Start.name}`, () => {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
test('command is greedy', () => {
|
|
104
|
-
expect(
|
|
105
|
+
expect(entry.greedy).toBe(true);
|
|
105
106
|
});
|
|
106
107
|
|
|
107
108
|
describe('with TSC package', () => {
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { getPackages, logErrors, PackageType } from '../../utils';
|
|
2
2
|
import { checkArgs, compile, lernaExec, ProcessTree, typeCheck } from '../utils';
|
|
3
3
|
import { kendoUILicense } from './kendo-ui-license';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const options = {
|
|
7
|
-
cdnPath: { string: true, description: 'Base url for application assets' },
|
|
8
|
-
codeCoverage: { boolean: true, description: 'Instrument code for coverage analysis?' },
|
|
9
|
-
config: { string: true, hidden: true, description: 'Use specified configuration' },
|
|
10
|
-
ignore: { array: true, string: true, description: 'Packages to skip' },
|
|
11
|
-
scope: { array: true, string: true, description: 'Packages to build' },
|
|
12
|
-
stat: { boolean: true, description: 'Generate bundle report?' },
|
|
13
|
-
useTsc: { boolean: true, description: 'Use tsc to compile packages?' },
|
|
14
|
-
} satisfies CommandOptions;
|
|
4
|
+
import type { entry } from './registry/build';
|
|
5
|
+
import { Command } from './types';
|
|
15
6
|
|
|
16
7
|
enum BuildProcesses {
|
|
17
8
|
Precompile,
|
|
@@ -23,11 +14,7 @@ enum BuildProcesses {
|
|
|
23
14
|
BundlePackage,
|
|
24
15
|
}
|
|
25
16
|
|
|
26
|
-
export class Build extends Command<typeof
|
|
27
|
-
static readonly description = 'Build project for production';
|
|
28
|
-
static readonly greedy = true;
|
|
29
|
-
static readonly options = options;
|
|
30
|
-
|
|
17
|
+
export class Build extends Command<typeof entry> {
|
|
31
18
|
@logErrors
|
|
32
19
|
async execute() {
|
|
33
20
|
checkArgs(this.args, { obsolete: ['--esbuild', '--experimental-bundlers'] });
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { getTsConfig, log, logErrors } from '../../utils';
|
|
2
2
|
import { bundle, getModuleType } from '../utils';
|
|
3
|
-
import {
|
|
3
|
+
import type { entry } from './registry/bundle-package';
|
|
4
|
+
import { Command } from './types';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
codeCoverage: { boolean: true, hidden: true },
|
|
7
|
-
config: { string: true, hidden: true },
|
|
8
|
-
exposedDependencies: { boolean: true, hidden: true },
|
|
9
|
-
stat: { boolean: true, hidden: true },
|
|
10
|
-
useWatchConfig: { boolean: true, hidden: true },
|
|
11
|
-
watch: { boolean: true, hidden: true },
|
|
12
|
-
} satisfies CommandOptions;
|
|
13
|
-
|
|
14
|
-
export class BundlePackage extends Command<typeof options> {
|
|
15
|
-
static readonly options = options;
|
|
6
|
+
export class BundlePackage extends Command<typeof entry> {
|
|
16
7
|
@logErrors
|
|
17
8
|
async execute() {
|
|
18
9
|
const {
|
|
@@ -4,6 +4,7 @@ import path from 'node:path';
|
|
|
4
4
|
import { promisify } from 'node:util';
|
|
5
5
|
import { log, logErrors } from '../../utils';
|
|
6
6
|
import { ProcessTree } from '../utils/process-tree';
|
|
7
|
+
import type { entry } from './registry/clean';
|
|
7
8
|
import { Command } from './types';
|
|
8
9
|
|
|
9
10
|
const exec = promisify(execAsync);
|
|
@@ -16,10 +17,7 @@ enum CleanProcesses {
|
|
|
16
17
|
CleanGitWorkingTree,
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
export class Clean extends Command {
|
|
20
|
-
static readonly allowRunFromGlobal = true;
|
|
21
|
-
static readonly description = 'Reset project to fresh state';
|
|
22
|
-
|
|
20
|
+
export class Clean extends Command<typeof entry> {
|
|
23
21
|
@logErrors
|
|
24
22
|
async execute() {
|
|
25
23
|
const processTree = new ProcessTree<typeof CleanProcesses>();
|
|
@@ -2,6 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import { globSync } from 'glob';
|
|
3
3
|
import JSON5 from 'json5';
|
|
4
4
|
import { log, logErrors, prettify, toArray } from '../../utils';
|
|
5
|
+
import type { entry } from './registry/convert-eslint-config';
|
|
5
6
|
import { Command } from './types';
|
|
6
7
|
|
|
7
8
|
const oldConfigFile = '.eslintrc.json';
|
|
@@ -38,10 +39,7 @@ interface Recipe {
|
|
|
38
39
|
import: { as: string; from?: string };
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
export class ConvertEslintConfig extends Command {
|
|
42
|
-
static readonly allowRunFromGlobal = true;
|
|
43
|
-
static readonly description = 'Convert v8.x eslintrc.json to v9.x flat config';
|
|
44
|
-
|
|
42
|
+
export class ConvertEslintConfig extends Command<typeof entry> {
|
|
45
43
|
private static readonly recipes: Record<string, Recipe | null> = {
|
|
46
44
|
'@servicetitan/eslint-config/mono': {
|
|
47
45
|
import: { as: 'mono' },
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
import { logErrors } from '../../utils';
|
|
3
3
|
import { eslint } from '../utils';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const options = {
|
|
7
|
-
_: { description: '[paths...]', array: true, string: true },
|
|
8
|
-
fix: { boolean: true, hidden: true },
|
|
9
|
-
paths: { array: true, string: true, hidden: true },
|
|
10
|
-
} satisfies CommandOptions;
|
|
11
|
-
|
|
12
|
-
export class ESLintCommand extends Command<typeof options> {
|
|
13
|
-
static readonly options = options;
|
|
4
|
+
import type { entry } from './registry/eslint';
|
|
5
|
+
import { Command } from './types';
|
|
14
6
|
|
|
7
|
+
export class ESLintCommand extends Command<typeof entry> {
|
|
15
8
|
@logErrors
|
|
16
9
|
async execute() {
|
|
17
10
|
await eslint({ fix: this.args.fix, paths: this.paths });
|
package/src/cli/commands/init.ts
CHANGED
|
@@ -2,19 +2,12 @@ import { gitCloneRepo, gitIsReachable } from '@servicetitan/install';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { log, logErrors } from '../../utils';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const options = {
|
|
8
|
-
output: { string: true, description: 'Output path' },
|
|
9
|
-
} satisfies CommandOptions;
|
|
5
|
+
import type { entry } from './registry/init';
|
|
6
|
+
import { Command } from './types';
|
|
10
7
|
|
|
11
8
|
const REPO_NAME = 'frontend-example';
|
|
12
9
|
|
|
13
|
-
export class Init extends Command<typeof
|
|
14
|
-
static readonly allowRunFromGlobal = true;
|
|
15
|
-
static readonly description = 'Create example project';
|
|
16
|
-
static readonly options = options;
|
|
17
|
-
|
|
10
|
+
export class Init extends Command<typeof entry> {
|
|
18
11
|
@logErrors
|
|
19
12
|
async execute() {
|
|
20
13
|
const destination = path.resolve(this.args.output ?? '.');
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
2
|
import { getStartupVersion, log, logErrors } from '../../utils';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const options = {
|
|
6
|
-
fix: { boolean: true, description: 'Update and dedupe package-lock.json', hidden: true },
|
|
7
|
-
quiet: { boolean: true, description: 'Suppress output', hidden: true },
|
|
8
|
-
token: { boolean: true, description: 'Configure npm token' },
|
|
9
|
-
} satisfies CommandOptions;
|
|
10
|
-
|
|
11
|
-
export class Install extends Command<typeof options> {
|
|
12
|
-
static readonly allowRunFromGlobal = true;
|
|
13
|
-
static readonly description = 'Install project dependencies';
|
|
14
|
-
static readonly options = options;
|
|
3
|
+
import type { entry } from './registry/install';
|
|
4
|
+
import { Command } from './types';
|
|
15
5
|
|
|
6
|
+
export class Install extends Command<typeof entry> {
|
|
16
7
|
@logErrors
|
|
17
8
|
async execute() {
|
|
18
9
|
if (!this.args.quiet) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
2
|
import { log, logErrors } from '../../utils';
|
|
3
3
|
import { isModuleInstalled } from '../utils';
|
|
4
|
+
import type { entry } from './registry/kendo-ui-license';
|
|
4
5
|
import { Command } from './types';
|
|
5
6
|
|
|
6
7
|
const ENCODED_LICENSE = `
|
|
@@ -28,10 +29,7 @@ const ENVIRONMENT_VARIABLE = 'KENDO_UI_LICENSE';
|
|
|
28
29
|
const LICENSE = Buffer.from(ENCODED_LICENSE, 'base64').toString('ascii');
|
|
29
30
|
const LICENSING_PACKAGE = '@progress/kendo-licensing';
|
|
30
31
|
|
|
31
|
-
export class KendoUILicense extends Command {
|
|
32
|
-
static readonly allowRunFromGlobal = true;
|
|
33
|
-
static readonly description = 'Install KendoReact license key';
|
|
34
|
-
|
|
32
|
+
export class KendoUILicense extends Command<typeof entry> {
|
|
35
33
|
async execute() {
|
|
36
34
|
if (!isModuleInstalled(LICENSING_PACKAGE)) {
|
|
37
35
|
return;
|
package/src/cli/commands/lint.ts
CHANGED
|
@@ -2,22 +2,10 @@
|
|
|
2
2
|
import { getPackages, log, logErrors } from '../../utils';
|
|
3
3
|
import { eslint, lernaExec } from '../utils';
|
|
4
4
|
import { stylelint } from '../utils/stylelint';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const options = {
|
|
8
|
-
_: { description: '[paths...]', array: true, string: true },
|
|
9
|
-
fix: { boolean: true, description: 'Apply fixes for issues?' },
|
|
10
|
-
scope: { array: true, string: true, hidden: true, description: 'Packages to lint' },
|
|
11
|
-
ignore: { array: true, string: true, hidden: true, description: 'Packages to skip' },
|
|
12
|
-
parallel: { boolean: true, hidden: true, description: 'Lint each package separately' },
|
|
13
|
-
paths: { array: true, string: true, hidden: true },
|
|
14
|
-
} satisfies CommandOptions;
|
|
15
|
-
|
|
16
|
-
export class Lint extends Command<typeof options> {
|
|
17
|
-
static readonly description = 'Run eslint and stylelint';
|
|
18
|
-
static readonly greedy = true;
|
|
19
|
-
static readonly options = options;
|
|
5
|
+
import type { entry } from './registry/lint';
|
|
6
|
+
import { Command } from './types';
|
|
20
7
|
|
|
8
|
+
export class Lint extends Command<typeof entry> {
|
|
21
9
|
async execute() {
|
|
22
10
|
await this.checkStyles();
|
|
23
11
|
await this.eslint();
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
} from '../../utils';
|
|
11
11
|
import { Metadata } from '../../webpack/configs/types';
|
|
12
12
|
import { getExposedDependencies } from '../../webpack/configs/utils';
|
|
13
|
-
import {
|
|
13
|
+
import type { entry } from './registry/mfe-check';
|
|
14
|
+
import { Command } from './types';
|
|
14
15
|
|
|
15
16
|
interface HostPackageJSON {
|
|
16
17
|
name: string;
|
|
@@ -33,33 +34,7 @@ interface CompatibilityResult {
|
|
|
33
34
|
isHostMfe: boolean;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
metadata: {
|
|
38
|
-
description:
|
|
39
|
-
"Path to MFE's metadata.json file, can be generated with the 'mfe-generate-metadata' command",
|
|
40
|
-
string: true,
|
|
41
|
-
demandOption: true,
|
|
42
|
-
requiresArg: true,
|
|
43
|
-
},
|
|
44
|
-
hostPackageJson: {
|
|
45
|
-
description: 'Path(s) to host package.json files',
|
|
46
|
-
array: true,
|
|
47
|
-
string: true,
|
|
48
|
-
demandOption: true,
|
|
49
|
-
requiresArg: true,
|
|
50
|
-
},
|
|
51
|
-
json: {
|
|
52
|
-
description: 'Output results as JSON',
|
|
53
|
-
boolean: true,
|
|
54
|
-
default: false,
|
|
55
|
-
},
|
|
56
|
-
} satisfies CommandOptions;
|
|
57
|
-
|
|
58
|
-
export class MfeCheck extends Command<typeof options> {
|
|
59
|
-
static readonly allowRunFromGlobal = true;
|
|
60
|
-
static readonly description = 'Check MFE/host dependency compatibility';
|
|
61
|
-
static readonly options = options;
|
|
62
|
-
|
|
37
|
+
export class MfeCheck extends Command<typeof entry> {
|
|
63
38
|
@logErrors
|
|
64
39
|
async execute() {
|
|
65
40
|
const { metadata: metadataPath, hostPackageJson, json } = this.args;
|
|
@@ -4,35 +4,25 @@ import {
|
|
|
4
4
|
getFolders,
|
|
5
5
|
getPackageData,
|
|
6
6
|
getPackageName,
|
|
7
|
+
isWebComponent,
|
|
7
8
|
loadSharedDependencies,
|
|
8
9
|
log,
|
|
9
10
|
logErrors,
|
|
10
11
|
} from '../../utils';
|
|
11
12
|
import { buildMetadata } from '../../webpack/configs/utils/build-metadata';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
const options = {
|
|
15
|
-
output: {
|
|
16
|
-
description: 'Output file path (outputs to stdout if not specified)',
|
|
17
|
-
string: true,
|
|
18
|
-
},
|
|
19
|
-
} satisfies CommandOptions;
|
|
20
|
-
|
|
21
|
-
export class MfeGenerateMetadata extends Command<typeof options> {
|
|
22
|
-
static readonly allowRunFromGlobal = true;
|
|
23
|
-
static readonly description = 'Generate MFE metadata for compatibility checking';
|
|
24
|
-
static readonly options = options;
|
|
13
|
+
import type { entry } from './registry/mfe-generate-metadata';
|
|
14
|
+
import { Command } from './types';
|
|
25
15
|
|
|
16
|
+
export class MfeGenerateMetadata extends Command<typeof entry> {
|
|
26
17
|
@logErrors
|
|
27
18
|
async execute() {
|
|
19
|
+
if (!isWebComponent()) {
|
|
20
|
+
throw new Error('this command must be run inside a web-component directory');
|
|
21
|
+
}
|
|
22
|
+
|
|
28
23
|
const { output } = this.args;
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
({ destination } = getFolders());
|
|
33
|
-
} catch {
|
|
34
|
-
destination = 'dist';
|
|
35
|
-
}
|
|
25
|
+
const { destination } = getFolders();
|
|
36
26
|
const name = getPackageName();
|
|
37
27
|
const packageData = getPackageData();
|
|
38
28
|
const sharedDependencies = loadSharedDependencies(
|
|
@@ -12,33 +12,13 @@ import {
|
|
|
12
12
|
PackageType,
|
|
13
13
|
} from '../../utils';
|
|
14
14
|
import { isTTY, NPMPackageInfo, npmView, runCommand } from '../utils';
|
|
15
|
-
import {
|
|
15
|
+
import type { entry } from './registry/mfe-list';
|
|
16
|
+
import { Command } from './types';
|
|
16
17
|
import { DEFAULT_MFE_REGISTRY } from './utils';
|
|
17
18
|
|
|
18
|
-
const options = {
|
|
19
|
-
_: { description: '[packageNames...]', array: true, string: true },
|
|
20
|
-
all: { boolean: true, description: 'List all published versions ' },
|
|
21
|
-
ignore: {
|
|
22
|
-
array: true,
|
|
23
|
-
string: true,
|
|
24
|
-
description: 'Exclude MFEs with names matching specified glob pattern ',
|
|
25
|
-
},
|
|
26
|
-
limit: {
|
|
27
|
-
number: true,
|
|
28
|
-
description: 'List only the specified number of published versions',
|
|
29
|
-
},
|
|
30
|
-
packageNames: { array: true, string: true, hidden: true },
|
|
31
|
-
registry: { string: true, hidden: true },
|
|
32
|
-
tagged: { boolean: true, description: 'List only tagged versions' },
|
|
33
|
-
} satisfies CommandOptions;
|
|
34
|
-
|
|
35
19
|
const collator = new Intl.Collator();
|
|
36
20
|
|
|
37
|
-
export class MFEList extends Command<typeof
|
|
38
|
-
static readonly allowRunFromGlobal = true;
|
|
39
|
-
static readonly description = 'List published MFE packages';
|
|
40
|
-
static readonly options = options;
|
|
41
|
-
|
|
21
|
+
export class MFEList extends Command<typeof entry> {
|
|
42
22
|
@logErrors
|
|
43
23
|
async execute() {
|
|
44
24
|
await this.login();
|