const moduleName = 'Bootstrap'
enum exitCodes {
- duplicateChargingStationTemplateUrls = 2,
- gracefulShutdownError = 4,
+ succeeded = 0,
+ // eslint-disable-next-line perfectionist/sort-enums
missingChargingStationsConfiguration = 1,
+ // eslint-disable-next-line perfectionist/sort-enums
+ duplicateChargingStationTemplateUrls = 2,
noChargingStationTemplates = 3,
- succeeded = 0
+ // eslint-disable-next-line perfectionist/sort-enums
+ gracefulShutdownError = 4
}
export class Bootstrap extends EventEmitter {
+/* eslint-disable perfectionist/sort-enums */
export const WebSocketCloseEventStatusString: Record<WebSocketCloseEventStatusCode, string> =
Object.freeze({
1000: 'Normal Closure',
})
export enum WebSocketCloseEventStatusCode {
- CLOSE_ABNORMAL = 1006,
- CLOSE_BAD_GATEWAY = 1014,
- CLOSE_GOING_AWAY = 1001,
- CLOSE_INVALID_PAYLOAD = 1007,
- CLOSE_MISSING_EXTENSION = 1010,
- CLOSE_NO_STATUS = 1005,
CLOSE_NORMAL = 1000,
- CLOSE_POLICY_VIOLATION = 1008,
+ CLOSE_GOING_AWAY = 1001,
CLOSE_PROTOCOL_ERROR = 1002,
+ CLOSE_UNSUPPORTED = 1003,
CLOSE_RESERVED = 1004,
+ CLOSE_NO_STATUS = 1005,
+ CLOSE_ABNORMAL = 1006,
+ CLOSE_INVALID_PAYLOAD = 1007,
+ CLOSE_POLICY_VIOLATION = 1008,
+ CLOSE_TOO_LARGE = 1009,
+ CLOSE_MISSING_EXTENSION = 1010,
CLOSE_SERVER_INTERNAL_ERROR = 1011,
CLOSE_SERVICE_RESTART = 1012,
- CLOSE_TLS_HANDSHAKE = 1015,
- CLOSE_TOO_LARGE = 1009,
CLOSE_TRY_AGAIN_LATER = 1013,
- CLOSE_UNSUPPORTED = 1003
+ CLOSE_BAD_GATEWAY = 1014,
+ CLOSE_TLS_HANDSHAKE = 1015
}
export interface WSError extends Error {
export enum MessageType {
- CALL_ERROR_MESSAGE = 4, // Callee to Caller
CALL_MESSAGE = 2, // Caller to Callee
- CALL_RESULT_MESSAGE = 3 // Callee to Caller
+ CALL_RESULT_MESSAGE = 3, // Callee to Caller
+ // eslint-disable-next-line perfectionist/sort-enums
+ CALL_ERROR_MESSAGE = 4 // Callee to Caller
}