fix(core): update

This commit is contained in:
Philipp Kunz 2024-02-09 15:57:32 +01:00
parent 1c0b428606
commit 4f7e382bc9
5 changed files with 87 additions and 56 deletions

View File

@ -21,6 +21,7 @@
},
"homepage": "https://gitlab.com/pushrocks/npmextra#README",
"dependencies": {
"@push.rocks/qenv": "^6.0.5",
"@push.rocks/smartfile": "^11.0.4",
"@push.rocks/smartjson": "^5.0.10",
"@push.rocks/smartlog": "^3.0.2",
@ -34,7 +35,7 @@
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.11.6"
"@types/node": "^20.11.17"
},
"files": [
"ts/**/*",

View File

@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
'@push.rocks/qenv':
specifier: ^6.0.5
version: 6.0.5
'@push.rocks/smartfile':
specifier: ^11.0.4
version: 11.0.4
@ -33,22 +36,21 @@ devDependencies:
version: 2.1.72
'@git.zone/tsrun':
specifier: ^1.2.44
version: 1.2.46(@types/node@20.11.16)
version: 1.2.46(@types/node@20.11.17)
'@git.zone/tstest':
specifier: ^1.0.77
version: 1.0.86(@types/node@20.11.16)(sinon@17.0.1)
version: 1.0.86(@types/node@20.11.17)(sinon@17.0.1)
'@push.rocks/tapbundle':
specifier: ^5.0.15
version: 5.0.15(sinon@17.0.1)
'@types/node':
specifier: ^20.11.6
version: 20.11.16
specifier: ^20.11.17
version: 20.11.17
packages:
/@api.global/typedrequest-interfaces@3.0.1:
resolution: {integrity: sha512-eR2Cr01BYRwIq/X2ajOenWhm8l+/YE4A5kK/9V6I8ZnhtEBMFHG6YjF6Fg8npLJWbvhZXhOms+axZ6JKI71o8g==}
dev: true
/@api.global/typedrequest@3.0.4:
resolution: {integrity: sha512-8UThH9c3MxdSLiON8UN1CPXooU6Mp0eleFhVS3QB2OUsYqgEGn/EzuMt+cMIv/+ESSS6zcTpHvAhZ8ZMLfpL8A==}
@ -59,7 +61,6 @@ packages:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/webrequest': 3.0.34
dev: true
/@api.global/typedserver@3.0.20:
resolution: {integrity: sha512-bJA79KxGD24xqOMNZCovMK13Qf1x0hhzwQ+vlfbqvnKkMAieNbfiTfYcrMsfmTSMMDP0rEi9JEBW8tFSt4bn5g==}
@ -145,6 +146,12 @@ packages:
js-tokens: 4.0.0
dev: true
/@configvault.io/interfaces@1.0.17:
resolution: {integrity: sha512-bEcCUR2VBDJsTin8HQh8Uw/mlYl2v8A3jMIaQ+MTB9Hrqd6CZL2dL7iJdWyFl/3EIX+LDxWFR+Oq7liIq7w+1Q==}
dependencies:
'@api.global/typedrequest-interfaces': 3.0.1
dev: false
/@cspotcode/source-map-support@0.8.1:
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
@ -394,13 +401,13 @@ packages:
- supports-color
dev: true
/@git.zone/tsrun@1.2.46(@types/node@20.11.16):
/@git.zone/tsrun@1.2.46(@types/node@20.11.17):
resolution: {integrity: sha512-8miFVBle9Mnjx+uPGI/P+EuWcIOXWjBAkdjN5IYbdp5Ytt4xQODCLh4JSnC9h56UeU1nUxCAxZeJs2e9TXrivA==}
hasBin: true
dependencies:
'@push.rocks/smartfile': 10.0.41
'@push.rocks/smartshell': 3.0.3
ts-node: 10.9.2(@types/node@20.11.16)(typescript@5.1.6)
ts-node: 10.9.2(@types/node@20.11.17)(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- '@swc/core'
@ -408,13 +415,13 @@ packages:
- '@types/node'
dev: true
/@git.zone/tstest@1.0.86(@types/node@20.11.16)(sinon@17.0.1):
/@git.zone/tstest@1.0.86(@types/node@20.11.17)(sinon@17.0.1):
resolution: {integrity: sha512-ec95MNeA21L+ob+lvLVCmwPTTC1BY+v/JHLYZ9DOZ9+9buLgx+cJ7VkwGBJCnlWJtqEtJosUrFKTih36iNuT3g==}
hasBin: true
dependencies:
'@api.global/typedserver': 3.0.20
'@git.zone/tsbundle': 2.0.15
'@git.zone/tsrun': 1.2.46(@types/node@20.11.16)
'@git.zone/tsrun': 1.2.46(@types/node@20.11.17)
'@push.rocks/consolecolor': 2.0.1
'@push.rocks/smartbrowser': 2.0.6
'@push.rocks/smartdelay': 3.0.5
@ -603,6 +610,16 @@ packages:
'@types/symbol-tree': 3.2.5
symbol-tree: 3.2.4
/@push.rocks/qenv@6.0.5:
resolution: {integrity: sha512-Id/eSKKqSDUGe+0Cp5HEJ58J1iVv1jQseLUMs9kFTPYwG+NJSETUCRsJV50w5cPv8bRFcSkSU+xVbUbOc1p29A==}
dependencies:
'@api.global/typedrequest': 3.0.4
'@configvault.io/interfaces': 1.0.17
'@push.rocks/smartfile': 11.0.4
'@push.rocks/smartlog': 3.0.3
'@push.rocks/smartpath': 5.0.11
dev: false
/@push.rocks/smartbrowser@2.0.6:
resolution: {integrity: sha512-Ne+KCVhV/DROc1rHRRw59K6h0+LpQAK9fdOUtgDZ7laLPmB/tmnbUh3IuRDNcIY1iVA9pydoobwjnTjVgio9eQ==}
dependencies:
@ -1015,7 +1032,6 @@ packages:
'@push.rocks/smartjson': 5.0.10
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/webstore': 2.0.13
dev: true
/@push.rocks/webstore@2.0.13:
resolution: {integrity: sha512-w5Q3g1TT5SDIXukAAoYVuWud+Y5ysS8qiBqPU00/re895VVZhUOSNJMNU6jyneZigmbWtwSLsxDkZHlsHWpfuA==}
@ -1028,7 +1044,6 @@ packages:
'@push.rocks/smartrx': 3.0.7
fake-indexeddb: 4.0.2
idb: 7.1.1
dev: true
/@pushrocks/consolecolor@2.0.1:
resolution: {integrity: sha512-iOFCHVeFZ2OywbdwSxVI4/wokkcLrXVdHLgvMmkNhJ220eeLgjNZWx3EJo3vNW3zq5ybCSCUIq0878djBxrWpw==}
@ -1345,7 +1360,7 @@ packages:
/@types/accepts@1.3.7:
resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/babel__code-frame@7.0.6:
@ -1356,7 +1371,7 @@ packages:
resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
dependencies:
'@types/connect': 3.4.38
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/buffer-json@2.0.3:
@ -1375,21 +1390,21 @@ packages:
/@types/clean-css@4.2.11:
resolution: {integrity: sha512-Y8n81lQVTAfP2TOdtJJEsCoYl1AnOkqDqMvXb9/7pfgZZ7r8YrEyurrAvAoAjHOGXKRybay+5CsExqIH6liccw==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
source-map: 0.6.1
dev: true
/@types/co-body@6.1.3:
resolution: {integrity: sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
'@types/qs': 6.9.11
dev: true
/@types/connect@3.4.38:
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/content-disposition@0.5.8:
@ -1410,13 +1425,13 @@ packages:
'@types/connect': 3.4.38
'@types/express': 4.17.21
'@types/keygrip': 1.0.6
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/cors@2.8.17:
resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/debounce@1.2.4:
@ -1430,7 +1445,7 @@ packages:
/@types/express-serve-static-core@4.17.43:
resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
'@types/qs': 6.9.11
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@ -1448,20 +1463,20 @@ packages:
/@types/from2@2.3.5:
resolution: {integrity: sha512-giavnjf3kNlJnE+HpZA1CQ3UKHxgehzsTuIMGda8pGMbOiLYGVNADEskey44OZcADHm/HOoBany8IV+0x28XFw==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/fs-extra@11.0.4:
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
dependencies:
'@types/jsonfile': 6.1.4
'@types/node': 20.11.16
'@types/node': 20.11.17
/@types/glob@8.1.0:
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 20.11.16
'@types/node': 20.11.17
/@types/html-minifier@4.0.5:
resolution: {integrity: sha512-LfE7f7MFd+YUfZnlBz8W43P4NgSObWiqyKapANsWCj63Aqeqli8/9gVsGP4CwC8jPpTTYlTopKCk9rJSuht/ew==}
@ -1509,7 +1524,7 @@ packages:
/@types/jsonfile@6.1.4:
resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
/@types/keygrip@1.0.6:
resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==}
@ -1531,7 +1546,7 @@ packages:
'@types/http-errors': 2.0.4
'@types/keygrip': 1.0.6
'@types/koa-compose': 3.2.8
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/mime-types@2.1.4:
@ -1556,8 +1571,8 @@ packages:
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
dev: true
/@types/node@20.11.16:
resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==}
/@types/node@20.11.17:
resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==}
dependencies:
undici-types: 5.26.5
@ -1588,7 +1603,7 @@ packages:
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
dependencies:
'@types/mime': 1.3.5
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/serve-static@1.15.5:
@ -1596,7 +1611,7 @@ packages:
dependencies:
'@types/http-errors': 2.0.4
'@types/mime': 3.0.4
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/sinon-chai@3.2.12:
@ -1622,7 +1637,7 @@ packages:
/@types/through2@2.0.41:
resolution: {integrity: sha512-ryQ0tidWkb1O1JuYvWKyMLYEtOWDqF5mHerJzKz/gQpoAaJq2l/dsMPBF0B5BNVT34rbARYJ5/tsZwLfUi2kwQ==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
/@types/trusted-types@2.0.7:
resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
@ -1648,20 +1663,20 @@ packages:
/@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
/@types/yauzl@2.10.3:
resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
requiresBuild: true
dependencies:
'@types/node': 20.11.16
'@types/node': 20.11.17
dev: true
optional: true
@ -1946,7 +1961,6 @@ packages:
/base64-arraybuffer-es6@0.7.0:
resolution: {integrity: sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw==}
engines: {node: '>=6.0.0'}
dev: true
/base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
@ -2522,7 +2536,6 @@ packages:
resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==}
dependencies:
webidl-conversions: 4.0.2
dev: true
/eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
@ -2577,7 +2590,7 @@ packages:
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.17
'@types/node': 20.11.16
'@types/node': 20.11.17
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
@ -2803,7 +2816,6 @@ packages:
resolution: {integrity: sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw==}
dependencies:
realistic-structured-clone: 3.0.0
dev: true
/fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
@ -3259,7 +3271,6 @@ packages:
/idb@7.1.1:
resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==}
dev: true
/ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@ -3795,7 +3806,6 @@ packages:
/lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: true
/log-symbols@2.2.0:
resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==}
@ -4403,7 +4413,6 @@ packages:
/punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
dev: true
/puppeteer@15.5.0:
resolution: {integrity: sha512-+vZPU8iBSdCx1Kn5hHas80fyo0TiVyMeqLGv/1dygX2HKhAZjO9YThadbRTCoTYq0yWw+w/CysldPsEekDtjDQ==}
@ -4517,7 +4526,6 @@ packages:
domexception: 1.0.1
typeson: 6.1.0
typeson-registry: 1.0.0-alpha.39
dev: true
/regexp.prototype.flags@1.5.1:
resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==}
@ -5091,14 +5099,13 @@ packages:
engines: {node: '>=8'}
dependencies:
punycode: 2.3.1
dev: true
/tree-kill@1.2.2:
resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
hasBin: true
dev: true
/ts-node@10.9.2(@types/node@20.11.16)(typescript@5.1.6):
/ts-node@10.9.2(@types/node@20.11.17)(typescript@5.1.6):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
@ -5117,7 +5124,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.11.16
'@types/node': 20.11.17
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
@ -5221,12 +5228,10 @@ packages:
base64-arraybuffer-es6: 0.7.0
typeson: 6.1.0
whatwg-url: 8.7.0
dev: true
/typeson@6.1.0:
resolution: {integrity: sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA==}
engines: {node: '>=0.1.14'}
dev: true
/uglify-js@3.17.4:
resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}
@ -5316,12 +5321,10 @@ packages:
/webidl-conversions@4.0.2:
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
dev: true
/webidl-conversions@6.1.0:
resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==}
engines: {node: '>=10.4'}
dev: true
/whatwg-url@5.0.0:
resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=}
@ -5337,7 +5340,6 @@ packages:
lodash: 4.17.21
tr46: 2.1.0
webidl-conversions: 6.1.0
dev: true
/which-boxed-primitive@1.0.2:
resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/npmextra',
version: '4.0.12',
version: '4.0.13',
description: 'do more with npm'
}

View File

@ -5,6 +5,13 @@ import { KeyValueStore } from './npmextra.classes.keyvaluestore.js';
export interface IAppDataOptions {
dirPath?: string;
requiredKeys?: string[];
/**
* kvStoreKey: 'MY_ENV_VAR'
*/
envMapping?: {
[key: string]: string;
};
}
export class AppData {
@ -12,7 +19,7 @@ export class AppData {
* creates appdata. If no pathArg is given, data will be stored here:
* ${PWD}/.nogit/appdata
* @param pathArg
* @returns
* @returns
*/
public static async createAndInit(optionsArg: IAppDataOptions = {}) {
const appData = new AppData(optionsArg);
@ -51,7 +58,23 @@ export class AppData {
this.options.dirPath = nogitAppData;
}
}
this.kvStore = new KeyValueStore('custom', 'appkv', this.options.dirPath, this.options.requiredKeys);
this.kvStore = new KeyValueStore(
'custom',
'appkv',
this.options.dirPath,
this.options.requiredKeys
);
if (this.options.envMapping) {
const qenvInstance = new plugins.qenv.Qenv(process.cwd(), '~/.cloudlyrc');
for (const key in this.options.envMapping) {
const envValue = await qenvInstance.getEnvVarOnDemand(key);
if (envValue) {
await this.kvStore.writeKey(key, envValue);
}
}
}
this.readyDeferred.resolve();
}
@ -67,9 +90,13 @@ export class AppData {
const kvStore = await this.getKvStore();
const missingMandatoryKeys = kvStore.getMissingMandatoryKeys();
if (missingMandatoryKeys.length > 0) {
console.log(`The following mandatory keys are missing in the appdata:\n -> ${missingMandatoryKeys.join(',\n -> ')}`);
console.log(
`The following mandatory keys are missing in the appdata:\n -> ${missingMandatoryKeys.join(
',\n -> '
)}`
);
} else {
console.log('All mandatory keys are present in the appdata');
}
}
}
}

View File

@ -1,3 +1,4 @@
import * as qenv from '@push.rocks/qenv';
import * as smartlog from '@push.rocks/smartlog';
import * as path from 'path';
import * as smartfile from '@push.rocks/smartfile';
@ -7,4 +8,4 @@ import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrx from '@push.rocks/smartrx';
import * as taskbuffer from '@push.rocks/taskbuffer';
export { smartlog, path, smartfile, smartjson, smartpath, smartpromise, smartrx, taskbuffer };
export { qenv, smartlog, path, smartfile, smartjson, smartpath, smartpromise, smartrx, taskbuffer };