@eclipse-glsp-examples/workflow-server-bundled 2.2.0-next.88 → 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.
@@ -166,7 +166,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
166
166
  Object.defineProperty(exports, "__esModule", ({ value: true }));
167
167
  exports.CreateActivityNodeHandler = void 0;
168
168
  /********************************************************************************
169
- * Copyright (c) 2022-2023 STMicroelectronics and others.
169
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
170
170
  *
171
171
  * This program and the accompanying materials are made available under the
172
172
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -190,10 +190,7 @@ let CreateActivityNodeHandler = class CreateActivityNodeHandler extends create_w
190
190
  return this.builder(relativeLocation).build();
191
191
  }
192
192
  builder(point = server_1.Point.ORIGIN, elementTypeId = this.elementTypeIds[0]) {
193
- return graph_extension_1.ActivityNode.builder()
194
- .position(point)
195
- .type(elementTypeId)
196
- .nodeType(model_types_1.ModelTypes.toNodeType(elementTypeId));
193
+ return graph_extension_1.ActivityNode.builder().position(point).type(elementTypeId).nodeType(model_types_1.ModelTypes.toNodeType(elementTypeId));
197
194
  }
198
195
  createTriggerGhostElement(elementTypeId) {
199
196
  return { template: this.serializer.createSchema(this.builder(undefined, elementTypeId).build()) };
@@ -2320,6 +2317,14 @@ async function launch(argv) {
2320
2317
  const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
2321
2318
  const appContainer = new inversify_1.Container();
2322
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
+ });
2323
2328
  const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
2324
2329
  const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), elkLayoutModule);
2325
2330
  if (options.webSocket) {
@@ -6107,7 +6112,7 @@ exports.listen = listen;
6107
6112
  "use strict";
6108
6113
 
6109
6114
  /********************************************************************************
6110
- * Copyright (c) 2023 EclipseSource and others.
6115
+ * Copyright (c) 2023-2024 EclipseSource and others.
6111
6116
  *
6112
6117
  * This program and the accompanying materials are made available under the
6113
6118
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -6637,10 +6642,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
6637
6642
  ********************************************************************************/
6638
6643
  __exportStar(__webpack_require__(/*! ./action-protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/action-protocol/index.js"), exports);
6639
6644
  __exportStar(__webpack_require__(/*! ./client-server-protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/client-server-protocol/index.js"), exports);
6640
- __exportStar(__webpack_require__(/*! ./di */ "../../node_modules/@eclipse-glsp/protocol/lib/di/index.js"), exports);
6641
6645
  __exportStar(__webpack_require__(/*! ./model */ "../../node_modules/@eclipse-glsp/protocol/lib/model/index.js"), exports);
6642
6646
  __exportStar(__webpack_require__(/*! ./re-exports */ "../../node_modules/@eclipse-glsp/protocol/lib/re-exports.js"), exports);
6643
6647
  __exportStar(__webpack_require__(/*! ./sprotty-actions */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-actions.js"), exports);
6648
+ __exportStar(__webpack_require__(/*! ./sprotty-geometry-bounds */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js"), exports);
6649
+ __exportStar(__webpack_require__(/*! ./sprotty-geometry-dimension */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js"), exports);
6644
6650
  __exportStar(__webpack_require__(/*! ./sprotty-geometry-point */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-point.js"), exports);
6645
6651
  __exportStar(__webpack_require__(/*! ./utils */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js"), exports);
6646
6652
 
@@ -6875,6 +6881,116 @@ actions_1.SetViewportAction.is = (object) => base_protocol_1.Action.hasKind(obje
6875
6881
  actions_1.ViewportResult.is = (object) => base_protocol_1.Action.hasKind(object, actions_1.ViewportResult.KIND) && (0, type_util_1.hasObjectProp)(object, 'viewport') && (0, type_util_1.hasObjectProp)(object, 'canvasBounds');
6876
6882
 
6877
6883
 
6884
+ /***/ }),
6885
+
6886
+ /***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js":
6887
+ /*!********************************************************************************!*\
6888
+ !*** ../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js ***!
6889
+ \********************************************************************************/
6890
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6891
+
6892
+ "use strict";
6893
+
6894
+ /********************************************************************************
6895
+ * Copyright (c) 2024 EclipseSource and others.
6896
+ *
6897
+ * This program and the accompanying materials are made available under the
6898
+ * terms of the Eclipse Public License v. 2.0 which is available at
6899
+ * http://www.eclipse.org/legal/epl-2.0.
6900
+ *
6901
+ * This Source Code may also be made available under the following Secondary
6902
+ * Licenses when the conditions for such availability set forth in the Eclipse
6903
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
6904
+ * with the GNU Classpath Exception which is available at
6905
+ * https://www.gnu.org/software/classpath/license.html.
6906
+ *
6907
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
6908
+ ********************************************************************************/
6909
+ /* eslint-disable @typescript-eslint/no-shadow */
6910
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6911
+ exports.Bounds = void 0;
6912
+ const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
6913
+ Object.defineProperty(exports, "Bounds", ({ enumerable: true, get: function () { return geometry_1.Bounds; } }));
6914
+ geometry_1.Bounds.encompasses = (outer, inner) => geometry_1.Bounds.includes(outer, geometry_1.Bounds.topLeft(inner)) && geometry_1.Bounds.includes(outer, geometry_1.Bounds.bottomRight(inner));
6915
+ geometry_1.Bounds.overlap = (one, other, touch) => {
6916
+ const oneTopLeft = geometry_1.Bounds.topLeft(one);
6917
+ const oneBottomRight = geometry_1.Bounds.bottomRight(one);
6918
+ const otherTopLeft = geometry_1.Bounds.topLeft(other);
6919
+ const otherBottomRight = geometry_1.Bounds.bottomRight(other);
6920
+ return touch
6921
+ ? oneTopLeft.x <= otherBottomRight.x &&
6922
+ otherTopLeft.x <= oneBottomRight.x &&
6923
+ oneBottomRight.y >= otherTopLeft.y &&
6924
+ otherBottomRight.y >= oneTopLeft.y
6925
+ : oneTopLeft.x < otherBottomRight.x &&
6926
+ otherTopLeft.x < oneBottomRight.x &&
6927
+ oneBottomRight.y > otherTopLeft.y &&
6928
+ otherBottomRight.y > oneTopLeft.y;
6929
+ };
6930
+ geometry_1.Bounds.equals = (left, right) => geometry_1.Point.equals(left, right) && geometry_1.Dimension.equals(left, right);
6931
+ geometry_1.Bounds.left = (bounds) => bounds.x;
6932
+ geometry_1.Bounds.centerX = (bounds) => bounds.x + (bounds.width >= 0 ? bounds.width * 0.5 : 0);
6933
+ geometry_1.Bounds.right = (bounds) => bounds.x + bounds.width;
6934
+ geometry_1.Bounds.top = (bounds) => bounds.y;
6935
+ geometry_1.Bounds.middle = (bounds) => bounds.y + (bounds.height >= 0 ? bounds.height * 0.5 : 0);
6936
+ geometry_1.Bounds.centerY = geometry_1.Bounds.middle;
6937
+ geometry_1.Bounds.bottom = (bounds) => bounds.y + bounds.height;
6938
+ geometry_1.Bounds.topLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.top(bounds) });
6939
+ geometry_1.Bounds.topCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.top(bounds) });
6940
+ geometry_1.Bounds.topRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.top(bounds) });
6941
+ geometry_1.Bounds.middleLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.middle(bounds) });
6942
+ geometry_1.Bounds.middleCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.middle(bounds) });
6943
+ geometry_1.Bounds.middleRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.middle(bounds) });
6944
+ geometry_1.Bounds.bottomLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.bottom(bounds) });
6945
+ geometry_1.Bounds.bottomCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.bottom(bounds) });
6946
+ geometry_1.Bounds.bottomRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.bottom(bounds) });
6947
+ geometry_1.Bounds.isAbove = (leftBounds, rightBounds) => geometry_1.Bounds.top(leftBounds) <= geometry_1.Bounds.top(rightBounds);
6948
+ geometry_1.Bounds.isBelow = (leftBounds, rightBounds) => geometry_1.Bounds.top(leftBounds) >= geometry_1.Bounds.top(rightBounds);
6949
+ geometry_1.Bounds.isBefore = (leftBounds, rightBounds) => geometry_1.Bounds.left(leftBounds) < geometry_1.Bounds.left(rightBounds);
6950
+ geometry_1.Bounds.isAfter = (leftBounds, rightBounds) => geometry_1.Bounds.left(leftBounds) >= geometry_1.Bounds.left(rightBounds);
6951
+ geometry_1.Bounds.sortBy = (rankFunc, ...bounds) => bounds.sort((left, right) => rankFunc(left) - rankFunc(right));
6952
+ geometry_1.Bounds.from = (topLeft, bottomRight) => (Object.assign(Object.assign({}, topLeft), { width: bottomRight.x - topLeft.x, height: bottomRight.y - topLeft.y }));
6953
+
6954
+
6955
+ /***/ }),
6956
+
6957
+ /***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js":
6958
+ /*!***********************************************************************************!*\
6959
+ !*** ../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js ***!
6960
+ \***********************************************************************************/
6961
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6962
+
6963
+ "use strict";
6964
+
6965
+ /********************************************************************************
6966
+ * Copyright (c) 2024 EclipseSource and others.
6967
+ *
6968
+ * This program and the accompanying materials are made available under the
6969
+ * terms of the Eclipse Public License v. 2.0 which is available at
6970
+ * http://www.eclipse.org/legal/epl-2.0.
6971
+ *
6972
+ * This Source Code may also be made available under the following Secondary
6973
+ * Licenses when the conditions for such availability set forth in the Eclipse
6974
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
6975
+ * with the GNU Classpath Exception which is available at
6976
+ * https://www.gnu.org/software/classpath/license.html.
6977
+ *
6978
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
6979
+ ********************************************************************************/
6980
+ /* eslint-disable @typescript-eslint/no-shadow */
6981
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6982
+ exports.Dimension = void 0;
6983
+ const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
6984
+ Object.defineProperty(exports, "Dimension", ({ enumerable: true, get: function () { return geometry_1.Dimension; } }));
6985
+ geometry_1.Dimension.center = (d) => ({ x: d.width * 0.5, y: d.height * 0.5 });
6986
+ geometry_1.Dimension.add = (d, a) => ({ width: d.width + a.width, height: d.height + a.height });
6987
+ geometry_1.Dimension.subtract = (d, a) => ({ width: d.width - a.width, height: d.height - a.height });
6988
+ geometry_1.Dimension.multiplyMeasure = (d, m) => ({ width: d.width * m, height: d.height * m });
6989
+ geometry_1.Dimension.divideMeasure = (d, m) => ({ width: d.width / m, height: d.height / m });
6990
+ geometry_1.Dimension.map = (dimension, callbackfn) => (Object.assign(Object.assign({}, dimension), { width: callbackfn(dimension.width, 'width'), height: callbackfn(dimension.height, 'height') }));
6991
+ geometry_1.Dimension.equals = (left, right) => left.width === right.width && left.height === right.height;
6992
+
6993
+
6878
6994
  /***/ }),
6879
6995
 
6880
6996
  /***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-point.js":
@@ -6905,7 +7021,36 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
6905
7021
  exports.Point = void 0;
6906
7022
  const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
6907
7023
  Object.defineProperty(exports, "Point", ({ enumerable: true, get: function () { return geometry_1.Point; } }));
7024
+ const utils_1 = __webpack_require__(/*! ./utils */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js");
7025
+ geometry_1.Point.is = (point) => utils_1.AnyObject.is(point) && (0, utils_1.hasNumberProp)(point, 'x') && (0, utils_1.hasNumberProp)(point, 'y');
7026
+ geometry_1.Point.isOrigin = (point) => geometry_1.Point.equals(point, geometry_1.Point.ORIGIN);
6908
7027
  geometry_1.Point.isValid = (point) => point !== undefined && !isNaN(point.x) && !isNaN(point.y);
7028
+ geometry_1.Point.abs = (point) => geometry_1.Point.map(point, Math.abs);
7029
+ geometry_1.Point.divideScalar = (point, scalar) => geometry_1.Point.map(point, coordinate => coordinate / scalar);
7030
+ geometry_1.Point.multiplyScalar = (point, scalar) => geometry_1.Point.map(point, coordinate => coordinate * scalar);
7031
+ geometry_1.Point.map = (point, callbackfn) => (Object.assign(Object.assign({}, point), { x: callbackfn(point.x, 'x'), y: callbackfn(point.y, 'y') }));
7032
+ geometry_1.Point.snapToGrid = (point, grid, gridOrigin) => {
7033
+ if (gridOrigin) {
7034
+ // move point relative to grid origin and then restore after snapping
7035
+ const relative = geometry_1.Point.subtract(point, gridOrigin);
7036
+ const snapped = geometry_1.Point.snapToGrid(relative, grid);
7037
+ return geometry_1.Point.add(gridOrigin, snapped);
7038
+ }
7039
+ else {
7040
+ return { x: Math.round(point.x / grid.x) * grid.x, y: Math.round(point.y / grid.y) * grid.y };
7041
+ }
7042
+ };
7043
+ geometry_1.Point.vector = (from, to) => geometry_1.Point.subtract(to, from);
7044
+ geometry_1.Point.move = (from, to) => {
7045
+ const vector = geometry_1.Point.vector(from, to);
7046
+ const direction = utils_1.Vector.direction(vector);
7047
+ return { from, to, vector, direction };
7048
+ };
7049
+ geometry_1.Point.moveTowards = (from, vector) => {
7050
+ const to = geometry_1.Point.add(from, vector);
7051
+ const dir = utils_1.Vector.direction(vector);
7052
+ return { from, to, vector, direction: dir };
7053
+ };
6909
7054
 
6910
7055
 
6911
7056
  /***/ }),
@@ -6934,7 +7079,7 @@ geometry_1.Point.isValid = (point) => point !== undefined && !isNaN(point.x) &&
6934
7079
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
6935
7080
  ********************************************************************************/
6936
7081
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6937
- exports.partition = exports.isArrayMatching = exports.isStringArray = exports.isArrayOfPrimitive = exports.isArrayOfClass = exports.isArrayOfType = exports.distinctAdd = exports.asArray = exports.flatPush = exports.remove = exports.pluck = exports.last = exports.first = void 0;
7082
+ exports.arrayOf = exports.partition = exports.isArrayMatching = exports.isStringArray = exports.isArrayOfPrimitive = exports.isArrayOfClass = exports.isArrayOfType = exports.distinctAdd = exports.asArray = exports.flatPush = exports.remove = exports.pluck = exports.last = exports.first = void 0;
6938
7083
  function first(array, n) {
6939
7084
  if (n) {
6940
7085
  return array.filter((_, index) => index < n);
@@ -7082,6 +7227,15 @@ function partition(source, matchGuard) {
7082
7227
  return { match, rest };
7083
7228
  }
7084
7229
  exports.partition = partition;
7230
+ /**
7231
+ * Helper function to create an array of values without any undefined values.
7232
+ * @param values The values to create the array from.
7233
+ * @returns The array of values without any undefined values.
7234
+ */
7235
+ function arrayOf(...values) {
7236
+ return values.filter(element => element !== undefined);
7237
+ }
7238
+ exports.arrayOf = arrayOf;
7085
7239
 
7086
7240
 
7087
7241
  /***/ }),
@@ -7157,6 +7311,12 @@ class DisposableCollection {
7157
7311
  get isDisposed() {
7158
7312
  return this.disposed;
7159
7313
  }
7314
+ /**
7315
+ * Removes all disposables in this collection WITHOUT triggering their disposal behavior.
7316
+ */
7317
+ clear() {
7318
+ this.disposables.length = 0;
7319
+ }
7160
7320
  }
7161
7321
  exports.DisposableCollection = DisposableCollection;
7162
7322
 
@@ -7210,6 +7370,373 @@ class Emitter extends jsonrpc.Emitter {
7210
7370
  exports.Emitter = Emitter;
7211
7371
 
7212
7372
 
7373
+ /***/ }),
7374
+
7375
+ /***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js":
7376
+ /*!********************************************************************************!*\
7377
+ !*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js ***!
7378
+ \********************************************************************************/
7379
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7380
+
7381
+ "use strict";
7382
+
7383
+ /********************************************************************************
7384
+ * Copyright (c) 2024 EclipseSource and others.
7385
+ *
7386
+ * This program and the accompanying materials are made available under the
7387
+ * terms of the Eclipse Public License v. 2.0 which is available at
7388
+ * http://www.eclipse.org/legal/epl-2.0.
7389
+ *
7390
+ * This Source Code may also be made available under the following Secondary
7391
+ * Licenses when the conditions for such availability set forth in the Eclipse
7392
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
7393
+ * with the GNU Classpath Exception which is available at
7394
+ * https://www.gnu.org/software/classpath/license.html.
7395
+ *
7396
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
7397
+ ********************************************************************************/
7398
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7399
+ exports.Movement = void 0;
7400
+ const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
7401
+ const geometry_vector_1 = __webpack_require__(/*! ./geometry-vector */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js");
7402
+ const type_util_1 = __webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
7403
+ /**
7404
+ * A collection of utility functions for working with movements.
7405
+
7406
+ */
7407
+ var Movement;
7408
+ (function (Movement) {
7409
+ /**
7410
+ * The zero movement. It has from and to set to the origin and the vector set to zero.
7411
+ */
7412
+ Movement.ZERO = Object.freeze({
7413
+ from: geometry_1.Point.ORIGIN,
7414
+ to: geometry_1.Point.ORIGIN,
7415
+ vector: geometry_vector_1.Vector.ZERO,
7416
+ direction: []
7417
+ });
7418
+ /**
7419
+ * A type guard that checks if the given object is a movement.
7420
+ * @param obj the object to check
7421
+ * @returns true if the object is a movement, false otherwise
7422
+ */
7423
+ function is(obj) {
7424
+ return (type_util_1.AnyObject.is(obj) &&
7425
+ (0, type_util_1.hasObjectProp)(obj, 'from') &&
7426
+ geometry_1.Point.is(obj.from) &&
7427
+ (0, type_util_1.hasObjectProp)(obj, 'to') &&
7428
+ geometry_1.Point.is(obj.to) &&
7429
+ (0, type_util_1.hasObjectProp)(obj, 'vector') &&
7430
+ geometry_vector_1.Vector.is(obj.to) &&
7431
+ (0, type_util_1.hasObjectProp)(obj, 'direction'));
7432
+ }
7433
+ Movement.is = is;
7434
+ /**
7435
+ * Checks if the given movement is stationary, i.e. the starting point and end point are equal and the vector is zero.
7436
+ * @param movement the movement to check
7437
+ * @returns true if the movement is stationary, false otherwise
7438
+ */
7439
+ function isStationary(movement) {
7440
+ return geometry_vector_1.Vector.isZero(movement.vector);
7441
+ }
7442
+ Movement.isStationary = isStationary;
7443
+ /**
7444
+ * Checks if the given movement is zero, i.e., all values are zero.
7445
+ * @param movement the movement to check
7446
+ * @returns true if the movement is zero, false otherwise
7447
+ */
7448
+ function isZero(movement) {
7449
+ return Movement.equals(movement, Movement.ZERO);
7450
+ }
7451
+ Movement.isZero = isZero;
7452
+ /**
7453
+ * Checks if two movements are equal. Two movements are equal if their starting points, end points, and vectors are equal.
7454
+ * @param left the left movement
7455
+ * @param right the right movement
7456
+ * @returns true if the movements are equal, false otherwise
7457
+ */
7458
+ function equals(left, right) {
7459
+ return geometry_1.Point.equals(left.from, right.from) && geometry_1.Point.equals(left.to, right.to) && geometry_vector_1.Vector.equals(left.vector, right.vector);
7460
+ }
7461
+ Movement.equals = equals;
7462
+ })(Movement || (exports.Movement = Movement = {}));
7463
+
7464
+
7465
+ /***/ }),
7466
+
7467
+ /***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js":
7468
+ /*!****************************************************************************!*\
7469
+ !*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js ***!
7470
+ \****************************************************************************/
7471
+ /***/ ((__unused_webpack_module, exports) => {
7472
+
7473
+ "use strict";
7474
+
7475
+ /********************************************************************************
7476
+ * Copyright (c) 2024 EclipseSource and others.
7477
+ *
7478
+ * This program and the accompanying materials are made available under the
7479
+ * terms of the Eclipse Public License v. 2.0 which is available at
7480
+ * http://www.eclipse.org/legal/epl-2.0.
7481
+ *
7482
+ * This Source Code may also be made available under the following Secondary
7483
+ * Licenses when the conditions for such availability set forth in the Eclipse
7484
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
7485
+ * with the GNU Classpath Exception which is available at
7486
+ * https://www.gnu.org/software/classpath/license.html.
7487
+ *
7488
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
7489
+ ********************************************************************************/
7490
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7491
+ exports.Direction = void 0;
7492
+ /**
7493
+ * A direction in 2D space.
7494
+ */
7495
+ exports.Direction = {
7496
+ Left: 'left',
7497
+ Right: 'right',
7498
+ Up: 'up',
7499
+ Down: 'down'
7500
+ };
7501
+
7502
+
7503
+ /***/ }),
7504
+
7505
+ /***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js":
7506
+ /*!******************************************************************************!*\
7507
+ !*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js ***!
7508
+ \******************************************************************************/
7509
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7510
+
7511
+ "use strict";
7512
+
7513
+ /********************************************************************************
7514
+ * Copyright (c) 2024 EclipseSource and others.
7515
+ *
7516
+ * This program and the accompanying materials are made available under the
7517
+ * terms of the Eclipse Public License v. 2.0 which is available at
7518
+ * http://www.eclipse.org/legal/epl-2.0.
7519
+ *
7520
+ * This Source Code may also be made available under the following Secondary
7521
+ * Licenses when the conditions for such availability set forth in the Eclipse
7522
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
7523
+ * with the GNU Classpath Exception which is available at
7524
+ * https://www.gnu.org/software/classpath/license.html.
7525
+ *
7526
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
7527
+ ********************************************************************************/
7528
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7529
+ exports.Vector = void 0;
7530
+ const geometry_util_1 = __webpack_require__(/*! ./geometry-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js");
7531
+ const type_util_1 = __webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
7532
+ /**
7533
+ * A collection of utility functions for working with vectors.
7534
+ */
7535
+ var Vector;
7536
+ (function (Vector) {
7537
+ /**
7538
+ * The zero vector. It has x and y set to 0.
7539
+ */
7540
+ Vector.ZERO = Object.freeze({
7541
+ x: 0,
7542
+ y: 0
7543
+ });
7544
+ /**
7545
+ * Compute the absolute value of the vector.
7546
+ * @param vector the vector to compute the absolute value of
7547
+ * @returns the absolute value of the vector
7548
+ */
7549
+ function abs(vector) {
7550
+ return { x: Math.abs(vector.x), y: Math.abs(vector.y) };
7551
+ }
7552
+ Vector.abs = abs;
7553
+ /**
7554
+ * Computes the sum of two vectors.
7555
+ * @param vector the vector to add to
7556
+ * @param addend the vector to add
7557
+ * @returns the sum of the two vectors
7558
+ */
7559
+ function add(vector, addend) {
7560
+ return { x: vector.x + addend.x, y: vector.y + addend.y };
7561
+ }
7562
+ Vector.add = add;
7563
+ /**
7564
+ * Check if two vectors are equal.
7565
+ * @param left the left vector
7566
+ * @param right the right vector
7567
+ * @returns true if the vectors are equal, false otherwise
7568
+ */
7569
+ function equals(left, right) {
7570
+ return left.x === right.x && left.y === right.y;
7571
+ }
7572
+ Vector.equals = equals;
7573
+ /**
7574
+ * Check if a vector is valid. A vector is valid if it is not undefined and both x and y are numbers.
7575
+ * @param vector the vector to check
7576
+ * @returns true if the vector is valid, false otherwise
7577
+ */
7578
+ function isValid(vector) {
7579
+ return vector !== undefined && !isNaN(vector.x) && !isNaN(vector.y);
7580
+ }
7581
+ Vector.isValid = isValid;
7582
+ /**
7583
+ * Computes the magnitude of a vector defined as the square root of the sum of the squares of the x and y components.
7584
+ * @param point the vector to compute the magnitude of
7585
+ * @returns the magnitude of the vector
7586
+ */
7587
+ function magnitude(point) {
7588
+ return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));
7589
+ }
7590
+ Vector.magnitude = magnitude;
7591
+ /**
7592
+ * Maps each component of the vector to a new value given by the callback function.
7593
+ * @param vector the vector to map
7594
+ * @param callbackfn the function to map the components
7595
+ * @returns the mapped vector
7596
+ */
7597
+ function map(vector, callbackfn) {
7598
+ return Object.assign(Object.assign({}, vector), { x: callbackfn(vector.x, 'x'), y: callbackfn(vector.y, 'y') });
7599
+ }
7600
+ Vector.map = map;
7601
+ /**
7602
+ * Computes the normalized vector of a given vector.
7603
+ * The normalized vector has the same direction as the original vector but a magnitude of 1.
7604
+ *
7605
+ * @param vector the vector to normalize
7606
+ * @returns the normalized vector
7607
+ */
7608
+ function normalize(vector) {
7609
+ const mag = magnitude(vector);
7610
+ if (mag === 0 || mag === 1) {
7611
+ return Vector.ZERO;
7612
+ }
7613
+ return {
7614
+ x: vector.x / mag,
7615
+ y: vector.y / mag
7616
+ };
7617
+ }
7618
+ Vector.normalize = normalize;
7619
+ /**
7620
+ * Check if a vector is the zero vector.
7621
+ * @param vector the vector to check
7622
+ * @returns true if the vector is the zero vector, false otherwise
7623
+ */
7624
+ function isZero(vector) {
7625
+ return Vector.equals(vector, Vector.ZERO);
7626
+ }
7627
+ Vector.isZero = isZero;
7628
+ /**
7629
+ * Type guard to check if a value is a vector.
7630
+ * @param vector the value to check
7631
+ * @returns true if the value is a vector, false otherwise
7632
+ */
7633
+ function is(vector) {
7634
+ return type_util_1.AnyObject.is(vector) && (0, type_util_1.hasNumberProp)(vector, 'x') && (0, type_util_1.hasNumberProp)(vector, 'y');
7635
+ }
7636
+ Vector.is = is;
7637
+ /**
7638
+ * Divides each component of the vector by a scalar.
7639
+ *
7640
+ * @param vector the vector to divide
7641
+ * @param scalar the scalar to divide by
7642
+ * @returns the divided vector
7643
+ */
7644
+ function divide(vector, scalar) {
7645
+ return Vector.map(vector, coordinate => coordinate / scalar);
7646
+ }
7647
+ Vector.divide = divide;
7648
+ /**
7649
+ * Multiplies each component of the vector by a scalar.
7650
+ *
7651
+ * @param vector the vector to multiply
7652
+ * @param scalar the scalar to multiply by
7653
+ * @returns the multiplied vector
7654
+ */
7655
+ function multiply(vector, scalar) {
7656
+ return Vector.map(vector, coordinate => coordinate * scalar);
7657
+ }
7658
+ Vector.multiply = multiply;
7659
+ /**
7660
+ * Subtracts the subtrahend from the vector.
7661
+ *
7662
+ * @param vector the vector to subtract from
7663
+ * @param subtrahend the vector to subtract
7664
+ * @returns the subtracted vector
7665
+ */
7666
+ function subtract(vector, subtrahend) {
7667
+ return { x: vector.x - subtrahend.x, y: vector.y - subtrahend.y };
7668
+ }
7669
+ Vector.subtract = subtract;
7670
+ /**
7671
+ * Reverse the direction of a vector.
7672
+ * @param vector the vector to reverse
7673
+ * @returns the reversed vector
7674
+ */
7675
+ function reverse(vector) {
7676
+ return { x: -vector.x, y: -vector.y };
7677
+ }
7678
+ Vector.reverse = reverse;
7679
+ /**
7680
+ * Computes the direction of a vector
7681
+ * @param vector the vector to compute the direction of
7682
+ * @returns the direction of the vector
7683
+ */
7684
+ function direction(vector) {
7685
+ const directions = [];
7686
+ if (vector.x < 0) {
7687
+ directions.push(geometry_util_1.Direction.Left);
7688
+ }
7689
+ else if (vector.x > 0) {
7690
+ directions.push(geometry_util_1.Direction.Right);
7691
+ }
7692
+ if (vector.y < 0) {
7693
+ directions.push(geometry_util_1.Direction.Up);
7694
+ }
7695
+ else if (vector.y > 0) {
7696
+ directions.push(geometry_util_1.Direction.Down);
7697
+ }
7698
+ return directions;
7699
+ }
7700
+ Vector.direction = direction;
7701
+ /**
7702
+ * Computes a vector that is the minimum of all given vectors.
7703
+ * @returns the minimum vector
7704
+ */
7705
+ function min(...vectors) {
7706
+ return {
7707
+ x: Math.min(...vectors.map(vector => vector.x)),
7708
+ y: Math.min(...vectors.map(vector => vector.y))
7709
+ };
7710
+ }
7711
+ Vector.min = min;
7712
+ /**
7713
+ * Computes a vector that is the maximum of all given vectors.
7714
+ * @returns the maximum vector
7715
+ */
7716
+ function max(...vectors) {
7717
+ return {
7718
+ x: Math.max(...vectors.map(vector => vector.x)),
7719
+ y: Math.max(...vectors.map(vector => vector.y))
7720
+ };
7721
+ }
7722
+ Vector.max = max;
7723
+ /**
7724
+ * Computes a vector that is the average of all given vectors.
7725
+ * @returns the average vector
7726
+ */
7727
+ function avg(...vectors) {
7728
+ if (vectors.length === 0) {
7729
+ return Vector.ZERO;
7730
+ }
7731
+ return {
7732
+ x: vectors.reduce((prev, cur) => prev + cur.x, 0) / vectors.length,
7733
+ y: vectors.reduce((prev, cur) => prev + cur.y, 0) / vectors.length
7734
+ };
7735
+ }
7736
+ Vector.avg = avg;
7737
+ })(Vector || (exports.Vector = Vector = {}));
7738
+
7739
+
7213
7740
  /***/ }),
7214
7741
 
7215
7742
  /***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js":
@@ -7253,9 +7780,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
7253
7780
  __exportStar(__webpack_require__(/*! ./array-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/array-util.js"), exports);
7254
7781
  __exportStar(__webpack_require__(/*! ./disposable */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/disposable.js"), exports);
7255
7782
  __exportStar(__webpack_require__(/*! ./event */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/event.js"), exports);
7256
- // we do not export test-util to avoid a dependency on test frameworks such as chai
7257
- // however, adopters can still access the file by accessing it through the complete path
7258
- // export * from './test-util';
7783
+ __exportStar(__webpack_require__(/*! ./geometry-movement */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js"), exports);
7784
+ __exportStar(__webpack_require__(/*! ./geometry-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js"), exports);
7785
+ __exportStar(__webpack_require__(/*! ./geometry-vector */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js"), exports);
7259
7786
  __exportStar(__webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js"), exports);
7260
7787
 
7261
7788
 
@@ -7285,7 +7812,7 @@ __exportStar(__webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse
7285
7812
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
7286
7813
  ********************************************************************************/
7287
7814
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7288
- exports.hasArrayProp = exports.hasFunctionProp = exports.hasObjectProp = exports.hasNumberProp = exports.hasBooleanProp = exports.hasStringProp = exports.toTypeGuard = exports.AnyObject = void 0;
7815
+ exports.hasArrayProp = exports.hasFunctionProp = exports.hasObjectProp = exports.hasNumberProp = exports.hasBooleanProp = exports.hasStringProp = exports.call = exports.toTypeGuard = exports.AnyObject = void 0;
7289
7816
  var AnyObject;
7290
7817
  (function (AnyObject) {
7291
7818
  /**
@@ -7309,6 +7836,10 @@ function toTypeGuard(constructor) {
7309
7836
  return (element) => element instanceof constructor;
7310
7837
  }
7311
7838
  exports.toTypeGuard = toTypeGuard;
7839
+ function call(maybeFun, ...args) {
7840
+ return typeof maybeFun === 'function' ? maybeFun(...args) : maybeFun;
7841
+ }
7842
+ exports.call = call;
7312
7843
  /**
7313
7844
  * Validates whether the given object has a property of type `string` with the given key.
7314
7845
  * @param object The object that should be validated
@@ -27035,7 +27566,7 @@ var Reflect;
27035
27566
  };
27036
27567
  // Load global or shim versions of Map, Set, and WeakMap
27037
27568
  var functionPrototype = Object.getPrototypeOf(Function);
27038
- var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
27569
+ var usePolyfill = typeof process === "object" && process["env" + ""] && process["env" + ""]["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
27039
27570
  var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
27040
27571
  var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
27041
27572
  var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
@@ -34830,6 +35361,154 @@ module.exports = __webpack_require__(/*! ./lib/node/main */ "../../node_modules/
34830
35361
  "use strict";
34831
35362
 
34832
35363
 
35364
+ // Expose modern transport directly as the export
35365
+ module.exports = __webpack_require__(/*! ./modern */ "../../node_modules/winston-transport/modern.js");
35366
+
35367
+ // Expose legacy stream
35368
+ module.exports.LegacyTransportStream = __webpack_require__(/*! ./legacy */ "../../node_modules/winston-transport/legacy.js");
35369
+
35370
+
35371
+ /***/ }),
35372
+
35373
+ /***/ "../../node_modules/winston-transport/legacy.js":
35374
+ /*!******************************************************!*\
35375
+ !*** ../../node_modules/winston-transport/legacy.js ***!
35376
+ \******************************************************/
35377
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
35378
+
35379
+ "use strict";
35380
+
35381
+
35382
+ const util = __webpack_require__(/*! util */ "util");
35383
+ const { LEVEL } = __webpack_require__(/*! triple-beam */ "../../node_modules/triple-beam/index.js");
35384
+ const TransportStream = __webpack_require__(/*! ./modern */ "../../node_modules/winston-transport/modern.js");
35385
+
35386
+ /**
35387
+ * Constructor function for the LegacyTransportStream. This is an internal
35388
+ * wrapper `winston >= 3` uses to wrap older transports implementing
35389
+ * log(level, message, meta).
35390
+ * @param {Object} options - Options for this TransportStream instance.
35391
+ * @param {Transpot} options.transport - winston@2 or older Transport to wrap.
35392
+ */
35393
+
35394
+ const LegacyTransportStream = module.exports = function LegacyTransportStream(options = {}) {
35395
+ TransportStream.call(this, options);
35396
+ if (!options.transport || typeof options.transport.log !== 'function') {
35397
+ throw new Error('Invalid transport, must be an object with a log method.');
35398
+ }
35399
+
35400
+ this.transport = options.transport;
35401
+ this.level = this.level || options.transport.level;
35402
+ this.handleExceptions = this.handleExceptions || options.transport.handleExceptions;
35403
+
35404
+ // Display our deprecation notice.
35405
+ this._deprecated();
35406
+
35407
+ // Properly bubble up errors from the transport to the
35408
+ // LegacyTransportStream instance, but only once no matter how many times
35409
+ // this transport is shared.
35410
+ function transportError(err) {
35411
+ this.emit('error', err, this.transport);
35412
+ }
35413
+
35414
+ if (!this.transport.__winstonError) {
35415
+ this.transport.__winstonError = transportError.bind(this);
35416
+ this.transport.on('error', this.transport.__winstonError);
35417
+ }
35418
+ };
35419
+
35420
+ /*
35421
+ * Inherit from TransportStream using Node.js built-ins
35422
+ */
35423
+ util.inherits(LegacyTransportStream, TransportStream);
35424
+
35425
+ /**
35426
+ * Writes the info object to our transport instance.
35427
+ * @param {mixed} info - TODO: add param description.
35428
+ * @param {mixed} enc - TODO: add param description.
35429
+ * @param {function} callback - TODO: add param description.
35430
+ * @returns {undefined}
35431
+ * @private
35432
+ */
35433
+ LegacyTransportStream.prototype._write = function _write(info, enc, callback) {
35434
+ if (this.silent || (info.exception === true && !this.handleExceptions)) {
35435
+ return callback(null);
35436
+ }
35437
+
35438
+ // Remark: This has to be handled in the base transport now because we
35439
+ // cannot conditionally write to our pipe targets as stream.
35440
+ if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) {
35441
+ this.transport.log(info[LEVEL], info.message, info, this._nop);
35442
+ }
35443
+
35444
+ callback(null);
35445
+ };
35446
+
35447
+ /**
35448
+ * Writes the batch of info objects (i.e. "object chunks") to our transport
35449
+ * instance after performing any necessary filtering.
35450
+ * @param {mixed} chunks - TODO: add params description.
35451
+ * @param {function} callback - TODO: add params description.
35452
+ * @returns {mixed} - TODO: add returns description.
35453
+ * @private
35454
+ */
35455
+ LegacyTransportStream.prototype._writev = function _writev(chunks, callback) {
35456
+ for (let i = 0; i < chunks.length; i++) {
35457
+ if (this._accept(chunks[i])) {
35458
+ this.transport.log(
35459
+ chunks[i].chunk[LEVEL],
35460
+ chunks[i].chunk.message,
35461
+ chunks[i].chunk,
35462
+ this._nop
35463
+ );
35464
+ chunks[i].callback();
35465
+ }
35466
+ }
35467
+
35468
+ return callback(null);
35469
+ };
35470
+
35471
+ /**
35472
+ * Displays a deprecation notice. Defined as a function so it can be
35473
+ * overriden in tests.
35474
+ * @returns {undefined}
35475
+ */
35476
+ LegacyTransportStream.prototype._deprecated = function _deprecated() {
35477
+ // eslint-disable-next-line no-console
35478
+ console.error([
35479
+ `${this.transport.name} is a legacy winston transport. Consider upgrading: `,
35480
+ '- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md'
35481
+ ].join('\n'));
35482
+ };
35483
+
35484
+ /**
35485
+ * Clean up error handling state on the legacy transport associated
35486
+ * with this instance.
35487
+ * @returns {undefined}
35488
+ */
35489
+ LegacyTransportStream.prototype.close = function close() {
35490
+ if (this.transport.close) {
35491
+ this.transport.close();
35492
+ }
35493
+
35494
+ if (this.transport.__winstonError) {
35495
+ this.transport.removeListener('error', this.transport.__winstonError);
35496
+ this.transport.__winstonError = null;
35497
+ }
35498
+ };
35499
+
35500
+
35501
+ /***/ }),
35502
+
35503
+ /***/ "../../node_modules/winston-transport/modern.js":
35504
+ /*!******************************************************!*\
35505
+ !*** ../../node_modules/winston-transport/modern.js ***!
35506
+ \******************************************************/
35507
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
35508
+
35509
+ "use strict";
35510
+
35511
+
34833
35512
  const util = __webpack_require__(/*! util */ "util");
34834
35513
  const Writable = __webpack_require__(/*! readable-stream/lib/_stream_writable.js */ "../../node_modules/readable-stream/lib/_stream_writable.js");
34835
35514
  const { LEVEL } = __webpack_require__(/*! triple-beam */ "../../node_modules/triple-beam/index.js");
@@ -35041,140 +35720,6 @@ TransportStream.prototype._nop = function _nop() {
35041
35720
  };
35042
35721
 
35043
35722
 
35044
- // Expose legacy stream
35045
- module.exports.LegacyTransportStream = __webpack_require__(/*! ./legacy */ "../../node_modules/winston-transport/legacy.js");
35046
-
35047
-
35048
- /***/ }),
35049
-
35050
- /***/ "../../node_modules/winston-transport/legacy.js":
35051
- /*!******************************************************!*\
35052
- !*** ../../node_modules/winston-transport/legacy.js ***!
35053
- \******************************************************/
35054
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
35055
-
35056
- "use strict";
35057
-
35058
-
35059
- const util = __webpack_require__(/*! util */ "util");
35060
- const { LEVEL } = __webpack_require__(/*! triple-beam */ "../../node_modules/triple-beam/index.js");
35061
- const TransportStream = __webpack_require__(/*! ./ */ "../../node_modules/winston-transport/index.js");
35062
-
35063
- /**
35064
- * Constructor function for the LegacyTransportStream. This is an internal
35065
- * wrapper `winston >= 3` uses to wrap older transports implementing
35066
- * log(level, message, meta).
35067
- * @param {Object} options - Options for this TransportStream instance.
35068
- * @param {Transpot} options.transport - winston@2 or older Transport to wrap.
35069
- */
35070
-
35071
- const LegacyTransportStream = module.exports = function LegacyTransportStream(options = {}) {
35072
- TransportStream.call(this, options);
35073
- if (!options.transport || typeof options.transport.log !== 'function') {
35074
- throw new Error('Invalid transport, must be an object with a log method.');
35075
- }
35076
-
35077
- this.transport = options.transport;
35078
- this.level = this.level || options.transport.level;
35079
- this.handleExceptions = this.handleExceptions || options.transport.handleExceptions;
35080
-
35081
- // Display our deprecation notice.
35082
- this._deprecated();
35083
-
35084
- // Properly bubble up errors from the transport to the
35085
- // LegacyTransportStream instance, but only once no matter how many times
35086
- // this transport is shared.
35087
- function transportError(err) {
35088
- this.emit('error', err, this.transport);
35089
- }
35090
-
35091
- if (!this.transport.__winstonError) {
35092
- this.transport.__winstonError = transportError.bind(this);
35093
- this.transport.on('error', this.transport.__winstonError);
35094
- }
35095
- };
35096
-
35097
- /*
35098
- * Inherit from TransportStream using Node.js built-ins
35099
- */
35100
- util.inherits(LegacyTransportStream, TransportStream);
35101
-
35102
- /**
35103
- * Writes the info object to our transport instance.
35104
- * @param {mixed} info - TODO: add param description.
35105
- * @param {mixed} enc - TODO: add param description.
35106
- * @param {function} callback - TODO: add param description.
35107
- * @returns {undefined}
35108
- * @private
35109
- */
35110
- LegacyTransportStream.prototype._write = function _write(info, enc, callback) {
35111
- if (this.silent || (info.exception === true && !this.handleExceptions)) {
35112
- return callback(null);
35113
- }
35114
-
35115
- // Remark: This has to be handled in the base transport now because we
35116
- // cannot conditionally write to our pipe targets as stream.
35117
- if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) {
35118
- this.transport.log(info[LEVEL], info.message, info, this._nop);
35119
- }
35120
-
35121
- callback(null);
35122
- };
35123
-
35124
- /**
35125
- * Writes the batch of info objects (i.e. "object chunks") to our transport
35126
- * instance after performing any necessary filtering.
35127
- * @param {mixed} chunks - TODO: add params description.
35128
- * @param {function} callback - TODO: add params description.
35129
- * @returns {mixed} - TODO: add returns description.
35130
- * @private
35131
- */
35132
- LegacyTransportStream.prototype._writev = function _writev(chunks, callback) {
35133
- for (let i = 0; i < chunks.length; i++) {
35134
- if (this._accept(chunks[i])) {
35135
- this.transport.log(
35136
- chunks[i].chunk[LEVEL],
35137
- chunks[i].chunk.message,
35138
- chunks[i].chunk,
35139
- this._nop
35140
- );
35141
- chunks[i].callback();
35142
- }
35143
- }
35144
-
35145
- return callback(null);
35146
- };
35147
-
35148
- /**
35149
- * Displays a deprecation notice. Defined as a function so it can be
35150
- * overriden in tests.
35151
- * @returns {undefined}
35152
- */
35153
- LegacyTransportStream.prototype._deprecated = function _deprecated() {
35154
- // eslint-disable-next-line no-console
35155
- console.error([
35156
- `${this.transport.name} is a legacy winston transport. Consider upgrading: `,
35157
- '- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md'
35158
- ].join('\n'));
35159
- };
35160
-
35161
- /**
35162
- * Clean up error handling state on the legacy transport associated
35163
- * with this instance.
35164
- * @returns {undefined}
35165
- */
35166
- LegacyTransportStream.prototype.close = function close() {
35167
- if (this.transport.close) {
35168
- this.transport.close();
35169
- }
35170
-
35171
- if (this.transport.__winstonError) {
35172
- this.transport.removeListener('error', this.transport.__winstonError);
35173
- this.transport.__winstonError = null;
35174
- }
35175
- };
35176
-
35177
-
35178
35723
  /***/ }),
35179
35724
 
35180
35725
  /***/ "../../node_modules/winston/lib/winston.js":
@@ -35321,6 +35866,17 @@ Object.defineProperty(exports, "exceptions", ({
35321
35866
  }
35322
35867
  }));
35323
35868
 
35869
+ /**
35870
+ * Define getter for `rejections` which replaces `handleRejections` and
35871
+ * `unhandleRejections`.
35872
+ * @type {Object}
35873
+ */
35874
+ Object.defineProperty(exports, "rejections", ({
35875
+ get() {
35876
+ return defaultLogger.rejections;
35877
+ }
35878
+ }));
35879
+
35324
35880
  /**
35325
35881
  * Define getters / setters for appropriate properties of the default logger
35326
35882
  * which need to be exposed by winston.
@@ -36808,7 +37364,7 @@ const asyncForEach = __webpack_require__(/*! async/forEach */ "../../node_module
36808
37364
  const debug = __webpack_require__(/*! @dabh/diagnostics */ "../../node_modules/@dabh/diagnostics/node/index.js")('winston:rejection');
36809
37365
  const once = __webpack_require__(/*! one-time */ "../../node_modules/one-time/index.js");
36810
37366
  const stackTrace = __webpack_require__(/*! stack-trace */ "../../node_modules/stack-trace/lib/stack-trace.js");
36811
- const ExceptionStream = __webpack_require__(/*! ./exception-stream */ "../../node_modules/winston/lib/winston/exception-stream.js");
37367
+ const RejectionStream = __webpack_require__(/*! ./rejection-stream */ "../../node_modules/winston/lib/winston/rejection-stream.js");
36812
37368
 
36813
37369
  /**
36814
37370
  * Object for handling unhandledRejection events.
@@ -36884,7 +37440,7 @@ module.exports = class RejectionHandler {
36884
37440
  err && err.stack || ' No stack trace'
36885
37441
  ].join('\n'),
36886
37442
  stack: err && err.stack,
36887
- exception: true,
37443
+ rejection: true,
36888
37444
  date: new Date().toString(),
36889
37445
  process: this.getProcessInfo(),
36890
37446
  os: this.getOsInfo(),
@@ -36947,7 +37503,7 @@ module.exports = class RejectionHandler {
36947
37503
  _addHandler(handler) {
36948
37504
  if (!this.handlers.has(handler)) {
36949
37505
  handler.handleRejections = true;
36950
- const wrapper = new ExceptionStream(handler);
37506
+ const wrapper = new RejectionStream(handler);
36951
37507
  this.handlers.set(handler, wrapper);
36952
37508
  this.logger.pipe(wrapper);
36953
37509
  }
@@ -37047,6 +37603,69 @@ module.exports = class RejectionHandler {
37047
37603
  };
37048
37604
 
37049
37605
 
37606
+ /***/ }),
37607
+
37608
+ /***/ "../../node_modules/winston/lib/winston/rejection-stream.js":
37609
+ /*!******************************************************************!*\
37610
+ !*** ../../node_modules/winston/lib/winston/rejection-stream.js ***!
37611
+ \******************************************************************/
37612
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
37613
+
37614
+ "use strict";
37615
+ /**
37616
+ * rejection-stream.js: TODO: add file header handler.
37617
+ *
37618
+ * (C) 2010 Charlie Robbins
37619
+ * MIT LICENCE
37620
+ */
37621
+
37622
+
37623
+
37624
+ const { Writable } = __webpack_require__(/*! readable-stream */ "../../node_modules/readable-stream/readable.js");
37625
+
37626
+ /**
37627
+ * TODO: add class description.
37628
+ * @type {RejectionStream}
37629
+ * @extends {Writable}
37630
+ */
37631
+ module.exports = class RejectionStream extends Writable {
37632
+ /**
37633
+ * Constructor function for the RejectionStream responsible for wrapping a
37634
+ * TransportStream; only allowing writes of `info` objects with
37635
+ * `info.rejection` set to true.
37636
+ * @param {!TransportStream} transport - Stream to filter to rejections
37637
+ */
37638
+ constructor(transport) {
37639
+ super({ objectMode: true });
37640
+
37641
+ if (!transport) {
37642
+ throw new Error('RejectionStream requires a TransportStream instance.');
37643
+ }
37644
+
37645
+ this.handleRejections = true;
37646
+ this.transport = transport;
37647
+ }
37648
+
37649
+ /**
37650
+ * Writes the info object to our transport instance if (and only if) the
37651
+ * `rejection` property is set on the info.
37652
+ * @param {mixed} info - TODO: add param description.
37653
+ * @param {mixed} enc - TODO: add param description.
37654
+ * @param {mixed} callback - TODO: add param description.
37655
+ * @returns {mixed} - TODO: add return description.
37656
+ * @private
37657
+ */
37658
+ _write(info, enc, callback) {
37659
+ if (info.rejection) {
37660
+ return this.transport.log(info, callback);
37661
+ }
37662
+
37663
+ callback();
37664
+ return true;
37665
+ }
37666
+ };
37667
+
37668
+
37050
37669
  /***/ }),
37051
37670
 
37052
37671
  /***/ "../../node_modules/winston/lib/winston/tail-file.js":
@@ -37519,7 +38138,7 @@ module.exports = class File extends TransportStream {
37519
38138
  return;
37520
38139
  }
37521
38140
  if (this.lazy) {
37522
- this._endStream(() => {this.emit('fileclosed')});
38141
+ this._endStream(() => {this.emit('fileclosed');});
37523
38142
  return;
37524
38143
  }
37525
38144
 
@@ -37924,12 +38543,6 @@ module.exports = class File extends TransportStream {
37924
38543
  });
37925
38544
 
37926
38545
  debug('create stream ok', fullpath);
37927
- if (this.zippedArchive) {
37928
- const gzip = zlib.createGzip();
37929
- gzip.pipe(dest);
37930
- return gzip;
37931
- }
37932
-
37933
38546
  return dest;
37934
38547
  }
37935
38548
 
@@ -37942,13 +38555,33 @@ module.exports = class File extends TransportStream {
37942
38555
  debug('_incFile', this.filename);
37943
38556
  const ext = path.extname(this._basename);
37944
38557
  const basename = path.basename(this._basename, ext);
38558
+ const tasks = [];
37945
38559
 
37946
- if (!this.tailable) {
37947
- this._created += 1;
37948
- this._checkMaxFilesIncrementing(ext, basename, callback);
37949
- } else {
37950
- this._checkMaxFilesTailable(ext, basename, callback);
38560
+ if (this.zippedArchive) {
38561
+ tasks.push(
38562
+ function (cb) {
38563
+ const num = this._created > 0 && !this.tailable ? this._created : '';
38564
+ this._compressFile(
38565
+ path.join(this.dirname, `${basename}${num}${ext}`),
38566
+ path.join(this.dirname, `${basename}${num}${ext}.gz`),
38567
+ cb
38568
+ );
38569
+ }.bind(this)
38570
+ );
37951
38571
  }
38572
+
38573
+ tasks.push(
38574
+ function (cb) {
38575
+ if (!this.tailable) {
38576
+ this._created += 1;
38577
+ this._checkMaxFilesIncrementing(ext, basename, cb);
38578
+ } else {
38579
+ this._checkMaxFilesTailable(ext, basename, cb);
38580
+ }
38581
+ }.bind(this)
38582
+ );
38583
+
38584
+ asyncSeries(tasks, callback);
37952
38585
  }
37953
38586
 
37954
38587
  /**
@@ -37967,13 +38600,9 @@ module.exports = class File extends TransportStream {
37967
38600
  // Caveat emptor (indexzero): rotationFormat() was broken by design When
37968
38601
  // combined with max files because the set of files to unlink is never
37969
38602
  // stored.
37970
- const target = !this.tailable && this._created
38603
+ return !this.tailable && this._created
37971
38604
  ? `${basename}${isRotation}${ext}`
37972
38605
  : `${basename}${ext}`;
37973
-
37974
- return this.zippedArchive && !this.tailable
37975
- ? `${target}.gz`
37976
- : target;
37977
38606
  }
37978
38607
 
37979
38608
  /**
@@ -38036,13 +38665,36 @@ module.exports = class File extends TransportStream {
38036
38665
 
38037
38666
  asyncSeries(tasks, () => {
38038
38667
  fs.rename(
38039
- path.join(this.dirname, `${basename}${ext}`),
38668
+ path.join(this.dirname, `${basename}${ext}${isZipped}`),
38040
38669
  path.join(this.dirname, `${basename}1${ext}${isZipped}`),
38041
38670
  callback
38042
38671
  );
38043
38672
  });
38044
38673
  }
38045
38674
 
38675
+ /**
38676
+ * Compresses src to dest with gzip and unlinks src
38677
+ * @param {string} src - path to source file.
38678
+ * @param {string} dest - path to zipped destination file.
38679
+ * @param {Function} callback - callback called after file has been compressed.
38680
+ * @returns {undefined}
38681
+ * @private
38682
+ */
38683
+ _compressFile(src, dest, callback) {
38684
+ fs.access(src, fs.F_OK, (err) => {
38685
+ if (err) {
38686
+ return callback();
38687
+ }
38688
+ var gzip = zlib.createGzip();
38689
+ var inp = fs.createReadStream(src);
38690
+ var out = fs.createWriteStream(dest);
38691
+ out.on('finish', () => {
38692
+ fs.unlink(src, callback);
38693
+ });
38694
+ inp.pipe(gzip).pipe(out);
38695
+ });
38696
+ }
38697
+
38046
38698
  _createLogDirIfNotExist(dirPath) {
38047
38699
  /* eslint-disable no-sync */
38048
38700
  if (!fs.existsSync(dirPath)) {
@@ -38075,7 +38727,7 @@ const http = __webpack_require__(/*! http */ "http");
38075
38727
  const https = __webpack_require__(/*! https */ "https");
38076
38728
  const { Stream } = __webpack_require__(/*! readable-stream */ "../../node_modules/readable-stream/readable.js");
38077
38729
  const TransportStream = __webpack_require__(/*! winston-transport */ "../../node_modules/winston-transport/index.js");
38078
- const jsonStringify = __webpack_require__(/*! safe-stable-stringify */ "../../node_modules/safe-stable-stringify/index.js");
38730
+ const { configure } = __webpack_require__(/*! safe-stable-stringify */ "../../node_modules/safe-stable-stringify/index.js");
38079
38731
 
38080
38732
  /**
38081
38733
  * Transport for outputting to a json-rpc server.
@@ -38099,6 +38751,7 @@ module.exports = class Http extends TransportStream {
38099
38751
  this.port = options.port;
38100
38752
  this.auth = options.auth;
38101
38753
  this.path = options.path || '';
38754
+ this.maximumDepth = options.maximumDepth;
38102
38755
  this.agent = options.agent;
38103
38756
  this.headers = options.headers || {};
38104
38757
  this.headers['content-type'] = 'application/json';
@@ -38317,6 +38970,9 @@ module.exports = class Http extends TransportStream {
38317
38970
  req.on('response', res => (
38318
38971
  res.on('end', () => callback(null, res)).resume()
38319
38972
  ));
38973
+ const jsonStringify = configure({
38974
+ ...(this.maximumDepth && { maximumDepth: this.maximumDepth })
38975
+ });
38320
38976
  req.end(Buffer.from(jsonStringify(options, this.options.replacer), 'utf8'));
38321
38977
  }
38322
38978
  };
@@ -39823,13 +40479,6 @@ const { concat, toArrayBuffer, unmask } = __webpack_require__(/*! ./buffer-util
39823
40479
  const { isValidStatusCode, isValidUTF8 } = __webpack_require__(/*! ./validation */ "../../node_modules/ws/lib/validation.js");
39824
40480
 
39825
40481
  const FastBuffer = Buffer[Symbol.species];
39826
- const promise = Promise.resolve();
39827
-
39828
- //
39829
- // `queueMicrotask()` is not available in Node.js < 11.
39830
- //
39831
- const queueTask =
39832
- typeof queueMicrotask === 'function' ? queueMicrotask : queueMicrotaskShim;
39833
40482
 
39834
40483
  const GET_INFO = 0;
39835
40484
  const GET_PAYLOAD_LENGTH_16 = 1;
@@ -39837,7 +40486,7 @@ const GET_PAYLOAD_LENGTH_64 = 2;
39837
40486
  const GET_MASK = 3;
39838
40487
  const GET_DATA = 4;
39839
40488
  const INFLATING = 5;
39840
- const WAIT_MICROTASK = 6;
40489
+ const DEFER_EVENT = 6;
39841
40490
 
39842
40491
  /**
39843
40492
  * HyBi Receiver implementation.
@@ -39849,6 +40498,9 @@ class Receiver extends Writable {
39849
40498
  * Creates a Receiver instance.
39850
40499
  *
39851
40500
  * @param {Object} [options] Options object
40501
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
40502
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
40503
+ * multiple times in the same tick
39852
40504
  * @param {String} [options.binaryType=nodebuffer] The type for binary data
39853
40505
  * @param {Object} [options.extensions] An object containing the negotiated
39854
40506
  * extensions
@@ -39861,6 +40513,10 @@ class Receiver extends Writable {
39861
40513
  constructor(options = {}) {
39862
40514
  super();
39863
40515
 
40516
+ this._allowSynchronousEvents =
40517
+ options.allowSynchronousEvents !== undefined
40518
+ ? options.allowSynchronousEvents
40519
+ : true;
39864
40520
  this._binaryType = options.binaryType || BINARY_TYPES[0];
39865
40521
  this._extensions = options.extensions || {};
39866
40522
  this._isServer = !!options.isServer;
@@ -39883,8 +40539,9 @@ class Receiver extends Writable {
39883
40539
  this._messageLength = 0;
39884
40540
  this._fragments = [];
39885
40541
 
39886
- this._state = GET_INFO;
40542
+ this._errored = false;
39887
40543
  this._loop = false;
40544
+ this._state = GET_INFO;
39888
40545
  }
39889
40546
 
39890
40547
  /**
@@ -39956,53 +40613,42 @@ class Receiver extends Writable {
39956
40613
  * @private
39957
40614
  */
39958
40615
  startLoop(cb) {
39959
- let err;
39960
40616
  this._loop = true;
39961
40617
 
39962
40618
  do {
39963
40619
  switch (this._state) {
39964
40620
  case GET_INFO:
39965
- err = this.getInfo();
40621
+ this.getInfo(cb);
39966
40622
  break;
39967
40623
  case GET_PAYLOAD_LENGTH_16:
39968
- err = this.getPayloadLength16();
40624
+ this.getPayloadLength16(cb);
39969
40625
  break;
39970
40626
  case GET_PAYLOAD_LENGTH_64:
39971
- err = this.getPayloadLength64();
40627
+ this.getPayloadLength64(cb);
39972
40628
  break;
39973
40629
  case GET_MASK:
39974
40630
  this.getMask();
39975
40631
  break;
39976
40632
  case GET_DATA:
39977
- err = this.getData(cb);
40633
+ this.getData(cb);
39978
40634
  break;
39979
40635
  case INFLATING:
40636
+ case DEFER_EVENT:
39980
40637
  this._loop = false;
39981
40638
  return;
39982
- default:
39983
- //
39984
- // `WAIT_MICROTASK`.
39985
- //
39986
- this._loop = false;
39987
-
39988
- queueTask(() => {
39989
- this._state = GET_INFO;
39990
- this.startLoop(cb);
39991
- });
39992
- return;
39993
40639
  }
39994
40640
  } while (this._loop);
39995
40641
 
39996
- cb(err);
40642
+ if (!this._errored) cb();
39997
40643
  }
39998
40644
 
39999
40645
  /**
40000
40646
  * Reads the first two bytes of a frame.
40001
40647
  *
40002
- * @return {(RangeError|undefined)} A possible error
40648
+ * @param {Function} cb Callback
40003
40649
  * @private
40004
40650
  */
40005
- getInfo() {
40651
+ getInfo(cb) {
40006
40652
  if (this._bufferedBytes < 2) {
40007
40653
  this._loop = false;
40008
40654
  return;
@@ -40011,27 +40657,31 @@ class Receiver extends Writable {
40011
40657
  const buf = this.consume(2);
40012
40658
 
40013
40659
  if ((buf[0] & 0x30) !== 0x00) {
40014
- this._loop = false;
40015
- return error(
40660
+ const error = this.createError(
40016
40661
  RangeError,
40017
40662
  'RSV2 and RSV3 must be clear',
40018
40663
  true,
40019
40664
  1002,
40020
40665
  'WS_ERR_UNEXPECTED_RSV_2_3'
40021
40666
  );
40667
+
40668
+ cb(error);
40669
+ return;
40022
40670
  }
40023
40671
 
40024
40672
  const compressed = (buf[0] & 0x40) === 0x40;
40025
40673
 
40026
40674
  if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
40027
- this._loop = false;
40028
- return error(
40675
+ const error = this.createError(
40029
40676
  RangeError,
40030
40677
  'RSV1 must be clear',
40031
40678
  true,
40032
40679
  1002,
40033
40680
  'WS_ERR_UNEXPECTED_RSV_1'
40034
40681
  );
40682
+
40683
+ cb(error);
40684
+ return;
40035
40685
  }
40036
40686
 
40037
40687
  this._fin = (buf[0] & 0x80) === 0x80;
@@ -40040,86 +40690,100 @@ class Receiver extends Writable {
40040
40690
 
40041
40691
  if (this._opcode === 0x00) {
40042
40692
  if (compressed) {
40043
- this._loop = false;
40044
- return error(
40693
+ const error = this.createError(
40045
40694
  RangeError,
40046
40695
  'RSV1 must be clear',
40047
40696
  true,
40048
40697
  1002,
40049
40698
  'WS_ERR_UNEXPECTED_RSV_1'
40050
40699
  );
40700
+
40701
+ cb(error);
40702
+ return;
40051
40703
  }
40052
40704
 
40053
40705
  if (!this._fragmented) {
40054
- this._loop = false;
40055
- return error(
40706
+ const error = this.createError(
40056
40707
  RangeError,
40057
40708
  'invalid opcode 0',
40058
40709
  true,
40059
40710
  1002,
40060
40711
  'WS_ERR_INVALID_OPCODE'
40061
40712
  );
40713
+
40714
+ cb(error);
40715
+ return;
40062
40716
  }
40063
40717
 
40064
40718
  this._opcode = this._fragmented;
40065
40719
  } else if (this._opcode === 0x01 || this._opcode === 0x02) {
40066
40720
  if (this._fragmented) {
40067
- this._loop = false;
40068
- return error(
40721
+ const error = this.createError(
40069
40722
  RangeError,
40070
40723
  `invalid opcode ${this._opcode}`,
40071
40724
  true,
40072
40725
  1002,
40073
40726
  'WS_ERR_INVALID_OPCODE'
40074
40727
  );
40728
+
40729
+ cb(error);
40730
+ return;
40075
40731
  }
40076
40732
 
40077
40733
  this._compressed = compressed;
40078
40734
  } else if (this._opcode > 0x07 && this._opcode < 0x0b) {
40079
40735
  if (!this._fin) {
40080
- this._loop = false;
40081
- return error(
40736
+ const error = this.createError(
40082
40737
  RangeError,
40083
40738
  'FIN must be set',
40084
40739
  true,
40085
40740
  1002,
40086
40741
  'WS_ERR_EXPECTED_FIN'
40087
40742
  );
40743
+
40744
+ cb(error);
40745
+ return;
40088
40746
  }
40089
40747
 
40090
40748
  if (compressed) {
40091
- this._loop = false;
40092
- return error(
40749
+ const error = this.createError(
40093
40750
  RangeError,
40094
40751
  'RSV1 must be clear',
40095
40752
  true,
40096
40753
  1002,
40097
40754
  'WS_ERR_UNEXPECTED_RSV_1'
40098
40755
  );
40756
+
40757
+ cb(error);
40758
+ return;
40099
40759
  }
40100
40760
 
40101
40761
  if (
40102
40762
  this._payloadLength > 0x7d ||
40103
40763
  (this._opcode === 0x08 && this._payloadLength === 1)
40104
40764
  ) {
40105
- this._loop = false;
40106
- return error(
40765
+ const error = this.createError(
40107
40766
  RangeError,
40108
40767
  `invalid payload length ${this._payloadLength}`,
40109
40768
  true,
40110
40769
  1002,
40111
40770
  'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
40112
40771
  );
40772
+
40773
+ cb(error);
40774
+ return;
40113
40775
  }
40114
40776
  } else {
40115
- this._loop = false;
40116
- return error(
40777
+ const error = this.createError(
40117
40778
  RangeError,
40118
40779
  `invalid opcode ${this._opcode}`,
40119
40780
  true,
40120
40781
  1002,
40121
40782
  'WS_ERR_INVALID_OPCODE'
40122
40783
  );
40784
+
40785
+ cb(error);
40786
+ return;
40123
40787
  }
40124
40788
 
40125
40789
  if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
@@ -40127,54 +40791,58 @@ class Receiver extends Writable {
40127
40791
 
40128
40792
  if (this._isServer) {
40129
40793
  if (!this._masked) {
40130
- this._loop = false;
40131
- return error(
40794
+ const error = this.createError(
40132
40795
  RangeError,
40133
40796
  'MASK must be set',
40134
40797
  true,
40135
40798
  1002,
40136
40799
  'WS_ERR_EXPECTED_MASK'
40137
40800
  );
40801
+
40802
+ cb(error);
40803
+ return;
40138
40804
  }
40139
40805
  } else if (this._masked) {
40140
- this._loop = false;
40141
- return error(
40806
+ const error = this.createError(
40142
40807
  RangeError,
40143
40808
  'MASK must be clear',
40144
40809
  true,
40145
40810
  1002,
40146
40811
  'WS_ERR_UNEXPECTED_MASK'
40147
40812
  );
40813
+
40814
+ cb(error);
40815
+ return;
40148
40816
  }
40149
40817
 
40150
40818
  if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
40151
40819
  else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
40152
- else return this.haveLength();
40820
+ else this.haveLength(cb);
40153
40821
  }
40154
40822
 
40155
40823
  /**
40156
40824
  * Gets extended payload length (7+16).
40157
40825
  *
40158
- * @return {(RangeError|undefined)} A possible error
40826
+ * @param {Function} cb Callback
40159
40827
  * @private
40160
40828
  */
40161
- getPayloadLength16() {
40829
+ getPayloadLength16(cb) {
40162
40830
  if (this._bufferedBytes < 2) {
40163
40831
  this._loop = false;
40164
40832
  return;
40165
40833
  }
40166
40834
 
40167
40835
  this._payloadLength = this.consume(2).readUInt16BE(0);
40168
- return this.haveLength();
40836
+ this.haveLength(cb);
40169
40837
  }
40170
40838
 
40171
40839
  /**
40172
40840
  * Gets extended payload length (7+64).
40173
40841
  *
40174
- * @return {(RangeError|undefined)} A possible error
40842
+ * @param {Function} cb Callback
40175
40843
  * @private
40176
40844
  */
40177
- getPayloadLength64() {
40845
+ getPayloadLength64(cb) {
40178
40846
  if (this._bufferedBytes < 8) {
40179
40847
  this._loop = false;
40180
40848
  return;
@@ -40188,38 +40856,42 @@ class Receiver extends Writable {
40188
40856
  // if payload length is greater than this number.
40189
40857
  //
40190
40858
  if (num > Math.pow(2, 53 - 32) - 1) {
40191
- this._loop = false;
40192
- return error(
40859
+ const error = this.createError(
40193
40860
  RangeError,
40194
40861
  'Unsupported WebSocket frame: payload length > 2^53 - 1',
40195
40862
  false,
40196
40863
  1009,
40197
40864
  'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
40198
40865
  );
40866
+
40867
+ cb(error);
40868
+ return;
40199
40869
  }
40200
40870
 
40201
40871
  this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
40202
- return this.haveLength();
40872
+ this.haveLength(cb);
40203
40873
  }
40204
40874
 
40205
40875
  /**
40206
40876
  * Payload length has been read.
40207
40877
  *
40208
- * @return {(RangeError|undefined)} A possible error
40878
+ * @param {Function} cb Callback
40209
40879
  * @private
40210
40880
  */
40211
- haveLength() {
40881
+ haveLength(cb) {
40212
40882
  if (this._payloadLength && this._opcode < 0x08) {
40213
40883
  this._totalPayloadLength += this._payloadLength;
40214
40884
  if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
40215
- this._loop = false;
40216
- return error(
40885
+ const error = this.createError(
40217
40886
  RangeError,
40218
40887
  'Max payload size exceeded',
40219
40888
  false,
40220
40889
  1009,
40221
40890
  'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
40222
40891
  );
40892
+
40893
+ cb(error);
40894
+ return;
40223
40895
  }
40224
40896
  }
40225
40897
 
@@ -40246,7 +40918,6 @@ class Receiver extends Writable {
40246
40918
  * Reads data bytes.
40247
40919
  *
40248
40920
  * @param {Function} cb Callback
40249
- * @return {(Error|RangeError|undefined)} A possible error
40250
40921
  * @private
40251
40922
  */
40252
40923
  getData(cb) {
@@ -40268,7 +40939,10 @@ class Receiver extends Writable {
40268
40939
  }
40269
40940
  }
40270
40941
 
40271
- if (this._opcode > 0x07) return this.controlMessage(data);
40942
+ if (this._opcode > 0x07) {
40943
+ this.controlMessage(data, cb);
40944
+ return;
40945
+ }
40272
40946
 
40273
40947
  if (this._compressed) {
40274
40948
  this._state = INFLATING;
@@ -40285,7 +40959,7 @@ class Receiver extends Writable {
40285
40959
  this._fragments.push(data);
40286
40960
  }
40287
40961
 
40288
- return this.dataMessage();
40962
+ this.dataMessage(cb);
40289
40963
  }
40290
40964
 
40291
40965
  /**
@@ -40304,74 +40978,96 @@ class Receiver extends Writable {
40304
40978
  if (buf.length) {
40305
40979
  this._messageLength += buf.length;
40306
40980
  if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
40307
- return cb(
40308
- error(
40309
- RangeError,
40310
- 'Max payload size exceeded',
40311
- false,
40312
- 1009,
40313
- 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
40314
- )
40981
+ const error = this.createError(
40982
+ RangeError,
40983
+ 'Max payload size exceeded',
40984
+ false,
40985
+ 1009,
40986
+ 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
40315
40987
  );
40988
+
40989
+ cb(error);
40990
+ return;
40316
40991
  }
40317
40992
 
40318
40993
  this._fragments.push(buf);
40319
40994
  }
40320
40995
 
40321
- const er = this.dataMessage();
40322
- if (er) return cb(er);
40323
-
40324
- this.startLoop(cb);
40996
+ this.dataMessage(cb);
40997
+ if (this._state === GET_INFO) this.startLoop(cb);
40325
40998
  });
40326
40999
  }
40327
41000
 
40328
41001
  /**
40329
41002
  * Handles a data message.
40330
41003
  *
40331
- * @return {(Error|undefined)} A possible error
41004
+ * @param {Function} cb Callback
40332
41005
  * @private
40333
41006
  */
40334
- dataMessage() {
40335
- if (this._fin) {
40336
- const messageLength = this._messageLength;
40337
- const fragments = this._fragments;
41007
+ dataMessage(cb) {
41008
+ if (!this._fin) {
41009
+ this._state = GET_INFO;
41010
+ return;
41011
+ }
40338
41012
 
40339
- this._totalPayloadLength = 0;
40340
- this._messageLength = 0;
40341
- this._fragmented = 0;
40342
- this._fragments = [];
41013
+ const messageLength = this._messageLength;
41014
+ const fragments = this._fragments;
40343
41015
 
40344
- if (this._opcode === 2) {
40345
- let data;
41016
+ this._totalPayloadLength = 0;
41017
+ this._messageLength = 0;
41018
+ this._fragmented = 0;
41019
+ this._fragments = [];
40346
41020
 
40347
- if (this._binaryType === 'nodebuffer') {
40348
- data = concat(fragments, messageLength);
40349
- } else if (this._binaryType === 'arraybuffer') {
40350
- data = toArrayBuffer(concat(fragments, messageLength));
40351
- } else {
40352
- data = fragments;
40353
- }
41021
+ if (this._opcode === 2) {
41022
+ let data;
41023
+
41024
+ if (this._binaryType === 'nodebuffer') {
41025
+ data = concat(fragments, messageLength);
41026
+ } else if (this._binaryType === 'arraybuffer') {
41027
+ data = toArrayBuffer(concat(fragments, messageLength));
41028
+ } else {
41029
+ data = fragments;
41030
+ }
40354
41031
 
41032
+ if (this._allowSynchronousEvents) {
40355
41033
  this.emit('message', data, true);
41034
+ this._state = GET_INFO;
40356
41035
  } else {
40357
- const buf = concat(fragments, messageLength);
41036
+ this._state = DEFER_EVENT;
41037
+ setImmediate(() => {
41038
+ this.emit('message', data, true);
41039
+ this._state = GET_INFO;
41040
+ this.startLoop(cb);
41041
+ });
41042
+ }
41043
+ } else {
41044
+ const buf = concat(fragments, messageLength);
40358
41045
 
40359
- if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
40360
- this._loop = false;
40361
- return error(
40362
- Error,
40363
- 'invalid UTF-8 sequence',
40364
- true,
40365
- 1007,
40366
- 'WS_ERR_INVALID_UTF8'
40367
- );
40368
- }
41046
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
41047
+ const error = this.createError(
41048
+ Error,
41049
+ 'invalid UTF-8 sequence',
41050
+ true,
41051
+ 1007,
41052
+ 'WS_ERR_INVALID_UTF8'
41053
+ );
40369
41054
 
41055
+ cb(error);
41056
+ return;
41057
+ }
41058
+
41059
+ if (this._state === INFLATING || this._allowSynchronousEvents) {
40370
41060
  this.emit('message', buf, false);
41061
+ this._state = GET_INFO;
41062
+ } else {
41063
+ this._state = DEFER_EVENT;
41064
+ setImmediate(() => {
41065
+ this.emit('message', buf, false);
41066
+ this._state = GET_INFO;
41067
+ this.startLoop(cb);
41068
+ });
40371
41069
  }
40372
41070
  }
40373
-
40374
- this._state = WAIT_MICROTASK;
40375
41071
  }
40376
41072
 
40377
41073
  /**
@@ -40381,26 +41077,26 @@ class Receiver extends Writable {
40381
41077
  * @return {(Error|RangeError|undefined)} A possible error
40382
41078
  * @private
40383
41079
  */
40384
- controlMessage(data) {
41080
+ controlMessage(data, cb) {
40385
41081
  if (this._opcode === 0x08) {
40386
- this._loop = false;
40387
-
40388
41082
  if (data.length === 0) {
41083
+ this._loop = false;
40389
41084
  this.emit('conclude', 1005, EMPTY_BUFFER);
40390
41085
  this.end();
40391
-
40392
- this._state = GET_INFO;
40393
41086
  } else {
40394
41087
  const code = data.readUInt16BE(0);
40395
41088
 
40396
41089
  if (!isValidStatusCode(code)) {
40397
- return error(
41090
+ const error = this.createError(
40398
41091
  RangeError,
40399
41092
  `invalid status code ${code}`,
40400
41093
  true,
40401
41094
  1002,
40402
41095
  'WS_ERR_INVALID_CLOSE_CODE'
40403
41096
  );
41097
+
41098
+ cb(error);
41099
+ return;
40404
41100
  }
40405
41101
 
40406
41102
  const buf = new FastBuffer(
@@ -40410,83 +41106,68 @@ class Receiver extends Writable {
40410
41106
  );
40411
41107
 
40412
41108
  if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
40413
- return error(
41109
+ const error = this.createError(
40414
41110
  Error,
40415
41111
  'invalid UTF-8 sequence',
40416
41112
  true,
40417
41113
  1007,
40418
41114
  'WS_ERR_INVALID_UTF8'
40419
41115
  );
41116
+
41117
+ cb(error);
41118
+ return;
40420
41119
  }
40421
41120
 
41121
+ this._loop = false;
40422
41122
  this.emit('conclude', code, buf);
40423
41123
  this.end();
40424
-
40425
- this._state = GET_INFO;
40426
41124
  }
40427
- } else if (this._opcode === 0x09) {
40428
- this.emit('ping', data);
40429
- this._state = WAIT_MICROTASK;
41125
+
41126
+ this._state = GET_INFO;
41127
+ return;
41128
+ }
41129
+
41130
+ if (this._allowSynchronousEvents) {
41131
+ this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
41132
+ this._state = GET_INFO;
40430
41133
  } else {
40431
- this.emit('pong', data);
40432
- this._state = WAIT_MICROTASK;
41134
+ this._state = DEFER_EVENT;
41135
+ setImmediate(() => {
41136
+ this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
41137
+ this._state = GET_INFO;
41138
+ this.startLoop(cb);
41139
+ });
40433
41140
  }
40434
41141
  }
40435
- }
40436
-
40437
- module.exports = Receiver;
40438
-
40439
- /**
40440
- * Builds an error object.
40441
- *
40442
- * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
40443
- * @param {String} message The error message
40444
- * @param {Boolean} prefix Specifies whether or not to add a default prefix to
40445
- * `message`
40446
- * @param {Number} statusCode The status code
40447
- * @param {String} errorCode The exposed error code
40448
- * @return {(Error|RangeError)} The error
40449
- * @private
40450
- */
40451
- function error(ErrorCtor, message, prefix, statusCode, errorCode) {
40452
- const err = new ErrorCtor(
40453
- prefix ? `Invalid WebSocket frame: ${message}` : message
40454
- );
40455
41142
 
40456
- Error.captureStackTrace(err, error);
40457
- err.code = errorCode;
40458
- err[kStatusCode] = statusCode;
40459
- return err;
40460
- }
41143
+ /**
41144
+ * Builds an error object.
41145
+ *
41146
+ * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
41147
+ * @param {String} message The error message
41148
+ * @param {Boolean} prefix Specifies whether or not to add a default prefix to
41149
+ * `message`
41150
+ * @param {Number} statusCode The status code
41151
+ * @param {String} errorCode The exposed error code
41152
+ * @return {(Error|RangeError)} The error
41153
+ * @private
41154
+ */
41155
+ createError(ErrorCtor, message, prefix, statusCode, errorCode) {
41156
+ this._loop = false;
41157
+ this._errored = true;
40461
41158
 
40462
- /**
40463
- * A shim for `queueMicrotask()`.
40464
- *
40465
- * @param {Function} cb Callback
40466
- */
40467
- function queueMicrotaskShim(cb) {
40468
- promise.then(cb).catch(throwErrorNextTick);
40469
- }
41159
+ const err = new ErrorCtor(
41160
+ prefix ? `Invalid WebSocket frame: ${message}` : message
41161
+ );
40470
41162
 
40471
- /**
40472
- * Throws an error.
40473
- *
40474
- * @param {Error} err The error to throw
40475
- * @private
40476
- */
40477
- function throwError(err) {
40478
- throw err;
41163
+ Error.captureStackTrace(err, this.createError);
41164
+ err.code = errorCode;
41165
+ err[kStatusCode] = statusCode;
41166
+ return err;
41167
+ }
40479
41168
  }
40480
41169
 
40481
- /**
40482
- * Throws an error in the next tick.
40483
- *
40484
- * @param {Error} err The error to throw
40485
- * @private
40486
- */
40487
- function throwErrorNextTick(err) {
40488
- process.nextTick(throwError, err);
40489
- }
41170
+ module.exports = Receiver;
40490
41171
 
40491
41172
 
40492
41173
  /***/ }),
@@ -41370,7 +42051,7 @@ if (isUtf8) {
41370
42051
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41371
42052
 
41372
42053
  "use strict";
41373
- /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$" }] */
42054
+ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
41374
42055
 
41375
42056
 
41376
42057
 
@@ -41401,6 +42082,11 @@ class WebSocketServer extends EventEmitter {
41401
42082
  * Create a `WebSocketServer` instance.
41402
42083
  *
41403
42084
  * @param {Object} options Configuration options
42085
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
42086
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
42087
+ * multiple times in the same tick
42088
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
42089
+ * automatically send a pong in response to a ping
41404
42090
  * @param {Number} [options.backlog=511] The maximum length of the queue of
41405
42091
  * pending connections
41406
42092
  * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
@@ -41427,6 +42113,8 @@ class WebSocketServer extends EventEmitter {
41427
42113
  super();
41428
42114
 
41429
42115
  options = {
42116
+ allowSynchronousEvents: true,
42117
+ autoPong: true,
41430
42118
  maxPayload: 100 * 1024 * 1024,
41431
42119
  skipUTF8Validation: false,
41432
42120
  perMessageDeflate: false,
@@ -41747,7 +42435,7 @@ class WebSocketServer extends EventEmitter {
41747
42435
  `Sec-WebSocket-Accept: ${digest}`
41748
42436
  ];
41749
42437
 
41750
- const ws = new this.options.WebSocket(null);
42438
+ const ws = new this.options.WebSocket(null, undefined, this.options);
41751
42439
 
41752
42440
  if (protocols.size) {
41753
42441
  //
@@ -41781,6 +42469,7 @@ class WebSocketServer extends EventEmitter {
41781
42469
  socket.removeListener('error', socketOnError);
41782
42470
 
41783
42471
  ws.setSocket(socket, head, {
42472
+ allowSynchronousEvents: this.options.allowSynchronousEvents,
41784
42473
  maxPayload: this.options.maxPayload,
41785
42474
  skipUTF8Validation: this.options.skipUTF8Validation
41786
42475
  });
@@ -41912,7 +42601,7 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
41912
42601
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
41913
42602
 
41914
42603
  "use strict";
41915
- /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$" }] */
42604
+ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
41916
42605
 
41917
42606
 
41918
42607
 
@@ -41998,6 +42687,7 @@ class WebSocket extends EventEmitter {
41998
42687
 
41999
42688
  initAsClient(this, address, protocols, options);
42000
42689
  } else {
42690
+ this._autoPong = options.autoPong;
42001
42691
  this._isServer = true;
42002
42692
  }
42003
42693
  }
@@ -42106,6 +42796,9 @@ class WebSocket extends EventEmitter {
42106
42796
  * @param {Duplex} socket The network socket between the server and client
42107
42797
  * @param {Buffer} head The first packet of the upgraded stream
42108
42798
  * @param {Object} options Options object
42799
+ * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
42800
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
42801
+ * multiple times in the same tick
42109
42802
  * @param {Function} [options.generateMask] The function used to generate the
42110
42803
  * masking key
42111
42804
  * @param {Number} [options.maxPayload=0] The maximum allowed message size
@@ -42115,6 +42808,7 @@ class WebSocket extends EventEmitter {
42115
42808
  */
42116
42809
  setSocket(socket, head, options) {
42117
42810
  const receiver = new Receiver({
42811
+ allowSynchronousEvents: options.allowSynchronousEvents,
42118
42812
  binaryType: this.binaryType,
42119
42813
  extensions: this._extensions,
42120
42814
  isServer: this._isServer,
@@ -42532,6 +43226,13 @@ module.exports = WebSocket;
42532
43226
  * @param {(String|URL)} address The URL to which to connect
42533
43227
  * @param {Array} protocols The subprotocols
42534
43228
  * @param {Object} [options] Connection options
43229
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
43230
+ * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
43231
+ * times in the same tick
43232
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
43233
+ * automatically send a pong in response to a ping
43234
+ * @param {Function} [options.finishRequest] A function which can be used to
43235
+ * customize the headers of each http request before it is sent
42535
43236
  * @param {Boolean} [options.followRedirects=false] Whether or not to follow
42536
43237
  * redirects
42537
43238
  * @param {Function} [options.generateMask] The function used to generate the
@@ -42554,6 +43255,8 @@ module.exports = WebSocket;
42554
43255
  */
42555
43256
  function initAsClient(websocket, address, protocols, options) {
42556
43257
  const opts = {
43258
+ allowSynchronousEvents: true,
43259
+ autoPong: true,
42557
43260
  protocolVersion: protocolVersions[1],
42558
43261
  maxPayload: 100 * 1024 * 1024,
42559
43262
  skipUTF8Validation: false,
@@ -42561,7 +43264,6 @@ function initAsClient(websocket, address, protocols, options) {
42561
43264
  followRedirects: false,
42562
43265
  maxRedirects: 10,
42563
43266
  ...options,
42564
- createConnection: undefined,
42565
43267
  socketPath: undefined,
42566
43268
  hostname: undefined,
42567
43269
  protocol: undefined,
@@ -42572,6 +43274,8 @@ function initAsClient(websocket, address, protocols, options) {
42572
43274
  port: undefined
42573
43275
  };
42574
43276
 
43277
+ websocket._autoPong = opts.autoPong;
43278
+
42575
43279
  if (!protocolVersions.includes(opts.protocolVersion)) {
42576
43280
  throw new RangeError(
42577
43281
  `Unsupported protocol version: ${opts.protocolVersion} ` +
@@ -42630,7 +43334,8 @@ function initAsClient(websocket, address, protocols, options) {
42630
43334
  const protocolSet = new Set();
42631
43335
  let perMessageDeflate;
42632
43336
 
42633
- opts.createConnection = isSecure ? tlsConnect : netConnect;
43337
+ opts.createConnection =
43338
+ opts.createConnection || (isSecure ? tlsConnect : netConnect);
42634
43339
  opts.defaultPort = opts.defaultPort || defaultPort;
42635
43340
  opts.port = parsedUrl.port || defaultPort;
42636
43341
  opts.host = parsedUrl.hostname.startsWith('[')
@@ -42720,8 +43425,8 @@ function initAsClient(websocket, address, protocols, options) {
42720
43425
  ? opts.socketPath === websocket._originalHostOrSocketPath
42721
43426
  : false
42722
43427
  : websocket._originalIpc
42723
- ? false
42724
- : parsedUrl.host === websocket._originalHostOrSocketPath;
43428
+ ? false
43429
+ : parsedUrl.host === websocket._originalHostOrSocketPath;
42725
43430
 
42726
43431
  if (!isSameHost || (websocket._originalSecure && !isSecure)) {
42727
43432
  //
@@ -42905,6 +43610,7 @@ function initAsClient(websocket, address, protocols, options) {
42905
43610
  }
42906
43611
 
42907
43612
  websocket.setSocket(socket, head, {
43613
+ allowSynchronousEvents: opts.allowSynchronousEvents,
42908
43614
  generateMask: opts.generateMask,
42909
43615
  maxPayload: opts.maxPayload,
42910
43616
  skipUTF8Validation: opts.skipUTF8Validation
@@ -43115,7 +43821,7 @@ function receiverOnMessage(data, isBinary) {
43115
43821
  function receiverOnPing(data) {
43116
43822
  const websocket = this[kWebSocket];
43117
43823
 
43118
- websocket.pong(data, !websocket._isServer, NOOP);
43824
+ if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
43119
43825
  websocket.emit('ping', data);
43120
43826
  }
43121
43827
 
@@ -43246,7 +43952,7 @@ function socketOnError() {
43246
43952
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43247
43953
  exports.getDefaultMapping = void 0;
43248
43954
  /********************************************************************************
43249
- * Copyright (c) 2022 STMicroelectronics and others.
43955
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
43250
43956
  *
43251
43957
  * This program and the accompanying materials are made available under the
43252
43958
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -43732,7 +44438,7 @@ exports.GGraphBuilder = GGraphBuilder;
43732
44438
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43733
44439
  exports.GHtmlRootBuilder = exports.GHtmlRoot = void 0;
43734
44440
  /********************************************************************************
43735
- * Copyright (c) 2022 StMicroelectronics.
44441
+ * Copyright (c) 2022-2024 StMicroelectronics.
43736
44442
  *
43737
44443
  * This program and the accompanying materials are made available under the
43738
44444
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -43982,7 +44688,7 @@ var GLayoutingBuilder;
43982
44688
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43983
44689
  exports.GModelRootBuilder = exports.GModelRoot = exports.GModelElementBuilder = exports.GModelElement = void 0;
43984
44690
  /********************************************************************************
43985
- * Copyright (c) 2022 STMicroelectronics and others.
44691
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
43986
44692
  *
43987
44693
  * This program and the accompanying materials are made available under the
43988
44694
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -44479,7 +45185,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
44479
45185
  };
44480
45186
  Object.defineProperty(exports, "__esModule", ({ value: true }));
44481
45187
  /********************************************************************************
44482
- * Copyright (c) 2022 STMicroelectronics and others.
45188
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
44483
45189
  *
44484
45190
  * This program and the accompanying materials are made available under the
44485
45191
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -44529,7 +45235,7 @@ __exportStar(__webpack_require__(/*! ./gshaped-prerendered-element */ "../../pac
44529
45235
  Object.defineProperty(exports, "__esModule", ({ value: true }));
44530
45236
  exports.configureELKLayoutModule = void 0;
44531
45237
  /********************************************************************************
44532
- * Copyright (c) 2022-2023 STMicroelectronics and others.
45238
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
44533
45239
  *
44534
45240
  * This program and the accompanying materials are made available under the
44535
45241
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -45035,10 +45741,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
45035
45741
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
45036
45742
  };
45037
45743
  Object.defineProperty(exports, "__esModule", ({ value: true }));
45744
+ /********************************************************************************
45745
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
45746
+ *
45747
+ * This program and the accompanying materials are made available under the
45748
+ * terms of the Eclipse Public License v. 2.0 which is available at
45749
+ * http://www.eclipse.org/legal/epl-2.0.
45750
+ *
45751
+ * This Source Code may also be made available under the following Secondary
45752
+ * Licenses when the conditions for such availability set forth in the Eclipse
45753
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
45754
+ * with the GNU Classpath Exception which is available at
45755
+ * https://www.gnu.org/software/classpath/license.html.
45756
+ *
45757
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
45758
+ ********************************************************************************/
45038
45759
  __exportStar(__webpack_require__(/*! ./di.config */ "../../packages/layout-elk/lib/di.config.js"), exports);
45039
45760
  __exportStar(__webpack_require__(/*! ./element-filter */ "../../packages/layout-elk/lib/element-filter.js"), exports);
45040
45761
  __exportStar(__webpack_require__(/*! ./glsp-elk-layout-engine */ "../../packages/layout-elk/lib/glsp-elk-layout-engine.js"), exports);
45041
45762
  __exportStar(__webpack_require__(/*! ./layout-configurator */ "../../packages/layout-elk/lib/layout-configurator.js"), exports);
45763
+ __exportStar(__webpack_require__(/*! ./reexport */ "../../packages/layout-elk/lib/reexport.js"), exports);
45042
45764
 
45043
45765
 
45044
45766
  /***/ }),
@@ -45150,6 +45872,19 @@ exports.FallbackLayoutConfigurator = FallbackLayoutConfigurator = __decorate([
45150
45872
  ], FallbackLayoutConfigurator);
45151
45873
 
45152
45874
 
45875
+ /***/ }),
45876
+
45877
+ /***/ "../../packages/layout-elk/lib/reexport.js":
45878
+ /*!*************************************************!*\
45879
+ !*** ../../packages/layout-elk/lib/reexport.js ***!
45880
+ \*************************************************/
45881
+ /***/ ((__unused_webpack_module, exports) => {
45882
+
45883
+ "use strict";
45884
+
45885
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
45886
+
45887
+
45153
45888
  /***/ }),
45154
45889
 
45155
45890
  /***/ "../../packages/server/lib/common/actions/action-dispatcher.js":
@@ -45783,7 +46518,7 @@ exports.CompoundCommand = CompoundCommand;
45783
46518
  "use strict";
45784
46519
 
45785
46520
  /********************************************************************************
45786
- * Copyright (c) 2023 EclipseSource and others.
46521
+ * Copyright (c) 2023-2024 EclipseSource and others.
45787
46522
  *
45788
46523
  * This program and the accompanying materials are made available under the
45789
46524
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -46116,7 +46851,7 @@ exports.isConstructor = isConstructor;
46116
46851
  Object.defineProperty(exports, "__esModule", ({ value: true }));
46117
46852
  exports.createClientSessionModule = void 0;
46118
46853
  /********************************************************************************
46119
- * Copyright (c) 2022-2023 STMicroelectronics and others.
46854
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
46120
46855
  *
46121
46856
  * This program and the accompanying materials are made available under the
46122
46857
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -46131,6 +46866,7 @@ exports.createClientSessionModule = void 0;
46131
46866
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
46132
46867
  ********************************************************************************/
46133
46868
  const protocol_1 = __webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js");
46869
+ const di_1 = __webpack_require__(/*! @eclipse-glsp/protocol/lib/di */ "../../node_modules/@eclipse-glsp/protocol/lib/di/index.js");
46134
46870
  const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/es/inversify.js");
46135
46871
  const service_identifiers_1 = __webpack_require__(/*! ./service-identifiers */ "../../packages/server/lib/common/di/service-identifiers.js");
46136
46872
  /**
@@ -46139,7 +46875,7 @@ const service_identifiers_1 = __webpack_require__(/*! ./service-identifiers */ "
46139
46875
  function createClientSessionModule(options) {
46140
46876
  return new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
46141
46877
  const context = { bind, unbind, isBound, rebind };
46142
- (0, protocol_1.bindOrRebind)(context, service_identifiers_1.ClientId).toConstantValue(options.clientId);
46878
+ (0, di_1.bindOrRebind)(context, service_identifiers_1.ClientId).toConstantValue(options.clientId);
46143
46879
  bind(protocol_1.GLSPClientProxy).toConstantValue(options.glspClient);
46144
46880
  bind(service_identifiers_1.ClientActionKinds).toConstantValue(new Set(options.clientActionKinds));
46145
46881
  });
@@ -46489,7 +47225,7 @@ exports.GLSPModule = GLSPModule = __decorate([
46489
47225
  Object.defineProperty(exports, "__esModule", ({ value: true }));
46490
47226
  exports.InstanceMultiBinding = exports.MultiBinding = exports.AbstractMultiBinding = void 0;
46491
47227
  /********************************************************************************
46492
- * Copyright (c) 2022-2023 STMicroelectronics and others.
47228
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
46493
47229
  *
46494
47230
  * This program and the accompanying materials are made available under the
46495
47231
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -47281,7 +48017,7 @@ exports.DefaultContextEditValidatorRegistry = DefaultContextEditValidatorRegistr
47281
48017
  Object.defineProperty(exports, "__esModule", ({ value: true }));
47282
48018
  exports.ValidateLabelEditAdapter = exports.ContextEditValidator = void 0;
47283
48019
  /********************************************************************************
47284
- * Copyright (c) 2022-2023 STMicroelectronics and others.
48020
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
47285
48021
  *
47286
48022
  * This program and the accompanying materials are made available under the
47287
48023
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -48121,7 +48857,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
48121
48857
  Object.defineProperty(exports, "__esModule", ({ value: true }));
48122
48858
  exports.ModelSubmissionHandler = void 0;
48123
48859
  /********************************************************************************
48124
- * Copyright (c) 2022-2023 STMicroelectronics and others.
48860
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
48125
48861
  *
48126
48862
  * This program and the accompanying materials are made available under the
48127
48863
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -49815,7 +50551,7 @@ exports.GModelCreateEdgeOperationHandler = GModelCreateEdgeOperationHandler = __
49815
50551
  "use strict";
49816
50552
 
49817
50553
  /********************************************************************************
49818
- * Copyright (c) 2022-2023 EclipseSource and others.
50554
+ * Copyright (c) 2022-2024 EclipseSource and others.
49819
50555
  *
49820
50556
  * This program and the accompanying materials are made available under the
49821
50557
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -49873,7 +50609,10 @@ let GModelCreateNodeOperationHandler = class GModelCreateNodeOperationHandler ex
49873
50609
  return this.elementTypeIds.map(elementTypeId => this.createTriggerNodeCreationAction(elementTypeId));
49874
50610
  }
49875
50611
  createTriggerNodeCreationAction(elementTypeId) {
49876
- return protocol_1.TriggerNodeCreationAction.create(elementTypeId, { ghostElement: this.createTriggerGhostElement(elementTypeId), args: this.createTriggerArgs(elementTypeId) });
50612
+ return protocol_1.TriggerNodeCreationAction.create(elementTypeId, {
50613
+ ghostElement: this.createTriggerGhostElement(elementTypeId),
50614
+ args: this.createTriggerArgs(elementTypeId)
50615
+ });
49877
50616
  }
49878
50617
  createTriggerGhostElement(elementTypeId) {
49879
50618
  return undefined;
@@ -50066,59 +50805,6 @@ __decorate([
50066
50805
  ], GModelOperationHandler.prototype, "serializer", void 0);
50067
50806
 
50068
50807
 
50069
- /***/ }),
50070
-
50071
- /***/ "../../packages/server/lib/common/gmodel/index.js":
50072
- /*!********************************************************!*\
50073
- !*** ../../packages/server/lib/common/gmodel/index.js ***!
50074
- \********************************************************/
50075
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
50076
-
50077
- "use strict";
50078
-
50079
- /********************************************************************************
50080
- * Copyright (c) 2022-2023 STMicroelectronics and others.
50081
- *
50082
- * This program and the accompanying materials are made available under the
50083
- * terms of the Eclipse Public License v. 2.0 which is available at
50084
- * http://www.eclipse.org/legal/epl-2.0.
50085
- *
50086
- * This Source Code may also be made available under the following Secondary
50087
- * Licenses when the conditions for such availability set forth in the Eclipse
50088
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
50089
- * with the GNU Classpath Exception which is available at
50090
- * https://www.gnu.org/software/classpath/license.html.
50091
- *
50092
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
50093
- ********************************************************************************/
50094
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
50095
- if (k2 === undefined) k2 = k;
50096
- var desc = Object.getOwnPropertyDescriptor(m, k);
50097
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
50098
- desc = { enumerable: true, get: function() { return m[k]; } };
50099
- }
50100
- Object.defineProperty(o, k2, desc);
50101
- }) : (function(o, m, k, k2) {
50102
- if (k2 === undefined) k2 = k;
50103
- o[k2] = m[k];
50104
- }));
50105
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
50106
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
50107
- };
50108
- Object.defineProperty(exports, "__esModule", ({ value: true }));
50109
- __exportStar(__webpack_require__(/*! ./apply-label-edit-operation-handler */ "../../packages/server/lib/common/gmodel/apply-label-edit-operation-handler.js"), exports);
50110
- __exportStar(__webpack_require__(/*! ./change-bounds-operation-handler */ "../../packages/server/lib/common/gmodel/change-bounds-operation-handler.js"), exports);
50111
- __exportStar(__webpack_require__(/*! ./change-routing-points-operation-handler */ "../../packages/server/lib/common/gmodel/change-routing-points-operation-handler.js"), exports);
50112
- __exportStar(__webpack_require__(/*! ./cut-operation-handler */ "../../packages/server/lib/common/gmodel/cut-operation-handler.js"), exports);
50113
- __exportStar(__webpack_require__(/*! ./delete-operation-handler */ "../../packages/server/lib/common/gmodel/delete-operation-handler.js"), exports);
50114
- __exportStar(__webpack_require__(/*! ./gmodel-create-edge-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-edge-operation-handler.js"), exports);
50115
- __exportStar(__webpack_require__(/*! ./gmodel-create-node-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-node-operation-handler.js"), exports);
50116
- __exportStar(__webpack_require__(/*! ./gmodel-diagram-module */ "../../packages/server/lib/common/gmodel/gmodel-diagram-module.js"), exports);
50117
- __exportStar(__webpack_require__(/*! ./gmodel-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-operation-handler.js"), exports);
50118
- __exportStar(__webpack_require__(/*! ./paste-operation-handler */ "../../packages/server/lib/common/gmodel/paste-operation-handler.js"), exports);
50119
- __exportStar(__webpack_require__(/*! ./reconnect-edge-operation-handler */ "../../packages/server/lib/common/gmodel/reconnect-edge-operation-handler.js"), exports);
50120
-
50121
-
50122
50808
  /***/ }),
50123
50809
 
50124
50810
  /***/ "../../packages/server/lib/common/gmodel/paste-operation-handler.js":
@@ -50350,7 +51036,7 @@ exports.GModelReconnectEdgeOperationHandler = GModelReconnectEdgeOperationHandle
50350
51036
  "use strict";
50351
51037
 
50352
51038
  /********************************************************************************
50353
- * Copyright (c) 2022-2023 STMicroelectronics and others.
51039
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
50354
51040
  *
50355
51041
  * This program and the accompanying materials are made available under the
50356
51042
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -50379,8 +51065,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
50379
51065
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
50380
51066
  };
50381
51067
  Object.defineProperty(exports, "__esModule", ({ value: true }));
50382
- __exportStar(__webpack_require__(/*! @eclipse-glsp/graph */ "../../packages/graph/lib/index.js"), exports);
50383
- __exportStar(__webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js"), exports);
50384
51068
  __exportStar(__webpack_require__(/*! ./actions/action-dispatcher */ "../../packages/server/lib/common/actions/action-dispatcher.js"), exports);
50385
51069
  __exportStar(__webpack_require__(/*! ./actions/action-handler */ "../../packages/server/lib/common/actions/action-handler.js"), exports);
50386
51070
  __exportStar(__webpack_require__(/*! ./actions/action-handler-registry */ "../../packages/server/lib/common/actions/action-handler-registry.js"), exports);
@@ -50429,19 +51113,34 @@ __exportStar(__webpack_require__(/*! ./features/navigation/request-navigation-ta
50429
51113
  __exportStar(__webpack_require__(/*! ./features/navigation/resolve-navigation-targets-action-handler */ "../../packages/server/lib/common/features/navigation/resolve-navigation-targets-action-handler.js"), exports);
50430
51114
  __exportStar(__webpack_require__(/*! ./features/popup/popup-model-factory */ "../../packages/server/lib/common/features/popup/popup-model-factory.js"), exports);
50431
51115
  __exportStar(__webpack_require__(/*! ./features/popup/request-popup-model-action-handler */ "../../packages/server/lib/common/features/popup/request-popup-model-action-handler.js"), exports);
51116
+ __exportStar(__webpack_require__(/*! ./features/progress/progress-service */ "../../packages/server/lib/common/features/progress/progress-service.js"), exports);
50432
51117
  __exportStar(__webpack_require__(/*! ./features/type-hints/edge-creation-checker */ "../../packages/server/lib/common/features/type-hints/edge-creation-checker.js"), exports);
51118
+ __exportStar(__webpack_require__(/*! ./features/type-hints/request-check-edge-action-handler */ "../../packages/server/lib/common/features/type-hints/request-check-edge-action-handler.js"), exports);
50433
51119
  __exportStar(__webpack_require__(/*! ./features/type-hints/request-type-hints-action-handler */ "../../packages/server/lib/common/features/type-hints/request-type-hints-action-handler.js"), exports);
50434
51120
  __exportStar(__webpack_require__(/*! ./features/validation/model-validator */ "../../packages/server/lib/common/features/validation/model-validator.js"), exports);
50435
51121
  __exportStar(__webpack_require__(/*! ./features/validation/request-markers-handler */ "../../packages/server/lib/common/features/validation/request-markers-handler.js"), exports);
50436
- __exportStar(__webpack_require__(/*! ./gmodel/index */ "../../packages/server/lib/common/gmodel/index.js"), exports);
51122
+ __exportStar(__webpack_require__(/*! ./gmodel/apply-label-edit-operation-handler */ "../../packages/server/lib/common/gmodel/apply-label-edit-operation-handler.js"), exports);
51123
+ __exportStar(__webpack_require__(/*! ./gmodel/change-bounds-operation-handler */ "../../packages/server/lib/common/gmodel/change-bounds-operation-handler.js"), exports);
51124
+ __exportStar(__webpack_require__(/*! ./gmodel/change-routing-points-operation-handler */ "../../packages/server/lib/common/gmodel/change-routing-points-operation-handler.js"), exports);
51125
+ __exportStar(__webpack_require__(/*! ./gmodel/cut-operation-handler */ "../../packages/server/lib/common/gmodel/cut-operation-handler.js"), exports);
51126
+ __exportStar(__webpack_require__(/*! ./gmodel/delete-operation-handler */ "../../packages/server/lib/common/gmodel/delete-operation-handler.js"), exports);
51127
+ __exportStar(__webpack_require__(/*! ./gmodel/gmodel-create-edge-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-edge-operation-handler.js"), exports);
51128
+ __exportStar(__webpack_require__(/*! ./gmodel/gmodel-create-node-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-node-operation-handler.js"), exports);
51129
+ __exportStar(__webpack_require__(/*! ./gmodel/gmodel-diagram-module */ "../../packages/server/lib/common/gmodel/gmodel-diagram-module.js"), exports);
51130
+ __exportStar(__webpack_require__(/*! ./gmodel/gmodel-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-operation-handler.js"), exports);
51131
+ __exportStar(__webpack_require__(/*! ./gmodel/paste-operation-handler */ "../../packages/server/lib/common/gmodel/paste-operation-handler.js"), exports);
51132
+ __exportStar(__webpack_require__(/*! ./gmodel/reconnect-edge-operation-handler */ "../../packages/server/lib/common/gmodel/reconnect-edge-operation-handler.js"), exports);
50437
51133
  __exportStar(__webpack_require__(/*! ./launch/glsp-server-launcher */ "../../packages/server/lib/common/launch/glsp-server-launcher.js"), exports);
51134
+ __exportStar(__webpack_require__(/*! ./launch/jsonrpc-server-launcher */ "../../packages/server/lib/common/launch/jsonrpc-server-launcher.js"), exports);
50438
51135
  __exportStar(__webpack_require__(/*! ./operations/compound-operation-handler */ "../../packages/server/lib/common/operations/compound-operation-handler.js"), exports);
50439
51136
  __exportStar(__webpack_require__(/*! ./operations/create-operation-handler */ "../../packages/server/lib/common/operations/create-operation-handler.js"), exports);
50440
51137
  __exportStar(__webpack_require__(/*! ./operations/json-operation-handler */ "../../packages/server/lib/common/operations/json-operation-handler.js"), exports);
50441
51138
  __exportStar(__webpack_require__(/*! ./operations/operation-action-handler */ "../../packages/server/lib/common/operations/operation-action-handler.js"), exports);
50442
51139
  __exportStar(__webpack_require__(/*! ./operations/operation-handler */ "../../packages/server/lib/common/operations/operation-handler.js"), exports);
50443
51140
  __exportStar(__webpack_require__(/*! ./operations/operation-handler-registry */ "../../packages/server/lib/common/operations/operation-handler-registry.js"), exports);
51141
+ __exportStar(__webpack_require__(/*! ./protocol/client-action */ "../../packages/server/lib/common/protocol/client-action.js"), exports);
50444
51142
  __exportStar(__webpack_require__(/*! ./protocol/glsp-server */ "../../packages/server/lib/common/protocol/glsp-server.js"), exports);
51143
+ __exportStar(__webpack_require__(/*! ./reexport */ "../../packages/server/lib/common/reexport.js"), exports);
50445
51144
  __exportStar(__webpack_require__(/*! ./session/client-session */ "../../packages/server/lib/common/session/client-session.js"), exports);
50446
51145
  __exportStar(__webpack_require__(/*! ./session/client-session-factory */ "../../packages/server/lib/common/session/client-session-factory.js"), exports);
50447
51146
  __exportStar(__webpack_require__(/*! ./session/client-session-initializer */ "../../packages/server/lib/common/session/client-session-initializer.js"), exports);
@@ -51430,6 +52129,51 @@ exports.DefaultGLSPServer = DefaultGLSPServer = DefaultGLSPServer_1 = __decorate
51430
52129
  ], DefaultGLSPServer);
51431
52130
 
51432
52131
 
52132
+ /***/ }),
52133
+
52134
+ /***/ "../../packages/server/lib/common/reexport.js":
52135
+ /*!****************************************************!*\
52136
+ !*** ../../packages/server/lib/common/reexport.js ***!
52137
+ \****************************************************/
52138
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
52139
+
52140
+ "use strict";
52141
+
52142
+ /********************************************************************************
52143
+ * Copyright (c) 2024 EclipseSource and others.
52144
+ *
52145
+ * This program and the accompanying materials are made available under the
52146
+ * terms of the Eclipse Public License v. 2.0 which is available at
52147
+ * http://www.eclipse.org/legal/epl-2.0.
52148
+ *
52149
+ * This Source Code may also be made available under the following Secondary
52150
+ * Licenses when the conditions for such availability set forth in the Eclipse
52151
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
52152
+ * with the GNU Classpath Exception which is available at
52153
+ * https://www.gnu.org/software/classpath/license.html.
52154
+ *
52155
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
52156
+ ********************************************************************************/
52157
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
52158
+ if (k2 === undefined) k2 = k;
52159
+ var desc = Object.getOwnPropertyDescriptor(m, k);
52160
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
52161
+ desc = { enumerable: true, get: function() { return m[k]; } };
52162
+ }
52163
+ Object.defineProperty(o, k2, desc);
52164
+ }) : (function(o, m, k, k2) {
52165
+ if (k2 === undefined) k2 = k;
52166
+ o[k2] = m[k];
52167
+ }));
52168
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
52169
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
52170
+ };
52171
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
52172
+ __exportStar(__webpack_require__(/*! @eclipse-glsp/graph */ "../../packages/graph/lib/index.js"), exports);
52173
+ __exportStar(__webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js"), exports);
52174
+ __exportStar(__webpack_require__(/*! @eclipse-glsp/protocol/lib/di */ "../../node_modules/@eclipse-glsp/protocol/lib/di/index.js"), exports);
52175
+
52176
+
51433
52177
  /***/ }),
51434
52178
 
51435
52179
  /***/ "../../packages/server/lib/common/session/client-session-factory.js":
@@ -51835,7 +52579,7 @@ ClientOptionsUtil.IS_RECONNECTING = 'isReconnecting';
51835
52579
  "use strict";
51836
52580
 
51837
52581
  /********************************************************************************
51838
- * Copyright (c) 2022-2023 EclipseSource and others.
52582
+ * Copyright (c) 2022-2024 EclipseSource and others.
51839
52583
  *
51840
52584
  * This program and the accompanying materials are made available under the
51841
52585
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -51946,7 +52690,7 @@ exports.configureConsoleLogger = configureConsoleLogger;
51946
52690
  Object.defineProperty(exports, "__esModule", ({ value: true }));
51947
52691
  exports.getOrThrow = exports.GLSPServerError = void 0;
51948
52692
  /********************************************************************************
51949
- * Copyright (c) 2022-2023 STMicroelectronics and others.
52693
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
51950
52694
  *
51951
52695
  * This program and the accompanying materials are made available under the
51952
52696
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -52776,7 +53520,12 @@ class WinstonLogger extends logger_1.Logger {
52776
53520
  return `${param.message}
52777
53521
  ${param.stack || ''}`;
52778
53522
  }
52779
- return JSON.stringify(param, undefined, 4);
53523
+ try {
53524
+ return JSON.stringify(param, undefined, 4);
53525
+ }
53526
+ catch (_) {
53527
+ return '';
53528
+ }
52780
53529
  }
52781
53530
  }
52782
53531
  exports.WinstonLogger = WinstonLogger;
@@ -52887,7 +53636,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
52887
53636
  };
52888
53637
  Object.defineProperty(exports, "__esModule", ({ value: true }));
52889
53638
  /********************************************************************************
52890
- * Copyright (c) 2022-2023 EclipseSource and others.
53639
+ * Copyright (c) 2022-2024 EclipseSource and others.
52891
53640
  *
52892
53641
  * This program and the accompanying materials are made available under the
52893
53642
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -52901,7 +53650,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
52901
53650
  *
52902
53651
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
52903
53652
  ********************************************************************************/
52904
- __exportStar(__webpack_require__(/*! ../common/index */ "../../packages/server/lib/common/index.js"), exports);
52905
53653
  __exportStar(__webpack_require__(/*! ./abstract-json-model-storage */ "../../packages/server/lib/node/abstract-json-model-storage.js"), exports);
52906
53654
  __exportStar(__webpack_require__(/*! ./di/app-module */ "../../packages/server/lib/node/di/app-module.js"), exports);
52907
53655
  __exportStar(__webpack_require__(/*! ./di/winston-logger */ "../../packages/server/lib/node/di/winston-logger.js"), exports);
@@ -52910,6 +53658,7 @@ __exportStar(__webpack_require__(/*! ./launch/cli-parser */ "../../packages/serv
52910
53658
  __exportStar(__webpack_require__(/*! ./launch/socket-cli-parser */ "../../packages/server/lib/node/launch/socket-cli-parser.js"), exports);
52911
53659
  __exportStar(__webpack_require__(/*! ./launch/socket-server-launcher */ "../../packages/server/lib/node/launch/socket-server-launcher.js"), exports);
52912
53660
  __exportStar(__webpack_require__(/*! ./launch/websocket-server-launcher */ "../../packages/server/lib/node/launch/websocket-server-launcher.js"), exports);
53661
+ __exportStar(__webpack_require__(/*! ./reexport */ "../../packages/server/lib/node/reexport.js"), exports);
52913
53662
 
52914
53663
 
52915
53664
  /***/ }),
@@ -53066,9 +53815,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
53066
53815
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
53067
53816
  };
53068
53817
  Object.defineProperty(exports, "__esModule", ({ value: true }));
53069
- exports.SocketServerLauncher = exports.START_UP_COMPLETE_MSG = void 0;
53818
+ exports.SocketServerLauncher = void 0;
53070
53819
  /********************************************************************************
53071
- * Copyright (c) 2022-2023 STMicroelectronics and others.
53820
+ * Copyright (c) 2022-2024 STMicroelectronics and others.
53072
53821
  *
53073
53822
  * This program and the accompanying materials are made available under the
53074
53823
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -53088,7 +53837,6 @@ const net = __webpack_require__(/*! net */ "net");
53088
53837
  const jsonrpc = __webpack_require__(/*! vscode-jsonrpc/node */ "../../node_modules/vscode-jsonrpc/node.js");
53089
53838
  const jsonrpc_server_launcher_1 = __webpack_require__(/*! ../../common/launch/jsonrpc-server-launcher */ "../../packages/server/lib/common/launch/jsonrpc-server-launcher.js");
53090
53839
  const logger_1 = __webpack_require__(/*! ../../common/utils/logger */ "../../packages/server/lib/common/utils/logger.js");
53091
- exports.START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed. Accepting requests on port:';
53092
53840
  let SocketServerLauncher = class SocketServerLauncher extends jsonrpc_server_launcher_1.JsonRpcGLSPServerLauncher {
53093
53841
  constructor() {
53094
53842
  super();
@@ -53272,6 +54020,49 @@ function wrapWebSocket(socket) {
53272
54020
  exports.wrapWebSocket = wrapWebSocket;
53273
54021
 
53274
54022
 
54023
+ /***/ }),
54024
+
54025
+ /***/ "../../packages/server/lib/node/reexport.js":
54026
+ /*!**************************************************!*\
54027
+ !*** ../../packages/server/lib/node/reexport.js ***!
54028
+ \**************************************************/
54029
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
54030
+
54031
+ "use strict";
54032
+
54033
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
54034
+ if (k2 === undefined) k2 = k;
54035
+ var desc = Object.getOwnPropertyDescriptor(m, k);
54036
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
54037
+ desc = { enumerable: true, get: function() { return m[k]; } };
54038
+ }
54039
+ Object.defineProperty(o, k2, desc);
54040
+ }) : (function(o, m, k, k2) {
54041
+ if (k2 === undefined) k2 = k;
54042
+ o[k2] = m[k];
54043
+ }));
54044
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
54045
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
54046
+ };
54047
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
54048
+ /********************************************************************************
54049
+ * Copyright (c) 2024 EclipseSource and others.
54050
+ *
54051
+ * This program and the accompanying materials are made available under the
54052
+ * terms of the Eclipse Public License v. 2.0 which is available at
54053
+ * http://www.eclipse.org/legal/epl-2.0.
54054
+ *
54055
+ * This Source Code may also be made available under the following Secondary
54056
+ * Licenses when the conditions for such availability set forth in the Eclipse
54057
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
54058
+ * with the GNU Classpath Exception which is available at
54059
+ * https://www.gnu.org/software/classpath/license.html.
54060
+ *
54061
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
54062
+ ********************************************************************************/
54063
+ __exportStar(__webpack_require__(/*! ../common */ "../../packages/server/lib/common/index.js"), exports);
54064
+
54065
+
53275
54066
  /***/ }),
53276
54067
 
53277
54068
  /***/ "../../packages/server/node.js":
@@ -57333,7 +58124,7 @@ var PatchError = /** @class */ (function (_super) {
57333
58124
  /***/ ((module) => {
57334
58125
 
57335
58126
  "use strict";
57336
- module.exports = JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.11.0","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["David Hyde <dabh@alumni.stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0","async":"^3.2.3","is-stream":"^2.0.0","logform":"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.5.0"},"devDependencies":{"@babel/cli":"^7.17.0","@babel/core":"^7.17.2","@babel/preset-env":"^7.16.7","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.3.1","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","cross-spawn-async":"^2.2.5","eslint":"^8.9.0","hock":"^1.4.1","mocha":"8.1.3","nyc":"^15.1.0","rimraf":"^5.0.5","split2":"^4.1.0","std-mocks":"^1.0.1","through2":"^4.0.2","winston-compat":"^0.1.5"},"main":"./lib/winston.js","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","test":"mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration","build":"rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 12.0.0"},"license":"MIT"}');
58127
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.13.0","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["David Hyde <dabh@alumni.stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0","async":"^3.2.3","is-stream":"^2.0.0","logform":"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},"devDependencies":{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","cross-spawn-async":"^2.2.5","eslint":"^8.57.0","hock":"^1.4.1","mocha":"^10.3.0","nyc":"^15.1.0","rimraf":"^5.0.5","split2":"^4.1.0","std-mocks":"^2.0.0","through2":"^4.0.2","winston-compat":"^0.1.5"},"main":"./lib/winston.js","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","test":"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration","build":"rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 12.0.0"},"license":"MIT"}');
57337
58128
 
57338
58129
  /***/ })
57339
58130