Compare commits

...

2 Commits

3 changed files with 1602 additions and 2 deletions

View File

@@ -53,10 +53,11 @@
"@kevisual/code-builder": "^0.0.6",
"@kevisual/context": "^0.0.8",
"@kevisual/js-filter": "^0.0.5",
"@kevisual/remote-app": "^0.0.4",
"@kevisual/router": "^0.0.84",
"@types/better-sqlite3": "^7.6.13",
"@kevisual/types": "^0.0.12",
"@kevisual/use-config": "^1.0.30",
"@types/better-sqlite3": "^7.6.13",
"@types/bun": "^1.3.9",
"@types/node": "^25.3.0",
"@types/user-agents": "^1.0.4",

1583
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@ import { app } from './app.ts'
export { app, db } from './app.ts';
export { Core } from './playwright/core.ts';
import './routes/index.ts';
import { RemoteApp } from '@kevisual/remote-app'
// 如果是直接运行,则启动应用
// better-sqlite3 不支持 bun
// playwright 也不支持 bun
@@ -25,4 +26,19 @@ if (import.meta.main || isPm2) {
export const browserAgentPlugin = createRouterAgentPluginFn({
// router: app.,
router: app,
})
})
const token = process.env.KEVISUAL_TOKEN || '';
const remoteApp = new RemoteApp({
id: 'browser-helper',
url: 'https://kevisual.cn/ws/proxy',
token: token,
app: app,
})
const connect = await remoteApp.isConnect()
if (connect) {
console.log('Remote app connected successfully!');
remoteApp.listenProxy()
} else {
console.error('Failed to connect remote app. Please check your token and network connection.');
}