Compare commits

...

24 Commits

Author SHA1 Message Date
5e0edecf18 5.1.2
Some checks failed
Default (tags) / security (push) Failing after 15s
Default (tags) / test (push) Failing after 11s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-06 03:48:39 +01:00
70cefc00fa fix(appdata): Fix iteration over overwriteObject in AppData class 2024-11-06 03:48:39 +01:00
6f14c73b5f 5.1.1 2024-11-05 21:29:26 +01:00
1e6f636608 fix(AppData): Fix issue with overwrite object handling in AppData class 2024-11-05 21:29:26 +01:00
eff77f8976 5.1.0 2024-11-05 15:11:02 +01:00
b5f109d320 feat(appdata): Add support for overwriting keys using the overwriteObject option in AppData 2024-11-05 15:11:01 +01:00
3a53938e8e 5.0.23 2024-06-19 19:03:26 +02:00
db90714a81 fix(core): update 2024-06-19 19:03:26 +02:00
b81ab9d9b2 5.0.22 2024-06-19 18:50:01 +02:00
5ec9124d29 fix(core): update 2024-06-19 18:50:00 +02:00
f7f035e878 5.0.21 2024-06-19 17:53:28 +02:00
3caf300544 fix(core): update 2024-06-19 17:53:27 +02:00
6a70af9b6f 5.0.20 2024-06-19 17:53:11 +02:00
2ad3da85a9 fix(core): update 2024-06-19 17:53:10 +02:00
09e8b8b94c 5.0.19 2024-06-19 17:43:56 +02:00
265f4df8b3 fix(core): update 2024-06-19 17:43:55 +02:00
5461ec0636 5.0.18 2024-06-19 15:07:50 +02:00
937252f99e fix(core): update 2024-06-19 15:07:49 +02:00
6f19c3cc71 5.0.17 2024-06-12 20:21:52 +02:00
4be54f6dcc fix(core): update 2024-06-12 20:21:51 +02:00
5c6702b898 5.0.16 2024-06-12 20:18:28 +02:00
f1ecda411a fix(core): update 2024-06-12 20:18:27 +02:00
267d2c392d 5.0.15 2024-06-12 20:10:20 +02:00
2ca82fb28b fix(core): update 2024-06-12 20:10:19 +02:00
10 changed files with 505 additions and 360 deletions

57
changelog.md Normal file
View File

@ -0,0 +1,57 @@
# Changelog
## 2024-11-06 - 5.1.2 - fix(appdata)
Fix iteration over overwriteObject in AppData class
- Corrected the for loop from in to of inside the AppData class for iterating over overwriteObject keys.
## 2024-11-05 - 5.1.1 - fix(AppData)
Fix issue with overwrite object handling in AppData class
- Corrected logic to handle cases when overwriteObject is undefined.
## 2024-11-05 - 5.1.0 - feat(appdata)
Add support for overwriting keys using the overwriteObject option in AppData
- Introduced the overwriteObject option in IAppDataOptions to allow overwriting specific keys in the AppData class.
## 2024-06-19 - 5.0.17 - 5.0.23 - Core Updates
Routine maintenance and updates to the core components.
- Multiple core updates and fixes improving stability
## 2024-06-12 - 5.0.13 - 5.0.16 - Core Updates
Maintenance focus on core systems with enhancements and problem resolutions.
- Enhancements and updates in the core functionality
## 2024-05-29 - 5.0.13 - Documentation Update
Descriptive improvements aligned with current features.
- Updated core description for better clarity in documentation
## 2024-04-01 - 5.0.10 - Configuration Update
Improved configuration management for build processes.
- Updated `npmextra.json` to reflect changes in git repository management
## 2024-02-12 - 5.0.0 - 5.0.9 - Major Core Enhancements
A series of critical updates with resolved issues in the core components.
- Introduction of new core features
- Several core system updates
## 2024-02-12 - 4.0.16 - Major Version Transition
Migration to the new major version with impactful changes.
- BREAKING CHANGE: Significant updates requiring attention for smooth transition
## 2023-08-24 - 3.0.9 - 4.0.16 - Organization Updates
Formatted updates with attention to organizational standards and practice.
- SWITCH to a new organizational scheme
## 2023-07-11 - 3.0.9 - Organizational Enhancement
Shifts aligning with contemporary structuring and logistics.
- Strategic realignment with organizational principles

View File

@ -14,7 +14,7 @@
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "npmextra",
"description": "Enhances npm with additional configuration and tool management capabilities, including a key-value store for project setups.",
"description": "A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.",
"npmPackagename": "@push.rocks/npmextra",
"license": "MIT",
"keywords": [
@ -23,11 +23,16 @@
"tool management",
"key-value store",
"project setup",
"npm scripts",
"typescript",
"environment setup",
"dependencies management",
"npm package enhancement"
"npm package enhancement",
"automation",
"async operations",
"app configuration",
"smart file handling",
"workflow improvement",
"persistent storage"
]
}
},

View File

@ -1,8 +1,8 @@
{
"name": "@push.rocks/npmextra",
"version": "5.0.14",
"version": "5.1.2",
"private": false,
"description": "Enhances npm with additional configuration and tool management capabilities, including a key-value store for project setups.",
"description": "A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"scripts": {
@ -28,14 +28,15 @@
"@push.rocks/smartpath": "^5.0.18",
"@push.rocks/smartpromise": "^4.0.2",
"@push.rocks/smartrx": "^3.0.7",
"@push.rocks/taskbuffer": "^3.1.7"
"@push.rocks/taskbuffer": "^3.1.7",
"@tsclass/tsclass": "^4.0.59"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.80",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.90",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^20.14.2"
"@types/node": "^20.14.5"
},
"files": [
"ts/**/*",
@ -59,10 +60,15 @@
"tool management",
"key-value store",
"project setup",
"npm scripts",
"typescript",
"environment setup",
"dependencies management",
"npm package enhancement"
"npm package enhancement",
"automation",
"async operations",
"app configuration",
"smart file handling",
"workflow improvement",
"persistent storage"
]
}

380
pnpm-lock.yaml generated
View File

@ -32,49 +32,43 @@ importers:
'@push.rocks/taskbuffer':
specifier: ^3.1.7
version: 3.1.7
'@tsclass/tsclass':
specifier: ^4.0.59
version: 4.0.59
devDependencies:
'@git.zone/tsbuild':
specifier: ^2.1.80
version: 2.1.80
'@git.zone/tsrun':
specifier: ^1.2.44
version: 1.2.46(@types/node@20.14.2)
version: 1.2.46(@types/node@20.14.5)
'@git.zone/tstest':
specifier: ^1.0.90
version: 1.0.90(@types/node@20.14.2)
version: 1.0.90(@types/node@20.14.5)
'@push.rocks/tapbundle':
specifier: ^5.0.23
version: 5.0.23
'@types/node':
specifier: ^20.14.2
version: 20.14.2
specifier: ^20.14.5
version: 20.14.5
packages:
'@api.global/typedrequest-interfaces@2.0.2':
resolution: {integrity: sha512-D+mkr4IiUZ/eUgrdp5jXjBKOW/iuMcl0z2ZLQsLLypKX/psFGD3viZJ58FNRa+/1OSM38JS5wFyoWl8oPEFLrw==}
'@api.global/typedrequest-interfaces@3.0.1':
resolution: {integrity: sha512-eR2Cr01BYRwIq/X2ajOenWhm8l+/YE4A5kK/9V6I8ZnhtEBMFHG6YjF6Fg8npLJWbvhZXhOms+axZ6JKI71o8g==}
'@api.global/typedrequest-interfaces@3.0.19':
resolution: {integrity: sha512-uuHUXJeOy/inWSDrwD0Cwax2rovpxYllDhM2RWh+6mVpQuNmZ3uw6IVg6dA2G1rOe24Ebs+Y9SzEogo+jYN7vw==}
'@api.global/typedrequest@3.0.30':
resolution: {integrity: sha512-Pp3KVr8QHZ/44u2GE9r8JpWbs5yxA+CZLwxXXcrOBnmJ2Pkp+5PWtO7QZbqnshWAdMTJTYD+nXwlqO0XiPiWGg==}
'@api.global/typedrequest@3.0.4':
resolution: {integrity: sha512-8UThH9c3MxdSLiON8UN1CPXooU6Mp0eleFhVS3QB2OUsYqgEGn/EzuMt+cMIv/+ESSS6zcTpHvAhZ8ZMLfpL8A==}
'@api.global/typedserver@3.0.50':
resolution: {integrity: sha512-WWZhLVcjqfJO3kq5RB/kYrss7hIiu3yBqBVA/o9cn7jwu3XHaC2DrT/HC7LrcKm1hndk0XbKMgBEb2orSaVl3g==}
'@api.global/typedsocket@3.0.1':
resolution: {integrity: sha512-xojiAVNXtHoxkpBo8U2HHJG8FrVXXuLvDNndSHXwx4C9VslUwDn5zSCI+PdBl8iAg+ZuBmKjqkpZZ9sL6DC5yQ==}
'@apiglobal/typedrequest-interfaces@2.0.1':
resolution: {integrity: sha512-Oi7pNU4vKo5UvcCJmqkH43Us237Ws/Pp/WDYnwnonRnTmIMd+6QjNfN/gXcPnP6tbamk8r8Xzcz9mgnSDM2ysw==}
'@babel/code-frame@7.24.7':
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
engines: {node: '>=6.9.0'}
@ -278,8 +272,8 @@ packages:
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
'@jridgewell/resolve-uri@3.1.1':
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
'@jridgewell/resolve-uri@3.1.2':
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
engines: {node: '>=6.0.0'}
'@jridgewell/sourcemap-codec@1.4.15':
@ -352,9 +346,6 @@ packages:
'@push.rocks/isounique@1.0.5':
resolution: {integrity: sha512-Z0BVqZZOCif1THTbIKWMgg0wxCzt9CyBtBBqQJiZ+jJ0KlQFrQHNHrPt81/LXe/L4x0cxWsn0bpL6W5DNSvNLw==}
'@push.rocks/lik@6.0.12':
resolution: {integrity: sha512-/vzlOZ26gCmXZz67LeM2hJ+aNM49Jxvf3FKxLMXHhJwffd3LcV96MYbMfKzKR/za/bh5Itf3a6UjLL5mmN6Pew==}
'@push.rocks/lik@6.0.15':
resolution: {integrity: sha512-rZxln6l4NAU931MTxnsjy1pue+S3AXtDCidHH/tbkqBtrWIzWuXduo6Nz3zYkndbD64Knyta7F60JRvcOe4XqA==}
@ -460,9 +451,6 @@ packages:
'@push.rocks/smartpuppeteer@2.0.2':
resolution: {integrity: sha512-EcYCT0PX++WjfHp7W5UYX3t8x5gSNpJMMUvhA7SHz8b2t76ItslNWxprRcF0CUQyN1fozbf5StZf7dwdGc/dIA==}
'@push.rocks/smartrequest@2.0.21':
resolution: {integrity: sha512-btk9GbiMNxNcEgJEqTq9qMFJ/6ua6oG4q49v+8ujKAXU50vFn1WQ/H0VAyeu9LMa5GCcRwUhNNDdwpLVGVbrBg==}
'@push.rocks/smartrequest@2.0.22':
resolution: {integrity: sha512-EfgmdEsLtDJ8aNOLOh59ca1NMsiiFz54aoHRigQFQ0cuoUs6phxejIY2FdMoPFn68ubTpkztdL2P4L1/cRYyHg==}
@ -472,9 +460,6 @@ packages:
'@push.rocks/smartrx@3.0.7':
resolution: {integrity: sha512-qCWy0s3RLAgGSnaw/Gu0BNaJ59CsI6RK5OJDCCqxc7P2X/S755vuLtnAR5/0dEjdhCHXHX9ytPZx+o9g/CNiyA==}
'@push.rocks/smartshell@3.0.3':
resolution: {integrity: sha512-S4RXI76ltPetdJ8Gv4HlnlhR/hXDV8QmSU7TdhLEe171ZzfouAyt9XZ4MFDCtjk3VQ4Mw+zz4mSDaACXP/QdlQ==}
'@push.rocks/smartshell@3.0.5':
resolution: {integrity: sha512-kHh86kpkrXHM/xgftcFQ2psU+DJrINzbeD1gIKR/I6cEXjWyYfs+I6UnFMhY3Bcpx9FdTElpRy5qVsumWURQSw==}
@ -502,9 +487,6 @@ packages:
'@push.rocks/smarttime@4.0.6':
resolution: {integrity: sha512-1whOow0YJw/TbN758TedRRxApoZbsvyxCVpoGjXh7DE/fEEgs7RCr4vVF5jYpyXNQuNMLpKJcTsSfyQ6RvH4Aw==}
'@push.rocks/smartunique@3.0.6':
resolution: {integrity: sha512-/fvh5BBHiTvZcCH4km2Oh3f0spfcWKr7e0Dp6lAb3rJq+5KiO7fQmI1UcQ9clADUaaJOn8sPzseiLt+kJ2tajw==}
'@push.rocks/smartunique@3.0.9':
resolution: {integrity: sha512-q6DYQgT7/dqdWi9HusvtWCjdsFzLFXY9LTtaZV6IYNJt6teZOonoygxTdNt9XLn6niBSbLYrHSKvJNTRH/uK+g==}
@ -523,18 +505,12 @@ packages:
'@push.rocks/taskbuffer@3.1.7':
resolution: {integrity: sha512-QktGVJPucqQmW/QNGnscf4FAigT1H7JWKFGFdRuDEaOHKFh9qN+PXG3QY7DtZ4jfXdGLxPN4yAufDuPSAJYFnw==}
'@push.rocks/webrequest@3.0.34':
resolution: {integrity: sha512-3gqJb58ZukPsOcS26ya2M/nAEOP7lMYyc2Syh45ljgwdM3X8PwHquk5pdc1MMdDWAo1aiYrxReEw6BgMCJUlNQ==}
'@push.rocks/webrequest@3.0.37':
resolution: {integrity: sha512-fLN7kP6GeHFxE4UH4r9C9pjcQb0QkJxHeAMwXvbOqB9hh0MFNKhtGU7GoaTn8SVRGRMPc9UqZVNwo6u5l8Wn0A==}
'@push.rocks/websetup@3.0.19':
resolution: {integrity: sha512-iKJDwXdMmQdu5siOIgziPRxM51lN1AU9HOr+yMteu1YMDkZT7HKCyisDAr4gC9WZ9a7FzsG8zgthm4dMeA8NTw==}
'@push.rocks/webstore@2.0.13':
resolution: {integrity: sha512-w5Q3g1TT5SDIXukAAoYVuWud+Y5ysS8qiBqPU00/re895VVZhUOSNJMNU6jyneZigmbWtwSLsxDkZHlsHWpfuA==}
'@push.rocks/webstore@2.0.20':
resolution: {integrity: sha512-Z3L4OHGcw/Gs9aXpMUwebEPTh0nK/C7R6YwPfCLcGVu9yd/ZShaQ8QZEYE243Cu9J1Mn+CEtz4jpPLnHiizHQA==}
@ -652,11 +628,11 @@ packages:
'@tsclass/tsclass@3.0.48':
resolution: {integrity: sha512-hC65UvDlp9qvsl6OcIZXz0JNiWZ0gyzsTzbXpg215sGxopgbkOLCr6E0s4qCTnweYm95gt2AdY95uP7M7kExaQ==}
'@tsclass/tsclass@4.0.55':
resolution: {integrity: sha512-zg774JF90/3/rJ7xk4LyGgxcUzxdKIQcwtBVxez4LhvegESxvHiFmX42WL105iBpE53ISJ8sctLWlwG1JQZdlA==}
'@tsclass/tsclass@4.0.59':
resolution: {integrity: sha512-zSdNX/qzuekfCFG81k4e1X2tj1S+rbs2tM4CFAzT+aLiu2/AqdS1iPYwH/sYpY8vm+vBfllks9rlsuRSA2xTeg==}
'@tsconfig/node10@1.0.9':
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
'@tsconfig/node10@1.0.11':
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
'@tsconfig/node12@1.0.11':
resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==}
@ -793,8 +769,8 @@ packages:
'@types/ms@0.7.34':
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
'@types/node@20.14.2':
resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==}
'@types/node@20.14.5':
resolution: {integrity: sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==}
'@types/parse5@6.0.3':
resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==}
@ -853,9 +829,6 @@ packages:
'@types/which@2.0.2':
resolution: {integrity: sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==}
'@types/which@3.0.3':
resolution: {integrity: sha512-2C1+XoY0huExTbs8MQv1DuS5FS86+SEjdM9F/+GS61gg5Hqbtj8ZiDSx8MfWcyei907fIPbfPGCOrNUTnVHY1g==}
'@types/which@3.0.4':
resolution: {integrity: sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==}
@ -1050,10 +1023,6 @@ packages:
resolution: {integrity: sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==}
engines: {node: '>=14.16'}
call-bind@1.0.6:
resolution: {integrity: sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==}
engines: {node: '>= 0.4'}
call-bind@1.0.7:
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
engines: {node: '>= 0.4'}
@ -1188,8 +1157,8 @@ packages:
resolution: {integrity: sha512-9pSLe+tDJnmNak2JeMkz6ZmTCXP5p6vCxSd4kvDqrTJkqAP62j2uAEIZjf8cPDZIakStujqVzh5Y5MIWH3yYAw==}
engines: {node: '>=6.0'}
croner@7.0.5:
resolution: {integrity: sha512-15HLCD7iXnMe5km54yc4LN5BH+Cg9uCQvbkJ0acHxFffE29w3Uvgb9s/l310UCVUgMwGSBNw9BAHsEb5uMgj1g==}
croner@7.0.7:
resolution: {integrity: sha512-05wALDHKjt9zG1JbpziNnWPCwwv9fUKbNf6q0dWaDMJ/eDxW0394Q2R1VAzKvDgoEZBT9FhWSHHFIcgwLgXjcQ==}
engines: {node: '>=6.0'}
cross-fetch@3.1.5:
@ -1209,9 +1178,6 @@ packages:
css.escape@1.5.1:
resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==}
dayjs@1.11.10:
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
dayjs@1.11.11:
resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==}
@ -1266,10 +1232,6 @@ packages:
resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==}
engines: {node: '>=10'}
define-data-property@1.1.2:
resolution: {integrity: sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==}
engines: {node: '>= 0.4'}
define-data-property@1.1.4:
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
engines: {node: '>= 0.4'}
@ -1495,10 +1457,6 @@ packages:
resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==}
engines: {node: '>=8.0.0'}
foreground-child@3.1.1:
resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
engines: {node: '>=14'}
foreground-child@3.2.0:
resolution: {integrity: sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==}
engines: {node: '>=14'}
@ -1560,11 +1518,6 @@ packages:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
glob@10.3.10:
resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==}
engines: {node: '>=16 || 14 >=14.17'}
hasBin: true
glob@10.4.1:
resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==}
engines: {node: '>=16 || 14 >=14.18'}
@ -1602,14 +1555,11 @@ packages:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
has-property-descriptors@1.0.1:
resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==}
has-property-descriptors@1.0.2:
resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
has-proto@1.0.1:
resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
has-proto@1.0.3:
resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==}
engines: {node: '>= 0.4'}
has-symbols@1.0.3:
@ -1620,8 +1570,8 @@ packages:
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
engines: {node: '>= 0.4'}
hasown@2.0.0:
resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==}
hasown@2.0.2:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
hast-util-from-parse5@8.0.1:
@ -1701,9 +1651,6 @@ packages:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'}
idb@7.1.1:
resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==}
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@ -1833,10 +1780,6 @@ packages:
resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==}
engines: {node: '>=8'}
jackspeak@2.3.6:
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
engines: {node: '>=14'}
jackspeak@3.4.0:
resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==}
engines: {node: '>=14'}
@ -1969,10 +1912,6 @@ packages:
resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
lru-cache@10.2.0:
resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
engines: {node: 14 || >=16.14}
lru-cache@10.2.2:
resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
engines: {node: 14 || >=16.14}
@ -2194,18 +2133,10 @@ packages:
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
minimatch@9.0.3:
resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
engines: {node: '>=16 || 14 >=14.17'}
minimatch@9.0.4:
resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==}
engines: {node: '>=16 || 14 >=14.17'}
minipass@7.0.4:
resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
engines: {node: '>=16 || 14 >=14.17'}
minipass@7.1.2:
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
@ -2377,10 +2308,6 @@ packages:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
path-scurry@1.10.1:
resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
engines: {node: '>=16 || 14 >=14.17'}
path-scurry@1.11.1:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
@ -2609,10 +2536,6 @@ packages:
resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==}
engines: {node: '>= 0.8.0'}
set-function-length@1.2.1:
resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==}
engines: {node: '>= 0.4'}
set-function-length@1.2.2:
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
engines: {node: '>= 0.4'}
@ -2815,8 +2738,8 @@ packages:
tslib@1.14.1:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
tslib@2.6.3:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
tsscmp@1.0.6:
resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
@ -2985,11 +2908,6 @@ packages:
engines: {node: '>= 8'}
hasBin: true
which@3.0.1:
resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
hasBin: true
which@4.0.0:
resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==}
engines: {node: ^16.13.0 || >=18.0.0}
@ -3099,8 +3017,6 @@ snapshots:
'@api.global/typedrequest-interfaces@2.0.2': {}
'@api.global/typedrequest-interfaces@3.0.1': {}
'@api.global/typedrequest-interfaces@3.0.19': {}
'@api.global/typedrequest@3.0.30':
@ -3115,15 +3031,6 @@ snapshots:
'@push.rocks/webrequest': 3.0.37
'@push.rocks/webstream': 1.0.10
'@api.global/typedrequest@3.0.4':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.1
'@push.rocks/isounique': 1.0.5
'@push.rocks/lik': 6.0.12
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/webrequest': 3.0.34
'@api.global/typedserver@3.0.50':
dependencies:
'@api.global/typedrequest': 3.0.30
@ -3156,7 +3063,7 @@ snapshots:
'@push.rocks/taskbuffer': 3.1.7
'@push.rocks/webrequest': 3.0.37
'@push.rocks/webstore': 2.0.20
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@types/express': 4.17.21
body-parser: 1.20.2
cors: 2.8.5
@ -3185,8 +3092,6 @@ snapshots:
- supports-color
- utf-8-validate
'@apiglobal/typedrequest-interfaces@2.0.1': {}
'@babel/code-frame@7.24.7':
dependencies:
'@babel/highlight': 7.24.7
@ -3209,7 +3114,7 @@ snapshots:
'@configvault.io/interfaces@1.0.17':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.1
'@api.global/typedrequest-interfaces': 3.0.19
'@cspotcode/source-map-support@0.8.1':
dependencies:
@ -3355,22 +3260,22 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@git.zone/tsrun@1.2.46(@types/node@20.14.2)':
'@git.zone/tsrun@1.2.46(@types/node@20.14.5)':
dependencies:
'@push.rocks/smartfile': 10.0.41
'@push.rocks/smartshell': 3.0.3
ts-node: 10.9.2(@types/node@20.14.2)(typescript@5.1.6)
'@push.rocks/smartshell': 3.0.5
ts-node: 10.9.2(@types/node@20.14.5)(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
- '@types/node'
'@git.zone/tstest@1.0.90(@types/node@20.14.2)':
'@git.zone/tstest@1.0.90(@types/node@20.14.5)':
dependencies:
'@api.global/typedserver': 3.0.50
'@git.zone/tsbundle': 2.0.15
'@git.zone/tsrun': 1.2.46(@types/node@20.14.2)
'@git.zone/tsrun': 1.2.46(@types/node@20.14.5)
'@push.rocks/consolecolor': 2.0.2
'@push.rocks/smartbrowser': 2.0.6
'@push.rocks/smartdelay': 3.0.5
@ -3408,13 +3313,13 @@ snapshots:
wrap-ansi: 8.1.0
wrap-ansi-cjs: wrap-ansi@7.0.0
'@jridgewell/resolve-uri@3.1.1': {}
'@jridgewell/resolve-uri@3.1.2': {}
'@jridgewell/sourcemap-codec@1.4.15': {}
'@jridgewell/trace-mapping@0.3.9':
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.4.15
'@leichtgewicht/ip-codec@2.0.5': {}
@ -3505,17 +3410,6 @@ snapshots:
'@push.rocks/isounique@1.0.5': {}
'@push.rocks/lik@6.0.12':
dependencies:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartmatch': 2.0.0
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
'@push.rocks/smarttime': 4.0.6
'@types/minimatch': 5.1.2
'@types/symbol-tree': 3.2.5
symbol-tree: 3.2.4
'@push.rocks/lik@6.0.15':
dependencies:
'@push.rocks/smartdelay': 3.0.5
@ -3529,7 +3423,7 @@ snapshots:
'@push.rocks/qenv@6.0.5':
dependencies:
'@api.global/typedrequest': 3.0.4
'@api.global/typedrequest': 3.0.30
'@configvault.io/interfaces': 1.0.17
'@push.rocks/smartfile': 11.0.20
'@push.rocks/smartlog': 3.0.7
@ -3606,7 +3500,7 @@ snapshots:
'@push.rocks/smartfile@10.0.41':
dependencies:
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.15
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile-interfaces': 1.0.7
'@push.rocks/smarthash': 3.0.4
@ -3614,13 +3508,13 @@ snapshots:
'@push.rocks/smartmime': 1.0.6
'@push.rocks/smartpath': 5.0.18
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrequest': 2.0.21
'@push.rocks/smartrequest': 2.0.22
'@push.rocks/smartstream': 2.0.8
'@types/fs-extra': 11.0.4
'@types/glob': 8.1.0
'@types/js-yaml': 4.0.9
fs-extra: 11.2.0
glob: 10.3.10
glob: 10.4.1
js-yaml: 4.1.0
'@push.rocks/smartfile@11.0.20':
@ -3674,7 +3568,7 @@ snapshots:
'@push.rocks/smartlog-interfaces@3.0.2':
dependencies:
'@api.global/typedrequest-interfaces': 2.0.2
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@push.rocks/smartlog@3.0.7':
dependencies:
@ -3754,7 +3648,7 @@ snapshots:
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartpuppeteer': 2.0.2
'@push.rocks/smartunique': 3.0.9
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@types/express': 4.17.21
express: 4.19.2
pdf-lib: 1.17.1
@ -3780,13 +3674,6 @@ snapshots:
- supports-color
- utf-8-validate
'@push.rocks/smartrequest@2.0.21':
dependencies:
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smarturl': 3.0.7
agentkeepalive: 4.5.0
form-data: 4.0.0
'@push.rocks/smartrequest@2.0.22':
dependencies:
'@push.rocks/smartpromise': 4.0.3
@ -3803,15 +3690,6 @@ snapshots:
'@push.rocks/smartpromise': 4.0.3
rxjs: 7.8.1
'@push.rocks/smartshell@3.0.3':
dependencies:
'@pushrocks/smartdelay': 3.0.1
'@pushrocks/smartexit': 1.0.20
'@pushrocks/smartpromise': 4.0.2
'@types/which': 3.0.3
tree-kill: 1.2.2
which: 3.0.1
'@push.rocks/smartshell@3.0.5':
dependencies:
'@push.rocks/smartdelay': 3.0.5
@ -3828,7 +3706,7 @@ snapshots:
'@push.rocks/smartxml': 1.0.8
'@push.rocks/smartyaml': 2.0.5
'@push.rocks/webrequest': 3.0.37
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@push.rocks/smartsocket@2.0.27':
dependencies:
@ -3900,20 +3778,14 @@ snapshots:
'@push.rocks/smarttime@4.0.6':
dependencies:
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.15
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
croner: 7.0.5
dayjs: 1.11.10
croner: 7.0.7
dayjs: 1.11.11
is-nan: 1.3.2
pretty-ms: 8.0.0
'@push.rocks/smartunique@3.0.6':
dependencies:
'@types/uuid': 9.0.8
nanoid: 4.0.2
uuid: 9.0.1
'@push.rocks/smartunique@3.0.9':
dependencies:
'@types/uuid': 9.0.8
@ -3948,21 +3820,13 @@ snapshots:
'@push.rocks/taskbuffer@3.1.7':
dependencies:
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.15
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
'@push.rocks/smarttime': 4.0.6
'@push.rocks/smartunique': 3.0.6
'@push.rocks/webrequest@3.0.34':
dependencies:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartenv': 5.0.12
'@push.rocks/smartjson': 5.0.20
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/webstore': 2.0.13
'@push.rocks/smartunique': 3.0.9
'@push.rocks/webrequest@3.0.37':
dependencies:
@ -3976,18 +3840,7 @@ snapshots:
dependencies:
'@pushrocks/smartdelay': 3.0.1
'@pushrocks/smartpromise': 4.0.2
'@tsclass/tsclass': 4.0.55
'@push.rocks/webstore@2.0.13':
dependencies:
'@apiglobal/typedrequest-interfaces': 2.0.1
'@push.rocks/lik': 6.0.12
'@push.rocks/smartenv': 5.0.12
'@push.rocks/smartjson': 5.0.20
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
fake-indexeddb: 4.0.2
idb: 7.1.1
'@tsclass/tsclass': 4.0.59
'@push.rocks/webstore@2.0.20':
dependencies:
@ -4129,7 +3982,7 @@ snapshots:
'@pushrocks/smartdelay': 2.0.13
'@pushrocks/smartpromise': 3.1.10
croner: 4.4.1
dayjs: 1.11.10
dayjs: 1.11.11
is-nan: 1.3.2
pretty-ms: 7.0.1
@ -4163,11 +4016,11 @@ snapshots:
dependencies:
type-fest: 2.19.0
'@tsclass/tsclass@4.0.55':
'@tsclass/tsclass@4.0.59':
dependencies:
type-fest: 4.20.0
'@tsconfig/node10@1.0.9': {}
'@tsconfig/node10@1.0.11': {}
'@tsconfig/node12@1.0.11': {}
@ -4177,14 +4030,14 @@ snapshots:
'@types/accepts@1.3.7':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/babel__code-frame@7.0.6': {}
'@types/body-parser@1.19.5':
dependencies:
'@types/connect': 3.4.38
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/buffer-json@2.0.3': {}
@ -4196,17 +4049,17 @@ snapshots:
'@types/clean-css@4.2.11':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
source-map: 0.6.1
'@types/co-body@6.1.3':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/qs': 6.9.15
'@types/connect@3.4.38':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/content-disposition@0.5.8': {}
@ -4219,11 +4072,11 @@ snapshots:
'@types/connect': 3.4.38
'@types/express': 4.17.21
'@types/keygrip': 1.0.6
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/cors@2.8.17':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/debounce@1.2.4': {}
@ -4235,7 +4088,7 @@ snapshots:
'@types/express-serve-static-core@4.19.3':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/qs': 6.9.15
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@ -4249,17 +4102,17 @@ snapshots:
'@types/from2@2.3.5':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/fs-extra@11.0.4':
dependencies:
'@types/jsonfile': 6.1.4
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/glob@8.1.0':
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/hast@3.0.4':
dependencies:
@ -4293,7 +4146,7 @@ snapshots:
'@types/jsonfile@6.1.4':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/keygrip@1.0.6': {}
@ -4310,7 +4163,7 @@ snapshots:
'@types/http-errors': 2.0.4
'@types/keygrip': 1.0.6
'@types/koa-compose': 3.2.8
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/mdast@4.0.4':
dependencies:
@ -4326,7 +4179,7 @@ snapshots:
'@types/ms@0.7.34': {}
'@types/node@20.14.2':
'@types/node@20.14.5':
dependencies:
undici-types: 5.26.5
@ -4345,12 +4198,12 @@ snapshots:
'@types/send@0.17.4':
dependencies:
'@types/mime': 1.3.5
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/serve-static@1.15.7':
dependencies:
'@types/http-errors': 2.0.4
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/send': 0.17.4
'@types/sinon-chai@3.2.12':
@ -4368,7 +4221,7 @@ snapshots:
'@types/through2@2.0.41':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/trusted-types@2.0.7': {}
@ -4384,21 +4237,19 @@ snapshots:
'@types/which@2.0.2': {}
'@types/which@3.0.3': {}
'@types/which@3.0.4': {}
'@types/ws@7.4.7':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/ws@8.5.10':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
'@types/yauzl@2.10.3':
dependencies:
'@types/node': 20.14.2
'@types/node': 20.14.5
optional: true
'@ungap/structured-clone@1.2.0': {}
@ -4638,13 +4489,6 @@ snapshots:
normalize-url: 8.0.1
responselike: 3.0.0
call-bind@1.0.6:
dependencies:
es-errors: 1.3.0
function-bind: 1.1.2
get-intrinsic: 1.2.4
set-function-length: 1.2.1
call-bind@1.0.7:
dependencies:
es-define-property: 1.0.0
@ -4772,7 +4616,7 @@ snapshots:
croner@5.7.0: {}
croner@7.0.5: {}
croner@7.0.7: {}
cross-fetch@3.1.5:
dependencies:
@ -4797,8 +4641,6 @@ snapshots:
css.escape@1.5.1: {}
dayjs@1.11.10: {}
dayjs@1.11.11: {}
debounce@1.2.1: {}
@ -4831,13 +4673,6 @@ snapshots:
defer-to-connect@2.0.1: {}
define-data-property@1.1.2:
dependencies:
es-errors: 1.3.0
get-intrinsic: 1.2.4
gopd: 1.0.1
has-property-descriptors: 1.0.1
define-data-property@1.1.4:
dependencies:
es-define-property: 1.0.0
@ -4848,8 +4683,8 @@ snapshots:
define-properties@1.2.1:
dependencies:
define-data-property: 1.1.2
has-property-descriptors: 1.0.1
define-data-property: 1.1.4
has-property-descriptors: 1.0.2
object-keys: 1.1.1
delayed-stream@1.0.0: {}
@ -4922,7 +4757,7 @@ snapshots:
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.17
'@types/node': 20.14.2
'@types/node': 20.14.5
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
@ -5117,11 +4952,6 @@ snapshots:
cross-spawn: 7.0.3
signal-exit: 3.0.7
foreground-child@3.1.1:
dependencies:
cross-spawn: 7.0.3
signal-exit: 4.1.0
foreground-child@3.2.0:
dependencies:
cross-spawn: 7.0.3
@ -5165,9 +4995,9 @@ snapshots:
dependencies:
es-errors: 1.3.0
function-bind: 1.1.2
has-proto: 1.0.1
has-proto: 1.0.3
has-symbols: 1.0.3
hasown: 2.0.0
hasown: 2.0.2
get-stream@5.2.0:
dependencies:
@ -5179,14 +5009,6 @@ snapshots:
dependencies:
is-glob: 4.0.3
glob@10.3.10:
dependencies:
foreground-child: 3.1.1
jackspeak: 2.3.6
minimatch: 9.0.3
minipass: 7.0.4
path-scurry: 1.10.1
glob@10.4.1:
dependencies:
foreground-child: 3.2.0
@ -5258,15 +5080,11 @@ snapshots:
has-flag@4.0.0: {}
has-property-descriptors@1.0.1:
dependencies:
get-intrinsic: 1.2.4
has-property-descriptors@1.0.2:
dependencies:
es-define-property: 1.0.0
has-proto@1.0.1: {}
has-proto@1.0.3: {}
has-symbols@1.0.3: {}
@ -5274,7 +5092,7 @@ snapshots:
dependencies:
has-symbols: 1.0.3
hasown@2.0.0:
hasown@2.0.2:
dependencies:
function-bind: 1.1.2
@ -5422,8 +5240,6 @@ snapshots:
dependencies:
safer-buffer: 2.1.2
idb@7.1.1: {}
ieee754@1.2.1: {}
ignore@5.3.1: {}
@ -5471,7 +5287,7 @@ snapshots:
is-nan@1.3.2:
dependencies:
call-bind: 1.0.6
call-bind: 1.0.7
define-properties: 1.2.1
is-number@4.0.0: {}
@ -5515,12 +5331,6 @@ snapshots:
html-escaper: 2.0.2
istanbul-lib-report: 3.0.1
jackspeak@2.3.6:
dependencies:
'@isaacs/cliui': 8.0.2
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
jackspeak@3.4.0:
dependencies:
'@isaacs/cliui': 8.0.2
@ -5702,8 +5512,6 @@ snapshots:
lowercase-keys@3.0.0: {}
lru-cache@10.2.0: {}
lru-cache@10.2.2: {}
lru-cache@4.1.5:
@ -6096,16 +5904,10 @@ snapshots:
dependencies:
brace-expansion: 1.1.11
minimatch@9.0.3:
dependencies:
brace-expansion: 2.0.1
minimatch@9.0.4:
dependencies:
brace-expansion: 2.0.1
minipass@7.0.4: {}
minipass@7.1.2: {}
mkdirp-classic@0.5.3: {}
@ -6223,11 +6025,6 @@ snapshots:
path-key@3.1.1: {}
path-scurry@1.10.1:
dependencies:
lru-cache: 10.2.0
minipass: 7.0.4
path-scurry@1.11.1:
dependencies:
lru-cache: 10.2.2
@ -6466,7 +6263,7 @@ snapshots:
rxjs@7.8.1:
dependencies:
tslib: 2.6.2
tslib: 2.6.3
safe-buffer@5.1.2: {}
@ -6507,15 +6304,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
set-function-length@1.2.1:
dependencies:
define-data-property: 1.1.2
es-errors: 1.3.0
function-bind: 1.1.2
get-intrinsic: 1.2.4
gopd: 1.0.1
has-property-descriptors: 1.0.1
set-function-length@1.2.2:
dependencies:
define-data-property: 1.1.4
@ -6735,14 +6523,14 @@ snapshots:
trough@2.2.0: {}
ts-node@10.9.2(@types/node@20.14.2)(typescript@5.1.6):
ts-node@10.9.2(@types/node@20.14.5)(typescript@5.1.6):
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node10': 1.0.11
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.14.2
'@types/node': 20.14.5
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
@ -6755,7 +6543,7 @@ snapshots:
tslib@1.14.1: {}
tslib@2.6.2: {}
tslib@2.6.3: {}
tsscmp@1.0.6: {}
@ -6908,10 +6696,6 @@ snapshots:
dependencies:
isexe: 2.0.0
which@3.0.1:
dependencies:
isexe: 2.0.0
which@4.0.0:
dependencies:
isexe: 3.1.1

214
readme.md
View File

@ -1,5 +1,5 @@
# @push.rocks/npmextra
Enhances npm with additional configuration and tool management capabilities.
A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.
## Install
To install `@push.rocks/npmextra`, use the following npm command:
@ -11,10 +11,10 @@ npm install @push.rocks/npmextra --save
This package is available on [npm](https://www.npmjs.com/package/@push.rocks/npmextra) and can be installed into your project as a dependency to enhance npm with additional configuration and tool management capabilities.
## Usage
`@push.rocks/npmextra` is designed to supplement npm functionalities with enhanced configuration and tool management. It facilitates managing project configurations and tool setups in a consolidated manner, enabling a smoother workflow and maintenance process. Below are detailed use cases and examples implemented with ESM syntax and TypeScript.
`@push.rocks/npmextra` is designed to supplement npm functionalities with enhanced configuration and tool management. It facilitates the management of project configurations and tool setups in a consolidated manner, enabling a smoother workflow and maintenance process. Below are detailed use cases and examples implemented with ESM syntax and TypeScript.
### Initial Setup and Configuration
To start using npmextra in your project, first include it in your project with an import statement:
To start using `npmextra` in your project, first include it with an import statement:
```typescript
import { Npmextra } from '@push.rocks/npmextra';
@ -27,7 +27,7 @@ const npmExtraInstance = new Npmextra('/path/to/your/project');
```
### Managing Tool Configurations with `npmextra.json`
`@push.rocks/npmextra` excels in unifying tool configurations through a single `npmextra.json` file. Instead of scattering configurations across multiple files, `@push.rocks/npmextra` enables you to define tool-specific settings within this centralized configuration file.
`@push.rocks/npmextra` excels in unifying tool configurations through a single `npmextra.json` file. Instead of scattering configurations across multiple files, `npmextra` enables you to define tool-specific settings within this centralized configuration file, which can then be accessed programmatically.
#### Creating and Utilizing `npmextra.json`
@ -49,16 +49,16 @@ For example, to configure a hypothetical tool named `toolname`, define its setti
With the configuration defined, you can easily access these settings in your TypeScript code as follows:
```typescript
// import the npmextra module
// Import the npmextra module
import { Npmextra } from '@push.rocks/npmextra';
// create an instance pointing at the current directory
// Create an instance pointing at the current directory
const npmExtraInstance = new Npmextra();
// retrieve the configuration for 'toolname', merging defaults with any found in npmextra.json
const toolConfig = npmExtraInstance.dataFor('toolname', {
defaultKey1: 'defaultValue1',
defaultKey2: 'defaultValue2'
// Retrieve the configuration for 'toolname', merging defaults with any found in npmextra.json
const toolConfig = npmExtraInstance.dataFor<{ setting1: string, setting2: string }>('toolname', {
setting1: 'defaultValue1',
setting2: 'defaultValue2'
});
// toolConfig now contains the merged settings from npmextra.json and provided defaults
@ -75,7 +75,10 @@ To utilize the KeyValueStore, create an instance specifying its scope (e.g., 'us
```typescript
import { KeyValueStore } from '@push.rocks/npmextra';
const kvStore = new KeyValueStore<'userHomeDir'>('userHomeDir', 'myUniqueAppName');
const kvStore = new KeyValueStore<'userHomeDir'>({
typeArg: 'userHomeDir',
identityArg: 'myUniqueAppName'
});
```
You can then use the `writeKey`, `readKey`, `writeAll`, and `readAll` methods to manage your store respectively.
@ -101,13 +104,192 @@ const allData = await kvStore.readAll();
console.log(allData); // Outputs the entire store's contents
```
### Integrating with Tools
`@push.rocks/npmextra` seamlessly integrates with numerous tools, enabling them to leverage `npmextra.json` for configuration purposes. Tools such as `npmts`, `npmci`, and `npmdocker` are already utilizing this feature for enhanced configuration management.
### Advanced Key-Value Store Management
For tool developers, integrating with `npmextra` requires reading the tool-specific configuration from `npmextra.json` and adjusting the tool's behavior based on these settings. This creates a unified and streamlined configuration process across different tools used within a project.
In addition to basic read/write operations, `npmextra`s `KeyValueStore` supports advanced scenarios like mandatory keys and custom file paths.
### Conclusion
By centralizing configuration management and offering a versatile key-value store, `@push.rocks/npmextra` significantly simplifies the setup and management of tools and settings in modern JavaScript and TypeScript projects. Whether you're managing project-wide configurations or need persistent storage for key-value pairs, `@push.rocks/npmextra` provides an efficient and streamlined solution.
#### Example: Mandatory Keys and Custom Paths
Consider a scenario where your application requires specific keys to be present in the KeyValueStore. You can define mandatory keys and use a custom path for your store like this:
```typescript
import { KeyValueStore } from '@push.rocks/npmextra';
interface CustomData {
key1: string;
key2: number;
key3?: boolean;
}
const kvStore = new KeyValueStore<CustomData>({
typeArg: 'custom',
identityArg: 'customApp',
customPath: '/custom/path/to/store.json',
mandatoryKeys: ['key1', 'key2']
});
// Ensure all mandatory keys are present
const missingKeys = await kvStore.getMissingMandatoryKeys();
if (missingKeys.length) {
console.log(`Missing mandatory keys: ${missingKeys.join(', ')}`);
}
// Use the KeyValueStore
await kvStore.writeKey('key1', 'value1');
await kvStore.writeKey('key2', 123);
const key1Value = await kvStore.readKey('key1');
const allData = await kvStore.readAll();
console.log(key1Value); // Outputs: value1
console.log(allData); // Outputs: { key1: 'value1', key2: 123 }
```
### Combining AppData and KeyValueStore
The `AppData` class extends the functionality of `KeyValueStore` by integrating environmental variables, specifying additional configurations, and providing a more structured approach to data management.
#### Example: AppData Usage
```typescript
import { AppData } from '@push.rocks/npmextra';
interface AppSettings {
settingA: string;
settingB: number;
nestedSetting: {
innerSetting: boolean;
}
}
const appDataInstance = await AppData.createAndInit<AppSettings>({
dirPath: '/custom/path/to/appdata',
requiredKeys: ['settingA', 'settingB'],
envMapping: {
settingA: 'MY_ENV_A',
settingB: 'hard:42',
nestedSetting: {
innerSetting: 'MY_ENV_INNER'
}
}
});
const appDataKvStore = await appDataInstance.getKvStore();
// Writing values
await appDataKvStore.writeKey('settingA', 'exampleValue');
await appDataKvStore.writeKey('settingB', 100);
await appDataKvStore.writeKey('nestedSetting', { innerSetting: true });
// Reading values
const settingA = await appDataKvStore.readKey('settingA');
const allSettings = await appDataKvStore.readAll();
console.log(settingA); // Outputs: 'exampleValue'
console.log(allSettings); // Outputs: { settingA: 'exampleValue', settingB: 100, nestedSetting: { innerSetting: true } }
```
### Error Handling and Debugging
Proper error handling ensures your integrations with `npmextra` are robust and stable. Below are some strategies for error handling and debugging potential issues.
#### Example: Error Handling in KeyValueStore
```typescript
import { KeyValueStore } from '@push.rocks/npmextra';
const kvStore = new KeyValueStore('userHomeDir', 'errorHandlingApp');
try {
await kvStore.writeKey('importantKey', 'importantValue');
const value = await kvStore.readKey('importantKey');
console.log(value); // Outputs: importantValue
} catch (error) {
console.error('Error managing key-value store:', error);
}
```
#### Debugging Configuration Issues in `npmextra.json`
To debug configuration issues, you can utilize conditional logging and checks:
```typescript
import { Npmextra } from '@push.rocks/npmextra';
const npmExtraInstance = new Npmextra();
const toolConfig = npmExtraInstance.dataFor('toolname', {
configKey1: 'defaultValue1',
configKey2: 'defaultValue2'
});
if (!toolConfig.configKey1) {
console.error('configKey1 is missing in npmextra.json');
}
console.log(toolConfig);
```
### Integration Tests
Writing tests ensures that your integration with `npmextra` works as expected. Below are examples of integration tests for both `Npmextra` and `KeyValueStore`.
#### Example: Testing `Npmextra` Class
```typescript
import { expect, tap } from '@push.rocks/tapbundle';
import { Npmextra } from '@push.rocks/npmextra';
let npmExtraInstance: Npmextra;
tap.test('should create an instance of Npmextra', async () => {
npmExtraInstance = new Npmextra();
expect(npmExtraInstance).toBeInstanceOf(Npmextra);
});
tap.test('should load configuration from npmextra.json', async () => {
const config = npmExtraInstance.dataFor('toolname', {
defaultKey1: 'defaultValue1',
});
expect(config).toHaveProperty('defaultKey1');
});
tap.start();
```
#### Example: Testing `KeyValueStore` Class
```typescript
import { expect, tap } from '@push.rocks/tapbundle';
import { KeyValueStore } from '@push.rocks/npmextra';
let kvStore: KeyValueStore<{ key1: string, key2: number }>;
tap.test('should create a KeyValueStore instance', async () => {
kvStore = new KeyValueStore({
typeArg: 'userHomeDir',
identityArg: 'testApp'
});
expect(kvStore).toBeInstanceOf(KeyValueStore);
});
tap.test('should write and read back a value', async () => {
await kvStore.writeKey('key1', 'value1');
const result = await kvStore.readKey('key1');
expect(result).toEqual('value1');
});
tap.test('should write and read back multiple values', async () => {
await kvStore.writeAll({ key1: 'updatedValue1', key2: 2 });
const result = await kvStore.readAll();
expect(result).toEqual({ key1: 'updatedValue1', key2: 2 });
});
tap.start();
```
### Summary
By centralizing configuration management and offering a versatile key-value store, `@push.rocks/npmextra` significantly simplifies the setup and management of tools and settings in modern JavaScript and TypeScript projects. Whether you're managing project-wide configurations or need persistent storage for key-value pairs, `npmextra` provides an efficient and streamlined solution. Leveraging these robust features will ensure your project is well-configured and maintainable.
## License and Legal Information

27
test/test.appdata.ts Normal file
View File

@ -0,0 +1,27 @@
import { expect, tap } from '@push.rocks/tapbundle';
import path = require('path');
// module to test
import * as npmextra from '../ts/index.js';
interface ITestOptions {
hi: string;
deep: {
deep1: string;
deep2: string;
};
}
let testAppdata: npmextra.AppData<ITestOptions>;
tap.test('should create a valid AppData', async () => {
testAppdata = new npmextra.AppData<ITestOptions>({
envMapping: {
deep: {
deep1: '',
},
},
});
});
export default tap.start();

View File

@ -1,8 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/npmextra',
version: '5.0.14',
description: 'Enhances npm with additional configuration and tool management capabilities, including a key-value store for project setups.'
version: '5.1.2',
description: 'A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.'
}

View File

@ -1,18 +1,21 @@
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<T = any> {
dirPath?: string;
requiredKeys?: Array<keyof T>;
/**
* wether keys should be persisted on disk or not
*/
ephermal?: boolean;
/**
* kvStoreKey: 'MY_ENV_VAR'
*/
envMapping?: {
[key in keyof T]?: string | object;
};
envMapping?: plugins.tsclass.typeFest.PartialDeep<T>;
overwriteObject?: plugins.tsclass.typeFest.PartialDeep<T>;
}
export class AppData<T = any> {
@ -22,7 +25,9 @@ export class AppData<T = any> {
* @param pathArg
* @returns
*/
public static async createAndInit<T = any>(optionsArg: IAppDataOptions<T> = {}): Promise<AppData<T>> {
public static async createAndInit<T = any>(
optionsArg: IAppDataOptions<T> = {}
): Promise<AppData<T>> {
const appData = new AppData<T>(optionsArg);
await appData.readyDeferred.promise;
return appData;
@ -43,7 +48,7 @@ export class AppData<T = any> {
* @param pathArg
*/
private async init(pathArg?: string) {
if (this.options.dirPath) {
if (this.options.dirPath || this.options.ephermal) {
// ok, nothing to do here;
} else {
const appDataDir = '/app/data';
@ -62,30 +67,88 @@ export class AppData<T = any> {
}
this.kvStore = new KeyValueStore<T>({
typeArg: 'custom',
typeArg: this.options.ephermal ? 'ephemeral' : 'custom',
identityArg: 'appkv',
customPath: this.options.dirPath,
mandatoryKeys: this.options.requiredKeys as Array<keyof T>
mandatoryKeys: this.options.requiredKeys as Array<keyof T>,
});
if (this.options.envMapping) {
const qenvInstance = new plugins.qenv.Qenv(process.cwd(), plugins.path.join(process.cwd(), '.nogit'));
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: keyof T, mappingValue: any, parentKey: keyof T | '' = ''): Promise<any> => {
const processEnvMapping = async (
key: keyof T,
mappingValue: any,
parentKey: keyof T | '' = ''
): Promise<any> => {
if (typeof mappingValue === 'string') {
let envValue: string | T[keyof T];
if (mappingValue.startsWith('hard:')) {
envValue = mappingValue.replace('hard:', '') as T[keyof T];
} else {
envValue = await qenvInstance.getEnvVarOnDemand(mappingValue) as T[keyof T];
let envValue: string | boolean | T[keyof T];
let convert: 'none' | 'json' | 'base64' | 'boolean' = 'none';
switch (true) {
case mappingValue.startsWith('hard:'):
envValue = mappingValue.replace('hard:', '') as T[keyof T];
break;
case mappingValue.startsWith('hard_boolean:'):
envValue = mappingValue.replace('hard_boolean:', '') === 'true';
convert = 'boolean';
break;
case mappingValue.startsWith('hard_json:'):
envValue = JSON.parse(mappingValue.replace('hard_json:', '')) as T[keyof T];
convert = 'json';
break;
case mappingValue.startsWith('hard_base64:'):
envValue = Buffer.from(
mappingValue.replace('hard_base64:', ''),
'base64'
).toString() as T[keyof T];
convert = 'base64';
break;
case mappingValue.startsWith('boolean:'):
envValue = (await qenvInstance.getEnvVarOnDemand(
mappingValue.replace('boolean:', '')
)) as T[keyof T];
convert = 'boolean';
break;
case mappingValue.startsWith('json:'):
envValue = (await qenvInstance.getEnvVarOnDemand(
mappingValue.replace('json:', '')
)) as T[keyof T];
convert = 'json';
break;
case mappingValue.startsWith('base64:'):
envValue = (await qenvInstance.getEnvVarOnDemand(
mappingValue.replace('base64:', '')
)) as T[keyof T];
convert = 'base64';
break;
default:
envValue = (await qenvInstance.getEnvVarOnDemand(mappingValue)) as T[keyof T];
break;
}
// lets format the env value
if (envValue) {
if (typeof envValue === 'string' && mappingValue.endsWith('_JSON')) {
envValue = JSON.parse(envValue) as T[keyof T];
if (typeof envValue === 'string' && convert === 'boolean') {
envValue = envValue === 'true';
}
if (
typeof envValue === 'string' &&
(mappingValue.endsWith('_JSON') || convert === 'json')
) {
envValue = JSON.parse(envValue as string) as T[keyof T];
}
if (
typeof envValue === 'string' &&
(mappingValue.endsWith('_BASE64') || convert === 'base64')
) {
envValue = Buffer.from(envValue as string, 'base64').toString();
}
if (!parentKey) {
await this.kvStore.writeKey(key, envValue);
await this.kvStore.writeKey(key, envValue as any);
} else {
return envValue;
}
@ -113,6 +176,13 @@ export class AppData<T = any> {
for (const key in this.options.envMapping) {
await processEnvMapping(key as keyof T, this.options.envMapping[key]);
}
if (this.options.overwriteObject) {
for (const key of Object.keys(this.options.overwriteObject)) {
console.log(`-> heads up: overwriting key ${key} from options.overwriteObject`);
await this.kvStore.writeKey(key as keyof T, this.options.overwriteObject[key]);
}
}
}
this.readyDeferred.resolve();
@ -146,4 +216,4 @@ export class AppData<T = any> {
await this.kvStore.waitForKeysPresent([keyArg]);
return this.kvStore.readKey(keyArg);
}
}
}

View File

@ -3,7 +3,7 @@ import * as paths from './npmextra.paths.js';
import { Task } from '@push.rocks/taskbuffer';
export type TKeyValueStore = 'custom' | 'userHomeDir';
export type TKeyValueStore = 'custom' | 'userHomeDir' | 'ephemeral';
export interface IKvStoreConstructorOptions<T> {
typeArg: TKeyValueStore;
@ -20,7 +20,7 @@ export class KeyValueStore<T = any> {
private deletedObject: Partial<T> = {};
private mandatoryKeys: Set<keyof T> = new Set();
public changeSubject = new plugins.smartrx.rxjs.Subject<Partial<T>>();
private storedStateString: string = '';
public syncTask = new Task({
name: 'syncTask',
@ -28,18 +28,20 @@ export class KeyValueStore<T = any> {
bufferMax: 1,
execDelay: 0,
taskFunction: async () => {
this.dataObject = {
...plugins.smartfile.fs.toObjectSync(this.filePath),
...this.dataObject,
};
for (const key of Object.keys(this.deletedObject) as Array<keyof T>) {
delete this.dataObject[key];
if (this.type !== 'ephemeral') {
this.dataObject = {
...plugins.smartfile.fs.toObjectSync(this.filePath),
...this.dataObject,
};
for (const key of Object.keys(this.deletedObject) as Array<keyof T>) {
delete this.dataObject[key];
}
this.deletedObject = {};
await plugins.smartfile.memory.toFs(
plugins.smartjson.stringifyPretty(this.dataObject),
this.filePath
);
}
this.deletedObject = {};
await plugins.smartfile.memory.toFs(
plugins.smartjson.stringifyPretty(this.dataObject),
this.filePath
);
const newStateString = plugins.smartjson.stringify(this.dataObject);
// change detection
@ -54,6 +56,10 @@ export class KeyValueStore<T = any> {
* computes the identity and filePath
*/
private initFilePath = () => {
if (this.type === 'ephemeral') {
// No file path is needed for ephemeral type
return;
}
if (this.customPath) {
// Use custom path if provided
const absolutePath = plugins.smartpath.transform.makeAbsolute(this.customPath, paths.cwd);
@ -79,7 +85,7 @@ export class KeyValueStore<T = any> {
// if no custom path is provided, try to store at home directory
public type: TKeyValueStore;
public identity: string;
public filePath: string;
public filePath?: string;
private customPath?: string; // Optionally allow custom path
/**
@ -147,7 +153,9 @@ export class KeyValueStore<T = any> {
*/
public async wipe(): Promise<void> {
this.dataObject = {};
await plugins.smartfile.fs.remove(this.filePath);
if (this.type !== 'ephemeral') {
await plugins.smartfile.fs.remove(this.filePath);
}
}
/**

View File

@ -1,3 +1,9 @@
import * as tsclass from '@tsclass/tsclass';
export {
tsclass
}
import * as qenv from '@push.rocks/qenv';
import * as smartlog from '@push.rocks/smartlog';
import * as path from 'path';