@wbg-mde/server
Version:
MDE communication channel with Socket IO and express.
23 lines • 852 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const rfactory = require('@wbg-mde/r-factory');
class ResequenceSocket {
constructor(activeSocket) {
this.socket = activeSocket;
}
/*
* Init resequence
************************************************/
init() {
this.socket.on('resequence-req', (params) => {
this.resequence(JSON.parse(params));
});
}
resequence(params) {
rfactory.resequence.resequence(params.variables, params.filePath, params.projectId, params.rPath, params.language, (response) => {
this.socket.emit('resequence-res', { response, projectId: params.projectId, fileId: params.fileId });
});
}
}
exports.ResequenceSocket = ResequenceSocket;
//# sourceMappingURL=resequence.socket.js.map