feat: 更新版本号和依赖项,重构keepAliveFilePath路径以支持新的目录结构
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/cnb",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.30.2",
|
||||
"packageManager": "pnpm@10.30.3",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@kevisual/ai": "^0.0.24",
|
||||
@@ -24,9 +24,9 @@
|
||||
"@kevisual/dts": "^0.0.4",
|
||||
"@kevisual/context": "^0.0.8",
|
||||
"@kevisual/types": "^0.0.12",
|
||||
"@opencode-ai/plugin": "^1.2.12",
|
||||
"@opencode-ai/plugin": "^1.2.15",
|
||||
"@types/bun": "^1.3.9",
|
||||
"@types/node": "^25.3.0",
|
||||
"@types/node": "^25.3.2",
|
||||
"@types/ws": "^8.18.1",
|
||||
"dayjs": "^1.11.19",
|
||||
"dotenv": "^17.3.1"
|
||||
|
||||
32
pnpm-lock.yaml
generated
32
pnpm-lock.yaml
generated
@@ -52,14 +52,14 @@ importers:
|
||||
specifier: ^0.0.12
|
||||
version: 0.0.12
|
||||
'@opencode-ai/plugin':
|
||||
specifier: ^1.2.12
|
||||
version: 1.2.12
|
||||
specifier: ^1.2.15
|
||||
version: 1.2.15
|
||||
'@types/bun':
|
||||
specifier: ^1.3.9
|
||||
version: 1.3.9
|
||||
'@types/node':
|
||||
specifier: ^25.3.0
|
||||
version: 25.3.0
|
||||
specifier: ^25.3.2
|
||||
version: 25.3.2
|
||||
'@types/ws':
|
||||
specifier: ^8.18.1
|
||||
version: 8.18.1
|
||||
@@ -127,11 +127,11 @@ packages:
|
||||
resolution: {integrity: sha512-jLsL80wBBKkrJZrfk3SQpJ9JA/zREdlUROj7eCkmzqduAWKSI0wVcXuCKf+mLFCHB0Q0Tkh2rgzjSlurt3JQgw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
||||
'@opencode-ai/plugin@1.2.12':
|
||||
resolution: {integrity: sha512-7JI/Non1P87P73GKEGBaC6VjStTW8eCevXN0MyG+quxyA8VgnJhutgSmkRKj+3hFI8ASC52TVYJUBOsurA9Utg==}
|
||||
'@opencode-ai/plugin@1.2.15':
|
||||
resolution: {integrity: sha512-mh9S05W+CZZmo6q3uIEBubS66QVgiev7fRafX7vemrCfz+3pEIkSwipLjU/sxIewC9yLiDWLqS73DH/iEQzVDw==}
|
||||
|
||||
'@opencode-ai/sdk@1.2.12':
|
||||
resolution: {integrity: sha512-j5yVFoGvT3FVWJrZPWHgUcoDl38bB8gZF5NJ30PeqDPoS6kEfFIS4LzJmibNxD/rRM79C5KKgnQAQNet8JB8CQ==}
|
||||
'@opencode-ai/sdk@1.2.15':
|
||||
resolution: {integrity: sha512-NUJNlyBCdZ4R0EBLjJziEQOp2XbRPJosaMcTcWSWO5XJPKGUpz0u8ql+5cR8K+v2RJ+hp2NobtNwpjEYfe6BRQ==}
|
||||
|
||||
'@rollup/plugin-commonjs@29.0.0':
|
||||
resolution: {integrity: sha512-U2YHaxR2cU/yAiwKJtJRhnyLk7cifnQw0zUpISsocBDoHDJn+HTV74ABqnwr5bEgWUwFZC9oFL6wLe21lHu5eQ==}
|
||||
@@ -317,8 +317,8 @@ packages:
|
||||
'@types/estree@1.0.8':
|
||||
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
||||
|
||||
'@types/node@25.3.0':
|
||||
resolution: {integrity: sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==}
|
||||
'@types/node@25.3.2':
|
||||
resolution: {integrity: sha512-RpV6r/ij22zRRdyBPcxDeKAzH43phWVKEjL2iksqo1Vz3CuBUrgmPpPhALKiRfU7OMCmeeO9vECBMsV0hMTG8Q==}
|
||||
|
||||
'@types/resolve@1.20.2':
|
||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
||||
@@ -623,12 +623,12 @@ snapshots:
|
||||
|
||||
'@kevisual/ws@8.19.0': {}
|
||||
|
||||
'@opencode-ai/plugin@1.2.12':
|
||||
'@opencode-ai/plugin@1.2.15':
|
||||
dependencies:
|
||||
'@opencode-ai/sdk': 1.2.12
|
||||
'@opencode-ai/sdk': 1.2.15
|
||||
zod: 4.3.6
|
||||
|
||||
'@opencode-ai/sdk@1.2.12': {}
|
||||
'@opencode-ai/sdk@1.2.15': {}
|
||||
|
||||
'@rollup/plugin-commonjs@29.0.0(rollup@4.57.1)':
|
||||
dependencies:
|
||||
@@ -750,7 +750,7 @@ snapshots:
|
||||
|
||||
'@types/estree@1.0.8': {}
|
||||
|
||||
'@types/node@25.3.0':
|
||||
'@types/node@25.3.2':
|
||||
dependencies:
|
||||
undici-types: 7.18.2
|
||||
|
||||
@@ -758,7 +758,7 @@ snapshots:
|
||||
|
||||
'@types/ws@8.18.1':
|
||||
dependencies:
|
||||
'@types/node': 25.3.0
|
||||
'@types/node': 25.3.2
|
||||
|
||||
anymatch@3.1.3:
|
||||
dependencies:
|
||||
@@ -767,7 +767,7 @@ snapshots:
|
||||
|
||||
bun-types@1.3.9:
|
||||
dependencies:
|
||||
'@types/node': 25.3.0
|
||||
'@types/node': 25.3.2
|
||||
|
||||
chokidar@5.0.0:
|
||||
dependencies:
|
||||
|
||||
@@ -16,8 +16,8 @@ export type KeepAliveData = {
|
||||
type KeepAliveCache = {
|
||||
data: KeepAliveData[];
|
||||
}
|
||||
|
||||
const keepAliveFilePath = path.join(os.homedir(), '.cnb/keepAliveCache.json');
|
||||
const baseDir = path.join(os.homedir(), '.cnb', 'live');
|
||||
const keepAliveFilePath = path.join(baseDir, 'keepAliveCache.json');
|
||||
|
||||
export const runLive = (filePath: string, pm2Name: string) => {
|
||||
// 使用 npx 运行命令
|
||||
@@ -109,7 +109,7 @@ export const createLiveData = (data: { cookie: string, repo: string, pipelineId:
|
||||
const createdTime = Date.now();
|
||||
const wsUrl = `wss://${pipelineId}.cnb.space:443?skipWebSocketFrames=false`;
|
||||
const pm2Name = `keep_${repo}__${pipelineId}`.replace(/\//g, '__');
|
||||
const filePath = path.join(os.homedir(), '.cnb', `${pm2Name}.json`);
|
||||
const filePath = path.join(baseDir, `${pm2Name}.json`);
|
||||
const _newData = { wss: wsUrl, wsUrl, cookie, repo, pipelineId, createdTime, filePath, pm2Name };
|
||||
if (!fs.existsSync(path.dirname(filePath))) {
|
||||
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user