@eggjs/cluster 4.0.2-beta.6 → 4.0.2-beta.8
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/master.js +9 -0
- package/package.json +6 -6
package/dist/master.js
CHANGED
|
@@ -6,6 +6,7 @@ import { AgentThreadUtils } from "./utils/mode/impl/worker_threads/agent.js";
|
|
|
6
6
|
import { AppThreadUtils } from "./utils/mode/impl/worker_threads/app.js";
|
|
7
7
|
import { parseOptions } from "./utils/options.js";
|
|
8
8
|
import { WorkerManager } from "./utils/worker_manager.js";
|
|
9
|
+
import module from "node:module";
|
|
9
10
|
import fs from "node:fs";
|
|
10
11
|
import net from "node:net";
|
|
11
12
|
import os from "node:os";
|
|
@@ -44,6 +45,14 @@ var Master = class extends ReadyEventEmitter {
|
|
|
44
45
|
}
|
|
45
46
|
async #start(options) {
|
|
46
47
|
this.options = await parseOptions(options);
|
|
48
|
+
if (!process.env.NODE_COMPILE_CACHE && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
49
|
+
const cacheDir = path.join(this.options.baseDir, ".egg", "compile-cache");
|
|
50
|
+
process.env.NODE_COMPILE_CACHE = cacheDir;
|
|
51
|
+
process.env.NODE_COMPILE_CACHE_PORTABLE = "1";
|
|
52
|
+
try {
|
|
53
|
+
module.enableCompileCache?.(cacheDir);
|
|
54
|
+
} catch {}
|
|
55
|
+
}
|
|
47
56
|
this.workerManager = new WorkerManager();
|
|
48
57
|
this.messenger = new Messenger(this, this.workerManager);
|
|
49
58
|
this.isProduction = isProduction(this.options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/cluster",
|
|
3
|
-
"version": "4.0.2-beta.
|
|
3
|
+
"version": "4.0.2-beta.8",
|
|
4
4
|
"description": "cluster manager for egg",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cluster",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"sendmessage": "^3.0.1",
|
|
46
46
|
"terminal-link": "^5.0.0",
|
|
47
47
|
"utility": "^2.5.0",
|
|
48
|
-
"@eggjs/utils": "5.0.2-beta.
|
|
48
|
+
"@eggjs/utils": "5.0.2-beta.8"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"address": "2",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"urllib": "^4.8.2",
|
|
56
56
|
"vitest": "^4.0.15",
|
|
57
|
-
"@eggjs/
|
|
58
|
-
"@eggjs/
|
|
59
|
-
"@eggjs/
|
|
60
|
-
"@eggjs/tsconfig": "3.1.2-beta.
|
|
57
|
+
"@eggjs/errors": "3.0.2-beta.8",
|
|
58
|
+
"@eggjs/mock": "7.0.2-beta.8",
|
|
59
|
+
"@eggjs/supertest": "9.0.2-beta.8",
|
|
60
|
+
"@eggjs/tsconfig": "3.1.2-beta.8"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.18.0"
|