fix(core): update

This commit is contained in:
2020-02-21 10:48:08 +00:00
parent 6be2866ddd
commit 8b19b206a4
8 changed files with 15 additions and 51 deletions

View File

@ -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) {

View File

@ -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);
}
/**

View File

@ -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({

View File

@ -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';