@nx/next 16.6.0-beta.4 → 16.6.0-beta.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": "16.6.0-beta.
|
|
3
|
+
"version": "16.6.0-beta.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,23 +34,22 @@
|
|
|
34
34
|
"next": ">=13.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
38
|
-
"@nrwl/next": "16.6.0-beta.
|
|
39
|
-
"@nx/devkit": "16.6.0-beta.
|
|
40
|
-
"@nx/js": "16.6.0-beta.
|
|
41
|
-
"@nx/linter": "16.6.0-beta.
|
|
42
|
-
"@nx/react": "16.6.0-beta.
|
|
43
|
-
"@nx/web": "16.6.0-beta.
|
|
44
|
-
"@nx/workspace": "16.6.0-beta.
|
|
37
|
+
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
38
|
+
"@nrwl/next": "16.6.0-beta.6",
|
|
39
|
+
"@nx/devkit": "16.6.0-beta.6",
|
|
40
|
+
"@nx/js": "16.6.0-beta.6",
|
|
41
|
+
"@nx/linter": "16.6.0-beta.6",
|
|
42
|
+
"@nx/react": "16.6.0-beta.6",
|
|
43
|
+
"@nx/web": "16.6.0-beta.6",
|
|
44
|
+
"@nx/workspace": "16.6.0-beta.6",
|
|
45
45
|
"@svgr/webpack": "^8.0.1",
|
|
46
46
|
"chalk": "^4.1.0",
|
|
47
47
|
"copy-webpack-plugin": "^10.2.4",
|
|
48
48
|
"dotenv": "~10.0.0",
|
|
49
|
-
"express": "^4.18.1",
|
|
50
49
|
"fs-extra": "^11.1.0",
|
|
51
|
-
"http-proxy-middleware": "^2.0.6",
|
|
52
50
|
"ignore": "^5.0.4",
|
|
53
51
|
"semver": "7.5.3",
|
|
52
|
+
"tslib": "^2.3.0",
|
|
54
53
|
"url-loader": "^4.1.1",
|
|
55
54
|
"webpack-merge": "^5.8.0"
|
|
56
55
|
},
|
|
@@ -58,5 +57,5 @@
|
|
|
58
57
|
"access": "public"
|
|
59
58
|
},
|
|
60
59
|
"types": "./index.d.ts",
|
|
61
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9aad21dbfb2b659e488b6626f59df58ab23c0032"
|
|
62
61
|
}
|
|
@@ -39,11 +39,11 @@ function buildExecutor(options, context) {
|
|
|
39
39
|
// We can retrieve it inside plugins/with-nx
|
|
40
40
|
(_d = (_g = process.env).NX_NEXT_OUTPUT_PATH) !== null && _d !== void 0 ? _d : (_g.NX_NEXT_OUTPUT_PATH = outputPath);
|
|
41
41
|
const args = (0, create_cli_options_1.createCliOptions)({ experimentalAppOnly, profile, debug });
|
|
42
|
-
const
|
|
42
|
+
const pm = (0, devkit_1.getPackageManagerCommand)();
|
|
43
|
+
const command = `${pm.exec} next build ${projectRoot} ${args.join(' ')}`;
|
|
43
44
|
const execSyncOptions = {
|
|
44
45
|
stdio: 'inherit',
|
|
45
46
|
encoding: 'utf-8',
|
|
46
|
-
cwd: projectRoot,
|
|
47
47
|
};
|
|
48
48
|
try {
|
|
49
49
|
(0, child_process_1.execSync)(command, execSyncOptions);
|
|
@@ -27,7 +27,7 @@ function exportExecutor(options, context) {
|
|
|
27
27
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
let dependencies = [];
|
|
29
29
|
if (!options.buildLibsFromSource) {
|
|
30
|
-
const result = (0, buildable_libs_utils_1.
|
|
30
|
+
const result = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, 'build', // this should be generalized
|
|
31
31
|
context.configurationName);
|
|
32
32
|
dependencies = result.dependencies;
|
|
33
33
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { NextServerOptions, ProxyConfig } from '../../../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Adapted from https://github.com/zeit/next.js/blob/master/examples/with-custom-reverse-proxy/server.js
|
|
4
|
-
* @param settings
|
|
5
|
-
*/
|
|
6
|
-
export declare function defaultServer(settings: NextServerOptions, proxyConfig?: ProxyConfig): Promise<void>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultServer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const express = require("express");
|
|
6
|
-
/**
|
|
7
|
-
* Adapted from https://github.com/zeit/next.js/blob/master/examples/with-custom-reverse-proxy/server.js
|
|
8
|
-
* @param settings
|
|
9
|
-
*/
|
|
10
|
-
function defaultServer(settings, proxyConfig) {
|
|
11
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
const next = require('next');
|
|
13
|
-
const app = next(settings);
|
|
14
|
-
const handle = app.getRequestHandler();
|
|
15
|
-
yield app.prepare();
|
|
16
|
-
const server = express();
|
|
17
|
-
server.disable('x-powered-by');
|
|
18
|
-
// Set up the proxy.
|
|
19
|
-
if (proxyConfig) {
|
|
20
|
-
const proxyMiddleware = require('http-proxy-middleware').createProxyMiddleware;
|
|
21
|
-
Object.keys(proxyConfig).forEach((context) => {
|
|
22
|
-
server.use(proxyMiddleware(context, proxyConfig[context]));
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
// Default catch-all handler to allow Next.js to handle all other routes
|
|
26
|
-
server.all('*', (req, res) => handle(req, res));
|
|
27
|
-
server.listen(settings.port, settings.hostname);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
exports.defaultServer = defaultServer;
|