perf: 优化证书申请过程

master
xiaojunnuo 2021-01-06 22:44:04 +08:00
parent 259e797ea5
commit f07ce6f47d
9 changed files with 10387 additions and 4085 deletions

2969
packages/certd/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
"log4js": "^6.3.0",
"node-forge": "^0.10.0",
"qs": "^6.9.4",
"@certd/tencentcloud-sdk-nodejs": "^4.0.39"
"tencentcloud-sdk-nodejs": "^4.0.44"
},
"devDependencies": {
"chai": "^4.2.0",

View File

@ -56,7 +56,7 @@ export default class DnspodDnsProvider extends DnsProvider {
mx: 1
}
})
console.log('添加域名解析成功:', fullRecord, value, JSON.stringify(ret.record))
log.info('添加域名解析成功:', fullRecord, value, JSON.stringify(ret.record))
return ret.record
}

View File

@ -1,10 +1,11 @@
import pkg from 'chai'
import options from '../options.js'
import DnspodDnsProvider from '../../src/dns-provider/impl/dnspod.js'
import { Certd } from '../../src/index.js'
import { createOptions } from '../../../../test/options.js'
const { expect } = pkg
describe('DnspodDnsProvider', function () {
it('#getDomainList', async function () {
const options = createOptions()
const dnsProvider = new DnspodDnsProvider(options.accessProviders.dnspod)
const domainList = await dnsProvider.getDomainList()
console.log('domainList', domainList)
@ -12,6 +13,7 @@ describe('DnspodDnsProvider', function () {
})
it('#createRecord&removeRecord', async function () {
const options = createOptions()
const dnsProvider = new DnspodDnsProvider(options.accessProviders.dnspod)
const record = await dnsProvider.createRecord({ fullRecord: '___certd___.__test__.certd.xyz', type: 'TXT', value: 'aaaa' })
console.log('recordId', record.id)
@ -22,11 +24,12 @@ describe('DnspodDnsProvider', function () {
it('#申请证书', async function () {
this.timeout(300000)
options.cert.domains = ['*.certd.xyz', 'certd.xyz']
const options = createOptions()
options.cert.domains = ['*.certd.xyz', '*.test.certd.xyz', '*.base.certd.xyz']
options.cert.dnsProvider = 'dnspod'
options.args = { forceCert: true }
const certd = new Certd()
const cert = await certd.certApply(options)
const certd = new Certd(options)
const cert = await certd.certApply()
expect(cert).ok
expect(cert.crt).ok
expect(cert.key).ok

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3662
packages/executor/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

3746
packages/plugins/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
"lodash": "^4.17.20",
"log4js": "^6.3.0",
"ssh2": "^0.8.9",
"@certd/tencentcloud-sdk-nodejs": "^4.0.39"
"tencentcloud-sdk-nodejs": "^4.0.44"
},
"devDependencies": {
"chai": "^4.2.0",