From 9da927662ca4ff7c863a100a5c99854b18eeea86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=89=E8=8F=9C?= <1659488338@qq.com> Date: Sat, 8 Jul 2023 15:19:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 1 + src/zhin.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7a27640b0..30bc330a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,4 +6,5 @@ export * from './command' export * from './component' export * from './element' export * from './request' +export * from '@zhinjs/schema' export * from '@zhinjs/shared' diff --git a/src/zhin.ts b/src/zhin.ts index d48b607b7..cc67d8a9c 100644 --- a/src/zhin.ts +++ b/src/zhin.ts @@ -116,7 +116,7 @@ export class Zhin extends Context { .use(router.allowedMethods()) server.listen(options.port ||= 8086) this.logger.info(`server listen at \n${getIpAddress().map(ip => `http://${ip}:${options.port}`).join('\n')}`) - this.options = ref(options) + this.options = ref(options) as any watch(this.options, async (value: Zhin.Options) => { await fs.writeFileSync(process.env.configPath, Yaml.dump(value)) })