@nrwl/react 15.9.2 → 16.0.0-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/ast-utils.d.ts +1 -1
- package/ast-utils.js +2 -9
- package/ast-utils.js.map +1 -1
- package/babel.d.ts +0 -16
- package/babel.js +1 -51
- package/babel.js.map +1 -1
- package/executors.json +8 -8
- package/generators.json +2 -221
- package/index.d.ts +1 -21
- package/index.js +1 -43
- package/index.js.map +1 -1
- package/module-federation.d.ts +1 -4
- package/module-federation.js +2 -10
- package/module-federation.js.map +1 -1
- package/package.json +7 -16
- package/plugins/bundle-rollup.d.ts +0 -1
- package/plugins/bundle-rollup.js +1 -41
- package/plugins/bundle-rollup.js.map +1 -1
- package/plugins/component-testing/index.d.ts +1 -38
- package/plugins/component-testing/index.js +1 -118
- package/plugins/component-testing/index.js.map +1 -1
- package/plugins/jest.d.ts +0 -1
- package/plugins/jest.js +1 -61
- package/plugins/jest.js.map +1 -1
- package/plugins/storybook/index.d.ts +1 -3
- package/plugins/storybook/index.js +1 -73
- package/plugins/storybook/index.js.map +1 -1
- package/plugins/webpack.d.ts +1 -3
- package/plugins/webpack.js +2 -12
- package/plugins/webpack.js.map +1 -1
- package/plugins/with-react.d.ts +1 -12
- package/plugins/with-react.js +2 -79
- package/plugins/with-react.js.map +1 -1
- package/tailwind.d.ts +1 -6
- package/tailwind.js +2 -26
- package/tailwind.js.map +1 -1
- package/README.md +0 -63
- package/migrations.json +0 -864
- package/plugins/component-testing/webpack-fallback.d.ts +0 -5
- package/plugins/component-testing/webpack-fallback.js +0 -135
- package/plugins/component-testing/webpack-fallback.js.map +0 -1
- package/plugins/storybook/merge-plugins.d.ts +0 -3
- package/plugins/storybook/merge-plugins.js +0 -18
- package/plugins/storybook/merge-plugins.js.map +0 -1
- package/src/executors/module-federation-dev-server/compat.d.ts +0 -2
- package/src/executors/module-federation-dev-server/compat.js +0 -6
- package/src/executors/module-federation-dev-server/compat.js.map +0 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -11
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -55
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js.map +0 -1
- package/src/executors/module-federation-dev-server/schema.json +0 -96
- package/src/executors/module-federation-ssr-dev-server/compat.d.ts +0 -2
- package/src/executors/module-federation-ssr-dev-server/compat.js +0 -6
- package/src/executors/module-federation-ssr-dev-server/compat.js.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -9
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -71
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/schema.json +0 -48
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -129
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/files/base-vite/index.html__tmpl__ +0 -16
- package/src/generators/application/files/base-vite/public/favicon.ico +0 -0
- package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +0 -3
- package/src/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -6
- package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +0 -14
- package/src/generators/application/files/base-webpack/.babelrc__tmpl__ +0 -13
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-webpack/src/environments/environment.prod.ts__tmpl__ +0 -3
- package/src/generators/application/files/base-webpack/src/environments/environment.ts__tmpl__ +0 -6
- package/src/generators/application/files/base-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/base-webpack/src/index.html +0 -14
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +0 -14
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -9
- package/src/generators/application/files/nx-welcome/src/app/nx-welcome.tsx +0 -845
- package/src/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -1
- package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -37
- package/src/generators/application/files/style-css-module/src/styles.__style__ +0 -1
- package/src/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -1
- package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -36
- package/src/generators/application/files/style-global-css/src/styles.__style__ +0 -1
- package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -35
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -29
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -40
- package/src/generators/application/lib/add-cypress.d.ts +0 -3
- package/src/generators/application/lib/add-cypress.js +0 -22
- package/src/generators/application/lib/add-cypress.js.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts +0 -3
- package/src/generators/application/lib/add-jest.js +0 -17
- package/src/generators/application/lib/add-jest.js.map +0 -1
- package/src/generators/application/lib/add-project.d.ts +0 -2
- package/src/generators/application/lib/add-project.js +0 -98
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/add-routing.d.ts +0 -3
- package/src/generators/application/lib/add-routing.js +0 -32
- package/src/generators/application/lib/add-routing.js.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts +0 -3
- package/src/generators/application/lib/create-application-files.js +0 -47
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/find-free-port.d.ts +0 -2
- package/src/generators/application/lib/find-free-port.js +0 -18
- package/src/generators/application/lib/find-free-port.js.map +0 -1
- package/src/generators/application/lib/get-app-tests.d.ts +0 -2
- package/src/generators/application/lib/get-app-tests.js +0 -22
- package/src/generators/application/lib/get-app-tests.js.map +0 -1
- package/src/generators/application/lib/install-common-dependencies.d.ts +0 -3
- package/src/generators/application/lib/install-common-dependencies.js +0 -29
- package/src/generators/application/lib/install-common-dependencies.js.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts +0 -5
- package/src/generators/application/lib/normalize-options.js +0 -60
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts +0 -3
- package/src/generators/application/lib/set-defaults.js +0 -23
- package/src/generators/application/lib/set-defaults.js.map +0 -1
- package/src/generators/application/lib/update-jest-config.d.ts +0 -3
- package/src/generators/application/lib/update-jest-config.js +0 -30
- package/src/generators/application/lib/update-jest-config.js.map +0 -1
- package/src/generators/application/schema.d.ts +0 -45
- package/src/generators/application/schema.json +0 -202
- package/src/generators/component/component.d.ts +0 -5
- package/src/generators/component/component.js +0 -141
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/files/__fileName__.__style__ +0 -0
- package/src/generators/component/files/__fileName__.module.__style__ +0 -7
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -7
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -71
- package/src/generators/component/get-component-tests.d.ts +0 -2
- package/src/generators/component/get-component-tests.js +0 -13
- package/src/generators/component/get-component-tests.js.map +0 -1
- package/src/generators/component/noramlized-schema.d.ts +0 -8
- package/src/generators/component/noramlized-schema.js +0 -3
- package/src/generators/component/noramlized-schema.js.map +0 -1
- package/src/generators/component/schema.d.ts +0 -20
- package/src/generators/component/schema.json +0 -153
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +0 -14
- package/src/generators/component-cypress-spec/component-cypress-spec.js +0 -105
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +0 -1
- package/src/generators/component-cypress-spec/files/__componentName__.__fileExt__ +0 -13
- package/src/generators/component-cypress-spec/schema.json +0 -44
- package/src/generators/component-story/component-story.d.ts +0 -12
- package/src/generators/component-story/component-story.js +0 -81
- package/src/generators/component-story/component-story.js.map +0 -1
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -32
- package/src/generators/component-story/schema.json +0 -36
- package/src/generators/component-test/component-test.d.ts +0 -4
- package/src/generators/component-test/component-test.js +0 -78
- package/src/generators/component-test/component-test.js.map +0 -1
- package/src/generators/component-test/files/__fileName__.cy__ext__ +0 -21
- package/src/generators/component-test/schema.d.ts +0 -4
- package/src/generators/component-test/schema.js +0 -3
- package/src/generators/component-test/schema.js.map +0 -1
- package/src/generators/component-test/schema.json +0 -31
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -9
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +0 -34
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js.map +0 -1
- package/src/generators/cypress-component-configuration/files/cypress/support/commands.ts__tpl__ +0 -42
- package/src/generators/cypress-component-configuration/files/cypress.config.ts__tpl__ +0 -8
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +0 -4
- package/src/generators/cypress-component-configuration/lib/add-files.js +0 -75
- package/src/generators/cypress-component-configuration/lib/add-files.js.map +0 -1
- package/src/generators/cypress-component-configuration/lib/update-configs.d.ts +0 -7
- package/src/generators/cypress-component-configuration/lib/update-configs.js +0 -30
- package/src/generators/cypress-component-configuration/lib/update-configs.js.map +0 -1
- package/src/generators/cypress-component-configuration/schema.d.ts +0 -7
- package/src/generators/cypress-component-configuration/schema.json +0 -54
- package/src/generators/hook/files/__fileName__.spec.tsx__tmpl__ +0 -18
- package/src/generators/hook/files/__fileName__.ts__tmpl__ +0 -15
- package/src/generators/hook/hook.d.ts +0 -5
- package/src/generators/hook/hook.js +0 -117
- package/src/generators/hook/hook.js.map +0 -1
- package/src/generators/hook/schema.d.ts +0 -11
- package/src/generators/hook/schema.json +0 -77
- package/src/generators/host/files/common/src/app/__fileName__.tsx__tmpl__ +0 -33
- package/src/generators/host/files/module-federation/module-federation.config.js__tmpl__ +0 -6
- package/src/generators/host/files/module-federation/src/main.ts__tmpl__ +0 -1
- package/src/generators/host/files/module-federation/src/remotes.d.ts__tmpl__ +0 -4
- package/src/generators/host/files/module-federation/webpack.config.js__tmpl__ +0 -12
- package/src/generators/host/files/module-federation/webpack.config.prod.js__tmpl__ +0 -32
- package/src/generators/host/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -13
- package/src/generators/host/files/module-federation-ssr/server.ts__tmpl__ +0 -28
- package/src/generators/host/files/module-federation-ssr/tsconfig.server.json__tmpl__ +0 -15
- package/src/generators/host/files/module-federation-ssr/webpack.server.config.js__tmpl__ +0 -12
- package/src/generators/host/host.d.ts +0 -4
- package/src/generators/host/host.js +0 -67
- package/src/generators/host/host.js.map +0 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts +0 -5
- package/src/generators/host/lib/add-module-federation-files.js +0 -21
- package/src/generators/host/lib/add-module-federation-files.js.map +0 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +0 -6
- package/src/generators/host/lib/setup-ssr-for-host.js +0 -27
- package/src/generators/host/lib/setup-ssr-for-host.js.map +0 -1
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -3
- package/src/generators/host/lib/update-module-federation-e2e-project.js +0 -16
- package/src/generators/host/lib/update-module-federation-e2e-project.js.map +0 -1
- package/src/generators/host/schema.d.ts +0 -32
- package/src/generators/host/schema.json +0 -174
- package/src/generators/init/init.d.ts +0 -5
- package/src/generators/init/init.js +0 -80
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -11
- package/src/generators/init/schema.json +0 -49
- package/src/generators/library/files/common/.babelrc__tmpl__ +0 -16
- package/src/generators/library/files/common/README.md +0 -7
- package/src/generators/library/files/common/package.json__tmpl__ +0 -4
- package/src/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -14
- package/src/generators/library/files/vite/README.md +0 -7
- package/src/generators/library/files/vite/package.json__tmpl__ +0 -12
- package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -14
- package/src/generators/library/lib/add-linting.d.ts +0 -3
- package/src/generators/library/lib/add-linting.js +0 -38
- package/src/generators/library/lib/add-linting.js.map +0 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts +0 -3
- package/src/generators/library/lib/add-rollup-build-target.js +0 -59
- package/src/generators/library/lib/add-rollup-build-target.js.map +0 -1
- package/src/generators/library/lib/create-files.d.ts +0 -3
- package/src/generators/library/lib/create-files.js +0 -26
- package/src/generators/library/lib/create-files.js.map +0 -1
- package/src/generators/library/lib/install-common-dependencies.d.ts +0 -3
- package/src/generators/library/lib/install-common-dependencies.js +0 -30
- package/src/generators/library/lib/install-common-dependencies.js.map +0 -1
- package/src/generators/library/lib/maybe-js.d.ts +0 -2
- package/src/generators/library/lib/maybe-js.js +0 -10
- package/src/generators/library/lib/maybe-js.js.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts +0 -3
- package/src/generators/library/lib/normalize-options.js +0 -57
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/set-defaults.d.ts +0 -3
- package/src/generators/library/lib/set-defaults.js +0 -16
- package/src/generators/library/lib/set-defaults.js.map +0 -1
- package/src/generators/library/lib/update-app-routes.d.ts +0 -3
- package/src/generators/library/lib/update-app-routes.js +0 -63
- package/src/generators/library/lib/update-app-routes.js.map +0 -1
- package/src/generators/library/library.d.ts +0 -5
- package/src/generators/library/library.js +0 -126
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/schema.d.ts +0 -44
- package/src/generators/library/schema.json +0 -198
- package/src/generators/redux/files/__directory__/__fileName__.slice.spec.ts__tmpl__ +0 -53
- package/src/generators/redux/files/__directory__/__fileName__.slice.ts__tmpl__ +0 -129
- package/src/generators/redux/redux.d.ts +0 -5
- package/src/generators/redux/redux.js +0 -117
- package/src/generators/redux/redux.js.map +0 -1
- package/src/generators/redux/schema.d.ts +0 -20
- package/src/generators/redux/schema.json +0 -47
- package/src/generators/remote/files/module-federation/module-federation.config.js__tmpl__ +0 -6
- package/src/generators/remote/files/module-federation/src/main.ts__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation/src/remote-entry.ts__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation/webpack.config.js__tmpl__ +0 -12
- package/src/generators/remote/files/module-federation/webpack.config.prod.js__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -6
- package/src/generators/remote/files/module-federation-ssr/server.ts__tmpl__ +0 -45
- package/src/generators/remote/files/module-federation-ssr/webpack.server.config.js__tmpl__ +0 -12
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -4
- package/src/generators/remote/lib/setup-ssr-for-remote.js +0 -32
- package/src/generators/remote/lib/setup-ssr-for-remote.js.map +0 -1
- package/src/generators/remote/lib/update-host-with-remote.d.ts +0 -2
- package/src/generators/remote/lib/update-host-with-remote.js +0 -53
- package/src/generators/remote/lib/update-host-with-remote.js.map +0 -1
- package/src/generators/remote/remote.d.ts +0 -6
- package/src/generators/remote/remote.js +0 -56
- package/src/generators/remote/remote.js.map +0 -1
- package/src/generators/remote/schema.d.ts +0 -27
- package/src/generators/remote/schema.json +0 -173
- package/src/generators/setup-ssr/files/server.ts__tmpl__ +0 -28
- package/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -47
- package/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -15
- package/src/generators/setup-ssr/schema.d.ts +0 -7
- package/src/generators/setup-ssr/schema.json +0 -48
- package/src/generators/setup-ssr/setup-ssr.d.ts +0 -5
- package/src/generators/setup-ssr/setup-ssr.js +0 -162
- package/src/generators/setup-ssr/setup-ssr.js.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 -3
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -36
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js.map +0 -1
- package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -3
- package/src/generators/setup-tailwind/lib/update-project.js +0 -15
- package/src/generators/setup-tailwind/lib/update-project.js.map +0 -1
- package/src/generators/setup-tailwind/schema.d.ts +0 -6
- package/src/generators/setup-tailwind/schema.js +0 -3
- package/src/generators/setup-tailwind/schema.js.map +0 -1
- 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.js +0 -39
- package/src/generators/setup-tailwind/setup-tailwind.js.map +0 -1
- package/src/generators/stories/schema.json +0 -59
- package/src/generators/stories/stories.d.ts +0 -15
- package/src/generators/stories/stories.js +0 -118
- package/src/generators/stories/stories.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts +0 -5
- package/src/generators/storybook-configuration/configuration.js +0 -65
- package/src/generators/storybook-configuration/configuration.js.map +0 -1
- package/src/generators/storybook-configuration/schema.d.ts +0 -18
- package/src/generators/storybook-configuration/schema.json +0 -109
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.d.ts +0 -3
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js +0 -13
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js.map +0 -1
- package/src/migrations/update-12-0-0/update-emotion-setup.d.ts +0 -3
- package/src/migrations/update-12-0-0/update-emotion-setup.js +0 -67
- package/src/migrations/update-12-0-0/update-emotion-setup.js.map +0 -1
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.d.ts +0 -3
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js +0 -27
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js.map +0 -1
- package/src/migrations/update-12-8-0/update-12-8-0.d.ts +0 -3
- package/src/migrations/update-12-8-0/update-12-8-0.js +0 -15
- package/src/migrations/update-12-8-0/update-12-8-0.js.map +0 -1
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.d.ts +0 -3
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js +0 -38
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js.map +0 -1
- package/src/migrations/update-13-0-0/update-emotion-setup.d.ts +0 -3
- package/src/migrations/update-13-0-0/update-emotion-setup.js +0 -39
- package/src/migrations/update-13-0-0/update-emotion-setup.js.map +0 -1
- package/src/migrations/update-13-0-0/webpack5-changes-utils.d.ts +0 -11
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js +0 -269
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js.map +0 -1
- package/src/migrations/update-13-10-0/update-13-10-0.d.ts +0 -3
- package/src/migrations/update-13-10-0/update-13-10-0.js +0 -29
- package/src/migrations/update-13-10-0/update-13-10-0.js.map +0 -1
- package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +0 -3
- package/src/migrations/update-14-0-0/add-default-development-configurations.js +0 -40
- package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +0 -1
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.d.ts +0 -3
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js +0 -27
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js.map +0 -1
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.d.ts +0 -5
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js +0 -69
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js.map +0 -1
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.d.ts +0 -3
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js +0 -38
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js.map +0 -1
- package/src/migrations/update-14-6-0/add-preset-jest-config.d.ts +0 -3
- package/src/migrations/update-14-6-0/add-preset-jest-config.js +0 -40
- package/src/migrations/update-14-6-0/add-preset-jest-config.js.map +0 -1
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.d.ts +0 -3
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js +0 -39
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js.map +0 -1
- package/src/migrations/update-15-3-0/update-rollup-executor.d.ts +0 -3
- package/src/migrations/update-15-3-0/update-rollup-executor.js +0 -17
- package/src/migrations/update-15-3-0/update-rollup-executor.js.map +0 -1
- package/src/migrations/update-15-6-3/webpack-config-setup.d.ts +0 -2
- package/src/migrations/update-15-6-3/webpack-config-setup.js +0 -108
- package/src/migrations/update-15-6-3/webpack-config-setup.js.map +0 -1
- package/src/module-federation/ast-utils.d.ts +0 -8
- package/src/module-federation/ast-utils.js +0 -103
- package/src/module-federation/ast-utils.js.map +0 -1
- package/src/module-federation/load-config.d.ts +0 -3
- package/src/module-federation/load-config.js +0 -17
- package/src/module-federation/load-config.js.map +0 -1
- package/src/module-federation/models.d.ts +0 -24
- package/src/module-federation/models.js +0 -3
- package/src/module-federation/models.js.map +0 -1
- package/src/module-federation/package-json.d.ts +0 -8
- package/src/module-federation/package-json.js +0 -14
- package/src/module-federation/package-json.js.map +0 -1
- package/src/module-federation/utils.d.ts +0 -10
- package/src/module-federation/utils.js +0 -38
- package/src/module-federation/utils.js.map +0 -1
- package/src/module-federation/with-module-federation-ssr.d.ts +0 -2
- package/src/module-federation/with-module-federation-ssr.js +0 -48
- package/src/module-federation/with-module-federation-ssr.js.map +0 -1
- package/src/module-federation/with-module-federation.d.ts +0 -7
- package/src/module-federation/with-module-federation.js +0 -50
- package/src/module-federation/with-module-federation.js.map +0 -1
- package/src/rules/add-styled-dependencies.d.ts +0 -2
- package/src/rules/add-styled-dependencies.js +0 -16
- package/src/rules/add-styled-dependencies.js.map +0 -1
- package/src/rules/update-module-federation-project.d.ts +0 -6
- package/src/rules/update-module-federation-project.js +0 -34
- package/src/rules/update-module-federation-project.js.map +0 -1
- package/src/utils/assertion.d.ts +0 -1
- package/src/utils/assertion.js +0 -20
- package/src/utils/assertion.js.map +0 -1
- package/src/utils/ast-utils.d.ts +0 -29
- package/src/utils/ast-utils.js +0 -526
- package/src/utils/ast-utils.js.map +0 -1
- package/src/utils/component-props.d.ts +0 -15
- package/src/utils/component-props.js +0 -61
- package/src/utils/component-props.js.map +0 -1
- package/src/utils/create-ts-config.d.ts +0 -9
- package/src/utils/create-ts-config.js +0 -64
- package/src/utils/create-ts-config.js.map +0 -1
- package/src/utils/dependencies.d.ts +0 -7
- package/src/utils/dependencies.js +0 -3
- package/src/utils/dependencies.js.map +0 -1
- package/src/utils/format-file.d.ts +0 -1
- package/src/utils/format-file.js +0 -13
- package/src/utils/format-file.js.map +0 -1
- package/src/utils/get-in-source-vitest-tests-template.d.ts +0 -1
- package/src/utils/get-in-source-vitest-tests-template.js +0 -22
- package/src/utils/get-in-source-vitest-tests-template.js.map +0 -1
- package/src/utils/jest-utils.d.ts +0 -1
- package/src/utils/jest-utils.js +0 -10
- package/src/utils/jest-utils.js.map +0 -1
- package/src/utils/lint.d.ts +0 -37
- package/src/utils/lint.js +0 -68
- package/src/utils/lint.js.map +0 -1
- package/src/utils/styled.d.ts +0 -4
- package/src/utils/styled.js +0 -33
- package/src/utils/styled.js.map +0 -1
- package/src/utils/testing-generators.d.ts +0 -3
- package/src/utils/testing-generators.js +0 -36
- package/src/utils/testing-generators.js.map +0 -1
- package/src/utils/versions.d.ts +0 -43
- package/src/utils/versions.js +0 -51
- package/src/utils/versions.js.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "NxReactTailwindSetupGenerator",
|
|
5
|
-
"title": "Configures Tailwind CSS for an application or a buildable/publishable library.",
|
|
6
|
-
"description": "Adds the Tailwind CSS configuration files for a given React project and installs, if needed, the packages required for Tailwind CSS to work.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g setup-tailwind --project=my-app",
|
|
11
|
-
"description": "Initialize Tailwind configuration for the `my-app` project."
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"project": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "The name of the project to add the Tailwind CSS setup for.",
|
|
18
|
-
"alias": "p",
|
|
19
|
-
"$default": {
|
|
20
|
-
"$source": "argv",
|
|
21
|
-
"index": 0
|
|
22
|
-
},
|
|
23
|
-
"x-dropdown": "projects",
|
|
24
|
-
"x-prompt": "What project would you like to add the Tailwind CSS setup?",
|
|
25
|
-
"x-priority": "important"
|
|
26
|
-
},
|
|
27
|
-
"buildTarget": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "The name of the target used to build the project. This option is not needed in most cases.",
|
|
30
|
-
"default": "build",
|
|
31
|
-
"x-priority": "important"
|
|
32
|
-
},
|
|
33
|
-
"skipFormat": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"description": "Skips formatting the workspace after the generator completes.",
|
|
36
|
-
"x-priority": "internal"
|
|
37
|
-
},
|
|
38
|
-
"skipPackageJson": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"default": false,
|
|
41
|
-
"description": "Do not add dependencies to `package.json`.",
|
|
42
|
-
"x-priority": "internal"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"additionalProperties": false,
|
|
46
|
-
"required": ["project"]
|
|
47
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
2
|
-
import type { SetupTailwindOptions } from './schema';
|
|
3
|
-
export declare function setupTailwindGenerator(tree: Tree, options: SetupTailwindOptions): Promise<GeneratorCallback>;
|
|
4
|
-
export default setupTailwindGenerator;
|
|
5
|
-
export declare const setupTailwindSchematic: (generatorOptions: SetupTailwindOptions) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupTailwindSchematic = exports.setupTailwindGenerator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const versions_1 = require("../../utils/versions");
|
|
7
|
-
const add_tailwind_style_imports_1 = require("./lib/add-tailwind-style-imports");
|
|
8
|
-
const update_project_1 = require("./lib/update-project");
|
|
9
|
-
function setupTailwindGenerator(tree, options) {
|
|
10
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
const tasks = [];
|
|
12
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
13
|
-
if (tree.exists((0, devkit_1.joinPathFragments)(project.root, 'postcss.config.js')) ||
|
|
14
|
-
tree.exists((0, devkit_1.joinPathFragments)(project.root, 'tailwind.config.js'))) {
|
|
15
|
-
devkit_1.logger.info(`Skipping setup since there are existing PostCSS or Tailwind configuration files. For manual setup instructions, see https://nx.dev/guides/using-tailwind-css-in-react.`);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, './files'), project.root, {
|
|
19
|
-
tmpl: '',
|
|
20
|
-
});
|
|
21
|
-
(0, add_tailwind_style_imports_1.addTailwindStyleImports)(tree, project, options);
|
|
22
|
-
(0, update_project_1.updateProject)(tree, project, options);
|
|
23
|
-
if (!options.skipPackageJson) {
|
|
24
|
-
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
25
|
-
autoprefixer: versions_1.autoprefixerVersion,
|
|
26
|
-
postcss: versions_1.postcssVersion,
|
|
27
|
-
tailwindcss: versions_1.tailwindcssVersion,
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
if (!options.skipFormat) {
|
|
31
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
32
|
-
}
|
|
33
|
-
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
exports.setupTailwindGenerator = setupTailwindGenerator;
|
|
37
|
-
exports.default = setupTailwindGenerator;
|
|
38
|
-
exports.setupTailwindSchematic = (0, devkit_1.convertNxGenerator)(setupTailwindGenerator);
|
|
39
|
-
//# sourceMappingURL=setup-tailwind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-tailwind.js","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/setup-tailwind/setup-tailwind.ts"],"names":[],"mappings":";;;;AACA,yCASsB;AAEtB,mDAI8B;AAE9B,iFAA2E;AAC3E,yDAAqD;AAErD,SAAsB,sBAAsB,CAC1C,IAAU,EACV,OAA6B;;QAE7B,MAAM,KAAK,GAAwB,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhE,IACE,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACjE,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAClE;YACA,eAAM,CAAC,IAAI,CACT,wKAAwK,CACzK,CAAC;YACF,OAAO;SACR;QAED,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,0BAAiB,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE;YACzE,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;QAEH,IAAA,oDAAuB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAEtC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YAC5B,KAAK,CAAC,IAAI,CACR,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,EACF;gBACE,YAAY,EAAE,8BAAmB;gBACjC,OAAO,EAAE,yBAAc;gBACvB,WAAW,EAAE,6BAAkB;aAChC,CACF,CACF,CAAC;SACH;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA5CD,wDA4CC;AAED,kBAAe,sBAAsB,CAAC;AAEzB,QAAA,sBAAsB,GAAG,IAAA,2BAAkB,EACtD,sBAAsB,CACvB,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "NxReactStorybookStories",
|
|
5
|
-
"title": "Generate React Storybook stories",
|
|
6
|
-
"description": "Generate stories/specs for all components declared in a project.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"project": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"aliases": ["name", "projectName"],
|
|
12
|
-
"description": "Project for which to generate stories.",
|
|
13
|
-
"$default": {
|
|
14
|
-
"$source": "projectName",
|
|
15
|
-
"index": 0
|
|
16
|
-
},
|
|
17
|
-
"x-prompt": "For which project do you want to generate stories?",
|
|
18
|
-
"x-priority": "important"
|
|
19
|
-
},
|
|
20
|
-
"generateCypressSpecs": {
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.",
|
|
23
|
-
"x-prompt": "Do you want to generate Cypress specs as well?",
|
|
24
|
-
"x-priority": "important"
|
|
25
|
-
},
|
|
26
|
-
"cypressProject": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"description": "The Cypress project to generate the stories under. This is inferred from `project` by default."
|
|
29
|
-
},
|
|
30
|
-
"js": {
|
|
31
|
-
"type": "boolean",
|
|
32
|
-
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
33
|
-
"default": false
|
|
34
|
-
},
|
|
35
|
-
"ignorePaths": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"description": "Paths to ignore when looking for components.",
|
|
38
|
-
"items": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "Path to ignore."
|
|
41
|
-
},
|
|
42
|
-
"examples": [
|
|
43
|
-
"apps/my-app/src/not-stories/**",
|
|
44
|
-
"**/**/src/**/not-stories/**",
|
|
45
|
-
"libs/my-lib/**/*.something.ts",
|
|
46
|
-
"**/**/src/**/*.other.*",
|
|
47
|
-
"libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"skipFormat": {
|
|
51
|
-
"description": "Skip formatting files.",
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false,
|
|
54
|
-
"x-priority": "internal"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"required": ["project"],
|
|
58
|
-
"examplesFile": "../../../docs/stories-examples.md"
|
|
59
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
|
2
|
-
export interface StorybookStoriesSchema {
|
|
3
|
-
project: string;
|
|
4
|
-
generateCypressSpecs: boolean;
|
|
5
|
-
js?: boolean;
|
|
6
|
-
cypressProject?: string;
|
|
7
|
-
ignorePaths?: string[];
|
|
8
|
-
skipFormat?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function projectRootPath(tree: Tree, config: ProjectConfiguration): Promise<string>;
|
|
11
|
-
export declare function containsComponentDeclaration(tree: Tree, componentPath: string): boolean;
|
|
12
|
-
export declare function createAllStories(tree: Tree, projectName: string, generateCypressSpecs: boolean, js: boolean, cypressProject?: string, ignorePaths?: string[]): Promise<void>;
|
|
13
|
-
export declare function storiesGenerator(host: Tree, schema: StorybookStoriesSchema): Promise<void>;
|
|
14
|
-
export default storiesGenerator;
|
|
15
|
-
export declare const storiesSchematic: (generatorOptions: StorybookStoriesSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storiesSchematic = exports.storiesGenerator = exports.createAllStories = exports.containsComponentDeclaration = exports.projectRootPath = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const component_story_1 = require("../component-story/component-story");
|
|
6
|
-
const component_cypress_spec_1 = require("../component-cypress-spec/component-cypress-spec");
|
|
7
|
-
const ast_utils_1 = require("../../utils/ast-utils");
|
|
8
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
const minimatch = require("minimatch");
|
|
11
|
-
const ensure_typescript_1 = require("@nrwl/js/src/utils/typescript/ensure-typescript");
|
|
12
|
-
let tsModule;
|
|
13
|
-
function projectRootPath(tree, config) {
|
|
14
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
const { findStorybookAndBuildTargetsAndCompiler } = yield Promise.resolve().then(() => require('@nrwl/storybook/src/utils/utilities'));
|
|
16
|
-
let projectDir;
|
|
17
|
-
if (config.projectType === 'application') {
|
|
18
|
-
const { nextBuildTarget } = findStorybookAndBuildTargetsAndCompiler(config.targets);
|
|
19
|
-
if (!!nextBuildTarget) {
|
|
20
|
-
// Next.js apps
|
|
21
|
-
projectDir = 'components';
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
// apps/test-app/src/app
|
|
25
|
-
projectDir = 'app';
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else if (config.projectType == 'library') {
|
|
29
|
-
// libs/test-lib/src/lib
|
|
30
|
-
projectDir = 'lib';
|
|
31
|
-
}
|
|
32
|
-
return (0, devkit_1.joinPathFragments)(config.sourceRoot, projectDir);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
exports.projectRootPath = projectRootPath;
|
|
36
|
-
function containsComponentDeclaration(tree, componentPath) {
|
|
37
|
-
var _a;
|
|
38
|
-
if (!tsModule) {
|
|
39
|
-
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
40
|
-
}
|
|
41
|
-
const contents = tree.read(componentPath, 'utf-8');
|
|
42
|
-
if (contents === null) {
|
|
43
|
-
throw new Error(`Failed to read ${componentPath}`);
|
|
44
|
-
}
|
|
45
|
-
const sourceFile = tsModule.createSourceFile(componentPath, contents, tsModule.ScriptTarget.Latest, true);
|
|
46
|
-
return !!((0, ast_utils_1.getComponentNode)(sourceFile) ||
|
|
47
|
-
((_a = (0, ast_utils_1.findExportDeclarationsForJsx)(sourceFile)) === null || _a === void 0 ? void 0 : _a.length));
|
|
48
|
-
}
|
|
49
|
-
exports.containsComponentDeclaration = containsComponentDeclaration;
|
|
50
|
-
function createAllStories(tree, projectName, generateCypressSpecs, js, cypressProject, ignorePaths) {
|
|
51
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
const { isTheFileAStory } = yield Promise.resolve().then(() => require('@nrwl/storybook/src/utils/utilities'));
|
|
53
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
54
|
-
const projectConfiguration = projects.get(projectName);
|
|
55
|
-
const { sourceRoot, root } = projectConfiguration;
|
|
56
|
-
let componentPaths = [];
|
|
57
|
-
const projectPath = yield projectRootPath(tree, projectConfiguration);
|
|
58
|
-
(0, devkit_1.visitNotIgnoredFiles)(tree, projectPath, (path) => {
|
|
59
|
-
// Ignore private files starting with "_".
|
|
60
|
-
if ((0, path_1.basename)(path).startsWith('_'))
|
|
61
|
-
return;
|
|
62
|
-
if (ignorePaths === null || ignorePaths === void 0 ? void 0 : ignorePaths.some((pattern) => minimatch(path, pattern)))
|
|
63
|
-
return;
|
|
64
|
-
if ((path.endsWith('.tsx') && !path.endsWith('.spec.tsx')) ||
|
|
65
|
-
(path.endsWith('.js') && !path.endsWith('.spec.js')) ||
|
|
66
|
-
(path.endsWith('.jsx') && !path.endsWith('.spec.jsx'))) {
|
|
67
|
-
// Check if file is NOT a story (either ts/tsx or js/jsx)
|
|
68
|
-
if (!isTheFileAStory(tree, path)) {
|
|
69
|
-
// Since the file is not a story
|
|
70
|
-
// Let's see if the .stories.* file exists
|
|
71
|
-
const ext = path.slice(path.lastIndexOf('.'));
|
|
72
|
-
const storyPath = `${path.split(ext)[0]}.stories${ext}`;
|
|
73
|
-
if (!tree.exists(storyPath)) {
|
|
74
|
-
componentPaths.push(path);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
const e2eProjectName = cypressProject || `${projectName}-e2e`;
|
|
80
|
-
const e2eProject = projects.get(e2eProjectName);
|
|
81
|
-
if (generateCypressSpecs && !e2eProject) {
|
|
82
|
-
devkit_1.logger.info(`There was no e2e project "${e2eProjectName}" found, so cypress specs will not be generated. Pass "--cypressProject" to specify a different e2e project name`);
|
|
83
|
-
}
|
|
84
|
-
yield Promise.all(componentPaths.map((componentPath) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const relativeCmpDir = componentPath.replace((0, path_1.join)(sourceRoot, '/'), '');
|
|
86
|
-
if (!containsComponentDeclaration(tree, componentPath)) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
yield (0, component_story_1.default)(tree, {
|
|
90
|
-
componentPath: relativeCmpDir,
|
|
91
|
-
project: projectName,
|
|
92
|
-
skipFormat: true,
|
|
93
|
-
});
|
|
94
|
-
if (generateCypressSpecs && e2eProject) {
|
|
95
|
-
yield (0, component_cypress_spec_1.default)(tree, {
|
|
96
|
-
project: projectName,
|
|
97
|
-
componentPath: relativeCmpDir,
|
|
98
|
-
js,
|
|
99
|
-
cypressProject,
|
|
100
|
-
skipFormat: true,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
})));
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
exports.createAllStories = createAllStories;
|
|
107
|
-
function storiesGenerator(host, schema) {
|
|
108
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
yield createAllStories(host, schema.project, schema.generateCypressSpecs, schema.js, schema.cypressProject, schema.ignorePaths);
|
|
110
|
-
if (!schema.skipFormat) {
|
|
111
|
-
yield (0, devkit_1.formatFiles)(host);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
exports.storiesGenerator = storiesGenerator;
|
|
116
|
-
exports.default = storiesGenerator;
|
|
117
|
-
exports.storiesSchematic = (0, devkit_1.convertNxGenerator)(storiesGenerator);
|
|
118
|
-
//# sourceMappingURL=stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/stories/stories.ts"],"names":[],"mappings":";;;;AAAA,wEAAyE;AACzE,6FAA6F;AAC7F,qDAG+B;AAC/B,yCASsB;AACtB,+BAAsC;AACtC,uCAAwC;AACxC,uFAAmF;AAEnF,IAAI,QAAqC,CAAC;AAW1C,SAAsB,eAAe,CACnC,IAAU,EACV,MAA4B;;QAE5B,MAAM,EAAE,uCAAuC,EAAE,GAAG,2CAClD,qCAAqC,EACtC,CAAC;QACF,IAAI,UAAkB,CAAC;QACvB,IAAI,MAAM,CAAC,WAAW,KAAK,aAAa,EAAE;YACxC,MAAM,EAAE,eAAe,EAAE,GAAG,uCAAuC,CACjE,MAAM,CAAC,OAAO,CACf,CAAC;YACF,IAAI,CAAC,CAAC,eAAe,EAAE;gBACrB,eAAe;gBACf,UAAU,GAAG,YAAY,CAAC;aAC3B;iBAAM;gBACL,wBAAwB;gBACxB,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H,CAAC;CAAA;AAhBD,4CAgBC;AAED,kBAAe,gBAAgB,CAAC;AACnB,QAAA,gBAAgB,GAAG,IAAA,2BAAkB,EAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { StorybookConfigureSchema } from './schema';
|
|
2
|
-
import { Tree } from '@nrwl/devkit';
|
|
3
|
-
export declare function storybookConfigurationGenerator(host: Tree, schema: StorybookConfigureSchema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
4
|
-
export default storybookConfigurationGenerator;
|
|
5
|
-
export declare const storybookConfigurationSchematic: (generatorOptions: StorybookConfigureSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storybookConfigurationSchematic = exports.storybookConfigurationGenerator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const stories_1 = require("../stories/stories");
|
|
6
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const versions_1 = require("../../utils/versions");
|
|
8
|
-
function generateStories(host, schema) {
|
|
9
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
-
(0, devkit_1.ensurePackage)('@nrwl/cypress', versions_1.nxVersion);
|
|
11
|
-
const { getE2eProjectName } = yield Promise.resolve().then(() => require('@nrwl/cypress/src/utils/project-name'));
|
|
12
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.name);
|
|
13
|
-
const cypressProject = getE2eProjectName(schema.name, projectConfig.root, schema.cypressDirectory);
|
|
14
|
-
yield (0, stories_1.default)(host, {
|
|
15
|
-
project: schema.name,
|
|
16
|
-
generateCypressSpecs: schema.configureCypress && schema.generateCypressSpecs,
|
|
17
|
-
js: schema.js,
|
|
18
|
-
cypressProject,
|
|
19
|
-
ignorePaths: schema.ignorePaths,
|
|
20
|
-
skipFormat: true,
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function storybookConfigurationGenerator(host, schema) {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nrwl/storybook', versions_1.nxVersion);
|
|
28
|
-
let bundler = (_a = schema.bundler) !== null && _a !== void 0 ? _a : 'webpack';
|
|
29
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.name);
|
|
30
|
-
if (projectConfig.projectType === 'application' &&
|
|
31
|
-
((_b = projectConfig.targets['build']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/vite:build') {
|
|
32
|
-
bundler = 'vite';
|
|
33
|
-
if (schema.bundler !== 'vite') {
|
|
34
|
-
devkit_1.logger.info(`The project ${schema.name} is set up to use Vite. So
|
|
35
|
-
Storybook will be configured to use Vite as well.`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const installTask = yield configurationGenerator(host, {
|
|
39
|
-
name: schema.name,
|
|
40
|
-
uiFramework: '@storybook/react',
|
|
41
|
-
configureCypress: schema.configureCypress,
|
|
42
|
-
js: schema.js,
|
|
43
|
-
linter: schema.linter,
|
|
44
|
-
cypressDirectory: schema.cypressDirectory,
|
|
45
|
-
standaloneConfig: schema.standaloneConfig,
|
|
46
|
-
tsConfiguration: schema.tsConfiguration,
|
|
47
|
-
configureTestRunner: schema.configureTestRunner,
|
|
48
|
-
configureStaticServe: schema.configureStaticServe,
|
|
49
|
-
bundler,
|
|
50
|
-
storybook7Configuration: schema.storybook7Configuration,
|
|
51
|
-
storybook7UiFramework: bundler === 'vite'
|
|
52
|
-
? '@storybook/react-vite'
|
|
53
|
-
: '@storybook/react-webpack5',
|
|
54
|
-
skipFormat: true,
|
|
55
|
-
});
|
|
56
|
-
if (schema.generateStories) {
|
|
57
|
-
yield generateStories(host, schema);
|
|
58
|
-
}
|
|
59
|
-
return installTask;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
|
|
63
|
-
exports.default = storybookConfigurationGenerator;
|
|
64
|
-
exports.storybookConfigurationSchematic = (0, devkit_1.convertNxGenerator)(storybookConfigurationGenerator);
|
|
65
|
-
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/storybook-configuration/configuration.ts"],"names":[],"mappings":";;;;AACA,gDAAkD;AAClD,yCAMsB;AACtB,mDAAiD;AAEjD,SAAe,eAAe,CAAC,IAAU,EAAE,MAAgC;;QACzE,IAAA,sBAAa,EAAC,eAAe,EAAE,oBAAS,CAAC,CAAC;QAC1C,MAAM,EAAE,iBAAiB,EAAE,GAAG,2CAC5B,sCAAsC,EACvC,CAAC;QACF,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAClE,MAAM,cAAc,GAAG,iBAAiB,CACtC,MAAM,CAAC,IAAI,EACX,aAAa,CAAC,IAAI,EAClB,MAAM,CAAC,gBAAgB,CACxB,CAAC;QACF,MAAM,IAAA,iBAAgB,EAAC,IAAI,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,IAAI;YACpB,oBAAoB,EAClB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,oBAAoB;YACxD,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,cAAc;YACd,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;IACL,CAAC;CAAA;AAED,SAAsB,+BAA+B,CACnD,IAAU,EACV,MAAgC;;;QAEhC,MAAM,EAAE,sBAAsB,EAAE,GAAG,IAAA,sBAAa,EAE9C,iBAAiB,EAAE,oBAAS,CAAC,CAAC;QAEhC,IAAI,OAAO,GAAG,MAAA,MAAM,CAAC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AAkB,EAC/D,+BAA+B,CAChC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Linter } from '@nrwl/linter';
|
|
2
|
-
|
|
3
|
-
export interface StorybookConfigureSchema {
|
|
4
|
-
name: string;
|
|
5
|
-
configureCypress: boolean;
|
|
6
|
-
generateStories?: boolean;
|
|
7
|
-
generateCypressSpecs?: boolean;
|
|
8
|
-
js?: boolean;
|
|
9
|
-
tsConfiguration?: boolean;
|
|
10
|
-
linter?: Linter;
|
|
11
|
-
cypressDirectory?: string;
|
|
12
|
-
standaloneConfig?: boolean;
|
|
13
|
-
ignorePaths?: string[];
|
|
14
|
-
bundler?: 'webpack' | 'vite';
|
|
15
|
-
configureTestRunner?: boolean;
|
|
16
|
-
configureStaticServe?: boolean;
|
|
17
|
-
storybook7Configuration?: boolean;
|
|
18
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "NxReactStorybookConfigure",
|
|
5
|
-
"title": "React Storybook Configure",
|
|
6
|
-
"description": "Set up Storybook for a React app or library.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"name": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"aliases": ["project", "projectName"],
|
|
12
|
-
"description": "Project for which to generate Storybook configuration.",
|
|
13
|
-
"$default": {
|
|
14
|
-
"$source": "argv",
|
|
15
|
-
"index": 0
|
|
16
|
-
},
|
|
17
|
-
"x-prompt": "For which project do you want to generate Storybook configuration?",
|
|
18
|
-
"x-dropdown": "projects",
|
|
19
|
-
"x-priority": "important"
|
|
20
|
-
},
|
|
21
|
-
"configureCypress": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"description": "Run the cypress-configure generator.",
|
|
24
|
-
"x-prompt": "Configure a cypress e2e app to run against the storybook instance?",
|
|
25
|
-
"default": true,
|
|
26
|
-
"x-priority": "important"
|
|
27
|
-
},
|
|
28
|
-
"generateStories": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "Automatically generate `*.stories.ts` files for components declared in this project?",
|
|
31
|
-
"x-prompt": "Automatically generate *.stories.ts files for components declared in this project?",
|
|
32
|
-
"default": true,
|
|
33
|
-
"x-priority": "important"
|
|
34
|
-
},
|
|
35
|
-
"generateCypressSpecs": {
|
|
36
|
-
"type": "boolean",
|
|
37
|
-
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
|
|
38
|
-
"x-prompt": "Automatically generate test files in the Cypress E2E app generated by the cypress-configure generator?",
|
|
39
|
-
"default": true,
|
|
40
|
-
"x-priority": "important"
|
|
41
|
-
},
|
|
42
|
-
"configureStaticServe": {
|
|
43
|
-
"type": "boolean",
|
|
44
|
-
"description": "Specifies whether to configure a static file server target for serving storybook. Helpful for speeding up CI build/test times.",
|
|
45
|
-
"x-prompt": "Configure a static file server for the storybook instance?",
|
|
46
|
-
"default": true,
|
|
47
|
-
"x-priority": "important"
|
|
48
|
-
},
|
|
49
|
-
"cypressDirectory": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "A directory where the Cypress project will be placed. Placed at the root by default."
|
|
52
|
-
},
|
|
53
|
-
"js": {
|
|
54
|
-
"type": "boolean",
|
|
55
|
-
"description": "Generate JavaScript story files rather than TypeScript story files.",
|
|
56
|
-
"default": false
|
|
57
|
-
},
|
|
58
|
-
"tsConfiguration": {
|
|
59
|
-
"type": "boolean",
|
|
60
|
-
"description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.",
|
|
61
|
-
"default": false
|
|
62
|
-
},
|
|
63
|
-
"linter": {
|
|
64
|
-
"description": "The tool to use for running lint checks.",
|
|
65
|
-
"type": "string",
|
|
66
|
-
"enum": ["eslint"],
|
|
67
|
-
"default": "eslint"
|
|
68
|
-
},
|
|
69
|
-
"standaloneConfig": {
|
|
70
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
71
|
-
"type": "boolean",
|
|
72
|
-
"default": true,
|
|
73
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
|
74
|
-
},
|
|
75
|
-
"ignorePaths": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"description": "Paths to ignore when looking for components.",
|
|
78
|
-
"items": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "Path to ignore."
|
|
81
|
-
},
|
|
82
|
-
"examples": [
|
|
83
|
-
"apps/my-app/src/not-stories/**",
|
|
84
|
-
"**/**/src/**/not-stories/**",
|
|
85
|
-
"libs/my-lib/**/*.something.ts",
|
|
86
|
-
"**/**/src/**/*.other.*",
|
|
87
|
-
"libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
"configureTestRunner": {
|
|
91
|
-
"type": "boolean",
|
|
92
|
-
"description": "Add a Storybook Test-Runner target."
|
|
93
|
-
},
|
|
94
|
-
"bundler": {
|
|
95
|
-
"description": "The Storybook builder to use.",
|
|
96
|
-
"enum": ["vite", "webpack"],
|
|
97
|
-
"x-priority": "important"
|
|
98
|
-
},
|
|
99
|
-
"storybook7Configuration": {
|
|
100
|
-
"description": "Configure your workspace using Storybook version 7.",
|
|
101
|
-
"type": "boolean",
|
|
102
|
-
"default": false,
|
|
103
|
-
"hidden": true,
|
|
104
|
-
"aliases": ["storybook7betaConfiguration"]
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"required": ["name"],
|
|
108
|
-
"examplesFile": "../../../docs/storybook-configuration-examples.md"
|
|
109
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeReactReduxTypesFromPackageJson = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
function removeReactReduxTypesFromPackageJson(host) {
|
|
7
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
return (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@types/react-redux'], ['@types/react-redux']);
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
exports.removeReactReduxTypesFromPackageJson = removeReactReduxTypesFromPackageJson;
|
|
12
|
-
exports.default = removeReactReduxTypesFromPackageJson;
|
|
13
|
-
//# sourceMappingURL=remove-react-redux-types-package.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-react-redux-types-package.js","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-12-0-0/remove-react-redux-types-package.ts"],"names":[],"mappings":";;;;AAAA,yCAAuE;AAEvE,SAAsB,oCAAoC,CAAC,IAAU;;QACnE,OAAO,IAAA,0CAAiC,EACtC,IAAI,EACJ,CAAC,oBAAoB,CAAC,EACtB,CAAC,oBAAoB,CAAC,CACvB,CAAC;IACJ,CAAC;CAAA;AAND,oFAMC;AAED,kBAAe,oCAAoC,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateEmotionSetup = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
function updateEmotionSetup(host) {
|
|
7
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
9
|
-
projects.forEach((p) => {
|
|
10
|
-
const babelrcPath = `${p.root}/.babelrc`;
|
|
11
|
-
const oldPreset = '@emotion/babel-preset-css-prop';
|
|
12
|
-
const newPlugin = '@emotion/babel-plugin';
|
|
13
|
-
if (host.exists(babelrcPath)) {
|
|
14
|
-
(0, devkit_1.updateJson)(host, babelrcPath, (json) => {
|
|
15
|
-
var _a;
|
|
16
|
-
if (!json.presets)
|
|
17
|
-
return json;
|
|
18
|
-
let emotionPresetIdx = -1;
|
|
19
|
-
let emotionOptions = null;
|
|
20
|
-
for (const [idx, preset] of json.presets.entries()) {
|
|
21
|
-
if (Array.isArray(preset)) {
|
|
22
|
-
if (!preset[0].includes(oldPreset))
|
|
23
|
-
continue;
|
|
24
|
-
emotionOptions = preset[1];
|
|
25
|
-
emotionPresetIdx = idx;
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
if (!preset.includes(oldPreset))
|
|
30
|
-
continue;
|
|
31
|
-
emotionPresetIdx = idx;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (emotionPresetIdx !== -1) {
|
|
36
|
-
// Remove preset
|
|
37
|
-
json.presets.splice(emotionPresetIdx, 1);
|
|
38
|
-
// Add new plugin
|
|
39
|
-
(_a = json.plugins) !== null && _a !== void 0 ? _a : (json.plugins = []);
|
|
40
|
-
json.plugins.push(emotionOptions ? [newPlugin, emotionOptions] : newPlugin);
|
|
41
|
-
return json;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return json;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
(0, devkit_1.updateJson)(host, 'package.json', (json) => {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
if ((_a = json.devDependencies) === null || _a === void 0 ? void 0 : _a['@emotion/babel-preset-css-prop']) {
|
|
52
|
-
delete json.devDependencies['@emotion/babel-preset-css-prop'];
|
|
53
|
-
json.devDependencies['@emotion/babel-plugin'] = '11.2.0';
|
|
54
|
-
}
|
|
55
|
-
// Just in case someone moved it to `dependencies`
|
|
56
|
-
else if ((_b = json.dependencies) === null || _b === void 0 ? void 0 : _b['@emotion/babel-preset-css-prop']) {
|
|
57
|
-
delete json.dependencies['@emotion/babel-preset-css-prop'];
|
|
58
|
-
json.dependencies['@emotion/babel-plugin'] = '11.2.0';
|
|
59
|
-
}
|
|
60
|
-
return json;
|
|
61
|
-
});
|
|
62
|
-
yield (0, devkit_1.formatFiles)(host);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
exports.updateEmotionSetup = updateEmotionSetup;
|
|
66
|
-
exports.default = updateEmotionSetup;
|
|
67
|
-
//# sourceMappingURL=update-emotion-setup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-emotion-setup.js","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-12-0-0/update-emotion-setup.ts"],"names":[],"mappings":";;;;AAAA,yCAA0E;AAE1E,SAAsB,kBAAkB,CAAC,IAAU;;QACjD,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACrB,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,IAAI,WAAW,CAAC;YACzC,MAAM,SAAS,GAAG,gCAAgC,CAAC;YACnD,MAAM,SAAS,GAAG,uBAAuB,CAAC;YAE1C,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;gBAC5B,IAAA,mBAAU,EAAC,IAAI,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;;oBACrC,IAAI,CAAC,IAAI,CAAC,OAAO;wBAAE,OAAO,IAAI,CAAC;oBAE/B,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;oBAC1B,IAAI,cAAc,GAAc,IAAI,CAAC;oBAErC,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;wBAClD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;gCAAE,SAAS;4BAC7C,cAAc,GAAG,MAAM,CA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