update
This commit is contained in:
parent
99fa906630
commit
0e64a2076b
172
package-lock.json
generated
172
package-lock.json
generated
@ -11,7 +11,8 @@
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartnetwork": "^2.0.14",
|
||||
"@pushrocks/smartrequest": "^1.1.56"
|
||||
"@pushrocks/smartrequest": "^1.1.56",
|
||||
"@pushrocks/taskbuffer": "^2.1.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
@ -56,7 +57,6 @@
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@apiglobal/typedrequest/node_modules/@pushrocks/lik": {
|
||||
@ -2284,7 +2284,6 @@
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fisounique/-/isounique-1.0.5.tgz",
|
||||
"integrity": "sha512-XYeoKGkmIdsWX64NlPA1fuA41n/1bQ7LdYXytlU/QqYeW7ojgA0ARRhBSh/2phL6o0Jpw6K/7gJ8jc7ab/Tc+w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@pushrocks/lik": {
|
||||
@ -2636,7 +2635,6 @@
|
||||
"version": "2.0.44",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.44.tgz",
|
||||
"integrity": "sha512-ztZRfePWdQhNM9KNc8YQk5UYt2WsVIVNczn0tIuulYm7czazUhRh0yYhW4LT2pk/Cika03gDApqyH1ASsVhikw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
@ -2659,7 +2657,6 @@
|
||||
"version": "2.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.22.tgz",
|
||||
"integrity": "sha512-blvtNLgYz08F5EhftxfzLEkQ3VE9uoXRVQukbVpwJ4Zk0QRkNg2VCkuJu/kkfbtlCEOEOG2HCZDyhbxeEeq0pA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15"
|
||||
@ -2676,7 +2673,6 @@
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmatch/-/smartmatch-1.0.7.tgz",
|
||||
"integrity": "sha512-D+lK5HIKO4Kj1Jm/ycKvy1VzDJ3V6ucHqmf5DMBFdm18BrMj2Zb6M7wN8HUKtkfHvOI7ig85JMuANSEyO7kAPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"matcher": "^3.0.0"
|
||||
@ -2833,7 +2829,6 @@
|
||||
"version": "2.0.25",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.25.tgz",
|
||||
"integrity": "sha512-fryDJvjRdVYsH30xqR+bicp5poTdz7KYZ7Kqm+Yth0Qtk0x7NazENaTJATnWqGSiCbk9GrufVUTKWsT+uIT6kQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
@ -2844,7 +2839,6 @@
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-7.5.4.tgz",
|
||||
"integrity": "sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
@ -2950,7 +2944,6 @@
|
||||
"version": "3.0.45",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
||||
"integrity": "sha512-3E/92Qmq7h2SpaA1TcVmWD02forTNQqEPE7xpk2dv/ussr/qb3WiM/c/D7Oe4lLuPxit0aJrcZlbtQs0H79uRg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.4",
|
||||
@ -2966,7 +2959,6 @@
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-5.0.4.tgz",
|
||||
"integrity": "sha512-Ydr1qwu/CYQiG9ZymhhNbyUQKIp6Yo6T9wsxR/D3iDs/h4vabkaFzcE47yNz+quMX/4kQaGthb77xxiXTnsVdQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
@ -3078,6 +3070,34 @@
|
||||
"@pushrocks/smarttime": "^3.0.45"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/taskbuffer": {
|
||||
"version": "2.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@pushrocks/taskbuffer/-/taskbuffer-2.1.17.tgz",
|
||||
"integrity": "sha512-fnQKN5oOUHF0+uzf9okIDFaeRgb+9c0xEUnTKVVJ5kN1FvRKn2s1czoOS9whEPsAXLhh/HydIb6PpQeXrrDO+A==",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartlog": "^2.0.44",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smarttime": "^3.0.43",
|
||||
"@types/cron": "^1.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/taskbuffer/node_modules/@pushrocks/lik": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-5.0.4.tgz",
|
||||
"integrity": "sha512-Ydr1qwu/CYQiG9ZymhhNbyUQKIp6Yo6T9wsxR/D3iDs/h4vabkaFzcE47yNz+quMX/4kQaGthb77xxiXTnsVdQ==",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"@pushrocks/smarttime": "^3.0.43",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
"symbol-tree": "^3.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@pushrocks/webrequest": {
|
||||
"version": "2.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-2.0.15.tgz",
|
||||
@ -3357,6 +3377,15 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/cron": {
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/cron/-/cron-1.7.3.tgz",
|
||||
"integrity": "sha512-iPmUXyIJG1Js+ldPYhOQcYU3kCAQ2FWrSkm1FJPoii2eYSn6wEW6onPukNTT0bfiflexNSRPl6KWmAIqS+36YA==",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/default-gateway": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fdefault-gateway/-/default-gateway-3.0.1.tgz",
|
||||
@ -3496,14 +3525,12 @@
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.5.tgz",
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.21",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.21.tgz",
|
||||
"integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/parcel-bundler": {
|
||||
@ -4759,7 +4786,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
@ -5583,7 +5609,6 @@
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/croner/-/croner-4.2.0.tgz",
|
||||
"integrity": "sha512-1wZgmxS4t1WkUWppjgmKkOhXgRAwklVeDWfdUzi4dHDOZgezpw2XCqQ1XCXyV+sPsgKk2H8RYhxI0ZfBVekWvA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
@ -6111,7 +6136,6 @@
|
||||
"version": "1.10.7",
|
||||
"resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.10.7.tgz",
|
||||
"integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
@ -6215,7 +6239,6 @@
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/define-properties/-/define-properties-1.1.3.tgz",
|
||||
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"object-keys": "^1.0.12"
|
||||
@ -7539,7 +7562,6 @@
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/gensync": {
|
||||
@ -7566,7 +7588,6 @@
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
|
||||
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
@ -7767,7 +7788,6 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
@ -7830,7 +7850,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@ -8750,7 +8769,6 @@
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://verdaccio.lossless.one/is-nan/-/is-nan-1.3.2.tgz",
|
||||
"integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.0",
|
||||
@ -9677,7 +9695,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz",
|
||||
"integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^4.0.0"
|
||||
@ -9690,7 +9707,6 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
@ -10014,6 +10030,14 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz",
|
||||
@ -10371,7 +10395,6 @@
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@ -11056,7 +11079,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/parse-ms/-/parse-ms-2.1.0.tgz",
|
||||
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
@ -12035,7 +12057,6 @@
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/pretty-ms/-/pretty-ms-7.0.1.tgz",
|
||||
"integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"parse-ms": "^2.1.0"
|
||||
@ -14295,7 +14316,6 @@
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/systeminformation": {
|
||||
@ -14711,7 +14731,6 @@
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.3.1.tgz",
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/tslint": {
|
||||
@ -15848,8 +15867,7 @@
|
||||
"@apiglobal/typedrequest-interfaces": {
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA=="
|
||||
},
|
||||
"@apiglobal/typedsocket": {
|
||||
"version": "1.0.24",
|
||||
@ -17372,8 +17390,7 @@
|
||||
"@pushrocks/isounique": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fisounique/-/isounique-1.0.5.tgz",
|
||||
"integrity": "sha512-XYeoKGkmIdsWX64NlPA1fuA41n/1bQ7LdYXytlU/QqYeW7ojgA0ARRhBSh/2phL6o0Jpw6K/7gJ8jc7ab/Tc+w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-XYeoKGkmIdsWX64NlPA1fuA41n/1bQ7LdYXytlU/QqYeW7ojgA0ARRhBSh/2phL6o0Jpw6K/7gJ8jc7ab/Tc+w=="
|
||||
},
|
||||
"@pushrocks/lik": {
|
||||
"version": "4.0.22",
|
||||
@ -17689,7 +17706,6 @@
|
||||
"version": "2.0.44",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.44.tgz",
|
||||
"integrity": "sha512-ztZRfePWdQhNM9KNc8YQk5UYt2WsVIVNczn0tIuulYm7czazUhRh0yYhW4LT2pk/Cika03gDApqyH1ASsVhikw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.22"
|
||||
@ -17710,7 +17726,6 @@
|
||||
"version": "2.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.22.tgz",
|
||||
"integrity": "sha512-blvtNLgYz08F5EhftxfzLEkQ3VE9uoXRVQukbVpwJ4Zk0QRkNg2VCkuJu/kkfbtlCEOEOG2HCZDyhbxeEeq0pA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15"
|
||||
}
|
||||
@ -17725,7 +17740,6 @@
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartmatch/-/smartmatch-1.0.7.tgz",
|
||||
"integrity": "sha512-D+lK5HIKO4Kj1Jm/ycKvy1VzDJ3V6ucHqmf5DMBFdm18BrMj2Zb6M7wN8HUKtkfHvOI7ig85JMuANSEyO7kAPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"matcher": "^3.0.0"
|
||||
}
|
||||
@ -17872,7 +17886,6 @@
|
||||
"version": "2.0.25",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.25.tgz",
|
||||
"integrity": "sha512-fryDJvjRdVYsH30xqR+bicp5poTdz7KYZ7Kqm+Yth0Qtk0x7NazENaTJATnWqGSiCbk9GrufVUTKWsT+uIT6kQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"rxjs": "^7.5.2"
|
||||
@ -17882,7 +17895,6 @@
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-7.5.4.tgz",
|
||||
"integrity": "sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
@ -17985,7 +17997,6 @@
|
||||
"version": "3.0.45",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
||||
"integrity": "sha512-3E/92Qmq7h2SpaA1TcVmWD02forTNQqEPE7xpk2dv/ussr/qb3WiM/c/D7Oe4lLuPxit0aJrcZlbtQs0H79uRg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^5.0.4",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
@ -18000,7 +18011,6 @@
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-5.0.4.tgz",
|
||||
"integrity": "sha512-Ydr1qwu/CYQiG9ZymhhNbyUQKIp6Yo6T9wsxR/D3iDs/h4vabkaFzcE47yNz+quMX/4kQaGthb77xxiXTnsVdQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
@ -18096,6 +18106,36 @@
|
||||
"@pushrocks/smarttime": "^3.0.45"
|
||||
}
|
||||
},
|
||||
"@pushrocks/taskbuffer": {
|
||||
"version": "2.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@pushrocks/taskbuffer/-/taskbuffer-2.1.17.tgz",
|
||||
"integrity": "sha512-fnQKN5oOUHF0+uzf9okIDFaeRgb+9c0xEUnTKVVJ5kN1FvRKn2s1czoOS9whEPsAXLhh/HydIb6PpQeXrrDO+A==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartlog": "^2.0.44",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smarttime": "^3.0.43",
|
||||
"@types/cron": "^1.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-5.0.4.tgz",
|
||||
"integrity": "sha512-Ydr1qwu/CYQiG9ZymhhNbyUQKIp6Yo6T9wsxR/D3iDs/h4vabkaFzcE47yNz+quMX/4kQaGthb77xxiXTnsVdQ==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartmatch": "^1.0.7",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"@pushrocks/smarttime": "^3.0.43",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
"symbol-tree": "^3.2.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/webrequest": {
|
||||
"version": "2.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebrequest/-/webrequest-2.0.15.tgz",
|
||||
@ -18312,6 +18352,15 @@
|
||||
"integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/cron": {
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/cron/-/cron-1.7.3.tgz",
|
||||
"integrity": "sha512-iPmUXyIJG1Js+ldPYhOQcYU3kCAQ2FWrSkm1FJPoii2eYSn6wEW6onPukNTT0bfiflexNSRPl6KWmAIqS+36YA==",
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
},
|
||||
"@types/default-gateway": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fdefault-gateway/-/default-gateway-3.0.1.tgz",
|
||||
@ -18433,14 +18482,12 @@
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.5.tgz",
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.21",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.21.tgz",
|
||||
"integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ=="
|
||||
},
|
||||
"@types/parcel-bundler": {
|
||||
"version": "1.12.3",
|
||||
@ -19404,7 +19451,6 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
@ -20031,8 +20077,7 @@
|
||||
"croner": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/croner/-/croner-4.2.0.tgz",
|
||||
"integrity": "sha512-1wZgmxS4t1WkUWppjgmKkOhXgRAwklVeDWfdUzi4dHDOZgezpw2XCqQ1XCXyV+sPsgKk2H8RYhxI0ZfBVekWvA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-1wZgmxS4t1WkUWppjgmKkOhXgRAwklVeDWfdUzi4dHDOZgezpw2XCqQ1XCXyV+sPsgKk2H8RYhxI0ZfBVekWvA=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
@ -20432,8 +20477,7 @@
|
||||
"dayjs": {
|
||||
"version": "1.10.7",
|
||||
"resolved": "https://verdaccio.lossless.one/dayjs/-/dayjs-1.10.7.tgz",
|
||||
"integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==",
|
||||
"dev": true
|
||||
"integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig=="
|
||||
},
|
||||
"deasync": {
|
||||
"version": "0.1.24",
|
||||
@ -20505,7 +20549,6 @@
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/define-properties/-/define-properties-1.1.3.tgz",
|
||||
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"object-keys": "^1.0.12"
|
||||
}
|
||||
@ -21484,8 +21527,7 @@
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
},
|
||||
"gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
@ -21503,7 +21545,6 @@
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
|
||||
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
@ -21650,7 +21691,6 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
@ -21693,8 +21733,7 @@
|
||||
"has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
|
||||
},
|
||||
"has-tostringtag": {
|
||||
"version": "1.0.0",
|
||||
@ -22340,7 +22379,6 @@
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://verdaccio.lossless.one/is-nan/-/is-nan-1.3.2.tgz",
|
||||
"integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3"
|
||||
@ -23027,7 +23065,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz",
|
||||
"integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^4.0.0"
|
||||
},
|
||||
@ -23035,8 +23072,7 @@
|
||||
"escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -23273,6 +23309,11 @@
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
|
||||
"dev": true
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz",
|
||||
@ -23537,8 +23578,7 @@
|
||||
"object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||
},
|
||||
"object-visit": {
|
||||
"version": "1.0.1",
|
||||
@ -24057,8 +24097,7 @@
|
||||
"parse-ms": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/parse-ms/-/parse-ms-2.1.0.tgz",
|
||||
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA=="
|
||||
},
|
||||
"parse5": {
|
||||
"version": "5.1.0",
|
||||
@ -24789,7 +24828,6 @@
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/pretty-ms/-/pretty-ms-7.0.1.tgz",
|
||||
"integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"parse-ms": "^2.1.0"
|
||||
}
|
||||
@ -26470,8 +26508,7 @@
|
||||
"symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
||||
},
|
||||
"systeminformation": {
|
||||
"version": "5.11.4",
|
||||
@ -26759,8 +26796,7 @@
|
||||
"tslib": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.3.1.tgz",
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "6.1.3",
|
||||
|
@ -39,6 +39,7 @@
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartnetwork": "^2.0.14",
|
||||
"@pushrocks/smartrequest": "^1.1.56"
|
||||
"@pushrocks/smartrequest": "^1.1.56",
|
||||
"@pushrocks/taskbuffer": "^2.1.17"
|
||||
}
|
||||
}
|
||||
|
@ -6,12 +6,18 @@ import * as interfaces from './interfaces';
|
||||
*/
|
||||
export class Bobcat {
|
||||
// STATIC
|
||||
public static async createFromNetworkAddress(networkAddressArg: string) {
|
||||
public static minerAuthObject = {
|
||||
headers: {
|
||||
Authorization: 'Basic ' + Buffer.from('bobcat:miner').toString('base64')
|
||||
}
|
||||
}
|
||||
|
||||
public static async createFromNetworkAddress (networkAddressArg: string) {
|
||||
const newBobcat = new Bobcat(networkAddressArg);
|
||||
try {
|
||||
await newBobcat.checkMinerStatus();
|
||||
await newBobcat.gatherMinerDetails();
|
||||
} catch(err) {
|
||||
} catch (err) {
|
||||
console.log('initial adding completed with errors');
|
||||
}
|
||||
return newBobcat;
|
||||
@ -30,7 +36,7 @@ export class Bobcat {
|
||||
/**
|
||||
* checks the status of the miner
|
||||
*/
|
||||
public async checkMinerStatus() {
|
||||
public async checkMinerStatus () {
|
||||
const response = await plugins.smartrequest.getJson(`http://${this.networkAddress}/status.json`, {
|
||||
timeout: 30000
|
||||
});
|
||||
@ -42,7 +48,7 @@ export class Bobcat {
|
||||
/**
|
||||
* gathers the miner details
|
||||
*/
|
||||
public async gatherMinerDetails() {
|
||||
public async gatherMinerDetails () {
|
||||
const response = await plugins.smartrequest.getJson(`http://${this.networkAddress}/miner.json`, {
|
||||
timeout: 30000
|
||||
});
|
||||
@ -54,16 +60,18 @@ export class Bobcat {
|
||||
/**
|
||||
* runs maintenance on the bobcat
|
||||
*/
|
||||
public async runMaintenance() {
|
||||
public async runMaintenance () {
|
||||
await this.checkMinerStatus();
|
||||
await this.gatherMinerDetails();
|
||||
if (this.latestStatus.status === 'Synced') {
|
||||
if (this.latestStatus.status === 'Synced' && parseInt(this.latestStatus.gap) > -50 && parseInt(this.latestStatus.gap) < 50) {
|
||||
console.log(`Miner ${this.latestMinerDetails.animal} at ${this.networkAddress} is Synced. ok!`)
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.latestStatus.status === 'Syncing') {
|
||||
console.log(`Miner ${this.latestMinerDetails.animal} at ${this.networkAddress} is Syncing... ok!`)
|
||||
console.log(
|
||||
`Miner ${this.latestMinerDetails.animal} at ${this.networkAddress} is Syncing... ok!`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -77,15 +85,26 @@ export class Bobcat {
|
||||
}
|
||||
}
|
||||
|
||||
public async restart() {
|
||||
/**
|
||||
* triggers a fast resync
|
||||
*/
|
||||
public async triggerFastResync() {
|
||||
const response = await plugins.smartrequest.request(`http://${this.networkAddress}/admin/fastsync`, {
|
||||
method: 'POST',
|
||||
...Bobcat.minerAuthObject
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* restarts the miner
|
||||
*/
|
||||
public async restart () {
|
||||
console.log(`cooling down before restart`);
|
||||
await plugins.smartdelay.delayFor(10000);
|
||||
const response = await plugins.smartrequest.request(`http://${this.networkAddress}/admin/reboot`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: 'Basic ' + Buffer.from('bobcat:miner').toString('base64')
|
||||
},
|
||||
timeout: 30000
|
||||
timeout: 30000,
|
||||
...Bobcat.minerAuthObject
|
||||
});
|
||||
console.log(response.statusCode);
|
||||
}
|
||||
|
@ -1,13 +1,36 @@
|
||||
import * as plugins from './bobcat.plugins';
|
||||
import { Bobcat } from './bobcat.classes.bobcat';
|
||||
import { Bobcat } from './bobcat.classes.bobcat';
|
||||
|
||||
/**
|
||||
*
|
||||
* a manager for managing multiple bobcats
|
||||
*/
|
||||
export class BobcatManager {
|
||||
public taskmanager = new plugins.taskbuffer.TaskManager();
|
||||
public bobcats: Bobcat[] = [];
|
||||
|
||||
public async addBobcat(networkAddressArg: string) {
|
||||
/**
|
||||
* a store for knowing what has happened retrospectively
|
||||
*/
|
||||
public actionStore: {
|
||||
actionName: string;
|
||||
actionPayload: string;
|
||||
}[] = [];
|
||||
|
||||
constructor() {
|
||||
this.taskmanager.addAndScheduleTask(new plugins.taskbuffer.Task({
|
||||
name: 'contMaintenance',
|
||||
taskFunction: async () => {
|
||||
this.actionStore.
|
||||
await this.runMaintenance();
|
||||
}
|
||||
}), '0 0 * * * *');
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a bobcat to the manager
|
||||
* @param networkAddressArg
|
||||
*/
|
||||
public async addBobcat (networkAddressArg: string) {
|
||||
const newBobcat = await Bobcat.createFromNetworkAddress(networkAddressArg);
|
||||
this.bobcats.push(newBobcat);
|
||||
console.log(`added ${newBobcat.latestMinerDetails.animal} at ${newBobcat.networkAddress}`);
|
||||
@ -16,7 +39,7 @@ export class BobcatManager {
|
||||
/**
|
||||
* runs the maintenance on all managed bobcats
|
||||
*/
|
||||
public async runMaintenance() {
|
||||
public async runMaintenance () {
|
||||
console.log(`now running maintenance on ${this.bobcats.length} bobcats!`);
|
||||
console.log(`cooling down for 10 seconds`);
|
||||
await plugins.smartdelay.delayFor(10000);
|
||||
@ -25,4 +48,18 @@ export class BobcatManager {
|
||||
await bobcat.runMaintenance();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* starts continuous maintenance of the bobcat miners
|
||||
*/
|
||||
public async startTaskmanager () {
|
||||
this.taskmanager.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* stops the taskmanager
|
||||
*/
|
||||
public async stopTaskmanager () {
|
||||
this.taskmanager.stop();
|
||||
}
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartnetwork from '@pushrocks/smartnetwork';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as taskbuffer from '@pushrocks/taskbuffer';
|
||||
|
||||
export {
|
||||
smartdelay,
|
||||
smartnetwork,
|
||||
smartrequest
|
||||
smartrequest,
|
||||
taskbuffer,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user