Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
44f5f84195 | |||
72655a6a0e | |||
961df11121 | |||
ee6f5e63ee | |||
a40b6adeef | |||
6ee324a0ef | |||
215a48a409 | |||
aeaa6149e4 | |||
75059dfca8 | |||
90c0f30ce1 | |||
9a55303978 | |||
224125fb8e | |||
df9d197508 | |||
ae33716af4 | |||
31b64eda5e | |||
7f3437e3cd | |||
8903bee78d | |||
a02b45a673 | |||
e7883f5997 | |||
39ab01b4af | |||
bb9de1b13b | |||
080e133e9f | |||
a284c58a68 | |||
18bb54831d | |||
141c7ed8a7 | |||
037481f195 | |||
e414e392d3 | |||
4f7e382bc9 | |||
1c0b428606 | |||
90e8625771 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@push.rocks/npmextra",
|
||||
"version": "4.0.11",
|
||||
"version": "5.0.9",
|
||||
"private": false,
|
||||
"description": "do more with npm",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -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/**/*",
|
||||
|
110
pnpm-lock.yaml
generated
110
pnpm-lock.yaml
generated
@ -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==}
|
||||
@ -86,7 +87,7 @@ packages:
|
||||
'@push.rocks/smartstream': 3.0.30
|
||||
'@push.rocks/smarttime': 4.0.6
|
||||
'@push.rocks/webstore': 2.0.13
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.50
|
||||
'@types/express': 4.17.21
|
||||
body-parser: 1.20.2
|
||||
cors: 2.8.5
|
||||
@ -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:
|
||||
@ -813,7 +830,7 @@ packages:
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smartpuppeteer': 2.0.2
|
||||
'@push.rocks/smartunique': 3.0.6
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.50
|
||||
'@types/express': 4.17.21
|
||||
express: 4.18.2
|
||||
pdf-merger-js: 3.4.0
|
||||
@ -875,7 +892,7 @@ packages:
|
||||
'@push.rocks/smartxml': 1.0.8
|
||||
'@push.rocks/smartyaml': 2.0.5
|
||||
'@push.rocks/webrequest': 3.0.34
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.50
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartsocket@2.0.24:
|
||||
@ -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==}
|
||||
@ -1320,8 +1335,8 @@ packages:
|
||||
type-fest: 2.19.0
|
||||
dev: true
|
||||
|
||||
/@tsclass/tsclass@4.0.46:
|
||||
resolution: {integrity: sha512-UovPUvlozv1ftJp4KW5tt4MP/LQCNP3lSCinjyIrLkopOymczyzONUGvSAAwOBf1XBE9bO0tI4KtRuXWN9XBXQ==}
|
||||
/@tsclass/tsclass@4.0.50:
|
||||
resolution: {integrity: sha512-ICUe4hfebpvbn8JkReGP1m3DCTq6S5FIhLJzbFx9F7tx6dn909fA9YIEHkFeMj2X7fT5aGvAXOZRlT52GsnSUw==}
|
||||
dependencies:
|
||||
type-fest: 4.10.2
|
||||
dev: true
|
||||
@ -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==}
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/npmextra',
|
||||
version: '4.0.11',
|
||||
version: '5.0.9',
|
||||
description: 'do more with npm'
|
||||
}
|
||||
|
@ -1,21 +1,29 @@
|
||||
import * as plugins from './npmextra.plugins.js';
|
||||
import * as paths from './npmextra.paths.js';
|
||||
import { KeyValueStore } from './npmextra.classes.keyvaluestore.js';
|
||||
import { env } from 'process';
|
||||
|
||||
export interface IAppDataOptions {
|
||||
dirPath?: string;
|
||||
requiredKeys?: string[];
|
||||
|
||||
/**
|
||||
* kvStoreKey: 'MY_ENV_VAR'
|
||||
*/
|
||||
envMapping?: {
|
||||
[key: string]: string | object;
|
||||
};
|
||||
}
|
||||
|
||||
export class AppData {
|
||||
export class AppData<T = any> {
|
||||
/**
|
||||
* creates appdata. If no pathArg is given, data will be stored here:
|
||||
* ${PWD}/.nogit/appdata
|
||||
* @param pathArg
|
||||
* @returns
|
||||
*/
|
||||
public static async createAndInit(optionsArg: IAppDataOptions = {}) {
|
||||
const appData = new AppData(optionsArg);
|
||||
public static async createAndInit<T = any>(optionsArg: IAppDataOptions = {}): Promise<AppData<T>> {
|
||||
const appData = new AppData<T>(optionsArg);
|
||||
await appData.readyDeferred.promise;
|
||||
return appData;
|
||||
}
|
||||
@ -23,7 +31,7 @@ export class AppData {
|
||||
// instance
|
||||
public readyDeferred = plugins.smartpromise.defer();
|
||||
public options: IAppDataOptions;
|
||||
private kvStore: KeyValueStore;
|
||||
private kvStore: KeyValueStore<T>;
|
||||
constructor(optionsArg: IAppDataOptions = {}) {
|
||||
this.options = optionsArg;
|
||||
this.init();
|
||||
@ -51,7 +59,62 @@ export class AppData {
|
||||
this.options.dirPath = nogitAppData;
|
||||
}
|
||||
}
|
||||
this.kvStore = new KeyValueStore('custom', 'appkv', this.options.dirPath, this.options.requiredKeys);
|
||||
this.kvStore = new KeyValueStore({
|
||||
typeArg: 'custom',
|
||||
identityArg: 'appkv',
|
||||
customPath: this.options.dirPath,
|
||||
mandatoryKeys: this.options.requiredKeys
|
||||
});
|
||||
|
||||
if (this.options.envMapping) {
|
||||
const qenvInstance = new plugins.qenv.Qenv(process.cwd(), plugins.path.join(process.cwd(), '.nogit'));
|
||||
|
||||
// Recursive function to handle nested objects, now includes key parameter
|
||||
const processEnvMapping = async (key: string, mappingValue: any, parentKey: string = ''): Promise<any> => {
|
||||
if (typeof mappingValue === 'string') {
|
||||
let envValue: string;
|
||||
if (mappingValue.startsWith('hard:')) {
|
||||
envValue = mappingValue.replace('hard:', '');
|
||||
} else {
|
||||
envValue = await qenvInstance.getEnvVarOnDemand(mappingValue);
|
||||
}
|
||||
if (envValue) {
|
||||
if (mappingValue.endsWith('_JSON')) {
|
||||
envValue = JSON.parse(envValue);
|
||||
}
|
||||
if (!parentKey) {
|
||||
await this.kvStore.writeKey(key, envValue);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (typeof mappingValue === 'object' && mappingValue !== null) {
|
||||
const resultObject = {};
|
||||
for (const innerKey in mappingValue) {
|
||||
const nestedValue = mappingValue[innerKey];
|
||||
// For nested objects, call recursively but do not immediately write to kvStore
|
||||
const nestedResult = await processEnvMapping(innerKey, nestedValue, key);
|
||||
resultObject[innerKey] = nestedResult;
|
||||
}
|
||||
if (parentKey === '') {
|
||||
// Only write to kvStore if at the top level
|
||||
await this.kvStore.writeKey(key, resultObject);
|
||||
} else {
|
||||
// For nested objects, return the constructed object instead of writing to kvStore
|
||||
return resultObject;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (const key in this.options.envMapping) {
|
||||
await processEnvMapping(key, this.options.envMapping[key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.readyDeferred.resolve();
|
||||
}
|
||||
|
||||
@ -67,9 +130,20 @@ 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: ${missingMandatoryKeys.join(', ')}`);
|
||||
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');
|
||||
}
|
||||
return missingMandatoryKeys;
|
||||
}
|
||||
|
||||
public async waitForAndGetKey(keyArg: string) {
|
||||
await this.readyDeferred.promise;
|
||||
await this.kvStore.waitForKeysPresent([keyArg]);
|
||||
return this.kvStore.readKey[keyArg];
|
||||
}
|
||||
}
|
@ -5,11 +5,18 @@ import { Task } from '@push.rocks/taskbuffer';
|
||||
|
||||
export type TKeyValueStore = 'custom' | 'userHomeDir';
|
||||
|
||||
export interface IKvStoreConstructorOptions {
|
||||
typeArg: TKeyValueStore;
|
||||
identityArg: string;
|
||||
customPath?: string;
|
||||
mandatoryKeys?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* kvStore is a simple key value store to store data about projects between runs
|
||||
*/
|
||||
export class KeyValueStore {
|
||||
private dataObject: any = {};
|
||||
export class KeyValueStore<T = any> {
|
||||
private dataObject: Partial<T> = {};
|
||||
private deletedObject: any = {};
|
||||
private mandatoryKeys: Set<string> = new Set();
|
||||
public changeSubject = new plugins.smartrx.rxjs.Subject();
|
||||
@ -82,19 +89,19 @@ export class KeyValueStore {
|
||||
* @param identityArg
|
||||
* @param customPath Optional custom path for the keyValue store
|
||||
*/
|
||||
constructor(typeArg: TKeyValueStore, identityArg: string, customPath?: string, mandatoryKeys?: string[]) {
|
||||
if (customPath && typeArg !== 'custom') {
|
||||
constructor(optionsArg: IKvStoreConstructorOptions) {
|
||||
if (optionsArg.customPath && optionsArg.typeArg !== 'custom') {
|
||||
throw new Error('customPath can only be provided if typeArg is custom');
|
||||
}
|
||||
if (typeArg === 'custom' && !customPath) {
|
||||
if (optionsArg.typeArg === 'custom' && !optionsArg.customPath) {
|
||||
throw new Error('customPath must be provided if typeArg is custom');
|
||||
}
|
||||
this.type = typeArg;
|
||||
this.identity = identityArg;
|
||||
this.customPath = customPath; // Store custom path if provided
|
||||
this.type = optionsArg.typeArg;
|
||||
this.identity = optionsArg.identityArg;
|
||||
this.customPath = optionsArg.customPath; // Store custom path if provided
|
||||
this.initFilePath();
|
||||
if (mandatoryKeys) {
|
||||
this.setMandatoryKeys(mandatoryKeys);
|
||||
if (optionsArg.mandatoryKeys) {
|
||||
this.setMandatoryKeys(optionsArg.mandatoryKeys);
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,7 +174,7 @@ export class KeyValueStore {
|
||||
return Array.from(this.mandatoryKeys).filter(key => !(key in this.dataObject));
|
||||
}
|
||||
|
||||
public async waitForKeysPresent(keysArg: []): Promise<void> {
|
||||
public async waitForKeysPresent(keysArg: string[]): Promise<void> {
|
||||
const missingKeys = keysArg.filter(keyArg => !this.dataObject[keyArg]);
|
||||
if (missingKeys.length === 0) {
|
||||
return;
|
||||
|
@ -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 };
|
||||
|
Reference in New Issue
Block a user