@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,15 +0,0 @@
|
|
|
1
|
-
export * from './build';
|
|
2
|
-
export * from './bundle-package';
|
|
3
|
-
export * from './eslint';
|
|
4
|
-
export * from './get-command';
|
|
5
|
-
export * from './init';
|
|
6
|
-
export * from './install';
|
|
7
|
-
export * from './kendo-ui-license';
|
|
8
|
-
export * from './lint';
|
|
9
|
-
export * from './mfe-publish';
|
|
10
|
-
export * from './prepare-package';
|
|
11
|
-
export * from './start';
|
|
12
|
-
export * from './styles-check';
|
|
13
|
-
export * from './test';
|
|
14
|
-
export type * from './types';
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
_export_star(require("./build"), exports);
|
|
6
|
-
_export_star(require("./bundle-package"), exports);
|
|
7
|
-
_export_star(require("./eslint"), exports);
|
|
8
|
-
_export_star(require("./get-command"), exports);
|
|
9
|
-
_export_star(require("./init"), exports);
|
|
10
|
-
_export_star(require("./install"), exports);
|
|
11
|
-
_export_star(require("./kendo-ui-license"), exports);
|
|
12
|
-
_export_star(require("./lint"), exports);
|
|
13
|
-
_export_star(require("./mfe-publish"), exports);
|
|
14
|
-
_export_star(require("./prepare-package"), exports);
|
|
15
|
-
_export_star(require("./start"), exports);
|
|
16
|
-
_export_star(require("./styles-check"), exports);
|
|
17
|
-
_export_star(require("./test"), exports);
|
|
18
|
-
function _export_star(from, to) {
|
|
19
|
-
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
-
Object.defineProperty(to, k, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function() {
|
|
24
|
-
return from[k];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return from;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/index.ts"],"sourcesContent":["export * from './build';\nexport * from './bundle-package';\nexport * from './eslint';\nexport * from './get-command';\nexport * from './init';\nexport * from './install';\nexport * from './kendo-ui-license';\nexport * from './lint';\nexport * from './mfe-publish';\nexport * from './prepare-package';\nexport * from './start';\nexport * from './styles-check';\nexport * from './test';\nexport type * from './types';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-package-lock.d.ts","sourceRoot":"","sources":["../../src/utils/find-package-lock.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,uBAK9B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "findPackageLock", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return findPackageLock;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
|
|
12
|
-
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
|
-
const _findup = require("./find-up");
|
|
14
|
-
function _interop_require_default(obj) {
|
|
15
|
-
return obj && obj.__esModule ? obj : {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function findPackageLock() {
|
|
20
|
-
return (0, _findup.findUp)((directory)=>{
|
|
21
|
-
const lockFile = _nodepath.default.resolve(directory, 'package-lock.json');
|
|
22
|
-
return _nodefs.default.existsSync(lockFile) ? lockFile : undefined;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=find-package-lock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/find-package-lock.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { findUp } from './find-up';\n\nexport function findPackageLock() {\n return findUp(directory => {\n const lockFile = path.resolve(directory, 'package-lock.json');\n return fs.existsSync(lockFile) ? lockFile : undefined;\n });\n}\n"],"names":["findPackageLock","findUp","directory","lockFile","path","resolve","fs","existsSync","undefined"],"mappings":";;;;+BAIgBA;;;eAAAA;;;+DAJD;iEACE;wBACM;;;;;;AAEhB,SAASA;IACZ,OAAOC,IAAAA,cAAM,EAACC,CAAAA;QACV,MAAMC,WAAWC,iBAAI,CAACC,OAAO,CAACH,WAAW;QACzC,OAAOI,eAAE,CAACC,UAAU,CAACJ,YAAYA,WAAWK;IAChD;AACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-package-version.d.ts","sourceRoot":"","sources":["../../src/utils/get-package-version.ts"],"names":[],"mappings":"AAaA,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,sBAiBpD"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "getPackageVersion", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return getPackageVersion;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _findpackagelock = require("./find-package-lock");
|
|
12
|
-
const _readjson = require("./read-json");
|
|
13
|
-
function getPackageVersion(packageName) {
|
|
14
|
-
var _lockFile_packages;
|
|
15
|
-
const lockFilePath = (0, _findpackagelock.findPackageLock)();
|
|
16
|
-
if (!lockFilePath) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
const lockFile = (0, _readjson.readJsonSafe)(lockFilePath);
|
|
20
|
-
const entry = lockFile === null || lockFile === void 0 ? void 0 : (_lockFile_packages = lockFile.packages) === null || _lockFile_packages === void 0 ? void 0 : _lockFile_packages[`node_modules/${packageName}`];
|
|
21
|
-
if (!entry) {
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
if (entry.link && entry.resolved) {
|
|
25
|
-
var _lockFile_packages_entry_resolved, _lockFile_packages1;
|
|
26
|
-
return lockFile === null || lockFile === void 0 ? void 0 : (_lockFile_packages1 = lockFile.packages) === null || _lockFile_packages1 === void 0 ? void 0 : (_lockFile_packages_entry_resolved = _lockFile_packages1[entry.resolved]) === null || _lockFile_packages_entry_resolved === void 0 ? void 0 : _lockFile_packages_entry_resolved.version;
|
|
27
|
-
}
|
|
28
|
-
return entry.version;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=get-package-version.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-package-version.ts"],"sourcesContent":["import { findPackageLock } from './find-package-lock';\nimport { readJsonSafe } from './read-json';\n\ninterface PackageLockEntry {\n version?: string;\n resolved?: string;\n link?: boolean;\n}\n\ninterface PackageLock {\n packages: Record<string, PackageLockEntry>;\n}\n\nexport function getPackageVersion(packageName: string) {\n const lockFilePath = findPackageLock();\n if (!lockFilePath) {\n return undefined;\n }\n\n const lockFile = readJsonSafe<PackageLock>(lockFilePath);\n const entry = lockFile?.packages?.[`node_modules/${packageName}`];\n if (!entry) {\n return undefined;\n }\n\n if (entry.link && entry.resolved) {\n return lockFile?.packages?.[entry.resolved]?.version;\n }\n\n return entry.version;\n}\n"],"names":["getPackageVersion","packageName","lockFile","lockFilePath","findPackageLock","undefined","readJsonSafe","entry","packages","link","resolved","version"],"mappings":";;;;+BAagBA;;;eAAAA;;;iCAbgB;0BACH;AAYtB,SAASA,kBAAkBC,WAAmB;QAOnCC;IANd,MAAMC,eAAeC,IAAAA,gCAAe;IACpC,IAAI,CAACD,cAAc;QACf,OAAOE;IACX;IAEA,MAAMH,WAAWI,IAAAA,sBAAY,EAAcH;IAC3C,MAAMI,QAAQL,qBAAAA,gCAAAA,qBAAAA,SAAUM,QAAQ,cAAlBN,yCAAAA,kBAAoB,CAAC,CAAC,aAAa,EAAED,aAAa,CAAC;IACjE,IAAI,CAACM,OAAO;QACR,OAAOF;IACX;IAEA,IAAIE,MAAME,IAAI,IAAIF,MAAMG,QAAQ,EAAE;YACvBR,mCAAAA;QAAP,OAAOA,qBAAAA,gCAAAA,sBAAAA,SAAUM,QAAQ,cAAlBN,2CAAAA,oCAAAA,mBAAoB,CAACK,MAAMG,QAAQ,CAAC,cAApCR,wDAAAA,kCAAsCS,OAAO;IACxD;IAEA,OAAOJ,MAAMI,OAAO;AACxB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment node
|
|
3
|
-
*/
|
|
4
|
-
import { CommandName } from '../../../utils';
|
|
5
|
-
import { getCommand } from '../get-command';
|
|
6
|
-
|
|
7
|
-
describe(`${getCommand.name}`, () => {
|
|
8
|
-
const subject = (name: CommandName) => getCommand(name);
|
|
9
|
-
|
|
10
|
-
test('retrieves known commands', () => {
|
|
11
|
-
Object.values(CommandName).forEach(name => {
|
|
12
|
-
expect(subject(name)).toBeDefined();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
test('returns undefined when command is unknown', () => {
|
|
17
|
-
expect(subject('foo' as CommandName)).toBeUndefined();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { CommandName } from '../../utils';
|
|
2
|
-
import { Build } from './build';
|
|
3
|
-
import { BundlePackage } from './bundle-package';
|
|
4
|
-
import { Clean } from './clean';
|
|
5
|
-
import { ConvertEslintConfig } from './convert-eslint-config';
|
|
6
|
-
import { ESLintCommand } from './eslint';
|
|
7
|
-
import { Init } from './init';
|
|
8
|
-
import { Install } from './install';
|
|
9
|
-
import { KendoUILicense } from './kendo-ui-license';
|
|
10
|
-
import { Lint } from './lint';
|
|
11
|
-
import { MfeCheck } from './mfe-check';
|
|
12
|
-
import { MfeGenerateMetadata } from './mfe-generate-metadata';
|
|
13
|
-
import { MFEList } from './mfe-list';
|
|
14
|
-
import { MFEPackageClean } from './mfe-package-clean';
|
|
15
|
-
import { MFEPackagePublish } from './mfe-package-publish';
|
|
16
|
-
import { MFEPackageRollback } from './mfe-package-rollback';
|
|
17
|
-
import { MFEPublish } from './mfe-publish';
|
|
18
|
-
import { MFEPurgeCache } from './mfe-purge-cache';
|
|
19
|
-
import { PreparePackage } from './prepare-package';
|
|
20
|
-
import { Review } from './review';
|
|
21
|
-
import { RunTask } from './run-task';
|
|
22
|
-
import { Start } from './start';
|
|
23
|
-
import { Stylelint } from './stylelint';
|
|
24
|
-
import { StylesCheck } from './styles-check';
|
|
25
|
-
import { Tests } from './test';
|
|
26
|
-
import { Command, Newable } from './types';
|
|
27
|
-
import { UploadSourcemaps } from './upload-sourcemaps';
|
|
28
|
-
|
|
29
|
-
const commands: Record<CommandName, Newable<Command>> = {
|
|
30
|
-
[CommandName.build]: Build,
|
|
31
|
-
[CommandName['bundle-package']]: BundlePackage,
|
|
32
|
-
[CommandName['convert-eslint-config']]: ConvertEslintConfig,
|
|
33
|
-
[CommandName.clean]: Clean,
|
|
34
|
-
[CommandName.eslint]: ESLintCommand,
|
|
35
|
-
[CommandName.init]: Init,
|
|
36
|
-
[CommandName.install]: Install,
|
|
37
|
-
[CommandName['kendo-ui-license']]: KendoUILicense,
|
|
38
|
-
[CommandName.lint]: Lint,
|
|
39
|
-
[CommandName['mfe-check']]: MfeCheck,
|
|
40
|
-
[CommandName['mfe-generate-metadata']]: MfeGenerateMetadata,
|
|
41
|
-
[CommandName['mfe-list']]: MFEList,
|
|
42
|
-
[CommandName['mfe-package-clean']]: MFEPackageClean,
|
|
43
|
-
[CommandName['mfe-package-publish']]: MFEPackagePublish,
|
|
44
|
-
[CommandName['mfe-package-rollback']]: MFEPackageRollback,
|
|
45
|
-
[CommandName['mfe-publish']]: MFEPublish,
|
|
46
|
-
[CommandName['mfe-purge-cache']]: MFEPurgeCache,
|
|
47
|
-
[CommandName['prepare-package']]: PreparePackage,
|
|
48
|
-
[CommandName.review]: Review,
|
|
49
|
-
[CommandName.start]: Start,
|
|
50
|
-
[CommandName.stylelint]: Stylelint,
|
|
51
|
-
[CommandName['styles-check']]: StylesCheck,
|
|
52
|
-
[CommandName.test]: Tests,
|
|
53
|
-
[CommandName.task]: RunTask,
|
|
54
|
-
[CommandName['upload-sourcemaps']]: UploadSourcemaps,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export function getCommand(name: CommandName): Newable<Command> | undefined {
|
|
58
|
-
return commands[name];
|
|
59
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './build';
|
|
2
|
-
export * from './bundle-package';
|
|
3
|
-
export * from './eslint';
|
|
4
|
-
export * from './get-command';
|
|
5
|
-
export * from './init';
|
|
6
|
-
export * from './install';
|
|
7
|
-
export * from './kendo-ui-license';
|
|
8
|
-
export * from './lint';
|
|
9
|
-
export * from './mfe-publish';
|
|
10
|
-
export * from './prepare-package';
|
|
11
|
-
export * from './start';
|
|
12
|
-
export * from './styles-check';
|
|
13
|
-
export * from './test';
|
|
14
|
-
export type * from './types';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { fs, vol } from 'memfs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { findPackageLock } from '../find-package-lock';
|
|
4
|
-
|
|
5
|
-
jest.mock('fs', () => fs);
|
|
6
|
-
|
|
7
|
-
describe(`[startup] ${findPackageLock.name}`, () => {
|
|
8
|
-
afterEach(() => vol.reset());
|
|
9
|
-
|
|
10
|
-
const subject = () => findPackageLock();
|
|
11
|
-
|
|
12
|
-
describe('when package-lock.json exists in cwd', () => {
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
vol.fromJSON({ './package-lock.json': '{}' });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
test('returns path', () => {
|
|
18
|
-
expect(subject()).toBe(path.resolve('./package-lock.json'));
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
describe('when package-lock.json exists in parent directory', () => {
|
|
23
|
-
beforeEach(() => {
|
|
24
|
-
vol.fromJSON({ '../package-lock.json': '{}' });
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
test('returns path', () => {
|
|
28
|
-
expect(subject()).toBe(path.resolve('../package-lock.json'));
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
test('returns undefined when no package-lock.json exists', () => {
|
|
33
|
-
expect(subject()).toBeUndefined();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { fs, vol } from 'memfs';
|
|
2
|
-
import { getPackageVersion } from '../get-package-version';
|
|
3
|
-
|
|
4
|
-
jest.mock('fs', () => fs);
|
|
5
|
-
|
|
6
|
-
describe(`[startup] ${getPackageVersion.name}`, () => {
|
|
7
|
-
afterEach(() => vol.reset());
|
|
8
|
-
|
|
9
|
-
const subject = (packageName: string) => getPackageVersion(packageName);
|
|
10
|
-
|
|
11
|
-
describe('when package-lock.json exists', () => {
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
vol.fromJSON({
|
|
14
|
-
'./package-lock.json': JSON.stringify({
|
|
15
|
-
packages: {
|
|
16
|
-
'node_modules/@servicetitan/web-components': { version: '1.2.3' },
|
|
17
|
-
'node_modules/launchdarkly-js-client-sdk': { version: '4.5.6' },
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
test('returns version for a found package', () => {
|
|
24
|
-
expect(subject('@servicetitan/web-components')).toBe('1.2.3');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
test('returns version for another found package', () => {
|
|
28
|
-
expect(subject('launchdarkly-js-client-sdk')).toBe('4.5.6');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
test('returns undefined for a package not in lock file', () => {
|
|
32
|
-
expect(subject('nonexistent-package')).toBeUndefined();
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
describe('when package is a linked workspace package', () => {
|
|
37
|
-
beforeEach(() => {
|
|
38
|
-
vol.fromJSON({
|
|
39
|
-
'./package-lock.json': JSON.stringify({
|
|
40
|
-
packages: {
|
|
41
|
-
'node_modules/@servicetitan/web-components': {
|
|
42
|
-
resolved: 'packages/web-components',
|
|
43
|
-
link: true,
|
|
44
|
-
},
|
|
45
|
-
'packages/web-components': {
|
|
46
|
-
version: '35.1.0',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
test('follows link to resolve version from source path', () => {
|
|
54
|
-
expect(subject('@servicetitan/web-components')).toBe('35.1.0');
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
describe('when entry has link but no resolved path', () => {
|
|
59
|
-
beforeEach(() => {
|
|
60
|
-
vol.fromJSON({
|
|
61
|
-
'./package-lock.json': JSON.stringify({
|
|
62
|
-
packages: {
|
|
63
|
-
'node_modules/some-package': { link: true, version: '1.0.0' },
|
|
64
|
-
},
|
|
65
|
-
}),
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
test('returns entry version', () => {
|
|
70
|
-
expect(subject('some-package')).toBe('1.0.0');
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
describe('when linked package resolved path does not exist in packages', () => {
|
|
75
|
-
beforeEach(() => {
|
|
76
|
-
vol.fromJSON({
|
|
77
|
-
'./package-lock.json': JSON.stringify({
|
|
78
|
-
packages: {
|
|
79
|
-
'node_modules/some-package': {
|
|
80
|
-
resolved: 'packages/some-package',
|
|
81
|
-
link: true,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
}),
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
test('returns undefined', () => {
|
|
89
|
-
expect(subject('some-package')).toBeUndefined();
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
describe('when lock file contains invalid JSON', () => {
|
|
94
|
-
beforeEach(() => {
|
|
95
|
-
vol.fromJSON({
|
|
96
|
-
'./package-lock.json': 'not valid json',
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
test('returns undefined', () => {
|
|
101
|
-
expect(subject('some-package')).toBeUndefined();
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
describe('when lock file has no packages property', () => {
|
|
106
|
-
beforeEach(() => {
|
|
107
|
-
vol.fromJSON({
|
|
108
|
-
'./package-lock.json': JSON.stringify({}),
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
test('returns undefined', () => {
|
|
113
|
-
expect(subject('some-package')).toBeUndefined();
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
test('returns undefined when no package-lock.json exists', () => {
|
|
118
|
-
expect(subject('@servicetitan/web-components')).toBeUndefined();
|
|
119
|
-
});
|
|
120
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { findUp } from './find-up';
|
|
4
|
-
|
|
5
|
-
export function findPackageLock() {
|
|
6
|
-
return findUp(directory => {
|
|
7
|
-
const lockFile = path.resolve(directory, 'package-lock.json');
|
|
8
|
-
return fs.existsSync(lockFile) ? lockFile : undefined;
|
|
9
|
-
});
|
|
10
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { findPackageLock } from './find-package-lock';
|
|
2
|
-
import { readJsonSafe } from './read-json';
|
|
3
|
-
|
|
4
|
-
interface PackageLockEntry {
|
|
5
|
-
version?: string;
|
|
6
|
-
resolved?: string;
|
|
7
|
-
link?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface PackageLock {
|
|
11
|
-
packages: Record<string, PackageLockEntry>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function getPackageVersion(packageName: string) {
|
|
15
|
-
const lockFilePath = findPackageLock();
|
|
16
|
-
if (!lockFilePath) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const lockFile = readJsonSafe<PackageLock>(lockFilePath);
|
|
21
|
-
const entry = lockFile?.packages?.[`node_modules/${packageName}`];
|
|
22
|
-
if (!entry) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (entry.link && entry.resolved) {
|
|
27
|
-
return lockFile?.packages?.[entry.resolved]?.version;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return entry.version;
|
|
31
|
-
}
|