fix(core): update
This commit is contained in:
parent
6be2866ddd
commit
8b19b206a4
36
README.md
36
README.md
@ -1,36 +0,0 @@
|
||||
# @pushrocks/smartuniverse
|
||||
acme with an easy yet powerful interface in TypeScript
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartuniverse)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartuniverse)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartuniverse/)
|
||||
|
||||
## Status for master
|
||||
[![build status](https://gitlab.com/pushrocks/smartuniverse/badges/master/build.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![coverage report](https://gitlab.com/pushrocks/smartuniverse/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartuniverse.svg)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartuniverse/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartuniverse)
|
||||
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
```javascript
|
||||
import { SmartAcme } from 'smartacme';
|
||||
|
||||
let smac = new SmartAcme()
|
||||
|
||||
// TODO
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -688,9 +688,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "13.7.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.2.tgz",
|
||||
"integrity": "sha512-uvilvAQbdJvnSBFcKJ2td4016urcGvsiR+N4dHGU87ml8O2Vl6l+ErOi9w0kXSPiwJ1AYlIW+0pDXDWWMOiWbw=="
|
||||
"version": "13.7.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.4.tgz",
|
||||
"integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw=="
|
||||
},
|
||||
"@types/range-parser": {
|
||||
"version": "1.2.3",
|
||||
|
@ -46,7 +46,7 @@
|
||||
"@mojoio/cloudflare": "^4.0.3",
|
||||
"@pushrocks/qenv": "^4.0.6",
|
||||
"@pushrocks/tapbundle": "^3.2.0",
|
||||
"@types/node": "^13.7.2",
|
||||
"@types/node": "^13.7.4",
|
||||
"tslint": "^6.0.0",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
@ -61,4 +61,4 @@
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
}
|
@ -21,10 +21,10 @@ tap.test('should create a valid instance of SmartAcme', async () => {
|
||||
mongoDbPass: testQenv.getEnvVarRequired('MONGODB_PASSWORD'),
|
||||
mongoDbUrl: testQenv.getEnvVarRequired('MONGODB_URL')
|
||||
},
|
||||
removeChallenge: async (dnsChallenge) => {
|
||||
removeChallenge: async dnsChallenge => {
|
||||
testCloudflare.convenience.acmeRemoveDnsChallenge(dnsChallenge);
|
||||
},
|
||||
setChallenge: async (dnsChallenge) => {
|
||||
setChallenge: async dnsChallenge => {
|
||||
testCloudflare.convenience.acmeSetDnsChallenge(dnsChallenge);
|
||||
},
|
||||
environment: 'integration'
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user