mirror of https://github.com/certd/certd
Merge remote-tracking branch 'origin/v2' into v2
commit
939b8d4aa9
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -3,6 +3,17 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些地区被屏蔽无法激活专业版的bug ([7532a96](https://github.com/certd/certd/commit/7532a960851b84d4f2cc3dba02353c5235e1a364))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 上传到主机,支持socks代理 ([d91026d](https://github.com/certd/certd/commit/d91026dc4fbfe5fedc4ee8e43dc0d08f1cf88356))
|
||||||
|
* 支持上传到七牛云oss ([bf024bd](https://github.com/certd/certd/commit/bf024bdda8bc2a463475be5761acf0da7317a08a))
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
10:11
|
02:35
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.25.6"
|
"version": "1.25.7"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "lerna bootstrap --hoist",
|
"start": "lerna bootstrap --hoist",
|
||||||
"i-all": "lerna link && lerna exec npm install ",
|
"i-all": "lerna link && lerna exec npm install ",
|
||||||
"publish": "npm run prepublishOnly2 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly",
|
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits --create-release github && npm run afterpublishOnly",
|
||||||
"afterpublishOnly": "time /t >build.trigger && git add ./build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
|
"afterpublishOnly": "time /t >build.trigger && git add ./build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
|
||||||
"prepublishOnly1": "npm run check && lerna run build ",
|
"prepublishOnly1": "npm run check && lerna run build ",
|
||||||
"prepublishOnly2": "npm run check && npm run before-build && lerna run build ",
|
"prepublishOnly2": "npm run check && npm run before-build && lerna run build ",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/publishlab/node-acme-client/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.25.6](https://github.com/publishlab/node-acme-client/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/publishlab/node-acme-client/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"types": "types/index.d.ts",
|
"types": "types/index.d.ts",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些地区被屏蔽无法激活专业版的bug ([7532a96](https://github.com/certd/certd/commit/7532a960851b84d4f2cc3dba02353c5235e1a364))
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"test": "mocha --loader=ts-node/esm"
|
"test": "mocha --loader=ts-node/esm"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/plus-core": "^1.25.4",
|
"@certd/plus-core": "^1.25.6",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
"fix-path": "^4.0.0",
|
"fix-path": "^4.0.0",
|
||||||
"http-proxy-agent": "^7.0.2",
|
"http-proxy-agent": "^7.0.2",
|
||||||
|
|
|
@ -8,7 +8,7 @@ export class HttpError extends Error {
|
||||||
status?: number;
|
status?: number;
|
||||||
statusText?: string;
|
statusText?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
request?: { url: string; method: string; params?: any; data?: any };
|
request?: { baseURL: string; url: string; method: string; params?: any; data?: any };
|
||||||
response?: { data: any };
|
response?: { data: any };
|
||||||
cause?: any;
|
cause?: any;
|
||||||
constructor(error: any) {
|
constructor(error: any) {
|
||||||
|
@ -23,6 +23,7 @@ export class HttpError extends Error {
|
||||||
this.status = error.response?.status;
|
this.status = error.response?.status;
|
||||||
this.statusText = error.response?.statusText;
|
this.statusText = error.response?.statusText;
|
||||||
this.request = {
|
this.request = {
|
||||||
|
baseURL: error.config?.baseURL,
|
||||||
url: error.config?.url,
|
url: error.config?.url,
|
||||||
method: error.config?.method,
|
method: error.config?.method,
|
||||||
params: error.config?.params,
|
params: error.config?.params,
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-jdcloud
|
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-jdcloud",
|
"name": "@certd/lib-jdcloud",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"main": "./dist/bundle.mjs",
|
"main": "./dist/bundle.mjs",
|
||||||
"module": "./dist/bundle.mjs",
|
"module": "./dist/bundle.mjs",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"@kubernetes/client-node": "0.21.0"
|
"@kubernetes/client-node": "0.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/pipeline": "^1.25.6",
|
"@certd/pipeline": "^1.25.7",
|
||||||
"@rollup/plugin-commonjs": "^23.0.4",
|
"@rollup/plugin-commonjs": "^23.0.4",
|
||||||
"@rollup/plugin-json": "^6.0.0",
|
"@rollup/plugin-json": "^6.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
@ -14,8 +14,9 @@
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.25.6",
|
"@certd/acme-client": "^1.25.7",
|
||||||
"@certd/pipeline": "^1.25.6",
|
"@certd/pipeline": "^1.25.7",
|
||||||
|
"dayjs": "^1.11.7",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"node-forge": "^0.10.0",
|
"node-forge": "^0.10.0",
|
||||||
"psl": "^1.9.0",
|
"psl": "^1.9.0",
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
||||||
"@typescript-eslint/parser": "^5.38.1",
|
"@typescript-eslint/parser": "^5.38.1",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"dayjs": "^1.11.6",
|
|
||||||
"eslint": "^8.24.0",
|
"eslint": "^8.24.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.25.6",
|
"@certd/lib-iframe": "^1.25.7",
|
||||||
"@certd/pipeline": "^1.25.6",
|
"@certd/pipeline": "^1.25.7",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/chai": "^4.3.12",
|
"@types/chai": "^4.3.12",
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
#plus:
|
#plus:
|
||||||
# server:
|
# server:
|
||||||
# baseUrl: 'http://127.0.0.1:11007'
|
# baseUrl: 'http://127.0.0.1:11007'
|
||||||
|
|
||||||
plus:
|
plus:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://api.ai.handsfree.work'
|
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||||
#typeorm:
|
#typeorm:
|
||||||
# dataSource:
|
# dataSource:
|
||||||
# default:
|
# default:
|
||||||
|
|
|
@ -9,8 +9,7 @@ typeorm:
|
||||||
|
|
||||||
plus:
|
plus:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://api.ai.handsfree.work'
|
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||||
|
|
||||||
account:
|
account:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://ai.handsfree.work/subject'
|
baseUrl: 'https://ai.handsfree.work/subject'
|
||||||
|
|
|
@ -3,6 +3,17 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.25.7](https://github.com/certd/certd/compare/v1.25.6...v1.25.7) (2024-09-29)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些地区被屏蔽无法激活专业版的bug ([7532a96](https://github.com/certd/certd/commit/7532a960851b84d4f2cc3dba02353c5235e1a364))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 上传到主机,支持socks代理 ([d91026d](https://github.com/certd/certd/commit/d91026dc4fbfe5fedc4ee8e43dc0d08f1cf88356))
|
||||||
|
* 支持上传到七牛云oss ([bf024bd](https://github.com/certd/certd/commit/bf024bdda8bc2a463475be5761acf0da7317a08a))
|
||||||
|
|
||||||
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
## [1.25.6](https://github.com/certd/certd/compare/v1.25.5...v1.25.6) (2024-09-29)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.25.6",
|
"version": "1.25.7",
|
||||||
"description": "fast-server base midway",
|
"description": "fast-server base midway",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -22,15 +22,15 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alicloud/cs20151215": "^3.0.3",
|
"@alicloud/cs20151215": "^3.0.3",
|
||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@certd/acme-client": "^1.25.6",
|
"@certd/acme-client": "^1.25.7",
|
||||||
"@certd/lib-huawei": "^1.25.6",
|
"@certd/lib-huawei": "^1.25.7",
|
||||||
"@certd/lib-jdcloud": "^1.25.6",
|
"@certd/lib-jdcloud": "^1.25.7",
|
||||||
"@certd/lib-k8s": "^1.25.6",
|
"@certd/lib-k8s": "^1.25.7",
|
||||||
"@certd/midway-flyway-js": "^1.25.6",
|
"@certd/midway-flyway-js": "^1.25.7",
|
||||||
"@certd/pipeline": "^1.25.6",
|
"@certd/pipeline": "^1.25.7",
|
||||||
"@certd/plugin-cert": "^1.25.6",
|
"@certd/plugin-cert": "^1.25.7",
|
||||||
"@certd/plugin-plus": "^1.25.6",
|
"@certd/plugin-plus": "^1.25.7",
|
||||||
"@certd/plus-core": "^1.25.4",
|
"@certd/plus-core": "^1.25.6",
|
||||||
"@koa/cors": "^5.0.0",
|
"@koa/cors": "^5.0.0",
|
||||||
"@midwayjs/bootstrap": "^3.16.2",
|
"@midwayjs/bootstrap": "^3.16.2",
|
||||||
"@midwayjs/cache": "^3.14.0",
|
"@midwayjs/cache": "^3.14.0",
|
||||||
|
|
|
@ -86,7 +86,7 @@ const development = {
|
||||||
resetAdminPasswd: false,
|
resetAdminPasswd: false,
|
||||||
},
|
},
|
||||||
plus: {
|
plus: {
|
||||||
serverBaseUrl: 'http://127.0.0.1:11007',
|
serverBaseUrls: ['http://127.0.0.1:11007'],
|
||||||
},
|
},
|
||||||
} as MidwayConfig;
|
} as MidwayConfig;
|
||||||
mergeConfig(development, 'development');
|
mergeConfig(development, 'development');
|
||||||
|
|
|
@ -9,8 +9,8 @@ import { logger } from '../../../utils/logger.js';
|
||||||
export class PlusService {
|
export class PlusService {
|
||||||
@Inject()
|
@Inject()
|
||||||
sysSettingsService: SysSettingsService;
|
sysSettingsService: SysSettingsService;
|
||||||
@Config('plus.server.baseUrl')
|
@Config('plus.server.baseUrls')
|
||||||
plusServerBaseUrl;
|
plusServerBaseUrls: string[];
|
||||||
|
|
||||||
plusRequestService: PlusRequestService;
|
plusRequestService: PlusRequestService;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export class PlusService {
|
||||||
async init() {
|
async init() {
|
||||||
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
||||||
this.plusRequestService = new PlusRequestService({
|
this.plusRequestService = new PlusRequestService({
|
||||||
plusServerBaseUrl: this.plusServerBaseUrl,
|
plusServerBaseUrls: this.plusServerBaseUrls,
|
||||||
http: http,
|
http: http,
|
||||||
logger,
|
logger,
|
||||||
subjectId: installInfo.siteId,
|
subjectId: installInfo.siteId,
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
import { AccessInput, IAccess, IsAccess } from '@certd/pipeline';
|
|
||||||
|
|
||||||
@IsAccess({
|
|
||||||
name: 'qiniu',
|
|
||||||
title: '七牛云授权',
|
|
||||||
desc: '',
|
|
||||||
input: {},
|
|
||||||
})
|
|
||||||
export class QiniuAccess implements IAccess {
|
|
||||||
@AccessInput({
|
|
||||||
title: 'AccessKey',
|
|
||||||
rules: [{ required: true, message: '此项必填' }],
|
|
||||||
helper: 'AK,前往[密钥管理](https://portal.qiniu.com/developer/user/key)获取',
|
|
||||||
})
|
|
||||||
accessKey!: string;
|
|
||||||
@AccessInput({
|
|
||||||
title: 'SecretKey',
|
|
||||||
encrypt: true,
|
|
||||||
helper: 'SK',
|
|
||||||
})
|
|
||||||
secretKey!: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
new QiniuAccess();
|
|
|
@ -1 +0,0 @@
|
||||||
export * from './access.js';
|
|
|
@ -1,2 +1 @@
|
||||||
export * from './plugin/index.js';
|
export * from './plugin/index.js';
|
||||||
export * from './access/index.js';
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
||||||
import { QiniuAccess } from '../../access/index.js';
|
import { QiniuAccess, QiniuClient } from '@certd/plugin-plus';
|
||||||
import { CertInfo } from '@certd/plugin-cert';
|
import { CertInfo } from '@certd/plugin-cert';
|
||||||
import { doRequest, uploadCert } from '../lib/sdk.js';
|
|
||||||
|
|
||||||
@IsTaskPlugin({
|
@IsTaskPlugin({
|
||||||
name: 'QiniuDeployCertToCDN',
|
name: 'QiniuDeployCertToCDN',
|
||||||
|
@ -49,24 +48,27 @@ export class QiniuDeployCertToCDN extends AbstractTaskPlugin {
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
this.logger.info('开始部署证书到七牛云cdn');
|
this.logger.info('开始部署证书到七牛云cdn');
|
||||||
const access = await this.accessService.getById<QiniuAccess>(this.accessId);
|
const access = await this.accessService.getById<QiniuAccess>(this.accessId);
|
||||||
|
const qiniuClient = new QiniuClient({
|
||||||
|
http: this.ctx.http,
|
||||||
|
access,
|
||||||
|
});
|
||||||
const url = `https://api.qiniu.com/domain/${this.domainName}/httpsconf`;
|
const url = `https://api.qiniu.com/domain/${this.domainName}/httpsconf`;
|
||||||
let certId = null;
|
let certId = null;
|
||||||
if (typeof this.cert !== 'string') {
|
if (typeof this.cert !== 'string') {
|
||||||
// 是证书id,直接上传即可
|
// 是证书id,直接上传即可
|
||||||
this.logger.info('先上传证书');
|
this.logger.info('先上传证书');
|
||||||
certId = await uploadCert(this.ctx.http, access, this.cert, this.appendTimeSuffix('certd'));
|
certId = await qiniuClient.uploadCert(this.cert, this.appendTimeSuffix('certd'));
|
||||||
} else {
|
} else {
|
||||||
certId = this.cert;
|
certId = this.cert;
|
||||||
}
|
}
|
||||||
|
|
||||||
//开始修改证书
|
//开始修改证书
|
||||||
this.logger.info('开始修改证书');
|
this.logger.info(`开始修改证书,certId:${certId},domain:${this.domainName}`);
|
||||||
const body = {
|
const body = {
|
||||||
certID: certId,
|
certID: certId,
|
||||||
};
|
};
|
||||||
|
|
||||||
await doRequest(this.ctx.http, access, url, 'put', body);
|
await qiniuClient.doRequest(url, 'put', body);
|
||||||
|
|
||||||
this.logger.info('部署完成');
|
this.logger.info('部署完成');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import { HttpClient } from '@certd/pipeline';
|
|
||||||
import { QiniuAccess } from '../../access/index.js';
|
|
||||||
import { CertInfo } from '@certd/plugin-cert';
|
|
||||||
|
|
||||||
export async function doRequest(http: HttpClient, access: QiniuAccess, url: string, method: string, body: any) {
|
|
||||||
const { generateAccessToken } = await import('qiniu/qiniu/util.js');
|
|
||||||
const token = generateAccessToken(access, url);
|
|
||||||
const res = await http.request({
|
|
||||||
url,
|
|
||||||
method: method,
|
|
||||||
headers: {
|
|
||||||
Authorization: token,
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res.code !== 200 || res.error) {
|
|
||||||
throw new Error('请求失败:' + res.error);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function uploadCert(http: HttpClient, access: QiniuAccess, cert: CertInfo, certName?: string) {
|
|
||||||
const url = 'https://api.qiniu.com/sslcert';
|
|
||||||
|
|
||||||
const body = {
|
|
||||||
name: certName,
|
|
||||||
common_name: 'certd',
|
|
||||||
pri: cert.key,
|
|
||||||
ca: cert.crt,
|
|
||||||
};
|
|
||||||
|
|
||||||
const res = await doRequest(http, access, url, 'post', body);
|
|
||||||
|
|
||||||
return res.certID;
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||||
import { QiniuAccess } from '../../access/index.js';
|
import { QiniuAccess, QiniuClient } from '@certd/plugin-plus';
|
||||||
import { CertInfo } from '@certd/plugin-cert';
|
import { CertInfo } from '@certd/plugin-cert';
|
||||||
import { uploadCert } from '../lib/sdk.js';
|
|
||||||
|
|
||||||
@IsTaskPlugin({
|
@IsTaskPlugin({
|
||||||
name: 'QiniuCertUpload',
|
name: 'QiniuCertUpload',
|
||||||
|
@ -53,7 +52,11 @@ export class QiniuCertUpload extends AbstractTaskPlugin {
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
this.logger.info('开始上传证书到七牛云');
|
this.logger.info('开始上传证书到七牛云');
|
||||||
const access = (await this.accessService.getById(this.accessId)) as QiniuAccess;
|
const access = (await this.accessService.getById(this.accessId)) as QiniuAccess;
|
||||||
this.qiniuCertId = await uploadCert(this.ctx.http, access, this.cert, this.appendTimeSuffix(this.certName));
|
const qiniuClient = new QiniuClient({
|
||||||
|
http: this.ctx.http,
|
||||||
|
access,
|
||||||
|
});
|
||||||
|
this.qiniuCertId = await qiniuClient.uploadCert(this.cert, this.appendTimeSuffix(this.certName));
|
||||||
this.logger.info('上传完成,id:', this.qiniuCertId);
|
this.logger.info('上传完成,id:', this.qiniuCertId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue