Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
a6cd0cb579 | |||
bd6109d5ea | |||
aa632a5294 | |||
6499dd45cf | |||
d04ed21607 | |||
bae776d4e9 |
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@push.rocks/taskbuffer",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.4",
|
||||
"private": false,
|
||||
"description": "flexible task management. TypeScript ready!",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -29,13 +29,13 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/taskbuffer#readme",
|
||||
"dependencies": {
|
||||
"@push.rocks/isounique": "^1.0.5",
|
||||
"@push.rocks/lik": "^6.0.3",
|
||||
"@push.rocks/lik": "^6.0.5",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"@push.rocks/smartlog": "^3.0.3",
|
||||
"@push.rocks/smartpromise": "^4.0.3",
|
||||
"@push.rocks/smartrx": "^3.0.6",
|
||||
"@push.rocks/smarttime": "^4.0.4"
|
||||
"@push.rocks/smarttime": "^4.0.5",
|
||||
"@push.rocks/smartunique": "^3.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
@ -43,7 +43,7 @@
|
||||
"@gitzone/tsrun": "^1.2.44",
|
||||
"@gitzone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.4.10"
|
||||
"@types/node": "^20.5.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
119
pnpm-lock.yaml
generated
119
pnpm-lock.yaml
generated
@ -5,12 +5,9 @@ settings:
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
'@push.rocks/isounique':
|
||||
specifier: ^1.0.5
|
||||
version: 1.0.5
|
||||
'@push.rocks/lik':
|
||||
specifier: ^6.0.3
|
||||
version: 6.0.3
|
||||
specifier: ^6.0.5
|
||||
version: 6.0.5
|
||||
'@push.rocks/smartdelay':
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.5
|
||||
@ -24,8 +21,11 @@ dependencies:
|
||||
specifier: ^3.0.6
|
||||
version: 3.0.6
|
||||
'@push.rocks/smarttime':
|
||||
specifier: ^4.0.4
|
||||
version: 4.0.4
|
||||
specifier: ^4.0.5
|
||||
version: 4.0.5
|
||||
'@push.rocks/smartunique':
|
||||
specifier: ^3.0.6
|
||||
version: 3.0.6
|
||||
|
||||
devDependencies:
|
||||
'@gitzone/tsbuild':
|
||||
@ -36,16 +36,16 @@ devDependencies:
|
||||
version: 2.0.8
|
||||
'@gitzone/tsrun':
|
||||
specifier: ^1.2.44
|
||||
version: 1.2.44(@types/node@20.4.10)
|
||||
version: 1.2.44(@types/node@20.5.0)
|
||||
'@gitzone/tstest':
|
||||
specifier: ^1.0.77
|
||||
version: 1.0.77(@types/node@20.4.10)(sinon@15.2.0)
|
||||
version: 1.0.77(@types/node@20.5.0)(sinon@15.2.0)
|
||||
'@push.rocks/tapbundle':
|
||||
specifier: ^5.0.15
|
||||
version: 5.0.15(sinon@15.2.0)
|
||||
'@types/node':
|
||||
specifier: ^20.4.10
|
||||
version: 20.4.10
|
||||
specifier: ^20.5.0
|
||||
version: 20.5.0
|
||||
|
||||
packages:
|
||||
|
||||
@ -398,13 +398,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@gitzone/tsrun@1.2.44(@types/node@20.4.10):
|
||||
/@gitzone/tsrun@1.2.44(@types/node@20.5.0):
|
||||
resolution: {integrity: sha512-7AfL9u+TmD7gLiRaTCimhWm5rq9GGBQnOF4q1FnFh2CAb1FbK5fzUVbj6wo3zGS2H+MSm6dqFA6mvdBI1ox0mQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@push.rocks/smartfile': 10.0.28
|
||||
'@push.rocks/smartshell': 3.0.3
|
||||
ts-node: 10.9.1(@types/node@20.4.10)(typescript@5.1.6)
|
||||
ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.1.6)
|
||||
typescript: 5.1.6
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
@ -413,13 +413,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@gitzone/tstest@1.0.77(@types/node@20.4.10)(sinon@15.2.0):
|
||||
/@gitzone/tstest@1.0.77(@types/node@20.5.0)(sinon@15.2.0):
|
||||
resolution: {integrity: sha512-YzBXnNqkYOiFf8xAA+m8owblrmAut8ukINghYy4DXoUR+5g1IKrpTjK4A8HzIsvVsQRyHPsQ2YFtsk+utqdivQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@apiglobal/typedserver': 2.0.65
|
||||
'@gitzone/tsbundle': 2.0.8
|
||||
'@gitzone/tsrun': 1.2.44(@types/node@20.4.10)
|
||||
'@gitzone/tsrun': 1.2.44(@types/node@20.5.0)
|
||||
'@push.rocks/consolecolor': 2.0.1
|
||||
'@push.rocks/smartbrowser': 2.0.5
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
@ -582,14 +582,14 @@ packages:
|
||||
/@push.rocks/isounique@1.0.5:
|
||||
resolution: {integrity: sha512-Z0BVqZZOCif1THTbIKWMgg0wxCzt9CyBtBBqQJiZ+jJ0KlQFrQHNHrPt81/LXe/L4x0cxWsn0bpL6W5DNSvNLw==}
|
||||
|
||||
/@push.rocks/lik@6.0.3:
|
||||
resolution: {integrity: sha512-YPA2PfubtD6YSWo5AXx8J10ZbEMkGezrBw93+2jq7ASSNnmGnXYMNuCOnfj+ZLqT7mT0cQOaUxmfyBKF1gG+ng==}
|
||||
/@push.rocks/lik@6.0.5:
|
||||
resolution: {integrity: sha512-rDSPVknpJDcY3yx4w3lNQfpRkBRuxYVIJKrkiODdH27X0z3+XU4e/iAWKySuLq6H7dAoxSHJDf6BrCO+3Y8kcw==}
|
||||
dependencies:
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartmatch': 2.0.0
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smartrx': 3.0.6
|
||||
'@push.rocks/smarttime': 4.0.4
|
||||
'@push.rocks/smarttime': 4.0.5
|
||||
'@types/minimatch': 5.1.2
|
||||
'@types/symbol-tree': 3.2.2
|
||||
symbol-tree: 3.2.4
|
||||
@ -634,7 +634,7 @@ packages:
|
||||
/@push.rocks/smartfile@10.0.28:
|
||||
resolution: {integrity: sha512-Bza5xwJuXGeIokr9xeLx1LSGuXvIYLtJimz0X6lB2Sv2kurlIjpb+/ix4KqsG9eBhvzo6ncqqjgnLAUyUQQjfw==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.3
|
||||
'@push.rocks/lik': 6.0.5
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile-interfaces': 1.0.7
|
||||
'@push.rocks/smarthash': 3.0.2
|
||||
@ -742,10 +742,10 @@ packages:
|
||||
through2: 4.0.2
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smarttime@4.0.4:
|
||||
resolution: {integrity: sha512-PTYxvl6Rr5eSOKPbB0S5+ym6z6zfI/e1wqmVxX8QjnZ5ZIvhGfAoCZ7sie+Zd4OJ4nCG8UClgk5LrFaN3zUnZA==}
|
||||
/@push.rocks/smarttime@4.0.5:
|
||||
resolution: {integrity: sha512-vf0Jh+jnMt59l4zbmxdkoPdIMhtO5ghFQn8wn9hX+oOtog56ddrwvdubs9CtDNCPoA8YEKL8Izp1uY21NIgrmA==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.3
|
||||
'@push.rocks/lik': 6.0.5
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
croner: 5.7.0
|
||||
@ -753,6 +753,14 @@ packages:
|
||||
is-nan: 1.3.2
|
||||
pretty-ms: 8.0.0
|
||||
|
||||
/@push.rocks/smartunique@3.0.6:
|
||||
resolution: {integrity: sha512-/fvh5BBHiTvZcCH4km2Oh3f0spfcWKr7e0Dp6lAb3rJq+5KiO7fQmI1UcQ9clADUaaJOn8sPzseiLt+kJ2tajw==}
|
||||
dependencies:
|
||||
'@types/uuid': 9.0.2
|
||||
nanoid: 4.0.2
|
||||
uuid: 9.0.0
|
||||
dev: false
|
||||
|
||||
/@push.rocks/smarturl@3.0.7:
|
||||
resolution: {integrity: sha512-nx4EWjQD9JeO7QVbOsxd1PFeDQYoSQOOOYCZ+r7QWXHLJG52iYzgvJDCQyX6p705HDkYMJWozW2ZzhR22qLKbw==}
|
||||
dev: true
|
||||
@ -765,7 +773,7 @@ packages:
|
||||
'@push.rocks/smartenv': 5.0.5
|
||||
'@push.rocks/smartexpect': 1.0.21
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smarttime': 4.0.4
|
||||
'@push.rocks/smarttime': 4.0.5
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- sinon
|
||||
@ -1476,7 +1484,7 @@ packages:
|
||||
/@types/accepts@1.3.5:
|
||||
resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/babel__code-frame@7.0.3:
|
||||
@ -1487,7 +1495,7 @@ packages:
|
||||
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
|
||||
dependencies:
|
||||
'@types/connect': 3.4.35
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/buffer-json@2.0.1:
|
||||
@ -1514,14 +1522,14 @@ packages:
|
||||
/@types/clean-css@4.2.6:
|
||||
resolution: {integrity: sha512-Ze1tf+LnGPmG6hBFMi0B4TEB0mhF7EiMM5oyjLDNPE9hxrPU0W+5+bHvO+eFPA+bt0iC1zkQMoU/iGdRVjcRbw==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@types/co-body@6.1.0:
|
||||
resolution: {integrity: sha512-3e0q2jyDAnx/DSZi0z2H0yoZ2wt5yRDZ+P7ymcMObvq0ufWRT4tsajyO+Q1VwVWiv9PRR4W3YEjEzBjeZlhF+w==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
'@types/qs': 6.9.7
|
||||
dev: true
|
||||
|
||||
@ -1534,7 +1542,7 @@ packages:
|
||||
/@types/connect@3.4.35:
|
||||
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/content-disposition@0.5.5:
|
||||
@ -1555,13 +1563,13 @@ packages:
|
||||
'@types/connect': 3.4.35
|
||||
'@types/express': 4.17.17
|
||||
'@types/keygrip': 1.0.2
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/cors@2.8.13:
|
||||
resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/debounce@1.2.1:
|
||||
@ -1575,7 +1583,7 @@ packages:
|
||||
/@types/express-serve-static-core@4.17.35:
|
||||
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
'@types/qs': 6.9.7
|
||||
'@types/range-parser': 1.2.4
|
||||
'@types/send': 0.17.1
|
||||
@ -1593,27 +1601,27 @@ packages:
|
||||
/@types/finalhandler@1.2.0:
|
||||
resolution: {integrity: sha512-NgEZKOhxUSXkwNnWNaMXZaopQ5aFGPAYiEpEWIkQ6Dzc4iS0M1oQsvWne2t+ex9QZUAdTz/ZT4tOXJhWtP6mCw==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/from2@2.3.2:
|
||||
resolution: {integrity: sha512-s1pdctxW2+CA4FOxxTBRxC3RKQL9Br1a2s2LngP4jh1BI84JBL3mDXj87EwcckN9z/IXp8o3ySmvZveGEAAwqw==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/fs-extra@11.0.1:
|
||||
resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==}
|
||||
dependencies:
|
||||
'@types/jsonfile': 6.1.1
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/glob@8.1.0:
|
||||
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
|
||||
dependencies:
|
||||
'@types/minimatch': 5.1.2
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/html-minifier@4.0.2:
|
||||
@ -1663,7 +1671,7 @@ packages:
|
||||
/@types/jsonfile@6.1.1:
|
||||
resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/keygrip@1.0.2:
|
||||
@ -1686,7 +1694,7 @@ packages:
|
||||
'@types/http-errors': 2.0.1
|
||||
'@types/keygrip': 1.0.2
|
||||
'@types/koa-compose': 3.2.5
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/mime-types@2.1.1:
|
||||
@ -1712,8 +1720,8 @@ packages:
|
||||
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
|
||||
dev: true
|
||||
|
||||
/@types/node@20.4.10:
|
||||
resolution: {integrity: sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==}
|
||||
/@types/node@20.5.0:
|
||||
resolution: {integrity: sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==}
|
||||
dev: true
|
||||
|
||||
/@types/parse5@6.0.3:
|
||||
@ -1744,7 +1752,7 @@ packages:
|
||||
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
|
||||
dependencies:
|
||||
'@types/mime': 1.3.2
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/serve-static@1.15.2:
|
||||
@ -1752,7 +1760,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/http-errors': 2.0.1
|
||||
'@types/mime': 3.0.1
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/shortid@0.0.29:
|
||||
@ -1782,7 +1790,7 @@ packages:
|
||||
/@types/through2@2.0.38:
|
||||
resolution: {integrity: sha512-YFu+nHmjxMurkH1BSzA0Z1WrKDAY8jUKPZctNQn7mc+/KKtp2XxnclHFXxdB1m7Iqnzb5aywgP8TMK283LezGQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/trusted-types@2.0.3:
|
||||
@ -1799,6 +1807,10 @@ packages:
|
||||
resolution: {integrity: sha512-hKB88y3YHL8oPOs/CNlaXtjWn93+Bs48sDQR37ZUqG2tLeCS7EA1cmnkKsuQsub9OKEB/y/Rw9zqJqqNSbqVlQ==}
|
||||
dev: true
|
||||
|
||||
/@types/uuid@9.0.2:
|
||||
resolution: {integrity: sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==}
|
||||
dev: false
|
||||
|
||||
/@types/which@2.0.2:
|
||||
resolution: {integrity: sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==}
|
||||
dev: true
|
||||
@ -1810,14 +1822,14 @@ packages:
|
||||
/@types/ws@7.4.7:
|
||||
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
|
||||
/@types/yauzl@2.10.0:
|
||||
resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
@ -2737,7 +2749,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/cookie': 0.4.1
|
||||
'@types/cors': 2.8.13
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
accepts: 1.3.8
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.2
|
||||
@ -2757,7 +2769,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/cookie': 0.4.1
|
||||
'@types/cors': 2.8.13
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
accepts: 1.3.8
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.2
|
||||
@ -4259,6 +4271,12 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/nanoid@4.0.2:
|
||||
resolution: {integrity: sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==}
|
||||
engines: {node: ^14 || ^16 || >=18}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/negotiator@0.6.3:
|
||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@ -5306,7 +5324,7 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/ts-node@10.9.1(@types/node@20.4.10)(typescript@5.1.6):
|
||||
/ts-node@10.9.1(@types/node@20.5.0)(typescript@5.1.6):
|
||||
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@ -5325,7 +5343,7 @@ packages:
|
||||
'@tsconfig/node12': 1.0.11
|
||||
'@tsconfig/node14': 1.0.3
|
||||
'@tsconfig/node16': 1.0.4
|
||||
'@types/node': 20.4.10
|
||||
'@types/node': 20.5.0
|
||||
acorn: 8.10.0
|
||||
acorn-walk: 8.2.0
|
||||
arg: 4.1.3
|
||||
@ -5505,6 +5523,11 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/uuid@9.0.0:
|
||||
resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/v8-compile-cache-lib@3.0.1:
|
||||
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
|
||||
dev: true
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/taskbuffer',
|
||||
version: '3.1.1',
|
||||
version: '3.1.4',
|
||||
description: 'flexible task management. TypeScript ready!'
|
||||
}
|
||||
|
@ -2,13 +2,11 @@ import { Task } from './taskbuffer.classes.task.js';
|
||||
import * as plugins from './taskbuffer.plugins.js';
|
||||
|
||||
/**
|
||||
* constains all data for the final coordinator to actually make an informed decision
|
||||
* Contains all data for the final coordinator to make an informed decision.
|
||||
*/
|
||||
export interface IDistributedTaskRequest {
|
||||
/**
|
||||
* this needs to correlate to the consultationResult
|
||||
*/
|
||||
submitterRandomId: string;
|
||||
submitterId: string;
|
||||
requestResponseId: string;
|
||||
taskName: string;
|
||||
taskVersion: string;
|
||||
taskExecutionTime: number;
|
||||
@ -18,24 +16,22 @@ export interface IDistributedTaskRequest {
|
||||
}
|
||||
|
||||
export interface IDistributedTaskRequestResult {
|
||||
/**
|
||||
* this needs to correlate to the decisionInfoBasis
|
||||
*/
|
||||
submitterRandomId: string;
|
||||
/**
|
||||
* can be used while debugging
|
||||
*/
|
||||
submitterId: string;
|
||||
considered: boolean;
|
||||
rank: string;
|
||||
rank: number;
|
||||
reason: string;
|
||||
shouldTrigger: boolean;
|
||||
}
|
||||
|
||||
export abstract class AbstractDistributedCoordinator {
|
||||
public abstract fireDistributedTaskRequest(
|
||||
infoBasisArg: IDistributedTaskRequest
|
||||
infoBasis: IDistributedTaskRequest
|
||||
): Promise<IDistributedTaskRequestResult>;
|
||||
|
||||
public abstract updateDistributedTaskRequest(
|
||||
infoBasisArg: IDistributedTaskRequest
|
||||
infoBasis: IDistributedTaskRequest
|
||||
): Promise<void>;
|
||||
|
||||
public abstract start(): Promise<void>;
|
||||
public abstract stop(): Promise<void>;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as plugins from './taskbuffer.plugins.js';
|
||||
import { Task } from './taskbuffer.classes.task.js';
|
||||
import { AbstractDistributedCoordinator } from './taskbuffer.classes.distributedcoordinator.js';
|
||||
import { AbstractDistributedCoordinator, type IDistributedTaskRequestResult } from './taskbuffer.classes.distributedcoordinator.js';
|
||||
|
||||
export interface ICronJob {
|
||||
cronString: string;
|
||||
taskNameArg: string;
|
||||
taskName: string;
|
||||
job: any;
|
||||
}
|
||||
|
||||
@ -13,57 +13,37 @@ export interface ITaskManagerConstructorOptions {
|
||||
}
|
||||
|
||||
export class TaskManager {
|
||||
public randomId = plugins.isounique.uni();
|
||||
public randomId = plugins.smartunique.shortId();
|
||||
public taskMap = new plugins.lik.ObjectMap<Task>();
|
||||
private cronJobManager = new plugins.smarttime.CronManager();
|
||||
|
||||
public options: ITaskManagerConstructorOptions = {
|
||||
distributedCoordinator: null,
|
||||
};
|
||||
|
||||
constructor(optionsArg: ITaskManagerConstructorOptions = {}) {
|
||||
this.options = Object.assign(this.options, optionsArg);
|
||||
constructor(options: ITaskManagerConstructorOptions = {}) {
|
||||
this.options = Object.assign(this.options, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if a task is already present
|
||||
* @param taskNameArg
|
||||
*/
|
||||
public getTaskByName(taskNameArg: string): Task {
|
||||
return this.taskMap.findSync((itemArg) => {
|
||||
return itemArg.name === taskNameArg;
|
||||
});
|
||||
public getTaskByName(taskName: string): Task {
|
||||
return this.taskMap.findSync((task) => task.name === taskName);
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a Task to the TaskManager
|
||||
* @param taskArg
|
||||
*/
|
||||
public addTask(taskArg: Task): void {
|
||||
if (!taskArg.name) {
|
||||
throw new Error('taskArg needs a name to be added to taskManager');
|
||||
public addTask(task: Task): void {
|
||||
if (!task.name) {
|
||||
throw new Error('Task must have a name to be added to taskManager');
|
||||
}
|
||||
this.taskMap.add(taskArg);
|
||||
this.taskMap.add(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* adds and schedules a task at once
|
||||
* @param taskArg
|
||||
* @param cronStringArg
|
||||
*/
|
||||
public addAndScheduleTask(taskArg: Task, cronStringArg: string) {
|
||||
this.addTask(taskArg);
|
||||
this.scheduleTaskByName(taskArg.name, cronStringArg);
|
||||
public addAndScheduleTask(task: Task, cronString: string) {
|
||||
this.addTask(task);
|
||||
this.scheduleTaskByName(task.name, cronString);
|
||||
}
|
||||
|
||||
/**
|
||||
* triggers a task in the TaskManagerByName
|
||||
* @param taskNameArg
|
||||
*/
|
||||
public triggerTaskByName(taskNameArg: string): Promise<any> {
|
||||
const taskToTrigger = this.getTaskByName(taskNameArg);
|
||||
public async triggerTaskByName(taskName: string): Promise<any> {
|
||||
const taskToTrigger = this.getTaskByName(taskName);
|
||||
if (!taskToTrigger) {
|
||||
throw new Error(`There is no task with the name of ${taskNameArg}`);
|
||||
throw new Error(`No task with the name ${taskName} found.`);
|
||||
}
|
||||
return taskToTrigger.trigger();
|
||||
}
|
||||
@ -72,96 +52,88 @@ export class TaskManager {
|
||||
return task.trigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* schedules the task by name
|
||||
* @param taskNameArg
|
||||
*/
|
||||
public scheduleTaskByName(taskNameArg: string, cronStringArg: string) {
|
||||
const taskToSchedule = this.getTaskByName(taskNameArg);
|
||||
const cronJob = this.cronJobManager.addCronjob(
|
||||
cronStringArg,
|
||||
async (triggerTimeArg: number) => {
|
||||
console.log(`taskbuffer schedule triggered task >>${taskToSchedule.name}<<`);
|
||||
console.log(
|
||||
`task >>${taskToSchedule.name}<< is ${
|
||||
taskToSchedule.buffered
|
||||
? `buffered with max ${taskToSchedule.bufferMax} buffered calls`
|
||||
: `unbuffered`
|
||||
}`
|
||||
);
|
||||
if (this.options.distributedCoordinator) {
|
||||
console.log(`Found a distrubuted coordinator, performing distributed consultation.`);
|
||||
const announcementResult =
|
||||
await this.options.distributedCoordinator.fireDistributedTaskRequest({
|
||||
submitterRandomId: this.randomId,
|
||||
status: 'requesting',
|
||||
taskExecutionParallel: 1,
|
||||
taskExecutionTime: triggerTimeArg,
|
||||
taskExecutionTimeout: taskToSchedule.timeout,
|
||||
taskName: taskToSchedule.name,
|
||||
taskVersion: taskToSchedule.version,
|
||||
});
|
||||
|
||||
if (!announcementResult.shouldTrigger) {
|
||||
console.log('distributed coordinator result: NOT EXECUTING');
|
||||
return;
|
||||
} else {
|
||||
console.log('distributed coordinator result: CHOSEN AND EXECUTING');
|
||||
}
|
||||
}
|
||||
await taskToSchedule.trigger();
|
||||
}
|
||||
);
|
||||
taskToSchedule.cronJob = cronJob;
|
||||
public scheduleTaskByName(taskName: string, cronString: string) {
|
||||
const taskToSchedule = this.getTaskByName(taskName);
|
||||
if (!taskToSchedule) {
|
||||
throw new Error(`No task with the name ${taskName} found.`);
|
||||
}
|
||||
this.handleTaskScheduling(taskToSchedule, cronString);
|
||||
}
|
||||
|
||||
/**
|
||||
* deschedules a task by name
|
||||
* @param taskNameArg
|
||||
*/
|
||||
public descheduleTaskByName(taskNameArg: string) {
|
||||
const taskToDeSchedule = this.getTaskByName(taskNameArg);
|
||||
if (taskToDeSchedule.cronJob) {
|
||||
this.cronJobManager.removeCronjob(taskToDeSchedule.cronJob);
|
||||
taskToDeSchedule.cronJob = null;
|
||||
private handleTaskScheduling(task: Task, cronString: string) {
|
||||
const cronJob = this.cronJobManager.addCronjob(
|
||||
cronString,
|
||||
async (triggerTime: number) => {
|
||||
this.logTaskState(task);
|
||||
if (this.options.distributedCoordinator) {
|
||||
const announcementResult = await this.performDistributedConsultation(task, triggerTime);
|
||||
if (!announcementResult.shouldTrigger) {
|
||||
console.log('Distributed coordinator result: NOT EXECUTING');
|
||||
return;
|
||||
} else {
|
||||
console.log('Distributed coordinator result: CHOSEN AND EXECUTING');
|
||||
}
|
||||
}
|
||||
await task.trigger();
|
||||
}
|
||||
);
|
||||
task.cronJob = cronJob;
|
||||
}
|
||||
|
||||
private logTaskState(task: Task) {
|
||||
console.log(`Taskbuffer schedule triggered task >>${task.name}<<`);
|
||||
const bufferState = task.buffered
|
||||
? `buffered with max ${task.bufferMax} buffered calls`
|
||||
: `unbuffered`;
|
||||
console.log(`Task >>${task.name}<< is ${bufferState}`);
|
||||
}
|
||||
|
||||
private async performDistributedConsultation(task: Task, triggerTime: number): Promise<IDistributedTaskRequestResult> {
|
||||
console.log('Found a distributed coordinator, performing consultation.');
|
||||
|
||||
return this.options.distributedCoordinator.fireDistributedTaskRequest({
|
||||
submitterId: this.randomId,
|
||||
requestResponseId: plugins.smartunique.shortId(),
|
||||
status: 'requesting',
|
||||
taskExecutionParallel: 1,
|
||||
taskExecutionTime: triggerTime,
|
||||
taskExecutionTimeout: task.timeout,
|
||||
taskName: task.name,
|
||||
taskVersion: task.version,
|
||||
});
|
||||
}
|
||||
|
||||
public descheduleTaskByName(taskName: string) {
|
||||
const task = this.getTaskByName(taskName);
|
||||
if (task && task.cronJob) {
|
||||
this.cronJobManager.removeCronjob(task.cronJob);
|
||||
task.cronJob = null;
|
||||
}
|
||||
if (this.cronJobManager.cronjobs.isEmpty) {
|
||||
this.cronJobManager.stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* deschedules a task
|
||||
* @param task
|
||||
*/
|
||||
public async descheduleTask(task: Task) {
|
||||
await this.descheduleTaskByName(task.name);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the schedule of a specific task
|
||||
* @param taskNameArg
|
||||
*/
|
||||
public getScheduleForTaskName(taskNameArg: string): string | null {
|
||||
const task = this.getTaskByName(taskNameArg);
|
||||
if (!task || !task.cronJob) {
|
||||
return null;
|
||||
public getScheduleForTaskName(taskName: string): string | null {
|
||||
const task = this.getTaskByName(taskName);
|
||||
return task && task.cronJob ? task.cronJob.cronExpression : null;
|
||||
}
|
||||
return task.cronJob.cronExpression;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* starts the taskmanager
|
||||
*/
|
||||
public start() {
|
||||
public async start() {
|
||||
if (this.options.distributedCoordinator) {
|
||||
await this.options.distributedCoordinator.start();
|
||||
}
|
||||
this.cronJobManager.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* stops the taskmanager
|
||||
*/
|
||||
public stop() {
|
||||
public async stop() {
|
||||
this.cronJobManager.stop();
|
||||
if (this.options.distributedCoordinator) {
|
||||
await this.options.distributedCoordinator.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import * as isounique from '@push.rocks/isounique';
|
||||
import * as lik from '@push.rocks/lik';
|
||||
import * as smartlog from '@push.rocks/smartlog';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
import * as smartrx from '@push.rocks/smartrx';
|
||||
import * as smarttime from '@push.rocks/smarttime';
|
||||
import * as smartunique from '@push.rocks/smartunique';
|
||||
|
||||
export { isounique, lik, smartlog, smartpromise, smartdelay, smartrx, smarttime };
|
||||
export { lik, smartlog, smartpromise, smartdelay, smartrx, smarttime, smartunique };
|
||||
|
Reference in New Issue
Block a user