mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Refactor: drop all Bun compatability
This commit is contained in:
@@ -15,7 +15,7 @@ const ASSETS_LIST = {
|
||||
|
||||
const mockDir = path.resolve(__dirname, '../Mock');
|
||||
|
||||
export const downloadMockAssets = task(typeof Bun !== 'undefined' ? Bun.main === __filename : require.main === module, __filename)((span) => Promise.all(Object.entries(ASSETS_LIST).map(
|
||||
export const downloadMockAssets = task(require.main === module, __filename)((span) => Promise.all(Object.entries(ASSETS_LIST).map(
|
||||
([filename, url]) => span
|
||||
.traceChild(url)
|
||||
.traceAsyncFn(() => fetchWithRetry(url).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user