temp: add eco
This commit is contained in:
@@ -18,11 +18,15 @@ app
|
||||
const file = files[0];
|
||||
console.log('File', files);
|
||||
const { path, name, hash, size } = file;
|
||||
const tags = [];
|
||||
if (collection?.tags) {
|
||||
tags.push(...collection.tags);
|
||||
}
|
||||
const microApp = await MicroAppModel.create({
|
||||
title: name,
|
||||
description: '',
|
||||
description: collection?.readme || '',
|
||||
type: 'micro-app',
|
||||
tags: [],
|
||||
tags: tags,
|
||||
data: {
|
||||
file: {
|
||||
path,
|
||||
@@ -52,7 +56,7 @@ app
|
||||
description: 'Deploy micro app',
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
const { id, key} = ctx.query?.data;
|
||||
const { id, key } = ctx.query?.data;
|
||||
// const id = '10f03411-85fc-4d37-a4d3-e32b15566a6c';
|
||||
// const key = 'envision-cli';
|
||||
// const id = '7c54a6de-9171-4093-926d-67a035042c6c';
|
||||
|
||||
@@ -8,9 +8,10 @@ type MicroAppData = {
|
||||
path: string;
|
||||
size: number;
|
||||
hash: string;
|
||||
name: string;
|
||||
};
|
||||
data?: any;
|
||||
collection?: any;
|
||||
collection?: any; // 上传的信息汇总
|
||||
};
|
||||
export class MicroAppModel extends Model {
|
||||
declare id: string;
|
||||
|
||||
@@ -36,6 +36,11 @@ export const deleteFileAppInfo = async (key: string) => {
|
||||
fs.rmSync(directory, { recursive: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param key
|
||||
* @returns
|
||||
*/
|
||||
export const loadApp = async (key: string) => {
|
||||
const { mainEntry, app } = await loadFileAppInfo(key);
|
||||
// 1. 查询数据库,获取app信息,查看是否运行中
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getSession } from '@/app.ts';
|
||||
import { getSession } from '@/modules/neo4j.ts';
|
||||
export async function fetchData() {
|
||||
const session = getSession();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user