mirror of https://github.com/certd/certd
chore: 优化
parent
330f91e15b
commit
0c8a84656a
|
@ -21,7 +21,7 @@ gen
|
|||
/packages/ui/*/.idea
|
||||
/packages/ui/*/node_modules
|
||||
/packages/*/node_modules
|
||||
/pnpm-lock.yaml
|
||||
#/pnpm-lock.yaml
|
||||
|
||||
|
||||
tsconfig.tsbuildinfo
|
||||
|
|
|
@ -28,7 +28,7 @@ packages:
|
|||
### 安装依赖和初始化:
|
||||
```shell
|
||||
# 安装pnpm,如果提示npm命令不存在,就需要先安装nodejs
|
||||
npm install -g pnpm@8.15.7 --registry=https://registry.npmmirror.com
|
||||
npm install -g pnpm--registry=https://registry.npmmirror.com
|
||||
|
||||
# 使用国内镜像源,如果有代理,就不需要
|
||||
pnpm config set registry https://registry.npmmirror.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 源码部署
|
||||
不推荐
|
||||
如果没有`git`和`nodejs`基础,则不推荐
|
||||
## 一、源码安装
|
||||
|
||||
### 环境要求
|
||||
|
@ -7,7 +7,7 @@
|
|||
### 源码启动
|
||||
```shell
|
||||
# 克隆代码
|
||||
git clone https://github.com/certd/certd
|
||||
git clone https://github.com/certd/certd --depth=1
|
||||
# git checkout v1.x.x # 当v2主干分支代码无法正常启动时,可以尝试此命令,1.x.x换成最新版本号
|
||||
cd certd
|
||||
# 启动服务
|
||||
|
|
|
@ -152,6 +152,10 @@ export class Executor {
|
|||
this.runtime.disabled(runnable);
|
||||
return resultType;
|
||||
}
|
||||
if (resultType == ResultType.error) {
|
||||
this.runtime.error(runnable, new Error("执行失败"));
|
||||
return resultType;
|
||||
}
|
||||
this.runtime.success(runnable);
|
||||
return ResultType.success;
|
||||
} catch (e: any) {
|
||||
|
@ -174,6 +178,9 @@ export class Executor {
|
|||
const res: ResultType = await this.runWithHistory(stage, "stage", async () => {
|
||||
return await this.runStage(stage);
|
||||
});
|
||||
if (res === ResultType.error) {
|
||||
return ResultType.error;
|
||||
}
|
||||
resList.push(res);
|
||||
}
|
||||
return this.compositionResultType(resList);
|
||||
|
@ -200,10 +207,15 @@ export class Executor {
|
|||
}
|
||||
resList = await Promise.all(pList);
|
||||
} else {
|
||||
//串行
|
||||
//串行且报错继续
|
||||
for (let i = 0; i < runnerList.length; i++) {
|
||||
const runner = runnerList[i];
|
||||
try {
|
||||
resList[i] = await runner();
|
||||
} catch (e:any) {
|
||||
this.logger.error("任务执行异常,继续执行后续任务:", e.message);
|
||||
resList[i] = ResultType.error;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.compositionResultType(resList);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js";
|
||||
//@ts-ignore
|
||||
import psl from "psl";
|
||||
import { dnsProviderRegistry } from "./registry.js";
|
||||
import { Decorator } from "@certd/pipeline";
|
||||
|
|
|
@ -218,5 +218,9 @@ export default {
|
|||
return m.DescriptionsItem;
|
||||
})
|
||||
);
|
||||
app.component(
|
||||
"AResult",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/result"))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ import LayoutBasic from "/@/layout/layout-basic.vue";
|
|||
import type { RouteRecordRaw } from "vue-router";
|
||||
|
||||
import { mergeRouteModules } from "/@/vben/utils";
|
||||
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts", {
|
||||
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts*", {
|
||||
eager: true
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { IFrameView } from "/@/vben/layouts";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { computed } from "vue";
|
||||
|
||||
export const aboutResource = [
|
||||
{
|
|
@ -1,23 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '/@/vben/typings';
|
||||
import type { MenuRecordRaw } from "/@/vben/typings";
|
||||
|
||||
import type { MenuProps } from './types';
|
||||
import type { MenuProps } from "./types";
|
||||
|
||||
import { useForwardProps } from '/@/vben/composables';
|
||||
import { useForwardProps } from "/@/vben/composables";
|
||||
|
||||
import { Menu } from './components';
|
||||
import SubMenu from './sub-menu.vue';
|
||||
import { Menu } from "./components";
|
||||
import SubMenu from "./sub-menu.vue";
|
||||
|
||||
interface Props extends MenuProps {
|
||||
menus: MenuRecordRaw[];
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'MenuView',
|
||||
name: "MenuView"
|
||||
});
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
collapse: false,
|
||||
collapse: false
|
||||
// theme: 'dark',
|
||||
});
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '/@/vben/typings';
|
||||
import type { MenuRecordRaw } from "/@/vben/typings";
|
||||
|
||||
import { computed } from 'vue';
|
||||
import { computed } from "vue";
|
||||
|
||||
import { MenuBadge, MenuItem, SubMenu as SubMenuComp } from './components';
|
||||
import { MenuBadge, MenuItem, SubMenu as SubMenuComp } from "./components";
|
||||
// eslint-disable-next-line import/no-self-import
|
||||
import SubMenu from './sub-menu.vue';
|
||||
import SubMenu from "./sub-menu.vue";
|
||||
import { FsSlotRender } from "@fast-crud/fast-crud";
|
||||
|
||||
interface Props {
|
||||
/**
|
||||
|
@ -15,7 +16,7 @@ interface Props {
|
|||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'SubMenuUi',
|
||||
name: "SubMenuUi"
|
||||
});
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {});
|
||||
|
@ -25,9 +26,7 @@ const props = withDefaults(defineProps<Props>(), {});
|
|||
*/
|
||||
const hasChildren = computed(() => {
|
||||
const { menu } = props;
|
||||
return (
|
||||
Reflect.has(menu, 'children') && !!menu.children && menu.children.length > 0
|
||||
);
|
||||
return Reflect.has(menu, "children") && !!menu.children && menu.children.length > 0;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -41,25 +40,18 @@ const hasChildren = computed(() => {
|
|||
:badge-variants="menu.badgeVariants"
|
||||
:icon="menu.icon"
|
||||
:path="menu.path"
|
||||
@click="menu.meta?.onClick"
|
||||
>
|
||||
<template #title>
|
||||
<span>{{ menu.name }}</span>
|
||||
</template>
|
||||
<template v-if="menu.meta?.slot" #default>
|
||||
<fs-render :render-func="menu.meta.slot" />
|
||||
</template>
|
||||
</MenuItem>
|
||||
<SubMenuComp
|
||||
v-else
|
||||
:key="`${menu.path}_sub`"
|
||||
:active-icon="menu.activeIcon"
|
||||
:icon="menu.icon"
|
||||
:path="menu.path"
|
||||
>
|
||||
<SubMenuComp v-else :key="`${menu.path}_sub`" :active-icon="menu.activeIcon" :icon="menu.icon" :path="menu.path">
|
||||
<template #content>
|
||||
<MenuBadge
|
||||
:badge="menu.badge"
|
||||
:badge-type="menu.badgeType"
|
||||
:badge-variants="menu.badgeVariants"
|
||||
class="right-6"
|
||||
/>
|
||||
<MenuBadge :badge="menu.badge" :badge-type="menu.badgeType" :badge-variants="menu.badgeVariants" class="right-6" />
|
||||
</template>
|
||||
<template #title>
|
||||
<span>{{ menu.name }}</span>
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
v{{ version }}
|
||||
</a-tag>
|
||||
</a-badge>
|
||||
<a-divider type="vertical" />
|
||||
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
||||
</template>
|
||||
<template v-if="settingsStore.isComm">
|
||||
<a-divider type="vertical" />
|
||||
|
|
|
@ -3,7 +3,6 @@ import { merge } from 'lodash-es';
|
|||
import { CrudController } from '@certd/lib-server';
|
||||
import { PluginService } from '../../../modules/plugin/service/plugin-service.js';
|
||||
import { CommPluginConfig, PluginConfigService } from '../../../modules/plugin/service/plugin-config-service.js';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { CrudController, SysPrivateSettings, SysPublicSettings, SysSettingsEntity, SysSettingsService } from '@certd/lib-server';
|
||||
import * as _ from 'lodash-es';
|
||||
import { merge } from 'lodash-es';
|
||||
import { PipelineService } from '../../../modules/pipeline/service/pipeline-service.js';
|
||||
import { UserSettingsService } from '../../../modules/mine/service/user-settings-service.js';
|
||||
|
@ -9,6 +8,7 @@ import { http, logger, simpleNanoId } from '@certd/basic';
|
|||
import { CodeService } from '../../../modules/basic/service/code-service.js';
|
||||
import { SmsServiceFactory } from '../../../modules/basic/sms/factory.js';
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
|
@ -99,8 +99,8 @@ export class SysSettingsController extends CrudController<SysSettingsService> {
|
|||
async saveSysSettings(@Body(ALL) body: { public: SysPublicSettings; private: SysPrivateSettings }) {
|
||||
const publicSettings = await this.service.getPublicSettings();
|
||||
const privateSettings = await this.service.getPrivateSettings();
|
||||
_.merge(publicSettings, body.public);
|
||||
_.merge(privateSettings, body.private);
|
||||
merge(publicSettings, body.public);
|
||||
merge(privateSettings, body.private);
|
||||
await this.service.savePublicSettings(publicSettings);
|
||||
await this.service.savePrivateSettings(privateSettings);
|
||||
return this.ok({});
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
var axios = require('axios');
|
||||
var FormData = require('form-data');
|
||||
var data = new FormData();
|
||||
data.append('login_name', 'Admin');
|
||||
data.append('passwd', 'jM5eKu5uq!@3Ibyy');
|
||||
data.append('locale_id', 'default');
|
||||
|
||||
var config = {
|
||||
method: 'post',
|
||||
url: 'https://vps-b6941c0f.vps.ovh.net:8443/login_up.php',
|
||||
headers: {
|
||||
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
|
||||
Accept: '*/*',
|
||||
Host: 'vps-b6941c0f.vps.ovh.net:8443',
|
||||
Connection: 'keep-alive',
|
||||
Referer: 'https://vps-b6941c0f.vps.ovh.net:8443/login.php',
|
||||
...data.getHeaders(),
|
||||
},
|
||||
data: data,
|
||||
};
|
||||
|
||||
axios(config)
|
||||
.then(function (response) {
|
||||
console.log(JSON.stringify(response.data));
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue