chore: initial commit

This commit is contained in:
2026-10-22 17:07:08 +08:00
commit 0acef64f48
200 changed files with 35546 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import * as path from 'path'
import { fileURLToPath } from 'url'
import * as fs from "node:fs";
export function get_project_root_path() {
// @ts-ignore
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
return path.resolve(__dirname, '..')
}
export function get_path_dir_list(dir: string): string[] {
return fs.readdirSync(dir, { withFileTypes: true })
.filter(item => item.isDirectory())
.map(item => path.join(dir, item.name));
}