@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
|
@@ -1,21 +1,7 @@
|
|
|
1
|
+
import type { entry } from './registry/init';
|
|
1
2
|
import { Command } from './types';
|
|
2
|
-
declare
|
|
3
|
-
output: {
|
|
4
|
-
string: true;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export declare class Init extends Command<typeof options> {
|
|
9
|
-
static readonly allowRunFromGlobal = true;
|
|
10
|
-
static readonly description = "Create example project";
|
|
11
|
-
static readonly options: {
|
|
12
|
-
output: {
|
|
13
|
-
string: true;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
3
|
+
export declare class Init extends Command<typeof entry> {
|
|
17
4
|
execute(): Promise<void>;
|
|
18
5
|
cloneRepo(destination: string): boolean;
|
|
19
6
|
}
|
|
20
|
-
export {};
|
|
21
7
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,qBAAa,IAAK,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IAErC,OAAO;IAsBb,SAAS,CAAC,WAAW,EAAE,MAAM;CAWhC"}
|
|
@@ -13,19 +13,6 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
|
13
13
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
14
14
|
const _utils = require("../../utils");
|
|
15
15
|
const _types = require("./types");
|
|
16
|
-
function _define_property(obj, key, value) {
|
|
17
|
-
if (key in obj) {
|
|
18
|
-
Object.defineProperty(obj, key, {
|
|
19
|
-
value: value,
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
obj[key] = value;
|
|
26
|
-
}
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
16
|
function _interop_require_default(obj) {
|
|
30
17
|
return obj && obj.__esModule ? obj : {
|
|
31
18
|
default: obj
|
|
@@ -40,12 +27,6 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
40
27
|
function _ts_metadata(k, v) {
|
|
41
28
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
42
29
|
}
|
|
43
|
-
const options = {
|
|
44
|
-
output: {
|
|
45
|
-
string: true,
|
|
46
|
-
description: 'Output path'
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
30
|
const REPO_NAME = 'frontend-example';
|
|
50
31
|
class Init extends _types.Command {
|
|
51
32
|
async execute() {
|
|
@@ -88,9 +69,6 @@ class Init extends _types.Command {
|
|
|
88
69
|
return true;
|
|
89
70
|
}
|
|
90
71
|
}
|
|
91
|
-
_define_property(Init, "allowRunFromGlobal", true);
|
|
92
|
-
_define_property(Init, "description", 'Create example project');
|
|
93
|
-
_define_property(Init, "options", options);
|
|
94
72
|
_ts_decorate([
|
|
95
73
|
_utils.logErrors,
|
|
96
74
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/init.ts"],"sourcesContent":["import { gitCloneRepo, gitIsReachable } from '@servicetitan/install';\nimport fs from 'fs';\nimport path from 'path';\nimport { log, logErrors } from '../../utils';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/init.ts"],"sourcesContent":["import { gitCloneRepo, gitIsReachable } from '@servicetitan/install';\nimport fs from 'fs';\nimport path from 'path';\nimport { log, logErrors } from '../../utils';\nimport type { entry } from './registry/init';\nimport { Command } from './types';\n\nconst REPO_NAME = 'frontend-example';\n\nexport class Init extends Command<typeof entry> {\n @logErrors\n async execute() {\n const destination = path.resolve(this.args.output ?? '.');\n if (!fs.existsSync(destination)) {\n fs.mkdirSync(destination, { recursive: true });\n } else if (!fs.lstatSync(destination).isDirectory()) {\n throw new Error(`${destination} is not a directory`);\n } else if (fs.readdirSync(destination).length !== 0) {\n throw new Error(`${destination} is not an empty directory`);\n }\n\n if (this.cloneRepo(destination)) {\n log.info(`copied example project to ${destination}`);\n return;\n }\n\n if (!gitIsReachable({ name: REPO_NAME })) {\n throw new Error(`could not read servicetitan/${REPO_NAME} repository`);\n }\n\n return Promise.resolve();\n }\n\n cloneRepo(destination: string) {\n const ok = gitCloneRepo({ destination, name: REPO_NAME });\n if (!ok) {\n return false;\n }\n\n fs.rmSync(path.join(destination, '.git'), { recursive: true, force: true });\n fs.rmSync(path.join(destination, '.github', 'CODEOWNERS'));\n fs.rmSync(path.join(destination, 'package-lock.json'));\n return true;\n }\n}\n"],"names":["Init","REPO_NAME","Command","execute","destination","path","resolve","args","output","fs","existsSync","mkdirSync","recursive","lstatSync","isDirectory","Error","readdirSync","length","cloneRepo","log","info","gitIsReachable","name","Promise","ok","gitCloneRepo","rmSync","join","force"],"mappings":";;;;+BASaA;;;eAAAA;;;yBATgC;2DAC9B;6DACE;uBACc;uBAEP;;;;;;;;;;;;;;;AAExB,MAAMC,YAAY;AAEX,MAAMD,aAAaE,cAAO;IAC7B,MACMC,UAAU;YACqB;QAAjC,MAAMC,cAAcC,aAAI,CAACC,OAAO,EAAC,oBAAA,IAAI,CAACC,IAAI,CAACC,MAAM,cAAhB,+BAAA,oBAAoB;QACrD,IAAI,CAACC,WAAE,CAACC,UAAU,CAACN,cAAc;YAC7BK,WAAE,CAACE,SAAS,CAACP,aAAa;gBAAEQ,WAAW;YAAK;QAChD,OAAO,IAAI,CAACH,WAAE,CAACI,SAAS,CAACT,aAAaU,WAAW,IAAI;YACjD,MAAM,IAAIC,MAAM,GAAGX,YAAY,mBAAmB,CAAC;QACvD,OAAO,IAAIK,WAAE,CAACO,WAAW,CAACZ,aAAaa,MAAM,KAAK,GAAG;YACjD,MAAM,IAAIF,MAAM,GAAGX,YAAY,0BAA0B,CAAC;QAC9D;QAEA,IAAI,IAAI,CAACc,SAAS,CAACd,cAAc;YAC7Be,UAAG,CAACC,IAAI,CAAC,CAAC,0BAA0B,EAAEhB,aAAa;YACnD;QACJ;QAEA,IAAI,CAACiB,IAAAA,uBAAc,EAAC;YAAEC,MAAMrB;QAAU,IAAI;YACtC,MAAM,IAAIc,MAAM,CAAC,4BAA4B,EAAEd,UAAU,WAAW,CAAC;QACzE;QAEA,OAAOsB,QAAQjB,OAAO;IAC1B;IAEAY,UAAUd,WAAmB,EAAE;QAC3B,MAAMoB,KAAKC,IAAAA,qBAAY,EAAC;YAAErB;YAAakB,MAAMrB;QAAU;QACvD,IAAI,CAACuB,IAAI;YACL,OAAO;QACX;QAEAf,WAAE,CAACiB,MAAM,CAACrB,aAAI,CAACsB,IAAI,CAACvB,aAAa,SAAS;YAAEQ,WAAW;YAAMgB,OAAO;QAAK;QACzEnB,WAAE,CAACiB,MAAM,CAACrB,aAAI,CAACsB,IAAI,CAACvB,aAAa,WAAW;QAC5CK,WAAE,CAACiB,MAAM,CAACrB,aAAI,CAACsB,IAAI,CAACvB,aAAa;QACjC,OAAO;IACX;AACJ"}
|
|
@@ -1,40 +1,6 @@
|
|
|
1
|
+
import type { entry } from './registry/install';
|
|
1
2
|
import { Command } from './types';
|
|
2
|
-
declare
|
|
3
|
-
fix: {
|
|
4
|
-
boolean: true;
|
|
5
|
-
description: string;
|
|
6
|
-
hidden: true;
|
|
7
|
-
};
|
|
8
|
-
quiet: {
|
|
9
|
-
boolean: true;
|
|
10
|
-
description: string;
|
|
11
|
-
hidden: true;
|
|
12
|
-
};
|
|
13
|
-
token: {
|
|
14
|
-
boolean: true;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare class Install extends Command<typeof options> {
|
|
19
|
-
static readonly allowRunFromGlobal = true;
|
|
20
|
-
static readonly description = "Install project dependencies";
|
|
21
|
-
static readonly options: {
|
|
22
|
-
fix: {
|
|
23
|
-
boolean: true;
|
|
24
|
-
description: string;
|
|
25
|
-
hidden: true;
|
|
26
|
-
};
|
|
27
|
-
quiet: {
|
|
28
|
-
boolean: true;
|
|
29
|
-
description: string;
|
|
30
|
-
hidden: true;
|
|
31
|
-
};
|
|
32
|
-
token: {
|
|
33
|
-
boolean: true;
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
3
|
+
export declare class Install extends Command<typeof entry> {
|
|
37
4
|
execute(): Promise<void>;
|
|
38
5
|
}
|
|
39
|
-
export {};
|
|
40
6
|
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,qBAAa,OAAQ,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IAExC,OAAO;CAoBhB"}
|
|
@@ -11,19 +11,6 @@ Object.defineProperty(exports, "Install", {
|
|
|
11
11
|
const _child_process = require("child_process");
|
|
12
12
|
const _utils = require("../../utils");
|
|
13
13
|
const _types = require("./types");
|
|
14
|
-
function _define_property(obj, key, value) {
|
|
15
|
-
if (key in obj) {
|
|
16
|
-
Object.defineProperty(obj, key, {
|
|
17
|
-
value: value,
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true
|
|
21
|
-
});
|
|
22
|
-
} else {
|
|
23
|
-
obj[key] = value;
|
|
24
|
-
}
|
|
25
|
-
return obj;
|
|
26
|
-
}
|
|
27
14
|
function _ts_decorate(decorators, target, key, desc) {
|
|
28
15
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29
16
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -33,22 +20,6 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
33
20
|
function _ts_metadata(k, v) {
|
|
34
21
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
35
22
|
}
|
|
36
|
-
const options = {
|
|
37
|
-
fix: {
|
|
38
|
-
boolean: true,
|
|
39
|
-
description: 'Update and dedupe package-lock.json',
|
|
40
|
-
hidden: true
|
|
41
|
-
},
|
|
42
|
-
quiet: {
|
|
43
|
-
boolean: true,
|
|
44
|
-
description: 'Suppress output',
|
|
45
|
-
hidden: true
|
|
46
|
-
},
|
|
47
|
-
token: {
|
|
48
|
-
boolean: true,
|
|
49
|
-
description: 'Configure npm token'
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
23
|
class Install extends _types.Command {
|
|
53
24
|
async execute() {
|
|
54
25
|
if (!this.args.quiet) {
|
|
@@ -68,9 +39,6 @@ class Install extends _types.Command {
|
|
|
68
39
|
return Promise.resolve(); // stops "async method has no 'await' expression" lint error
|
|
69
40
|
}
|
|
70
41
|
}
|
|
71
|
-
_define_property(Install, "allowRunFromGlobal", true);
|
|
72
|
-
_define_property(Install, "description", 'Install project dependencies');
|
|
73
|
-
_define_property(Install, "options", options);
|
|
74
42
|
_ts_decorate([
|
|
75
43
|
_utils.logErrors,
|
|
76
44
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/install.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport { getStartupVersion, log, logErrors } from '../../utils';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/install.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport { getStartupVersion, log, logErrors } from '../../utils';\nimport type { entry } from './registry/install';\nimport { Command } from './types';\n\nexport class Install extends Command<typeof entry> {\n @logErrors\n async execute() {\n if (!this.args.quiet) {\n log.info(`startup cli v${getStartupVersion()}`);\n }\n\n const options = [\n this.args.fix ? '--fix' : '',\n this.args.quiet ? '--quiet' : '',\n this.args.token === true ? '--token' : '',\n this.args.token === false ? '--no-token' : '',\n ].filter(option => !!option);\n\n const command = `npx @servicetitan/install ${options.join(' ')}`.trim();\n\n log.debug('install', command);\n\n execSync(command, { stdio: 'inherit' });\n\n return Promise.resolve(); // stops \"async method has no 'await' expression\" lint error\n }\n}\n"],"names":["Install","Command","execute","args","quiet","log","info","getStartupVersion","options","fix","token","filter","option","command","join","trim","debug","execSync","stdio","Promise","resolve"],"mappings":";;;;+BAKaA;;;eAAAA;;;+BALY;uBACyB;uBAE1B;;;;;;;;;;AAEjB,MAAMA,gBAAgBC,cAAO;IAChC,MACMC,UAAU;QACZ,IAAI,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK,EAAE;YAClBC,UAAG,CAACC,IAAI,CAAC,CAAC,aAAa,EAAEC,IAAAA,wBAAiB,KAAI;QAClD;QAEA,MAAMC,UAAU;YACZ,IAAI,CAACL,IAAI,CAACM,GAAG,GAAG,UAAU;YAC1B,IAAI,CAACN,IAAI,CAACC,KAAK,GAAG,YAAY;YAC9B,IAAI,CAACD,IAAI,CAACO,KAAK,KAAK,OAAO,YAAY;YACvC,IAAI,CAACP,IAAI,CAACO,KAAK,KAAK,QAAQ,eAAe;SAC9C,CAACC,MAAM,CAACC,CAAAA,SAAU,CAAC,CAACA;QAErB,MAAMC,UAAU,CAAC,0BAA0B,EAAEL,QAAQM,IAAI,CAAC,MAAM,CAACC,IAAI;QAErEV,UAAG,CAACW,KAAK,CAAC,WAAWH;QAErBI,IAAAA,uBAAQ,EAACJ,SAAS;YAAEK,OAAO;QAAU;QAErC,OAAOC,QAAQC,OAAO,IAAI,4DAA4D;IAC1F;AACJ"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { entry } from './registry/kendo-ui-license';
|
|
1
2
|
import { Command } from './types';
|
|
2
|
-
export declare class KendoUILicense extends Command {
|
|
3
|
-
static readonly allowRunFromGlobal = true;
|
|
4
|
-
static readonly description = "Install KendoReact license key";
|
|
3
|
+
export declare class KendoUILicense extends Command<typeof entry> {
|
|
5
4
|
execute(): Promise<void>;
|
|
6
5
|
private activateLicense;
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kendo-ui-license.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/kendo-ui-license.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA2BlC,qBAAa,cAAe,SAAQ,OAAO
|
|
1
|
+
{"version":3,"file":"kendo-ui-license.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/kendo-ui-license.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA2BlC,qBAAa,cAAe,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IAC/C,OAAO;YASC,eAAe;CAoBhC;AAED,wBAAsB,cAAc,kBAEnC"}
|
|
@@ -20,19 +20,6 @@ const _execa = /*#__PURE__*/ _interop_require_default(require("execa"));
|
|
|
20
20
|
const _utils = require("../../utils");
|
|
21
21
|
const _utils1 = require("../utils");
|
|
22
22
|
const _types = require("./types");
|
|
23
|
-
function _define_property(obj, key, value) {
|
|
24
|
-
if (key in obj) {
|
|
25
|
-
Object.defineProperty(obj, key, {
|
|
26
|
-
value: value,
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
obj[key] = value;
|
|
33
|
-
}
|
|
34
|
-
return obj;
|
|
35
|
-
}
|
|
36
23
|
function _interop_require_default(obj) {
|
|
37
24
|
return obj && obj.__esModule ? obj : {
|
|
38
25
|
default: obj
|
|
@@ -97,8 +84,6 @@ class KendoUILicense extends _types.Command {
|
|
|
97
84
|
}
|
|
98
85
|
}
|
|
99
86
|
}
|
|
100
|
-
_define_property(KendoUILicense, "allowRunFromGlobal", true);
|
|
101
|
-
_define_property(KendoUILicense, "description", 'Install KendoReact license key');
|
|
102
87
|
_ts_decorate([
|
|
103
88
|
_utils.logErrors,
|
|
104
89
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/kendo-ui-license.ts"],"sourcesContent":["import execa from 'execa';\nimport { log, logErrors } from '../../utils';\nimport { isModuleInstalled } from '../utils';\nimport { Command } from './types';\n\nconst ENCODED_LICENSE = `\n ZXlKaGJHY2lPaUpTVXpJMU5pSXNJblI1Y0NJNklreEpReUo5LmV5SndjbTlrZFdOMGN5STZXM3Np\n ZEhKcFlXd2lPbVpoYkhObExDSmpiMlJsSWpvaVMwVk9SRTlWU1ZKRlFVTlVJaXdpYkdsalpXNXpa\n VVY0Y0dseVlYUnBiMjVFWVhSbElqb3hOelEwT1RneU1USXdmU3g3SW5SeWFXRnNJanBtWVd4elpT\n d2lZMjlrWlNJNklrdEZUa1JQVlVsRFQwMVFURVZVUlNJc0lteHBZMlZ1YzJWRmVIQnBjbUYwYVc5\n dVJHRjBaU0k2TVRjME5EazRNakV5TUgwc2V5SjBjbWxoYkNJNlptRnNjMlVzSW1OdlpHVWlPaUpM\n UlU1RVQxVkpWbFZGSWl3aWJHbGpaVzV6WlVWNGNHbHlZWFJwYjI1RVlYUmxJam94TnpRME9UZ3lN\n VEl3ZlN4N0luUnlhV0ZzSWpwbVlXeHpaU3dpWTI5a1pTSTZJa3RGVGtSUFZVbEJUa2RWVEVGU0lp\n d2liR2xqWlc1elpVVjRjR2x5WVhScGIyNUVZWFJsSWpveE56UTBPVGd5TVRJd2ZWMHNJbWx1ZEdW\n bmNtbDBlU0k2SWxFNFpEVkdkMnR2Y1dsdWRGTkZiVXhYTTNwSVVuaDZiVTU1UVQwaUxDSnNhV05s\n Ym5ObFNHOXNaR1Z5SWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpYUnBkR0Z1TG1OdmJTSXNJ\n bWxoZENJNk1UY3hPVFV5T0RnNU1pd2lZWFZrSWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpY\n UnBkR0Z1TG1OdmJTSXNJblZ6WlhKSlpDSTZJalUxWXpsak1tSXpMVE5rWkRVdE5ETTVZeTA0Tm1V\n eUxXRTBNV0V6T0RReE5HSXdZaUo5LlE5Yi10em9CNXFFRVV0QXZudTJGVFdULVBram0yeFFxVGll\n T29rWjA3dmd6VFJVLXVnRHoxb2l3VTUzNTNzajhaQ2FQUFUzdTZqWnhsOWU0dXVJdkxpV05ManFW\n N29pR2FoVHhXbm0ydTAzZkxZUWhxbUg2T3dmYjBxcWs0TnFwbWRfZDhwZmtJa3J4YXRlY3FCdjBl\n UVk1N3Zjd3FOLVRqZm0td0FxMmt6RXRZd3NFT0JlMGtyLTFqVzBjYzBudHJadmZEcEVYLUFGZVE1\n cF95MzhxQkJucFBvVjlOYXB0Mi1aN0JMdTZhdEVDUUIxd3FDSjdCdUlpZERBWVlxdGhvU0gxOEZE\n V29BdUhQNU9DbjM3ZENBQU1PVFlqOEJUdDdLNWlyNHR6R0ZVNTdxY2VKeTNRQUhjWlNURGxpZnU5\n cXVKMjkyQnJuS3FveGlLUDA3UXIxUQ==\n`.replace(/\\s/g, '');\nconst ENVIRONMENT_VARIABLE = 'KENDO_UI_LICENSE';\nconst LICENSE = Buffer.from(ENCODED_LICENSE, 'base64').toString('ascii');\nconst LICENSING_PACKAGE = '@progress/kendo-licensing';\n\nexport class KendoUILicense extends Command {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/kendo-ui-license.ts"],"sourcesContent":["import execa from 'execa';\nimport { log, logErrors } from '../../utils';\nimport { isModuleInstalled } from '../utils';\nimport type { entry } from './registry/kendo-ui-license';\nimport { Command } from './types';\n\nconst ENCODED_LICENSE = `\n ZXlKaGJHY2lPaUpTVXpJMU5pSXNJblI1Y0NJNklreEpReUo5LmV5SndjbTlrZFdOMGN5STZXM3Np\n ZEhKcFlXd2lPbVpoYkhObExDSmpiMlJsSWpvaVMwVk9SRTlWU1ZKRlFVTlVJaXdpYkdsalpXNXpa\n VVY0Y0dseVlYUnBiMjVFWVhSbElqb3hOelEwT1RneU1USXdmU3g3SW5SeWFXRnNJanBtWVd4elpT\n d2lZMjlrWlNJNklrdEZUa1JQVlVsRFQwMVFURVZVUlNJc0lteHBZMlZ1YzJWRmVIQnBjbUYwYVc5\n dVJHRjBaU0k2TVRjME5EazRNakV5TUgwc2V5SjBjbWxoYkNJNlptRnNjMlVzSW1OdlpHVWlPaUpM\n UlU1RVQxVkpWbFZGSWl3aWJHbGpaVzV6WlVWNGNHbHlZWFJwYjI1RVlYUmxJam94TnpRME9UZ3lN\n VEl3ZlN4N0luUnlhV0ZzSWpwbVlXeHpaU3dpWTI5a1pTSTZJa3RGVGtSUFZVbEJUa2RWVEVGU0lp\n d2liR2xqWlc1elpVVjRjR2x5WVhScGIyNUVZWFJsSWpveE56UTBPVGd5TVRJd2ZWMHNJbWx1ZEdW\n bmNtbDBlU0k2SWxFNFpEVkdkMnR2Y1dsdWRGTkZiVXhYTTNwSVVuaDZiVTU1UVQwaUxDSnNhV05s\n Ym5ObFNHOXNaR1Z5SWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpYUnBkR0Z1TG1OdmJTSXNJ\n bWxoZENJNk1UY3hPVFV5T0RnNU1pd2lZWFZrSWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpY\n UnBkR0Z1TG1OdmJTSXNJblZ6WlhKSlpDSTZJalUxWXpsak1tSXpMVE5rWkRVdE5ETTVZeTA0Tm1V\n eUxXRTBNV0V6T0RReE5HSXdZaUo5LlE5Yi10em9CNXFFRVV0QXZudTJGVFdULVBram0yeFFxVGll\n T29rWjA3dmd6VFJVLXVnRHoxb2l3VTUzNTNzajhaQ2FQUFUzdTZqWnhsOWU0dXVJdkxpV05ManFW\n N29pR2FoVHhXbm0ydTAzZkxZUWhxbUg2T3dmYjBxcWs0TnFwbWRfZDhwZmtJa3J4YXRlY3FCdjBl\n UVk1N3Zjd3FOLVRqZm0td0FxMmt6RXRZd3NFT0JlMGtyLTFqVzBjYzBudHJadmZEcEVYLUFGZVE1\n cF95MzhxQkJucFBvVjlOYXB0Mi1aN0JMdTZhdEVDUUIxd3FDSjdCdUlpZERBWVlxdGhvU0gxOEZE\n V29BdUhQNU9DbjM3ZENBQU1PVFlqOEJUdDdLNWlyNHR6R0ZVNTdxY2VKeTNRQUhjWlNURGxpZnU5\n cXVKMjkyQnJuS3FveGlLUDA3UXIxUQ==\n`.replace(/\\s/g, '');\nconst ENVIRONMENT_VARIABLE = 'KENDO_UI_LICENSE';\nconst LICENSE = Buffer.from(ENCODED_LICENSE, 'base64').toString('ascii');\nconst LICENSING_PACKAGE = '@progress/kendo-licensing';\n\nexport class KendoUILicense extends Command<typeof entry> {\n async execute() {\n if (!isModuleInstalled(LICENSING_PACKAGE)) {\n return;\n }\n\n await this.activateLicense();\n }\n\n @logErrors\n private async activateLicense() {\n const env = !process.env[ENVIRONMENT_VARIABLE]\n ? { [ENVIRONMENT_VARIABLE]: LICENSE }\n : undefined;\n\n log.info(\n env\n ? 'Activating Kendo UI with embedded license...'\n : `Activating Kendo UI with license from environment...`\n );\n\n try {\n await execa('npx', ['kendo-ui-license', 'activate', '--no-install'], {\n env,\n stdio: 'inherit',\n });\n } catch (error: any) {\n throw new Error(`command failed with exit code ${error.exitCode}`);\n }\n }\n}\n\nexport async function kendoUILicense() {\n return new KendoUILicense({}).execute();\n}\n"],"names":["KendoUILicense","kendoUILicense","ENCODED_LICENSE","replace","ENVIRONMENT_VARIABLE","LICENSE","Buffer","from","toString","LICENSING_PACKAGE","Command","execute","isModuleInstalled","activateLicense","env","process","undefined","log","info","execa","stdio","error","Error","exitCode"],"mappings":";;;;;;;;;;;QA+BaA;eAAAA;;QAgCSC;eAAAA;;;8DA/DJ;uBACa;wBACG;uBAEV;;;;;;;;;;;;;;;AAExB,MAAMC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;AAoBzB,CAAC,CAACC,OAAO,CAAC,OAAO;AACjB,MAAMC,uBAAuB;AAC7B,MAAMC,UAAUC,OAAOC,IAAI,CAACL,iBAAiB,UAAUM,QAAQ,CAAC;AAChE,MAAMC,oBAAoB;AAEnB,MAAMT,uBAAuBU,cAAO;IACvC,MAAMC,UAAU;QACZ,IAAI,CAACC,IAAAA,yBAAiB,EAACH,oBAAoB;YACvC;QACJ;QAEA,MAAM,IAAI,CAACI,eAAe;IAC9B;IAEA,MACcA,kBAAkB;QAC5B,MAAMC,MAAM,CAACC,QAAQD,GAAG,CAACV,qBAAqB,GACxC;YAAE,CAACA,qBAAqB,EAAEC;QAAQ,IAClCW;QAENC,UAAG,CAACC,IAAI,CACJJ,MACM,iDACA,CAAC,oDAAoD,CAAC;QAGhE,IAAI;YACA,MAAMK,IAAAA,cAAK,EAAC,OAAO;gBAAC;gBAAoB;gBAAY;aAAe,EAAE;gBACjEL;gBACAM,OAAO;YACX;QACJ,EAAE,OAAOC,OAAY;YACjB,MAAM,IAAIC,MAAM,CAAC,8BAA8B,EAAED,MAAME,QAAQ,EAAE;QACrE;IACJ;AACJ;;;;;;;AAEO,eAAetB;IAClB,OAAO,IAAID,eAAe,CAAC,GAAGW,OAAO;AACzC"}
|
|
@@ -1,73 +1,6 @@
|
|
|
1
|
+
import type { entry } from './registry/lint';
|
|
1
2
|
import { Command } from './types';
|
|
2
|
-
declare
|
|
3
|
-
_: {
|
|
4
|
-
description: string;
|
|
5
|
-
array: true;
|
|
6
|
-
string: true;
|
|
7
|
-
};
|
|
8
|
-
fix: {
|
|
9
|
-
boolean: true;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
scope: {
|
|
13
|
-
array: true;
|
|
14
|
-
string: true;
|
|
15
|
-
hidden: true;
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
18
|
-
ignore: {
|
|
19
|
-
array: true;
|
|
20
|
-
string: true;
|
|
21
|
-
hidden: true;
|
|
22
|
-
description: string;
|
|
23
|
-
};
|
|
24
|
-
parallel: {
|
|
25
|
-
boolean: true;
|
|
26
|
-
hidden: true;
|
|
27
|
-
description: string;
|
|
28
|
-
};
|
|
29
|
-
paths: {
|
|
30
|
-
array: true;
|
|
31
|
-
string: true;
|
|
32
|
-
hidden: true;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare class Lint extends Command<typeof options> {
|
|
36
|
-
static readonly description = "Run eslint and stylelint";
|
|
37
|
-
static readonly greedy = true;
|
|
38
|
-
static readonly options: {
|
|
39
|
-
_: {
|
|
40
|
-
description: string;
|
|
41
|
-
array: true;
|
|
42
|
-
string: true;
|
|
43
|
-
};
|
|
44
|
-
fix: {
|
|
45
|
-
boolean: true;
|
|
46
|
-
description: string;
|
|
47
|
-
};
|
|
48
|
-
scope: {
|
|
49
|
-
array: true;
|
|
50
|
-
string: true;
|
|
51
|
-
hidden: true;
|
|
52
|
-
description: string;
|
|
53
|
-
};
|
|
54
|
-
ignore: {
|
|
55
|
-
array: true;
|
|
56
|
-
string: true;
|
|
57
|
-
hidden: true;
|
|
58
|
-
description: string;
|
|
59
|
-
};
|
|
60
|
-
parallel: {
|
|
61
|
-
boolean: true;
|
|
62
|
-
hidden: true;
|
|
63
|
-
description: string;
|
|
64
|
-
};
|
|
65
|
-
paths: {
|
|
66
|
-
array: true;
|
|
67
|
-
string: true;
|
|
68
|
-
hidden: true;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
3
|
+
export declare class Lint extends Command<typeof entry> {
|
|
71
4
|
execute(): Promise<void>;
|
|
72
5
|
private eslint;
|
|
73
6
|
private stylelint;
|
|
@@ -75,5 +8,4 @@ export declare class Lint extends Command<typeof options> {
|
|
|
75
8
|
private useParallelESLint;
|
|
76
9
|
private get paths();
|
|
77
10
|
}
|
|
78
|
-
export {};
|
|
79
11
|
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,qBAAa,IAAK,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IACrC,OAAO;YAOC,MAAM;YAoBN,SAAS;YAMT,WAAW;IAYzB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,KAAK,KAAK,GAGhB;CACJ"}
|
|
@@ -12,19 +12,6 @@ const _utils = require("../../utils");
|
|
|
12
12
|
const _utils1 = require("../utils");
|
|
13
13
|
const _stylelint = require("../utils/stylelint");
|
|
14
14
|
const _types = require("./types");
|
|
15
|
-
function _define_property(obj, key, value) {
|
|
16
|
-
if (key in obj) {
|
|
17
|
-
Object.defineProperty(obj, key, {
|
|
18
|
-
value: value,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
obj[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
15
|
function _ts_decorate(decorators, target, key, desc) {
|
|
29
16
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
30
17
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -34,39 +21,6 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
34
21
|
function _ts_metadata(k, v) {
|
|
35
22
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
36
23
|
}
|
|
37
|
-
const options = {
|
|
38
|
-
_: {
|
|
39
|
-
description: '[paths...]',
|
|
40
|
-
array: true,
|
|
41
|
-
string: true
|
|
42
|
-
},
|
|
43
|
-
fix: {
|
|
44
|
-
boolean: true,
|
|
45
|
-
description: 'Apply fixes for issues?'
|
|
46
|
-
},
|
|
47
|
-
scope: {
|
|
48
|
-
array: true,
|
|
49
|
-
string: true,
|
|
50
|
-
hidden: true,
|
|
51
|
-
description: 'Packages to lint'
|
|
52
|
-
},
|
|
53
|
-
ignore: {
|
|
54
|
-
array: true,
|
|
55
|
-
string: true,
|
|
56
|
-
hidden: true,
|
|
57
|
-
description: 'Packages to skip'
|
|
58
|
-
},
|
|
59
|
-
parallel: {
|
|
60
|
-
boolean: true,
|
|
61
|
-
hidden: true,
|
|
62
|
-
description: 'Lint each package separately'
|
|
63
|
-
},
|
|
64
|
-
paths: {
|
|
65
|
-
array: true,
|
|
66
|
-
string: true,
|
|
67
|
-
hidden: true
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
24
|
class Lint extends _types.Command {
|
|
71
25
|
async execute() {
|
|
72
26
|
await this.checkStyles();
|
|
@@ -129,9 +83,6 @@ class Lint extends _types.Command {
|
|
|
129
83
|
];
|
|
130
84
|
}
|
|
131
85
|
}
|
|
132
|
-
_define_property(Lint, "description", 'Run eslint and stylelint');
|
|
133
|
-
_define_property(Lint, "greedy", true);
|
|
134
|
-
_define_property(Lint, "options", options);
|
|
135
86
|
_ts_decorate([
|
|
136
87
|
_utils.logErrors,
|
|
137
88
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/lint.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { getPackages, log, logErrors } from '../../utils';\nimport { eslint, lernaExec } from '../utils';\nimport { stylelint } from '../utils/stylelint';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/lint.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { getPackages, log, logErrors } from '../../utils';\nimport { eslint, lernaExec } from '../utils';\nimport { stylelint } from '../utils/stylelint';\nimport type { entry } from './registry/lint';\nimport { Command } from './types';\n\nexport class Lint extends Command<typeof entry> {\n async execute() {\n await this.checkStyles();\n await this.eslint();\n await this.stylelint();\n }\n\n @logErrors\n private async eslint() {\n if (this.useParallelESLint()) {\n const { fix, ignore, scope } = this.args;\n const packages = getPackages({ scope, ignore });\n const args = fix ? ['--fix'] : [];\n\n await lernaExec({\n 'cmd': 'startup eslint',\n 'scope': packages.map(({ name }) => name),\n 'bail': false,\n '--': args,\n });\n return;\n }\n\n log.info('Running eslint...');\n await eslint({ fix: this.args.fix, paths: this.paths });\n }\n\n @logErrors\n private async stylelint() {\n log.info('Running stylelint...');\n await stylelint({ fix: this.args.fix, paths: this.paths });\n }\n\n @logErrors\n private async checkStyles() {\n const { ignore, scope } = this.args;\n\n const packages = ignore || scope ? getPackages({ ignore, scope }) : undefined;\n\n await lernaExec({\n cmd: 'startup styles-check',\n scope: packages?.map(({ name }) => name),\n stream: true,\n });\n }\n\n private useParallelESLint() {\n const { parallel, scope, ignore } = this.args;\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return !this.paths.length && (parallel || scope?.length || ignore?.length);\n }\n\n private get paths() {\n const { _ = [], paths = [] } = this.args;\n return [..._, ...paths];\n }\n}\n"],"names":["Lint","Command","execute","checkStyles","eslint","stylelint","useParallelESLint","fix","ignore","scope","args","packages","getPackages","lernaExec","map","name","log","info","paths","undefined","cmd","stream","parallel","length","_"],"mappings":"AAAA,uDAAuD;;;;+BAO1CA;;;eAAAA;;;uBAN+B;wBACV;2BACR;uBAEF;;;;;;;;;;AAEjB,MAAMA,aAAaC,cAAO;IAC7B,MAAMC,UAAU;QACZ,MAAM,IAAI,CAACC,WAAW;QACtB,MAAM,IAAI,CAACC,MAAM;QACjB,MAAM,IAAI,CAACC,SAAS;IACxB;IAEA,MACcD,SAAS;QACnB,IAAI,IAAI,CAACE,iBAAiB,IAAI;YAC1B,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAI,CAACC,IAAI;YACxC,MAAMC,WAAWC,IAAAA,kBAAW,EAAC;gBAAEH;gBAAOD;YAAO;YAC7C,MAAME,OAAOH,MAAM;gBAAC;aAAQ,GAAG,EAAE;YAEjC,MAAMM,IAAAA,iBAAS,EAAC;gBACZ,OAAO;gBACP,SAASF,SAASG,GAAG,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA;gBACpC,QAAQ;gBACR,MAAML;YACV;YACA;QACJ;QAEAM,UAAG,CAACC,IAAI,CAAC;QACT,MAAMb,IAAAA,cAAM,EAAC;YAAEG,KAAK,IAAI,CAACG,IAAI,CAACH,GAAG;YAAEW,OAAO,IAAI,CAACA,KAAK;QAAC;IACzD;IAEA,MACcb,YAAY;QACtBW,UAAG,CAACC,IAAI,CAAC;QACT,MAAMZ,IAAAA,oBAAS,EAAC;YAAEE,KAAK,IAAI,CAACG,IAAI,CAACH,GAAG;YAAEW,OAAO,IAAI,CAACA,KAAK;QAAC;IAC5D;IAEA,MACcf,cAAc;QACxB,MAAM,EAAEK,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAI,CAACC,IAAI;QAEnC,MAAMC,WAAWH,UAAUC,QAAQG,IAAAA,kBAAW,EAAC;YAAEJ;YAAQC;QAAM,KAAKU;QAEpE,MAAMN,IAAAA,iBAAS,EAAC;YACZO,KAAK;YACLX,KAAK,EAAEE,qBAAAA,+BAAAA,SAAUG,GAAG,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA;YACnCM,QAAQ;QACZ;IACJ;IAEQf,oBAAoB;QACxB,MAAM,EAAEgB,QAAQ,EAAEb,KAAK,EAAED,MAAM,EAAE,GAAG,IAAI,CAACE,IAAI;QAC7C,wEAAwE;QACxE,OAAO,CAAC,IAAI,CAACQ,KAAK,CAACK,MAAM,IAAKD,CAAAA,aAAYb,kBAAAA,4BAAAA,MAAOc,MAAM,MAAIf,mBAAAA,6BAAAA,OAAQe,MAAM,CAAD;IAC5E;IAEA,IAAYL,QAAQ;QAChB,MAAM,EAAEM,IAAI,EAAE,EAAEN,QAAQ,EAAE,EAAE,GAAG,IAAI,CAACR,IAAI;QACxC,OAAO;eAAIc;eAAMN;SAAM;IAC3B;AACJ"}
|
|
@@ -1,52 +1,10 @@
|
|
|
1
|
+
import type { entry } from './registry/mfe-check';
|
|
1
2
|
import { Command } from './types';
|
|
2
|
-
declare
|
|
3
|
-
metadata: {
|
|
4
|
-
description: string;
|
|
5
|
-
string: true;
|
|
6
|
-
demandOption: true;
|
|
7
|
-
requiresArg: true;
|
|
8
|
-
};
|
|
9
|
-
hostPackageJson: {
|
|
10
|
-
description: string;
|
|
11
|
-
array: true;
|
|
12
|
-
string: true;
|
|
13
|
-
demandOption: true;
|
|
14
|
-
requiresArg: true;
|
|
15
|
-
};
|
|
16
|
-
json: {
|
|
17
|
-
description: string;
|
|
18
|
-
boolean: true;
|
|
19
|
-
default: boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare class MfeCheck extends Command<typeof options> {
|
|
23
|
-
static readonly allowRunFromGlobal = true;
|
|
24
|
-
static readonly description = "Check MFE/host dependency compatibility";
|
|
25
|
-
static readonly options: {
|
|
26
|
-
metadata: {
|
|
27
|
-
description: string;
|
|
28
|
-
string: true;
|
|
29
|
-
demandOption: true;
|
|
30
|
-
requiresArg: true;
|
|
31
|
-
};
|
|
32
|
-
hostPackageJson: {
|
|
33
|
-
description: string;
|
|
34
|
-
array: true;
|
|
35
|
-
string: true;
|
|
36
|
-
demandOption: true;
|
|
37
|
-
requiresArg: true;
|
|
38
|
-
};
|
|
39
|
-
json: {
|
|
40
|
-
description: string;
|
|
41
|
-
boolean: true;
|
|
42
|
-
default: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
3
|
+
export declare class MfeCheck extends Command<typeof entry> {
|
|
45
4
|
execute(): Promise<void>;
|
|
46
5
|
private getHostPackageData;
|
|
47
6
|
private checkCompatibility;
|
|
48
7
|
private outputJson;
|
|
49
8
|
private outputHumanReadable;
|
|
50
9
|
}
|
|
51
|
-
export {};
|
|
52
10
|
//# sourceMappingURL=mfe-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfe-check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mfe-check.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mfe-check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mfe-check.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAuBlC,qBAAa,QAAS,SAAQ,OAAO,CAAC,OAAO,KAAK,CAAC;IAEzC,OAAO;IAoBb,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,mBAAmB;CA2B9B"}
|
|
@@ -13,19 +13,6 @@ const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
|
13
13
|
const _utils = require("../../utils");
|
|
14
14
|
const _utils1 = require("../../webpack/configs/utils");
|
|
15
15
|
const _types = require("./types");
|
|
16
|
-
function _define_property(obj, key, value) {
|
|
17
|
-
if (key in obj) {
|
|
18
|
-
Object.defineProperty(obj, key, {
|
|
19
|
-
value: value,
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
obj[key] = value;
|
|
26
|
-
}
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
16
|
function _interop_require_default(obj) {
|
|
30
17
|
return obj && obj.__esModule ? obj : {
|
|
31
18
|
default: obj
|
|
@@ -40,26 +27,6 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
40
27
|
function _ts_metadata(k, v) {
|
|
41
28
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
42
29
|
}
|
|
43
|
-
const options = {
|
|
44
|
-
metadata: {
|
|
45
|
-
description: "Path to MFE's metadata.json file, can be generated with the 'mfe-generate-metadata' command",
|
|
46
|
-
string: true,
|
|
47
|
-
demandOption: true,
|
|
48
|
-
requiresArg: true
|
|
49
|
-
},
|
|
50
|
-
hostPackageJson: {
|
|
51
|
-
description: 'Path(s) to host package.json files',
|
|
52
|
-
array: true,
|
|
53
|
-
string: true,
|
|
54
|
-
demandOption: true,
|
|
55
|
-
requiresArg: true
|
|
56
|
-
},
|
|
57
|
-
json: {
|
|
58
|
-
description: 'Output results as JSON',
|
|
59
|
-
boolean: true,
|
|
60
|
-
default: false
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
30
|
class MfeCheck extends _types.Command {
|
|
64
31
|
async execute() {
|
|
65
32
|
const { metadata: metadataPath, hostPackageJson, json } = this.args;
|
|
@@ -132,9 +99,6 @@ class MfeCheck extends _types.Command {
|
|
|
132
99
|
_utils.log.error('Result: full bundle required');
|
|
133
100
|
}
|
|
134
101
|
}
|
|
135
|
-
_define_property(MfeCheck, "allowRunFromGlobal", true);
|
|
136
|
-
_define_property(MfeCheck, "description", 'Check MFE/host dependency compatibility');
|
|
137
|
-
_define_property(MfeCheck, "options", options);
|
|
138
102
|
_ts_decorate([
|
|
139
103
|
_utils.logErrors,
|
|
140
104
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/mfe-check.ts"],"sourcesContent":["import { getVersionMismatches } from '@servicetitan/startup-utils';\nimport path from 'node:path';\nimport {\n isWebComponent,\n loadSharedDependencies,\n log,\n logErrors,\n readJson,\n toArray,\n} from '../../utils';\nimport { Metadata } from '../../webpack/configs/types';\nimport { getExposedDependencies } from '../../webpack/configs/utils';\nimport { Command
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/mfe-check.ts"],"sourcesContent":["import { getVersionMismatches } from '@servicetitan/startup-utils';\nimport path from 'node:path';\nimport {\n isWebComponent,\n loadSharedDependencies,\n log,\n logErrors,\n readJson,\n toArray,\n} from '../../utils';\nimport { Metadata } from '../../webpack/configs/types';\nimport { getExposedDependencies } from '../../webpack/configs/utils';\nimport type { entry } from './registry/mfe-check';\nimport { Command } from './types';\n\ninterface HostPackageJSON {\n name: string;\n dependencies: Record<string, string>;\n cli?: {\n 'web-component'?: boolean | string | object;\n 'webpack'?: {\n 'expose-shared-dependencies'?: boolean;\n 'shared-dependencies'?: Record<string, string>;\n };\n };\n}\n\ninterface CompatibilityResult {\n name: string;\n compatible: boolean;\n bundleType: 'light' | 'full';\n mismatches?: Record<string, { host: string; package: string }>;\n isSharedDependenciesEnabled: boolean;\n isHostMfe: boolean;\n}\n\nexport class MfeCheck extends Command<typeof entry> {\n @logErrors\n async execute() {\n const { metadata: metadataPath, hostPackageJson, json } = this.args;\n const mfeMetadata = readJson<Metadata>(path.resolve(metadataPath));\n const hostPackageJsonPaths = toArray(hostPackageJson);\n const hostData = this.getHostPackageData(hostPackageJsonPaths);\n const result = this.checkCompatibility(mfeMetadata, hostData);\n\n if (json) {\n this.outputJson(result);\n } else {\n this.outputHumanReadable(result);\n }\n\n if (!result.compatible) {\n process.exitCode = 1;\n }\n\n return Promise.resolve();\n }\n\n private getHostPackageData(packageJsonPaths: string[]): HostPackageJSON {\n const packages = packageJsonPaths.map(packageJsonPath =>\n readJson<HostPackageJSON>(path.resolve(packageJsonPath))\n );\n const mergedDependencies = packages.reduceRight<HostPackageJSON['dependencies']>(\n (result, currentPackage) => Object.assign(result, currentPackage.dependencies),\n {}\n );\n const mainPackage = packages[0];\n\n return {\n name: mainPackage.name,\n cli: mainPackage.cli,\n dependencies: mergedDependencies,\n };\n }\n\n private checkCompatibility(\n mfeMetadata: Metadata,\n hostData: HostPackageJSON\n ): CompatibilityResult {\n const mfeSharedDependencies = mfeMetadata.sharedDependencies;\n const hostSharedDependencies = loadSharedDependencies(\n hostData.dependencies,\n hostData.cli?.webpack?.['shared-dependencies']\n );\n const exposedDependencies = getExposedDependencies(\n hostSharedDependencies,\n hostData.dependencies\n );\n const mismatchResult = getVersionMismatches(\n exposedDependencies,\n mfeMetadata.dependencies,\n mfeSharedDependencies\n );\n\n const isHostMfe = isWebComponent(hostData);\n const isSharedDependenciesEnabled =\n hostData.cli?.webpack?.['expose-shared-dependencies'] === true;\n const compatible = !isHostMfe && !mismatchResult && isSharedDependenciesEnabled;\n\n return {\n name: mfeMetadata.name,\n compatible,\n bundleType: compatible ? 'light' : 'full',\n isSharedDependenciesEnabled,\n isHostMfe,\n ...(mismatchResult ? { mismatches: mismatchResult } : {}),\n };\n }\n\n private outputJson(result: CompatibilityResult) {\n process.stdout.write(JSON.stringify(result, null, 2) + '\\n');\n }\n\n private outputHumanReadable(result: CompatibilityResult) {\n log.info(`Checking ${result.name}...`);\n\n if (result.isHostMfe) {\n log.error('Skipping compatibility check because host is an MFE');\n return;\n }\n\n if (result.compatible) {\n log.info('Compatible: light bundle can be used');\n return;\n }\n\n if (result.mismatches) {\n log.error('Dependency mismatch found:');\n\n for (const [dep, versions] of Object.entries(result.mismatches)) {\n log.error(` ${dep}: host=${versions.host}, package=${versions.package}`);\n }\n }\n\n if (!result.isSharedDependenciesEnabled) {\n log.error('expose-shared-dependencies is not enabled in host package.json');\n }\n\n log.error('Result: full bundle required');\n }\n}\n"],"names":["MfeCheck","Command","execute","metadata","metadataPath","hostPackageJson","json","args","mfeMetadata","readJson","path","resolve","hostPackageJsonPaths","toArray","hostData","getHostPackageData","result","checkCompatibility","outputJson","outputHumanReadable","compatible","process","exitCode","Promise","packageJsonPaths","packages","map","packageJsonPath","mergedDependencies","reduceRight","currentPackage","Object","assign","dependencies","mainPackage","name","cli","mfeSharedDependencies","sharedDependencies","hostSharedDependencies","loadSharedDependencies","webpack","exposedDependencies","getExposedDependencies","mismatchResult","getVersionMismatches","isHostMfe","isWebComponent","isSharedDependenciesEnabled","bundleType","mismatches","stdout","write","JSON","stringify","log","info","error","dep","versions","entries","host","package"],"mappings":";;;;+BAoCaA;;;eAAAA;;;8BApCwB;iEACpB;uBAQV;wBAEgC;uBAEf;;;;;;;;;;;;;;;AAuBjB,MAAMA,iBAAiBC,cAAO;IACjC,MACMC,UAAU;QACZ,MAAM,EAAEC,UAAUC,YAAY,EAAEC,eAAe,EAAEC,IAAI,EAAE,GAAG,IAAI,CAACC,IAAI;QACnE,MAAMC,cAAcC,IAAAA,eAAQ,EAAWC,iBAAI,CAACC,OAAO,CAACP;QACpD,MAAMQ,uBAAuBC,IAAAA,cAAO,EAACR;QACrC,MAAMS,WAAW,IAAI,CAACC,kBAAkB,CAACH;QACzC,MAAMI,SAAS,IAAI,CAACC,kBAAkB,CAACT,aAAaM;QAEpD,IAAIR,MAAM;YACN,IAAI,CAACY,UAAU,CAACF;QACpB,OAAO;YACH,IAAI,CAACG,mBAAmB,CAACH;QAC7B;QAEA,IAAI,CAACA,OAAOI,UAAU,EAAE;YACpBC,QAAQC,QAAQ,GAAG;QACvB;QAEA,OAAOC,QAAQZ,OAAO;IAC1B;IAEQI,mBAAmBS,gBAA0B,EAAmB;QACpE,MAAMC,WAAWD,iBAAiBE,GAAG,CAACC,CAAAA,kBAClClB,IAAAA,eAAQ,EAAkBC,iBAAI,CAACC,OAAO,CAACgB;QAE3C,MAAMC,qBAAqBH,SAASI,WAAW,CAC3C,CAACb,QAAQc,iBAAmBC,OAAOC,MAAM,CAAChB,QAAQc,eAAeG,YAAY,GAC7E,CAAC;QAEL,MAAMC,cAAcT,QAAQ,CAAC,EAAE;QAE/B,OAAO;YACHU,MAAMD,YAAYC,IAAI;YACtBC,KAAKF,YAAYE,GAAG;YACpBH,cAAcL;QAClB;IACJ;IAEQX,mBACJT,WAAqB,EACrBM,QAAyB,EACN;YAIfA,uBAAAA,eAcAA,wBAAAA;QAjBJ,MAAMuB,wBAAwB7B,YAAY8B,kBAAkB;QAC5D,MAAMC,yBAAyBC,IAAAA,6BAAsB,EACjD1B,SAASmB,YAAY,GACrBnB,gBAAAA,SAASsB,GAAG,cAAZtB,qCAAAA,wBAAAA,cAAc2B,OAAO,cAArB3B,4CAAAA,qBAAuB,CAAC,sBAAsB;QAElD,MAAM4B,sBAAsBC,IAAAA,8BAAsB,EAC9CJ,wBACAzB,SAASmB,YAAY;QAEzB,MAAMW,iBAAiBC,IAAAA,kCAAoB,EACvCH,qBACAlC,YAAYyB,YAAY,EACxBI;QAGJ,MAAMS,YAAYC,IAAAA,qBAAc,EAACjC;QACjC,MAAMkC,8BACFlC,EAAAA,iBAAAA,SAASsB,GAAG,cAAZtB,sCAAAA,yBAAAA,eAAc2B,OAAO,cAArB3B,6CAAAA,sBAAuB,CAAC,6BAA6B,MAAK;QAC9D,MAAMM,aAAa,CAAC0B,aAAa,CAACF,kBAAkBI;QAEpD,OAAO;YACHb,MAAM3B,YAAY2B,IAAI;YACtBf;YACA6B,YAAY7B,aAAa,UAAU;YACnC4B;YACAF;YACA,GAAIF,iBAAiB;gBAAEM,YAAYN;YAAe,IAAI,CAAC,CAAC;QAC5D;IACJ;IAEQ1B,WAAWF,MAA2B,EAAE;QAC5CK,QAAQ8B,MAAM,CAACC,KAAK,CAACC,KAAKC,SAAS,CAACtC,QAAQ,MAAM,KAAK;IAC3D;IAEQG,oBAAoBH,MAA2B,EAAE;QACrDuC,UAAG,CAACC,IAAI,CAAC,CAAC,SAAS,EAAExC,OAAOmB,IAAI,CAAC,GAAG,CAAC;QAErC,IAAInB,OAAO8B,SAAS,EAAE;YAClBS,UAAG,CAACE,KAAK,CAAC;YACV;QACJ;QAEA,IAAIzC,OAAOI,UAAU,EAAE;YACnBmC,UAAG,CAACC,IAAI,CAAC;YACT;QACJ;QAEA,IAAIxC,OAAOkC,UAAU,EAAE;YACnBK,UAAG,CAACE,KAAK,CAAC;YAEV,KAAK,MAAM,CAACC,KAAKC,SAAS,IAAI5B,OAAO6B,OAAO,CAAC5C,OAAOkC,UAAU,EAAG;gBAC7DK,UAAG,CAACE,KAAK,CAAC,CAAC,EAAE,EAAEC,IAAI,OAAO,EAAEC,SAASE,IAAI,CAAC,UAAU,EAAEF,SAASG,OAAO,EAAE;YAC5E;QACJ;QAEA,IAAI,CAAC9C,OAAOgC,2BAA2B,EAAE;YACrCO,UAAG,CAACE,KAAK,CAAC;QACd;QAEAF,UAAG,CAACE,KAAK,CAAC;IACd;AACJ"}
|