@nx/next 17.2.4 → 17.2.6
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/next",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"next": ">=13.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "17.2.
|
|
37
|
+
"@nx/devkit": "17.2.6",
|
|
38
38
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
39
39
|
"@svgr/webpack": "^8.0.1",
|
|
40
40
|
"chalk": "^4.1.0",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"url-loader": "^4.1.1",
|
|
46
46
|
"tslib": "^2.3.0",
|
|
47
47
|
"webpack-merge": "^5.8.0",
|
|
48
|
-
"@nx/js": "17.2.
|
|
49
|
-
"@nx/eslint": "17.2.
|
|
50
|
-
"@nx/react": "17.2.
|
|
51
|
-
"@nx/web": "17.2.
|
|
52
|
-
"@nx/workspace": "17.2.
|
|
53
|
-
"@nrwl/next": "17.2.
|
|
48
|
+
"@nx/js": "17.2.6",
|
|
49
|
+
"@nx/eslint": "17.2.6",
|
|
50
|
+
"@nx/react": "17.2.6",
|
|
51
|
+
"@nx/web": "17.2.6",
|
|
52
|
+
"@nx/workspace": "17.2.6",
|
|
53
|
+
"@nrwl/next": "17.2.6"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
@@ -10,7 +10,8 @@ async function* serveExecutor(options, context) {
|
|
|
10
10
|
? 'development'
|
|
11
11
|
: 'production';
|
|
12
12
|
// Setting port that the custom server should use.
|
|
13
|
-
process.env.PORT = options.port;
|
|
13
|
+
process.env.PORT = options.port ? `${options.port}` : process.env.PORT;
|
|
14
|
+
options.port = parseInt(process.env.PORT);
|
|
14
15
|
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
|
15
16
|
yield* runCustomServer(projectRoot, options, context);
|
|
16
17
|
}
|
|
@@ -13,7 +13,7 @@ async function* serveExecutor(options, context) {
|
|
|
13
13
|
}
|
|
14
14
|
const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context), context);
|
|
15
15
|
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
16
|
-
const {
|
|
16
|
+
const { keepAliveTimeout, hostname } = options;
|
|
17
17
|
// This is required for the default custom server to work. See the @nx/next:app generator.
|
|
18
18
|
process.env.NX_NEXT_DIR = projectRoot;
|
|
19
19
|
// Cast to any to overwrite NODE_ENV
|
|
@@ -23,8 +23,9 @@ async function* serveExecutor(options, context) {
|
|
|
23
23
|
? 'development'
|
|
24
24
|
: 'production';
|
|
25
25
|
// Setting port that the custom server should use.
|
|
26
|
-
process.env.PORT = `${options.port}
|
|
27
|
-
|
|
26
|
+
process.env.PORT = options.port ? `${options.port}` : process.env.PORT;
|
|
27
|
+
options.port = parseInt(process.env.PORT);
|
|
28
|
+
const args = (0, create_cli_options_1.createCliOptions)({ port: options.port, hostname });
|
|
28
29
|
if (keepAliveTimeout && !options.dev) {
|
|
29
30
|
args.push(`--keepAliveTimeout=${keepAliveTimeout}`);
|
|
30
31
|
}
|
|
@@ -54,10 +55,10 @@ async function* serveExecutor(options, context) {
|
|
|
54
55
|
process.on('SIGINT', () => killServer());
|
|
55
56
|
process.on('SIGTERM', () => killServer());
|
|
56
57
|
process.on('SIGHUP', () => killServer());
|
|
57
|
-
await (0, wait_for_port_open_1.waitForPortOpen)(port, { host: options.hostname });
|
|
58
|
+
await (0, wait_for_port_open_1.waitForPortOpen)(options.port, { host: options.hostname });
|
|
58
59
|
next({
|
|
59
60
|
success: true,
|
|
60
|
-
baseUrl: `http://${options.hostname ?? 'localhost'}:${port}`,
|
|
61
|
+
baseUrl: `http://${options.hostname ?? 'localhost'}:${options.port}`,
|
|
61
62
|
});
|
|
62
63
|
});
|
|
63
64
|
}
|
|
@@ -15,6 +15,7 @@ async function addLinting(host, options) {
|
|
|
15
15
|
unitTestRunner: options.unitTestRunner,
|
|
16
16
|
skipFormat: true,
|
|
17
17
|
rootProject: options.rootProject,
|
|
18
|
+
setParserOptionsProject: options.setParserOptionsProject,
|
|
18
19
|
});
|
|
19
20
|
if (options.linter === eslint_1.Linter.EsLint && (0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
20
21
|
(0, eslint_file_1.addExtendsToLintConfig)(host, options.appProjectRoot, [
|
|
@@ -21,6 +21,7 @@ async function pageGeneratorInternal(host, schema) {
|
|
|
21
21
|
const options = await normalizeOptions(host, schema);
|
|
22
22
|
const componentTask = await (0, react_1.componentGenerator)(host, {
|
|
23
23
|
...options,
|
|
24
|
+
isNextPage: true,
|
|
24
25
|
nameAndDirectoryFormat: 'as-provided',
|
|
25
26
|
export: false,
|
|
26
27
|
classComponent: false,
|