X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FConstants.ts;h=241018fca18fff398590e56b1440ec6d3b260827;hb=b40b5cb39eb44088100f2ce5efc2a6fdf4b84f26;hp=fb9e20046ac059ef341f722645a109dfd3f43580;hpb=bf53cadfde620fe89e6438403658682feb5bd39e;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index fb9e2004..241018fc 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -10,8 +10,8 @@ export default class Constants { static readonly CHARGING_STATION_ATG_DEFAULT_STOP_AFTER_HOURS = 0.25; // Hours // See https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string - static readonly SEMVER_REGEXP = - /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + static readonly SEMVER_PATTERN = + '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$'; static readonly DEFAULT_CIRCULAR_BUFFER_CAPACITY = Number.MAX_SAFE_INTEGER; @@ -45,6 +45,8 @@ export default class Constants { static readonly UNKNOWN_COMMAND = 'unknown command'; + static readonly MAX_RANDOM_INTEGER = 281474976710654; + private constructor() { // This is intentional }