diff --git a/README.md b/README.md deleted file mode 100644 index fc365b7..0000000 --- a/README.md +++ /dev/null @@ -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) diff --git a/package-lock.json b/package-lock.json index 4524015..cb1bdae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index e55fae9..bfa6a2e 100644 --- a/package.json +++ b/package.json @@ -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" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 5d50e2d..89d8054 100644 --- a/test/test.ts +++ b/test/test.ts @@ -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' diff --git a/ts/smartacme.classes.cert.ts b/ts/smartacme.classes.cert.ts index 8f0982b..7566786 100644 --- a/ts/smartacme.classes.cert.ts +++ b/ts/smartacme.classes.cert.ts @@ -9,7 +9,8 @@ import { Collection, svDb, unI } from '@pushrocks/smartdata'; @plugins.smartdata.Collection(() => { return CertManager.activeDB; }) -export class Cert extends plugins.smartdata.SmartDataDbDoc implements plugins.tsclass.network.ICert { +export class Cert extends plugins.smartdata.SmartDataDbDoc + implements plugins.tsclass.network.ICert { @unI() public id: string; @@ -50,7 +51,6 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc certName); + this.interestMap = new plugins.lik.InterestMap(certName => certName); } /** diff --git a/ts/smartacme.classes.smartacme.ts b/ts/smartacme.classes.smartacme.ts index 0100310..8eb812b 100644 --- a/ts/smartacme.classes.smartacme.ts +++ b/ts/smartacme.classes.smartacme.ts @@ -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({ diff --git a/ts/smartacme.plugins.ts b/ts/smartacme.plugins.ts index e62357b..a69be2c 100644 --- a/ts/smartacme.plugins.ts +++ b/ts/smartacme.plugins.ts @@ -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';