Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
9c25ecdc02 | |||
81a15da2d0 | |||
86929251ba | |||
1d8fb2b296 | |||
9d5f0d7a5d | |||
82b1d68576 | |||
e04b23aceb | |||
8e255938b5 | |||
f2eb9666a7 | |||
cbdb0c8b08 | |||
f821f4d9cc | |||
6cfcf21d95 | |||
a33090bb5e |
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)
|
||||||
[](https://www.npmjs.com/package/smartacme)
|
* [docs (typedoc)](https://pushrocks.gitlab.io/smartuniverse/)
|
||||||
[](https://GitLab.com/umbrellazone/smartacme)
|
|
||||||
[](https://github.com/umbrellazone/smartacme)
|
|
||||||
[](https://umbrellazone.gitlab.io/smartacme/)
|
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
[](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||||
[](https://GitLab.com/umbrellazone/smartacme/commits/master)
|
[](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||||
[](https://GitLab.com/umbrellazone/smartacme/commits/master)
|
[](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||||
[](https://www.npmjs.com/package/smartacme)
|
[](https://snyk.io/test/npm/@pushrocks/smartuniverse)
|
||||||
[](https://david-dm.org/umbrellazone/smartacme)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/umbrellazone/smartacme/master/dependencies/npm)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/umbrellazone/smartacme)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](http://standardjs.com/)
|
[](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)
|
||||||
|
|
||||||
[](https://umbrella.zone
|
[](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"
|
||||||
|
64
package-lock.json
generated
64
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartacme",
|
"name": "@pushrocks/smartacme",
|
||||||
"version": "2.0.31",
|
"version": "2.1.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"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"
|
||||||
@ -206,11 +206,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog": {
|
"@pushrocks/smartlog": {
|
||||||
"version": "2.0.10",
|
"version": "2.0.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.10.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.11.tgz",
|
||||||
"integrity": "sha512-4Ir4/JvfL+d5VsN+O8BpFSgUc1mWgr9s6S/cwYBCAIrWdqGomUM5RsZs57RMDn9MWW0JGJjGhUA0M+A8LSSgHw==",
|
"integrity": "sha512-V8SMzAAqDpl1+CJ9b3w5e/1ARjk4JOPZ35qZIllVBhHr8meCqnPE2immlfBYWmEp1xy3ntdAA+Lgewtu+iVk6A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartlog-interfaces": "^2.0.2"
|
"@pushrocks/smartlog-interfaces": "^2.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog-interfaces": {
|
"@pushrocks/smartlog-interfaces": {
|
||||||
@ -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
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartacme",
|
"name": "@pushrocks/smartacme",
|
||||||
"version": "2.0.31",
|
"version": "2.1.0",
|
||||||
"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": {
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"@pushrocks/smartdelay": "^2.0.2",
|
"@pushrocks/smartdelay": "^2.0.2",
|
||||||
"@pushrocks/smartdns": "^3.0.8",
|
"@pushrocks/smartdns": "^3.0.8",
|
||||||
"@pushrocks/smartexpress": "^3.0.6",
|
"@pushrocks/smartexpress": "^3.0.6",
|
||||||
"@pushrocks/smartlog": "^2.0.10",
|
"@pushrocks/smartlog": "^2.0.11",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.14",
|
||||||
"@pushrocks/smartstring": "^3.0.8",
|
"@pushrocks/smartstring": "^3.0.8",
|
||||||
|
@ -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');
|
||||||
|
@ -5,7 +5,6 @@ import * as interfaces from './interfaces';
|
|||||||
import { CertManager } from './smartacme.classes.certmanager';
|
import { CertManager } from './smartacme.classes.certmanager';
|
||||||
|
|
||||||
import { Collection, svDb, unI } from '@pushrocks/smartdata';
|
import { Collection, svDb, unI } from '@pushrocks/smartdata';
|
||||||
import { ICert } from './interfaces';
|
|
||||||
|
|
||||||
@plugins.smartdata.Collection(() => {
|
@plugins.smartdata.Collection(() => {
|
||||||
return CertManager.activeDB;
|
return CertManager.activeDB;
|
||||||
@ -29,7 +28,26 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert> implements inte
|
|||||||
@svDb()
|
@svDb()
|
||||||
public csr: string;
|
public csr: string;
|
||||||
|
|
||||||
constructor(optionsArg: ICert) {
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* computed value for when the certificate is still valid
|
||||||
|
*/
|
||||||
|
get validUntil (): number {
|
||||||
|
return this.created + plugins.smarttime.getMilliSecondsFromUnits({
|
||||||
|
days: 90
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
get isStillValid (): boolean {
|
||||||
|
const shouldBeValitAtLeastUntil = Date.now() + plugins.smarttime.getMilliSecondsFromUnits({
|
||||||
|
days: 10
|
||||||
|
});
|
||||||
|
return this.validUntil >= shouldBeValitAtLeastUntil;
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(optionsArg: interfaces.ICert) {
|
||||||
super();
|
super();
|
||||||
if (optionsArg) {
|
if (optionsArg) {
|
||||||
Object.keys(optionsArg).forEach(key => {
|
Object.keys(optionsArg).forEach(key => {
|
||||||
|
@ -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,9 +18,12 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +53,6 @@ export class CertManager {
|
|||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,11 +62,10 @@ export class CertManager {
|
|||||||
public async storeCertificate(optionsArg: interfaces.ICert) {
|
public async storeCertificate(optionsArg: interfaces.ICert) {
|
||||||
const cert = new Cert(optionsArg);
|
const cert = new Cert(optionsArg);
|
||||||
await cert.save();
|
await cert.save();
|
||||||
|
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
|
||||||
@ -97,5 +96,7 @@ export class CertManager {
|
|||||||
/**
|
/**
|
||||||
* checks all certs for expiration
|
* checks all certs for expiration
|
||||||
*/
|
*/
|
||||||
private async checkCerts() {};
|
private async checkCerts() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
import * as plugins from './smartacme.plugins';
|
import * as plugins from './smartacme.plugins';
|
||||||
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* certmatcher is responsible for matching certificates
|
||||||
|
*/
|
||||||
export class CertMatcher {
|
export class CertMatcher {
|
||||||
|
/**
|
||||||
|
* creates a domainName for the certificate that will include the broadest scope
|
||||||
|
* for wild card certificates
|
||||||
|
* @param domainNameArg the domainNameArg to create the scope from
|
||||||
|
*/
|
||||||
public getCertificateDomainNameByDomainName(domainNameArg: string): string {
|
public getCertificateDomainNameByDomainName(domainNameArg: string): string {
|
||||||
const originalDomain = new plugins.smartstring.Domain(domainNameArg);
|
const originalDomain = new plugins.smartstring.Domain(domainNameArg);
|
||||||
if (!originalDomain.level4) {
|
if (!originalDomain.level4) {
|
||||||
|
@ -26,7 +26,7 @@ export class CertRemoteClient {
|
|||||||
public async getCertificateForDomain(domainNameArg: string): Promise<interfaces.ICert> {
|
public async getCertificateForDomain(domainNameArg: string): Promise<interfaces.ICert> {
|
||||||
let certificate: interfaces.ICert;
|
let certificate: interfaces.ICert;
|
||||||
const doRequestCycle = async (): Promise<interfaces.ICert> => {
|
const doRequestCycle = async (): Promise<interfaces.ICert> => {
|
||||||
const response: interfaces.ICertRemoteResponse = (await plugins.smartrequest.postJson(
|
const responseBody: interfaces.ICertRemoteResponse = (await plugins.smartrequest.postJson(
|
||||||
this.remoteUrl,
|
this.remoteUrl,
|
||||||
{
|
{
|
||||||
requestBody: <interfaces.ICertRemoteRequest>{
|
requestBody: <interfaces.ICertRemoteRequest>{
|
||||||
@ -35,13 +35,15 @@ export class CertRemoteClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)).body;
|
)).body;
|
||||||
switch (response.status as interfaces.TCertStatus) {
|
switch (responseBody.status as interfaces.TCertStatus) {
|
||||||
case 'pending':
|
case 'pending':
|
||||||
|
this.logger.log('info', `request for ${domainNameArg} still pending!`);
|
||||||
await plugins.smartdelay.delayFor(5000);
|
await plugins.smartdelay.delayFor(5000);
|
||||||
const finalResponse = await doRequestCycle();
|
const finalResponse = await doRequestCycle();
|
||||||
return finalResponse;
|
return finalResponse;
|
||||||
case 'existing':
|
case 'existing':
|
||||||
return response.certificate;
|
this.logger.log('ok', `got certificate for ${domainNameArg}`);
|
||||||
|
return responseBody.certificate;
|
||||||
case 'failed':
|
case 'failed':
|
||||||
default:
|
default:
|
||||||
console.log(`could not retrieve certificate for ${domainNameArg}`);
|
console.log(`could not retrieve certificate for ${domainNameArg}`);
|
||||||
|
@ -16,6 +16,7 @@ export interface ISmartAcmeOptions {
|
|||||||
setChallenge: (domainName: string, keyAuthorization: string) => Promise<any>;
|
setChallenge: (domainName: string, keyAuthorization: string) => Promise<any>;
|
||||||
removeChallenge: (domainName: string) => Promise<any>;
|
removeChallenge: (domainName: string) => Promise<any>;
|
||||||
environment: 'production' | 'integration';
|
environment: 'production' | 'integration';
|
||||||
|
logger?: plugins.smartlog.Smartlog;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,6 +35,7 @@ export class SmartAcme {
|
|||||||
// the acme client
|
// the acme client
|
||||||
private client: any;
|
private client: any;
|
||||||
private smartdns = new plugins.smartdns.Smartdns();
|
private smartdns = new plugins.smartdns.Smartdns();
|
||||||
|
public logger: plugins.smartlog.Smartlog;
|
||||||
|
|
||||||
// the account private key
|
// the account private key
|
||||||
private privateKey: string;
|
private privateKey: string;
|
||||||
@ -49,15 +51,21 @@ export class SmartAcme {
|
|||||||
/**
|
/**
|
||||||
* the remote handler to hand the request and response to.
|
* the remote handler to hand the request and response to.
|
||||||
*/
|
*/
|
||||||
public certremoteHandler = async (req: plugins.smartexpress.Request, res: plugins.smartexpress.Response) => {
|
public certremoteHandler = async (
|
||||||
|
req: plugins.smartexpress.Request,
|
||||||
|
res: plugins.smartexpress.Response
|
||||||
|
) => {
|
||||||
const requestBody: interfaces.ICertRemoteRequest = req.body;
|
const requestBody: interfaces.ICertRemoteRequest = req.body;
|
||||||
const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(requestBody.domainName);
|
this.logger.log('ok', `got certificate request for ${requestBody.domainName}`);
|
||||||
let status: interfaces.TCertStatus = await this.certmanager.getCertificateStatus(
|
const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(
|
||||||
certDomain
|
requestBody.domainName
|
||||||
);
|
);
|
||||||
|
this.logger.log('ok', `mapping ${requestBody.domainName} to ${certDomain}`);
|
||||||
|
let status: interfaces.TCertStatus = await this.certmanager.getCertificateStatus(certDomain);
|
||||||
let response: interfaces.ICertRemoteResponse;
|
let response: interfaces.ICertRemoteResponse;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'existing':
|
case 'existing':
|
||||||
|
this.logger.log('ok', `certificate exists for ${certDomain}. Sending certificate!`);
|
||||||
response = {
|
response = {
|
||||||
status,
|
status,
|
||||||
certificate: await (await this.certmanager.retrieveCertificate(
|
certificate: await (await this.certmanager.retrieveCertificate(
|
||||||
@ -66,7 +74,7 @@ export class SmartAcme {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (status === "nonexisting") {
|
if (status === 'nonexisting') {
|
||||||
this.getCertificateForDomain(certDomain);
|
this.getCertificateForDomain(certDomain);
|
||||||
status = 'pending';
|
status = 'pending';
|
||||||
}
|
}
|
||||||
@ -78,10 +86,13 @@ 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;
|
||||||
|
this.options.logger
|
||||||
|
? (this.logger = optionsArg.logger)
|
||||||
|
: (this.logger = plugins.smartlog.defaultLogger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,13 +139,28 @@ export class SmartAcme {
|
|||||||
await this.certmanager.smartdataDb.close();
|
await this.certmanager.smartdataDb.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets a certificate
|
||||||
|
* it runs through the following steps
|
||||||
|
*
|
||||||
|
* * look in the database
|
||||||
|
* * if in the database return it
|
||||||
|
* * of not in the database announce it
|
||||||
|
* * then get it from letsencrypt
|
||||||
|
* * store it
|
||||||
|
* * remove it from the pending map (which it go onto by announcing it)
|
||||||
|
* * retrieve it from the databse and return it
|
||||||
|
*
|
||||||
|
* @param domainArg
|
||||||
|
*/
|
||||||
public async getCertificateForDomain(domainArg: string): Promise<Cert> {
|
public async getCertificateForDomain(domainArg: string): Promise<Cert> {
|
||||||
const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
|
const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
|
||||||
await this.certmanager.announceCertificate(certDomain);
|
|
||||||
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomain);
|
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomain);
|
||||||
|
|
||||||
if (retrievedCertificate) {
|
if (retrievedCertificate) {
|
||||||
return retrievedCertificate;
|
return retrievedCertificate;
|
||||||
|
} else {
|
||||||
|
await this.certmanager.announceCertificate(certDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Place new order */
|
/* Place new order */
|
||||||
@ -189,9 +215,6 @@ export class SmartAcme {
|
|||||||
const cert = await this.client.getCertificate(order);
|
const cert = await this.client.getCertificate(order);
|
||||||
|
|
||||||
/* Done */
|
/* Done */
|
||||||
console.log(`CSR:\n${csr.toString()}`);
|
|
||||||
console.log(`Private key:\n${key.toString()}`);
|
|
||||||
console.log(`Certificate:\n${cert.toString()}`);
|
|
||||||
|
|
||||||
await this.certmanager.storeCertificate({
|
await this.certmanager.storeCertificate({
|
||||||
id: plugins.smartunique.shortId(),
|
id: plugins.smartunique.shortId(),
|
||||||
|
@ -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';
|
||||||
|
Reference in New Issue
Block a user