Compare commits
2 Commits
33112ea695
...
cf9c065edf
| Author | SHA1 | Date | |
|---|---|---|---|
| cf9c065edf | |||
| 180f13802f |
@@ -53,10 +53,11 @@
|
|||||||
"@kevisual/code-builder": "^0.0.6",
|
"@kevisual/code-builder": "^0.0.6",
|
||||||
"@kevisual/context": "^0.0.8",
|
"@kevisual/context": "^0.0.8",
|
||||||
"@kevisual/js-filter": "^0.0.5",
|
"@kevisual/js-filter": "^0.0.5",
|
||||||
|
"@kevisual/remote-app": "^0.0.4",
|
||||||
"@kevisual/router": "^0.0.84",
|
"@kevisual/router": "^0.0.84",
|
||||||
"@types/better-sqlite3": "^7.6.13",
|
|
||||||
"@kevisual/types": "^0.0.12",
|
"@kevisual/types": "^0.0.12",
|
||||||
"@kevisual/use-config": "^1.0.30",
|
"@kevisual/use-config": "^1.0.30",
|
||||||
|
"@types/better-sqlite3": "^7.6.13",
|
||||||
"@types/bun": "^1.3.9",
|
"@types/bun": "^1.3.9",
|
||||||
"@types/node": "^25.3.0",
|
"@types/node": "^25.3.0",
|
||||||
"@types/user-agents": "^1.0.4",
|
"@types/user-agents": "^1.0.4",
|
||||||
|
|||||||
1583
pnpm-lock.yaml
generated
Normal file
1583
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
src/index.ts
18
src/index.ts
@@ -2,6 +2,7 @@ import { app } from './app.ts'
|
|||||||
export { app, db } from './app.ts';
|
export { app, db } from './app.ts';
|
||||||
export { Core } from './playwright/core.ts';
|
export { Core } from './playwright/core.ts';
|
||||||
import './routes/index.ts';
|
import './routes/index.ts';
|
||||||
|
import { RemoteApp } from '@kevisual/remote-app'
|
||||||
// 如果是直接运行,则启动应用
|
// 如果是直接运行,则启动应用
|
||||||
// better-sqlite3 不支持 bun
|
// better-sqlite3 不支持 bun
|
||||||
// playwright 也不支持 bun
|
// playwright 也不支持 bun
|
||||||
@@ -25,4 +26,19 @@ if (import.meta.main || isPm2) {
|
|||||||
export const browserAgentPlugin = createRouterAgentPluginFn({
|
export const browserAgentPlugin = createRouterAgentPluginFn({
|
||||||
// router: app.,
|
// router: app.,
|
||||||
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.');
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user