Fix readdirAsync import error in deployment system

- Replace non-existent readdirAsync from fs-jetpack with Node.js fs/promises.readdir
- Remove readdirAsync from fs-jetpack imports
- Update loadFilesFromDirectory to use standard readdir function

Fixes SyntaxError: Export named 'readdirAsync' not found in module error when running deployment system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
riz 2025-11-19 22:23:19 +00:00
parent 6c452af796
commit 3630d3f337
1 changed files with 2 additions and 2 deletions

View File

@ -3,10 +3,10 @@ import {
exists, exists,
existsAsync, existsAsync,
read, read,
readdirAsync,
removeAsync, removeAsync,
writeAsync, writeAsync,
} from "fs-jetpack"; } from "fs-jetpack";
import { readdir } from "fs/promises";
import { decode } from "msgpackr"; import { decode } from "msgpackr";
import { createRouter } from "radix3"; import { createRouter } from "radix3";
import { startBrCompress } from "./br-load"; import { startBrCompress } from "./br-load";
@ -279,7 +279,7 @@ export const deploy = {
} }
}, },
async loadFilesFromDirectory(dirPath: string, prefix: string, target: Record<string, any>) { async loadFilesFromDirectory(dirPath: string, prefix: string, target: Record<string, any>) {
const files = await readdirAsync(dirPath); const files = await readdir(dirPath);
for (const file of files) { for (const file of files) {
const fullPath = dir(`${dirPath}/${file}`); const fullPath = dir(`${dirPath}/${file}`);