@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
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { withModuleFederation, withModuleFederationForSSR } from '@nx/module-federation/angular';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Update the import path to `@nx/module-federation/angular` instead. This import path will be removed in Nx v22.
|
|
4
|
+
*/
|
|
5
|
+
export { withModuleFederation, withModuleFederationForSSR };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return with_module_federation_ssr_1.withModuleFederationForSSR; } });
|
|
4
|
+
const angular_1 = require("@nx/module-federation/angular");
|
|
5
|
+
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return angular_1.withModuleFederation; } });
|
|
6
|
+
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return angular_1.withModuleFederationForSSR; } });
|
package/ng-package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-31313-387cdca",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -33,27 +33,16 @@
|
|
|
33
33
|
"./src/builders/*.impl": "./src/builders/*.impl.js",
|
|
34
34
|
"./src/executors/*/schema.json": "./src/executors/*/schema.json",
|
|
35
35
|
"./src/executors/*.impl": "./src/executors/*.impl.js",
|
|
36
|
-
"./src/executors/*/compat": "./src/executors/*/compat.js",
|
|
37
36
|
"./package.json": {
|
|
38
37
|
"default": "./package.json"
|
|
39
38
|
},
|
|
40
39
|
".": {
|
|
41
40
|
"types": "./index.d.ts",
|
|
42
|
-
"esm2022": "./esm2022/nx-angular.mjs",
|
|
43
|
-
"esm": "./esm2022/nx-angular.mjs",
|
|
44
41
|
"default": "./fesm2022/nx-angular.mjs"
|
|
45
42
|
},
|
|
46
43
|
"./mf": {
|
|
47
44
|
"types": "./mf/index.d.ts",
|
|
48
|
-
"esm2022": "./esm2022/mf/nx-angular-mf.mjs",
|
|
49
|
-
"esm": "./esm2022/mf/nx-angular-mf.mjs",
|
|
50
45
|
"default": "./fesm2022/nx-angular-mf.mjs"
|
|
51
|
-
},
|
|
52
|
-
"./testing": {
|
|
53
|
-
"types": "./testing/index.d.ts",
|
|
54
|
-
"esm2022": "./esm2022/testing/nx-angular-testing.mjs",
|
|
55
|
-
"esm": "./esm2022/testing/nx-angular-testing.mjs",
|
|
56
|
-
"default": "./fesm2022/nx-angular-testing.mjs"
|
|
57
46
|
}
|
|
58
47
|
},
|
|
59
48
|
"author": "Victor Savkin",
|
|
@@ -71,29 +60,28 @@
|
|
|
71
60
|
"dependencies": {
|
|
72
61
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
73
62
|
"@typescript-eslint/type-utils": "^8.0.0",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
63
|
+
"enquirer": "~2.3.6",
|
|
64
|
+
"picocolors": "^1.1.0",
|
|
65
|
+
"picomatch": "4.0.2",
|
|
76
66
|
"magic-string": "~0.30.2",
|
|
77
|
-
"minimatch": "9.0.3",
|
|
78
67
|
"semver": "^7.5.3",
|
|
79
68
|
"tslib": "^2.3.0",
|
|
80
69
|
"webpack-merge": "^5.8.0",
|
|
81
|
-
"
|
|
82
|
-
"@
|
|
83
|
-
"@nx/
|
|
84
|
-
"@nx/
|
|
85
|
-
"@nx/
|
|
86
|
-
"@nx/
|
|
87
|
-
"@nx/web": "0.0.0-pr-
|
|
88
|
-
"@nx/workspace": "0.0.0-pr-
|
|
89
|
-
"piscina": "^4.4.0"
|
|
90
|
-
"@nrwl/angular": "0.0.0-pr-31222-862e973"
|
|
70
|
+
"@nx/devkit": "0.0.0-pr-31313-387cdca",
|
|
71
|
+
"@nx/js": "0.0.0-pr-31313-387cdca",
|
|
72
|
+
"@nx/eslint": "0.0.0-pr-31313-387cdca",
|
|
73
|
+
"@nx/webpack": "0.0.0-pr-31313-387cdca",
|
|
74
|
+
"@nx/rspack": "0.0.0-pr-31313-387cdca",
|
|
75
|
+
"@nx/module-federation": "0.0.0-pr-31313-387cdca",
|
|
76
|
+
"@nx/web": "0.0.0-pr-31313-387cdca",
|
|
77
|
+
"@nx/workspace": "0.0.0-pr-31313-387cdca",
|
|
78
|
+
"piscina": "^4.4.0"
|
|
91
79
|
},
|
|
92
80
|
"peerDependencies": {
|
|
93
|
-
"@angular-devkit/build-angular": ">=
|
|
94
|
-
"@angular-devkit/core": ">=
|
|
95
|
-
"@angular-devkit/schematics": ">=
|
|
96
|
-
"@schematics/angular": ">=
|
|
81
|
+
"@angular-devkit/build-angular": ">= 17.0.0 < 20.0.0",
|
|
82
|
+
"@angular-devkit/core": ">= 17.0.0 < 20.0.0",
|
|
83
|
+
"@angular-devkit/schematics": ">= 17.0.0 < 20.0.0",
|
|
84
|
+
"@schematics/angular": ">= 17.0.0 < 20.0.0",
|
|
97
85
|
"rxjs": "^6.5.3 || ^7.5.0"
|
|
98
86
|
},
|
|
99
87
|
"publishConfig": {
|
|
@@ -16,15 +16,19 @@ const patch_builder_context_1 = require("../../executors/utilities/patch-builder
|
|
|
16
16
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
17
17
|
const webpack_1 = require("../utilities/webpack");
|
|
18
18
|
const lib_1 = require("./lib");
|
|
19
|
+
const configuration_1 = require("nx/src/config/configuration");
|
|
19
20
|
function executeDevServerBuilder(rawOptions, context) {
|
|
20
21
|
(0, lib_1.validateOptions)(rawOptions);
|
|
21
22
|
process.env.NX_TSCONFIG_PATH = (0, js_1.getRootTsConfigPath)();
|
|
22
23
|
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
24
|
+
const projectGraph = (0, devkit_1.readCachedProjectGraph)();
|
|
23
25
|
const parsedBuildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, {
|
|
24
26
|
cwd: context.currentDirectory,
|
|
25
|
-
projectGraph
|
|
27
|
+
projectGraph,
|
|
26
28
|
projectName: context.target.project,
|
|
29
|
+
projectsConfigurations: (0, devkit_1.readProjectsConfigurationFromProjectGraph)(projectGraph),
|
|
27
30
|
root: context.workspaceRoot,
|
|
31
|
+
nxJsonConfiguration: (0, configuration_1.readNxJson)(devkit_1.workspaceRoot),
|
|
28
32
|
isVerbose: false,
|
|
29
33
|
});
|
|
30
34
|
const browserTargetProjectConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(parsedBuildTarget.project);
|
|
@@ -114,9 +118,7 @@ function executeDevServerBuilder(rawOptions, context) {
|
|
|
114
118
|
// run the target for all projects.
|
|
115
119
|
// This will occur when workspaceDependencies = []
|
|
116
120
|
if (workspaceDependencies.length > 0) {
|
|
117
|
-
baseWebpackConfig.plugins.push(
|
|
118
|
-
// @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
|
|
119
|
-
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
|
|
121
|
+
baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
if (!pathToWebpackConfig) {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
const angular_version_utils_1 = require("../../../executors/utilities/angular-version-utils");
|
|
4
5
|
function normalizeOptions(schema) {
|
|
5
6
|
let buildTarget = schema.buildTarget;
|
|
6
7
|
if (schema.browserTarget) {
|
|
7
8
|
buildTarget ??= schema.browserTarget;
|
|
8
9
|
delete schema.browserTarget;
|
|
9
10
|
}
|
|
11
|
+
const { major: angularMajorVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
10
12
|
return {
|
|
11
13
|
...schema,
|
|
12
14
|
buildTarget,
|
|
13
15
|
host: schema.host ?? 'localhost',
|
|
14
16
|
port: schema.port ?? 4200,
|
|
15
17
|
liveReload: schema.liveReload ?? true,
|
|
18
|
+
hmr: schema.hmr ?? (angularMajorVersion < 19 ? false : undefined),
|
|
16
19
|
open: schema.open ?? false,
|
|
17
20
|
ssl: schema.ssl ?? false,
|
|
18
21
|
watchDependencies: schema.watchDependencies ?? true,
|
|
@@ -5,15 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const semver_1 = require("semver");
|
|
6
6
|
const angular_version_utils_1 = require("../../../executors/utilities/angular-version-utils");
|
|
7
7
|
function validateOptions(options) {
|
|
8
|
-
const {
|
|
9
|
-
if ((0, semver_1.lt)(angularVersion, '16.1.0') && options.forceEsbuild) {
|
|
10
|
-
throw new Error((0, devkit_1.stripIndents) `The "forceEsbuild" option is only supported in Angular >= 16.1.0. You are currently using "${angularVersion}".
|
|
11
|
-
You can resolve this error by removing the "forceEsbuild" option or by migrating to Angular 16.1.0.`);
|
|
12
|
-
}
|
|
13
|
-
if (angularMajorVersion < 17 && options.esbuildMiddleware?.length > 0) {
|
|
14
|
-
throw new Error((0, devkit_1.stripIndents) `The "esbuildMiddleware" option is only supported in Angular >= 17.0.0. You are currently using "${angularVersion}".
|
|
15
|
-
You can resolve this error by removing the "esbuildMiddleware" option or by migrating to Angular 17.0.0.`);
|
|
16
|
-
}
|
|
8
|
+
const { version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
17
9
|
if ((0, semver_1.lt)(angularVersion, '17.2.0') && options.prebundle) {
|
|
18
10
|
throw new Error((0, devkit_1.stripIndents) `The "prebundle" option is only supported in Angular >= 17.2.0. You are currently using "${angularVersion}".
|
|
19
11
|
You can resolve this error by removing the "prebundle" option or by migrating to Angular 17.2.0.`);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 2,
|
|
3
|
+
"continuous": true,
|
|
3
4
|
"outputCapture": "direct-nodejs",
|
|
4
5
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
5
6
|
"title": "Schema for Webpack Dev Server",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"type": "string",
|
|
18
19
|
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.",
|
|
19
20
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
|
|
20
|
-
"x-deprecated": "Use 'buildTarget' instead. It will be removed
|
|
21
|
+
"x-deprecated": "Use 'buildTarget' instead. It will be removed when Angular v20 is released."
|
|
21
22
|
},
|
|
22
23
|
"buildTarget": {
|
|
23
24
|
"type": "string",
|
|
@@ -78,11 +79,11 @@
|
|
|
78
79
|
},
|
|
79
80
|
"publicHost": {
|
|
80
81
|
"type": "string",
|
|
81
|
-
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
|
|
82
|
+
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders."
|
|
82
83
|
},
|
|
83
84
|
"allowedHosts": {
|
|
84
85
|
"type": "array",
|
|
85
|
-
"description": "List of hosts that are allowed to access the dev server.",
|
|
86
|
+
"description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
|
|
86
87
|
"default": [],
|
|
87
88
|
"items": {
|
|
88
89
|
"type": "string"
|
|
@@ -94,13 +95,12 @@
|
|
|
94
95
|
},
|
|
95
96
|
"disableHostCheck": {
|
|
96
97
|
"type": "boolean",
|
|
97
|
-
"description": "Don't verify connected clients are part of allowed hosts.",
|
|
98
|
+
"description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
|
|
98
99
|
"default": false
|
|
99
100
|
},
|
|
100
101
|
"hmr": {
|
|
101
102
|
"type": "boolean",
|
|
102
|
-
"description": "Enable hot module replacement."
|
|
103
|
-
"default": false
|
|
103
|
+
"description": "Enable hot module replacement. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
|
|
104
104
|
},
|
|
105
105
|
"watch": {
|
|
106
106
|
"type": "boolean",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
"forceEsbuild": {
|
|
115
115
|
"type": "boolean",
|
|
116
|
-
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.
|
|
116
|
+
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
|
|
117
117
|
"default": false
|
|
118
118
|
},
|
|
119
119
|
"inspect": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"x-priority": "important"
|
|
152
152
|
},
|
|
153
153
|
"esbuildMiddleware": {
|
|
154
|
-
"description": "A list of HTTP request middleware functions.
|
|
154
|
+
"description": "A list of HTTP request middleware functions.",
|
|
155
155
|
"type": "array",
|
|
156
156
|
"items": {
|
|
157
157
|
"type": "string",
|
|
@@ -7,9 +7,4 @@ export type BrowserBuilderSchema = Schema & {
|
|
|
7
7
|
indexHtmlTransformer?: string;
|
|
8
8
|
buildLibsFromSource?: boolean;
|
|
9
9
|
watchDependencies?: boolean;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 21.
|
|
13
|
-
*/
|
|
14
|
-
indexFileTransformer?: string;
|
|
15
10
|
};
|
|
@@ -154,7 +154,6 @@
|
|
|
154
154
|
},
|
|
155
155
|
"optimization": {
|
|
156
156
|
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
157
|
-
"x-user-analytics": 16,
|
|
158
157
|
"default": true,
|
|
159
158
|
"oneOf": [
|
|
160
159
|
{
|
|
@@ -238,7 +237,6 @@
|
|
|
238
237
|
"aot": {
|
|
239
238
|
"type": "boolean",
|
|
240
239
|
"description": "Build using Ahead of Time compilation.",
|
|
241
|
-
"x-user-analytics": 13,
|
|
242
240
|
"default": true
|
|
243
241
|
},
|
|
244
242
|
"sourceMap": {
|
|
@@ -26,7 +26,7 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
|
|
26
26
|
function executeWebpackBrowserBuilder(options, context) {
|
|
27
27
|
options.buildLibsFromSource ??= true;
|
|
28
28
|
options.watchDependencies ??= true;
|
|
29
|
-
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer,
|
|
29
|
+
const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, watchDependencies, ...delegateBuilderOptions } = options;
|
|
30
30
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
|
|
31
31
|
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
|
32
32
|
const pathToWebpackConfig = customWebpackConfig?.path &&
|
|
@@ -34,9 +34,8 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
|
34
34
|
if (pathToWebpackConfig && !(0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
35
35
|
throw new Error(`Custom Webpack Config File Not Found!\nTo use a custom webpack config, please ensure the path to the custom webpack file is correct: \n${pathToWebpackConfig}`);
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
(0, devkit_1.joinPathFragments)(context.workspaceRoot, normalizedIndexHtmlTransformer);
|
|
37
|
+
const pathToIndexFileTransformer = indexHtmlTransformer &&
|
|
38
|
+
(0, devkit_1.joinPathFragments)(context.workspaceRoot, indexHtmlTransformer);
|
|
40
39
|
if (pathToIndexFileTransformer && !(0, fs_1.existsSync)(pathToIndexFileTransformer)) {
|
|
41
40
|
throw new Error(`File containing Index File Transformer function Not Found!\n Please ensure the path to the file containing the function is correct: \n${pathToIndexFileTransformer}`);
|
|
42
41
|
}
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"optimization": {
|
|
48
48
|
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
49
49
|
"default": true,
|
|
50
|
-
"x-user-analytics": "ep.ng_optimization",
|
|
51
50
|
"oneOf": [
|
|
52
51
|
{
|
|
53
52
|
"type": "object",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import type { buildApplication as buildApplicationFn } from '@angular-devkit/build-angular';
|
|
1
2
|
import type { ExecutorContext } from '@nx/devkit';
|
|
2
3
|
import type { ApplicationExecutorOptions } from './schema';
|
|
3
|
-
import type { buildApplication as buildApplicationFn } from '@angular-devkit/build-angular';
|
|
4
4
|
export default function applicationExecutor(options: ApplicationExecutorOptions, context: ExecutorContext): ReturnType<typeof buildApplicationFn>;
|
|
@@ -6,9 +6,11 @@ const semver_1 = require("semver");
|
|
|
6
6
|
const angular_version_utils_1 = require("../utilities/angular-version-utils");
|
|
7
7
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
8
8
|
const esbuild_extensions_1 = require("../utilities/esbuild-extensions");
|
|
9
|
+
const normalize_options_1 = require("./utils/normalize-options");
|
|
9
10
|
const validate_options_1 = require("./utils/validate-options");
|
|
10
11
|
async function* applicationExecutor(options, context) {
|
|
11
12
|
(0, validate_options_1.validateOptions)(options);
|
|
13
|
+
options = (0, normalize_options_1.normalizeOptions)(options);
|
|
12
14
|
const { buildLibsFromSource = true, plugins: pluginPaths, indexHtmlTransformer: indexHtmlTransformerPath, ...delegateExecutorOptions } = options;
|
|
13
15
|
let dependencies;
|
|
14
16
|
if (!buildLibsFromSource) {
|
|
@@ -20,7 +22,6 @@ async function* applicationExecutor(options, context) {
|
|
|
20
22
|
const indexHtmlTransformer = indexHtmlTransformerPath
|
|
21
23
|
? await (0, esbuild_extensions_1.loadIndexHtmlTransformer)(indexHtmlTransformerPath, options.tsConfig)
|
|
22
24
|
: undefined;
|
|
23
|
-
const { buildApplication } = await import('@angular-devkit/build-angular');
|
|
24
25
|
const builderContext = await (0, ngcli_adapter_1.createBuilderContext)({
|
|
25
26
|
builderName: 'application',
|
|
26
27
|
description: 'Build an application.',
|
|
@@ -28,10 +29,12 @@ async function* applicationExecutor(options, context) {
|
|
|
28
29
|
}, context);
|
|
29
30
|
const { version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
30
31
|
if ((0, semver_1.gte)(angularVersion, '17.1.0')) {
|
|
32
|
+
const { buildApplication } = await import('@angular-devkit/build-angular');
|
|
31
33
|
return yield* buildApplication(delegateExecutorOptions, builderContext, {
|
|
32
34
|
codePlugins: plugins,
|
|
33
35
|
indexHtmlTransformer,
|
|
34
36
|
});
|
|
35
37
|
}
|
|
38
|
+
const { buildApplication } = require('@angular-devkit/build-angular');
|
|
36
39
|
return yield* buildApplication(delegateExecutorOptions, builderContext, plugins);
|
|
37
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
3
|
"title": "Schema for Nx Application Executor",
|
|
4
|
-
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.
|
|
4
|
+
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
|
|
5
5
|
"examplesFile": "../../../docs/application-executor-examples.md",
|
|
6
6
|
"outputCapture": "direct-nodejs",
|
|
7
7
|
"type": "object",
|
|
@@ -20,7 +20,18 @@
|
|
|
20
20
|
},
|
|
21
21
|
"server": {
|
|
22
22
|
"type": "string",
|
|
23
|
-
"description": "The full path for the server entry point to the application, relative to the current workspace."
|
|
23
|
+
"description": "The full path for the server entry point to the application, relative to the current workspace.",
|
|
24
|
+
"oneOf": [
|
|
25
|
+
{
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The full path for the server entry point to the application, relative to the current workspace."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"const": false,
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Indicates that a server entry point is not provided. _Note: this is only supported in Angular versions >= 19.0.0_."
|
|
33
|
+
}
|
|
34
|
+
]
|
|
24
35
|
},
|
|
25
36
|
"polyfills": {
|
|
26
37
|
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
|
|
@@ -39,6 +50,31 @@
|
|
|
39
50
|
"type": "string",
|
|
40
51
|
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations. _Note: this is only supported in Angular versions >= 17.3.0_."
|
|
41
52
|
},
|
|
53
|
+
"security": {
|
|
54
|
+
"description": "Security features to protect against XSS and other common attacks. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"properties": {
|
|
58
|
+
"autoCsp": {
|
|
59
|
+
"description": "Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases. It defaults to `false`.",
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"unsafeEval": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Include the `unsafe-eval` directive (https://web.dev/articles/strict-csp#remove-eval) in the auto-CSP. Please only enable this if you are absolutely sure that you need to, as allowing calls to eval will weaken the XSS defenses provided by the auto-CSP. It default to `false`."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "boolean"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
42
78
|
"scripts": {
|
|
43
79
|
"description": "Global scripts to be included in the build.",
|
|
44
80
|
"type": "array",
|
|
@@ -127,6 +163,34 @@
|
|
|
127
163
|
"type": "string"
|
|
128
164
|
},
|
|
129
165
|
"default": []
|
|
166
|
+
},
|
|
167
|
+
"sass": {
|
|
168
|
+
"description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"properties": {
|
|
171
|
+
"fatalDeprecations": {
|
|
172
|
+
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"silenceDeprecations": {
|
|
179
|
+
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"futureDeprecations": {
|
|
186
|
+
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": false
|
|
130
194
|
}
|
|
131
195
|
},
|
|
132
196
|
"additionalProperties": false
|
|
@@ -147,7 +211,6 @@
|
|
|
147
211
|
"optimization": {
|
|
148
212
|
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
149
213
|
"default": true,
|
|
150
|
-
"x-user-analytics": "ep.ng_optimization",
|
|
151
214
|
"oneOf": [
|
|
152
215
|
{
|
|
153
216
|
"type": "object",
|
|
@@ -277,7 +340,6 @@
|
|
|
277
340
|
"aot": {
|
|
278
341
|
"type": "boolean",
|
|
279
342
|
"description": "Build using Ahead of Time compilation.",
|
|
280
|
-
"x-user-analytics": "ep.ng_aot",
|
|
281
343
|
"default": true
|
|
282
344
|
},
|
|
283
345
|
"sourceMap": {
|
|
@@ -482,8 +544,7 @@
|
|
|
482
544
|
"default": []
|
|
483
545
|
},
|
|
484
546
|
"prerender": {
|
|
485
|
-
"description": "Prerender (SSG) pages of your application during build time.",
|
|
486
|
-
"default": false,
|
|
547
|
+
"description": "Prerender (SSG) pages of your application during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`.",
|
|
487
548
|
"oneOf": [
|
|
488
549
|
{
|
|
489
550
|
"type": "boolean",
|
|
@@ -520,6 +581,11 @@
|
|
|
520
581
|
"entry": {
|
|
521
582
|
"type": "string",
|
|
522
583
|
"description": "The server entry-point that when executed will spawn the web server."
|
|
584
|
+
},
|
|
585
|
+
"experimentalPlatform": {
|
|
586
|
+
"description": "Specifies the platform for which the server bundle is generated. This affects the APIs and modules available in the server-side code. \n\n- `node`: (Default) Generates a bundle optimized for Node.js environments. \n- `neutral`: Generates a platform-neutral bundle suitable for environments like edge workers, and other serverless platforms. This option avoids using Node.js-specific APIs, making the bundle more portable. \n\nPlease note that this feature does not provide polyfills for Node.js modules. Additionally, it is experimental, and the feature may undergo changes in future versions. _Note: this is only supported in Angular versions >= 19.0.0_.",
|
|
587
|
+
"default": "node",
|
|
588
|
+
"enum": ["node", "neutral"]
|
|
523
589
|
}
|
|
524
590
|
},
|
|
525
591
|
"additionalProperties": false
|
|
@@ -528,8 +594,12 @@
|
|
|
528
594
|
},
|
|
529
595
|
"appShell": {
|
|
530
596
|
"type": "boolean",
|
|
531
|
-
"description": "Generates an application shell during build time."
|
|
532
|
-
|
|
597
|
+
"description": "Generates an application shell during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
|
|
598
|
+
},
|
|
599
|
+
"outputMode": {
|
|
600
|
+
"type": "string",
|
|
601
|
+
"description": "Defines the build output target. 'static': Generates a static site for deployment on any static hosting service. 'server': Produces an application designed for deployment on a server that supports server-side rendering (SSR). _Note: this is only supported in Angular versions >= 19.0.0_.",
|
|
602
|
+
"enum": ["static", "server"]
|
|
533
603
|
},
|
|
534
604
|
"buildLibsFromSource": {
|
|
535
605
|
"type": "boolean",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
const angular_version_utils_1 = require("../../utilities/angular-version-utils");
|
|
5
|
+
function normalizeOptions(options) {
|
|
6
|
+
const { major: angularMajorVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
7
|
+
/**
|
|
8
|
+
* We can't set the default values for `security.autoCsp` and
|
|
9
|
+
* `security.autoCsp.unsafeEval` in the schema because our current schema
|
|
10
|
+
* parsing would (incorrectly?) default `security` to an object with the
|
|
11
|
+
* `autoCsp` property set to `false`. This would be problematic because the
|
|
12
|
+
* option is not supported in Angular versions < 19. So, we don't set those
|
|
13
|
+
* defaults in the schema and we normalize them here correctly.
|
|
14
|
+
*/
|
|
15
|
+
let security = options.security;
|
|
16
|
+
if (angularMajorVersion >= 19) {
|
|
17
|
+
if (typeof security === 'object') {
|
|
18
|
+
if (security.autoCsp === undefined) {
|
|
19
|
+
security.autoCsp = false;
|
|
20
|
+
}
|
|
21
|
+
else if (typeof security.autoCsp === 'object' &&
|
|
22
|
+
security.autoCsp.unsafeEval === undefined) {
|
|
23
|
+
security.autoCsp.unsafeEval = false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let appShell = options.appShell;
|
|
28
|
+
let prerender = options.prerender;
|
|
29
|
+
if (angularMajorVersion < 19) {
|
|
30
|
+
appShell ??= false;
|
|
31
|
+
prerender ??= false;
|
|
32
|
+
}
|
|
33
|
+
return { ...options, appShell, prerender, security };
|
|
34
|
+
}
|
|
@@ -4,10 +4,7 @@ exports.validateOptions = validateOptions;
|
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const angular_version_utils_1 = require("../../utilities/angular-version-utils");
|
|
6
6
|
function validateOptions(options) {
|
|
7
|
-
const {
|
|
8
|
-
if (angularMajorVersion < 17) {
|
|
9
|
-
throw new Error(`The "application" executor requires Angular version 17 or greater. You are currently using version ${angularVersion}.`);
|
|
10
|
-
}
|
|
7
|
+
const { version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
11
8
|
if ((0, semver_1.lt)(angularVersion, '17.1.0')) {
|
|
12
9
|
if (options.loader) {
|
|
13
10
|
throw new Error(`The "loader" option requires Angular version 17.1.0 or greater. You are currently using version ${angularVersion}.`);
|
|
@@ -48,4 +45,21 @@ function validateOptions(options) {
|
|
|
48
45
|
throw new Error(`The "deployUrl" option requires Angular version 17.3.0 or greater. You are currently using version ${angularVersion}.`);
|
|
49
46
|
}
|
|
50
47
|
}
|
|
48
|
+
if ((0, semver_1.lt)(angularVersion, '19.0.0')) {
|
|
49
|
+
if (options.outputMode) {
|
|
50
|
+
throw new Error(`The "outputMode" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
51
|
+
}
|
|
52
|
+
if (options.stylePreprocessorOptions?.sass) {
|
|
53
|
+
throw new Error(`The "stylePreprocessorOptions.sass" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
54
|
+
}
|
|
55
|
+
if (typeof options.ssr === 'object' && options.ssr?.experimentalPlatform) {
|
|
56
|
+
throw new Error(`The "ssr.experimentalPlatform" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
57
|
+
}
|
|
58
|
+
if (options.security !== undefined) {
|
|
59
|
+
throw new Error(`The "security" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
60
|
+
}
|
|
61
|
+
if (typeof options.server === 'boolean' && options.server === false) {
|
|
62
|
+
throw new Error(`The "false" value for the "server" option requires Angular version 19.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
51
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { buildEsbuildBrowser as buildEsbuildBrowserFn } from '@angular-devkit/build-angular/src/builders/browser-esbuild';
|
|
2
|
-
import {
|
|
2
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
3
3
|
import type { EsBuildSchema } from './schema';
|
|
4
4
|
export default function esbuildExecutor(options: EsBuildSchema, context: ExecutorContext): ReturnType<typeof buildEsbuildBrowserFn>;
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = esbuildExecutor;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
6
|
-
const angular_version_utils_1 = require("../utilities/angular-version-utils");
|
|
7
5
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
8
6
|
const esbuild_extensions_1 = require("../utilities/esbuild-extensions");
|
|
9
7
|
async function* esbuildExecutor(options, context) {
|
|
10
|
-
if (options.plugins) {
|
|
11
|
-
const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
12
|
-
if (angularMajorVersion < 17) {
|
|
13
|
-
throw new Error((0, devkit_1.stripIndents) `The "plugins" option is only supported in Angular >= 17.0.0. You are currently using "${angularVersion}".
|
|
14
|
-
You can resolve this error by removing the "plugins" option or by migrating to Angular 17.0.0.`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
8
|
options.buildLibsFromSource ??= true;
|
|
18
9
|
const { buildLibsFromSource, plugins: pluginPaths, ...delegateExecutorOptions } = options;
|
|
19
10
|
let dependencies;
|