feat: 更新createLiveData函数,修改pm2Name格式以包含前缀"keep_"

This commit is contained in:
2026-02-25 18:53:38 +08:00
parent 8ca6b77e4d
commit 8a6bb9bbe9
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/cnb",
"version": "0.0.31",
"version": "0.0.32",
"description": "",
"main": "index.js",
"scripts": {

View File

@@ -108,7 +108,7 @@ export const createLiveData = (data: { cookie: string, repo: string, pipelineId:
const { cookie, repo, pipelineId } = data;
const createdTime = Date.now();
const wsUrl = `wss://${pipelineId}.cnb.space:443?skipWebSocketFrames=false`;
const pm2Name = `${repo}__${pipelineId}`.replace(/\//g, '__');
const pm2Name = `keep_${repo}__${pipelineId}`.replace(/\//g, '__');
const filePath = path.join(os.homedir(), '.cnb', `${pm2Name}.json`);
const _newData = { wss: wsUrl, wsUrl, cookie, repo, pipelineId, createdTime, filePath, pm2Name };
if (!fs.existsSync(path.dirname(filePath))) {