From 6f6e8f45629f5b3243affa772d8bafd86283a575 Mon Sep 17 00:00:00 2001 From: sojipi Date: Fri, 17 Apr 2026 20:11:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BD=BF=E7=94=A8=20kill-port=20?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=E5=8E=9F=E7=94=9F=E5=91=BD=E4=BB=A4=E6=B8=85?= =?UTF-8?q?=E7=90=86=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 kill-port 脚本从原生的 lsof 命令替换为 npx kill-port 包,并添加相应的依赖 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e6fe707..2f6444c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "npm run kill-port && nodemon --exec ts-node src/index.ts", "dev:clean": "npm run kill-port && nodemon --exec ts-node src/index.ts --watch src --ext ts,json", "dev:full": "npm run build:lib && concurrently \"npm run watch:lib\" \"npm run dev\" --names \"LIB,SRV\" --prefix-colors \"blue,green\"", - "kill-port": "lsof -ti:7788 | xargs kill -9 2>/dev/null || true", + "kill-port": "npx kill-port 7788", "watch:lib": "tsc -p packages/bridge-pipeline/tsconfig.json --watch", "build:lib": "tsc -p packages/bridge-pipeline/tsconfig.json", "build": "npm run build:lib && tsc", @@ -39,6 +39,7 @@ "@typescript-eslint/parser": "^7.1.1", "concurrently": "^9.2.1", "eslint": "^8.57.0", + "kill-port": "^2.0.1", "nodemon": "^3.1.0", "prettier": "^3.2.5", "ts-node": "^10.9.2",