@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
|
@@ -437,6 +437,23 @@ describe('[startup] Cli Utils', () => {
|
|
|
437
437
|
);
|
|
438
438
|
});
|
|
439
439
|
|
|
440
|
+
describe('with PORT environment variable', () => {
|
|
441
|
+
const port = '3456';
|
|
442
|
+
|
|
443
|
+
beforeEach(() => (process.env.PORT = port));
|
|
444
|
+
|
|
445
|
+
afterEach(() => delete process.env.PORT);
|
|
446
|
+
|
|
447
|
+
test('uses environment variable', async () => {
|
|
448
|
+
await subject();
|
|
449
|
+
|
|
450
|
+
expect(WebpackDevServer).toHaveBeenCalledWith(
|
|
451
|
+
expect.objectContaining({ port: Number(port) }),
|
|
452
|
+
expect.anything()
|
|
453
|
+
);
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
|
|
440
457
|
describe('with "emitExposedDependencies"', () => {
|
|
441
458
|
beforeEach(() => (options = { emitExposedDependencies: true }));
|
|
442
459
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { log } from '../../../utils';
|
|
2
|
-
import {
|
|
2
|
+
import { CommandEntry } from '../../commands/types';
|
|
3
3
|
import { checkStartupLocation } from '../check-startup-location';
|
|
4
4
|
import { npmGetProjectRoot } from '../cli-npm';
|
|
5
5
|
|
|
@@ -9,24 +9,18 @@ jest.mock('../../../utils', () => ({
|
|
|
9
9
|
}));
|
|
10
10
|
jest.mock('../cli-npm');
|
|
11
11
|
|
|
12
|
-
class TestCommand extends Command {
|
|
13
|
-
async execute() {
|
|
14
|
-
// no-op
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
12
|
describe('[startup] Cli Utils', () => {
|
|
19
13
|
describe(checkStartupLocation.name, () => {
|
|
20
14
|
const originalSkipLocationCheck = process.env.SKIP_STARTUP_LOCATION_CHECK;
|
|
21
15
|
const commandName: any = 'test';
|
|
22
|
-
let
|
|
16
|
+
let entry: CommandEntry | undefined;
|
|
23
17
|
|
|
24
18
|
beforeEach(() => {
|
|
25
19
|
jest.clearAllMocks();
|
|
26
20
|
jest.mocked(npmGetProjectRoot).mockReturnValue(process.cwd());
|
|
27
21
|
jest.spyOn(process, 'exit').mockImplementation(jest.fn() as any);
|
|
28
22
|
delete process.env.SKIP_STARTUP_LOCATION_CHECK;
|
|
29
|
-
|
|
23
|
+
entry = undefined;
|
|
30
24
|
});
|
|
31
25
|
|
|
32
26
|
afterAll(() => {
|
|
@@ -35,7 +29,7 @@ describe('[startup] Cli Utils', () => {
|
|
|
35
29
|
}
|
|
36
30
|
});
|
|
37
31
|
|
|
38
|
-
const subject = () => checkStartupLocation(commandName,
|
|
32
|
+
const subject = () => checkStartupLocation(commandName, entry);
|
|
39
33
|
|
|
40
34
|
function itDoesNothing() {
|
|
41
35
|
test('does nothing', () => {
|
|
@@ -67,13 +61,7 @@ describe('[startup] Cli Utils', () => {
|
|
|
67
61
|
});
|
|
68
62
|
|
|
69
63
|
describe('when command allows running from global location', () => {
|
|
70
|
-
beforeEach(() => {
|
|
71
|
-
(mockCommand.constructor as any).allowRunFromGlobal = true;
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
afterEach(() => {
|
|
75
|
-
delete (mockCommand.constructor as any).allowRunFromGlobal;
|
|
76
|
-
});
|
|
64
|
+
beforeEach(() => (entry = { allowRunFromGlobal: true }));
|
|
77
65
|
|
|
78
66
|
itDoesNothing();
|
|
79
67
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import { getConfigurationSafe } from '../../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { CommandEntry } from '../../commands/types';
|
|
4
4
|
import { setNodeOptions } from '../set-node-options';
|
|
5
5
|
|
|
6
6
|
jest.mock('os', () => ({
|
|
@@ -12,37 +12,23 @@ jest.mock('../../../utils', () => ({
|
|
|
12
12
|
getConfigurationSafe: jest.fn(() => ({})),
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
|
-
class MockCommand extends Command {
|
|
16
|
-
static get greedy() {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async execute() {
|
|
21
|
-
return Promise.resolve();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
15
|
describe(`[startup] utils:${setNodeOptions.name}`, () => {
|
|
26
16
|
const MB = 1024 * 1024;
|
|
27
17
|
const DEFAULT_SIZE = 8192;
|
|
28
18
|
const originalNodeOptions = process.env.NODE_OPTIONS;
|
|
29
19
|
const maxOldSpaceSize = `--max_old_space_size=${DEFAULT_SIZE}`;
|
|
30
20
|
const commandName: any = 'mock';
|
|
31
|
-
|
|
32
|
-
let greedy: boolean;
|
|
21
|
+
let entry: CommandEntry | undefined;
|
|
33
22
|
|
|
34
23
|
beforeEach(() => {
|
|
35
|
-
greedy = true;
|
|
36
24
|
delete process.env.NODE_OPTIONS;
|
|
37
25
|
(os.totalmem as jest.Mock).mockReturnValue(16384 * MB);
|
|
38
|
-
|
|
39
|
-
() => greedy
|
|
40
|
-
);
|
|
26
|
+
entry = { greedy: true };
|
|
41
27
|
});
|
|
42
28
|
|
|
43
29
|
afterAll(() => (process.env.NODE_OPTIONS = originalNodeOptions));
|
|
44
30
|
|
|
45
|
-
const subject = () => setNodeOptions(commandName,
|
|
31
|
+
const subject = () => setNodeOptions(commandName, entry);
|
|
46
32
|
|
|
47
33
|
test(`returns true and adds ${maxOldSpaceSize} to process.env.NODE_OPTIONS`, () => {
|
|
48
34
|
expect(subject()).toBe(true);
|
|
@@ -51,7 +37,7 @@ describe(`[startup] utils:${setNodeOptions.name}`, () => {
|
|
|
51
37
|
});
|
|
52
38
|
|
|
53
39
|
describe('when the command is not greedy', () => {
|
|
54
|
-
beforeEach(() => (
|
|
40
|
+
beforeEach(() => (entry = undefined));
|
|
55
41
|
|
|
56
42
|
test('returns false and does not set NODE_OPTIONS', () => {
|
|
57
43
|
expect(subject()).toBe(false);
|
package/src/cli/utils/bundle.ts
CHANGED
|
@@ -157,7 +157,7 @@ async function runServe({ devServer = {}, ...config }: Configuration) {
|
|
|
157
157
|
const compiler = createWebpackCompiler(config);
|
|
158
158
|
const host = devServer.host ?? 'localhost';
|
|
159
159
|
const port = await getPortPromise({
|
|
160
|
-
port: Number(devServer.port) || 8080,
|
|
160
|
+
port: Number(process.env.PORT) || Number(devServer.port) || 8080,
|
|
161
161
|
host,
|
|
162
162
|
});
|
|
163
163
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CommandName, log } from '../../utils';
|
|
2
|
-
import {
|
|
2
|
+
import { CommandEntry } from '../commands/types';
|
|
3
3
|
import { npmGetProjectRoot } from './cli-npm';
|
|
4
4
|
|
|
5
|
-
export function checkStartupLocation(
|
|
6
|
-
|
|
5
|
+
export function checkStartupLocation(
|
|
6
|
+
commandName: CommandName,
|
|
7
|
+
{ allowRunFromGlobal }: CommandEntry = {}
|
|
8
|
+
) {
|
|
7
9
|
if (allowRunFromGlobal || process.env.SKIP_STARTUP_LOCATION_CHECK) {
|
|
8
10
|
return;
|
|
9
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import { CommandName, getConfigurationSafe } from '../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { CommandEntry } from '../commands/types';
|
|
4
4
|
|
|
5
5
|
const MAX_OLD_SPACE_SIZE_OPTION = 'max_old_space_size';
|
|
6
6
|
const DEFAULT_MAX_OLD_SPACE_SIZE_MB = 8192;
|
|
@@ -8,10 +8,10 @@ const MIN_REMAINING_MEMORY_MB = 512;
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Apply global defaults and custom CLI configuration to process.env.NODE_OPTIONS
|
|
11
|
-
* @param
|
|
11
|
+
* @param entry - the command's registry entry
|
|
12
12
|
* @returns whether process's NODE_OPTIONS were changed
|
|
13
13
|
*/
|
|
14
|
-
export function setNodeOptions(commandName: CommandName,
|
|
14
|
+
export function setNodeOptions(commandName: CommandName, { greedy }: CommandEntry = {}) {
|
|
15
15
|
const cliConfig = getConfigurationSafe();
|
|
16
16
|
const cmdConfig = cliConfig[commandName];
|
|
17
17
|
|
|
@@ -25,7 +25,6 @@ export function setNodeOptions(commandName: CommandName, command: Command) {
|
|
|
25
25
|
}, oldNodeOptions)
|
|
26
26
|
.trim();
|
|
27
27
|
|
|
28
|
-
const greedy = (command.constructor as typeof Command).greedy;
|
|
29
28
|
const newNodeOptions = ensureMaxOldSpaceSize(mergedOptions, greedy);
|
|
30
29
|
if (newNodeOptions !== oldNodeOptions) {
|
|
31
30
|
process.env.NODE_OPTIONS = newNodeOptions;
|
|
@@ -1,118 +1,47 @@
|
|
|
1
|
-
import { fs, vol } from 'memfs';
|
|
2
1
|
import { getPackageData, getPackageDependencyVersion } from '../get-package-data';
|
|
2
|
+
import { readJson } from '../read-json';
|
|
3
3
|
|
|
4
|
-
jest.mock('
|
|
4
|
+
jest.mock('../read-json', () => ({ readJson: jest.fn() }));
|
|
5
5
|
|
|
6
6
|
describe(`[startup] Utils`, () => {
|
|
7
7
|
describe(`${getPackageData.name}`, () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
name: 'packageName',
|
|
17
|
-
dependencies: { foo: '1.1.0', baz: '3.0.0' },
|
|
18
|
-
}),
|
|
19
|
-
'../package.json': JSON.stringify({
|
|
20
|
-
workspaces: ['packages/*'],
|
|
21
|
-
dependencies: { foo: '1.0.0', bar: '2.0.0' },
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
test('returns merged dependencies (local overrides root)', () => {
|
|
27
|
-
expect(subject()).toEqual({
|
|
28
|
-
name: 'packageName',
|
|
29
|
-
dependencies: { foo: '1.1.0', bar: '2.0.0', baz: '3.0.0' },
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
describe('when no root package.json found', () => {
|
|
35
|
-
beforeEach(() => {
|
|
36
|
-
vol.fromJSON({
|
|
37
|
-
'./package.json': JSON.stringify({
|
|
38
|
-
name: 'rootPackage',
|
|
39
|
-
workspaces: ['packages/*'],
|
|
40
|
-
dependencies: { foo: '1.0.0' },
|
|
41
|
-
}),
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
test('returns only local dependencies', () => {
|
|
46
|
-
expect(subject()).toEqual({
|
|
47
|
-
name: 'rootPackage',
|
|
48
|
-
dependencies: { foo: '1.0.0' },
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
describe('when root has lerna.json with packages instead of workspaces', () => {
|
|
54
|
-
beforeEach(() => {
|
|
55
|
-
vol.fromJSON({
|
|
56
|
-
'./package.json': JSON.stringify({
|
|
57
|
-
name: 'packageName',
|
|
58
|
-
version: '2.0.0',
|
|
59
|
-
dependencies: { foo: '1.0.0' },
|
|
60
|
-
}),
|
|
61
|
-
'../package.json': JSON.stringify({
|
|
62
|
-
dependencies: { bar: '2.0.0' },
|
|
63
|
-
}),
|
|
64
|
-
'../lerna.json': JSON.stringify({
|
|
65
|
-
packages: ['packages/*'],
|
|
66
|
-
}),
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
test('returns dependencies from root discovered via lerna.json', () => {
|
|
71
|
-
expect(subject()).toEqual({
|
|
8
|
+
const packageJson = './package.json';
|
|
9
|
+
const ancestorPackageJson = '../../package.json';
|
|
10
|
+
let packages: Record<string, Record<string, any>>;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
packages = {
|
|
14
|
+
[ancestorPackageJson]: { dependencies: { foo: '1.0.0', bar: '2.0.0' } },
|
|
15
|
+
[packageJson]: {
|
|
72
16
|
name: 'packageName',
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
17
|
+
dependencies: { foo: '1.1.0', baz: '3.0.0' },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
jest.mocked(readJson).mockImplementation(path => packages[path] ?? {});
|
|
77
21
|
});
|
|
78
22
|
|
|
79
|
-
|
|
80
|
-
beforeEach(() => {
|
|
81
|
-
vol.fromJSON({
|
|
82
|
-
'./package.json': JSON.stringify({
|
|
83
|
-
name: 'packageName',
|
|
84
|
-
version: '3.0.0',
|
|
85
|
-
dependencies: { foo: '1.0.0' },
|
|
86
|
-
}),
|
|
87
|
-
'../lerna.json': JSON.stringify({
|
|
88
|
-
packages: ['packages/*'],
|
|
89
|
-
}),
|
|
90
|
-
});
|
|
91
|
-
});
|
|
23
|
+
const subject = () => getPackageData();
|
|
92
24
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
dependencies
|
|
98
|
-
|
|
25
|
+
test(`returns merged dependencies from ${packageJson} and ${ancestorPackageJson}`, () => {
|
|
26
|
+
expect(subject()).toEqual({
|
|
27
|
+
name: packages[packageJson].name,
|
|
28
|
+
dependencies: {
|
|
29
|
+
...packages[ancestorPackageJson].dependencies,
|
|
30
|
+
...packages[packageJson].dependencies,
|
|
31
|
+
},
|
|
99
32
|
});
|
|
100
33
|
});
|
|
101
34
|
|
|
102
|
-
describe(
|
|
35
|
+
describe(`when ${packageJson} contains sharedDependencies`, () => {
|
|
103
36
|
const sharedDependencies = { react: 'SharedDependencies.React' };
|
|
104
37
|
|
|
105
38
|
beforeEach(() => {
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
name: 'packageName',
|
|
109
|
-
dependencies: { foo: '1.0.0' },
|
|
110
|
-
cli: { webpack: { 'shared-dependencies': sharedDependencies } },
|
|
111
|
-
}),
|
|
39
|
+
Object.assign(packages[packageJson], {
|
|
40
|
+
cli: { webpack: { 'shared-dependencies': sharedDependencies } },
|
|
112
41
|
});
|
|
113
42
|
});
|
|
114
43
|
|
|
115
|
-
test('
|
|
44
|
+
test('returns sharedDependencies', () => {
|
|
116
45
|
expect(subject()).toEqual(expect.objectContaining({ sharedDependencies }));
|
|
117
46
|
});
|
|
118
47
|
});
|
package/src/utils/find-up.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { findUp } from './find-up';
|
|
3
|
-
import { readJson, readJsonSafe } from './read-json';
|
|
1
|
+
import { readJson } from './read-json';
|
|
4
2
|
|
|
5
3
|
interface PackageData {
|
|
6
4
|
name: string;
|
|
@@ -16,36 +14,13 @@ export function getPackageData(): PackageData {
|
|
|
16
14
|
name: packageJson.name,
|
|
17
15
|
version: packageJson.version,
|
|
18
16
|
dependencies: {
|
|
19
|
-
...
|
|
17
|
+
...readJson('../../package.json').dependencies,
|
|
20
18
|
...packageJson.dependencies,
|
|
21
19
|
},
|
|
22
20
|
sharedDependencies: packageJson.cli?.webpack?.['shared-dependencies'],
|
|
23
21
|
};
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
function findRootDependencies() {
|
|
27
|
-
const cwd = path.resolve('./');
|
|
28
|
-
const root = findUp(directory => {
|
|
29
|
-
if (directory === cwd) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
const pkgPath = path.join(directory, 'package.json');
|
|
33
|
-
const pkg = readJsonSafe<{ workspaces?: string[]; dependencies?: Record<string, string> }>(
|
|
34
|
-
pkgPath
|
|
35
|
-
);
|
|
36
|
-
if (pkg?.workspaces) {
|
|
37
|
-
return pkg;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const lernaPath = path.join(directory, 'lerna.json');
|
|
41
|
-
if (readJsonSafe<{ packages?: string[] }>(lernaPath)?.packages) {
|
|
42
|
-
return pkg ?? {};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
return root?.dependencies ?? {};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
24
|
export function getPackageDependencyVersion(dependency: string, defaultVersion?: string) {
|
|
50
25
|
try {
|
|
51
26
|
const { version } = require(`${dependency}/package.json`);
|
package/src/utils/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './find-package-lock';
|
|
2
1
|
export * from './find-packages';
|
|
3
2
|
export * from './find-up';
|
|
4
3
|
export * from './format-duration';
|
|
@@ -11,7 +10,6 @@ export * from './get-folders';
|
|
|
11
10
|
export * from './get-jest-config';
|
|
12
11
|
export * from './get-package-data';
|
|
13
12
|
export * from './get-package-name';
|
|
14
|
-
export * from './get-package-version';
|
|
15
13
|
export * from './get-packages';
|
|
16
14
|
export * from './get-startup-version';
|
|
17
15
|
export * from './get-tsconfig';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
1
3
|
import { Configuration } from 'webpack';
|
|
2
|
-
import {
|
|
4
|
+
import { findUp } from '../../utils';
|
|
3
5
|
import { Context, Overrides } from './types';
|
|
4
6
|
|
|
5
7
|
type Config = Configuration['cache'];
|
|
@@ -26,3 +28,10 @@ export function cacheConfig(context: Context, _overrides: Overrides): Result {
|
|
|
26
28
|
infrastructureLogging: { level: 'error' },
|
|
27
29
|
};
|
|
28
30
|
}
|
|
31
|
+
|
|
32
|
+
function findPackageLock() {
|
|
33
|
+
return findUp(directory => {
|
|
34
|
+
const lockFile = path.resolve(path.join(directory), 'package-lock.json');
|
|
35
|
+
return fs.existsSync(lockFile) ? lockFile : undefined;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -6,41 +6,25 @@ jest.mock('fs', () => fs);
|
|
|
6
6
|
describe(`[startup] ${getLaunchDarklySdkVersion.name}`, () => {
|
|
7
7
|
const launchDarklySdkVersion = '1.2.3';
|
|
8
8
|
|
|
9
|
-
afterEach(() => vol.reset());
|
|
10
|
-
|
|
11
9
|
const subject = () => getLaunchDarklySdkVersion();
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
vol.fromJSON({
|
|
16
|
-
'./package-lock.json': JSON.stringify({ packages: {} }),
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
test('returns undefined', () => {
|
|
21
|
-
expect(subject()).toBeUndefined();
|
|
22
|
-
});
|
|
11
|
+
test('returns undefined', () => {
|
|
12
|
+
expect(subject()).toBeUndefined();
|
|
23
13
|
});
|
|
24
14
|
|
|
25
|
-
describe('when package is
|
|
15
|
+
describe('when package is present', () => {
|
|
26
16
|
beforeEach(() => {
|
|
27
17
|
vol.fromJSON({
|
|
28
|
-
'
|
|
29
|
-
|
|
30
|
-
'node_modules/launchdarkly-js-client-sdk': {
|
|
31
|
-
version: launchDarklySdkVersion,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
18
|
+
'node_modules/launchdarkly-js-client-sdk/package.json': JSON.stringify({
|
|
19
|
+
version: launchDarklySdkVersion,
|
|
34
20
|
}),
|
|
35
21
|
});
|
|
36
22
|
});
|
|
37
23
|
|
|
38
|
-
|
|
24
|
+
afterEach(() => vol.reset());
|
|
25
|
+
|
|
26
|
+
test('returns version from launchdarkly-js-client-sdk package', () => {
|
|
39
27
|
expect(subject()).toEqual(launchDarklySdkVersion);
|
|
40
28
|
});
|
|
41
29
|
});
|
|
42
|
-
|
|
43
|
-
test('returns undefined when no package-lock.json exists', () => {
|
|
44
|
-
expect(subject()).toBeUndefined();
|
|
45
|
-
});
|
|
46
30
|
});
|
|
@@ -6,39 +6,19 @@ jest.mock('fs', () => fs);
|
|
|
6
6
|
describe(`[startup] ${getWebComponentsVersion.name}`, () => {
|
|
7
7
|
const webComponentsVersion = '1.2.3';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
vol.fromJSON({
|
|
16
|
-
'./package-lock.json': JSON.stringify({
|
|
17
|
-
packages: {
|
|
18
|
-
'node_modules/@servicetitan/web-components': {
|
|
19
|
-
version: webComponentsVersion,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
test('returns version from package-lock.json', () => {
|
|
27
|
-
expect(subject()).toEqual(webComponentsVersion);
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
vol.fromJSON({
|
|
11
|
+
'packages/web-components/package.json': JSON.stringify({
|
|
12
|
+
version: webComponentsVersion,
|
|
13
|
+
}),
|
|
28
14
|
});
|
|
29
15
|
});
|
|
30
16
|
|
|
31
|
-
|
|
32
|
-
beforeEach(() => {
|
|
33
|
-
vol.fromJSON({
|
|
34
|
-
'./package-lock.json': JSON.stringify({ packages: {} }),
|
|
35
|
-
});
|
|
36
|
-
});
|
|
17
|
+
afterEach(() => vol.reset());
|
|
37
18
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
19
|
+
const subject = () => getWebComponentsVersion();
|
|
20
|
+
|
|
21
|
+
test('returns version from @servicetitan/web-components package', () => {
|
|
22
|
+
expect(subject()).toEqual(webComponentsVersion);
|
|
43
23
|
});
|
|
44
24
|
});
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { readJson } from '../../../utils';
|
|
2
3
|
|
|
3
4
|
export function getLaunchDarklySdkVersion() {
|
|
4
|
-
|
|
5
|
+
try {
|
|
6
|
+
return readJson<{ version: string }>(
|
|
7
|
+
path.join(
|
|
8
|
+
path.dirname(require.resolve('launchdarkly-js-client-sdk')),
|
|
9
|
+
'../package.json'
|
|
10
|
+
)
|
|
11
|
+
).version;
|
|
12
|
+
} catch {
|
|
13
|
+
// ignore
|
|
14
|
+
}
|
|
5
15
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { readJson } from '../../../utils';
|
|
2
3
|
|
|
3
4
|
export function getWebComponentsVersion() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'Unable to resolve @servicetitan/web-components version from package-lock.json'
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
return version;
|
|
5
|
+
return readJson<{ version: string }>(
|
|
6
|
+
path.join(path.dirname(require.resolve('@servicetitan/web-components')), '../package.json')
|
|
7
|
+
).version;
|
|
11
8
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-command.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/get-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+B3C,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,CAE1E"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "getCommand", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return getCommand;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _utils = require("../../utils");
|
|
12
|
-
const _build = require("./build");
|
|
13
|
-
const _bundlepackage = require("./bundle-package");
|
|
14
|
-
const _clean = require("./clean");
|
|
15
|
-
const _converteslintconfig = require("./convert-eslint-config");
|
|
16
|
-
const _eslint = require("./eslint");
|
|
17
|
-
const _init = require("./init");
|
|
18
|
-
const _install = require("./install");
|
|
19
|
-
const _kendouilicense = require("./kendo-ui-license");
|
|
20
|
-
const _lint = require("./lint");
|
|
21
|
-
const _mfecheck = require("./mfe-check");
|
|
22
|
-
const _mfegeneratemetadata = require("./mfe-generate-metadata");
|
|
23
|
-
const _mfelist = require("./mfe-list");
|
|
24
|
-
const _mfepackageclean = require("./mfe-package-clean");
|
|
25
|
-
const _mfepackagepublish = require("./mfe-package-publish");
|
|
26
|
-
const _mfepackagerollback = require("./mfe-package-rollback");
|
|
27
|
-
const _mfepublish = require("./mfe-publish");
|
|
28
|
-
const _mfepurgecache = require("./mfe-purge-cache");
|
|
29
|
-
const _preparepackage = require("./prepare-package");
|
|
30
|
-
const _review = require("./review");
|
|
31
|
-
const _runtask = require("./run-task");
|
|
32
|
-
const _start = require("./start");
|
|
33
|
-
const _stylelint = require("./stylelint");
|
|
34
|
-
const _stylescheck = require("./styles-check");
|
|
35
|
-
const _test = require("./test");
|
|
36
|
-
const _uploadsourcemaps = require("./upload-sourcemaps");
|
|
37
|
-
const commands = {
|
|
38
|
-
[_utils.CommandName.build]: _build.Build,
|
|
39
|
-
[_utils.CommandName['bundle-package']]: _bundlepackage.BundlePackage,
|
|
40
|
-
[_utils.CommandName['convert-eslint-config']]: _converteslintconfig.ConvertEslintConfig,
|
|
41
|
-
[_utils.CommandName.clean]: _clean.Clean,
|
|
42
|
-
[_utils.CommandName.eslint]: _eslint.ESLintCommand,
|
|
43
|
-
[_utils.CommandName.init]: _init.Init,
|
|
44
|
-
[_utils.CommandName.install]: _install.Install,
|
|
45
|
-
[_utils.CommandName['kendo-ui-license']]: _kendouilicense.KendoUILicense,
|
|
46
|
-
[_utils.CommandName.lint]: _lint.Lint,
|
|
47
|
-
[_utils.CommandName['mfe-check']]: _mfecheck.MfeCheck,
|
|
48
|
-
[_utils.CommandName['mfe-generate-metadata']]: _mfegeneratemetadata.MfeGenerateMetadata,
|
|
49
|
-
[_utils.CommandName['mfe-list']]: _mfelist.MFEList,
|
|
50
|
-
[_utils.CommandName['mfe-package-clean']]: _mfepackageclean.MFEPackageClean,
|
|
51
|
-
[_utils.CommandName['mfe-package-publish']]: _mfepackagepublish.MFEPackagePublish,
|
|
52
|
-
[_utils.CommandName['mfe-package-rollback']]: _mfepackagerollback.MFEPackageRollback,
|
|
53
|
-
[_utils.CommandName['mfe-publish']]: _mfepublish.MFEPublish,
|
|
54
|
-
[_utils.CommandName['mfe-purge-cache']]: _mfepurgecache.MFEPurgeCache,
|
|
55
|
-
[_utils.CommandName['prepare-package']]: _preparepackage.PreparePackage,
|
|
56
|
-
[_utils.CommandName.review]: _review.Review,
|
|
57
|
-
[_utils.CommandName.start]: _start.Start,
|
|
58
|
-
[_utils.CommandName.stylelint]: _stylelint.Stylelint,
|
|
59
|
-
[_utils.CommandName['styles-check']]: _stylescheck.StylesCheck,
|
|
60
|
-
[_utils.CommandName.test]: _test.Tests,
|
|
61
|
-
[_utils.CommandName.task]: _runtask.RunTask,
|
|
62
|
-
[_utils.CommandName['upload-sourcemaps']]: _uploadsourcemaps.UploadSourcemaps
|
|
63
|
-
};
|
|
64
|
-
function getCommand(name) {
|
|
65
|
-
return commands[name];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=get-command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/get-command.ts"],"sourcesContent":["import { CommandName } from '../../utils';\nimport { Build } from './build';\nimport { BundlePackage } from './bundle-package';\nimport { Clean } from './clean';\nimport { ConvertEslintConfig } from './convert-eslint-config';\nimport { ESLintCommand } from './eslint';\nimport { Init } from './init';\nimport { Install } from './install';\nimport { KendoUILicense } from './kendo-ui-license';\nimport { Lint } from './lint';\nimport { MfeCheck } from './mfe-check';\nimport { MfeGenerateMetadata } from './mfe-generate-metadata';\nimport { MFEList } from './mfe-list';\nimport { MFEPackageClean } from './mfe-package-clean';\nimport { MFEPackagePublish } from './mfe-package-publish';\nimport { MFEPackageRollback } from './mfe-package-rollback';\nimport { MFEPublish } from './mfe-publish';\nimport { MFEPurgeCache } from './mfe-purge-cache';\nimport { PreparePackage } from './prepare-package';\nimport { Review } from './review';\nimport { RunTask } from './run-task';\nimport { Start } from './start';\nimport { Stylelint } from './stylelint';\nimport { StylesCheck } from './styles-check';\nimport { Tests } from './test';\nimport { Command, Newable } from './types';\nimport { UploadSourcemaps } from './upload-sourcemaps';\n\nconst commands: Record<CommandName, Newable<Command>> = {\n [CommandName.build]: Build,\n [CommandName['bundle-package']]: BundlePackage,\n [CommandName['convert-eslint-config']]: ConvertEslintConfig,\n [CommandName.clean]: Clean,\n [CommandName.eslint]: ESLintCommand,\n [CommandName.init]: Init,\n [CommandName.install]: Install,\n [CommandName['kendo-ui-license']]: KendoUILicense,\n [CommandName.lint]: Lint,\n [CommandName['mfe-check']]: MfeCheck,\n [CommandName['mfe-generate-metadata']]: MfeGenerateMetadata,\n [CommandName['mfe-list']]: MFEList,\n [CommandName['mfe-package-clean']]: MFEPackageClean,\n [CommandName['mfe-package-publish']]: MFEPackagePublish,\n [CommandName['mfe-package-rollback']]: MFEPackageRollback,\n [CommandName['mfe-publish']]: MFEPublish,\n [CommandName['mfe-purge-cache']]: MFEPurgeCache,\n [CommandName['prepare-package']]: PreparePackage,\n [CommandName.review]: Review,\n [CommandName.start]: Start,\n [CommandName.stylelint]: Stylelint,\n [CommandName['styles-check']]: StylesCheck,\n [CommandName.test]: Tests,\n [CommandName.task]: RunTask,\n [CommandName['upload-sourcemaps']]: UploadSourcemaps,\n};\n\nexport function getCommand(name: CommandName): Newable<Command> | undefined {\n return commands[name];\n}\n"],"names":["getCommand","commands","CommandName","build","Build","BundlePackage","ConvertEslintConfig","clean","Clean","eslint","ESLintCommand","init","Init","install","Install","KendoUILicense","lint","Lint","MfeCheck","MfeGenerateMetadata","MFEList","MFEPackageClean","MFEPackagePublish","MFEPackageRollback","MFEPublish","MFEPurgeCache","PreparePackage","review","Review","start","Start","stylelint","Stylelint","StylesCheck","test","Tests","task","RunTask","UploadSourcemaps","name"],"mappings":";;;;+BAwDgBA;;;eAAAA;;;uBAxDY;uBACN;+BACQ;uBACR;qCACc;wBACN;sBACT;yBACG;gCACO;sBACV;0BACI;qCACW;yBACZ;iCACQ;mCACE;oCACC;4BACR;+BACG;gCACC;wBACR;yBACC;uBACF;2BACI;6BACE;sBACN;kCAEW;AAEjC,MAAMC,WAAkD;IACpD,CAACC,kBAAW,CAACC,KAAK,CAAC,EAAEC,YAAK;IAC1B,CAACF,kBAAW,CAAC,iBAAiB,CAAC,EAAEG,4BAAa;IAC9C,CAACH,kBAAW,CAAC,wBAAwB,CAAC,EAAEI,wCAAmB;IAC3D,CAACJ,kBAAW,CAACK,KAAK,CAAC,EAAEC,YAAK;IAC1B,CAACN,kBAAW,CAACO,MAAM,CAAC,EAAEC,qBAAa;IACnC,CAACR,kBAAW,CAACS,IAAI,CAAC,EAAEC,UAAI;IACxB,CAACV,kBAAW,CAACW,OAAO,CAAC,EAAEC,gBAAO;IAC9B,CAACZ,kBAAW,CAAC,mBAAmB,CAAC,EAAEa,8BAAc;IACjD,CAACb,kBAAW,CAACc,IAAI,CAAC,EAAEC,UAAI;IACxB,CAACf,kBAAW,CAAC,YAAY,CAAC,EAAEgB,kBAAQ;IACpC,CAAChB,kBAAW,CAAC,wBAAwB,CAAC,EAAEiB,wCAAmB;IAC3D,CAACjB,kBAAW,CAAC,WAAW,CAAC,EAAEkB,gBAAO;IAClC,CAAClB,kBAAW,CAAC,oBAAoB,CAAC,EAAEmB,gCAAe;IACnD,CAACnB,kBAAW,CAAC,sBAAsB,CAAC,EAAEoB,oCAAiB;IACvD,CAACpB,kBAAW,CAAC,uBAAuB,CAAC,EAAEqB,sCAAkB;IACzD,CAACrB,kBAAW,CAAC,cAAc,CAAC,EAAEsB,sBAAU;IACxC,CAACtB,kBAAW,CAAC,kBAAkB,CAAC,EAAEuB,4BAAa;IAC/C,CAACvB,kBAAW,CAAC,kBAAkB,CAAC,EAAEwB,8BAAc;IAChD,CAACxB,kBAAW,CAACyB,MAAM,CAAC,EAAEC,cAAM;IAC5B,CAAC1B,kBAAW,CAAC2B,KAAK,CAAC,EAAEC,YAAK;IAC1B,CAAC5B,kBAAW,CAAC6B,SAAS,CAAC,EAAEC,oBAAS;IAClC,CAAC9B,kBAAW,CAAC,eAAe,CAAC,EAAE+B,wBAAW;IAC1C,CAAC/B,kBAAW,CAACgC,IAAI,CAAC,EAAEC,WAAK;IACzB,CAACjC,kBAAW,CAACkC,IAAI,CAAC,EAAEC,gBAAO;IAC3B,CAACnC,kBAAW,CAAC,oBAAoB,CAAC,EAAEoC,kCAAgB;AACxD;AAEO,SAAStC,WAAWuC,IAAiB;IACxC,OAAOtC,QAAQ,CAACsC,KAAK;AACzB"}
|