mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
remove ui
This commit is contained in:
1 parent
9dd370fa72
commit
87123659aa
546 files changed
+180
-33522
No files matched your search
+1
-15
@@ -13,20 +13,6 @@ const moduleRoots = Array.from(new Set([
|
||||
path.resolve(os.tmpdir(), 'hydro', 'module'),
|
||||
]));
|
||||
|
||||
export async function getInstalled() {
|
||||
const modules = [];
|
||||
for (const moduleRoot of moduleRoots) {
|
||||
if (fs.existsSync(moduleRoot)) {
|
||||
const files = fs.readdirSync(moduleRoot);
|
||||
for (const file of files) {
|
||||
const info = path.resolve(moduleRoot, file, 'package.json');
|
||||
if (fs.existsSync(info)) modules.push(path.resolve(moduleRoot, file));
|
||||
}
|
||||
}
|
||||
}
|
||||
return modules;
|
||||
}
|
||||
|
||||
export async function getDetail() {
|
||||
const modules = [];
|
||||
for (const moduleRoot of moduleRoots) {
|
||||
@@ -55,5 +41,5 @@ export function install(url: string, name: string = '') {
|
||||
}
|
||||
|
||||
global.Hydro.lib.hpm = {
|
||||
getInstalled, getDetail, install,
|
||||
getDetail, install,
|
||||
};
|
||||
Reference in new issue
Block a user