@nx/angular 19.5.0-canary.20240711-2c4c2ae → 19.5.0-canary.20240713-6f50d9f
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +70 -0
- package/package.json +9 -9
- package/plugins/component-testing.js +1 -2
- package/src/builders/dev-server/dev-server.impl.js +1 -2
- package/src/builders/dev-server/lib/normalize-options.js +1 -2
- package/src/builders/dev-server/lib/validate-options.js +5 -2
- package/src/builders/dev-server/schema.d.ts +1 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +1 -2
- package/src/builders/utilities/buildable-libs.js +1 -2
- package/src/builders/utilities/module-federation.js +4 -5
- package/src/builders/utilities/webpack.js +3 -4
- package/src/builders/webpack-browser/webpack-browser.impl.js +1 -2
- package/src/builders/webpack-server/webpack-server.impl.js +1 -2
- package/src/executors/application/application.impl.js +1 -1
- package/src/executors/application/utils/validate-options.js +1 -2
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +1 -2
- package/src/executors/extract-i18n/extract-i18n.impl.js +1 -1
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +1 -2
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -2
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.js +1 -2
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +1 -2
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +1 -2
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +1 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +1 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +1 -2
- package/src/executors/package/package.impl.js +2 -2
- package/src/executors/utilities/angular-version-utils.js +2 -3
- package/src/executors/utilities/buildable-libs.js +1 -2
- package/src/executors/utilities/esbuild-extensions.js +3 -4
- package/src/executors/utilities/module-loader.js +2 -3
- package/src/executors/utilities/ng-packagr/tailwindcss.js +3 -4
- package/src/executors/utilities/patch-builder-context.js +1 -2
- package/src/executors/utilities/typescript.js +1 -2
- package/src/generators/add-linting/add-linting.js +1 -2
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +1 -2
- package/src/generators/add-linting/lib/buildable-project.js +1 -2
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +24 -24
- package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
- package/src/generators/application/application.js +2 -3
- package/src/generators/application/files/base/tsconfig.json__tpl__ +2 -2
- package/src/generators/application/files/ng-module/src/app/app.component.spec.ts__tpl__ +4 -3
- package/src/generators/application/files/standalone-components/src/app/app.component.spec.ts__tpl__ +4 -3
- package/src/generators/application/lib/add-e2e.js +1 -2
- package/src/generators/application/lib/add-linting.js +1 -2
- package/src/generators/application/lib/add-proxy-config.js +1 -2
- package/src/generators/application/lib/add-unit-test-runner.js +1 -2
- package/src/generators/application/lib/create-files.js +8 -5
- package/src/generators/application/lib/create-project.js +1 -2
- package/src/generators/application/lib/enable-strict-type-checking.js +1 -2
- package/src/generators/application/lib/normalize-options.js +1 -2
- package/src/generators/application/lib/set-app-strict-default.js +1 -2
- package/src/generators/application/lib/set-generator-defaults.js +1 -2
- package/src/generators/application/lib/update-editor-tsconfig.js +1 -2
- package/src/generators/component/component.js +2 -3
- package/src/generators/component/lib/component.js +1 -2
- package/src/generators/component/lib/module.js +1 -2
- package/src/generators/component/lib/normalize-options.js +1 -2
- package/src/generators/component/lib/set-generator-defaults.js +1 -2
- package/src/generators/component-cypress-spec/component-cypress-spec.js +1 -2
- package/src/generators/component-cypress-spec/lib/get-args-default-value.js +1 -2
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +1 -2
- package/src/generators/component-story/component-story.js +1 -2
- package/src/generators/component-test/component-test.js +1 -2
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +1 -2
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +1 -2
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +1 -2
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +1 -2
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +1 -2
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +3 -4
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +1 -2
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +2 -3
- package/src/generators/directive/directive.js +1 -2
- package/src/generators/directive/lib/normalize-options.js +1 -2
- package/src/generators/federate-module/federate-module.js +1 -2
- package/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +1 -2
- package/src/generators/federate-module/lib/add-path-to-exposes.js +1 -2
- package/src/generators/federate-module/lib/add-path-to-ts-config.js +1 -2
- package/src/generators/federate-module/lib/add-remote.js +1 -2
- package/src/generators/federate-module/lib/check-remote-exists.js +1 -2
- package/src/generators/host/host.js +2 -3
- package/src/generators/host/lib/update-ssr-setup.js +1 -2
- package/src/generators/init/init.js +1 -2
- package/src/generators/library/files/base/tsconfig.json__tpl__ +2 -2
- package/src/generators/library/lib/add-children.js +1 -2
- package/src/generators/library/lib/add-load-children.js +1 -2
- package/src/generators/library/lib/add-module.js +1 -2
- package/src/generators/library/lib/add-project.js +1 -2
- package/src/generators/library/lib/add-standalone-component.js +1 -2
- package/src/generators/library/lib/create-files.js +3 -2
- package/src/generators/library/lib/enable-strict-type-checking.js +2 -3
- package/src/generators/library/lib/normalize-options.js +1 -2
- package/src/generators/library/lib/set-generator-defaults.js +1 -2
- package/src/generators/library/lib/update-lib-package-npm-scope.js +1 -2
- package/src/generators/library/lib/update-tsconfig.js +1 -2
- package/src/generators/library/library.js +2 -3
- package/src/generators/library-secondary-entry-point/lib/add-files.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/normalize-options.js +1 -2
- package/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.js +1 -2
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +1 -2
- package/src/generators/move/lib/update-module-name.js +1 -2
- package/src/generators/move/lib/update-ng-package.js +1 -2
- package/src/generators/move/lib/update-secondary-entry-points.js +1 -2
- package/src/generators/move/move-impl.js +1 -2
- package/src/generators/move/move.js +2 -3
- package/src/generators/ng-add/migrate-from-angular-cli.js +1 -2
- package/src/generators/ng-add/ng-add.js +1 -2
- package/src/generators/ng-add/utilities/dependencies.js +1 -2
- package/src/generators/ng-add/utilities/format-files-task.js +1 -2
- package/src/generators/ng-add/utilities/projects.js +2 -3
- package/src/generators/ng-add/utilities/validation-logging.js +2 -3
- package/src/generators/ng-add/utilities/workspace.js +13 -14
- package/src/generators/ngrx/lib/add-exports-barrel.js +1 -2
- package/src/generators/ngrx/lib/add-imports-to-module.js +1 -2
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx/lib/generate-files.js +1 -2
- package/src/generators/ngrx/lib/normalize-options.js +1 -2
- package/src/generators/ngrx/lib/validate-options.js +1 -2
- package/src/generators/ngrx/ngrx.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-exports-barrel.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-imports.js +1 -2
- package/src/generators/ngrx-feature-store/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx-feature-store/lib/generate-files.js +1 -2
- package/src/generators/ngrx-feature-store/lib/normalize-options.js +1 -2
- package/src/generators/ngrx-feature-store/lib/validate-options.js +1 -2
- package/src/generators/ngrx-feature-store/ngrx-feature-store.js +1 -2
- package/src/generators/ngrx-root-store/lib/add-imports.js +1 -2
- package/src/generators/ngrx-root-store/lib/add-ngrx-to-package-json.js +1 -2
- package/src/generators/ngrx-root-store/lib/normalize-options.js +1 -2
- package/src/generators/ngrx-root-store/lib/validate-options.js +1 -2
- package/src/generators/ngrx-root-store/ngrx-root-store.js +1 -2
- package/src/generators/pipe/lib/normalize-options.js +1 -2
- package/src/generators/pipe/pipe.js +1 -2
- package/src/generators/remote/lib/find-next-available-port.js +1 -2
- package/src/generators/remote/lib/update-ssr-setup.js +1 -2
- package/src/generators/remote/remote.js +2 -3
- package/src/generators/scam/lib/convert-component-to-scam.js +1 -2
- package/src/generators/scam/lib/normalize-options.js +1 -2
- package/src/generators/scam/scam.js +1 -2
- package/src/generators/scam-directive/lib/convert-directive-to-scam.js +1 -2
- package/src/generators/scam-directive/lib/normalize-options.js +1 -2
- package/src/generators/scam-directive/scam-directive.js +1 -2
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +1 -2
- package/src/generators/scam-pipe/lib/normalize-options.js +1 -2
- package/src/generators/scam-pipe/scam-pipe.js +1 -2
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-component-data-from-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/get-target-project.js +1 -2
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +1 -2
- package/src/generators/scam-to-standalone/lib/selector-exists-in-ast.js +1 -2
- package/src/generators/scam-to-standalone/lib/verify-is-inline-scam.js +1 -2
- package/src/generators/scam-to-standalone/lib/verify-module-is-scam.js +1 -2
- package/src/generators/scam-to-standalone/scam-to-standalone.js +1 -2
- package/src/generators/setup-mf/files/host-files/app.component.spec.ts__tmpl__ +8 -5
- package/src/generators/setup-mf/lib/add-cypress-workaround.js +1 -2
- package/src/generators/setup-mf/lib/add-remote-entry.js +1 -2
- package/src/generators/setup-mf/lib/add-remote-to-host.js +3 -4
- package/src/generators/setup-mf/lib/change-build-target.js +1 -2
- package/src/generators/setup-mf/lib/fix-bootstrap.js +1 -2
- package/src/generators/setup-mf/lib/generate-config.js +1 -2
- package/src/generators/setup-mf/lib/get-remotes-with-ports.js +1 -2
- package/src/generators/setup-mf/lib/normalize-options.js +1 -2
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +1 -2
- package/src/generators/setup-mf/lib/setup-host-if-dynamic.js +1 -2
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -2
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +1 -2
- package/src/generators/setup-mf/lib/update-host-app-routes.d.ts +2 -2
- package/src/generators/setup-mf/lib/update-host-app-routes.js +5 -10
- package/src/generators/setup-mf/lib/update-tsconfig.js +1 -2
- package/src/generators/setup-mf/setup-mf.js +1 -2
- package/src/generators/setup-ssr/lib/add-dependencies.js +1 -2
- package/src/generators/setup-ssr/lib/add-hydration.js +1 -2
- package/src/generators/setup-ssr/lib/add-server-file.js +1 -2
- package/src/generators/setup-ssr/lib/generate-files.js +1 -2
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +2 -3
- package/src/generators/setup-ssr/lib/normalize-options.js +1 -2
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.js +1 -2
- package/src/generators/setup-ssr/lib/update-project-config.js +2 -3
- package/src/generators/setup-ssr/lib/validate-options.js +1 -2
- package/src/generators/setup-ssr/setup-ssr.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-config.js +1 -2
- package/src/generators/setup-tailwind/lib/add-tailwind-required-packages.js +1 -2
- package/src/generators/setup-tailwind/lib/detect-tailwind-installed-version.js +1 -2
- package/src/generators/setup-tailwind/lib/normalize-options.js +1 -2
- package/src/generators/setup-tailwind/lib/update-application-styles.js +1 -2
- package/src/generators/setup-tailwind/setup-tailwind.js +1 -2
- package/src/generators/stories/lib/get-e2e-project.js +1 -2
- package/src/generators/stories/stories.js +1 -2
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.js +1 -2
- package/src/generators/storybook-configuration/lib/generate-stories.js +1 -2
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -2
- package/src/generators/storybook-configuration/lib/validate-options.js +1 -2
- package/src/generators/storybook-configuration/storybook-configuration.js +1 -2
- package/src/generators/utils/add-jest.js +1 -2
- package/src/generators/utils/add-mf-env-to-inputs.js +1 -2
- package/src/generators/utils/dependencies.js +1 -2
- package/src/generators/utils/ensure-angular-dependencies.js +1 -2
- package/src/generators/utils/entry-point.js +1 -2
- package/src/generators/utils/export-scam.js +1 -2
- package/src/generators/utils/find-module.js +2 -3
- package/src/generators/utils/insert-ngmodule-import.js +2 -3
- package/src/generators/utils/path.js +1 -2
- package/src/generators/utils/project.js +1 -2
- package/src/generators/utils/selector.js +2 -3
- package/src/generators/utils/storybook-ast/component-info.js +3 -4
- package/src/generators/utils/storybook-ast/entry-point.js +1 -2
- package/src/generators/utils/storybook-ast/module-info.js +2 -3
- package/src/generators/utils/storybook-ast/storybook-inputs.js +4 -5
- package/src/generators/utils/storybook-ast/tree-utilities.js +1 -2
- package/src/generators/utils/testing.js +5 -6
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.js +1 -2
- package/src/generators/utils/update-project-root-tsconfig.js +2 -2
- package/src/generators/utils/validations.js +1 -2
- package/src/generators/utils/version-utils.js +6 -7
- package/src/generators/web-worker/lib/add-snippet.js +1 -2
- package/src/generators/web-worker/lib/normalize-options.js +1 -2
- package/src/generators/web-worker/web-worker.js +1 -2
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +1 -1
- package/src/migrations/update-14-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +1 -1
- package/src/migrations/update-14-2-0/update-ngcc-target.js +1 -1
- package/src/migrations/update-14-2-0/update-router-initial-navigation.js +6 -3
- package/src/migrations/update-14-2-0/update-tsconfig-target.js +2 -2
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +4 -5
- package/src/migrations/update-14-5-2/update-angular-cli.js +1 -1
- package/src/migrations/update-14-6-0/update-angular-cli.js +1 -1
- package/src/migrations/update-14-8-0/rename-webpack-server.js +1 -1
- package/src/migrations/update-15-0-0/add-karma-inputs.js +1 -1
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +1 -1
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +1 -1
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +1 -1
- package/src/migrations/update-15-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-2-0/update-karma-main-file.js +1 -1
- package/src/migrations/update-15-2-0/update-typescript-target.js +1 -1
- package/src/migrations/update-15-2-0/update-workspace-config.js +1 -1
- package/src/migrations/update-15-5-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-7-0/install-required-packages.js +1 -1
- package/src/migrations/update-15-8-0/update-angular-cli.js +1 -1
- package/src/migrations/update-15-9-0/update-file-server-executor.js +1 -1
- package/src/migrations/update-15-9-0/update-testing-tsconfig.js +1 -2
- package/src/migrations/update-16-0-0/remove-karma-defaults.js +1 -1
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +1 -1
- package/src/migrations/update-16-0-0/remove-protractor-defaults.js +1 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +1 -1
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +1 -1
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +1 -1
- package/src/migrations/update-16-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-16-1-0/update-server-executor-config.js +1 -1
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +1 -1
- package/src/migrations/update-16-4-0/rename-angular-eslint-accesibility-rules.js +1 -1
- package/src/migrations/update-16-4-0/update-angular-cli.js +1 -1
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +1 -1
- package/src/migrations/update-16-7-0/update-angular-cli.js +1 -1
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +1 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.js +1 -1
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +1 -1
- package/src/migrations/update-17-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.js +1 -1
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.js +1 -1
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.js +1 -1
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.js +1 -1
- package/src/migrations/update-17-3-0/update-angular-cli.js +1 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +1 -1
- package/src/migrations/update-18-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +1 -1
- package/src/migrations/update-18-2-0/update-angular-cli.js +1 -1
- package/src/migrations/update-19-1-0/update-angular-cli.js +1 -1
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.d.ts +1 -1
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.js +2 -2
- package/src/migrations/update-19-5-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-19-5-0/update-angular-cli.js +23 -0
- package/src/migrations/utils/projects.js +1 -2
- package/src/utils/cli-config-utils.js +1 -2
- package/src/utils/get-mf-projects.js +1 -2
- package/src/utils/mf/utils.js +4 -4
- package/src/utils/mf/with-module-federation-ssr.js +1 -2
- package/src/utils/mf/with-module-federation.js +1 -2
- package/src/utils/nx-devkit/ast-utils.js +23 -24
- package/src/utils/nx-devkit/route-utils.js +2 -3
- package/src/utils/nx-devkit/testing.js +4 -5
- package/src/utils/targets.js +1 -2
- package/src/utils/version-utils.js +2 -3
- package/src/utils/versions.d.ts +4 -4
- package/src/utils/versions.js +4 -4
- package/tailwind.js +1 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeOptions =
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
4
4
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
6
6
|
async function normalizeOptions(tree, options) {
|
@@ -30,4 +30,3 @@ async function normalizeOptions(tree, options) {
|
|
30
30
|
projectName,
|
31
31
|
};
|
32
32
|
}
|
33
|
-
exports.normalizeOptions = normalizeOptions;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.scamGenerator =
|
3
|
+
exports.scamGenerator = scamGenerator;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const component_1 = require("../component/component");
|
6
6
|
const export_scam_1 = require("../utils/export-scam");
|
@@ -22,5 +22,4 @@ async function scamGenerator(tree, rawOptions) {
|
|
22
22
|
await (0, devkit_1.formatFiles)(tree);
|
23
23
|
}
|
24
24
|
}
|
25
|
-
exports.scamGenerator = scamGenerator;
|
26
25
|
exports.default = scamGenerator;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.convertDirectiveToScam =
|
3
|
+
exports.convertDirectiveToScam = convertDirectiveToScam;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const js_1 = require("@nx/js");
|
6
6
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
@@ -25,7 +25,6 @@ function convertDirectiveToScam(tree, options) {
|
|
25
25
|
const scamFilePath = (0, devkit_1.joinPathFragments)(options.directory, `${options.name}.module.ts`);
|
26
26
|
tree.write(scamFilePath, getModuleFileContent(options.symbolName, options.fileName));
|
27
27
|
}
|
28
|
-
exports.convertDirectiveToScam = convertDirectiveToScam;
|
29
28
|
function getModuleFileContent(directiveClassName, directiveFileName) {
|
30
29
|
return `import { NgModule } from '@angular/core';
|
31
30
|
import { CommonModule } from '@angular/common';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeOptions =
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
4
4
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
6
6
|
async function normalizeOptions(tree, options) {
|
@@ -29,4 +29,3 @@ async function normalizeOptions(tree, options) {
|
|
29
29
|
projectName,
|
30
30
|
};
|
31
31
|
}
|
32
|
-
exports.normalizeOptions = normalizeOptions;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.scamDirectiveGenerator =
|
3
|
+
exports.scamDirectiveGenerator = scamDirectiveGenerator;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const directive_1 = require("../directive/directive");
|
6
6
|
const export_scam_1 = require("../utils/export-scam");
|
@@ -22,5 +22,4 @@ async function scamDirectiveGenerator(tree, rawOptions) {
|
|
22
22
|
await (0, devkit_1.formatFiles)(tree);
|
23
23
|
}
|
24
24
|
}
|
25
|
-
exports.scamDirectiveGenerator = scamDirectiveGenerator;
|
26
25
|
exports.default = scamDirectiveGenerator;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.convertPipeToScam =
|
3
|
+
exports.convertPipeToScam = convertPipeToScam;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const js_1 = require("@nx/js");
|
6
6
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
@@ -25,7 +25,6 @@ function convertPipeToScam(tree, options) {
|
|
25
25
|
const scamFilePath = (0, devkit_1.joinPathFragments)(options.directory, `${options.name}.module.ts`);
|
26
26
|
tree.write(scamFilePath, getModuleFileContent(options.symbolName, options.fileName));
|
27
27
|
}
|
28
|
-
exports.convertPipeToScam = convertPipeToScam;
|
29
28
|
function getModuleFileContent(pipeClassName, pipeFileName) {
|
30
29
|
return `import { NgModule } from '@angular/core';
|
31
30
|
import { CommonModule } from '@angular/common';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeOptions =
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
4
4
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
6
6
|
async function normalizeOptions(tree, options) {
|
@@ -29,4 +29,3 @@ async function normalizeOptions(tree, options) {
|
|
29
29
|
projectName,
|
30
30
|
};
|
31
31
|
}
|
32
|
-
exports.normalizeOptions = normalizeOptions;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.scamPipeGenerator =
|
3
|
+
exports.scamPipeGenerator = scamPipeGenerator;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const pipe_1 = require("../pipe/pipe");
|
6
6
|
const export_scam_1 = require("../utils/export-scam");
|
@@ -22,5 +22,4 @@ async function scamPipeGenerator(tree, rawOptions) {
|
|
22
22
|
await (0, devkit_1.formatFiles)(tree);
|
23
23
|
}
|
24
24
|
}
|
25
|
-
exports.scamPipeGenerator = scamPipeGenerator;
|
26
25
|
exports.default = scamPipeGenerator;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.convertScamToStandalone =
|
3
|
+
exports.convertScamToStandalone = convertScamToStandalone;
|
4
4
|
const path_1 = require("path");
|
5
5
|
const path_2 = require("nx/src/utils/path");
|
6
6
|
function convertScamToStandalone(componentAST, componentFileContents, importsArray, providersArray, moduleNodes, tree, normalizedComponentPath, componentName) {
|
@@ -30,4 +30,3 @@ function convertScamToStandalone(componentAST, componentFileContents, importsArr
|
|
30
30
|
}
|
31
31
|
}
|
32
32
|
}
|
33
|
-
exports.convertScamToStandalone = convertScamToStandalone;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getComponentDataFromAST =
|
3
|
+
exports.getComponentDataFromAST = getComponentDataFromAST;
|
4
4
|
function getComponentDataFromAST(tree, normalizedComponentPath) {
|
5
5
|
const COMPONENT_CONTENT_SELECTOR = 'ClassDeclaration:has(Decorator > CallExpression:has(Identifier[name=Component]))';
|
6
6
|
const COMPONENT_NAME_SELECTOR = 'ClassDeclaration:has(Decorator > CallExpression:has(Identifier[name=Component])) > Identifier';
|
@@ -15,4 +15,3 @@ function getComponentDataFromAST(tree, normalizedComponentPath) {
|
|
15
15
|
const componentName = componentNameNode.getText();
|
16
16
|
return { componentFileContents, componentAST, componentName };
|
17
17
|
}
|
18
|
-
exports.getComponentDataFromAST = getComponentDataFromAST;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getModuleMetadataFromAST =
|
3
|
+
exports.getModuleMetadataFromAST = getModuleMetadataFromAST;
|
4
4
|
function getModuleMetadataFromAST(componentAST, componentFileContents) {
|
5
5
|
const NGMODULE_CONTENT_SELECTOR = 'ClassDeclaration:has(Decorator > CallExpression:has(Identifier[name=NgModule]))';
|
6
6
|
const { tsquery } = require('@phenomnomnominal/tsquery');
|
@@ -61,4 +61,3 @@ function getModuleMetadataFromAST(componentAST, componentFileContents) {
|
|
61
61
|
moduleName,
|
62
62
|
};
|
63
63
|
}
|
64
|
-
exports.getModuleMetadataFromAST = getModuleMetadataFromAST;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getTargetProject =
|
3
|
+
exports.getTargetProject = getTargetProject;
|
4
4
|
function getTargetProject(projectName, projects) {
|
5
5
|
let project;
|
6
6
|
if (projectName && !projects.has(projectName)) {
|
@@ -11,4 +11,3 @@ function getTargetProject(projectName, projects) {
|
|
11
11
|
}
|
12
12
|
return project;
|
13
13
|
}
|
14
|
-
exports.getTargetProject = getTargetProject;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.replaceModuleUsagesWithComponent =
|
3
|
+
exports.replaceModuleUsagesWithComponent = replaceModuleUsagesWithComponent;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const path_1 = require("path");
|
6
6
|
function replaceModuleUsagesWithComponent(tree, moduleName, componentName) {
|
@@ -16,4 +16,3 @@ function replaceModuleUsagesWithComponent(tree, moduleName, componentName) {
|
|
16
16
|
}
|
17
17
|
});
|
18
18
|
}
|
19
|
-
exports.replaceModuleUsagesWithComponent = replaceModuleUsagesWithComponent;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.selectorExistsInAST =
|
3
|
+
exports.selectorExistsInAST = selectorExistsInAST;
|
4
4
|
function selectorExistsInAST(selector, ast) {
|
5
5
|
const { tsquery } = require('@phenomnomnominal/tsquery');
|
6
6
|
return tsquery(ast, selector, { visitAllChildren: true }).length > 0;
|
7
7
|
}
|
8
|
-
exports.selectorExistsInAST = selectorExistsInAST;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.verifyIsInlineScam =
|
3
|
+
exports.verifyIsInlineScam = verifyIsInlineScam;
|
4
4
|
const selector_exists_in_ast_1 = require("./selector-exists-in-ast");
|
5
5
|
function verifyIsInlineScam(componentAST) {
|
6
6
|
const NGMODULE_DECORATOR_SELECTOR = 'ClassDeclaration > Decorator > CallExpression:has(Identifier[name=NgModule])';
|
@@ -8,4 +8,3 @@ function verifyIsInlineScam(componentAST) {
|
|
8
8
|
return ((0, selector_exists_in_ast_1.selectorExistsInAST)(COMPONENT_DECORATOR_SELECTOR, componentAST) &&
|
9
9
|
(0, selector_exists_in_ast_1.selectorExistsInAST)(NGMODULE_DECORATOR_SELECTOR, componentAST));
|
10
10
|
}
|
11
|
-
exports.verifyIsInlineScam = verifyIsInlineScam;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.verifyModuleIsScam =
|
3
|
+
exports.verifyModuleIsScam = verifyModuleIsScam;
|
4
4
|
function verifyModuleIsScam(exportsArray, componentName, declarationsArray) {
|
5
5
|
// Check exports has 1 export and check export exists in declaration and is the same as the component name
|
6
6
|
if (exportsArray.length !== 1 &&
|
@@ -9,4 +9,3 @@ function verifyModuleIsScam(exportsArray, componentName, declarationsArray) {
|
|
9
9
|
throw new Error(`The NgModule is not a SCAM. Please ensure the NgModule only contains one export and that the component is both declared and exported from the NgModule.`);
|
10
10
|
}
|
11
11
|
}
|
12
|
-
exports.verifyModuleIsScam = verifyModuleIsScam;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.scamToStandalone =
|
3
|
+
exports.scamToStandalone = scamToStandalone;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const lib_1 = require("./lib");
|
6
6
|
async function scamToStandalone(tree, { component, project: projectName, skipFormat }) {
|
@@ -23,5 +23,4 @@ async function scamToStandalone(tree, { component, project: projectName, skipFor
|
|
23
23
|
await (0, devkit_1.formatFiles)(tree);
|
24
24
|
}
|
25
25
|
}
|
26
|
-
exports.scamToStandalone = scamToStandalone;
|
27
26
|
exports.default = scamToStandalone;
|
@@ -1,16 +1,19 @@
|
|
1
1
|
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
|
2
2
|
import { AppComponent } from './app.component';
|
3
|
-
import { NxWelcomeComponent } from './nx-welcome.component'
|
4
|
-
import { RouterTestingModule } from '@angular/router/testing'
|
5
|
-
import { Router } from '@angular/router';
|
3
|
+
import { NxWelcomeComponent } from './nx-welcome.component';<% if(useRouterTestingModule) { %>
|
4
|
+
import { RouterTestingModule } from '@angular/router/testing';<% } %>
|
5
|
+
import { Router<% if(!useRouterTestingModule) { %>, RouterModule<% } %> } from '@angular/router';
|
6
6
|
|
7
7
|
describe('AppComponent', () => {
|
8
8
|
beforeEach(async () => {
|
9
9
|
await TestBed.configureTestingModule({
|
10
|
-
imports: [
|
10
|
+
imports: [<% if(useRouterTestingModule) { %>
|
11
11
|
RouterTestingModule.withRoutes([
|
12
12
|
{ path: '', component: NxWelcomeComponent },
|
13
|
-
]),<% if
|
13
|
+
]),<% } %><% if(!useRouterTestingModule) { %>
|
14
|
+
RouterModule.forRoot([
|
15
|
+
{ path: '', component: NxWelcomeComponent },
|
16
|
+
]),<% } %><% if (standalone) { %>
|
14
17
|
AppComponent,
|
15
18
|
NxWelcomeComponent,<% } %>
|
16
19
|
],<% if (!standalone) { %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
// as Angular attempt to figure out how to fix HMR when styles.js
|
4
4
|
// is attached to the index.html with type=module
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.addCypressOnErrorWorkaround =
|
6
|
+
exports.addCypressOnErrorWorkaround = addCypressOnErrorWorkaround;
|
7
7
|
const devkit_1 = require("@nx/devkit");
|
8
8
|
function addCypressOnErrorWorkaround(tree, schema) {
|
9
9
|
if (!schema.e2eProjectName) {
|
@@ -49,4 +49,3 @@ function addCypressOnErrorWorkaround(tree, schema) {
|
|
49
49
|
: '';
|
50
50
|
tree.write(pathToCommandsFile, `${commandsContent}\n${commandToAdd}`);
|
51
51
|
}
|
52
|
-
exports.addCypressOnErrorWorkaround = addCypressOnErrorWorkaround;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addRemoteEntry =
|
3
|
+
exports.addRemoteEntry = addRemoteEntry;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
6
6
|
function addRemoteEntry(tree, { appName, routing, prefix, standalone }, appRoot) {
|
@@ -19,4 +19,3 @@ function addRemoteEntry(tree, { appName, routing, prefix, standalone }, appRoot)
|
|
19
19
|
(0, route_utils_1.addRoute)(tree, (0, devkit_1.joinPathFragments)(appRoot, 'src/app/app.routes.ts'), `{ path: '', loadChildren: () => import('./remote-entry/entry.module').then(m => m.RemoteEntryModule) }`);
|
20
20
|
}
|
21
21
|
}
|
22
|
-
exports.addRemoteEntry = addRemoteEntry;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.checkIsCommaNeeded = checkIsCommaNeeded;
|
4
|
+
exports.addRemoteToHost = addRemoteToHost;
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
5
6
|
const js_1 = require("@nx/js");
|
6
7
|
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
@@ -14,7 +15,6 @@ function checkIsCommaNeeded(mfRemoteText) {
|
|
14
15
|
: true
|
15
16
|
: false;
|
16
17
|
}
|
17
|
-
exports.checkIsCommaNeeded = checkIsCommaNeeded;
|
18
18
|
function addRemoteToHost(tree, options) {
|
19
19
|
if (options.host) {
|
20
20
|
const hostProject = (0, devkit_1.readProjectConfiguration)(tree, options.host);
|
@@ -30,7 +30,6 @@ function addRemoteToHost(tree, options) {
|
|
30
30
|
addLazyLoadedRouteToHostAppModule(tree, options, hostFederationType);
|
31
31
|
}
|
32
32
|
}
|
33
|
-
exports.addRemoteToHost = addRemoteToHost;
|
34
33
|
function getDynamicManifestFile(tree, project) {
|
35
34
|
// {sourceRoot}/assets/module-federation.manifest.json was the generated
|
36
35
|
// path for the manifest file in the past. We now generate the manifest
|
@@ -53,7 +52,7 @@ function addRemoteToStaticHost(tree, options, hostProject, isHostUsingTypescript
|
|
53
52
|
const hostMFConfig = tree.read(hostMFConfigPath, 'utf-8');
|
54
53
|
const { tsquery } = require('@phenomnomnominal/tsquery');
|
55
54
|
const webpackAst = tsquery.ast(hostMFConfig);
|
56
|
-
const mfRemotesNode = tsquery(webpackAst, 'Identifier[name=remotes]
|
55
|
+
const mfRemotesNode = tsquery(webpackAst, 'ObjectLiteralExpression > PropertyAssignment:has(Identifier[name=remotes]) > ArrayLiteralExpression', { visitAllChildren: true })[0];
|
57
56
|
const endOfPropertiesPos = mfRemotesNode.getEnd() - 1;
|
58
57
|
const isCommaNeeded = checkIsCommaNeeded(mfRemotesNode.getText());
|
59
58
|
const updatedConfig = `${hostMFConfig.slice(0, endOfPropertiesPos)}${isCommaNeeded ? ',' : ''}'${options.appName}',${hostMFConfig.slice(endOfPropertiesPos)}`;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.changeBuildTarget =
|
3
|
+
exports.changeBuildTarget = changeBuildTarget;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function changeBuildTarget(host, options) {
|
6
6
|
const appConfig = (0, devkit_1.readProjectConfiguration)(host, options.appName);
|
@@ -20,4 +20,3 @@ function changeBuildTarget(host, options) {
|
|
20
20
|
};
|
21
21
|
(0, devkit_1.updateProjectConfiguration)(host, options.appName, appConfig);
|
22
22
|
}
|
23
|
-
exports.changeBuildTarget = changeBuildTarget;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.fixBootstrap =
|
3
|
+
exports.fixBootstrap = fixBootstrap;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function fixBootstrap(tree, appRoot, options) {
|
6
6
|
const mainFilePath = (0, devkit_1.joinPathFragments)(appRoot, 'src/main.ts');
|
@@ -29,7 +29,6 @@ fetch('${manifestPath}')
|
|
29
29
|
tree.write(mainFilePath, fetchMFManifestCode);
|
30
30
|
}
|
31
31
|
}
|
32
|
-
exports.fixBootstrap = fixBootstrap;
|
33
32
|
const standaloneBootstrapCode = () => `import { bootstrapApplication } from '@angular/platform-browser';
|
34
33
|
import { appConfig } from './app/app.config';
|
35
34
|
import { RemoteEntryComponent } from './app/remote-entry/entry.component';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.generateWebpackConfig =
|
3
|
+
exports.generateWebpackConfig = generateWebpackConfig;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function generateWebpackConfig(tree, options, appRoot, remotesWithPorts) {
|
6
6
|
if (tree.exists(`${appRoot}/module-federation.config.js`) ||
|
@@ -28,4 +28,3 @@ function generateWebpackConfig(tree, options, appRoot, remotesWithPorts) {
|
|
28
28
|
tree.delete((0, devkit_1.joinPathFragments)(appRoot, 'tsconfig.lint.json'));
|
29
29
|
}
|
30
30
|
}
|
31
|
-
exports.generateWebpackConfig = generateWebpackConfig;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getRemotesWithPorts =
|
3
|
+
exports.getRemotesWithPorts = getRemotesWithPorts;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function getRemotesWithPorts(host, options) {
|
6
6
|
// If type is host and remotes supplied, check remotes exist
|
@@ -18,4 +18,3 @@ function getRemotesWithPorts(host, options) {
|
|
18
18
|
}
|
19
19
|
return remotesWithPort;
|
20
20
|
}
|
21
|
-
exports.getRemotesWithPorts = getRemotesWithPorts;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeOptions =
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
4
4
|
const project_1 = require("../../utils/project");
|
5
5
|
function normalizeOptions(tree, options) {
|
6
6
|
return {
|
@@ -11,4 +11,3 @@ function normalizeOptions(tree, options) {
|
|
11
11
|
standalone: options.standalone ?? true,
|
12
12
|
};
|
13
13
|
}
|
14
|
-
exports.normalizeOptions = normalizeOptions;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.removeDeadCodeFromRemote =
|
3
|
+
exports.removeDeadCodeFromRemote = removeDeadCodeFromRemote;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function removeDeadCodeFromRemote(tree, options) {
|
6
6
|
const projectName = options.appName;
|
@@ -53,4 +53,3 @@ export class AppModule {}`);
|
|
53
53
|
tree.write(pathToIndexHtml, newIndexContents);
|
54
54
|
}
|
55
55
|
}
|
56
|
-
exports.removeDeadCodeFromRemote = removeDeadCodeFromRemote;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupHostIfDynamic =
|
3
|
+
exports.setupHostIfDynamic = setupHostIfDynamic;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const version_utils_1 = require("../../utils/version-utils");
|
6
6
|
function setupHostIfDynamic(tree, options) {
|
@@ -22,4 +22,3 @@ function setupHostIfDynamic(tree, options) {
|
|
22
22
|
delete project.targets.build.configurations.production?.customWebpackConfig;
|
23
23
|
(0, devkit_1.updateProjectConfiguration)(tree, options.appName, project);
|
24
24
|
}
|
25
|
-
exports.setupHostIfDynamic = setupHostIfDynamic;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupServeTarget =
|
3
|
+
exports.setupServeTarget = setupServeTarget;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function setupServeTarget(host, options) {
|
6
6
|
const appConfig = (0, devkit_1.readProjectConfiguration)(host, options.appName);
|
@@ -36,4 +36,3 @@ function setupServeTarget(host, options) {
|
|
36
36
|
}
|
37
37
|
(0, devkit_1.updateProjectConfiguration)(host, options.appName, appConfig);
|
38
38
|
}
|
39
|
-
exports.setupServeTarget = setupServeTarget;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupTspathForRemote =
|
3
|
+
exports.setupTspathForRemote = setupTspathForRemote;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const js_1 = require("@nx/js");
|
6
6
|
function setupTspathForRemote(tree, options) {
|
@@ -13,4 +13,3 @@ function setupTspathForRemote(tree, options) {
|
|
13
13
|
(0, devkit_1.joinPathFragments)(project.root, exportPath),
|
14
14
|
]);
|
15
15
|
}
|
16
|
-
exports.setupTspathForRemote = setupTspathForRemote;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { Tree } from 'nx/
|
2
|
-
import { Schema } from '../schema';
|
1
|
+
import { type Tree } from '@nx/devkit';
|
2
|
+
import type { Schema } from '../schema';
|
3
3
|
export declare function updateHostAppRoutes(tree: Tree, options: Schema): void;
|
@@ -1,16 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateHostAppRoutes =
|
4
|
-
const project_configuration_1 = require("nx/src/generators/utils/project-configuration");
|
3
|
+
exports.updateHostAppRoutes = updateHostAppRoutes;
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
6
|
-
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
7
5
|
const route_utils_1 = require("../../../utils/nx-devkit/route-utils");
|
8
|
-
|
6
|
+
const version_utils_1 = require("../../utils/version-utils");
|
9
7
|
function updateHostAppRoutes(tree, options) {
|
10
|
-
|
11
|
-
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
12
|
-
}
|
13
|
-
const { sourceRoot } = (0, project_configuration_1.readProjectConfiguration)(tree, options.appName);
|
8
|
+
const { sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.appName);
|
14
9
|
tree.write((0, devkit_1.joinPathFragments)(sourceRoot, 'app/app.component.html'), `<ul class="remote-menu">
|
15
10
|
<li><a routerLink="/">Home</a></li>
|
16
11
|
</ul>
|
@@ -22,17 +17,17 @@ function updateHostAppRoutes(tree, options) {
|
|
22
17
|
pathToHostRootRoutingFile = (0, devkit_1.joinPathFragments)(sourceRoot, 'app/app-routing.module.ts');
|
23
18
|
hostRootRoutingFile = tree.read(pathToHostRootRoutingFile, 'utf-8');
|
24
19
|
}
|
25
|
-
let sourceFile = tsModule.createSourceFile(pathToHostRootRoutingFile, hostRootRoutingFile, tsModule.ScriptTarget.Latest, true);
|
26
20
|
(0, route_utils_1.addRoute)(tree, pathToHostRootRoutingFile, `{
|
27
21
|
path: '',
|
28
22
|
component: NxWelcomeComponent
|
29
23
|
}`);
|
30
24
|
tree.write(pathToHostRootRoutingFile, `import { NxWelcomeComponent } from './nx-welcome.component';
|
31
25
|
${tree.read(pathToHostRootRoutingFile, 'utf-8')}`);
|
26
|
+
const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(tree);
|
32
27
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, '../files/host-files'), (0, devkit_1.joinPathFragments)(sourceRoot, 'app'), {
|
33
28
|
appName: options.appName,
|
34
29
|
standalone: options.standalone,
|
30
|
+
useRouterTestingModule: angularMajorVersion < 18,
|
35
31
|
tmpl: '',
|
36
32
|
});
|
37
33
|
}
|
38
|
-
exports.updateHostAppRoutes = updateHostAppRoutes;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateTsConfig =
|
3
|
+
exports.updateTsConfig = updateTsConfig;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function updateTsConfig(tree, schema) {
|
6
6
|
const { root } = (0, devkit_1.readProjectConfiguration)(tree, schema.appName);
|
@@ -16,4 +16,3 @@ function updateTsConfig(tree, schema) {
|
|
16
16
|
return json;
|
17
17
|
});
|
18
18
|
}
|
19
|
-
exports.updateTsConfig = updateTsConfig;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupMf =
|
3
|
+
exports.setupMf = setupMf;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const lib_1 = require("./lib");
|
6
6
|
const versions_1 = require("../../utils/versions");
|
@@ -59,5 +59,4 @@ async function setupMf(tree, rawOptions) {
|
|
59
59
|
}
|
60
60
|
return installTask;
|
61
61
|
}
|
62
|
-
exports.setupMf = setupMf;
|
63
62
|
exports.default = setupMf;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addDependencies =
|
3
|
+
exports.addDependencies = addDependencies;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const semver_1 = require("semver");
|
6
6
|
const version_utils_1 = require("../../utils/version-utils");
|
@@ -34,4 +34,3 @@ function addDependencies(tree, isUsingApplicationBuilder) {
|
|
34
34
|
}
|
35
35
|
(0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies);
|
36
36
|
}
|
37
|
-
exports.addDependencies = addDependencies;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addHydration =
|
3
|
+
exports.addHydration = addHydration;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const js_1 = require("@nx/js");
|
6
6
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
@@ -33,4 +33,3 @@ function addHydration(tree, options) {
|
|
33
33
|
(0, ast_utils_1.addProviderToModule)(tree, sourceFile, pathToClientConfigFile, 'provideClientHydration()');
|
34
34
|
}
|
35
35
|
}
|
36
|
-
exports.addHydration = addHydration;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addServerFile =
|
3
|
+
exports.addServerFile = addServerFile;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const version_utils_1 = require("../../utils/version-utils");
|
6
6
|
const constants_1 = require("./constants");
|
@@ -18,7 +18,6 @@ function addServerFile(tree, schema, isUsingApplicationBuilder) {
|
|
18
18
|
? ['server-builder', 'v17+']
|
19
19
|
: ['server-builder', 'pre-v17'])), projectRoot, { ...schema, browserBundleOutputPath, tpl: '' });
|
20
20
|
}
|
21
|
-
exports.addServerFile = addServerFile;
|
22
21
|
function getApplicationBuilderBrowserOutputPath(outputPath) {
|
23
22
|
if (outputPath) {
|
24
23
|
if (typeof outputPath === 'string') {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.generateSSRFiles =
|
3
|
+
exports.generateSSRFiles = generateSSRFiles;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function generateSSRFiles(tree, schema, isUsingApplicationBuilder) {
|
6
6
|
const { root: projectRoot, targets } = (0, devkit_1.readProjectConfiguration)(tree, schema.project);
|
@@ -17,4 +17,3 @@ function generateSSRFiles(tree, schema, isUsingApplicationBuilder) {
|
|
17
17
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(pathToFiles, 'ngmodule'), projectRoot, { ...schema, tpl: '' });
|
18
18
|
}
|
19
19
|
}
|
20
|
-
exports.generateSSRFiles = generateSSRFiles;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.setServerTsConfigOptionsForApplicationBuilder = setServerTsConfigOptionsForApplicationBuilder;
|
4
|
+
exports.generateTsConfigServerJsonForBrowserBuilder = generateTsConfigServerJsonForBrowserBuilder;
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
5
6
|
const path_1 = require("path");
|
6
7
|
function setServerTsConfigOptionsForApplicationBuilder(tree, options) {
|
@@ -18,7 +19,6 @@ function setServerTsConfigOptionsForApplicationBuilder(tree, options) {
|
|
18
19
|
return json;
|
19
20
|
});
|
20
21
|
}
|
21
|
-
exports.setServerTsConfigOptionsForApplicationBuilder = setServerTsConfigOptionsForApplicationBuilder;
|
22
22
|
function generateTsConfigServerJsonForBrowserBuilder(tree, options) {
|
23
23
|
const { root } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
24
24
|
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, '..', 'files', 'root'), root, {
|
@@ -26,4 +26,3 @@ function generateTsConfigServerJsonForBrowserBuilder(tree, options) {
|
|
26
26
|
tpl: '',
|
27
27
|
});
|
28
28
|
}
|
29
|
-
exports.generateTsConfigServerJsonForBrowserBuilder = generateTsConfigServerJsonForBrowserBuilder;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeOptions =
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
4
4
|
const ast_utils_1 = require("../../../utils/nx-devkit/ast-utils");
|
5
5
|
const version_utils_1 = require("../../utils/version-utils");
|
6
6
|
function normalizeOptions(tree, options) {
|
@@ -23,4 +23,3 @@ function normalizeOptions(tree, options) {
|
|
23
23
|
hydration,
|
24
24
|
};
|
25
25
|
}
|
26
|
-
exports.normalizeOptions = normalizeOptions;
|