@modern-js/plugin-ssg 2.60.3 → 2.60.5
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/dist/cjs/server/index.js +1 -11
- package/dist/esm/server/index.js +1 -11
- package/dist/esm-node/server/index.js +1 -11
- package/package.json +10 -10
package/dist/cjs/server/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var import_utils = require("@modern-js/utils");
|
|
|
37
37
|
var import_util = require("../libs/util");
|
|
38
38
|
var import_consts = require("./consts");
|
|
39
39
|
const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
|
|
40
|
-
var _cp_stderr
|
|
40
|
+
var _cp_stderr;
|
|
41
41
|
const entries = ssgRoutes.map((route) => route.entryName);
|
|
42
42
|
const backup = (0, import_util.openRouteSSR)(pageRoutes, entries);
|
|
43
43
|
const total = backup.concat(apiRoutes);
|
|
@@ -85,16 +85,6 @@ const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirecto
|
|
|
85
85
|
import_utils.logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
(_cp_stdout = cp.stdout) === null || _cp_stdout === void 0 ? void 0 : _cp_stdout.on("data", (chunk) => {
|
|
89
|
-
const str = chunk.toString();
|
|
90
|
-
if (str.includes("Error")) {
|
|
91
|
-
import_utils.logger.error(str);
|
|
92
|
-
reject(new Error("ssg render failed"));
|
|
93
|
-
cp.kill("SIGKILL");
|
|
94
|
-
} else {
|
|
95
|
-
import_utils.logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
88
|
});
|
|
99
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
100
90
|
0 && (module.exports = {
|
package/dist/esm/server/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { openRouteSSR } from "../libs/util";
|
|
|
5
5
|
import { CLOSE_SIGN } from "./consts";
|
|
6
6
|
var createServer = function(api, ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) {
|
|
7
7
|
return new Promise(function(resolve, reject) {
|
|
8
|
-
var _cp_stderr
|
|
8
|
+
var _cp_stderr;
|
|
9
9
|
var entries = ssgRoutes.map(function(route) {
|
|
10
10
|
return route.entryName;
|
|
11
11
|
});
|
|
@@ -55,16 +55,6 @@ var createServer = function(api, ssgRoutes, pageRoutes, apiRoutes, options, appD
|
|
|
55
55
|
logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
(_cp_stdout = cp.stdout) === null || _cp_stdout === void 0 ? void 0 : _cp_stdout.on("data", function(chunk) {
|
|
59
|
-
var str = chunk.toString();
|
|
60
|
-
if (str.includes("Error")) {
|
|
61
|
-
logger.error(str);
|
|
62
|
-
reject(new Error("ssg render failed"));
|
|
63
|
-
cp.kill("SIGKILL");
|
|
64
|
-
} else {
|
|
65
|
-
logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
58
|
});
|
|
69
59
|
};
|
|
70
60
|
export {
|
|
@@ -4,7 +4,7 @@ import { logger } from "@modern-js/utils";
|
|
|
4
4
|
import { openRouteSSR } from "../libs/util";
|
|
5
5
|
import { CLOSE_SIGN } from "./consts";
|
|
6
6
|
const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirectory) => new Promise((resolve, reject) => {
|
|
7
|
-
var _cp_stderr
|
|
7
|
+
var _cp_stderr;
|
|
8
8
|
const entries = ssgRoutes.map((route) => route.entryName);
|
|
9
9
|
const backup = openRouteSSR(pageRoutes, entries);
|
|
10
10
|
const total = backup.concat(apiRoutes);
|
|
@@ -52,16 +52,6 @@ const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirecto
|
|
|
52
52
|
logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
(_cp_stdout = cp.stdout) === null || _cp_stdout === void 0 ? void 0 : _cp_stdout.on("data", (chunk) => {
|
|
56
|
-
const str = chunk.toString();
|
|
57
|
-
if (str.includes("Error")) {
|
|
58
|
-
logger.error(str);
|
|
59
|
-
reject(new Error("ssg render failed"));
|
|
60
|
-
cp.kill("SIGKILL");
|
|
61
|
-
} else {
|
|
62
|
-
logger.info(str.replace(/[^\S\n]+/g, " "));
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
55
|
});
|
|
66
56
|
export {
|
|
67
57
|
createServer
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.60.
|
|
18
|
+
"version": "2.60.5",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"node-mocks-http": "^1.11.0",
|
|
64
64
|
"normalize-path": "3.0.0",
|
|
65
65
|
"portfinder": "^1.0.28",
|
|
66
|
-
"@modern-js/prod-server": "2.60.
|
|
67
|
-
"@modern-js/utils": "2.60.
|
|
66
|
+
"@modern-js/prod-server": "2.60.5",
|
|
67
|
+
"@modern-js/utils": "2.60.5"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react-router-dom": ">=5.1.2"
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"@types/jest": "^29",
|
|
79
79
|
"@types/node": "^14",
|
|
80
80
|
"jest": "^29",
|
|
81
|
-
"react": "^18",
|
|
82
|
-
"react-dom": "^18",
|
|
83
|
-
"react-router-dom": "6.
|
|
81
|
+
"react": "^18.3.1",
|
|
82
|
+
"react-dom": "^18.3.1",
|
|
83
|
+
"react-router-dom": "6.27.0",
|
|
84
84
|
"typescript": "^5",
|
|
85
|
-
"@modern-js/app-tools": "2.60.
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"@scripts/jest-config": "2.60.
|
|
85
|
+
"@modern-js/app-tools": "2.60.5",
|
|
86
|
+
"@modern-js/types": "2.60.5",
|
|
87
|
+
"@scripts/build": "2.60.5",
|
|
88
|
+
"@scripts/jest-config": "2.60.5"
|
|
89
89
|
},
|
|
90
90
|
"sideEffects": false,
|
|
91
91
|
"publishConfig": {
|