@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,604 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.E2eMigrator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const eslint_1 = require("@nx/eslint");
|
|
6
|
+
const js_1 = require("@nx/js");
|
|
7
|
+
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const file_change_recorder_1 = require("../../../../utils/file-change-recorder");
|
|
10
|
+
const versions_1 = require("../../../../utils/versions");
|
|
11
|
+
const project_migrator_1 = require("./project.migrator");
|
|
12
|
+
const supportedTargets = {
|
|
13
|
+
e2e: {
|
|
14
|
+
acceptMultipleDefinitions: true,
|
|
15
|
+
builders: [
|
|
16
|
+
'@angular-devkit/build-angular:protractor',
|
|
17
|
+
'@cypress/schematic:cypress',
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const cypressConfig = {
|
|
22
|
+
v9OrLess: {
|
|
23
|
+
srcPaths: ['supportFile', 'supportFolder', 'fixturesFolder'],
|
|
24
|
+
distPaths: ['videosFolder', 'screenshotsFolder', 'downloadsFolder'],
|
|
25
|
+
globPatterns: ['excludeSpecPattern', 'specPattern'],
|
|
26
|
+
},
|
|
27
|
+
v10OrMore: {
|
|
28
|
+
srcPaths: ['supportFile', 'supportFolder', 'fixturesFolder'],
|
|
29
|
+
distPaths: ['videosFolder', 'screenshotsFolder', 'downloadsFolder'],
|
|
30
|
+
globPatterns: ['excludeSpecPattern', 'specPattern'],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
class E2eMigrator extends project_migrator_1.ProjectMigrator {
|
|
34
|
+
constructor(tree, options, project, lintTargetName, logger) {
|
|
35
|
+
super(tree, options, supportedTargets, project, 'apps', logger);
|
|
36
|
+
this.lintTargetName = lintTargetName;
|
|
37
|
+
this.appConfig = project.config;
|
|
38
|
+
this.appName = this.project.name;
|
|
39
|
+
// TODO(leo): temporary keep restriction to support projects with an "e2e" target,
|
|
40
|
+
// will be lifted soon when the migration is split per-builder and proper support
|
|
41
|
+
// for multiple targets for the same builder is added
|
|
42
|
+
this.targetNames.e2e = this.appConfig.targets?.e2e ? 'e2e' : undefined;
|
|
43
|
+
this.initialize();
|
|
44
|
+
}
|
|
45
|
+
async migrate() {
|
|
46
|
+
if (!this.targetNames.e2e) {
|
|
47
|
+
this.logger.info('No e2e project was migrated because there was no "e2e" target declared in the "angular.json".');
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (this.shouldSkipTargetTypeMigration('e2e')) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (this.isProtractorE2eProject()) {
|
|
54
|
+
await this.migrateProtractorE2eProject();
|
|
55
|
+
}
|
|
56
|
+
else if (this.isCypressE2eProject()) {
|
|
57
|
+
await this.migrateCypressE2eProject();
|
|
58
|
+
}
|
|
59
|
+
const tsConfig = (0, devkit_1.joinPathFragments)(this.projectConfig.root, 'tsconfig.json');
|
|
60
|
+
if (!this.tree.exists(tsConfig)) {
|
|
61
|
+
this.logger.warn('A "tsconfig.json" file could not be found for the e2e project. Skipping updating the tsConfig file.');
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const rootOffset = (0, devkit_1.offsetFromRoot)(this.project.newRoot);
|
|
65
|
+
(0, devkit_1.updateJson)(this.tree, tsConfig, (json) => {
|
|
66
|
+
json.extends = `${rootOffset}${(0, js_1.getRootTsConfigPathInTree)(this.tree)}`;
|
|
67
|
+
json.compilerOptions = {
|
|
68
|
+
...json.compilerOptions,
|
|
69
|
+
outDir: `${rootOffset}dist/out-tsc`,
|
|
70
|
+
};
|
|
71
|
+
return json;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
validate() {
|
|
75
|
+
if (!this.targetNames.e2e) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
const e2eTarget = this.projectConfig.targets[this.targetNames.e2e];
|
|
79
|
+
if (!e2eTarget.options) {
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
message: `The "${this.targetNames.e2e}" target is not specifying any options. The target will be skipped.`,
|
|
83
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
84
|
+
`revert the migration, ensure the "${this.appName}.architect.e2e.options" is correctly set or remove the target if ` +
|
|
85
|
+
`it is not valid, and run the migration again.`,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
if (this.isProtractorE2eProject()) {
|
|
90
|
+
if (!e2eTarget.options.protractorConfig) {
|
|
91
|
+
return [
|
|
92
|
+
{
|
|
93
|
+
message: 'The "e2e" target is using the "@angular-devkit/build-angular:protractor" builder but the Protractor config file is not specified. The target will be skipped.',
|
|
94
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
95
|
+
`revert the migration, ensure the "${this.appName}.architect.e2e.options.protractorConfig" is correctly set ` +
|
|
96
|
+
`or remove the "${this.appName}.architect.e2e" target if it is not valid, and run the migration again.`,
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
if (!this.tree.exists(e2eTarget.options.protractorConfig)) {
|
|
101
|
+
return [
|
|
102
|
+
{
|
|
103
|
+
message: `The specified Protractor config file "${e2eTarget.options.protractorConfig}" in the "e2e" target could not be found. The target will be skipped.`,
|
|
104
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
105
|
+
`revert the migration, ensure the "${this.appName}.architect.e2e.options.protractorConfig" is set to a valid path ` +
|
|
106
|
+
`or remove the "${this.appName}.architect.e2e" target if it is not valid, and run the migration again.`,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
if (this.isCypressE2eProject()) {
|
|
113
|
+
const configFile = this.projectConfig.targets[this.targetNames.e2e].options?.configFile;
|
|
114
|
+
if (configFile === undefined && !this.getOldCypressConfigFilePath()) {
|
|
115
|
+
const expectedConfigFile = this.cypressInstalledVersion < 10
|
|
116
|
+
? 'cypress.json'
|
|
117
|
+
: 'cypress.config.{ts,js,mjs,cjs}';
|
|
118
|
+
return [
|
|
119
|
+
{
|
|
120
|
+
message: `The "e2e" target is using the "@cypress/schematic:cypress" builder but the "configFile" option is not specified ` +
|
|
121
|
+
`and a "${expectedConfigFile}" file could not be found at the project root. The target will be skipped.`,
|
|
122
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
123
|
+
`revert the migration, ensure the "${this.appName}.architect.e2e.options.configFile" option is set to a valid path ` +
|
|
124
|
+
`or that a "${expectedConfigFile}" file exists at the project root or remove the "${this.appName}.architect.e2e" target ` +
|
|
125
|
+
`if it is not valid, and run the migration again.`,
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
else if (configFile && !this.tree.exists(configFile)) {
|
|
130
|
+
return [
|
|
131
|
+
{
|
|
132
|
+
message: `The specified Cypress config file "${configFile}" in the "e2e" target could not be found. The target will be skipped.`,
|
|
133
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
134
|
+
`revert the migration, ensure the "${this.appName}.architect.e2e.options.configFile" option is set to a valid path ` +
|
|
135
|
+
`or remove the "${this.appName}.architect.e2e" target if it is not valid, and run the migration again.`,
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
if (!this.tree.exists((0, devkit_1.joinPathFragments)(this.project.oldRoot, 'cypress'))) {
|
|
140
|
+
return [
|
|
141
|
+
{
|
|
142
|
+
message: `The "e2e" target is using the "@cypress/schematic:cypress" builder but the "cypress" directory could not be found at the project root. The target will be skipped.`,
|
|
143
|
+
hint: `Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could ` +
|
|
144
|
+
`revert the migration, ensure the "cypress" directory exists in the project root or remove the "e2e" target if it is not ` +
|
|
145
|
+
`valid, and run the migration again.`,
|
|
146
|
+
},
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
initialize() {
|
|
154
|
+
if (!this.targetNames.e2e) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.isProjectUsingEsLint =
|
|
158
|
+
Boolean(this.lintTargetName) ||
|
|
159
|
+
this.tree.exists((0, devkit_1.joinPathFragments)(this.appConfig.root, '.eslintrc.json'));
|
|
160
|
+
const name = this.project.name.endsWith('-e2e')
|
|
161
|
+
? this.project.name
|
|
162
|
+
: `${this.project.name}-e2e`;
|
|
163
|
+
const newRoot = (0, devkit_1.joinPathFragments)('apps', name);
|
|
164
|
+
const newSourceRoot = (0, devkit_1.joinPathFragments)('apps', name, 'src');
|
|
165
|
+
if (this.isProtractorE2eProject()) {
|
|
166
|
+
this.project = {
|
|
167
|
+
...this.project,
|
|
168
|
+
name,
|
|
169
|
+
oldRoot: (0, devkit_1.joinPathFragments)(this.project.oldRoot, 'e2e'),
|
|
170
|
+
newRoot,
|
|
171
|
+
newSourceRoot,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
else if (this.isCypressE2eProject()) {
|
|
175
|
+
(0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
|
|
176
|
+
const { installedCypressVersion, } = require('@nx/cypress/src/utils/cypress-version');
|
|
177
|
+
this.cypressInstalledVersion = installedCypressVersion();
|
|
178
|
+
this.project = {
|
|
179
|
+
...this.project,
|
|
180
|
+
name,
|
|
181
|
+
oldSourceRoot: (0, devkit_1.joinPathFragments)(this.project.oldRoot, 'cypress'),
|
|
182
|
+
newRoot,
|
|
183
|
+
newSourceRoot,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
async migrateProtractorE2eProject() {
|
|
188
|
+
this.moveDir(this.project.oldRoot, this.project.newRoot);
|
|
189
|
+
this.projectConfig = {
|
|
190
|
+
root: this.project.newRoot,
|
|
191
|
+
sourceRoot: this.project.newSourceRoot,
|
|
192
|
+
projectType: 'application',
|
|
193
|
+
targets: {
|
|
194
|
+
e2e: {
|
|
195
|
+
...this.projectConfig.targets[this.targetNames.e2e],
|
|
196
|
+
options: {
|
|
197
|
+
...this.projectConfig.targets[this.targetNames.e2e].options,
|
|
198
|
+
protractorConfig: this.convertRootPath(this.projectConfig.targets[this.targetNames.e2e].options
|
|
199
|
+
.protractorConfig),
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
implicitDependencies: [this.appName],
|
|
204
|
+
tags: [],
|
|
205
|
+
};
|
|
206
|
+
// remove e2e target from the app config
|
|
207
|
+
delete this.appConfig.targets[this.targetNames.e2e];
|
|
208
|
+
(0, devkit_1.updateProjectConfiguration)(this.tree, this.appName, {
|
|
209
|
+
...this.appConfig,
|
|
210
|
+
});
|
|
211
|
+
// add e2e project config
|
|
212
|
+
(0, devkit_1.addProjectConfiguration)(this.tree, this.project.name, {
|
|
213
|
+
...this.projectConfig,
|
|
214
|
+
}, true);
|
|
215
|
+
if (this.isProjectUsingEsLint) {
|
|
216
|
+
await (0, eslint_1.lintProjectGenerator)(this.tree, {
|
|
217
|
+
project: this.project.name,
|
|
218
|
+
linter: eslint_1.Linter.EsLint,
|
|
219
|
+
unitTestRunner: this.options.unitTestRunner,
|
|
220
|
+
tsConfigPaths: [
|
|
221
|
+
(0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.json'),
|
|
222
|
+
],
|
|
223
|
+
skipFormat: true,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
async migrateCypressE2eProject() {
|
|
228
|
+
const oldCypressConfigFilePath = this.getOldCypressConfigFilePath();
|
|
229
|
+
(0, devkit_1.addProjectConfiguration)(this.tree, this.project.name, {
|
|
230
|
+
projectType: 'application',
|
|
231
|
+
root: this.project.newRoot,
|
|
232
|
+
sourceRoot: this.project.newSourceRoot,
|
|
233
|
+
targets: {},
|
|
234
|
+
tags: [],
|
|
235
|
+
implicitDependencies: [this.appName],
|
|
236
|
+
});
|
|
237
|
+
const nxJson = (0, devkit_1.readNxJson)(this.tree) ?? {};
|
|
238
|
+
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
239
|
+
nxJson.useInferencePlugins !== false;
|
|
240
|
+
const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/cypress'));
|
|
241
|
+
await configurationGenerator(this.tree, {
|
|
242
|
+
project: this.project.name,
|
|
243
|
+
linter: this.isProjectUsingEsLint ? eslint_1.Linter.EsLint : eslint_1.Linter.None,
|
|
244
|
+
skipFormat: true,
|
|
245
|
+
// any target would do, we replace it later with the target existing in the project being migrated
|
|
246
|
+
devServerTarget: `${this.appName}:serve`,
|
|
247
|
+
baseUrl: 'http://localhost:4200',
|
|
248
|
+
addPlugin,
|
|
249
|
+
});
|
|
250
|
+
const cypressConfigFilePath = this.updateOrCreateCypressConfigFile(oldCypressConfigFilePath);
|
|
251
|
+
this.updateCypressProjectConfiguration(cypressConfigFilePath);
|
|
252
|
+
// replace the generated tsconfig.json with the project one
|
|
253
|
+
const newTsConfigPath = (0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.json');
|
|
254
|
+
this.tree.delete(newTsConfigPath);
|
|
255
|
+
this.moveFile((0, devkit_1.joinPathFragments)(this.project.oldSourceRoot, 'tsconfig.json'), newTsConfigPath);
|
|
256
|
+
// replace the generated source with the project source
|
|
257
|
+
(0, devkit_1.visitNotIgnoredFiles)(this.tree, this.project.newSourceRoot, (filePath) => {
|
|
258
|
+
this.tree.delete(filePath);
|
|
259
|
+
});
|
|
260
|
+
this.moveDir(this.project.oldSourceRoot, (0, devkit_1.joinPathFragments)(this.project.newSourceRoot));
|
|
261
|
+
}
|
|
262
|
+
updateOrCreateCypressConfigFile(configFile) {
|
|
263
|
+
if (!configFile) {
|
|
264
|
+
return this.getDefaultCypressConfigFilePath();
|
|
265
|
+
}
|
|
266
|
+
const cypressConfigFilePath = (0, devkit_1.joinPathFragments)(this.project.newRoot, (0, path_1.basename)(configFile));
|
|
267
|
+
this.updateCypressConfigFilePaths(configFile);
|
|
268
|
+
this.tree.delete(cypressConfigFilePath);
|
|
269
|
+
this.moveFile(configFile, cypressConfigFilePath);
|
|
270
|
+
return cypressConfigFilePath;
|
|
271
|
+
}
|
|
272
|
+
updateCypressProjectConfiguration(cypressConfigPath) {
|
|
273
|
+
this.projectConfig = (0, devkit_1.readProjectConfiguration)(this.tree, this.project.name);
|
|
274
|
+
if (this.isProjectUsingEsLint) {
|
|
275
|
+
// the generated cypress project always generates a "lint" target,
|
|
276
|
+
// in case the app was using a different name for it, we use it
|
|
277
|
+
if (this.lintTargetName && this.lintTargetName !== 'lint') {
|
|
278
|
+
this.projectConfig.targets[this.lintTargetName] =
|
|
279
|
+
this.projectConfig.targets.lint;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
[this.targetNames.e2e, 'cypress-run', 'cypress-open'].forEach((target) => {
|
|
283
|
+
if (this.appConfig.targets[target]) {
|
|
284
|
+
this.projectConfig.targets[target] = this.updateE2eCypressTarget(this.appConfig.targets[target], cypressConfigPath);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
(0, devkit_1.updateProjectConfiguration)(this.tree, this.project.name, {
|
|
288
|
+
...this.projectConfig,
|
|
289
|
+
});
|
|
290
|
+
delete this.appConfig.targets['cypress-run'];
|
|
291
|
+
delete this.appConfig.targets['cypress-open'];
|
|
292
|
+
delete this.appConfig.targets[this.targetNames.e2e];
|
|
293
|
+
(0, devkit_1.updateProjectConfiguration)(this.tree, this.appName, {
|
|
294
|
+
...this.appConfig,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
updateE2eCypressTarget(existingTarget, cypressConfig) {
|
|
298
|
+
const updatedTarget = {
|
|
299
|
+
...existingTarget,
|
|
300
|
+
executor: '@nx/cypress:cypress',
|
|
301
|
+
options: {
|
|
302
|
+
...existingTarget.options,
|
|
303
|
+
cypressConfig,
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
delete updatedTarget.options.configFile;
|
|
307
|
+
if (updatedTarget.options.tsConfig) {
|
|
308
|
+
updatedTarget.options.tsConfig = (0, devkit_1.joinPathFragments)(this.project.newRoot, 'tsconfig.json');
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
delete updatedTarget.options.tsConfig;
|
|
312
|
+
}
|
|
313
|
+
return updatedTarget;
|
|
314
|
+
}
|
|
315
|
+
updateCypressConfigFilePaths(configFilePath) {
|
|
316
|
+
if (this.cypressInstalledVersion >= 10) {
|
|
317
|
+
this.updateCypress10ConfigFile(configFilePath);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
const srcPaths = [
|
|
321
|
+
'integrationFolder',
|
|
322
|
+
'supportFile',
|
|
323
|
+
'pluginsFile',
|
|
324
|
+
'fixturesFolder',
|
|
325
|
+
];
|
|
326
|
+
const distPaths = ['videosFolder', 'screenshotsFolder'];
|
|
327
|
+
const globPatterns = ['ignoreTestFiles', 'testFiles'];
|
|
328
|
+
const cypressConfig = (0, devkit_1.readJson)(this.tree, configFilePath);
|
|
329
|
+
cypressConfig.fileServerFolder = '.';
|
|
330
|
+
srcPaths.forEach((path) => {
|
|
331
|
+
if (cypressConfig[path]) {
|
|
332
|
+
cypressConfig[path] = this.cypressConfigSrcPathToNewPath(cypressConfig[path]);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
distPaths.forEach((path) => {
|
|
336
|
+
if (cypressConfig[path]) {
|
|
337
|
+
cypressConfig[path] = this.cypressConfigDistPathToNewPath(cypressConfig[path]);
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
globPatterns.forEach((stringOrArrayGlob) => {
|
|
341
|
+
if (!cypressConfig[stringOrArrayGlob]) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
if (Array.isArray(cypressConfig[stringOrArrayGlob])) {
|
|
345
|
+
cypressConfig[stringOrArrayGlob] = cypressConfig[stringOrArrayGlob].map((glob) => this.cypressConfigGlobToNewGlob(glob));
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
cypressConfig[stringOrArrayGlob] = this.cypressConfigGlobToNewGlob(cypressConfig[stringOrArrayGlob]);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
(0, devkit_1.writeJson)(this.tree, configFilePath, cypressConfig);
|
|
352
|
+
}
|
|
353
|
+
cypressConfigGlobToNewGlob(globPattern) {
|
|
354
|
+
return globPattern
|
|
355
|
+
? globPattern.replace(new RegExp(`^(\\.\\/|\\/)?${(0, path_1.relative)(this.project.oldRoot, this.project.oldSourceRoot)}\\/`), 'src/')
|
|
356
|
+
: undefined;
|
|
357
|
+
}
|
|
358
|
+
cypressConfigSrcPathToNewPath(path) {
|
|
359
|
+
return path
|
|
360
|
+
? (0, devkit_1.joinPathFragments)('src', (0, path_1.relative)(this.project.oldSourceRoot, (0, devkit_1.joinPathFragments)(this.project.oldRoot, path)))
|
|
361
|
+
: undefined;
|
|
362
|
+
}
|
|
363
|
+
cypressConfigDistPathToNewPath(path) {
|
|
364
|
+
return path
|
|
365
|
+
? (0, devkit_1.joinPathFragments)('../../dist/cypress/', this.project.newRoot, (0, path_1.relative)(this.project.oldSourceRoot, (0, devkit_1.joinPathFragments)(this.project.oldRoot, path)))
|
|
366
|
+
: undefined;
|
|
367
|
+
}
|
|
368
|
+
updateCypress10ConfigFile(configFilePath) {
|
|
369
|
+
const { isPropertyAssignment } = (0, ensure_typescript_1.ensureTypescript)();
|
|
370
|
+
const { tsquery } = require('@phenomnomnominal/tsquery');
|
|
371
|
+
const { nxE2EPreset } = require('@nx/cypress/plugins/cypress-preset');
|
|
372
|
+
this.cypressPreset = nxE2EPreset(configFilePath);
|
|
373
|
+
const fileContent = this.tree.read(configFilePath, 'utf-8');
|
|
374
|
+
let sourceFile = tsquery.ast(fileContent);
|
|
375
|
+
const recorder = new file_change_recorder_1.FileChangeRecorder(this.tree, configFilePath);
|
|
376
|
+
const defineConfigExpression = tsquery.query(sourceFile, 'CallExpression:has(Identifier[name=defineConfig]) > ObjectLiteralExpression')[0];
|
|
377
|
+
if (!defineConfigExpression) {
|
|
378
|
+
this.logger.warn(`Could not find a "defineConfig" expression in "${configFilePath}". Skipping updating the Cypress configuration.`);
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
let e2eNode;
|
|
382
|
+
let componentNode;
|
|
383
|
+
const globalConfig = {};
|
|
384
|
+
defineConfigExpression.forEachChild((node) => {
|
|
385
|
+
if (isPropertyAssignment(node) && node.name.getText() === 'component') {
|
|
386
|
+
componentNode = node;
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (isPropertyAssignment(node) && node.name.getText() === 'e2e') {
|
|
390
|
+
e2eNode = node;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (isPropertyAssignment(node)) {
|
|
394
|
+
this.updateCypressConfigNodeValue(recorder, node, globalConfig);
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
this.updateCypressComponentConfig(componentNode, recorder);
|
|
398
|
+
this.updateCypressE2EConfig(configFilePath, defineConfigExpression, e2eNode, recorder, globalConfig);
|
|
399
|
+
recorder.applyChanges();
|
|
400
|
+
}
|
|
401
|
+
updateCypressComponentConfig(componentNode, recorder) {
|
|
402
|
+
if (!componentNode) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
const { isObjectLiteralExpression, isPropertyAssignment } = (0, ensure_typescript_1.ensureTypescript)();
|
|
406
|
+
if (!isObjectLiteralExpression(componentNode.initializer)) {
|
|
407
|
+
this.logger.warn('The automatic migration only supports having an object literal in the "component" option of the Cypress configuration. ' +
|
|
408
|
+
`The configuration won't be updated. Please make sure to update any paths you may have in the "component" option ` +
|
|
409
|
+
'manually to point to the new location.');
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
componentNode.initializer.properties.forEach((node) => {
|
|
413
|
+
if (isPropertyAssignment(node)) {
|
|
414
|
+
this.updateCypressConfigNodeValue(recorder, node);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
updateCypressE2EConfig(configFilePath, defineConfigNode, e2eNode, recorder, { ...globalConfig }) {
|
|
419
|
+
(0, ensure_typescript_1.ensureTypescript)();
|
|
420
|
+
const { tsquery } = require('@phenomnomnominal/tsquery');
|
|
421
|
+
const e2eConfig = {};
|
|
422
|
+
const presetSpreadAssignment = `...nxE2EPreset(__dirname),`;
|
|
423
|
+
if (!e2eNode) {
|
|
424
|
+
// add the e2e node with the preset and properties that need to overwrite
|
|
425
|
+
// the preset
|
|
426
|
+
const e2eAssignment = (0, devkit_1.stripIndents) `e2e: {
|
|
427
|
+
${presetSpreadAssignment}
|
|
428
|
+
${Object.entries(globalConfig)
|
|
429
|
+
.filter(([key, value]) => !e2eConfig[key] && value !== this.cypressPreset[key])
|
|
430
|
+
.map(([key, value]) => `${key}: '${value}'`)
|
|
431
|
+
.join(',\n')}
|
|
432
|
+
},`;
|
|
433
|
+
recorder.insertRight(defineConfigNode.getStart() + 1, e2eAssignment);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
const { isObjectLiteralExpression, isPropertyAssignment } = (0, ensure_typescript_1.ensureTypescript)();
|
|
437
|
+
if (!isObjectLiteralExpression(e2eNode.initializer)) {
|
|
438
|
+
this.logger.warn('The automatic migration only supports having an object literal in the "e2e" option of the Cypress configuration. ' +
|
|
439
|
+
`The configuration won't be updated. Please make sure to update any paths you might have in the "e2e" option ` +
|
|
440
|
+
'manually to point to the new location.');
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
recorder.insertRight(e2eNode.initializer.getStart() + 1, presetSpreadAssignment);
|
|
444
|
+
e2eNode.initializer.properties.forEach((node) => {
|
|
445
|
+
if (!isPropertyAssignment(node)) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
let change = { type: 'ignore' };
|
|
449
|
+
const property = this.normalizeNodeText(node.name.getText());
|
|
450
|
+
const oldValue = this.normalizeNodeText(node.initializer.getText());
|
|
451
|
+
e2eConfig[property] = oldValue;
|
|
452
|
+
const createChange = (newValue) => {
|
|
453
|
+
if (newValue === this.cypressPreset[property]) {
|
|
454
|
+
return { type: 'remove' };
|
|
455
|
+
}
|
|
456
|
+
return { type: 'replace', value: newValue };
|
|
457
|
+
};
|
|
458
|
+
if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.srcPaths)) {
|
|
459
|
+
const newValue = this.cypressConfigSrcPathToNewPath(oldValue);
|
|
460
|
+
change = createChange(newValue);
|
|
461
|
+
}
|
|
462
|
+
else if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.distPaths)) {
|
|
463
|
+
const newValue = this.cypressConfigDistPathToNewPath(oldValue);
|
|
464
|
+
change = createChange(newValue);
|
|
465
|
+
}
|
|
466
|
+
else if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.globPatterns)) {
|
|
467
|
+
const newValue = this.cypressConfigGlobToNewGlob(oldValue);
|
|
468
|
+
change = createChange(newValue);
|
|
469
|
+
}
|
|
470
|
+
if (change.type === 'replace') {
|
|
471
|
+
recorder.replace(node.initializer, `'${change.value}'`);
|
|
472
|
+
e2eConfig[property] = change.value;
|
|
473
|
+
}
|
|
474
|
+
else if (change.type === 'remove') {
|
|
475
|
+
const trailingCommaMatch = recorder.originalContent
|
|
476
|
+
.slice(node.getEnd())
|
|
477
|
+
.match(/^\s*,/);
|
|
478
|
+
if (trailingCommaMatch) {
|
|
479
|
+
recorder.remove(node.getFullStart(), node.getEnd() + trailingCommaMatch[0].length);
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
recorder.remove(node.getFullStart(), node.getEnd());
|
|
483
|
+
}
|
|
484
|
+
delete e2eConfig[property];
|
|
485
|
+
delete globalConfig[property];
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
// add any global config that was present and that would be overwritten
|
|
489
|
+
// by the preset
|
|
490
|
+
Object.entries(globalConfig).forEach(([key, value]) => {
|
|
491
|
+
if (e2eConfig[key] || value === this.cypressPreset[key]) {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
recorder.insertRight(e2eNode.initializer.getStart() + 1, `${key}: '${value}',`);
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
// apply changes so we can apply AST transformations
|
|
498
|
+
recorder.applyChanges();
|
|
499
|
+
const sourceFile = tsquery.ast(recorder.content);
|
|
500
|
+
(0, js_1.insertImport)(this.tree, sourceFile, configFilePath, 'nxE2EPreset', '@nx/cypress/plugins/cypress-preset');
|
|
501
|
+
// update recorder with the new content from the file
|
|
502
|
+
recorder.setContentToFileContent();
|
|
503
|
+
}
|
|
504
|
+
updateCypressConfigNodeValue(recorder, node, configCollected) {
|
|
505
|
+
let newValue;
|
|
506
|
+
const oldValue = this.normalizeNodeText(node.initializer.getText());
|
|
507
|
+
if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.srcPaths)) {
|
|
508
|
+
newValue = this.cypressConfigSrcPathToNewPath(oldValue);
|
|
509
|
+
}
|
|
510
|
+
else if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.distPaths)) {
|
|
511
|
+
newValue = this.cypressConfigDistPathToNewPath(oldValue);
|
|
512
|
+
}
|
|
513
|
+
else if (this.isValidPathLikePropertyWithStringLiteralValue(node, cypressConfig.v10OrMore.globPatterns)) {
|
|
514
|
+
newValue = this.cypressConfigGlobToNewGlob(oldValue);
|
|
515
|
+
}
|
|
516
|
+
if (newValue) {
|
|
517
|
+
recorder.replace(node.initializer, `'${newValue}'`);
|
|
518
|
+
if (configCollected) {
|
|
519
|
+
configCollected[node.name.getText()] = newValue;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
isValidPathLikePropertyWithStringLiteralValue(node, properties) {
|
|
524
|
+
const { isPropertyAssignment, isStringLiteralLike, isTemplateExpression, SyntaxKind, } = (0, ensure_typescript_1.ensureTypescript)();
|
|
525
|
+
if (!isPropertyAssignment(node)) {
|
|
526
|
+
// TODO(leo): handle more scenarios (spread assignments, etc)
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
const property = properties.find((p) => p === node.name.getText());
|
|
530
|
+
if (!property) {
|
|
531
|
+
return false;
|
|
532
|
+
}
|
|
533
|
+
if (node.initializer.kind === SyntaxKind.UndefinedKeyword ||
|
|
534
|
+
node.initializer.kind === SyntaxKind.NullKeyword ||
|
|
535
|
+
node.initializer.kind === SyntaxKind.FalseKeyword) {
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
if (!isStringLiteralLike(node.initializer)) {
|
|
539
|
+
if (isTemplateExpression(node.initializer)) {
|
|
540
|
+
this.logger.warn(`The "${node.name.getText()}" in the Cypress configuration file is set to a template expression ("${node.initializer.getText()}"). ` +
|
|
541
|
+
`This is not supported by the automatic migration and its value won't be automatically migrated. ` +
|
|
542
|
+
`Please make sure to update its value to match the new location if needed.`);
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
this.logger.warn(`The "${node.name.getText()}" in the Cypress configuration file is not set to a string literal ("${node.initializer.getText()}"). ` +
|
|
546
|
+
`This is not supported by the automatic migration and its value won't be automatically migrated. ` +
|
|
547
|
+
`Please make sure to update its value to match the new location if needed.`);
|
|
548
|
+
}
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
return true;
|
|
552
|
+
}
|
|
553
|
+
normalizeNodeText(value) {
|
|
554
|
+
return value.replace(/['"`]/g, '');
|
|
555
|
+
}
|
|
556
|
+
getOldCypressConfigFilePath() {
|
|
557
|
+
let cypressConfig;
|
|
558
|
+
const configFileOption = this.projectConfig.targets.e2e.options.configFile;
|
|
559
|
+
if (configFileOption === false) {
|
|
560
|
+
cypressConfig = null;
|
|
561
|
+
}
|
|
562
|
+
else if (typeof configFileOption === 'string') {
|
|
563
|
+
cypressConfig = (0, path_1.basename)(configFileOption);
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
cypressConfig = this.findCypressConfigFilePath(this.project.oldRoot);
|
|
567
|
+
}
|
|
568
|
+
return cypressConfig;
|
|
569
|
+
}
|
|
570
|
+
getDefaultCypressConfigFilePath() {
|
|
571
|
+
return this.cypressInstalledVersion < 10
|
|
572
|
+
? (0, devkit_1.joinPathFragments)(this.project.newRoot, 'cypress.json')
|
|
573
|
+
: (0, devkit_1.joinPathFragments)(this.project.newRoot, 'cypress.config.ts');
|
|
574
|
+
}
|
|
575
|
+
findCypressConfigFilePath(dir) {
|
|
576
|
+
if (this.cypressInstalledVersion < 10) {
|
|
577
|
+
return this.tree.exists((0, devkit_1.joinPathFragments)(dir, 'cypress.json'))
|
|
578
|
+
? (0, devkit_1.joinPathFragments)(dir, 'cypress.json')
|
|
579
|
+
: null;
|
|
580
|
+
}
|
|
581
|
+
// https://docs.cypress.io/guides/references/configuration#Configuration-File
|
|
582
|
+
const possibleFiles = [
|
|
583
|
+
(0, devkit_1.joinPathFragments)(dir, 'cypress.config.ts'),
|
|
584
|
+
(0, devkit_1.joinPathFragments)(dir, 'cypress.config.js'),
|
|
585
|
+
(0, devkit_1.joinPathFragments)(dir, 'cypress.config.mjs'),
|
|
586
|
+
(0, devkit_1.joinPathFragments)(dir, 'cypress.config.cjs'),
|
|
587
|
+
];
|
|
588
|
+
for (const file of possibleFiles) {
|
|
589
|
+
if (this.tree.exists(file)) {
|
|
590
|
+
return file;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
isCypressE2eProject() {
|
|
596
|
+
return (this.projectConfig.targets[this.targetNames.e2e].executor ===
|
|
597
|
+
'@cypress/schematic:cypress');
|
|
598
|
+
}
|
|
599
|
+
isProtractorE2eProject() {
|
|
600
|
+
return (this.projectConfig.targets[this.targetNames.e2e].executor ===
|
|
601
|
+
'@angular-devkit/build-angular:protractor');
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
exports.E2eMigrator = E2eMigrator;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./app.migrator"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./e2e.migrator"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib.migrator"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./project.migrator"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import type { GeneratorOptions } from '../../schema';
|
|
3
|
+
import type { Logger, MigrationProjectConfiguration, ValidationResult } from '../../utilities';
|
|
4
|
+
import { ProjectMigrator } from './project.migrator';
|
|
5
|
+
export declare class LibMigrator extends ProjectMigrator {
|
|
6
|
+
constructor(tree: Tree, options: GeneratorOptions, project: MigrationProjectConfiguration, logger?: Logger);
|
|
7
|
+
migrate(): Promise<void>;
|
|
8
|
+
validate(): ValidationResult;
|
|
9
|
+
private moveProjectFiles;
|
|
10
|
+
private updateProjectConfiguration;
|
|
11
|
+
}
|