fix(core): update
This commit is contained in:
		
							
								
								
									
										160
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										160
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1492,18 +1492,16 @@ | ||||
|       "dev": true | ||||
|     }, | ||||
|     "@pushrocks/lik": { | ||||
|       "version": "3.0.19", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.19.tgz", | ||||
|       "integrity": "sha512-N9uTtQmTJ/iZ/V7LMCKbVx/ZAmP+b8uId0pxV9Au9T0Ulu9wcg3vNpyTQARgdWfG+tI9Qc0NHgOEa9H5mbDcDA==", | ||||
|       "dev": true, | ||||
|       "version": "4.0.13", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz", | ||||
|       "integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==", | ||||
|       "requires": { | ||||
|         "@pushrocks/smartdelay": "^2.0.6", | ||||
|         "@pushrocks/smartdelay": "^2.0.9", | ||||
|         "@pushrocks/smartmatch": "^1.0.7", | ||||
|         "@pushrocks/smartpromise": "^3.0.6", | ||||
|         "@pushrocks/smartrx": "^2.0.5", | ||||
|         "@pushrocks/smarttime": "^3.0.12", | ||||
|         "@pushrocks/smartunique": "^3.0.1", | ||||
|         "@pushrocks/smartrx": "^2.0.15", | ||||
|         "@pushrocks/smarttime": "^3.0.18", | ||||
|         "@types/minimatch": "^3.0.3", | ||||
|         "minimatch": "^3.0.4", | ||||
|         "symbol-tree": "^3.2.4" | ||||
|       } | ||||
|     }, | ||||
| @@ -1532,6 +1530,24 @@ | ||||
|         "@types/yargs": "^15.0.4", | ||||
|         "rxjs": "^6.5.5", | ||||
|         "yargs": "^15.3.1" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "@pushrocks/lik": { | ||||
|           "version": "3.0.19", | ||||
|           "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.19.tgz", | ||||
|           "integrity": "sha512-N9uTtQmTJ/iZ/V7LMCKbVx/ZAmP+b8uId0pxV9Au9T0Ulu9wcg3vNpyTQARgdWfG+tI9Qc0NHgOEa9H5mbDcDA==", | ||||
|           "dev": true, | ||||
|           "requires": { | ||||
|             "@pushrocks/smartdelay": "^2.0.6", | ||||
|             "@pushrocks/smartpromise": "^3.0.6", | ||||
|             "@pushrocks/smartrx": "^2.0.5", | ||||
|             "@pushrocks/smarttime": "^3.0.12", | ||||
|             "@pushrocks/smartunique": "^3.0.1", | ||||
|             "@types/minimatch": "^3.0.3", | ||||
|             "minimatch": "^3.0.4", | ||||
|             "symbol-tree": "^3.2.4" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartdelay": { | ||||
| @@ -1553,16 +1569,6 @@ | ||||
|         "@types/node": "^14.0.14" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartevent": { | ||||
|       "version": "2.0.5", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartevent/-/smartevent-2.0.5.tgz", | ||||
|       "integrity": "sha512-2cromUAgMFOLxi9IuAhDesWV4FGmsdNQV6k2OQZbH/0bMYeaCT5Q4IcMxb8J5F0S820XCXlwGdy5VP5M6L+hAA==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@pushrocks/smartpromise": "^3.0.6", | ||||
|         "@pushrocks/smartrx": "^2.0.5" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartexit": { | ||||
|       "version": "1.0.15", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexit/-/smartexit-1.0.15.tgz", | ||||
| @@ -1572,6 +1578,24 @@ | ||||
|         "@pushrocks/lik": "^3.0.5", | ||||
|         "@pushrocks/smartdelay": "^2.0.3", | ||||
|         "@pushrocks/smartlog-source-ora": "^1.0.7" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "@pushrocks/lik": { | ||||
|           "version": "3.0.19", | ||||
|           "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.19.tgz", | ||||
|           "integrity": "sha512-N9uTtQmTJ/iZ/V7LMCKbVx/ZAmP+b8uId0pxV9Au9T0Ulu9wcg3vNpyTQARgdWfG+tI9Qc0NHgOEa9H5mbDcDA==", | ||||
|           "dev": true, | ||||
|           "requires": { | ||||
|             "@pushrocks/smartdelay": "^2.0.6", | ||||
|             "@pushrocks/smartpromise": "^3.0.6", | ||||
|             "@pushrocks/smartrx": "^2.0.5", | ||||
|             "@pushrocks/smarttime": "^3.0.12", | ||||
|             "@pushrocks/smartunique": "^3.0.1", | ||||
|             "@types/minimatch": "^3.0.3", | ||||
|             "minimatch": "^3.0.4", | ||||
|             "symbol-tree": "^3.2.4" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartexpress": { | ||||
| @@ -1892,7 +1916,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" | ||||
|       } | ||||
| @@ -1997,15 +2020,13 @@ | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartrx": { | ||||
|       "version": "2.0.5", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.5.tgz", | ||||
|       "integrity": "sha512-BOlIJmnCO8pxqu9f18D9UV5rIsyrmKeK/mWNMiAe/NH2OTeRPNLpgmhZBkXSKNVD8tSsD8aazs4BcACgYOg1FQ==", | ||||
|       "dev": true, | ||||
|       "version": "2.0.17", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.17.tgz", | ||||
|       "integrity": "sha512-jzekKE+Wi/OoRPz/RyBL2LNTQCjb7NizFP3NuST/pl8xQWEu9omGVHNFQEzUDBYQS3D8fSV2tecDf7tKU/kggg==", | ||||
|       "requires": { | ||||
|         "@pushrocks/lik": "^3.0.11", | ||||
|         "@pushrocks/smartevent": "^2.0.3", | ||||
|         "@pushrocks/smartpromise": "^3.0.2", | ||||
|         "rxjs": "^6.5.3" | ||||
|         "@pushrocks/lik": "^4.0.13", | ||||
|         "@pushrocks/smartpromise": "^3.0.6", | ||||
|         "rxjs": "^6.5.5" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartshell": { | ||||
| @@ -2036,16 +2057,15 @@ | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smarttime": { | ||||
|       "version": "3.0.12", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.12.tgz", | ||||
|       "integrity": "sha512-NoMt1NUhNqcF5y7fCTHoC3d/+MobzgNUg6yHbSGxFRaentQzCrMPNahQIVLbrAStf03LUUBePUjSRdPYucP1gw==", | ||||
|       "dev": true, | ||||
|       "version": "3.0.20", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.20.tgz", | ||||
|       "integrity": "sha512-OWD+Ew8pwKXr84cb00y45AGk1rweXG3E9u4kNRUMM+lwFmzH10ykZUZbT+dVejd2ssjik+FOXNFwuoFV6AvQfw==", | ||||
|       "requires": { | ||||
|         "@pushrocks/smartdelay": "^2.0.10", | ||||
|         "@pushrocks/smartpromise": "^3.0.2", | ||||
|         "@types/cron": "^1.7.1", | ||||
|         "@types/luxon": "^1.15.1", | ||||
|         "cron": "^1.7.1", | ||||
|         "luxon": "^1.16.0" | ||||
|         "croner": "^1.1.23", | ||||
|         "dayjs": "^1.8.29", | ||||
|         "is-nan": "^1.3.0" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartunique": { | ||||
| @@ -2243,24 +2263,6 @@ | ||||
|         "@types/node": "*" | ||||
|       } | ||||
|     }, | ||||
|     "@types/cron": { | ||||
|       "version": "1.7.2", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fcron/-/cron-1.7.2.tgz", | ||||
|       "integrity": "sha512-AEpNLRcsVSc5AdseJKNHpz0d4e8+ow+abTaC0fKDbAU86rF1evoFF0oC2fV9FdqtfVXkG2LKshpLTJCFOpyvTg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@types/node": "*", | ||||
|         "moment": ">=2.14.0" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "@types/node": { | ||||
|           "version": "14.0.5", | ||||
|           "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.5.tgz", | ||||
|           "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", | ||||
|           "dev": true | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "@types/default-gateway": { | ||||
|       "version": "3.0.1", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fdefault-gateway/-/default-gateway-3.0.1.tgz", | ||||
| @@ -2358,12 +2360,6 @@ | ||||
|         "@types/uglify-js": "*" | ||||
|       } | ||||
|     }, | ||||
|     "@types/luxon": { | ||||
|       "version": "1.24.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fluxon/-/luxon-1.24.0.tgz", | ||||
|       "integrity": "sha512-OCTdVRQf/ge2ULlGqVKRI/HwyWoKpLV3ppLt6H27yzK/qdYNJ60Sz5tUxy3Jt1RD9K4Iz1tcDWPFJArBFZNAWQ==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "@types/mime": { | ||||
|       "version": "2.0.2", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fmime/-/mime-2.0.2.tgz", | ||||
| @@ -2379,8 +2375,7 @@ | ||||
|     "@types/minimatch": { | ||||
|       "version": "3.0.3", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz", | ||||
|       "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", | ||||
|       "dev": true | ||||
|       "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" | ||||
|     }, | ||||
|     "@types/node": { | ||||
|       "version": "14.0.22", | ||||
| @@ -3948,15 +3943,6 @@ | ||||
|         "sha.js": "^2.4.8" | ||||
|       } | ||||
|     }, | ||||
|     "cron": { | ||||
|       "version": "1.8.2", | ||||
|       "resolved": "https://verdaccio.lossless.one/cron/-/cron-1.8.2.tgz", | ||||
|       "integrity": "sha512-Gk2c4y6xKEO8FSAUTklqtfSr7oTq0CiPQeLBG5Fl0qoXpZyMcj1SG59YL+hqq04bu6/IuEA7lMkYDAplQNKkyg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "moment-timezone": "^0.5.x" | ||||
|       } | ||||
|     }, | ||||
|     "croner": { | ||||
|       "version": "1.1.23", | ||||
|       "resolved": "https://verdaccio.lossless.one/croner/-/croner-1.1.23.tgz", | ||||
| @@ -7360,12 +7346,6 @@ | ||||
|       "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "luxon": { | ||||
|       "version": "1.24.1", | ||||
|       "resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.24.1.tgz", | ||||
|       "integrity": "sha512-CgnIMKAWT0ghcuWFfCWBnWGOddM0zu6c4wZAWmD0NN7MZTnro0+833DF6tJep+xlxRPg4KtsYEHYLfTMBQKwYg==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "magic-string": { | ||||
|       "version": "0.22.5", | ||||
|       "resolved": "https://verdaccio.lossless.one/magic-string/-/magic-string-0.22.5.tgz", | ||||
| @@ -7400,7 +7380,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" | ||||
|       }, | ||||
| @@ -7408,8 +7387,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==" | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
| @@ -7610,21 +7588,6 @@ | ||||
|         "minimist": "^1.2.5" | ||||
|       } | ||||
|     }, | ||||
|     "moment": { | ||||
|       "version": "2.26.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/moment/-/moment-2.26.0.tgz", | ||||
|       "integrity": "sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "moment-timezone": { | ||||
|       "version": "0.5.31", | ||||
|       "resolved": "https://verdaccio.lossless.one/moment-timezone/-/moment-timezone-0.5.31.tgz", | ||||
|       "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "moment": ">= 2.9.0" | ||||
|       } | ||||
|     }, | ||||
|     "ms": { | ||||
|       "version": "2.1.2", | ||||
|       "resolved": "https://verdaccio.lossless.one/ms/-/ms-2.1.2.tgz", | ||||
| @@ -9723,7 +9686,6 @@ | ||||
|       "version": "6.5.5", | ||||
|       "resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.5.tgz", | ||||
|       "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "tslib": "^1.9.0" | ||||
|       } | ||||
| @@ -10528,8 +10490,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": "4.26.9", | ||||
| @@ -10693,8 +10654,7 @@ | ||||
|     "tslib": { | ||||
|       "version": "1.13.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz", | ||||
|       "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", | ||||
|       "dev": true | ||||
|       "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" | ||||
|     }, | ||||
|     "tslint": { | ||||
|       "version": "6.1.2", | ||||
|   | ||||
| @@ -22,6 +22,7 @@ | ||||
|     "tslint-config-prettier": "^1.18.0" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@pushrocks/lik": "^4.0.13", | ||||
|     "@pushrocks/smartdelay": "^2.0.10", | ||||
|     "@pushrocks/smartpromise": "^3.0.2", | ||||
|     "croner": "^1.1.23", | ||||
|   | ||||
| @@ -5,13 +5,13 @@ export class CronManager { | ||||
|   public executionTimeout: plugins.smartdelay.Timeout<void>; | ||||
|  | ||||
|   public status: 'started' | 'stopped' = 'stopped'; | ||||
|   public cronjobs: CronJob[] = []; | ||||
|   public cronjobs = new plugins.lik.ObjectMap<CronJob>(); | ||||
|  | ||||
|   constructor() {} | ||||
|  | ||||
|   public addCronjob(cronIdentifierArg: string, cronFunctionArg: () => any) { | ||||
|     const newCronJob = new CronJob(this, cronIdentifierArg, cronFunctionArg); | ||||
|     this.cronjobs.push(newCronJob); | ||||
|     this.cronjobs.add(newCronJob); | ||||
|     if (this.status === 'started') { | ||||
|       newCronJob.start(); | ||||
|     } | ||||
| @@ -19,12 +19,17 @@ export class CronManager { | ||||
|     return newCronJob; | ||||
|   } | ||||
|  | ||||
|   public removeCronjob(cronjobArg: CronJob) { | ||||
|     cronjobArg.stop(); | ||||
|     this.cronjobs.remove(cronjobArg); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * starts the cronjob | ||||
|    */ | ||||
|   public start() { | ||||
|     this.status = 'started'; | ||||
|     for (const cronJob of this.cronjobs) { | ||||
|     for (const cronJob of this.cronjobs.getArray()) { | ||||
|       cronJob.start(); | ||||
|     } | ||||
|     this.executionTimeout = new plugins.smartdelay.Timeout(0); | ||||
| @@ -34,7 +39,7 @@ export class CronManager { | ||||
|       console.log(`Next CronJob scheduled in ${this.executionTimeout.getTimeLeft()} milliseconds`); | ||||
|       this.executionTimeout.promise.then(() => { | ||||
|         let timeToNextOverallExecution: number; | ||||
|         for (const cronJob of this.cronjobs) { | ||||
|         for (const cronJob of this.cronjobs.getArray()) { | ||||
|           const timeToNextJobExecution = cronJob.checkExecution(); | ||||
|           if (timeToNextJobExecution < timeToNextOverallExecution || !timeToNextOverallExecution) { | ||||
|             timeToNextOverallExecution = timeToNextJobExecution; | ||||
| @@ -54,7 +59,7 @@ export class CronManager { | ||||
|   public stop() { | ||||
|     this.status = 'stopped'; | ||||
|     this.executionTimeout.cancel(); | ||||
|     for (const cron of this.cronjobs) { | ||||
|     for (const cron of this.cronjobs.getArray()) { | ||||
|       cron.stop(); | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -1,8 +1,9 @@ | ||||
| // @pushrocks scope | ||||
| import * as lik from '@pushrocks/lik'; | ||||
| import * as smartdelay from '@pushrocks/smartdelay'; | ||||
| import * as smartpromise from '@pushrocks/smartpromise'; | ||||
|  | ||||
| export { smartdelay, smartpromise }; | ||||
| export { lik, smartdelay, smartpromise }; | ||||
|  | ||||
| // third parties | ||||
| import croner from 'croner'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user