feat: 修改为bun,优化代码

This commit is contained in:
2025-05-20 00:36:32 +08:00
parent 3de5754f24
commit 1f4404fa5c
32 changed files with 618 additions and 1035 deletions

View File

@@ -16,7 +16,7 @@ export { manager };
// console.log('app', app, );
// console.log('app2 context', global.context);
// console.log('app equal', app === ManagerApp);
loadManager();
loadManager({ runtime: 'server' });
// middleware: ['auth-admin']
/*
@@ -31,4 +31,4 @@ loadManager();
path: 'local-apps',
key: 'delete',
*/
*/

View File

@@ -3,8 +3,8 @@ import { PageModel } from '../models/index.ts';
import { ContainerModel } from '@/routes/container/models/index.ts';
import { Op } from 'sequelize';
import { getContainerData } from './get-container.ts';
import path from 'path';
import fs from 'fs';
import path from 'node:path';
import fs from 'node:fs';
import { getHTML, getDataJs, getOneHTML } from './file-template.ts';
import { minioClient } from '@/app.ts';
import { bucketName } from '@/modules/minio.ts';
@@ -174,7 +174,7 @@ export const getZip = async (page: PageModel, opts: { tokenUser: any }) => {
// 添加 JavaScript 字符串作为文件到 zip 中
zip.append(dataJs, { name: 'data.js' });
zip.append(JSON.stringify(page), { name: 'app.config.json5' });
zip.append(JSON.stringify(page), { name: 'app.config.json' });
// 可以继续添加更多内容,文件或目录等
// zip.append('Another content', { name: 'other.txt' });