@nx/angular 0.0.0-pr-22179-271588f
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 +22 -0
- package/README.md +68 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/mf/index.mjs +2 -0
- package/esm2022/mf/mf.mjs +48 -0
- package/esm2022/mf/nx-angular-mf.mjs +5 -0
- package/esm2022/nx-angular.mjs +5 -0
- package/esm2022/src/runtime/nx/data-persistence.mjs +344 -0
- package/esm2022/testing/index.mjs +2 -0
- package/esm2022/testing/nx-angular-testing.mjs +5 -0
- package/esm2022/testing/src/testing-utils.mjs +36 -0
- package/executors.d.ts +16 -0
- package/executors.js +17 -0
- package/executors.json +61 -0
- package/fesm2022/nx-angular-mf.mjs +54 -0
- package/fesm2022/nx-angular-mf.mjs.map +1 -0
- package/fesm2022/nx-angular-testing.mjs +43 -0
- package/fesm2022/nx-angular-testing.mjs.map +1 -0
- package/fesm2022/nx-angular.mjs +351 -0
- package/fesm2022/nx-angular.mjs.map +1 -0
- package/generators.d.ts +30 -0
- package/generators.js +35 -0
- package/generators.json +186 -0
- package/index.d.ts +1 -0
- package/index.js +8 -0
- package/mf/index.d.ts +1 -0
- package/mf/index.js +7 -0
- package/mf/mf.d.ts +4 -0
- package/mf/mf.js +53 -0
- package/mf/ng-package.json +6 -0
- package/migrations.json +1717 -0
- package/module-federation/index.d.ts +2 -0
- package/module-federation/index.js +7 -0
- package/ng-package.json +31 -0
- package/package.json +109 -0
- package/plugins/component-testing.d.ts +20 -0
- package/plugins/component-testing.js +325 -0
- package/src/builders/dev-server/dev-server.impl.d.ts +4 -0
- package/src/builders/dev-server/dev-server.impl.js +160 -0
- package/src/builders/dev-server/lib/index.d.ts +2 -0
- package/src/builders/dev-server/lib/index.js +5 -0
- package/src/builders/dev-server/lib/normalize-options.d.ts +2 -0
- package/src/builders/dev-server/lib/normalize-options.js +20 -0
- package/src/builders/dev-server/lib/validate-options.d.ts +2 -0
- package/src/builders/dev-server/lib/validate-options.js +22 -0
- package/src/builders/dev-server/schema.d.ts +39 -0
- package/src/builders/dev-server/schema.json +153 -0
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.d.ts +4 -0
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +99 -0
- package/src/builders/module-federation-dev-ssr/schema.d.ts +17 -0
- package/src/builders/module-federation-dev-ssr/schema.json +90 -0
- package/src/builders/utilities/buildable-libs.d.ts +9 -0
- package/src/builders/utilities/buildable-libs.js +15 -0
- package/src/builders/utilities/module-federation.d.ts +6 -0
- package/src/builders/utilities/module-federation.js +95 -0
- package/src/builders/utilities/webpack.d.ts +6 -0
- package/src/builders/utilities/webpack.js +45 -0
- package/src/builders/webpack-browser/schema.d.ts +13 -0
- package/src/builders/webpack-browser/schema.json +600 -0
- package/src/builders/webpack-browser/webpack-browser.impl.d.ts +5 -0
- package/src/builders/webpack-browser/webpack-browser.impl.js +79 -0
- package/src/builders/webpack-server/schema.d.ts +8 -0
- package/src/builders/webpack-server/schema.json +321 -0
- package/src/builders/webpack-server/validate-options.d.ts +2 -0
- package/src/builders/webpack-server/validate-options.js +33 -0
- package/src/builders/webpack-server/webpack-server.impl.d.ts +5 -0
- package/src/builders/webpack-server/webpack-server.impl.js +61 -0
- package/src/executors/application/application.impl.d.ts +3 -0
- package/src/executors/application/application.impl.js +37 -0
- package/src/executors/application/schema.d.ts +8 -0
- package/src/executors/application/schema.json +678 -0
- package/src/executors/application/utils/validate-options.d.ts +2 -0
- package/src/executors/application/utils/validate-options.js +47 -0
- package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +9 -0
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +34 -0
- package/src/executors/browser-esbuild/schema.d.ts +7 -0
- package/src/executors/browser-esbuild/schema.json +585 -0
- package/src/executors/delegate-build/delegate-build.impl.d.ts +8 -0
- package/src/executors/delegate-build/delegate-build.impl.js +17 -0
- package/src/executors/delegate-build/schema.d.ts +6 -0
- package/src/executors/delegate-build/schema.json +34 -0
- package/src/executors/extract-i18n/extract-i18n.impl.d.ts +3 -0
- package/src/executors/extract-i18n/extract-i18n.impl.js +43 -0
- package/src/executors/extract-i18n/schema.d.ts +8 -0
- package/src/executors/extract-i18n/schema.json +45 -0
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.d.ts +4 -0
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +48 -0
- package/src/executors/module-federation-dev-server/lib/index.d.ts +5 -0
- package/src/executors/module-federation-dev-server/lib/index.js +8 -0
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +2 -0
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +23 -0
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.d.ts +11 -0
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.js +18 -0
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +9 -0
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +29 -0
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.d.ts +9 -0
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +46 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +4 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +115 -0
- package/src/executors/module-federation-dev-server/schema.d.ts +43 -0
- package/src/executors/module-federation-dev-server/schema.json +165 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.d.ts +3 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +34 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.d.ts +14 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.js +27 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.d.ts +12 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.js +52 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.d.ts +15 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.js +28 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.d.ts +30 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.js +52 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.d.ts +12 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.js +20 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.d.ts +9 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.js +319 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.d.ts +14 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +34 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.d.ts +14 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.js +37 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.d.ts +13 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +178 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.d.ts +42 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.d.ts +10 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.js +17 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +201 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.d.ts +2 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.js +12 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.d.ts +8 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.js +12 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.d.ts +8 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.js +18 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.d.ts +8 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +285 -0
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.d.ts +6 -0
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +20 -0
- package/src/executors/ng-packagr-lite/schema.json +43 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.d.ts +14 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js +26 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.d.ts +12 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +70 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.d.ts +13 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js +32 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.d.ts +14 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +34 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.d.ts +14 -0
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js +37 -0
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.d.ts +3 -0
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +28 -0
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +14 -0
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +183 -0
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +36 -0
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.d.ts +10 -0
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.js +17 -0
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +194 -0
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.d.ts +1 -0
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +10 -0
- package/src/executors/package/package.impl.d.ts +16 -0
- package/src/executors/package/package.impl.js +42 -0
- package/src/executors/package/schema.d.ts +6 -0
- package/src/executors/package/schema.json +45 -0
- package/src/executors/utilities/angular-version-utils.d.ts +6 -0
- package/src/executors/utilities/angular-version-utils.js +19 -0
- package/src/executors/utilities/buildable-libs.d.ts +6 -0
- package/src/executors/utilities/buildable-libs.js +16 -0
- package/src/executors/utilities/esbuild-extensions.d.ts +10 -0
- package/src/executors/utilities/esbuild-extensions.js +50 -0
- package/src/executors/utilities/module-loader.d.ts +15 -0
- package/src/executors/utilities/module-loader.js +52 -0
- package/src/executors/utilities/ng-compiler-cli.d.ts +1 -0
- package/src/executors/utilities/ng-compiler-cli.js +8 -0
- package/src/executors/utilities/ng-packagr/stylesheet-processor.d.ts +27 -0
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +2 -0
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +10 -0
- package/src/executors/utilities/ng-packagr/stylesheet-processor.js +130 -0
- package/src/executors/utilities/ng-packagr/tailwindcss.d.ts +7 -0
- package/src/executors/utilities/ng-packagr/tailwindcss.js +56 -0
- package/src/executors/utilities/patch-builder-context.d.ts +3 -0
- package/src/executors/utilities/patch-builder-context.js +41 -0
- package/src/executors/utilities/typescript.d.ts +13 -0
- package/src/executors/utilities/typescript.js +43 -0
- package/src/generators/add-linting/add-linting.d.ts +4 -0
- package/src/generators/add-linting/add-linting.js +105 -0
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.d.ts +2 -0
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +16 -0
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +81 -0
- package/src/generators/add-linting/lib/create-eslint-configuration.js +121 -0
- package/src/generators/add-linting/schema.d.ts +9 -0
- package/src/generators/add-linting/schema.json +51 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +76 -0
- package/src/generators/application/files/base/src/assets/.gitkeep__tpl__ +0 -0
- package/src/generators/application/files/base/src/favicon.ico +0 -0
- package/src/generators/application/files/base/src/index.html__tpl__ +13 -0
- package/src/generators/application/files/base/src/styles.__style__ +1 -0
- package/src/generators/application/files/base/tsconfig.app.json__tpl__ +10 -0
- package/src/generators/application/files/base/tsconfig.editor.json__tpl__ +5 -0
- package/src/generators/application/files/base/tsconfig.json__tpl__ +18 -0
- package/src/generators/application/files/ng-module/src/app/app.component.__style__ +0 -0
- package/src/generators/application/files/ng-module/src/app/app.component.html__tpl__ +1 -0
- package/src/generators/application/files/ng-module/src/app/app.component.spec.ts__tpl__ +28 -0
- package/src/generators/application/files/ng-module/src/app/app.component.ts__tpl__ +15 -0
- package/src/generators/application/files/ng-module/src/app/app.module.ts__tpl__ +17 -0
- package/src/generators/application/files/ng-module/src/app/app.routes.ts__tpl__ +3 -0
- package/src/generators/application/files/ng-module/src/app/nx-welcome.component.ts__tpl__ +834 -0
- package/src/generators/application/files/ng-module/src/main.ts__tpl__ +6 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.__style__ +0 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.html__tpl__ +1 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.spec.ts__tpl__ +27 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.ts__tpl__ +19 -0
- package/src/generators/application/files/standalone-components/src/app/app.config.ts__tpl__ +7 -0
- package/src/generators/application/files/standalone-components/src/app/app.routes.ts__tpl__ +3 -0
- package/src/generators/application/files/standalone-components/src/app/nx-welcome.component.ts__tpl__ +837 -0
- package/src/generators/application/files/standalone-components/src/main.ts__tpl__ +7 -0
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +77 -0
- package/src/generators/application/lib/add-linting.d.ts +3 -0
- package/src/generators/application/lib/add-linting.js +20 -0
- package/src/generators/application/lib/add-proxy-config.d.ts +3 -0
- package/src/generators/application/lib/add-proxy-config.js +25 -0
- package/src/generators/application/lib/add-unit-test-runner.d.ts +3 -0
- package/src/generators/application/lib/add-unit-test-runner.js +16 -0
- package/src/generators/application/lib/create-files.d.ts +3 -0
- package/src/generators/application/lib/create-files.js +58 -0
- package/src/generators/application/lib/create-project.d.ts +3 -0
- package/src/generators/application/lib/create-project.js +111 -0
- package/src/generators/application/lib/enable-strict-type-checking.d.ts +3 -0
- package/src/generators/application/lib/enable-strict-type-checking.js +36 -0
- package/src/generators/application/lib/index.d.ts +12 -0
- package/src/generators/application/lib/index.js +15 -0
- package/src/generators/application/lib/normalize-options.d.ts +4 -0
- package/src/generators/application/lib/normalize-options.js +56 -0
- package/src/generators/application/lib/normalized-schema.d.ts +15 -0
- package/src/generators/application/lib/normalized-schema.js +2 -0
- package/src/generators/application/lib/set-app-strict-default.d.ts +2 -0
- package/src/generators/application/lib/set-app-strict-default.js +14 -0
- package/src/generators/application/lib/set-generator-defaults.d.ts +3 -0
- package/src/generators/application/lib/set-generator-defaults.js +17 -0
- package/src/generators/application/lib/update-editor-tsconfig.d.ts +3 -0
- package/src/generators/application/lib/update-editor-tsconfig.js +22 -0
- package/src/generators/application/schema.d.ts +34 -0
- package/src/generators/application/schema.json +192 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +57 -0
- package/src/generators/component/files/__fileName__.__style__ +6 -0
- package/src/generators/component/files/__fileName__.html__tpl__ +1 -0
- package/src/generators/component/files/__fileName__.spec.ts__tpl__ +21 -0
- package/src/generators/component/files/__fileName__.ts__tpl__ +27 -0
- package/src/generators/component/lib/component.d.ts +3 -0
- package/src/generators/component/lib/component.js +46 -0
- package/src/generators/component/lib/index.d.ts +4 -0
- package/src/generators/component/lib/index.js +7 -0
- package/src/generators/component/lib/module.d.ts +3 -0
- package/src/generators/component/lib/module.js +63 -0
- package/src/generators/component/lib/normalize-options.d.ts +3 -0
- package/src/generators/component/lib/normalize-options.js +41 -0
- package/src/generators/component/lib/set-generator-defaults.d.ts +3 -0
- package/src/generators/component/lib/set-generator-defaults.js +14 -0
- package/src/generators/component/schema.d.ts +48 -0
- package/src/generators/component/schema.json +138 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +4 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.js +36 -0
- package/src/generators/component-cypress-spec/files/__componentFileName__.__fileExt__ +17 -0
- package/src/generators/component-cypress-spec/lib/get-args-default-value.d.ts +2 -0
- package/src/generators/component-cypress-spec/lib/get-args-default-value.js +25 -0
- package/src/generators/component-cypress-spec/lib/get-component-selector.d.ts +2 -0
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +24 -0
- package/src/generators/component-cypress-spec/schema.d.ts +10 -0
- package/src/generators/component-cypress-spec/schema.json +65 -0
- package/src/generators/component-story/component-story.d.ts +4 -0
- package/src/generators/component-story/component-story.js +28 -0
- package/src/generators/component-story/files/__componentFileName__.stories.ts__tmpl__ +31 -0
- package/src/generators/component-story/schema.d.ts +8 -0
- package/src/generators/component-story/schema.json +53 -0
- package/src/generators/component-test/component-test.d.ts +4 -0
- package/src/generators/component-test/component-test.js +31 -0
- package/src/generators/component-test/files/__componentFileName__.cy.ts__tpl__ +21 -0
- package/src/generators/component-test/schema.d.ts +12 -0
- package/src/generators/component-test/schema.json +49 -0
- package/src/generators/convert-to-application-executor/convert-to-application-executor.d.ts +4 -0
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +240 -0
- package/src/generators/convert-to-application-executor/schema.d.ts +4 -0
- package/src/generators/convert-to-application-executor/schema.json +26 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +4 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +32 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +5 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +448 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +25 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +50 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +19 -0
- package/src/generators/convert-to-with-mf/lib/index.d.ts +6 -0
- package/src/generators/convert-to-with-mf/lib/index.js +9 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +5 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +68 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +14 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +3 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +51 -0
- package/src/generators/convert-to-with-mf/schema.d.ts +4 -0
- package/src/generators/convert-to-with-mf/schema.json +33 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +9 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +108 -0
- package/src/generators/cypress-component-configuration/schema.d.ts +6 -0
- package/src/generators/cypress-component-configuration/schema.json +40 -0
- package/src/generators/directive/directive.d.ts +4 -0
- package/src/generators/directive/directive.js +29 -0
- package/src/generators/directive/files/__fileName__.spec.ts__tpl__ +8 -0
- package/src/generators/directive/files/__fileName__.ts__tpl__ +9 -0
- package/src/generators/directive/lib/index.d.ts +1 -0
- package/src/generators/directive/lib/index.js +4 -0
- package/src/generators/directive/lib/normalize-options.d.ts +3 -0
- package/src/generators/directive/lib/normalize-options.js +37 -0
- package/src/generators/directive/schema.d.ts +35 -0
- package/src/generators/directive/schema.json +96 -0
- package/src/generators/federate-module/federate-module.d.ts +4 -0
- package/src/generators/federate-module/federate-module.js +40 -0
- package/src/generators/federate-module/lib/add-file-to-remote-tsconfig.d.ts +2 -0
- package/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +15 -0
- package/src/generators/federate-module/lib/add-path-to-exposes.d.ts +8 -0
- package/src/generators/federate-module/lib/add-path-to-exposes.js +78 -0
- package/src/generators/federate-module/lib/add-path-to-ts-config.d.ts +8 -0
- package/src/generators/federate-module/lib/add-path-to-ts-config.js +12 -0
- package/src/generators/federate-module/lib/add-remote.d.ts +7 -0
- package/src/generators/federate-module/lib/add-remote.js +45 -0
- package/src/generators/federate-module/lib/check-remote-exists.d.ts +2 -0
- package/src/generators/federate-module/lib/check-remote-exists.js +22 -0
- package/src/generators/federate-module/lib/index.d.ts +4 -0
- package/src/generators/federate-module/lib/index.js +7 -0
- package/src/generators/federate-module/schema.d.ts +15 -0
- package/src/generators/federate-module/schema.json +81 -0
- package/src/generators/host/files/common/pre-v17/src/main.server.ts__tmpl__ +66 -0
- package/src/generators/host/files/common/v17+/src/main.server.ts__tmpl__ +67 -0
- package/src/generators/host/files/js/webpack.server.config.js__tmpl__ +3 -0
- package/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +4 -0
- package/src/generators/host/host.d.ts +5 -0
- package/src/generators/host/host.js +101 -0
- package/src/generators/host/lib/index.d.ts +1 -0
- package/src/generators/host/lib/index.js +4 -0
- package/src/generators/host/lib/update-ssr-setup.d.ts +3 -0
- package/src/generators/host/lib/update-ssr-setup.js +40 -0
- package/src/generators/host/schema.d.ts +33 -0
- package/src/generators/host/schema.json +185 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +65 -0
- package/src/generators/init/schema.d.ts +6 -0
- package/src/generators/init/schema.json +34 -0
- package/src/generators/library/files/base/README.md__tpl__ +9 -0
- package/src/generators/library/files/base/ng-package.json__tpl__ +7 -0
- package/src/generators/library/files/base/package.json__tpl__ +12 -0
- package/src/generators/library/files/base/tsconfig.json__tpl__ +14 -0
- package/src/generators/library/files/base/tsconfig.lib.json__tpl__ +17 -0
- package/src/generators/library/files/base/tsconfig.lib.prod.json__tpl__ +9 -0
- package/src/generators/library/files/ng-module/src/index.ts__tpl__ +2 -0
- package/src/generators/library/files/ng-module/src/lib/__libFileName__.module.ts__tpl__ +9 -0
- package/src/generators/library/files/ng-module/src/lib/lib.routes.ts__tpl__ +5 -0
- package/src/generators/library/files/standalone-components/src/index.ts__tpl__ +1 -0
- package/src/generators/library/files/standalone-components/src/lib/lib.routes.ts__tpl__ +6 -0
- package/src/generators/library/lib/add-children.d.ts +3 -0
- package/src/generators/library/lib/add-children.js +30 -0
- package/src/generators/library/lib/add-load-children.d.ts +3 -0
- package/src/generators/library/lib/add-load-children.js +22 -0
- package/src/generators/library/lib/add-module.d.ts +3 -0
- package/src/generators/library/lib/add-module.js +14 -0
- package/src/generators/library/lib/add-project.d.ts +4 -0
- package/src/generators/library/lib/add-project.js +41 -0
- package/src/generators/library/lib/add-standalone-component.d.ts +3 -0
- package/src/generators/library/lib/add-standalone-component.js +29 -0
- package/src/generators/library/lib/create-files.d.ts +4 -0
- package/src/generators/library/lib/create-files.js +53 -0
- package/src/generators/library/lib/enable-strict-type-checking.d.ts +7 -0
- package/src/generators/library/lib/enable-strict-type-checking.js +48 -0
- package/src/generators/library/lib/normalize-options.d.ts +4 -0
- package/src/generators/library/lib/normalize-options.js +77 -0
- package/src/generators/library/lib/normalized-schema.d.ts +55 -0
- package/src/generators/library/lib/normalized-schema.js +2 -0
- package/src/generators/library/lib/set-generator-defaults.d.ts +3 -0
- package/src/generators/library/lib/set-generator-defaults.js +15 -0
- package/src/generators/library/lib/update-lib-package-npm-scope.d.ts +3 -0
- package/src/generators/library/lib/update-lib-package-npm-scope.js +11 -0
- package/src/generators/library/lib/update-tsconfig.d.ts +3 -0
- package/src/generators/library/lib/update-tsconfig.js +37 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +125 -0
- package/src/generators/library/schema.d.ts +44 -0
- package/src/generators/library/schema.json +208 -0
- package/src/generators/library-secondary-entry-point/files/README.md__tmpl__ +3 -0
- package/src/generators/library-secondary-entry-point/files/ng-package.json__tmpl__ +5 -0
- package/src/generators/library-secondary-entry-point/files/src/index.ts__tmpl__ +1 -0
- package/src/generators/library-secondary-entry-point/files/src/lib/__fileName__.module.ts__tmpl__ +7 -0
- package/src/generators/library-secondary-entry-point/lib/add-files.d.ts +3 -0
- package/src/generators/library-secondary-entry-point/lib/add-files.js +16 -0
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.d.ts +3 -0
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js +16 -0
- package/src/generators/library-secondary-entry-point/lib/index.d.ts +4 -0
- package/src/generators/library-secondary-entry-point/lib/index.js +7 -0
- package/src/generators/library-secondary-entry-point/lib/normalize-options.d.ts +3 -0
- package/src/generators/library-secondary-entry-point/lib/normalize-options.js +31 -0
- package/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.d.ts +3 -0
- package/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.js +26 -0
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.d.ts +4 -0
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +16 -0
- package/src/generators/library-secondary-entry-point/schema.d.ts +16 -0
- package/src/generators/library-secondary-entry-point/schema.json +43 -0
- package/src/generators/move/lib/index.d.ts +3 -0
- package/src/generators/move/lib/index.js +6 -0
- package/src/generators/move/lib/types.d.ts +4 -0
- package/src/generators/move/lib/types.js +2 -0
- package/src/generators/move/lib/update-module-name.d.ts +11 -0
- package/src/generators/move/lib/update-module-name.js +99 -0
- package/src/generators/move/lib/update-ng-package.d.ts +3 -0
- package/src/generators/move/lib/update-ng-package.js +33 -0
- package/src/generators/move/lib/update-secondary-entry-points.d.ts +3 -0
- package/src/generators/move/lib/update-secondary-entry-points.js +44 -0
- package/src/generators/move/move-impl.d.ts +7 -0
- package/src/generators/move/move-impl.js +25 -0
- package/src/generators/move/move.d.ts +4 -0
- package/src/generators/move/move.js +16 -0
- package/src/generators/move/schema.d.ts +11 -0
- package/src/generators/move/schema.json +61 -0
- package/src/generators/ng-add/files/root/apps/__dot__gitkeep +0 -0
- package/src/generators/ng-add/files/root/libs/__dot__gitkeep +0 -0
- package/src/generators/ng-add/files/root/tools/generators/__dot__gitkeep +0 -0
- package/src/generators/ng-add/files/root/tools/tsconfig.tools.json__tmpl__ +12 -0
- package/src/generators/ng-add/files/root-karma/karma.conf.js__tmpl__ +43 -0
- package/src/generators/ng-add/migrate-from-angular-cli.d.ts +3 -0
- package/src/generators/ng-add/migrate-from-angular-cli.js +62 -0
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.d.ts +9 -0
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +78 -0
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.d.ts +10 -0
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js +95 -0
- package/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.d.ts +12 -0
- package/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +113 -0
- package/src/generators/ng-add/migrators/builders/builder-migrator-class.type.d.ts +6 -0
- package/src/generators/ng-add/migrators/builders/builder-migrator-class.type.js +2 -0
- package/src/generators/ng-add/migrators/builders/builder.migrator.d.ts +13 -0
- package/src/generators/ng-add/migrators/builders/builder.migrator.js +43 -0
- package/src/generators/ng-add/migrators/builders/index.d.ts +5 -0
- package/src/generators/ng-add/migrators/builders/index.js +8 -0
- package/src/generators/ng-add/migrators/index.d.ts +2 -0
- package/src/generators/ng-add/migrators/index.js +5 -0
- package/src/generators/ng-add/migrators/migrator.d.ts +23 -0
- package/src/generators/ng-add/migrators/migrator.js +117 -0
- package/src/generators/ng-add/migrators/projects/app.migrator.d.ts +25 -0
- package/src/generators/ng-add/migrators/projects/app.migrator.js +342 -0
- package/src/generators/ng-add/migrators/projects/e2e.migrator.d.ts +38 -0
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +604 -0
- package/src/generators/ng-add/migrators/projects/index.d.ts +4 -0
- package/src/generators/ng-add/migrators/projects/index.js +7 -0
- package/src/generators/ng-add/migrators/projects/lib.migrator.d.ts +11 -0
- package/src/generators/ng-add/migrators/projects/lib.migrator.js +53 -0
- package/src/generators/ng-add/migrators/projects/project.migrator.d.ts +25 -0
- package/src/generators/ng-add/migrators/projects/project.migrator.js +180 -0
- package/src/generators/ng-add/ng-add.d.ts +4 -0
- package/src/generators/ng-add/ng-add.js +9 -0
- package/src/generators/ng-add/schema.d.ts +16 -0
- package/src/generators/ng-add/schema.json +66 -0
- package/src/generators/ng-add/utilities/dependencies.d.ts +2 -0
- package/src/generators/ng-add/utilities/dependencies.js +28 -0
- package/src/generators/ng-add/utilities/format-files-task.d.ts +2 -0
- package/src/generators/ng-add/utilities/format-files-task.js +16 -0
- package/src/generators/ng-add/utilities/index.d.ts +7 -0
- package/src/generators/ng-add/utilities/index.js +10 -0
- package/src/generators/ng-add/utilities/logger.d.ts +8 -0
- package/src/generators/ng-add/utilities/logger.js +20 -0
- package/src/generators/ng-add/utilities/projects.d.ts +4 -0
- package/src/generators/ng-add/utilities/projects.js +35 -0
- package/src/generators/ng-add/utilities/types.d.ts +31 -0
- package/src/generators/ng-add/utilities/types.js +2 -0
- package/src/generators/ng-add/utilities/validation-logging.d.ts +3 -0
- package/src/generators/ng-add/utilities/validation-logging.js +38 -0
- package/src/generators/ng-add/utilities/workspace.d.ts +17 -0
- package/src/generators/ng-add/utilities/workspace.js +292 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.actions.ts__tmpl__ +16 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.spec.ts__tmpl__ +37 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.facade.spec.ts__tmpl__ +99 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.models.ts__tmpl__ +7 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.reducer.spec.ts__tmpl__ +37 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.reducer.ts__tmpl__ +41 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.selectors.spec.ts__tmpl__ +58 -0
- package/src/generators/ngrx/files/__directory__/__fileName__.selectors.ts__tmpl__ +38 -0
- package/src/generators/ngrx/lib/add-exports-barrel.d.ts +6 -0
- package/src/generators/ngrx/lib/add-exports-barrel.js +45 -0
- package/src/generators/ngrx/lib/add-imports-to-module.d.ts +3 -0
- package/src/generators/ngrx/lib/add-imports-to-module.js +182 -0
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.d.ts +3 -0
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +25 -0
- package/src/generators/ngrx/lib/generate-files.d.ts +6 -0
- package/src/generators/ngrx/lib/generate-files.js +23 -0
- package/src/generators/ngrx/lib/index.d.ts +6 -0
- package/src/generators/ngrx/lib/index.js +15 -0
- package/src/generators/ngrx/lib/normalize-options.d.ts +7 -0
- package/src/generators/ngrx/lib/normalize-options.js +28 -0
- package/src/generators/ngrx/lib/validate-options.d.ts +3 -0
- package/src/generators/ngrx/lib/validate-options.js +15 -0
- package/src/generators/ngrx/ngrx.d.ts +4 -0
- package/src/generators/ngrx/ngrx.js +26 -0
- package/src/generators/ngrx/schema.d.ts +14 -0
- package/src/generators/ngrx/schema.json +102 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.actions.ts__tmpl__ +16 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.effects.spec.ts__tmpl__ +37 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.facade.spec.ts__tmpl__ +99 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.models.ts__tmpl__ +7 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.reducer.spec.ts__tmpl__ +37 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.reducer.ts__tmpl__ +41 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.selectors.spec.ts__tmpl__ +58 -0
- package/src/generators/ngrx-feature-store/files/__directory__/__fileName__.selectors.ts__tmpl__ +38 -0
- package/src/generators/ngrx-feature-store/lib/add-exports-barrel.d.ts +3 -0
- package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js +41 -0
- package/src/generators/ngrx-feature-store/lib/add-imports.d.ts +3 -0
- package/src/generators/ngrx-feature-store/lib/add-imports.js +102 -0
- package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.d.ts +3 -0
- package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.js +25 -0
- package/src/generators/ngrx-feature-store/lib/generate-files.d.ts +3 -0
- package/src/generators/ngrx-feature-store/lib/generate-files.js +24 -0
- package/src/generators/ngrx-feature-store/lib/index.d.ts +6 -0
- package/src/generators/ngrx-feature-store/lib/index.js +9 -0
- package/src/generators/ngrx-feature-store/lib/normalize-options.d.ts +8 -0
- package/src/generators/ngrx-feature-store/lib/normalize-options.js +38 -0
- package/src/generators/ngrx-feature-store/lib/validate-options.d.ts +3 -0
- package/src/generators/ngrx-feature-store/lib/validate-options.js +12 -0
- package/src/generators/ngrx-feature-store/ngrx-feature-store.d.ts +5 -0
- package/src/generators/ngrx-feature-store/ngrx-feature-store.js +26 -0
- package/src/generators/ngrx-feature-store/schema.d.ts +12 -0
- package/src/generators/ngrx-feature-store/schema.json +72 -0
- package/src/generators/ngrx-root-store/lib/add-imports.d.ts +3 -0
- package/src/generators/ngrx-root-store/lib/add-imports.js +101 -0
- package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.d.ts +3 -0
- package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.js +27 -0
- package/src/generators/ngrx-root-store/lib/index.d.ts +4 -0
- package/src/generators/ngrx-root-store/lib/index.js +7 -0
- package/src/generators/ngrx-root-store/lib/normalize-options.d.ts +7 -0
- package/src/generators/ngrx-root-store/lib/normalize-options.js +40 -0
- package/src/generators/ngrx-root-store/lib/validate-options.d.ts +3 -0
- package/src/generators/ngrx-root-store/lib/validate-options.js +17 -0
- package/src/generators/ngrx-root-store/ngrx-root-store.d.ts +5 -0
- package/src/generators/ngrx-root-store/ngrx-root-store.js +36 -0
- package/src/generators/ngrx-root-store/schema.d.ts +11 -0
- package/src/generators/ngrx-root-store/schema.json +71 -0
- package/src/generators/pipe/files/__fileName__.spec.ts__tpl__ +8 -0
- package/src/generators/pipe/files/__fileName__.ts__tpl__ +11 -0
- package/src/generators/pipe/lib/index.d.ts +1 -0
- package/src/generators/pipe/lib/index.js +4 -0
- package/src/generators/pipe/lib/normalize-options.d.ts +3 -0
- package/src/generators/pipe/lib/normalize-options.js +31 -0
- package/src/generators/pipe/pipe.d.ts +4 -0
- package/src/generators/pipe/pipe.js +30 -0
- package/src/generators/pipe/schema.d.ts +33 -0
- package/src/generators/pipe/schema.json +77 -0
- package/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +3 -0
- package/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +4 -0
- package/src/generators/remote/files/common/pre-v17/src/main.server.ts__tmpl__ +72 -0
- package/src/generators/remote/files/common/v17+/src/main.server.ts__tmpl__ +73 -0
- package/src/generators/remote/files/standalone/src/bootstrap.server.ts__tmpl__ +7 -0
- package/src/generators/remote/lib/find-next-available-port.d.ts +2 -0
- package/src/generators/remote/lib/find-next-available-port.js +17 -0
- package/src/generators/remote/lib/index.d.ts +2 -0
- package/src/generators/remote/lib/index.js +5 -0
- package/src/generators/remote/lib/update-ssr-setup.d.ts +7 -0
- package/src/generators/remote/lib/update-ssr-setup.js +59 -0
- package/src/generators/remote/remote.d.ts +5 -0
- package/src/generators/remote/remote.js +79 -0
- package/src/generators/remote/schema.d.ts +32 -0
- package/src/generators/remote/schema.json +178 -0
- package/src/generators/scam/lib/convert-component-to-scam.d.ts +3 -0
- package/src/generators/scam/lib/convert-component-to-scam.js +44 -0
- package/src/generators/scam/lib/index.d.ts +2 -0
- package/src/generators/scam/lib/index.js +5 -0
- package/src/generators/scam/lib/normalize-options.d.ts +3 -0
- package/src/generators/scam/lib/normalize-options.js +33 -0
- package/src/generators/scam/scam.d.ts +4 -0
- package/src/generators/scam/scam.js +26 -0
- package/src/generators/scam/schema.d.ts +43 -0
- package/src/generators/scam/schema.json +142 -0
- package/src/generators/scam-directive/lib/convert-directive-to-scam.d.ts +3 -0
- package/src/generators/scam-directive/lib/convert-directive-to-scam.js +44 -0
- package/src/generators/scam-directive/lib/index.d.ts +2 -0
- package/src/generators/scam-directive/lib/index.js +5 -0
- package/src/generators/scam-directive/lib/normalize-options.d.ts +3 -0
- package/src/generators/scam-directive/lib/normalize-options.js +32 -0
- package/src/generators/scam-directive/scam-directive.d.ts +4 -0
- package/src/generators/scam-directive/scam-directive.js +26 -0
- package/src/generators/scam-directive/schema.d.ts +35 -0
- package/src/generators/scam-directive/schema.json +96 -0
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.d.ts +3 -0
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +44 -0
- package/src/generators/scam-pipe/lib/index.d.ts +2 -0
- package/src/generators/scam-pipe/lib/index.js +5 -0
- package/src/generators/scam-pipe/lib/normalize-options.d.ts +3 -0
- package/src/generators/scam-pipe/lib/normalize-options.js +32 -0
- package/src/generators/scam-pipe/scam-pipe.d.ts +4 -0
- package/src/generators/scam-pipe/scam-pipe.js +26 -0
- package/src/generators/scam-pipe/schema.d.ts +33 -0
- package/src/generators/scam-pipe/schema.json +77 -0
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +3 -0
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +33 -0
- package/src/generators/scam-to-standalone/lib/get-component-data-from-ast.d.ts +6 -0
- package/src/generators/scam-to-standalone/lib/get-component-data-from-ast.js +18 -0
- package/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.d.ts +9 -0
- package/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.js +64 -0
- package/src/generators/scam-to-standalone/lib/get-target-project.d.ts +2 -0
- package/src/generators/scam-to-standalone/lib/get-target-project.js +14 -0
- package/src/generators/scam-to-standalone/lib/index.d.ts +8 -0
- package/src/generators/scam-to-standalone/lib/index.js +11 -0
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.d.ts +2 -0
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +19 -0
- package/src/generators/scam-to-standalone/lib/selector-exists-in-ast.d.ts +2 -0
- package/src/generators/scam-to-standalone/lib/selector-exists-in-ast.js +8 -0
- package/src/generators/scam-to-standalone/lib/verify-is-inline-scam.d.ts +2 -0
- package/src/generators/scam-to-standalone/lib/verify-is-inline-scam.js +11 -0
- package/src/generators/scam-to-standalone/lib/verify-module-is-scam.d.ts +1 -0
- package/src/generators/scam-to-standalone/lib/verify-module-is-scam.js +12 -0
- package/src/generators/scam-to-standalone/scam-to-standalone.d.ts +4 -0
- package/src/generators/scam-to-standalone/scam-to-standalone.js +27 -0
- package/src/generators/scam-to-standalone/schema.d.ts +5 -0
- package/src/generators/scam-to-standalone/schema.json +32 -0
- package/src/generators/setup-mf/files/entry-module-files/entry.component.ts__tmpl__ +9 -0
- package/src/generators/setup-mf/files/entry-module-files/entry.module.ts__tmpl__ +18 -0
- package/src/generators/setup-mf/files/entry-module-files/entry.routes.ts__tmpl__ +4 -0
- package/src/generators/setup-mf/files/host-files/app.component.spec.ts__tmpl__ +44 -0
- package/src/generators/setup-mf/files/standalone-entry-component-files/entry.component.ts__tmpl__ +13 -0
- package/src/generators/setup-mf/files/standalone-entry-component-files/entry.routes.ts__tmpl__ +4 -0
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +24 -0
- package/src/generators/setup-mf/files/ts-webpack/tsconfig.lint.json__tmpl__ +12 -0
- package/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +4 -0
- package/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +16 -0
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +20 -0
- package/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +3 -0
- package/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +15 -0
- package/src/generators/setup-mf/lib/add-cypress-workaround.d.ts +3 -0
- package/src/generators/setup-mf/lib/add-cypress-workaround.js +52 -0
- package/src/generators/setup-mf/lib/add-remote-entry.d.ts +3 -0
- package/src/generators/setup-mf/lib/add-remote-entry.js +22 -0
- package/src/generators/setup-mf/lib/add-remote-to-host.d.ts +4 -0
- package/src/generators/setup-mf/lib/add-remote-to-host.js +108 -0
- package/src/generators/setup-mf/lib/change-build-target.d.ts +3 -0
- package/src/generators/setup-mf/lib/change-build-target.js +23 -0
- package/src/generators/setup-mf/lib/fix-bootstrap.d.ts +3 -0
- package/src/generators/setup-mf/lib/fix-bootstrap.js +33 -0
- package/src/generators/setup-mf/lib/generate-config.d.ts +6 -0
- package/src/generators/setup-mf/lib/generate-config.js +30 -0
- package/src/generators/setup-mf/lib/get-remotes-with-ports.d.ts +6 -0
- package/src/generators/setup-mf/lib/get-remotes-with-ports.js +21 -0
- package/src/generators/setup-mf/lib/index.d.ts +14 -0
- package/src/generators/setup-mf/lib/index.js +17 -0
- package/src/generators/setup-mf/lib/normalize-options.d.ts +3 -0
- package/src/generators/setup-mf/lib/normalize-options.js +14 -0
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.d.ts +3 -0
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +56 -0
- package/src/generators/setup-mf/lib/setup-host-if-dynamic.d.ts +3 -0
- package/src/generators/setup-mf/lib/setup-host-if-dynamic.js +21 -0
- package/src/generators/setup-mf/lib/setup-serve-target.d.ts +3 -0
- package/src/generators/setup-mf/lib/setup-serve-target.js +39 -0
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.d.ts +3 -0
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +16 -0
- package/src/generators/setup-mf/lib/update-host-app-routes.d.ts +3 -0
- package/src/generators/setup-mf/lib/update-host-app-routes.js +41 -0
- package/src/generators/setup-mf/lib/update-tsconfig.d.ts +3 -0
- package/src/generators/setup-mf/lib/update-tsconfig.js +19 -0
- package/src/generators/setup-mf/schema.d.ts +24 -0
- package/src/generators/setup-mf/schema.json +91 -0
- package/src/generators/setup-mf/setup-mf.d.ts +4 -0
- package/src/generators/setup-mf/setup-mf.js +39 -0
- package/src/generators/setup-ssr/files/ngmodule/base/src/__main__ +1 -0
- package/src/generators/setup-ssr/files/ngmodule/base/src/app/__rootModuleFileName__ +14 -0
- package/src/generators/setup-ssr/files/ngmodule/pre-v15-2/src/main.ts__tpl__ +14 -0
- package/src/generators/setup-ssr/files/root/tsconfig.server.json__tpl__ +15 -0
- package/src/generators/setup-ssr/files/server/application-builder/__serverFileName__ +56 -0
- package/src/generators/setup-ssr/files/server/server-builder/pre-v17/__serverFileName__ +59 -0
- package/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ +69 -0
- package/src/generators/setup-ssr/files/standalone/src/__main__ +7 -0
- package/src/generators/setup-ssr/files/standalone/src/app/app.config.server.ts__tpl__ +11 -0
- package/src/generators/setup-ssr/lib/add-dependencies.d.ts +2 -0
- package/src/generators/setup-ssr/lib/add-dependencies.js +36 -0
- package/src/generators/setup-ssr/lib/add-hydration.d.ts +3 -0
- package/src/generators/setup-ssr/lib/add-hydration.js +36 -0
- package/src/generators/setup-ssr/lib/add-server-file.d.ts +3 -0
- package/src/generators/setup-ssr/lib/add-server-file.js +31 -0
- package/src/generators/setup-ssr/lib/constants.d.ts +3 -0
- package/src/generators/setup-ssr/lib/constants.js +6 -0
- package/src/generators/setup-ssr/lib/generate-files.d.ts +3 -0
- package/src/generators/setup-ssr/lib/generate-files.js +26 -0
- package/src/generators/setup-ssr/lib/generate-server-ts-config.d.ts +4 -0
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +29 -0
- package/src/generators/setup-ssr/lib/index.d.ts +10 -0
- package/src/generators/setup-ssr/lib/index.js +13 -0
- package/src/generators/setup-ssr/lib/normalize-options.d.ts +14 -0
- package/src/generators/setup-ssr/lib/normalize-options.js +26 -0
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.d.ts +3 -0
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.js +93 -0
- package/src/generators/setup-ssr/lib/update-app-module.d.ts +3 -0
- package/src/generators/setup-ssr/lib/update-app-module.js +27 -0
- package/src/generators/setup-ssr/lib/update-project-config.d.ts +4 -0
- package/src/generators/setup-ssr/lib/update-project-config.js +127 -0
- package/src/generators/setup-ssr/lib/validate-options.d.ts +3 -0
- package/src/generators/setup-ssr/lib/validate-options.js +36 -0
- package/src/generators/setup-ssr/schema.d.ts +12 -0
- package/src/generators/setup-ssr/schema.json +68 -0
- package/src/generators/setup-ssr/setup-ssr.d.ts +4 -0
- package/src/generators/setup-ssr/setup-ssr.js +42 -0
- package/src/generators/setup-tailwind/files/v2/tailwind.config.js__tmpl__ +18 -0
- package/src/generators/setup-tailwind/files/v3/tailwind.config.js__tmpl__ +14 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.js +35 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-config.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-config.js +17 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-required-packages.d.ts +2 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-required-packages.js +14 -0
- package/src/generators/setup-tailwind/lib/detect-tailwind-installed-version.d.ts +2 -0
- package/src/generators/setup-tailwind/lib/detect-tailwind-installed-version.js +19 -0
- package/src/generators/setup-tailwind/lib/index.d.ts +6 -0
- package/src/generators/setup-tailwind/lib/index.js +9 -0
- package/src/generators/setup-tailwind/lib/normalize-options.d.ts +2 -0
- package/src/generators/setup-tailwind/lib/normalize-options.js +10 -0
- package/src/generators/setup-tailwind/lib/update-application-styles.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/update-application-styles.js +52 -0
- package/src/generators/setup-tailwind/schema.d.ts +11 -0
- package/src/generators/setup-tailwind/schema.json +42 -0
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +4 -0
- package/src/generators/setup-tailwind/setup-tailwind.js +29 -0
- package/src/generators/stories/lib/get-e2e-project.d.ts +2 -0
- package/src/generators/stories/lib/get-e2e-project.js +15 -0
- package/src/generators/stories/schema.d.ts +8 -0
- package/src/generators/stories/schema.json +64 -0
- package/src/generators/stories/stories.d.ts +4 -0
- package/src/generators/stories/stories.js +67 -0
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.d.ts +1 -0
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.js +15 -0
- package/src/generators/storybook-configuration/lib/generate-stories.d.ts +3 -0
- package/src/generators/storybook-configuration/lib/generate-stories.js +21 -0
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.d.ts +3 -0
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +22 -0
- package/src/generators/storybook-configuration/lib/validate-options.d.ts +2 -0
- package/src/generators/storybook-configuration/lib/validate-options.js +9 -0
- package/src/generators/storybook-configuration/schema.d.ts +15 -0
- package/src/generators/storybook-configuration/schema.json +98 -0
- package/src/generators/storybook-configuration/storybook-configuration.d.ts +4 -0
- package/src/generators/storybook-configuration/storybook-configuration.js +36 -0
- package/src/generators/utils/add-jest.d.ts +8 -0
- package/src/generators/utils/add-jest.js +36 -0
- package/src/generators/utils/add-mf-env-to-inputs.d.ts +2 -0
- package/src/generators/utils/add-mf-env-to-inputs.js +24 -0
- package/src/generators/utils/dependencies.d.ts +2 -0
- package/src/generators/utils/dependencies.js +14 -0
- package/src/generators/utils/ensure-angular-dependencies.d.ts +2 -0
- package/src/generators/utils/ensure-angular-dependencies.js +35 -0
- package/src/generators/utils/entry-point.d.ts +2 -0
- package/src/generators/utils/entry-point.js +20 -0
- package/src/generators/utils/export-scam.d.ts +10 -0
- package/src/generators/utils/export-scam.js +37 -0
- package/src/generators/utils/find-module.d.ts +4 -0
- package/src/generators/utils/find-module.js +64 -0
- package/src/generators/utils/index.d.ts +2 -0
- package/src/generators/utils/index.js +5 -0
- package/src/generators/utils/insert-ngmodule-import.d.ts +4 -0
- package/src/generators/utils/insert-ngmodule-import.js +139 -0
- package/src/generators/utils/path.d.ts +1 -0
- package/src/generators/utils/path.js +10 -0
- package/src/generators/utils/project.d.ts +2 -0
- package/src/generators/utils/project.js +8 -0
- package/src/generators/utils/selector.d.ts +3 -0
- package/src/generators/utils/selector.js +21 -0
- package/src/generators/utils/storybook-ast/component-info.d.ts +11 -0
- package/src/generators/utils/storybook-ast/component-info.js +167 -0
- package/src/generators/utils/storybook-ast/entry-point.d.ts +7 -0
- package/src/generators/utils/storybook-ast/entry-point.js +63 -0
- package/src/generators/utils/storybook-ast/module-info.d.ts +5 -0
- package/src/generators/utils/storybook-ast/module-info.js +220 -0
- package/src/generators/utils/storybook-ast/storybook-inputs.d.ts +12 -0
- package/src/generators/utils/storybook-ast/storybook-inputs.js +78 -0
- package/src/generators/utils/storybook-ast/tree-utilities.d.ts +2 -0
- package/src/generators/utils/storybook-ast/tree-utilities.js +31 -0
- package/src/generators/utils/testing.d.ts +10 -0
- package/src/generators/utils/testing.js +274 -0
- package/src/generators/utils/types.d.ts +1 -0
- package/src/generators/utils/types.js +2 -0
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.d.ts +2 -0
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.js +23 -0
- package/src/generators/utils/update-project-root-tsconfig.d.ts +3 -0
- package/src/generators/utils/update-project-root-tsconfig.js +26 -0
- package/src/generators/utils/validations.d.ts +2 -0
- package/src/generators/utils/validations.js +11 -0
- package/src/generators/utils/version-utils.d.ts +15 -0
- package/src/generators/utils/version-utils.js +66 -0
- package/src/generators/web-worker/files/config/tsconfig.worker.json__tpl__ +14 -0
- package/src/generators/web-worker/files/worker/__name__.worker.ts__tpl__ +6 -0
- package/src/generators/web-worker/lib/add-snippet.d.ts +2 -0
- package/src/generators/web-worker/lib/add-snippet.js +33 -0
- package/src/generators/web-worker/lib/index.d.ts +2 -0
- package/src/generators/web-worker/lib/index.js +5 -0
- package/src/generators/web-worker/lib/normalize-options.d.ts +3 -0
- package/src/generators/web-worker/lib/normalize-options.js +25 -0
- package/src/generators/web-worker/schema.d.ts +7 -0
- package/src/generators/web-worker/schema.json +48 -0
- package/src/generators/web-worker/web-worker.d.ts +4 -0
- package/src/generators/web-worker/web-worker.js +34 -0
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.d.ts +2 -0
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +23 -0
- package/src/migrations/update-14-2-0/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-14-2-0/update-angular-cli.js +22 -0
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.d.ts +2 -0
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +34 -0
- package/src/migrations/update-14-2-0/update-ngcc-target.d.ts +2 -0
- package/src/migrations/update-14-2-0/update-ngcc-target.js +17 -0
- package/src/migrations/update-14-2-0/update-router-initial-navigation.d.ts +2 -0
- package/src/migrations/update-14-2-0/update-router-initial-navigation.js +70 -0
- package/src/migrations/update-14-2-0/update-tsconfig-target.d.ts +2 -0
- package/src/migrations/update-14-2-0/update-tsconfig-target.js +155 -0
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +5 -0
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +91 -0
- package/src/migrations/update-14-5-2/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-14-5-2/update-angular-cli.js +22 -0
- package/src/migrations/update-14-6-0/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-14-6-0/update-angular-cli.js +22 -0
- package/src/migrations/update-14-8-0/rename-webpack-server.d.ts +2 -0
- package/src/migrations/update-14-8-0/rename-webpack-server.js +21 -0
- package/src/migrations/update-15-0-0/add-karma-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-karma-inputs.js +41 -0
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.d.ts +2 -0
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +102 -0
- package/src/migrations/update-15-2-0/remove-browserlist-config.d.ts +3 -0
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +58 -0
- package/src/migrations/update-15-2-0/remove-platform-server-exports.d.ts +2 -0
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +61 -0
- package/src/migrations/update-15-2-0/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-15-2-0/update-angular-cli.js +22 -0
- package/src/migrations/update-15-2-0/update-karma-main-file.d.ts +2 -0
- package/src/migrations/update-15-2-0/update-karma-main-file.js +71 -0
- package/src/migrations/update-15-2-0/update-typescript-target.d.ts +2 -0
- package/src/migrations/update-15-2-0/update-typescript-target.js +52 -0
- package/src/migrations/update-15-2-0/update-workspace-config.d.ts +2 -0
- package/src/migrations/update-15-2-0/update-workspace-config.js +24 -0
- package/src/migrations/update-15-5-0/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-15-5-0/update-angular-cli.js +22 -0
- package/src/migrations/update-15-7-0/install-required-packages.d.ts +2 -0
- package/src/migrations/update-15-7-0/install-required-packages.js +36 -0
- package/src/migrations/update-15-8-0/update-angular-cli.d.ts +2 -0
- package/src/migrations/update-15-8-0/update-angular-cli.js +22 -0
- package/src/migrations/update-15-9-0/update-file-server-executor.d.ts +2 -0
- package/src/migrations/update-15-9-0/update-file-server-executor.js +42 -0
- package/src/migrations/update-15-9-0/update-testing-tsconfig.d.ts +3 -0
- package/src/migrations/update-15-9-0/update-testing-tsconfig.js +33 -0
- package/src/migrations/update-16-0-0/remove-karma-defaults.d.ts +2 -0
- package/src/migrations/update-16-0-0/remove-karma-defaults.js +52 -0
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.d.ts +2 -0
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +40 -0
- package/src/migrations/update-16-0-0/remove-protractor-defaults.d.ts +2 -0
- package/src/migrations/update-16-0-0/remove-protractor-defaults.js +52 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.d.ts +2 -0
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +127 -0
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.d.ts +2 -0
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +22 -0
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +2 -0
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +61 -0
- package/src/migrations/update-16-1-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-16-1-0/update-angular-cli.js +23 -0
- package/src/migrations/update-16-1-0/update-server-executor-config.d.ts +2 -0
- package/src/migrations/update-16-1-0/update-server-executor-config.js +26 -0
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.d.ts +2 -0
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +122 -0
- package/src/migrations/update-16-4-0/rename-angular-eslint-accesibility-rules.d.ts +2 -0
- package/src/migrations/update-16-4-0/rename-angular-eslint-accesibility-rules.js +34 -0
- package/src/migrations/update-16-4-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-16-4-0/update-angular-cli.js +23 -0
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.d.ts +2 -0
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +34 -0
- package/src/migrations/update-16-7-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-16-7-0/update-angular-cli.js +23 -0
- package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts +3 -0
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +50 -0
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.d.ts +2 -0
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.js +75 -0
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.d.ts +2 -0
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +183 -0
- package/src/migrations/update-17-1-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-17-1-0/update-angular-cli.js +23 -0
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.d.ts +2 -0
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.js +37 -0
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.d.ts +2 -0
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.js +40 -0
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.d.ts +2 -0
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.js +26 -0
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.d.ts +2 -0
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.js +26 -0
- package/src/migrations/update-17-3-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-17-3-0/update-angular-cli.js +23 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +2 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +26 -0
- package/src/migrations/update-18-1-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-18-1-0/update-angular-cli.js +23 -0
- package/src/migrations/utils/projects.d.ts +5 -0
- package/src/migrations/utils/projects.js +15 -0
- package/src/runtime/nx/data-persistence.d.ts +271 -0
- package/src/runtime/nx/data-persistence.js +350 -0
- package/src/utils/backward-compatible-versions.d.ts +8 -0
- package/src/utils/backward-compatible-versions.js +59 -0
- package/src/utils/cli-config-utils.d.ts +1 -0
- package/src/utils/cli-config-utils.js +45 -0
- package/src/utils/file-change-recorder.d.ts +17 -0
- package/src/utils/file-change-recorder.js +39 -0
- package/src/utils/get-mf-projects.d.ts +4 -0
- package/src/utils/get-mf-projects.js +34 -0
- package/src/utils/mf/utils.d.ts +15 -0
- package/src/utils/mf/utils.js +100 -0
- package/src/utils/mf/with-module-federation-ssr.d.ts +2 -0
- package/src/utils/mf/with-module-federation-ssr.js +46 -0
- package/src/utils/mf/with-module-federation.d.ts +2 -0
- package/src/utils/mf/with-module-federation.js +48 -0
- package/src/utils/nx-devkit/ast-utils.d.ts +94 -0
- package/src/utils/nx-devkit/ast-utils.js +596 -0
- package/src/utils/nx-devkit/route-utils.d.ts +19 -0
- package/src/utils/nx-devkit/route-utils.js +102 -0
- package/src/utils/nx-devkit/testing.d.ts +14 -0
- package/src/utils/nx-devkit/testing.js +84 -0
- package/src/utils/public-api.d.ts +2 -0
- package/src/utils/public-api.js +16 -0
- package/src/utils/targets.d.ts +2 -0
- package/src/utils/targets.js +17 -0
- package/src/utils/test-runners.d.ts +9 -0
- package/src/utils/test-runners.js +14 -0
- package/src/utils/types.d.ts +4 -0
- package/src/utils/types.js +2 -0
- package/src/utils/version-utils.d.ts +3 -0
- package/src/utils/version-utils.js +19 -0
- package/src/utils/versions.d.ts +25 -0
- package/src/utils/versions.js +28 -0
- package/tailwind.d.ts +6 -0
- package/tailwind.js +29 -0
- package/testing/index.d.ts +1 -0
- package/testing/index.js +6 -0
- package/testing/ng-package.json +6 -0
- package/testing/src/testing-utils.d.ts +31 -0
- package/testing/src/testing-utils.js +40 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
|
|
4
|
+
var with_module_federation_1 = require("../src/utils/mf/with-module-federation");
|
|
5
|
+
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
|
|
6
|
+
var with_module_federation_ssr_1 = require("../src/utils/mf/with-module-federation-ssr");
|
|
7
|
+
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return with_module_federation_ssr_1.withModuleFederationForSSR; } });
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"lib": {
|
|
4
|
+
"entryFile": "index.ts"
|
|
5
|
+
},
|
|
6
|
+
"dest": "../../build/packages/angular",
|
|
7
|
+
"deleteDestPath": false,
|
|
8
|
+
"allowedNonPeerDependencies": [
|
|
9
|
+
"@nx/",
|
|
10
|
+
"@angular-devkit",
|
|
11
|
+
"@angular-eslint/",
|
|
12
|
+
"@schematics",
|
|
13
|
+
"@phenomnomnominal/tsquery",
|
|
14
|
+
"@typescript-eslint/",
|
|
15
|
+
"chalk",
|
|
16
|
+
"ignore",
|
|
17
|
+
"minimatch",
|
|
18
|
+
"rxjs-for-await",
|
|
19
|
+
"webpack-merge",
|
|
20
|
+
"ts-node",
|
|
21
|
+
"tsconfig-paths",
|
|
22
|
+
"semver",
|
|
23
|
+
"webpack",
|
|
24
|
+
"http-server",
|
|
25
|
+
"magic-string",
|
|
26
|
+
"enquirer",
|
|
27
|
+
"find-cache-dir",
|
|
28
|
+
"piscina"
|
|
29
|
+
],
|
|
30
|
+
"keepLifecycleScripts": true
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nx/angular",
|
|
3
|
+
"version": "0.0.0-pr-22179-271588f",
|
|
4
|
+
"private": false,
|
|
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, 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
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/nrwl/nx.git",
|
|
9
|
+
"directory": "packages/angular"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"Monorepo",
|
|
13
|
+
"Angular",
|
|
14
|
+
"Jest",
|
|
15
|
+
"Cypress",
|
|
16
|
+
"CLI"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
"./migrations.json": "./migrations.json",
|
|
20
|
+
"./generators.json": "./generators.json",
|
|
21
|
+
"./executors.json": "./executors.json",
|
|
22
|
+
"./generators": "./generators.js",
|
|
23
|
+
"./executors": "./executors.js",
|
|
24
|
+
"./tailwind": "./tailwind.js",
|
|
25
|
+
"./module-federation": "./module-federation/index.js",
|
|
26
|
+
"./src/utils": "./src/utils/public-api.js",
|
|
27
|
+
"./plugins/component-testing": "./plugins/component-testing.js",
|
|
28
|
+
"./src/generators/utils": "./src/generators/utils/index.js",
|
|
29
|
+
"./src/generators/move/move-impl": "./src/generators/move/move-impl.js",
|
|
30
|
+
"./src/builders/*/schema.json": "./src/builders/*/schema.json",
|
|
31
|
+
"./src/builders/*.impl": "./src/builders/*.impl.js",
|
|
32
|
+
"./src/executors/*/schema.json": "./src/executors/*/schema.json",
|
|
33
|
+
"./src/executors/*.impl": "./src/executors/*.impl.js",
|
|
34
|
+
"./src/executors/*/compat": "./src/executors/*/compat.js",
|
|
35
|
+
"./package.json": {
|
|
36
|
+
"default": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./index.d.ts",
|
|
40
|
+
"esm2022": "./esm2022/nx-angular.mjs",
|
|
41
|
+
"esm": "./esm2022/nx-angular.mjs",
|
|
42
|
+
"default": "./fesm2022/nx-angular.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./mf": {
|
|
45
|
+
"types": "./mf/index.d.ts",
|
|
46
|
+
"esm2022": "./esm2022/mf/nx-angular-mf.mjs",
|
|
47
|
+
"esm": "./esm2022/mf/nx-angular-mf.mjs",
|
|
48
|
+
"default": "./fesm2022/nx-angular-mf.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./testing": {
|
|
51
|
+
"types": "./testing/index.d.ts",
|
|
52
|
+
"esm2022": "./esm2022/testing/nx-angular-testing.mjs",
|
|
53
|
+
"esm": "./esm2022/testing/nx-angular-testing.mjs",
|
|
54
|
+
"default": "./fesm2022/nx-angular-testing.mjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"author": "Victor Savkin",
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/nrwl/nx/issues"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://nx.dev",
|
|
63
|
+
"executors": "./executors.json",
|
|
64
|
+
"generators": "./generators.json",
|
|
65
|
+
"ng-update": {
|
|
66
|
+
"requirements": {},
|
|
67
|
+
"migrations": "./migrations.json"
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
71
|
+
"@typescript-eslint/type-utils": "^6.9.1",
|
|
72
|
+
"chalk": "^4.1.0",
|
|
73
|
+
"find-cache-dir": "^3.3.2",
|
|
74
|
+
"ignore": "^5.0.4",
|
|
75
|
+
"magic-string": "~0.30.2",
|
|
76
|
+
"minimatch": "9.0.3",
|
|
77
|
+
"semver": "^7.5.3",
|
|
78
|
+
"tslib": "^2.3.0",
|
|
79
|
+
"webpack": "^5.80.0",
|
|
80
|
+
"webpack-merge": "^5.8.0",
|
|
81
|
+
"@nx/devkit": "0.0.0-pr-22179-271588f",
|
|
82
|
+
"@nx/js": "0.0.0-pr-22179-271588f",
|
|
83
|
+
"@nx/eslint": "0.0.0-pr-22179-271588f",
|
|
84
|
+
"@nx/webpack": "0.0.0-pr-22179-271588f",
|
|
85
|
+
"@nx/web": "0.0.0-pr-22179-271588f",
|
|
86
|
+
"@nx/workspace": "0.0.0-pr-22179-271588f",
|
|
87
|
+
"piscina": "^4.2.1",
|
|
88
|
+
"@nrwl/angular": "0.0.0-pr-22179-271588f"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@angular-devkit/build-angular": ">= 15.0.0 < 18.0.0",
|
|
92
|
+
"@angular-devkit/core": ">= 15.0.0 < 18.0.0",
|
|
93
|
+
"@angular-devkit/schematics": ">= 15.0.0 < 18.0.0",
|
|
94
|
+
"@schematics/angular": ">= 15.0.0 < 18.0.0",
|
|
95
|
+
"esbuild": "^0.19.2",
|
|
96
|
+
"rxjs": "^6.5.3 || ^7.5.0"
|
|
97
|
+
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"esbuild": {
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"publishConfig": {
|
|
104
|
+
"access": "public"
|
|
105
|
+
},
|
|
106
|
+
"module": "fesm2022/nx-angular.mjs",
|
|
107
|
+
"typings": "index.d.ts",
|
|
108
|
+
"sideEffects": false
|
|
109
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NxComponentTestingOptions } from '@nx/cypress/plugins/cypress-preset';
|
|
2
|
+
/**
|
|
3
|
+
* Angular nx preset for Cypress Component Testing
|
|
4
|
+
*
|
|
5
|
+
* This preset contains the base configuration
|
|
6
|
+
* for your component tests that nx recommends.
|
|
7
|
+
* including a devServer that supports nx workspaces.
|
|
8
|
+
* you can easily extend this within your cypress config via spreading the preset
|
|
9
|
+
* @example
|
|
10
|
+
* export default defineConfig({
|
|
11
|
+
* component: {
|
|
12
|
+
* ...nxComponentTestingPreset(__filename)
|
|
13
|
+
* // add your own config here
|
|
14
|
+
* }
|
|
15
|
+
* })
|
|
16
|
+
*
|
|
17
|
+
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
18
|
+
* @param options override options
|
|
19
|
+
*/
|
|
20
|
+
export declare function nxComponentTestingPreset(pathToConfig: string, options?: NxComponentTestingOptions): any;
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nxComponentTestingPreset = void 0;
|
|
4
|
+
const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
|
|
5
|
+
const ct_helpers_1 = require("@nx/cypress/src/utils/ct-helpers");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const semver_1 = require("semver");
|
|
10
|
+
/**
|
|
11
|
+
* Angular nx preset for Cypress Component Testing
|
|
12
|
+
*
|
|
13
|
+
* This preset contains the base configuration
|
|
14
|
+
* for your component tests that nx recommends.
|
|
15
|
+
* including a devServer that supports nx workspaces.
|
|
16
|
+
* you can easily extend this within your cypress config via spreading the preset
|
|
17
|
+
* @example
|
|
18
|
+
* export default defineConfig({
|
|
19
|
+
* component: {
|
|
20
|
+
* ...nxComponentTestingPreset(__filename)
|
|
21
|
+
* // add your own config here
|
|
22
|
+
* }
|
|
23
|
+
* })
|
|
24
|
+
*
|
|
25
|
+
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
26
|
+
* @param options override options
|
|
27
|
+
*/
|
|
28
|
+
function nxComponentTestingPreset(pathToConfig, options) {
|
|
29
|
+
if (global.NX_GRAPH_CREATION || global.NX_CYPRESS_INIT_GENERATOR_RUNNING) {
|
|
30
|
+
// this is only used by plugins, so we don't need the component testing
|
|
31
|
+
// options, cast to any to avoid type errors
|
|
32
|
+
return (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig, {
|
|
33
|
+
testingType: 'component',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
let graph;
|
|
37
|
+
try {
|
|
38
|
+
graph = (0, devkit_1.readCachedProjectGraph)();
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
// don't want to strip indents so error stack has correct indentation
|
|
43
|
+
`Unable to read the project graph for component testing.
|
|
44
|
+
This is likely due to not running via nx. i.e. 'nx component-test my-project'.
|
|
45
|
+
Please open an issue if this error persists.
|
|
46
|
+
${e.stack ? e.stack : e}`);
|
|
47
|
+
}
|
|
48
|
+
const ctProjectConfig = (0, ct_helpers_1.getProjectConfigByPath)(graph, pathToConfig);
|
|
49
|
+
const ctConfigurationName = process.env.NX_CYPRESS_TARGET_CONFIGURATION;
|
|
50
|
+
const ctContext = (0, ct_helpers_1.createExecutorContext)(graph, ctProjectConfig.targets, ctProjectConfig.name, options?.ctTargetName || 'component-test', ctConfigurationName);
|
|
51
|
+
const buildTarget = options?.buildTarget
|
|
52
|
+
? (0, devkit_1.parseTargetString)(options.buildTarget, graph)
|
|
53
|
+
: // for backwards compat, if no buildTargetin the preset options, get it from the target options
|
|
54
|
+
getBuildableTarget(ctContext);
|
|
55
|
+
if (!buildTarget.project && !graph.nodes?.[buildTarget.project]?.data) {
|
|
56
|
+
throw new Error((0, devkit_1.stripIndents) `Unable to find project configuration for build target.
|
|
57
|
+
Project Name? ${buildTarget.project}
|
|
58
|
+
Has project config? ${!!graph.nodes?.[buildTarget.project]?.data}`);
|
|
59
|
+
}
|
|
60
|
+
const fromWorkspaceRoot = (0, path_1.relative)(ctContext.root, pathToConfig);
|
|
61
|
+
const normalizedFromWorkspaceRootPath = (0, fs_1.lstatSync)(pathToConfig).isFile()
|
|
62
|
+
? (0, path_1.dirname)(fromWorkspaceRoot)
|
|
63
|
+
: fromWorkspaceRoot;
|
|
64
|
+
const offset = isOffsetNeeded(ctContext, ctProjectConfig)
|
|
65
|
+
? (0, devkit_1.offsetFromRoot)(normalizedFromWorkspaceRootPath)
|
|
66
|
+
: undefined;
|
|
67
|
+
const buildContext = (0, ct_helpers_1.createExecutorContext)(graph, graph.nodes[buildTarget.project]?.data.targets, buildTarget.project, buildTarget.target, buildTarget.configuration);
|
|
68
|
+
const buildableProjectConfig = normalizeBuildTargetOptions(buildContext, ctContext, offset);
|
|
69
|
+
return {
|
|
70
|
+
...(0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig, { testingType: 'component' }),
|
|
71
|
+
// NOTE: cannot use a glob pattern since it will break cypress generated tsconfig.
|
|
72
|
+
specPattern: ['src/**/*.cy.ts', 'src/**/*.cy.js'],
|
|
73
|
+
// Cy v12.17.0+ does not work with aboslute paths for index file
|
|
74
|
+
// but does with relative pathing, since relative path is the default location, we can omit it
|
|
75
|
+
indexHtmlFile: requiresAbsolutePath()
|
|
76
|
+
? (0, devkit_1.joinPathFragments)(ctContext.root, ctProjectConfig.root, 'cypress', 'support', 'component-index.html')
|
|
77
|
+
: undefined,
|
|
78
|
+
devServer: {
|
|
79
|
+
// cypress uses string union type,
|
|
80
|
+
// need to use const to prevent typing to string
|
|
81
|
+
...{
|
|
82
|
+
framework: 'angular',
|
|
83
|
+
bundler: 'webpack',
|
|
84
|
+
},
|
|
85
|
+
options: {
|
|
86
|
+
projectConfig: buildableProjectConfig,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
exports.nxComponentTestingPreset = nxComponentTestingPreset;
|
|
92
|
+
function getBuildableTarget(ctContext) {
|
|
93
|
+
const targets = ctContext.projectGraph.nodes[ctContext.projectName]?.data?.targets;
|
|
94
|
+
const targetConfig = targets?.[ctContext.targetName];
|
|
95
|
+
if (!targetConfig) {
|
|
96
|
+
throw new Error((0, devkit_1.stripIndents) `Unable to find component testing target configuration in project '${ctContext.projectName}'.
|
|
97
|
+
Has targets? ${!!targets}
|
|
98
|
+
Has target name? ${ctContext.targetName}
|
|
99
|
+
Has ct project name? ${ctContext.projectName}
|
|
100
|
+
`);
|
|
101
|
+
}
|
|
102
|
+
const cypressCtOptions = (0, devkit_1.readTargetOptions)({
|
|
103
|
+
project: ctContext.projectName,
|
|
104
|
+
target: ctContext.targetName,
|
|
105
|
+
configuration: ctContext.configurationName,
|
|
106
|
+
}, ctContext);
|
|
107
|
+
if (!cypressCtOptions.devServerTarget) {
|
|
108
|
+
throw new Error(`Unable to find the 'devServerTarget' executor option in the '${ctContext.targetName}' target of the '${ctContext.projectName}' project`);
|
|
109
|
+
}
|
|
110
|
+
return (0, devkit_1.parseTargetString)(cypressCtOptions.devServerTarget, ctContext.projectGraph);
|
|
111
|
+
}
|
|
112
|
+
function normalizeBuildTargetOptions(buildContext, ctContext, offset) {
|
|
113
|
+
const options = (0, devkit_1.readTargetOptions)({
|
|
114
|
+
project: buildContext.projectName,
|
|
115
|
+
target: buildContext.targetName,
|
|
116
|
+
configuration: buildContext.configurationName,
|
|
117
|
+
}, buildContext);
|
|
118
|
+
const buildOptions = withSchemaDefaults(options);
|
|
119
|
+
// cypress creates a tsconfig if one isn't preset
|
|
120
|
+
// that contains all the support required for angular and component tests
|
|
121
|
+
delete buildOptions.tsConfig;
|
|
122
|
+
if (offset) {
|
|
123
|
+
// polyfill entries might be local files or files that are resolved from node_modules
|
|
124
|
+
// like zone.js.
|
|
125
|
+
// prevents error from webpack saying can't find <offset>/zone.js.
|
|
126
|
+
const handlePolyfillPath = (polyfill) => {
|
|
127
|
+
const maybeFullPath = (0, path_1.join)(ctContext.root, polyfill.split('/').join(path_1.sep));
|
|
128
|
+
if ((0, fs_1.existsSync)(maybeFullPath)) {
|
|
129
|
+
return (0, devkit_1.joinPathFragments)(offset, polyfill);
|
|
130
|
+
}
|
|
131
|
+
return polyfill;
|
|
132
|
+
};
|
|
133
|
+
// paths need to be unix paths for angular devkit
|
|
134
|
+
if (buildOptions.polyfills) {
|
|
135
|
+
buildOptions.polyfills =
|
|
136
|
+
Array.isArray(buildOptions.polyfills) &&
|
|
137
|
+
buildOptions.polyfills.length > 0
|
|
138
|
+
? buildOptions.polyfills.map((p) => handlePolyfillPath(p))
|
|
139
|
+
: handlePolyfillPath(buildOptions.polyfills);
|
|
140
|
+
}
|
|
141
|
+
buildOptions.main = (0, devkit_1.joinPathFragments)(offset, buildOptions.main);
|
|
142
|
+
buildOptions.index =
|
|
143
|
+
typeof buildOptions.index === 'string'
|
|
144
|
+
? (0, devkit_1.joinPathFragments)(offset, buildOptions.index)
|
|
145
|
+
: {
|
|
146
|
+
...buildOptions.index,
|
|
147
|
+
input: (0, devkit_1.joinPathFragments)(offset, buildOptions.index.input),
|
|
148
|
+
};
|
|
149
|
+
buildOptions.fileReplacements = buildOptions.fileReplacements.map((fr) => {
|
|
150
|
+
fr.replace = (0, devkit_1.joinPathFragments)(offset, fr.replace);
|
|
151
|
+
fr.with = (0, devkit_1.joinPathFragments)(offset, fr.with);
|
|
152
|
+
return fr;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
// if the ct project isn't being used in the build project
|
|
156
|
+
// then we don't want to have the assets/scripts/styles be included to
|
|
157
|
+
// prevent inclusion of unintended stuff like tailwind
|
|
158
|
+
if (buildContext.projectName === ctContext.projectName ||
|
|
159
|
+
(0, ct_helpers_1.isCtProjectUsingBuildProject)(ctContext.projectGraph, buildContext.projectName, ctContext.projectName)) {
|
|
160
|
+
if (offset) {
|
|
161
|
+
buildOptions.assets = buildOptions.assets.map((asset) => {
|
|
162
|
+
return typeof asset === 'string'
|
|
163
|
+
? (0, devkit_1.joinPathFragments)(offset, asset)
|
|
164
|
+
: { ...asset, input: (0, devkit_1.joinPathFragments)(offset, asset.input) };
|
|
165
|
+
});
|
|
166
|
+
buildOptions.styles = buildOptions.styles.map((style) => {
|
|
167
|
+
return typeof style === 'string'
|
|
168
|
+
? (0, devkit_1.joinPathFragments)(offset, style)
|
|
169
|
+
: { ...style, input: (0, devkit_1.joinPathFragments)(offset, style.input) };
|
|
170
|
+
});
|
|
171
|
+
buildOptions.scripts = buildOptions.scripts.map((script) => {
|
|
172
|
+
return typeof script === 'string'
|
|
173
|
+
? (0, devkit_1.joinPathFragments)(offset, script)
|
|
174
|
+
: { ...script, input: (0, devkit_1.joinPathFragments)(offset, script.input) };
|
|
175
|
+
});
|
|
176
|
+
if (buildOptions.stylePreprocessorOptions?.includePaths.length > 0) {
|
|
177
|
+
buildOptions.stylePreprocessorOptions = {
|
|
178
|
+
includePaths: buildOptions.stylePreprocessorOptions.includePaths.map((path) => {
|
|
179
|
+
return (0, devkit_1.joinPathFragments)(offset, path);
|
|
180
|
+
}),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
const stylePath = getTempStylesForTailwind(ctContext);
|
|
187
|
+
buildOptions.styles = stylePath ? [stylePath] : [];
|
|
188
|
+
buildOptions.assets = [];
|
|
189
|
+
buildOptions.scripts = [];
|
|
190
|
+
buildOptions.stylePreprocessorOptions = { includePaths: [] };
|
|
191
|
+
}
|
|
192
|
+
const config = buildContext.projectGraph.nodes[buildContext.projectName]?.data;
|
|
193
|
+
if (!config.sourceRoot) {
|
|
194
|
+
devkit_1.logger.warn((0, devkit_1.stripIndents) `Unable to find the 'sourceRoot' in the project configuration.
|
|
195
|
+
Will set 'sourceRoot' to '${config.root}/src'
|
|
196
|
+
Note: this may fail, setting the correct 'sourceRoot' for ${buildContext.projectName} in the project.json file will ensure the correct value is used.`);
|
|
197
|
+
config.sourceRoot = (0, devkit_1.joinPathFragments)(config.root, 'src');
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
root: offset ? (0, devkit_1.joinPathFragments)(offset, config.root) : config.root,
|
|
201
|
+
sourceRoot: offset
|
|
202
|
+
? (0, devkit_1.joinPathFragments)(offset, config.sourceRoot)
|
|
203
|
+
: config.sourceRoot,
|
|
204
|
+
buildOptions: {
|
|
205
|
+
...buildOptions,
|
|
206
|
+
// this property is only valid for cy v12.9.0+
|
|
207
|
+
workspaceRoot: offset ? undefined : ctContext.root,
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function withSchemaDefaults(options) {
|
|
212
|
+
if (!options.main && !options.browser) {
|
|
213
|
+
throw new Error('Missing executor options "main" and "browser"');
|
|
214
|
+
}
|
|
215
|
+
if (!options.index) {
|
|
216
|
+
throw new Error('Missing executor options "index"');
|
|
217
|
+
}
|
|
218
|
+
if (!options.tsConfig) {
|
|
219
|
+
throw new Error('Missing executor options "tsConfig"');
|
|
220
|
+
}
|
|
221
|
+
// cypress defaults aot to false so we cannot use buildOptimizer
|
|
222
|
+
// otherwise the 'buildOptimizer' cannot be used without 'aot' error is thrown
|
|
223
|
+
options.buildOptimizer = false;
|
|
224
|
+
options.aot = false;
|
|
225
|
+
options.assets ??= [];
|
|
226
|
+
options.allowedCommonJsDependencies ??= [];
|
|
227
|
+
options.budgets ??= [];
|
|
228
|
+
options.commonChunk ??= true;
|
|
229
|
+
options.crossOrigin ??= 'none';
|
|
230
|
+
options.deleteOutputPath ??= true;
|
|
231
|
+
options.extractLicenses ??= true;
|
|
232
|
+
options.fileReplacements ??= [];
|
|
233
|
+
options.inlineStyleLanguage ??= 'css';
|
|
234
|
+
options.i18nDuplicateTranslation ??= 'warning';
|
|
235
|
+
options.outputHashing ??= 'none';
|
|
236
|
+
options.progress ??= true;
|
|
237
|
+
options.scripts ??= [];
|
|
238
|
+
options.main ??= options.browser;
|
|
239
|
+
return options;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @returns a path from the workspace root to a temp file containing the base tailwind setup
|
|
243
|
+
* if tailwind is being used in the project root or workspace root
|
|
244
|
+
* this file should get cleaned up via the cypress executor
|
|
245
|
+
*/
|
|
246
|
+
function getTempStylesForTailwind(ctExecutorContext) {
|
|
247
|
+
const ctProjectConfig = ctExecutorContext.projectGraph.nodes[ctExecutorContext.projectName]?.data;
|
|
248
|
+
// angular only supports `tailwind.config.{js,cjs}`
|
|
249
|
+
const ctProjectTailwindConfig = (0, path_1.join)(ctExecutorContext.root, ctProjectConfig.root, 'tailwind.config');
|
|
250
|
+
const exts = ['js', 'cjs'];
|
|
251
|
+
const isTailWindInCtProject = exts.some((ext) => (0, fs_1.existsSync)(`${ctProjectTailwindConfig}.${ext}`));
|
|
252
|
+
const rootTailwindPath = (0, path_1.join)(ctExecutorContext.root, 'tailwind.config');
|
|
253
|
+
const isTailWindInRoot = exts.some((ext) => (0, fs_1.existsSync)(`${rootTailwindPath}.${ext}`));
|
|
254
|
+
if (isTailWindInRoot || isTailWindInCtProject) {
|
|
255
|
+
const pathToStyle = (0, ct_helpers_1.getTempTailwindPath)(ctExecutorContext);
|
|
256
|
+
try {
|
|
257
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(pathToStyle), { recursive: true });
|
|
258
|
+
(0, fs_1.writeFileSync)(pathToStyle, `
|
|
259
|
+
@tailwind base;
|
|
260
|
+
@tailwind components;
|
|
261
|
+
@tailwind utilities;
|
|
262
|
+
`, { encoding: 'utf-8' });
|
|
263
|
+
return pathToStyle;
|
|
264
|
+
}
|
|
265
|
+
catch (makeTmpFileError) {
|
|
266
|
+
devkit_1.logger.warn((0, devkit_1.stripIndents) `Issue creating a temp file for tailwind styles. Defaulting to no tailwind setup.
|
|
267
|
+
Temp file path? ${pathToStyle}`);
|
|
268
|
+
devkit_1.logger.error(makeTmpFileError);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function isOffsetNeeded(ctExecutorContext, ctProjectConfig) {
|
|
273
|
+
try {
|
|
274
|
+
const supportsWorkspaceRoot = isCyVersionGreaterThanOrEqual('12.9.0');
|
|
275
|
+
// if using cypress <v12.9.0 then we require the offset
|
|
276
|
+
if (!supportsWorkspaceRoot) {
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
if (ctProjectConfig.projectType === 'library' &&
|
|
280
|
+
// angular will only see this config if the library root is the build project config root
|
|
281
|
+
// otherwise it will be set to the buildTarget root which is the app root where this config doesn't exist
|
|
282
|
+
// causing tailwind styles from the libs project root to not work
|
|
283
|
+
['js', 'cjs'].some((ext) => (0, fs_1.existsSync)((0, path_1.join)(ctExecutorContext.root, ctProjectConfig.root, `tailwind.config.${ext}`)))) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
catch (e) {
|
|
289
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
290
|
+
devkit_1.logger.error(e);
|
|
291
|
+
}
|
|
292
|
+
// unable to determine if we don't require an offset
|
|
293
|
+
// safest to assume we do
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* check if the cypress version is able to understand absolute paths to the indexHtmlFile option
|
|
299
|
+
* this is required for nx to work with cypress <v12.17.0 since the relative pathing is causes issues
|
|
300
|
+
* with invalid pathing.
|
|
301
|
+
* v12.17.0+ works with relative pathing
|
|
302
|
+
*
|
|
303
|
+
* if there is an error thrown then we assume it is an older version of cypress and use the absolute path
|
|
304
|
+
* as that was supported for longer.
|
|
305
|
+
*
|
|
306
|
+
* */
|
|
307
|
+
function requiresAbsolutePath() {
|
|
308
|
+
try {
|
|
309
|
+
return !isCyVersionGreaterThanOrEqual('12.17.0');
|
|
310
|
+
}
|
|
311
|
+
catch (e) {
|
|
312
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
313
|
+
devkit_1.logger.error(e);
|
|
314
|
+
}
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Checks if the install cypress version is greater than or equal to the provided version.
|
|
320
|
+
* Does not catch errors as any custom logic for error handling is required on consumer side.
|
|
321
|
+
* */
|
|
322
|
+
function isCyVersionGreaterThanOrEqual(version) {
|
|
323
|
+
const { version: cyVersion = null } = require('cypress/package.json');
|
|
324
|
+
return !!cyVersion && (0, semver_1.gte)(cyVersion, version);
|
|
325
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Schema } from './schema';
|
|
2
|
+
export declare function executeDevServerBuilder(rawOptions: Schema, context: import('@angular-devkit/architect').BuilderContext): import("rxjs").Observable<import("@angular-devkit/build-angular").DevServerBuilderOutput>;
|
|
3
|
+
declare const _default: any;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeDevServerBuilder = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const js_1 = require("@nx/js");
|
|
6
|
+
const webpack_nx_build_coordination_plugin_1 = require("@nx/webpack/src/plugins/webpack-nx-build-coordination-plugin");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const operators_1 = require("nx/src/project-graph/operators");
|
|
9
|
+
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const rxjs_1 = require("rxjs");
|
|
12
|
+
const operators_2 = require("rxjs/operators");
|
|
13
|
+
const angular_version_utils_1 = require("../../executors/utilities/angular-version-utils");
|
|
14
|
+
const esbuild_extensions_1 = require("../../executors/utilities/esbuild-extensions");
|
|
15
|
+
const patch_builder_context_1 = require("../../executors/utilities/patch-builder-context");
|
|
16
|
+
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
17
|
+
const webpack_1 = require("../utilities/webpack");
|
|
18
|
+
const lib_1 = require("./lib");
|
|
19
|
+
function executeDevServerBuilder(rawOptions, context) {
|
|
20
|
+
(0, lib_1.validateOptions)(rawOptions);
|
|
21
|
+
process.env.NX_TSCONFIG_PATH = (0, js_1.getRootTsConfigPath)();
|
|
22
|
+
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
23
|
+
const parsedBuildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, {
|
|
24
|
+
cwd: context.currentDirectory,
|
|
25
|
+
projectGraph: (0, devkit_1.readCachedProjectGraph)(),
|
|
26
|
+
projectName: context.target.project,
|
|
27
|
+
root: context.workspaceRoot,
|
|
28
|
+
isVerbose: false,
|
|
29
|
+
});
|
|
30
|
+
const browserTargetProjectConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(parsedBuildTarget.project);
|
|
31
|
+
const buildTarget = browserTargetProjectConfiguration.targets[parsedBuildTarget.target];
|
|
32
|
+
const buildTargetOptions = {
|
|
33
|
+
...buildTarget.options,
|
|
34
|
+
...(parsedBuildTarget.configuration
|
|
35
|
+
? buildTarget.configurations[parsedBuildTarget.configuration]
|
|
36
|
+
: buildTarget.defaultConfiguration
|
|
37
|
+
? buildTarget.configurations[buildTarget.defaultConfiguration]
|
|
38
|
+
: {}),
|
|
39
|
+
};
|
|
40
|
+
const buildLibsFromSource = options.buildLibsFromSource ??
|
|
41
|
+
buildTargetOptions.buildLibsFromSource ??
|
|
42
|
+
true;
|
|
43
|
+
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
|
|
44
|
+
process.env.NX_BUILD_TARGET = options.buildTarget;
|
|
45
|
+
let pathToWebpackConfig;
|
|
46
|
+
if (buildTargetOptions.customWebpackConfig?.path) {
|
|
47
|
+
pathToWebpackConfig = (0, devkit_1.joinPathFragments)(context.workspaceRoot, buildTargetOptions.customWebpackConfig.path);
|
|
48
|
+
if (pathToWebpackConfig && !(0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
49
|
+
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}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const normalizedIndexHtmlTransformer = buildTargetOptions.indexHtmlTransformer ??
|
|
53
|
+
buildTargetOptions.indexFileTransformer;
|
|
54
|
+
let pathToIndexFileTransformer;
|
|
55
|
+
if (normalizedIndexHtmlTransformer) {
|
|
56
|
+
pathToIndexFileTransformer = (0, devkit_1.joinPathFragments)(context.workspaceRoot, normalizedIndexHtmlTransformer);
|
|
57
|
+
if (pathToIndexFileTransformer && !(0, fs_1.existsSync)(pathToIndexFileTransformer)) {
|
|
58
|
+
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}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
let dependencies;
|
|
62
|
+
if (!buildLibsFromSource) {
|
|
63
|
+
const { tsConfigPath, dependencies: foundDependencies } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(buildTargetOptions.tsConfig, context, {
|
|
64
|
+
target: parsedBuildTarget.target,
|
|
65
|
+
});
|
|
66
|
+
dependencies = foundDependencies;
|
|
67
|
+
const relativeTsConfigPath = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
|
|
68
|
+
// We can't just pass the tsconfig path in memory to the angular builder
|
|
69
|
+
// function because we can't pass the build target options to it, the build
|
|
70
|
+
// targets options will be retrieved by the builder from the project
|
|
71
|
+
// configuration. Therefore, we patch the method in the context to retrieve
|
|
72
|
+
// the target options to overwrite the tsconfig path to use the generated
|
|
73
|
+
// one with the updated path mappings.
|
|
74
|
+
const originalGetTargetOptions = context.getTargetOptions;
|
|
75
|
+
context.getTargetOptions = async (target) => {
|
|
76
|
+
const options = await originalGetTargetOptions(target);
|
|
77
|
+
options.tsConfig = relativeTsConfigPath;
|
|
78
|
+
return options;
|
|
79
|
+
};
|
|
80
|
+
// The buildTargetConfiguration also needs to use the generated tsconfig path
|
|
81
|
+
// otherwise the build will fail if customWebpack function/file is referencing
|
|
82
|
+
// local libs. This synchronize the behavior with webpack-browser and
|
|
83
|
+
// webpack-server implementation.
|
|
84
|
+
buildTargetOptions.tsConfig = relativeTsConfigPath;
|
|
85
|
+
}
|
|
86
|
+
const delegateBuilderOptions = getDelegateBuilderOptions(options);
|
|
87
|
+
const isUsingWebpackBuilder = ![
|
|
88
|
+
'@angular-devkit/build-angular:application',
|
|
89
|
+
'@angular-devkit/build-angular:browser-esbuild',
|
|
90
|
+
'@nx/angular:application',
|
|
91
|
+
'@nx/angular:browser-esbuild',
|
|
92
|
+
].includes(buildTarget.executor);
|
|
93
|
+
/**
|
|
94
|
+
* The Angular CLI dev-server builder make some decisions based on the build
|
|
95
|
+
* target builder but it only considers `@angular-devkit/build-angular:*`
|
|
96
|
+
* builders. Since we are using a custom builder, we patch the context to
|
|
97
|
+
* handle `@nx/angular:*` executors.
|
|
98
|
+
*/
|
|
99
|
+
(0, patch_builder_context_1.patchBuilderContext)(context, !isUsingWebpackBuilder, parsedBuildTarget);
|
|
100
|
+
return (0, rxjs_1.combineLatest)([
|
|
101
|
+
(0, rxjs_1.from)(Promise.resolve().then(() => require('@angular-devkit/build-angular'))),
|
|
102
|
+
(0, rxjs_1.from)((0, esbuild_extensions_1.loadPlugins)(buildTargetOptions.plugins, buildTargetOptions.tsConfig)),
|
|
103
|
+
(0, rxjs_1.from)((0, esbuild_extensions_1.loadMiddleware)(options.esbuildMiddleware, buildTargetOptions.tsConfig)),
|
|
104
|
+
(0, rxjs_1.from)(loadIndexHtmlFileTransformer(pathToIndexFileTransformer, buildTargetOptions.tsConfig, context, isUsingWebpackBuilder)),
|
|
105
|
+
]).pipe((0, operators_2.switchMap)(([{ executeDevServerBuilder }, plugins, middleware, indexHtmlTransformer,]) => executeDevServerBuilder(delegateBuilderOptions, context, {
|
|
106
|
+
webpackConfiguration: isUsingWebpackBuilder
|
|
107
|
+
? async (baseWebpackConfig) => {
|
|
108
|
+
if (!buildLibsFromSource) {
|
|
109
|
+
const workspaceDependencies = dependencies
|
|
110
|
+
.filter((dep) => !(0, operators_1.isNpmProject)(dep.node))
|
|
111
|
+
.map((dep) => dep.node.name);
|
|
112
|
+
// default for `nx run-many` is --all projects
|
|
113
|
+
// by passing an empty string for --projects, run-many will default to
|
|
114
|
+
// run the target for all projects.
|
|
115
|
+
// This will occur when workspaceDependencies = []
|
|
116
|
+
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(',')}`));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (!pathToWebpackConfig) {
|
|
123
|
+
return baseWebpackConfig;
|
|
124
|
+
}
|
|
125
|
+
return (0, webpack_1.mergeCustomWebpackConfig)(baseWebpackConfig, pathToWebpackConfig, buildTargetOptions, context.target);
|
|
126
|
+
}
|
|
127
|
+
: undefined,
|
|
128
|
+
...(indexHtmlTransformer
|
|
129
|
+
? {
|
|
130
|
+
indexHtml: indexHtmlTransformer,
|
|
131
|
+
}
|
|
132
|
+
: {}),
|
|
133
|
+
}, {
|
|
134
|
+
buildPlugins: plugins,
|
|
135
|
+
middleware,
|
|
136
|
+
})));
|
|
137
|
+
}
|
|
138
|
+
exports.executeDevServerBuilder = executeDevServerBuilder;
|
|
139
|
+
exports.default = require('@angular-devkit/architect').createBuilder(executeDevServerBuilder);
|
|
140
|
+
function getDelegateBuilderOptions(options) {
|
|
141
|
+
const delegateBuilderOptions = {
|
|
142
|
+
...options,
|
|
143
|
+
};
|
|
144
|
+
const { major: angularMajorVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
145
|
+
if (angularMajorVersion <= 17) {
|
|
146
|
+
delegateBuilderOptions.browserTarget = delegateBuilderOptions.buildTarget;
|
|
147
|
+
delete delegateBuilderOptions.buildTarget;
|
|
148
|
+
}
|
|
149
|
+
// delete extra option not supported by the delegate builder
|
|
150
|
+
delete delegateBuilderOptions.buildLibsFromSource;
|
|
151
|
+
return delegateBuilderOptions;
|
|
152
|
+
}
|
|
153
|
+
async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig, context, isUsingWebpackBuilder) {
|
|
154
|
+
if (!pathToIndexFileTransformer) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
return isUsingWebpackBuilder
|
|
158
|
+
? (0, webpack_1.resolveIndexHtmlTransformer)(pathToIndexFileTransformer, tsConfig, context.target)
|
|
159
|
+
: await (0, esbuild_extensions_1.loadIndexHtmlTransformer)(pathToIndexFileTransformer, tsConfig);
|
|
160
|
+
}
|