feat: add demo user and fix __dirname and fix cdn for panel upload

This commit is contained in:
2024-10-09 18:10:21 +08:00
parent 03c473d24a
commit 44d8a831c2
6 changed files with 31 additions and 8 deletions

View File

@@ -1,8 +1,11 @@
import path from 'path';
import path, { dirname } from 'path';
import { fileURLToPath } from 'url';
export const getRequire = () => {
return eval('require') as NodeRequire;
};
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export const directoryPath = path.resolve(__dirname);
export const defaultImportModules = [