mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 04:21:53 +08:00
Refactor: use ROOT_DIR
This commit is contained in:
@@ -16,6 +16,7 @@ export type UndiciResponseData<T = unknown> = Dispatcher.ResponseData<T>;
|
||||
|
||||
import { inspect } from 'node:util';
|
||||
import path from 'node:path';
|
||||
import { ROOT_DIR } from '../constants/dir';
|
||||
|
||||
const agent = new Agent({});
|
||||
|
||||
@@ -105,7 +106,7 @@ setGlobalDispatcher(agent.compose(
|
||||
}),
|
||||
interceptors.cache({
|
||||
store: new BetterSqlite3CacheStore({
|
||||
location: path.resolve(__dirname, '../../.cache/undici-better-sqlite3-cache-store.db'),
|
||||
location: path.join(ROOT_DIR, '.cache/undici-better-sqlite3-cache-store.db'),
|
||||
maxEntrySize: 1024 * 1024 * 50 // 50 MiB
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user