feat: 破坏性更新 cjs to es

This commit is contained in:
手瓜一十雪
2024-05-22 19:58:45 +08:00
parent 08976624cd
commit 4e0cdbcb91
17 changed files with 75 additions and 13 deletions

View File

@@ -2,6 +2,12 @@ import crypto from 'node:crypto';
import path from 'node:path';
import fs from 'fs/promises';
import { log, logDebug } from './log';
import { dirname } from "node:path"
import { fileURLToPath } from "node:url"
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export function sleep(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}