repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: minimize OCPPUtils exports
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
broadcast-channel
/
WorkerBroadcastChannel.ts
diff --git
a/src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
b/src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
index fd73b1bb59021ced8057ca4b85961dafbb860758..9102b10009a7114597a3091f344357c0a6abea12 100644
(file)
--- a/
src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
+++ b/
src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
@@
-6,7
+6,7
@@
import type {
JsonType,
MessageEvent,
} from '../../types';
JsonType,
MessageEvent,
} from '../../types';
-import {
Utils, logger
} from '../../utils';
+import {
logPrefix, logger, validateUUID
} from '../../utils';
const moduleName = 'WorkerBroadcastChannel';
const moduleName = 'WorkerBroadcastChannel';
@@
-36,17
+36,17
@@
export abstract class WorkerBroadcastChannel extends BroadcastChannel {
logger.error(
`${this.logPrefix(
moduleName,
logger.error(
`${this.logPrefix(
moduleName,
- 'validateMessageEvent'
- )} Worker broadcast channel protocol message event data is not an array`
+ 'validateMessageEvent'
,
+ )} Worker broadcast channel protocol message event data is not an array`
,
);
return false;
}
);
return false;
}
- if (
Utils.
validateUUID(messageEvent.data[0]) === false) {
+ if (validateUUID(messageEvent.data[0]) === false) {
logger.error(
`${this.logPrefix(
moduleName,
logger.error(
`${this.logPrefix(
moduleName,
- 'validateMessageEvent'
- )} Worker broadcast channel protocol message event data UUID field is invalid`
+ 'validateMessageEvent'
,
+ )} Worker broadcast channel protocol message event data UUID field is invalid`
,
);
return false;
}
);
return false;
}
@@
-54,6
+54,6
@@
export abstract class WorkerBroadcastChannel extends BroadcastChannel {
}
private logPrefix = (modName: string, methodName: string): string => {
}
private logPrefix = (modName: string, methodName: string): string => {
- return
Utils.
logPrefix(` Worker Broadcast Channel | ${modName}.${methodName}:`);
+ return logPrefix(` Worker Broadcast Channel | ${modName}.${methodName}:`);
};
}
};
}