@nx/nuxt 23.1.0-pr.36127.8b9019b → 23.1.0-rc.0
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.
|
@@ -17,6 +17,7 @@ const vue_1 = require("@nx/vue");
|
|
|
17
17
|
const ensure_dependencies_1 = require("./lib/ensure-dependencies");
|
|
18
18
|
const assert_supported_nuxt_version_1 = require("../../utils/assert-supported-nuxt-version");
|
|
19
19
|
const node_child_process_1 = require("node:child_process");
|
|
20
|
+
const node_fs_1 = require("node:fs");
|
|
20
21
|
const node_path_1 = require("node:path");
|
|
21
22
|
const onboarding_1 = require("nx/src/nx-cloud/utilities/onboarding");
|
|
22
23
|
const internal_2 = require("@nx/js/internal");
|
|
@@ -153,11 +154,22 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
153
154
|
if (!options.skipFormat)
|
|
154
155
|
await (0, devkit_1.formatFiles)(tree);
|
|
155
156
|
tasks.push(() => {
|
|
157
|
+
const packageManager = (0, devkit_1.detectPackageManager)(devkit_1.workspaceRoot);
|
|
158
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager, devkit_1.workspaceRoot);
|
|
159
|
+
const appRoot = (0, node_path_1.join)(devkit_1.workspaceRoot, options.appProjectRoot);
|
|
160
|
+
// npm, yarn, and bun resolve binaries from `node_modules/.bin` searching
|
|
161
|
+
// upward from the cwd, so running in the app dir picks an app-level `nuxi`
|
|
162
|
+
// first and falls back to the workspace-root install. pnpm's `pnpm exec`
|
|
163
|
+
// doesn't search upward: in an integrated workspace the app dir only sees
|
|
164
|
+
// its own `node_modules/.bin` and can't reach the root-installed `nuxi`. So
|
|
165
|
+
// for pnpm only run in the app dir when it has its own `nuxi` (package-based
|
|
166
|
+
// setups, where the app copy should win); otherwise run at the workspace
|
|
167
|
+
// root, where the generator installs it.
|
|
168
|
+
const runInAppDir = packageManager !== 'pnpm' ||
|
|
169
|
+
(0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi')) ||
|
|
170
|
+
(0, node_fs_1.existsSync)((0, node_path_1.join)(appRoot, 'node_modules', '.bin', 'nuxi.cmd'));
|
|
156
171
|
try {
|
|
157
|
-
(0, node_child_process_1.execSync)(
|
|
158
|
-
cwd: options.appProjectRoot,
|
|
159
|
-
windowsHide: true,
|
|
160
|
-
});
|
|
172
|
+
(0, node_child_process_1.execSync)(`${pmc.exec} nuxi prepare${runInAppDir ? '' : ` "${options.appProjectRoot}"`}`, { cwd: runInAppDir ? appRoot : devkit_1.workspaceRoot, windowsHide: true });
|
|
161
173
|
}
|
|
162
174
|
catch (e) {
|
|
163
175
|
console.error(`Failed to run \`nuxi prepare\` in "${options.appProjectRoot}". Please run the command manually.`);
|
|
@@ -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
|
-
|
|
96
|
-
|
|
97
|
-
e2ePort =
|
|
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',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nuxt",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-rc.0",
|
|
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": {
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"tslib": "^2.3.0",
|
|
62
62
|
"semver": "^7.6.3",
|
|
63
|
-
"@nx/devkit": "23.1.0-
|
|
64
|
-
"@nx/
|
|
65
|
-
"@nx/
|
|
66
|
-
"@nx/
|
|
67
|
-
"@nx/vite": "23.1.0-
|
|
68
|
-
"@nx/vitest": "23.1.0-
|
|
63
|
+
"@nx/devkit": "23.1.0-rc.0",
|
|
64
|
+
"@nx/eslint": "23.1.0-rc.0",
|
|
65
|
+
"@nx/js": "23.1.0-rc.0",
|
|
66
|
+
"@nx/vue": "23.1.0-rc.0",
|
|
67
|
+
"@nx/vite": "23.1.0-rc.0",
|
|
68
|
+
"@nx/vitest": "23.1.0-rc.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"nx": "23.1.0-
|
|
71
|
+
"nx": "23.1.0-rc.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"nuxt": ">=3.0.0 <5.0.0",
|