feat: 新增app管理和文件管理

This commit is contained in:
2024-10-06 20:10:20 +08:00
parent 1f81d3400c
commit 477ad00d86
18 changed files with 713 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { bucketName, minioClient } from '@/modules/minio.ts';
const main = async () => {
const res = await new Promise((resolve, reject) => {
let res: any[] = [];
let hasError = false;
minioClient
.listObjectsV2(bucketName, 'root/codeflow/0.0.1/')
.on('data', (data) => {
res.push(data);
})
.on('error', (err) => {
console.error('error', err);
hasError = true;
})
.on('end', () => {
if (hasError) {
reject();
return;
} else {
resolve(res);
}
});
});
console.log(res);
};
main();