Merge branch 'v2-dev' into v2-plugin

This commit is contained in:
xiaojunnuo
2025-04-04 20:14:24 +08:00
327 changed files with 422584 additions and 122 deletions
@@ -58,6 +58,7 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
if (param.domain.startsWith('*.')) {
param.domain = param.domain.substring(2);
}
param.domain = param.domain.trim()
const info = await this.getRepository().findOne({ where: { domain: param.domain,userId: param.userId } });
if (info) {
return info;
@@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash-es';
export class BuiltInPluginService {
getList() {
const collection = pluginRegistry.storage;
const list = [];
let list = [];
for (const key in collection) {
const Plugin = collection[key];
if (Plugin?.define?.deprecated) {
@@ -15,11 +15,21 @@ export class BuiltInPluginService {
}
list.push({ ...Plugin.define, key });
}
list = list.sort((a, b) => {
return (a.order ?? 10 )- (b.order ?? 10);
});
return list;
}
getGroups() {
return cloneDeep(pluginGroups);
const groups:any = cloneDeep(pluginGroups);
for (const key in groups) {
const group = groups[key];
group.plugins = group.plugins.sort((a, b) => {
return (a.order ?? 10 )- (b.order ?? 10);
});
}
return groups;
}
getByType(type: string) {