diff --git a/WebContainerGitService.js b/WebContainerGitService.js index 166b15f..30ffbee 100644 --- a/WebContainerGitService.js +++ b/WebContainerGitService.js @@ -243,8 +243,9 @@ export class WebContainerGitService { const tree = {}; const entries = await this.fs.readdir(dir); - for (const entry of entries) { - if (entry === '.git' || entry === 'node_modules') continue; + await Promise.all(entries.map(async (entry) => { + if (entry === '.git' || entry === 'node_modules') return; + const path = `${dir}/${entry}`; const stat = await this.fs.stat(path); @@ -258,7 +259,8 @@ export class WebContainerGitService { file: { contents } }; } - } + })); + return tree; } diff --git a/build.mjs b/build.mjs index 26ae01c..514309d 100644 --- a/build.mjs +++ b/build.mjs @@ -31,11 +31,12 @@ async function build() { // 3. Copy Static Libraries console.log("📂 Copying libraries..."); + const { cp } = await import("node:fs/promises"); const libs = await readdir("lib"); for (const lib of libs) { const src = join("lib", lib); const dest = join(DIST, "lib", lib); - await Bun.write(dest, Bun.file(src)); + await cp(src, dest, { recursive: true }); } // Extract the generated hashed file name from Bun's output diff --git a/lib/frameworks/engines/tagger-rs/build_wasm.sh b/lib/frameworks/engines/tagger-rs/build_wasm.sh index e6437e1..7be8a5b 100644 --- a/lib/frameworks/engines/tagger-rs/build_wasm.sh +++ b/lib/frameworks/engines/tagger-rs/build_wasm.sh @@ -39,5 +39,6 @@ wasm-pack build --target web --release # 4. Copy to lib echo -e "${GREEN}📦 Copying binary to dashboard library...${NC}" cp pkg/zerocms_tagger_bg.wasm ../../../../lib/zerocms_tagger_bg.wasm +cp pkg/zerocms_tagger.js ../../../../lib/zerocms_tagger.js echo -e "${GREEN}✨ Success! High-performance tagger is now active.${NC}"