update
This commit is contained in:
@@ -25,8 +25,7 @@
|
|||||||
"dev:share": "bun --watch src/test/remote-app.ts ",
|
"dev:share": "bun --watch src/test/remote-app.ts ",
|
||||||
"build:lib": "bun run bun-lib.config.mjs",
|
"build:lib": "bun run bun-lib.config.mjs",
|
||||||
"postbuild:lib": "dts -i src/lib.ts -o assistant-lib.d.ts -d libs -t",
|
"postbuild:lib": "dts -i src/lib.ts -o assistant-lib.d.ts -d libs -t",
|
||||||
"build": "rimraf dist && bun run bun.config.mjs",
|
"build": "rimraf dist && bun run bun.config.mjs"
|
||||||
"postbuild": "pnpm run build:lib"
|
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"ev-assistant": "bin/assistant.js",
|
"ev-assistant": "bin/assistant.js",
|
||||||
|
|||||||
@@ -61,3 +61,13 @@ export const app: App = useContextKey<App>('app', () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
app.route({
|
||||||
|
path: 'router',
|
||||||
|
key: 'list',
|
||||||
|
description: '获取路由列表',
|
||||||
|
}).define(async (ctx) => {
|
||||||
|
const list = ctx.app.getList()
|
||||||
|
ctx.body = { list }
|
||||||
|
}).addTo(app);
|
||||||
@@ -57,6 +57,7 @@ export const runServer = async (port: number = 51515, listenPath = '127.0.0.1')
|
|||||||
});
|
});
|
||||||
manager.initRemoteApp()
|
manager.initRemoteApp()
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
port: _port,
|
port: _port,
|
||||||
|
|||||||
Reference in New Issue
Block a user