@nx/next 16.4.0-beta.9 → 16.4.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "16.4.0
|
|
3
|
+
"version": "16.4.0",
|
|
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": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/plugin-proposal-decorators": "^7.14.5",
|
|
38
|
-
"@nrwl/next": "16.4.0
|
|
39
|
-
"@nx/devkit": "16.4.0
|
|
40
|
-
"@nx/js": "16.4.0
|
|
41
|
-
"@nx/linter": "16.4.0
|
|
42
|
-
"@nx/react": "16.4.0
|
|
43
|
-
"@nx/web": "16.4.0
|
|
44
|
-
"@nx/workspace": "16.4.0
|
|
38
|
+
"@nrwl/next": "16.4.0",
|
|
39
|
+
"@nx/devkit": "16.4.0",
|
|
40
|
+
"@nx/js": "16.4.0",
|
|
41
|
+
"@nx/linter": "16.4.0",
|
|
42
|
+
"@nx/react": "16.4.0",
|
|
43
|
+
"@nx/web": "16.4.0",
|
|
44
|
+
"@nx/workspace": "16.4.0",
|
|
45
45
|
"@svgr/webpack": "^8.0.1",
|
|
46
46
|
"chalk": "^4.1.0",
|
|
47
47
|
"copy-webpack-plugin": "^10.2.4",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"fs-extra": "^11.1.0",
|
|
51
51
|
"http-proxy-middleware": "^2.0.6",
|
|
52
52
|
"ignore": "^5.0.4",
|
|
53
|
-
"semver": "7.3
|
|
53
|
+
"semver": "7.5.3",
|
|
54
54
|
"ts-node": "10.9.1",
|
|
55
55
|
"tsconfig-paths": "^4.1.2",
|
|
56
56
|
"tsconfig-paths-webpack-plugin": "4.0.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"types": "./index.d.ts",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "ae698a72748d9f33aa5395aeeaa7b7af436a1dc5"
|
|
65
65
|
}
|
|
@@ -14,7 +14,6 @@ function serveExecutor(options, context) {
|
|
|
14
14
|
: 'production';
|
|
15
15
|
// Setting port that the custom server should use.
|
|
16
16
|
process.env.PORT = options.port;
|
|
17
|
-
const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph), context);
|
|
18
17
|
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
|
19
18
|
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(runCustomServer(projectRoot, options, context))));
|
|
20
19
|
});
|
|
@@ -30,22 +29,17 @@ function runCustomServer(root, options, context) {
|
|
|
30
29
|
watch: options.dev ? true : false,
|
|
31
30
|
}, context));
|
|
32
31
|
try {
|
|
33
|
-
for (var _d = true, customServerBuild_1 = tslib_1.__asyncValues(customServerBuild), customServerBuild_1_1; customServerBuild_1_1 = yield tslib_1.__await(customServerBuild_1.next()), _a = customServerBuild_1_1.done, !_a;) {
|
|
32
|
+
for (var _d = true, customServerBuild_1 = tslib_1.__asyncValues(customServerBuild), customServerBuild_1_1; customServerBuild_1_1 = yield tslib_1.__await(customServerBuild_1.next()), _a = customServerBuild_1_1.done, !_a; _d = true) {
|
|
34
33
|
_c = customServerBuild_1_1.value;
|
|
35
34
|
_d = false;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return yield tslib_1.__await(result);
|
|
40
|
-
}
|
|
41
|
-
yield yield tslib_1.__await({
|
|
42
|
-
success: true,
|
|
43
|
-
baseUrl,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
finally {
|
|
47
|
-
_d = true;
|
|
35
|
+
const result = _c;
|
|
36
|
+
if (!result.success) {
|
|
37
|
+
return yield tslib_1.__await(result);
|
|
48
38
|
}
|
|
39
|
+
yield yield tslib_1.__await({
|
|
40
|
+
success: true,
|
|
41
|
+
baseUrl,
|
|
42
|
+
});
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
45
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -40,12 +40,6 @@
|
|
|
40
40
|
"type": "string",
|
|
41
41
|
"description": "Hostname on which the application is served."
|
|
42
42
|
},
|
|
43
|
-
"proxyConfig": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "Path to the proxy configuration file.",
|
|
46
|
-
"x-completion-type": "file",
|
|
47
|
-
"x-deprecated": "Use the built-in rewrite feature from Next.js. See: https://nextjs.org/docs/api-reference/next.config.js/rewrites"
|
|
48
|
-
},
|
|
49
43
|
"buildLibsFromSource": {
|
|
50
44
|
"type": "boolean",
|
|
51
45
|
"description": "Read buildable libraries from source instead of building them separately.",
|
|
@@ -4,7 +4,7 @@ exports.customServerSchematic = exports.customServerGenerator = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
function customServerGenerator(host, options) {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
8
8
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
const project = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
10
10
|
if (((_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nx/next:build' &&
|
|
@@ -13,16 +13,16 @@ function customServerGenerator(host, options) {
|
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
const outputPath = (_g = (_f = (_e = project.targets) === null || _e === void 0 ? void 0 : _e.build) === null || _f === void 0 ? void 0 : _f.options) === null || _g === void 0 ? void 0 : _g.outputPath;
|
|
16
|
-
const root =
|
|
16
|
+
const root = project.root;
|
|
17
17
|
if (!root ||
|
|
18
18
|
!outputPath ||
|
|
19
|
-
!((
|
|
20
|
-
!((
|
|
19
|
+
!((_k = (_j = (_h = project.targets) === null || _h === void 0 ? void 0 : _h.build) === null || _j === void 0 ? void 0 : _j.configurations) === null || _k === void 0 ? void 0 : _k.development) ||
|
|
20
|
+
!((_o = (_m = (_l = project.targets) === null || _l === void 0 ? void 0 : _l.build) === null || _m === void 0 ? void 0 : _m.configurations) === null || _o === void 0 ? void 0 : _o.production)) {
|
|
21
21
|
devkit_1.logger.error(`Project ${options.project} has invalid config. Did you generate it with "nx g @nx/next:app"?`);
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
if (((
|
|
25
|
-
((
|
|
24
|
+
if (((_p = project.targets) === null || _p === void 0 ? void 0 : _p['build-custom-server']) ||
|
|
25
|
+
((_q = project.targets) === null || _q === void 0 ? void 0 : _q['serve-custom-server'])) {
|
|
26
26
|
devkit_1.logger.warn(`Project ${options.project} has custom server targets already: build-custom-server, serve-custom-server. Remove these targets from project and try again.`);
|
|
27
27
|
return;
|
|
28
28
|
}
|
package/src/utils/types.d.ts
CHANGED