Merge remote-tracking branch 'origin/v2' into v2

pull/68/head
xiaojunnuo 2024-04-08 10:09:04 +08:00
commit 19a3c7874a
63 changed files with 1210 additions and 135 deletions

View File

@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package root
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package root
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package root
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Bug Fixes
* 调整按钮图标到居中位置 ([836d18f](https://github.com/certd/certd/commit/836d18f07e22d00faf2f213bc3301a6672b5bafc))
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes

View File

@ -71,11 +71,11 @@ https://github.com/certd/certd/releases
### 3. 运行
```bash
# 如果docker compose是插件化安装
export CERTD_VERSION=1.2.0
export CERTD_VERSION=1.20.9
docker compose up -d
#如果docker compose是独立安装
export CERTD_VERSION=1.2.0
export CERTD_VERSION=1.20.9
docker-compose up -d
```
@ -86,6 +86,12 @@ http://your_server_ip:7001
记得修改密码
### 5. 升级
* 修改版本号,重新运行 `docker compose up -d` 即可
* 数据存在`/data/certd`目录下,不用担心数据丢失
## 五、一些说明
* 本项目ssl证书提供商为letencrypt
@ -119,7 +125,12 @@ http://your_server_ip:7001
</p>
## 七、我的其他项目
## 七、贡献代码
[贡献插件教程](./packages/plugins/plugin-center/README.md)
## 八、我的其他项目
* [袖手GPT](https://ai.handsfree.work/) ChatGPT国内可用无需FQ每日免费额度
* [fast-crud](https://gitee.com/fast-crud/fast-crud/) 基于vue3的crud快速开发框架
* [dev-sidecar](https://github.com/docmirror/dev-sidecar/) 直连访问github工具无需FQ解决github无法访问的问题

View File

@ -2,7 +2,7 @@ import http from 'axios'
import fs from 'fs'
//读取 packages/core/pipline/package.json的版本号
import {default as packageJson} from './packages/core/pipeline/package.json' assert {type: "json"};
import {default as packageJson} from './packages/core/pipeline/package.json';
const certdVersion = packageJson.version
console.log("certdVersion", certdVersion)
@ -56,7 +56,8 @@ async function sync() {
// curl -X PUT https://registry-direct.npmmirror.com/@certd/plugin-cert/sync?sync_upstream=true
const certdImageBuild = "http://flow-openapi.aliyun.com/pipeline/webhook/4zgFk3i4RZEMGuQzlOcI"
const webhooks = [certdImageBuild]
const certdImageRun = "http://flow-openapi.aliyun.com/pipeline/webhook/lzCzlGrLCOHQaTMMt0mG"
const webhooks = [certdImageBuild,certdImageRun]
async function sleep(time) {
return new Promise(resolve => {
@ -78,7 +79,7 @@ async function triggerBuild() {
}
})
console.log(`webhook success:${webhook}`)
await sleep(1000)
await sleep(10*60*1000)
}
}

View File

@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.20.5"
"version": "1.20.9"
}

View File

@ -12,12 +12,11 @@
"scripts": {
"start": "lerna bootstrap --hoist",
"i-all": "lerna link && lerna exec npm install ",
"publish": "npm run proxy && npm run prepublishOnly1 && lerna publish --conventional-commits && npm run afterpublishOnly && npm run deploy1",
"publish": "npm run prepublishOnly1 && lerna publish --conventional-commits && npm run afterpublishOnly && npm run deploy1",
"afterpublishOnly": "",
"proxy": "npm config set proxy=http://127.0.0.1:10809",
"prepublishOnly1": "npm run before-build && lerna run build ",
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
"deploy1": "node deploy.js"
"deploy1": "node --experimental-json-modules deploy.js "
},
"license": "AGPL-3.0",
"dependencies": {

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/publishlab/node-acme-client/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/acme-client
## [1.20.8](https://github.com/publishlab/node-acme-client/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/acme-client
## [1.20.7](https://github.com/publishlab/node-acme-client/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/acme-client
## [1.20.6](https://github.com/publishlab/node-acme-client/compare/v1.20.5...v1.20.6) (2024-03-21)
**Note:** Version bump only for package @certd/acme-client
## [1.20.5](https://github.com/publishlab/node-acme-client/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes

View File

@ -1 +1 @@
00:33
11:26

View File

@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.20.5",
"version": "1.20.9",
"main": "src/index.js",
"types": "types/index.d.ts",
"license": "MIT",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/pipeline
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/pipeline
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/pipeline
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/pipeline

View File

@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -23,7 +23,7 @@
"qs": "^6.11.2"
},
"devDependencies": {
"@certd/acme-client": "^1.20.5",
"@certd/acme-client": "^1.20.9",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -46,6 +46,7 @@
"lodash": "^4.17.21",
"log4js": "^6.9.1",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"reflect-metadata": "^0.1.13",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-aliyun

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-aliyun",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -23,10 +23,10 @@
"node-forge": "^0.10.0"
},
"devDependencies": {
"@certd/acme-client": "^1.20.5",
"@certd/pipeline": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/plugin-util": "^1.20.5",
"@certd/acme-client": "^1.20.9",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-util": "^1.20.9",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -48,6 +48,7 @@
"lodash": "^4.17.21",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.8.2",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-all
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-all
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-all
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-all

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-all",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -17,12 +17,13 @@
"preview": "vite preview"
},
"devDependencies": {
"@certd/pipeline": "^1.20.5",
"@certd/plugin-aliyun": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/plugin-host": "^1.20.5",
"@certd/plugin-huawei": "^1.20.5",
"@certd/plugin-tencent": "^1.20.5",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-aliyun": "^1.20.9",
"@certd/plugin-center": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-host": "^1.20.9",
"@certd/plugin-huawei": "^1.20.9",
"@certd/plugin-tencent": "^1.20.9",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -39,6 +40,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.8.2",

View File

@ -39,5 +39,6 @@ module.exports = {
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
"@certd/plugin-center",
],
};

View File

@ -3,3 +3,4 @@ export * from "@certd/plugin-aliyun";
export * from "@certd/plugin-tencent";
export * from "@certd/plugin-host";
export * from "@certd/plugin-huawei";
export * from "@certd/plugin-center";

View File

@ -1,57 +0,0 @@
import { defineConfig } from "vite";
import visualizer from "rollup-plugin-visualizer";
import typescript from "@rollup/plugin-typescript";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
build: {
lib: {
entry: "src/index.ts",
name: "CertdPluginAll",
},
rollupOptions: {
plugins: [
// @ts-ignore
visualizer(),
// @ts-ignore
typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
output: {
globals: {
vue: "Vue",
lodash: "_",
dayjs: "dayjs",
"@certd/plugin-cert": "CertdPluginCert",
"@certd/acme-client": "CertdAcmeClient",
"@certd/pipeline": "CertdPluginPipeline",
"@certd/plugin-aliyun": "CertdPluginAliyun",
"@certd/plugin-host": "CertdPluginHost",
"@certd/plugin-huawei": "CertdPluginHuawei",
"@certd/plugin-util": "CertdPluginUtil",
},
},
},
},
});

View File

@ -0,0 +1,23 @@
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"env": {
"mocha": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
// "no-unused-expressions": "off",
"max-len": [0, 160, 2, { "ignoreUrls": true }]
}
}

View File

@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
test/user.secret.ts

View File

@ -0,0 +1,5 @@
{
"extension": ["ts"],
"spec": "test/**/*.test.ts",
"require": "ts-node/register"
}

View File

@ -0,0 +1,2 @@
node_modules
src

View File

@ -0,0 +1,3 @@
{
"printWidth": 160
}

View File

@ -0,0 +1,100 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-builder
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-builder
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-builder
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes
* 修复腾讯云cdn部署无法选择端点的bug ([154409b](https://github.com/certd/certd/commit/154409b1dfee3ea1caae740ad9c1f99a6e7a9814))
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/plugin-tencent
**Note:** Version bump only for package @certd/plugin-tencent
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-tencent
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
### Features
* save files ([671d273](https://github.com/certd/certd/commit/671d273e2f9136d16896536b0ca127cf372f1619))
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.1](https://github.com/certd/certd/compare/v1.0.0...v1.0.1) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-tencent

View File

@ -0,0 +1,16 @@
# Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
## Type Support For `.vue` Imports in TS
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).

View File

@ -0,0 +1,57 @@
{
"name": "@certd/plugin-builder",
"private": false,
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"main": "./dist/bundle.js",
"module": "./dist/bundle.mjs",
"types": "./dist/d/index.d.ts"
},
"scripts": {
"dev": "vite",
"build": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-util": "^1.20.9"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.0.0",
"@types/chai": "^4.3.3",
"@types/lodash": "^4.14.186",
"@types/mocha": "^10.0.0",
"@types/node-forge": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"axios": "^0.21.1",
"chai": "^4.3.6",
"dayjs": "^1.9.7",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"lodash": "^4.17.20",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "3.0.1",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.8.4",
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@ -0,0 +1,43 @@
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
//const Typescript = require("rollup-plugin-typescript2");
const Typescript = require("@rollup/plugin-typescript");
const json = require("@rollup/plugin-json");
const terser = require("@rollup/plugin-terser");
module.exports = {
input: "src/index.ts",
output: {
file: "dist/bundle.js",
format: "cjs",
},
plugins: [
// 解析第三方依赖
resolve(),
// 识别 commonjs 模式第三方依赖
commonjs(),
Typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
json(),
terser(),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
};

View File

@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"experimentalDecorators": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts"],
}

View File

@ -0,0 +1,23 @@
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"env": {
"mocha": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
// "no-unused-expressions": "off",
"max-len": [0, 160, 2, { "ignoreUrls": true }]
}
}

View File

@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
test/user.secret.ts

View File

@ -0,0 +1,5 @@
{
"extension": ["ts"],
"spec": "test/**/*.test.ts",
"require": "ts-node/register"
}

View File

@ -0,0 +1,2 @@
node_modules
src

View File

@ -0,0 +1,3 @@
{
"printWidth": 160
}

View File

@ -0,0 +1,100 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-center
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-center
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-center
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes
* 修复腾讯云cdn部署无法选择端点的bug ([154409b](https://github.com/certd/certd/commit/154409b1dfee3ea1caae740ad9c1f99a6e7a9814))
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/plugin-tencent
**Note:** Version bump only for package @certd/plugin-tencent
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-tencent
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
### Features
* save files ([671d273](https://github.com/certd/certd/commit/671d273e2f9136d16896536b0ca127cf372f1619))
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.0.1](https://github.com/certd/certd/compare/v1.0.0...v1.0.1) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-tencent

View File

@ -0,0 +1,61 @@
# 贡献插件
## 1.本地调试运行
安装依赖包:
```shell
cd certd
pnpm install
```
启动 server:
```shell
cd packages/ui/certd-server
npm run dev
```
启动 client:
```shell
cd packages/ui/certd-client
npm run dev
# 会自动打开浏览器,确认正常运行
```
## 开发插件
进入 `packages/plugins/plugin-center/src`
### 1.复制demo目录作为你的插件目录
比如你想做cloudflare的插件那么你可以复制demo目录将其命名成cloudflare。
### 2. access授权
如果这是一个新的平台它应该有授权方式比如accessKey accessSecret之类的
参考`demo/access.ts` 修改为你要做的平台的`access`
这样用户就可以在certd后台中创建这种授权凭证了
### 3. dns-provider
如果域名是这个平台进行解析的那么你需要实现dns-provider
参考`demo/dns-provider.ts` 修改为你要做的平台的`dns-provider`
### 4. deploy-plugin
如果这个平台有需要部署证书的地方
参考`demo/deploy-plugin.ts` 修改为你要做的平台的`deploy-plugin`
### 5. 增加导入
在`./src/你的插件目录/index.ts`中增加你的插件import
```ts
export * from './dns-provider'
export * from './plugin-test'
export * from './access'
````
在`./src/index.ts`中增加import
```ts
export * from "./你的插件目录"
```
## 重启服务进行调试
刷新浏览器,检查你的插件是否工作正常, 确保能够正常进行证书申请和部署
## 提交PR
我们将尽快审核PR

View File

@ -0,0 +1,2 @@
//@ts-ignore
DYNAMIC_IMPORT_SCRIPT

View File

@ -0,0 +1,57 @@
{
"name": "@certd/plugin-center",
"private": false,
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"main": "./dist/bundle.js",
"module": "./dist/bundle.mjs",
"types": "./dist/d/index.d.ts"
},
"scripts": {
"dev": "vite",
"build": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-util": "^1.20.9",
"@rollup/plugin-dynamic-import-vars": "^2.1.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.0.0",
"@types/chai": "^4.3.3",
"@types/lodash": "^4.14.186",
"@types/mocha": "^10.0.0",
"@types/node-forge": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"axios": "^0.21.1",
"chai": "^4.3.6",
"dayjs": "^1.9.7",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"lodash": "^4.17.20",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.8.4"
},
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@ -0,0 +1,79 @@
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
//const Typescript = require("rollup-plugin-typescript2");
const Typescript = require("@rollup/plugin-typescript");
const json = require("@rollup/plugin-json");
const terser = require("@rollup/plugin-terser");
const dynamicImportVars =require ('@rollup/plugin-dynamic-import-vars');
const replace =require( '@rollup/plugin-replace')
const path = require("path")
const fs = require("fs")
function dynamicImport(directory) {
function readFilesRecursively(directory) {
let filePaths = [];
const files = fs.readdirSync(directory);
files.forEach(file => {
const filePath = directory+"/"+file;
const stats = fs.statSync(filePath);
if (stats.isDirectory()) {
filePaths = filePaths.concat(readFilesRecursively(filePath)); // Recursively read subdirectory and concatenate the results
} else if(filePath.endsWith(".ts")) {
filePaths.push(filePath); // Add file path to the array
}
});
return filePaths;
}
const files = readFilesRecursively(directory);
console.log("files",files)
return files.filter(file=>file.indexOf("/index.ts")<0).map(file => `import './${file}';`).join('\n');
}
module.exports = {
input: "./src/index.ts",
output: {
file: "dist/bundle.js",
format: "cjs",
},
plugins: [
// 解析第三方依赖
resolve(),
// 识别 commonjs 模式第三方依赖
commonjs(),
Typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue","./dist/**"],
allowSyntheticDefaultImports: true,
}),
dynamicImportVars({
// options
}),
replace({
'DYNAMIC_IMPORT_SCRIPT': dynamicImport("./src") // 替换成你的目录路径
}),
json(),
terser(),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
};

View File

@ -0,0 +1,42 @@
import { IsAccess, AccessInput } from "@certd/pipeline";
/**
*
* certd
*/
@IsAccess({
name: "demo",
title: "授权插件示例",
desc: "",
})
export class DemoAccess {
/**
*
*/
@AccessInput({
title: "密钥Id",
component: {
placeholder: "demoKeyId",
},
required: true,
})
demoKeyId = "";
/**
*
*/
@AccessInput({
//标题
title: "密钥串",
component: {
//input组件的placeholder
placeholder: "demoKeySecret",
},
//是否必填
required: true,
})
//属性名称
demoKeySecret = "";
}
new DemoAccess();

View File

@ -0,0 +1,78 @@
import _ from "lodash";
import { CreateRecordOptions, IDnsProvider, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
import { Autowire, ILogger } from "@certd/pipeline";
import { DemoAccess } from "./access";
// TODO 这里注册一个dnsProvider
@IsDnsProvider({
name: "demo",
title: "Dns提供商Demo",
desc: "demo dns provider示例",
accessType: "demo",
})
export class DemoDnsProvider implements IDnsProvider {
@Autowire()
access!: DemoAccess;
@Autowire()
logger!: ILogger;
async onInstance() {
const access: any = this.access;
this.logger.debug("access",access)
//初始化的操作
//...
}
async getDomainList():Promise<any[]> {
// TODO 这里你要实现一个获取域名列表的方法
const access = this.access
this.logger.debug("access",access)
return []
}
async matchDomain(dnsRecord: string):Promise<any> {
const domainList = await this.getDomainList();
let domainRecord = null;
for (const item of domainList) {
//TODO 根据域名去匹配账户中是否有该域名, 这里不一定是item.name 具体要看你要实现的平台的接口而定
if (_.endsWith(dnsRecord + ".", item.name)) {
domainRecord = item;
break;
}
}
if (!domainRecord) {
this.logger.info("账户中域名列表:",domainList)
this.logger.error("找不到域名,请确认账户中是否真的有此域名")
throw new Error("can not find Domain:"+dnsRecord);
}
return domainRecord;
}
async createRecord(options: CreateRecordOptions): Promise<any> {
const { fullRecord, value, type } = options;
this.logger.info("添加域名解析:", fullRecord, value,type);
//先确定账户中是否有该域名
const domainRecord = await this.matchDomain(fullRecord);
this.logger.debug("matchDomain:",domainRecord)
//TODO 然后调用接口创建txt类型的dns解析记录
// .. 这里调用对应平台的后台接口
const access = this.access
this.logger.debug("access",access)
}
async removeRecord(options: RemoveRecordOptions): Promise<any> {
const { fullRecord, value, record } = options;
this.logger.info("删除域名解析:", fullRecord, value,record);
//TODO 这里调用删除txt dns解析记录接口
const access = this.access
this.logger.debug("access",access)
this.logger.info("删除域名解析成功:", fullRecord, value);
}
}
//TODO 实例化这个provider将其自动注册到系统中
new DemoDnsProvider();

View File

@ -0,0 +1,3 @@
export * from './dns-provider'
export * from './plugin-test'
export * from './access'

View File

@ -0,0 +1,94 @@
import { AbstractTaskPlugin, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput } from "@certd/pipeline";
import { CertInfo, CertReader } from "@certd/plugin-cert";
@IsTaskPlugin({
name: "demoTest",
title: "Demo测试插件",
default: {
strategy: {
runStrategy: RunStrategy.SkipWhenSucceed,
},
},
})
export class DemoTestPlugin extends AbstractTaskPlugin {
//测试参数
@TaskInput({
title: "属性示例",
component:{
//前端组件配置,具体配置见组件文档 https://www.antdv.com/components/input-cn
name:"a-input"
}
})
text!: string;
//测试参数
@TaskInput({
title: "选择框",
component:{
//前端组件配置,具体配置见组件文档 https://www.antdv.com/components/select-cn
name:"a-select",
options:[
{value:"1",label:"选项1"},
{value:"2",label:"选项2"},
]
}
})
select!: string;
//测试参数
@TaskInput({
title: "switch",
component:{
//前端组件配置,具体配置见组件文档 https://www.antdv.com/components/switch-cn
name:"a-switch",
vModel:"checked"
}
})
switch!: boolean;
//证书选择,此项必须要有
@TaskInput({
title: "域名证书",
helper: "请选择前置任务输出的域名证书",
component: {
name: "pi-output-selector",
},
required: true,
})
cert!: CertInfo;
//授权选择框
@TaskInput({
title: "demo授权",
helper: "demoAccess授权",
component: {
name: "pi-access-selector",
type: "demo",
},
rules: [{ required: true, message: "此项必填" }],
})
accessId!: string;
accessService!: IAccessService;
logger!: ILogger;
async onInstance() {
this.accessService = this.ctx.accessService;
this.logger = this.ctx.logger;
}
async execute(): Promise<void> {
const { select, text, cert, accessId } = this;
const certReader = new CertReader(cert);
const access = await this.accessService.getById(accessId);
this.logger.debug("access",access)
this.logger.debug("certReader",certReader)
this.logger.info("DemoTestPlugin execute");
this.logger.info( "text:", text);
this.logger.info( "select:", select);
this.logger.info( "switch:", this.switch);
this.logger.info( "授权id:", accessId);
//TODO 这里实现你要部署的执行方法
}
}
//TODO 这里实例化插件,进行注册
new DemoTestPlugin();

View File

@ -0,0 +1 @@
export * from "./demo/index"

View File

@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"experimentalDecorators": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts"],
}

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-cert
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-cert
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-cert
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-cert

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -17,8 +17,8 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.20.5",
"@certd/pipeline": "^1.20.5",
"@certd/acme-client": "^1.20.9",
"@certd/pipeline": "^1.20.9",
"jszip": "^3.10.1",
"node-forge": "^0.10.0"
},
@ -47,6 +47,7 @@
"lodash": "^4.17.21",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-host
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-host
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-host
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-host

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-host",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -17,14 +17,11 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"ssh2": "^0.8.9"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -47,6 +44,7 @@
"lodash": "^4.17.20",
"log4js": "^6.3.0",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-huawei

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-huawei",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -17,19 +17,16 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.20.5",
"@certd/pipeline": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/plugin-util": "^1.20.5",
"@certd/acme-client": "^1.20.9",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-util": "^1.20.9",
"axios": "^0.27.2",
"dayjs": "^1.11.6",
"lodash": "^4.17.21",
"node-forge": "^0.10.0"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -49,6 +46,7 @@
"eslint-plugin-prettier": "^4.2.1",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-tencent",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -17,15 +17,12 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/plugin-util": "^1.20.5",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-util": "^1.20.9",
"tencentcloud-sdk-nodejs": "^4.0.44"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -48,6 +45,7 @@
"lodash": "^4.17.20",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",

View File

@ -55,7 +55,7 @@ export class DnspodDnsProvider implements IDnsProvider {
const ret = await this.doRequest({
url: this.access.endpoint + "/Domain.List",
});
this.logger.debug("dnspod 域名列表:", ret.domains);
this.logger.info("dnspod 域名列表:", ret.domains);
return ret.domains;
}
@ -101,6 +101,9 @@ export class DnspodDnsProvider implements IDnsProvider {
async matchDomain(dnsRecord: any) {
const list = await this.getDomainList();
if(list == null){
throw new Error("域名列表不能为空")
}
let domain = null;
for (const item of list) {
if (_.endsWith(dnsRecord, "." + item.name)) {

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-util
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-util
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/plugin-util
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/plugin-util

View File

@ -1,7 +1,7 @@
{
"name": "@certd/plugin-util",
"private": false,
"version": "1.20.5",
"version": "1.20.9",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@ -21,7 +21,7 @@
"shelljs": "^0.8.5"
},
"devDependencies": {
"@certd/pipeline": "^1.20.5",
"@certd/pipeline": "^1.20.9",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@ -36,13 +36,12 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.8.4",
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
"typescript": "^4.8.4"
},
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/certd/certd/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/ui-client
## [1.20.8](https://github.com/certd/certd/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/ui-client
## [1.20.7](https://github.com/certd/certd/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/ui-client
## [1.20.6](https://github.com/certd/certd/compare/v1.20.5...v1.20.6) (2024-03-21)
### Bug Fixes
* 调整按钮图标到居中位置 ([836d18f](https://github.com/certd/certd/commit/836d18f07e22d00faf2f213bc3301a6672b5bafc))
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/certd/certd/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/certd/certd/compare/v1.20.2...v1.20.5) (2024-03-11)
### Bug Fixes

View File

@ -1,9 +1,9 @@
{
"name": "@certd/ui-client",
"version": "1.20.5",
"version": "1.20.9",
"private": true,
"scripts": {
"dev": "vite",
"dev": "vite --open",
"dev:pm": "vite --mode pm",
"dev:force": "vite --force",
"debug": "vite --mode debug --open",
@ -59,7 +59,7 @@
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@certd/pipeline": "^1.20.5",
"@certd/pipeline": "^1.20.9",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/chai": "^4.3.5",
@ -93,7 +93,7 @@
"less-loader": "^11.1.3",
"lint-staged": "^13.2.3",
"postcss": "^8.4.27",
"prettier": "3.0.1",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"rimraf": "^5.0.1",
"rollup": "^3.27.2",

View File

@ -17,6 +17,7 @@
import { defineComponent, reactive, ref, watch } from "vue";
import * as api from "../api";
import CertAccessModal from "./access/index.vue";
import { GetProviderDefineByAccessType } from "../api";
export default defineComponent({
name: "PiAccessSelector",

View File

@ -47,3 +47,11 @@ export function GetProviderDefine(type: string) {
params: { type }
});
}
export function GetProviderDefineByAccessType(type: string) {
return request({
url: apiPrefix + "/defineByAccessType",
method: "post",
params: { type }
});
}

View File

@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.9](https://github.com/fast-crud/fast-server-js/compare/v1.20.8...v1.20.9) (2024-03-22)
**Note:** Version bump only for package @certd/ui-server
## [1.20.8](https://github.com/fast-crud/fast-server-js/compare/v1.20.7...v1.20.8) (2024-03-22)
**Note:** Version bump only for package @certd/ui-server
## [1.20.7](https://github.com/fast-crud/fast-server-js/compare/v1.20.6...v1.20.7) (2024-03-22)
**Note:** Version bump only for package @certd/ui-server
## [1.20.6](https://github.com/fast-crud/fast-server-js/compare/v1.20.5...v1.20.6) (2024-03-21)
### Performance Improvements
* 插件贡献文档及示例 ([72fb20a](https://github.com/fast-crud/fast-server-js/commit/72fb20abf3ba5bdd862575d2907703a52fd7eb17))
## [1.20.5](https://github.com/fast-crud/fast-server-js/compare/v1.20.2...v1.20.5) (2024-03-11)
**Note:** Version bump only for package @certd/ui-server

View File

@ -1,6 +1,6 @@
{
"name": "@certd/ui-server",
"version": "1.20.5",
"version": "1.20.9",
"description": "fast-server base midway",
"private": true,
"scripts": {
@ -21,15 +21,16 @@
"mig": "typeorm migration:create -n name"
},
"dependencies": {
"@certd/acme-client": "^1.20.5",
"@certd/pipeline": "^1.20.5",
"@certd/plugin-aliyun": "^1.20.5",
"@certd/plugin-all": "^1.20.5",
"@certd/plugin-cert": "^1.20.5",
"@certd/plugin-host": "^1.20.5",
"@certd/plugin-huawei": "^1.20.5",
"@certd/plugin-tencent": "^1.20.5",
"@certd/plugin-util": "^1.20.5",
"@certd/acme-client": "^1.20.9",
"@certd/pipeline": "^1.20.9",
"@certd/plugin-aliyun": "^1.20.9",
"@certd/plugin-all": "^1.20.9",
"@certd/plugin-center": "^1.20.9",
"@certd/plugin-cert": "^1.20.9",
"@certd/plugin-host": "^1.20.9",
"@certd/plugin-huawei": "^1.20.9",
"@certd/plugin-tencent": "^1.20.9",
"@certd/plugin-util": "^1.20.9",
"@koa/cors": "^3.4.3",
"@midwayjs/bootstrap": "^3.15.0",
"@midwayjs/cache": "^3.14.0",
@ -75,6 +76,7 @@
"cross-env": "^6.0.3",
"jest": "^26.6.3",
"mwts": "^1.3.0",
"prettier": "^2.8.8",
"ts-jest": "^26.5.6",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.1",

View File

@ -62,8 +62,8 @@ export class AccessController extends CrudController<AccessService> {
@Post('/define', { summary: Constants.per.authOnly })
async define(@Query('type') type) {
const provider = this.service.getDefineByType(type);
return this.ok(provider);
const access = this.service.getDefineByType(type);
return this.ok(access);
}
@Post('/accessTypeDict', { summary: Constants.per.authOnly })

View File

@ -1,12 +1,9 @@
import { Provide, Scope, ScopeEnum } from "@midwayjs/decorator";
import { Provide, Scope, ScopeEnum } from '@midwayjs/decorator';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { BaseService } from '../../../basic/base-service';
import { AccessEntity } from '../entity/access';
import {
accessRegistry,
IAccessService,
} from '@certd/pipeline';
import { accessRegistry, IAccessService } from '@certd/pipeline';
/**
*
@ -38,7 +35,8 @@ export class AccessService
return accessRegistry.getDefineList();
}
getDefineByType(type) {
getDefineByType(type: string) {
return accessRegistry.getDefine(type);
}
}