fix(core): update
This commit is contained in:
@ -9,7 +9,8 @@ import { Collection, svDb, unI } from '@pushrocks/smartdata';
|
||||
@plugins.smartdata.Collection(() => {
|
||||
return CertManager.activeDB;
|
||||
})
|
||||
export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert, plugins.tsclass.network.ICert> implements plugins.tsclass.network.ICert {
|
||||
export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert, plugins.tsclass.network.ICert>
|
||||
implements plugins.tsclass.network.ICert {
|
||||
@unI()
|
||||
public id: string;
|
||||
|
||||
@ -50,7 +51,6 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert, plugins.tsclass
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
constructor(optionsArg: plugins.tsclass.network.ICert) {
|
||||
super();
|
||||
if (optionsArg) {
|
||||
|
@ -34,7 +34,7 @@ export class CertManager {
|
||||
CertManager.activeDB = this.smartdataDb;
|
||||
|
||||
// Pending Map
|
||||
this.interestMap = new plugins.lik.InterestMap((certName) => certName);
|
||||
this.interestMap = new plugins.lik.InterestMap(certName => certName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +114,10 @@ export class SmartAcme {
|
||||
const certDomainName = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
|
||||
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomainName);
|
||||
|
||||
if (!retrievedCertificate && await this.certmanager.interestMap.checkInterest(certDomainName)) {
|
||||
if (
|
||||
!retrievedCertificate &&
|
||||
(await this.certmanager.interestMap.checkInterest(certDomainName))
|
||||
) {
|
||||
const existingCertificateInterest = this.certmanager.interestMap.findInterest(certDomainName);
|
||||
const certificate = existingCertificateInterest.interestFullfilled;
|
||||
return certificate;
|
||||
@ -126,7 +129,6 @@ export class SmartAcme {
|
||||
|
||||
// lets make sure others get the same interest
|
||||
const currentDomainInterst = await this.certmanager.interestMap.addInterest(certDomainName);
|
||||
|
||||
|
||||
/* Place new order */
|
||||
const order = await this.client.createOrder({
|
||||
|
@ -28,9 +28,7 @@ export {
|
||||
// @tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
}
|
||||
export { tsclass };
|
||||
|
||||
// third party scope
|
||||
import * as acme from 'acme-client';
|
||||
|
Reference in New Issue
Block a user