@nx/nuxt 23.0.0-beta.12 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nuxt",
3
- "version": "23.0.0-beta.12",
3
+ "version": "23.0.0-beta.13",
4
4
  "private": false,
5
5
  "description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, 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": {
@@ -45,16 +45,16 @@
45
45
  "dependencies": {
46
46
  "tslib": "^2.3.0",
47
47
  "@nuxt/kit": "^3.10.0 || ^4.0.0",
48
- "@nx/devkit": "23.0.0-beta.12",
49
- "@nx/js": "23.0.0-beta.12",
50
- "@nx/eslint": "23.0.0-beta.12",
51
- "@nx/vue": "23.0.0-beta.12",
52
- "@nx/vite": "23.0.0-beta.12",
53
- "@nx/vitest": "23.0.0-beta.12",
48
+ "@nx/devkit": "23.0.0-beta.13",
49
+ "@nx/js": "23.0.0-beta.13",
50
+ "@nx/eslint": "23.0.0-beta.13",
51
+ "@nx/vue": "23.0.0-beta.13",
52
+ "@nx/vite": "23.0.0-beta.13",
53
+ "@nx/vitest": "23.0.0-beta.13",
54
54
  "semver": "^7.6.3"
55
55
  },
56
56
  "devDependencies": {
57
- "nx": "23.0.0-beta.12"
57
+ "nx": "23.0.0-beta.13"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@nuxt/schema": "^3.10.0 || ^4.0.0"
@@ -18,8 +18,7 @@ const ensure_dependencies_1 = require("./lib/ensure-dependencies");
18
18
  const node_child_process_1 = require("node:child_process");
19
19
  const node_path_1 = require("node:path");
20
20
  const onboarding_1 = require("nx/src/nx-cloud/utilities/onboarding");
21
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
22
- const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
21
+ const internal_2 = require("@nx/js/internal");
23
22
  async function applicationGenerator(tree, schema) {
24
23
  return await applicationGeneratorInternal(tree, {
25
24
  useProjectJson: true,
@@ -28,7 +27,7 @@ async function applicationGenerator(tree, schema) {
28
27
  }
29
28
  async function applicationGeneratorInternal(tree, schema) {
30
29
  const tasks = [];
31
- const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(tree, true, // nuxt always adds plugins
30
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, true, // nuxt always adds plugins
32
31
  schema.useTsSolution);
33
32
  const jsInitTask = await (0, js_1.initGenerator)(tree, {
34
33
  ...schema,
@@ -113,7 +112,7 @@ async function applicationGeneratorInternal(tree, schema) {
113
112
  // If we are using the new TS solution
114
113
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
115
114
  if (options.isUsingTsSolutionConfig) {
116
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
115
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(tree, options.appProjectRoot);
117
116
  }
118
117
  tasks.push(await (0, add_linting_1.addLinting)(tree, {
119
118
  projectName: options.projectName,
@@ -138,7 +137,7 @@ async function applicationGeneratorInternal(tree, schema) {
138
137
  if (options.js)
139
138
  (0, devkit_1.toJS)(tree);
140
139
  if (options.isUsingTsSolutionConfig) {
141
- (0, ts_solution_setup_1.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
140
+ (0, internal_2.updateTsconfigFiles)(tree, options.appProjectRoot, 'tsconfig.app.json', {
142
141
  jsx: 'preserve',
143
142
  jsxImportSource: 'vue',
144
143
  module: 'esnext',
@@ -148,7 +147,7 @@ async function applicationGeneratorInternal(tree, schema) {
148
147
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
149
148
  : undefined);
150
149
  }
151
- (0, sort_fields_1.sortPackageJsonFields)(tree, options.appProjectRoot);
150
+ (0, internal_2.sortPackageJsonFields)(tree, options.appProjectRoot);
152
151
  if (!options.skipFormat)
153
152
  await (0, devkit_1.formatFiles)(tree);
154
153
  tasks.push(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nuxt/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAGjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA8G5B"}
1
+ {"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nuxt/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,iBAAiB,EAGjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA8G5B"}
@@ -92,9 +92,9 @@ async function addE2e(host, options) {
92
92
  async function getNuxtE2EWebServerInfo(tree, projectName, configFilePath) {
93
93
  const nxJson = (0, devkit_1.readNxJson)(tree);
94
94
  let e2ePort = 4200;
95
- if (nxJson.targetDefaults?.['serve'] &&
96
- nxJson.targetDefaults?.['serve'].options?.port) {
97
- e2ePort = nxJson.targetDefaults?.['serve'].options?.port;
95
+ const serveTargetOptions = (0, internal_1.readTargetDefaultsForTarget)('serve', nxJson.targetDefaults)?.options;
96
+ if (serveTargetOptions?.port) {
97
+ e2ePort = serveTargetOptions.port;
98
98
  }
99
99
  return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
100
100
  plugin: '@nx/nuxt/plugin',
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_2 = require("@nx/js/internal");
6
6
  const version_utils_1 = require("../../../utils/version-utils");
7
7
  async function normalizeOptions(host, options) {
8
8
  await (0, internal_1.ensureRootProjectName)(options, 'application');
@@ -13,7 +13,7 @@ async function normalizeOptions(host, options) {
13
13
  rootProject: options.rootProject,
14
14
  });
15
15
  options.rootProject = appProjectRoot === '.';
16
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
16
+ const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
17
17
  const appProjectName = !isUsingTsSolutionConfig || options.name ? projectName : importPath;
18
18
  const e2eProjectName = options.rootProject ? 'e2e' : `${appProjectName}-e2e`;
19
19
  const e2eProjectRoot = options.rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
@@ -8,7 +8,7 @@ const js_1 = require("@nx/js");
8
8
  const path_1 = require("path");
9
9
  const fs_1 = require("fs");
10
10
  const executor_utils_1 = require("../utils/executor-utils");
11
- const util_1 = require("@nx/js/src/plugins/typescript/util");
11
+ const internal_2 = require("@nx/js/internal");
12
12
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'nuxt.hash');
13
13
  const targetsCache = new internal_1.PluginCache(cachePath);
14
14
  exports.createNodes = [
@@ -55,7 +55,7 @@ async function buildNuxtTargets(configFilePath, projectRoot, options, context, p
55
55
  targets[options.serveTargetName] = serveTarget(projectRoot);
56
56
  targets[options.serveStaticTargetName] = serveStaticTarget(options);
57
57
  targets[options.buildStaticTargetName] = buildStaticTarget(options.buildStaticTargetName, namedInputs, buildOutputs, projectRoot);
58
- (0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
58
+ (0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
59
59
  return targets;
60
60
  }
61
61
  function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createTsConfig = createTsConfig;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
- const shared = tslib_1.__importStar(require("@nx/js/src/utils/typescript/create-ts-config"));
6
+ const shared = tslib_1.__importStar(require("@nx/js"));
7
7
  function createTsConfig(host, options, relativePathToRootTsConfig) {
8
8
  createAppTsConfig(host, options);
9
9
  const json = {