@eclipse-glsp-examples/workflow-server-bundled 2.2.0-next.89 → 2.2.0-next.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/wf-glsp-server-node.js +14 -1
- package/wf-glsp-server-node.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server-bundled",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.90+581ad6d",
|
|
4
4
|
"description": "GLSP node server for the workflow example (bundled)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "581ad6d274f9621ebd47e0a7d9af664b58f64d91"
|
|
53
53
|
}
|
package/wf-glsp-server-node.js
CHANGED
|
@@ -2317,6 +2317,14 @@ async function launch(argv) {
|
|
|
2317
2317
|
const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
|
|
2318
2318
|
const appContainer = new inversify_1.Container();
|
|
2319
2319
|
appContainer.load((0, node_1.createAppModule)(options));
|
|
2320
|
+
const logger = appContainer.get(node_1.Logger);
|
|
2321
|
+
// Add fallback hooks to catch unhandled exceptions & promise rejections and prevent the node process from crashing
|
|
2322
|
+
process.on('unhandledRejection', (reason, p) => {
|
|
2323
|
+
logger.error('Unhandled Rejection:', p, reason);
|
|
2324
|
+
});
|
|
2325
|
+
process.on('uncaughtException', error => {
|
|
2326
|
+
logger.error('Uncaught exception:', error);
|
|
2327
|
+
});
|
|
2320
2328
|
const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
|
|
2321
2329
|
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), elkLayoutModule);
|
|
2322
2330
|
if (options.webSocket) {
|
|
@@ -53512,7 +53520,12 @@ class WinstonLogger extends logger_1.Logger {
|
|
|
53512
53520
|
return `${param.message}
|
|
53513
53521
|
${param.stack || ''}`;
|
|
53514
53522
|
}
|
|
53515
|
-
|
|
53523
|
+
try {
|
|
53524
|
+
return JSON.stringify(param, undefined, 4);
|
|
53525
|
+
}
|
|
53526
|
+
catch (_) {
|
|
53527
|
+
return '';
|
|
53528
|
+
}
|
|
53516
53529
|
}
|
|
53517
53530
|
}
|
|
53518
53531
|
exports.WinstonLogger = WinstonLogger;
|