@lark-project/cli
Version:
飞书项目插件开发工具
18 lines (17 loc) • 610 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.killPort = void 0;
const cross_port_killer_1 = __importDefault(require("cross-port-killer"));
async function killPort(port) {
try {
const pids = await (0, cross_port_killer_1.default)(port);
pids[0] && console.log(`The ${pids[0]} process was killed.`);
}
catch (_a) {
throw new Error(`kill port ${port} failed`);
}
}
exports.killPort = killPort;