feat: 重构代理功能,添加文件代理支持并优化相关逻辑

This commit is contained in:
2026-01-18 13:41:47 +08:00
parent 5e5f4f6543
commit 43992d896f
11 changed files with 166 additions and 63 deletions

View File

@@ -17,8 +17,11 @@ type ProxyType = {
user: string;
key: string;
path: string;
indexPath: string;
absolutePath?: string;
type?: 'file';
file: {
indexPath: string;
absolutePath: string;
};
};
export type LocalProxyOpts = {
watch?: boolean; // 是否监听文件变化
@@ -79,8 +82,10 @@ export class LocalProxy {
user: user,
key: app,
path: `/${user}/${app}/`,
indexPath: `${user}/${app}/index.html`,
absolutePath: appPath,
file: {
indexPath: `${user}/${app}/index.html`,
absolutePath: appPath,
}
});
}
});