feat: update remote app integration and enhance package configuration

This commit is contained in:
xiongxiao
2026-03-13 18:28:22 +08:00
committed by cnb
parent 6668ef299d
commit dca8ffa4ad
3 changed files with 22 additions and 16 deletions

View File

@@ -2,3 +2,5 @@ import { buildWithBun } from '@kevisual/code-builder';
await buildWithBun({ naming: 'app', entry: 'src/index.ts', dts: true, clean: true });
await buildWithBun({ naming: 'remote', entry: 'src/remote.ts', dts: true });

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/project-search",
"version": "0.0.1",
"version": "0.0.2",
"description": "",
"main": "index.js",
"scripts": {
@@ -18,20 +18,21 @@
"devDependencies": {
"@kevisual/code-builder": "^0.0.6",
"@kevisual/context": "^0.0.8",
"@kevisual/dts": "^0.0.4",
"@kevisual/remote-app": "^0.0.7",
"@kevisual/router": "^0.1.1",
"fast-glob": "^3.3.3",
"meilisearch": "^0.55.0",
"zod": "^4.3.6"
},
"dependencies": {
"zod": "^4.3.6",
"@parcel/watcher": "^2.5.6",
"es-toolkit": "^1.45.1",
"eventemitter3": "^5.0.4"
},
"dependencies": {},
"exports": {
".": "./dist/app.js",
"./route": "./dist/app.js"
"./routes": "./dist/app.js",
"./remote": "./dist/remote.js"
},
"publishConfig": {
"access": "public"

View File

@@ -1,14 +1,17 @@
import { app, manager } from './index'
import { app } from './index'
import { RemoteApp } from '@kevisual/remote-app'
app.createRouteList()
const remote = new RemoteApp({
app,
id: 'project-search',
username: 'root'
});
const isConnect = await remote.isConnect();
if (isConnect) {
console.log('Remote app connected successfully', isConnect);
remote.listenProxy();
}
export const run = async (username: string) => {
const remote = new RemoteApp({
app,
id: 'project-search',
username: username,
});
const isConnect = await remote.isConnect();
if (isConnect) {
console.log('Remote app connected successfully', isConnect);
remote.listenProxy();
}
}