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": {
|
"@types/node": {
|
||||||
"version": "13.7.2",
|
"version": "13.7.4",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.4.tgz",
|
||||||
"integrity": "sha512-uvilvAQbdJvnSBFcKJ2td4016urcGvsiR+N4dHGU87ml8O2Vl6l+ErOi9w0kXSPiwJ1AYlIW+0pDXDWWMOiWbw=="
|
"integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw=="
|
||||||
},
|
},
|
||||||
"@types/range-parser": {
|
"@types/range-parser": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"@mojoio/cloudflare": "^4.0.3",
|
"@mojoio/cloudflare": "^4.0.3",
|
||||||
"@pushrocks/qenv": "^4.0.6",
|
"@pushrocks/qenv": "^4.0.6",
|
||||||
"@pushrocks/tapbundle": "^3.2.0",
|
"@pushrocks/tapbundle": "^3.2.0",
|
||||||
"@types/node": "^13.7.2",
|
"@types/node": "^13.7.4",
|
||||||
"tslint": "^6.0.0",
|
"tslint": "^6.0.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
|
@ -21,10 +21,10 @@ tap.test('should create a valid instance of SmartAcme', async () => {
|
|||||||
mongoDbPass: testQenv.getEnvVarRequired('MONGODB_PASSWORD'),
|
mongoDbPass: testQenv.getEnvVarRequired('MONGODB_PASSWORD'),
|
||||||
mongoDbUrl: testQenv.getEnvVarRequired('MONGODB_URL')
|
mongoDbUrl: testQenv.getEnvVarRequired('MONGODB_URL')
|
||||||
},
|
},
|
||||||
removeChallenge: async (dnsChallenge) => {
|
removeChallenge: async dnsChallenge => {
|
||||||
testCloudflare.convenience.acmeRemoveDnsChallenge(dnsChallenge);
|
testCloudflare.convenience.acmeRemoveDnsChallenge(dnsChallenge);
|
||||||
},
|
},
|
||||||
setChallenge: async (dnsChallenge) => {
|
setChallenge: async dnsChallenge => {
|
||||||
testCloudflare.convenience.acmeSetDnsChallenge(dnsChallenge);
|
testCloudflare.convenience.acmeSetDnsChallenge(dnsChallenge);
|
||||||
},
|
},
|
||||||
environment: 'integration'
|
environment: 'integration'
|
||||||
|
@ -9,7 +9,8 @@ import { Collection, svDb, unI } from '@pushrocks/smartdata';
|
|||||||
@plugins.smartdata.Collection(() => {
|
@plugins.smartdata.Collection(() => {
|
||||||
return CertManager.activeDB;
|
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()
|
@unI()
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@ -50,7 +51,6 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert, plugins.tsclass
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
constructor(optionsArg: plugins.tsclass.network.ICert) {
|
constructor(optionsArg: plugins.tsclass.network.ICert) {
|
||||||
super();
|
super();
|
||||||
if (optionsArg) {
|
if (optionsArg) {
|
||||||
|
@ -34,7 +34,7 @@ export class CertManager {
|
|||||||
CertManager.activeDB = this.smartdataDb;
|
CertManager.activeDB = this.smartdataDb;
|
||||||
|
|
||||||
// Pending Map
|
// 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 certDomainName = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
|
||||||
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomainName);
|
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 existingCertificateInterest = this.certmanager.interestMap.findInterest(certDomainName);
|
||||||
const certificate = existingCertificateInterest.interestFullfilled;
|
const certificate = existingCertificateInterest.interestFullfilled;
|
||||||
return certificate;
|
return certificate;
|
||||||
@ -127,7 +130,6 @@ export class SmartAcme {
|
|||||||
// lets make sure others get the same interest
|
// lets make sure others get the same interest
|
||||||
const currentDomainInterst = await this.certmanager.interestMap.addInterest(certDomainName);
|
const currentDomainInterst = await this.certmanager.interestMap.addInterest(certDomainName);
|
||||||
|
|
||||||
|
|
||||||
/* Place new order */
|
/* Place new order */
|
||||||
const order = await this.client.createOrder({
|
const order = await this.client.createOrder({
|
||||||
identifiers: [
|
identifiers: [
|
||||||
|
@ -28,9 +28,7 @@ export {
|
|||||||
// @tsclass scope
|
// @tsclass scope
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
export {
|
export { tsclass };
|
||||||
tsclass
|
|
||||||
}
|
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import * as acme from 'acme-client';
|
import * as acme from 'acme-client';
|
||||||
|
Loading…
Reference in New Issue
Block a user