Fixed temp build errors
MODIFY
package-lock.json
package-lock.json
"uWebSockets.js": {
"version": "git+ssh://git@github.com/uNetworking/uWebSockets.js.git#806df48c9da86af7b3341f3e443388c7cd15c3de",
"integrity": "sha512-aWDPbYDAanPm8AmHygvbBUihPM8UGvHWEzDJKG2nc1hpbCq6TbYsaIfEXNuVf6iaxxQOUATVVC4n2R3Xzx6gig==",
- "from": "uWebSockets.js@github:uNetworking/uWebSockets.js#806df48c9da86af7b3341f3e443388c7cd15c3de"
+ "from": "uWebSockets.js@github:uNetworking/uWebSockets.js#v20.10.0"
},
"v8-compile-cache": {
"version": "2.3.0",

MODIFY
src/server/ocpp/json/web-socket/WSWrapper.ts
src/server/ocpp/json/web-socket/WSWrapper.ts
@@ -39,7 +39,7 @@ export default class WSWrapper {
public send(message: RecognizedString, isBinary?: boolean, compress?: boolean): boolean {
this.checkWSClosed(WebSocketAction.MESSAGE);
- return this.ws.send(message, isBinary, compress);
+ return this.ws.send(message, isBinary, compress) === 1;
}
public close(code: number, shortMessage: RecognizedString): void {
@@ -51,7 +51,7 @@ export default class WSWrapper {
public ping(message?: RecognizedString) : boolean {
this.checkWSClosed(WebSocketAction.PING);
- return this.ws.ping(message);
+ return this.ws.ping(message) === 1;
}
public getRemoteAddress(): string {

MODIFY
src/storage/mongodb/MongoDBStorage.ts
src/storage/mongodb/MongoDBStorage.ts
@@ -77,11 +77,12 @@ export default class MongoDBStorage {
});
// Trigger callbacks
changeStream.on('change', (changeStreamDocument: ChangeStreamDocument) => {
- const documentID = changeStreamDocument.documentKey ? changeStreamDocument.documentKey['_id'] : null;
- const documentChange = changeStreamDocument.operationType;
- const fullDocument = changeStreamDocument.fullDocument;
- // Callback
- callback(documentID, documentChange as DatabaseDocumentChange, fullDocument);
+ console.log(changeStreamDocument);
+ // const documentID = changeStreamDocument.documentKey ? changeStreamDocument.documentKey['_id'] : null;
+ // const documentChange = changeStreamDocument.operationType;
+ // const fullDocument = changeStreamDocument.fullDocument;
+ // // Callback
+ // callback(documentID, documentChange as DatabaseDocumentChange, fullDocument);
});
}

Fixed temp build errors