feat: 更新版本至 0.0.53,升级依赖,添加 query-login-node 构建配置,优化文件操作同步化
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
import { QueryLogin, QueryLoginOpts } from './query-login.ts';
|
||||
import { LoginNodeCache, StorageNode } from './login-node-cache.ts';
|
||||
type QueryLoginNodeOptsWithoutCache = Omit<QueryLoginOpts, 'cache'>;
|
||||
export const storage = new StorageNode();
|
||||
await storage.loadCache();
|
||||
export { StorageNode }
|
||||
export const cache = new LoginNodeCache();
|
||||
export class QueryLoginNode extends QueryLogin {
|
||||
declare storage: StorageNode;
|
||||
constructor(opts: QueryLoginNodeOptsWithoutCache) {
|
||||
const baseURL = opts?.query?.baseURL;
|
||||
const storage = new StorageNode({ baseURL, load: true });
|
||||
const cache = new LoginNodeCache({ baseURL, load: true });
|
||||
super({
|
||||
...opts,
|
||||
isBrowser: false,
|
||||
storage,
|
||||
cache: new LoginNodeCache(),
|
||||
cache,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user