@servicetitan/startup 36.0.0 → 36.1.1-beta.1
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.map +1 -1
- package/dist/cli/commands/build.js +14 -9
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-vite.d.ts +6 -0
- package/dist/cli/commands/bundle-vite.d.ts.map +1 -0
- package/dist/cli/commands/bundle-vite.js +110 -0
- package/dist/cli/commands/bundle-vite.js.map +1 -0
- package/dist/cli/commands/bundle-webpack.d.ts +6 -0
- package/dist/cli/commands/bundle-webpack.d.ts.map +1 -0
- package/dist/cli/commands/{bundle-package.js → bundle-webpack.js} +8 -6
- package/dist/cli/commands/bundle-webpack.js.map +1 -0
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +2 -1
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/mfe-check.d.ts.map +1 -1
- package/dist/cli/commands/mfe-check.js +2 -2
- package/dist/cli/commands/mfe-check.js.map +1 -1
- package/dist/cli/commands/mfe-generate-metadata.js +2 -2
- package/dist/cli/commands/mfe-generate-metadata.js.map +1 -1
- package/dist/cli/commands/mfe-list.js +1 -1
- package/dist/cli/commands/mfe-list.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.js +1 -1
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/registry/build.d.ts +8 -0
- package/dist/cli/commands/registry/build.d.ts.map +1 -1
- package/dist/cli/commands/registry/build.js +8 -0
- package/dist/cli/commands/registry/build.js.map +1 -1
- package/dist/cli/commands/registry/bundle-vite.d.ts +33 -0
- package/dist/cli/commands/registry/bundle-vite.d.ts.map +1 -0
- package/dist/cli/commands/registry/bundle-vite.js +45 -0
- package/dist/cli/commands/registry/bundle-vite.js.map +1 -0
- package/dist/cli/commands/registry/{bundle-package.d.ts → bundle-webpack.d.ts} +1 -1
- package/dist/cli/commands/registry/bundle-webpack.d.ts.map +1 -0
- package/dist/cli/commands/registry/{bundle-package.js → bundle-webpack.js} +1 -1
- package/dist/cli/commands/registry/{bundle-package.js.map → bundle-webpack.js.map} +1 -1
- package/dist/cli/commands/registry/command-registry.d.ts +72 -0
- package/dist/cli/commands/registry/command-registry.d.ts.map +1 -1
- package/dist/cli/commands/registry/command-registry.js +7 -2
- package/dist/cli/commands/registry/command-registry.js.map +1 -1
- package/dist/cli/commands/registry/start.d.ts +4 -0
- package/dist/cli/commands/registry/start.d.ts.map +1 -1
- package/dist/cli/commands/registry/start.js +4 -0
- package/dist/cli/commands/registry/start.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +11 -9
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/tsc-compile/tsc-compile.js +1 -1
- package/dist/cli/tasks/tsc-compile/tsc-compile.js.map +1 -1
- package/dist/cli/utils/copy-files.js +1 -0
- package/dist/cli/utils/copy-files.js.map +1 -1
- package/dist/cli/utils/index.d.ts +0 -1
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +0 -1
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/core/check-resource/check-resource.d.ts +3 -0
- package/dist/core/check-resource/check-resource.d.ts.map +1 -0
- package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/check-resource.js +2 -2
- package/dist/core/check-resource/check-resource.js.map +1 -0
- package/dist/core/check-resource/get-package-json.d.ts +7 -0
- package/dist/core/check-resource/get-package-json.d.ts.map +1 -0
- package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/get-package-json.js +1 -1
- package/dist/core/check-resource/get-package-json.js.map +1 -0
- package/dist/core/check-resource/index.d.ts +2 -0
- package/dist/core/check-resource/index.d.ts.map +1 -0
- package/dist/core/check-resource/index.js +13 -0
- package/dist/core/check-resource/index.js.map +1 -0
- package/dist/core/check-resource/is-optional-peer-dependency.d.ts.map +1 -0
- package/dist/core/check-resource/is-optional-peer-dependency.js.map +1 -0
- package/dist/core/check-resource/is-optional-react-dom-peer-dependency.d.ts.map +1 -0
- package/dist/core/check-resource/is-optional-react-dom-peer-dependency.js.map +1 -0
- package/dist/core/constants.d.ts +17 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +28 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/create-build-context.d.ts +13 -0
- package/dist/core/create-build-context.d.ts.map +1 -0
- package/dist/core/create-build-context.js +51 -0
- package/dist/core/create-build-context.js.map +1 -0
- package/dist/core/defines/define-exposed-dependencies.d.ts +5 -0
- package/dist/core/defines/define-exposed-dependencies.d.ts.map +1 -0
- package/dist/core/defines/define-exposed-dependencies.js +26 -0
- package/dist/core/defines/define-exposed-dependencies.js.map +1 -0
- package/dist/core/defines/define-exposed-instance-dependencies.d.ts +5 -0
- package/dist/core/defines/define-exposed-instance-dependencies.d.ts.map +1 -0
- package/dist/core/defines/define-exposed-instance-dependencies.js +29 -0
- package/dist/core/defines/define-exposed-instance-dependencies.js.map +1 -0
- package/dist/core/defines/define-web-component-name.d.ts +5 -0
- package/dist/core/defines/define-web-component-name.d.ts.map +1 -0
- package/dist/core/defines/define-web-component-name.js +23 -0
- package/dist/core/defines/define-web-component-name.js.map +1 -0
- package/dist/core/defines/index.d.ts +4 -0
- package/dist/core/defines/index.d.ts.map +1 -0
- package/dist/core/defines/index.js +26 -0
- package/dist/core/defines/index.js.map +1 -0
- package/dist/core/externals.d.ts +3 -0
- package/dist/core/externals.d.ts.map +1 -0
- package/dist/core/externals.js +28 -0
- package/dist/core/externals.js.map +1 -0
- package/dist/core/get-build-name.d.ts +2 -0
- package/dist/core/get-build-name.d.ts.map +1 -0
- package/dist/core/get-build-name.js +24 -0
- package/dist/core/get-build-name.js.map +1 -0
- package/dist/core/get-bundle-type.d.ts +3 -0
- package/dist/core/get-bundle-type.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core}/get-bundle-type.js +4 -2
- package/dist/core/get-bundle-type.js.map +1 -0
- package/dist/core/get-exposed-dependencies.d.ts.map +1 -0
- package/dist/core/get-exposed-dependencies.js.map +1 -0
- package/dist/core/get-output-path.d.ts +3 -0
- package/dist/core/get-output-path.d.ts.map +1 -0
- package/dist/core/get-output-path.js +32 -0
- package/dist/core/get-output-path.js.map +1 -0
- package/dist/core/get-shared-entry-points.d.ts +11 -0
- package/dist/core/get-shared-entry-points.d.ts.map +1 -0
- package/dist/core/get-shared-entry-points.js +43 -0
- package/dist/core/get-shared-entry-points.js.map +1 -0
- package/dist/core/get-version/get-launchdarkly-sdk-version.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core/get-version}/get-launchdarkly-sdk-version.js +1 -1
- package/dist/core/get-version/get-launchdarkly-sdk-version.js.map +1 -0
- package/dist/core/get-version/get-startup-version.d.ts.map +1 -0
- package/dist/{utils → core/get-version}/get-startup-version.js +2 -2
- package/dist/core/get-version/get-startup-version.js.map +1 -0
- package/dist/core/get-version/get-web-components-version.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core/get-version}/get-web-components-version.js +1 -1
- package/dist/core/get-version/get-web-components-version.js.map +1 -0
- package/dist/core/get-version/index.d.ts +4 -0
- package/dist/core/get-version/index.d.ts.map +1 -0
- package/dist/core/get-version/index.js +22 -0
- package/dist/core/get-version/index.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +33 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/metadata/build-metadata.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core/metadata}/build-metadata.js +5 -6
- package/dist/core/metadata/build-metadata.js.map +1 -0
- package/dist/core/metadata/generate-exposed-dependencies-metadata.d.ts +3 -0
- package/dist/core/metadata/generate-exposed-dependencies-metadata.d.ts.map +1 -0
- package/dist/core/metadata/generate-exposed-dependencies-metadata.js +42 -0
- package/dist/core/metadata/generate-exposed-dependencies-metadata.js.map +1 -0
- package/dist/core/metadata/generate-metadata.d.ts +3 -0
- package/dist/core/metadata/generate-metadata.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core/metadata}/generate-metadata.js +5 -4
- package/dist/core/metadata/generate-metadata.js.map +1 -0
- package/dist/core/metadata/index.d.ts +4 -0
- package/dist/core/metadata/index.d.ts.map +1 -0
- package/dist/{webpack/configs/utils → core/metadata}/index.js +2 -2
- package/dist/core/metadata/index.js.map +1 -0
- package/dist/core/stringify-config.d.ts.map +1 -0
- package/dist/core/stringify-config.js.map +1 -0
- package/dist/core/types.d.ts +51 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/virtual-modules.d.ts +8 -0
- package/dist/core/virtual-modules.d.ts.map +1 -0
- package/dist/core/virtual-modules.js +83 -0
- package/dist/core/virtual-modules.js.map +1 -0
- package/dist/cypress/config/webpack-config.d.ts +1 -1
- package/dist/cypress/config/webpack-config.d.ts.map +1 -1
- package/dist/cypress/config/webpack-config.js +19 -6
- package/dist/cypress/config/webpack-config.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storybook-config/webpack-final.d.ts +1 -1
- package/dist/storybook-config/webpack-final.d.ts.map +1 -1
- package/dist/storybook-config/webpack-final.js +17 -6
- package/dist/storybook-config/webpack-final.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +31 -1
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +12 -8
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-package-data.d.ts.map +1 -1
- package/dist/utils/get-package-data.js +3 -2
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/get-packages.d.ts +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +1 -1
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/validate-shared-dependencies.d.ts +2 -0
- package/dist/utils/validate-shared-dependencies.d.ts.map +1 -0
- package/dist/utils/validate-shared-dependencies.js +26 -0
- package/dist/utils/validate-shared-dependencies.js.map +1 -0
- package/dist/vite/build-shared-dependencies.d.ts +3 -0
- package/dist/vite/build-shared-dependencies.d.ts.map +1 -0
- package/dist/vite/build-shared-dependencies.js +59 -0
- package/dist/vite/build-shared-dependencies.js.map +1 -0
- package/dist/vite/config/base-config.d.ts +4 -0
- package/dist/vite/config/base-config.d.ts.map +1 -0
- package/dist/vite/config/base-config.js +139 -0
- package/dist/vite/config/base-config.js.map +1 -0
- package/dist/vite/config/create-vite-build-context.d.ts +5 -0
- package/dist/vite/config/create-vite-build-context.d.ts.map +1 -0
- package/dist/vite/config/create-vite-build-context.js +43 -0
- package/dist/vite/config/create-vite-build-context.js.map +1 -0
- package/dist/vite/config/create-vite-config.d.ts +3 -0
- package/dist/vite/config/create-vite-config.d.ts.map +1 -0
- package/dist/vite/config/create-vite-config.js +43 -0
- package/dist/vite/config/create-vite-config.js.map +1 -0
- package/dist/vite/config/define-config.d.ts +13 -0
- package/dist/vite/config/define-config.d.ts.map +1 -0
- package/dist/vite/config/define-config.js +15 -0
- package/dist/vite/config/define-config.js.map +1 -0
- package/dist/vite/config/index.d.ts +6 -0
- package/dist/vite/config/index.d.ts.map +1 -0
- package/dist/vite/config/index.js +24 -0
- package/dist/vite/config/index.js.map +1 -0
- package/dist/vite/config/load-config-file.d.ts +4 -0
- package/dist/vite/config/load-config-file.d.ts.map +1 -0
- package/dist/vite/config/load-config-file.js +103 -0
- package/dist/vite/config/load-config-file.js.map +1 -0
- package/dist/vite/config/merge-vite-configs.d.ts +5 -0
- package/dist/vite/config/merge-vite-configs.d.ts.map +1 -0
- package/dist/vite/config/merge-vite-configs.js +17 -0
- package/dist/vite/config/merge-vite-configs.js.map +1 -0
- package/dist/vite/index.d.ts +2 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.html +36 -0
- package/dist/vite/index.js +20 -0
- package/dist/vite/index.js.map +1 -0
- package/dist/vite/plugins/css-injector-plugin.d.ts +4 -0
- package/dist/vite/plugins/css-injector-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/css-injector-plugin.js +57 -0
- package/dist/vite/plugins/css-injector-plugin.js.map +1 -0
- package/dist/vite/plugins/dev-server-routing-plugin.d.ts +24 -0
- package/dist/vite/plugins/dev-server-routing-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/dev-server-routing-plugin.js +85 -0
- package/dist/vite/plugins/dev-server-routing-plugin.js.map +1 -0
- package/dist/vite/plugins/externals-plugin.d.ts +4 -0
- package/dist/vite/plugins/externals-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/externals-plugin.js +60 -0
- package/dist/vite/plugins/externals-plugin.js.map +1 -0
- package/dist/vite/plugins/html-plugin.d.ts +4 -0
- package/dist/vite/plugins/html-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/html-plugin.js +102 -0
- package/dist/vite/plugins/html-plugin.js.map +1 -0
- package/dist/vite/plugins/ignore-modules-plugin.d.ts +4 -0
- package/dist/vite/plugins/ignore-modules-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/ignore-modules-plugin.js +30 -0
- package/dist/vite/plugins/ignore-modules-plugin.js.map +1 -0
- package/dist/vite/plugins/index.d.ts +10 -0
- package/dist/vite/plugins/index.d.ts.map +1 -0
- package/dist/vite/plugins/index.js +28 -0
- package/dist/vite/plugins/index.js.map +1 -0
- package/dist/vite/plugins/metadata-plugin.d.ts +4 -0
- package/dist/vite/plugins/metadata-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/metadata-plugin.js +78 -0
- package/dist/vite/plugins/metadata-plugin.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin.d.ts +8 -0
- package/dist/vite/plugins/shared-dependencies-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin.js +252 -0
- package/dist/vite/plugins/shared-dependencies-plugin.js.map +1 -0
- package/dist/vite/plugins/style-urls-plugin.d.ts +4 -0
- package/dist/vite/plugins/style-urls-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/style-urls-plugin.js +31 -0
- package/dist/vite/plugins/style-urls-plugin.js.map +1 -0
- package/dist/vite/plugins/svgr-plugin.d.ts +4 -0
- package/dist/vite/plugins/svgr-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/svgr-plugin.js +33 -0
- package/dist/vite/plugins/svgr-plugin.js.map +1 -0
- package/dist/vite/plugins/virtual-modules-plugin.d.ts +4 -0
- package/dist/vite/plugins/virtual-modules-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/virtual-modules-plugin.js +63 -0
- package/dist/vite/plugins/virtual-modules-plugin.js.map +1 -0
- package/dist/vite/types.d.ts +4 -0
- package/dist/vite/types.d.ts.map +1 -0
- package/dist/vite/types.js +6 -0
- package/dist/vite/types.js.map +1 -0
- package/dist/vite/validate-shared-dependencies.d.ts +2 -0
- package/dist/vite/validate-shared-dependencies.d.ts.map +1 -0
- package/dist/vite/validate-shared-dependencies.js +27 -0
- package/dist/vite/validate-shared-dependencies.js.map +1 -0
- package/dist/webpack/bundle-webpack.d.ts +11 -0
- package/dist/webpack/bundle-webpack.d.ts.map +1 -0
- package/dist/webpack/bundle-webpack.js +107 -0
- package/dist/webpack/bundle-webpack.js.map +1 -0
- package/dist/webpack/configs/amd-config.d.ts +3 -2
- package/dist/webpack/configs/amd-config.d.ts.map +1 -1
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/cache-config.d.ts +3 -2
- package/dist/webpack/configs/cache-config.d.ts.map +1 -1
- package/dist/webpack/configs/cache-config.js +1 -1
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +2 -2
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +8 -8
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.d.ts +3 -2
- package/dist/webpack/configs/devtool-config.d.ts.map +1 -1
- package/dist/webpack/configs/devtool-config.js +1 -1
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts +3 -2
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +6 -5
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.d.ts +3 -2
- package/dist/webpack/configs/externals-config.d.ts.map +1 -1
- package/dist/webpack/configs/externals-config.js +4 -14
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +0 -1
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.d.ts +2 -2
- package/dist/webpack/configs/loaders/css-loader.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +2 -1
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.d.ts +2 -2
- package/dist/webpack/configs/loaders/style-loader.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +3 -1
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/module-config.d.ts +2 -2
- package/dist/webpack/configs/module-config.d.ts.map +1 -1
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.d.ts +2 -2
- package/dist/webpack/configs/optimization-config.d.ts.map +1 -1
- package/dist/webpack/configs/optimization-config.js +9 -7
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.d.ts +3 -2
- package/dist/webpack/configs/output-config.d.ts.map +1 -1
- package/dist/webpack/configs/output-config.js +10 -24
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts +3 -8
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +10 -47
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +6 -6
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +4 -13
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +4 -12
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +4 -6
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +2 -2
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/html-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +4 -2
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-tags-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/html-tags-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/html-tags-plugin.js +8 -19
- package/dist/webpack/configs/plugins/html-tags-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts +15 -3
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +41 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.d.ts +2 -2
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +4 -2
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/moment-locales-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.js +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.d.ts +3 -3
- package/dist/webpack/configs/plugins/virtual-modules-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +13 -56
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts +3 -2
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts +3 -2
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.d.ts +3 -2
- package/dist/webpack/configs/resolve-config.d.ts.map +1 -1
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/css-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +2 -1
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/font-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/image-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +3 -1
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/less-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/scss-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/svg-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts +2 -2
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +2 -2
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.d.ts +3 -2
- package/dist/webpack/configs/stats-config.d.ts.map +1 -1
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/watch-options-config.d.ts +2 -2
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -1
- package/dist/webpack/configs/watch-options-config.js +2 -2
- package/dist/webpack/configs/watch-options-config.js.map +1 -1
- package/dist/webpack/create-webpack-config.d.ts +2 -0
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +36 -46
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/create-webpack-configs.d.ts +16 -0
- package/dist/webpack/create-webpack-configs.d.ts.map +1 -0
- package/dist/webpack/create-webpack-configs.js +82 -0
- package/dist/webpack/create-webpack-configs.js.map +1 -0
- package/dist/webpack/index.d.ts +2 -0
- package/dist/webpack/index.d.ts.map +1 -1
- package/dist/webpack/index.js +2 -0
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/types.d.ts +4 -11
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/utils/create-webpack-build-context.d.ts +4 -0
- package/dist/webpack/utils/create-webpack-build-context.d.ts.map +1 -0
- package/dist/webpack/utils/create-webpack-build-context.js +21 -0
- package/dist/webpack/utils/create-webpack-build-context.js.map +1 -0
- package/dist/webpack/utils/index.d.ts +1 -1
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +1 -1
- package/dist/webpack/utils/index.js.map +1 -1
- package/jest/babel-plugin-import-meta-env.js +18 -0
- package/jest/jest-preset.js +4 -1
- package/package.json +24 -17
- package/patches/vite-plugin-css-injected-by-js+3.5.2.patch +63 -0
- package/src/cli/commands/__tests__/build.test.ts +2 -2
- package/src/cli/commands/__tests__/bundle-vite.test.ts +228 -0
- package/src/cli/commands/__tests__/{bundle-package.test.ts → bundle-webpack.test.ts} +26 -17
- package/src/cli/commands/__tests__/install.test.ts +6 -2
- package/src/cli/commands/__tests__/mfe-generate-metadata.test.ts +13 -10
- package/src/cli/commands/__tests__/mfe-publish.test.ts +4 -4
- package/src/cli/commands/__tests__/start.test.ts +1 -1
- package/src/cli/commands/build.ts +14 -11
- package/src/cli/commands/bundle-vite.ts +82 -0
- package/src/cli/commands/{bundle-package.ts → bundle-webpack.ts} +9 -6
- package/src/cli/commands/install.ts +2 -1
- package/src/cli/commands/mfe-check.ts +1 -2
- package/src/cli/commands/mfe-generate-metadata.ts +1 -1
- package/src/cli/commands/mfe-list.ts +1 -1
- package/src/cli/commands/mfe-package-publish.ts +1 -1
- package/src/cli/commands/mfe-publish.ts +1 -1
- package/src/cli/commands/registry/__tests__/command-registry.test.ts +1 -0
- package/src/cli/commands/registry/build.ts +2 -0
- package/src/cli/commands/registry/bundle-vite.ts +14 -0
- package/src/cli/commands/registry/command-registry.ts +5 -2
- package/src/cli/commands/registry/start.ts +1 -0
- package/src/cli/commands/start.ts +13 -11
- package/src/cli/index.ts +2 -1
- package/src/cli/tasks/tsc-compile/tsc-compile.ts +1 -1
- package/src/cli/utils/copy-files.ts +1 -1
- package/src/cli/utils/index.ts +0 -1
- package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/__tests__/check-resource.test.ts +18 -5
- package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/__tests__/get-package-json.test.ts +1 -1
- package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/check-resource.ts +4 -4
- package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/get-package-json.ts +6 -1
- package/src/core/check-resource/index.ts +1 -0
- package/src/core/constants.ts +16 -0
- package/src/core/create-build-context.ts +57 -0
- package/src/core/defines/define-exposed-dependencies.ts +21 -0
- package/src/core/defines/define-exposed-instance-dependencies.ts +19 -0
- package/src/core/defines/define-web-component-name.ts +15 -0
- package/src/core/defines/index.ts +3 -0
- package/src/core/externals.ts +22 -0
- package/src/core/get-build-name.ts +11 -0
- package/src/core/get-bundle-type.ts +19 -0
- package/src/core/get-output-path.ts +18 -0
- package/src/core/get-shared-entry-points.ts +37 -0
- package/src/{webpack/configs/utils → core/get-version}/get-launchdarkly-sdk-version.ts +1 -1
- package/src/core/get-version/get-startup-version.ts +6 -0
- package/src/{webpack/configs/utils → core/get-version}/get-web-components-version.ts +1 -1
- package/src/core/get-version/index.ts +3 -0
- package/src/core/index.ts +15 -0
- package/src/{webpack/configs/utils → core/metadata}/__tests__/build-metadata.test.ts +10 -6
- package/src/{webpack/configs/utils → core/metadata}/__tests__/generate-metadata.test.ts +27 -13
- package/src/{webpack/configs/utils → core/metadata}/build-metadata.ts +6 -3
- package/src/core/metadata/generate-exposed-dependencies-metadata.ts +20 -0
- package/src/{webpack/configs/utils → core/metadata}/generate-metadata.ts +7 -6
- package/src/core/metadata/index.ts +3 -0
- package/src/core/types.ts +50 -0
- package/src/core/virtual-modules.ts +74 -0
- package/src/cypress/config/__tests__/webpack-config.test.ts +12 -2
- package/src/cypress/config/webpack-config.ts +23 -9
- package/src/index.ts +1 -0
- package/src/storybook-config/__tests__/webpack-final.test.ts +5 -2
- package/src/storybook-config/webpack-final.ts +22 -10
- package/src/utils/__tests__/get-configuration.test.ts +28 -7
- package/src/utils/__tests__/get-package-data.test.ts +35 -1
- package/src/utils/__tests__/get-packages.test.ts +3 -3
- package/src/utils/__tests__/validate-shared-dependencies.test.ts +55 -0
- package/src/utils/get-configuration.ts +48 -6
- package/src/utils/get-package-data.ts +3 -1
- package/src/utils/get-packages.ts +2 -2
- package/src/utils/index.ts +1 -1
- package/src/utils/validate-shared-dependencies.ts +32 -0
- package/src/vite/__tests__/build-shared-dependencies.test.ts +165 -0
- package/src/vite/__tests__/validate-shared-dependencies.test.ts +34 -0
- package/src/vite/build-shared-dependencies.ts +47 -0
- package/src/vite/config/__tests__/base-config.test.ts +291 -0
- package/src/vite/config/__tests__/create-vite-build-context.test.ts +86 -0
- package/src/vite/config/__tests__/create-vite-config.test.ts +141 -0
- package/src/vite/config/__tests__/define-config.test.ts +23 -0
- package/src/vite/config/__tests__/load-config-file.test.ts +191 -0
- package/src/vite/config/__tests__/merge-vite-configs.test.ts +84 -0
- package/src/vite/config/base-config.ts +127 -0
- package/src/vite/config/create-vite-build-context.ts +45 -0
- package/src/vite/config/create-vite-config.ts +33 -0
- package/src/vite/config/define-config.ts +18 -0
- package/src/vite/config/index.ts +5 -0
- package/src/vite/config/load-config-file.ts +52 -0
- package/src/vite/config/merge-vite-configs.ts +15 -0
- package/src/vite/index.html +36 -0
- package/src/vite/index.ts +1 -0
- package/src/vite/plugins/__tests__/css-injector-plugin.test.ts +61 -0
- package/src/vite/plugins/__tests__/dev-server-routing-plugin.test.ts +255 -0
- package/src/vite/plugins/__tests__/externals-plugin.test.ts +138 -0
- package/src/vite/plugins/__tests__/html-plugin.test.ts +308 -0
- package/src/vite/plugins/__tests__/ignore-modules-plugin.test.ts +80 -0
- package/src/vite/plugins/__tests__/metadata-plugin.test.ts +163 -0
- package/src/vite/plugins/__tests__/shared-dependencies-plugin.test.ts +427 -0
- package/src/vite/plugins/__tests__/style-urls-plugin.test.ts +76 -0
- package/src/vite/plugins/__tests__/svgr-plugin.test.ts +67 -0
- package/src/vite/plugins/__tests__/virtual-modules-plugin.test.ts +120 -0
- package/src/vite/plugins/css-injector-plugin.ts +60 -0
- package/src/vite/plugins/dev-server-routing-plugin.ts +96 -0
- package/src/vite/plugins/externals-plugin.ts +81 -0
- package/src/vite/plugins/html-plugin.ts +94 -0
- package/src/vite/plugins/ignore-modules-plugin.ts +22 -0
- package/src/vite/plugins/index.ts +9 -0
- package/src/vite/plugins/metadata-plugin.ts +66 -0
- package/src/vite/plugins/shared-dependencies-plugin.ts +273 -0
- package/src/vite/plugins/style-urls-plugin.ts +28 -0
- package/src/vite/plugins/svgr-plugin.ts +17 -0
- package/src/vite/plugins/virtual-modules-plugin.ts +59 -0
- package/src/vite/types.ts +6 -0
- package/src/vite/validate-shared-dependencies.ts +27 -0
- package/src/{cli/utils/__tests__/bundle.test.ts → webpack/__tests__/bundle-webpack.test.ts} +26 -19
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +23 -9
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +17 -16
- package/src/webpack/__tests__/create-webpack-config.test.ts +10 -8
- package/src/webpack/bundle-webpack.ts +107 -0
- package/src/webpack/configs/amd-config.ts +3 -2
- package/src/webpack/configs/cache-config.ts +4 -3
- package/src/webpack/configs/dev-server-config.ts +16 -17
- package/src/webpack/configs/devtool-config.ts +4 -3
- package/src/webpack/configs/entry.config.ts +8 -7
- package/src/webpack/configs/externals-config.ts +5 -21
- package/src/webpack/configs/index.ts +0 -1
- package/src/webpack/configs/loaders/css-loader.ts +3 -2
- package/src/webpack/configs/loaders/style-loader.ts +4 -5
- package/src/webpack/configs/module-config.ts +2 -2
- package/src/webpack/configs/optimization-config.ts +17 -11
- package/src/webpack/configs/output-config.ts +11 -22
- package/src/webpack/configs/plugins/assets-manifest-plugin.ts +9 -36
- package/src/webpack/configs/plugins/bundle-analyser-plugin.ts +8 -8
- package/src/webpack/configs/plugins/define-exposed-dependencies-plugin.ts +7 -15
- package/src/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.ts +7 -13
- package/src/webpack/configs/plugins/define-web-component-name-plugin.ts +7 -8
- package/src/webpack/configs/plugins/filter-warnings-plugin.ts +4 -3
- package/src/webpack/configs/plugins/html-plugin.ts +6 -6
- package/src/webpack/configs/plugins/html-tags-plugin.ts +7 -16
- package/src/webpack/configs/plugins/ignore-plugin/__tests__/ignore-plugin.test.ts +92 -0
- package/src/webpack/configs/plugins/ignore-plugin/empty-module.js +6 -0
- package/src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts +44 -6
- package/src/webpack/configs/plugins/mini-css-extract-plugin.ts +9 -5
- package/src/webpack/configs/plugins/moment-locales-plugin.ts +3 -2
- package/src/webpack/configs/plugins/remove-empty-scripts-plugin.ts +4 -3
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +11 -65
- package/src/webpack/configs/plugins/watch-run-plugin.ts +3 -2
- package/src/webpack/configs/plugins-config.ts +3 -2
- package/src/webpack/configs/resolve-config.ts +3 -2
- package/src/webpack/configs/rules/css-rules.ts +4 -3
- package/src/webpack/configs/rules/font-rules.ts +2 -2
- package/src/webpack/configs/rules/image-rules.ts +2 -2
- package/src/webpack/configs/rules/js-rules.ts +4 -2
- package/src/webpack/configs/rules/less-rules.ts +2 -2
- package/src/webpack/configs/rules/scss-rules.ts +2 -2
- package/src/webpack/configs/rules/svg-rules.ts +2 -2
- package/src/webpack/configs/rules-config.ts +6 -5
- package/src/webpack/configs/stats-config.ts +3 -2
- package/src/webpack/configs/watch-options-config.ts +3 -3
- package/src/webpack/create-webpack-config.ts +18 -49
- package/src/webpack/create-webpack-configs.ts +77 -0
- package/src/webpack/index.ts +2 -0
- package/src/webpack/types.ts +8 -11
- package/src/webpack/utils/__tests__/split-by-entry.test.ts +33 -0
- package/src/webpack/utils/create-webpack-build-context.ts +12 -0
- package/src/webpack/utils/index.ts +1 -1
- package/dist/cli/commands/bundle-package.d.ts +0 -6
- package/dist/cli/commands/bundle-package.d.ts.map +0 -1
- package/dist/cli/commands/bundle-package.js.map +0 -1
- package/dist/cli/commands/registry/bundle-package.d.ts.map +0 -1
- package/dist/cli/utils/bundle.d.ts +0 -14
- package/dist/cli/utils/bundle.d.ts.map +0 -1
- package/dist/cli/utils/bundle.js +0 -187
- package/dist/cli/utils/bundle.js.map +0 -1
- package/dist/utils/get-startup-version.d.ts.map +0 -1
- package/dist/utils/get-startup-version.js.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts +0 -3
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.d.ts +0 -2
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +0 -1
- package/dist/webpack/configs/types.d.ts +0 -35
- package/dist/webpack/configs/types.d.ts.map +0 -1
- package/dist/webpack/configs/types.js.map +0 -1
- package/dist/webpack/configs/utils/build-metadata.d.ts.map +0 -1
- package/dist/webpack/configs/utils/build-metadata.js.map +0 -1
- package/dist/webpack/configs/utils/generate-metadata.d.ts +0 -3
- package/dist/webpack/configs/utils/generate-metadata.d.ts.map +0 -1
- package/dist/webpack/configs/utils/generate-metadata.js.map +0 -1
- package/dist/webpack/configs/utils/get-bundle-type.d.ts +0 -3
- package/dist/webpack/configs/utils/get-bundle-type.d.ts.map +0 -1
- package/dist/webpack/configs/utils/get-bundle-type.js.map +0 -1
- package/dist/webpack/configs/utils/get-exposed-dependencies.d.ts.map +0 -1
- package/dist/webpack/configs/utils/get-exposed-dependencies.js.map +0 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.d.ts.map +0 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +0 -1
- package/dist/webpack/configs/utils/get-web-components-version.d.ts.map +0 -1
- package/dist/webpack/configs/utils/get-web-components-version.js.map +0 -1
- package/dist/webpack/configs/utils/index.d.ts +0 -4
- package/dist/webpack/configs/utils/index.d.ts.map +0 -1
- package/dist/webpack/configs/utils/index.js.map +0 -1
- package/dist/webpack/utils/stringify-config.d.ts.map +0 -1
- package/dist/webpack/utils/stringify-config.js.map +0 -1
- package/src/cli/utils/bundle.ts +0 -191
- package/src/utils/get-startup-version.ts +0 -6
- package/src/webpack/configs/types.ts +0 -38
- package/src/webpack/configs/utils/get-bundle-type.ts +0 -22
- package/src/webpack/configs/utils/index.ts +0 -3
- /package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-peer-dependency.d.ts +0 -0
- /package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-peer-dependency.js +0 -0
- /package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-react-dom-peer-dependency.d.ts +0 -0
- /package/dist/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-react-dom-peer-dependency.js +0 -0
- /package/dist/{webpack/configs/utils → core}/get-exposed-dependencies.d.ts +0 -0
- /package/dist/{webpack/configs/utils → core}/get-exposed-dependencies.js +0 -0
- /package/dist/{webpack/configs/utils → core/get-version}/get-launchdarkly-sdk-version.d.ts +0 -0
- /package/dist/{utils → core/get-version}/get-startup-version.d.ts +0 -0
- /package/dist/{webpack/configs/utils → core/get-version}/get-web-components-version.d.ts +0 -0
- /package/dist/{webpack/configs/utils → core/metadata}/build-metadata.d.ts +0 -0
- /package/dist/{webpack/utils → core}/stringify-config.d.ts +0 -0
- /package/dist/{webpack/utils → core}/stringify-config.js +0 -0
- /package/dist/{webpack/configs → core}/types.js +0 -0
- /package/src/cli/commands/registry/{bundle-package.ts → bundle-webpack.ts} +0 -0
- /package/src/{webpack/configs/utils → core}/__tests__/get-exposed-dependencies.test.ts +0 -0
- /package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/__tests__/is-optional-peer-dependency.test.ts +0 -0
- /package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/__tests__/is-optional-react-dom-peer-dependency.test.ts +0 -0
- /package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-peer-dependency.ts +0 -0
- /package/src/{webpack/configs/plugins/ignore-plugin → core/check-resource}/is-optional-react-dom-peer-dependency.ts +0 -0
- /package/src/{webpack/configs/utils → core}/get-exposed-dependencies.ts +0 -0
- /package/src/{webpack/configs/utils → core/get-version}/__tests__/get-launchdarkly-sdk-version.test.ts +0 -0
- /package/src/{utils → core/get-version}/__tests__/get-startup-version.test.ts +0 -0
- /package/src/{webpack/configs/utils → core/get-version}/__tests__/get-web-components-version.test.ts +0 -0
- /package/src/{webpack/utils → core}/stringify-config.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/metadata/index.ts"],"sourcesContent":["export * from './build-metadata';\nexport * from './generate-exposed-dependencies-metadata';\nexport * from './generate-metadata';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringify-config.d.ts","sourceRoot":"","sources":["../../src/core/stringify-config.ts"],"names":[],"mappings":"AACA,wBAAgB,eAAe,CAAC,aAAa,EAAE,GAAG,UAiBjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/stringify-config.ts"],"sourcesContent":["/* istanbul ignore next: debug only */\nexport function stringifyConfig(configuration: any) {\n function replacer(key: string, value: any) {\n if (typeof value === 'function') {\n return `Function(${value.name ?? ''})`;\n }\n if (value instanceof RegExp) {\n return String(value);\n }\n if (key === 'plugins' && Array.isArray(value)) {\n return value.map(plugin => {\n const name = plugin.constructor?.name ?? plugin.name;\n return name ? { [name]: plugin } : plugin;\n });\n }\n return value;\n }\n return JSON.stringify(configuration, replacer, 2);\n}\n"],"names":["stringifyConfig","configuration","replacer","key","value","name","RegExp","String","Array","isArray","map","plugin","JSON","stringify"],"mappings":"AAAA,oCAAoC;;;;+BACpBA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,aAAkB;IAC9C,SAASC,SAASC,GAAW,EAAEC,KAAU;QACrC,IAAI,OAAOA,UAAU,YAAY;gBACVA;YAAnB,OAAO,CAAC,SAAS,GAAEA,cAAAA,MAAMC,IAAI,cAAVD,yBAAAA,cAAc,GAAG,CAAC,CAAC;QAC1C;QACA,IAAIA,iBAAiBE,QAAQ;YACzB,OAAOC,OAAOH;QAClB;QACA,IAAID,QAAQ,aAAaK,MAAMC,OAAO,CAACL,QAAQ;YAC3C,OAAOA,MAAMM,GAAG,CAACC,CAAAA;;oBACAA;gBAAb,MAAMN,gBAAOM,sBAAAA,OAAO,WAAW,cAAlBA,0CAAAA,oBAAoBN,IAAI,uCAAIM,OAAON,IAAI;gBACpD,OAAOA,OAAO;oBAAE,CAACA,KAAK,EAAEM;gBAAO,IAAIA;YACvC;QACJ;QACA,OAAOP;IACX;IACA,OAAOQ,KAAKC,SAAS,CAACZ,eAAeC,UAAU;AACnD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type BuildContext<T = unknown> = {
|
|
2
|
+
package: PackageContext;
|
|
3
|
+
build: BuildIdentity;
|
|
4
|
+
options: BuildOptions;
|
|
5
|
+
} & (unknown extends T ? {} : {
|
|
6
|
+
bundlerConfig: T;
|
|
7
|
+
});
|
|
8
|
+
export interface PackageContext {
|
|
9
|
+
name: string;
|
|
10
|
+
version: string;
|
|
11
|
+
destination: string;
|
|
12
|
+
source: string;
|
|
13
|
+
dependencies: Record<string, string>;
|
|
14
|
+
sharedDependencies: Record<string, string>;
|
|
15
|
+
isWebComponent: boolean;
|
|
16
|
+
isLegacyRoot: boolean;
|
|
17
|
+
isExposeSharedDependencies: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface BuildIdentity {
|
|
20
|
+
name: string;
|
|
21
|
+
isProduction: boolean;
|
|
22
|
+
light?: boolean;
|
|
23
|
+
headless?: boolean;
|
|
24
|
+
emitExposedDependencies?: boolean | {
|
|
25
|
+
output?: {
|
|
26
|
+
path?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface BuildOptions {
|
|
31
|
+
codeCoverage?: boolean;
|
|
32
|
+
buildStat?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface EntryPoint {
|
|
35
|
+
css?: string[];
|
|
36
|
+
js?: string[];
|
|
37
|
+
}
|
|
38
|
+
export interface EntryPoints {
|
|
39
|
+
full?: EntryPoint;
|
|
40
|
+
light?: EntryPoint;
|
|
41
|
+
headless?: EntryPoint;
|
|
42
|
+
}
|
|
43
|
+
export interface Metadata {
|
|
44
|
+
name: string;
|
|
45
|
+
version: string;
|
|
46
|
+
bundledWith: Record<string, string | undefined>;
|
|
47
|
+
sharedDependencies: Record<string, string>;
|
|
48
|
+
dependencies: Record<string, string>;
|
|
49
|
+
entrypoints: EntryPoints;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;CACzB,GAAG,CAAC,OAAO,SAAS,CAAC,GAAG,EAAE,GAAG;IAAE,aAAa,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,GAAG;QAAE,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACtE;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACvB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAChD,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BuildContext } from './types';
|
|
2
|
+
export declare function virtualModules(context: BuildContext): {
|
|
3
|
+
index?: string;
|
|
4
|
+
designSystem?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getDesignSystemPath(context: BuildContext): string;
|
|
7
|
+
export declare function needsToIncludeDesignSystem(context: BuildContext): boolean;
|
|
8
|
+
//# sourceMappingURL=virtual-modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../../src/core/virtual-modules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY;YACvB,MAAM;mBAAiB,MAAM;EAczD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,UAExD;AA6BD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,YAAY,WAa/D"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get getDesignSystemPath () {
|
|
13
|
+
return getDesignSystemPath;
|
|
14
|
+
},
|
|
15
|
+
get needsToIncludeDesignSystem () {
|
|
16
|
+
return needsToIncludeDesignSystem;
|
|
17
|
+
},
|
|
18
|
+
get virtualModules () {
|
|
19
|
+
return virtualModules;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
23
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
24
|
+
function _interop_require_default(obj) {
|
|
25
|
+
return obj && obj.__esModule ? obj : {
|
|
26
|
+
default: obj
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function virtualModules(context) {
|
|
30
|
+
const modules = {};
|
|
31
|
+
if (context.package.isWebComponent) {
|
|
32
|
+
modules.index = indexCode(context);
|
|
33
|
+
}
|
|
34
|
+
if (needsToIncludeDesignSystem(context)) {
|
|
35
|
+
const designSystemPath = getDesignSystemPath(context);
|
|
36
|
+
if (!_fs.default.existsSync(designSystemPath)) {
|
|
37
|
+
modules.designSystem = designSystemCode();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return modules;
|
|
41
|
+
}
|
|
42
|
+
function getDesignSystemPath(context) {
|
|
43
|
+
return _path.default.join(process.cwd(), context.package.destination, 'design-system.css');
|
|
44
|
+
}
|
|
45
|
+
function designSystemCode() {
|
|
46
|
+
return [
|
|
47
|
+
`@import '@servicetitan/tokens/core/tokens.css';`,
|
|
48
|
+
`@import '@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';`,
|
|
49
|
+
`@import '@servicetitan/design-system/dist/system.min.css';`
|
|
50
|
+
].join('\n');
|
|
51
|
+
}
|
|
52
|
+
function indexCode(context) {
|
|
53
|
+
const { light = false, headless } = context.build;
|
|
54
|
+
const { isLegacyRoot, sharedDependencies } = context.package;
|
|
55
|
+
if (headless) {
|
|
56
|
+
return headlessIndex();
|
|
57
|
+
}
|
|
58
|
+
const options = `{ legacyRoot: ${isLegacyRoot}, sharedDependenciesNames: ${JSON.stringify(Object.keys(sharedDependencies))} }`;
|
|
59
|
+
return [
|
|
60
|
+
...needsToIncludeDesignSystem(context) ? [
|
|
61
|
+
`import './design-system.css';`
|
|
62
|
+
] : [],
|
|
63
|
+
`import { register } from '@servicetitan/web-components';`,
|
|
64
|
+
`import { App } from './app';`,
|
|
65
|
+
`register(App, ${light}, ${options});`
|
|
66
|
+
].join('\n');
|
|
67
|
+
}
|
|
68
|
+
function needsToIncludeDesignSystem(context) {
|
|
69
|
+
const { light, headless, emitExposedDependencies } = context.build;
|
|
70
|
+
const { isWebComponent, dependencies, sharedDependencies } = context.package;
|
|
71
|
+
return !!emitExposedDependencies && !!sharedDependencies['@servicetitan/design-system'] || isWebComponent && !headless && // Depends on design system
|
|
72
|
+
!!dependencies['@servicetitan/design-system'] && // ... and is not light bundle with private copy of design system
|
|
73
|
+
!(light && !!sharedDependencies['@servicetitan/design-system']);
|
|
74
|
+
}
|
|
75
|
+
function headlessIndex() {
|
|
76
|
+
return [
|
|
77
|
+
"import { registerHeadless } from '@servicetitan/web-components/register-headless';",
|
|
78
|
+
"import { connectedCallback, disconnectedCallback } from './headless';",
|
|
79
|
+
'registerHeadless(connectedCallback, disconnectedCallback);'
|
|
80
|
+
].join('\n');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=virtual-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/virtual-modules.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { BuildContext } from './types';\n\nexport function virtualModules(context: BuildContext) {\n const modules: { index?: string; designSystem?: string } = {};\n\n if (context.package.isWebComponent) {\n modules.index = indexCode(context);\n }\n\n if (needsToIncludeDesignSystem(context)) {\n const designSystemPath = getDesignSystemPath(context);\n if (!fs.existsSync(designSystemPath)) {\n modules.designSystem = designSystemCode();\n }\n }\n\n return modules;\n}\n\nexport function getDesignSystemPath(context: BuildContext) {\n return path.join(process.cwd(), context.package.destination, 'design-system.css');\n}\n\nfunction designSystemCode() {\n return [\n `@import '@servicetitan/tokens/core/tokens.css';`,\n `@import '@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';`,\n `@import '@servicetitan/design-system/dist/system.min.css';`,\n ].join('\\n');\n}\n\nfunction indexCode(context: BuildContext) {\n const { light = false, headless } = context.build;\n const { isLegacyRoot, sharedDependencies } = context.package;\n if (headless) {\n return headlessIndex();\n }\n\n const options = `{ legacyRoot: ${isLegacyRoot}, sharedDependenciesNames: ${JSON.stringify(\n Object.keys(sharedDependencies)\n )} }`;\n\n return [\n ...(needsToIncludeDesignSystem(context) ? [`import './design-system.css';`] : []),\n `import { register } from '@servicetitan/web-components';`,\n `import { App } from './app';`,\n `register(App, ${light}, ${options});`,\n ].join('\\n');\n}\n\nexport function needsToIncludeDesignSystem(context: BuildContext) {\n const { light, headless, emitExposedDependencies } = context.build;\n const { isWebComponent, dependencies, sharedDependencies } = context.package;\n\n return (\n (!!emitExposedDependencies && !!sharedDependencies['@servicetitan/design-system']) ||\n (isWebComponent &&\n !headless &&\n // Depends on design system\n !!dependencies['@servicetitan/design-system'] &&\n // ... and is not light bundle with private copy of design system\n !(light && !!sharedDependencies['@servicetitan/design-system']))\n );\n}\n\nfunction headlessIndex() {\n return [\n \"import { registerHeadless } from '@servicetitan/web-components/register-headless';\",\n \"import { connectedCallback, disconnectedCallback } from './headless';\",\n 'registerHeadless(connectedCallback, disconnectedCallback);',\n ].join('\\n');\n}\n"],"names":["getDesignSystemPath","needsToIncludeDesignSystem","virtualModules","context","modules","package","isWebComponent","index","indexCode","designSystemPath","fs","existsSync","designSystem","designSystemCode","path","join","process","cwd","destination","light","headless","build","isLegacyRoot","sharedDependencies","headlessIndex","options","JSON","stringify","Object","keys","emitExposedDependencies","dependencies"],"mappings":";;;;;;;;;;;QAqBgBA;eAAAA;;QA+BAC;eAAAA;;QAhDAC;eAAAA;;;2DAJD;6DACE;;;;;;AAGV,SAASA,eAAeC,OAAqB;IAChD,MAAMC,UAAqD,CAAC;IAE5D,IAAID,QAAQE,OAAO,CAACC,cAAc,EAAE;QAChCF,QAAQG,KAAK,GAAGC,UAAUL;IAC9B;IAEA,IAAIF,2BAA2BE,UAAU;QACrC,MAAMM,mBAAmBT,oBAAoBG;QAC7C,IAAI,CAACO,WAAE,CAACC,UAAU,CAACF,mBAAmB;YAClCL,QAAQQ,YAAY,GAAGC;QAC3B;IACJ;IAEA,OAAOT;AACX;AAEO,SAASJ,oBAAoBG,OAAqB;IACrD,OAAOW,aAAI,CAACC,IAAI,CAACC,QAAQC,GAAG,IAAId,QAAQE,OAAO,CAACa,WAAW,EAAE;AACjE;AAEA,SAASL;IACL,OAAO;QACH,CAAC,+CAA+C,CAAC;QACjD,CAAC,6DAA6D,CAAC;QAC/D,CAAC,0DAA0D,CAAC;KAC/D,CAACE,IAAI,CAAC;AACX;AAEA,SAASP,UAAUL,OAAqB;IACpC,MAAM,EAAEgB,QAAQ,KAAK,EAAEC,QAAQ,EAAE,GAAGjB,QAAQkB,KAAK;IACjD,MAAM,EAAEC,YAAY,EAAEC,kBAAkB,EAAE,GAAGpB,QAAQE,OAAO;IAC5D,IAAIe,UAAU;QACV,OAAOI;IACX;IAEA,MAAMC,UAAU,CAAC,cAAc,EAAEH,aAAa,2BAA2B,EAAEI,KAAKC,SAAS,CACrFC,OAAOC,IAAI,CAACN,qBACd,EAAE,CAAC;IAEL,OAAO;WACCtB,2BAA2BE,WAAW;YAAC,CAAC,6BAA6B,CAAC;SAAC,GAAG,EAAE;QAChF,CAAC,wDAAwD,CAAC;QAC1D,CAAC,4BAA4B,CAAC;QAC9B,CAAC,cAAc,EAAEgB,MAAM,EAAE,EAAEM,QAAQ,EAAE,CAAC;KACzC,CAACV,IAAI,CAAC;AACX;AAEO,SAASd,2BAA2BE,OAAqB;IAC5D,MAAM,EAAEgB,KAAK,EAAEC,QAAQ,EAAEU,uBAAuB,EAAE,GAAG3B,QAAQkB,KAAK;IAClE,MAAM,EAAEf,cAAc,EAAEyB,YAAY,EAAER,kBAAkB,EAAE,GAAGpB,QAAQE,OAAO;IAE5E,OACI,AAAC,CAAC,CAACyB,2BAA2B,CAAC,CAACP,kBAAkB,CAAC,8BAA8B,IAChFjB,kBACG,CAACc,YACD,2BAA2B;IAC3B,CAAC,CAACW,YAAY,CAAC,8BAA8B,IAC7C,iEAAiE;IACjE,CAAEZ,CAAAA,SAAS,CAAC,CAACI,kBAAkB,CAAC,8BAA8B,AAAD;AAEzE;AAEA,SAASC;IACL,OAAO;QACH;QACA;QACA;KACH,CAACT,IAAI,CAAC;AACX"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Configuration } from 'webpack';
|
|
2
|
-
import { Overrides } from '../../webpack/
|
|
2
|
+
import { Overrides } from '../../webpack/types';
|
|
3
3
|
export declare function webpackConfig(overrides?: Overrides): Configuration;
|
|
4
4
|
//# sourceMappingURL=webpack-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-config.d.ts","sourceRoot":"","sources":["../../../src/cypress/config/webpack-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"webpack-config.d.ts","sourceRoot":"","sources":["../../../src/cypress/config/webpack-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,OAAO,EAAE,SAAS,EAAuB,MAAM,qBAAqB,CAAC;AAErE,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,aAAa,CAiBlE"}
|
|
@@ -45,12 +45,25 @@ function webpackConfig(overrides) {
|
|
|
45
45
|
}
|
|
46
46
|
function getContext() {
|
|
47
47
|
return {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
package: {
|
|
49
|
+
name: '',
|
|
50
|
+
version: '',
|
|
51
|
+
destination: '',
|
|
52
|
+
source: '',
|
|
53
|
+
dependencies: {},
|
|
54
|
+
sharedDependencies: {},
|
|
55
|
+
isWebComponent: false,
|
|
56
|
+
isLegacyRoot: false,
|
|
57
|
+
isExposeSharedDependencies: false
|
|
58
|
+
},
|
|
59
|
+
build: {
|
|
60
|
+
name: '',
|
|
61
|
+
isProduction: false
|
|
62
|
+
},
|
|
63
|
+
options: {
|
|
64
|
+
codeCoverage: true
|
|
65
|
+
},
|
|
66
|
+
bundlerConfig: {}
|
|
54
67
|
};
|
|
55
68
|
}
|
|
56
69
|
function getRules(context, overrides) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cypress/config/webpack-config.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport merge from 'webpack-merge';\nimport { getSwcOptions } from '../../cli/tasks';\nimport { TSConfig } from '../../cli/utils';\nimport { getTsConfigWithFallback, log } from '../../utils';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/cypress/config/webpack-config.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport merge from 'webpack-merge';\nimport { getSwcOptions } from '../../cli/tasks';\nimport { TSConfig } from '../../cli/utils';\nimport { getTsConfigWithFallback, log } from '../../utils';\nimport { rulesConfig } from '../../webpack/configs';\nimport { Overrides, WebpackBuildContext } from '../../webpack/types';\n\nexport function webpackConfig(overrides?: Overrides): Configuration {\n const context = getContext();\n const rules = getRules(context, overrides ?? {});\n\n /* istanbul ignore next: debug only */\n log.debug('cypress-config:webpack-config', () => inspect({ rules }, { depth: null }));\n\n const config: Configuration = {\n module: {\n rules,\n },\n resolve: {\n extensions: ['.ts', '.tsx', '.js', '.jsx'],\n },\n };\n\n return merge(config, overrides?.configuration ?? {});\n}\n\nfunction getContext(): WebpackBuildContext {\n return {\n package: {\n name: '',\n version: '',\n destination: '',\n source: '',\n dependencies: {},\n sharedDependencies: {},\n isWebComponent: false,\n isLegacyRoot: false,\n isExposeSharedDependencies: false,\n },\n build: {\n name: '',\n isProduction: false,\n },\n options: {\n codeCoverage: true,\n },\n bundlerConfig: {},\n };\n}\n\nfunction getRules(context: WebpackBuildContext, overrides: Overrides) {\n const { rules } = rulesConfig(context, overrides);\n\n return [getSwcLoaderRule(), ...rules];\n}\n\nfunction getSwcLoaderRule() {\n const tsConfig = new TSConfig(getTsConfigWithFallback());\n\n const swcOptions = getSwcOptions(tsConfig);\n\n return {\n test: /\\.tsx?$/,\n exclude: /node_modules/,\n use: {\n loader: 'swc-loader',\n options: swcOptions,\n },\n };\n}\n"],"names":["webpackConfig","overrides","context","getContext","rules","getRules","log","debug","inspect","depth","config","module","resolve","extensions","merge","configuration","package","name","version","destination","source","dependencies","sharedDependencies","isWebComponent","isLegacyRoot","isExposeSharedDependencies","build","isProduction","options","codeCoverage","bundlerConfig","rulesConfig","getSwcLoaderRule","tsConfig","TSConfig","getTsConfigWithFallback","swcOptions","getSwcOptions","test","exclude","use","loader"],"mappings":";;;;+BASgBA;;;eAAAA;;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ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AAErC,cAAc,WAAW,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './utils/get-packages';\nexport * from './webpack';\n"],"names":[],"mappings":";;;;qBAAc;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './utils/get-packages';\n\nexport * from './webpack';\n"],"names":[],"mappings":";;;;qBAAc;qBAEA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Configuration } from 'webpack';
|
|
2
|
-
import { Overrides } from '../webpack/
|
|
2
|
+
import { Overrides } from '../webpack/types';
|
|
3
3
|
export declare function webpackFinal(config: Configuration, overrides?: Overrides): Configuration;
|
|
4
4
|
//# sourceMappingURL=webpack-final.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-final.d.ts","sourceRoot":"","sources":["../../src/storybook-config/webpack-final.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"webpack-final.d.ts","sourceRoot":"","sources":["../../src/storybook-config/webpack-final.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,OAAO,EAAE,SAAS,EAAuB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,GAAE,SAAc,GAAG,aAAa,CAgB5F"}
|
|
@@ -41,12 +41,23 @@ function webpackFinal(config, overrides = {}) {
|
|
|
41
41
|
}
|
|
42
42
|
function getContext(config) {
|
|
43
43
|
return {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
package: {
|
|
45
|
+
name: '',
|
|
46
|
+
version: '',
|
|
47
|
+
destination: '',
|
|
48
|
+
source: '',
|
|
49
|
+
dependencies: {},
|
|
50
|
+
sharedDependencies: {},
|
|
51
|
+
isWebComponent: false,
|
|
52
|
+
isLegacyRoot: false,
|
|
53
|
+
isExposeSharedDependencies: false
|
|
54
|
+
},
|
|
55
|
+
build: {
|
|
56
|
+
name: '',
|
|
57
|
+
isProduction: config.mode === 'production'
|
|
58
|
+
},
|
|
59
|
+
options: {},
|
|
60
|
+
bundlerConfig: {}
|
|
50
61
|
};
|
|
51
62
|
}
|
|
52
63
|
function getPlugins(context, overrides) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/storybook-config/webpack-final.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport { log } from '../utils';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/storybook-config/webpack-final.ts"],"sourcesContent":["import { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport { log } from '../utils';\nimport { rulesConfig } from '../webpack/configs';\nimport { miniCssExtractPlugin } from '../webpack/configs/plugins';\nimport { Overrides, WebpackBuildContext } from '../webpack/types';\n\nexport function webpackFinal(config: Configuration, overrides: Overrides = {}): Configuration {\n const context = getContext(config);\n const rules = getRules(context, overrides);\n const plugins = getPlugins(context, overrides);\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:webpack-final', () => inspect({ rules, plugins }, { depth: null }));\n\n return {\n ...config,\n module: {\n ...config.module,\n rules: [...transformDefaultRules(config.module?.rules), ...rules],\n },\n plugins: [...(config.plugins ?? []), ...plugins],\n };\n}\n\nfunction getContext(config: Configuration): WebpackBuildContext {\n return {\n package: {\n name: '',\n version: '',\n destination: '',\n source: '',\n dependencies: {},\n sharedDependencies: {},\n isWebComponent: false,\n isLegacyRoot: false,\n isExposeSharedDependencies: false,\n },\n build: {\n name: '',\n isProduction: config.mode === 'production',\n },\n options: {},\n bundlerConfig: {},\n };\n}\n\nfunction getPlugins(context: WebpackBuildContext, overrides: Overrides) {\n return [miniCssExtractPlugin(context, overrides)].filter(plugin => !!plugin);\n}\n\nfunction getRules(context: WebpackBuildContext, overrides: Overrides) {\n const include = ['.module.css', '.module.less', '.less', '.module.scss', '.scss', '.svg'];\n const exclude = ['.css'];\n\n const { rules } = rulesConfig(context, overrides);\n\n return rules.filter(\n ({ test }) =>\n !(test instanceof RegExp) ||\n include.some(ext => test.exec(ext) && !exclude.some(ext => test.exec(ext)))\n );\n}\n\nfunction transformDefaultRules(rules: NonNullable<Configuration['module']>['rules'] = []) {\n const result = rules.map(rule => {\n if (rule && typeof rule === 'object' && rule.test instanceof RegExp) {\n if (rule.test.test('.css')) {\n return { ...rule, exclude: /\\.module.css$/ };\n }\n if (rule.test.test('.svg')) {\n return { ...rule, exclude: /\\.svg$/i };\n }\n }\n return rule;\n });\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:transform-default-rules', () =>\n inspect({ result }, { depth: null })\n );\n\n return result;\n}\n"],"names":["webpackFinal","config","overrides","context","getContext","rules","getRules","plugins","getPlugins","log","debug","inspect","depth","module","transformDefaultRules","package","name","version","destination","source","dependencies","sharedDependencies","isWebComponent","isLegacyRoot","isExposeSharedDependencies","build","isProduction","mode","options","bundlerConfig","miniCssExtractPlugin","filter","plugin","include","exclude","rulesConfig","test","RegExp","some","ext","exec","result","map","rule"],"mappings":";;;;+BAOgBA;;;eAAAA;;;0BAPQ;uBAEJ;yBACQ;yBACS;AAG9B,SAASA,aAAaC,MAAqB,EAAEC,YAAuB,CAAC,CAAC;QAcvDD;QAFuBA;IAXzC,MAAME,UAAUC,WAAWH;IAC3B,MAAMI,QAAQC,SAASH,SAASD;IAChC,MAAMK,UAAUC,WAAWL,SAASD;IAEpC,oCAAoC,GACpCO,UAAG,CAACC,KAAK,CAAC,kCAAkC,IAAMC,IAAAA,i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AAsBT,QAAuD,EAAE;IACpF,MAAMoC,SAASpC,MAAMqC,GAAG,CAACC,CAAAA;QACrB,IAAIA,QAAQ,OAAOA,SAAS,YAAYA,KAAKP,IAAI,YAAYC,QAAQ;YACjE,IAAIM,KAAKP,IAAI,CAACA,IAAI,CAAC,SAAS;gBACxB,OAAO;oBAAE,GAAGO,IAAI;oBAAET,SAAS;gBAAgB;YAC/C;YACA,IAAIS,KAAKP,IAAI,CAACA,IAAI,CAAC,SAAS;gBACxB,OAAO;oBAAE,GAAGO,IAAI;oBAAET,SAAS;gBAAU;YACzC;QACJ;QACA,OAAOS;IACX;IAEA,oCAAoC,GACpClC,UAAG,CAACC,KAAK,CAAC,4CAA4C,IAClDC,IAAAA,iBAAO,EAAC;YAAE8B;QAAO,GAAG;YAAE7B,OAAO;QAAK;IAGtC,OAAO6B;AACX"}
|
|
@@ -2,6 +2,7 @@ import { Config } from '@jest/types';
|
|
|
2
2
|
import { swcDir } from '@swc/cli';
|
|
3
3
|
import { ESLint } from 'eslint';
|
|
4
4
|
import { LinterOptions } from 'stylelint';
|
|
5
|
+
import { VitePluginSvgrOptions } from 'vite-plugin-svgr';
|
|
5
6
|
import { ViteUserConfig } from 'vitest/config';
|
|
6
7
|
import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
|
|
7
8
|
import { ReviewConfiguration } from '../cli/commands/review';
|
|
@@ -25,6 +26,7 @@ export interface WebpackConfiguration extends Omit<Pick<WebpackDevServerConfigur
|
|
|
25
26
|
'disable-style-check'?: boolean;
|
|
26
27
|
'minify'?: MinifyOptions;
|
|
27
28
|
'proxy'?: WebpackDevServerConfiguration['proxy'] | string;
|
|
29
|
+
'shared-dependencies'?: Record<string, string>;
|
|
28
30
|
}
|
|
29
31
|
export interface ESLintConfiguration extends ESLint.Options {
|
|
30
32
|
disabled?: boolean;
|
|
@@ -42,6 +44,8 @@ export interface NodeConfiguration {
|
|
|
42
44
|
export declare enum CommandName {
|
|
43
45
|
'build' = "build",
|
|
44
46
|
'bundle-package' = "bundle-package",
|
|
47
|
+
'bundle-vite' = "bundle-vite",
|
|
48
|
+
'bundle-webpack' = "bundle-webpack",
|
|
45
49
|
'clean' = "clean",
|
|
46
50
|
'convert-eslint-config' = "convert-eslint-config",
|
|
47
51
|
'eslint' = "eslint",
|
|
@@ -69,6 +73,29 @@ export declare enum CommandName {
|
|
|
69
73
|
export type VitestConfiguration = ViteUserConfig['test'] & {
|
|
70
74
|
omitDefault?: string[];
|
|
71
75
|
};
|
|
76
|
+
export interface HtmlPluginOptions {
|
|
77
|
+
title?: string;
|
|
78
|
+
favicon?: string;
|
|
79
|
+
template?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface SvgrPluginOptions {
|
|
82
|
+
include?: VitePluginSvgrOptions['include'];
|
|
83
|
+
exclude?: VitePluginSvgrOptions['exclude'];
|
|
84
|
+
svgrOptions?: VitePluginSvgrOptions['svgrOptions'];
|
|
85
|
+
}
|
|
86
|
+
export interface PluginOverrides {
|
|
87
|
+
html?: HtmlPluginOptions;
|
|
88
|
+
svgr?: SvgrPluginOptions;
|
|
89
|
+
}
|
|
90
|
+
export interface ViteBundlerConfig {
|
|
91
|
+
port?: number;
|
|
92
|
+
omitDefault?: string[];
|
|
93
|
+
minify?: MinifyOptions;
|
|
94
|
+
pluginOverrides?: PluginOverrides;
|
|
95
|
+
}
|
|
96
|
+
export interface VitePackageJsonOverride extends ViteBundlerConfig {
|
|
97
|
+
config?: Omit<import('vite').UserConfig, 'plugins'>;
|
|
98
|
+
}
|
|
72
99
|
export interface WebComponentBranchConfigs {
|
|
73
100
|
publishTag?: string;
|
|
74
101
|
uploadSourcemaps?: boolean;
|
|
@@ -92,6 +119,9 @@ type Configuration = {
|
|
|
92
119
|
'swc-compile-package'?: Parameters<typeof swcDir>[0];
|
|
93
120
|
'test'?: JestConfiguration;
|
|
94
121
|
'testRunner'?: string;
|
|
122
|
+
'expose-shared-dependencies'?: boolean;
|
|
123
|
+
'shared-dependencies'?: Record<string, string>;
|
|
124
|
+
'vite'?: false | VitePackageJsonOverride;
|
|
95
125
|
'vitest'?: VitestConfiguration;
|
|
96
126
|
'web-component'?: boolean | string | WebComponentOptions;
|
|
97
127
|
'webpack'?: false | WebpackConfiguration;
|
|
@@ -105,6 +135,7 @@ export declare function getESLintConfiguration(): ESLintConfiguration;
|
|
|
105
135
|
export declare function getJestConfiguration(): JestConfiguration;
|
|
106
136
|
export declare function getReviewConfiguration(): ReviewConfiguration & NodeConfiguration;
|
|
107
137
|
export declare function getStylelintConfiguration(): StylelintConfiguration;
|
|
138
|
+
export declare function getViteConfiguration(): VitePackageJsonOverride;
|
|
108
139
|
export declare function getVitestConfiguration(): import("vitest/node").InlineConfig & {
|
|
109
140
|
omitDefault?: string[];
|
|
110
141
|
};
|
|
@@ -114,7 +145,6 @@ export declare function getWebComponentBranchConfigs(locationOrJson?: LocationOr
|
|
|
114
145
|
export declare function hasHeadlessBundle(): boolean;
|
|
115
146
|
export declare function getSwcCompilePackageConfiguration(): import("@swc/cli").Options;
|
|
116
147
|
export declare function isBundle(locationOrJson?: LocationOrJson): boolean;
|
|
117
|
-
export declare function isCustomStyleRules(): boolean;
|
|
118
148
|
export declare function isDevServerDisabled(): boolean;
|
|
119
149
|
export declare function isExposeSharedDependencies(): boolean;
|
|
120
150
|
export declare function isLegacy(locationOrJson?: LocationOrJson): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,IAAI,6BAA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AAE,cAAc,WAKvD;AAED,wBAAgB,mBAAmB,YAGlC;AAED,wBAAgB,0BAA0B,YAKzC;AAED,wBAAgB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,WAEvD;AAED,wBAAgB,YAAY,YAE3B;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,cAAc,CAAC,cAAc,GAAE,cAAqB,WAEnE"}
|
|
@@ -36,6 +36,9 @@ _export(exports, {
|
|
|
36
36
|
get getSwcCompilePackageConfiguration () {
|
|
37
37
|
return getSwcCompilePackageConfiguration;
|
|
38
38
|
},
|
|
39
|
+
get getViteConfiguration () {
|
|
40
|
+
return getViteConfiguration;
|
|
41
|
+
},
|
|
39
42
|
get getVitestConfiguration () {
|
|
40
43
|
return getVitestConfiguration;
|
|
41
44
|
},
|
|
@@ -54,9 +57,6 @@ _export(exports, {
|
|
|
54
57
|
get isBundle () {
|
|
55
58
|
return isBundle;
|
|
56
59
|
},
|
|
57
|
-
get isCustomStyleRules () {
|
|
58
|
-
return isCustomStyleRules;
|
|
59
|
-
},
|
|
60
60
|
get isDevServerDisabled () {
|
|
61
61
|
return isDevServerDisabled;
|
|
62
62
|
},
|
|
@@ -95,6 +95,8 @@ const allowedWebpackDevServerOptions = [
|
|
|
95
95
|
var CommandName = /*#__PURE__*/ function(CommandName) {
|
|
96
96
|
CommandName["build"] = "build";
|
|
97
97
|
CommandName["bundle-package"] = "bundle-package";
|
|
98
|
+
CommandName["bundle-vite"] = "bundle-vite";
|
|
99
|
+
CommandName["bundle-webpack"] = "bundle-webpack";
|
|
98
100
|
CommandName["clean"] = "clean";
|
|
99
101
|
CommandName["convert-eslint-config"] = "convert-eslint-config";
|
|
100
102
|
CommandName["eslint"] = "eslint";
|
|
@@ -149,6 +151,10 @@ function getStylelintConfiguration() {
|
|
|
149
151
|
var _getConfiguration_lint;
|
|
150
152
|
return (_ref = (_getConfiguration_lint = getConfiguration().lint) === null || _getConfiguration_lint === void 0 ? void 0 : _getConfiguration_lint.stylelint) !== null && _ref !== void 0 ? _ref : {};
|
|
151
153
|
}
|
|
154
|
+
function getViteConfiguration() {
|
|
155
|
+
const { vite } = getConfiguration();
|
|
156
|
+
return typeof vite === 'object' ? vite : {};
|
|
157
|
+
}
|
|
152
158
|
function getVitestConfiguration() {
|
|
153
159
|
var _getConfiguration_vitest;
|
|
154
160
|
return (_getConfiguration_vitest = getConfiguration().vitest) !== null && _getConfiguration_vitest !== void 0 ? _getConfiguration_vitest : {};
|
|
@@ -193,17 +199,15 @@ function getSwcCompilePackageConfiguration() {
|
|
|
193
199
|
return (_getConfiguration_swccompilepackage = getConfiguration()['swc-compile-package']) !== null && _getConfiguration_swccompilepackage !== void 0 ? _getConfiguration_swccompilepackage : {};
|
|
194
200
|
}
|
|
195
201
|
function isBundle(locationOrJson) {
|
|
196
|
-
return getConfiguration(locationOrJson).webpack !== false;
|
|
197
|
-
}
|
|
198
|
-
function isCustomStyleRules() {
|
|
199
|
-
return getWebpackConfiguration()['custom-style-rules'] === true;
|
|
202
|
+
return getConfiguration(locationOrJson).webpack !== false && getConfiguration(locationOrJson).vite !== false;
|
|
200
203
|
}
|
|
201
204
|
function isDevServerDisabled() {
|
|
202
205
|
const webpackConfiguration = getWebpackConfiguration();
|
|
203
206
|
return webpackConfiguration.devServer === false;
|
|
204
207
|
}
|
|
205
208
|
function isExposeSharedDependencies() {
|
|
206
|
-
|
|
209
|
+
var _getConfiguration_exposeshareddependencies;
|
|
210
|
+
return ((_getConfiguration_exposeshareddependencies = getConfiguration()['expose-shared-dependencies']) !== null && _getConfiguration_exposeshareddependencies !== void 0 ? _getConfiguration_exposeshareddependencies : getWebpackConfiguration()['expose-shared-dependencies']) === true;
|
|
207
211
|
}
|
|
208
212
|
function isLegacy(locationOrJson) {
|
|
209
213
|
return getConfiguration(locationOrJson).legacy === true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import { Config } from '@jest/types';\nimport { swcDir } from '@swc/cli';\nimport { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport { LinterOptions } from 'stylelint';\nimport { ViteUserConfig } from 'vitest/config';\nimport { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\nimport { ReviewConfiguration } from '../cli/commands/review';\nimport { getFolders } from './get-folders';\nimport { log } from './log';\nimport { readJson, readJsonSafe } from './read-json';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n> {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport interface JestConfiguration extends Omit<Config.Argv, '_' | '$0'> {\n omitDefault?: string[];\n}\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-check' = 'mfe-check',\n 'mfe-generate-metadata' = 'mfe-generate-metadata',\n 'mfe-list' = 'mfe-list',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-package-rollback' = 'mfe-package-rollback',\n 'mfe-publish' = 'mfe-publish',\n 'mfe-purge-cache' = 'mfe-purge-cache',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'stylelint' = 'stylelint',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type VitestConfiguration = ViteUserConfig['test'] & {\n omitDefault?: string[];\n};\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'jest'?: JestConfiguration;\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration; // for backward-compatibility\n 'testRunner'?: string;\n 'vitest'?: VitestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]?: NodeConfiguration;\n} & NodeConfiguration;\n\ntype LocationOrJson = string | Record<string, any>;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n const configuration = getConfiguration();\n return configuration.jest ?? configuration.test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getVitestConfiguration() {\n return getConfiguration().vitest ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).webpack !== false;\n}\n\nexport function isCustomStyleRules() {\n return getWebpackConfiguration()['custom-style-rules'] === true;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return getWebpackConfiguration()['expose-shared-dependencies'] === true;\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getVitestConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isCustomStyleRules","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","configuration","jest","test","review","stylelint","vitest","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","webpackConfiguration","devServer","legacy","legacyRoot"],"mappings":";;;;;;;;;;;QA6DYA;eAAAA;;QAhDCC;eAAAA;;QAgHGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAwDAC;eAAAA;;QApDAC;eAAAA;;QAmCAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAqCAC;eAAAA;;QAeAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;;2DAhPD;6DACE;4BAKU;qBACP;0BACmB;;;;;;AAEhC,MAAMpB,iCAAiC;IAAC;IAAW;IAAQ;IAAS;CAAS;A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AASI,cAA+B;IACpD,OAAOpB,iBAAiBoB,gBAAgB+B,MAAM,KAAK;AACvD;AAEO,SAASlC;QACLR;IAAP,OAAOA,EAAAA,gCAAAA,4CAAAA,oDAAAA,8BAAgC2C,UAAU,MAAK;AAC1D;AAEO,SAASlC;IACZ,OAAOR,yBAAyB,CAAC,sBAAsB,KAAK;AAChE;AAEO,SAASS,eAAeC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAACX,6BAA6BW;AAC1C"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import { Config } from '@jest/types';\nimport { swcDir } from '@swc/cli';\nimport { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport { LinterOptions } from 'stylelint';\nimport { VitePluginSvgrOptions } from 'vite-plugin-svgr';\nimport { ViteUserConfig } from 'vitest/config';\nimport { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\nimport { ReviewConfiguration } from '../cli/commands/review';\nimport { getFolders } from './get-folders';\nimport { log } from './log';\nimport { readJson, readJsonSafe } from './read-json';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n> {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n 'shared-dependencies'?: Record<string, string>;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport interface JestConfiguration extends Omit<Config.Argv, '_' | '$0'> {\n omitDefault?: string[];\n}\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'bundle-vite' = 'bundle-vite',\n 'bundle-webpack' = 'bundle-webpack',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-check' = 'mfe-check',\n 'mfe-generate-metadata' = 'mfe-generate-metadata',\n 'mfe-list' = 'mfe-list',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-package-rollback' = 'mfe-package-rollback',\n 'mfe-publish' = 'mfe-publish',\n 'mfe-purge-cache' = 'mfe-purge-cache',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'stylelint' = 'stylelint',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type VitestConfiguration = ViteUserConfig['test'] & {\n omitDefault?: string[];\n};\n\nexport interface HtmlPluginOptions {\n title?: string;\n favicon?: string;\n template?: string;\n}\n\nexport interface SvgrPluginOptions {\n include?: VitePluginSvgrOptions['include'];\n exclude?: VitePluginSvgrOptions['exclude'];\n svgrOptions?: VitePluginSvgrOptions['svgrOptions'];\n}\n\nexport interface PluginOverrides {\n html?: HtmlPluginOptions;\n svgr?: SvgrPluginOptions;\n}\n\nexport interface ViteBundlerConfig {\n port?: number;\n omitDefault?: string[];\n minify?: MinifyOptions;\n pluginOverrides?: PluginOverrides;\n}\n\nexport interface VitePackageJsonOverride extends ViteBundlerConfig {\n config?: Omit<import('vite').UserConfig, 'plugins'>;\n}\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'jest'?: JestConfiguration;\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration; // for backward-compatibility\n 'testRunner'?: string;\n 'expose-shared-dependencies'?: boolean;\n 'shared-dependencies'?: Record<string, string>;\n 'vite'?: false | VitePackageJsonOverride;\n 'vitest'?: VitestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]?: NodeConfiguration;\n} & NodeConfiguration;\n\ntype LocationOrJson = string | Record<string, any>;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n const configuration = getConfiguration();\n return configuration.jest ?? configuration.test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getViteConfiguration(): VitePackageJsonOverride {\n const { vite } = getConfiguration();\n return typeof vite === 'object' ? vite : {};\n}\n\nexport function getVitestConfiguration() {\n return getConfiguration().vitest ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n return (\n getConfiguration(locationOrJson).webpack !== false &&\n getConfiguration(locationOrJson).vite !== false\n );\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return (\n (getConfiguration()['expose-shared-dependencies'] ??\n getWebpackConfiguration()['expose-shared-dependencies']) === true\n );\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getViteConfiguration","getVitestConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","configuration","jest","test","review","stylelint","vite","vitest","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","webpackConfiguration","devServer","legacy","legacyRoot"],"mappings":";;;;;;;;;;;QA+DYA;eAAAA;;QAjDCC;eAAAA;;QAkJGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QA6DAC;eAAAA;;QAzDAC;eAAAA;;QAKAC;eAAAA;;QAmCAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAqCAC;eAAAA;;QAeAC;eAAAA;;QAOAC;eAAAA;;QAKAC;eAAAA;;QAOAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;;2DA1RD;6DACE;4BAMU;qBACP;0BACmB;;;;;;AAEhC,MAAMpB,iCAAiC;IAAC;IAAW;IAAQ;IAAS;CAAS;AAiD7E,IAAA,AAAKD,qCAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAAA;;AAiGL,SAASE,iBAAiBoB,iBAAiC,IAAI;;IAClE,MAAMC,OACF,OAAOD,mBAAmB,WACpBE,IAAAA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SAASK,SAASI,cAA+B;IACpD,OAAOpB,iBAAiBoB,gBAAgBgC,MAAM,KAAK;AACvD;AAEO,SAASnC;QACLP;IAAP,OAAOA,EAAAA,gCAAAA,4CAAAA,oDAAAA,8BAAgC2C,UAAU,MAAK;AAC1D;AAEO,SAASnC;IACZ,OAAOP,yBAAyB,CAAC,sBAAsB,KAAK;AAChE;AAEO,SAASQ,eAAeC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAACV,6BAA6BU;AAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-package-data.d.ts","sourceRoot":"","sources":["../../src/utils/get-package-data.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,wBAAgB,cAAc,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"get-package-data.d.ts","sourceRoot":"","sources":["../../src/utils/get-package-data.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,wBAAgB,cAAc,IAAI,WAAW,CAc5C;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,OAYtF"}
|
|
@@ -18,7 +18,8 @@ _export(exports, {
|
|
|
18
18
|
});
|
|
19
19
|
const _readjson = require("./read-json");
|
|
20
20
|
function getPackageData() {
|
|
21
|
-
var
|
|
21
|
+
var _ref;
|
|
22
|
+
var _packageJson_cli, _packageJson_cli_webpack, _packageJson_cli1;
|
|
22
23
|
const packageJson = (0, _readjson.readJson)('./package.json');
|
|
23
24
|
return {
|
|
24
25
|
name: packageJson.name,
|
|
@@ -27,7 +28,7 @@ function getPackageData() {
|
|
|
27
28
|
...(0, _readjson.readJson)('../../package.json').dependencies,
|
|
28
29
|
...packageJson.dependencies
|
|
29
30
|
},
|
|
30
|
-
sharedDependencies: (_packageJson_cli = packageJson.cli) === null || _packageJson_cli === void 0 ? void 0 : (_packageJson_cli_webpack =
|
|
31
|
+
sharedDependencies: (_ref = (_packageJson_cli = packageJson.cli) === null || _packageJson_cli === void 0 ? void 0 : _packageJson_cli['shared-dependencies']) !== null && _ref !== void 0 ? _ref : (_packageJson_cli1 = packageJson.cli) === null || _packageJson_cli1 === void 0 ? void 0 : (_packageJson_cli_webpack = _packageJson_cli1.webpack) === null || _packageJson_cli_webpack === void 0 ? void 0 : _packageJson_cli_webpack['shared-dependencies']
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
function getPackageDependencyVersion(dependency, defaultVersion) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-package-data.ts"],"sourcesContent":["import { readJson } from './read-json';\n\ninterface PackageData {\n name: string;\n version: string;\n dependencies: Record<string, string>;\n sharedDependencies?: Record<string, string>;\n}\n\nexport function getPackageData(): PackageData {\n const packageJson = readJson('./package.json');\n\n return {\n name: packageJson.name,\n version: packageJson.version,\n dependencies: {\n ...readJson('../../package.json').dependencies,\n ...packageJson.dependencies,\n },\n sharedDependencies
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-package-data.ts"],"sourcesContent":["import { readJson } from './read-json';\n\ninterface PackageData {\n name: string;\n version: string;\n dependencies: Record<string, string>;\n sharedDependencies?: Record<string, string>;\n}\n\nexport function getPackageData(): PackageData {\n const packageJson = readJson('./package.json');\n\n return {\n name: packageJson.name,\n version: packageJson.version,\n dependencies: {\n ...readJson('../../package.json').dependencies,\n ...packageJson.dependencies,\n },\n sharedDependencies:\n packageJson.cli?.['shared-dependencies'] ??\n packageJson.cli?.webpack?.['shared-dependencies'],\n };\n}\n\nexport function getPackageDependencyVersion(dependency: string, defaultVersion?: string) {\n try {\n const { version } = require(`${dependency}/package.json`);\n\n if (version) {\n return version;\n }\n } catch {\n // skip error\n }\n\n return defaultVersion;\n}\n"],"names":["getPackageData","getPackageDependencyVersion","packageJson","readJson","name","version","dependencies","sharedDependencies","cli","webpack","dependency","defaultVersion","require"],"mappings":";;;;;;;;;;;QASgBA;eAAAA;;QAgBAC;eAAAA;;;0BAzBS;AASlB,SAASD;;QAWJE,kBACAA,0BAAAA;IAXR,MAAMA,cAAcC,IAAAA,kBAAQ,EAAC;IAE7B,OAAO;QACHC,MAAMF,YAAYE,IAAI;QACtBC,SAASH,YAAYG,OAAO;QAC5BC,cAAc;YACV,GAAGH,IAAAA,kBAAQ,EAAC,sBAAsBG,YAAY;YAC9C,GAAGJ,YAAYI,YAAY;QAC/B;QACAC,kBAAkB,WACdL,mBAAAA,YAAYM,GAAG,cAAfN,uCAAAA,gBAAiB,CAAC,sBAAsB,wCACxCA,oBAAAA,YAAYM,GAAG,cAAfN,yCAAAA,2BAAAA,kBAAiBO,OAAO,cAAxBP,+CAAAA,wBAA0B,CAAC,sBAAsB;IACzD;AACJ;AAEO,SAASD,4BAA4BS,UAAkB,EAAEC,cAAuB;IACnF,IAAI;QACA,MAAM,EAAEN,OAAO,EAAE,GAAGO,QAAQ,GAAGF,WAAW,aAAa,CAAC;QAExD,IAAIL,SAAS;YACT,OAAOA;QACX;IACJ,EAAE,eAAM;IACJ,aAAa;IACjB;IAEA,OAAOM;AACX"}
|