@nx/angular 0.0.0-pr-31222-862e973 → 0.0.0-pr-31313-387cdca
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/LICENSE +1 -1
- package/README.md +1 -1
- package/executors.d.ts +1 -6
- package/executors.js +2 -3
- package/executors.json +2 -2
- package/fesm2022/nx-angular-mf.mjs +64 -0
- package/fesm2022/nx-angular-mf.mjs.map +1 -1
- package/fesm2022/nx-angular.mjs +0 -352
- package/fesm2022/nx-angular.mjs.map +1 -1
- package/generators.d.ts +0 -1
- package/generators.js +0 -1
- package/generators.json +19 -18
- package/index.d.ts +1 -1
- package/mf/mf.d.ts +64 -0
- package/migrations.json +778 -1289
- package/module-federation/index.d.ts +5 -2
- package/module-federation/index.js +3 -4
- package/ng-package.json +2 -2
- package/package.json +17 -29
- package/src/builders/dev-server/dev-server.impl.js +6 -4
- package/src/builders/dev-server/lib/normalize-options.js +3 -0
- package/src/builders/dev-server/lib/validate-options.js +1 -9
- package/src/builders/dev-server/schema.d.ts +3 -0
- package/src/builders/dev-server/schema.json +8 -8
- package/src/builders/webpack-browser/schema.d.ts +0 -5
- package/src/builders/webpack-browser/schema.json +0 -2
- package/src/builders/webpack-browser/webpack-browser.impl.js +3 -4
- package/src/builders/webpack-server/schema.json +0 -1
- package/src/executors/application/application.impl.d.ts +1 -1
- package/src/executors/application/application.impl.js +4 -1
- package/src/executors/application/schema.json +78 -8
- package/src/executors/application/utils/normalize-options.d.ts +2 -0
- package/src/executors/application/utils/normalize-options.js +34 -0
- package/src/executors/application/utils/validate-options.js +18 -4
- package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +1 -1
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +0 -9
- package/src/executors/browser-esbuild/schema.json +1 -3
- package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
- package/src/executors/delegate-build/delegate-build.impl.js +0 -3
- package/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
- package/src/executors/module-federation-dev-server/lib/index.js +0 -2
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +5 -31
- package/src/executors/module-federation-dev-server/schema.d.ts +4 -0
- package/src/executors/module-federation-dev-server/schema.json +2 -1
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +2 -2
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +1 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +1 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +7 -35
- package/src/executors/module-federation-ssr-dev-server/schema.d.ts +8 -14
- package/src/executors/module-federation-ssr-dev-server/schema.json +1 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.d.ts +3 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.js +22 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.d.ts +2 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.js +17 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{v17+/ng-package → ng-package}/entry-point/write-bundles.transform.d.ts +3 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.transform.js +49 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +7 -26
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.d.ts +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
- package/src/executors/ng-packagr-lite/schema.json +3 -7
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +4 -21
- package/src/executors/package/package.impl.d.ts +2 -2
- package/src/executors/package/package.impl.js +6 -4
- package/src/executors/package/schema.d.ts +4 -6
- package/src/executors/package/schema.json +4 -10
- package/src/executors/utilities/ng-packagr/ng-packagr-version.d.ts +2 -0
- package/src/executors/utilities/ng-packagr/ng-packagr-version.js +11 -0
- package/src/executors/utilities/ng-packagr/package-imports.d.ts +1 -0
- package/src/executors/utilities/ng-packagr/package-imports.js +10 -0
- package/src/executors/utilities/ng-packagr/{stylesheet-processor.js → pre-v19/stylesheet-processor.js} +4 -4
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +1 -1
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +23 -14
- package/src/executors/utilities/ng-packagr/tailwindcss.d.ts +0 -6
- package/src/executors/utilities/ng-packagr/tailwindcss.js +0 -32
- package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.d.ts +14 -0
- package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.js +99 -0
- package/src/generators/add-linting/add-linting.js +2 -17
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
- package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
- package/src/generators/add-linting/schema.d.ts +1 -0
- package/src/generators/application/application.d.ts +0 -1
- package/src/generators/application/application.js +24 -9
- package/src/generators/application/files/ng-module/src/app/app.component.html__tpl__ +8 -1
- package/src/generators/application/files/ng-module/src/app/app.component.ts__tpl__ +4 -5
- package/src/generators/application/files/nx-welcome/claimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/claimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/nx-welcome/not-configured/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/not-configured/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/nx-welcome/unclaimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/unclaimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/rspack-ssr/server.ts__tmpl__ +72 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.html__tpl__ +8 -1
- package/src/generators/application/files/standalone-components/src/app/app.component.ts__tpl__ +4 -6
- package/src/generators/application/lib/add-e2e.js +2 -9
- package/src/generators/application/lib/add-linting.js +2 -2
- package/src/generators/application/lib/add-serve-static-target.d.ts +1 -1
- package/src/generators/application/lib/add-serve-static-target.js +2 -3
- package/src/generators/application/lib/add-unit-test-runner.js +20 -7
- package/src/generators/application/lib/create-files.js +4 -1
- package/src/generators/application/lib/create-project.js +25 -31
- package/src/generators/application/lib/normalize-options.d.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +14 -15
- package/src/generators/application/schema.d.ts +5 -6
- package/src/generators/application/schema.json +16 -21
- package/src/generators/component/component.d.ts +0 -1
- package/src/generators/component/component.js +4 -7
- package/src/generators/component/files/__fileName__.__style__ +1 -1
- package/src/generators/component/files/__fileName__.spec.ts__tpl__ +1 -1
- package/src/generators/component/files/__fileName__.ts__tpl__ +5 -13
- package/src/generators/component/lib/normalize-options.js +8 -6
- package/src/generators/component/schema.d.ts +3 -18
- package/src/generators/component/schema.json +11 -28
- package/src/generators/component-story/files/__componentFileName__.stories.ts__tmpl__ +4 -4
- package/src/generators/component-test/component-test.js +1 -1
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +1 -4
- package/src/generators/convert-to-application-executor/schema.json +1 -1
- package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
- package/src/generators/convert-to-rspack/convert-to-rspack.js +357 -0
- package/src/generators/convert-to-rspack/lib/create-config.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/create-config.js +45 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +77 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.js +26 -0
- package/src/generators/convert-to-rspack/lib/validate-supported-executor.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/validate-supported-executor.js +14 -0
- package/src/generators/convert-to-rspack/schema.d.ts +5 -0
- package/src/generators/convert-to-rspack/schema.json +30 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +1 -7
- package/src/generators/directive/directive.js +5 -0
- package/src/generators/directive/files/__fileName__.ts__tpl__ +2 -2
- package/src/generators/directive/lib/normalize-options.js +6 -7
- package/src/generators/directive/schema.d.ts +2 -17
- package/src/generators/directive/schema.json +20 -28
- package/src/generators/federate-module/lib/add-remote.js +0 -3
- package/src/generators/federate-module/schema.d.ts +0 -2
- package/src/generators/federate-module/schema.json +19 -16
- package/src/generators/host/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
- package/src/generators/host/files/js/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/host/host.d.ts +1 -2
- package/src/generators/host/host.js +33 -25
- package/src/generators/host/lib/update-ssr-setup.js +7 -3
- package/src/generators/host/schema.d.ts +4 -5
- package/src/generators/host/schema.json +34 -27
- package/src/generators/init/init.js +3 -1
- package/src/generators/library/files/base/README.md__tpl__ +2 -2
- package/src/generators/library/lib/add-project.d.ts +1 -1
- package/src/generators/library/lib/add-project.js +7 -1
- package/src/generators/library/lib/add-standalone-component.js +4 -3
- package/src/generators/library/lib/normalize-options.js +4 -5
- package/src/generators/library/lib/normalized-schema.d.ts +2 -3
- package/src/generators/library/library.d.ts +0 -1
- package/src/generators/library/library.js +27 -19
- package/src/generators/library/schema.d.ts +2 -5
- package/src/generators/library/schema.json +9 -20
- package/src/generators/move/lib/update-secondary-entry-points.js +1 -0
- package/src/generators/move/move.d.ts +3 -1
- package/src/generators/move/move.js +4 -8
- package/src/generators/move/schema.d.ts +0 -3
- package/src/generators/move/schema.json +0 -5
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +1 -1
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js +4 -3
- package/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +1 -1
- package/src/generators/ng-add/migrators/builders/builder.migrator.d.ts +2 -2
- package/src/generators/ng-add/migrators/builders/builder.migrator.js +4 -4
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +4 -4
- package/src/generators/ng-add/migrators/projects/project.migrator.js +1 -1
- package/src/generators/ng-add/utilities/validation-logging.js +5 -4
- package/src/generators/ng-add/utilities/workspace.js +5 -2
- package/src/generators/ngrx/ngrx.d.ts +3 -0
- package/src/generators/ngrx/ngrx.js +3 -0
- package/src/generators/ngrx/schema.json +1 -1
- package/src/generators/ngrx-feature-store/schema.d.ts +1 -1
- package/src/generators/ngrx-root-store/lib/add-imports.js +4 -4
- package/src/generators/ngrx-root-store/lib/normalize-options.js +3 -2
- package/src/generators/pipe/files/__fileName__.ts__tpl__ +2 -2
- package/src/generators/pipe/lib/normalize-options.js +6 -7
- package/src/generators/pipe/pipe.js +5 -0
- package/src/generators/pipe/schema.d.ts +2 -17
- package/src/generators/pipe/schema.json +20 -28
- package/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/remote/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
- package/src/generators/remote/lib/update-ssr-setup.js +7 -3
- package/src/generators/remote/remote.d.ts +1 -2
- package/src/generators/remote/remote.js +38 -14
- package/src/generators/remote/schema.d.ts +4 -5
- package/src/generators/remote/schema.json +32 -25
- package/src/generators/scam/lib/normalize-options.js +6 -7
- package/src/generators/scam/scam.js +0 -2
- package/src/generators/scam/schema.d.ts +3 -17
- package/src/generators/scam/schema.json +16 -30
- package/src/generators/scam-directive/lib/normalize-options.js +6 -7
- package/src/generators/scam-directive/scam-directive.js +0 -2
- package/src/generators/scam-directive/schema.d.ts +3 -17
- package/src/generators/scam-directive/schema.json +16 -31
- package/src/generators/scam-pipe/lib/normalize-options.js +6 -7
- package/src/generators/scam-pipe/scam-pipe.js +0 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -17
- package/src/generators/scam-pipe/schema.json +16 -31
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +1 -1
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +5 -4
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +3 -1
- package/src/generators/setup-mf/files/entry-module-files/entry.component.ts__tmpl__ +2 -1
- package/src/generators/setup-mf/files/standalone-entry-component-files/entry.component.ts__tmpl__ +2 -2
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +4 -1
- package/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +3 -0
- package/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/lib/add-remote-entry.js +5 -0
- package/src/generators/setup-mf/lib/add-remote-to-host.js +21 -8
- package/src/generators/setup-mf/lib/fix-bootstrap.js +3 -2
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +1 -1
- package/src/generators/setup-mf/schema.json +5 -3
- package/src/generators/setup-mf/setup-mf.js +5 -2
- package/src/generators/setup-ssr/files/{server → pre-v19/server}/application-builder/__serverFileName__ +1 -1
- package/src/generators/setup-ssr/files/{server/server-builder/v17+ → pre-v19/server/server-builder}/__serverFileName__ +1 -1
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/__main__ +1 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +13 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/app.routes.server.ts__tpl__ +8 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +66 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/__main__ +7 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +14 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.routes.server.ts__tpl__ +8 -0
- package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +67 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/__main__ +1 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/app/__rootModuleFileName__ +14 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/root/tsconfig.server.json.template +16 -0
- package/src/generators/setup-ssr/files/{server/server-builder/pre-v17 → v19+/server-builder/server}/__serverFileName__ +25 -15
- package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/__main__ +7 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/app/app.config.server.ts.template +11 -0
- package/src/generators/setup-ssr/lib/add-dependencies.js +6 -17
- package/src/generators/setup-ssr/lib/add-hydration.d.ts +2 -2
- package/src/generators/setup-ssr/lib/add-hydration.js +10 -2
- package/src/generators/setup-ssr/lib/add-server-file.d.ts +2 -2
- package/src/generators/setup-ssr/lib/add-server-file.js +24 -10
- package/src/generators/setup-ssr/lib/generate-files.d.ts +2 -2
- package/src/generators/setup-ssr/lib/generate-files.js +31 -8
- package/src/generators/setup-ssr/lib/generate-server-ts-config.d.ts +3 -3
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +24 -3
- package/src/generators/setup-ssr/lib/normalize-options.d.ts +3 -14
- package/src/generators/setup-ssr/lib/normalize-options.js +27 -6
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.d.ts +2 -2
- package/src/generators/setup-ssr/lib/update-project-config.d.ts +3 -3
- package/src/generators/setup-ssr/lib/update-project-config.js +37 -24
- package/src/generators/setup-ssr/lib/validate-options.js +5 -0
- package/src/generators/setup-ssr/schema.d.ts +5 -0
- package/src/generators/setup-ssr/schema.json +6 -8
- package/src/generators/setup-ssr/setup-ssr.js +6 -11
- package/src/generators/setup-tailwind/lib/index.d.ts +1 -1
- package/src/generators/setup-tailwind/lib/index.js +1 -1
- package/src/generators/setup-tailwind/lib/update-application-styles.js +1 -1
- package/src/generators/setup-tailwind/lib/validate-build-target.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/{add-tailwind-config-path-to-project.js → validate-build-target.js} +5 -15
- package/src/generators/setup-tailwind/setup-tailwind.js +4 -1
- package/src/generators/stories/schema.d.ts +0 -2
- package/src/generators/stories/schema.json +0 -10
- package/src/generators/stories/stories.js +2 -21
- package/src/generators/storybook-configuration/lib/generate-stories.js +0 -6
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
- package/src/generators/storybook-configuration/schema.d.ts +0 -3
- package/src/generators/storybook-configuration/schema.json +0 -15
- package/src/generators/storybook-configuration/storybook-configuration.js +0 -3
- package/src/generators/utils/add-jest.d.ts +1 -0
- package/src/generators/utils/add-jest.js +5 -9
- package/src/generators/utils/add-vitest.d.ts +9 -0
- package/src/generators/utils/add-vitest.js +21 -0
- package/src/generators/utils/assert-mf-utils.d.ts +1 -0
- package/src/generators/utils/assert-mf-utils.js +11 -0
- package/src/generators/utils/ensure-angular-dependencies.js +0 -1
- package/src/generators/utils/storybook-ast/component-info.js +13 -3
- package/src/generators/utils/testing.js +15 -28
- package/src/generators/utils/validations.d.ts +1 -0
- package/src/generators/utils/validations.js +10 -0
- package/src/generators/utils/version-utils.d.ts +1 -0
- package/src/generators/utils/version-utils.js +7 -2
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +4 -4
- package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
- package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.d.ts +3 -0
- package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.js +55 -0
- package/src/migrations/{update-14-2-0/remove-show-circular-dependencies-option.d.ts → update-20-2-0/disable-angular-eslint-prefer-standalone.d.ts} +1 -1
- package/src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone.js +55 -0
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +2 -0
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +61 -0
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +2 -0
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +41 -0
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.d.ts +3 -0
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.js +62 -0
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts +3 -0
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +73 -0
- package/src/migrations/{update-14-5-2 → update-20-2-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-16-1-0 → update-20-2-0}/update-angular-cli.js +1 -1
- package/src/migrations/{update-14-2-0/update-libraries-secondary-entrypoints.d.ts → update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.d.ts} +1 -1
- package/src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.js +55 -0
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +2 -0
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +18 -0
- package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.js +4 -3
- package/src/migrations/{update-14-6-0 → update-20-5-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-14-5-2 → update-20-5-0}/update-angular-cli.js +4 -3
- package/src/migrations/{update-14-2-0/update-ngcc-target.d.ts → update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.d.ts} +1 -1
- package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +122 -0
- package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
- package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
- package/src/plugins/plugin.js +7 -2
- package/src/utils/backward-compatible-versions.d.ts +4 -4
- package/src/utils/backward-compatible-versions.js +27 -23
- package/src/utils/nx-devkit/ast-utils.d.ts +3 -2
- package/src/utils/nx-devkit/ast-utils.js +22 -4
- package/src/utils/test-runners.d.ts +2 -1
- package/src/utils/test-runners.js +1 -0
- package/src/utils/versions.d.ts +13 -11
- package/src/utils/versions.js +14 -12
- package/esm2022/index.mjs +0 -2
- package/esm2022/mf/index.mjs +0 -2
- package/esm2022/mf/mf.mjs +0 -52
- package/esm2022/mf/nx-angular-mf.mjs +0 -5
- package/esm2022/nx-angular.mjs +0 -5
- package/esm2022/src/runtime/nx/data-persistence.mjs +0 -349
- package/esm2022/testing/index.mjs +0 -2
- package/esm2022/testing/nx-angular-testing.mjs +0 -5
- package/esm2022/testing/src/testing-utils.mjs +0 -38
- package/fesm2022/nx-angular-testing.mjs +0 -45
- package/fesm2022/nx-angular-testing.mjs.map +0 -1
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +0 -65
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.d.ts +0 -9
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +0 -51
- package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.js +0 -65
- package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.js +0 -41
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.js +0 -27
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.js +0 -53
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.d.ts +0 -15
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.js +0 -28
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.d.ts +0 -30
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.js +0 -52
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.js +0 -20
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.d.ts +0 -9
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.js +0 -320
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +0 -35
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.js +0 -37
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +0 -178
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.d.ts +0 -42
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.d.ts +0 -10
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.js +0 -17
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +0 -201
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.d.ts +0 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.js +0 -18
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +0 -286
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js +0 -26
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +0 -71
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.d.ts +0 -13
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js +0 -32
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +0 -35
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js +0 -37
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +0 -13
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +0 -183
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +0 -36
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.d.ts +0 -10
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.js +0 -17
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +0 -194
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.d.ts +0 -1
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +0 -9
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +0 -4
- package/src/generators/component-cypress-spec/component-cypress-spec.js +0 -35
- package/src/generators/component-cypress-spec/files/__componentFileName__.__fileExt__ +0 -17
- package/src/generators/component-cypress-spec/lib/get-args-default-value.d.ts +0 -2
- package/src/generators/component-cypress-spec/lib/get-args-default-value.js +0 -24
- package/src/generators/component-cypress-spec/lib/get-component-selector.d.ts +0 -2
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +0 -23
- package/src/generators/component-cypress-spec/schema.d.ts +0 -10
- package/src/generators/component-cypress-spec/schema.json +0 -66
- package/src/generators/host/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -66
- package/src/generators/remote/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -72
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.d.ts +0 -3
- package/src/generators/stories/lib/get-e2e-project.d.ts +0 -2
- package/src/generators/stories/lib/get-e2e-project.js +0 -14
- package/src/generators/storybook-configuration/lib/validate-options.d.ts +0 -2
- package/src/generators/storybook-configuration/lib/validate-options.js +0 -8
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +0 -23
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +0 -34
- package/src/migrations/update-14-2-0/update-ngcc-target.js +0 -17
- package/src/migrations/update-14-2-0/update-router-initial-navigation.d.ts +0 -2
- package/src/migrations/update-14-2-0/update-router-initial-navigation.js +0 -73
- package/src/migrations/update-14-2-0/update-tsconfig-target.d.ts +0 -2
- package/src/migrations/update-14-2-0/update-tsconfig-target.js +0 -155
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +0 -5
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +0 -90
- package/src/migrations/update-14-6-0/update-angular-cli.js +0 -22
- package/src/migrations/update-14-8-0/rename-webpack-server.d.ts +0 -2
- package/src/migrations/update-14-8-0/rename-webpack-server.js +0 -21
- package/src/migrations/update-15-0-0/add-karma-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-karma-inputs.js +0 -41
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.d.ts +0 -2
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +0 -102
- package/src/migrations/update-15-2-0/remove-browserlist-config.d.ts +0 -4
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +0 -59
- package/src/migrations/update-15-2-0/remove-platform-server-exports.d.ts +0 -2
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +0 -62
- package/src/migrations/update-15-2-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-2-0/update-karma-main-file.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-karma-main-file.js +0 -72
- package/src/migrations/update-15-2-0/update-typescript-target.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-typescript-target.js +0 -52
- package/src/migrations/update-15-2-0/update-workspace-config.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-workspace-config.js +0 -24
- package/src/migrations/update-15-5-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-5-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-7-0/install-required-packages.d.ts +0 -2
- package/src/migrations/update-15-7-0/install-required-packages.js +0 -36
- package/src/migrations/update-15-8-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-8-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-9-0/update-file-server-executor.d.ts +0 -2
- package/src/migrations/update-15-9-0/update-file-server-executor.js +0 -42
- package/src/migrations/update-15-9-0/update-testing-tsconfig.d.ts +0 -3
- package/src/migrations/update-15-9-0/update-testing-tsconfig.js +0 -32
- package/src/migrations/update-16-0-0/remove-karma-defaults.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-karma-defaults.js +0 -52
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +0 -40
- package/src/migrations/update-16-0-0/remove-protractor-defaults.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-protractor-defaults.js +0 -52
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.d.ts +0 -2
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +0 -127
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.d.ts +0 -2
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +0 -22
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +0 -2
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +0 -62
- package/src/migrations/update-16-1-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-16-1-0/update-server-executor-config.d.ts +0 -2
- package/src/migrations/update-16-1-0/update-server-executor-config.js +0 -26
- package/src/runtime/nx/data-persistence.d.ts +0 -276
- package/src/utils/mf/utils.d.ts +0 -15
- package/src/utils/mf/utils.js +0 -101
- package/src/utils/mf/with-module-federation-ssr.d.ts +0 -2
- package/src/utils/mf/with-module-federation-ssr.js +0 -68
- package/src/utils/mf/with-module-federation.d.ts +0 -2
- package/src/utils/mf/with-module-federation.js +0 -70
- package/testing/index.d.ts +0 -1
- package/testing/ng-package.json +0 -6
- package/testing/src/testing-utils.d.ts +0 -33
- /package/src/executors/utilities/ng-packagr/{stylesheet-processor.d.ts → pre-v19/stylesheet-processor.d.ts} +0 -0
- /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/__main__ +0 -0
- /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/app/__rootModuleFileName__ +0 -0
- /package/src/generators/setup-ssr/files/{root → pre-v19/root}/tsconfig.server.json__tpl__ +0 -0
- /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/__main__ +0 -0
- /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/app/app.config.server.ts__tpl__ +0 -0
|
@@ -6,14 +6,18 @@ const path_1 = require("path");
|
|
|
6
6
|
const versions_1 = require("../../../utils/versions");
|
|
7
7
|
const version_utils_1 = require("../../utils/version-utils");
|
|
8
8
|
async function updateSsrSetup(tree, options, appName, typescriptConfiguration) {
|
|
9
|
+
const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
|
9
10
|
let project = (0, devkit_1.readProjectConfiguration)(tree, appName);
|
|
10
11
|
tree.rename((0, devkit_1.joinPathFragments)(project.sourceRoot, 'main.server.ts'), (0, devkit_1.joinPathFragments)(project.sourceRoot, 'bootstrap.server.ts'));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const pathToServerEntry = (0, devkit_1.joinPathFragments)(angularMajorVersion >= 19
|
|
13
|
+
? project.sourceRoot ?? (0, devkit_1.joinPathFragments)(project.root, 'src')
|
|
14
|
+
: project.root, 'server.ts');
|
|
15
|
+
tree.write(pathToServerEntry, `import('./${angularMajorVersion >= 19 ? '' : 'src/'}main.server');`);
|
|
16
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, '../files/common'), project.root, {
|
|
14
17
|
appName,
|
|
15
18
|
browserBundleOutput: project.targets.build.options.outputPath,
|
|
16
19
|
standalone: options.standalone,
|
|
20
|
+
commonEngineEntryPoint: angularMajorVersion >= 19 ? '@angular/ssr/node' : '@angular/ssr',
|
|
17
21
|
tmpl: '',
|
|
18
22
|
});
|
|
19
23
|
const pathToTemplateFiles = typescriptConfiguration ? 'ts' : 'js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
3
2
|
import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
|
4
3
|
import type { Styles } from '../utils/types';
|
|
5
4
|
|
|
6
5
|
export interface Schema {
|
|
7
|
-
|
|
6
|
+
directory: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
bundler?: 'webpack' | 'rspack';
|
|
8
9
|
remotes?: string[];
|
|
9
10
|
dynamic?: boolean;
|
|
10
11
|
setParserOptionsProject?: boolean;
|
|
@@ -14,20 +15,18 @@ export interface Schema {
|
|
|
14
15
|
prefix?: string;
|
|
15
16
|
style?: Styles;
|
|
16
17
|
skipTests?: boolean;
|
|
17
|
-
directory?: string;
|
|
18
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
19
18
|
tags?: string;
|
|
20
19
|
linter?: Linter | LinterType;
|
|
21
20
|
unitTestRunner?: UnitTestRunner;
|
|
22
21
|
e2eTestRunner?: E2eTestRunner;
|
|
23
22
|
backendProject?: string;
|
|
24
23
|
strict?: boolean;
|
|
25
|
-
standaloneConfig?: boolean;
|
|
26
24
|
inlineStyle?: boolean;
|
|
27
25
|
inlineTemplate?: boolean;
|
|
28
26
|
viewEncapsulation?: 'Emulated' | 'Native' | 'None';
|
|
29
27
|
skipFormat?: boolean;
|
|
30
28
|
standalone?: boolean;
|
|
31
29
|
ssr?: boolean;
|
|
30
|
+
serverRouting?: boolean;
|
|
32
31
|
typescriptConfiguration?: boolean;
|
|
33
32
|
}
|
|
@@ -2,44 +2,52 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"$id": "NxMFHost",
|
|
4
4
|
"cli": "nx",
|
|
5
|
-
"title": "Nx Module Federation Host Application",
|
|
6
|
-
"description": "Create an Angular Host Module Federation Application.",
|
|
5
|
+
"title": "Nx Module Federation Consumer (Host) Application",
|
|
6
|
+
"description": "Create an Angular Consumer (Host) Module Federation Application.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"examples": [
|
|
9
9
|
{
|
|
10
10
|
"command": "nx g @nx/angular:host appName --remotes=remote1",
|
|
11
|
-
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the remote application to this application's configuration"
|
|
11
|
+
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the Producer (remote) application to this application's configuration"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"command": "nx g @nx/angular:consumer appName --producers=remote1",
|
|
15
|
+
"description": "Create an Angular application with configuration in place for Module Federation. If the `producers` option is provided, attach the Producer (remote) application to this application's configuration"
|
|
12
16
|
}
|
|
13
17
|
],
|
|
14
18
|
"properties": {
|
|
15
|
-
"
|
|
19
|
+
"directory": {
|
|
20
|
+
"description": "The directory of the new application.",
|
|
16
21
|
"type": "string",
|
|
17
|
-
"description": "The name to give to the host Angular application.",
|
|
18
22
|
"$default": {
|
|
19
23
|
"$source": "argv",
|
|
20
24
|
"index": 0
|
|
21
25
|
},
|
|
22
|
-
"
|
|
26
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
|
27
|
+
},
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "The name to give to the Consumer (host) Angular application.",
|
|
31
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
|
32
|
+
"x-priority": "important"
|
|
23
33
|
},
|
|
24
34
|
"remotes": {
|
|
25
35
|
"type": "array",
|
|
26
|
-
"description": "The names of the remote applications to add to the host.",
|
|
27
|
-
"x-priority": "important"
|
|
36
|
+
"description": "The names of the Producers (remote) applications to add to the Consumer (host).",
|
|
37
|
+
"x-priority": "important",
|
|
38
|
+
"alias": "producers"
|
|
39
|
+
},
|
|
40
|
+
"bundler": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "The bundler to use for the host application.",
|
|
43
|
+
"default": "webpack",
|
|
44
|
+
"enum": ["webpack", "rspack"]
|
|
28
45
|
},
|
|
29
46
|
"dynamic": {
|
|
30
47
|
"type": "boolean",
|
|
31
48
|
"description": "Should the host application use dynamic federation?",
|
|
32
49
|
"default": false
|
|
33
50
|
},
|
|
34
|
-
"directory": {
|
|
35
|
-
"description": "The directory of the new application.",
|
|
36
|
-
"type": "string"
|
|
37
|
-
},
|
|
38
|
-
"projectNameAndRootFormat": {
|
|
39
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
40
|
-
"type": "string",
|
|
41
|
-
"enum": ["as-provided", "derived"]
|
|
42
|
-
},
|
|
43
51
|
"style": {
|
|
44
52
|
"description": "The file extension to be used for style files.",
|
|
45
53
|
"type": "string",
|
|
@@ -111,8 +119,9 @@
|
|
|
111
119
|
},
|
|
112
120
|
"unitTestRunner": {
|
|
113
121
|
"type": "string",
|
|
114
|
-
"enum": ["jest", "none"],
|
|
122
|
+
"enum": ["jest", "vitest", "none"],
|
|
115
123
|
"description": "Test runner to use for unit tests.",
|
|
124
|
+
"x-prompt": "Which unit test runner would you like to use?",
|
|
116
125
|
"default": "jest"
|
|
117
126
|
},
|
|
118
127
|
"e2eTestRunner": {
|
|
@@ -141,12 +150,6 @@
|
|
|
141
150
|
"description": "Create an application with stricter type checking and build optimization options.",
|
|
142
151
|
"default": true
|
|
143
152
|
},
|
|
144
|
-
"standaloneConfig": {
|
|
145
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
146
|
-
"type": "boolean",
|
|
147
|
-
"default": true,
|
|
148
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
|
149
|
-
},
|
|
150
153
|
"setParserOptionsProject": {
|
|
151
154
|
"type": "boolean",
|
|
152
155
|
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
@@ -165,15 +168,19 @@
|
|
|
165
168
|
},
|
|
166
169
|
"standalone": {
|
|
167
170
|
"type": "boolean",
|
|
168
|
-
"description": "Whether to generate a host application that uses standalone components.",
|
|
171
|
+
"description": "Whether to generate a Consumer (host) application that uses standalone components.",
|
|
169
172
|
"default": true
|
|
170
173
|
},
|
|
171
174
|
"ssr": {
|
|
172
|
-
"description": "Whether to configure SSR for the host application",
|
|
175
|
+
"description": "Whether to configure SSR for the Consumer (host) application",
|
|
173
176
|
"type": "boolean",
|
|
174
177
|
"default": false,
|
|
175
178
|
"x-priority": "important"
|
|
176
179
|
},
|
|
180
|
+
"serverRouting": {
|
|
181
|
+
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
},
|
|
177
184
|
"typescriptConfiguration": {
|
|
178
185
|
"type": "boolean",
|
|
179
186
|
"description": "Whether the module federation configuration and webpack configuration files should use TS.",
|
|
@@ -181,5 +188,5 @@
|
|
|
181
188
|
}
|
|
182
189
|
},
|
|
183
190
|
"additionalProperties": false,
|
|
184
|
-
"required": ["
|
|
191
|
+
"required": ["directory"]
|
|
185
192
|
}
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.angularInitGenerator = angularInitGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
6
|
-
const
|
|
6
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
const plugin_1 = require("../../plugins/plugin");
|
|
8
|
+
const version_utils_1 = require("../utils/version-utils");
|
|
8
9
|
async function angularInitGenerator(tree, options) {
|
|
10
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'init');
|
|
9
11
|
ignoreAngularCacheDirectory(tree);
|
|
10
12
|
const installTask = installAngularDevkitCoreIfMissing(tree, options);
|
|
11
13
|
// For Angular inference plugin, we only want it during import since our
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { AngularProjectConfiguration } from '../../../utils/types';
|
|
3
3
|
import type { NormalizedSchema } from './normalized-schema';
|
|
4
|
-
export declare function addProject(tree: Tree, libraryOptions: NormalizedSchema['libraryOptions']): AngularProjectConfiguration
|
|
4
|
+
export declare function addProject(tree: Tree, libraryOptions: NormalizedSchema['libraryOptions']): Promise<AngularProjectConfiguration>;
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addProject = addProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
6
|
-
|
|
6
|
+
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
7
|
+
const use_legacy_versioning_1 = require("nx/src/command-line/release/config/use-legacy-versioning");
|
|
8
|
+
async function addProject(tree, libraryOptions) {
|
|
7
9
|
const project = {
|
|
8
10
|
name: libraryOptions.name,
|
|
9
11
|
root: libraryOptions.projectRoot,
|
|
@@ -34,6 +36,10 @@ function addProject(tree, libraryOptions) {
|
|
|
34
36
|
},
|
|
35
37
|
defaultConfiguration: 'production',
|
|
36
38
|
};
|
|
39
|
+
if (libraryOptions.publishable) {
|
|
40
|
+
const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
|
|
41
|
+
await (0, add_release_config_1.addReleaseConfigForNonTsSolution)((0, use_legacy_versioning_1.shouldUseLegacyVersioning)(nxJson.release), tree, libraryOptions.name, project);
|
|
42
|
+
}
|
|
37
43
|
}
|
|
38
44
|
(0, devkit_1.addProjectConfiguration)(tree, libraryOptions.name, project);
|
|
39
45
|
return project;
|
|
@@ -8,9 +8,10 @@ const add_load_children_1 = require("./add-load-children");
|
|
|
8
8
|
async function addStandaloneComponent(tree, { libraryOptions, componentOptions }) {
|
|
9
9
|
await (0, component_1.componentGenerator)(tree, {
|
|
10
10
|
...componentOptions,
|
|
11
|
-
name:
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
name: (0, devkit_1.names)(libraryOptions.name).className,
|
|
12
|
+
path: (0, devkit_1.joinPathFragments)(libraryOptions.projectRoot, 'src', 'lib', componentOptions.flat
|
|
13
|
+
? `${componentOptions.name}`
|
|
14
|
+
: `${componentOptions.name}/${componentOptions.name}`),
|
|
14
15
|
standalone: true,
|
|
15
16
|
export: true,
|
|
16
17
|
skipFormat: true,
|
|
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
|
-
const eslint_1 = require("@nx/eslint");
|
|
7
6
|
const test_runners_1 = require("../../../utils/test-runners");
|
|
8
7
|
async function normalizeOptions(host, schema) {
|
|
9
8
|
schema.standalone = schema.standalone ?? true;
|
|
10
9
|
// Create a schema with populated default values
|
|
11
10
|
const options = {
|
|
12
11
|
buildable: false,
|
|
13
|
-
linter:
|
|
12
|
+
linter: 'eslint',
|
|
14
13
|
publishable: false,
|
|
15
14
|
simpleName: false,
|
|
16
15
|
skipFormat: false,
|
|
@@ -22,13 +21,12 @@ async function normalizeOptions(host, schema) {
|
|
|
22
21
|
skipModule: schema.skipModule || schema.standalone,
|
|
23
22
|
...schema,
|
|
24
23
|
};
|
|
24
|
+
await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'library');
|
|
25
25
|
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
26
26
|
name: options.name,
|
|
27
27
|
projectType: 'library',
|
|
28
28
|
directory: options.directory,
|
|
29
29
|
importPath: options.importPath,
|
|
30
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
31
|
-
callingGenerator: '@nx/angular:library',
|
|
32
30
|
});
|
|
33
31
|
const fileName = options.simpleName
|
|
34
32
|
? projectNames.projectSimpleName
|
|
@@ -41,7 +39,7 @@ async function normalizeOptions(host, schema) {
|
|
|
41
39
|
const ngCliSchematicLibRoot = projectName;
|
|
42
40
|
const allNormalizedOptions = {
|
|
43
41
|
...options,
|
|
44
|
-
linter: options.linter ??
|
|
42
|
+
linter: options.linter ?? 'eslint',
|
|
45
43
|
unitTestRunner: options.unitTestRunner ?? test_runners_1.UnitTestRunner.Jest,
|
|
46
44
|
prefix: options.prefix ?? 'lib',
|
|
47
45
|
name: projectName,
|
|
@@ -53,6 +51,7 @@ async function normalizeOptions(host, schema) {
|
|
|
53
51
|
fileName,
|
|
54
52
|
importPath,
|
|
55
53
|
ngCliSchematicLibRoot,
|
|
54
|
+
skipTests: options.unitTestRunner === 'none' ? true : options.skipTests,
|
|
56
55
|
standaloneComponentName: `${(0, devkit_1.names)(projectNames.projectSimpleName).className}Component`,
|
|
57
56
|
};
|
|
58
57
|
const { displayBlock, inlineStyle, inlineTemplate, viewEncapsulation, changeDetection, style, skipTests, selector, skipSelector, flat, ...libraryOptions } = allNormalizedOptions;
|
|
@@ -2,17 +2,16 @@ import { UnitTestRunner } from '../../../utils/test-runners';
|
|
|
2
2
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
3
3
|
export interface NormalizedSchema {
|
|
4
4
|
libraryOptions: {
|
|
5
|
-
|
|
5
|
+
directory: string;
|
|
6
|
+
name?: string;
|
|
6
7
|
addTailwind?: boolean;
|
|
7
8
|
skipFormat?: boolean;
|
|
8
9
|
simpleName?: boolean;
|
|
9
10
|
addModuleSpec?: boolean;
|
|
10
|
-
directory?: string;
|
|
11
11
|
sourceDir?: string;
|
|
12
12
|
buildable?: boolean;
|
|
13
13
|
publishable?: boolean;
|
|
14
14
|
importPath?: string;
|
|
15
|
-
standaloneConfig?: boolean;
|
|
16
15
|
spec?: boolean;
|
|
17
16
|
commonModule?: boolean;
|
|
18
17
|
routing?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function libraryGenerator(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
|
-
export declare function libraryGeneratorInternal(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
5
4
|
export default libraryGenerator;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.libraryGenerator = libraryGenerator;
|
|
4
|
-
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
5
4
|
const tslib_1 = require("tslib");
|
|
6
5
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const eslint_1 = require("@nx/eslint");
|
|
8
6
|
const js_1 = require("@nx/js");
|
|
9
7
|
const init_1 = tslib_1.__importDefault(require("../../generators/init/init"));
|
|
10
8
|
const add_linting_1 = tslib_1.__importDefault(require("../add-linting/add-linting"));
|
|
@@ -23,15 +21,12 @@ const add_jest_1 = require("../utils/add-jest");
|
|
|
23
21
|
const set_generator_defaults_1 = require("./lib/set-generator-defaults");
|
|
24
22
|
const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
|
|
25
23
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
24
|
+
const test_runners_1 = require("../../utils/test-runners");
|
|
25
|
+
const add_vitest_1 = require("../utils/add-vitest");
|
|
26
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
27
|
+
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
26
28
|
async function libraryGenerator(tree, schema) {
|
|
27
|
-
|
|
28
|
-
// provide a default projectNameAndRootFormat to avoid breaking changes
|
|
29
|
-
// to external generators invoking this one
|
|
30
|
-
projectNameAndRootFormat: 'derived',
|
|
31
|
-
...schema,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
async function libraryGeneratorInternal(tree, schema) {
|
|
29
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'library');
|
|
35
30
|
// Do some validation checks
|
|
36
31
|
if (!schema.routing && schema.lazy) {
|
|
37
32
|
throw new Error(`To use "--lazy" option, "--routing" must also be set.`);
|
|
@@ -54,7 +49,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
54
49
|
if (!libraryOptions.skipPackageJson) {
|
|
55
50
|
(0, ensure_angular_dependencies_1.ensureAngularDependencies)(tree);
|
|
56
51
|
}
|
|
57
|
-
const project = (0, add_project_1.addProject)(tree, libraryOptions);
|
|
52
|
+
const project = await (0, add_project_1.addProject)(tree, libraryOptions);
|
|
58
53
|
(0, create_files_1.createFiles)(tree, options, project);
|
|
59
54
|
(0, update_tsconfig_1.updateTsConfig)(tree, libraryOptions);
|
|
60
55
|
await addUnitTestRunner(tree, libraryOptions);
|
|
@@ -81,6 +76,9 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
81
76
|
'ng-packagr': pkgVersions.ngPackagrVersion,
|
|
82
77
|
}, undefined, true);
|
|
83
78
|
(0, dependencies_1.addBuildableLibrariesPostCssDependencies)(tree);
|
|
79
|
+
if (libraryOptions.publishable) {
|
|
80
|
+
await (0, add_release_config_1.releaseTasks)(tree);
|
|
81
|
+
}
|
|
84
82
|
}
|
|
85
83
|
(0, js_1.addTsConfigPath)(tree, libraryOptions.importPath, [
|
|
86
84
|
(0, devkit_1.joinPathFragments)(libraryOptions.projectRoot, './src', 'index.ts'),
|
|
@@ -94,13 +92,23 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
94
92
|
};
|
|
95
93
|
}
|
|
96
94
|
async function addUnitTestRunner(host, options) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
switch (options.unitTestRunner) {
|
|
96
|
+
case test_runners_1.UnitTestRunner.Jest:
|
|
97
|
+
await (0, add_jest_1.addJest)(host, {
|
|
98
|
+
name: options.name,
|
|
99
|
+
projectRoot: options.projectRoot,
|
|
100
|
+
skipPackageJson: options.skipPackageJson,
|
|
101
|
+
strict: options.strict,
|
|
102
|
+
});
|
|
103
|
+
break;
|
|
104
|
+
case test_runners_1.UnitTestRunner.Vitest:
|
|
105
|
+
await (0, add_vitest_1.addVitest)(host, {
|
|
106
|
+
name: options.name,
|
|
107
|
+
projectRoot: options.projectRoot,
|
|
108
|
+
skipPackageJson: options.skipPackageJson,
|
|
109
|
+
strict: options.strict,
|
|
110
|
+
});
|
|
111
|
+
break;
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
function updateNpmScopeIfBuildableOrPublishable(host, options) {
|
|
@@ -117,7 +125,7 @@ function setStrictMode(host, options) {
|
|
|
117
125
|
}
|
|
118
126
|
}
|
|
119
127
|
async function addLinting(host, options) {
|
|
120
|
-
if (options.linter ===
|
|
128
|
+
if (options.linter === 'none') {
|
|
121
129
|
return;
|
|
122
130
|
}
|
|
123
131
|
await (0, add_linting_1.default)(host, {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
3
2
|
import type { UnitTestRunner } from '../../utils/test-runners';
|
|
4
3
|
|
|
5
4
|
export interface Schema {
|
|
6
|
-
|
|
5
|
+
directory: string;
|
|
6
|
+
name?: string;
|
|
7
7
|
addTailwind?: boolean;
|
|
8
8
|
skipFormat?: boolean;
|
|
9
9
|
simpleName?: boolean;
|
|
10
10
|
addModuleSpec?: boolean;
|
|
11
|
-
directory?: string;
|
|
12
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
13
11
|
sourceDir?: string;
|
|
14
12
|
buildable?: boolean;
|
|
15
13
|
publishable?: boolean;
|
|
16
14
|
importPath?: string;
|
|
17
|
-
standaloneConfig?: boolean;
|
|
18
15
|
spec?: boolean;
|
|
19
16
|
flat?: boolean;
|
|
20
17
|
commonModule?: boolean;
|
|
@@ -9,22 +9,16 @@
|
|
|
9
9
|
"name": {
|
|
10
10
|
"type": "string",
|
|
11
11
|
"description": "The name of the library.",
|
|
12
|
-
"
|
|
13
|
-
"$source": "argv",
|
|
14
|
-
"index": 0
|
|
15
|
-
},
|
|
16
|
-
"x-prompt": "What name would you like to use for the library?",
|
|
17
|
-
"pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
|
|
12
|
+
"x-priority": "important"
|
|
18
13
|
},
|
|
19
14
|
"directory": {
|
|
20
15
|
"type": "string",
|
|
21
16
|
"description": "A directory where the library is placed.",
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"enum": ["as-provided", "derived"]
|
|
17
|
+
"$default": {
|
|
18
|
+
"$source": "argv",
|
|
19
|
+
"index": 0
|
|
20
|
+
},
|
|
21
|
+
"x-prompt": "Which directory do you want to create the library in?"
|
|
28
22
|
},
|
|
29
23
|
"publishable": {
|
|
30
24
|
"type": "boolean",
|
|
@@ -94,8 +88,9 @@
|
|
|
94
88
|
},
|
|
95
89
|
"unitTestRunner": {
|
|
96
90
|
"type": "string",
|
|
97
|
-
"enum": ["jest", "none"],
|
|
91
|
+
"enum": ["jest", "vitest", "none"],
|
|
98
92
|
"description": "Test runner to use for unit tests.",
|
|
93
|
+
"x-prompt": "Which unit test runner would you like to use?",
|
|
99
94
|
"default": "jest"
|
|
100
95
|
},
|
|
101
96
|
"importPath": {
|
|
@@ -113,12 +108,6 @@
|
|
|
113
108
|
"enum": ["eslint", "none"],
|
|
114
109
|
"default": "eslint"
|
|
115
110
|
},
|
|
116
|
-
"standaloneConfig": {
|
|
117
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
118
|
-
"type": "boolean",
|
|
119
|
-
"default": true,
|
|
120
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
|
121
|
-
},
|
|
122
111
|
"compilationMode": {
|
|
123
112
|
"description": "Specifies the compilation mode to use. If not specified, it will default to `partial` for publishable libraries and to `full` for buildable libraries. The `full` value can not be used for publishable libraries.",
|
|
124
113
|
"type": "string",
|
|
@@ -203,6 +192,6 @@
|
|
|
203
192
|
}
|
|
204
193
|
},
|
|
205
194
|
"additionalProperties": false,
|
|
206
|
-
"required": ["
|
|
195
|
+
"required": ["directory"],
|
|
207
196
|
"examplesFile": "../../../docs/library-examples.md"
|
|
208
197
|
}
|
|
@@ -5,6 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const libraryExecutors = [
|
|
7
7
|
'@angular-devkit/build-angular:ng-packagr',
|
|
8
|
+
'@angular/build:ng-packagr',
|
|
8
9
|
'@nx/angular:ng-packagr-lite',
|
|
9
10
|
'@nx/angular:package',
|
|
10
11
|
// TODO(v17): remove when @nrwl/* scope is removed
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
2
|
import type { Schema } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use the `@nx/workspace:move` generator instead. It will be removed in Nx v22.
|
|
5
|
+
*/
|
|
3
6
|
export declare function angularMoveGenerator(tree: Tree, schema: Schema): Promise<void>;
|
|
4
|
-
export declare function angularMoveGeneratorInternal(tree: Tree, schema: Schema): Promise<void>;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.angularMoveGenerator = angularMoveGenerator;
|
|
4
|
-
exports.angularMoveGeneratorInternal = angularMoveGeneratorInternal;
|
|
5
4
|
const move_1 = require("@nx/workspace/src/generators/move/move");
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use the `@nx/workspace:move` generator instead. It will be removed in Nx v22.
|
|
7
|
+
*/
|
|
6
8
|
async function angularMoveGenerator(tree, schema) {
|
|
7
|
-
await angularMoveGeneratorInternal(tree, {
|
|
8
|
-
projectNameAndRootFormat: 'derived',
|
|
9
|
-
...schema,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async function angularMoveGeneratorInternal(tree, schema) {
|
|
13
9
|
process.env.NX_ANGULAR_MOVE_INVOKED = 'true';
|
|
14
|
-
await (0, move_1.
|
|
10
|
+
await (0, move_1.moveGenerator)(tree, schema);
|
|
15
11
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
|
-
|
|
3
1
|
export interface Schema {
|
|
4
2
|
projectName: string;
|
|
5
3
|
destination: string;
|
|
@@ -7,5 +5,4 @@ export interface Schema {
|
|
|
7
5
|
importPath?: string;
|
|
8
6
|
skipFormat?: boolean;
|
|
9
7
|
newProjectName?: string;
|
|
10
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
11
8
|
}
|
|
@@ -35,11 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"x-priority": "important"
|
|
37
37
|
},
|
|
38
|
-
"projectNameAndRootFormat": {
|
|
39
|
-
"description": "Whether to generate the new project name and destination as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
40
|
-
"type": "string",
|
|
41
|
-
"enum": ["as-provided", "derived"]
|
|
42
|
-
},
|
|
43
38
|
"importPath": {
|
|
44
39
|
"type": "string",
|
|
45
40
|
"description": "The new import path to use in the `tsconfig.base.json`."
|
|
@@ -7,7 +7,7 @@ const path_1 = require("path");
|
|
|
7
7
|
const builder_migrator_1 = require("./builder.migrator");
|
|
8
8
|
class AngularDevkitKarmaMigrator extends builder_migrator_1.BuilderMigrator {
|
|
9
9
|
constructor(tree, project, projectConfig, logger) {
|
|
10
|
-
super(tree, '@angular-devkit/build-angular:karma', 'karma', project, projectConfig, logger);
|
|
10
|
+
super(tree, ['@angular-devkit/build-angular:karma'], 'karma', project, projectConfig, logger);
|
|
11
11
|
}
|
|
12
12
|
migrate() {
|
|
13
13
|
if (this.skipMigration) {
|
|
@@ -8,15 +8,16 @@ const dependencies_1 = require("../../../utils/dependencies");
|
|
|
8
8
|
const builder_migrator_1 = require("./builder.migrator");
|
|
9
9
|
class AngularDevkitNgPackagrMigrator extends builder_migrator_1.BuilderMigrator {
|
|
10
10
|
constructor(tree, project, projectConfig, logger) {
|
|
11
|
-
super(tree, '@angular-devkit/build-angular:ng-packagr', undefined, project, projectConfig, logger);
|
|
11
|
+
super(tree, ['@angular-devkit/build-angular:ng-packagr', '@angular/build:ng-packagr'], undefined, project, projectConfig, logger);
|
|
12
12
|
}
|
|
13
13
|
migrate() {
|
|
14
14
|
if (this.skipMigration) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
if (!this.targets.size) {
|
|
18
|
-
this.logger.warn(`There is no target in the project configuration using the ${this.
|
|
19
|
-
|
|
18
|
+
this.logger.warn(`There is no target in the project configuration using the ${this.possibleBuilderNames
|
|
19
|
+
.map((b) => `"${b}"`)
|
|
20
|
+
.join(', ')} builder${this.possibleBuilderNames.length > 1 ? 's' : ''}. This might not be an issue. Skipping updating the build configuration.`);
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
for (const [name, target] of this.targets) {
|
|
@@ -7,7 +7,7 @@ const path_1 = require("path");
|
|
|
7
7
|
const builder_migrator_1 = require("./builder.migrator");
|
|
8
8
|
class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
|
|
9
9
|
constructor(tree, project, projectConfig, logger) {
|
|
10
|
-
super(tree, '@angular-eslint/builder:lint', 'eslint', project, projectConfig, logger);
|
|
10
|
+
super(tree, ['@angular-eslint/builder:lint'], 'eslint', project, projectConfig, logger);
|
|
11
11
|
}
|
|
12
12
|
migrate() {
|
|
13
13
|
if (this.skipMigration) {
|
|
@@ -2,11 +2,11 @@ import type { ProjectConfiguration, TargetConfiguration, Tree } from '@nx/devkit
|
|
|
2
2
|
import type { Logger, ProjectMigrationInfo, ValidationResult, WorkspaceRootFileType } from '../../utilities';
|
|
3
3
|
import { Migrator } from '../migrator';
|
|
4
4
|
export declare abstract class BuilderMigrator extends Migrator {
|
|
5
|
-
readonly
|
|
5
|
+
readonly possibleBuilderNames: string[];
|
|
6
6
|
readonly rootFileType: WorkspaceRootFileType | undefined;
|
|
7
7
|
targets: Map<string, TargetConfiguration>;
|
|
8
8
|
protected skipMigration: boolean;
|
|
9
|
-
constructor(tree: Tree,
|
|
9
|
+
constructor(tree: Tree, possibleBuilderNames: string[], rootFileType: WorkspaceRootFileType | undefined, project: ProjectMigrationInfo, projectConfig: ProjectConfiguration, logger: Logger);
|
|
10
10
|
validate(): ValidationResult;
|
|
11
11
|
isBuilderUsed(): boolean;
|
|
12
12
|
protected collectBuilderTargets(): void;
|