fix(core): update

This commit is contained in:
Philipp Kunz 2020-02-10 11:15:47 +00:00
parent ac515f5e80
commit 83afea95e6
11 changed files with 270 additions and 299 deletions

21
.gitignore vendored
View File

@ -1,5 +1,22 @@
node_modules/ .nogit/
# artifacts
coverage/ coverage/
public/ public/
pages/ pages/
.nogit/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_web/
dist_serve/
dist_ts_web/
# custom

View File

@ -1,16 +1,16 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- metadata - metadata
# ==================== # ====================
# security stage # security stage
@ -20,62 +20,27 @@ mirror:
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
snyk: snyk:
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
sast:
stage: security
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- npmci npm prepare
- npmci npm install
- npmci command npm run build
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
artifacts:
reports:
sast: gl-sast-report.json
tags:
- docker
- priv
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
@ -84,6 +49,20 @@ testSTABLE:
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker
- priv
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker - docker
- notpriv - notpriv
@ -95,6 +74,7 @@ release:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
@ -103,20 +83,14 @@ release:
# ==================== # ====================
codequality: codequality:
stage: metadata stage: metadata
image: docker:stable
allow_failure: true allow_failure: true
services:
- docker:stable-dind
script: script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm install -g tslint typescript
- docker run - npmci npm prepare
--env SOURCE_CODE="$PWD" - npmci npm install
--volume "$PWD":/code - npmci command "tslint -c tslint.json ./ts/**/*.ts"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
tags: tags:
- lossless
- docker - docker
- priv - priv
@ -127,18 +101,20 @@ trigger:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata stage: metadata
script: script:
- npmci command npm install -g typedoc typescript - npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ - npmci command tsdoc
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:

29
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm"]
}
}
}
}
}
}
]
}

View File

@ -1,5 +1,6 @@
{ {
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "pushrocks",

274
package-lock.json generated
View File

@ -112,14 +112,15 @@
} }
}, },
"@pushrocks/lik": { "@pushrocks/lik": {
"version": "3.0.13", "version": "3.0.17",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.13.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.17.tgz",
"integrity": "sha512-YDxYoh2UksEfUxcjSjTwLsW5j852E5FrMG62CUi1I7ZpBxf96b7P1t2pRWsQsNnHRz6FHckW/A1V6XKASB+jZA==", "integrity": "sha512-Ip56GDuW/ReBPhRVIhaqosqXu12SBW1DT3GkY8hOTiF1YNdKxiaw13QOPva6KPeTffb9DTThOu352KvjMrfxRw==",
"requires": { "requires": {
"@pushrocks/smartdelay": "^2.0.6", "@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrx": "^2.0.5", "@pushrocks/smartrx": "^2.0.5",
"@pushrocks/smarttime": "^3.0.12", "@pushrocks/smarttime": "^3.0.12",
"@pushrocks/smartunique": "^3.0.1",
"@types/minimatch": "^3.0.3", "@types/minimatch": "^3.0.3",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"symbol-tree": "^3.2.4" "symbol-tree": "^3.2.4"
@ -159,19 +160,19 @@
} }
}, },
"@pushrocks/smartdata": { "@pushrocks/smartdata": {
"version": "3.1.23", "version": "3.1.25",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdata/-/smartdata-3.1.23.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdata/-/smartdata-3.1.25.tgz",
"integrity": "sha512-l/W9bue+PkEYndqfcVoM0o20EfohqwcCbSD7HYcs5kLNgsL8ND4VHsuOKtX/COq3lnb9+uMQGkOk3BzM42jU2Q==", "integrity": "sha512-omgb42HnDaaZKkhbVRx9Zfxumkg7lVyp526eA93eQaoNHZGPkIPo7H9f4+rWHbN3VZehB/PTmPGcY5IUd5rWUA==",
"requires": { "requires": {
"@pushrocks/lik": "^3.0.11", "@pushrocks/lik": "^3.0.17",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartstring": "^3.0.10", "@pushrocks/smartstring": "^3.0.18",
"@pushrocks/smartunique": "^3.0.1", "@pushrocks/smartunique": "^3.0.1",
"@types/lodash": "^4.14.138", "@types/lodash": "^4.14.149",
"@types/mongodb": "^3.3.1", "@types/mongodb": "^3.3.15",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"mongodb": "^3.3.2", "mongodb": "^3.5.2",
"runtime-type-checks": "0.0.4" "runtime-type-checks": "0.0.4"
} }
}, },
@ -226,15 +227,15 @@
} }
}, },
"@pushrocks/smartexpress": { "@pushrocks/smartexpress": {
"version": "3.0.54", "version": "3.0.57",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.54.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.57.tgz",
"integrity": "sha512-W+UvUgSN1fdHIA1/BouACadP/9HQAW9jxC6rb+CiyssMqLMkYejS7bkPBd3+gRDpidRQnAdcjOZ3xpZd1eQnfQ==", "integrity": "sha512-7E2YlGKAWT5iiRIcDZxwrwQj6QjGPXasSMKnEBOGThDtsJa62udN+tS5gMaGNRKYnRFuLEU8CCtT/248y3azVg==",
"requires": { "requires": {
"@pushrocks/lik": "^3.0.11", "@pushrocks/lik": "^3.0.13",
"@pushrocks/smartfile": "^7.0.6", "@pushrocks/smartfile": "^7.0.6",
"@pushrocks/smartmanifest": "^1.0.6", "@pushrocks/smartmanifest": "^1.0.8",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrequest": "^1.1.43", "@pushrocks/smartrequest": "^1.1.47",
"@types/express": "^4.17.2", "@types/express": "^4.17.2",
"@types/finalhandler": "^1.1.0", "@types/finalhandler": "^1.1.0",
"@types/helmet": "0.0.45", "@types/helmet": "0.0.45",
@ -246,75 +247,12 @@
"helmet": "^3.21.2", "helmet": "^3.21.2",
"rendertron-middleware": "^0.1.5", "rendertron-middleware": "^0.1.5",
"sitemap": "^5.1.0" "sitemap": "^5.1.0"
},
"dependencies": {
"@pushrocks/smartfile": {
"version": "7.0.6",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.6.tgz",
"integrity": "sha512-X1kWg1HSQ/MqasRIHPCf6D9CRrcIrpTjW8KLc4GkApJ/W/IVaKsQkJQfdimlg1uc/9v8AYnoRdiGa51yxyghZA==",
"requires": {
"@pushrocks/smarthash": "^2.0.6",
"@pushrocks/smartpath": "^4.0.1",
"@pushrocks/smartpromise": "^3.0.5",
"@pushrocks/smartrequest": "^1.1.27",
"@types/fs-extra": "^8.0.0",
"fs-extra": "^8.1.0",
"glob": "^7.1.4",
"js-yaml": "^3.13.1"
}
},
"@types/fs-extra": {
"version": "8.0.1",
"resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-8.0.1.tgz",
"integrity": "sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw==",
"requires": {
"@types/node": "*"
}
},
"fs-extra": {
"version": "8.1.0",
"resolved": "https://verdaccio.lossless.one/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://verdaccio.lossless.one/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://verdaccio.lossless.one/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
},
"js-yaml": {
"version": "3.13.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
}
} }
}, },
"@pushrocks/smartfile": { "@pushrocks/smartfile": {
"version": "7.0.6", "version": "7.0.6",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.6.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.6.tgz",
"integrity": "sha512-X1kWg1HSQ/MqasRIHPCf6D9CRrcIrpTjW8KLc4GkApJ/W/IVaKsQkJQfdimlg1uc/9v8AYnoRdiGa51yxyghZA==", "integrity": "sha512-X1kWg1HSQ/MqasRIHPCf6D9CRrcIrpTjW8KLc4GkApJ/W/IVaKsQkJQfdimlg1uc/9v8AYnoRdiGa51yxyghZA==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smarthash": "^2.0.6", "@pushrocks/smarthash": "^2.0.6",
"@pushrocks/smartpath": "^4.0.1", "@pushrocks/smartpath": "^4.0.1",
@ -381,9 +319,9 @@
} }
}, },
"@pushrocks/smartmanifest": { "@pushrocks/smartmanifest": {
"version": "1.0.6", "version": "1.0.8",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmanifest/-/smartmanifest-1.0.6.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmanifest/-/smartmanifest-1.0.8.tgz",
"integrity": "sha512-2EalWj9P0jPvbQxAy9YH10AC+xCBfI25MRuWsIrNhhpAxfhZL7l0wrXiKENLXaS5Rh8BsC1cB6sufYfKvoE5gg==" "integrity": "sha512-inHmTp58Z8xl+c6mdOrfxc9IjUKuqho1i+WUI74G7rn6HwEn3cMd/06R1v80Xlx+95EYWzBwnYtuo7j7DafrdQ=="
}, },
"@pushrocks/smartparam": { "@pushrocks/smartparam": {
"version": "1.0.4", "version": "1.0.4",
@ -434,16 +372,6 @@
"@pushrocks/smartevent": "^2.0.3", "@pushrocks/smartevent": "^2.0.3",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"rxjs": "^6.5.3" "rxjs": "^6.5.3"
},
"dependencies": {
"rxjs": {
"version": "6.5.4",
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.4.tgz",
"integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
"requires": {
"tslib": "^1.9.0"
}
}
} }
}, },
"@pushrocks/smartshell": { "@pushrocks/smartshell": {
@ -460,11 +388,11 @@
} }
}, },
"@pushrocks/smartstring": { "@pushrocks/smartstring": {
"version": "3.0.17", "version": "3.0.18",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.17.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.18.tgz",
"integrity": "sha512-60JQptpgw+PjxoC5Gx+Y9m3/dtMstHC5ElpdJhIlbJ7dQV7LkCGSonLAG+NZhPbvrhow2KZ3fob8stW0Iuy3JQ==", "integrity": "sha512-34Ca5HW6w8fcG2sdbRVDViOZ0vdOHXc/1Qof2KhM5bvWFajU6VASlJjCYNJBrjGg9VCeC2rH6bGIgvd7prSRkg==",
"requires": { "requires": {
"crypto-random-string": "^3.0.1", "crypto-random-string": "^3.1.0",
"js-base64": "^2.5.1", "js-base64": "^2.5.1",
"normalize-newline": "^3.0.0", "normalize-newline": "^3.0.0",
"randomatic": "^3.1.1", "randomatic": "^3.1.1",
@ -700,9 +628,9 @@
} }
}, },
"@types/express-serve-static-core": { "@types/express-serve-static-core": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.17.1.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.17.2.tgz",
"integrity": "sha512-9e7jj549ZI+RxY21Cl0t8uBnWyb22HzILupyHZjYEVK//5TT/1bZodU+yUbLnPdoYViBBnNWbxp4zYjGV0zUGw==", "integrity": "sha512-El9yMpctM6tORDAiBwZVLMcxoTMcqqRO9dVyYcn7ycLWbvR8klrDn8CAOwRfZujZtWD7yS/mshTdz43jMOejbg==",
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"@types/range-parser": "*" "@types/range-parser": "*"
@ -742,7 +670,6 @@
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-8.0.1.tgz", "resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-8.0.1.tgz",
"integrity": "sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw==", "integrity": "sha512-J00cVDALmi/hJOYsunyT52Hva5TnJeKP5yd1r+mH/ZU0mbYZflR0Z5kw5kITtKTRYMhm1JMClOFYdHnQszEvqw==",
"dev": true,
"requires": { "requires": {
"@types/node": "*" "@types/node": "*"
} }
@ -776,18 +703,18 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
}, },
"@types/mongodb": { "@types/mongodb": {
"version": "3.3.14", "version": "3.3.15",
"resolved": "https://verdaccio.lossless.one/@types%2fmongodb/-/mongodb-3.3.14.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fmongodb/-/mongodb-3.3.15.tgz",
"integrity": "sha512-Ie0Fjoifm/TPY2rNOgixzhNSjDgxgR0dMKQk9XqUXHnkfuw26SpbMXjwECfxSnEdG1bH6bIlpLIK7HvGHQhzqg==", "integrity": "sha512-q2dL0VEdFdE9iS0xrTP0NSgJJBFH4hBvt3beglCwU3qMWrz7dCuu/CrRjPB4+R8jLjCi/Gik2Mkd+lU0sYsZgQ==",
"requires": { "requires": {
"@types/bson": "*", "@types/bson": "*",
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/node": { "@types/node": {
"version": "13.1.8", "version": "13.7.0",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.1.8.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.0.tgz",
"integrity": "sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==" "integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ=="
}, },
"@types/range-parser": { "@types/range-parser": {
"version": "1.2.3", "version": "1.2.3",
@ -795,9 +722,9 @@
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==" "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
}, },
"@types/sax": { "@types/sax": {
"version": "1.2.0", "version": "1.2.1",
"resolved": "https://verdaccio.lossless.one/@types%2fsax/-/sax-1.2.0.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fsax/-/sax-1.2.1.tgz",
"integrity": "sha512-D8ef/GGUjiHuUOiXV6tkJw6Zq2Sm8vcBScJSvj+monDI5YncJ6M3oNIXR7EtmWPVqJw0jsZF2ARN/X5gvGmQSA==", "integrity": "sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA==",
"requires": { "requires": {
"@types/node": "*" "@types/node": "*"
} }
@ -869,24 +796,23 @@
} }
}, },
"acme-client": { "acme-client": {
"version": "2.2.2", "version": "3.3.1",
"resolved": "https://verdaccio.lossless.one/acme-client/-/acme-client-2.2.2.tgz", "resolved": "https://verdaccio.lossless.one/acme-client/-/acme-client-3.3.1.tgz",
"integrity": "sha512-dEIbynspvfRKHD7/I3B/zu2PDE3Zk/kJu95koZeMxycRAkmIxPiuc6z11im/i6P/jxzf3QxyXFqCg3PnP6gZnw==", "integrity": "sha512-pDf10DuaMHn1NUefzlMntFy4nwNuk1iB2MVSnddGMmLRJ0m/vIX0ULpvNHCgQHzfIzh1BU29Klf8Bkc+KXToEQ==",
"requires": { "requires": {
"axios": "^0.18.0", "axios": "^0.19.0",
"babel-runtime": "^6.26.0",
"backo2": "^1.0.0", "backo2": "^1.0.0",
"bluebird": "^3.5.0", "bluebird": "^3.5.0",
"debug": "^3.0.0", "debug": "^4.1.1",
"node-forge": "^0.7.6", "node-forge": "^0.9.1",
"openssl-wrapper": "^0.3.0", "openssl-wrapper": "^0.3.0",
"tempfile": "^2.0.0" "tempfile": "^3.0.0"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "3.2.6", "version": "4.1.1",
"resolved": "https://verdaccio.lossless.one/debug/-/debug-3.2.6.tgz", "resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@ -1008,21 +934,11 @@
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
}, },
"axios": { "axios": {
"version": "0.18.1", "version": "0.19.2",
"resolved": "https://verdaccio.lossless.one/axios/-/axios-0.18.1.tgz", "resolved": "https://verdaccio.lossless.one/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"requires": { "requires": {
"follow-redirects": "1.5.10", "follow-redirects": "1.5.10"
"is-buffer": "^2.0.2"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://verdaccio.lossless.one/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
} }
}, },
"backo2": { "backo2": {
@ -1075,9 +991,9 @@
} }
}, },
"bowser": { "bowser": {
"version": "2.8.1", "version": "2.9.0",
"resolved": "https://verdaccio.lossless.one/bowser/-/bowser-2.8.1.tgz", "resolved": "https://verdaccio.lossless.one/bowser/-/bowser-2.9.0.tgz",
"integrity": "sha512-FxxltGKqMHkVa3KtpA+kdnxH0caHPDewccyrK3vW1bsMw6Zco4vRPmMunowX0pXlDZqhxkKSpToADQI2Sk4OeQ==" "integrity": "sha512-2ld76tuLBNFekRgmJfT2+3j5MIrP6bFict8WAIT3beq+srz1gcKNAdNKMqHqauQt63NmAa88HfP1/Ypa9Er3HA=="
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
@ -1272,11 +1188,6 @@
"resolved": "https://verdaccio.lossless.one/cookie-signature/-/cookie-signature-1.0.6.tgz", "resolved": "https://verdaccio.lossless.one/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
}, },
"core-js": {
"version": "2.6.10",
"resolved": "https://verdaccio.lossless.one/core-js/-/core-js-2.6.10.tgz",
"integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA=="
},
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@ -1630,7 +1541,6 @@
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://verdaccio.lossless.one/fs-extra/-/fs-extra-8.1.0.tgz", "resolved": "https://verdaccio.lossless.one/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"dev": true,
"requires": { "requires": {
"graceful-fs": "^4.2.0", "graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0", "jsonfile": "^4.0.0",
@ -1640,8 +1550,7 @@
"graceful-fs": { "graceful-fs": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://verdaccio.lossless.one/graceful-fs/-/graceful-fs-4.2.3.tgz", "resolved": "https://verdaccio.lossless.one/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
"dev": true
} }
} }
}, },
@ -1683,7 +1592,6 @@
"version": "7.1.6", "version": "7.1.6",
"resolved": "https://verdaccio.lossless.one/glob/-/glob-7.1.6.tgz", "resolved": "https://verdaccio.lossless.one/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": { "requires": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
"inflight": "^1.0.4", "inflight": "^1.0.4",
@ -1857,11 +1765,6 @@
"resolved": "https://verdaccio.lossless.one/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "resolved": "https://verdaccio.lossless.one/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
}, },
"is-buffer": {
"version": "2.0.4",
"resolved": "https://verdaccio.lossless.one/is-buffer/-/is-buffer-2.0.4.tgz",
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "resolved": "https://verdaccio.lossless.one/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
@ -1921,7 +1824,6 @@
"version": "3.13.1", "version": "3.13.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.13.1.tgz", "resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
"esprima": "^4.0.0" "esprima": "^4.0.0"
@ -2206,9 +2108,9 @@
} }
}, },
"mongodb": { "mongodb": {
"version": "3.5.1", "version": "3.5.2",
"resolved": "https://verdaccio.lossless.one/mongodb/-/mongodb-3.5.1.tgz", "resolved": "https://verdaccio.lossless.one/mongodb/-/mongodb-3.5.2.tgz",
"integrity": "sha512-kpxt4/OfGZ3x9Py+c81yWARLFE3L5UDczF6319Xq0c+pp+8rrzqRiJKjhRAY261JorlRqtrpp7ROK2wCAMA4sw==", "integrity": "sha512-Lxt4th2tK2MxmkDBR5cMik+xEnkvhwg0BC5kGcHm9RBwaNEsrIryvV5istGXOHbnif5KslMpY1FbX6YbGJ/Trg==",
"requires": { "requires": {
"bl": "^2.2.0", "bl": "^2.2.0",
"bson": "^1.1.1", "bson": "^1.1.1",
@ -2245,9 +2147,9 @@
"integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q=="
}, },
"node-forge": { "node-forge": {
"version": "0.7.6", "version": "0.9.1",
"resolved": "https://verdaccio.lossless.one/node-forge/-/node-forge-0.7.6.tgz", "resolved": "https://verdaccio.lossless.one/node-forge/-/node-forge-0.9.1.tgz",
"integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" "integrity": "sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ=="
}, },
"normalize-newline": { "normalize-newline": {
"version": "3.0.0", "version": "3.0.0",
@ -2534,11 +2436,6 @@
"resolved": "https://verdaccio.lossless.one/reflect-metadata/-/reflect-metadata-0.1.13.tgz", "resolved": "https://verdaccio.lossless.one/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
}, },
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://verdaccio.lossless.one/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"rendertron-middleware": { "rendertron-middleware": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "https://verdaccio.lossless.one/rendertron-middleware/-/rendertron-middleware-0.1.5.tgz", "resolved": "https://verdaccio.lossless.one/rendertron-middleware/-/rendertron-middleware-0.1.5.tgz",
@ -2614,9 +2511,9 @@
} }
}, },
"resolve": { "resolve": {
"version": "1.14.2", "version": "1.15.1",
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.14.2.tgz", "resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.15.1.tgz",
"integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
"dev": true, "dev": true,
"requires": { "requires": {
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
@ -2649,7 +2546,6 @@
"version": "6.5.4", "version": "6.5.4",
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.4.tgz", "resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.4.tgz",
"integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
"dev": true,
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
@ -2774,9 +2670,9 @@
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "12.12.25", "version": "12.12.26",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.25.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.26.tgz",
"integrity": "sha512-nf1LMGZvgFX186geVZR1xMZKKblJiRfiASTHw85zED2kI1yDKHDwTKMdkaCbTlXoRKlGKaDfYywt+V0As30q3w==" "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA=="
} }
} }
}, },
@ -2901,17 +2797,17 @@
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
}, },
"temp-dir": { "temp-dir": {
"version": "1.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/temp-dir/-/temp-dir-1.0.0.tgz", "resolved": "https://verdaccio.lossless.one/temp-dir/-/temp-dir-2.0.0.tgz",
"integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=" "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg=="
}, },
"tempfile": { "tempfile": {
"version": "2.0.0", "version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/tempfile/-/tempfile-2.0.0.tgz", "resolved": "https://verdaccio.lossless.one/tempfile/-/tempfile-3.0.0.tgz",
"integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", "integrity": "sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==",
"requires": { "requires": {
"temp-dir": "^1.0.0", "temp-dir": "^2.0.0",
"uuid": "^3.0.1" "uuid": "^3.3.2"
} }
}, },
"through2": { "through2": {
@ -2962,9 +2858,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
}, },
"tslint": { "tslint": {
"version": "5.20.1", "version": "6.0.0",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.1.tgz", "resolved": "https://verdaccio.lossless.one/tslint/-/tslint-6.0.0.tgz",
"integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", "integrity": "sha512-9nLya8GBtlFmmFMW7oXXwoXS1NkrccqTqAtwXzdPV9e2mqSEvCki6iHL/Fbzi5oqbugshzgGPk7KBb2qNP1DSA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
@ -2978,8 +2874,16 @@
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"resolve": "^1.3.2", "resolve": "^1.3.2",
"semver": "^5.3.0", "semver": "^5.3.0",
"tslib": "^1.8.0", "tslib": "^1.10.0",
"tsutils": "^2.29.0" "tsutils": "^2.29.0"
},
"dependencies": {
"tslib": {
"version": "1.10.0",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.10.0.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
"dev": true
}
} }
}, },
"tslint-config-prettier": { "tslint-config-prettier": {

View File

@ -25,18 +25,18 @@
}, },
"homepage": "https://gitlab.com/umbrellazone/smartacme#README", "homepage": "https://gitlab.com/umbrellazone/smartacme#README",
"dependencies": { "dependencies": {
"@pushrocks/lik": "^3.0.13", "@pushrocks/lik": "^3.0.17",
"@pushrocks/smartdata": "^3.1.23", "@pushrocks/smartdata": "^3.1.25",
"@pushrocks/smartdelay": "^2.0.6", "@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartdns": "^3.0.8", "@pushrocks/smartdns": "^3.0.8",
"@pushrocks/smartexpress": "^3.0.54", "@pushrocks/smartexpress": "^3.0.57",
"@pushrocks/smartlog": "^2.0.21", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrequest": "^1.1.47", "@pushrocks/smartrequest": "^1.1.47",
"@pushrocks/smartstring": "^3.0.17", "@pushrocks/smartstring": "^3.0.18",
"@pushrocks/smarttime": "^3.0.12", "@pushrocks/smarttime": "^3.0.12",
"@pushrocks/smartunique": "^3.0.1", "@pushrocks/smartunique": "^3.0.1",
"acme-client": "2.2.2" "acme-client": "^3.3.1"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.17", "@gitzone/tsbuild": "^2.1.17",
@ -45,8 +45,19 @@
"@mojoio/cloudflare": "^3.0.5", "@mojoio/cloudflare": "^3.0.5",
"@pushrocks/qenv": "^4.0.6", "@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.2.0", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^13.1.8", "@types/node": "^13.7.0",
"tslint": "^5.20.1", "tslint": "^6.0.0",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
} },
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_web/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
]
} }

View File

@ -25,7 +25,10 @@ tap.test('should create a valid instance of SmartAcme', async () => {
environment: 'integration' environment: 'integration'
}); });
await smartAcmeInstance.init(); await smartAcmeInstance.init();
// await smartAcmeInstance.getCertificateForDomain('bleu.de'); });
tap.test('should get a domain certificate', async () => {
await smartAcmeInstance.getCertificateForDomain('bleu.de');
}); });
tap.test('certmatcher should correctly match domains', async () => { tap.test('certmatcher should correctly match domains', async () => {

View File

@ -28,20 +28,22 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert> implements inte
@svDb() @svDb()
public csr: string; public csr: string;
/** /**
* computed value for when the certificate is still valid * computed value for when the certificate is still valid
*/ */
get validUntil (): number { get validUntil(): number {
return this.created + plugins.smarttime.getMilliSecondsFromUnits({ return (
this.created +
plugins.smarttime.getMilliSecondsFromUnits({
days: 90 days: 90
}); })
);
} }
get isStillValid(): boolean {
get isStillValid (): boolean { const shouldBeValitAtLeastUntil =
const shouldBeValitAtLeastUntil = Date.now() + plugins.smarttime.getMilliSecondsFromUnits({ Date.now() +
plugins.smarttime.getMilliSecondsFromUnits({
days: 10 days: 10
}); });
return this.validUntil >= shouldBeValitAtLeastUntil; return this.validUntil >= shouldBeValitAtLeastUntil;

View File

@ -26,15 +26,14 @@ 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 responseBody: interfaces.ICertRemoteResponse = (await plugins.smartrequest.postJson( const responseBody: interfaces.ICertRemoteResponse = (
this.remoteUrl, await plugins.smartrequest.postJson(this.remoteUrl, {
{
requestBody: <interfaces.ICertRemoteRequest>{ requestBody: <interfaces.ICertRemoteRequest>{
domainName: domainNameArg, domainName: domainNameArg,
secret: this.secret secret: this.secret
} }
} })
)).body; ).body;
switch (responseBody.status as interfaces.TCertStatus) { switch (responseBody.status as interfaces.TCertStatus) {
case 'pending': case 'pending':
this.logger.log('info', `request for ${domainNameArg} still pending!`); this.logger.log('info', `request for ${domainNameArg} still pending!`);

View File

@ -68,9 +68,9 @@ export class SmartAcme {
this.logger.log('ok', `certificate exists for ${certDomain}. Sending certificate!`); this.logger.log('ok', `certificate exists for ${certDomain}. Sending certificate!`);
response = { response = {
status, status,
certificate: await (await this.certmanager.retrieveCertificate( certificate: await (
certDomain await this.certmanager.retrieveCertificate(certDomain)
)).createSavableObject() ).createSavableObject()
}; };
break; break;
default: default:
@ -103,7 +103,7 @@ export class SmartAcme {
*/ */
public async init() { public async init() {
this.privateKey = this.privateKey =
this.options.accountPrivateKey || (await plugins.acme.forge.createPrivateKey()); this.options.accountPrivateKey || (await plugins.acme.forge.createPrivateKey()).toString();
this.setChallenge = this.options.setChallenge; this.setChallenge = this.options.setChallenge;
this.removeChallenge = this.options.removeChallenge; this.removeChallenge = this.options.removeChallenge;
@ -165,7 +165,10 @@ export class SmartAcme {
/* Place new order */ /* Place new order */
const order = await this.client.createOrder({ const order = await this.client.createOrder({
identifiers: [{ type: 'dns', value: certDomain }, { type: 'dns', value: `*.${certDomain}` }] identifiers: [
{ type: 'dns', value: certDomain },
{ type: 'dns', value: `*.${certDomain}` }
]
}); });
/* Get authorizations and select challenges */ /* Get authorizations and select challenges */