fix(core): update

This commit is contained in:
2023-07-26 20:51:47 +02:00
parent 2abac29dff
commit 8ffdf58d68
8 changed files with 211 additions and 13745 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartupdate',
version: '2.0.5',
version: '2.0.6',
description: 'update your tools in a smart way'
}

View File

@ -27,7 +27,9 @@ export class SmartUpdate {
const retrievedCacheData: ICacheStatus = await this.kvStore.readKey(npmnameArg);
if (retrievedCacheData) {
const lastCheckTimeStamp = plugins.smarttime.TimeStamp.fromMilliSeconds(retrievedCacheData.lastCheck);
const lastCheckTimeStamp = plugins.smarttime.TimeStamp.fromMilliSeconds(
retrievedCacheData.lastCheck
);
const tresholdTime = plugins.smarttime.getMilliSecondsFromUnits({ hours: 1 });
if (!lastCheckTimeStamp.isOlderThan(timeStamp, tresholdTime)) {
newCacheData.lastCheck = lastCheckTimeStamp.milliSeconds;