@nx/react 23.0.0-beta.11 → 23.0.0-beta.13

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 (51) hide show
  1. package/package.json +16 -16
  2. package/plugins/component-testing/index.js +3 -3
  3. package/plugins/component-testing/webpack-fallback.js +2 -2
  4. package/plugins/storybook/index.js +3 -3
  5. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +2 -2
  6. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +2 -2
  7. package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +2 -2
  8. package/src/generators/application/application.d.ts.map +1 -1
  9. package/src/generators/application/application.js +29 -14
  10. package/src/generators/application/lib/add-linting.js +2 -2
  11. package/src/generators/application/lib/add-routing.js +2 -2
  12. package/src/generators/application/lib/create-application-files.js +2 -2
  13. package/src/generators/application/lib/normalize-options.js +2 -2
  14. package/src/generators/component/component.js +2 -2
  15. package/src/generators/component/lib/normalize-options.js +2 -2
  16. package/src/generators/component-story/component-story.d.ts.map +1 -1
  17. package/src/generators/component-story/component-story.js +3 -4
  18. package/src/generators/component-test/component-test.d.ts.map +1 -1
  19. package/src/generators/component-test/component-test.js +3 -4
  20. package/src/generators/cypress-component-configuration/lib/add-files.js +2 -2
  21. package/src/generators/federate-module/lib/utils.js +2 -2
  22. package/src/generators/hook/hook.d.ts.map +1 -1
  23. package/src/generators/hook/hook.js +3 -4
  24. package/src/generators/host/host.js +3 -3
  25. package/src/generators/host/lib/add-module-federation-files.d.ts.map +1 -1
  26. package/src/generators/host/lib/add-module-federation-files.js +3 -3
  27. package/src/generators/host/lib/update-module-federation-tsconfig.js +2 -2
  28. package/src/generators/library/lib/install-common-dependencies.js +2 -2
  29. package/src/generators/library/lib/normalize-options.js +4 -4
  30. package/src/generators/library/lib/update-app-routes.js +2 -2
  31. package/src/generators/library/library.d.ts.map +1 -1
  32. package/src/generators/library/library.js +8 -10
  33. package/src/generators/redux/redux.js +5 -6
  34. package/src/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
  35. package/src/generators/remote/lib/update-host-with-remote.js +4 -5
  36. package/src/generators/remote/remote.d.ts.map +1 -1
  37. package/src/generators/remote/remote.js +5 -5
  38. package/src/generators/setup-ssr/setup-ssr.d.ts.map +1 -1
  39. package/src/generators/setup-ssr/setup-ssr.js +5 -7
  40. package/src/generators/stories/stories.js +5 -6
  41. package/src/module-federation/ast-utils.js +2 -2
  42. package/src/plugins/router-plugin.d.ts.map +1 -1
  43. package/src/plugins/router-plugin.js +3 -4
  44. package/src/rules/update-module-federation-project.js +3 -3
  45. package/src/utils/add-mf-env-to-inputs.d.ts.map +1 -1
  46. package/src/utils/add-mf-env-to-inputs.js +15 -8
  47. package/src/utils/ast-utils.js +15 -15
  48. package/src/utils/component-props.js +3 -3
  49. package/src/utils/create-ts-config.js +3 -3
  50. package/src/utils/ct-utils.js +2 -2
  51. package/tailwind.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "23.0.0-beta.11",
3
+ "version": "23.0.0-beta.13",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -37,28 +37,28 @@
37
37
  "@svgr/webpack": "^8.0.1",
38
38
  "minimatch": "10.2.5",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "23.0.0-beta.11",
41
- "@nx/js": "23.0.0-beta.11",
42
- "@nx/eslint": "23.0.0-beta.11",
43
- "@nx/web": "23.0.0-beta.11",
44
- "@nx/module-federation": "23.0.0-beta.11",
45
- "@nx/rollup": "23.0.0-beta.11",
40
+ "@nx/devkit": "23.0.0-beta.13",
41
+ "@nx/js": "23.0.0-beta.13",
42
+ "@nx/eslint": "23.0.0-beta.13",
43
+ "@nx/web": "23.0.0-beta.13",
44
+ "@nx/module-federation": "23.0.0-beta.13",
45
+ "@nx/rollup": "23.0.0-beta.13",
46
46
  "express": "^4.21.2",
47
47
  "http-proxy-middleware": "^3.0.5",
48
48
  "semver": "^7.6.3"
49
49
  },
50
50
  "devDependencies": {
51
- "@nx/cypress": "23.0.0-beta.11",
52
- "@nx/playwright": "23.0.0-beta.11",
53
- "@nx/rsbuild": "23.0.0-beta.11",
54
- "@nx/vite": "23.0.0-beta.11",
55
- "@nx/vitest": "23.0.0-beta.11",
56
- "@nx/webpack": "23.0.0-beta.11",
57
- "@nx/storybook": "23.0.0-beta.11",
58
- "nx": "23.0.0-beta.11"
51
+ "@nx/cypress": "23.0.0-beta.13",
52
+ "@nx/playwright": "23.0.0-beta.13",
53
+ "@nx/rsbuild": "23.0.0-beta.13",
54
+ "@nx/vite": "23.0.0-beta.13",
55
+ "@nx/vitest": "23.0.0-beta.13",
56
+ "@nx/webpack": "23.0.0-beta.13",
57
+ "@nx/storybook": "23.0.0-beta.13",
58
+ "nx": "23.0.0-beta.13"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@nx/vite": "23.0.0-beta.11"
61
+ "@nx/vite": "23.0.0-beta.13"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"
@@ -4,7 +4,7 @@ exports.nxComponentTestingPreset = nxComponentTestingPreset;
4
4
  const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
5
5
  const ct_helpers_1 = require("@nx/cypress/src/utils/ct-helpers");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
+ const internal_1 = require("@nx/js/internal");
8
8
  const fs_1 = require("fs");
9
9
  const path_1 = require("path");
10
10
  /**
@@ -167,7 +167,7 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
167
167
  const { composePluginsSync } = require('@nx/webpack/src/utils/config');
168
168
  const { withNx } = require('@nx/webpack/src/utils/with-nx');
169
169
  const { withWeb } = require('@nx/webpack/src/utils/with-web');
170
- const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0, ts_solution_setup_1.getProjectSourceRoot)(buildableProjectConfig));
170
+ const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0, internal_1.getProjectSourceRoot)(buildableProjectConfig));
171
171
  let customWebpack;
172
172
  if (options.webpackConfig) {
173
173
  customWebpack = resolveUserDefinedWebpackConfig(options.webpackConfig, options.tsConfig.startsWith(context.root)
@@ -189,7 +189,7 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
189
189
  extractLicenses: false,
190
190
  root: devkit_1.workspaceRoot,
191
191
  projectRoot: ctProjectConfig.root,
192
- sourceRoot: (0, ts_solution_setup_1.getProjectSourceRoot)(ctProjectConfig),
192
+ sourceRoot: (0, internal_1.getProjectSourceRoot)(ctProjectConfig),
193
193
  },
194
194
  context,
195
195
  configuration: parsed.configuration,
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildBaseWebpackConfig = buildBaseWebpackConfig;
4
4
  const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
5
5
  const webpack_1 = require("@nx/webpack");
6
- const ts_config_1 = require("@nx/js/src/utils/typescript/ts-config");
6
+ const js_1 = require("@nx/js");
7
7
  function buildBaseWebpackConfig({ tsConfigPath = 'tsconfig.cy.json', compiler = 'babel', }) {
8
8
  const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
9
9
  const config = {
@@ -13,7 +13,7 @@ function buildBaseWebpackConfig({ tsConfigPath = 'tsconfig.cy.json', compiler =
13
13
  plugins: [
14
14
  new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({
15
15
  configFile: tsConfigPath,
16
- baseUrl: (0, ts_config_1.resolvePathsBaseUrl)(tsConfigPath),
16
+ baseUrl: (0, js_1.resolvePathsBaseUrl)(tsConfigPath),
17
17
  extensions,
18
18
  }),
19
19
  ],
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webpack = exports.core = void 0;
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 config_1 = require("@nx/webpack/src/utils/config");
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = require("path");
@@ -64,7 +64,7 @@ const getProjectData = async (storybookOptions) => {
64
64
  ? {
65
65
  workspaceRoot: process.env.NX_WORKSPACE_ROOT,
66
66
  projectRoot: projectNode.data.root,
67
- sourceRoot: (0, ts_solution_setup_1.getProjectSourceRoot)(projectNode.data),
67
+ sourceRoot: (0, internal_1.getProjectSourceRoot)(projectNode.data),
68
68
  projectNode,
69
69
  }
70
70
  : // Edge-case: missing project node
@@ -130,7 +130,7 @@ const webpack = async (storybookWebpackConfig = {}, options) => {
130
130
  ...options,
131
131
  root: projectData.workspaceRoot,
132
132
  projectRoot: projectData.projectRoot,
133
- sourceRoot: (0, ts_solution_setup_1.getProjectSourceRoot)(projectData.projectNode.data),
133
+ sourceRoot: (0, internal_1.getProjectSourceRoot)(projectData.projectNode.data),
134
134
  fileReplacements: [],
135
135
  sourceMap: true,
136
136
  styles: options.styles ?? [],
@@ -4,7 +4,7 @@ exports.default = moduleFederationDevServer;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const internal_1 = require("@nx/devkit/internal");
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
  const utils_1 = require("@nx/module-federation/src/executors/utils");
9
9
  const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
10
10
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
@@ -26,7 +26,7 @@ async function* moduleFederationDevServer(schema, context) {
26
26
  : // TODO(JamesHenry): remove type assertion once the nx repo is updated to use https://github.com/nrwl/nx/pull/33095
27
27
  (0, dev_server_impl_1.default)(options, context);
28
28
  const p = context.projectsConfigurations.projects[context.projectName];
29
- let pathToManifestFile = (0, path_1.join)(context.root, (0, ts_solution_setup_1.getProjectSourceRoot)(p), 'assets/module-federation.manifest.json');
29
+ let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(p), 'assets/module-federation.manifest.json');
30
30
  if (options.pathToManifestFile) {
31
31
  const userPathToManifestFile = (0, path_1.join)(context.root, options.pathToManifestFile);
32
32
  if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
@@ -4,7 +4,7 @@ exports.default = moduleFederationSsrDevServer;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const internal_1 = require("@nx/devkit/internal");
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
  const utils_1 = require("@nx/module-federation/src/executors/utils");
9
9
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
10
10
  const ssr_dev_server_impl_1 = tslib_1.__importDefault(require("@nx/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl"));
@@ -16,7 +16,7 @@ async function* moduleFederationSsrDevServer(ssrDevServerOptions, context) {
16
16
  // TODO(JamesHenry): remove type assertion once the nx repo is updated to use https://github.com/nrwl/nx/pull/33095
17
17
  let iter = (0, ssr_dev_server_impl_1.default)(options, context);
18
18
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
19
- let pathToManifestFile = (0, path_1.join)(context.root, (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig), 'assets/module-federation.manifest.json');
19
+ let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(projectConfig), 'assets/module-federation.manifest.json');
20
20
  if (options.pathToManifestFile) {
21
21
  const userPathToManifestFile = (0, path_1.join)(context.root, options.pathToManifestFile);
22
22
  if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
@@ -5,7 +5,7 @@ exports.default = moduleFederationStaticServer;
5
5
  const tslib_1 = require("tslib");
6
6
  const internal_1 = require("@nx/devkit/internal");
7
7
  const devkit_1 = require("@nx/devkit");
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
  const utils_1 = require("@nx/module-federation/src/executors/utils");
10
10
  const utils_2 = require("@nx/module-federation/src/utils");
11
11
  const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
@@ -18,7 +18,7 @@ function getBuildAndServeOptionsFromServeTarget(serveTarget, context) {
18
18
  const serveOptions = (0, devkit_1.readTargetOptions)(target, context);
19
19
  const buildTarget = (0, devkit_1.parseTargetString)(serveOptions.buildTarget, context);
20
20
  const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
21
- let pathToManifestFile = (0, path_1.join)(context.root, (0, ts_solution_setup_1.getProjectSourceRoot)(context.projectGraph.nodes[context.projectName].data), 'assets/module-federation.manifest.json');
21
+ let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(context.projectGraph.nodes[context.projectName].data), 'assets/module-federation.manifest.json');
22
22
  if (serveOptions.pathToManifestFile) {
23
23
  const userPathToManifestFile = (0, path_1.join)(context.root, serveOptions.pathToManifestFile);
24
24
  if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA6BpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAsL5B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA+BpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CA2L5B;AAiBD,eAAe,oBAAoB,CAAC"}
@@ -5,8 +5,9 @@ exports.applicationGeneratorInternal = applicationGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
6
  const internal_1 = require("@nx/devkit/internal");
7
7
  const devkit_1 = require("@nx/devkit");
8
+ const internal_2 = require("@nx/devkit/internal");
8
9
  const js_1 = require("@nx/js");
9
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const internal_3 = require("@nx/js/internal");
10
11
  const create_ts_config_1 = require("../../utils/create-ts-config");
11
12
  const init_1 = tslib_1.__importDefault(require("../init/init"));
12
13
  const create_application_files_1 = require("./lib/create-application-files");
@@ -23,7 +24,6 @@ const add_webpack_1 = require("./lib/bundlers/add-webpack");
23
24
  const add_rspack_1 = require("./lib/bundlers/add-rspack");
24
25
  const add_rsbuild_1 = require("./lib/bundlers/add-rsbuild");
25
26
  const add_vite_1 = require("./lib/bundlers/add-vite");
26
- const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
27
27
  async function applicationGenerator(tree, schema) {
28
28
  return await applicationGeneratorInternal(tree, {
29
29
  addPlugin: false,
@@ -33,7 +33,7 @@ async function applicationGenerator(tree, schema) {
33
33
  }
34
34
  async function applicationGeneratorInternal(tree, schema) {
35
35
  const tasks = [];
36
- const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin, schema.useTsSolution);
36
+ const addTsPlugin = (0, internal_3.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin, schema.useTsSolution);
37
37
  const jsInitTask = await (0, js_1.initGenerator)(tree, {
38
38
  ...schema,
39
39
  tsConfigName: schema.rootProject ? 'tsconfig.json' : 'tsconfig.base.json',
@@ -71,18 +71,23 @@ async function applicationGeneratorInternal(tree, schema) {
71
71
  });
72
72
  tasks.push(initTask);
73
73
  if (!options.addPlugin) {
74
- const nxJson = (0, devkit_1.readNxJson)(tree);
75
- nxJson.targetDefaults ??= {};
76
- if (!Object.keys(nxJson.targetDefaults).includes('build')) {
77
- nxJson.targetDefaults.build = {
74
+ const nxJson = (0, devkit_1.readNxJson)(tree) ?? {};
75
+ const existing = findBuildDefault(nxJson.targetDefaults);
76
+ if (!existing) {
77
+ (0, internal_2.upsertTargetDefault)(tree, nxJson, {
78
+ target: 'build',
78
79
  cache: true,
79
80
  dependsOn: ['^build'],
80
- };
81
+ });
82
+ (0, devkit_1.updateNxJson)(tree, nxJson);
81
83
  }
82
- else if (!nxJson.targetDefaults.build.dependsOn) {
83
- nxJson.targetDefaults.build.dependsOn = ['^build'];
84
+ else if (!existing.dependsOn) {
85
+ (0, internal_2.upsertTargetDefault)(tree, nxJson, {
86
+ target: 'build',
87
+ dependsOn: ['^build'],
88
+ });
89
+ (0, devkit_1.updateNxJson)(tree, nxJson);
84
90
  }
85
- (0, devkit_1.updateNxJson)(tree, nxJson);
86
91
  }
87
92
  if (options.bundler === 'webpack') {
88
93
  await (0, add_webpack_1.initWebpack)(tree, options, tasks);
@@ -101,7 +106,7 @@ async function applicationGeneratorInternal(tree, schema) {
101
106
  // If we are using the new TS solution
102
107
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
103
108
  if (options.isUsingTsSolutionConfig) {
104
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
109
+ await (0, internal_3.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
105
110
  }
106
111
  const lintTask = await (0, add_linting_1.addLinting)(tree, options);
107
112
  tasks.push(lintTask);
@@ -150,14 +155,14 @@ async function applicationGeneratorInternal(tree, schema) {
150
155
  });
151
156
  }
152
157
  // Only for the new TS solution
153
- (0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
158
+ (0, internal_3.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
154
159
  jsx: 'react-jsx',
155
160
  module: 'esnext',
156
161
  moduleResolution: 'bundler',
157
162
  }, options.linter === 'eslint'
158
163
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
159
164
  : undefined, options.useReactRouter ? 'app' : 'src');
160
- (0, sort_fields_1.sortPackageJsonFields)(tree, options.appProjectRoot);
165
+ (0, internal_3.sortPackageJsonFields)(tree, options.appProjectRoot);
161
166
  if (!options.skipFormat) {
162
167
  await (0, devkit_1.formatFiles)(tree);
163
168
  }
@@ -166,4 +171,14 @@ async function applicationGeneratorInternal(tree, schema) {
166
171
  });
167
172
  return (0, devkit_1.runTasksInSerial)(...tasks);
168
173
  }
174
+ function findBuildDefault(td) {
175
+ if (!td)
176
+ return undefined;
177
+ if (Array.isArray(td)) {
178
+ return td.find((e) => e.target === 'build' &&
179
+ e.projects === undefined &&
180
+ e.plugin === undefined);
181
+ }
182
+ return td['build'];
183
+ }
169
184
  exports.default = applicationGenerator;
@@ -40,7 +40,7 @@ const eslint_1 = require("@nx/eslint");
40
40
  const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
41
41
  const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
42
42
  const devkit_2 = require("@nx/devkit");
43
- const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
43
+ const internal_1 = require("@nx/js/internal");
44
44
  const lint_1 = require("../../../utils/lint");
45
45
  const versions_1 = require("../../../utils/versions");
46
46
  async function addLinting(host, options) {
@@ -75,7 +75,7 @@ async function addLinting(host, options) {
75
75
  }
76
76
  if (!options.skipPackageJson) {
77
77
  const installTask = (0, devkit_2.addDependenciesToPackageJson)(host, lint_1.extraEslintDependencies.dependencies, lint_1.extraEslintDependencies.devDependencies);
78
- const addSwcTask = (0, add_swc_dependencies_1.addSwcDependencies)(host);
78
+ const addSwcTask = (0, internal_1.addSwcDependencies)(host);
79
79
  tasks.push(installTask, addSwcTask);
80
80
  }
81
81
  if (options.useReactRouter) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addRouting = addRouting;
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 ast_utils_1 = require("../../../utils/ast-utils");
7
7
  const versions_1 = require("../../../utils/versions");
8
8
  const maybe_js_1 = require("../../../utils/maybe-js");
@@ -12,7 +12,7 @@ function addRouting(host, options) {
12
12
  return () => { };
13
13
  }
14
14
  if (!tsModule) {
15
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
15
+ tsModule = (0, internal_1.ensureTypescript)();
16
16
  }
17
17
  const appPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, (0, maybe_js_1.maybeJs)({
18
18
  js: options.js,
@@ -13,7 +13,7 @@ const has_webpack_plugin_1 = require("../../../utils/has-webpack-plugin");
13
13
  const get_app_tests_1 = require("./get-app-tests");
14
14
  const onboarding_1 = require("nx/src/nx-cloud/utilities/onboarding");
15
15
  const has_rspack_plugin_1 = require("../../../utils/has-rspack-plugin");
16
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
16
+ const internal_1 = require("@nx/js/internal");
17
17
  const versions_1 = require("../../../utils/versions");
18
18
  function getDefaultTemplateVariables(host, options) {
19
19
  const hasStyleFile = ['scss', 'css'].includes(options.style);
@@ -35,7 +35,7 @@ function getDefaultTemplateVariables(host, options) {
35
35
  inSourceVitestTests: (0, get_in_source_vitest_tests_template_1.getInSourceVitestTestsTemplate)(appTests),
36
36
  style: options.style,
37
37
  hasStyleFile,
38
- isUsingTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host),
38
+ isUsingTsSolutionSetup: (0, internal_1.isUsingTsSolutionSetup)(host),
39
39
  port: options.port ?? 4200,
40
40
  };
41
41
  }
@@ -5,7 +5,7 @@ const devkit_1 = require("@nx/devkit");
5
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
10
  await (0, internal_1.ensureRootProjectName)(options, 'application');
11
11
  const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
@@ -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';
@@ -4,7 +4,7 @@ exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
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
10
  const { artifactName: name, directory, fileName, filePath, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
@@ -17,7 +17,7 @@ async function normalizeOptions(tree, options) {
17
17
  const { className } = (0, devkit_1.names)(name);
18
18
  const { sourceRoot: projectSourceRoot, root: projectRoot, projectType, } = project;
19
19
  if (options.export &&
20
- (0, ts_solution_setup_1.getProjectType)(tree, projectRoot, projectType) === 'application') {
20
+ (0, internal_2.getProjectType)(tree, projectRoot, projectType) === 'application') {
21
21
  devkit_1.logger.warn(`The "--export" option should not be used with applications and will do nothing.`);
22
22
  }
23
23
  options.classComponent = options.classComponent ?? false;
@@ -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);
@@ -35,7 +35,7 @@ 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");
@@ -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);
@@ -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":"AAKA,OAAO,EAQL,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,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"}
@@ -4,10 +4,9 @@ exports.hookGenerator = hookGenerator;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
5
  // TODO(jack): Remove inline renderHook function when RTL releases with its own version
6
6
  const devkit_1 = require("@nx/devkit");
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';
@@ -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 {
@@ -15,7 +15,7 @@ const setup_ssr_for_host_1 = require("./lib/setup-ssr-for-host");
15
15
  const update_module_federation_e2e_project_1 = require("./lib/update-module-federation-e2e-project");
16
16
  const add_mf_env_to_inputs_1 = require("../../utils/add-mf-env-to-inputs");
17
17
  const js_1 = require("@nx/js");
18
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
18
+ const internal_2 = require("@nx/js/internal");
19
19
  const versions_1 = require("../../utils/versions");
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");
@@ -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';
@@ -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) => {