Feat: implement parallel fetch w/ HTTP 304 (#43)

This commit is contained in:
Sukka
2024-10-09 20:49:36 +08:00
committed by GitHub
parent 07d3fdf05b
commit 2e48a72a3c
10 changed files with 273 additions and 111 deletions

View File

@@ -1,5 +1,6 @@
import { basename, extname } from 'node:path';
import picocolors from 'picocolors';
import wtf from 'wtfnode';
const SPAN_STATUS_START = 0;
const SPAN_STATUS_END = 1;
@@ -101,7 +102,9 @@ export const task = (importMetaMain: boolean, importMetaPath: string) => <T>(fn:
const dummySpan = createSpan(taskName);
if (importMetaMain) {
fn(dummySpan);
fn(dummySpan).finally(() => {
console.log(wtf.dump());
});
}
return async (span?: Span) => {