@kevisual/cnb 0.0.31 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/opencode.js CHANGED
@@ -33597,7 +33597,7 @@ config3(en_default2());
33597
33597
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
33598
33598
  var zod_default = exports_external2;
33599
33599
 
33600
- // node_modules/.pnpm/@opencode-ai+plugin@1.2.12/node_modules/@opencode-ai/plugin/dist/tool.js
33600
+ // node_modules/.pnpm/@opencode-ai+plugin@1.2.15/node_modules/@opencode-ai/plugin/dist/tool.js
33601
33601
  function tool2(input) {
33602
33602
  return input;
33603
33603
  }
@@ -33825,7 +33825,8 @@ import path2 from "node:path";
33825
33825
  import fs2 from "node:fs";
33826
33826
  import os from "node:os";
33827
33827
  import { execSync } from "node:child_process";
33828
- var keepAliveFilePath = path2.join(os.homedir(), ".cnb/keepAliveCache.json");
33828
+ var baseDir = path2.join(os.homedir(), ".cnb", "live");
33829
+ var keepAliveFilePath = path2.join(baseDir, "keepAliveCache.json");
33829
33830
  var runLive = (filePath, pm2Name) => {
33830
33831
  const cmdArgs = `cnb live -c ${filePath}`;
33831
33832
  const stopCmd = `pm2 delete ${pm2Name} 2>/dev/null || true`;
@@ -33905,8 +33906,8 @@ var createLiveData = (data) => {
33905
33906
  const { cookie, repo: repo2, pipelineId } = data;
33906
33907
  const createdTime = Date.now();
33907
33908
  const wsUrl = `wss://${pipelineId}.cnb.space:443?skipWebSocketFrames=false`;
33908
- const pm2Name = `${repo2}__${pipelineId}`.replace(/\//g, "__");
33909
- const filePath = path2.join(os.homedir(), ".cnb", `${pm2Name}.json`);
33909
+ const pm2Name = `keep_${repo2}__${pipelineId}`.replace(/\//g, "__");
33910
+ const filePath = path2.join(baseDir, `${pm2Name}.json`);
33910
33911
  const _newData = { wss: wsUrl, wsUrl, cookie, repo: repo2, pipelineId, createdTime, filePath, pm2Name };
33911
33912
  if (!fs2.existsSync(path2.dirname(filePath))) {
33912
33913
  fs2.mkdirSync(path2.dirname(filePath), { recursive: true });
package/dist/routes.js CHANGED
@@ -33597,7 +33597,7 @@ config3(en_default2());
33597
33597
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
33598
33598
  var zod_default = exports_external2;
33599
33599
 
33600
- // node_modules/.pnpm/@opencode-ai+plugin@1.2.12/node_modules/@opencode-ai/plugin/dist/tool.js
33600
+ // node_modules/.pnpm/@opencode-ai+plugin@1.2.15/node_modules/@opencode-ai/plugin/dist/tool.js
33601
33601
  function tool2(input) {
33602
33602
  return input;
33603
33603
  }
@@ -33825,7 +33825,8 @@ import path2 from "node:path";
33825
33825
  import fs2 from "node:fs";
33826
33826
  import os from "node:os";
33827
33827
  import { execSync } from "node:child_process";
33828
- var keepAliveFilePath = path2.join(os.homedir(), ".cnb/keepAliveCache.json");
33828
+ var baseDir = path2.join(os.homedir(), ".cnb", "live");
33829
+ var keepAliveFilePath = path2.join(baseDir, "keepAliveCache.json");
33829
33830
  var runLive = (filePath, pm2Name) => {
33830
33831
  const cmdArgs = `cnb live -c ${filePath}`;
33831
33832
  const stopCmd = `pm2 delete ${pm2Name} 2>/dev/null || true`;
@@ -33905,8 +33906,8 @@ var createLiveData = (data) => {
33905
33906
  const { cookie, repo: repo2, pipelineId } = data;
33906
33907
  const createdTime = Date.now();
33907
33908
  const wsUrl = `wss://${pipelineId}.cnb.space:443?skipWebSocketFrames=false`;
33908
- const pm2Name = `${repo2}__${pipelineId}`.replace(/\//g, "__");
33909
- const filePath = path2.join(os.homedir(), ".cnb", `${pm2Name}.json`);
33909
+ const pm2Name = `keep_${repo2}__${pipelineId}`.replace(/\//g, "__");
33910
+ const filePath = path2.join(baseDir, `${pm2Name}.json`);
33910
33911
  const _newData = { wss: wsUrl, wsUrl, cookie, repo: repo2, pipelineId, createdTime, filePath, pm2Name };
33911
33912
  if (!fs2.existsSync(path2.dirname(filePath))) {
33912
33913
  fs2.mkdirSync(path2.dirname(filePath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/cnb",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
18
18
  "license": "MIT",
19
- "packageManager": "pnpm@10.30.2",
19
+ "packageManager": "pnpm@10.30.3",
20
20
  "type": "module",
21
21
  "devDependencies": {
22
22
  "@kevisual/ai": "^0.0.24",
@@ -24,9 +24,9 @@
24
24
  "@kevisual/dts": "^0.0.4",
25
25
  "@kevisual/context": "^0.0.8",
26
26
  "@kevisual/types": "^0.0.12",
27
- "@opencode-ai/plugin": "^1.2.12",
27
+ "@opencode-ai/plugin": "^1.2.15",
28
28
  "@types/bun": "^1.3.9",
29
- "@types/node": "^25.3.0",
29
+ "@types/node": "^25.3.2",
30
30
  "@types/ws": "^8.18.1",
31
31
  "dayjs": "^1.11.19",
32
32
  "dotenv": "^17.3.1"
@@ -16,8 +16,8 @@ export type KeepAliveData = {
16
16
  type KeepAliveCache = {
17
17
  data: KeepAliveData[];
18
18
  }
19
-
20
- const keepAliveFilePath = path.join(os.homedir(), '.cnb/keepAliveCache.json');
19
+ const baseDir = path.join(os.homedir(), '.cnb', 'live');
20
+ const keepAliveFilePath = path.join(baseDir, 'keepAliveCache.json');
21
21
 
22
22
  export const runLive = (filePath: string, pm2Name: string) => {
23
23
  // 使用 npx 运行命令
@@ -108,8 +108,8 @@ export const createLiveData = (data: { cookie: string, repo: string, pipelineId:
108
108
  const { cookie, repo, pipelineId } = data;
109
109
  const createdTime = Date.now();
110
110
  const wsUrl = `wss://${pipelineId}.cnb.space:443?skipWebSocketFrames=false`;
111
- const pm2Name = `${repo}__${pipelineId}`.replace(/\//g, '__');
112
- const filePath = path.join(os.homedir(), '.cnb', `${pm2Name}.json`);
111
+ const pm2Name = `keep_${repo}__${pipelineId}`.replace(/\//g, '__');
112
+ const filePath = path.join(baseDir, `${pm2Name}.json`);
113
113
  const _newData = { wss: wsUrl, wsUrl, cookie, repo, pipelineId, createdTime, filePath, pm2Name };
114
114
  if (!fs.existsSync(path.dirname(filePath))) {
115
115
  fs.mkdirSync(path.dirname(filePath), { recursive: true });