@nx/react 23.0.0-pr.35413.460eeef → 23.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{ast-utils.d.ts → dist/ast-utils.d.ts} +0 -1
- package/dist/babel.d.ts +1 -0
- package/{babel.js → dist/babel.js} +2 -0
- package/{index.d.ts → dist/index.d.ts} +0 -6
- package/{index.js → dist/index.js} +1 -8
- package/dist/internal.d.ts +7 -0
- package/dist/internal.js +26 -0
- package/{mf → dist/mf}/dynamic-federation.d.ts +0 -1
- package/{mf → dist/mf}/index.d.ts +0 -1
- package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
- package/dist/plugins/bundle-rollup.d.ts +1 -0
- package/{plugins → dist/plugins}/component-testing/index.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/index.js +9 -12
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.js +2 -2
- package/dist/plugins/jest.d.ts +1 -0
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.d.ts +0 -1
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.js +18 -12
- package/{plugins → dist/plugins}/storybook/merge-plugins.d.ts +0 -1
- package/dist/plugins/webpack.d.ts +1 -0
- package/{plugins → dist/plugins}/with-react.d.ts +4 -1
- package/{plugins → dist/plugins}/with-react.js +6 -0
- package/dist/router-plugin.d.ts +1 -0
- package/{router-plugin.js → dist/router-plugin.js} +2 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js +13 -13
- package/{src → dist/src}/executors/module-federation-dev-server/schema.d.ts +1 -1
- package/{src → dist/src}/executors/module-federation-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +13 -12
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +2 -2
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +1 -2
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.js +15 -16
- package/{src → dist/src}/executors/module-federation-static-server/schema.json +1 -0
- package/dist/src/generators/_utils/mf-dependencies.d.ts +7 -0
- package/dist/src/generators/_utils/mf-dependencies.js +84 -0
- package/dist/src/generators/_utils/mf-versions.d.ts +11 -0
- package/dist/src/generators/_utils/mf-versions.js +29 -0
- package/dist/src/generators/_utils/normalize.d.ts +19 -0
- package/dist/src/generators/_utils/normalize.js +48 -0
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +34 -33
- package/{src → dist/src}/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-webpack → dist/src/generators/application/files/base-rspack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/files/base-vite/index.html__tmpl__ +1 -1
- package/{src/generators/application/files/base-rspack → dist/src/generators/application/files/base-vite}/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-vite → dist/src/generators/application/files/base-webpack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-e2e.js +1 -34
- package/{src → dist/src}/generators/application/lib/add-jest.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.js +10 -45
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.js +14 -4
- package/{src → dist/src}/generators/application/lib/add-routing.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-routing.js +3 -3
- package/{src → dist/src}/generators/application/lib/bundlers/add-rsbuild.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +47 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-rspack.d.ts +0 -2
- package/dist/src/generators/application/lib/bundlers/add-rspack.js +13 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.js +11 -36
- package/{src → dist/src}/generators/application/lib/bundlers/add-webpack.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-webpack.js +18 -0
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +2 -4
- package/{src → dist/src}/generators/application/lib/create-application-files.js +10 -62
- package/{src → dist/src}/generators/application/lib/find-free-port.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/get-app-tests.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.js +7 -12
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.js +5 -9
- package/{src/generators/library → dist/src/generators/application}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.js +0 -3
- package/{src → dist/src}/generators/application/schema.d.ts +0 -1
- package/{src → dist/src}/generators/application/schema.json +2 -21
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.js +8 -9
- package/{src → dist/src}/generators/component/files/__fileName__.__ext__ +3 -18
- package/{src → dist/src}/generators/component/lib/get-component-tests.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.js +5 -10
- package/{src → dist/src}/generators/component/schema.d.ts +2 -8
- package/{src → dist/src}/generators/component/schema.json +2 -26
- package/{src → dist/src}/generators/component-story/component-story.d.ts +0 -1
- package/{src → dist/src}/generators/component-story/component-story.js +5 -4
- package/{src → dist/src}/generators/component-test/component-test.d.ts +0 -1
- package/{src → dist/src}/generators/component-test/component-test.js +5 -4
- package/{src → dist/src}/generators/component-test/schema.d.ts +0 -1
- package/dist/src/generators/consumer/consumer.d.ts +4 -0
- package/dist/src/generators/consumer/consumer.js +137 -0
- package/dist/src/generators/consumer/files/_common/src/App.tsx__tmpl__ +53 -0
- package/dist/src/generators/consumer/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/_common/src/index.ts__tmpl__ +4 -0
- package/dist/src/generators/consumer/files/_common/src/mf.ts__tmpl__ +35 -0
- package/dist/src/generators/consumer/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/consumer/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rsbuild/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rsbuild/rsbuild.config.ts__tmpl__ +25 -0
- package/dist/src/generators/consumer/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rspack/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rspack/rspack.config.ts__tmpl__ +59 -0
- package/dist/src/generators/consumer/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/vite/package.json__tmpl__ +24 -0
- package/dist/src/generators/consumer/files/vite/vite.config.ts__tmpl__ +27 -0
- package/dist/src/generators/consumer/schema.d.ts +8 -0
- package/dist/src/generators/consumer/schema.json +43 -0
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -1
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.d.ts +1 -2
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.js +5 -39
- package/{src → dist/src}/generators/federate-module/federate-module.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/federate-module.js +6 -2
- package/{src → dist/src}/generators/federate-module/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/lib/utils.js +2 -2
- package/{src → dist/src}/generators/hook/hook.d.ts +0 -1
- package/{src → dist/src}/generators/hook/hook.js +7 -6
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/host.d.ts +0 -1
- package/{src → dist/src}/generators/host/host.js +10 -6
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.js +3 -3
- package/{src → dist/src}/generators/host/lib/normalize-host-name.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/normalize-host-name.js +2 -2
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.js +1 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.js +2 -2
- package/{src → dist/src}/generators/host/schema.json +2 -21
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +5 -3
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.js +8 -9
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.js +8 -7
- package/{src → dist/src}/generators/library/lib/create-files.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/create-files.js +1 -12
- package/{src → dist/src}/generators/library/lib/determine-entry-fields.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.js +6 -11
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.js +7 -7
- package/{src/generators/application → dist/src/generators/library}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.js +3 -3
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +17 -19
- package/{src → dist/src}/generators/library/schema.json +2 -21
- package/dist/src/generators/provider/files/_common/src/__componentName__.tsx__tmpl__ +11 -0
- package/dist/src/generators/provider/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/provider/files/_common/src/index.ts__tmpl__ +5 -0
- package/dist/src/generators/provider/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/provider/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rsbuild/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rsbuild/rsbuild.config.ts__tmpl__ +31 -0
- package/dist/src/generators/provider/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rspack/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rspack/rspack.config.ts__tmpl__ +69 -0
- package/dist/src/generators/provider/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/vite/package.json__tmpl__ +23 -0
- package/dist/src/generators/provider/files/vite/vite.config.ts__tmpl__ +37 -0
- package/dist/src/generators/provider/provider.d.ts +4 -0
- package/dist/src/generators/provider/provider.js +94 -0
- package/dist/src/generators/provider/schema.d.ts +9 -0
- package/dist/src/generators/provider/schema.json +46 -0
- package/{src → dist/src}/generators/redux/redux.d.ts +0 -1
- package/{src → dist/src}/generators/redux/redux.js +10 -9
- package/{src → dist/src}/generators/redux/schema.d.ts +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.js +1 -1
- package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.js +4 -5
- package/{src → dist/src}/generators/remote/remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/remote.js +12 -8
- package/{src → dist/src}/generators/remote/schema.json +2 -21
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.d.ts +0 -1
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.js +8 -8
- package/{src → dist/src}/generators/stories/stories.d.ts +0 -1
- package/{src → dist/src}/generators/stories/stories.js +9 -8
- package/{src → dist/src}/generators/storybook-configuration/configuration.d.ts +0 -1
- package/{src → dist/src}/generators/storybook-configuration/configuration.js +3 -1
- package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.d.ts +0 -1
- package/dist/src/migrations/update-21-0-0/update-babel-loose.md +43 -0
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.js +34 -7
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +225 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.md +52 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +215 -0
- package/{src → dist/src}/module-federation/ast-utils.d.ts +0 -1
- package/{src → dist/src}/module-federation/ast-utils.js +2 -2
- package/dist/src/plugins/router-plugin.d.ts +14 -0
- package/{src → dist/src}/plugins/router-plugin.js +20 -25
- package/{src → dist/src}/rules/update-module-federation-project.d.ts +0 -1
- package/{src → dist/src}/rules/update-module-federation-project.js +3 -3
- package/{src → dist/src}/utils/add-mf-env-to-inputs.d.ts +0 -1
- package/dist/src/utils/add-mf-env-to-inputs.js +32 -0
- package/dist/src/utils/assert-supported-react-version.d.ts +2 -0
- package/dist/src/utils/assert-supported-react-version.js +8 -0
- package/{src → dist/src}/utils/assertion.d.ts +0 -1
- package/{src → dist/src}/utils/assertion.js +1 -10
- package/{src → dist/src}/utils/ast-utils.d.ts +0 -1
- package/{src → dist/src}/utils/ast-utils.js +15 -15
- package/{src → dist/src}/utils/component-props.d.ts +0 -1
- package/{src → dist/src}/utils/component-props.js +3 -3
- package/{src → dist/src}/utils/create-ts-config.d.ts +0 -1
- package/{src → dist/src}/utils/create-ts-config.js +3 -10
- package/{src → dist/src}/utils/ct-utils.d.ts +1 -2
- package/{src → dist/src}/utils/ct-utils.js +6 -39
- package/{src → dist/src}/utils/dependencies.d.ts +0 -1
- package/dist/src/utils/deprecation.d.ts +3 -0
- package/dist/src/utils/deprecation.js +33 -0
- package/{src → dist/src}/utils/framework.d.ts +0 -1
- package/{src → dist/src}/utils/get-in-source-vitest-tests-template.d.ts +0 -1
- package/{src → dist/src}/utils/has-rsbuild-plugin.d.ts +0 -1
- package/dist/src/utils/has-rsbuild-plugin.js +12 -0
- package/{src → dist/src}/utils/has-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-vite-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-webpack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
- package/{src → dist/src}/utils/lint.d.ts +0 -1
- package/{src → dist/src}/utils/maybe-js.d.ts +0 -1
- package/dist/src/utils/module-federation-deprecation.d.ts +12 -0
- package/dist/src/utils/module-federation-deprecation.js +46 -0
- package/{src → dist/src}/utils/normalize-remote.d.ts +0 -1
- package/{src → dist/src}/utils/normalize-remote.js +2 -2
- package/{src → dist/src}/utils/testing-generators.d.ts +0 -1
- package/{src → dist/src}/utils/version-utils.d.ts +1 -1
- package/{src → dist/src}/utils/version-utils.js +3 -0
- package/{src → dist/src}/utils/versions.d.ts +5 -18
- package/dist/src/utils/versions.js +53 -0
- package/dist/tailwind.d.ts +5 -0
- package/{tailwind.js → dist/tailwind.js} +13 -7
- package/dist/typings/cssmodule.d.ts +19 -0
- package/dist/typings/image.d.ts +48 -0
- package/dist/typings/style.d.ts +1 -0
- package/dist/typings/styled-jsx.d.ts +8 -0
- package/{webpack-plugin.d.ts → dist/webpack-plugin.d.ts} +0 -1
- package/executors.json +6 -6
- package/generators.json +46 -40
- package/migrations.json +45 -79
- package/package.json +143 -144
- package/typings/style.d.ts +1 -9
- package/ast-utils.d.ts.map +0 -1
- package/babel.d.ts +0 -25
- package/babel.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/mf/dynamic-federation.d.ts.map +0 -1
- package/mf/index.d.ts.map +0 -1
- package/module-federation.d.ts.map +0 -1
- package/plugins/bundle-rollup.d.ts +0 -2
- package/plugins/bundle-rollup.d.ts.map +0 -1
- package/plugins/component-testing/index.d.ts.map +0 -1
- package/plugins/component-testing/webpack-fallback.d.ts.map +0 -1
- package/plugins/jest.d.ts +0 -2
- package/plugins/jest.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts.map +0 -1
- package/plugins/storybook/index.d.ts.map +0 -1
- package/plugins/storybook/merge-plugins.d.ts.map +0 -1
- package/plugins/webpack.d.ts +0 -2
- package/plugins/webpack.d.ts.map +0 -1
- package/plugins/with-react.d.ts.map +0 -1
- package/router-plugin.d.ts +0 -2
- package/router-plugin.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -46
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -49
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +0 -45
- package/src/generators/application/files/style-tailwind/src/styles.css +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts.map +0 -1
- package/src/generators/application/lib/add-linting.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/add-routing.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.js +0 -99
- package/src/generators/application/lib/bundlers/add-rspack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rspack.js +0 -38
- package/src/generators/application/lib/bundlers/add-vite.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.js +0 -51
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/find-free-port.d.ts.map +0 -1
- package/src/generators/application/lib/get-app-tests.d.ts.map +0 -1
- package/src/generators/application/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
- package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.js +0 -11
- package/src/generators/application/lib/update-jest-config.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/component/lib/get-component-tests.d.ts.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/component-story/component-story.d.ts.map +0 -1
- package/src/generators/component-test/component-test.d.ts.map +0 -1
- package/src/generators/component-test/schema.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +0 -1
- package/src/generators/federate-module/federate-module.d.ts.map +0 -1
- package/src/generators/federate-module/lib/utils.d.ts.map +0 -1
- package/src/generators/hook/hook.d.ts.map +0 -1
- package/src/generators/host/host.d.ts.map +0 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts.map +0 -1
- package/src/generators/host/lib/normalize-host-name.d.ts.map +0 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-tsconfig.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/library/lib/add-linting.d.ts.map +0 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts.map +0 -1
- package/src/generators/library/lib/create-files.d.ts.map +0 -1
- package/src/generators/library/lib/determine-entry-fields.d.ts.map +0 -1
- package/src/generators/library/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/library/lib/update-app-routes.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/redux/redux.d.ts.map +0 -1
- package/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-tspath-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/update-host-with-remote.d.ts.map +0 -1
- package/src/generators/remote/remote.d.ts.map +0 -1
- package/src/generators/setup-ssr/setup-ssr.d.ts.map +0 -1
- package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
- package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
- package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/update-project.js +0 -11
- package/src/generators/setup-tailwind/schema.d.ts +0 -7
- package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
- package/src/generators/setup-tailwind/schema.js +0 -2
- package/src/generators/setup-tailwind/schema.json +0 -47
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
- package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
- package/src/generators/stories/stories.d.ts.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -3
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -31
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +0 -66
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +0 -41
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +0 -3
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +0 -1
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +0 -18
- package/src/migrations/update-21-0-0/update-babel-loose.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +0 -1
- package/src/module-federation/ast-utils.d.ts.map +0 -1
- package/src/plugins/router-plugin.d.ts +0 -11
- package/src/plugins/router-plugin.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.d.ts +0 -6
- package/src/rules/add-styled-dependencies.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.js +0 -16
- package/src/rules/update-module-federation-project.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.js +0 -25
- package/src/utils/assertion.d.ts.map +0 -1
- package/src/utils/ast-utils.d.ts.map +0 -1
- package/src/utils/component-props.d.ts.map +0 -1
- package/src/utils/create-ts-config.d.ts.map +0 -1
- package/src/utils/ct-utils.d.ts.map +0 -1
- package/src/utils/dependencies.d.ts.map +0 -1
- package/src/utils/framework.d.ts.map +0 -1
- package/src/utils/get-in-source-vitest-tests-template.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.js +0 -43
- package/src/utils/has-rspack-plugin.d.ts.map +0 -1
- package/src/utils/has-vite-plugin.d.ts.map +0 -1
- package/src/utils/has-webpack-plugin.d.ts.map +0 -1
- package/src/utils/jest-utils.d.ts.map +0 -1
- package/src/utils/lint.d.ts.map +0 -1
- package/src/utils/maybe-js.d.ts.map +0 -1
- package/src/utils/normalize-remote.d.ts.map +0 -1
- package/src/utils/styled.d.ts +0 -4
- package/src/utils/styled.d.ts.map +0 -1
- package/src/utils/styled.js +0 -62
- package/src/utils/testing-generators.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -64
- package/tailwind.d.ts +0 -7
- package/tailwind.d.ts.map +0 -1
- package/webpack-plugin.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{ast-utils.js → dist/ast-utils.js} +0 -0
- /package/{mf → dist/mf}/dynamic-federation.js +0 -0
- /package/{mf → dist/mf}/index.js +0 -0
- /package/{module-federation.js → dist/module-federation.js} +0 -0
- /package/{plugins → dist/plugins}/bundle-rollup.js +0 -0
- /package/{plugins → dist/plugins}/jest.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.js +0 -0
- /package/{plugins → dist/plugins}/storybook/merge-plugins.js +0 -0
- /package/{plugins → dist/plugins}/webpack.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-static-server/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/app-nav.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.client.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/root.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes/about.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/react-router.config.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tests/routes/_index.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/.gitignore__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/claimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/not-configured/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/unclaimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/lib/add-jest.js +0 -0
- /package/{src → dist/src}/generators/application/lib/find-free-port.js +0 -0
- /package/{src → dist/src}/generators/application/lib/get-app-tests.js +0 -0
- /package/{src → dist/src}/generators/application/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/lib/get-component-tests.js +0 -0
- /package/{src → dist/src}/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/schema.json +0 -0
- /package/{src → dist/src}/generators/component-test/files/__fileName__.cy__ext__ +0 -0
- /package/{src → dist/src}/generators/component-test/schema.js +0 -0
- /package/{src → dist/src}/generators/component-test/schema.json +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.json +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.spec.__specExt__ +0 -0
- /package/{src → dist/src}/generators/hook/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/hook/schema.json +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.js +0 -0
- /package/{src → dist/src}/generators/host/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/files/common/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/vite/README.md +0 -0
- /package/{src → dist/src}/generators/library/lib/determine-entry-fields.js +0 -0
- /package/{src → dist/src}/generators/library/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/schema.json +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.js +0 -0
- /package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.js +0 -0
- /package/{src → dist/src}/generators/remote/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.json +0 -0
- /package/{src → dist/src}/generators/stories/schema.json +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.js +0 -0
- /package/{src → dist/src}/utils/dependencies.js +0 -0
- /package/{src → dist/src}/utils/framework.js +0 -0
- /package/{src → dist/src}/utils/get-in-source-vitest-tests-template.js +0 -0
- /package/{src → dist/src}/utils/has-rspack-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-vite-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-webpack-plugin.js +0 -0
- /package/{src → dist/src}/utils/jest-utils.js +0 -0
- /package/{src → dist/src}/utils/lint.js +0 -0
- /package/{src → dist/src}/utils/maybe-js.js +0 -0
- /package/{src → dist/src}/utils/testing-generators.js +0 -0
- /package/{webpack-plugin.js → dist/webpack-plugin.js} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = rewriteInternalSubpathImports;
|
|
4
|
+
exports.rewriteSubpathImports = rewriteSubpathImports;
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];
|
|
7
|
+
const FROM_PREFIX = '@nx/react/src/';
|
|
8
|
+
const TO_PUBLIC = '@nx/react';
|
|
9
|
+
const TO_INTERNAL = '@nx/react/internal';
|
|
10
|
+
// Symbols exported from `@nx/react`'s public entry (packages/react/index.ts).
|
|
11
|
+
// A named import/export of one of these from `@nx/react/src/*` is routed to
|
|
12
|
+
// the public `@nx/react` entry; everything else goes to `@nx/react/internal`.
|
|
13
|
+
const PUBLIC_SYMBOLS = new Set([
|
|
14
|
+
'SupportedStyles',
|
|
15
|
+
'WithReactOptions',
|
|
16
|
+
'applicationGenerator',
|
|
17
|
+
'assertValidStyle',
|
|
18
|
+
'componentGenerator',
|
|
19
|
+
'componentStoryGenerator',
|
|
20
|
+
'componentTestGenerator',
|
|
21
|
+
'cypressComponentConfigGenerator',
|
|
22
|
+
'extendReactEslintJson',
|
|
23
|
+
'extraEslintDependencies',
|
|
24
|
+
'hookGenerator',
|
|
25
|
+
'hostGenerator',
|
|
26
|
+
'libraryGenerator',
|
|
27
|
+
'reactDomVersion',
|
|
28
|
+
'reactInitGenerator',
|
|
29
|
+
'reactVersion',
|
|
30
|
+
'reduxGenerator',
|
|
31
|
+
'remoteGenerator',
|
|
32
|
+
'storiesGenerator',
|
|
33
|
+
'storybookConfigurationGenerator',
|
|
34
|
+
'withReact',
|
|
35
|
+
]);
|
|
36
|
+
// Methods on `jest` and `vi` that take a module specifier as their first arg.
|
|
37
|
+
const MOCK_HELPER_METHODS = new Set([
|
|
38
|
+
'mock',
|
|
39
|
+
'unmock',
|
|
40
|
+
'doMock',
|
|
41
|
+
'dontMock',
|
|
42
|
+
'requireActual',
|
|
43
|
+
'requireMock',
|
|
44
|
+
'importActual',
|
|
45
|
+
'importMock',
|
|
46
|
+
]);
|
|
47
|
+
let ts;
|
|
48
|
+
async function rewriteInternalSubpathImports(tree) {
|
|
49
|
+
let touchedCount = 0;
|
|
50
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
|
|
51
|
+
if (!TS_EXTENSIONS.some((ext) => filePath.endsWith(ext))) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const original = tree.read(filePath, 'utf-8');
|
|
55
|
+
if (!original || !original.includes(FROM_PREFIX)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const updated = rewriteSubpathImports(original);
|
|
59
|
+
if (updated !== original) {
|
|
60
|
+
tree.write(filePath, updated);
|
|
61
|
+
touchedCount += 1;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (touchedCount > 0) {
|
|
65
|
+
devkit_1.logger.info(`Rewrote @nx/react/src/* imports in ${touchedCount} file(s) ` +
|
|
66
|
+
`(public symbols to @nx/react, internals to @nx/react/internal).`);
|
|
67
|
+
}
|
|
68
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
69
|
+
}
|
|
70
|
+
function rewriteSubpathImports(source) {
|
|
71
|
+
ts ??= (0, devkit_1.ensurePackage)('typescript', '*');
|
|
72
|
+
const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
|
|
73
|
+
/* setParentNodes */ true, ts.ScriptKind.TSX);
|
|
74
|
+
const changes = [];
|
|
75
|
+
for (const stmt of sourceFile.statements) {
|
|
76
|
+
if (ts.isImportDeclaration(stmt)) {
|
|
77
|
+
collectImportRewrite(sourceFile, stmt, changes);
|
|
78
|
+
}
|
|
79
|
+
else if (ts.isExportDeclaration(stmt)) {
|
|
80
|
+
collectExportRewrite(sourceFile, stmt, changes);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
collectCallExpressionRewrites(sourceFile, changes);
|
|
84
|
+
return changes.length > 0 ? (0, devkit_1.applyChangesToString)(source, changes) : source;
|
|
85
|
+
}
|
|
86
|
+
function isSubpathSpecifier(node) {
|
|
87
|
+
return ts.isStringLiteral(node) && node.text.startsWith(FROM_PREFIX);
|
|
88
|
+
}
|
|
89
|
+
function collectImportRewrite(sourceFile, stmt, changes) {
|
|
90
|
+
if (!isSubpathSpecifier(stmt.moduleSpecifier)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const clause = stmt.importClause;
|
|
94
|
+
// Pure named imports (`import { a, b } from '...'`) can be split by symbol.
|
|
95
|
+
// A default or namespace import grabs the whole module, so it can't be
|
|
96
|
+
// split — route it wholesale to the internal entry.
|
|
97
|
+
if (clause &&
|
|
98
|
+
!clause.name &&
|
|
99
|
+
clause.namedBindings &&
|
|
100
|
+
ts.isNamedImports(clause.namedBindings)) {
|
|
101
|
+
rewriteNamedDeclaration(sourceFile, stmt, stmt.moduleSpecifier, clause.isTypeOnly, clause.namedBindings.elements, 'import', changes);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
replaceSpecifier(sourceFile, stmt.moduleSpecifier, TO_INTERNAL, changes);
|
|
105
|
+
}
|
|
106
|
+
function collectExportRewrite(sourceFile, stmt, changes) {
|
|
107
|
+
if (!stmt.moduleSpecifier || !isSubpathSpecifier(stmt.moduleSpecifier)) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// `export { a, b } from '...'` can be split; `export * from '...'` cannot.
|
|
111
|
+
if (stmt.exportClause && ts.isNamedExports(stmt.exportClause)) {
|
|
112
|
+
rewriteNamedDeclaration(sourceFile, stmt, stmt.moduleSpecifier, stmt.isTypeOnly, stmt.exportClause.elements, 'export', changes);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
replaceSpecifier(sourceFile, stmt.moduleSpecifier, TO_INTERNAL, changes);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Partition the named bindings of an import/export declaration into the ones
|
|
119
|
+
* that resolve to `@nx/react`'s public entry and the ones that don't. If both
|
|
120
|
+
* groups are non-empty, the single declaration is split into two.
|
|
121
|
+
*/
|
|
122
|
+
function rewriteNamedDeclaration(sourceFile, decl, specifier, isTypeOnly, elements, keyword, changes) {
|
|
123
|
+
const publicEls = [];
|
|
124
|
+
const internalEls = [];
|
|
125
|
+
for (const el of elements) {
|
|
126
|
+
// `propertyName` is the original name in `orig as alias`; fall back to
|
|
127
|
+
// `name` for the plain `orig` form.
|
|
128
|
+
const importedName = (el.propertyName ?? el.name).text;
|
|
129
|
+
(PUBLIC_SYMBOLS.has(importedName) ? publicEls : internalEls).push(el);
|
|
130
|
+
}
|
|
131
|
+
if (publicEls.length === 0) {
|
|
132
|
+
replaceSpecifier(sourceFile, specifier, TO_INTERNAL, changes);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (internalEls.length === 0) {
|
|
136
|
+
replaceSpecifier(sourceFile, specifier, TO_PUBLIC, changes);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
// Mixed — replace the whole declaration with one statement per target.
|
|
140
|
+
const quote = sourceFile.text.charAt(specifier.getStart(sourceFile));
|
|
141
|
+
const start = decl.getStart(sourceFile);
|
|
142
|
+
const end = decl.getEnd();
|
|
143
|
+
const semicolon = sourceFile.text.charAt(end - 1) === ';' ? ';' : '';
|
|
144
|
+
const prefix = isTypeOnly ? `${keyword} type` : keyword;
|
|
145
|
+
const render = (els, target) => `${prefix} { ${els
|
|
146
|
+
.map((el) => el.getText(sourceFile))
|
|
147
|
+
.join(', ')} } from ${quote}${target}${quote}${semicolon}`;
|
|
148
|
+
changes.push({ type: devkit_1.ChangeType.Delete, start, length: end - start }, {
|
|
149
|
+
type: devkit_1.ChangeType.Insert,
|
|
150
|
+
index: start,
|
|
151
|
+
text: `${render(publicEls, TO_PUBLIC)}\n${render(internalEls, TO_INTERNAL)}`,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function collectCallExpressionRewrites(sourceFile, changes) {
|
|
155
|
+
const visit = (node) => {
|
|
156
|
+
if (ts.isCallExpression(node) &&
|
|
157
|
+
shouldRewriteCallExpression(node) &&
|
|
158
|
+
node.arguments.length >= 1 &&
|
|
159
|
+
isSubpathSpecifier(node.arguments[0])) {
|
|
160
|
+
// `require(...)`, dynamic `import(...)` and `jest.mock(...)` reference
|
|
161
|
+
// the module as a whole and can't be symbol-split, so they go to the
|
|
162
|
+
// internal entry.
|
|
163
|
+
replaceSpecifier(sourceFile, node.arguments[0], TO_INTERNAL, changes);
|
|
164
|
+
}
|
|
165
|
+
else if (ts.isImportTypeNode(node)) {
|
|
166
|
+
// `typeof import('...')` parses as an `ImportTypeNode`, not a
|
|
167
|
+
// CallExpression — its argument is `LiteralTypeNode<StringLiteral>`.
|
|
168
|
+
// The whole module is referenced, so it can't be symbol-split.
|
|
169
|
+
const literal = getImportTypeStringLiteral(node);
|
|
170
|
+
if (literal && literal.text.startsWith(FROM_PREFIX)) {
|
|
171
|
+
replaceSpecifier(sourceFile, literal, TO_INTERNAL, changes);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
ts.forEachChild(node, visit);
|
|
175
|
+
};
|
|
176
|
+
visit(sourceFile);
|
|
177
|
+
}
|
|
178
|
+
function getImportTypeStringLiteral(node) {
|
|
179
|
+
const arg = node.argument;
|
|
180
|
+
if (arg && ts.isLiteralTypeNode(arg) && ts.isStringLiteral(arg.literal)) {
|
|
181
|
+
return arg.literal;
|
|
182
|
+
}
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
function shouldRewriteCallExpression(call) {
|
|
186
|
+
const callee = call.expression;
|
|
187
|
+
// `require('...')`
|
|
188
|
+
if (ts.isIdentifier(callee) && callee.text === 'require')
|
|
189
|
+
return true;
|
|
190
|
+
// dynamic `import('...')` (runtime form parses as a CallExpression whose
|
|
191
|
+
// callee is the `import` keyword). The `typeof import('...')` type-position
|
|
192
|
+
// form is an `ImportTypeNode` (handled in `collectCallExpressionRewrites`).
|
|
193
|
+
if (callee.kind === ts.SyntaxKind.ImportKeyword)
|
|
194
|
+
return true;
|
|
195
|
+
// `jest.mock(...)` / `vi.mock(...)` and friends.
|
|
196
|
+
if (ts.isPropertyAccessExpression(callee)) {
|
|
197
|
+
const obj = callee.expression;
|
|
198
|
+
if (ts.isIdentifier(obj) &&
|
|
199
|
+
(obj.text === 'jest' || obj.text === 'vi') &&
|
|
200
|
+
MOCK_HELPER_METHODS.has(callee.name.text)) {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
function replaceSpecifier(sourceFile, literal, target, changes) {
|
|
207
|
+
const start = literal.getStart(sourceFile);
|
|
208
|
+
const end = literal.getEnd();
|
|
209
|
+
const quote = sourceFile.text.charAt(start);
|
|
210
|
+
changes.push({ type: devkit_1.ChangeType.Delete, start, length: end - start }, {
|
|
211
|
+
type: devkit_1.ChangeType.Insert,
|
|
212
|
+
index: start,
|
|
213
|
+
text: `${quote}${target}${quote}`,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
@@ -6,11 +6,11 @@ exports.addRemoteRoute = addRemoteRoute;
|
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const js_1 = require("@nx/js");
|
|
8
8
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
9
|
-
const
|
|
9
|
+
const internal_1 = require("@nx/js/internal");
|
|
10
10
|
let tsModule;
|
|
11
11
|
function addRemoteToConfig(source, app) {
|
|
12
12
|
if (!tsModule) {
|
|
13
|
-
tsModule = (0,
|
|
13
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
14
14
|
}
|
|
15
15
|
const assignments = (0, js_1.findNodes)(source, tsModule.SyntaxKind.PropertyAssignment);
|
|
16
16
|
const remotesAssignment = assignments.find((s) => s.name.getText() === 'remotes');
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CreateNodes } from '@nx/devkit';
|
|
2
|
+
export interface ReactRouterPluginOptions {
|
|
3
|
+
buildTargetName?: string;
|
|
4
|
+
devTargetName?: string;
|
|
5
|
+
startTargetName?: string;
|
|
6
|
+
typecheckTargetName?: string;
|
|
7
|
+
buildDepsTargetName?: string;
|
|
8
|
+
watchDepsTargetName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const createNodes: CreateNodes<ReactRouterPluginOptions>;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
|
|
13
|
+
*/
|
|
14
|
+
export declare const createNodesV2: CreateNodes<ReactRouterPluginOptions>;
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNodesV2 = void 0;
|
|
3
|
+
exports.createNodesV2 = exports.createNodes = void 0;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const fs_1 = require("fs");
|
|
7
|
-
const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
8
8
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
9
|
-
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
9
|
const js_1 = require("@nx/js");
|
|
11
10
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
12
|
-
const
|
|
13
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
14
|
-
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
11
|
+
const internal_2 = require("@nx/js/internal");
|
|
15
12
|
const pmCommand = (0, devkit_1.getPackageManagerCommand)();
|
|
16
13
|
const reactRouterConfigBlob = '**/react-router.config.{ts,js,cjs,cts,mjs,mts}';
|
|
17
|
-
|
|
18
|
-
return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, fs_1.existsSync)(cachePath)
|
|
19
|
-
? (0, devkit_1.readJsonFile)(cachePath)
|
|
20
|
-
: {};
|
|
21
|
-
}
|
|
22
|
-
function writeTargetsToCache(cachePath, results) {
|
|
23
|
-
(0, devkit_1.writeJsonFile)(cachePath, results);
|
|
24
|
-
}
|
|
25
|
-
exports.createNodesV2 = [
|
|
14
|
+
exports.createNodes = [
|
|
26
15
|
reactRouterConfigBlob,
|
|
27
16
|
async (configFiles, options, context) => {
|
|
28
17
|
const optionsHash = (0, devkit_internals_1.hashObject)(options);
|
|
29
18
|
const normalizedOptions = normalizeOptions(options);
|
|
30
19
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `react-router-${optionsHash}.hash`);
|
|
31
|
-
const targetsCache =
|
|
32
|
-
const isUsingTsSolutionSetup = (0,
|
|
20
|
+
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
21
|
+
const isUsingTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)();
|
|
33
22
|
const { roots: projectRoots, configFiles: validConfigFiles } = configFiles.reduce((acc, configFile) => {
|
|
34
23
|
const potentialRoot = (0, path_1.dirname)(configFile);
|
|
35
24
|
if (checkIfConfigFileShouldBeProject(potentialRoot, context)) {
|
|
@@ -42,14 +31,16 @@ exports.createNodesV2 = [
|
|
|
42
31
|
configFiles: [],
|
|
43
32
|
});
|
|
44
33
|
const lockfile = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
45
|
-
const hashes = await (0,
|
|
34
|
+
const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, { ...normalizedOptions, isUsingTsSolutionSetup }, context, projectRoots.map((_) => [lockfile]));
|
|
46
35
|
try {
|
|
47
36
|
return await (0, devkit_1.createNodesFromFiles)(async (configFile, _, context, idx) => {
|
|
48
37
|
const projectRoot = (0, path_1.dirname)(configFile);
|
|
49
38
|
const siblingFiles = (0, fs_1.readdirSync)((0, devkit_1.joinPathFragments)(context.workspaceRoot, projectRoot));
|
|
50
39
|
const hash = hashes[idx] + configFile;
|
|
51
|
-
|
|
52
|
-
await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context, siblingFiles, isUsingTsSolutionSetup));
|
|
40
|
+
if (!targetsCache.has(hash)) {
|
|
41
|
+
targetsCache.set(hash, await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context, siblingFiles, isUsingTsSolutionSetup));
|
|
42
|
+
}
|
|
43
|
+
const { projectType, metadata, targets } = targetsCache.get(hash);
|
|
53
44
|
const project = {
|
|
54
45
|
root: projectRoot,
|
|
55
46
|
targets,
|
|
@@ -66,16 +57,20 @@ exports.createNodesV2 = [
|
|
|
66
57
|
}, validConfigFiles, options, context);
|
|
67
58
|
}
|
|
68
59
|
finally {
|
|
69
|
-
|
|
60
|
+
targetsCache.writeToDisk();
|
|
70
61
|
}
|
|
71
62
|
},
|
|
72
63
|
];
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
|
|
66
|
+
*/
|
|
67
|
+
exports.createNodesV2 = exports.createNodes;
|
|
73
68
|
async function buildReactRouterTargets(configFilePath, projectRoot, options, context, siblingFiles, isUsingTsSolutionSetup) {
|
|
74
|
-
const namedInputs = (0,
|
|
69
|
+
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
75
70
|
const configPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
76
71
|
if (require.cache[configPath])
|
|
77
|
-
(0,
|
|
78
|
-
const reactRouterConfig = await (0,
|
|
72
|
+
(0, internal_1.clearRequireCache)();
|
|
73
|
+
const reactRouterConfig = await (0, internal_1.loadConfigFile)(configPath);
|
|
79
74
|
const isLibMode = reactRouterConfig?.ssr !== undefined && reactRouterConfig.ssr === false;
|
|
80
75
|
const { buildDirectory, serverBuildPath } = await getBuildPaths(reactRouterConfig, isLibMode);
|
|
81
76
|
const targets = {};
|
|
@@ -85,7 +80,7 @@ async function buildReactRouterTargets(configFilePath, projectRoot, options, con
|
|
|
85
80
|
targets[options.startTargetName] = await startTarget(projectRoot, serverBuildPath, options.buildTargetName, isUsingTsSolutionSetup);
|
|
86
81
|
}
|
|
87
82
|
targets[options.typecheckTargetName] = await typecheckTarget(projectRoot, options.typecheckTargetName, namedInputs, siblingFiles, isUsingTsSolutionSetup);
|
|
88
|
-
(0,
|
|
83
|
+
(0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmCommand);
|
|
89
84
|
const metadata = {};
|
|
90
85
|
return {
|
|
91
86
|
targets,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateModuleFederationProject = updateModuleFederationProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const maybe_js_1 = require("../utils/maybe-js");
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/js/internal");
|
|
7
7
|
function updateModuleFederationProject(host, options, isHost = false) {
|
|
8
8
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
|
|
9
9
|
projectConfig.targets ??= {};
|
|
@@ -14,7 +14,7 @@ function updateModuleFederationProject(host, options, isHost = false) {
|
|
|
14
14
|
webpackConfig: `${options.appProjectRoot}/webpack.config.${options.typescriptConfiguration && !options.js ? 'ts' : 'js'}`,
|
|
15
15
|
};
|
|
16
16
|
projectConfig.targets.build.configurations ??= {};
|
|
17
|
-
if (!(0,
|
|
17
|
+
if (!(0, internal_1.isUsingTsSolutionSetup)(host)) {
|
|
18
18
|
projectConfig.targets.build.configurations.production = {
|
|
19
19
|
...(projectConfig.targets.build.configurations?.production ?? {}),
|
|
20
20
|
webpackConfig: `${options.appProjectRoot}/webpack.config.prod.${options.typescriptConfiguration && !options.js ? 'ts' : 'js'}`,
|
|
@@ -62,7 +62,7 @@ function updateModuleFederationProject(host, options, isHost = false) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
// Typechecks must be performed first before build and serve to generate remote d.ts files.
|
|
65
|
-
if ((0,
|
|
65
|
+
if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
|
|
66
66
|
projectConfig.targets.build ??= {};
|
|
67
67
|
projectConfig.targets.serve ??= {};
|
|
68
68
|
projectConfig.targets.build.dependsOn = ['^build', 'typecheck'];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addMfEnvToTargetDefaultInputs = addMfEnvToTargetDefaultInputs;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
+
function addMfEnvToTargetDefaultInputs(tree, bundler) {
|
|
7
|
+
const nxJson = (0, devkit_1.readNxJson)(tree) ?? {};
|
|
8
|
+
const executor = bundler === 'rspack' ? '@nx/rspack:rspack' : '@nx/webpack:webpack';
|
|
9
|
+
const mfEnvVar = 'NX_MF_DEV_REMOTES';
|
|
10
|
+
const existing = (0, internal_1.normalizeTargetDefaults)(nxJson.targetDefaults).find((e) => e.executor === executor &&
|
|
11
|
+
e.target === undefined &&
|
|
12
|
+
e.projects === undefined &&
|
|
13
|
+
e.plugin === undefined);
|
|
14
|
+
const inputs = [...(existing?.inputs ?? ['production', '^production'])];
|
|
15
|
+
let mfEnvVarExists = false;
|
|
16
|
+
for (const input of inputs) {
|
|
17
|
+
if (typeof input === 'object' && input['env'] === mfEnvVar) {
|
|
18
|
+
mfEnvVarExists = true;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (!mfEnvVarExists) {
|
|
23
|
+
inputs.push({ env: mfEnvVar });
|
|
24
|
+
}
|
|
25
|
+
(0, internal_1.upsertTargetDefault)(tree, nxJson, {
|
|
26
|
+
executor,
|
|
27
|
+
cache: true,
|
|
28
|
+
inputs,
|
|
29
|
+
dependsOn: existing?.dependsOn ?? ['^build'],
|
|
30
|
+
});
|
|
31
|
+
(0, devkit_1.updateNxJson)(tree, nxJson);
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertSupportedReactVersion = assertSupportedReactVersion;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
const versions_1 = require("./versions");
|
|
6
|
+
function assertSupportedReactVersion(tree) {
|
|
7
|
+
(0, internal_1.assertSupportedPackageVersion)(tree, 'react', versions_1.minSupportedReactVersion);
|
|
8
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { type Schema } from '../generators/application/schema';
|
|
2
2
|
export declare function assertValidStyle(style: string): void;
|
|
3
3
|
export declare function assertValidReactRouter(reactRouter: boolean, bundler: Schema['bundler']): void;
|
|
4
|
-
//# sourceMappingURL=assertion.d.ts.map
|
|
@@ -2,16 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.assertValidStyle = assertValidStyle;
|
|
4
4
|
exports.assertValidReactRouter = assertValidReactRouter;
|
|
5
|
-
const VALID_STYLES = [
|
|
6
|
-
'css',
|
|
7
|
-
'scss',
|
|
8
|
-
'less',
|
|
9
|
-
'tailwind',
|
|
10
|
-
'styled-components',
|
|
11
|
-
'@emotion/styled',
|
|
12
|
-
'styled-jsx',
|
|
13
|
-
'none',
|
|
14
|
-
];
|
|
5
|
+
const VALID_STYLES = ['css', 'scss', 'none'];
|
|
15
6
|
function assertValidStyle(style) {
|
|
16
7
|
if (VALID_STYLES.indexOf(style) === -1) {
|
|
17
8
|
throw new Error(`Unsupported style option found: ${style}. Valid values are: "${VALID_STYLES.join('", "')}"`);
|
|
@@ -21,11 +21,11 @@ exports.getComponentNode = getComponentNode;
|
|
|
21
21
|
exports.parseComponentPropsInfo = parseComponentPropsInfo;
|
|
22
22
|
const js_1 = require("@nx/js");
|
|
23
23
|
const devkit_1 = require("@nx/devkit");
|
|
24
|
-
const
|
|
24
|
+
const internal_1 = require("@nx/js/internal");
|
|
25
25
|
let tsModule;
|
|
26
26
|
function addImport(source, statement) {
|
|
27
27
|
if (!tsModule) {
|
|
28
|
-
tsModule = (0,
|
|
28
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
29
29
|
}
|
|
30
30
|
const allImports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ImportDeclaration);
|
|
31
31
|
if (allImports.length > 0) {
|
|
@@ -50,7 +50,7 @@ function addImport(source, statement) {
|
|
|
50
50
|
}
|
|
51
51
|
function findMainRenderStatement(source) {
|
|
52
52
|
if (!tsModule) {
|
|
53
|
-
tsModule = (0,
|
|
53
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
54
54
|
}
|
|
55
55
|
// 1. Try to find ReactDOM.render.
|
|
56
56
|
const calls = (0, js_1.findNodes)(source, tsModule.SyntaxKind.CallExpression);
|
|
@@ -88,7 +88,7 @@ function findDefaultExport(source) {
|
|
|
88
88
|
}
|
|
89
89
|
function findDefaultExportDeclaration(source) {
|
|
90
90
|
if (!tsModule) {
|
|
91
|
-
tsModule = (0,
|
|
91
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
92
92
|
}
|
|
93
93
|
const identifier = findDefaultExportIdentifier(source);
|
|
94
94
|
if (identifier) {
|
|
@@ -107,7 +107,7 @@ function findDefaultExportDeclaration(source) {
|
|
|
107
107
|
}
|
|
108
108
|
function findExportDeclarationsForJsx(source) {
|
|
109
109
|
if (!tsModule) {
|
|
110
|
-
tsModule = (0,
|
|
110
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
111
111
|
}
|
|
112
112
|
const variables = (0, js_1.findNodes)(source, tsModule.SyntaxKind.VariableDeclaration);
|
|
113
113
|
const variableStatements = (0, js_1.findNodes)(source, tsModule.SyntaxKind.VariableStatement);
|
|
@@ -157,7 +157,7 @@ function findExportDeclarationsForJsx(source) {
|
|
|
157
157
|
}
|
|
158
158
|
function findDefaultExportIdentifier(source) {
|
|
159
159
|
if (!tsModule) {
|
|
160
|
-
tsModule = (0,
|
|
160
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
161
161
|
}
|
|
162
162
|
const exports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ExportAssignment);
|
|
163
163
|
const identifier = exports
|
|
@@ -167,7 +167,7 @@ function findDefaultExportIdentifier(source) {
|
|
|
167
167
|
}
|
|
168
168
|
function findDefaultClassOrFunction(source) {
|
|
169
169
|
if (!tsModule) {
|
|
170
|
-
tsModule = (0,
|
|
170
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
171
171
|
}
|
|
172
172
|
const fns = (0, js_1.findNodes)(source, tsModule.SyntaxKind.FunctionDeclaration);
|
|
173
173
|
const cls = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ClassDeclaration);
|
|
@@ -177,7 +177,7 @@ function findDefaultClassOrFunction(source) {
|
|
|
177
177
|
}
|
|
178
178
|
function hasDefaultExportModifier(x) {
|
|
179
179
|
if (!tsModule) {
|
|
180
|
-
tsModule = (0,
|
|
180
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
181
181
|
}
|
|
182
182
|
return (x.modifiers &&
|
|
183
183
|
x.modifiers.some((m) => m.kind === tsModule.SyntaxKind.ExportKeyword) &&
|
|
@@ -185,7 +185,7 @@ function hasDefaultExportModifier(x) {
|
|
|
185
185
|
}
|
|
186
186
|
function findComponentImportPath(componentName, source) {
|
|
187
187
|
if (!tsModule) {
|
|
188
|
-
tsModule = (0,
|
|
188
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
189
189
|
}
|
|
190
190
|
const allImports = (0, js_1.findNodes)(source, tsModule.SyntaxKind.ImportDeclaration);
|
|
191
191
|
const matching = allImports.filter((i) => {
|
|
@@ -201,7 +201,7 @@ function findComponentImportPath(componentName, source) {
|
|
|
201
201
|
}
|
|
202
202
|
function findElements(source, tagName) {
|
|
203
203
|
if (!tsModule) {
|
|
204
|
-
tsModule = (0,
|
|
204
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
205
205
|
}
|
|
206
206
|
const nodes = (0, js_1.findNodes)(source, [
|
|
207
207
|
tsModule.SyntaxKind.JsxSelfClosingElement,
|
|
@@ -222,7 +222,7 @@ function findClosestOpening(tagName, node) {
|
|
|
222
222
|
}
|
|
223
223
|
function isTag(tagName, node) {
|
|
224
224
|
if (!tsModule) {
|
|
225
|
-
tsModule = (0,
|
|
225
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
226
226
|
}
|
|
227
227
|
if (tsModule.isJsxOpeningLikeElement(node)) {
|
|
228
228
|
return (node.tagName.kind === tsModule.SyntaxKind.Identifier &&
|
|
@@ -236,7 +236,7 @@ function isTag(tagName, node) {
|
|
|
236
236
|
}
|
|
237
237
|
function addInitialRoutes(sourcePath, source, addBrowserRouter) {
|
|
238
238
|
if (!tsModule) {
|
|
239
|
-
tsModule = (0,
|
|
239
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
240
240
|
}
|
|
241
241
|
const jsxClosingElements = (0, js_1.findNodes)(source, [
|
|
242
242
|
tsModule.SyntaxKind.JsxClosingElement,
|
|
@@ -405,7 +405,7 @@ const store = configureStore({
|
|
|
405
405
|
}
|
|
406
406
|
function updateReduxStore(sourcePath, source, feature) {
|
|
407
407
|
if (!tsModule) {
|
|
408
|
-
tsModule = (0,
|
|
408
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
409
409
|
}
|
|
410
410
|
const calls = (0, js_1.findNodes)(source, tsModule.SyntaxKind.CallExpression);
|
|
411
411
|
let reducerDescriptor;
|
|
@@ -459,7 +459,7 @@ function updateReduxStore(sourcePath, source, feature) {
|
|
|
459
459
|
}
|
|
460
460
|
function getComponentNode(sourceFile) {
|
|
461
461
|
if (!tsModule) {
|
|
462
|
-
tsModule = (0,
|
|
462
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
463
463
|
}
|
|
464
464
|
const defaultExport = findDefaultExport(sourceFile);
|
|
465
465
|
if (!(defaultExport &&
|
|
@@ -472,7 +472,7 @@ function getComponentNode(sourceFile) {
|
|
|
472
472
|
}
|
|
473
473
|
function parseComponentPropsInfo(sourceFile, cmpDeclaration) {
|
|
474
474
|
if (!tsModule) {
|
|
475
|
-
tsModule = (0,
|
|
475
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
476
476
|
}
|
|
477
477
|
let propsTypeName = null;
|
|
478
478
|
let inlineTypeString = null;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getArgsDefaultValue = getArgsDefaultValue;
|
|
4
4
|
exports.getComponentPropDefaults = getComponentPropDefaults;
|
|
5
5
|
exports.getImportForType = getImportForType;
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/js/internal");
|
|
7
7
|
const ast_utils_1 = require("./ast-utils");
|
|
8
8
|
let tsModule;
|
|
9
9
|
// TODO: candidate to refactor with the angular component story
|
|
10
10
|
function getArgsDefaultValue(property) {
|
|
11
11
|
if (!tsModule) {
|
|
12
|
-
tsModule = (0,
|
|
12
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
13
13
|
}
|
|
14
14
|
const typeNameToDefault = {
|
|
15
15
|
[tsModule.SyntaxKind.StringKeyword]: "''",
|
|
@@ -26,7 +26,7 @@ function getArgsDefaultValue(property) {
|
|
|
26
26
|
}
|
|
27
27
|
function getComponentPropDefaults(sourceFile, cmpDeclaration) {
|
|
28
28
|
if (!tsModule) {
|
|
29
|
-
tsModule = (0,
|
|
29
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
30
30
|
}
|
|
31
31
|
const info = (0, ast_utils_1.parseComponentPropsInfo)(sourceFile, cmpDeclaration);
|
|
32
32
|
let propsTypeName = null;
|