@kevisual/cnb 0.0.35 → 0.0.36

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.
@@ -0,0 +1,4 @@
1
+ import { app } from './index.ts';
2
+ import { parse } from '@kevisual/router/src/commander.ts';
3
+
4
+ parse({ app: app as any, description: 'CNB控制台命令行工具', parse: true })
@@ -13,7 +13,7 @@ export const execCommand = (command: string, options: { cwd?: string } = {}) =>
13
13
  });
14
14
  };
15
15
  app.route({
16
- path: 'cnb-board',
16
+ path: 'cnb_board',
17
17
  key: 'is-cnb-board',
18
18
  description: '检查是否是 cnb-board 环境',
19
19
  middleware: ['auth-admin']
@@ -28,7 +28,7 @@ app.route({
28
28
 
29
29
 
30
30
  app.route({
31
- path: 'cnb-board',
31
+ path: 'cnb_board',
32
32
  key: 'exit',
33
33
  description: 'cnb的工作环境退出程序',
34
34
  middleware: ['auth-admin'],
@@ -7,7 +7,7 @@ import './cnb-env/index.ts'
7
7
  import './knowledge/index.ts'
8
8
  import './issues/index.ts'
9
9
  import './cnb-board/index.ts';
10
-
10
+ import './share/index.ts';
11
11
  /**
12
12
  * 验证上下文中的 App ID 是否与指定的 App ID 匹配
13
13
  * @param {any} ctx - 上下文对象,可能包含 appId 属性
@@ -0,0 +1,48 @@
1
+ import { useKey } from '@kevisual/context';
2
+ import { app, cnb } from '../../app.ts';
3
+ import z from 'zod';
4
+
5
+ app.route({
6
+ path: 'cnb',
7
+ key: 'get-assistant-url',
8
+ description: '获取cnb工作空间中部署的各个助手的访问地址',
9
+ middleware: ['auth'],
10
+ metadata: {
11
+ args: {
12
+ more: z.boolean().describe('需要更多信息')
13
+ }
14
+ }
15
+ }).define(async (ctx) => {
16
+ const uri = useKey('CNB_VSCODE_PROXY_URI') as string || '';
17
+ const base = {
18
+ base: uri,
19
+ link: uri.replace('{{port}}', '51515'),
20
+ kevisual: uri.replace('{{port}}', '51515'),
21
+ openclaw: uri.replace('{{port}}', '80'),
22
+ opencode: uri.replace('{{port}}', '100'),
23
+ openwebui: uri.replace('{{port}}', '200'),
24
+ note: uri.replace('{{port}}', '3000'),
25
+ uptime: uri.replace('{{port}}', '3001'),
26
+ immich: uri.replace('{{port}}', '2283'),
27
+ nocodb: uri.replace('{{port}}', '4000'),
28
+ openlist: uri.replace('{{port}}', '5244'),
29
+ xiaoyao: uri.replace('{{port}}', '5678'),
30
+ meilisearch: uri.replace('{{port}}', '7700'),
31
+ bark: uri.replace('{{port}}', '9111'),
32
+ vaultwarden: uri.replace('{{port}}', '8180'),
33
+ music: uri.replace('{{port}}', '8096'),
34
+ jellyfin: uri.replace('{{port}}', '8096'),
35
+ homeassistant: uri.replace('{{port}}', '8123'),
36
+ cloudreve: uri.replace('{{port}}', '5212'),
37
+ filebrowser: uri.replace('{{port}}', '8081'),
38
+ // newapi: uri.replace('{{port}}', '8080'),
39
+ vscode: useKey('CNB_VSCODE_PROXY_URI') as string || '',
40
+ codeServer: uri.replace('{{port}}', '10000'),
41
+ gitea: uri.replace('{{port}}', '3000'),
42
+ calibre: uri.replace('{{port}}', '8083'),
43
+ searXNG: uri.replace('{{port}}', '8888'),
44
+ }
45
+ ctx.body = {
46
+ ...base,
47
+ }
48
+ }).addTo(app);
package/bin/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import '../dist/cli.js';
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { };