@nx/react 23.0.0-beta.2 → 23.0.0-beta.20

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.
Files changed (110) hide show
  1. package/index.d.ts +0 -3
  2. package/index.d.ts.map +1 -1
  3. package/index.js +1 -4
  4. package/migrations.json +6 -0
  5. package/package.json +18 -18
  6. package/plugins/component-testing/index.js +7 -7
  7. package/plugins/component-testing/webpack-fallback.js +2 -2
  8. package/plugins/storybook/index.js +3 -3
  9. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +4 -4
  10. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +5 -5
  11. package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +4 -4
  12. package/src/generators/application/application.d.ts.map +1 -1
  13. package/src/generators/application/application.js +32 -18
  14. package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
  15. package/src/generators/application/lib/add-linting.js +10 -11
  16. package/src/generators/application/lib/add-project.d.ts.map +1 -1
  17. package/src/generators/application/lib/add-project.js +10 -0
  18. package/src/generators/application/lib/add-routing.js +2 -2
  19. package/src/generators/application/lib/bundlers/add-vite.d.ts.map +1 -1
  20. package/src/generators/application/lib/bundlers/add-vite.js +10 -2
  21. package/src/generators/application/lib/create-application-files.d.ts +1 -1
  22. package/src/generators/application/lib/create-application-files.js +2 -2
  23. package/src/generators/application/lib/normalize-options.js +5 -5
  24. package/src/generators/component/component.js +2 -2
  25. package/src/generators/component/lib/normalize-options.d.ts.map +1 -1
  26. package/src/generators/component/lib/normalize-options.js +5 -6
  27. package/src/generators/component/schema.d.ts +2 -7
  28. package/src/generators/component/schema.json +0 -5
  29. package/src/generators/component-story/component-story.d.ts.map +1 -1
  30. package/src/generators/component-story/component-story.js +3 -4
  31. package/src/generators/component-test/component-test.d.ts.map +1 -1
  32. package/src/generators/component-test/component-test.js +3 -4
  33. package/src/generators/cypress-component-configuration/lib/add-files.d.ts +1 -1
  34. package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +1 -1
  35. package/src/generators/cypress-component-configuration/lib/add-files.js +4 -4
  36. package/src/generators/federate-module/federate-module.d.ts.map +1 -1
  37. package/src/generators/federate-module/federate-module.js +2 -2
  38. package/src/generators/federate-module/lib/utils.js +2 -2
  39. package/src/generators/hook/hook.d.ts.map +1 -1
  40. package/src/generators/hook/hook.js +5 -6
  41. package/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  42. package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  43. package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  44. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
  45. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  46. package/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  47. package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  48. package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  49. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
  50. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
  51. package/src/generators/host/host.d.ts.map +1 -1
  52. package/src/generators/host/host.js +5 -5
  53. package/src/generators/host/lib/add-module-federation-files.d.ts.map +1 -1
  54. package/src/generators/host/lib/add-module-federation-files.js +3 -3
  55. package/src/generators/host/lib/normalize-host-name.js +2 -2
  56. package/src/generators/host/lib/update-module-federation-tsconfig.js +2 -2
  57. package/src/generators/init/init.d.ts.map +1 -1
  58. package/src/generators/init/init.js +2 -2
  59. package/src/generators/library/lib/add-linting.js +7 -8
  60. package/src/generators/library/lib/add-rollup-build-target.d.ts.map +1 -1
  61. package/src/generators/library/lib/add-rollup-build-target.js +6 -0
  62. package/src/generators/library/lib/install-common-dependencies.js +2 -2
  63. package/src/generators/library/lib/normalize-options.d.ts.map +1 -1
  64. package/src/generators/library/lib/normalize-options.js +7 -7
  65. package/src/generators/library/lib/update-app-routes.js +2 -2
  66. package/src/generators/library/library.d.ts.map +1 -1
  67. package/src/generators/library/library.js +14 -18
  68. package/src/generators/redux/redux.d.ts.map +1 -1
  69. package/src/generators/redux/redux.js +7 -8
  70. package/src/generators/redux/schema.d.ts +1 -1
  71. package/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  72. package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  73. package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  74. package/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  75. package/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  76. package/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  77. package/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  78. package/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
  79. package/src/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
  80. package/src/generators/remote/lib/update-host-with-remote.js +4 -5
  81. package/src/generators/remote/remote.d.ts.map +1 -1
  82. package/src/generators/remote/remote.js +7 -7
  83. package/src/generators/setup-ssr/setup-ssr.d.ts.map +1 -1
  84. package/src/generators/setup-ssr/setup-ssr.js +5 -7
  85. package/src/generators/stories/stories.js +5 -6
  86. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
  87. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
  88. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
  89. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
  90. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +1 -1
  91. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.js +2 -2
  92. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +3 -0
  93. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts.map +1 -0
  94. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
  95. package/src/module-federation/ast-utils.js +2 -2
  96. package/src/plugins/router-plugin.d.ts.map +1 -1
  97. package/src/plugins/router-plugin.js +14 -23
  98. package/src/rules/update-module-federation-project.js +3 -3
  99. package/src/utils/add-mf-env-to-inputs.d.ts.map +1 -1
  100. package/src/utils/add-mf-env-to-inputs.js +15 -8
  101. package/src/utils/ast-utils.js +15 -15
  102. package/src/utils/component-props.js +3 -3
  103. package/src/utils/create-ts-config.js +3 -3
  104. package/src/utils/ct-utils.d.ts +1 -1
  105. package/src/utils/ct-utils.d.ts.map +1 -1
  106. package/src/utils/ct-utils.js +6 -6
  107. package/src/utils/normalize-remote.js +2 -2
  108. package/src/utils/versions.d.ts +1 -1
  109. package/src/utils/versions.js +1 -1
  110. package/tailwind.js +2 -2
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const assertion_1 = require("../../../utils/assertion");
7
7
  const find_free_port_1 = require("./find-free-port");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const internal_2 = require("@nx/js/internal");
9
9
  async function normalizeOptions(host, options) {
10
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
11
- const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
10
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
11
+ const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
12
12
  name: options.name,
13
13
  projectType: 'application',
14
14
  directory: options.directory,
@@ -19,7 +19,7 @@ async function normalizeOptions(host, options) {
19
19
  nxJson.useInferencePlugins !== false;
20
20
  options.addPlugin ??= addPlugin;
21
21
  options.rootProject = appProjectRoot === '.';
22
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
22
+ const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
23
23
  const appProjectName = !isUsingTsSolutionConfig || options.name ? projectName : importPath;
24
24
  const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`;
25
25
  const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.componentGenerator = componentGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  const path_1 = require("path");
7
7
  const ast_utils_1 = require("../../utils/ast-utils");
8
8
  const get_in_source_vitest_tests_template_1 = require("../../utils/get-in-source-vitest-tests-template");
@@ -45,7 +45,7 @@ function createComponentFiles(host, options) {
45
45
  let tsModule;
46
46
  function addExportsToBarrel(host, options) {
47
47
  if (!tsModule) {
48
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
48
+ tsModule = (0, internal_1.ensureTypescript)();
49
49
  }
50
50
  const workspace = (0, devkit_1.getProjects)(host);
51
51
  const isApp = workspace.get(options.projectName).projectType === 'application';
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/component/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,IAAI,EAAE,MAAM,YAAY,CAAC;AAK3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CA2D3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/component/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,IAAI,EAAE,MAAM,YAAY,CAAC;AAI3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CA0D3B"}
@@ -2,23 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const assertion_1 = require("../../../utils/assertion");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
+ const internal_2 = require("@nx/js/internal");
8
8
  async function normalizeOptions(tree, options) {
9
9
  (0, assertion_1.assertValidStyle)(options.style);
10
- const { artifactName: name, directory, fileName, filePath, fileExtension, fileExtensionType, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
10
+ const { artifactName: name, directory, fileName, filePath, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
11
11
  path: options.path,
12
12
  name: options.name,
13
13
  allowedFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
14
- fileExtension: options.js ? 'js' : 'tsx',
15
- js: options.js,
14
+ fileExtension: 'tsx',
16
15
  });
17
16
  const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
18
17
  const { className } = (0, devkit_1.names)(name);
19
18
  const { sourceRoot: projectSourceRoot, root: projectRoot, projectType, } = project;
20
19
  if (options.export &&
21
- (0, ts_solution_setup_1.getProjectType)(tree, projectRoot, projectType) === 'application') {
20
+ (0, internal_2.getProjectType)(tree, projectRoot, projectType) === 'application') {
22
21
  devkit_1.logger.warn(`The "--export" option should not be used with applications and will do nothing.`);
23
22
  }
24
23
  options.classComponent = options.classComponent ?? false;
@@ -1,4 +1,4 @@
1
- import type { FileExtensionType } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
1
+ import type { FileExtensionType } from '@nx/devkit/internal';
2
2
  import { SupportedStyles } from '../../../typings/style';
3
3
 
4
4
  export interface Schema {
@@ -14,14 +14,9 @@ export interface Schema {
14
14
  skipFormat?: boolean;
15
15
  // Used by Next.js to determine how React should generate the page
16
16
  isNextPage?: boolean;
17
-
18
- /**
19
- * @deprecated Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21.
20
- */
21
- js?: boolean;
22
17
  }
23
18
 
24
- export interface NormalizedSchema extends Omit<Schema, 'js'> {
19
+ export interface NormalizedSchema extends Schema {
25
20
  directory: string;
26
21
  projectRoot: string;
27
22
  projectSourceRoot: string;
@@ -45,11 +45,6 @@
45
45
  ]
46
46
  }
47
47
  },
48
- "js": {
49
- "type": "boolean",
50
- "description": "Generate JavaScript files rather than TypeScript files.",
51
- "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
52
- },
53
48
  "skipTests": {
54
49
  "type": "boolean",
55
50
  "description": "When true, does not create `spec.ts` test files for the new component.",
@@ -1 +1 @@
1
- {"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-story/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAWtC,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,EACE,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,EAAE,gCAAgC,QA2EpC;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,cAAc,EAAE,EAAE,CAAC,IAAI,EACvB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,OAAO,EACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,aAAa,CAAC,EAAE,OAAO,QAwBxB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,iBAWzC;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-story/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAWtC,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,EACE,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,EAAE,gCAAgC,QA2EpC;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,cAAc,EAAE,EAAE,CAAC,IAAI,EACvB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,OAAO,EACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,aAAa,CAAC,EAAE,OAAO,QAwBxB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,iBAWzC;AAED,eAAe,uBAAuB,CAAC"}
@@ -4,8 +4,7 @@ exports.createComponentStoriesFile = createComponentStoriesFile;
4
4
  exports.findPropsAndGenerateFile = findPropsAndGenerateFile;
5
5
  exports.componentStoryGenerator = componentStoryGenerator;
6
6
  const devkit_1 = require("@nx/devkit");
7
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
+ const internal_1 = require("@nx/js/internal");
9
8
  const ast_utils_1 = require("../../utils/ast-utils");
10
9
  const component_props_1 = require("../../utils/component-props");
11
10
  const framework_1 = require("../../utils/framework");
@@ -13,10 +12,10 @@ const path_1 = require("path");
13
12
  let tsModule;
14
13
  function createComponentStoriesFile(host, { project, componentPath, interactionTests, uiFramework, }) {
15
14
  if (!tsModule) {
16
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
15
+ tsModule = (0, internal_1.ensureTypescript)();
17
16
  }
18
17
  const proj = (0, devkit_1.getProjects)(host).get(project);
19
- const componentFilePath = (0, devkit_1.joinPathFragments)((0, ts_solution_setup_1.getProjectSourceRoot)(proj, host), componentPath);
18
+ const componentFilePath = (0, devkit_1.joinPathFragments)((0, internal_1.getProjectSourceRoot)(proj, host), componentPath);
20
19
  const componentDirectory = componentFilePath.replace(componentFilePath.slice(componentFilePath.lastIndexOf('/')), '');
21
20
  const isPlainJs = componentFilePath.endsWith('.jsx') || componentFilePath.endsWith('.js');
22
21
  const componentFileName = componentFilePath
@@ -1 +1 @@
1
- {"version":3,"file":"component-test.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-test/component-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,iBAkB7B;AAqED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"component-test.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-test/component-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,iBAkB7B;AAqED,eAAe,sBAAsB,CAAC"}
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.componentTestGenerator = componentTestGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
7
6
  const path_1 = require("path");
8
7
  const ast_utils_1 = require("../../utils/ast-utils");
9
8
  const component_props_1 = require("../../utils/component-props");
@@ -14,7 +13,7 @@ async function componentTestGenerator(tree, options) {
14
13
  // normalize any windows paths
15
14
  options.componentPath = options.componentPath.replace(/\\/g, '/');
16
15
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
17
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
16
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(projectConfig, tree);
18
17
  const normalizedPath = options.componentPath.startsWith(sourceRoot)
19
18
  ? (0, path_1.relative)(sourceRoot, options.componentPath)
20
19
  : options.componentPath;
@@ -25,7 +24,7 @@ async function componentTestGenerator(tree, options) {
25
24
  }
26
25
  function generateSpecsForComponents(tree, filePath) {
27
26
  if (!tsModule) {
28
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
27
+ tsModule = (0, internal_1.ensureTypescript)();
29
28
  }
30
29
  const sourceFile = tsModule.createSourceFile(filePath, tree.read(filePath, 'utf-8'), tsModule.ScriptTarget.Latest, true);
31
30
  const cmpNodes = (0, ast_utils_1.findExportDeclarationsForJsx)(sourceFile);
@@ -1,4 +1,4 @@
1
- import type { FoundTarget } from '@nx/cypress/src/utils/find-target-options';
1
+ import type { FoundTarget } from '@nx/cypress/internal';
2
2
  import { ProjectConfiguration, Tree } from '@nx/devkit';
3
3
  import type { CypressComponentConfigurationSchema } from '../schema';
4
4
  export declare function addFiles(tree: Tree, projectConfig: ProjectConfiguration, options: CypressComponentConfigurationSchema, found: FoundTarget): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"add-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/cypress-component-configuration/lib/add-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAIL,oBAAoB,EACpB,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAErE,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,OAAO,EAAE,mCAAmC,EAC5C,KAAK,EAAE,WAAW,iBAqEnB"}
1
+ {"version":3,"file":"add-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/cypress-component-configuration/lib/add-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAIL,oBAAoB,EACpB,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAErE,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,OAAO,EAAE,mCAAmC,EAC5C,KAAK,EAAE,WAAW,iBAqEnB"}
@@ -35,15 +35,15 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.addFiles = addFiles;
37
37
  const devkit_1 = require("@nx/devkit");
38
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
38
+ const internal_1 = require("@nx/js/internal");
39
39
  const versions_1 = require("nx/src/utils/versions");
40
40
  const ct_utils_1 = require("../../../utils/ct-utils");
41
41
  const component_test_1 = require("../../component-test/component-test");
42
42
  async function addFiles(tree, projectConfig, options, found) {
43
43
  // must dynamicaly import to prevent packages not using cypress from erroring out
44
44
  // when importing react
45
- const { addMountDefinition } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/config')));
46
- const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/versions')));
45
+ const { addMountDefinition } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
46
+ const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
47
47
  const installedCypressMajorVersion = getInstalledCypressMajorVersion(tree);
48
48
  // Specifically undefined to allow Remix workaround of passing an empty string
49
49
  const actualBundler = await (0, ct_utils_1.getActualBundler)(tree, options, found);
@@ -66,7 +66,7 @@ async function addFiles(tree, projectConfig, options, found) {
66
66
  }
67
67
  if (options.generateTests) {
68
68
  const filePaths = [];
69
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
69
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(projectConfig, tree);
70
70
  (0, devkit_1.visitNotIgnoredFiles)(tree, sourceRoot, (filePath) => {
71
71
  if ((0, ct_utils_1.isComponent)(tree, filePath)) {
72
72
  filePaths.push(filePath);
@@ -1 +1 @@
1
- {"version":3,"file":"federate-module.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/federate-module/federate-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,IAAI,EAQL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOlC,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAiEvE;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"federate-module.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/federate-module/federate-module.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,IAAI,EAQL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAiEvE;AAED,eAAe,uBAAuB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.federateModuleGenerator = federateModuleGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const remote_1 = require("../remote/remote");
6
7
  const utils_1 = require("./lib/utils");
7
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
8
8
  const js_1 = require("@nx/js");
9
9
  async function federateModuleGenerator(tree, schema) {
10
10
  // Check if the file exists
@@ -14,7 +14,7 @@ async function federateModuleGenerator(tree, schema) {
14
14
  Path: ${schema.path}`);
15
15
  }
16
16
  const tasks = [];
17
- const { projectName: remoteName, projectRoot: remoteRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
17
+ const { projectName: remoteName, projectRoot: remoteRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
18
18
  name: schema.remote,
19
19
  directory: schema.remoteDirectory,
20
20
  projectType: 'application',
@@ -9,10 +9,10 @@ exports.updateExposesPropertyinAST = updateExposesPropertyinAST;
9
9
  exports.writeToConfig = writeToConfig;
10
10
  exports.updateExposesProperty = updateExposesProperty;
11
11
  const devkit_1 = require("@nx/devkit");
12
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
12
+ const internal_1 = require("@nx/js/internal");
13
13
  let tsModule;
14
14
  if (!tsModule) {
15
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
15
+ tsModule = (0, internal_1.ensureTypescript)();
16
16
  }
17
17
  /**
18
18
  * Adds a Module Federation path to the exposes property of the module federation config
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/hook/hook.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,IAAI,EACL,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAclC,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAO7D;AAmHD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/hook/hook.ts"],"names":[],"mappings":"AAKA,OAAO,EAQL,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAYlC,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAO7D;AAmHD,eAAe,aAAa,CAAC"}
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hookGenerator = hookGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  // TODO(jack): Remove inline renderHook function when RTL releases with its own version
5
6
  const devkit_1 = require("@nx/devkit");
6
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
7
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
7
+ const internal_2 = require("@nx/js/internal");
8
8
  const path_1 = require("path");
9
9
  const ast_utils_1 = require("../../utils/ast-utils");
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
11
10
  async function hookGenerator(host, schema) {
12
11
  const options = await normalizeOptions(host, schema);
13
12
  createFiles(host, options);
@@ -29,7 +28,7 @@ function createFiles(host, options) {
29
28
  let tsModule;
30
29
  function addExportsToBarrel(host, options) {
31
30
  if (!tsModule) {
32
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
31
+ tsModule = (0, internal_2.ensureTypescript)();
33
32
  }
34
33
  const workspace = (0, devkit_1.getProjects)(host);
35
34
  const isApp = workspace.get(options.projectName).projectType === 'application';
@@ -45,7 +44,7 @@ function addExportsToBarrel(host, options) {
45
44
  }
46
45
  }
47
46
  async function normalizeOptions(host, options) {
48
- const { artifactName, directory, fileName: hookFilename, fileExtension, fileExtensionType, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
47
+ const { artifactName, directory, fileName: hookFilename, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
49
48
  path: options.path,
50
49
  name: options.name,
51
50
  allowedFileExtensions: ['js', 'ts'],
@@ -64,7 +63,7 @@ async function normalizeOptions(host, options) {
64
63
  const project = (0, devkit_1.getProjects)(host).get(projectName);
65
64
  const { root, sourceRoot: projectSourceRoot, projectType } = project;
66
65
  if (options.export &&
67
- (0, ts_solution_setup_1.getProjectType)(host, root, projectType) === 'application') {
66
+ (0, internal_2.getProjectType)(host, root, projectType) === 'application') {
68
67
  devkit_1.logger.warn(`The "--export" option should not be used with applications and will do nothing.`);
69
68
  }
70
69
  return {
@@ -1,4 +1,4 @@
1
- import { ModuleFederationConfig } from '@nx/module-federation';
1
+ import type { ModuleFederationConfig } from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import { NxAppRspackPlugin } from '@nx/rspack/app-plugin.js';
2
2
  import { NxReactRspackPlugin } from '@nx/rspack/react-plugin.js';
3
- import { NxModuleFederationPlugin, NxModuleFederationSSRDevServerPlugin } from '@nx/module-federation/rspack.js';
3
+ import { NxModuleFederationPlugin, NxModuleFederationSSRDevServerPlugin } from '@nx/module-federation/rspack';
4
4
  import { join } from 'path';
5
5
 
6
6
  import browserMfConfig from './module-federation.config';
@@ -1,4 +1,4 @@
1
- import { ModuleFederationConfig } from '@nx/module-federation';
1
+ import type { ModuleFederationConfig } from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,7 +1,7 @@
1
1
  import { NxAppRspackPlugin } from '@nx/rspack/app-plugin.js';
2
2
  import { NxReactRspackPlugin } from '@nx/rspack/react-plugin.js';
3
- import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack.js';
4
- import { ModuleFederationConfig } from '@nx/module-federation';
3
+ import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack';
4
+ import type { ModuleFederationConfig } from '@nx/module-federation';
5
5
  import { join } from 'path';
6
6
 
7
7
  import baseConfig from './module-federation.config';
@@ -1,6 +1,6 @@
1
1
  import { NxAppRspackPlugin } from '@nx/rspack/app-plugin.js';
2
2
  import { NxReactRspackPlugin } from '@nx/rspack/react-plugin.js';
3
- import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack.js';
3
+ import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack';
4
4
  import { join } from 'path';
5
5
 
6
6
  import config from './module-federation.config';
@@ -1,4 +1,4 @@
1
- import { ModuleFederationConfig } from '@nx/module-federation';
1
+ import type { ModuleFederationConfig } from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import {composePlugins, withNx} from '@nx/webpack';
2
2
  import {withReact} from '@nx/react';
3
- import {withModuleFederationForSSR} from '@nx/module-federation/webpack.js';
3
+ import {withModuleFederationForSSR} from '@nx/module-federation/webpack';
4
4
 
5
5
  import baseConfig from './module-federation.config';
6
6
 
@@ -1,4 +1,4 @@
1
- import { ModuleFederationConfig } from '@nx/module-federation';
1
+ import type { ModuleFederationConfig } from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,7 +1,7 @@
1
1
  import { composePlugins, withNx } from '@nx/webpack';
2
2
  import { withReact } from '@nx/react';
3
- import { withModuleFederation } from '@nx/module-federation/webpack.js';
4
- import { ModuleFederationConfig } from '@nx/module-federation';
3
+ import { withModuleFederation } from '@nx/module-federation/webpack';
4
+ import type { ModuleFederationConfig } from '@nx/module-federation';
5
5
 
6
6
  import baseConfig from './module-federation.config';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import {composePlugins, withNx} from '@nx/webpack';
2
2
  import {withReact} from '@nx/react';
3
- import {withModuleFederation} from '@nx/module-federation/webpack.js';
4
- import { ModuleFederationConfig } from '@nx/module-federation';
3
+ import {withModuleFederation} from '@nx/module-federation/webpack';
4
+ import type { ModuleFederationConfig } from '@nx/module-federation';
5
5
 
6
6
  import baseConfig from './module-federation.config';
7
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/host/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAapB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAYpD,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAmJ5B;AAmCD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/host/host.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAapB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAWpD,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAmJ5B;AAmCD,eAAe,aAAa,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hostGenerator = hostGenerator;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const update_module_federation_project_1 = require("../../rules/update-module-federation-project");
7
8
  const application_1 = tslib_1.__importDefault(require("../application/application"));
@@ -14,9 +15,8 @@ const setup_ssr_for_host_1 = require("./lib/setup-ssr-for-host");
14
15
  const update_module_federation_e2e_project_1 = require("./lib/update-module-federation-e2e-project");
15
16
  const add_mf_env_to_inputs_1 = require("../../utils/add-mf-env-to-inputs");
16
17
  const js_1 = require("@nx/js");
17
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
18
+ const internal_2 = require("@nx/js/internal");
18
19
  const versions_1 = require("../../utils/versions");
19
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
20
20
  const update_module_federation_tsconfig_1 = require("./lib/update-module-federation-tsconfig");
21
21
  const normalize_host_name_1 = require("./lib/normalize-host-name");
22
22
  async function hostGenerator(host, schema) {
@@ -46,7 +46,7 @@ async function hostGenerator(host, schema) {
46
46
  }
47
47
  });
48
48
  }
49
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
49
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
50
50
  const initTask = await (0, application_1.default)(host, {
51
51
  ...options,
52
52
  directory: options.appProjectRoot,
@@ -57,7 +57,7 @@ async function hostGenerator(host, schema) {
57
57
  });
58
58
  tasks.push(initTask);
59
59
  // In TS solution setup, update package.json to use simple name instead of scoped name
60
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
60
+ if ((0, internal_2.isUsingTsSolutionSetup)(host)) {
61
61
  const hostPackageJsonPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json');
62
62
  if (host.exists(hostPackageJsonPath)) {
63
63
  (0, devkit_1.updateJson)(host, hostPackageJsonPath, (json) => {
@@ -98,7 +98,7 @@ async function hostGenerator(host, schema) {
98
98
  (0, update_module_federation_e2e_project_1.updateModuleFederationE2eProject)(host, options);
99
99
  (0, update_module_federation_tsconfig_1.updateModuleFederationTsconfig)(host, options);
100
100
  // Add remotes as devDependencies in TS solution setup
101
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host) && remotesWithPorts.length > 0) {
101
+ if ((0, internal_2.isUsingTsSolutionSetup)(host) && remotesWithPorts.length > 0) {
102
102
  addRemotesAsHostDependencies(host, options.projectName, remotesWithPorts);
103
103
  }
104
104
  if (options.ssr) {
@@ -1 +1 @@
1
- {"version":3,"file":"add-module-federation-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/add-module-federation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EACzB,qBAAqB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,QAgJxD"}
1
+ {"version":3,"file":"add-module-federation-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/add-module-federation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EACzB,qBAAqB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,QAgJxD"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addModuleFederationFiles = addModuleFederationFiles;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  const maybe_js_1 = require("../../../utils/maybe-js");
7
7
  const create_application_files_1 = require("../../application/lib/create-application-files");
8
8
  const path_1 = require("path");
@@ -35,7 +35,7 @@ function addModuleFederationFiles(host, options, defaultRemoteManifest) {
35
35
  }),
36
36
  };
37
37
  const projectConfig = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
38
- const pathToMFManifest = (0, devkit_1.joinPathFragments)((0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, host), 'assets/module-federation.manifest.json');
38
+ const pathToMFManifest = (0, devkit_1.joinPathFragments)((0, internal_1.getProjectSourceRoot)(projectConfig, host), 'assets/module-federation.manifest.json');
39
39
  // Module federation requires bootstrap code to be dynamically imported.
40
40
  // Renaming original entry file so we can use `import(./bootstrap)` in
41
41
  // new entry file.
@@ -69,7 +69,7 @@ function addModuleFederationFiles(host, options, defaultRemoteManifest) {
69
69
  processBundlerConfigFile(options, host, 'webpack.config.prod.js');
70
70
  }
71
71
  // Delete TypeScript prod config in TS solution setup - not needed in Crystal
72
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
72
+ if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
73
73
  const prodConfigFileName = options.bundler === 'rspack'
74
74
  ? 'rspack.config.prod.ts'
75
75
  : 'webpack.config.prod.ts';
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeHostName = normalizeHostName;
4
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
4
+ const internal_1 = require("@nx/devkit/internal");
5
5
  async function normalizeHostName(tree, directory, name) {
6
- const { projectName } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
6
+ const { projectName } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
7
7
  name,
8
8
  directory,
9
9
  projectType: 'application',
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateModuleFederationTsconfig = updateModuleFederationTsconfig;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  function updateModuleFederationTsconfig(host, options) {
7
7
  const tsconfigPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json');
8
8
  const tsconfigRuntimePath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json');
9
9
  if (!host.exists(tsconfigPath) || !host.exists(tsconfigRuntimePath))
10
10
  return;
11
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
11
+ if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
12
12
  // Update references to match what `nx sync` does.
13
13
  if (options.remotes?.length) {
14
14
  (0, devkit_1.updateJson)(host, tsconfigPath, (json) => {
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,8BAyDtE;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAItC,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,8BAyDtE;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.reactInitGenerator = reactInitGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const versions_1 = require("../../utils/versions");
6
7
  const version_utils_1 = require("../../utils/version-utils");
7
- const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
8
8
  const router_plugin_1 = require("../../plugins/router-plugin");
9
9
  async function reactInitGenerator(tree, schema) {
10
10
  const tasks = [];
@@ -23,7 +23,7 @@ async function reactInitGenerator(tree, schema) {
23
23
  process.env.NX_ADD_PLUGINS !== 'false' &&
24
24
  nxJson.useInferencePlugins !== false;
25
25
  if (schema.useReactRouterPlugin && schema.addPlugin) {
26
- await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react/router-plugin', router_plugin_1.createNodesV2, {
26
+ await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react/router-plugin', router_plugin_1.createNodesV2, {
27
27
  buildTargetName: ['build', 'react-router:build', 'react-router-build'],
28
28
  devTargetName: ['dev', 'react-router:dev', 'react-router-dev'],
29
29
  startTargetName: ['start', 'react-router-serve', 'react-router-start'],
@@ -5,8 +5,7 @@ const eslint_1 = require("@nx/eslint");
5
5
  const path_1 = require("nx/src/utils/path");
6
6
  const devkit_1 = require("@nx/devkit");
7
7
  const lint_1 = require("../../../utils/lint");
8
- const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
9
- const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
8
+ const internal_1 = require("@nx/eslint/internal");
10
9
  async function addLinting(host, options) {
11
10
  if (options.linter === 'eslint') {
12
11
  const tasks = [];
@@ -23,17 +22,17 @@ async function addLinting(host, options) {
23
22
  addPlugin: options.addPlugin,
24
23
  });
25
24
  tasks.push(lintTask);
26
- if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
27
- if ((0, flat_config_1.useFlatConfig)(host)) {
28
- (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
25
+ if ((0, internal_1.isEslintConfigSupported)(host)) {
26
+ if ((0, internal_1.useFlatConfig)(host)) {
27
+ (0, internal_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
29
28
  // Add an empty rules object to users know how to add/override rules
30
- (0, eslint_file_1.addOverrideToLintConfig)(host, options.projectRoot, {
29
+ (0, internal_1.addOverrideToLintConfig)(host, options.projectRoot, {
31
30
  files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
32
31
  rules: {},
33
32
  });
34
33
  }
35
34
  else {
36
- const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, {
35
+ const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(host, options.projectRoot, {
37
36
  name: 'plugin:@nx/react',
38
37
  needCompatFixup: true,
39
38
  });
@@ -41,7 +40,7 @@ async function addLinting(host, options) {
41
40
  }
42
41
  // Add out-tsc ignore pattern when using TS solution setup
43
42
  if (options.isUsingTsSolutionConfig) {
44
- (0, eslint_file_1.addIgnoresToLintConfig)(host, options.projectRoot, ['**/out-tsc']);
43
+ (0, internal_1.addIgnoresToLintConfig)(host, options.projectRoot, ['**/out-tsc']);
45
44
  }
46
45
  }
47
46
  let installTask = () => { };
@@ -1 +1 @@
1
- {"version":3,"file":"add-rollup-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-rollup-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAGL,iBAAiB,EAOlB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;CAAE,EAC7D,QAAQ,GAAE,GAAG,CAAC,MAAM,CAAmC,8BAiHxD"}
1
+ {"version":3,"file":"add-rollup-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-rollup-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAGL,iBAAiB,EAQlB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;CAAE,EAC7D,QAAQ,GAAE,GAAG,CAAC,MAAM,CAAmC,8BAyHxD"}