update
This commit is contained in:
parent
1d8fb2b296
commit
86929251ba
63
README.md
63
README.md
@ -1,24 +1,19 @@
|
|||||||
# smartacme
|
# @pushrocks/smartuniverse
|
||||||
|
acme with an easy yet powerful interface in TypeScript
|
||||||
|
|
||||||
acme implementation in TypeScript
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||||
## Availabililty
|
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartuniverse)
|
||||||
|
* [github.com (source mirror)](https://github.com/pushrocks/smartuniverse)
|
||||||
[![npm](https://umbrellazone.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartacme)
|
* [docs (typedoc)](https://pushrocks.gitlab.io/smartuniverse/)
|
||||||
[![git](https://umbrellazone.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/umbrellazone/smartacme)
|
|
||||||
[![git](https://umbrellazone.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/umbrellazone/smartacme)
|
|
||||||
[![docs](https://umbrellazone.gitlab.io/assets/repo-button-docs.svg)](https://umbrellazone.gitlab.io/smartacme/)
|
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
[![build status](https://gitlab.com/pushrocks/smartuniverse/badges/master/build.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||||
[![build status](https://GitLab.com/umbrellazone/smartacme/badges/master/build.svg)](https://GitLab.com/umbrellazone/smartacme/commits/master)
|
[![coverage report](https://gitlab.com/pushrocks/smartuniverse/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||||
[![coverage report](https://GitLab.com/umbrellazone/smartacme/badges/master/coverage.svg)](https://GitLab.com/umbrellazone/smartacme/commits/master)
|
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartuniverse.svg)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||||
[![npm downloads per month](https://img.shields.io/npm/dm/smartacme.svg)](https://www.npmjs.com/package/smartacme)
|
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartuniverse/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartuniverse)
|
||||||
[![Dependency Status](https://david-dm.org/umbrellazone/smartacme.svg)](https://david-dm.org/umbrellazone/smartacme)
|
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[![bitHound Dependencies](https://www.bithound.io/github/umbrellazone/smartacme/badges/dependencies.svg)](https://www.bithound.io/github/umbrellazone/smartacme/master/dependencies/npm)
|
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[![bitHound Code](https://www.bithound.io/github/umbrellazone/smartacme/badges/code.svg)](https://www.bithound.io/github/umbrellazone/smartacme)
|
|
||||||
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -28,36 +23,14 @@ Use TypeScript for best in class instellisense.
|
|||||||
```javascript
|
```javascript
|
||||||
import { SmartAcme } from 'smartacme';
|
import { SmartAcme } from 'smartacme';
|
||||||
|
|
||||||
let smac = new SmartAcme()(async () => {
|
let smac = new SmartAcme()
|
||||||
// learn async/await, it'll make your life easier
|
|
||||||
|
|
||||||
// optionally accepts a filePath Arg with a stored acmeaccount.json
|
// TODO
|
||||||
// will create an account and
|
|
||||||
let myAccount = await smac.createAcmeAccount();
|
|
||||||
|
|
||||||
// will return a dnsHash to set in your DNS record
|
|
||||||
let myCert = await myAccount.createAcmeCert('example.com');
|
|
||||||
|
|
||||||
// gets and accepts the specified challenge
|
|
||||||
// first argument optional, defaults to dns-01 (which is the cleanest method for production use)
|
|
||||||
let myChallenge = await myCert.getChallenge('dns-01');
|
|
||||||
|
|
||||||
/* ----------
|
|
||||||
Now you need to set the challenge in your DNS
|
|
||||||
myChallenge.domainNamePrefixed is the address for the record
|
|
||||||
myChallenge.dnsKeyHash is the ready to use txt record value expected by letsencrypt
|
|
||||||
-------------*/
|
|
||||||
})();
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Other relevant npm modules
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
| module name | description |
|
|
||||||
| ----------- | ------------------------------------------------------------------- |
|
|
||||||
| cert | a higlevel production module that uses smartacme to manage certs |
|
|
||||||
| smartnginx | a highlevel production tool for docker environments to manage nginx |
|
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
[![repo-footer](https://umbrellazone.gitlab.io/assets/repo-footer.svg)](https://umbrella.zone
|
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
{
|
{
|
||||||
|
"gitzone": {
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "pushrocks",
|
||||||
|
"gitrepo": "smartuniverse",
|
||||||
|
"shortDescription": "acme with an easy yet powerful interface in TypeScript",
|
||||||
|
"npmPackagename": "@pushrocks/smartuniverse",
|
||||||
|
"license": "MIT",
|
||||||
|
"projectDomain": "push.rocks"
|
||||||
|
}
|
||||||
|
},
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
54
package-lock.json
generated
54
package-lock.json
generated
@ -6,7 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@airbnb/node-memwatch": {
|
"@airbnb/node-memwatch": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@airbnb%2fnode-memwatch/-/node-memwatch-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@airbnb/node-memwatch/-/node-memwatch-1.0.2.tgz",
|
||||||
"integrity": "sha512-2R+MEEMSTUdKwQ6NFWkyA/UNoSjL1tMldZqJbZpgXSwNMBzlNlkUWEXKu9RqTTMkDqJRfGJ2VDs8gPlPK2APDQ==",
|
"integrity": "sha512-2R+MEEMSTUdKwQ6NFWkyA/UNoSjL1tMldZqJbZpgXSwNMBzlNlkUWEXKu9RqTTMkDqJRfGJ2VDs8gPlPK2APDQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -146,7 +146,7 @@
|
|||||||
},
|
},
|
||||||
"@pushrocks/smartdelay": {
|
"@pushrocks/smartdelay": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartdelay/-/smartdelay-2.0.2.tgz",
|
||||||
"integrity": "sha512-4xf6tMKwZcxBynKgXrM4SQKgeASfRvx43LUmR5DkStp26ZHAsarCXUdKJS6y8QIPygEOTOCP8we97JAcCzBuMg==",
|
"integrity": "sha512-4xf6tMKwZcxBynKgXrM4SQKgeASfRvx43LUmR5DkStp26ZHAsarCXUdKJS6y8QIPygEOTOCP8we97JAcCzBuMg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5"
|
"@pushrocks/smartpromise": "^2.0.5"
|
||||||
@ -236,7 +236,7 @@
|
|||||||
},
|
},
|
||||||
"@pushrocks/smartpromise": {
|
"@pushrocks/smartpromise": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-2.0.5.tgz",
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrequest": {
|
"@pushrocks/smartrequest": {
|
||||||
@ -348,7 +348,7 @@
|
|||||||
},
|
},
|
||||||
"@types/chai-as-promised": {
|
"@types/chai-as-promised": {
|
||||||
"version": "7.1.0",
|
"version": "7.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-as-promised/-/chai-as-promised-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz",
|
||||||
"integrity": "sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ==",
|
"integrity": "sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -357,7 +357,7 @@
|
|||||||
},
|
},
|
||||||
"@types/chai-string": {
|
"@types/chai-string": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-string/-/chai-string-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.4.1.tgz",
|
||||||
"integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
|
"integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -413,7 +413,7 @@
|
|||||||
},
|
},
|
||||||
"@types/form-data": {
|
"@types/form-data": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fform-data/-/form-data-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz",
|
||||||
"integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==",
|
"integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
@ -579,13 +579,13 @@
|
|||||||
},
|
},
|
||||||
"assertion-error": {
|
"assertion-error": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/assertion-error/-/assertion-error-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
|
||||||
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
|
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"asynckit": {
|
"asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
@ -753,7 +753,7 @@
|
|||||||
},
|
},
|
||||||
"chai-as-promised": {
|
"chai-as-promised": {
|
||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/chai-as-promised/-/chai-as-promised-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz",
|
||||||
"integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==",
|
"integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -799,7 +799,7 @@
|
|||||||
},
|
},
|
||||||
"check-error": {
|
"check-error": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/check-error/-/check-error-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||||
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -938,7 +938,7 @@
|
|||||||
},
|
},
|
||||||
"crypto-random-string": {
|
"crypto-random-string": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
|
||||||
"integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4="
|
"integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4="
|
||||||
},
|
},
|
||||||
"dasherize": {
|
"dasherize": {
|
||||||
@ -969,7 +969,7 @@
|
|||||||
},
|
},
|
||||||
"deep-eql": {
|
"deep-eql": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/deep-eql/-/deep-eql-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
|
||||||
"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
|
"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -978,7 +978,7 @@
|
|||||||
},
|
},
|
||||||
"delayed-stream": {
|
"delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||||
},
|
},
|
||||||
"depd": {
|
"depd": {
|
||||||
@ -1028,7 +1028,7 @@
|
|||||||
},
|
},
|
||||||
"es6-error": {
|
"es6-error": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/es6-error/-/es6-error-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
|
||||||
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
|
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1265,7 +1265,7 @@
|
|||||||
},
|
},
|
||||||
"get-func-name": {
|
"get-func-name": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/get-func-name/-/get-func-name-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
|
||||||
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
|
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1315,7 +1315,7 @@
|
|||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1422,7 +1422,7 @@
|
|||||||
},
|
},
|
||||||
"is-buffer": {
|
"is-buffer": {
|
||||||
"version": "1.1.6",
|
"version": "1.1.6",
|
||||||
"resolved": "https://verdaccio.lossless.one/is-buffer/-/is-buffer-1.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
@ -1508,7 +1508,7 @@
|
|||||||
},
|
},
|
||||||
"leakage": {
|
"leakage": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/leakage/-/leakage-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/leakage/-/leakage-0.4.0.tgz",
|
||||||
"integrity": "sha512-x7gYK5n5dPkHDZWJ2Kh8Ag1hZNzUh+HtXn8Bv1aDdN6o6ONPCJ8sOfFq+kxcULJFp3lXaCjXb3iXOLmQRbBLwA==",
|
"integrity": "sha512-x7gYK5n5dPkHDZWJ2Kh8Ag1hZNzUh+HtXn8Bv1aDdN6o6ONPCJ8sOfFq+kxcULJFp3lXaCjXb3iXOLmQRbBLwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -1521,7 +1521,7 @@
|
|||||||
},
|
},
|
||||||
"left-pad": {
|
"left-pad": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/left-pad/-/left-pad-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
|
||||||
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
|
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1691,7 +1691,7 @@
|
|||||||
},
|
},
|
||||||
"mimic-fn": {
|
"mimic-fn": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||||
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1785,7 +1785,7 @@
|
|||||||
},
|
},
|
||||||
"normalize-newline": {
|
"normalize-newline": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/normalize-newline/-/normalize-newline-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-newline/-/normalize-newline-3.0.0.tgz",
|
||||||
"integrity": "sha1-HL6oBKukNgAfg5OKsh7AOdaa6dM="
|
"integrity": "sha1-HL6oBKukNgAfg5OKsh7AOdaa6dM="
|
||||||
},
|
},
|
||||||
"npm-run-path": {
|
"npm-run-path": {
|
||||||
@ -1917,7 +1917,7 @@
|
|||||||
},
|
},
|
||||||
"pathval": {
|
"pathval": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
|
||||||
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
|
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -1933,7 +1933,7 @@
|
|||||||
},
|
},
|
||||||
"pretty-bytes": {
|
"pretty-bytes": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||||
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -2188,13 +2188,13 @@
|
|||||||
},
|
},
|
||||||
"signal-exit": {
|
"signal-exit": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/signal-exit/-/signal-exit-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"smartchai": {
|
"smartchai": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/smartchai/-/smartchai-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/smartchai/-/smartchai-2.0.1.tgz",
|
||||||
"integrity": "sha512-9M+R56OhAHXScxgr2vzQqxGx0XMS0QXriNZuP7hjlbVbo2FUT+l60iEzbwPt9Ga+5u2cEEjSSoZEQVqlROaddA==",
|
"integrity": "sha512-9M+R56OhAHXScxgr2vzQqxGx0XMS0QXriNZuP7hjlbVbo2FUT+l60iEzbwPt9Ga+5u2cEEjSSoZEQVqlROaddA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -2301,7 +2301,7 @@
|
|||||||
},
|
},
|
||||||
"strip-indent": {
|
"strip-indent": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/strip-indent/-/strip-indent-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
|
||||||
"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g="
|
"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g="
|
||||||
},
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
@ -2387,7 +2387,7 @@
|
|||||||
},
|
},
|
||||||
"type-detect": {
|
"type-detect": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/type-detect/-/type-detect-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||||
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "@pushrocks/smartacme",
|
"name": "@pushrocks/smartacme",
|
||||||
"version": "2.0.36",
|
"version": "2.0.36",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "acme implementation in TypeScript",
|
"description": "acme with an easy yet powerful interface in TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -22,7 +22,7 @@ tap.test('should create a valid instance of SmartAcme', async () => {
|
|||||||
setChallenge: async (...args) => {
|
setChallenge: async (...args) => {
|
||||||
console.log(args);
|
console.log(args);
|
||||||
},
|
},
|
||||||
environment: "integration"
|
environment: 'integration'
|
||||||
});
|
});
|
||||||
await smartAcmeInstance.init();
|
await smartAcmeInstance.init();
|
||||||
// await smartAcmeInstance.getCertificateForDomain('bleu.de');
|
// await smartAcmeInstance.getCertificateForDomain('bleu.de');
|
||||||
|
@ -4,14 +4,12 @@ import { SmartAcme } from './smartacme.classes.smartacme';
|
|||||||
|
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
|
|
||||||
export class CertManager {
|
export class CertManager {
|
||||||
// =========
|
// =========
|
||||||
// STATIC
|
// STATIC
|
||||||
// =========
|
// =========
|
||||||
public static activeDB: plugins.smartdata.SmartdataDb;
|
public static activeDB: plugins.smartdata.SmartdataDb;
|
||||||
|
|
||||||
|
|
||||||
// =========
|
// =========
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
// =========
|
// =========
|
||||||
@ -20,13 +18,16 @@ export class CertManager {
|
|||||||
|
|
||||||
public pendingMap: plugins.lik.Stringmap;
|
public pendingMap: plugins.lik.Stringmap;
|
||||||
|
|
||||||
constructor(smartAcmeArg: SmartAcme,optionsArg: {
|
constructor(
|
||||||
|
smartAcmeArg: SmartAcme,
|
||||||
|
optionsArg: {
|
||||||
mongoDescriptor: plugins.smartdata.IMongoDescriptor;
|
mongoDescriptor: plugins.smartdata.IMongoDescriptor;
|
||||||
}) {
|
}
|
||||||
|
) {
|
||||||
this.mongoDescriptor = optionsArg.mongoDescriptor;
|
this.mongoDescriptor = optionsArg.mongoDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init () {
|
public async init() {
|
||||||
// Smartdata DB
|
// Smartdata DB
|
||||||
this.smartdataDb = new plugins.smartdata.SmartdataDb(this.mongoDescriptor);
|
this.smartdataDb = new plugins.smartdata.SmartdataDb(this.mongoDescriptor);
|
||||||
await this.smartdataDb.init();
|
await this.smartdataDb.init();
|
||||||
@ -47,12 +48,11 @@ export class CertManager {
|
|||||||
domainName
|
domainName
|
||||||
});
|
});
|
||||||
|
|
||||||
if(existingCertificate) {
|
if (existingCertificate) {
|
||||||
return existingCertificate;
|
return existingCertificate;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,14 +65,12 @@ export class CertManager {
|
|||||||
this.pendingMap.removeString(optionsArg.domainName);
|
this.pendingMap.removeString(optionsArg.domainName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async deleteCertificate(domainNameArg: string) {
|
public async deleteCertificate(domainNameArg: string) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* announce a certificate as being in the process of being retrieved
|
* announce a certificate as being in the process of being retrieved
|
||||||
*/
|
*/
|
||||||
public async announceCertificate (domainNameArg: string) {
|
public async announceCertificate(domainNameArg: string) {
|
||||||
this.pendingMap.addString(domainNameArg);
|
this.pendingMap.addString(domainNameArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,5 +98,5 @@ export class CertManager {
|
|||||||
*/
|
*/
|
||||||
private async checkCerts() {
|
private async checkCerts() {
|
||||||
// TODO
|
// TODO
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ export class SmartAcme {
|
|||||||
res.status(200);
|
res.status(200);
|
||||||
res.send(response);
|
res.send(response);
|
||||||
res.end();
|
res.end();
|
||||||
}
|
};
|
||||||
|
|
||||||
constructor(optionsArg: ISmartAcmeOptions) {
|
constructor(optionsArg: ISmartAcmeOptions) {
|
||||||
this.options = optionsArg;
|
this.options = optionsArg;
|
||||||
|
@ -11,7 +11,19 @@ import * as smartunique from '@pushrocks/smartunique';
|
|||||||
import * as smartstring from '@pushrocks/smartstring';
|
import * as smartstring from '@pushrocks/smartstring';
|
||||||
import * as smarttime from '@pushrocks/smarttime';
|
import * as smarttime from '@pushrocks/smarttime';
|
||||||
|
|
||||||
export { lik, smartdata, smartdelay, smartdns, smartexpress, smartlog, smartpromise, smartrequest, smartunique, smartstring, smarttime };
|
export {
|
||||||
|
lik,
|
||||||
|
smartdata,
|
||||||
|
smartdelay,
|
||||||
|
smartdns,
|
||||||
|
smartexpress,
|
||||||
|
smartlog,
|
||||||
|
smartpromise,
|
||||||
|
smartrequest,
|
||||||
|
smartunique,
|
||||||
|
smartstring,
|
||||||
|
smarttime
|
||||||
|
};
|
||||||
|
|
||||||
// thirs party scope
|
// thirs party scope
|
||||||
import * as acme from 'acme-client';
|
import * as acme from 'acme-client';
|
||||||
|
Loading…
Reference in New Issue
Block a user